diff --git a/frontend/vendor/datefns/datefns.bundle.js b/frontend/vendor/datefns/datefns.bundle.js index 66013ae01..84bf02fb5 100644 --- a/frontend/vendor/datefns/datefns.bundle.js +++ b/frontend/vendor/datefns/datefns.bundle.js @@ -1,7 +1,2182 @@ (function(){'use strict';var global$1 = (typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : - typeof window !== "undefined" ? window : {});var MILLISECONDS_IN_MINUTE = 60000; + typeof window !== "undefined" ? window : {});var formatDistanceLocale = { + lessThanXSeconds: { + one: 'moins d’une seconde', + other: 'moins de {{count}} secondes' + }, + xSeconds: { + one: '1 seconde', + other: '{{count}} secondes' + }, + halfAMinute: '30 secondes', + lessThanXMinutes: { + one: 'moins d’une minute', + other: 'moins de {{count}} minutes' + }, + xMinutes: { + one: '1 minute', + other: '{{count}} minutes' + }, + aboutXHours: { + one: 'environ 1 heure', + other: 'environ {{count}} heures' + }, + xHours: { + one: '1 heure', + other: '{{count}} heures' + }, + xDays: { + one: '1 jour', + other: '{{count}} jours' + }, + aboutXMonths: { + one: 'environ 1 mois', + other: 'environ {{count}} mois' + }, + xMonths: { + one: '1 mois', + other: '{{count}} mois' + }, + aboutXYears: { + one: 'environ 1 an', + other: 'environ {{count}} ans' + }, + xYears: { + one: '1 an', + other: '{{count}} ans' + }, + overXYears: { + one: 'plus d’un an', + other: 'plus de {{count}} ans' + }, + almostXYears: { + one: 'presqu’un an', + other: 'presque {{count}} ans' + } +}; +function formatDistance(token, count, options) { + options = options || {}; + var result; + if (typeof formatDistanceLocale[token] === 'string') { + result = formatDistanceLocale[token]; + } else if (count === 1) { + result = formatDistanceLocale[token].one; + } else { + result = formatDistanceLocale[token].other.replace('{{count}}', count); + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return 'dans ' + result; + } else { + return 'il y a ' + result; + } + } + + return result; +}function buildFormatLongFn(args) { + return function (dirtyOptions) { + var options = dirtyOptions || {}; + var width = options.width ? String(options.width) : args.defaultWidth; + var format = args.formats[width] || args.formats[args.defaultWidth]; + return format; + }; +}var dateFormats = { + full: 'EEEE d MMMM y', + long: 'd MMMM y', + medium: 'd MMM y', + short: 'dd/MM/y' +}; +var timeFormats = { + full: 'HH:mm:ss zzzz', + long: 'HH:mm:ss z', + medium: 'HH:mm:ss', + short: 'HH:mm' +}; +var dateTimeFormats = { + full: "{{date}} 'à' {{time}}", + long: "{{date}} 'à' {{time}}", + medium: '{{date}}, {{time}}', + short: '{{date}}, {{time}}' +}; +var formatLong = { + date: buildFormatLongFn({ + formats: dateFormats, + defaultWidth: 'full' + }), + time: buildFormatLongFn({ + formats: timeFormats, + defaultWidth: 'full' + }), + dateTime: buildFormatLongFn({ + formats: dateTimeFormats, + defaultWidth: 'full' + }) +};var formatRelativeLocale = { + lastWeek: "eeee 'dernier à' p", + yesterday: "'hier à' p", + today: "'aujourd’hui à' p", + tomorrow: "'demain à' p'", + nextWeek: "eeee 'prochain à' p", + other: 'P' +}; +function formatRelative(token, _date, _baseDate, _options) { + return formatRelativeLocale[token]; +}function buildLocalizeFn(args) { + return function (dirtyIndex, dirtyOptions) { + var options = dirtyOptions || {}; + var context = options.context ? String(options.context) : 'standalone'; + var valuesArray; + + if (context === 'formatting' && args.formattingValues) { + var defaultWidth = args.defaultFormattingWidth || args.defaultWidth; + var width = options.width ? String(options.width) : defaultWidth; + valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth]; + } else { + var _defaultWidth = args.defaultWidth; + + var _width = options.width ? String(options.width) : args.defaultWidth; + + valuesArray = args.values[_width] || args.values[_defaultWidth]; + } + + var index = args.argumentCallback ? args.argumentCallback(dirtyIndex) : dirtyIndex; + return valuesArray[index]; + }; +}var eraValues = { + narrow: ['av. J.-C', 'ap. J.-C'], + abbreviated: ['av. J.-C', 'ap. J.-C'], + wide: ['avant Jésus-Christ', 'après Jésus-Christ'] +}; +var quarterValues = { + narrow: ['T1', 'T2', 'T3', 'T4'], + abbreviated: ['1er trim.', '2ème trim.', '3ème trim.', '4ème trim.'], + wide: ['1er trimestre', '2ème trimestre', '3ème trimestre', '4ème trimestre'] +}; +var monthValues = { + narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'], + abbreviated: ['janv.', 'févr.', 'mars', 'avr.', 'mai', 'juin', 'juil.', 'août', 'sept.', 'oct.', 'nov.', 'déc.'], + wide: ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'] +}; +var dayValues = { + narrow: ['D', 'L', 'M', 'M', 'J', 'V', 'S'], + short: ['di', 'lu', 'ma', 'me', 'je', 've', 'sa'], + abbreviated: ['dim.', 'lun.', 'mar.', 'mer.', 'jeu.', 'ven.', 'sam.'], + wide: ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'] +}; +var dayPeriodValues = { + narrow: { + am: 'AM', + pm: 'PM', + midnight: 'minuit', + noon: 'midi', + morning: 'mat.', + afternoon: 'ap.m.', + evening: 'soir', + night: 'mat.' + }, + abbreviated: { + am: 'AM', + pm: 'PM', + midnight: 'minuit', + noon: 'midi', + morning: 'matin', + afternoon: 'après-midi', + evening: 'soir', + night: 'matin' + }, + wide: { + am: 'AM', + pm: 'PM', + midnight: 'minuit', + noon: 'midi', + morning: 'du matin', + afternoon: 'de l’après-midi', + evening: 'du soir', + night: 'du matin' + } +}; + +function ordinalNumber(dirtyNumber, dirtyOptions) { + var number = Number(dirtyNumber); + var options = dirtyOptions || {}; + var unit = String(options.unit); + var suffix; + + if (number === 0) { + return number; + } + + if (unit === 'year' || unit === 'hour' || unit === 'week') { + if (number === 1) { + suffix = 'ère'; + } else { + suffix = 'ème'; + } + } else { + if (number === 1) { + suffix = 'er'; + } else { + suffix = 'ème'; + } + } + + return number + suffix; +} + +var localize = { + ordinalNumber: ordinalNumber, + era: buildLocalizeFn({ + values: eraValues, + defaultWidth: 'wide' + }), + quarter: buildLocalizeFn({ + values: quarterValues, + defaultWidth: 'wide', + argumentCallback: function (quarter) { + return Number(quarter) - 1; + } + }), + month: buildLocalizeFn({ + values: monthValues, + defaultWidth: 'wide' + }), + day: buildLocalizeFn({ + values: dayValues, + defaultWidth: 'wide' + }), + dayPeriod: buildLocalizeFn({ + values: dayPeriodValues, + defaultWidth: 'wide' + }) +};function buildMatchPatternFn(args) { + return function (dirtyString, dirtyOptions) { + var string = String(dirtyString); + var options = dirtyOptions || {}; + var matchResult = string.match(args.matchPattern); + + if (!matchResult) { + return null; + } + + var matchedString = matchResult[0]; + var parseResult = string.match(args.parsePattern); + + if (!parseResult) { + return null; + } + + var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0]; + value = options.valueCallback ? options.valueCallback(value) : value; + return { + value: value, + rest: string.slice(matchedString.length) + }; + }; +}function buildMatchFn(args) { + return function (dirtyString, dirtyOptions) { + var string = String(dirtyString); + var options = dirtyOptions || {}; + var width = options.width; + var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth]; + var matchResult = string.match(matchPattern); + + if (!matchResult) { + return null; + } + + var matchedString = matchResult[0]; + var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth]; + var value; + + if (Object.prototype.toString.call(parsePatterns) === '[object Array]') { + value = findIndex(parsePatterns, function (pattern) { + return pattern.test(string); + }); + } else { + value = findKey(parsePatterns, function (pattern) { + return pattern.test(string); + }); + } + + value = args.valueCallback ? args.valueCallback(value) : value; + value = options.valueCallback ? options.valueCallback(value) : value; + return { + value: value, + rest: string.slice(matchedString.length) + }; + }; +} + +function findKey(object, predicate) { + for (var key in object) { + if (object.hasOwnProperty(key) && predicate(object[key])) { + return key; + } + } +} + +function findIndex(array, predicate) { + for (var key = 0; key < array.length; key++) { + if (predicate(array[key])) { + return key; + } + } +}var matchOrdinalNumberPattern = /^(\d+)(ième|ère|ème|er|e)?/i; +var parseOrdinalNumberPattern = /\d+/i; +var matchEraPatterns = { + narrow: /^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i, + abbreviated: /^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i, + wide: /^(avant Jésus-Christ|après Jésus-Christ)/i +}; +var parseEraPatterns = { + any: [/^av/i, /^ap/i] +}; +var matchQuarterPatterns = { + narrow: /^[1234]/i, + abbreviated: /^t[1234]/i, + wide: /^[1234](er|ème|e)? trimestre/i +}; +var parseQuarterPatterns = { + any: [/1/i, /2/i, /3/i, /4/i] +}; +var matchMonthPatterns = { + narrow: /^[jfmasond]/i, + abbreviated: /^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i, + wide: /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i +}; +var parseMonthPatterns = { + narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i], + any: [/^ja/i, /^f/i, /^mar/i, /^av/i, /^ma/i, /^juin/i, /^juil/i, /^ao/i, /^s/i, /^o/i, /^n/i, /^d/i] +}; +var matchDayPatterns = { + narrow: /^[lmjvsd]/i, + short: /^(di|lu|ma|me|je|ve|sa)/i, + abbreviated: /^(dim|lun|mar|mer|jeu|ven|sam)\.?/i, + wide: /^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i +}; +var parseDayPatterns = { + narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i], + any: [/^di/i, /^lu/i, /^ma/i, /^me/i, /^je/i, /^ve/i, /^sa/i] +}; +var matchDayPeriodPatterns = { + narrow: /^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i, + any: /^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i +}; +var parseDayPeriodPatterns = { + any: { + am: /^a/i, + pm: /^p/i, + midnight: /^min/i, + noon: /^mid/i, + morning: /mat/i, + afternoon: /ap/i, + evening: /soir/i, + night: /nuit/i + } +}; +var match = { + ordinalNumber: buildMatchPatternFn({ + matchPattern: matchOrdinalNumberPattern, + parsePattern: parseOrdinalNumberPattern, + valueCallback: function (value) { + return parseInt(value, 10); + } + }), + era: buildMatchFn({ + matchPatterns: matchEraPatterns, + defaultMatchWidth: 'wide', + parsePatterns: parseEraPatterns, + defaultParseWidth: 'any' + }), + quarter: buildMatchFn({ + matchPatterns: matchQuarterPatterns, + defaultMatchWidth: 'wide', + parsePatterns: parseQuarterPatterns, + defaultParseWidth: 'any', + valueCallback: function (index) { + return index + 1; + } + }), + month: buildMatchFn({ + matchPatterns: matchMonthPatterns, + defaultMatchWidth: 'wide', + parsePatterns: parseMonthPatterns, + defaultParseWidth: 'any' + }), + day: buildMatchFn({ + matchPatterns: matchDayPatterns, + defaultMatchWidth: 'wide', + parsePatterns: parseDayPatterns, + defaultParseWidth: 'any' + }), + dayPeriod: buildMatchFn({ + matchPatterns: matchDayPeriodPatterns, + defaultMatchWidth: 'any', + parsePatterns: parseDayPeriodPatterns, + defaultParseWidth: 'any' + }) +};/** + * @type {Locale} + * @category Locales + * @summary French locale. + * @language French + * @iso-639-2 fra + * @author Jean Dupouy [@izeau]{@link https://github.com/izeau} + * @author François B [@fbonzon]{@link https://github.com/fbonzon} + */ + +var locale = { + code: 'fr', + formatDistance: formatDistance, + formatLong: formatLong, + formatRelative: formatRelative, + localize: localize, + match: match, + options: { + weekStartsOn: 1 + /* Monday */ + , + firstWeekContainsDate: 1 + } +};var formatDistanceLocale$1 = { + lessThanXSeconds: { + one: 'less than a second', + other: 'less than {{count}} seconds' + }, + xSeconds: { + one: '1 second', + other: '{{count}} seconds' + }, + halfAMinute: 'half a minute', + lessThanXMinutes: { + one: 'less than a minute', + other: 'less than {{count}} minutes' + }, + xMinutes: { + one: '1 minute', + other: '{{count}} minutes' + }, + aboutXHours: { + one: 'about 1 hour', + other: 'about {{count}} hours' + }, + xHours: { + one: '1 hour', + other: '{{count}} hours' + }, + xDays: { + one: '1 day', + other: '{{count}} days' + }, + aboutXMonths: { + one: 'about 1 month', + other: 'about {{count}} months' + }, + xMonths: { + one: '1 month', + other: '{{count}} months' + }, + aboutXYears: { + one: 'about 1 year', + other: 'about {{count}} years' + }, + xYears: { + one: '1 year', + other: '{{count}} years' + }, + overXYears: { + one: 'over 1 year', + other: 'over {{count}} years' + }, + almostXYears: { + one: 'almost 1 year', + other: 'almost {{count}} years' + } +}; +function formatDistance$1(token, count, options) { + options = options || {}; + var result; + + if (typeof formatDistanceLocale$1[token] === 'string') { + result = formatDistanceLocale$1[token]; + } else if (count === 1) { + result = formatDistanceLocale$1[token].one; + } else { + result = formatDistanceLocale$1[token].other.replace('{{count}}', count); + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return 'in ' + result; + } else { + return result + ' ago'; + } + } + + return result; +}var dateFormats$1 = { + full: 'EEEE, MMMM do, y', + long: 'MMMM do, y', + medium: 'MMM d, y', + short: 'MM/dd/yyyy' +}; +var timeFormats$1 = { + full: 'h:mm:ss a zzzz', + long: 'h:mm:ss a z', + medium: 'h:mm:ss a', + short: 'h:mm a' +}; +var dateTimeFormats$1 = { + full: "{{date}} 'at' {{time}}", + long: "{{date}} 'at' {{time}}", + medium: '{{date}}, {{time}}', + short: '{{date}}, {{time}}' +}; +var formatLong$1 = { + date: buildFormatLongFn({ + formats: dateFormats$1, + defaultWidth: 'full' + }), + time: buildFormatLongFn({ + formats: timeFormats$1, + defaultWidth: 'full' + }), + dateTime: buildFormatLongFn({ + formats: dateTimeFormats$1, + defaultWidth: 'full' + }) +};var formatRelativeLocale$1 = { + lastWeek: "'last' eeee 'at' p", + yesterday: "'yesterday at' p", + today: "'today at' p", + tomorrow: "'tomorrow at' p", + nextWeek: "eeee 'at' p", + other: 'P' +}; +function formatRelative$1(token, _date, _baseDate, _options) { + return formatRelativeLocale$1[token]; +}var eraValues$1 = { + narrow: ['B', 'A'], + abbreviated: ['BC', 'AD'], + wide: ['Before Christ', 'Anno Domini'] +}; +var quarterValues$1 = { + narrow: ['1', '2', '3', '4'], + abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'], + wide: ['1st quarter', '2nd quarter', '3rd quarter', '4th quarter'] // Note: in English, the names of days of the week and months are capitalized. + // If you are making a new locale based on this one, check if the same is true for the language you're working on. + // Generally, formatted dates should look like they are in the middle of a sentence, + // e.g. in Spanish language the weekdays and months should be in the lowercase. + +}; +var monthValues$1 = { + narrow: ['J', 'F', 'M', 'A', 'M', 'J', 'J', 'A', 'S', 'O', 'N', 'D'], + abbreviated: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], + wide: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] +}; +var dayValues$1 = { + narrow: ['S', 'M', 'T', 'W', 'T', 'F', 'S'], + short: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'], + abbreviated: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], + wide: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'] +}; +var dayPeriodValues$1 = { + narrow: { + am: 'a', + pm: 'p', + midnight: 'mi', + noon: 'n', + morning: 'morning', + afternoon: 'afternoon', + evening: 'evening', + night: 'night' + }, + abbreviated: { + am: 'AM', + pm: 'PM', + midnight: 'midnight', + noon: 'noon', + morning: 'morning', + afternoon: 'afternoon', + evening: 'evening', + night: 'night' + }, + wide: { + am: 'a.m.', + pm: 'p.m.', + midnight: 'midnight', + noon: 'noon', + morning: 'morning', + afternoon: 'afternoon', + evening: 'evening', + night: 'night' + } +}; +var formattingDayPeriodValues = { + narrow: { + am: 'a', + pm: 'p', + midnight: 'mi', + noon: 'n', + morning: 'in the morning', + afternoon: 'in the afternoon', + evening: 'in the evening', + night: 'at night' + }, + abbreviated: { + am: 'AM', + pm: 'PM', + midnight: 'midnight', + noon: 'noon', + morning: 'in the morning', + afternoon: 'in the afternoon', + evening: 'in the evening', + night: 'at night' + }, + wide: { + am: 'a.m.', + pm: 'p.m.', + midnight: 'midnight', + noon: 'noon', + morning: 'in the morning', + afternoon: 'in the afternoon', + evening: 'in the evening', + night: 'at night' + } +}; + +function ordinalNumber$1(dirtyNumber, _dirtyOptions) { + var number = Number(dirtyNumber); // If ordinal numbers depend on context, for example, + // if they are different for different grammatical genders, + // use `options.unit`: + // + // var options = dirtyOptions || {} + // var unit = String(options.unit) + // + // where `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear', + // 'day', 'hour', 'minute', 'second' + + var rem100 = number % 100; + + if (rem100 > 20 || rem100 < 10) { + switch (rem100 % 10) { + case 1: + return number + 'st'; + + case 2: + return number + 'nd'; + + case 3: + return number + 'rd'; + } + } + + return number + 'th'; +} + +var localize$1 = { + ordinalNumber: ordinalNumber$1, + era: buildLocalizeFn({ + values: eraValues$1, + defaultWidth: 'wide' + }), + quarter: buildLocalizeFn({ + values: quarterValues$1, + defaultWidth: 'wide', + argumentCallback: function (quarter) { + return Number(quarter) - 1; + } + }), + month: buildLocalizeFn({ + values: monthValues$1, + defaultWidth: 'wide' + }), + day: buildLocalizeFn({ + values: dayValues$1, + defaultWidth: 'wide' + }), + dayPeriod: buildLocalizeFn({ + values: dayPeriodValues$1, + defaultWidth: 'wide', + formattingValues: formattingDayPeriodValues, + defaultFormattingWidth: 'wide' + }) +};var matchOrdinalNumberPattern$1 = /^(\d+)(th|st|nd|rd)?/i; +var parseOrdinalNumberPattern$1 = /\d+/i; +var matchEraPatterns$1 = { + narrow: /^(b|a)/i, + abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i, + wide: /^(before christ|before common era|anno domini|common era)/i +}; +var parseEraPatterns$1 = { + any: [/^b/i, /^(a|c)/i] +}; +var matchQuarterPatterns$1 = { + narrow: /^[1234]/i, + abbreviated: /^q[1234]/i, + wide: /^[1234](th|st|nd|rd)? quarter/i +}; +var parseQuarterPatterns$1 = { + any: [/1/i, /2/i, /3/i, /4/i] +}; +var matchMonthPatterns$1 = { + narrow: /^[jfmasond]/i, + abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i, + wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i +}; +var parseMonthPatterns$1 = { + narrow: [/^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i], + any: [/^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i] +}; +var matchDayPatterns$1 = { + narrow: /^[smtwf]/i, + short: /^(su|mo|tu|we|th|fr|sa)/i, + abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i, + wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i +}; +var parseDayPatterns$1 = { + narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i], + any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i] +}; +var matchDayPeriodPatterns$1 = { + narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i, + any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i +}; +var parseDayPeriodPatterns$1 = { + any: { + am: /^a/i, + pm: /^p/i, + midnight: /^mi/i, + noon: /^no/i, + morning: /morning/i, + afternoon: /afternoon/i, + evening: /evening/i, + night: /night/i + } +}; +var match$1 = { + ordinalNumber: buildMatchPatternFn({ + matchPattern: matchOrdinalNumberPattern$1, + parsePattern: parseOrdinalNumberPattern$1, + valueCallback: function (value) { + return parseInt(value, 10); + } + }), + era: buildMatchFn({ + matchPatterns: matchEraPatterns$1, + defaultMatchWidth: 'wide', + parsePatterns: parseEraPatterns$1, + defaultParseWidth: 'any' + }), + quarter: buildMatchFn({ + matchPatterns: matchQuarterPatterns$1, + defaultMatchWidth: 'wide', + parsePatterns: parseQuarterPatterns$1, + defaultParseWidth: 'any', + valueCallback: function (index) { + return index + 1; + } + }), + month: buildMatchFn({ + matchPatterns: matchMonthPatterns$1, + defaultMatchWidth: 'wide', + parsePatterns: parseMonthPatterns$1, + defaultParseWidth: 'any' + }), + day: buildMatchFn({ + matchPatterns: matchDayPatterns$1, + defaultMatchWidth: 'wide', + parsePatterns: parseDayPatterns$1, + defaultParseWidth: 'any' + }), + dayPeriod: buildMatchFn({ + matchPatterns: matchDayPeriodPatterns$1, + defaultMatchWidth: 'any', + parsePatterns: parseDayPeriodPatterns$1, + defaultParseWidth: 'any' + }) +};/** + * @type {Locale} + * @category Locales + * @summary English locale (United States). + * @language English + * @iso-639-2 eng + * @author Sasha Koss [@kossnocorp]{@link https://github.com/kossnocorp} + * @author Lesha Koss [@leshakoss]{@link https://github.com/leshakoss} + */ + +var locale$1 = { + code: 'en-US', + formatDistance: formatDistance$1, + formatLong: formatLong$1, + formatRelative: formatRelative$1, + localize: localize$1, + match: match$1, + options: { + weekStartsOn: 0 + /* Sunday */ + , + firstWeekContainsDate: 1 + } +};function requiredArgs(required, args) { + if (args.length < required) { + throw new TypeError(required + ' argument' + required > 1 ? 's' : '' + ' required, but only ' + args.length + ' present'); + } +}/** + * @name toDate + * @category Common Helpers + * @summary Convert the given argument to an instance of Date. + * + * @description + * Convert the given argument to an instance of Date. + * + * If the argument is an instance of Date, the function returns its clone. + * + * If the argument is a number, it is treated as a timestamp. + * + * If the argument is none of the above, the function returns Invalid Date. + * + * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`. + * + * @param {Date|Number} argument - the value to convert + * @returns {Date} the parsed date in the local time zone + * @throws {TypeError} 1 argument required + * + * @example + * // Clone the date: + * const result = toDate(new Date(2014, 1, 11, 11, 30, 30)) + * //=> Tue Feb 11 2014 11:30:30 + * + * @example + * // Convert the timestamp to date: + * const result = toDate(1392098430000) + * //=> Tue Feb 11 2014 11:30:30 + */ + +function toDate(argument) { + requiredArgs(1, arguments); + var argStr = Object.prototype.toString.call(argument); // Clone the date + + if (argument instanceof Date || typeof argument === 'object' && argStr === '[object Date]') { + // Prevent the date to lose the milliseconds when passed to new Date() in IE10 + return new Date(argument.getTime()); + } else if (typeof argument === 'number' || argStr === '[object Number]') { + return new Date(argument); + } else { + if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') { + // eslint-disable-next-line no-console + console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"); // eslint-disable-next-line no-console + + console.warn(new Error().stack); + } + + return new Date(NaN); + } +}/** + * @name isValid + * @category Common Helpers + * @summary Is the given date valid? + * + * @description + * Returns false if argument is Invalid Date and true otherwise. + * Argument is converted to Date using `toDate`. See [toDate]{@link https://date-fns.org/docs/toDate} + * Invalid Date is a Date, whose time value is NaN. + * + * Time value of Date: http://es5.github.io/#x15.9.1.1 + * + * ### v2.0.0 breaking changes: + * + * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes). + * + * - Now `isValid` doesn't throw an exception + * if the first argument is not an instance of Date. + * Instead, argument is converted beforehand using `toDate`. + * + * Examples: + * + * | `isValid` argument | Before v2.0.0 | v2.0.0 onward | + * |---------------------------|---------------|---------------| + * | `new Date()` | `true` | `true` | + * | `new Date('2016-01-01')` | `true` | `true` | + * | `new Date('')` | `false` | `false` | + * | `new Date(1488370835081)` | `true` | `true` | + * | `new Date(NaN)` | `false` | `false` | + * | `'2016-01-01'` | `TypeError` | `false` | + * | `''` | `TypeError` | `false` | + * | `1488370835081` | `TypeError` | `true` | + * | `NaN` | `TypeError` | `false` | + * + * We introduce this change to make *date-fns* consistent with ECMAScript behavior + * that try to coerce arguments to the expected type + * (which is also the case with other *date-fns* functions). + * + * @param {*} date - the date to check + * @returns {Boolean} the date is valid + * @throws {TypeError} 1 argument required + * + * @example + * // For the valid date: + * var result = isValid(new Date(2014, 1, 31)) + * //=> true + * + * @example + * // For the value, convertable into a date: + * var result = isValid(1393804800000) + * //=> true + * + * @example + * // For the invalid date: + * var result = isValid(new Date('')) + * //=> false + */ + +function isValid(dirtyDate) { + requiredArgs(1, arguments); + var date = toDate(dirtyDate); + return !isNaN(date); +}function toInteger(dirtyNumber) { + if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) { + return NaN; + } + + var number = Number(dirtyNumber); + + if (isNaN(number)) { + return number; + } + + return number < 0 ? Math.ceil(number) : Math.floor(number); +}/** + * @name addMilliseconds + * @category Millisecond Helpers + * @summary Add the specified number of milliseconds to the given date. + * + * @description + * Add the specified number of milliseconds to the given date. + * + * ### v2.0.0 breaking changes: + * + * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes). + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of milliseconds to be added + * @returns {Date} the new date with the milliseconds added + * @throws {TypeError} 2 arguments required + * + * @example + * // Add 750 milliseconds to 10 July 2014 12:45:30.000: + * var result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750) + * //=> Thu Jul 10 2014 12:45:30.750 + */ + +function addMilliseconds(dirtyDate, dirtyAmount) { + requiredArgs(2, arguments); + var timestamp = toDate(dirtyDate).getTime(); + var amount = toInteger(dirtyAmount); + return new Date(timestamp + amount); +}/** + * @name subMilliseconds + * @category Millisecond Helpers + * @summary Subtract the specified number of milliseconds from the given date. + * + * @description + * Subtract the specified number of milliseconds from the given date. + * + * ### v2.0.0 breaking changes: + * + * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes). + * + * @param {Date|Number} date - the date to be changed + * @param {Number} amount - the amount of milliseconds to be subtracted + * @returns {Date} the new date with the milliseconds subtracted + * @throws {TypeError} 2 arguments required + * + * @example + * // Subtract 750 milliseconds from 10 July 2014 12:45:30.000: + * var result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750) + * //=> Thu Jul 10 2014 12:45:29.250 + */ + +function subMilliseconds(dirtyDate, dirtyAmount) { + requiredArgs(2, arguments); + var amount = toInteger(dirtyAmount); + return addMilliseconds(dirtyDate, -amount); +}function addLeadingZeros(number, targetLength) { + var sign = number < 0 ? '-' : ''; + var output = Math.abs(number).toString(); + + while (output.length < targetLength) { + output = '0' + output; + } + + return sign + output; +}/* + * | | Unit | | Unit | + * |-----|--------------------------------|-----|--------------------------------| + * | a | AM, PM | A* | | + * | d | Day of month | D | | + * | h | Hour [1-12] | H | Hour [0-23] | + * | m | Minute | M | Month | + * | s | Second | S | Fraction of second | + * | y | Year (abs) | Y | | + * + * Letters marked by * are not implemented but reserved by Unicode standard. + */ + +var formatters = { + // Year + y: function (date, token) { + // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens + // | Year | y | yy | yyy | yyyy | yyyyy | + // |----------|-------|----|-------|-------|-------| + // | AD 1 | 1 | 01 | 001 | 0001 | 00001 | + // | AD 12 | 12 | 12 | 012 | 0012 | 00012 | + // | AD 123 | 123 | 23 | 123 | 0123 | 00123 | + // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 | + // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 | + var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript) + + var year = signedYear > 0 ? signedYear : 1 - signedYear; + return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length); + }, + // Month + M: function (date, token) { + var month = date.getUTCMonth(); + return token === 'M' ? String(month + 1) : addLeadingZeros(month + 1, 2); + }, + // Day of the month + d: function (date, token) { + return addLeadingZeros(date.getUTCDate(), token.length); + }, + // AM or PM + a: function (date, token) { + var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am'; + + switch (token) { + case 'a': + case 'aa': + case 'aaa': + return dayPeriodEnumValue.toUpperCase(); + + case 'aaaaa': + return dayPeriodEnumValue[0]; + + case 'aaaa': + default: + return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.'; + } + }, + // Hour [1-12] + h: function (date, token) { + return addLeadingZeros(date.getUTCHours() % 12 || 12, token.length); + }, + // Hour [0-23] + H: function (date, token) { + return addLeadingZeros(date.getUTCHours(), token.length); + }, + // Minute + m: function (date, token) { + return addLeadingZeros(date.getUTCMinutes(), token.length); + }, + // Second + s: function (date, token) { + return addLeadingZeros(date.getUTCSeconds(), token.length); + }, + // Fraction of second + S: function (date, token) { + var numberOfDigits = token.length; + var milliseconds = date.getUTCMilliseconds(); + var fractionalSeconds = Math.floor(milliseconds * Math.pow(10, numberOfDigits - 3)); + return addLeadingZeros(fractionalSeconds, token.length); + } +};var MILLISECONDS_IN_DAY = 86400000; // This function will be a part of public API when UTC function will be implemented. +// See issue: https://github.com/date-fns/date-fns/issues/376 + +function getUTCDayOfYear(dirtyDate) { + requiredArgs(1, arguments); + var date = toDate(dirtyDate); + var timestamp = date.getTime(); + date.setUTCMonth(0, 1); + date.setUTCHours(0, 0, 0, 0); + var startOfYearTimestamp = date.getTime(); + var difference = timestamp - startOfYearTimestamp; + return Math.floor(difference / MILLISECONDS_IN_DAY) + 1; +}// See issue: https://github.com/date-fns/date-fns/issues/376 + +function startOfUTCISOWeek(dirtyDate) { + requiredArgs(1, arguments); + var weekStartsOn = 1; + var date = toDate(dirtyDate); + var day = date.getUTCDay(); + var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn; + date.setUTCDate(date.getUTCDate() - diff); + date.setUTCHours(0, 0, 0, 0); + return date; +}// See issue: https://github.com/date-fns/date-fns/issues/376 + +function getUTCISOWeekYear(dirtyDate) { + requiredArgs(1, arguments); + var date = toDate(dirtyDate); + var year = date.getUTCFullYear(); + var fourthOfJanuaryOfNextYear = new Date(0); + fourthOfJanuaryOfNextYear.setUTCFullYear(year + 1, 0, 4); + fourthOfJanuaryOfNextYear.setUTCHours(0, 0, 0, 0); + var startOfNextYear = startOfUTCISOWeek(fourthOfJanuaryOfNextYear); + var fourthOfJanuaryOfThisYear = new Date(0); + fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4); + fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0); + var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear); + + if (date.getTime() >= startOfNextYear.getTime()) { + return year + 1; + } else if (date.getTime() >= startOfThisYear.getTime()) { + return year; + } else { + return year - 1; + } +}// See issue: https://github.com/date-fns/date-fns/issues/376 + +function startOfUTCISOWeekYear(dirtyDate) { + requiredArgs(1, arguments); + var year = getUTCISOWeekYear(dirtyDate); + var fourthOfJanuary = new Date(0); + fourthOfJanuary.setUTCFullYear(year, 0, 4); + fourthOfJanuary.setUTCHours(0, 0, 0, 0); + var date = startOfUTCISOWeek(fourthOfJanuary); + return date; +}var MILLISECONDS_IN_WEEK = 604800000; // This function will be a part of public API when UTC function will be implemented. +// See issue: https://github.com/date-fns/date-fns/issues/376 + +function getUTCISOWeek(dirtyDate) { + requiredArgs(1, arguments); + var date = toDate(dirtyDate); + var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime(); // Round the number of days to the nearest integer + // because the number of milliseconds in a week is not constant + // (e.g. it's different in the week of the daylight saving time clock shift) + + return Math.round(diff / MILLISECONDS_IN_WEEK) + 1; +}// See issue: https://github.com/date-fns/date-fns/issues/376 + +function startOfUTCWeek(dirtyDate, dirtyOptions) { + requiredArgs(1, arguments); + var options = dirtyOptions || {}; + var locale = options.locale; + var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn; + var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn); + var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN + + if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) { + throw new RangeError('weekStartsOn must be between 0 and 6 inclusively'); + } + + var date = toDate(dirtyDate); + var day = date.getUTCDay(); + var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn; + date.setUTCDate(date.getUTCDate() - diff); + date.setUTCHours(0, 0, 0, 0); + return date; +}// See issue: https://github.com/date-fns/date-fns/issues/376 + +function getUTCWeekYear(dirtyDate, dirtyOptions) { + requiredArgs(1, arguments); + var date = toDate(dirtyDate, dirtyOptions); + var year = date.getUTCFullYear(); + var options = dirtyOptions || {}; + var locale = options.locale; + var localeFirstWeekContainsDate = locale && locale.options && locale.options.firstWeekContainsDate; + var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate); + var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN + + if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) { + throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively'); + } + + var firstWeekOfNextYear = new Date(0); + firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate); + firstWeekOfNextYear.setUTCHours(0, 0, 0, 0); + var startOfNextYear = startOfUTCWeek(firstWeekOfNextYear, dirtyOptions); + var firstWeekOfThisYear = new Date(0); + firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate); + firstWeekOfThisYear.setUTCHours(0, 0, 0, 0); + var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, dirtyOptions); + + if (date.getTime() >= startOfNextYear.getTime()) { + return year + 1; + } else if (date.getTime() >= startOfThisYear.getTime()) { + return year; + } else { + return year - 1; + } +}// See issue: https://github.com/date-fns/date-fns/issues/376 + +function startOfUTCWeekYear(dirtyDate, dirtyOptions) { + requiredArgs(1, arguments); + var options = dirtyOptions || {}; + var locale = options.locale; + var localeFirstWeekContainsDate = locale && locale.options && locale.options.firstWeekContainsDate; + var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate); + var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate); + var year = getUTCWeekYear(dirtyDate, dirtyOptions); + var firstWeek = new Date(0); + firstWeek.setUTCFullYear(year, 0, firstWeekContainsDate); + firstWeek.setUTCHours(0, 0, 0, 0); + var date = startOfUTCWeek(firstWeek, dirtyOptions); + return date; +}var MILLISECONDS_IN_WEEK$1 = 604800000; // This function will be a part of public API when UTC function will be implemented. +// See issue: https://github.com/date-fns/date-fns/issues/376 + +function getUTCWeek(dirtyDate, options) { + requiredArgs(1, arguments); + var date = toDate(dirtyDate); + var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime(); // Round the number of days to the nearest integer + // because the number of milliseconds in a week is not constant + // (e.g. it's different in the week of the daylight saving time clock shift) + + return Math.round(diff / MILLISECONDS_IN_WEEK$1) + 1; +}var dayPeriodEnum = { + am: 'am', + pm: 'pm', + midnight: 'midnight', + noon: 'noon', + morning: 'morning', + afternoon: 'afternoon', + evening: 'evening', + night: 'night' + /* + * | | Unit | | Unit | + * |-----|--------------------------------|-----|--------------------------------| + * | a | AM, PM | A* | Milliseconds in day | + * | b | AM, PM, noon, midnight | B | Flexible day period | + * | c | Stand-alone local day of week | C* | Localized hour w/ day period | + * | d | Day of month | D | Day of year | + * | e | Local day of week | E | Day of week | + * | f | | F* | Day of week in month | + * | g* | Modified Julian day | G | Era | + * | h | Hour [1-12] | H | Hour [0-23] | + * | i! | ISO day of week | I! | ISO week of year | + * | j* | Localized hour w/ day period | J* | Localized hour w/o day period | + * | k | Hour [1-24] | K | Hour [0-11] | + * | l* | (deprecated) | L | Stand-alone month | + * | m | Minute | M | Month | + * | n | | N | | + * | o! | Ordinal number modifier | O | Timezone (GMT) | + * | p! | Long localized time | P! | Long localized date | + * | q | Stand-alone quarter | Q | Quarter | + * | r* | Related Gregorian year | R! | ISO week-numbering year | + * | s | Second | S | Fraction of second | + * | t! | Seconds timestamp | T! | Milliseconds timestamp | + * | u | Extended year | U* | Cyclic year | + * | v* | Timezone (generic non-locat.) | V* | Timezone (location) | + * | w | Local week of year | W* | Week of month | + * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) | + * | y | Year (abs) | Y | Local week-numbering year | + * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) | + * + * Letters marked by * are not implemented but reserved by Unicode standard. + * + * Letters marked by ! are non-standard, but implemented by date-fns: + * - `o` modifies the previous token to turn it into an ordinal (see `format` docs) + * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days, + * i.e. 7 for Sunday, 1 for Monday, etc. + * - `I` is ISO week of year, as opposed to `w` which is local week of year. + * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year. + * `R` is supposed to be used in conjunction with `I` and `i` + * for universal ISO week-numbering date, whereas + * `Y` is supposed to be used in conjunction with `w` and `e` + * for week-numbering date specific to the locale. + * - `P` is long localized date format + * - `p` is long localized time format + */ + +}; +var formatters$1 = { + // Era + G: function (date, token, localize) { + var era = date.getUTCFullYear() > 0 ? 1 : 0; + + switch (token) { + // AD, BC + case 'G': + case 'GG': + case 'GGG': + return localize.era(era, { + width: 'abbreviated' + }); + // A, B + + case 'GGGGG': + return localize.era(era, { + width: 'narrow' + }); + // Anno Domini, Before Christ + + case 'GGGG': + default: + return localize.era(era, { + width: 'wide' + }); + } + }, + // Year + y: function (date, token, localize) { + // Ordinal number + if (token === 'yo') { + var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript) + + var year = signedYear > 0 ? signedYear : 1 - signedYear; + return localize.ordinalNumber(year, { + unit: 'year' + }); + } + + return formatters.y(date, token); + }, + // Local week-numbering year + Y: function (date, token, localize, options) { + var signedWeekYear = getUTCWeekYear(date, options); // Returns 1 for 1 BC (which is year 0 in JavaScript) + + var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear; // Two digit year + + if (token === 'YY') { + var twoDigitYear = weekYear % 100; + return addLeadingZeros(twoDigitYear, 2); + } // Ordinal number + + + if (token === 'Yo') { + return localize.ordinalNumber(weekYear, { + unit: 'year' + }); + } // Padding + + + return addLeadingZeros(weekYear, token.length); + }, + // ISO week-numbering year + R: function (date, token) { + var isoWeekYear = getUTCISOWeekYear(date); // Padding + + return addLeadingZeros(isoWeekYear, token.length); + }, + // Extended year. This is a single number designating the year of this calendar system. + // The main difference between `y` and `u` localizers are B.C. years: + // | Year | `y` | `u` | + // |------|-----|-----| + // | AC 1 | 1 | 1 | + // | BC 1 | 1 | 0 | + // | BC 2 | 2 | -1 | + // Also `yy` always returns the last two digits of a year, + // while `uu` pads single digit years to 2 characters and returns other years unchanged. + u: function (date, token) { + var year = date.getUTCFullYear(); + return addLeadingZeros(year, token.length); + }, + // Quarter + Q: function (date, token, localize) { + var quarter = Math.ceil((date.getUTCMonth() + 1) / 3); + + switch (token) { + // 1, 2, 3, 4 + case 'Q': + return String(quarter); + // 01, 02, 03, 04 + + case 'QQ': + return addLeadingZeros(quarter, 2); + // 1st, 2nd, 3rd, 4th + + case 'Qo': + return localize.ordinalNumber(quarter, { + unit: 'quarter' + }); + // Q1, Q2, Q3, Q4 + + case 'QQQ': + return localize.quarter(quarter, { + width: 'abbreviated', + context: 'formatting' + }); + // 1, 2, 3, 4 (narrow quarter; could be not numerical) + + case 'QQQQQ': + return localize.quarter(quarter, { + width: 'narrow', + context: 'formatting' + }); + // 1st quarter, 2nd quarter, ... + + case 'QQQQ': + default: + return localize.quarter(quarter, { + width: 'wide', + context: 'formatting' + }); + } + }, + // Stand-alone quarter + q: function (date, token, localize) { + var quarter = Math.ceil((date.getUTCMonth() + 1) / 3); + + switch (token) { + // 1, 2, 3, 4 + case 'q': + return String(quarter); + // 01, 02, 03, 04 + + case 'qq': + return addLeadingZeros(quarter, 2); + // 1st, 2nd, 3rd, 4th + + case 'qo': + return localize.ordinalNumber(quarter, { + unit: 'quarter' + }); + // Q1, Q2, Q3, Q4 + + case 'qqq': + return localize.quarter(quarter, { + width: 'abbreviated', + context: 'standalone' + }); + // 1, 2, 3, 4 (narrow quarter; could be not numerical) + + case 'qqqqq': + return localize.quarter(quarter, { + width: 'narrow', + context: 'standalone' + }); + // 1st quarter, 2nd quarter, ... + + case 'qqqq': + default: + return localize.quarter(quarter, { + width: 'wide', + context: 'standalone' + }); + } + }, + // Month + M: function (date, token, localize) { + var month = date.getUTCMonth(); + + switch (token) { + case 'M': + case 'MM': + return formatters.M(date, token); + // 1st, 2nd, ..., 12th + + case 'Mo': + return localize.ordinalNumber(month + 1, { + unit: 'month' + }); + // Jan, Feb, ..., Dec + + case 'MMM': + return localize.month(month, { + width: 'abbreviated', + context: 'formatting' + }); + // J, F, ..., D + + case 'MMMMM': + return localize.month(month, { + width: 'narrow', + context: 'formatting' + }); + // January, February, ..., December + + case 'MMMM': + default: + return localize.month(month, { + width: 'wide', + context: 'formatting' + }); + } + }, + // Stand-alone month + L: function (date, token, localize) { + var month = date.getUTCMonth(); + + switch (token) { + // 1, 2, ..., 12 + case 'L': + return String(month + 1); + // 01, 02, ..., 12 + + case 'LL': + return addLeadingZeros(month + 1, 2); + // 1st, 2nd, ..., 12th + + case 'Lo': + return localize.ordinalNumber(month + 1, { + unit: 'month' + }); + // Jan, Feb, ..., Dec + + case 'LLL': + return localize.month(month, { + width: 'abbreviated', + context: 'standalone' + }); + // J, F, ..., D + + case 'LLLLL': + return localize.month(month, { + width: 'narrow', + context: 'standalone' + }); + // January, February, ..., December + + case 'LLLL': + default: + return localize.month(month, { + width: 'wide', + context: 'standalone' + }); + } + }, + // Local week of year + w: function (date, token, localize, options) { + var week = getUTCWeek(date, options); + + if (token === 'wo') { + return localize.ordinalNumber(week, { + unit: 'week' + }); + } + + return addLeadingZeros(week, token.length); + }, + // ISO week of year + I: function (date, token, localize) { + var isoWeek = getUTCISOWeek(date); + + if (token === 'Io') { + return localize.ordinalNumber(isoWeek, { + unit: 'week' + }); + } + + return addLeadingZeros(isoWeek, token.length); + }, + // Day of the month + d: function (date, token, localize) { + if (token === 'do') { + return localize.ordinalNumber(date.getUTCDate(), { + unit: 'date' + }); + } + + return formatters.d(date, token); + }, + // Day of year + D: function (date, token, localize) { + var dayOfYear = getUTCDayOfYear(date); + + if (token === 'Do') { + return localize.ordinalNumber(dayOfYear, { + unit: 'dayOfYear' + }); + } + + return addLeadingZeros(dayOfYear, token.length); + }, + // Day of week + E: function (date, token, localize) { + var dayOfWeek = date.getUTCDay(); + + switch (token) { + // Tue + case 'E': + case 'EE': + case 'EEE': + return localize.day(dayOfWeek, { + width: 'abbreviated', + context: 'formatting' + }); + // T + + case 'EEEEE': + return localize.day(dayOfWeek, { + width: 'narrow', + context: 'formatting' + }); + // Tu + + case 'EEEEEE': + return localize.day(dayOfWeek, { + width: 'short', + context: 'formatting' + }); + // Tuesday + + case 'EEEE': + default: + return localize.day(dayOfWeek, { + width: 'wide', + context: 'formatting' + }); + } + }, + // Local day of week + e: function (date, token, localize, options) { + var dayOfWeek = date.getUTCDay(); + var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7; + + switch (token) { + // Numerical value (Nth day of week with current locale or weekStartsOn) + case 'e': + return String(localDayOfWeek); + // Padded numerical value + + case 'ee': + return addLeadingZeros(localDayOfWeek, 2); + // 1st, 2nd, ..., 7th + + case 'eo': + return localize.ordinalNumber(localDayOfWeek, { + unit: 'day' + }); + + case 'eee': + return localize.day(dayOfWeek, { + width: 'abbreviated', + context: 'formatting' + }); + // T + + case 'eeeee': + return localize.day(dayOfWeek, { + width: 'narrow', + context: 'formatting' + }); + // Tu + + case 'eeeeee': + return localize.day(dayOfWeek, { + width: 'short', + context: 'formatting' + }); + // Tuesday + + case 'eeee': + default: + return localize.day(dayOfWeek, { + width: 'wide', + context: 'formatting' + }); + } + }, + // Stand-alone local day of week + c: function (date, token, localize, options) { + var dayOfWeek = date.getUTCDay(); + var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7; + + switch (token) { + // Numerical value (same as in `e`) + case 'c': + return String(localDayOfWeek); + // Padded numerical value + + case 'cc': + return addLeadingZeros(localDayOfWeek, token.length); + // 1st, 2nd, ..., 7th + + case 'co': + return localize.ordinalNumber(localDayOfWeek, { + unit: 'day' + }); + + case 'ccc': + return localize.day(dayOfWeek, { + width: 'abbreviated', + context: 'standalone' + }); + // T + + case 'ccccc': + return localize.day(dayOfWeek, { + width: 'narrow', + context: 'standalone' + }); + // Tu + + case 'cccccc': + return localize.day(dayOfWeek, { + width: 'short', + context: 'standalone' + }); + // Tuesday + + case 'cccc': + default: + return localize.day(dayOfWeek, { + width: 'wide', + context: 'standalone' + }); + } + }, + // ISO day of week + i: function (date, token, localize) { + var dayOfWeek = date.getUTCDay(); + var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek; + + switch (token) { + // 2 + case 'i': + return String(isoDayOfWeek); + // 02 + + case 'ii': + return addLeadingZeros(isoDayOfWeek, token.length); + // 2nd + + case 'io': + return localize.ordinalNumber(isoDayOfWeek, { + unit: 'day' + }); + // Tue + + case 'iii': + return localize.day(dayOfWeek, { + width: 'abbreviated', + context: 'formatting' + }); + // T + + case 'iiiii': + return localize.day(dayOfWeek, { + width: 'narrow', + context: 'formatting' + }); + // Tu + + case 'iiiiii': + return localize.day(dayOfWeek, { + width: 'short', + context: 'formatting' + }); + // Tuesday + + case 'iiii': + default: + return localize.day(dayOfWeek, { + width: 'wide', + context: 'formatting' + }); + } + }, + // AM or PM + a: function (date, token, localize) { + var hours = date.getUTCHours(); + var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am'; + + switch (token) { + case 'a': + case 'aa': + case 'aaa': + return localize.dayPeriod(dayPeriodEnumValue, { + width: 'abbreviated', + context: 'formatting' + }); + + case 'aaaaa': + return localize.dayPeriod(dayPeriodEnumValue, { + width: 'narrow', + context: 'formatting' + }); + + case 'aaaa': + default: + return localize.dayPeriod(dayPeriodEnumValue, { + width: 'wide', + context: 'formatting' + }); + } + }, + // AM, PM, midnight, noon + b: function (date, token, localize) { + var hours = date.getUTCHours(); + var dayPeriodEnumValue; + + if (hours === 12) { + dayPeriodEnumValue = dayPeriodEnum.noon; + } else if (hours === 0) { + dayPeriodEnumValue = dayPeriodEnum.midnight; + } else { + dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am'; + } + + switch (token) { + case 'b': + case 'bb': + case 'bbb': + return localize.dayPeriod(dayPeriodEnumValue, { + width: 'abbreviated', + context: 'formatting' + }); + + case 'bbbbb': + return localize.dayPeriod(dayPeriodEnumValue, { + width: 'narrow', + context: 'formatting' + }); + + case 'bbbb': + default: + return localize.dayPeriod(dayPeriodEnumValue, { + width: 'wide', + context: 'formatting' + }); + } + }, + // in the morning, in the afternoon, in the evening, at night + B: function (date, token, localize) { + var hours = date.getUTCHours(); + var dayPeriodEnumValue; + + if (hours >= 17) { + dayPeriodEnumValue = dayPeriodEnum.evening; + } else if (hours >= 12) { + dayPeriodEnumValue = dayPeriodEnum.afternoon; + } else if (hours >= 4) { + dayPeriodEnumValue = dayPeriodEnum.morning; + } else { + dayPeriodEnumValue = dayPeriodEnum.night; + } + + switch (token) { + case 'B': + case 'BB': + case 'BBB': + return localize.dayPeriod(dayPeriodEnumValue, { + width: 'abbreviated', + context: 'formatting' + }); + + case 'BBBBB': + return localize.dayPeriod(dayPeriodEnumValue, { + width: 'narrow', + context: 'formatting' + }); + + case 'BBBB': + default: + return localize.dayPeriod(dayPeriodEnumValue, { + width: 'wide', + context: 'formatting' + }); + } + }, + // Hour [1-12] + h: function (date, token, localize) { + if (token === 'ho') { + var hours = date.getUTCHours() % 12; + if (hours === 0) hours = 12; + return localize.ordinalNumber(hours, { + unit: 'hour' + }); + } + + return formatters.h(date, token); + }, + // Hour [0-23] + H: function (date, token, localize) { + if (token === 'Ho') { + return localize.ordinalNumber(date.getUTCHours(), { + unit: 'hour' + }); + } + + return formatters.H(date, token); + }, + // Hour [0-11] + K: function (date, token, localize) { + var hours = date.getUTCHours() % 12; + + if (token === 'Ko') { + return localize.ordinalNumber(hours, { + unit: 'hour' + }); + } + + return addLeadingZeros(hours, token.length); + }, + // Hour [1-24] + k: function (date, token, localize) { + var hours = date.getUTCHours(); + if (hours === 0) hours = 24; + + if (token === 'ko') { + return localize.ordinalNumber(hours, { + unit: 'hour' + }); + } + + return addLeadingZeros(hours, token.length); + }, + // Minute + m: function (date, token, localize) { + if (token === 'mo') { + return localize.ordinalNumber(date.getUTCMinutes(), { + unit: 'minute' + }); + } + + return formatters.m(date, token); + }, + // Second + s: function (date, token, localize) { + if (token === 'so') { + return localize.ordinalNumber(date.getUTCSeconds(), { + unit: 'second' + }); + } + + return formatters.s(date, token); + }, + // Fraction of second + S: function (date, token) { + return formatters.S(date, token); + }, + // Timezone (ISO-8601. If offset is 0, output is always `'Z'`) + X: function (date, token, _localize, options) { + var originalDate = options._originalDate || date; + var timezoneOffset = originalDate.getTimezoneOffset(); + + if (timezoneOffset === 0) { + return 'Z'; + } + + switch (token) { + // Hours and optional minutes + case 'X': + return formatTimezoneWithOptionalMinutes(timezoneOffset); + // Hours, minutes and optional seconds without `:` delimiter + // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets + // so this token always has the same output as `XX` + + case 'XXXX': + case 'XX': + // Hours and minutes without `:` delimiter + return formatTimezone(timezoneOffset); + // Hours, minutes and optional seconds with `:` delimiter + // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets + // so this token always has the same output as `XXX` + + case 'XXXXX': + case 'XXX': // Hours and minutes with `:` delimiter + + default: + return formatTimezone(timezoneOffset, ':'); + } + }, + // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent) + x: function (date, token, _localize, options) { + var originalDate = options._originalDate || date; + var timezoneOffset = originalDate.getTimezoneOffset(); + + switch (token) { + // Hours and optional minutes + case 'x': + return formatTimezoneWithOptionalMinutes(timezoneOffset); + // Hours, minutes and optional seconds without `:` delimiter + // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets + // so this token always has the same output as `xx` + + case 'xxxx': + case 'xx': + // Hours and minutes without `:` delimiter + return formatTimezone(timezoneOffset); + // Hours, minutes and optional seconds with `:` delimiter + // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets + // so this token always has the same output as `xxx` + + case 'xxxxx': + case 'xxx': // Hours and minutes with `:` delimiter + + default: + return formatTimezone(timezoneOffset, ':'); + } + }, + // Timezone (GMT) + O: function (date, token, _localize, options) { + var originalDate = options._originalDate || date; + var timezoneOffset = originalDate.getTimezoneOffset(); + + switch (token) { + // Short + case 'O': + case 'OO': + case 'OOO': + return 'GMT' + formatTimezoneShort(timezoneOffset, ':'); + // Long + + case 'OOOO': + default: + return 'GMT' + formatTimezone(timezoneOffset, ':'); + } + }, + // Timezone (specific non-location) + z: function (date, token, _localize, options) { + var originalDate = options._originalDate || date; + var timezoneOffset = originalDate.getTimezoneOffset(); + + switch (token) { + // Short + case 'z': + case 'zz': + case 'zzz': + return 'GMT' + formatTimezoneShort(timezoneOffset, ':'); + // Long + + case 'zzzz': + default: + return 'GMT' + formatTimezone(timezoneOffset, ':'); + } + }, + // Seconds timestamp + t: function (date, token, _localize, options) { + var originalDate = options._originalDate || date; + var timestamp = Math.floor(originalDate.getTime() / 1000); + return addLeadingZeros(timestamp, token.length); + }, + // Milliseconds timestamp + T: function (date, token, _localize, options) { + var originalDate = options._originalDate || date; + var timestamp = originalDate.getTime(); + return addLeadingZeros(timestamp, token.length); + } +}; + +function formatTimezoneShort(offset, dirtyDelimiter) { + var sign = offset > 0 ? '-' : '+'; + var absOffset = Math.abs(offset); + var hours = Math.floor(absOffset / 60); + var minutes = absOffset % 60; + + if (minutes === 0) { + return sign + String(hours); + } + + var delimiter = dirtyDelimiter || ''; + return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2); +} + +function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) { + if (offset % 60 === 0) { + var sign = offset > 0 ? '-' : '+'; + return sign + addLeadingZeros(Math.abs(offset) / 60, 2); + } + + return formatTimezone(offset, dirtyDelimiter); +} + +function formatTimezone(offset, dirtyDelimiter) { + var delimiter = dirtyDelimiter || ''; + var sign = offset > 0 ? '-' : '+'; + var absOffset = Math.abs(offset); + var hours = addLeadingZeros(Math.floor(absOffset / 60), 2); + var minutes = addLeadingZeros(absOffset % 60, 2); + return sign + hours + delimiter + minutes; +}function dateLongFormatter(pattern, formatLong) { + switch (pattern) { + case 'P': + return formatLong.date({ + width: 'short' + }); + + case 'PP': + return formatLong.date({ + width: 'medium' + }); + + case 'PPP': + return formatLong.date({ + width: 'long' + }); + + case 'PPPP': + default: + return formatLong.date({ + width: 'full' + }); + } +} + +function timeLongFormatter(pattern, formatLong) { + switch (pattern) { + case 'p': + return formatLong.time({ + width: 'short' + }); + + case 'pp': + return formatLong.time({ + width: 'medium' + }); + + case 'ppp': + return formatLong.time({ + width: 'long' + }); + + case 'pppp': + default: + return formatLong.time({ + width: 'full' + }); + } +} + +function dateTimeLongFormatter(pattern, formatLong) { + var matchResult = pattern.match(/(P+)(p+)?/); + var datePattern = matchResult[1]; + var timePattern = matchResult[2]; + + if (!timePattern) { + return dateLongFormatter(pattern, formatLong); + } + + var dateTimeFormat; + + switch (datePattern) { + case 'P': + dateTimeFormat = formatLong.dateTime({ + width: 'short' + }); + break; + + case 'PP': + dateTimeFormat = formatLong.dateTime({ + width: 'medium' + }); + break; + + case 'PPP': + dateTimeFormat = formatLong.dateTime({ + width: 'long' + }); + break; + + case 'PPPP': + default: + dateTimeFormat = formatLong.dateTime({ + width: 'full' + }); + break; + } + + return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong)); +} + +var longFormatters = { + p: timeLongFormatter, + P: dateTimeLongFormatter +};var MILLISECONDS_IN_MINUTE = 60000; /** * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds. * They usually appear for dates that denote time before the timezones were introduced @@ -13,1319 +2188,453 @@ * * This function returns the timezone offset in milliseconds that takes seconds in account. */ -var getTimezoneOffsetInMilliseconds = function getTimezoneOffsetInMilliseconds (dirtyDate) { + +function getTimezoneOffsetInMilliseconds(dirtyDate) { var date = new Date(dirtyDate.getTime()); - var baseTimezoneOffset = date.getTimezoneOffset(); + var baseTimezoneOffset = Math.ceil(date.getTimezoneOffset()); date.setSeconds(0, 0); var millisecondsPartOfTimezoneOffset = date.getTime() % MILLISECONDS_IN_MINUTE; - - return baseTimezoneOffset * MILLISECONDS_IN_MINUTE + millisecondsPartOfTimezoneOffset -};/** - * @category Common Helpers - * @summary Is the given argument an instance of Date? - * - * @description - * Is the given argument an instance of Date? - * - * @param {*} argument - the argument to check - * @returns {Boolean} the given argument is an instance of Date - * - * @example - * // Is 'mayonnaise' a Date? - * var result = isDate('mayonnaise') - * //=> false - */ -function isDate (argument) { - return argument instanceof Date + return baseTimezoneOffset * MILLISECONDS_IN_MINUTE + millisecondsPartOfTimezoneOffset; +}var protectedDayOfYearTokens = ['D', 'DD']; +var protectedWeekYearTokens = ['YY', 'YYYY']; +function isProtectedDayOfYearToken(token) { + return protectedDayOfYearTokens.indexOf(token) !== -1; } +function isProtectedWeekYearToken(token) { + return protectedWeekYearTokens.indexOf(token) !== -1; +} +function throwProtectedError(token) { + if (token === 'YYYY') { + throw new RangeError('Use `yyyy` instead of `YYYY` for formatting years; see: https://git.io/fxCyr'); + } else if (token === 'YY') { + throw new RangeError('Use `yy` instead of `YY` for formatting years; see: https://git.io/fxCyr'); + } else if (token === 'D') { + throw new RangeError('Use `d` instead of `D` for formatting days of the month; see: https://git.io/fxCyr'); + } else if (token === 'DD') { + throw new RangeError('Use `dd` instead of `DD` for formatting days of the month; see: https://git.io/fxCyr'); + } +}// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token +// (one of the certain letters followed by `o`) +// - (\w)\1* matches any sequences of the same letter +// - '' matches two quote characters in a row +// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('), +// except a single quote symbol, which ends the sequence. +// Two quote characters do not end the sequence. +// If there is no matching single quote +// then the sequence will continue until the end of the string. +// - . matches any single character unmatched by previous parts of the RegExps -var is_date = isDate;var MILLISECONDS_IN_HOUR = 3600000; -var MILLISECONDS_IN_MINUTE$1 = 60000; -var DEFAULT_ADDITIONAL_DIGITS = 2; - -var parseTokenDateTimeDelimeter = /[T ]/; -var parseTokenPlainTime = /:/; - -// year tokens -var parseTokenYY = /^(\d{2})$/; -var parseTokensYYY = [ - /^([+-]\d{2})$/, // 0 additional digits - /^([+-]\d{3})$/, // 1 additional digit - /^([+-]\d{4})$/ // 2 additional digits -]; - -var parseTokenYYYY = /^(\d{4})/; -var parseTokensYYYYY = [ - /^([+-]\d{4})/, // 0 additional digits - /^([+-]\d{5})/, // 1 additional digit - /^([+-]\d{6})/ // 2 additional digits -]; - -// date tokens -var parseTokenMM = /^-(\d{2})$/; -var parseTokenDDD = /^-?(\d{3})$/; -var parseTokenMMDD = /^-?(\d{2})-?(\d{2})$/; -var parseTokenWww = /^-?W(\d{2})$/; -var parseTokenWwwD = /^-?W(\d{2})-?(\d{1})$/; - -// time tokens -var parseTokenHH = /^(\d{2}([.,]\d*)?)$/; -var parseTokenHHMM = /^(\d{2}):?(\d{2}([.,]\d*)?)$/; -var parseTokenHHMMSS = /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/; - -// timezone tokens -var parseTokenTimezone = /([Z+-].*)$/; -var parseTokenTimezoneZ = /^(Z)$/; -var parseTokenTimezoneHH = /^([+-])(\d{2})$/; -var parseTokenTimezoneHHMM = /^([+-])(\d{2}):?(\d{2})$/; +var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g; // This RegExp catches symbols escaped by quotes, and also +// sequences of symbols P, p, and the combinations like `PPPPPPPppppp` +var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g; +var escapedStringRegExp = /^'([^]*?)'?$/; +var doubleQuoteRegExp = /''/g; +var unescapedLatinCharacterRegExp = /[a-zA-Z]/; /** - * @category Common Helpers - * @summary Convert the given argument to an instance of Date. - * - * @description - * Convert the given argument to an instance of Date. - * - * If the argument is an instance of Date, the function returns its clone. - * - * If the argument is a number, it is treated as a timestamp. - * - * If an argument is a string, the function tries to parse it. - * Function accepts complete ISO 8601 formats as well as partial implementations. - * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601 - * - * If all above fails, the function passes the given argument to Date constructor. - * - * @param {Date|String|Number} argument - the value to convert - * @param {Object} [options] - the object with options - * @param {0 | 1 | 2} [options.additionalDigits=2] - the additional number of digits in the extended year format - * @returns {Date} the parsed date in the local time zone - * - * @example - * // Convert string '2014-02-11T11:30:30' to date: - * var result = parse('2014-02-11T11:30:30') - * //=> Tue Feb 11 2014 11:30:30 - * - * @example - * // Parse string '+02014101', - * // if the additional number of digits in the extended year format is 1: - * var result = parse('+02014101', {additionalDigits: 1}) - * //=> Fri Apr 11 2014 00:00:00 - */ -function parse (argument, dirtyOptions) { - if (is_date(argument)) { - // Prevent the date to lose the milliseconds when passed to new Date() in IE10 - return new Date(argument.getTime()) - } else if (typeof argument !== 'string') { - return new Date(argument) - } - - var options = dirtyOptions || {}; - var additionalDigits = options.additionalDigits; - if (additionalDigits == null) { - additionalDigits = DEFAULT_ADDITIONAL_DIGITS; - } else { - additionalDigits = Number(additionalDigits); - } - - var dateStrings = splitDateString(argument); - - var parseYearResult = parseYear(dateStrings.date, additionalDigits); - var year = parseYearResult.year; - var restDateString = parseYearResult.restDateString; - - var date = parseDate(restDateString, year); - - if (date) { - var timestamp = date.getTime(); - var time = 0; - var offset; - - if (dateStrings.time) { - time = parseTime(dateStrings.time); - } - - if (dateStrings.timezone) { - offset = parseTimezone(dateStrings.timezone) * MILLISECONDS_IN_MINUTE$1; - } else { - var fullTime = timestamp + time; - var fullTimeDate = new Date(fullTime); - - offset = getTimezoneOffsetInMilliseconds(fullTimeDate); - - // Adjust time when it's coming from DST - var fullTimeDateNextDay = new Date(fullTime); - fullTimeDateNextDay.setDate(fullTimeDate.getDate() + 1); - var offsetDiff = - getTimezoneOffsetInMilliseconds(fullTimeDateNextDay) - - getTimezoneOffsetInMilliseconds(fullTimeDate); - if (offsetDiff > 0) { - offset += offsetDiff; - } - } - - return new Date(timestamp + time + offset) - } else { - return new Date(argument) - } -} - -function splitDateString (dateString) { - var dateStrings = {}; - var array = dateString.split(parseTokenDateTimeDelimeter); - var timeString; - - if (parseTokenPlainTime.test(array[0])) { - dateStrings.date = null; - timeString = array[0]; - } else { - dateStrings.date = array[0]; - timeString = array[1]; - } - - if (timeString) { - var token = parseTokenTimezone.exec(timeString); - if (token) { - dateStrings.time = timeString.replace(token[1], ''); - dateStrings.timezone = token[1]; - } else { - dateStrings.time = timeString; - } - } - - return dateStrings -} - -function parseYear (dateString, additionalDigits) { - var parseTokenYYY = parseTokensYYY[additionalDigits]; - var parseTokenYYYYY = parseTokensYYYYY[additionalDigits]; - - var token; - - // YYYY or ±YYYYY - token = parseTokenYYYY.exec(dateString) || parseTokenYYYYY.exec(dateString); - if (token) { - var yearString = token[1]; - return { - year: parseInt(yearString, 10), - restDateString: dateString.slice(yearString.length) - } - } - - // YY or ±YYY - token = parseTokenYY.exec(dateString) || parseTokenYYY.exec(dateString); - if (token) { - var centuryString = token[1]; - return { - year: parseInt(centuryString, 10) * 100, - restDateString: dateString.slice(centuryString.length) - } - } - - // Invalid ISO-formatted year - return { - year: null - } -} - -function parseDate (dateString, year) { - // Invalid ISO-formatted year - if (year === null) { - return null - } - - var token; - var date; - var month; - var week; - - // YYYY - if (dateString.length === 0) { - date = new Date(0); - date.setUTCFullYear(year); - return date - } - - // YYYY-MM - token = parseTokenMM.exec(dateString); - if (token) { - date = new Date(0); - month = parseInt(token[1], 10) - 1; - date.setUTCFullYear(year, month); - return date - } - - // YYYY-DDD or YYYYDDD - token = parseTokenDDD.exec(dateString); - if (token) { - date = new Date(0); - var dayOfYear = parseInt(token[1], 10); - date.setUTCFullYear(year, 0, dayOfYear); - return date - } - - // YYYY-MM-DD or YYYYMMDD - token = parseTokenMMDD.exec(dateString); - if (token) { - date = new Date(0); - month = parseInt(token[1], 10) - 1; - var day = parseInt(token[2], 10); - date.setUTCFullYear(year, month, day); - return date - } - - // YYYY-Www or YYYYWww - token = parseTokenWww.exec(dateString); - if (token) { - week = parseInt(token[1], 10) - 1; - return dayOfISOYear(year, week) - } - - // YYYY-Www-D or YYYYWwwD - token = parseTokenWwwD.exec(dateString); - if (token) { - week = parseInt(token[1], 10) - 1; - var dayOfWeek = parseInt(token[2], 10) - 1; - return dayOfISOYear(year, week, dayOfWeek) - } - - // Invalid ISO-formatted date - return null -} - -function parseTime (timeString) { - var token; - var hours; - var minutes; - - // hh - token = parseTokenHH.exec(timeString); - if (token) { - hours = parseFloat(token[1].replace(',', '.')); - return (hours % 24) * MILLISECONDS_IN_HOUR - } - - // hh:mm or hhmm - token = parseTokenHHMM.exec(timeString); - if (token) { - hours = parseInt(token[1], 10); - minutes = parseFloat(token[2].replace(',', '.')); - return (hours % 24) * MILLISECONDS_IN_HOUR + - minutes * MILLISECONDS_IN_MINUTE$1 - } - - // hh:mm:ss or hhmmss - token = parseTokenHHMMSS.exec(timeString); - if (token) { - hours = parseInt(token[1], 10); - minutes = parseInt(token[2], 10); - var seconds = parseFloat(token[3].replace(',', '.')); - return (hours % 24) * MILLISECONDS_IN_HOUR + - minutes * MILLISECONDS_IN_MINUTE$1 + - seconds * 1000 - } - - // Invalid ISO-formatted time - return null -} - -function parseTimezone (timezoneString) { - var token; - var absoluteOffset; - - // Z - token = parseTokenTimezoneZ.exec(timezoneString); - if (token) { - return 0 - } - - // ±hh - token = parseTokenTimezoneHH.exec(timezoneString); - if (token) { - absoluteOffset = parseInt(token[2], 10) * 60; - return (token[1] === '+') ? -absoluteOffset : absoluteOffset - } - - // ±hh:mm or ±hhmm - token = parseTokenTimezoneHHMM.exec(timezoneString); - if (token) { - absoluteOffset = parseInt(token[2], 10) * 60 + parseInt(token[3], 10); - return (token[1] === '+') ? -absoluteOffset : absoluteOffset - } - - return 0 -} - -function dayOfISOYear (isoYear, week, day) { - week = week || 0; - day = day || 0; - var date = new Date(0); - date.setUTCFullYear(isoYear, 0, 4); - var fourthOfJanuaryDay = date.getUTCDay() || 7; - var diff = week * 7 + day + 1 - fourthOfJanuaryDay; - date.setUTCDate(date.getUTCDate() + diff); - return date -} - -var parse_1 = parse;/** - * @category Year Helpers - * @summary Return the start of a year for the given date. - * - * @description - * Return the start of a year for the given date. - * The result will be in the local timezone. - * - * @param {Date|String|Number} date - the original date - * @returns {Date} the start of a year - * - * @example - * // The start of a year for 2 September 2014 11:55:00: - * var result = startOfYear(new Date(2014, 8, 2, 11, 55, 00)) - * //=> Wed Jan 01 2014 00:00:00 - */ -function startOfYear (dirtyDate) { - var cleanDate = parse_1(dirtyDate); - var date = new Date(0); - date.setFullYear(cleanDate.getFullYear(), 0, 1); - date.setHours(0, 0, 0, 0); - return date -} - -var start_of_year = startOfYear;/** - * @category Day Helpers - * @summary Return the start of a day for the given date. - * - * @description - * Return the start of a day for the given date. - * The result will be in the local timezone. - * - * @param {Date|String|Number} date - the original date - * @returns {Date} the start of a day - * - * @example - * // The start of a day for 2 September 2014 11:55:00: - * var result = startOfDay(new Date(2014, 8, 2, 11, 55, 0)) - * //=> Tue Sep 02 2014 00:00:00 - */ -function startOfDay (dirtyDate) { - var date = parse_1(dirtyDate); - date.setHours(0, 0, 0, 0); - return date -} - -var start_of_day = startOfDay;var MILLISECONDS_IN_MINUTE$2 = 60000; -var MILLISECONDS_IN_DAY = 86400000; - -/** - * @category Day Helpers - * @summary Get the number of calendar days between the given dates. - * - * @description - * Get the number of calendar days between the given dates. - * - * @param {Date|String|Number} dateLeft - the later date - * @param {Date|String|Number} dateRight - the earlier date - * @returns {Number} the number of calendar days - * - * @example - * // How many calendar days are between - * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00? - * var result = differenceInCalendarDays( - * new Date(2012, 6, 2, 0, 0), - * new Date(2011, 6, 2, 23, 0) - * ) - * //=> 366 - */ -function differenceInCalendarDays (dirtyDateLeft, dirtyDateRight) { - var startOfDayLeft = start_of_day(dirtyDateLeft); - var startOfDayRight = start_of_day(dirtyDateRight); - - var timestampLeft = startOfDayLeft.getTime() - - startOfDayLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$2; - var timestampRight = startOfDayRight.getTime() - - startOfDayRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE$2; - - // Round the number of days to the nearest integer - // because the number of milliseconds in a day is not constant - // (e.g. it's different in the day of the daylight saving time clock shift) - return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY) -} - -var difference_in_calendar_days = differenceInCalendarDays;/** - * @category Day Helpers - * @summary Get the day of the year of the given date. - * - * @description - * Get the day of the year of the given date. - * - * @param {Date|String|Number} date - the given date - * @returns {Number} the day of year - * - * @example - * // Which day of the year is 2 July 2014? - * var result = getDayOfYear(new Date(2014, 6, 2)) - * //=> 183 - */ -function getDayOfYear (dirtyDate) { - var date = parse_1(dirtyDate); - var diff = difference_in_calendar_days(date, start_of_year(date)); - var dayOfYear = diff + 1; - return dayOfYear -} - -var get_day_of_year = getDayOfYear;/** - * @category Week Helpers - * @summary Return the start of a week for the given date. - * - * @description - * Return the start of a week for the given date. - * The result will be in the local timezone. - * - * @param {Date|String|Number} date - the original date - * @param {Object} [options] - the object with options - * @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) - * @returns {Date} the start of a week - * - * @example - * // The start of a week for 2 September 2014 11:55:00: - * var result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0)) - * //=> Sun Aug 31 2014 00:00:00 - * - * @example - * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00: - * var result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), {weekStartsOn: 1}) - * //=> Mon Sep 01 2014 00:00:00 - */ -function startOfWeek (dirtyDate, dirtyOptions) { - var weekStartsOn = dirtyOptions ? (Number(dirtyOptions.weekStartsOn) || 0) : 0; - - var date = parse_1(dirtyDate); - var day = date.getDay(); - var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn; - - date.setDate(date.getDate() - diff); - date.setHours(0, 0, 0, 0); - return date -} - -var start_of_week = startOfWeek;/** - * @category ISO Week Helpers - * @summary Return the start of an ISO week for the given date. - * - * @description - * Return the start of an ISO week for the given date. - * The result will be in the local timezone. - * - * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date - * - * @param {Date|String|Number} date - the original date - * @returns {Date} the start of an ISO week - * - * @example - * // The start of an ISO week for 2 September 2014 11:55:00: - * var result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0)) - * //=> Mon Sep 01 2014 00:00:00 - */ -function startOfISOWeek (dirtyDate) { - return start_of_week(dirtyDate, {weekStartsOn: 1}) -} - -var start_of_iso_week = startOfISOWeek;/** - * @category ISO Week-Numbering Year Helpers - * @summary Get the ISO week-numbering year of the given date. - * - * @description - * Get the ISO week-numbering year of the given date, - * which always starts 3 days before the year's first Thursday. - * - * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date - * - * @param {Date|String|Number} date - the given date - * @returns {Number} the ISO week-numbering year - * - * @example - * // Which ISO-week numbering year is 2 January 2005? - * var result = getISOYear(new Date(2005, 0, 2)) - * //=> 2004 - */ -function getISOYear (dirtyDate) { - var date = parse_1(dirtyDate); - var year = date.getFullYear(); - - var fourthOfJanuaryOfNextYear = new Date(0); - fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4); - fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0); - var startOfNextYear = start_of_iso_week(fourthOfJanuaryOfNextYear); - - var fourthOfJanuaryOfThisYear = new Date(0); - fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4); - fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0); - var startOfThisYear = start_of_iso_week(fourthOfJanuaryOfThisYear); - - if (date.getTime() >= startOfNextYear.getTime()) { - return year + 1 - } else if (date.getTime() >= startOfThisYear.getTime()) { - return year - } else { - return year - 1 - } -} - -var get_iso_year = getISOYear;/** - * @category ISO Week-Numbering Year Helpers - * @summary Return the start of an ISO week-numbering year for the given date. - * - * @description - * Return the start of an ISO week-numbering year, - * which always starts 3 days before the year's first Thursday. - * The result will be in the local timezone. - * - * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date - * - * @param {Date|String|Number} date - the original date - * @returns {Date} the start of an ISO year - * - * @example - * // The start of an ISO week-numbering year for 2 July 2005: - * var result = startOfISOYear(new Date(2005, 6, 2)) - * //=> Mon Jan 03 2005 00:00:00 - */ -function startOfISOYear (dirtyDate) { - var year = get_iso_year(dirtyDate); - var fourthOfJanuary = new Date(0); - fourthOfJanuary.setFullYear(year, 0, 4); - fourthOfJanuary.setHours(0, 0, 0, 0); - var date = start_of_iso_week(fourthOfJanuary); - return date -} - -var start_of_iso_year = startOfISOYear;var MILLISECONDS_IN_WEEK = 604800000; - -/** - * @category ISO Week Helpers - * @summary Get the ISO week of the given date. - * - * @description - * Get the ISO week of the given date. - * - * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date - * - * @param {Date|String|Number} date - the given date - * @returns {Number} the ISO week - * - * @example - * // Which week of the ISO-week numbering year is 2 January 2005? - * var result = getISOWeek(new Date(2005, 0, 2)) - * //=> 53 - */ -function getISOWeek (dirtyDate) { - var date = parse_1(dirtyDate); - var diff = start_of_iso_week(date).getTime() - start_of_iso_year(date).getTime(); - - // Round the number of days to the nearest integer - // because the number of milliseconds in a week is not constant - // (e.g. it's different in the week of the daylight saving time clock shift) - return Math.round(diff / MILLISECONDS_IN_WEEK) + 1 -} - -var get_iso_week = getISOWeek;/** - * @category Common Helpers - * @summary Is the given date valid? - * - * @description - * Returns false if argument is Invalid Date and true otherwise. - * Invalid Date is a Date, whose time value is NaN. - * - * Time value of Date: http://es5.github.io/#x15.9.1.1 - * - * @param {Date} date - the date to check - * @returns {Boolean} the date is valid - * @throws {TypeError} argument must be an instance of Date - * - * @example - * // For the valid date: - * var result = isValid(new Date(2014, 1, 31)) - * //=> true - * - * @example - * // For the invalid date: - * var result = isValid(new Date('')) - * //=> false - */ -function isValid (dirtyDate) { - if (is_date(dirtyDate)) { - return !isNaN(dirtyDate) - } else { - throw new TypeError(toString.call(dirtyDate) + ' is not an instance of Date') - } -} - -var is_valid = isValid;function buildDistanceInWordsLocale () { - var distanceInWordsLocale = { - lessThanXSeconds: { - one: 'less than a second', - other: 'less than {{count}} seconds' - }, - - xSeconds: { - one: '1 second', - other: '{{count}} seconds' - }, - - halfAMinute: 'half a minute', - - lessThanXMinutes: { - one: 'less than a minute', - other: 'less than {{count}} minutes' - }, - - xMinutes: { - one: '1 minute', - other: '{{count}} minutes' - }, - - aboutXHours: { - one: 'about 1 hour', - other: 'about {{count}} hours' - }, - - xHours: { - one: '1 hour', - other: '{{count}} hours' - }, - - xDays: { - one: '1 day', - other: '{{count}} days' - }, - - aboutXMonths: { - one: 'about 1 month', - other: 'about {{count}} months' - }, - - xMonths: { - one: '1 month', - other: '{{count}} months' - }, - - aboutXYears: { - one: 'about 1 year', - other: 'about {{count}} years' - }, - - xYears: { - one: '1 year', - other: '{{count}} years' - }, - - overXYears: { - one: 'over 1 year', - other: 'over {{count}} years' - }, - - almostXYears: { - one: 'almost 1 year', - other: 'almost {{count}} years' - } - }; - - function localize (token, count, options) { - options = options || {}; - - var result; - if (typeof distanceInWordsLocale[token] === 'string') { - result = distanceInWordsLocale[token]; - } else if (count === 1) { - result = distanceInWordsLocale[token].one; - } else { - result = distanceInWordsLocale[token].other.replace('{{count}}', count); - } - - if (options.addSuffix) { - if (options.comparison > 0) { - return 'in ' + result - } else { - return result + ' ago' - } - } - - return result - } - - return { - localize: localize - } -} - -var build_distance_in_words_locale = buildDistanceInWordsLocale;var commonFormatterKeys = [ - 'M', 'MM', 'Q', 'D', 'DD', 'DDD', 'DDDD', 'd', - 'E', 'W', 'WW', 'YY', 'YYYY', 'GG', 'GGGG', - 'H', 'HH', 'h', 'hh', 'm', 'mm', - 's', 'ss', 'S', 'SS', 'SSS', - 'Z', 'ZZ', 'X', 'x' -]; - -function buildFormattingTokensRegExp (formatters) { - var formatterKeys = []; - for (var key in formatters) { - if (formatters.hasOwnProperty(key)) { - formatterKeys.push(key); - } - } - - var formattingTokens = commonFormatterKeys - .concat(formatterKeys) - .sort() - .reverse(); - var formattingTokensRegExp = new RegExp( - '(\\[[^\\[]*\\])|(\\\\)?' + '(' + formattingTokens.join('|') + '|.)', 'g' - ); - - return formattingTokensRegExp -} - -var build_formatting_tokens_reg_exp = buildFormattingTokensRegExp;function buildFormatLocale () { - // Note: in English, the names of days of the week and months are capitalized. - // If you are making a new locale based on this one, check if the same is true for the language you're working on. - // Generally, formatted dates should look like they are in the middle of a sentence, - // e.g. in Spanish language the weekdays and months should be in the lowercase. - var months3char = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; - var monthsFull = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; - var weekdays2char = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']; - var weekdays3char = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; - var weekdaysFull = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; - var meridiemUppercase = ['AM', 'PM']; - var meridiemLowercase = ['am', 'pm']; - var meridiemFull = ['a.m.', 'p.m.']; - - var formatters = { - // Month: Jan, Feb, ..., Dec - 'MMM': function (date) { - return months3char[date.getMonth()] - }, - - // Month: January, February, ..., December - 'MMMM': function (date) { - return monthsFull[date.getMonth()] - }, - - // Day of week: Su, Mo, ..., Sa - 'dd': function (date) { - return weekdays2char[date.getDay()] - }, - - // Day of week: Sun, Mon, ..., Sat - 'ddd': function (date) { - return weekdays3char[date.getDay()] - }, - - // Day of week: Sunday, Monday, ..., Saturday - 'dddd': function (date) { - return weekdaysFull[date.getDay()] - }, - - // AM, PM - 'A': function (date) { - return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0] - }, - - // am, pm - 'a': function (date) { - return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0] - }, - - // a.m., p.m. - 'aa': function (date) { - return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0] - } - }; - - // Generate ordinal version of formatters: M -> Mo, D -> Do, etc. - var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W']; - ordinalFormatters.forEach(function (formatterToken) { - formatters[formatterToken + 'o'] = function (date, formatters) { - return ordinal(formatters[formatterToken](date)) - }; - }); - - return { - formatters: formatters, - formattingTokensRegExp: build_formatting_tokens_reg_exp(formatters) - } -} - -function ordinal (number) { - var rem100 = number % 100; - if (rem100 > 20 || rem100 < 10) { - switch (rem100 % 10) { - case 1: - return number + 'st' - case 2: - return number + 'nd' - case 3: - return number + 'rd' - } - } - return number + 'th' -} - -var build_format_locale = buildFormatLocale;/** - * @category Locales - * @summary English locale. - */ -var en = { - distanceInWords: build_distance_in_words_locale(), - format: build_format_locale() -};/** + * @name format * @category Common Helpers * @summary Format the date. * * @description - * Return the formatted date string in the given format. + * Return the formatted date string in the given format. The result may vary by locale. * - * Accepted tokens: - * | Unit | Token | Result examples | - * |-------------------------|-------|----------------------------------| - * | Month | M | 1, 2, ..., 12 | - * | | Mo | 1st, 2nd, ..., 12th | - * | | MM | 01, 02, ..., 12 | - * | | MMM | Jan, Feb, ..., Dec | - * | | MMMM | January, February, ..., December | - * | Quarter | Q | 1, 2, 3, 4 | - * | | Qo | 1st, 2nd, 3rd, 4th | - * | Day of month | D | 1, 2, ..., 31 | - * | | Do | 1st, 2nd, ..., 31st | - * | | DD | 01, 02, ..., 31 | - * | Day of year | DDD | 1, 2, ..., 366 | - * | | DDDo | 1st, 2nd, ..., 366th | - * | | DDDD | 001, 002, ..., 366 | - * | Day of week | d | 0, 1, ..., 6 | - * | | do | 0th, 1st, ..., 6th | - * | | dd | Su, Mo, ..., Sa | - * | | ddd | Sun, Mon, ..., Sat | - * | | dddd | Sunday, Monday, ..., Saturday | - * | Day of ISO week | E | 1, 2, ..., 7 | - * | ISO week | W | 1, 2, ..., 53 | - * | | Wo | 1st, 2nd, ..., 53rd | - * | | WW | 01, 02, ..., 53 | - * | Year | YY | 00, 01, ..., 99 | - * | | YYYY | 1900, 1901, ..., 2099 | - * | ISO week-numbering year | GG | 00, 01, ..., 99 | - * | | GGGG | 1900, 1901, ..., 2099 | - * | AM/PM | A | AM, PM | - * | | a | am, pm | - * | | aa | a.m., p.m. | - * | Hour | H | 0, 1, ... 23 | - * | | HH | 00, 01, ... 23 | - * | | h | 1, 2, ..., 12 | - * | | hh | 01, 02, ..., 12 | - * | Minute | m | 0, 1, ..., 59 | - * | | mm | 00, 01, ..., 59 | - * | Second | s | 0, 1, ..., 59 | - * | | ss | 00, 01, ..., 59 | - * | 1/10 of second | S | 0, 1, ..., 9 | - * | 1/100 of second | SS | 00, 01, ..., 99 | - * | Millisecond | SSS | 000, 001, ..., 999 | - * | Timezone | Z | -01:00, +00:00, ... +12:00 | - * | | ZZ | -0100, +0000, ..., +1200 | - * | Seconds timestamp | X | 512969520 | - * | Milliseconds timestamp | x | 512969520900 | + * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries. + * > See: https://git.io/fxCyr * - * The characters wrapped in square brackets are escaped. + * The characters wrapped between two single quotes characters (') are escaped. + * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote. + * (see the last example) * - * The result may vary by locale. + * Format of the string is based on Unicode Technical Standard #35: + * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table + * with a few additions (see note 7 below the table). * - * @param {Date|String|Number} date - the original date - * @param {String} [format='YYYY-MM-DDTHH:mm:ss.SSSZ'] - the string of tokens - * @param {Object} [options] - the object with options - * @param {Object} [options.locale=enLocale] - the locale object + * Accepted patterns: + * | Unit | Pattern | Result examples | Notes | + * |---------------------------------|---------|-----------------------------------|-------| + * | Era | G..GGG | AD, BC | | + * | | GGGG | Anno Domini, Before Christ | 2 | + * | | GGGGG | A, B | | + * | Calendar year | y | 44, 1, 1900, 2017 | 5 | + * | | yo | 44th, 1st, 0th, 17th | 5,7 | + * | | yy | 44, 01, 00, 17 | 5 | + * | | yyy | 044, 001, 1900, 2017 | 5 | + * | | yyyy | 0044, 0001, 1900, 2017 | 5 | + * | | yyyyy | ... | 3,5 | + * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 | + * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 | + * | | YY | 44, 01, 00, 17 | 5,8 | + * | | YYY | 044, 001, 1900, 2017 | 5 | + * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 | + * | | YYYYY | ... | 3,5 | + * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 | + * | | RR | -43, 00, 01, 1900, 2017 | 5,7 | + * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 | + * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 | + * | | RRRRR | ... | 3,5,7 | + * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 | + * | | uu | -43, 01, 1900, 2017 | 5 | + * | | uuu | -043, 001, 1900, 2017 | 5 | + * | | uuuu | -0043, 0001, 1900, 2017 | 5 | + * | | uuuuu | ... | 3,5 | + * | Quarter (formatting) | Q | 1, 2, 3, 4 | | + * | | Qo | 1st, 2nd, 3rd, 4th | 7 | + * | | QQ | 01, 02, 03, 04 | | + * | | QQQ | Q1, Q2, Q3, Q4 | | + * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 | + * | | QQQQQ | 1, 2, 3, 4 | 4 | + * | Quarter (stand-alone) | q | 1, 2, 3, 4 | | + * | | qo | 1st, 2nd, 3rd, 4th | 7 | + * | | qq | 01, 02, 03, 04 | | + * | | qqq | Q1, Q2, Q3, Q4 | | + * | | qqqq | 1st quarter, 2nd quarter, ... | 2 | + * | | qqqqq | 1, 2, 3, 4 | 4 | + * | Month (formatting) | M | 1, 2, ..., 12 | | + * | | Mo | 1st, 2nd, ..., 12th | 7 | + * | | MM | 01, 02, ..., 12 | | + * | | MMM | Jan, Feb, ..., Dec | | + * | | MMMM | January, February, ..., December | 2 | + * | | MMMMM | J, F, ..., D | | + * | Month (stand-alone) | L | 1, 2, ..., 12 | | + * | | Lo | 1st, 2nd, ..., 12th | 7 | + * | | LL | 01, 02, ..., 12 | | + * | | LLL | Jan, Feb, ..., Dec | | + * | | LLLL | January, February, ..., December | 2 | + * | | LLLLL | J, F, ..., D | | + * | Local week of year | w | 1, 2, ..., 53 | | + * | | wo | 1st, 2nd, ..., 53th | 7 | + * | | ww | 01, 02, ..., 53 | | + * | ISO week of year | I | 1, 2, ..., 53 | 7 | + * | | Io | 1st, 2nd, ..., 53th | 7 | + * | | II | 01, 02, ..., 53 | 7 | + * | Day of month | d | 1, 2, ..., 31 | | + * | | do | 1st, 2nd, ..., 31st | 7 | + * | | dd | 01, 02, ..., 31 | | + * | Day of year | D | 1, 2, ..., 365, 366 | 9 | + * | | Do | 1st, 2nd, ..., 365th, 366th | 7 | + * | | DD | 01, 02, ..., 365, 366 | 9 | + * | | DDD | 001, 002, ..., 365, 366 | | + * | | DDDD | ... | 3 | + * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Su | | + * | | EEEE | Monday, Tuesday, ..., Sunday | 2 | + * | | EEEEE | M, T, W, T, F, S, S | | + * | | EEEEEE | Mo, Tu, We, Th, Fr, Su, Sa | | + * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 | + * | | io | 1st, 2nd, ..., 7th | 7 | + * | | ii | 01, 02, ..., 07 | 7 | + * | | iii | Mon, Tue, Wed, ..., Su | 7 | + * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 | + * | | iiiii | M, T, W, T, F, S, S | 7 | + * | | iiiiii | Mo, Tu, We, Th, Fr, Su, Sa | 7 | + * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | | + * | | eo | 2nd, 3rd, ..., 1st | 7 | + * | | ee | 02, 03, ..., 01 | | + * | | eee | Mon, Tue, Wed, ..., Su | | + * | | eeee | Monday, Tuesday, ..., Sunday | 2 | + * | | eeeee | M, T, W, T, F, S, S | | + * | | eeeeee | Mo, Tu, We, Th, Fr, Su, Sa | | + * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | | + * | | co | 2nd, 3rd, ..., 1st | 7 | + * | | cc | 02, 03, ..., 01 | | + * | | ccc | Mon, Tue, Wed, ..., Su | | + * | | cccc | Monday, Tuesday, ..., Sunday | 2 | + * | | ccccc | M, T, W, T, F, S, S | | + * | | cccccc | Mo, Tu, We, Th, Fr, Su, Sa | | + * | AM, PM | a..aaa | AM, PM | | + * | | aaaa | a.m., p.m. | 2 | + * | | aaaaa | a, p | | + * | AM, PM, noon, midnight | b..bbb | AM, PM, noon, midnight | | + * | | bbbb | a.m., p.m., noon, midnight | 2 | + * | | bbbbb | a, p, n, mi | | + * | Flexible day period | B..BBB | at night, in the morning, ... | | + * | | BBBB | at night, in the morning, ... | 2 | + * | | BBBBB | at night, in the morning, ... | | + * | Hour [1-12] | h | 1, 2, ..., 11, 12 | | + * | | ho | 1st, 2nd, ..., 11th, 12th | 7 | + * | | hh | 01, 02, ..., 11, 12 | | + * | Hour [0-23] | H | 0, 1, 2, ..., 23 | | + * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 | + * | | HH | 00, 01, 02, ..., 23 | | + * | Hour [0-11] | K | 1, 2, ..., 11, 0 | | + * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 | + * | | KK | 1, 2, ..., 11, 0 | | + * | Hour [1-24] | k | 24, 1, 2, ..., 23 | | + * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 | + * | | kk | 24, 01, 02, ..., 23 | | + * | Minute | m | 0, 1, ..., 59 | | + * | | mo | 0th, 1st, ..., 59th | 7 | + * | | mm | 00, 01, ..., 59 | | + * | Second | s | 0, 1, ..., 59 | | + * | | so | 0th, 1st, ..., 59th | 7 | + * | | ss | 00, 01, ..., 59 | | + * | Fraction of second | S | 0, 1, ..., 9 | | + * | | SS | 00, 01, ..., 99 | | + * | | SSS | 000, 0001, ..., 999 | | + * | | SSSS | ... | 3 | + * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | | + * | | XX | -0800, +0530, Z | | + * | | XXX | -08:00, +05:30, Z | | + * | | XXXX | -0800, +0530, Z, +123456 | 2 | + * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | | + * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | | + * | | xx | -0800, +0530, +0000 | | + * | | xxx | -08:00, +05:30, +00:00 | 2 | + * | | xxxx | -0800, +0530, +0000, +123456 | | + * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | | + * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | | + * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 | + * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 | + * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 | + * | Seconds timestamp | t | 512969520 | 7 | + * | | tt | ... | 3,7 | + * | Milliseconds timestamp | T | 512969520900 | 7 | + * | | TT | ... | 3,7 | + * | Long localized date | P | 05/29/1453 | 7 | + * | | PP | May 29, 1453 | 7 | + * | | PPP | May 29th, 1453 | 7 | + * | | PPPP | Sunday, May 29th, 1453 | 2,7 | + * | Long localized time | p | 12:00 AM | 7 | + * | | pp | 12:00:00 AM | 7 | + * | | ppp | 12:00:00 AM GMT+2 | 7 | + * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 | + * | Combination of date and time | Pp | 05/29/1453, 12:00 AM | 7 | + * | | PPpp | May 29, 1453, 12:00:00 AM | 7 | + * | | PPPppp | May 29th, 1453 at ... | 7 | + * | | PPPPpppp| Sunday, May 29th, 1453 at ... | 2,7 | + * Notes: + * 1. "Formatting" units (e.g. formatting quarter) in the default en-US locale + * are the same as "stand-alone" units, but are different in some languages. + * "Formatting" units are declined according to the rules of the language + * in the context of a date. "Stand-alone" units are always nominative singular: + * + * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'` + * + * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'` + * + * 2. Any sequence of the identical letters is a pattern, unless it is escaped by + * the single quote characters (see below). + * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`) + * the output will be the same as default pattern for this unit, usually + * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units + * are marked with "2" in the last column of the table. + * + * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'` + * + * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'` + * + * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'` + * + * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'` + * + * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'` + * + * 3. Some patterns could be unlimited length (such as `yyyyyyyy`). + * The output will be padded with zeros to match the length of the pattern. + * + * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'` + * + * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales. + * These tokens represent the shortest form of the quarter. + * + * 5. The main difference between `y` and `u` patterns are B.C. years: + * + * | Year | `y` | `u` | + * |------|-----|-----| + * | AC 1 | 1 | 1 | + * | BC 1 | 1 | 0 | + * | BC 2 | 2 | -1 | + * + * Also `yy` always returns the last two digits of a year, + * while `uu` pads single digit years to 2 characters and returns other years unchanged: + * + * | Year | `yy` | `uu` | + * |------|------|------| + * | 1 | 01 | 01 | + * | 14 | 14 | 14 | + * | 376 | 76 | 376 | + * | 1453 | 53 | 1453 | + * + * The same difference is true for local and ISO week-numbering years (`Y` and `R`), + * except local week-numbering years are dependent on `options.weekStartsOn` + * and `options.firstWeekContainsDate` (compare [getISOWeekYear]{@link https://date-fns.org/docs/getISOWeekYear} + * and [getWeekYear]{@link https://date-fns.org/docs/getWeekYear}). + * + * 6. Specific non-location timezones are currently unavailable in `date-fns`, + * so right now these tokens fall back to GMT timezones. + * + * 7. These patterns are not in the Unicode Technical Standard #35: + * - `i`: ISO day of week + * - `I`: ISO week of year + * - `R`: ISO week-numbering year + * - `t`: seconds timestamp + * - `T`: milliseconds timestamp + * - `o`: ordinal number modifier + * - `P`: long localized date + * - `p`: long localized time + * + * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years. + * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://git.io/fxCyr + * + * 9. `D` and `DD` tokens represent days of the year but they are ofthen confused with days of the month. + * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://git.io/fxCyr + * + * ### v2.0.0 breaking changes: + * + * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes). + * + * - The second argument is now required for the sake of explicitness. + * + * ```javascript + * // Before v2.0.0 + * format(new Date(2016, 0, 1)) + * + * // v2.0.0 onward + * format(new Date(2016, 0, 1), "yyyy-MM-dd'T'HH:mm:ss.SSSxxx") + * ``` + * + * - New format string API for `format` function + * which is based on [Unicode Technical Standard #35](https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table). + * See [this post](https://blog.date-fns.org/post/unicode-tokens-in-date-fns-v2-sreatyki91jg) for more details. + * + * - Characters are now escaped using single quote symbols (`'`) instead of square brackets. + * + * @param {Date|Number} date - the original date + * @param {String} format - the string of tokens + * @param {Object} [options] - an object with options. + * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} + * @param {0|1|2|3|4|5|6} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday) + * @param {Number} [options.firstWeekContainsDate=1] - the day of January, which is + * @param {Boolean} [options.useAdditionalWeekYearTokens=false] - if true, allows usage of the week-numbering year tokens `YY` and `YYYY`; + * see: https://git.io/fxCyr + * @param {Boolean} [options.useAdditionalDayOfYearTokens=false] - if true, allows usage of the day of year tokens `D` and `DD`; + * see: https://git.io/fxCyr * @returns {String} the formatted date string + * @throws {TypeError} 2 arguments required + * @throws {RangeError} `date` must not be Invalid Date + * @throws {RangeError} `options.locale` must contain `localize` property + * @throws {RangeError} `options.locale` must contain `formatLong` property + * @throws {RangeError} `options.weekStartsOn` must be between 0 and 6 + * @throws {RangeError} `options.firstWeekContainsDate` must be between 1 and 7 + * @throws {RangeError} use `yyyy` instead of `YYYY` for formatting years; see: https://git.io/fxCyr + * @throws {RangeError} use `yy` instead of `YY` for formatting years; see: https://git.io/fxCyr + * @throws {RangeError} use `d` instead of `D` for formatting days of the month; see: https://git.io/fxCyr + * @throws {RangeError} use `dd` instead of `DD` for formatting days of the month; see: https://git.io/fxCyr + * @throws {RangeError} format string contains an unescaped latin alphabet character * * @example * // Represent 11 February 2014 in middle-endian format: - * var result = format( - * new Date(2014, 1, 11), - * 'MM/DD/YYYY' - * ) + * var result = format(new Date(2014, 1, 11), 'MM/dd/yyyy') * //=> '02/11/2014' * * @example * // Represent 2 July 2014 in Esperanto: - * var eoLocale = require('date-fns/locale/eo') - * var result = format( - * new Date(2014, 6, 2), - * 'Do [de] MMMM YYYY', - * {locale: eoLocale} - * ) + * import { eoLocale } from 'date-fns/locale/eo' + * var result = format(new Date(2014, 6, 2), "do 'de' MMMM yyyy", { + * locale: eoLocale + * }) * //=> '2-a de julio 2014' + * + * @example + * // Escape string by single quote characters: + * var result = format(new Date(2014, 6, 2, 15), "h 'o''clock'") + * //=> "3 o'clock" */ -function format (dirtyDate, dirtyFormatStr, dirtyOptions) { - var formatStr = dirtyFormatStr ? String(dirtyFormatStr) : 'YYYY-MM-DDTHH:mm:ss.SSSZ'; + +function format(dirtyDate, dirtyFormatStr, dirtyOptions) { + requiredArgs(2, arguments); + var formatStr = String(dirtyFormatStr); var options = dirtyOptions || {}; + var locale = options.locale || locale$1; + var localeFirstWeekContainsDate = locale.options && locale.options.firstWeekContainsDate; + var defaultFirstWeekContainsDate = localeFirstWeekContainsDate == null ? 1 : toInteger(localeFirstWeekContainsDate); + var firstWeekContainsDate = options.firstWeekContainsDate == null ? defaultFirstWeekContainsDate : toInteger(options.firstWeekContainsDate); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN - var locale = options.locale; - var localeFormatters = en.format.formatters; - var formattingTokensRegExp = en.format.formattingTokensRegExp; - if (locale && locale.format && locale.format.formatters) { - localeFormatters = locale.format.formatters; + if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) { + throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively'); + } - if (locale.format.formattingTokensRegExp) { - formattingTokensRegExp = locale.format.formattingTokensRegExp; + var localeWeekStartsOn = locale.options && locale.options.weekStartsOn; + var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : toInteger(localeWeekStartsOn); + var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : toInteger(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN + + if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) { + throw new RangeError('weekStartsOn must be between 0 and 6 inclusively'); + } + + if (!locale.localize) { + throw new RangeError('locale must contain localize property'); + } + + if (!locale.formatLong) { + throw new RangeError('locale must contain formatLong property'); + } + + var originalDate = toDate(dirtyDate); + + if (!isValid(originalDate)) { + throw new RangeError('Invalid time value'); + } // Convert the date in system timezone to the same date in UTC+00:00 timezone. + // This ensures that when UTC functions will be implemented, locales will be compatible with them. + // See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376 + + + var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate); + var utcDate = subMilliseconds(originalDate, timezoneOffset); + var formatterOptions = { + firstWeekContainsDate: firstWeekContainsDate, + weekStartsOn: weekStartsOn, + locale: locale, + _originalDate: originalDate + }; + var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) { + var firstCharacter = substring[0]; + + if (firstCharacter === 'p' || firstCharacter === 'P') { + var longFormatter = longFormatters[firstCharacter]; + return longFormatter(substring, locale.formatLong, formatterOptions); } - } - var date = parse_1(dirtyDate); - - if (!is_valid(date)) { - return 'Invalid Date' - } - - var formatFn = buildFormatFn(formatStr, localeFormatters, formattingTokensRegExp); - - return formatFn(date) -} - -var formatters = { - // Month: 1, 2, ..., 12 - 'M': function (date) { - return date.getMonth() + 1 - }, - - // Month: 01, 02, ..., 12 - 'MM': function (date) { - return addLeadingZeros(date.getMonth() + 1, 2) - }, - - // Quarter: 1, 2, 3, 4 - 'Q': function (date) { - return Math.ceil((date.getMonth() + 1) / 3) - }, - - // Day of month: 1, 2, ..., 31 - 'D': function (date) { - return date.getDate() - }, - - // Day of month: 01, 02, ..., 31 - 'DD': function (date) { - return addLeadingZeros(date.getDate(), 2) - }, - - // Day of year: 1, 2, ..., 366 - 'DDD': function (date) { - return get_day_of_year(date) - }, - - // Day of year: 001, 002, ..., 366 - 'DDDD': function (date) { - return addLeadingZeros(get_day_of_year(date), 3) - }, - - // Day of week: 0, 1, ..., 6 - 'd': function (date) { - return date.getDay() - }, - - // Day of ISO week: 1, 2, ..., 7 - 'E': function (date) { - return date.getDay() || 7 - }, - - // ISO week: 1, 2, ..., 53 - 'W': function (date) { - return get_iso_week(date) - }, - - // ISO week: 01, 02, ..., 53 - 'WW': function (date) { - return addLeadingZeros(get_iso_week(date), 2) - }, - - // Year: 00, 01, ..., 99 - 'YY': function (date) { - return addLeadingZeros(date.getFullYear(), 4).substr(2) - }, - - // Year: 1900, 1901, ..., 2099 - 'YYYY': function (date) { - return addLeadingZeros(date.getFullYear(), 4) - }, - - // ISO week-numbering year: 00, 01, ..., 99 - 'GG': function (date) { - return String(get_iso_year(date)).substr(2) - }, - - // ISO week-numbering year: 1900, 1901, ..., 2099 - 'GGGG': function (date) { - return get_iso_year(date) - }, - - // Hour: 0, 1, ... 23 - 'H': function (date) { - return date.getHours() - }, - - // Hour: 00, 01, ..., 23 - 'HH': function (date) { - return addLeadingZeros(date.getHours(), 2) - }, - - // Hour: 1, 2, ..., 12 - 'h': function (date) { - var hours = date.getHours(); - if (hours === 0) { - return 12 - } else if (hours > 12) { - return hours % 12 - } else { - return hours + return substring; + }).join('').match(formattingTokensRegExp).map(function (substring) { + // Replace two single quote characters with one single quote character + if (substring === "''") { + return "'"; } - }, - // Hour: 01, 02, ..., 12 - 'hh': function (date) { - return addLeadingZeros(formatters['h'](date), 2) - }, + var firstCharacter = substring[0]; - // Minute: 0, 1, ..., 59 - 'm': function (date) { - return date.getMinutes() - }, + if (firstCharacter === "'") { + return cleanEscapedString(substring); + } - // Minute: 00, 01, ..., 59 - 'mm': function (date) { - return addLeadingZeros(date.getMinutes(), 2) - }, + var formatter = formatters$1[firstCharacter]; - // Second: 0, 1, ..., 59 - 's': function (date) { - return date.getSeconds() - }, - - // Second: 00, 01, ..., 59 - 'ss': function (date) { - return addLeadingZeros(date.getSeconds(), 2) - }, - - // 1/10 of second: 0, 1, ..., 9 - 'S': function (date) { - return Math.floor(date.getMilliseconds() / 100) - }, - - // 1/100 of second: 00, 01, ..., 99 - 'SS': function (date) { - return addLeadingZeros(Math.floor(date.getMilliseconds() / 10), 2) - }, - - // Millisecond: 000, 001, ..., 999 - 'SSS': function (date) { - return addLeadingZeros(date.getMilliseconds(), 3) - }, - - // Timezone: -01:00, +00:00, ... +12:00 - 'Z': function (date) { - return formatTimezone(date.getTimezoneOffset(), ':') - }, - - // Timezone: -0100, +0000, ... +1200 - 'ZZ': function (date) { - return formatTimezone(date.getTimezoneOffset()) - }, - - // Seconds timestamp: 512969520 - 'X': function (date) { - return Math.floor(date.getTime() / 1000) - }, - - // Milliseconds timestamp: 512969520900 - 'x': function (date) { - return date.getTime() - } -}; - -function buildFormatFn (formatStr, localeFormatters, formattingTokensRegExp) { - var array = formatStr.match(formattingTokensRegExp); - var length = array.length; - - var i; - var formatter; - for (i = 0; i < length; i++) { - formatter = localeFormatters[array[i]] || formatters[array[i]]; if (formatter) { - array[i] = formatter; - } else { - array[i] = removeFormattingTokens(array[i]); - } - } - - return function (date) { - var output = ''; - for (var i = 0; i < length; i++) { - if (array[i] instanceof Function) { - output += array[i](date, formatters); - } else { - output += array[i]; + if (!options.useAdditionalWeekYearTokens && isProtectedWeekYearToken(substring)) { + throwProtectedError(substring); } + + if (!options.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(substring)) { + throwProtectedError(substring); + } + + return formatter(utcDate, substring, locale.localize, formatterOptions); } - return output - } + + if (firstCharacter.match(unescapedLatinCharacterRegExp)) { + throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`'); + } + + return substring; + }).join(''); + return result; } -function removeFormattingTokens (input) { - if (input.match(/\[[\s\S]/)) { - return input.replace(/^\[|]$/g, '') - } - return input.replace(/\\/g, '') -} - -function formatTimezone (offset, delimeter) { - delimeter = delimeter || ''; - var sign = offset > 0 ? '-' : '+'; - var absOffset = Math.abs(offset); - var hours = Math.floor(absOffset / 60); - var minutes = absOffset % 60; - return sign + addLeadingZeros(hours, 2) + delimeter + addLeadingZeros(minutes, 2) -} - -function addLeadingZeros (number, targetLength) { - var output = Math.abs(number).toString(); - while (output.length < targetLength) { - output = '0' + output; - } - return output -} - -var format_1 = format;/** - * @category Common Helpers - * @summary Compare the two dates reverse chronologically and return -1, 0 or 1. - * - * @description - * Compare the two dates and return -1 if the first date is after the second, - * 1 if the first date is before the second or 0 if dates are equal. - * - * @param {Date|String|Number} dateLeft - the first date to compare - * @param {Date|String|Number} dateRight - the second date to compare - * @returns {Number} the result of the comparison - * - * @example - * // Compare 11 February 1987 and 10 July 1989 reverse chronologically: - * var result = compareDesc( - * new Date(1987, 1, 11), - * new Date(1989, 6, 10) - * ) - * //=> 1 - * - * @example - * // Sort the array of dates in reverse chronological order: - * var result = [ - * new Date(1995, 6, 2), - * new Date(1987, 1, 11), - * new Date(1989, 6, 10) - * ].sort(compareDesc) - * //=> [ - * // Sun Jul 02 1995 00:00:00, - * // Mon Jul 10 1989 00:00:00, - * // Wed Feb 11 1987 00:00:00 - * // ] - */ -function compareDesc (dirtyDateLeft, dirtyDateRight) { - var dateLeft = parse_1(dirtyDateLeft); - var timeLeft = dateLeft.getTime(); - var dateRight = parse_1(dirtyDateRight); - var timeRight = dateRight.getTime(); - - if (timeLeft > timeRight) { - return -1 - } else if (timeLeft < timeRight) { - return 1 - } else { - return 0 - } -} - -var compare_desc = compareDesc;/** - * @category Millisecond Helpers - * @summary Get the number of milliseconds between the given dates. - * - * @description - * Get the number of milliseconds between the given dates. - * - * @param {Date|String|Number} dateLeft - the later date - * @param {Date|String|Number} dateRight - the earlier date - * @returns {Number} the number of milliseconds - * - * @example - * // How many milliseconds are between - * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700? - * var result = differenceInMilliseconds( - * new Date(2014, 6, 2, 12, 30, 21, 700), - * new Date(2014, 6, 2, 12, 30, 20, 600) - * ) - * //=> 1100 - */ -function differenceInMilliseconds (dirtyDateLeft, dirtyDateRight) { - var dateLeft = parse_1(dirtyDateLeft); - var dateRight = parse_1(dirtyDateRight); - return dateLeft.getTime() - dateRight.getTime() -} - -var difference_in_milliseconds = differenceInMilliseconds;/** - * @category Second Helpers - * @summary Get the number of seconds between the given dates. - * - * @description - * Get the number of seconds between the given dates. - * - * @param {Date|String|Number} dateLeft - the later date - * @param {Date|String|Number} dateRight - the earlier date - * @returns {Number} the number of seconds - * - * @example - * // How many seconds are between - * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000? - * var result = differenceInSeconds( - * new Date(2014, 6, 2, 12, 30, 20, 0), - * new Date(2014, 6, 2, 12, 30, 7, 999) - * ) - * //=> 12 - */ -function differenceInSeconds (dirtyDateLeft, dirtyDateRight) { - var diff = difference_in_milliseconds(dirtyDateLeft, dirtyDateRight) / 1000; - return diff > 0 ? Math.floor(diff) : Math.ceil(diff) -} - -var difference_in_seconds = differenceInSeconds;/** - * @category Month Helpers - * @summary Get the number of calendar months between the given dates. - * - * @description - * Get the number of calendar months between the given dates. - * - * @param {Date|String|Number} dateLeft - the later date - * @param {Date|String|Number} dateRight - the earlier date - * @returns {Number} the number of calendar months - * - * @example - * // How many calendar months are between 31 January 2014 and 1 September 2014? - * var result = differenceInCalendarMonths( - * new Date(2014, 8, 1), - * new Date(2014, 0, 31) - * ) - * //=> 8 - */ -function differenceInCalendarMonths (dirtyDateLeft, dirtyDateRight) { - var dateLeft = parse_1(dirtyDateLeft); - var dateRight = parse_1(dirtyDateRight); - - var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear(); - var monthDiff = dateLeft.getMonth() - dateRight.getMonth(); - - return yearDiff * 12 + monthDiff -} - -var difference_in_calendar_months = differenceInCalendarMonths;/** +function cleanEscapedString(input) { + return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'"); +}/** + * @name compareAsc * @category Common Helpers * @summary Compare the two dates and return -1, 0 or 1. * @@ -1333,16 +2642,18 @@ var difference_in_calendar_months = differenceInCalendarMonths;/** * Compare the two dates and return 1 if the first date is after the second, * -1 if the first date is before the second or 0 if dates are equal. * - * @param {Date|String|Number} dateLeft - the first date to compare - * @param {Date|String|Number} dateRight - the second date to compare + * ### v2.0.0 breaking changes: + * + * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes). + * + * @param {Date|Number} dateLeft - the first date to compare + * @param {Date|Number} dateRight - the second date to compare * @returns {Number} the result of the comparison + * @throws {TypeError} 2 arguments required * * @example * // Compare 11 February 1987 and 10 July 1989: - * var result = compareAsc( - * new Date(1987, 1, 11), - * new Date(1989, 6, 10) - * ) + * var result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10)) * //=> -1 * * @example @@ -1358,60 +2669,174 @@ var difference_in_calendar_months = differenceInCalendarMonths;/** * // Sun Jul 02 1995 00:00:00 * // ] */ -function compareAsc (dirtyDateLeft, dirtyDateRight) { - var dateLeft = parse_1(dirtyDateLeft); - var timeLeft = dateLeft.getTime(); - var dateRight = parse_1(dirtyDateRight); - var timeRight = dateRight.getTime(); - if (timeLeft < timeRight) { - return -1 - } else if (timeLeft > timeRight) { - return 1 +function compareAsc(dirtyDateLeft, dirtyDateRight) { + requiredArgs(2, arguments); + var dateLeft = toDate(dirtyDateLeft); + var dateRight = toDate(dirtyDateRight); + var diff = dateLeft.getTime() - dateRight.getTime(); + + if (diff < 0) { + return -1; + } else if (diff > 0) { + return 1; // Return 0 if diff is 0; return NaN if diff is NaN } else { - return 0 + return diff; } -} +}/** + * @name differenceInCalendarMonths + * @category Month Helpers + * @summary Get the number of calendar months between the given dates. + * + * @description + * Get the number of calendar months between the given dates. + * + * ### v2.0.0 breaking changes: + * + * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes). + * + * @param {Date|Number} dateLeft - the later date + * @param {Date|Number} dateRight - the earlier date + * @returns {Number} the number of calendar months + * @throws {TypeError} 2 arguments required + * + * @example + * // How many calendar months are between 31 January 2014 and 1 September 2014? + * var result = differenceInCalendarMonths( + * new Date(2014, 8, 1), + * new Date(2014, 0, 31) + * ) + * //=> 8 + */ -var compare_asc = compareAsc;/** +function differenceInCalendarMonths(dirtyDateLeft, dirtyDateRight) { + requiredArgs(2, arguments); + var dateLeft = toDate(dirtyDateLeft); + var dateRight = toDate(dirtyDateRight); + var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear(); + var monthDiff = dateLeft.getMonth() - dateRight.getMonth(); + return yearDiff * 12 + monthDiff; +}/** + * @name differenceInMonths * @category Month Helpers * @summary Get the number of full months between the given dates. * * @description * Get the number of full months between the given dates. * - * @param {Date|String|Number} dateLeft - the later date - * @param {Date|String|Number} dateRight - the earlier date + * ### v2.0.0 breaking changes: + * + * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes). + * + * @param {Date|Number} dateLeft - the later date + * @param {Date|Number} dateRight - the earlier date * @returns {Number} the number of full months + * @throws {TypeError} 2 arguments required * * @example * // How many full months are between 31 January 2014 and 1 September 2014? - * var result = differenceInMonths( - * new Date(2014, 8, 1), - * new Date(2014, 0, 31) - * ) + * var result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31)) * //=> 7 */ -function differenceInMonths (dirtyDateLeft, dirtyDateRight) { - var dateLeft = parse_1(dirtyDateLeft); - var dateRight = parse_1(dirtyDateRight); - var sign = compare_asc(dateLeft, dateRight); - var difference = Math.abs(difference_in_calendar_months(dateLeft, dateRight)); - dateLeft.setMonth(dateLeft.getMonth() - sign * difference); - - // Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full +function differenceInMonths(dirtyDateLeft, dirtyDateRight) { + requiredArgs(2, arguments); + var dateLeft = toDate(dirtyDateLeft); + var dateRight = toDate(dirtyDateRight); + var sign = compareAsc(dateLeft, dateRight); + var difference = Math.abs(differenceInCalendarMonths(dateLeft, dateRight)); + dateLeft.setMonth(dateLeft.getMonth() - sign * difference); // Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full // If so, result must be decreased by 1 in absolute value - var isLastMonthNotFull = compare_asc(dateLeft, dateRight) === -sign; - return sign * (difference - isLastMonthNotFull) -} -var difference_in_months = differenceInMonths;var MINUTES_IN_DAY = 1440; + var isLastMonthNotFull = compareAsc(dateLeft, dateRight) === -sign; + var result = sign * (difference - isLastMonthNotFull); // Prevent negative zero + + return result === 0 ? 0 : result; +}/** + * @name differenceInMilliseconds + * @category Millisecond Helpers + * @summary Get the number of milliseconds between the given dates. + * + * @description + * Get the number of milliseconds between the given dates. + * + * ### v2.0.0 breaking changes: + * + * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes). + * + * @param {Date|Number} dateLeft - the later date + * @param {Date|Number} dateRight - the earlier date + * @returns {Number} the number of milliseconds + * @throws {TypeError} 2 arguments required + * + * @example + * // How many milliseconds are between + * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700? + * var result = differenceInMilliseconds( + * new Date(2014, 6, 2, 12, 30, 21, 700), + * new Date(2014, 6, 2, 12, 30, 20, 600) + * ) + * //=> 1100 + */ + +function differenceInMilliseconds(dirtyDateLeft, dirtyDateRight) { + requiredArgs(2, arguments); + var dateLeft = toDate(dirtyDateLeft); + var dateRight = toDate(dirtyDateRight); + return dateLeft.getTime() - dateRight.getTime(); +}/** + * @name differenceInSeconds + * @category Second Helpers + * @summary Get the number of seconds between the given dates. + * + * @description + * Get the number of seconds between the given dates. + * + * ### v2.0.0 breaking changes: + * + * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes). + * + * @param {Date|Number} dateLeft - the later date + * @param {Date|Number} dateRight - the earlier date + * @returns {Number} the number of seconds + * @throws {TypeError} 2 arguments required + * + * @example + * // How many seconds are between + * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000? + * var result = differenceInSeconds( + * new Date(2014, 6, 2, 12, 30, 20, 0), + * new Date(2014, 6, 2, 12, 30, 7, 999) + * ) + * //=> 12 + */ + +function differenceInSeconds(dirtyDateLeft, dirtyDateRight) { + requiredArgs(2, arguments); + var diff = differenceInMilliseconds(dirtyDateLeft, dirtyDateRight) / 1000; + return diff > 0 ? Math.floor(diff) : Math.ceil(diff); +}function assign(target, dirtyObject) { + if (target == null) { + throw new TypeError('assign requires that input parameter not be null or undefined'); + } + + dirtyObject = dirtyObject || {}; + + for (var property in dirtyObject) { + if (dirtyObject.hasOwnProperty(property)) { + target[property] = dirtyObject[property]; + } + } + + return target; +}function cloneObject(dirtyObject) { + return assign({}, dirtyObject); +}var MINUTES_IN_DAY = 1440; var MINUTES_IN_ALMOST_TWO_DAYS = 2520; var MINUTES_IN_MONTH = 43200; var MINUTES_IN_TWO_MONTHS = 86400; - /** + * @name formatDistance * @category Common Helpers * @summary Return the distance between the given dates in words. * @@ -1447,164 +2872,174 @@ var MINUTES_IN_TWO_MONTHS = 86400; * | 40 secs ... 60 secs | less than a minute | * | 60 secs ... 90 secs | 1 minute | * - * @param {Date|String|Number} dateToCompare - the date to compare with - * @param {Date|String|Number} date - the other date - * @param {Object} [options] - the object with options + * ### v2.0.0 breaking changes: + * + * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes). + * + * - The function was renamed from `distanceInWords ` to `formatDistance` + * to make its name consistent with `format` and `formatRelative`. + * + * - The order of arguments is swapped to make the function + * consistent with `differenceIn...` functions. + * + * ```javascript + * // Before v2.0.0 + * + * distanceInWords( + * new Date(1986, 3, 4, 10, 32, 0), + * new Date(1986, 3, 4, 11, 32, 0), + * { addSuffix: true } + * ) //=> 'in about 1 hour' + * + * // v2.0.0 onward + * + * formatDistance( + * new Date(1986, 3, 4, 11, 32, 0), + * new Date(1986, 3, 4, 10, 32, 0), + * { addSuffix: true } + * ) //=> 'in about 1 hour' + * ``` + * + * @param {Date|Number} date - the date + * @param {Date|Number} baseDate - the date to compare with + * @param {Object} [options] - an object with options. * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed * @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first - * @param {Object} [options.locale=enLocale] - the locale object + * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} * @returns {String} the distance in words + * @throws {TypeError} 2 arguments required + * @throws {RangeError} `date` must not be Invalid Date + * @throws {RangeError} `baseDate` must not be Invalid Date + * @throws {RangeError} `options.locale` must contain `formatDistance` property * * @example * // What is the distance between 2 July 2014 and 1 January 2015? - * var result = distanceInWords( - * new Date(2014, 6, 2), - * new Date(2015, 0, 1) - * ) + * var result = formatDistance(new Date(2014, 6, 2), new Date(2015, 0, 1)) * //=> '6 months' * * @example * // What is the distance between 1 January 2015 00:00:15 * // and 1 January 2015 00:00:00, including seconds? - * var result = distanceInWords( + * var result = formatDistance( * new Date(2015, 0, 1, 0, 0, 15), * new Date(2015, 0, 1, 0, 0, 0), - * {includeSeconds: true} + * { includeSeconds: true } * ) * //=> 'less than 20 seconds' * * @example * // What is the distance from 1 January 2016 * // to 1 January 2015, with a suffix? - * var result = distanceInWords( - * new Date(2016, 0, 1), - * new Date(2015, 0, 1), - * {addSuffix: true} - * ) + * var result = formatDistance(new Date(2015, 0, 1), new Date(2016, 0, 1), { + * addSuffix: true + * }) * //=> 'about 1 year ago' * * @example * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto? - * var eoLocale = require('date-fns/locale/eo') - * var result = distanceInWords( - * new Date(2016, 7, 1), - * new Date(2015, 0, 1), - * {locale: eoLocale} - * ) + * import { eoLocale } from 'date-fns/locale/eo' + * var result = formatDistance(new Date(2016, 7, 1), new Date(2015, 0, 1), { + * locale: eoLocale + * }) * //=> 'pli ol 1 jaro' */ -function distanceInWords (dirtyDateToCompare, dirtyDate, dirtyOptions) { + +function formatDistance$2(dirtyDate, dirtyBaseDate, dirtyOptions) { + requiredArgs(2, arguments); var options = dirtyOptions || {}; + var locale = options.locale || locale$1; - var comparison = compare_desc(dirtyDateToCompare, dirtyDate); - - var locale = options.locale; - var localize = en.distanceInWords.localize; - if (locale && locale.distanceInWords && locale.distanceInWords.localize) { - localize = locale.distanceInWords.localize; + if (!locale.formatDistance) { + throw new RangeError('locale must contain formatDistance property'); } - var localizeOptions = { - addSuffix: Boolean(options.addSuffix), - comparison: comparison - }; + var comparison = compareAsc(dirtyDate, dirtyBaseDate); + + if (isNaN(comparison)) { + throw new RangeError('Invalid time value'); + } + + var localizeOptions = cloneObject(options); + localizeOptions.addSuffix = Boolean(options.addSuffix); + localizeOptions.comparison = comparison; + var dateLeft; + var dateRight; - var dateLeft, dateRight; if (comparison > 0) { - dateLeft = parse_1(dirtyDateToCompare); - dateRight = parse_1(dirtyDate); + dateLeft = toDate(dirtyBaseDate); + dateRight = toDate(dirtyDate); } else { - dateLeft = parse_1(dirtyDate); - dateRight = parse_1(dirtyDateToCompare); + dateLeft = toDate(dirtyDate); + dateRight = toDate(dirtyBaseDate); } - var seconds = difference_in_seconds(dateRight, dateLeft); - var offset = dateRight.getTimezoneOffset() - dateLeft.getTimezoneOffset(); - var minutes = Math.round(seconds / 60) - offset; - var months; + var seconds = differenceInSeconds(dateRight, dateLeft); + var offsetInSeconds = (getTimezoneOffsetInMilliseconds(dateRight) - getTimezoneOffsetInMilliseconds(dateLeft)) / 1000; + var minutes = Math.round((seconds - offsetInSeconds) / 60); + var months; // 0 up to 2 mins - // 0 up to 2 mins if (minutes < 2) { if (options.includeSeconds) { if (seconds < 5) { - return localize('lessThanXSeconds', 5, localizeOptions) + return locale.formatDistance('lessThanXSeconds', 5, localizeOptions); } else if (seconds < 10) { - return localize('lessThanXSeconds', 10, localizeOptions) + return locale.formatDistance('lessThanXSeconds', 10, localizeOptions); } else if (seconds < 20) { - return localize('lessThanXSeconds', 20, localizeOptions) + return locale.formatDistance('lessThanXSeconds', 20, localizeOptions); } else if (seconds < 40) { - return localize('halfAMinute', null, localizeOptions) + return locale.formatDistance('halfAMinute', null, localizeOptions); } else if (seconds < 60) { - return localize('lessThanXMinutes', 1, localizeOptions) + return locale.formatDistance('lessThanXMinutes', 1, localizeOptions); } else { - return localize('xMinutes', 1, localizeOptions) + return locale.formatDistance('xMinutes', 1, localizeOptions); } } else { if (minutes === 0) { - return localize('lessThanXMinutes', 1, localizeOptions) + return locale.formatDistance('lessThanXMinutes', 1, localizeOptions); } else { - return localize('xMinutes', minutes, localizeOptions) + return locale.formatDistance('xMinutes', minutes, localizeOptions); } - } + } // 2 mins up to 0.75 hrs - // 2 mins up to 0.75 hrs } else if (minutes < 45) { - return localize('xMinutes', minutes, localizeOptions) - - // 0.75 hrs up to 1.5 hrs + return locale.formatDistance('xMinutes', minutes, localizeOptions); // 0.75 hrs up to 1.5 hrs } else if (minutes < 90) { - return localize('aboutXHours', 1, localizeOptions) - - // 1.5 hrs up to 24 hrs + return locale.formatDistance('aboutXHours', 1, localizeOptions); // 1.5 hrs up to 24 hrs } else if (minutes < MINUTES_IN_DAY) { var hours = Math.round(minutes / 60); - return localize('aboutXHours', hours, localizeOptions) - - // 1 day up to 1.75 days + return locale.formatDistance('aboutXHours', hours, localizeOptions); // 1 day up to 1.75 days } else if (minutes < MINUTES_IN_ALMOST_TWO_DAYS) { - return localize('xDays', 1, localizeOptions) - - // 1.75 days up to 30 days + return locale.formatDistance('xDays', 1, localizeOptions); // 1.75 days up to 30 days } else if (minutes < MINUTES_IN_MONTH) { var days = Math.round(minutes / MINUTES_IN_DAY); - return localize('xDays', days, localizeOptions) - - // 1 month up to 2 months + return locale.formatDistance('xDays', days, localizeOptions); // 1 month up to 2 months } else if (minutes < MINUTES_IN_TWO_MONTHS) { months = Math.round(minutes / MINUTES_IN_MONTH); - return localize('aboutXMonths', months, localizeOptions) + return locale.formatDistance('aboutXMonths', months, localizeOptions); } - months = difference_in_months(dateRight, dateLeft); + months = differenceInMonths(dateRight, dateLeft); // 2 months up to 12 months - // 2 months up to 12 months if (months < 12) { var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH); - return localize('xMonths', nearestMonth, localizeOptions) - - // 1 year up to max Date + return locale.formatDistance('xMonths', nearestMonth, localizeOptions); // 1 year up to max Date } else { var monthsSinceStartOfYear = months % 12; - var years = Math.floor(months / 12); + var years = Math.floor(months / 12); // N years up to 1 years 3 months - // N years up to 1 years 3 months if (monthsSinceStartOfYear < 3) { - return localize('aboutXYears', years, localizeOptions) - - // N years 3 months up to N years 9 months + return locale.formatDistance('aboutXYears', years, localizeOptions); // N years 3 months up to N years 9 months } else if (monthsSinceStartOfYear < 9) { - return localize('overXYears', years, localizeOptions) - - // N years 9 months up to N year 12 months + return locale.formatDistance('overXYears', years, localizeOptions); // N years 9 months up to N year 12 months } else { - return localize('almostXYears', years + 1, localizeOptions) + return locale.formatDistance('almostXYears', years + 1, localizeOptions); } } -} - -var distance_in_words = distanceInWords;/** +}/** + * @name formatDistanceToNow * @category Common Helpers * @summary Return the distance between the given date and now in words. + * @pure false * * @description * Return the distance between the given date and now in words. @@ -1638,16 +3073,41 @@ var distance_in_words = distanceInWords;/** * | 40 secs ... 60 secs | less than a minute | * | 60 secs ... 90 secs | 1 minute | * - * @param {Date|String|Number} date - the given date + * > ⚠️ Please note that this function is not present in the FP submodule as + * > it uses `Date.now()` internally hence impure and can't be safely curried. + * + * ### v2.0.0 breaking changes: + * + * - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes). + * + * - The function was renamed from `distanceInWordsToNow ` to `formatDistanceToNow` + * to make its name consistent with `format` and `formatRelative`. + * + * ```javascript + * // Before v2.0.0 + * + * distanceInWordsToNow(new Date(2014, 6, 2), { addSuffix: true }) + * //=> 'in 6 months' + * + * // v2.0.0 onward + * + * formatDistanceToNow(new Date(2014, 6, 2), { addSuffix: true }) + * //=> 'in 6 months' + * ``` + * + * @param {Date|Number} date - the given date * @param {Object} [options] - the object with options * @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed - * @param {Boolean} [options.addSuffix=false] - result specifies if the second date is earlier or later than the first - * @param {Object} [options.locale=enLocale] - the locale object + * @param {Boolean} [options.addSuffix=false] - result specifies if now is earlier or later than the passed date + * @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale} * @returns {String} the distance in words + * @throws {TypeError} 1 argument required + * @throws {RangeError} `date` must not be Invalid Date + * @throws {RangeError} `options.locale` must contain `formatDistance` property * * @example * // If today is 1 January 2015, what is the distance to 2 July 2014? - * var result = distanceInWordsToNow( + * var result = formatDistanceToNow( * new Date(2014, 6, 2) * ) * //=> '6 months' @@ -1655,7 +3115,7 @@ var distance_in_words = distanceInWords;/** * @example * // If now is 1 January 2015 00:00:00, * // what is the distance to 1 January 2015 00:00:15, including seconds? - * var result = distanceInWordsToNow( + * var result = formatDistanceToNow( * new Date(2015, 0, 1, 0, 0, 15), * {includeSeconds: true} * ) @@ -1664,7 +3124,7 @@ var distance_in_words = distanceInWords;/** * @example * // If today is 1 January 2015, * // what is the distance to 1 January 2016, with a suffix? - * var result = distanceInWordsToNow( + * var result = formatDistanceToNow( * new Date(2016, 0, 1), * {addSuffix: true} * ) @@ -1674,17 +3134,17 @@ var distance_in_words = distanceInWords;/** * // If today is 1 January 2015, * // what is the distance to 1 August 2016 in Esperanto? * var eoLocale = require('date-fns/locale/eo') - * var result = distanceInWordsToNow( + * var result = formatDistanceToNow( * new Date(2016, 7, 1), * {locale: eoLocale} * ) * //=> 'pli ol 1 jaro' */ -function distanceInWordsToNow (dirtyDate, dirtyOptions) { - return distance_in_words(Date.now(), dirtyDate, dirtyOptions) -} -var distance_in_words_to_now = distanceInWordsToNow;if (typeof self !== "undefined") { +function formatDistanceToNow(dirtyDate, dirtyOptions) { + requiredArgs(1, arguments); + return formatDistance$2(dirtyDate, Date.now(), dirtyOptions); +}if (typeof self !== "undefined") { init(self); } else if (typeof global$1 !== "undefined") { init(global$1); @@ -1696,7 +3156,14 @@ var distance_in_words_to_now = distanceInWordsToNow;if (typeof self !== "undefin function init(g) { g.dateFns = { - format: format_1, - distanceInWordsToNow: distance_in_words_to_now + locales: { + "default": locale$1, + "en": locale$1, + "en_US": locale$1, + "fr": locale, + "fr_FR": locale + }, + format, + formatDistanceToNow }; }}()); \ No newline at end of file diff --git a/frontend/vendor/datefns/datefns.bundle.min.js b/frontend/vendor/datefns/datefns.bundle.min.js index 57528cd85..cfd4b960f 100644 --- a/frontend/vendor/datefns/datefns.bundle.min.js +++ b/frontend/vendor/datefns/datefns.bundle.min.js @@ -1 +1 @@ -!function(){"use strict";var e="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t=function(e){var t=new Date(e.getTime()),n=t.getTimezoneOffset();return t.setSeconds(0,0),6e4*n+t.getTime()%6e4};var n=function(e){return e instanceof Date},r=36e5,a=6e4,o=2,u=/[T ]/,i=/:/,s=/^(\d{2})$/,f=[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],c=/^(\d{4})/,l=[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],d=/^-(\d{2})$/,g=/^-?(\d{3})$/,h=/^-?(\d{2})-?(\d{2})$/,v=/^-?W(\d{2})$/,m=/^-?W(\d{2})-?(\d{1})$/,D=/^(\d{2}([.,]\d*)?)$/,M=/^(\d{2}):?(\d{2}([.,]\d*)?)$/,T=/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,p=/([Z+-].*)$/,y=/^(Z)$/,S=/^([+-])(\d{2})$/,x=/^([+-])(\d{2}):?(\d{2})$/;function Y(e,t,n){t=t||0,n=n||0;var r=new Date(0);r.setUTCFullYear(e,0,4);var a=7*t+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+a),r}var w=function(e,w){if(n(e))return new Date(e.getTime());if("string"!=typeof e)return new Date(e);var b=(w||{}).additionalDigits;b=null==b?o:Number(b);var F=function(e){var t,n={},r=e.split(u);i.test(r[0])?(n.date=null,t=r[0]):(n.date=r[0],t=r[1]);if(t){var a=p.exec(t);a?(n.time=t.replace(a[1],""),n.timezone=a[1]):n.time=t}return n}(e),H=function(e,t){var n,r=f[t],a=l[t];if(n=c.exec(e)||a.exec(e)){var o=n[1];return{year:parseInt(o,10),restDateString:e.slice(o.length)}}if(n=s.exec(e)||r.exec(e)){var u=n[1];return{year:100*parseInt(u,10),restDateString:e.slice(u.length)}}return{year:null}}(F.date,b),I=H.year,X=function(e,t){if(null===t)return null;var n,r,a,o;if(0===e.length)return(r=new Date(0)).setUTCFullYear(t),r;if(n=d.exec(e))return r=new Date(0),a=parseInt(n[1],10)-1,r.setUTCFullYear(t,a),r;if(n=g.exec(e)){r=new Date(0);var u=parseInt(n[1],10);return r.setUTCFullYear(t,0,u),r}if(n=h.exec(e)){r=new Date(0),a=parseInt(n[1],10)-1;var i=parseInt(n[2],10);return r.setUTCFullYear(t,a,i),r}if(n=v.exec(e))return o=parseInt(n[1],10)-1,Y(t,o);if(n=m.exec(e)){o=parseInt(n[1],10)-1;var s=parseInt(n[2],10)-1;return Y(t,o,s)}return null}(H.restDateString,I);if(X){var W,$=X.getTime(),z=0;if(F.time&&(z=function(e){var t,n,o;if(t=D.exec(e))return(n=parseFloat(t[1].replace(",",".")))%24*r;if(t=M.exec(e))return n=parseInt(t[1],10),o=parseFloat(t[2].replace(",",".")),n%24*r+o*a;if(t=T.exec(e)){n=parseInt(t[1],10),o=parseInt(t[2],10);var u=parseFloat(t[3].replace(",","."));return n%24*r+o*a+1e3*u}return null}(F.time)),F.timezone)W=function(e){var t,n;if(t=y.exec(e))return 0;if(t=S.exec(e))return n=60*parseInt(t[2],10),"+"===t[1]?-n:n;if(t=x.exec(e))return n=60*parseInt(t[2],10)+parseInt(t[3],10),"+"===t[1]?-n:n;return 0}(F.timezone)*a;else{var G=$+z,O=new Date(G);W=t(O);var E=new Date(G);E.setDate(O.getDate()+1);var Z=t(E)-t(O);Z>0&&(W+=Z)}return new Date($+z+W)}return new Date(e)};var b=function(e){var t=w(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n};var F=function(e){var t=w(e);return t.setHours(0,0,0,0),t},H=6e4,I=864e5;var X=function(e,t){var n=F(e),r=F(t),a=n.getTime()-n.getTimezoneOffset()*H,o=r.getTime()-r.getTimezoneOffset()*H;return Math.round((a-o)/I)};var W=function(e){var t=w(e);return X(t,b(t))+1};var $=function(e,t){var n=t&&Number(t.weekStartsOn)||0,r=w(e),a=r.getDay(),o=(a=a.getTime()?n+1:t.getTime()>=u.getTime()?n:n-1};var O=function(e){var t=G(e),n=new Date(0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),z(n)},E=6048e5;var Z=function(e){var t=w(e),n=z(t).getTime()-O(t).getTime();return Math.round(n/E)+1};var A=function(e){if(n(e))return!isNaN(e);throw new TypeError(toString.call(e)+" is not an instance of Date")};var C=["M","MM","Q","D","DD","DDD","DDDD","d","E","W","WW","YY","YYYY","GG","GGGG","H","HH","h","hh","m","mm","s","ss","S","SS","SSS","Z","ZZ","X","x"];var U=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);var r=C.concat(t).sort().reverse();return new RegExp("(\\[[^\\[]*\\])|(\\\\)?("+r.join("|")+"|.)","g")};var N=function(){var e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],t=["January","February","March","April","May","June","July","August","September","October","November","December"],n=["Su","Mo","Tu","We","Th","Fr","Sa"],r=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],a=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],o=["AM","PM"],u=["am","pm"],i=["a.m.","p.m."],s={MMM:function(t){return e[t.getMonth()]},MMMM:function(e){return t[e.getMonth()]},dd:function(e){return n[e.getDay()]},ddd:function(e){return r[e.getDay()]},dddd:function(e){return a[e.getDay()]},A:function(e){return e.getHours()/12>=1?o[1]:o[0]},a:function(e){return e.getHours()/12>=1?u[1]:u[0]},aa:function(e){return e.getHours()/12>=1?i[1]:i[0]}};return["M","D","DDD","d","Q","W"].forEach((function(e){s[e+"o"]=function(t,n){return function(e){var t=e%100;if(t>20||t<10)switch(t%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"}(n[e](t))}})),{formatters:s,formattingTokensRegExp:U(s)}},k={distanceInWords:function(){var e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};return{localize:function(t,n,r){var a;return r=r||{},a="string"==typeof e[t]?e[t]:1===n?e[t].one:e[t].other.replace("{{count}}",n),r.addSuffix?r.comparison>0?"in "+a:a+" ago":a}}}(),format:N()};var J={M:function(e){return e.getMonth()+1},MM:function(e){return P(e.getMonth()+1,2)},Q:function(e){return Math.ceil((e.getMonth()+1)/3)},D:function(e){return e.getDate()},DD:function(e){return P(e.getDate(),2)},DDD:function(e){return W(e)},DDDD:function(e){return P(W(e),3)},d:function(e){return e.getDay()},E:function(e){return e.getDay()||7},W:function(e){return Z(e)},WW:function(e){return P(Z(e),2)},YY:function(e){return P(e.getFullYear(),4).substr(2)},YYYY:function(e){return P(e.getFullYear(),4)},GG:function(e){return String(G(e)).substr(2)},GGGG:function(e){return G(e)},H:function(e){return e.getHours()},HH:function(e){return P(e.getHours(),2)},h:function(e){var t=e.getHours();return 0===t?12:t>12?t%12:t},hh:function(e){return P(J.h(e),2)},m:function(e){return e.getMinutes()},mm:function(e){return P(e.getMinutes(),2)},s:function(e){return e.getSeconds()},ss:function(e){return P(e.getSeconds(),2)},S:function(e){return Math.floor(e.getMilliseconds()/100)},SS:function(e){return P(Math.floor(e.getMilliseconds()/10),2)},SSS:function(e){return P(e.getMilliseconds(),3)},Z:function(e){return Q(e.getTimezoneOffset(),":")},ZZ:function(e){return Q(e.getTimezoneOffset())},X:function(e){return Math.floor(e.getTime()/1e3)},x:function(e){return e.getTime()}};function R(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|]$/g,""):e.replace(/\\/g,"")}function Q(e,t){t=t||"";var n=e>0?"-":"+",r=Math.abs(e),a=r%60;return n+P(Math.floor(r/60),2)+t+P(a,2)}function P(e,t){for(var n=Math.abs(e).toString();n.lengthr?-1:n0?Math.floor(n):Math.ceil(n)};var L=function(e,t){var n=w(e),r=w(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())};var V=function(e,t){var n=w(e).getTime(),r=w(t).getTime();return nr?1:0};var _=function(e,t){var n=w(e),r=w(t),a=V(n,r),o=Math.abs(L(n,r));return n.setMonth(n.getMonth()-a*o),a*(o-(V(n,r)===-a))},ee=1440,te=2520,ne=43200,re=86400;var ae=function(e,t,n){var r=n||{},a=B(e,t),o=r.locale,u=k.distanceInWords.localize;o&&o.distanceInWords&&o.distanceInWords.localize&&(u=o.distanceInWords.localize);var i,s,f={addSuffix:Boolean(r.addSuffix),comparison:a};a>0?(i=w(e),s=w(t)):(i=w(t),s=w(e));var c,l=K(s,i),d=s.getTimezoneOffset()-i.getTimezoneOffset(),g=Math.round(l/60)-d;if(g<2)return r.includeSeconds?l<5?u("lessThanXSeconds",5,f):l<10?u("lessThanXSeconds",10,f):l<20?u("lessThanXSeconds",20,f):l<40?u("halfAMinute",null,f):u(l<60?"lessThanXMinutes":"xMinutes",1,f):0===g?u("lessThanXMinutes",1,f):u("xMinutes",g,f);if(g<45)return u("xMinutes",g,f);if(g<90)return u("aboutXHours",1,f);if(g0?"dans "+a:"il y a "+a:a},formatLong:r,formatRelative:function(e,t,n,r){return a[e]},localize:{ordinalNumber:function(e,t){var n=Number(e),r=String((t||{}).unit);return 0===n?n:n+("year"===r||"hour"===r||"week"===r?1===n?"ère":"ème":1===n?"er":"ème")},era:i({values:{narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},defaultWidth:"wide"}),quarter:i({values:{narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:i({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},defaultWidth:"wide"}),day:i({values:{narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},defaultWidth:"wide"}),dayPeriod:i({values:{narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},defaultWidth:"wide"})},match:{ordinalNumber:o({matchPattern:/^(\d+)(ième|ère|ème|er|e)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:u({matchPatterns:{narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^av/i,/^ap/i]},defaultParseWidth:"any"}),quarter:u({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^t[1234]/i,wide:/^[1234](er|ème|e)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:u({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:u({matchPatterns:{narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:u({matchPatterns:{narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},defaultParseWidth:"any"})},options:{weekStartsOn:1,firstWeekContainsDate:1}},d={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};var c={date:n({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:n({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:n({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},m={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};var l={code:"en-US",formatDistance:function(e,t,n){var r;return n=n||{},r="string"==typeof d[e]?d[e]:1===t?d[e].one:d[e].other.replace("{{count}}",t),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:c,formatRelative:function(e,t,n,r){return m[e]},localize:{ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:i({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:i({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:i({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:i({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:i({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:o({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:u({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:u({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:u({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:u({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:u({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function f(e,t){if(t.length1?"s":" required, but only "+t.length+" present")}function h(e){f(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"==typeof e&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}function g(e){f(1,arguments);var t=h(e);return!isNaN(t)}function w(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function v(e,t){f(2,arguments);var n=h(e).getTime(),r=w(t);return new Date(n+r)}function b(e,t){f(2,arguments);var n=w(t);return v(e,-n)}function y(e,t){for(var n=e<0?"-":"",r=Math.abs(e).toString();r.length0?n:1-n;return y("yy"===t?r%100:r,t.length)},M=function(e,t){var n=e.getUTCMonth();return"M"===t?String(n+1):y(n+1,2)},T=function(e,t){return y(e.getUTCDate(),t.length)},C=function(e,t){return y(e.getUTCHours()%12||12,t.length)},D=function(e,t){return y(e.getUTCHours(),t.length)},P=function(e,t){return y(e.getUTCMinutes(),t.length)},x=function(e,t){return y(e.getUTCSeconds(),t.length)},S=function(e,t){var n=t.length,r=e.getUTCMilliseconds();return y(Math.floor(r*Math.pow(10,n-3)),t.length)};function W(e){f(1,arguments);var t=1,n=h(e),r=n.getUTCDay(),a=(r=a.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function U(e){f(1,arguments);var t=k(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var r=W(n);return r}function j(e,t){f(1,arguments);var n=t||{},r=n.locale,a=r&&r.options&&r.options.weekStartsOn,i=null==a?0:w(a),o=null==n.weekStartsOn?i:w(n.weekStartsOn);if(!(o>=0&&o<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=h(e),s=u.getUTCDay(),d=(s=1&&s<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var d=new Date(0);d.setUTCFullYear(r+1,0,s),d.setUTCHours(0,0,0,0);var c=j(d,t),m=new Date(0);m.setUTCFullYear(r,0,s),m.setUTCHours(0,0,0,0);var l=j(m,t);return n.getTime()>=c.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function E(e,t){f(1,arguments);var n=t||{},r=n.locale,a=r&&r.options&&r.options.firstWeekContainsDate,i=null==a?1:w(a),o=null==n.firstWeekContainsDate?i:w(n.firstWeekContainsDate),u=Y(e,t),s=new Date(0);s.setUTCFullYear(u,0,o),s.setUTCHours(0,0,0,0);var d=j(s,t);return d}var N="midnight",O="noon",X="morning",q="afternoon",H="evening",z="night",J={G:function(e,t,n){var r=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){var r=e.getUTCFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return p(e,t)},Y:function(e,t,n,r){var a=Y(e,r),i=a>0?a:1-a;return"YY"===t?y(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):y(i,t.length)},R:function(e,t){return y(k(e),t.length)},u:function(e,t){return y(e.getUTCFullYear(),t.length)},Q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return y(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){var r=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return y(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){var r=e.getUTCMonth();switch(t){case"M":case"MM":return M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){var r=e.getUTCMonth();switch(t){case"L":return String(r+1);case"LL":return y(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){var a=function(e,t){f(1,arguments);var n=h(e),r=j(n,t).getTime()-E(n,t).getTime();return Math.round(r/6048e5)+1}(e,r);return"wo"===t?n.ordinalNumber(a,{unit:"week"}):y(a,t.length)},I:function(e,t,n){var r=function(e){f(1,arguments);var t=h(e),n=W(t).getTime()-U(t).getTime();return Math.round(n/6048e5)+1}(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):y(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):T(e,t)},D:function(e,t,n){var r=function(e){f(1,arguments);var t=h(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var r=t.getTime(),a=n-r;return Math.floor(a/864e5)+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):y(r,t.length)},E:function(e,t,n){var r=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){var a=e.getUTCDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return y(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){var a=e.getUTCDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return y(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){var r=e.getUTCDay(),a=0===r?7:r;switch(t){case"i":return String(a);case"ii":return y(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){var r,a=e.getUTCHours();switch(r=12===a?O:0===a?N:a/12>=1?"pm":"am",t){case"b":case"bb":case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){var r,a=e.getUTCHours();switch(r=a>=17?H:a>=12?q:a>=4?X:z,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){var r=e.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return C(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):D(e,t)},K:function(e,t,n){var r=e.getUTCHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):y(r,t.length)},k:function(e,t,n){var r=e.getUTCHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):y(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):P(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):x(e,t)},S:function(e,t){return S(e,t)},X:function(e,t,n,r){var a=(r._originalDate||e).getTimezoneOffset();if(0===a)return"Z";switch(t){case"X":return L(a);case"XXXX":case"XX":return A(a);case"XXXXX":case"XXX":default:return A(a,":")}},x:function(e,t,n,r){var a=(r._originalDate||e).getTimezoneOffset();switch(t){case"x":return L(a);case"xxxx":case"xx":return A(a);case"xxxxx":case"xxx":default:return A(a,":")}},O:function(e,t,n,r){var a=(r._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+F(a,":");case"OOOO":default:return"GMT"+A(a,":")}},z:function(e,t,n,r){var a=(r._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+F(a,":");case"zzzz":default:return"GMT"+A(a,":")}},t:function(e,t,n,r){var a=r._originalDate||e;return y(Math.floor(a.getTime()/1e3),t.length)},T:function(e,t,n,r){return y((r._originalDate||e).getTime(),t.length)}};function F(e,t){var n=e>0?"-":"+",r=Math.abs(e),a=Math.floor(r/60),i=r%60;if(0===i)return n+String(a);var o=t||"";return n+String(a)+o+y(i,2)}function L(e,t){return e%60==0?(e>0?"-":"+")+y(Math.abs(e)/60,2):A(e,t)}function A(e,t){var n=t||"",r=e>0?"-":"+",a=Math.abs(e);return r+y(Math.floor(a/60),2)+n+y(a%60,2)}function Q(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}}function B(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}}var G={p:B,P:function(e,t){var n,r=e.match(/(P+)(p+)?/),a=r[1],i=r[2];if(!i)return Q(e,t);switch(a){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;case"PPPP":default:n=t.dateTime({width:"full"})}return n.replace("{{date}}",Q(a,t)).replace("{{time}}",B(i,t))}};function R(e){var t=new Date(e.getTime()),n=Math.ceil(t.getTimezoneOffset());return t.setSeconds(0,0),6e4*n+t.getTime()%6e4}var _=["D","DD"],I=["YY","YYYY"];function V(e){return-1!==_.indexOf(e)}function K(e){return-1!==I.indexOf(e)}function $(e){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` for formatting years; see: https://git.io/fxCyr");if("YY"===e)throw new RangeError("Use `yy` instead of `YY` for formatting years; see: https://git.io/fxCyr");if("D"===e)throw new RangeError("Use `d` instead of `D` for formatting days of the month; see: https://git.io/fxCyr");if("DD"===e)throw new RangeError("Use `dd` instead of `DD` for formatting days of the month; see: https://git.io/fxCyr")}var Z=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ee=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,te=/^'([^]*?)'?$/,ne=/''/g,re=/[a-zA-Z]/;function ae(e,t,n){f(2,arguments);var r=String(t),a=n||{},i=a.locale||l,o=i.options&&i.options.firstWeekContainsDate,u=null==o?1:w(o),s=null==a.firstWeekContainsDate?u:w(a.firstWeekContainsDate);if(!(s>=1&&s<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var d=i.options&&i.options.weekStartsOn,c=null==d?0:w(d),m=null==a.weekStartsOn?c:w(a.weekStartsOn);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!i.localize)throw new RangeError("locale must contain localize property");if(!i.formatLong)throw new RangeError("locale must contain formatLong property");var v=h(e);if(!g(v))throw new RangeError("Invalid time value");var y=R(v),p=b(v,y),M={firstWeekContainsDate:s,weekStartsOn:m,locale:i,_originalDate:v},T=r.match(ee).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,G[t])(e,i.formatLong,M):e})).join("").match(Z).map((function(e){if("''"===e)return"'";var t=e[0];if("'"===t)return ie(e);var n=J[t];if(n)return!a.useAdditionalWeekYearTokens&&K(e)&&$(e),!a.useAdditionalDayOfYearTokens&&V(e)&&$(e),n(p,e,i.localize,M);if(t.match(re))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return e})).join("");return T}function ie(e){return e.match(te)[1].replace(ne,"'")}function oe(e,t){f(2,arguments);var n=h(e),r=h(t),a=n.getTime()-r.getTime();return a<0?-1:a>0?1:a}function ue(e,t){f(2,arguments);var n=h(e),r=h(t),a=n.getFullYear()-r.getFullYear(),i=n.getMonth()-r.getMonth();return 12*a+i}function se(e,t){f(2,arguments);var n=h(e),r=h(t),a=oe(n,r),i=Math.abs(ue(n,r));n.setMonth(n.getMonth()-a*i);var o=oe(n,r)===-a,u=a*(i-o);return 0===u?0:u}function de(e,t){f(2,arguments);var n=h(e),r=h(t);return n.getTime()-r.getTime()}function ce(e,t){f(2,arguments);var n=de(e,t)/1e3;return n>0?Math.floor(n):Math.ceil(n)}function me(e){return function(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t=t||{})t.hasOwnProperty(n)&&(e[n]=t[n]);return e}({},e)}function le(e,t,n){f(2,arguments);var r=n||{},a=r.locale||l;if(!a.formatDistance)throw new RangeError("locale must contain formatDistance property");var i=oe(e,t);if(isNaN(i))throw new RangeError("Invalid time value");var o,u,s=me(r);s.addSuffix=Boolean(r.addSuffix),s.comparison=i,i>0?(o=h(t),u=h(e)):(o=h(e),u=h(t));var d,c=ce(u,o),m=(R(u)-R(o))/1e3,g=Math.round((c-m)/60);if(g<2)return r.includeSeconds?c<5?a.formatDistance("lessThanXSeconds",5,s):c<10?a.formatDistance("lessThanXSeconds",10,s):c<20?a.formatDistance("lessThanXSeconds",20,s):c<40?a.formatDistance("halfAMinute",null,s):c<60?a.formatDistance("lessThanXMinutes",1,s):a.formatDistance("xMinutes",1,s):0===g?a.formatDistance("lessThanXMinutes",1,s):a.formatDistance("xMinutes",g,s);if(g<45)return a.formatDistance("xMinutes",g,s);if(g<90)return a.formatDistance("aboutXHours",1,s);if(g<1440){var w=Math.round(g/60);return a.formatDistance("aboutXHours",w,s)}if(g<2520)return a.formatDistance("xDays",1,s);if(g<43200){var v=Math.round(g/1440);return a.formatDistance("xDays",v,s)}if(g<86400)return d=Math.round(g/43200),a.formatDistance("aboutXMonths",d,s);if((d=se(u,o))<12){var b=Math.round(g/43200);return a.formatDistance("xMonths",b,s)}var y=d%12,p=Math.floor(d/12);return y<3?a.formatDistance("aboutXYears",p,s):y<9?a.formatDistance("overXYears",p,s):a.formatDistance("almostXYears",p+1,s)}function fe(e,t){return f(1,arguments),le(e,Date.now(),t)}if("undefined"!=typeof self)he(self);else if(void 0!==e)he(e);else{if("undefined"==typeof window)throw new Error("unsupported execution environment");he(window)}function he(e){e.dateFns={locales:{default:l,en:l,en_US:l,fr:s,fr_FR:s},format:ae,formatDistanceToNow:fe}}}(); \ No newline at end of file diff --git a/frontend/vendor/datefns/datefns.js b/frontend/vendor/datefns/datefns.js index bde67b700..8aea5cf33 100644 --- a/frontend/vendor/datefns/datefns.js +++ b/frontend/vendor/datefns/datefns.js @@ -1,5 +1,8 @@ +import fr_FR from "date-fns/locale/fr"; +import en_US from "date-fns/locale/en-US"; + import format from "date-fns/format"; -import distanceInWordsToNow from "date-fns/distance_in_words_to_now"; +import formatDistanceToNow from "date-fns/formatDistanceToNow"; if (typeof self !== "undefined") { init(self); } else if (typeof global !== "undefined") { init(global); } @@ -8,7 +11,14 @@ else { throw new Error("unsupported execution environment"); } function init(g) { g.dateFns = { + locales: { + "default": en_US, + "en": en_US, + "en_US": en_US, + "fr": fr_FR, + "fr_FR": fr_FR + }, format, - distanceInWordsToNow + formatDistanceToNow, }; } diff --git a/frontend/vendor/datefns/externs.js b/frontend/vendor/datefns/externs.js index 4ab3ab1b6..da8cffe24 100644 --- a/frontend/vendor/datefns/externs.js +++ b/frontend/vendor/datefns/externs.js @@ -1,155 +1,4 @@ var dateFns = {}; -dateFns.addDays = function() {}; -dateFns.addHours = function() {}; -dateFns.addISOYears = function() {}; -dateFns.addMilliseconds = function() {}; -dateFns.addMinutes = function() {}; -dateFns.addMonths = function() {}; -dateFns.addQuarters = function() {}; -dateFns.addSeconds = function() {}; -dateFns.addWeeks = function() {}; -dateFns.addYears = function() {}; -dateFns.areRangesOverlapping = function() {}; -dateFns.closestIndexTo = function() {}; -dateFns.closestTo = function() {}; -dateFns.compareAsc = function() {}; -dateFns.compareDesc = function() {}; -dateFns.differenceInCalendarDays = function() {}; -dateFns.differenceInCalendarISOWeeks = function() {}; -dateFns.differenceInCalendarISOYears = function() {}; -dateFns.differenceInCalendarMonths = function() {}; -dateFns.differenceInCalendarQuarters = function() {}; -dateFns.differenceInCalendarWeeks = function() {}; -dateFns.differenceInCalendarYears = function() {}; -dateFns.differenceInDays = function() {}; -dateFns.differenceInHours = function() {}; -dateFns.differenceInISOYears = function() {}; -dateFns.differenceInMilliseconds = function() {}; -dateFns.differenceInMinutes = function() {}; -dateFns.differenceInMonths = function() {}; -dateFns.differenceInQuarters = function() {}; -dateFns.differenceInSeconds = function() {}; -dateFns.differenceInWeeks = function() {}; -dateFns.differenceInYears = function() {}; -dateFns.distanceInWords = function() {}; -dateFns.distanceInWordsStrict = function() {}; -dateFns.distanceInWordsToNow = function() {}; -dateFns.eachDay = function() {}; -dateFns.endOfDay = function() {}; -dateFns.endOfHour = function() {}; -dateFns.endOfISOWeek = function() {}; -dateFns.endOfISOYear = function() {}; -dateFns.endOfMinute = function() {}; -dateFns.endOfMonth = function() {}; -dateFns.endOfQuarter = function() {}; -dateFns.endOfSecond = function() {}; -dateFns.endOfToday = function() {}; -dateFns.endOfTomorrow = function() {}; -dateFns.endOfWeek = function() {}; -dateFns.endOfYear = function() {}; -dateFns.endOfYesterday = function() {}; dateFns.format = function() {}; -dateFns.getDate = function() {}; -dateFns.getDay = function() {}; -dateFns.getDayOfYear = function() {}; -dateFns.getDaysInMonth = function() {}; -dateFns.getDaysInYear = function() {}; -dateFns.getHours = function() {}; -dateFns.getISODay = function() {}; -dateFns.getISOWeek = function() {}; -dateFns.getISOWeeksInYear = function() {}; -dateFns.getISOYear = function() {}; -dateFns.getMilliseconds = function() {}; -dateFns.getMinutes = function() {}; -dateFns.getMonth = function() {}; -dateFns.getOverlappingDaysInRanges = function() {}; -dateFns.getQuarter = function() {}; -dateFns.getSeconds = function() {}; -dateFns.getTime = function() {}; -dateFns.getYear = function() {}; -dateFns.isAfter = function() {}; -dateFns.isBefore = function() {}; -dateFns.isDate = function() {}; -dateFns.isEqual = function() {}; -dateFns.isFirstDayOfMonth = function() {}; -dateFns.isFriday = function() {}; -dateFns.isFuture = function() {}; -dateFns.isLastDayOfMonth = function() {}; -dateFns.isLeapYear = function() {}; -dateFns.isMonday = function() {}; -dateFns.isPast = function() {}; -dateFns.isSameDay = function() {}; -dateFns.isSameHour = function() {}; -dateFns.isSameISOWeek = function() {}; -dateFns.isSameISOYear = function() {}; -dateFns.isSameMinute = function() {}; -dateFns.isSameMonth = function() {}; -dateFns.isSameQuarter = function() {}; -dateFns.isSameSecond = function() {}; -dateFns.isSameWeek = function() {}; -dateFns.isSameYear = function() {}; -dateFns.isSaturday = function() {}; -dateFns.isSunday = function() {}; -dateFns.isThisHour = function() {}; -dateFns.isThisISOWeek = function() {}; -dateFns.isThisISOYear = function() {}; -dateFns.isThisMinute = function() {}; -dateFns.isThisMonth = function() {}; -dateFns.isThisQuarter = function() {}; -dateFns.isThisSecond = function() {}; -dateFns.isThisWeek = function() {}; -dateFns.isThisYear = function() {}; -dateFns.isThursday = function() {}; -dateFns.isToday = function() {}; -dateFns.isTomorrow = function() {}; -dateFns.isTuesday = function() {}; -dateFns.isValid = function() {}; -dateFns.isWednesday = function() {}; -dateFns.isWeekend = function() {}; -dateFns.isWithinRange = function() {}; -dateFns.isYesterday = function() {}; -dateFns.lastDayOfISOWeek = function() {}; -dateFns.lastDayOfISOYear = function() {}; -dateFns.lastDayOfMonth = function() {}; -dateFns.lastDayOfQuarter = function() {}; -dateFns.lastDayOfWeek = function() {}; -dateFns.lastDayOfYear = function() {}; -dateFns.max = function() {}; -dateFns.min = function() {}; -dateFns.parse = function() {}; -dateFns.setDate = function() {}; -dateFns.setDay = function() {}; -dateFns.setDayOfYear = function() {}; -dateFns.setHours = function() {}; -dateFns.setISODay = function() {}; -dateFns.setISOWeek = function() {}; -dateFns.setISOYear = function() {}; -dateFns.setMilliseconds = function() {}; -dateFns.setMinutes = function() {}; -dateFns.setMonth = function() {}; -dateFns.setQuarter = function() {}; -dateFns.setSeconds = function() {}; -dateFns.setYear = function() {}; -dateFns.startOfDay = function() {}; -dateFns.startOfHour = function() {}; -dateFns.startOfISOWeek = function() {}; -dateFns.startOfISOYear = function() {}; -dateFns.startOfMinute = function() {}; -dateFns.startOfMonth = function() {}; -dateFns.startOfQuarter = function() {}; -dateFns.startOfSecond = function() {}; -dateFns.startOfToday = function() {}; -dateFns.startOfTomorrow = function() {}; -dateFns.startOfWeek = function() {}; -dateFns.startOfYear = function() {}; -dateFns.startOfYesterday = function() {}; -dateFns.subDays = function() {}; -dateFns.subHours = function() {}; -dateFns.subISOYears = function() {}; -dateFns.subMilliseconds = function() {}; -dateFns.subMinutes = function() {}; -dateFns.subMonths = function() {}; -dateFns.subQuarters = function() {}; -dateFns.subSeconds = function() {}; -dateFns.subWeeks = function() {}; -dateFns.subYears = function() {}; +dateFns.formatDistanceToNow = function() {} +dateFns.locales = {}; diff --git a/frontend/vendor/package-lock.json b/frontend/vendor/package-lock.json index 734f7868d..fcc33f79a 100644 --- a/frontend/vendor/package-lock.json +++ b/frontend/vendor/package-lock.json @@ -5,9 +5,9 @@ "requires": true, "dependencies": { "@babel/cli": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.7.7.tgz", - "integrity": "sha512-XQw5KyCZyu/M8/0rYiZyuwbgIQNzOrJzs9dDLX+MieSgBwTLvTj4QVbLmxJACAIvQIDT7PtyHN2sC48EOWTgaA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.8.3.tgz", + "integrity": "sha512-K2UXPZCKMv7KwWy9Bl4sa6+jTNP7JyDiHKzoOiUUygaEDbC60vaargZDnO9oFMvlq8pIKOOyUUgeMYrsaN9djA==", "dev": true, "requires": { "chokidar": "^2.1.8", @@ -22,29 +22,41 @@ } }, "@babel/code-frame": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", - "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", "dev": true, "requires": { - "@babel/highlight": "^7.0.0" + "@babel/highlight": "^7.8.3" + } + }, + "@babel/compat-data": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.8.1.tgz", + "integrity": "sha512-Z+6ZOXvyOWYxJ50BwxzdhRnRsGST8Y3jaZgxYig575lTjVSs3KtJnmESwZegg6e2Dn0td1eDhoWlp1wI4BTCPw==", + "dev": true, + "requires": { + "browserslist": "^4.8.2", + "invariant": "^2.2.4", + "semver": "^5.5.0" } }, "@babel/core": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.7.7.tgz", - "integrity": "sha512-jlSjuj/7z138NLZALxVgrx13AOtqip42ATZP7+kYl53GvDV6+4dCek1mVUo8z8c8Xnw/mx2q3d9HWh3griuesQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.8.3.tgz", + "integrity": "sha512-4XFkf8AwyrEG7Ziu3L2L0Cv+WyY47Tcsp70JFmpftbAA1K7YL/sgE9jh9HyNj08Y/U50ItUchpN0w6HxAoX1rA==", "dev": true, "requires": { - "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.7.7", - "@babel/helpers": "^7.7.4", - "@babel/parser": "^7.7.7", - "@babel/template": "^7.7.4", - "@babel/traverse": "^7.7.4", - "@babel/types": "^7.7.4", + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.8.3", + "@babel/helpers": "^7.8.3", + "@babel/parser": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.8.3", + "@babel/types": "^7.8.3", "convert-source-map": "^1.7.0", "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", "json5": "^2.1.0", "lodash": "^4.17.13", "resolve": "^1.3.2", @@ -52,35 +64,6 @@ "source-map": "^0.5.0" }, "dependencies": { - "@babel/generator": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.7.7.tgz", - "integrity": "sha512-/AOIBpHh/JU1l0ZFS4kiRCBnLi6OTHzh0RPk3h9isBxkkqELtQNFi1Vr/tiG9p1yfoUdKVwISuXWQR+hwwM4VQ==", - "dev": true, - "requires": { - "@babel/types": "^7.7.4", - "jsesc": "^2.5.1", - "lodash": "^4.17.13", - "source-map": "^0.5.0" - } - }, - "@babel/parser": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.7.tgz", - "integrity": "sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw==", - "dev": true - }, - "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -99,514 +82,271 @@ } }, "@babel/generator": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.7.4.tgz", - "integrity": "sha512-m5qo2WgdOJeyYngKImbkyQrnUN1mPceaG5BV+G0E3gWsa4l/jCSryWJdM2x8OuGAOyh+3d5pVYfZWCiNFtynxg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.8.3.tgz", + "integrity": "sha512-WjoPk8hRpDRqqzRpvaR8/gDUPkrnOOeuT2m8cNICJtZH6mwaCo3v0OKMI7Y6SM1pBtyijnLtAL0HDi41pf41ug==", "dev": true, "requires": { - "@babel/types": "^7.7.4", + "@babel/types": "^7.8.3", "jsesc": "^2.5.1", "lodash": "^4.17.13", "source-map": "^0.5.0" - }, - "dependencies": { - "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - } } }, "@babel/helper-annotate-as-pure": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.7.4.tgz", - "integrity": "sha512-2BQmQgECKzYKFPpiycoF9tlb5HA4lrVyAmLLVK177EcQAqjVLciUb2/R+n1boQ9y5ENV3uz2ZqiNw7QMBBw1Og==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.8.3.tgz", + "integrity": "sha512-6o+mJrZBxOoEX77Ezv9zwW7WV8DdluouRKNY/IR5u/YTMuKHgugHOzYWlYvYLpLA9nPsQCAAASpCIbjI9Mv+Uw==", "dev": true, "requires": { - "@babel/types": "^7.7.4" - }, - "dependencies": { - "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - } + "@babel/types": "^7.8.3" } }, "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.7.4.tgz", - "integrity": "sha512-Biq/d/WtvfftWZ9Uf39hbPBYDUo986m5Bb4zhkeYDGUllF43D+nUe5M6Vuo6/8JDK/0YX/uBdeoQpyaNhNugZQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.8.3.tgz", + "integrity": "sha512-5eFOm2SyFPK4Rh3XMMRDjN7lBH0orh3ss0g3rTYZnBQ+r6YPj7lgDyCvPphynHvUrobJmeMignBr6Acw9mAPlw==", "dev": true, "requires": { - "@babel/helper-explode-assignable-expression": "^7.7.4", - "@babel/types": "^7.7.4" - }, - "dependencies": { - "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - } + "@babel/helper-explode-assignable-expression": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/helper-builder-react-jsx": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.7.4.tgz", - "integrity": "sha512-kvbfHJNN9dg4rkEM4xn1s8d1/h6TYNvajy9L1wx4qLn9HFg0IkTsQi4rfBe92nxrPUFcMsHoMV+8rU7MJb3fCA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.8.3.tgz", + "integrity": "sha512-JT8mfnpTkKNCboTqZsQTdGo3l3Ik3l7QIt9hh0O9DYiwVel37VoJpILKM4YFbP2euF32nkQSb+F9cUk9b7DDXQ==", "dev": true, "requires": { - "@babel/types": "^7.7.4", + "@babel/types": "^7.8.3", "esutils": "^2.0.0" - }, - "dependencies": { - "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - } } }, "@babel/helper-call-delegate": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.7.4.tgz", - "integrity": "sha512-8JH9/B7J7tCYJ2PpWVpw9JhPuEVHztagNVuQAFBVFYluRMlpG7F1CgKEgGeL6KFqcsIa92ZYVj6DSc0XwmN1ZA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-call-delegate/-/helper-call-delegate-7.8.3.tgz", + "integrity": "sha512-6Q05px0Eb+N4/GTyKPPvnkig7Lylw+QzihMpws9iiZQv7ZImf84ZsZpQH7QoWN4n4tm81SnSzPgHw2qtO0Zf3A==", "dev": true, "requires": { - "@babel/helper-hoist-variables": "^7.7.4", - "@babel/traverse": "^7.7.4", - "@babel/types": "^7.7.4" - }, - "dependencies": { - "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - } + "@babel/helper-hoist-variables": "^7.8.3", + "@babel/traverse": "^7.8.3", + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.3.tgz", + "integrity": "sha512-JLylPCsFjhLN+6uBSSh3iYdxKdeO9MNmoY96PE/99d8kyBFaXLORtAVhqN6iHa+wtPeqxKLghDOZry0+Aiw9Tw==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.8.1", + "browserslist": "^4.8.2", + "invariant": "^2.2.4", + "levenary": "^1.1.0", + "semver": "^5.5.0" } }, "@babel/helper-create-class-features-plugin": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.7.4.tgz", - "integrity": "sha512-l+OnKACG4uiDHQ/aJT8dwpR+LhCJALxL0mJ6nzjB25e5IPwqV1VOsY7ah6UB1DG+VOXAIMtuC54rFJGiHkxjgA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.8.3.tgz", + "integrity": "sha512-qmp4pD7zeTxsv0JNecSBsEmG1ei2MqwJq4YQcK3ZWm/0t07QstWfvuV/vm3Qt5xNMFETn2SZqpMx2MQzbtq+KA==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.7.4", - "@babel/helper-member-expression-to-functions": "^7.7.4", - "@babel/helper-optimise-call-expression": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.7.4", - "@babel/helper-split-export-declaration": "^7.7.4" + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-member-expression-to-functions": "^7.8.3", + "@babel/helper-optimise-call-expression": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.3", + "@babel/helper-split-export-declaration": "^7.8.3" } }, "@babel/helper-create-regexp-features-plugin": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.7.4.tgz", - "integrity": "sha512-Mt+jBKaxL0zfOIWrfQpnfYCN7/rS6GKx6CCCfuoqVVd+17R8zNDlzVYmIi9qyb2wOk002NsmSTDymkIygDUH7A==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.3.tgz", + "integrity": "sha512-Gcsm1OHCUr9o9TcJln57xhWHtdXbA2pgQ58S0Lxlks0WMGNXuki4+GLfX0p+L2ZkINUGZvfkz8rzoqJQSthI+Q==", "dev": true, "requires": { - "@babel/helper-regex": "^7.4.4", + "@babel/helper-regex": "^7.8.3", "regexpu-core": "^4.6.0" } }, "@babel/helper-define-map": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.7.4.tgz", - "integrity": "sha512-v5LorqOa0nVQUvAUTUF3KPastvUt/HzByXNamKQ6RdJRTV7j8rLL+WB5C/MzzWAwOomxDhYFb1wLLxHqox86lg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.8.3.tgz", + "integrity": "sha512-PoeBYtxoZGtct3md6xZOCWPcKuMuk3IHhgxsRRNtnNShebf4C8YonTSblsK4tvDbm+eJAw2HAPOfCr+Q/YRG/g==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.7.4", - "@babel/types": "^7.7.4", + "@babel/helper-function-name": "^7.8.3", + "@babel/types": "^7.8.3", "lodash": "^4.17.13" - }, - "dependencies": { - "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - } } }, "@babel/helper-explode-assignable-expression": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.7.4.tgz", - "integrity": "sha512-2/SicuFrNSXsZNBxe5UGdLr+HZg+raWBLE9vC98bdYOKX/U6PY0mdGlYUJdtTDPSU0Lw0PNbKKDpwYHJLn2jLg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.8.3.tgz", + "integrity": "sha512-N+8eW86/Kj147bO9G2uclsg5pwfs/fqqY5rwgIL7eTBklgXjcOJ3btzS5iM6AitJcftnY7pm2lGsrJVYLGjzIw==", "dev": true, "requires": { - "@babel/traverse": "^7.7.4", - "@babel/types": "^7.7.4" - }, - "dependencies": { - "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - } + "@babel/traverse": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/helper-function-name": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz", - "integrity": "sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", + "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.7.4", - "@babel/template": "^7.7.4", - "@babel/types": "^7.7.4" - }, - "dependencies": { - "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - } + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/helper-get-function-arity": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz", - "integrity": "sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", + "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", "dev": true, "requires": { - "@babel/types": "^7.7.4" - }, - "dependencies": { - "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - } + "@babel/types": "^7.8.3" } }, "@babel/helper-hoist-variables": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.7.4.tgz", - "integrity": "sha512-wQC4xyvc1Jo/FnLirL6CEgPgPCa8M74tOdjWpRhQYapz5JC7u3NYU1zCVoVAGCE3EaIP9T1A3iW0WLJ+reZlpQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.8.3.tgz", + "integrity": "sha512-ky1JLOjcDUtSc+xkt0xhYff7Z6ILTAHKmZLHPxAhOP0Nd77O+3nCsd6uSVYur6nJnCI029CrNbYlc0LoPfAPQg==", "dev": true, "requires": { - "@babel/types": "^7.7.4" - }, - "dependencies": { - "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - } + "@babel/types": "^7.8.3" } }, "@babel/helper-member-expression-to-functions": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.7.4.tgz", - "integrity": "sha512-9KcA1X2E3OjXl/ykfMMInBK+uVdfIVakVe7W7Lg3wfXUNyS3Q1HWLFRwZIjhqiCGbslummPDnmb7vIekS0C1vw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz", + "integrity": "sha512-fO4Egq88utkQFjbPrSHGmGLFqmrshs11d46WI+WZDESt7Wu7wN2G2Iu+NMMZJFDOVRHAMIkB5SNh30NtwCA7RA==", "dev": true, "requires": { - "@babel/types": "^7.7.4" - }, - "dependencies": { - "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - } + "@babel/types": "^7.8.3" } }, "@babel/helper-module-imports": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz", - "integrity": "sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz", + "integrity": "sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg==", "dev": true, "requires": { - "@babel/types": "^7.0.0" + "@babel/types": "^7.8.3" } }, "@babel/helper-module-transforms": { - "version": "7.7.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.7.5.tgz", - "integrity": "sha512-A7pSxyJf1gN5qXVcidwLWydjftUN878VkalhXX5iQDuGyiGK3sOrrKKHF4/A4fwHtnsotv/NipwAeLzY4KQPvw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.8.3.tgz", + "integrity": "sha512-C7NG6B7vfBa/pwCOshpMbOYUmrYQDfCpVL/JCRu0ek8B5p8kue1+BCXpg2vOYs7w5ACB9GTOBYQ5U6NwrMg+3Q==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.7.4", - "@babel/helper-simple-access": "^7.7.4", - "@babel/helper-split-export-declaration": "^7.7.4", - "@babel/template": "^7.7.4", - "@babel/types": "^7.7.4", + "@babel/helper-module-imports": "^7.8.3", + "@babel/helper-simple-access": "^7.8.3", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/types": "^7.8.3", "lodash": "^4.17.13" - }, - "dependencies": { - "@babel/helper-module-imports": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.7.4.tgz", - "integrity": "sha512-dGcrX6K9l8258WFjyDLJwuVKxR4XZfU0/vTUgOQYWEnRD8mgr+p4d6fCUMq/ys0h4CCt/S5JhbvtyErjWouAUQ==", - "dev": true, - "requires": { - "@babel/types": "^7.7.4" - } - }, - "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - } } }, "@babel/helper-optimise-call-expression": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.7.4.tgz", - "integrity": "sha512-VB7gWZ2fDkSuqW6b1AKXkJWO5NyNI3bFL/kK79/30moK57blr6NbH8xcl2XcKCwOmJosftWunZqfO84IGq3ZZg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz", + "integrity": "sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ==", "dev": true, "requires": { - "@babel/types": "^7.7.4" - }, - "dependencies": { - "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - } + "@babel/types": "^7.8.3" } }, "@babel/helper-plugin-utils": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz", - "integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", "dev": true }, "@babel/helper-regex": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.5.5.tgz", - "integrity": "sha512-CkCYQLkfkiugbRDO8eZn6lRuR8kzZoGXCg3149iTk5se7g6qykSpy3+hELSwquhu+TgHn8nkLiBwHvNX8Hofcw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.8.3.tgz", + "integrity": "sha512-BWt0QtYv/cg/NecOAZMdcn/waj/5P26DR4mVLXfFtDokSR6fyuG0Pj+e2FqtSME+MqED1khnSMulkmGl8qWiUQ==", "dev": true, "requires": { "lodash": "^4.17.13" } }, "@babel/helper-remap-async-to-generator": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.7.4.tgz", - "integrity": "sha512-Sk4xmtVdM9sA/jCI80f+KS+Md+ZHIpjuqmYPk1M7F/upHou5e4ReYmExAiu6PVe65BhJPZA2CY9x9k4BqE5klw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.8.3.tgz", + "integrity": "sha512-kgwDmw4fCg7AVgS4DukQR/roGp+jP+XluJE5hsRZwxCYGg+Rv9wSGErDWhlI90FODdYfd4xG4AQRiMDjjN0GzA==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.7.4", - "@babel/helper-wrap-function": "^7.7.4", - "@babel/template": "^7.7.4", - "@babel/traverse": "^7.7.4", - "@babel/types": "^7.7.4" - }, - "dependencies": { - "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - } + "@babel/helper-annotate-as-pure": "^7.8.3", + "@babel/helper-wrap-function": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/helper-replace-supers": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.7.4.tgz", - "integrity": "sha512-pP0tfgg9hsZWo5ZboYGuBn/bbYT/hdLPVSS4NMmiRJdwWhP0IznPwN9AE1JwyGsjSPLC364I0Qh5p+EPkGPNpg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.8.3.tgz", + "integrity": "sha512-xOUssL6ho41U81etpLoT2RTdvdus4VfHamCuAm4AHxGr+0it5fnwoVdwUJ7GFEqCsQYzJUhcbsN9wB9apcYKFA==", "dev": true, "requires": { - "@babel/helper-member-expression-to-functions": "^7.7.4", - "@babel/helper-optimise-call-expression": "^7.7.4", - "@babel/traverse": "^7.7.4", - "@babel/types": "^7.7.4" - }, - "dependencies": { - "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - } + "@babel/helper-member-expression-to-functions": "^7.8.3", + "@babel/helper-optimise-call-expression": "^7.8.3", + "@babel/traverse": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/helper-simple-access": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.7.4.tgz", - "integrity": "sha512-zK7THeEXfan7UlWsG2A6CI/L9jVnI5+xxKZOdej39Y0YtDYKx9raHk5F2EtK9K8DHRTihYwg20ADt9S36GR78A==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.8.3.tgz", + "integrity": "sha512-VNGUDjx5cCWg4vvCTR8qQ7YJYZ+HBjxOgXEl7ounz+4Sn7+LMD3CFrCTEU6/qXKbA2nKg21CwhhBzO0RpRbdCw==", "dev": true, "requires": { - "@babel/template": "^7.7.4", - "@babel/types": "^7.7.4" - }, - "dependencies": { - "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - } + "@babel/template": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/helper-split-export-declaration": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.4.tgz", - "integrity": "sha512-guAg1SXFcVr04Guk9eq0S4/rWS++sbmyqosJzVs8+1fH5NI+ZcmkaSkc7dmtAFbHFva6yRJnjW3yAcGxjueDug==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", + "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", "dev": true, "requires": { - "@babel/types": "^7.7.4" - }, - "dependencies": { - "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - } + "@babel/types": "^7.8.3" } }, "@babel/helper-wrap-function": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.7.4.tgz", - "integrity": "sha512-VsfzZt6wmsocOaVU0OokwrIytHND55yvyT4BPB9AIIgwr8+x7617hetdJTsuGwygN5RC6mxA9EJztTjuwm2ofg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.8.3.tgz", + "integrity": "sha512-LACJrbUET9cQDzb6kG7EeD7+7doC3JNvUgTEQOx2qaO1fKlzE/Bf05qs9w1oXQMmXlPO65lC3Tq9S6gZpTErEQ==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.7.4", - "@babel/template": "^7.7.4", - "@babel/traverse": "^7.7.4", - "@babel/types": "^7.7.4" - }, - "dependencies": { - "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - } + "@babel/helper-function-name": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/helpers": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.7.4.tgz", - "integrity": "sha512-ak5NGZGJ6LV85Q1Zc9gn2n+ayXOizryhjSUBTdu5ih1tlVCJeuQENzc4ItyCVhINVXvIT/ZQ4mheGIsfBkpskg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.8.3.tgz", + "integrity": "sha512-LmU3q9Pah/XyZU89QvBgGt+BCsTPoQa+73RxAQh8fb8qkDyIfeQnmgs+hvzhTCKTzqOyk7JTkS3MS1S8Mq5yrQ==", "dev": true, "requires": { - "@babel/template": "^7.7.4", - "@babel/traverse": "^7.7.4", - "@babel/types": "^7.7.4" - }, - "dependencies": { - "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - } + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/highlight": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", - "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", + "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==", "dev": true, "requires": { "chalk": "^2.0.0", @@ -615,678 +355,655 @@ } }, "@babel/parser": { - "version": "7.7.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.5.tgz", - "integrity": "sha512-KNlOe9+/nk4i29g0VXgl8PEXIRms5xKLJeuZ6UptN0fHv+jDiriG+y94X6qAgWTR0h3KaoM1wK5G5h7MHFRSig==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.8.3.tgz", + "integrity": "sha512-/V72F4Yp/qmHaTALizEm9Gf2eQHV3QyTL3K0cNfijwnMnb1L+LDlAubb/ZnSdGAVzVSWakujHYs1I26x66sMeQ==", "dev": true }, "@babel/plugin-proposal-async-generator-functions": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.7.4.tgz", - "integrity": "sha512-1ypyZvGRXriY/QP668+s8sFr2mqinhkRDMPSQLNghCQE+GAkFtp+wkHVvg2+Hdki8gwP+NFzJBJ/N1BfzCCDEw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.8.3.tgz", + "integrity": "sha512-NZ9zLv848JsV3hs8ryEh7Uaz/0KsmPLqv0+PdkDJL1cJy0K4kOCFa8zc1E3mp+RHPQcpdfb/6GovEsW4VDrOMw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-remap-async-to-generator": "^7.7.4", - "@babel/plugin-syntax-async-generators": "^7.7.4" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-remap-async-to-generator": "^7.8.3", + "@babel/plugin-syntax-async-generators": "^7.8.0" } }, "@babel/plugin-proposal-class-properties": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.7.4.tgz", - "integrity": "sha512-EcuXeV4Hv1X3+Q1TsuOmyyxeTRiSqurGJ26+I/FW1WbymmRRapVORm6x1Zl3iDIHyRxEs+VXWp6qnlcfcJSbbw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.8.3.tgz", + "integrity": "sha512-EqFhbo7IosdgPgZggHaNObkmO1kNUe3slaKu54d5OWvy+p9QIKOzK1GAEpAIsZtWVtPXUHSMcT4smvDrCfY4AA==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-create-class-features-plugin": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-proposal-dynamic-import": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.7.4.tgz", - "integrity": "sha512-StH+nGAdO6qDB1l8sZ5UBV8AC3F2VW2I8Vfld73TMKyptMU9DY5YsJAS8U81+vEtxcH3Y/La0wG0btDrhpnhjQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.8.3.tgz", + "integrity": "sha512-NyaBbyLFXFLT9FP+zk0kYlUlA8XtCUbehs67F0nnEg7KICgMc2mNkIeu9TYhKzyXMkrapZFwAhXLdnt4IYHy1w==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-dynamic-import": "^7.7.4" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-dynamic-import": "^7.8.0" } }, "@babel/plugin-proposal-export-default-from": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.7.4.tgz", - "integrity": "sha512-1t6dh7BHYUz4zD1m4pozYYEZy/3m8dgOr9owx3r0mPPI3iGKRUKUbIxfYmcJ4hwljs/dhd0qOTr1ZDUp43ix+w==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.8.3.tgz", + "integrity": "sha512-PYtv2S2OdCdp7GSPDg5ndGZFm9DmWFvuLoS5nBxZCgOBggluLnhTScspJxng96alHQzPyrrHxvC9/w4bFuspeA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-export-default-from": "^7.7.4" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-export-default-from": "^7.8.3" } }, "@babel/plugin-proposal-json-strings": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.7.4.tgz", - "integrity": "sha512-wQvt3akcBTfLU/wYoqm/ws7YOAQKu8EVJEvHip/mzkNtjaclQoCCIqKXFP5/eyfnfbQCDV3OLRIK3mIVyXuZlw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.8.3.tgz", + "integrity": "sha512-KGhQNZ3TVCQG/MjRbAUwuH+14y9q0tpxs1nWWs3pbSleRdDro9SAMMDyye8HhY1gqZ7/NqIc8SKhya0wRDgP1Q==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-json-strings": "^7.7.4" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.0" + } + }, + "@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-TS9MlfzXpXKt6YYomudb/KU7nQI6/xnapG6in1uZxoxDghuSMZsPb6D2fyUwNYSAp4l1iR7QtFOjkqcRYcUsfw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0" } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.7.7.tgz", - "integrity": "sha512-3qp9I8lelgzNedI3hrhkvhaEYree6+WHnyA/q4Dza9z7iEIs1eyhWyJnetk3jJ69RT0AT4G0UhEGwyGFJ7GUuQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-8qvuPwU/xxUCt78HocNlv0mXXo0wdh9VT1R04WU8HGOfaOob26pF+9P5/lYjN/q7DHOX1bvX60hnhOvuQUJdbA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-object-rest-spread": "^7.7.4" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0" } }, "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.7.4.tgz", - "integrity": "sha512-DyM7U2bnsQerCQ+sejcTNZh8KQEUuC3ufzdnVnSiUv/qoGJp2Z3hanKL18KDhsBT5Wj6a7CMT5mdyCNJsEaA9w==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-0gkX7J7E+AtAw9fcwlVQj8peP61qhdg/89D5swOkjYbkboA2CVckn3kiyum1DE0wskGb7KJJxBdyEBApDLLVdw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-optional-catch-binding": "^7.7.4" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0" + } + }, + "@babel/plugin-proposal-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.8.3.tgz", + "integrity": "sha512-QIoIR9abkVn+seDE3OjA08jWcs3eZ9+wJCKSRgo3WdEU2csFYgdScb+8qHB3+WXsGJD55u+5hWCISI7ejXS+kg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.0" } }, "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.7.7.tgz", - "integrity": "sha512-80PbkKyORBUVm1fbTLrHpYdJxMThzM1UqFGh0ALEhO9TYbG86Ah9zQYAB/84axz2vcxefDLdZwWwZNlYARlu9w==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.3.tgz", + "integrity": "sha512-1/1/rEZv2XGweRwwSkLpY+s60za9OZ1hJs4YDqFHCw0kYWYwL5IFljVY1MYBL+weT1l9pokDO2uhSTLVxzoHkQ==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-create-regexp-features-plugin": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-syntax-async-generators": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.7.4.tgz", - "integrity": "sha512-Li4+EjSpBgxcsmeEF8IFcfV/+yJGxHXDirDkEoyFjumuwbmfCVHUt0HuowD/iGM7OhIRyXJH9YXxqiH6N815+g==", + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.0" } }, "@babel/plugin-syntax-dynamic-import": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.7.4.tgz", - "integrity": "sha512-jHQW0vbRGvwQNgyVxwDh4yuXu4bH1f5/EICJLAhl1SblLs2CDhrsmCk+v5XLdE9wxtAFRyxx+P//Iw+a5L/tTg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.0" } }, "@babel/plugin-syntax-export-default-from": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-default-from/-/plugin-syntax-export-default-from-7.7.4.tgz", - "integrity": "sha512-j888jpjATLEzOWhKawq46UrpXnCRDbdhBd5io4jgwjJ3+CHHGCRb6PNAVEgs+BXIb+dNRAmnkv36zfB992PRVw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-default-from/-/plugin-syntax-export-default-from-7.8.3.tgz", + "integrity": "sha512-a1qnnsr73KLNIQcQlcQ4ZHxqqfBKM6iNQZW2OMTyxNbA2WC7SHWHtGVpFzWtQAuS2pspkWVzdEBXXx8Ik0Za4w==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-syntax-json-strings": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.7.4.tgz", - "integrity": "sha512-QpGupahTQW1mHRXddMG5srgpHWqRLwJnJZKXTigB9RPFCCGbDGCgBeM/iC82ICXp414WeYx/tD54w7M2qRqTMg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.0" } }, "@babel/plugin-syntax-jsx": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.7.4.tgz", - "integrity": "sha512-wuy6fiMe9y7HeZBWXYCGt2RGxZOj0BImZ9EyXJVnVGBKO/Br592rbR3rtIQn0eQhAk9vqaKP5n8tVqEFBQMfLg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.8.3.tgz", + "integrity": "sha512-WxdW9xyLgBdefoo0Ynn3MRSkhe5tFVxxKNVdnZSh318WrG2e2jH+E9wd/++JsqcLJZPfz87njQJ8j2Upjm0M0A==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" } }, "@babel/plugin-syntax-object-rest-spread": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.7.4.tgz", - "integrity": "sha512-mObR+r+KZq0XhRVS2BrBKBpr5jqrqzlPvS9C9vuOf5ilSwzloAl7RPWLrgKdWS6IreaVrjHxTjtyqFiOisaCwg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.0" } }, "@babel/plugin-syntax-optional-catch-binding": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.7.4.tgz", - "integrity": "sha512-4ZSuzWgFxqHRE31Glu+fEr/MirNZOMYmD/0BhBWyLyOOQz/gTAl7QmWm2hX1QxEIXsr2vkdlwxIzTyiYRC4xcQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" } }, "@babel/plugin-syntax-top-level-await": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.7.4.tgz", - "integrity": "sha512-wdsOw0MvkL1UIgiQ/IFr3ETcfv1xb8RMM0H9wbiDyLaJFyiDg5oZvDLCXosIXmFeIlweML5iOBXAkqddkYNizg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.8.3.tgz", + "integrity": "sha512-kwj1j9lL/6Wd0hROD3b/OZZ7MSrZLqqn9RAZ5+cYYsflQ9HZBIKCUkr3+uL1MEJ1NePiUbf98jjiMQSv0NMR9g==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-arrow-functions": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.7.4.tgz", - "integrity": "sha512-zUXy3e8jBNPiffmqkHRNDdZM2r8DWhCB7HhcoyZjiK1TxYEluLHAvQuYnTT+ARqRpabWqy/NHkO6e3MsYB5YfA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.8.3.tgz", + "integrity": "sha512-0MRF+KC8EqH4dbuITCWwPSzsyO3HIWWlm30v8BbbpOrS1B++isGxPnnuq/IZvOX5J2D/p7DQalQm+/2PnlKGxg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-async-to-generator": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.7.4.tgz", - "integrity": "sha512-zpUTZphp5nHokuy8yLlyafxCJ0rSlFoSHypTUWgpdwoDXWQcseaect7cJ8Ppk6nunOM6+5rPMkod4OYKPR5MUg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.8.3.tgz", + "integrity": "sha512-imt9tFLD9ogt56Dd5CI/6XgpukMwd/fLGSrix2httihVe7LOGVPhyhMh1BU5kDM7iHD08i8uUtmV2sWaBFlHVQ==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-remap-async-to-generator": "^7.7.4" - }, - "dependencies": { - "@babel/helper-module-imports": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.7.4.tgz", - "integrity": "sha512-dGcrX6K9l8258WFjyDLJwuVKxR4XZfU0/vTUgOQYWEnRD8mgr+p4d6fCUMq/ys0h4CCt/S5JhbvtyErjWouAUQ==", - "dev": true, - "requires": { - "@babel/types": "^7.7.4" - } - }, - "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - } + "@babel/helper-module-imports": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-remap-async-to-generator": "^7.8.3" } }, "@babel/plugin-transform-block-scoped-functions": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.7.4.tgz", - "integrity": "sha512-kqtQzwtKcpPclHYjLK//3lH8OFsCDuDJBaFhVwf8kqdnF6MN4l618UDlcA7TfRs3FayrHj+svYnSX8MC9zmUyQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.8.3.tgz", + "integrity": "sha512-vo4F2OewqjbB1+yaJ7k2EJFHlTP3jR634Z9Cj9itpqNjuLXvhlVxgnjsHsdRgASR8xYDrx6onw4vW5H6We0Jmg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-block-scoping": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.7.4.tgz", - "integrity": "sha512-2VBe9u0G+fDt9B5OV5DQH4KBf5DoiNkwFKOz0TCvBWvdAN2rOykCTkrL+jTLxfCAm76l9Qo5OqL7HBOx2dWggg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.8.3.tgz", + "integrity": "sha512-pGnYfm7RNRgYRi7bids5bHluENHqJhrV4bCZRwc5GamaWIIs07N4rZECcmJL6ZClwjDz1GbdMZFtPs27hTB06w==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-plugin-utils": "^7.8.3", "lodash": "^4.17.13" } }, "@babel/plugin-transform-classes": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.7.4.tgz", - "integrity": "sha512-sK1mjWat7K+buWRuImEzjNf68qrKcrddtpQo3swi9j7dUcG6y6R6+Di039QN2bD1dykeswlagupEmpOatFHHUg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.8.3.tgz", + "integrity": "sha512-SjT0cwFJ+7Rbr1vQsvphAHwUHvSUPmMjMU/0P59G8U2HLFqSa082JO7zkbDNWs9kH/IUqpHI6xWNesGf8haF1w==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.7.4", - "@babel/helper-define-map": "^7.7.4", - "@babel/helper-function-name": "^7.7.4", - "@babel/helper-optimise-call-expression": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.7.4", - "@babel/helper-split-export-declaration": "^7.7.4", + "@babel/helper-annotate-as-pure": "^7.8.3", + "@babel/helper-define-map": "^7.8.3", + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-optimise-call-expression": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.3", + "@babel/helper-split-export-declaration": "^7.8.3", "globals": "^11.1.0" } }, "@babel/plugin-transform-computed-properties": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.7.4.tgz", - "integrity": "sha512-bSNsOsZnlpLLyQew35rl4Fma3yKWqK3ImWMSC/Nc+6nGjC9s5NFWAer1YQ899/6s9HxO2zQC1WoFNfkOqRkqRQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.8.3.tgz", + "integrity": "sha512-O5hiIpSyOGdrQZRQ2ccwtTVkgUDBBiCuK//4RJ6UfePllUTCENOzKxfh6ulckXKc0DixTFLCfb2HVkNA7aDpzA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-destructuring": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.7.4.tgz", - "integrity": "sha512-4jFMXI1Cu2aXbcXXl8Lr6YubCn6Oc7k9lLsu8v61TZh+1jny2BWmdtvY9zSUlLdGUvcy9DMAWyZEOqjsbeg/wA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.8.3.tgz", + "integrity": "sha512-H4X646nCkiEcHZUZaRkhE2XVsoz0J/1x3VVujnn96pSoGCtKPA99ZZA+va+gK+92Zycd6OBKCD8tDb/731bhgQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-dotall-regex": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.7.7.tgz", - "integrity": "sha512-b4in+YlTeE/QmTgrllnb3bHA0HntYvjz8O3Mcbx75UBPJA2xhb5A8nle498VhxSXJHQefjtQxpnLPehDJ4TRlg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.8.3.tgz", + "integrity": "sha512-kLs1j9Nn4MQoBYdRXH6AeaXMbEJFaFu/v1nQkvib6QzTj8MZI5OQzqmD83/2jEM1z0DLilra5aWO5YpyC0ALIw==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-create-regexp-features-plugin": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-duplicate-keys": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.7.4.tgz", - "integrity": "sha512-g1y4/G6xGWMD85Tlft5XedGaZBCIVN+/P0bs6eabmcPP9egFleMAo65OOjlhcz1njpwagyY3t0nsQC9oTFegJA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.8.3.tgz", + "integrity": "sha512-s8dHiBUbcbSgipS4SMFuWGqCvyge5V2ZeAWzR6INTVC3Ltjig/Vw1G2Gztv0vU/hRG9X8IvKvYdoksnUfgXOEQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-exponentiation-operator": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.7.4.tgz", - "integrity": "sha512-MCqiLfCKm6KEA1dglf6Uqq1ElDIZwFuzz1WH5mTf8k2uQSxEJMbOIEh7IZv7uichr7PMfi5YVSrr1vz+ipp7AQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.8.3.tgz", + "integrity": "sha512-zwIpuIymb3ACcInbksHaNcR12S++0MDLKkiqXHl3AzpgdKlFNhog+z/K0+TGW+b0w5pgTq4H6IwV/WhxbGYSjQ==", "dev": true, "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-for-of": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.7.4.tgz", - "integrity": "sha512-zZ1fD1B8keYtEcKF+M1TROfeHTKnijcVQm0yO/Yu1f7qoDoxEIc/+GX6Go430Bg84eM/xwPFp0+h4EbZg7epAA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.8.3.tgz", + "integrity": "sha512-ZjXznLNTxhpf4Q5q3x1NsngzGA38t9naWH8Gt+0qYZEJAcvPI9waSStSh56u19Ofjr7QmD0wUsQ8hw8s/p1VnA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-function-name": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.7.4.tgz", - "integrity": "sha512-E/x09TvjHNhsULs2IusN+aJNRV5zKwxu1cpirZyRPw+FyyIKEHPXTsadj48bVpc1R5Qq1B5ZkzumuFLytnbT6g==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.8.3.tgz", + "integrity": "sha512-rO/OnDS78Eifbjn5Py9v8y0aR+aSYhDhqAwVfsTl0ERuMZyr05L1aFSCJnbv2mmsLkit/4ReeQ9N2BgLnOcPCQ==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-literals": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.7.4.tgz", - "integrity": "sha512-X2MSV7LfJFm4aZfxd0yLVFrEXAgPqYoDG53Br/tCKiKYfX0MjVjQeWPIhPHHsCqzwQANq+FLN786fF5rgLS+gw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.8.3.tgz", + "integrity": "sha512-3Tqf8JJ/qB7TeldGl+TT55+uQei9JfYaregDcEAyBZ7akutriFrt6C/wLYIer6OYhleVQvH/ntEhjE/xMmy10A==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-member-expression-literals": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.7.4.tgz", - "integrity": "sha512-9VMwMO7i69LHTesL0RdGy93JU6a+qOPuvB4F4d0kR0zyVjJRVJRaoaGjhtki6SzQUu8yen/vxPKN6CWnCUw6bA==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.8.3.tgz", + "integrity": "sha512-3Wk2EXhnw+rP+IDkK6BdtPKsUE5IeZ6QOGrPYvw52NwBStw9V1ZVzxgK6fSKSxqUvH9eQPR3tm3cOq79HlsKYA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-modules-amd": { - "version": "7.7.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.7.5.tgz", - "integrity": "sha512-CT57FG4A2ZUNU1v+HdvDSDrjNWBrtCmSH6YbbgN3Lrf0Di/q/lWRxZrE72p3+HCCz9UjfZOEBdphgC0nzOS6DQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.8.3.tgz", + "integrity": "sha512-MadJiU3rLKclzT5kBH4yxdry96odTUwuqrZM+GllFI/VhxfPz+k9MshJM+MwhfkCdxxclSbSBbUGciBngR+kEQ==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.7.5", - "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-module-transforms": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", "babel-plugin-dynamic-import-node": "^2.3.0" } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.7.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.7.5.tgz", - "integrity": "sha512-9Cq4zTFExwFhQI6MT1aFxgqhIsMWQWDVwOgLzl7PTWJHsNaqFvklAU+Oz6AQLAS0dJKTwZSOCo20INwktxpi3Q==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.8.3.tgz", + "integrity": "sha512-JpdMEfA15HZ/1gNuB9XEDlZM1h/gF/YOH7zaZzQu2xCFRfwc01NXBMHHSTT6hRjlXJJs5x/bfODM3LiCk94Sxg==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.7.5", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-simple-access": "^7.7.4", + "@babel/helper-module-transforms": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-simple-access": "^7.8.3", "babel-plugin-dynamic-import-node": "^2.3.0" } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.7.4.tgz", - "integrity": "sha512-y2c96hmcsUi6LrMqvmNDPBBiGCiQu0aYqpHatVVu6kD4mFEXKjyNxd/drc18XXAf9dv7UXjrZwBVmTTGaGP8iw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.8.3.tgz", + "integrity": "sha512-8cESMCJjmArMYqa9AO5YuMEkE4ds28tMpZcGZB/jl3n0ZzlsxOAi3mC+SKypTfT8gjMupCnd3YiXCkMjj2jfOg==", "dev": true, "requires": { - "@babel/helper-hoist-variables": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-hoist-variables": "^7.8.3", + "@babel/helper-module-transforms": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", "babel-plugin-dynamic-import-node": "^2.3.0" } }, "@babel/plugin-transform-modules-umd": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.7.4.tgz", - "integrity": "sha512-u2B8TIi0qZI4j8q4C51ktfO7E3cQ0qnaXFI1/OXITordD40tt17g/sXqgNNCcMTcBFKrUPcGDx+TBJuZxLx7tw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.8.3.tgz", + "integrity": "sha512-evhTyWhbwbI3/U6dZAnx/ePoV7H6OUG+OjiJFHmhr9FPn0VShjwC2kdxqIuQ/+1P50TMrneGzMeyMTFOjKSnAw==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-module-transforms": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.7.4.tgz", - "integrity": "sha512-jBUkiqLKvUWpv9GLSuHUFYdmHg0ujC1JEYoZUfeOOfNydZXp1sXObgyPatpcwjWgsdBGsagWW0cdJpX/DO2jMw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.8.3.tgz", + "integrity": "sha512-f+tF/8UVPU86TrCb06JoPWIdDpTNSGGcAtaD9mLP0aYGA0OS0j7j7DHJR0GTFrUZPUU6loZhbsVZgTh0N+Qdnw==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.7.4" + "@babel/helper-create-regexp-features-plugin": "^7.8.3" } }, "@babel/plugin-transform-new-target": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.7.4.tgz", - "integrity": "sha512-CnPRiNtOG1vRodnsyGX37bHQleHE14B9dnnlgSeEs3ek3fHN1A1SScglTCg1sfbe7sRQ2BUcpgpTpWSfMKz3gg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.8.3.tgz", + "integrity": "sha512-QuSGysibQpyxexRyui2vca+Cmbljo8bcRckgzYV4kRIsHpVeyeC3JDO63pY+xFZ6bWOBn7pfKZTqV4o/ix9sFw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-object-super": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.7.4.tgz", - "integrity": "sha512-ho+dAEhC2aRnff2JCA0SAK7V2R62zJd/7dmtoe7MHcso4C2mS+vZjn1Pb1pCVZvJs1mgsvv5+7sT+m3Bysb6eg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.8.3.tgz", + "integrity": "sha512-57FXk+gItG/GejofIyLIgBKTas4+pEU47IXKDBWFTxdPd7F80H8zybyAY7UoblVfBhBGs2EKM+bJUu2+iUYPDQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.7.4" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.3" } }, "@babel/plugin-transform-parameters": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.7.7.tgz", - "integrity": "sha512-OhGSrf9ZBrr1fw84oFXj5hgi8Nmg+E2w5L7NhnG0lPvpDtqd7dbyilM2/vR8CKbJ907RyxPh2kj6sBCSSfI9Ew==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.8.3.tgz", + "integrity": "sha512-/pqngtGb54JwMBZ6S/D3XYylQDFtGjWrnoCF4gXZOUpFV/ujbxnoNGNvDGu6doFWRPBveE72qTx/RRU44j5I/Q==", "dev": true, "requires": { - "@babel/helper-call-delegate": "^7.7.4", - "@babel/helper-get-function-arity": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-call-delegate": "^7.8.3", + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-property-literals": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.7.4.tgz", - "integrity": "sha512-MatJhlC4iHsIskWYyawl53KuHrt+kALSADLQQ/HkhTjX954fkxIEh4q5slL4oRAnsm/eDoZ4q0CIZpcqBuxhJQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.8.3.tgz", + "integrity": "sha512-uGiiXAZMqEoQhRWMK17VospMZh5sXWg+dlh2soffpkAl96KAm+WZuJfa6lcELotSRmooLqg0MWdH6UUq85nmmg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-react-display-name": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.7.4.tgz", - "integrity": "sha512-sBbIvqYkthai0X0vkD2xsAwluBp+LtNHH+/V4a5ydifmTtb8KOVOlrMIk/MYmIc4uTYDnjZUHQildYNo36SRJw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.8.3.tgz", + "integrity": "sha512-3Jy/PCw8Fe6uBKtEgz3M82ljt+lTg+xJaM4og+eyu83qLT87ZUSckn0wy7r31jflURWLO83TW6Ylf7lyXj3m5A==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-react-jsx": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.7.4.tgz", - "integrity": "sha512-LixU4BS95ZTEAZdPaIuyg/k8FiiqN9laQ0dMHB4MlpydHY53uQdWCUrwjLr5o6ilS6fAgZey4Q14XBjl5tL6xw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.8.3.tgz", + "integrity": "sha512-r0h+mUiyL595ikykci+fbwm9YzmuOrUBi0b+FDIKmi3fPQyFokWVEMJnRWHJPPQEjyFJyna9WZC6Viv6UHSv1g==", "dev": true, "requires": { - "@babel/helper-builder-react-jsx": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-jsx": "^7.7.4" + "@babel/helper-builder-react-jsx": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-jsx": "^7.8.3" } }, "@babel/plugin-transform-react-jsx-self": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.7.4.tgz", - "integrity": "sha512-PWYjSfqrO273mc1pKCRTIJXyqfc9vWYBax88yIhQb+bpw3XChVC7VWS4VwRVs63wFHKxizvGSd00XEr+YB9Q2A==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.8.3.tgz", + "integrity": "sha512-01OT7s5oa0XTLf2I8XGsL8+KqV9lx3EZV+jxn/L2LQ97CGKila2YMroTkCEIE0HV/FF7CMSRsIAybopdN9NTdg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-jsx": "^7.7.4" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-jsx": "^7.8.3" } }, "@babel/plugin-transform-react-jsx-source": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.7.4.tgz", - "integrity": "sha512-5ZU9FnPhqtHsOXxutRtXZAzoEJwDaP32QcobbMP1/qt7NYcsCNK8XgzJcJfoEr/ZnzVvUNInNjIW22Z6I8p9mg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.8.3.tgz", + "integrity": "sha512-PLMgdMGuVDtRS/SzjNEQYUT8f4z1xb2BAT54vM1X5efkVuYBf5WyGUMbpmARcfq3NaglIwz08UVQK4HHHbC6ag==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-syntax-jsx": "^7.7.4" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-jsx": "^7.8.3" } }, "@babel/plugin-transform-regenerator": { - "version": "7.7.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.7.5.tgz", - "integrity": "sha512-/8I8tPvX2FkuEyWbjRCt4qTAgZK0DVy8QRguhA524UH48RfGJy94On2ri+dCuwOpcerPRl9O4ebQkRcVzIaGBw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.3.tgz", + "integrity": "sha512-qt/kcur/FxrQrzFR432FGZznkVAjiyFtCOANjkAKwCbt465L6ZCiUQh2oMYGU3Wo8LRFJxNDFwWn106S5wVUNA==", "dev": true, "requires": { "regenerator-transform": "^0.14.0" } }, "@babel/plugin-transform-reserved-words": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.7.4.tgz", - "integrity": "sha512-OrPiUB5s5XvkCO1lS7D8ZtHcswIC57j62acAnJZKqGGnHP+TIc/ljQSrgdX/QyOTdEK5COAhuc820Hi1q2UgLQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.8.3.tgz", + "integrity": "sha512-mwMxcycN3omKFDjDQUl+8zyMsBfjRFr0Zn/64I41pmjv4NJuqcYlEtezwYtw9TFd9WR1vN5kiM+O0gMZzO6L0A==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-shorthand-properties": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.7.4.tgz", - "integrity": "sha512-q+suddWRfIcnyG5YiDP58sT65AJDZSUhXQDZE3r04AuqD6d/XLaQPPXSBzP2zGerkgBivqtQm9XKGLuHqBID6Q==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.8.3.tgz", + "integrity": "sha512-I9DI6Odg0JJwxCHzbzW08ggMdCezoWcuQRz3ptdudgwaHxTjxw5HgdFJmZIkIMlRymL6YiZcped4TTCB0JcC8w==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-spread": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.7.4.tgz", - "integrity": "sha512-8OSs0FLe5/80cndziPlg4R0K6HcWSM0zyNhHhLsmw/Nc5MaA49cAsnoJ/t/YZf8qkG7fD+UjTRaApVDB526d7Q==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.8.3.tgz", + "integrity": "sha512-CkuTU9mbmAoFOI1tklFWYYbzX5qCIZVXPVy0jpXgGwkplCndQAa58s2jr66fTeQnA64bDox0HL4U56CFYoyC7g==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-sticky-regex": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.7.4.tgz", - "integrity": "sha512-Ls2NASyL6qtVe1H1hXts9yuEeONV2TJZmplLONkMPUG158CtmnrzW5Q5teibM5UVOFjG0D3IC5mzXR6pPpUY7A==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.8.3.tgz", + "integrity": "sha512-9Spq0vGCD5Bb4Z/ZXXSK5wbbLFMG085qd2vhL1JYu1WcQ5bXqZBAYRzU1d+p79GcHs2szYv5pVQCX13QgldaWw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-regex": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-regex": "^7.8.3" } }, "@babel/plugin-transform-template-literals": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.7.4.tgz", - "integrity": "sha512-sA+KxLwF3QwGj5abMHkHgshp9+rRz+oY9uoRil4CyLtgEuE/88dpkeWgNk5qKVsJE9iSfly3nvHapdRiIS2wnQ==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.8.3.tgz", + "integrity": "sha512-820QBtykIQOLFT8NZOcTRJ1UNuztIELe4p9DCgvj4NK+PwluSJ49we7s9FB1HIGNIYT7wFUJ0ar2QpCDj0escQ==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-annotate-as-pure": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-typeof-symbol": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.7.4.tgz", - "integrity": "sha512-KQPUQ/7mqe2m0B8VecdyaW5XcQYaePyl9R7IsKd+irzj6jvbhoGnRE+M0aNkyAzI07VfUQ9266L5xMARitV3wg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.3.tgz", + "integrity": "sha512-3TrkKd4LPqm4jHs6nPtSDI/SV9Cm5PRJkHLUgTcqRQQTMAZ44ZaAdDZJtvWFSaRcvT0a1rTmJ5ZA5tDKjleF3g==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/plugin-transform-unicode-regex": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.7.4.tgz", - "integrity": "sha512-N77UUIV+WCvE+5yHw+oks3m18/umd7y392Zv7mYTpFqHtkpcc+QUz+gLJNTWVlWROIWeLqY0f3OjZxV5TcXnRw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.8.3.tgz", + "integrity": "sha512-+ufgJjYdmWfSQ+6NS9VGUR2ns8cjJjYbrbi11mZBTaWm+Fui/ncTLFF28Ei1okavY+xkojGr1eJxNsWYeA5aZw==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0" + "@babel/helper-create-regexp-features-plugin": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" } }, "@babel/preset-env": { - "version": "7.7.7", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.7.7.tgz", - "integrity": "sha512-pCu0hrSSDVI7kCVUOdcMNQEbOPJ52E+LrQ14sN8uL2ALfSqePZQlKrOy+tM4uhEdYlCHi4imr8Zz2cZe9oSdIg==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.8.3.tgz", + "integrity": "sha512-Rs4RPL2KjSLSE2mWAx5/iCH+GC1ikKdxPrhnRS6PfFVaiZeom22VFKN4X8ZthyN61kAaR05tfXTbCvatl9WIQg==", "dev": true, "requires": { - "@babel/helper-module-imports": "^7.7.4", - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-async-generator-functions": "^7.7.4", - "@babel/plugin-proposal-dynamic-import": "^7.7.4", - "@babel/plugin-proposal-json-strings": "^7.7.4", - "@babel/plugin-proposal-object-rest-spread": "^7.7.7", - "@babel/plugin-proposal-optional-catch-binding": "^7.7.4", - "@babel/plugin-proposal-unicode-property-regex": "^7.7.7", - "@babel/plugin-syntax-async-generators": "^7.7.4", - "@babel/plugin-syntax-dynamic-import": "^7.7.4", - "@babel/plugin-syntax-json-strings": "^7.7.4", - "@babel/plugin-syntax-object-rest-spread": "^7.7.4", - "@babel/plugin-syntax-optional-catch-binding": "^7.7.4", - "@babel/plugin-syntax-top-level-await": "^7.7.4", - "@babel/plugin-transform-arrow-functions": "^7.7.4", - "@babel/plugin-transform-async-to-generator": "^7.7.4", - "@babel/plugin-transform-block-scoped-functions": "^7.7.4", - "@babel/plugin-transform-block-scoping": "^7.7.4", - "@babel/plugin-transform-classes": "^7.7.4", - "@babel/plugin-transform-computed-properties": "^7.7.4", - "@babel/plugin-transform-destructuring": "^7.7.4", - "@babel/plugin-transform-dotall-regex": "^7.7.7", - "@babel/plugin-transform-duplicate-keys": "^7.7.4", - "@babel/plugin-transform-exponentiation-operator": "^7.7.4", - "@babel/plugin-transform-for-of": "^7.7.4", - "@babel/plugin-transform-function-name": "^7.7.4", - "@babel/plugin-transform-literals": "^7.7.4", - "@babel/plugin-transform-member-expression-literals": "^7.7.4", - "@babel/plugin-transform-modules-amd": "^7.7.5", - "@babel/plugin-transform-modules-commonjs": "^7.7.5", - "@babel/plugin-transform-modules-systemjs": "^7.7.4", - "@babel/plugin-transform-modules-umd": "^7.7.4", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.7.4", - "@babel/plugin-transform-new-target": "^7.7.4", - "@babel/plugin-transform-object-super": "^7.7.4", - "@babel/plugin-transform-parameters": "^7.7.7", - "@babel/plugin-transform-property-literals": "^7.7.4", - "@babel/plugin-transform-regenerator": "^7.7.5", - "@babel/plugin-transform-reserved-words": "^7.7.4", - "@babel/plugin-transform-shorthand-properties": "^7.7.4", - "@babel/plugin-transform-spread": "^7.7.4", - "@babel/plugin-transform-sticky-regex": "^7.7.4", - "@babel/plugin-transform-template-literals": "^7.7.4", - "@babel/plugin-transform-typeof-symbol": "^7.7.4", - "@babel/plugin-transform-unicode-regex": "^7.7.4", - "@babel/types": "^7.7.4", - "browserslist": "^4.6.0", - "core-js-compat": "^3.6.0", + "@babel/compat-data": "^7.8.0", + "@babel/helper-compilation-targets": "^7.8.3", + "@babel/helper-module-imports": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-proposal-async-generator-functions": "^7.8.3", + "@babel/plugin-proposal-dynamic-import": "^7.8.3", + "@babel/plugin-proposal-json-strings": "^7.8.3", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-proposal-object-rest-spread": "^7.8.3", + "@babel/plugin-proposal-optional-catch-binding": "^7.8.3", + "@babel/plugin-proposal-optional-chaining": "^7.8.3", + "@babel/plugin-proposal-unicode-property-regex": "^7.8.3", + "@babel/plugin-syntax-async-generators": "^7.8.0", + "@babel/plugin-syntax-dynamic-import": "^7.8.0", + "@babel/plugin-syntax-json-strings": "^7.8.0", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", + "@babel/plugin-syntax-optional-chaining": "^7.8.0", + "@babel/plugin-syntax-top-level-await": "^7.8.3", + "@babel/plugin-transform-arrow-functions": "^7.8.3", + "@babel/plugin-transform-async-to-generator": "^7.8.3", + "@babel/plugin-transform-block-scoped-functions": "^7.8.3", + "@babel/plugin-transform-block-scoping": "^7.8.3", + "@babel/plugin-transform-classes": "^7.8.3", + "@babel/plugin-transform-computed-properties": "^7.8.3", + "@babel/plugin-transform-destructuring": "^7.8.3", + "@babel/plugin-transform-dotall-regex": "^7.8.3", + "@babel/plugin-transform-duplicate-keys": "^7.8.3", + "@babel/plugin-transform-exponentiation-operator": "^7.8.3", + "@babel/plugin-transform-for-of": "^7.8.3", + "@babel/plugin-transform-function-name": "^7.8.3", + "@babel/plugin-transform-literals": "^7.8.3", + "@babel/plugin-transform-member-expression-literals": "^7.8.3", + "@babel/plugin-transform-modules-amd": "^7.8.3", + "@babel/plugin-transform-modules-commonjs": "^7.8.3", + "@babel/plugin-transform-modules-systemjs": "^7.8.3", + "@babel/plugin-transform-modules-umd": "^7.8.3", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.8.3", + "@babel/plugin-transform-new-target": "^7.8.3", + "@babel/plugin-transform-object-super": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.8.3", + "@babel/plugin-transform-property-literals": "^7.8.3", + "@babel/plugin-transform-regenerator": "^7.8.3", + "@babel/plugin-transform-reserved-words": "^7.8.3", + "@babel/plugin-transform-shorthand-properties": "^7.8.3", + "@babel/plugin-transform-spread": "^7.8.3", + "@babel/plugin-transform-sticky-regex": "^7.8.3", + "@babel/plugin-transform-template-literals": "^7.8.3", + "@babel/plugin-transform-typeof-symbol": "^7.8.3", + "@babel/plugin-transform-unicode-regex": "^7.8.3", + "@babel/types": "^7.8.3", + "browserslist": "^4.8.2", + "core-js-compat": "^3.6.2", "invariant": "^2.2.2", - "js-levenshtein": "^1.1.3", + "levenary": "^1.1.0", "semver": "^5.5.0" - }, - "dependencies": { - "@babel/helper-module-imports": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.7.4.tgz", - "integrity": "sha512-dGcrX6K9l8258WFjyDLJwuVKxR4XZfU0/vTUgOQYWEnRD8mgr+p4d6fCUMq/ys0h4CCt/S5JhbvtyErjWouAUQ==", - "dev": true, - "requires": { - "@babel/types": "^7.7.4" - } - }, - "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - } } }, "@babel/preset-react": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.7.4.tgz", - "integrity": "sha512-j+vZtg0/8pQr1H8wKoaJyGL2IEk3rG/GIvua7Sec7meXVIvGycihlGMx5xcU00kqCJbwzHs18xTu3YfREOqQ+g==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.8.3.tgz", + "integrity": "sha512-9hx0CwZg92jGb7iHYQVgi0tOEHP/kM60CtWJQnmbATSPIQQ2xYzfoCI3EdqAhFBeeJwYMdWQuDUHMsuDbH9hyQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-transform-react-display-name": "^7.7.4", - "@babel/plugin-transform-react-jsx": "^7.7.4", - "@babel/plugin-transform-react-jsx-self": "^7.7.4", - "@babel/plugin-transform-react-jsx-source": "^7.7.4" + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-transform-react-display-name": "^7.8.3", + "@babel/plugin-transform-react-jsx": "^7.8.3", + "@babel/plugin-transform-react-jsx-self": "^7.8.3", + "@babel/plugin-transform-react-jsx-source": "^7.8.3" } }, "@babel/template": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz", - "integrity": "sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.3.tgz", + "integrity": "sha512-04m87AcQgAFdvuoyiQ2kgELr2tV8B4fP/xJAVUL3Yb3bkNdMedD3d0rlSQr3PegP0cms3eHjl1F7PWlvWbU8FQ==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.4", - "@babel/types": "^7.7.4" - }, - "dependencies": { - "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - } + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.3", + "@babel/types": "^7.8.3" } }, "@babel/traverse": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.7.4.tgz", - "integrity": "sha512-P1L58hQyupn8+ezVA2z5KBm4/Zr4lCC8dwKCMYzsa5jFMDMQAzaBNy9W5VjB+KAmBjb40U7a/H6ao+Xo+9saIw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.3.tgz", + "integrity": "sha512-we+a2lti+eEImHmEXp7bM9cTxGzxPmBiVJlLVD+FuuQMeeO7RaDbutbgeheDkw+Xe3mCfJHnGOWLswT74m2IPg==", "dev": true, "requires": { - "@babel/code-frame": "^7.5.5", - "@babel/generator": "^7.7.4", - "@babel/helper-function-name": "^7.7.4", - "@babel/helper-split-export-declaration": "^7.7.4", - "@babel/parser": "^7.7.4", - "@babel/types": "^7.7.4", + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.8.3", + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/parser": "^7.8.3", + "@babel/types": "^7.8.3", "debug": "^4.1.0", "globals": "^11.1.0", "lodash": "^4.17.13" }, "dependencies": { - "@babel/types": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", - "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", - "dev": true, - "requires": { - "esutils": "^2.0.2", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } - }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -1305,9 +1022,9 @@ } }, "@babel/types": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.5.5.tgz", - "integrity": "sha512-s63F9nJioLqOlW3UkyMd+BYhXt44YuaFm/VV0VwuteqjYwRrObkU7ra9pY4wAJR3oXi8hJrMcrcJdO/HH33vtw==", + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.8.3.tgz", + "integrity": "sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==", "dev": true, "requires": { "esutils": "^2.0.2", @@ -1320,15 +1037,25 @@ "resolved": "https://registry.npmjs.org/@icons/material/-/material-0.2.4.tgz", "integrity": "sha512-QPcGmICAPbGLGb6F/yNf/KzKqvFx8z5qx3D1yFqVAjoFmXK35EgyW+cJ57Te3CNsmzblwtzakLGFqHPqrfb4Tw==" }, - "@types/asap": { + "@react-dnd/asap": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@react-dnd/asap/-/asap-4.0.0.tgz", + "integrity": "sha512-0XhqJSc6pPoNnf8DhdsPHtUhRzZALVzYMTzRwV4VI6DJNJ/5xxfL9OQUwb8IH5/2x7lSf7nAZrnzUD+16VyOVQ==" + }, + "@react-dnd/invariant": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@types/asap/-/asap-2.0.0.tgz", - "integrity": "sha512-upIS0Gt9Mc8eEpCbYMZ1K8rhNosfKUtimNcINce+zLwJF5UpM3Vv7yz3S5l/1IX+DxTa8lTkUjqynvjRXyJzsg==" + "resolved": "https://registry.npmjs.org/@react-dnd/invariant/-/invariant-2.0.0.tgz", + "integrity": "sha512-xL4RCQBCBDJ+GRwKTFhGUW8GXa4yoDfJrPbLblc3U09ciS+9ZJXJ3Qrcs/x2IODOdIE5kQxvMmE2UKyqUictUw==" + }, + "@react-dnd/shallowequal": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@react-dnd/shallowequal/-/shallowequal-2.0.0.tgz", + "integrity": "sha512-Pc/AFTdwZwEKJxFJvlxrSmGe/di+aAOBn60sremrpLo6VI/6cmiUYNNwlI5KNYttg7uypzA3ILPMPgxB2GYZEg==" }, "@types/estree": { - "version": "0.0.40", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.40.tgz", - "integrity": "sha512-p3KZgMto/JyxosKGmnLDJ/dG5wf+qTRMUjHJcspC2oQKa4jP7mz+tv0ND56lLBu3ojHlhzY33Ol+khLyNmilkA==", + "version": "0.0.42", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.42.tgz", + "integrity": "sha512-K1DPVvnBCPxzD+G51/cxVIoc2X8uUVl1zpJeE6iKcgHMj4+tbat5Xu4TjV7v2QSDbIeAfLi2hIk+u2+s0MlpUQ==", "dev": true }, "@types/hoist-non-react-statics": { @@ -1340,15 +1067,10 @@ "hoist-non-react-statics": "^3.3.0" } }, - "@types/invariant": { - "version": "2.2.30", - "resolved": "https://registry.npmjs.org/@types/invariant/-/invariant-2.2.30.tgz", - "integrity": "sha512-98fB+yo7imSD2F7PF7GIpELNgtLNgo5wjivu0W5V4jx+KVVJxo6p/qN4zdzSTBWy4/sN3pPyXwnhRSD28QX+ag==" - }, "@types/node": { - "version": "12.6.8", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.6.8.tgz", - "integrity": "sha512-aX+gFgA5GHcDi89KG5keey2zf0WfZk/HAQotEamsK2kbey+8yGKcson0hbK8E+v0NArlCJQCqMP161YhV6ZXLg==", + "version": "13.1.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.1.7.tgz", + "integrity": "sha512-HU0q9GXazqiKwviVxg9SI/+t/nAsGkvLDkIdxz+ObejG2nX6Si00TeLqHMoS+a/1tjH7a8YpKVQwtgHuMQsldg==", "dev": true }, "@types/prop-types": { @@ -1357,9 +1079,9 @@ "integrity": "sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw==" }, "@types/react": { - "version": "16.9.16", - "resolved": "https://registry.npmjs.org/@types/react/-/react-16.9.16.tgz", - "integrity": "sha512-dQ3wlehuBbYlfvRXfF5G+5TbZF3xqgkikK7DWAsQXe2KnzV+kjD4W2ea+ThCrKASZn9h98bjjPzoTYzfRqyBkw==", + "version": "16.9.17", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.9.17.tgz", + "integrity": "sha512-UP27In4fp4sWF5JgyV6pwVPAQM83Fj76JOcg02X5BZcpSu5Wx+fP9RMqc2v0ssBoQIFvD5JdKY41gjJJKmw6Bg==", "requires": { "@types/prop-types": "*", "csstype": "^2.2.0" @@ -1374,11 +1096,6 @@ "@types/node": "*" } }, - "@types/shallowequal": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/shallowequal/-/shallowequal-1.1.1.tgz", - "integrity": "sha512-Lhni3aX80zbpdxRuWhnuYPm8j8UQaa571lHP/xI4W+7BAFhSIhRReXnqjEgT/XzPoXZTJkCqstFMJ8CZTK6IlQ==" - }, "abstract-leveldown": { "version": "0.12.4", "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-0.12.4.tgz", @@ -1462,11 +1179,6 @@ "dev": true, "optional": true }, - "asap": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" - }, "asn1.js": { "version": "4.10.1", "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", @@ -1753,14 +1465,14 @@ } }, "browserslist": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.8.2.tgz", - "integrity": "sha512-+M4oeaTplPm/f1pXDw84YohEv7B1i/2Aisei8s4s6k3QsoSHa7i5sz8u/cGQkkatCPxMASKxPualR4wwYgVboA==", + "version": "4.8.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.8.3.tgz", + "integrity": "sha512-iU43cMMknxG1ClEZ2MDKeonKE1CCrFVkQK2AqO2YWFmvIrx4JWrvQ4w4hQez6EpVI8rHTtqh/ruHHDHSOKxvUg==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001015", + "caniuse-lite": "^1.0.30001017", "electron-to-chromium": "^1.3.322", - "node-releases": "^1.1.42" + "node-releases": "^1.1.44" } }, "buffer-es6": { @@ -1806,9 +1518,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001016", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001016.tgz", - "integrity": "sha512-yYQ2QfotceRiH4U+h1Us86WJXtVHDmy3nEKIdYPsZCYnOV5/tMgGbmoIlrMzmh2VXlproqYtVaKeGDBkMZifFA==", + "version": "1.0.30001021", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001021.tgz", + "integrity": "sha512-wuMhT7/hwkgd8gldgp2jcrUjOU9RXJ4XxGumQeOsUr91l3WwmM68Cpa/ymCnWEDqakwFXhuDQbaKNHXBPgeE9g==", "dev": true }, "chalk": { @@ -1911,9 +1623,9 @@ "dev": true }, "commander": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.0.1.tgz", - "integrity": "sha512-IPF4ouhCP+qdlcmCedhxX4xiGBPyigb8v5NeUp+0LyhwLgxMqyp3S0vl7TAPfS/hiP7FC3caI/PB9lTmP8r1NA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.0.tgz", + "integrity": "sha512-NIQrwvv9V39FHgGFm36+U9SMQzbiHvU79k+iADraJTpmrFFfx7Ds0IvDoAdZsDrknlkRk14OYoWXb57uTh7/sw==", "dev": true }, "component-emitter": { @@ -1958,12 +1670,12 @@ "optional": true }, "core-js-compat": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.0.tgz", - "integrity": "sha512-Z3eCNjGgoYluH89Jt4wVkfYsc/VdLrA2/woX5lm0isO/pCT+P+Y+o65bOuEnjDJLthdwTBxbCVzptTXtc18fJg==", + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.4.tgz", + "integrity": "sha512-zAa3IZPvsJ0slViBQ2z+vgyyTuhd3MFn1rBQjZSKVEgB0UMYhUkCj9jJUVPgGTGqWvsBVmfnruXgTcNyTlEiSA==", "dev": true, "requires": { - "browserslist": "^4.8.2", + "browserslist": "^4.8.3", "semver": "7.0.0" }, "dependencies": { @@ -2043,9 +1755,9 @@ "integrity": "sha512-msVS9qTuMT5zwAGCVm4mxfrZ18BNc6Csd0oJAtiFMZ1FAx1CCvy2+5MDmYoix63LM/6NDbNtodCiGYGmFgO0dA==" }, "date-fns": { - "version": "1.30.1", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.30.1.tgz", - "integrity": "sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==" + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.9.0.tgz", + "integrity": "sha512-khbFLu/MlzLjEzy9Gh8oY1hNt/Dvxw3J6Rbc28cVoYWQaC1S3YI4xwkF9ZWcjDLscbZlY9hISMr66RFzZagLsA==" }, "debug": { "version": "2.6.9", @@ -2128,9 +1840,9 @@ } }, "des.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", "dev": true, "requires": { "inherits": "^2.0.1", @@ -2149,27 +1861,25 @@ } }, "dnd-core": { - "version": "9.5.1", - "resolved": "https://registry.npmjs.org/dnd-core/-/dnd-core-9.5.1.tgz", - "integrity": "sha512-/yEWFF2jg51yyB8uA2UbvBr9Qis0Oo/4p9cqHLEKZdxzHHVSPfq0a/ool8NG6dIS6Q4uN+oKGObY0rNWiopJDA==", + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/dnd-core/-/dnd-core-10.0.2.tgz", + "integrity": "sha512-PrxEjxF0+6Y1n1n1Z9hSWZ1tvnDXv9syL+BccV1r1RC08uWNsyetf8AnWmUF3NgYPwy0HKQJwTqGkZK+1NlaFA==", "requires": { - "@types/asap": "^2.0.0", - "@types/invariant": "^2.2.30", - "asap": "^2.0.6", - "invariant": "^2.2.4", + "@react-dnd/asap": "^4.0.0", + "@react-dnd/invariant": "^2.0.0", "redux": "^4.0.4" } }, "electron-to-chromium": { - "version": "1.3.322", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.322.tgz", - "integrity": "sha512-Tc8JQEfGQ1MzfSzI/bTlSr7btJv/FFO7Yh6tanqVmIWOuNCu6/D1MilIEgLtmWqIrsv+o4IjpLAhgMBr/ncNAA==", + "version": "1.3.335", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.335.tgz", + "integrity": "sha512-ngKsDGd/xr2lAZvilxTfdvfEiQKmavyXd6irlswaHnewmXoz6JgbM9FUNwgp3NFIUHHegh1F87H8f5BJ8zABxw==", "dev": true }, "elliptic": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.0.tgz", - "integrity": "sha512-eFOJTMyCYb7xtE/caJ6JJu+bhi67WCYNbkGSknu20pmM8Ke/bqOfdnZWxyoGN26JgfxTbXrsCkEw4KheCT/KGg==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", + "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", "dev": true, "requires": { "bn.js": "^4.4.0", @@ -3021,6 +2731,12 @@ } } }, + "gensync": { + "version": "1.0.0-beta.1", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", + "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", + "dev": true + }, "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", @@ -3196,6 +2912,7 @@ "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dev": true, "requires": { "loose-envify": "^1.0.0" } @@ -3399,12 +3116,6 @@ "dev": true, "optional": true }, - "js-levenshtein": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", - "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==", - "dev": true - }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -3644,6 +3355,21 @@ } } }, + "leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true + }, + "levenary": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/levenary/-/levenary-1.1.0.tgz", + "integrity": "sha512-VHcwhO0UTpUW7rLPN2/OiWJdgA1e9BqEDALhrgCe/F+uUJnep6CoUsTzMeP8Rh0NGr9uKquXxqe7lwLZo509nQ==", + "dev": true, + "requires": { + "leven": "^3.1.0" + } + }, "lodash": { "version": "4.17.15", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", @@ -3664,9 +3390,9 @@ "dev": true }, "magic-string": { - "version": "0.25.3", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.3.tgz", - "integrity": "sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA==", + "version": "0.25.6", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.6.tgz", + "integrity": "sha512-3a5LOMSGoCTH5rbqobC2HuDNRtE2glHZ8J7pK+QZYppyWA36yuNpsX994rIY2nCuyP7CZYy7lQq/X2jygiZ89g==", "dev": true, "requires": { "sourcemap-codec": "^1.4.4" @@ -3832,9 +3558,9 @@ } }, "node-releases": { - "version": "1.1.43", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.43.tgz", - "integrity": "sha512-Rmfnj52WNhvr83MvuAWHEqXVoZXCcDQssSOffU4n4XOL9sPrP61mSZ88g25NqmABDvH7PiAlFCzoSCSdzA293w==", + "version": "1.1.45", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.45.tgz", + "integrity": "sha512-cXvGSfhITKI8qsV116u2FTzH5EWZJfgG7d4cpqwF8I8+1tWpD6AsvvGRKq2onR0DNj1jfqsjkXZsm14JMS7Cyg==", "dev": true, "requires": { "semver": "^6.3.0" @@ -3948,9 +3674,9 @@ } }, "parse-asn1": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.4.tgz", - "integrity": "sha512-Qs5duJcuvNExRfFZ99HDD3z4mAi3r9Wl/FOjEOijlxwCZs7E7mW2vjTpgQ4J8LpTF8x5v+1Vn5UQFejmWT11aw==", + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.5.tgz", + "integrity": "sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ==", "dev": true, "requires": { "asn1.js": "^4.0.0", @@ -4086,9 +3812,9 @@ } }, "react-color": { - "version": "2.17.3", - "resolved": "https://registry.npmjs.org/react-color/-/react-color-2.17.3.tgz", - "integrity": "sha512-1dtO8LqAVotPIChlmo6kLtFS1FP89ll8/OiA8EcFRDR+ntcK+0ukJgByuIQHRtzvigf26dV5HklnxDIvhON9VQ==", + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/react-color/-/react-color-2.18.0.tgz", + "integrity": "sha512-FyVeU1kQiSokWc8NPz22azl1ezLpJdUyTbWL0LPUpcuuYDrZ/Y1veOk9rRK5B3pMlyDGvTk4f4KJhlkIQNRjEA==", "requires": { "@icons/material": "^0.2.4", "lodash": "^4.17.11", @@ -4099,29 +3825,28 @@ } }, "react-dnd": { - "version": "9.5.1", - "resolved": "https://registry.npmjs.org/react-dnd/-/react-dnd-9.5.1.tgz", - "integrity": "sha512-j2MvziPNLsxXkb3kIJzLvvOv/TQ4sysp6U4CmxAXd4C884dXm/9UGdB7K1wkTW3ZxVpI1K7XhKbX0JgNlPfLcA==", + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/react-dnd/-/react-dnd-10.0.2.tgz", + "integrity": "sha512-SC2Ymvntynhoqtf5zaFhZscm9xenCoMofilxPdlwUlaelAzmbl9fw82C4ZJ//+lNm3kWAKXjGDZg2/aWjKEAtg==", "requires": { + "@react-dnd/shallowequal": "^2.0.0", "@types/hoist-non-react-statics": "^3.3.1", - "@types/shallowequal": "^1.1.1", - "dnd-core": "^9.5.1", - "hoist-non-react-statics": "^3.3.0", - "shallowequal": "^1.1.0" + "dnd-core": "^10.0.2", + "hoist-non-react-statics": "^3.3.0" } }, "react-dnd-html5-backend": { - "version": "9.5.1", - "resolved": "https://registry.npmjs.org/react-dnd-html5-backend/-/react-dnd-html5-backend-9.5.1.tgz", - "integrity": "sha512-wUdzjREwLqHxFkA6E+XDVL5IFjRDbBI3SHVKil9n3qrGT5dm2tA2oi1aIALdfMKsu00c+OXA9lz/LuKZCE9KXg==", + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/react-dnd-html5-backend/-/react-dnd-html5-backend-10.0.2.tgz", + "integrity": "sha512-ny17gUdInZ6PIGXdzfwPhoztRdNVVvjoJMdG80hkDBamJBeUPuNF2Wv4D3uoQJLjXssX1+i9PhBqc7EpogClwQ==", "requires": { - "dnd-core": "^9.5.1" + "dnd-core": "^10.0.2" } }, "react-is": { - "version": "16.8.6", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.6.tgz", - "integrity": "sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA==" + "version": "16.12.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.12.0.tgz", + "integrity": "sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q==" }, "reactcss": { "version": "1.2.3", @@ -4132,9 +3857,9 @@ } }, "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", "dev": true, "requires": { "core-util-is": "~1.0.0", @@ -4159,9 +3884,9 @@ } }, "redux": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/redux/-/redux-4.0.4.tgz", - "integrity": "sha512-vKv4WdiJxOWKxK0yRoaK3Y4pxxB0ilzVx6dszU2W8wLxlb2yikRph4iV/ymtdJ6ZxpBLFbyrxklnT5yBbQSl3Q==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.0.5.tgz", + "integrity": "sha512-VSz1uMAH24DM6MF72vcojpYPtrTUu3ByVWfPL1nPfVRb5mZVTve5GnNCUV53QM/BZ66xfWrm0CTWoM+Xlz8V1w==", "requires": { "loose-envify": "^1.4.0", "symbol-observable": "^1.2.0" @@ -4223,9 +3948,9 @@ "dev": true }, "regjsparser": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.1.tgz", - "integrity": "sha512-7LutE94sz/NKSYegK+/4E77+8DipxF+Qn2Tmu362AcmsF2NYq/wx3+ObvU90TKEhjf7hQoFXo23ajjrXP7eUgg==", + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.2.tgz", + "integrity": "sha512-E9ghzUtoLwDekPT0DYCp+c4h+bvuUpe6rRHCTYn6eGoqj1LgKXxT6I0Il4WbjhQkOghzi/V+y03bPKvbllL93Q==", "dev": true, "requires": { "jsesc": "~0.5.0" @@ -4261,9 +3986,9 @@ "optional": true }, "resolve": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.1.tgz", - "integrity": "sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw==", + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.14.2.tgz", + "integrity": "sha512-EjlOBLBO1kxsUxsKjLt7TAECyKW6fOh1VRkykQkKGzcBbjjPIxBqGh0jf7GJ3k/f5mxMqW3htMD3WdTUVtW8HQ==", "dev": true, "requires": { "path-parse": "^1.0.6" @@ -4294,9 +4019,9 @@ } }, "rollup": { - "version": "1.27.13", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.27.13.tgz", - "integrity": "sha512-hDi7M07MpmNSDE8YVwGVFA8L7n8jTLJ4lG65nMAijAyqBe//rtu4JdxjUBE7JqXfdpqxqDTbCDys9WcqdpsQvw==", + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.29.0.tgz", + "integrity": "sha512-V63Iz0dSdI5qPPN5HmCN6OBRzBFhMqNWcvwgq863JtSCTU6Vdvqq6S2fYle/dSCyoPrBkIP3EIr1RVs3HTRqqg==", "dev": true, "requires": { "@types/estree": "*", @@ -4400,9 +4125,9 @@ } }, "rollup-pluginutils": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.1.tgz", - "integrity": "sha512-J5oAoysWar6GuZo0s+3bZ6sVZAC0pfqKz68De7ZgDi5z63jOVZn1uJL/+z1jeKHNbGII8kAyHF5q8LnxSX5lQg==", + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", + "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", "dev": true, "requires": { "estree-walker": "^0.6.1" @@ -4465,11 +4190,6 @@ "safe-buffer": "^5.0.1" } }, - "shallowequal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", - "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" - }, "slash": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", @@ -4608,13 +4328,13 @@ "dev": true }, "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", "dev": true, "optional": true, "requires": { - "atob": "^2.1.1", + "atob": "^2.1.2", "decode-uri-component": "^0.2.0", "resolve-url": "^0.2.1", "source-map-url": "^0.4.0", @@ -4647,9 +4367,9 @@ "optional": true }, "sourcemap-codec": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.6.tgz", - "integrity": "sha512-1ZooVLYFxC448piVLBbtOxFcXwnymH9oUF8nRd3CuYDVvkRBxRl6pB4Mtas5a4drtL+E8LDgFkQNcgIw6tc8Hg==", + "version": "1.4.7", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.7.tgz", + "integrity": "sha512-RuN23NzhAOuUtaivhcrjXx1OPXsFeH9m5sI373/U7+tGLKihjUyboZAzOadytMjnqHp1f45RGk1IzDKCpDpSYA==", "dev": true }, "split-string": { @@ -4715,9 +4435,9 @@ "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==" }, "terser": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.4.3.tgz", - "integrity": "sha512-0ikKraVtRDKGzHrzkCv5rUNDzqlhmhowOBqC0XqUHFpW+vJ45+20/IFBcebwKfiS2Z9fJin6Eo+F1zLZsxi8RA==", + "version": "4.6.3", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.6.3.tgz", + "integrity": "sha512-Lw+ieAXmY69d09IIc/yqeBqXpEQIpDGZqT34ui1QWXIUpR2RjbqEkT8X7Lgex19hslSqcWM5iMN2kM11eMsESQ==", "dev": true, "requires": { "commander": "^2.20.0", diff --git a/frontend/vendor/package.json b/frontend/vendor/package.json index 67fcd253d..8cb76be4c 100644 --- a/frontend/vendor/package.json +++ b/frontend/vendor/package.json @@ -14,27 +14,27 @@ "author": "", "license": "MPL2", "devDependencies": { - "@babel/cli": "^7.7.7", - "@babel/core": "^7.7.7", - "@babel/plugin-proposal-class-properties": "^7.7.4", - "@babel/plugin-proposal-export-default-from": "^7.7.4", - "@babel/preset-env": "^7.7.7", - "@babel/preset-react": "^7.7.4", - "rollup": "^1.27.13", + "@babel/cli": "^7.8.3", + "@babel/core": "^7.8.3", + "@babel/plugin-proposal-class-properties": "^7.8.3", + "@babel/plugin-proposal-export-default-from": "^7.8.3", + "@babel/preset-env": "^7.8.3", + "@babel/preset-react": "^7.8.3", + "rollup": "^1.29.0", "rollup-plugin-babel": "^4.3.2", "rollup-plugin-commonjs": "^10.1.0", "rollup-plugin-node-builtins": "^2.1.2", "rollup-plugin-node-globals": "^1.4.0", "rollup-plugin-node-resolve": "^5.0.0", "rollup-plugin-replace": "^2.2.0", - "terser": "^4.4.3" + "terser": "^4.6.3" }, "dependencies": { - "date-fns": "^1.30.1", + "date-fns": "^2.9.0", "randomcolor": "^0.5.4", - "react-color": "^2.17.3", - "react-dnd": "^9.5.1", - "react-dnd-html5-backend": "^9.5.1", + "react-color": "^2.18.0", + "react-dnd": "^10.0.2", + "react-dnd-html5-backend": "^10.0.2", "snapsvg": "^0.5.1" } } diff --git a/frontend/vendor/react-color/react-color.bundle.js b/frontend/vendor/react-color/react-color.bundle.js index 4688fc2f0..5637fbbf4 100644 --- a/frontend/vendor/react-color/react-color.bundle.js +++ b/frontend/vendor/react-color/react-color.bundle.js @@ -5057,14 +5057,13 @@ var EditableInput = exports.EditableInput = function (_ref) { } _createClass(EditableInput, [{ - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - var input = this.input; - if (nextProps.value !== this.state.value) { - if (input === document.activeElement) { - this.setState({ blurValue: String(nextProps.value).toUpperCase() }); + key: 'componentDidUpdate', + value: function componentDidUpdate(prevProps, prevState) { + if (this.props.value !== this.state.value && (prevProps.value !== this.props.value || prevState.value !== this.state.value)) { + if (this.input === document.activeElement) { + this.setState({ blurValue: String(this.props.value).toUpperCase() }); } else { - this.setState({ value: String(nextProps.value).toUpperCase(), blurValue: !this.state.blurValue && String(nextProps.value).toUpperCase() }); + this.setState({ value: String(this.props.value).toUpperCase(), blurValue: !this.state.blurValue && String(this.props.value).toUpperCase() }); } } } @@ -5086,7 +5085,7 @@ var EditableInput = exports.EditableInput = function (_ref) { }, { key: 'setUpdatedValue', value: function setUpdatedValue(value, e) { - var onChangeValue = this.props.label !== null ? this.getValueObjectWithLabel(value) : value; + var onChangeValue = this.props.label ? this.getValueObjectWithLabel(value) : value; this.props.onChange && this.props.onChange(onChangeValue, e); var isPercentage = getIsPercentage(e.target.value); @@ -5832,14 +5831,16 @@ var calculateChange = exports.calculateChange = function calculateChange(e, hsl, left = 0; } else if (left > containerWidth) { left = containerWidth; - } else if (top < 0) { + } + + if (top < 0) { top = 0; } else if (top > containerHeight) { top = containerHeight; } - var saturation = left * 100 / containerWidth; - var bright = -(top * 100 / containerHeight) + 100; + var saturation = left / containerWidth; + var bright = 1 - top / containerHeight; return { h: hsl.h, @@ -7403,11 +7404,6 @@ var ColorWrap = exports.ColorWrap = function ColorWrap(Picker) { } _createClass(ColorPicker, [{ - key: 'componentWillReceiveProps', - value: function componentWillReceiveProps(nextProps) { - this.setState(_extends({}, _color2.default.toState(nextProps.color, this.state.oldHue))); - } - }, { key: 'render', value: function render() { var optionalEvents = {}; @@ -7419,6 +7415,11 @@ var ColorWrap = exports.ColorWrap = function ColorWrap(Picker) { onChange: this.handleChange }, optionalEvents)); } + }], [{ + key: 'getDerivedStateFromProps', + value: function getDerivedStateFromProps(nextProps, state) { + return _extends({}, _color2.default.toState(nextProps.color, state.oldHue)); + } }]); return ColorPicker; diff --git a/frontend/vendor/react-color/react-color.bundle.min.js b/frontend/vendor/react-color/react-color.bundle.min.js index 041fe7949..dc4753dc4 100644 --- a/frontend/vendor/react-color/react-color.bundle.min.js +++ b/frontend/vendor/react-color/react-color.bundle.min.js @@ -1 +1 @@ -!function(e){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e;var t="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function o(e,t){return e(t={exports:{}},t.exports),t.exports}var a="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";function i(){}function u(){}u.resetWarningCache=i;var l=o((function(e){e.exports=function(){function e(e,t,r,n,o,i){if(i!==a){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:u,resetWarningCache:i};return r.PropTypes=r,r}()})),s="object"==typeof r&&r&&r.Object===Object&&r,c="object"==typeof self&&self&&self.Object===Object&&self,f=s||c||Function("return this")(),p=f.Symbol,d=Object.prototype,h=d.hasOwnProperty,v=d.toString,b=p?p.toStringTag:void 0;var g=function(e){var t=h.call(e,b),r=e[b];try{e[b]=void 0;var n=!0}catch(e){}var o=v.call(e);return n&&(t?e[b]=r:delete e[b]),o},y=Object.prototype.toString;var _=function(e){return y.call(e)},m="[object Null]",w="[object Undefined]",x=p?p.toStringTag:void 0;var j=function(e){return null==e?void 0===e?w:m:x&&x in Object(e)?g(e):_(e)},O=Array.isArray;var S=function(e){return null!=e&&"object"==typeof e},C="[object String]";var k=function(e){return"string"==typeof e||!O(e)&&S(e)&&j(e)==C};var E=function(e){return function(t,r,n){for(var o=-1,a=Object(t),i=n(t),u=i.length;u--;){var l=i[e?u:++o];if(!1===r(a[l],l,a))break}return t}}();var A=function(e,t){for(var r=-1,n=Array(e);++r-1&&e%1==0&&e-1&&e%1==0&&e<=W},N={};N["[object Float32Array]"]=N["[object Float64Array]"]=N["[object Int8Array]"]=N["[object Int16Array]"]=N["[object Int32Array]"]=N["[object Uint8Array]"]=N["[object Uint8ClampedArray]"]=N["[object Uint16Array]"]=N["[object Uint32Array]"]=!0,N["[object Arguments]"]=N["[object Array]"]=N["[object ArrayBuffer]"]=N["[object Boolean]"]=N["[object DataView]"]=N["[object Date]"]=N["[object Error]"]=N["[object Function]"]=N["[object Map]"]=N["[object Number]"]=N["[object Object]"]=N["[object RegExp]"]=N["[object Set]"]=N["[object String]"]=N["[object WeakMap]"]=!1;var V=function(e){return S(e)&&I(e.length)&&!!N[j(e)]};var $=function(e){return function(t){return e(t)}},X=o((function(e,t){var r=t&&!t.nodeType&&t,n=r&&e&&!e.nodeType&&e,o=n&&n.exports===r&&s.process,a=function(){try{var e=n&&n.require&&n.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=a})),q=X&&X.isTypedArray,Y=q?$(q):V,K=Object.prototype.hasOwnProperty;var G=function(e,t){var r=O(e),n=!r&&H(e),o=!r&&!n&&z(e),a=!r&&!n&&!o&&Y(e),i=r||n||o||a,u=i?A(e.length,String):[],l=u.length;for(var s in e)!t&&!K.call(e,s)||i&&("length"==s||o&&("offset"==s||"parent"==s)||a&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||B(s,l))||u.push(s);return u},J=Object.prototype;var Q=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||J)};var Z=function(e,t){return function(r){return e(t(r))}},ee=Z(Object.keys,Object),te=Object.prototype.hasOwnProperty;var re=function(e){if(!Q(e))return ee(e);var t=[];for(var r in Object(e))te.call(e,r)&&"constructor"!=r&&t.push(r);return t};var ne=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},oe="[object AsyncFunction]",ae="[object Function]",ie="[object GeneratorFunction]",ue="[object Proxy]";var le=function(e){if(!ne(e))return!1;var t=j(e);return t==ae||t==ie||t==oe||t==ue};var se=function(e){return null!=e&&I(e.length)&&!le(e)};var ce=function(e){return se(e)?G(e):re(e)};var fe=function(e,t){return e&&E(e,t,ce)};var pe=function(e){return e};var de=function(e){return"function"==typeof e?e:pe};var he=function(e,t){return e&&fe(e,de(t))},ve=Z(Object.getPrototypeOf,Object),be="[object Object]",ge=Function.prototype,ye=Object.prototype,_e=ge.toString,me=ye.hasOwnProperty,we=_e.call(Object);var xe=function(e){if(!S(e)||j(e)!=be)return!1;var t=ve(e);if(null===t)return!0;var r=me.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&_e.call(r)==we};var je=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r-1};var Pe=function(e,t){var r=this.__data__,n=Ce(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function Re(e){var t=-1,r=null==e?0:e.length;for(this.clear();++tu))return!1;var s=a.get(e);if(s&&a.get(t))return s==t;var c=-1,f=!0,p=r&Tt?new At:void 0;for(a.set(e,t),a.set(t,e);++c0&&void 0!==arguments[0]?arguments[0]:[],i=[];return(0,a.default)(t,(function(t){Array.isArray(t)?e(t).map((function(e){return i.push(e)})):(0,o.default)(t)?(0,n.default)(t,(function(e,t){!0===e&&i.push(t),i.push(t+"-"+e)})):(0,r.default)(t)&&i.push(t)})),i};t.default=u}));n(yn);yn.flattenNames;var _n=function(e,t){for(var r=-1,n=null==e?0:e.length;++r1&&void 0!==arguments[1]?arguments[1]:[],a=e.default&&(0,n.default)(e.default)||{};return t.map((function(t){var n=e[t];return n&&(0,r.default)(n,(function(e,t){a[t]||(a[t]={}),a[t]=o({},a[t],n[t])})),t})),a};t.default=i}));n(zo);zo.mergeClasses;var Do=o((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.autoprefix=void 0;var r,n=(r=he)&&r.__esModule?r:{default:r},o=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(r){function n(){var r,l,s;i(this,n);for(var c=arguments.length,f=Array(c),p=0;p1&&void 0!==arguments[1]?arguments[1]:"span";return function(r){function n(){var r,l,s;i(this,n);for(var c=arguments.length,f=Array(c),p=0;p1&&void 0!==arguments[1])||arguments[1];r[e]=t};return 0===e&&n("first-child"),e===t-1&&n("last-child"),(0===e||e%2==0)&&n("even"),1===Math.abs(e%2)&&n("odd"),n("nth-child",e),r}}));n(Wo);var Io=o((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ReactCSS=t.loop=t.handleActive=t.handleHover=t.hover=void 0;var r=l(yn),n=l(zo),o=l(Do),a=l(Uo),i=l(Bo),u=l(Wo);function l(e){return e&&e.__esModule?e:{default:e}}t.hover=a.default,t.handleHover=a.default,t.handleActive=i.default,t.loop=u.default;var s=t.ReactCSS=function(e){for(var t=arguments.length,a=Array(t>1?t-1:0),i=1;i0){if(++t>=ea)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Zo);var oa=function(e,t){return na(Jo(e,t,pe),e+"")};var aa=function(e,t,r){if(!ne(r))return!1;var n=typeof t;return!!("number"==n?se(r)&&B(t,r.length):"string"==n&&t in r)&&Se(r[t],e)};var ia=function(e){return oa((function(t,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,i=o>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,i&&aa(r[0],r[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++ni?1:Math.round(100*c/i)/100,t.a!==f)return{h:t.h,s:t.s,l:t.l,a:f,source:"rgb"}}else{var p=void 0;if(n!==(p=s<0?0:s>a?1:Math.round(100*s/a)/100))return{h:t.h,s:t.s,l:t.l,a:p,source:"rgb"}}return null}}));n(ua);ua.calculateChange;var la=o((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r={},n=t.render=function(e,t,r,n){if("undefined"==typeof document&&!n)return null;var o=n?new n:document.createElement("canvas");o.width=2*r,o.height=2*r;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=t,a.fillRect(0,0,r,r),a.translate(r,r),a.fillRect(0,0,r,r),o.toDataURL()):null};t.get=function(e,t,o,a){var i=e+"-"+t+"-"+o+(a?"-server":"");if(r[i])return r[i];var u=n(e,t,o,a);return r[i]=u,u}}));n(la);la.render,la.get;var sa=o((function(t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Checkboard=void 0;var n=i(e),o=i(Io),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(la);function i(e){return e&&e.__esModule?e:{default:e}}var u=r.Checkboard=function(e){var t=e.white,r=e.grey,i=e.size,u=e.renderers,l=e.borderRadius,s=e.boxShadow,c=(0,o.default)({default:{grid:{borderRadius:l,boxShadow:s,absolute:"0px 0px 0px 0px",background:"url("+a.get(t,r,i,u.canvas)+") center left"}}});return n.default.createElement("div",{style:c.grid})};u.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}},r.default=u}));n(sa);sa.Checkboard;var ca=o((function(t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Alpha=void 0;var n=Object.assign||function(e){for(var t=1;t-1},c=function(e){return Number(String(e).replace(/%/g,""))},f=r.EditableInput=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.handleBlur=function(){r.state.blurValue&&r.setState({value:r.state.blurValue,blurValue:null})},r.handleChange=function(e){r.setUpdatedValue(e.target.value,e)},r.handleKeyDown=function(e){var t=c(e.target.value);if(!isNaN(t)&&s(e.keyCode)){var n=r.getArrowOffset(),o=e.keyCode===u?t+n:t-n;r.setUpdatedValue(o,e)}},r.handleDrag=function(e){if(r.props.dragLabel){var t=Math.round(r.props.value+e.movementX);t>=0&&t<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(t),e)}},r.handleMouseDown=function(e){r.props.dragLabel&&(e.preventDefault(),r.handleDrag(e),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"componentWillReceiveProps",value:function(e){var t=this.input;e.value!==this.state.value&&(t===document.activeElement?this.setState({blurValue:String(e.value).toUpperCase()}):this.setState({value:String(e.value).toUpperCase(),blurValue:!this.state.blurValue&&String(e.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){return function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var r=null!==this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(r,t);var n,o=function(e){return String(e).indexOf("%")>-1}(t.target.value);this.setState({value:o?(n=e,n+"%"):e})}},{key:"render",value:function(){var e=this,t=(0,a.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return o.default.createElement("div",{style:t.wrap},o.default.createElement("input",{style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?o.default.createElement("span",{style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(e.PureComponent||e.Component);r.default=f}));n(fa);fa.EditableInput;var pa=o((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});t.calculateChange=function(e,t,r,n){var o=n.clientWidth,a=n.clientHeight,i="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,u="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,l=i-(n.getBoundingClientRect().left+window.pageXOffset),s=u-(n.getBoundingClientRect().top+window.pageYOffset);if("vertical"===t){var c=void 0;if(s<0)c=359;else if(s>a)c=0;else{c=360*(-100*s/a+100)/100}if(r.h!==c)return{h:c,s:r.s,l:r.l,a:r.a,source:"rgb"}}else{var f=void 0;if(l<0)f=0;else if(l>o)f=359;else{f=360*(100*l/o)/100}if(r.h!==f)return{h:f,s:r.s,l:r.l,a:r.a,source:"rgb"}}return null}}));n(pa);pa.calculateChange;var da=o((function(t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Hue=void 0;var n=function(){function e(e,t){for(var r=0;r=t||r<0||f&&e-s>=a}function v(){var e=va();if(h(e))return b(e);u=setTimeout(v,function(e){var r=t-(e-l);return f?Sa(r,a-(e-s)):r}(e))}function b(e){return u=void 0,p&&n?d(e):(n=o=void 0,i)}function g(){var e=va(),r=h(e);if(n=arguments,o=this,l=e,r){if(void 0===u)return function(e){return s=e,u=setTimeout(v,t),c?d(e):i}(l);if(f)return clearTimeout(u),u=setTimeout(v,t),d(l)}return void 0===u&&(u=setTimeout(v,t)),i}return t=xa(t)||0,ne(r)&&(c=!!r.leading,a=(f="maxWait"in r)?Oa(xa(r.maxWait)||0,t):a,p="trailing"in r?!!r.trailing:p),g.cancel=function(){void 0!==u&&clearTimeout(u),s=0,n=l=o=u=void 0},g.flush=function(){return void 0===u?i:b(va())},g},ka="Expected a function";var Ea=function(e,t,r){var n=!0,o=!0;if("function"!=typeof e)throw new TypeError(ka);return ne(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),Ca(e,t,{leading:n,maxWait:t,trailing:o})},Aa=o((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});t.calculateChange=function(e,t,r){var n=r.getBoundingClientRect(),o=n.width,a=n.height,i="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,u="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,l=i-(r.getBoundingClientRect().left+window.pageXOffset),s=u-(r.getBoundingClientRect().top+window.pageYOffset);l<0?l=0:l>o?l=o:s<0?s=0:s>a&&(s=a);var c=100*l/o,f=-100*s/a+100;return{h:t.h,s:c,v:f,a:t.a,source:"rgb"}}}));n(Aa);Aa.calculateChange;var Ma=o((function(t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Saturation=void 0;var n=function(){function e(e,t){for(var r=0;r1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=M(e,360),t=M(t,100),r=M(r,100),0===t)n=o=a=r;else{var u=r<.5?r*(1+t):r+t-r*t,l=2*r-u;n=i(l,u,e+1/3),o=i(l,u,e),a=i(l,u,e-1/3)}return{r:255*n,g:255*o,b:255*a}}(e.h,l,c),f=!0,p="hsl"),e.hasOwnProperty("a")&&(a=e.a));var d,h,v;return a=A(a),{ok:f,format:e.format||p,r:i(255,u(o.r,0)),g:i(255,u(o.g,0)),b:i(255,u(o.b,0)),a:a}}(e);this._originalInput=e,this._r=c.r,this._g=c.g,this._b=c.b,this._a=c.a,this._roundA=a(100*this._a)/100,this._format=l.format||c.format,this._gradientType=l.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=c.ok,this._tc_id=o++}function c(e,t,r){e=M(e,255),t=M(t,255),r=M(r,255);var n,o,a=u(e,t,r),l=i(e,t,r),s=(a+l)/2;if(a==l)n=o=0;else{var c=a-l;switch(o=s>.5?c/(2-a-l):c/(a+l),a){case e:n=(t-r)/c+(t>1)+720)%360;--t;)n.h=(n.h+o)%360,a.push(s(n));return a}function C(e,t){t=t||6;for(var r=s(e).toHsv(),n=r.h,o=r.s,a=r.v,i=[],u=1/t;t--;)i.push(s({h:n,s:o,v:a})),a=(a+u)%1;return i}s.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,r,n,o=this.toRgb();return e=o.r/255,r=o.g/255,n=o.b/255,.2126*(e<=.03928?e/12.92:t.pow((e+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:t.pow((r+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:t.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=A(e),this._roundA=a(100*this._a)/100,this},toHsv:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=f(this._r,this._g,this._b),t=a(360*e.h),r=a(100*e.s),n=a(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=c(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=c(this._r,this._g,this._b),t=a(360*e.h),r=a(100*e.s),n=a(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return p(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,o){var i=[T(a(e).toString(16)),T(a(t).toString(16)),T(a(r).toString(16)),T(H(n))];if(o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(100*M(this._r,255))+"%",g:a(100*M(this._g,255))+"%",b:a(100*M(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+a(100*M(this._r,255))+"%, "+a(100*M(this._g,255))+"%, "+a(100*M(this._b,255))+"%)":"rgba("+a(100*M(this._r,255))+"%, "+a(100*M(this._g,255))+"%, "+a(100*M(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(E[p(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+d(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var o=s(e);r="#"+d(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return s(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(g,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(_,arguments)},desaturate:function(){return this._applyModification(h,arguments)},saturate:function(){return this._applyModification(v,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(m,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(S,arguments)},complement:function(){return this._applyCombination(w,arguments)},monochromatic:function(){return this._applyCombination(C,arguments)},splitcomplement:function(){return this._applyCombination(O,arguments)},triad:function(){return this._applyCombination(x,arguments)},tetrad:function(){return this._applyCombination(j,arguments)}},s.fromRatio=function(e,t){if("object"==typeof e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:F(e[n]));e=r}return s(e,t)},s.equals=function(e,t){return!(!e||!t)&&s(e).toRgbString()==s(t).toRgbString()},s.random=function(){return s.fromRatio({r:l(),g:l(),b:l()})},s.mix=function(e,t,r){r=0===r?0:r||50;var n=s(e).toRgb(),o=s(t).toRgb(),a=r/100;return s({r:(o.r-n.r)*a+n.r,g:(o.g-n.g)*a+n.g,b:(o.b-n.b)*a+n.b,a:(o.a-n.a)*a+n.a})},s.readability=function(e,r){var n=s(e),o=s(r);return(t.max(n.getLuminance(),o.getLuminance())+.05)/(t.min(n.getLuminance(),o.getLuminance())+.05)},s.isReadable=function(e,t,r){var n,o,a=s.readability(e,t);switch(o=!1,(n=function(e){var t,r;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==r&&"large"!==r&&(r="small");return{level:t,size:r}}(r)).level+n.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},s.mostReadable=function(e,t,r){var n,o,a,i,u=null,l=0;o=(r=r||{}).includeFallbackColors,a=r.level,i=r.size;for(var c=0;cl&&(l=n,u=s(t[c]));return s.isReadable(e,u,{level:a,size:i})||!o?u:(r.includeFallbackColors=!1,s.mostReadable(e,["#fff","#000"],r))};var k=s.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},E=s.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(k);function A(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function M(e,r){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=i(r,u(0,parseFloat(e))),n&&(e=parseInt(e*r,10)/100),t.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function P(e){return i(1,u(0,e))}function R(e){return parseInt(e,16)}function T(e){return 1==e.length?"0"+e:""+e}function F(e){return e<=1&&(e=100*e+"%"),e}function H(e){return t.round(255*parseFloat(e)).toString(16)}function L(e){return R(e)/255}var z,D,U,B=(D="[\\s|\\(]+("+(z="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+z+")[,|\\s]+("+z+")\\s*\\)?",U="[\\s|\\(]+("+z+")[,|\\s]+("+z+")[,|\\s]+("+z+")[,|\\s]+("+z+")\\s*\\)?",{CSS_UNIT:new RegExp(z),rgb:new RegExp("rgb"+D),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+D),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+D),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(e){return!!B.CSS_UNIT.exec(e)}e.exports?e.exports=s:window.tinycolor=s}(Math)})),Ta=o((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.red=t.getContrastingColor=t.isValidHex=t.toState=t.simpleCheckForValidColor=void 0;var r=o(Pa),n=o(Ra);function o(e){return e&&e.__esModule?e:{default:e}}t.simpleCheckForValidColor=function(e){var t=0,n=0;return(0,r.default)(["r","g","b","a","h","s","l","v"],(function(r){if(e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)){/^\d+%$/.test(e[r])&&(n+=1)}})),t===n&&e};var a=t.toState=function(e,t){var r=e.hex?(0,n.default)(e.hex):(0,n.default)(e),o=r.toHsl(),a=r.toHsv(),i=r.toRgb(),u=r.toHex();return 0===o.s&&(o.h=t||0,a.h=t||0),{hsl:o,hex:"000000"===u&&0===i.a?"transparent":"#"+u,rgb:i,hsv:a,oldHue:e.h||t||o.h,source:e.source}};t.isValidHex=function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,n.default)(e).isValid()},t.getContrastingColor=function(e){if(!e)return"#fff";var t=a(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}};t.default=t}));n(Ta);Ta.red,Ta.getContrastingColor,Ta.isValidHex,Ta.toState,Ta.simpleCheckForValidColor;var Fa=o((function(t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ColorWrap=void 0;var n=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(r){function n(){var e,t,r;u(this,n);for(var o=arguments.length,a=Array(o),i=0;i100&&(e.a=100),e.a/=100,t({h:i.h,s:i.s,l:i.l,a:e.a,source:"rgb"},n))};return n.default.createElement("div",{style:s.fields,className:"flexbox-fix"},n.default.createElement("div",{style:s.double},n.default.createElement(za.EditableInput,{style:{input:s.input,label:s.label},label:"hex",value:u.replace("#",""),onChange:c})),n.default.createElement("div",{style:s.single},n.default.createElement(za.EditableInput,{style:{input:s.input,label:s.label},label:"r",value:r.r,onChange:c,dragLabel:"true",dragMax:"255"})),n.default.createElement("div",{style:s.single},n.default.createElement(za.EditableInput,{style:{input:s.input,label:s.label},label:"g",value:r.g,onChange:c,dragLabel:"true",dragMax:"255"})),n.default.createElement("div",{style:s.single},n.default.createElement(za.EditableInput,{style:{input:s.input,label:s.label},label:"b",value:r.b,onChange:c,dragLabel:"true",dragMax:"255"})),n.default.createElement("div",{style:s.alpha},n.default.createElement(za.EditableInput,{style:{input:s.input,label:s.label},label:"a",value:Math.round(100*r.a),onChange:c,dragLabel:"true",dragMax:"100"})))};r.default=u}));n(Da);Da.SketchFields;var Ua=o((function(t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.SketchPresetColors=void 0;var n=Object.assign||function(e){for(var t=1;t-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},L={};L["[object Float32Array]"]=L["[object Float64Array]"]=L["[object Int8Array]"]=L["[object Int16Array]"]=L["[object Int32Array]"]=L["[object Uint8Array]"]=L["[object Uint8ClampedArray]"]=L["[object Uint16Array]"]=L["[object Uint32Array]"]=!0,L["[object Arguments]"]=L["[object Array]"]=L["[object ArrayBuffer]"]=L["[object Boolean]"]=L["[object DataView]"]=L["[object Date]"]=L["[object Error]"]=L["[object Function]"]=L["[object Map]"]=L["[object Number]"]=L["[object Object]"]=L["[object RegExp]"]=L["[object Set]"]=L["[object String]"]=L["[object WeakMap]"]=!1;var D=function(e){return x(e)&&H(e.length)&&!!L[m(e)]};var z=function(e){return function(t){return e(t)}},U=o((function(e,t){var r=t&&!t.nodeType&&t,n=r&&e&&!e.nodeType&&e,o=n&&n.exports===r&&l.process,a=function(){try{var e=n&&n.require&&n.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=a})),B=U&&U.isTypedArray,I=B?z(B):D,W=Object.prototype.hasOwnProperty;var N=function(e,t){var r=w(e),n=!r&&M(e),o=!r&&!n&&R(e),a=!r&&!n&&!o&&I(e),i=r||n||o||a,u=i?S(e.length,String):[],l=u.length;for(var s in e)!t&&!W.call(e,s)||i&&("length"==s||o&&("offset"==s||"parent"==s)||a&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||F(s,l))||u.push(s);return u},V=Object.prototype;var $=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||V)};var X=function(e,t){return function(r){return e(t(r))}},q=X(Object.keys,Object),Y=Object.prototype.hasOwnProperty;var K=function(e){if(!$(e))return q(e);var t=[];for(var r in Object(e))Y.call(e,r)&&"constructor"!=r&&t.push(r);return t};var G=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var J=function(e){if(!G(e))return!1;var t=m(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};var Q=function(e){return null!=e&&H(e.length)&&!J(e)};var Z=function(e){return Q(e)?N(e):K(e)};var ee=function(e,t){return e&&O(e,t,Z)};var te=function(e){return e};var re=function(e){return"function"==typeof e?e:te};var ne=function(e,t){return e&&ee(e,re(t))},oe=X(Object.getPrototypeOf,Object),ae=Function.prototype,ie=Object.prototype,ue=ae.toString,le=ie.hasOwnProperty,se=ue.call(Object);var ce=function(e){if(!x(e)||"[object Object]"!=m(e))return!1;var t=oe(e);if(null===t)return!0;var r=le.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ue.call(r)==se};var fe=function(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r-1};var _e=function(e,t){var r=this.__data__,n=he(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};function me(e){var t=-1,r=null==e?0:e.length;for(this.clear();++tu))return!1;var s=a.get(e);if(s&&a.get(t))return s==t;var c=-1,f=!0,p=2&r?new dt:void 0;for(a.set(e,t),a.set(t,e);++c0&&void 0!==arguments[0]?arguments[0]:[],i=[];return(0,a.default)(t,(function(t){Array.isArray(t)?e(t).map((function(e){return i.push(e)})):(0,o.default)(t)?(0,n.default)(t,(function(e,t){!0===e&&i.push(t),i.push(t+"-"+e)})):(0,r.default)(t)&&i.push(t)})),i};t.default=u}));n(Cr);Cr.flattenNames;var kr=function(e,t){for(var r=-1,n=null==e?0:e.length;++r1&&void 0!==arguments[1]?arguments[1]:[],a=e.default&&(0,n.default)(e.default)||{};return t.map((function(t){var n=e[t];return n&&(0,r.default)(n,(function(e,t){a[t]||(a[t]={}),a[t]=o({},a[t],n[t])})),t})),a};t.default=i}));n(vn);vn.mergeClasses;var bn=o((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.autoprefix=void 0;var r,n=(r=ne)&&r.__esModule?r:{default:r},o=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(r){function n(){var r,l,s;i(this,n);for(var c=arguments.length,f=Array(c),p=0;p1&&void 0!==arguments[1]?arguments[1]:"span";return function(r){function n(){var r,l,s;i(this,n);for(var c=arguments.length,f=Array(c),p=0;p1&&void 0!==arguments[1])||arguments[1];r[e]=t};return 0===e&&n("first-child"),e===t-1&&n("last-child"),(0===e||e%2==0)&&n("even"),1===Math.abs(e%2)&&n("odd"),n("nth-child",e),r}}));n(_n);var mn=o((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ReactCSS=t.loop=t.handleActive=t.handleHover=t.hover=void 0;var r=l(Cr),n=l(vn),o=l(bn),a=l(gn),i=l(yn),u=l(_n);function l(e){return e&&e.__esModule?e:{default:e}}t.hover=a.default,t.handleHover=a.default,t.handleActive=i.default,t.loop=u.default;var s=t.ReactCSS=function(e){for(var t=arguments.length,a=Array(t>1?t-1:0),i=1;i0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Pn);var Fn=function(e,t){return Tn(An(e,t,te),e+"")};var Hn=function(e,t,r){if(!G(r))return!1;var n=typeof t;return!!("number"==n?Q(r)&&F(t,r.length):"string"==n&&t in r)&&de(r[t],e)};var Ln=function(e){return Fn((function(t,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,i=o>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,i&&Hn(r[0],r[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++ni?1:Math.round(100*c/i)/100,t.a!==f)return{h:t.h,s:t.s,l:t.l,a:f,source:"rgb"}}else{var p=void 0;if(n!==(p=s<0?0:s>a?1:Math.round(100*s/a)/100))return{h:t.h,s:t.s,l:t.l,a:p,source:"rgb"}}return null}}));n(Dn);Dn.calculateChange;var zn=o((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r={},n=t.render=function(e,t,r,n){if("undefined"==typeof document&&!n)return null;var o=n?new n:document.createElement("canvas");o.width=2*r,o.height=2*r;var a=o.getContext("2d");return a?(a.fillStyle=e,a.fillRect(0,0,o.width,o.height),a.fillStyle=t,a.fillRect(0,0,r,r),a.translate(r,r),a.fillRect(0,0,r,r),o.toDataURL()):null};t.get=function(e,t,o,a){var i=e+"-"+t+"-"+o+(a?"-server":"");if(r[i])return r[i];var u=n(e,t,o,a);return r[i]=u,u}}));n(zn);zn.render,zn.get;var Un=o((function(t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Checkboard=void 0;var n=i(e),o=i(mn),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}(zn);function i(e){return e&&e.__esModule?e:{default:e}}var u=r.Checkboard=function(e){var t=e.white,r=e.grey,i=e.size,u=e.renderers,l=e.borderRadius,s=e.boxShadow,c=(0,o.default)({default:{grid:{borderRadius:l,boxShadow:s,absolute:"0px 0px 0px 0px",background:"url("+a.get(t,r,i,u.canvas)+") center left"}}});return n.default.createElement("div",{style:c.grid})};u.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}},r.default=u}));n(Un);Un.Checkboard;var Bn=o((function(t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Alpha=void 0;var n=Object.assign||function(e){for(var t=1;t-1)){var o=r.getArrowOffset(),a=38===e.keyCode?n+o:n-o;r.setUpdatedValue(a,e)}},r.handleDrag=function(e){if(r.props.dragLabel){var t=Math.round(r.props.value+e.movementX);t>=0&&t<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(t),e)}},r.handleMouseDown=function(e){r.props.dragLabel&&(e.preventDefault(),r.handleDrag(e),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"componentDidUpdate",value:function(e,t){this.props.value===this.state.value||e.value===this.props.value&&t.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){return function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var r=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(r,t);var n,o=function(e){return String(e).indexOf("%")>-1}(t.target.value);this.setState({value:o?(n=e,n+"%"):e})}},{key:"render",value:function(){var e=this,t=(0,a.default)({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return o.default.createElement("div",{style:t.wrap},o.default.createElement("input",{style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?o.default.createElement("span",{style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(e.PureComponent||e.Component);r.default=l}));n(In);In.EditableInput;var Wn=o((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});t.calculateChange=function(e,t,r,n){var o=n.clientWidth,a=n.clientHeight,i="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,u="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,l=i-(n.getBoundingClientRect().left+window.pageXOffset),s=u-(n.getBoundingClientRect().top+window.pageYOffset);if("vertical"===t){var c=void 0;if(s<0)c=359;else if(s>a)c=0;else{c=360*(-100*s/a+100)/100}if(r.h!==c)return{h:c,s:r.s,l:r.l,a:r.a,source:"rgb"}}else{var f=void 0;if(l<0)f=0;else if(l>o)f=359;else{f=360*(100*l/o)/100}if(r.h!==f)return{h:f,s:r.s,l:r.l,a:r.a,source:"rgb"}}return null}}));n(Wn);Wn.calculateChange;var Nn=o((function(t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Hue=void 0;var n=function(){function e(e,t){for(var r=0;r=t||r<0||f&&e-s>=a}function b(){var e=$n();if(v(e))return g(e);u=setTimeout(b,function(e){var r=t-(e-l);return f?Zn(r,a-(e-s)):r}(e))}function g(e){return u=void 0,p&&n?d(e):(n=o=void 0,i)}function y(){var e=$n(),r=v(e);if(n=arguments,o=this,l=e,r){if(void 0===u)return h(l);if(f)return clearTimeout(u),u=setTimeout(b,t),d(l)}return void 0===u&&(u=setTimeout(b,t)),i}return t=Jn(t)||0,G(r)&&(c=!!r.leading,a=(f="maxWait"in r)?Qn(Jn(r.maxWait)||0,t):a,p="trailing"in r?!!r.trailing:p),y.cancel=function(){void 0!==u&&clearTimeout(u),s=0,n=l=o=u=void 0},y.flush=function(){return void 0===u?i:g($n())},y};var to=function(e,t,r){var n=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return G(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),eo(e,t,{leading:n,maxWait:t,trailing:o})},ro=o((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});t.calculateChange=function(e,t,r){var n=r.getBoundingClientRect(),o=n.width,a=n.height,i="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,u="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,l=i-(r.getBoundingClientRect().left+window.pageXOffset),s=u-(r.getBoundingClientRect().top+window.pageYOffset);l<0?l=0:l>o&&(l=o),s<0?s=0:s>a&&(s=a);var c=l/o,f=1-s/a;return{h:t.h,s:c,v:f,a:t.a,source:"rgb"}}}));n(ro);ro.calculateChange;var no=o((function(t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Saturation=void 0;var n=function(){function e(e,t){for(var r=0;r1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=M(e,360),t=M(t,100),r=M(r,100),0===t)n=o=a=r;else{var u=r<.5?r*(1+t):r+t-r*t,l=2*r-u;n=i(l,u,e+1/3),o=i(l,u,e),a=i(l,u,e-1/3)}return{r:255*n,g:255*o,b:255*a}}(e.h,l,c),f=!0,p="hsl"),e.hasOwnProperty("a")&&(a=e.a));var d,h,v;return a=A(a),{ok:f,format:e.format||p,r:i(255,u(o.r,0)),g:i(255,u(o.g,0)),b:i(255,u(o.b,0)),a:a}}(e);this._originalInput=e,this._r=c.r,this._g=c.g,this._b=c.b,this._a=c.a,this._roundA=a(100*this._a)/100,this._format=l.format||c.format,this._gradientType=l.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=c.ok,this._tc_id=o++}function c(e,t,r){e=M(e,255),t=M(t,255),r=M(r,255);var n,o,a=u(e,t,r),l=i(e,t,r),s=(a+l)/2;if(a==l)n=o=0;else{var c=a-l;switch(o=s>.5?c/(2-a-l):c/(a+l),a){case e:n=(t-r)/c+(t>1)+720)%360;--t;)n.h=(n.h+o)%360,a.push(s(n));return a}function C(e,t){t=t||6;for(var r=s(e).toHsv(),n=r.h,o=r.s,a=r.v,i=[],u=1/t;t--;)i.push(s({h:n,s:o,v:a})),a=(a+u)%1;return i}s.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,r,n,o=this.toRgb();return e=o.r/255,r=o.g/255,n=o.b/255,.2126*(e<=.03928?e/12.92:t.pow((e+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:t.pow((r+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:t.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=A(e),this._roundA=a(100*this._a)/100,this},toHsv:function(){var e=f(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=f(this._r,this._g,this._b),t=a(360*e.h),r=a(100*e.s),n=a(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=c(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=c(this._r,this._g,this._b),t=a(360*e.h),r=a(100*e.s),n=a(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return p(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,o){var i=[T(a(e).toString(16)),T(a(t).toString(16)),T(a(r).toString(16)),T(H(n))];if(o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1))return i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0);return i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(100*M(this._r,255))+"%",g:a(100*M(this._g,255))+"%",b:a(100*M(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+a(100*M(this._r,255))+"%, "+a(100*M(this._g,255))+"%, "+a(100*M(this._b,255))+"%)":"rgba("+a(100*M(this._r,255))+"%, "+a(100*M(this._g,255))+"%, "+a(100*M(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(E[p(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+d(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var o=s(e);r="#"+d(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return s(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(g,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(_,arguments)},desaturate:function(){return this._applyModification(h,arguments)},saturate:function(){return this._applyModification(v,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(m,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(S,arguments)},complement:function(){return this._applyCombination(w,arguments)},monochromatic:function(){return this._applyCombination(C,arguments)},splitcomplement:function(){return this._applyCombination(O,arguments)},triad:function(){return this._applyCombination(x,arguments)},tetrad:function(){return this._applyCombination(j,arguments)}},s.fromRatio=function(e,t){if("object"==typeof e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:F(e[n]));e=r}return s(e,t)},s.equals=function(e,t){return!(!e||!t)&&s(e).toRgbString()==s(t).toRgbString()},s.random=function(){return s.fromRatio({r:l(),g:l(),b:l()})},s.mix=function(e,t,r){r=0===r?0:r||50;var n=s(e).toRgb(),o=s(t).toRgb(),a=r/100;return s({r:(o.r-n.r)*a+n.r,g:(o.g-n.g)*a+n.g,b:(o.b-n.b)*a+n.b,a:(o.a-n.a)*a+n.a})},s.readability=function(e,r){var n=s(e),o=s(r);return(t.max(n.getLuminance(),o.getLuminance())+.05)/(t.min(n.getLuminance(),o.getLuminance())+.05)},s.isReadable=function(e,t,r){var n,o,a=s.readability(e,t);switch(o=!1,(n=function(e){var t,r;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==r&&"large"!==r&&(r="small");return{level:t,size:r}}(r)).level+n.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},s.mostReadable=function(e,t,r){var n,o,a,i,u=null,l=0;o=(r=r||{}).includeFallbackColors,a=r.level,i=r.size;for(var c=0;cl&&(l=n,u=s(t[c]));return s.isReadable(e,u,{level:a,size:i})||!o?u:(r.includeFallbackColors=!1,s.mostReadable(e,["#fff","#000"],r))};var k=s.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},E=s.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(k);function A(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function M(e,r){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=i(r,u(0,parseFloat(e))),n&&(e=parseInt(e*r,10)/100),t.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function P(e){return i(1,u(0,e))}function R(e){return parseInt(e,16)}function T(e){return 1==e.length?"0"+e:""+e}function F(e){return e<=1&&(e=100*e+"%"),e}function H(e){return t.round(255*parseFloat(e)).toString(16)}function L(e){return R(e)/255}var D,z,U,B=(z="[\\s|\\(]+("+(D="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+D+")[,|\\s]+("+D+")\\s*\\)?",U="[\\s|\\(]+("+D+")[,|\\s]+("+D+")[,|\\s]+("+D+")[,|\\s]+("+D+")\\s*\\)?",{CSS_UNIT:new RegExp(D),rgb:new RegExp("rgb"+z),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+z),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+z),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function I(e){return!!B.CSS_UNIT.exec(e)}e.exports?e.exports=s:window.tinycolor=s}(Math)})),io=o((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.red=t.getContrastingColor=t.isValidHex=t.toState=t.simpleCheckForValidColor=void 0;var r=o(oo),n=o(ao);function o(e){return e&&e.__esModule?e:{default:e}}t.simpleCheckForValidColor=function(e){var t=0,n=0;return(0,r.default)(["r","g","b","a","h","s","l","v"],(function(r){if(e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)){/^\d+%$/.test(e[r])&&(n+=1)}})),t===n&&e};var a=t.toState=function(e,t){var r=e.hex?(0,n.default)(e.hex):(0,n.default)(e),o=r.toHsl(),a=r.toHsv(),i=r.toRgb(),u=r.toHex();return 0===o.s&&(o.h=t||0,a.h=t||0),{hsl:o,hex:"000000"===u&&0===i.a?"transparent":"#"+u,rgb:i,hsv:a,oldHue:e.h||t||o.h,source:e.source}};t.isValidHex=function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,n.default)(e).isValid()},t.getContrastingColor=function(e){if(!e)return"#fff";var t=a(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}};t.default=t}));n(io);io.red,io.getContrastingColor,io.isValidHex,io.toState,io.simpleCheckForValidColor;var uo=o((function(t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.ColorWrap=void 0;var n=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(r){function n(){var e,t,r;u(this,n);for(var o=arguments.length,a=Array(o),i=0;i100&&(e.a=100),e.a/=100,t({h:i.h,s:i.s,l:i.l,a:e.a,source:"rgb"},n))};return n.default.createElement("div",{style:s.fields,className:"flexbox-fix"},n.default.createElement("div",{style:s.double},n.default.createElement(co.EditableInput,{style:{input:s.input,label:s.label},label:"hex",value:u.replace("#",""),onChange:c})),n.default.createElement("div",{style:s.single},n.default.createElement(co.EditableInput,{style:{input:s.input,label:s.label},label:"r",value:r.r,onChange:c,dragLabel:"true",dragMax:"255"})),n.default.createElement("div",{style:s.single},n.default.createElement(co.EditableInput,{style:{input:s.input,label:s.label},label:"g",value:r.g,onChange:c,dragLabel:"true",dragMax:"255"})),n.default.createElement("div",{style:s.single},n.default.createElement(co.EditableInput,{style:{input:s.input,label:s.label},label:"b",value:r.b,onChange:c,dragLabel:"true",dragMax:"255"})),n.default.createElement("div",{style:s.alpha},n.default.createElement(co.EditableInput,{style:{input:s.input,label:s.label},label:"a",value:Math.round(100*r.a),onChange:c,dragLabel:"true",dragMax:"100"})))};r.default=u}));n(fo);fo.SketchFields;var po=o((function(t,r){Object.defineProperty(r,"__esModule",{value:!0}),r.SketchPresetColors=void 0;var n=Object.assign||function(e){for(var t=1;t 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { + args[_key - 2] = arguments[_key]; + } if (!condition) { var error; + if (format === undefined) { - error = new Error( - 'Minified exception occurred; use the non-minified dev environment ' + - 'for the full error message and additional helpful warnings.' - ); + error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); } else { - var args = [a, b, c, d, e, f]; var argIndex = 0; - error = new Error( - format.replace(/%s/g, function() { return args[argIndex++]; }) - ); + error = new Error(format.replace(/%s/g, function () { + return args[argIndex++]; + })); error.name = 'Invariant Violation'; } error.framesToPop = 1; // we don't care about invariant's own frame + throw error; } -}; +}var useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;function shallowEqual(objA, objB, compare, compareContext) { + var compareResult = compare ? compare.call(compareContext, objA, objB) : void 0; -var browser = invariant;var useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;// - -var shallowequal = function shallowEqual(objA, objB, compare, compareContext) { - var ret = compare ? compare.call(compareContext, objA, objB) : void 0; - - if (ret !== void 0) { - return !!ret; + if (compareResult !== void 0) { + return !!compareResult; } if (objA === objB) { return true; } - if (typeof objA !== "object" || !objA || typeof objB !== "object" || !objB) { + if (typeof objA !== 'object' || !objA || typeof objB !== 'object' || !objB) { return false; } @@ -65,9 +54,8 @@ var shallowequal = function shallowEqual(objA, objB, compare, compareContext) { return false; } - var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB); + var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB); // Test for A's keys different from B. - // Test for A's keys different from B. for (var idx = 0; idx < keysA.length; idx++) { var key = keysA[idx]; @@ -77,16 +65,15 @@ var shallowequal = function shallowEqual(objA, objB, compare, compareContext) { var valueA = objA[key]; var valueB = objB[key]; + compareResult = compare ? compare.call(compareContext, valueA, valueB, key) : void 0; - ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0; - - if (ret === false || (ret === void 0 && valueA !== valueB)) { + if (compareResult === false || compareResult === void 0 && valueA !== valueB) { return false; } } return true; -};function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } +}function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } @@ -111,7 +98,7 @@ function useCollector(monitor, collect, onUpdate) { var updateCollected = React.useCallback(function () { var nextValue = collect(monitor); - if (!shallowequal(collected, nextValue)) { + if (!shallowEqual(collected, nextValue)) { setCollected(nextValue); if (onUpdate) { @@ -342,7 +329,7 @@ function createStore(reducer, preloadedState, enhancer) { } if (isDispatching) { - throw new Error('You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.'); + throw new Error('You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api-reference/store#subscribelistener for more details.'); } var isSubscribed = true; @@ -354,13 +341,14 @@ function createStore(reducer, preloadedState, enhancer) { } if (isDispatching) { - throw new Error('You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.'); + throw new Error('You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribelistener for more details.'); } isSubscribed = false; ensureCanMutateNextListeners(); var index = nextListeners.indexOf(listener); nextListeners.splice(index, 1); + currentListeners = null; }; } /** @@ -638,18 +626,18 @@ function createBeginDrag(manager) { } function verifyInvariants(sourceIds, monitor, registry) { - browser(!monitor.isDragging(), 'Cannot call beginDrag while dragging.'); + invariant(!monitor.isDragging(), 'Cannot call beginDrag while dragging.'); sourceIds.forEach(function (sourceId) { - browser(registry.getSource(sourceId), 'Expected sourceIds to be registered.'); + invariant(registry.getSource(sourceId), 'Expected sourceIds to be registered.'); }); } function verifyGetSourceClientOffsetIsFunction(getSourceClientOffset) { - browser(typeof getSourceClientOffset === 'function', 'When clientOffset is provided, getSourceClientOffset must be a function.'); + invariant(typeof getSourceClientOffset === 'function', 'When clientOffset is provided, getSourceClientOffset must be a function.'); } function verifyItemIsObject(item) { - browser(isObject(item), 'Item must be an object.'); + invariant(isObject(item), 'Item must be an object.'); } function getDraggableSource(sourceIds, monitor) { @@ -705,18 +693,18 @@ function getDraggableSource(sourceIds, monitor) { } function verifyTargetIdsIsArray(targetIdsArg) { - browser(Array.isArray(targetIdsArg), 'Expected targetIds to be an array.'); + invariant(Array.isArray(targetIdsArg), 'Expected targetIds to be an array.'); } function checkInvariants(targetIds, monitor, registry) { - browser(monitor.isDragging(), 'Cannot call hover while not dragging.'); - browser(!monitor.didDrop(), 'Cannot call hover after drop.'); + invariant(monitor.isDragging(), 'Cannot call hover while not dragging.'); + invariant(!monitor.didDrop(), 'Cannot call hover after drop.'); for (var i = 0; i < targetIds.length; i++) { var targetId = targetIds[i]; - browser(targetIds.lastIndexOf(targetId) === i, 'Expected targetIds to be unique in the passed array.'); + invariant(targetIds.lastIndexOf(targetId) === i, 'Expected targetIds to be unique in the passed array.'); var target = registry.getTarget(targetId); - browser(target, 'Expected targetIds to be registered.'); + invariant(target, 'Expected targetIds to be registered.'); } } @@ -767,8 +755,8 @@ function createDrop(manager) { } function verifyInvariants$1(monitor) { - browser(monitor.isDragging(), 'Cannot call drop while not dragging.'); - browser(!monitor.didDrop(), 'Cannot call drop twice during one drag operation.'); + invariant(monitor.isDragging(), 'Cannot call drop while not dragging.'); + invariant(!monitor.didDrop(), 'Cannot call drop twice during one drag operation.'); } function determineDropResult(targetId, index, registry, monitor) { @@ -784,7 +772,7 @@ function determineDropResult(targetId, index, registry, monitor) { } function verifyDropResultType(dropResult) { - browser(typeof dropResult === 'undefined' || isObject(dropResult), 'Drop result must either be an object or undefined.'); + invariant(typeof dropResult === 'undefined' || isObject(dropResult), 'Drop result must either be an object or undefined.'); } function getDroppableTargets(monitor) { @@ -807,7 +795,7 @@ function getDroppableTargets(monitor) { } function verifyIsDragging(monitor) { - browser(monitor.isDragging(), 'Cannot call endDrag while not dragging.'); + invariant(monitor.isDragging(), 'Cannot call endDrag while not dragging.'); }function createDragDropActions(manager) { return { beginDrag: createBeginDrag(manager), @@ -1192,8 +1180,8 @@ function () { handlerIds: undefined }; var handlerIds = options.handlerIds; - browser(typeof listener === 'function', 'listener must be a function.'); - browser(typeof handlerIds === 'undefined' || Array.isArray(handlerIds), 'handlerIds, when specified, must be an array of strings.'); + invariant(typeof listener === 'function', 'listener must be a function.'); + invariant(typeof handlerIds === 'undefined' || Array.isArray(handlerIds), 'handlerIds, when specified, must be an array of strings.'); var prevStateId = this.store.getState().stateId; var handleChange = function handleChange() { @@ -1219,7 +1207,7 @@ function () { value: function subscribeToOffsetChange(listener) { var _this2 = this; - browser(typeof listener === 'function', 'listener must be a function.'); + invariant(typeof listener === 'function', 'listener must be a function.'); var previousState = this.store.getState().dragOffset; var handleChange = function handleChange() { @@ -1243,7 +1231,7 @@ function () { } var source = this.registry.getSource(sourceId); - browser(source, 'Expected to find a valid source.'); + invariant(source, 'Expected to find a valid source.'); if (this.isDragging()) { return false; @@ -1260,7 +1248,7 @@ function () { } var target = this.registry.getTarget(targetId); - browser(target, 'Expected to find a valid target.'); + invariant(target, 'Expected to find a valid target.'); if (!this.isDragging() || this.didDrop()) { return false; @@ -1284,7 +1272,7 @@ function () { } var source = this.registry.getSource(sourceId, true); - browser(source, 'Expected to find a valid source.'); + invariant(source, 'Expected to find a valid source.'); if (!this.isDragging() || !this.isSourcePublic()) { return false; @@ -1401,7 +1389,30 @@ function () { }]); return DragDropMonitorImpl; -}();var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};// Use the fastest means possible to execute a task in its own turn, with +}();var nextUniqueId = 0; +function getNextUniqueId() { + return nextUniqueId++; +}function _typeof$1(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); } +function validateSourceContract(source) { + invariant(typeof source.canDrag === 'function', 'Expected canDrag to be a function.'); + invariant(typeof source.beginDrag === 'function', 'Expected beginDrag to be a function.'); + invariant(typeof source.endDrag === 'function', 'Expected endDrag to be a function.'); +} +function validateTargetContract(target) { + invariant(typeof target.canDrop === 'function', 'Expected canDrop to be a function.'); + invariant(typeof target.hover === 'function', 'Expected hover to be a function.'); + invariant(typeof target.drop === 'function', 'Expected beginDrag to be a function.'); +} +function validateType(type, allowArray) { + if (allowArray && Array.isArray(type)) { + type.forEach(function (t) { + return validateType(t, false); + }); + return; + } + + invariant(typeof type === 'string' || _typeof$1(type) === 'symbol', allowArray ? 'Type can only be a string, a symbol, or an array of either.' : 'Type can only be a string or a symbol.'); +}// Use the fastest means possible to execute a task in its own turn, with // priority over other events including IO, animation, reflow, and redraw // events in browsers. // @@ -1411,75 +1422,72 @@ function () { // soon as possible, but if you use `rawAsap` directly, you are responsible to // either ensure that no exceptions are thrown from your task, or to manually // call `rawAsap.requestFlush` if an exception is thrown. -var browserRaw = rawAsap; function rawAsap(task) { - if (!queue.length) { - requestFlush(); - } - // Equivalent to push, but avoids a function call. - queue[queue.length] = task; -} + if (!queue.length) { + requestFlush(); + } // Equivalent to push, but avoids a function call. -var queue = []; -// `requestFlush` is an implementation-specific method that attempts to kick + + queue[queue.length] = task; +} +var queue = []; // Once a flush has been requested, no further calls to `requestFlush` are // off a `flush` event as quickly as possible. `flush` will attempt to exhaust // the event queue before yielding to the browser's own event loop. -var requestFlush; -// The position of the next task to execute in the task queue. This is + +var requestFlush; // The position of the next task to execute in the task queue. This is // preserved between calls to `flush` so that it can be resumed if // a task throws an exception. -var index = 0; -// If a task schedules additional tasks recursively, the task queue can grow + +var index = 0; // If a task schedules additional tasks recursively, the task queue can grow // unbounded. To prevent memory exhaustion, the task queue will periodically // truncate already-completed tasks. -var capacity = 1024; -// The flush function processes all tasks that have been scheduled with +var capacity = 1024; // The flush function processes all tasks that have been scheduled with // `rawAsap` unless and until one of those tasks throws an exception. // If a task throws an exception, `flush` ensures that its state will remain // consistent and will resume where it left off when called again. // However, `flush` does not make any arrangements to be called again if an // exception is thrown. -function flush() { - while (index < queue.length) { - var currentIndex = index; - // Advance the index before calling the task. This ensures that we will - // begin flushing on the next task the task throws an error. - index = index + 1; - queue[currentIndex].call(); - // Prevent leaking memory for long chains of recursive calls to `asap`. - // If we call `asap` within tasks scheduled by `asap`, the queue will - // grow, but to avoid an O(n) walk for every task we execute, we don't - // shift tasks off the queue after they have been executed. - // Instead, we periodically shift 1024 tasks off the queue. - if (index > capacity) { - // Manually shift all values starting at the index back to the - // beginning of the queue. - for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) { - queue[scan] = queue[scan + index]; - } - queue.length -= index; - index = 0; - } - } - queue.length = 0; - index = 0; -} -// `requestFlush` is implemented using a strategy based on data collected from +function flush() { + while (index < queue.length) { + var currentIndex = index; // Advance the index before calling the task. This ensures that we will + // begin flushing on the next task the task throws an error. + + index = index + 1; + queue[currentIndex].call(); // Prevent leaking memory for long chains of recursive calls to `asap`. + // If we call `asap` within tasks scheduled by `asap`, the queue will + // grow, but to avoid an O(n) walk for every task we execute, we don't + // shift tasks off the queue after they have been executed. + // Instead, we periodically shift 1024 tasks off the queue. + + if (index > capacity) { + // Manually shift all values starting at the index back to the + // beginning of the queue. + for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) { + queue[scan] = queue[scan + index]; + } + + queue.length -= index; + index = 0; + } + } + + queue.length = 0; + index = 0; +} // `requestFlush` is implemented using a strategy based on data collected from // every available SauceLabs Selenium web driver worker at time of writing. // https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593 - // Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that // have WebKitMutationObserver but not un-prefixed MutationObserver. // Must use `global` or `self` instead of `window` to work in both frames and web // workers. `global` is a provision of Browserify, Mr, Mrs, or Mop. /* globals self */ -var scope = typeof commonjsGlobal !== "undefined" ? commonjsGlobal : self; -var BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver; -// MutationObservers are desirable because they have high priority and work + +var scope = typeof global$1 !== 'undefined' ? global$1 : self; +var BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver; // MutationObservers are desirable because they have high priority and work // reliably everywhere they are implemented. // They are implemented in all modern browsers. // @@ -1490,68 +1498,62 @@ var BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObse // - iPad Safari 6-7.1 // - iPhone Safari 7-7.1 // - Safari 6-7 -if (typeof BrowserMutationObserver === "function") { - requestFlush = makeRequestCallFromMutationObserver(flush); -// MessageChannels are desirable because they give direct access to the HTML -// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera -// 11-12, and in web workers in many engines. -// Although message channels yield to any queued rendering and IO tasks, they -// would be better than imposing the 4ms delay of timers. -// However, they do not work reliably in Internet Explorer or Safari. - -// Internet Explorer 10 is the only browser that has setImmediate but does -// not have MutationObservers. -// Although setImmediate yields to the browser's renderer, it would be -// preferrable to falling back to setTimeout since it does not have -// the minimum 4ms penalty. -// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and -// Desktop to a lesser extent) that renders both setImmediate and -// MessageChannel useless for the purposes of ASAP. -// https://github.com/kriskowal/q/issues/396 - -// Timers are implemented universally. -// We fall back to timers in workers in most engines, and in foreground -// contexts in the following browsers. -// However, note that even this simple case requires nuances to operate in a -// broad spectrum of browsers. -// -// - Firefox 3-13 -// - Internet Explorer 6-9 -// - iPad Safari 4.3 -// - Lynx 2.8.7 +if (typeof BrowserMutationObserver === 'function') { + requestFlush = makeRequestCallFromMutationObserver(flush); // MessageChannels are desirable because they give direct access to the HTML + // task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera + // 11-12, and in web workers in many engines. + // Although message channels yield to any queued rendering and IO tasks, they + // would be better than imposing the 4ms delay of timers. + // However, they do not work reliably in Internet Explorer or Safari. + // Internet Explorer 10 is the only browser that has setImmediate but does + // not have MutationObservers. + // Although setImmediate yields to the browser's renderer, it would be + // preferrable to falling back to setTimeout since it does not have + // the minimum 4ms penalty. + // Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and + // Desktop to a lesser extent) that renders both setImmediate and + // MessageChannel useless for the purposes of ASAP. + // https://github.com/kriskowal/q/issues/396 + // Timers are implemented universally. + // We fall back to timers in workers in most engines, and in foreground + // contexts in the following browsers. + // However, note that even this simple case requires nuances to operate in a + // broad spectrum of browsers. + // + // - Firefox 3-13 + // - Internet Explorer 6-9 + // - iPad Safari 4.3 + // - Lynx 2.8.7 } else { - requestFlush = makeRequestCallFromTimer(flush); -} - -// `requestFlush` requests that the high priority event queue be flushed as + requestFlush = makeRequestCallFromTimer(flush); +} // `requestFlush` requests that the high priority event queue be flushed as // soon as possible. // This is useful to prevent an error thrown in a task from stalling the event // queue if the exception handled by Node.js’s // `process.on("uncaughtException")` or by a domain. -rawAsap.requestFlush = requestFlush; -// To request a high priority event, we induce a mutation observer by toggling + +rawAsap.requestFlush = requestFlush; // To request a high priority event, we induce a mutation observer by toggling // the text of a text node between "1" and "-1". -function makeRequestCallFromMutationObserver(callback) { - var toggle = 1; - var observer = new BrowserMutationObserver(callback); - var node = document.createTextNode(""); - observer.observe(node, {characterData: true}); - return function requestCall() { - toggle = -toggle; - node.data = toggle; - }; -} -// The message channel technique was discovered by Malte Ubl and was the +function makeRequestCallFromMutationObserver(callback) { + var toggle = 1; + var observer = new BrowserMutationObserver(callback); + var node = document.createTextNode(''); + observer.observe(node, { + characterData: true + }); + return function requestCall() { + toggle = -toggle; + node.data = toggle; + }; +} // The message channel technique was discovered by Malte Ubl and was the // original foundation for this library. // http://www.nonblocking.io/2011/06/windownexttick.html - // Safari 6.0.5 (at least) intermittently fails to create message ports on a // page's first load. Thankfully, this version of Safari supports // MutationObservers, so we don't need to fall back in that case. - // function makeRequestCallFromMessageChannel(callback) { // var channel = new MessageChannel(); // channel.port1.onmessage = callback; @@ -1559,7 +1561,6 @@ function makeRequestCallFromMutationObserver(callback) { // channel.port2.postMessage(0); // }; // } - // For reasons explained above, we are also unable to use `setImmediate` // under any circumstances. // Even if we were, there is another bug in Internet Explorer 10. @@ -1567,63 +1568,65 @@ function makeRequestCallFromMutationObserver(callback) { // `setImmediate` must be called *by name* and therefore must be wrapped in a // closure. // Never forget. - // function makeRequestCallFromSetImmediate(callback) { // return function requestCall() { // setImmediate(callback); // }; // } - // Safari 6.0 has a problem where timers will get lost while the user is // scrolling. This problem does not impact ASAP because Safari 6.0 supports // mutation observers, so that implementation is used instead. // However, if we ever elect to use timers in Safari, the prevalent work-around // is to add a scroll event listener that calls for a flush. - // `setTimeout` does not call the passed callback if the delay is less than // approximately 7 in web workers in Firefox 8 through 18, and sometimes not // even then. + function makeRequestCallFromTimer(callback) { - return function requestCall() { - // We dispatch a timeout with a specified delay of 0 for engines that - // can reliably accommodate that request. This will usually be snapped - // to a 4 milisecond delay, but once we're flushing, there's no delay - // between events. - var timeoutHandle = setTimeout(handleTimer, 0); - // However, since this timer gets frequently dropped in Firefox - // workers, we enlist an interval handle that will try to fire - // an event 20 times per second until it succeeds. - var intervalHandle = setInterval(handleTimer, 50); + return function requestCall() { + // We dispatch a timeout with a specified delay of 0 for engines that + // can reliably accommodate that request. This will usually be snapped + // to a 4 milisecond delay, but once we're flushing, there's no delay + // between events. + var timeoutHandle = setTimeout(handleTimer, 0); // However, since this timer gets frequently dropped in Firefox + // workers, we enlist an interval handle that will try to fire + // an event 20 times per second until it succeeds. - function handleTimer() { - // Whichever timer succeeds will cancel both timers and - // execute the callback. - clearTimeout(timeoutHandle); - clearInterval(intervalHandle); - callback(); - } - }; -} + var intervalHandle = setInterval(handleTimer, 50); -// This is for `asap.js` only. + function handleTimer() { + // Whichever timer succeeds will cancel both timers and + // execute the callback. + clearTimeout(timeoutHandle); + clearInterval(intervalHandle); + callback(); + } + }; +} // This is for `asap.js` only. // Its name will be periodically randomized to break any code that depends on // its existence. -rawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;// rawAsap provides everything we need except exception management. + +rawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer; // ASAP was originally a nextTick shim included in Q. This was factored out +// into this ASAP package. It was later adapted to RSVP which made further +// amendments. These decisions, particularly to marginalize MessageChannel and +// to capture the MutationObserver implementation in a closure, were integrated +// back into ASAP proper. +// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js // RawTasks are recycled to reduce GC churn. -var freeTasks = []; -// We queue errors to ensure they are thrown in right order (FIFO). + +var freeTasks = []; // We queue errors to ensure they are thrown in right order (FIFO). // Array-as-queue is good enough here, since we are just dealing with exceptions. + var pendingErrors = []; -var requestErrorThrow = browserRaw.makeRequestCallFromTimer(throwFirstError); +var requestErrorThrow = rawAsap.makeRequestCallFromTimer(throwFirstError); function throwFirstError() { - if (pendingErrors.length) { - throw pendingErrors.shift(); - } + if (pendingErrors.length) { + throw pendingErrors.shift(); + } } - /** * Calls a task as soon as possible after returning, in its own event, with priority * over other events like animation, reflow, and repaint. An error thrown from an @@ -1632,70 +1635,51 @@ function throwFirstError() { * @param {{call}} task A callable object, typically a function that takes no * arguments. */ -var browserAsap = asap; + + function asap(task) { - var rawTask; - if (freeTasks.length) { - rawTask = freeTasks.pop(); - } else { - rawTask = new RawTask(); - } - rawTask.task = task; - browserRaw(rawTask); -} + var rawTask; -// We wrap tasks with recyclable task objects. A task object implements -// `call`, just like a function. -function RawTask() { - this.task = null; -} - -// The sole purpose of wrapping the task is to catch the exception and recycle -// the task object after its single use. -RawTask.prototype.call = function () { - try { - this.task.call(); - } catch (error) { - if (asap.onerror) { - // This hook exists purely for testing purposes. - // Its name will be periodically randomized to break any code that - // depends on its existence. - asap.onerror(error); - } else { - // In a web browser, exceptions are not fatal. However, to avoid - // slowing down the queue of pending tasks, we rethrow the error in a - // lower priority turn. - pendingErrors.push(error); - requestErrorThrow(); - } - } finally { - this.task = null; - freeTasks[freeTasks.length] = this; - } -};var nextUniqueId = 0; -function getNextUniqueId() { - return nextUniqueId++; -}function _typeof$1(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); } -function validateSourceContract(source) { - browser(typeof source.canDrag === 'function', 'Expected canDrag to be a function.'); - browser(typeof source.beginDrag === 'function', 'Expected beginDrag to be a function.'); - browser(typeof source.endDrag === 'function', 'Expected endDrag to be a function.'); -} -function validateTargetContract(target) { - browser(typeof target.canDrop === 'function', 'Expected canDrop to be a function.'); - browser(typeof target.hover === 'function', 'Expected hover to be a function.'); - browser(typeof target.drop === 'function', 'Expected beginDrag to be a function.'); -} -function validateType(type, allowArray) { - if (allowArray && Array.isArray(type)) { - type.forEach(function (t) { - return validateType(t, false); - }); - return; + if (freeTasks.length) { + rawTask = freeTasks.pop(); + } else { + rawTask = new RawTask(); } - browser(typeof type === 'string' || _typeof$1(type) === 'symbol', allowArray ? 'Type can only be a string, a symbol, or an array of either.' : 'Type can only be a string or a symbol.'); -}function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + rawTask.task = task; + rawAsap(rawTask); +} // We wrap tasks with recyclable task objects. A task object implements +// `call`, just like a function. + +var RawTask = +/** @class */ +function () { + function RawTask() {} + + RawTask.prototype.call = function () { + try { + this.task.call(); + } catch (error) { + if (asap.onerror) { + // This hook exists purely for testing purposes. + // Its name will be periodically randomized to break any code that + // depends on its existence. + asap.onerror(error); + } else { + // In a web browser, exceptions are not fatal. However, to avoid + // slowing down the queue of pending tasks, we rethrow the error in a + // lower priority turn. + pendingErrors.push(error); + requestErrorThrow(); + } + } finally { + this.task = null; + freeTasks[freeTasks.length] = this; + } + }; + + return RawTask; +}();function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } @@ -1733,7 +1717,7 @@ function parseRoleFromHandlerId(handlerId) { return HandlerRole.TARGET; default: - browser(false, "Cannot parse handler ID: ".concat(handlerId)); + invariant(false, "Cannot parse handler ID: ".concat(handlerId)); } } @@ -1798,7 +1782,7 @@ function () { key: "getSource", value: function getSource(sourceId) { var includePinned = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - browser(this.isSourceId(sourceId), 'Expected a valid source ID.'); + invariant(this.isSourceId(sourceId), 'Expected a valid source ID.'); var isPinned = includePinned && sourceId === this.pinnedSourceId; var source = isPinned ? this.pinnedSource : this.dragSources.get(sourceId); return source; @@ -1806,19 +1790,19 @@ function () { }, { key: "getTarget", value: function getTarget(targetId) { - browser(this.isTargetId(targetId), 'Expected a valid target ID.'); + invariant(this.isTargetId(targetId), 'Expected a valid target ID.'); return this.dropTargets.get(targetId); } }, { key: "getSourceType", value: function getSourceType(sourceId) { - browser(this.isSourceId(sourceId), 'Expected a valid source ID.'); + invariant(this.isSourceId(sourceId), 'Expected a valid source ID.'); return this.types.get(sourceId); } }, { key: "getTargetType", value: function getTargetType(targetId) { - browser(this.isTargetId(targetId), 'Expected a valid target ID.'); + invariant(this.isTargetId(targetId), 'Expected a valid target ID.'); return this.types.get(targetId); } }, { @@ -1838,9 +1822,9 @@ function () { value: function removeSource$1(sourceId) { var _this = this; - browser(this.getSource(sourceId), 'Expected an existing source.'); + invariant(this.getSource(sourceId), 'Expected an existing source.'); this.store.dispatch(removeSource(sourceId)); - browserAsap(function () { + asap(function () { _this.dragSources.delete(sourceId); _this.types.delete(sourceId); @@ -1849,7 +1833,7 @@ function () { }, { key: "removeTarget", value: function removeTarget$1(targetId) { - browser(this.getTarget(targetId), 'Expected an existing target.'); + invariant(this.getTarget(targetId), 'Expected an existing target.'); this.store.dispatch(removeTarget(targetId)); this.dropTargets.delete(targetId); this.types.delete(targetId); @@ -1858,14 +1842,14 @@ function () { key: "pinSource", value: function pinSource(sourceId) { var source = this.getSource(sourceId); - browser(source, 'Expected an existing source.'); + invariant(source, 'Expected an existing source.'); this.pinnedSourceId = sourceId; this.pinnedSource = source; } }, { key: "unpinSource", value: function unpinSource() { - browser(this.pinnedSource, 'No source is pinned at the time.'); + invariant(this.pinnedSource, 'No source is pinned at the time.'); this.pinnedSourceId = null; this.pinnedSource = null; } @@ -2022,7 +2006,7 @@ function useDragDropManager() { var _useContext = React.useContext(DndContext), dragDropManager = _useContext.dragDropManager; - browser(dragDropManager != null, 'Expected drag drop context'); + invariant(dragDropManager != null, 'Expected drag drop context'); return dragDropManager; }function _classCallCheck$3(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } @@ -2054,7 +2038,7 @@ function () { }, { key: "canDrag", value: function canDrag() { - browser(!isCallingCanDrag, 'You may not call monitor.canDrag() inside your canDrag() implementation. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor'); + invariant(!isCallingCanDrag, 'You may not call monitor.canDrag() inside your canDrag() implementation. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor'); try { isCallingCanDrag = true; @@ -2070,7 +2054,7 @@ function () { return false; } - browser(!isCallingIsDragging, 'You may not call monitor.isDragging() inside your isDragging() implementation. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor'); + invariant(!isCallingIsDragging, 'You may not call monitor.isDragging() inside your isDragging() implementation. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor'); try { isCallingIsDragging = true; @@ -2182,7 +2166,7 @@ function () { function cloneWithRef(element, newRef) { var previousRef = element.ref; - browser(typeof previousRef !== 'string', 'Cannot connect React DnD to an element with an existing string ref. ' + 'Please convert it to use a callback ref instead, or wrap it into a or
. ' + 'Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute'); + invariant(typeof previousRef !== 'string', 'Cannot connect React DnD to an element with an existing string ref. ' + 'Please convert it to use a callback ref instead, or wrap it into a or
. ' + 'Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute'); if (!previousRef) { // When there is no ref on the element, use the new ref directly @@ -2391,12 +2375,12 @@ function () { }, { key: "didDragSourceOptionsChange", value: function didDragSourceOptionsChange() { - return !shallowequal(this.lastConnectedDragSourceOptions, this.dragSourceOptions); + return !shallowEqual(this.lastConnectedDragSourceOptions, this.dragSourceOptions); } }, { key: "didDragPreviewOptionsChange", value: function didDragPreviewOptionsChange() { - return !shallowequal(this.lastConnectedDragPreviewOptions, this.dragPreviewOptions); + return !shallowEqual(this.lastConnectedDragPreviewOptions, this.dragPreviewOptions); } }, { key: "disconnectDragSource", @@ -2492,7 +2476,7 @@ function useDragHandler(spec, monitor, connector) { if (begin) { var beginResult = begin(monitor); - browser(beginResult == null || _typeof$3(beginResult) === 'object', 'dragSpec.begin() must either return an object, undefined, or null'); + invariant(beginResult == null || _typeof$3(beginResult) === 'object', 'dragSpec.begin() must either return an object, undefined, or null'); return beginResult || item || {}; } @@ -2548,8 +2532,8 @@ function useDrag(spec) { var specRef = React.useRef(spec); specRef.current = spec; // TODO: wire options into createSourceConnector - browser(spec.item != null, 'item must be defined'); - browser(spec.item.type != null, 'item type must be defined'); + invariant(spec.item != null, 'item must be defined'); + invariant(spec.item.type != null, 'item type must be defined'); var _useDragSourceMonitor = useDragSourceMonitor(), _useDragSourceMonitor2 = _slicedToArray$4(_useDragSourceMonitor, 2), @@ -2666,7 +2650,7 @@ function () { }, { key: "didOptionsChange", value: function didOptionsChange() { - return !shallowequal(this.lastConnectedDropTargetOptions, this.dropTargetOptions); + return !shallowEqual(this.lastConnectedDropTargetOptions, this.dropTargetOptions); } }, { key: "disconnectDropTarget", @@ -2744,7 +2728,7 @@ function () { return false; } - browser(!isCallingCanDrop, 'You may not call monitor.canDrop() inside your canDrop() implementation. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor'); + invariant(!isCallingCanDrop, 'You may not call monitor.canDrop() inside your canDrop() implementation. ' + 'Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor'); try { isCallingCanDrop = true; @@ -2876,7 +2860,7 @@ function _arrayWithHoles$6(arr) { if (Array.isArray(arr)) return arr; } function useDrop(spec) { var specRef = React.useRef(spec); specRef.current = spec; - browser(spec.accept != null, 'accept must be defined'); + invariant(spec.accept != null, 'accept must be defined'); var _useDropTargetMonitor = useDropTargetMonitor(), _useDropTargetMonitor2 = _slicedToArray$6(_useDropTargetMonitor, 2), @@ -4079,7 +4063,7 @@ function () { }]); return HTML5Backend; -}();var createHTML5Backend = function createHTML5Backend(manager, context) { +}();var createBackend = function createBackend(manager, context) { return new HTML5Backend(manager, context); };if (typeof self !== "undefined") { init(self); @@ -4096,6 +4080,6 @@ function init(g) { useDrag, useDrop, DndProvider, - HTML5Backend: createHTML5Backend + HTML5Backend: createBackend }; }}(React)); \ No newline at end of file diff --git a/frontend/vendor/react-dnd/react-dnd.bundle.min.js b/frontend/vendor/react-dnd/react-dnd.bundle.min.js index 8ffc75ea1..f0c1d103e 100644 --- a/frontend/vendor/react-dnd/react-dnd.bundle.min.js +++ b/frontend/vendor/react-dnd/react-dnd.bundle.min.js @@ -1 +1 @@ -!function(e){"use strict";var t,r="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},n=function(e,t,r,n,i,o,a,u){if(!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[r,n,i,o,a,u],l=0;(c=new Error(t.replace(/%s/g,(function(){return s[l++]})))).name="Invariant Violation"}throw c.framesToPop=1,c}},i="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,o=function(e,t,r,n){var i=r?r.call(n,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(var u=Object.prototype.hasOwnProperty.bind(t),c=0;c0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0},n=r.publishSource,i=void 0===n||n,o=r.clientOffset,a=r.getSourceClientOffset,u=e.getMonitor(),c=e.getRegistry();e.dispatch(m(o)),T(t,u,c);var s=k(t,u);if(null!==s){var l=null;o&&(I(a),l=a(s)),e.dispatch(m(o,l));var f=c.getSource(s),d=f.beginDrag(u,s);E(d),c.pinSource(s);var g=c.getSourceType(s);return{type:h,payload:{itemType:g,item:d,sourceId:s,clientOffset:o||null,sourceClientOffset:l||null,isSourcePublic:!!i}}}e.dispatch(D)}}function T(e,t,r){n(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach((function(e){n(r.getSource(e),"Expected sourceIds to be registered.")}))}function I(e){n("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}function E(e){n(w(e),"Item must be an object.")}function k(e,t){for(var r=null,n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}function C(e){return function(){if(e.getMonitor().isDragging())return{type:p}}}function P(e,t){return null===t?null===e:Array.isArray(e)?e.some((function(e){return e===t})):e===t}function j(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.clientOffset;N(t);var i=t.slice(0),o=e.getMonitor(),a=e.getRegistry();x(i,o,a);var u=o.getItemType();return R(i,a,u),M(i,o,a),{type:v,payload:{targetIds:i,clientOffset:n||null}}}}function N(e){n(Array.isArray(e),"Expected targetIds to be an array.")}function x(e,t,r){n(t.isDragging(),"Cannot call hover while not dragging."),n(!t.didDrop(),"Cannot call hover after drop.");for(var i=0;i=0;n--){var i=e[n];P(t.getTargetType(i),r)||e.splice(n,1)}}function M(e,t,r){e.forEach((function(e){r.getTarget(e).hover(t,e)}))}function A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},r=e.getMonitor(),n=e.getRegistry();U(r);var i=B(r);i.forEach((function(i,o){var a=F(i,o,n,r),u={type:y,payload:{dropResult:_({},t,{},a)}};e.dispatch(u)}))}}function U(e){n(e.isDragging(),"Cannot call drop while not dragging."),n(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function F(e,t,r,i){var o=r.getTarget(e),a=o?o.drop(i,e):void 0;return function(e){n(void 0===e||w(e),"Drop result must either be an object or undefined.")}(a),void 0===a&&(a=0===t?{}:i.getDropResult()),a}function B(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Y(e){return function(){var t=e.getMonitor(),r=e.getRegistry();!function(e){n(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);var i=t.getSourceId();return r.getSource(i,!0).endDrag(t,i),r.unpinSource(),{type:b}}}var G=function(e,t){return e===t};function X(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function W(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var K={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function V(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K,n=arguments.length>1?arguments[1]:void 0,i=n.payload;switch(n.type){case g:case h:return{initialSourceClientOffset:i.sourceClientOffset,initialClientOffset:i.clientOffset,clientOffset:i.clientOffset};case v:return e=r.clientOffset,t=i.clientOffset,!e&&!t||e&&t&&e.x===t.x&&e.y===t.y?r:function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:te,n=arguments.length>1?arguments[1]:void 0,i=n.payload;switch(n.type){case h:return $({},r,{itemType:i.itemType,item:i.item,sourceId:i.sourceId,isSourcePublic:i.isSourcePublic,dropResult:null,didDrop:!1});case p:return $({},r,{isSourcePublic:!0});case v:return $({},r,{targetIds:i.targetIds});case Q:return-1===r.targetIds.indexOf(i.targetId)?r:$({},r,{targetIds:(e=r.targetIds,t=i.targetId,e.filter((function(e){return e!==t})))});case y:return $({},r,{dropResult:i.dropResult,didDrop:!0,targetIds:[]});case b:return $({},r,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return r}}function ne(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;switch((arguments.length>1?arguments[1]:void 0).type){case q:case z:return e+1;case J:case Q:return e-1;default:return e}}var ie=[],oe=[];function ae(e,t){return e!==ie&&(e===oe||void 0===t||(r=e,t.filter((function(e){return r.indexOf(e)>-1}))).length>0);var r}function ue(){var e=arguments.length>1?arguments[1]:void 0;switch(e.type){case v:break;case q:case z:case Q:case J:return ie;case h:case p:case b:case y:default:return oe}var t=e.payload,r=t.targetIds,n=void 0===r?[]:r,i=t.prevTargetIds,o=void 0===i?[]:i,a=function(e,t){var r=new Map,n=function(e){return r.set(e,r.has(e)?r.get(e)+1:1)};e.forEach(n),t.forEach(n);var i=[];return r.forEach((function(e,t){1===e&&i.push(t)})),i}(n,o);if(!(a.length>0||!function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:G;if(e.length!==t.length)return!1;for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0)+1}function se(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function le(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:ue(n.dirtyHandlerIds,{type:i.type,payload:le({},i.payload,{prevTargetIds:(e=n,t="dragOperation.targetIds",r=[],t.split(".").reduce((function(e,t){return e&&e[t]?e[t]:r||null}),e))})}),dragOffset:V(n.dragOffset,i),refCount:ne(n.refCount,i),dragOperation:re(n.dragOperation,i),stateId:ce(n.stateId)}}function ge(e,t){return{x:e.x-t.x,y:e.y-t.y}}function he(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{handlerIds:void 0},i=r.handlerIds;n("function"==typeof e,"listener must be a function."),n(void 0===i||Array.isArray(i),"handlerIds, when specified, must be an array of strings.");var o=this.store.getState().stateId,a=function(){var r=t.store.getState(),n=r.stateId;try{n===o||n===o+1&&!ae(r.dirtyHandlerIds,i)||e()}finally{o=n}};return this.store.subscribe(a)}},{key:"subscribeToOffsetChange",value:function(e){var t=this;n("function"==typeof e,"listener must be a function.");var r=this.store.getState().dragOffset;return this.store.subscribe((function(){var n=t.store.getState().dragOffset;n!==r&&(r=n,e())}))}},{key:"canDragSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e);return n(t,"Expected to find a valid source."),!this.isDragging()&&t.canDrag(this,e)}},{key:"canDropOnTarget",value:function(e){if(!e)return!1;var t=this.registry.getTarget(e);return n(t,"Expected to find a valid target."),!(!this.isDragging()||this.didDrop())&&P(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}},{key:"isDragging",value:function(){return Boolean(this.getItemType())}},{key:"isDraggingSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e,!0);return n(t,"Expected to find a valid source."),!(!this.isDragging()||!this.isSourcePublic())&&this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}},{key:"isOverTarget",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1};if(!e)return!1;var r=t.shallow;if(!this.isDragging())return!1;var n=this.registry.getTargetType(e),i=this.getItemType();if(i&&!P(n,i))return!1;var o=this.getTargetIds();if(!o.length)return!1;var a=o.indexOf(e);return r?a===o.length-1:a>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return e=this.store.getState().dragOffset,n=e.clientOffset,i=e.initialClientOffset,o=e.initialSourceClientOffset,n&&i&&o?ge((r=o,{x:(t=n).x+r.x,y:t.y+r.y}),i):null;var e,t,r,n,i,o}},{key:"getDifferenceFromInitialOffset",value:function(){return e=this.store.getState().dragOffset,t=e.clientOffset,r=e.initialClientOffset,t&&r?ge(t,r):null;var e,t,r}}])&&he(t.prototype,r),i&&he(t,i),e}(),ve="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},ye=be;function be(e){Oe.length||me(),Oe[Oe.length]=e}var me,Oe=[],we=0,De=1024;function Se(){for(;weDe){for(var t=0,r=Oe.length-we;t1&&void 0!==arguments[1]&&arguments[1];n(this.isSourceId(e),"Expected a valid source ID.");var r=t&&e===this.pinnedSourceId,i=r?this.pinnedSource:this.dragSources.get(e);return i}},{key:"getTarget",value:function(e){return n(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}},{key:"getSourceType",value:function(e){return n(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}},{key:"getTargetType",value:function(e){return n(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}},{key:"isSourceId",value:function(e){return Ye(e)===t.SOURCE}},{key:"isTargetId",value:function(e){return Ye(e)===t.TARGET}},{key:"removeSource",value:function(e){var t=this;n(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:J,payload:{sourceId:e}}}(e)),Re((function(){t.dragSources.delete(e),t.types.delete(e)}))}},{key:"removeTarget",value:function(e){n(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:Q,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}},{key:"pinSource",value:function(e){var t=this.getSource(e);n(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}},{key:"unpinSource",value:function(){n(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(e,r,n){var i=Be(e);return this.types.set(i,r),e===t.SOURCE?this.dragSources.set(i,n):e===t.TARGET&&this.dropTargets.set(i,n),i}}])&&Ue(r.prototype,i),o&&Ue(r,o),e}();function We(e,t){for(var r=0;r0&&void 0!==arguments[0]&&arguments[0];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.isSetUp=!1,this.handleRefCountChange=function(){var e=t.store.getState().refCount>0;t.backend&&(e&&!t.isSetUp?(t.backend.setup(),t.isSetUp=!0):!e&&t.isSetUp&&(t.backend.teardown(),t.isSetUp=!1))};var n=function(e){var t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return d(de,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}(r);this.store=n,this.monitor=new pe(n,new Xe(n)),n.subscribe(this.handleRefCountChange)}var t,r,n;return t=e,(r=[{key:"receiveBackend",value:function(e){this.backend=e}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var e=this,t=this.store.dispatch,r=function(e){return{beginDrag:S(e),publishDragSource:C(e),hover:j(e),drop:H(e),endDrag:Y(e)}}(this);return Object.keys(r).reduce((function(n,i){var o,a=r[i];return n[i]=(o=a,function(){for(var r=arguments.length,n=new Array(r),i=0;i or
. Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute"),i?e.cloneElement(t,{ref:function(e){et(i,e),et(r,e)}}):e.cloneElement(t,{ref:r})}function rt(e){if("string"!=typeof e.type){var t=e.type.displayName||e.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(t," into a
, or turn it into a ")+"drag source or a drop target itself.")}}function nt(t){var r={};return Object.keys(t).forEach((function(n){var i=t[n];if(n.endsWith("Ref"))r[n]=t[n];else{var o=function(t){return function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e.isValidElement(r)){var i=r;return t(i,n),i}var o=r;rt(o);var a=n?function(e){return t(e,n)}:t;return tt(o,a)}}(i);r[n]=function(){return o}}})),r}function it(e){return(it="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ot(e){return null!==e&&"object"===it(e)&&e.hasOwnProperty("current")}function at(e,t){for(var r=0;r=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var Dt=0,St=e.memo((function(t){var r=t.children,n=Ot(function(e){if("manager"in e){return[{dragDropManager:e.manager},!1]}var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:It(),r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,i=t;i[Tt]||(i[Tt]=function(e,t,r,n){return{dragDropManager:Ve(e,t,r,n)}}(e,t,r,n));return i[Tt]}(e.backend,e.context,e.options,e.debugMode),r=!e.context;return[t,r]}(wt(t,["children"])),2),i=n[0],o=n[1];return e.useEffect((function(){return o&&Dt++,function(){o&&(0===--Dt&&(It()[Tt]=null))}}),[]),e.createElement(qe.Provider,{value:i},r)}));St.displayName="DndProvider";var Tt=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");function It(){return void 0!==r?r:window}function Et(e){var t=null;return function(){return null==t&&(t=e()),t}}function kt(e,t){for(var r=0;r0}},{key:"leave",value:function(e){var t,r,n=this.entered.length;return this.entered=(t=this.entered.filter(this.isNodeInDocument),r=e,t.filter((function(e){return e!==r}))),n>0&&0===this.entered.length}},{key:"reset",value:function(){this.entered=[]}}])&&kt(t.prototype,r),n&&kt(t,n),e}(),Pt=Et((function(){return/firefox/i.test(navigator.userAgent)})),jt=Et((function(){return Boolean(window.safari)}));function Nt(e,t){for(var r=0;re))return r[u];s=u-1}}var f=e-t[a=Math.max(0,s)],d=f*f;return r[a]+n[a]*f+i[a]*d+o[a]*f*d}}])&&Nt(t.prototype,r),n&&Nt(t,n),e}(),Rt=1;function Mt(e){var t=e.nodeType===Rt?e:e.parentElement;if(!t)return null;var r=t.getBoundingClientRect(),n=r.top;return{x:r.left,y:n}}function At(e){return{x:e.clientX,y:e.clientY}}function _t(e,t,r,n,i){var o,a=function(e){return"IMG"===e.nodeName&&(Pt()||!document.documentElement.contains(e))}(t),u=Mt(a?e:t),c={x:r.x-u.x,y:r.y-u.y},s=e.offsetWidth,l=e.offsetHeight,f=n.anchorX,d=n.anchorY,g=function(e,t,r,n){var i=e?t.width:r,o=e?t.height:n;return jt()&&e&&(o/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:o}}(a,t,s,l),h=g.dragPreviewWidth,p=g.dragPreviewHeight,v=i.offsetX,y=i.offsetY,b=0===y||y;return{x:0===v||v?v:new xt([0,.5,1],[c.x,c.x/s*h,c.x+h-s]).interpolate(f),y:b?y:(o=new xt([0,.5,1],[c.y,c.y/l*p,c.y+p-l]).interpolate(d),jt()&&a&&(o+=(window.devicePixelRatio-1)*p),o)}}var Lt,Ht="__NATIVE_FILE__",Ut="__NATIVE_URL__",Ft="__NATIVE_TEXT__",Bt=Object.freeze({__proto__:null,FILE:Ht,URL:Ut,TEXT:Ft});function Yt(e,t,r){var n=t.reduce((function(t,r){return t||e.getData(r)}),"");return null!=n?n:r}function Gt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Xt=(Gt(Lt={},Ht,{exposeProperties:{files:function(e){return Array.prototype.slice.call(e.files)},items:function(e){return e.items}},matchesTypes:["Files"]}),Gt(Lt,Ut,{exposeProperties:{urls:function(e,t){return Yt(e,t,"").split("\n")}},matchesTypes:["Url","text/uri-list"]}),Gt(Lt,Ft,{exposeProperties:{text:function(e,t){return Yt(e,t,"")}},matchesTypes:["Text","text/plain"]}),Lt);function Wt(e,t){for(var r=0;r-1}))}))[0]||null}function qt(e,t){for(var r=0;r2?r-2:0),i=2;i0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{publishSource:!0},n=r.publishSource,i=void 0===n||n,o=r.clientOffset,a=r.getSourceClientOffset,u=e.getMonitor(),c=e.getRegistry();e.dispatch(O(o)),C(t,u,c);var s=N(t,u);if(null!==s){var l=null;o&&(P(a),l=a(s)),e.dispatch(O(o,l));var f=c.getSource(s),d=f.beginDrag(u,s);j(d),c.pinSource(s);var g=c.getSourceType(s);return{type:p,payload:{itemType:g,item:d,sourceId:s,clientOffset:o||null,sourceClientOffset:l||null,isSourcePublic:!!i}}}e.dispatch(E)}}function C(e,t,n){r(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach((function(e){r(n.getSource(e),"Expected sourceIds to be registered.")}))}function P(e){r("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}function j(e){r(T(e),"Item must be an object.")}function N(e,t){for(var r=null,n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}function x(e){return function(){if(e.getMonitor().isDragging())return{type:v}}}function R(e,t){return null===t?null===e:Array.isArray(e)?e.some((function(e){return e===t})):e===t}function M(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.clientOffset;A(t);var i=t.slice(0),o=e.getMonitor(),a=e.getRegistry();_(i,o,a);var u=o.getItemType();return L(i,a,u),H(i,o,a),{type:y,payload:{targetIds:i,clientOffset:n||null}}}}function A(e){r(Array.isArray(e),"Expected targetIds to be an array.")}function _(e,t,n){r(t.isDragging(),"Cannot call hover while not dragging."),r(!t.didDrop(),"Cannot call hover after drop.");for(var i=0;i=0;n--){var i=e[n];R(t.getTargetType(i),r)||e.splice(n,1)}}function H(e,t,r){e.forEach((function(e){r.getTarget(e).hover(t,e)}))}function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function F(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},r=e.getMonitor(),n=e.getRegistry();G(r);var i=W(r);i.forEach((function(i,o){var a=X(i,o,n,r),u={type:b,payload:{dropResult:F({},t,{},a)}};e.dispatch(u)}))}}function G(e){r(e.isDragging(),"Cannot call drop while not dragging."),r(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function X(e,t,n,i){var o=n.getTarget(e),a=o?o.drop(i,e):void 0;return function(e){r(void 0===e||T(e),"Drop result must either be an object or undefined.")}(a),void 0===a&&(a=0===t?{}:i.getDropResult()),a}function W(e){var t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function K(e){return function(){var t=e.getMonitor(),n=e.getRegistry();!function(e){r(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);var i=t.getSourceId();return n.getSource(i,!0).endDrag(t,i),n.unpinSource(),{type:m}}}var V=function(e,t){return e===t};function q(e,t){return!e&&!t||!(!e||!t)&&(e.x===t.x&&e.y===t.y)}function z(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:V;if(e.length!==t.length)return!1;for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:$,t=arguments.length>1?arguments[1]:void 0,r=t.payload;switch(t.type){case h:case p:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case y:return q(e.clientOffset,r.clientOffset)?e:Q({},e,{clientOffset:r.clientOffset});case m:case b:return $;default:return e}}var te="dnd-core/ADD_SOURCE",re="dnd-core/ADD_TARGET",ne="dnd-core/REMOVE_SOURCE",ie="dnd-core/REMOVE_TARGET";function oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ae(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:ce,t=arguments.length>1?arguments[1]:void 0,r=t.payload;switch(t.type){case p:return ae({},e,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case v:return ae({},e,{isSourcePublic:!0});case y:return ae({},e,{targetIds:r.targetIds});case ie:return-1===e.targetIds.indexOf(r.targetId)?e:ae({},e,{targetIds:S(e.targetIds,r.targetId)});case b:return ae({},e,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case m:return ae({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function le(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case te:case re:return e+1;case ne:case ie:return e-1;default:return e}}var fe=[],de=[];function ge(e,t){return e!==fe&&(e===de||void 0===t||(r=e,t.filter((function(e){return r.indexOf(e)>-1}))).length>0);var r}function he(){var e=arguments.length>1?arguments[1]:void 0;switch(e.type){case y:break;case te:case re:case ie:case ne:return fe;case p:case v:case m:case b:default:return de}var t=e.payload,r=t.targetIds,n=void 0===r?[]:r,i=t.prevTargetIds,o=void 0===i?[]:i,a=I(n,o),u=a.length>0||!z(n,o);if(!u)return fe;var c=o[o.length-1],s=n[n.length-1];return c!==s&&(c&&a.push(c),s&&a.push(s)),a}function pe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e+1}function ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ye(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{dirtyHandlerIds:he(e.dirtyHandlerIds,{type:t.type,payload:ye({},t.payload,{prevTargetIds:D(e,"dragOperation.targetIds",[])})}),dragOffset:ee(e.dragOffset,t),refCount:le(e.refCount,t),dragOperation:se(e.dragOperation,t),stateId:pe(e.stateId)}}function Oe(e,t){return{x:e.x-t.x,y:e.y-t.y}}function we(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{handlerIds:void 0},i=n.handlerIds;r("function"==typeof e,"listener must be a function."),r(void 0===i||Array.isArray(i),"handlerIds, when specified, must be an array of strings.");var o=this.store.getState().stateId,a=function(){var r=t.store.getState(),n=r.stateId;try{n===o||n===o+1&&!ge(r.dirtyHandlerIds,i)||e()}finally{o=n}};return this.store.subscribe(a)}},{key:"subscribeToOffsetChange",value:function(e){var t=this;r("function"==typeof e,"listener must be a function.");var n=this.store.getState().dragOffset;return this.store.subscribe((function(){var r=t.store.getState().dragOffset;r!==n&&(n=r,e())}))}},{key:"canDragSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e);return r(t,"Expected to find a valid source."),!this.isDragging()&&t.canDrag(this,e)}},{key:"canDropOnTarget",value:function(e){if(!e)return!1;var t=this.registry.getTarget(e);return r(t,"Expected to find a valid target."),!(!this.isDragging()||this.didDrop())&&R(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}},{key:"isDragging",value:function(){return Boolean(this.getItemType())}},{key:"isDraggingSource",value:function(e){if(!e)return!1;var t=this.registry.getSource(e,!0);return r(t,"Expected to find a valid source."),!(!this.isDragging()||!this.isSourcePublic())&&this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}},{key:"isOverTarget",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shallow:!1};if(!e)return!1;var r=t.shallow;if(!this.isDragging())return!1;var n=this.registry.getTargetType(e),i=this.getItemType();if(i&&!R(n,i))return!1;var o=this.getTargetIds();if(!o.length)return!1;var a=o.indexOf(e);return r?a===o.length-1:a>-1}},{key:"getItemType",value:function(){return this.store.getState().dragOperation.itemType}},{key:"getItem",value:function(){return this.store.getState().dragOperation.item}},{key:"getSourceId",value:function(){return this.store.getState().dragOperation.sourceId}},{key:"getTargetIds",value:function(){return this.store.getState().dragOperation.targetIds}},{key:"getDropResult",value:function(){return this.store.getState().dragOperation.dropResult}},{key:"didDrop",value:function(){return this.store.getState().dragOperation.didDrop}},{key:"isSourcePublic",value:function(){return this.store.getState().dragOperation.isSourcePublic}},{key:"getInitialClientOffset",value:function(){return this.store.getState().dragOffset.initialClientOffset}},{key:"getInitialSourceClientOffset",value:function(){return this.store.getState().dragOffset.initialSourceClientOffset}},{key:"getClientOffset",value:function(){return this.store.getState().dragOffset.clientOffset}},{key:"getSourceClientOffset",value:function(){return e=this.store.getState().dragOffset,n=e.clientOffset,i=e.initialClientOffset,o=e.initialSourceClientOffset,n&&i&&o?Oe((r=o,{x:(t=n).x+r.x,y:t.y+r.y}),i):null;var e,t,r,n,i,o}},{key:"getDifferenceFromInitialOffset",value:function(){return e=this.store.getState().dragOffset,t=e.clientOffset,r=e.initialClientOffset,t&&r?Oe(t,r):null;var e,t,r}}])&&we(t.prototype,n),i&&we(t,i),e}(),Se=0;function Te(e){return(Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ie(e,t){t&&Array.isArray(e)?e.forEach((function(e){return Ie(e,!1)})):r("string"==typeof e||"symbol"===Te(e),t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}function Ee(e){Ce.length||ke(),Ce[Ce.length]=e}var ke,Ce=[],Pe=0;function je(){for(;Pe1024){for(var t=0,r=Ce.length-Pe;t1&&void 0!==arguments[1]&&arguments[1];r(this.isSourceId(e),"Expected a valid source ID.");var n=t&&e===this.pinnedSourceId,i=n?this.pinnedSource:this.dragSources.get(e);return i}},{key:"getTarget",value:function(e){return r(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}},{key:"getSourceType",value:function(e){return r(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}},{key:"getTargetType",value:function(e){return r(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}},{key:"isSourceId",value:function(e){return We(e)===n.SOURCE}},{key:"isTargetId",value:function(e){return We(e)===n.TARGET}},{key:"removeSource",value:function(e){var t=this;r(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:ne,payload:{sourceId:e}}}(e)),Fe((function(){t.dragSources.delete(e),t.types.delete(e)}))}},{key:"removeTarget",value:function(e){r(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:ie,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}},{key:"pinSource",value:function(e){var t=this.getSource(e);r(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}},{key:"unpinSource",value:function(){r(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}},{key:"addHandler",value:function(e,t,r){var i=Xe(e);return this.types.set(i,t),e===n.SOURCE?this.dragSources.set(i,r):e===n.TARGET&&this.dropTargets.set(i,r),i}}])&&Ye(t.prototype,i),o&&Ye(t,o),e}();function qe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ze(e,t){for(var r=0;r0&&void 0!==arguments[0]&&arguments[0];qe(this,e),this.isSetUp=!1,this.handleRefCountChange=function(){var e=t.store.getState().refCount>0;t.backend&&(e&&!t.isSetUp?(t.backend.setup(),t.isSetUp=!0):!e&&t.isSetUp&&(t.backend.teardown(),t.isSetUp=!1))};var n=Je(r);this.store=n,this.monitor=new De(n,new Ve(n)),n.subscribe(this.handleRefCountChange)}var t,r,n;return t=e,(r=[{key:"receiveBackend",value:function(e){this.backend=e}},{key:"getMonitor",value:function(){return this.monitor}},{key:"getBackend",value:function(){return this.backend}},{key:"getRegistry",value:function(){return this.monitor.registry}},{key:"getActions",value:function(){var e=this,t=this.store.dispatch,r=function(e){return{beginDrag:k(e),publishDragSource:x(e),hover:M(e),drop:Y(e),endDrag:K(e)}}(this);return Object.keys(r).reduce((function(n,i){var o,a=r[i];return n[i]=(o=a,function(){for(var r=arguments.length,n=new Array(r),i=0;i or
. Read more: https://facebook.github.io/react/docs/more-about-refs.html#the-ref-callback-attribute"),i?e.cloneElement(t,{ref:function(e){at(i,e),at(n,e)}}):e.cloneElement(t,{ref:n})}function ct(e){if("string"!=typeof e.type){var t=e.type.displayName||e.type.name||"the component";throw new Error("Only native element nodes can now be passed to React DnD connectors."+"You can either wrap ".concat(t," into a
, or turn it into a ")+"drag source or a drop target itself.")}}function st(t){var r={};return Object.keys(t).forEach((function(n){var i=t[n];if(n.endsWith("Ref"))r[n]=t[n];else{var o=function(t){return function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e.isValidElement(r)){var i=r;return t(i,n),i}var o=r;ct(o);var a=n?function(e){return t(e,n)}:t;return ut(o,a)}}(i);r[n]=function(){return o}}})),r}function lt(e){return(lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ft(e){return null!==e&&"object"===lt(e)&&e.hasOwnProperty("current")}function dt(e,t){for(var r=0;r=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var Ct=0,Pt=e.memo((function(t){var r=t.children,n=Et(function(e){if("manager"in e){return[{dragDropManager:e.manager},!1]}var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Nt(),r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,i=t;i[jt]||(i[jt]=et(e,t,r,n));return i[jt]}(e.backend,e.context,e.options,e.debugMode),r=!e.context;return[t,r]}(kt(t,["children"])),2),i=n[0],o=n[1];return e.useEffect((function(){return o&&Ct++,function(){o&&(0===--Ct&&(Nt()[jt]=null))}}),[]),e.createElement($e.Provider,{value:i},r)}));Pt.displayName="DndProvider";var jt=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");function Nt(){return void 0!==t?t:window}function xt(e){var t=null;return function(){return null==t&&(t=e()),t}}function Rt(e,t){for(var r=0;r0}},{key:"leave",value:function(e){var t,r,n=this.entered.length;return this.entered=(t=this.entered.filter(this.isNodeInDocument),r=e,t.filter((function(e){return e!==r}))),n>0&&0===this.entered.length}},{key:"reset",value:function(){this.entered=[]}}])&&Rt(t.prototype,r),n&&Rt(t,n),e}(),At=xt((function(){return/firefox/i.test(navigator.userAgent)})),_t=xt((function(){return Boolean(window.safari)}));function Lt(e,t){for(var r=0;re))return r[u];s=u-1}}var f=e-t[a=Math.max(0,s)],d=f*f;return r[a]+n[a]*f+i[a]*d+o[a]*f*d}}])&&Lt(t.prototype,r),n&&Lt(t,n),e}();function Ut(e){var t=1===e.nodeType?e:e.parentElement;if(!t)return null;var r=t.getBoundingClientRect(),n=r.top;return{x:r.left,y:n}}function Ft(e){return{x:e.clientX,y:e.clientY}}function Bt(e,t,r,n,i){var o,a=function(e){return"IMG"===e.nodeName&&(At()||!document.documentElement.contains(e))}(t),u=Ut(a?e:t),c={x:r.x-u.x,y:r.y-u.y},s=e.offsetWidth,l=e.offsetHeight,f=n.anchorX,d=n.anchorY,g=function(e,t,r,n){var i=e?t.width:r,o=e?t.height:n;return _t()&&e&&(o/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:o}}(a,t,s,l),h=g.dragPreviewWidth,p=g.dragPreviewHeight,v=i.offsetX,y=i.offsetY,b=0===y||y;return{x:0===v||v?v:new Ht([0,.5,1],[c.x,c.x/s*h,c.x+h-s]).interpolate(f),y:b?y:(o=new Ht([0,.5,1],[c.y,c.y/l*p,c.y+p-l]).interpolate(d),_t()&&a&&(o+=(window.devicePixelRatio-1)*p),o)}}var Yt,Gt="__NATIVE_FILE__",Xt="__NATIVE_URL__",Wt="__NATIVE_TEXT__",Kt=Object.freeze({__proto__:null,FILE:Gt,URL:Xt,TEXT:Wt});function Vt(e,t,r){var n=t.reduce((function(t,r){return t||e.getData(r)}),"");return null!=n?n:r}function qt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var zt=(qt(Yt={},Gt,{exposeProperties:{files:function(e){return Array.prototype.slice.call(e.files)},items:function(e){return e.items}},matchesTypes:["Files"]}),qt(Yt,Xt,{exposeProperties:{urls:function(e,t){return Vt(e,t,"").split("\n")}},matchesTypes:["Url","text/uri-list"]}),qt(Yt,Wt,{exposeProperties:{text:function(e,t){return Vt(e,t,"")}},matchesTypes:["Text","text/plain"]}),Yt);function Jt(e,t){for(var r=0;r-1}))}))[0]||null}function $t(e,t){for(var r=0;r