javascript-time-ago 2.3.5 → 2.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/README.md +19 -13
- package/bin/generate-locale-messages.js +5 -1
- package/bundle/javascript-time-ago.js +1 -1
- package/bundle/javascript-time-ago.js.map +1 -1
- package/bundle/javascript-time-ago.min.js +1 -1
- package/bundle/javascript-time-ago.min.js.map +1 -1
- package/commonjs/TimeAgo.js +1 -1
- package/commonjs/TimeAgo.js.map +1 -1
- package/commonjs/TimeAgo.test.js +6 -6
- package/commonjs/TimeAgo.test.js.map +1 -1
- package/commonjs/style/twitter.test.js +3 -3
- package/commonjs/style/twitter.test.js.map +1 -1
- package/index.d.ts +129 -0
- package/locale/af/index.js +3 -1
- package/locale/am/index.js +3 -1
- package/locale/ar/index.js +3 -1
- package/locale/ar-AE/index.js +3 -1
- package/locale/as/index.js +3 -1
- package/locale/ast/index.js +3 -1
- package/locale/az/index.js +3 -1
- package/locale/be/index.js +3 -1
- package/locale/bg/index.js +3 -1
- package/locale/bn/index.js +3 -1
- package/locale/br/index.js +3 -1
- package/locale/bs/index.js +3 -1
- package/locale/bs-Cyrl/index.js +3 -1
- package/locale/ca/index.js +3 -1
- package/locale/ccp/index.js +3 -1
- package/locale/ce/index.js +3 -1
- package/locale/chr/index.js +3 -1
- package/locale/cs/index.js +3 -1
- package/locale/cy/index.js +3 -1
- package/locale/da/index.js +3 -1
- package/locale/da.json +19 -0
- package/locale/de/index.js +3 -1
- package/locale/dsb/index.js +3 -1
- package/locale/dz/index.js +3 -1
- package/locale/ee/index.js +3 -1
- package/locale/el/index.js +3 -1
- package/locale/en/index.js +3 -1
- package/locale/en-001/index.js +3 -1
- package/locale/en-150/index.js +3 -1
- package/locale/en-AG/index.js +3 -1
- package/locale/en-AI/index.js +3 -1
- package/locale/en-AT/index.js +3 -1
- package/locale/en-AU/index.js +3 -1
- package/locale/en-BB/index.js +3 -1
- package/locale/en-BE/index.js +3 -1
- package/locale/en-BM/index.js +3 -1
- package/locale/en-BS/index.js +3 -1
- package/locale/en-BW/index.js +3 -1
- package/locale/en-BZ/index.js +3 -1
- package/locale/en-CA/index.js +3 -1
- package/locale/en-CC/index.js +3 -1
- package/locale/en-CH/index.js +3 -1
- package/locale/en-CK/index.js +3 -1
- package/locale/en-CM/index.js +3 -1
- package/locale/en-CX/index.js +3 -1
- package/locale/en-CY/index.js +3 -1
- package/locale/en-DE/index.js +3 -1
- package/locale/en-DG/index.js +3 -1
- package/locale/en-DK/index.js +3 -1
- package/locale/en-DM/index.js +3 -1
- package/locale/en-ER/index.js +3 -1
- package/locale/en-FI/index.js +3 -1
- package/locale/en-FJ/index.js +3 -1
- package/locale/en-FK/index.js +3 -1
- package/locale/en-FM/index.js +3 -1
- package/locale/en-GB/index.js +3 -1
- package/locale/en-GD/index.js +3 -1
- package/locale/en-GG/index.js +3 -1
- package/locale/en-GH/index.js +3 -1
- package/locale/en-GI/index.js +3 -1
- package/locale/en-GM/index.js +3 -1
- package/locale/en-GY/index.js +3 -1
- package/locale/en-HK/index.js +3 -1
- package/locale/en-IE/index.js +3 -1
- package/locale/en-IL/index.js +3 -1
- package/locale/en-IM/index.js +3 -1
- package/locale/en-IN/index.js +3 -1
- package/locale/en-IO/index.js +3 -1
- package/locale/en-JE/index.js +3 -1
- package/locale/en-JM/index.js +3 -1
- package/locale/en-KE/index.js +3 -1
- package/locale/en-KI/index.js +3 -1
- package/locale/en-KN/index.js +3 -1
- package/locale/en-KY/index.js +3 -1
- package/locale/en-LC/index.js +3 -1
- package/locale/en-LR/index.js +3 -1
- package/locale/en-LS/index.js +3 -1
- package/locale/en-MG/index.js +3 -1
- package/locale/en-MO/index.js +3 -1
- package/locale/en-MS/index.js +3 -1
- package/locale/en-MT/index.js +3 -1
- package/locale/en-MU/index.js +3 -1
- package/locale/en-MW/index.js +3 -1
- package/locale/en-MY/index.js +3 -1
- package/locale/en-NA/index.js +3 -1
- package/locale/en-NF/index.js +3 -1
- package/locale/en-NG/index.js +3 -1
- package/locale/en-NL/index.js +3 -1
- package/locale/en-NR/index.js +3 -1
- package/locale/en-NU/index.js +3 -1
- package/locale/en-NZ/index.js +3 -1
- package/locale/en-PG/index.js +3 -1
- package/locale/en-PH/index.js +3 -1
- package/locale/en-PK/index.js +3 -1
- package/locale/en-PN/index.js +3 -1
- package/locale/en-PW/index.js +3 -1
- package/locale/en-RW/index.js +3 -1
- package/locale/en-SB/index.js +3 -1
- package/locale/en-SC/index.js +3 -1
- package/locale/en-SD/index.js +3 -1
- package/locale/en-SE/index.js +3 -1
- package/locale/en-SG/index.js +3 -1
- package/locale/en-SH/index.js +3 -1
- package/locale/en-SI/index.js +3 -1
- package/locale/en-SL/index.js +3 -1
- package/locale/en-SS/index.js +3 -1
- package/locale/en-SX/index.js +3 -1
- package/locale/en-SZ/index.js +3 -1
- package/locale/en-TC/index.js +3 -1
- package/locale/en-TK/index.js +3 -1
- package/locale/en-TO/index.js +3 -1
- package/locale/en-TT/index.js +3 -1
- package/locale/en-TV/index.js +3 -1
- package/locale/en-TZ/index.js +3 -1
- package/locale/en-UG/index.js +3 -1
- package/locale/en-VC/index.js +3 -1
- package/locale/en-VG/index.js +3 -1
- package/locale/en-VU/index.js +3 -1
- package/locale/en-WS/index.js +3 -1
- package/locale/en-ZA/index.js +3 -1
- package/locale/en-ZM/index.js +3 -1
- package/locale/en-ZW/index.js +3 -1
- package/locale/es/index.js +3 -1
- package/locale/es-AR/index.js +3 -1
- package/locale/es-MX/index.js +3 -1
- package/locale/es-PY/index.js +3 -1
- package/locale/es-SV/index.js +3 -1
- package/locale/es-US/index.js +3 -1
- package/locale/es.json +19 -7
- package/locale/et/index.js +3 -1
- package/locale/eu/index.js +3 -1
- package/locale/fa/index.js +3 -1
- package/locale/fi/index.js +3 -1
- package/locale/fil/index.js +3 -1
- package/locale/fo/index.js +3 -1
- package/locale/fr/index.js +3 -1
- package/locale/fr-CA/index.js +3 -1
- package/locale/fr.json +11 -5
- package/locale/fur/index.js +3 -1
- package/locale/fy/index.js +3 -1
- package/locale/ga/index.js +3 -1
- package/locale/gd/index.js +3 -1
- package/locale/gl/index.js +3 -1
- package/locale/gu/index.js +3 -1
- package/locale/he/index.js +3 -1
- package/locale/hi/index.js +3 -1
- package/locale/hi.json +2 -8
- package/locale/hr/index.js +3 -1
- package/locale/hsb/index.js +3 -1
- package/locale/hu/index.js +3 -1
- package/locale/hy/index.js +3 -1
- package/locale/ia/index.js +3 -1
- package/locale/id/index.js +3 -1
- package/locale/is/index.js +3 -1
- package/locale/it/index.js +3 -1
- package/locale/it.json +19 -0
- package/locale/ja/index.js +3 -1
- package/locale/jgo/index.js +3 -1
- package/locale/jv/index.js +3 -1
- package/locale/ka/index.js +3 -1
- package/locale/kea/index.js +3 -1
- package/locale/kk/index.js +3 -1
- package/locale/kl/index.js +3 -1
- package/locale/km/index.js +3 -1
- package/locale/kn/index.js +3 -1
- package/locale/ko/index.js +3 -1
- package/locale/kok/index.js +3 -1
- package/locale/ksh/index.js +3 -1
- package/locale/ku/index.js +3 -1
- package/locale/ky/index.js +3 -1
- package/locale/lb/index.js +3 -1
- package/locale/lkt/index.js +3 -1
- package/locale/lo/index.js +3 -1
- package/locale/lt/index.js +3 -1
- package/locale/lv/index.js +3 -1
- package/locale/mk/index.js +3 -1
- package/locale/ml/index.js +3 -1
- package/locale/mn/index.js +3 -1
- package/locale/mr/index.js +3 -1
- package/locale/ms/index.js +3 -1
- package/locale/mt/index.js +3 -1
- package/locale/my/index.js +3 -1
- package/locale/mzn/index.js +3 -1
- package/locale/nb/index.js +3 -1
- package/locale/ne/index.js +3 -1
- package/locale/nl/index.js +3 -1
- package/locale/nl.json +16 -0
- package/locale/nn/index.js +3 -1
- package/locale/or/index.js +3 -1
- package/locale/pa/index.js +3 -1
- package/locale/pl/index.js +3 -1
- package/locale/ps/index.js +3 -1
- package/locale/pt/index.js +3 -1
- package/locale/pt-AO/index.js +3 -1
- package/locale/pt-CH/index.js +3 -1
- package/locale/pt-CV/index.js +3 -1
- package/locale/pt-GQ/index.js +3 -1
- package/locale/pt-GW/index.js +3 -1
- package/locale/pt-LU/index.js +3 -1
- package/locale/pt-MO/index.js +3 -1
- package/locale/pt-MZ/index.js +3 -1
- package/locale/pt-PT/index.js +3 -1
- package/locale/pt-ST/index.js +3 -1
- package/locale/pt-TL/index.js +3 -1
- package/locale/qu/index.js +3 -1
- package/locale/ro/index.js +3 -1
- package/locale/ro.json +56 -0
- package/locale/ru/index.js +3 -1
- package/locale/ru.json +2 -8
- package/locale/sah/index.js +3 -1
- package/locale/sd/index.js +3 -1
- package/locale/se/index.js +3 -1
- package/locale/se-FI/index.js +3 -1
- package/locale/si/index.js +3 -1
- package/locale/sk/index.js +3 -1
- package/locale/sl/index.js +3 -1
- package/locale/so/index.js +3 -1
- package/locale/sq/index.js +3 -1
- package/locale/sr/index.js +3 -1
- package/locale/sr-Latn/index.js +3 -1
- package/locale/sv/index.js +3 -1
- package/locale/sv.json +13 -0
- package/locale/sw/index.js +3 -1
- package/locale/ta/index.js +3 -1
- package/locale/te/index.js +3 -1
- package/locale/th/index.js +3 -1
- package/locale/ti/index.js +3 -1
- package/locale/tk/index.js +3 -1
- package/locale/to/index.js +3 -1
- package/locale/tr/index.js +3 -1
- package/locale/ug/index.js +3 -1
- package/locale/uk/index.js +3 -1
- package/locale/ur/index.js +3 -1
- package/locale/ur-IN/index.js +3 -1
- package/locale/uz/index.js +3 -1
- package/locale/uz-Cyrl/index.js +3 -1
- package/locale/vi/index.js +3 -1
- package/locale/wae/index.js +3 -1
- package/locale/yi/index.js +3 -1
- package/locale/yue/index.js +3 -1
- package/locale/yue-Hans/index.js +3 -1
- package/locale/zh/index.js +3 -1
- package/locale/zh-Hans-HK/index.js +3 -1
- package/locale/zh-Hans-MO/index.js +3 -1
- package/locale/zh-Hans-SG/index.js +3 -1
- package/locale/zh-Hant/index.js +3 -1
- package/locale/zh-Hant-HK/index.js +3 -1
- package/locale/zh-Hant-MO/index.js +3 -1
- package/locale/zu/index.js +3 -1
- package/locale-more-styles/da/mini.json +18 -0
- package/locale-more-styles/es/mini.json +19 -7
- package/locale-more-styles/fr/mini.json +11 -5
- package/locale-more-styles/hi/mini.json +2 -8
- package/locale-more-styles/it/mini.json +18 -0
- package/locale-more-styles/nl/mini.json +15 -0
- package/locale-more-styles/ro/long-time.json +30 -0
- package/locale-more-styles/ro/mini.json +18 -0
- package/locale-more-styles/ro/now.json +7 -0
- package/locale-more-styles/ru/mini.json +2 -8
- package/locale-more-styles/sv/mini.json +12 -0
- package/modules/TimeAgo.js +1 -1
- package/modules/TimeAgo.js.map +1 -1
- package/modules/TimeAgo.test.js +6 -6
- package/modules/TimeAgo.test.js.map +1 -1
- package/modules/style/twitter.test.js +3 -3
- package/modules/style/twitter.test.js.map +1 -1
- package/package.json +1 -1
- package/index.d.ts.test +0 -47
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"javascript-time-ago.min.js","sources":["../node_modules/relative-time-format/modules/LocaleDataStore.js","../node_modules/relative-time-format/modules/resolveLocale.js","../node_modules/relative-time-format/modules/PluralRuleFunctions.js","../node_modules/relative-time-format/modules/getPluralRulesLocale.js","../node_modules/relative-time-format/modules/PluralRules.js","../node_modules/relative-time-format/modules/RelativeTimeFormat.js","../modules/cache.js","../modules/locale.js","../modules/steps/units.js","../modules/steps/getStepDenominator.js","../modules/round.js","../modules/steps/getStepMinTime.js","../modules/steps/getStep.js","../modules/steps/getTimeToNextUpdateForUnit.js","../modules/steps/getTimeToNextUpdate.js","../modules/LocaleDataStore.js","../modules/style/round.js","../modules/steps/round.js","../modules/style/roundMinute.js","../modules/steps/approximate.js","../modules/style/approximate.js","../modules/style/approximateTime.js","../modules/steps/helpers.js","../modules/style/twitter.js","../modules/style/twitterNow.js","../modules/style/twitterMinute.js","../modules/style/twitterMinuteNow.js","../modules/style/twitterFirstMinute.js","../modules/style/mini.js","../modules/style/miniNow.js","../modules/style/miniMinute.js","../modules/style/miniMinuteNow.js","../modules/TimeAgo.js","../modules/style/getStyleByName.js"],"sourcesContent":["// Fallback locale.\n// (when not a single one of the supplied \"preferred\" locales is available)\nvar defaultLocale = 'en'; // For all locales added\n// their relative time formatter messages will be stored here.\n\nvar localesData = {}; // According to the spec BCP 47 language tags are case-insensitive.\n// https://tools.ietf.org/html/rfc5646\n\nvar lowercaseLocaleLookup = {};\nexport function getDefaultLocale() {\n return defaultLocale;\n}\nexport function setDefaultLocale(locale) {\n defaultLocale = locale;\n}\n/**\r\n * Gets locale data previously added by `addLocaleData()`.\r\n * @return {object} [localeData]\r\n */\n\nexport function getLocaleData(locale) {\n return localesData[locale];\n}\n/**\r\n * Adds locale data.\r\n * Is called by `RelativeTimeFormat.addLocale(...)`.\r\n * @param {object} localeData\r\n */\n\nexport function addLocaleData(localeData) {\n if (!localeData) {\n throw new Error('No locale data passed');\n } // This locale data is stored in a global variable\n // and later used when calling `.format(time)`.\n\n\n localesData[localeData.locale] = localeData;\n lowercaseLocaleLookup[localeData.locale.toLowerCase()] = localeData.locale;\n}\n/**\r\n * Returns a locale for which locale data has been added\r\n * via `RelativeTimeFormat.addLocale(...)`.\r\n * @param {string} locale\r\n * @return {string} [locale]\r\n */\n\nexport function resolveLocale(locale) {\n if (localesData[locale]) {\n return locale;\n }\n\n if (lowercaseLocaleLookup[locale.toLowerCase()]) {\n return lowercaseLocaleLookup[locale.toLowerCase()];\n }\n}\n//# sourceMappingURL=LocaleDataStore.js.map","import { resolveLocale as resolveLocaleForData } from './LocaleDataStore';\n/**\r\n * Resolves a locale to a supported one (if any).\r\n * @param {string} locale\r\n * @param {Object} [options] - An object that may have the following property:\r\n * @param {string} [options.localeMatcher=\"lookup\"] - The locale matching algorithm to use. Possible values are \"lookup\" and \"best fit\". Currently only \"lookup\" is supported.\r\n * @return {string} [locale]\r\n * @example\r\n * // Returns \"sr\"\r\n * resolveLocale(\"sr-Cyrl-BA\")\r\n * // Returns `undefined`\r\n * resolveLocale(\"xx-Latn\")\r\n */\n\nexport default function resolveLocale(locale) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var localeMatcher = options.localeMatcher || 'lookup';\n\n switch (localeMatcher) {\n case 'lookup':\n return resolveLocaleLookup(locale);\n // \"best fit\" locale matching is not supported.\n // https://github.com/catamphetamine/relative-time-format/issues/2\n\n case 'best fit':\n // return resolveLocaleBestFit(locale)\n return resolveLocaleLookup(locale);\n\n default:\n throw new RangeError(\"Invalid \\\"localeMatcher\\\" option: \".concat(localeMatcher));\n }\n}\n/**\r\n * Resolves a locale to a supported one (if any).\r\n * Starts from the most specific locale and gradually\r\n * falls back to less specific ones.\r\n * This is a basic implementation of the \"lookup\" algorithm.\r\n * https://tools.ietf.org/html/rfc4647#section-3.4\r\n * @param {string} locale\r\n * @return {string} [locale]\r\n * @example\r\n * // Returns \"sr\"\r\n * resolveLocaleLookup(\"sr-Cyrl-BA\")\r\n * // Returns `undefined`\r\n * resolveLocaleLookup(\"xx-Latn\")\r\n */\n\nexport function resolveLocaleLookup(locale) {\n var resolvedLocale = resolveLocaleForData(locale);\n\n if (resolvedLocale) {\n return resolvedLocale;\n } // `sr-Cyrl-BA` -> `sr-Cyrl` -> `sr`.\n\n\n var parts = locale.split('-');\n\n while (locale.length > 1) {\n parts.pop();\n locale = parts.join('-');\n\n var _resolvedLocale = resolveLocaleForData(locale);\n\n if (_resolvedLocale) {\n return _resolvedLocale;\n }\n }\n}\n//# sourceMappingURL=resolveLocale.js.map","// (this file was autogenerated by `generate-locales`)\n// \"plural rules\" functions are not stored in locale JSON files because they're not strings.\n// This file isn't big — it's about 5 kilobytes in size (minified).\n// Alternatively, the pluralization rules for each locale could be stored\n// in their JSON files in a non-parsed form and later parsed via `make-plural` library.\n// But `make-plural` library itself is relatively big in size:\n// `make-plural.min.js` is about 6 kilobytes (https://unpkg.com/make-plural/).\n// So, it's more practical to bypass runtime `make-plural` pluralization rules compilation\n// and just include the already compiled pluarlization rules for all locales in the library code.\nvar $ = {\n af: function classify(n) {\n return n == 1 ? 'one' : 'other';\n },\n am: function classify(n) {\n return n >= 0 && n <= 1 ? 'one' : 'other';\n },\n ar: function classify(n) {\n var s = String(n).split('.'),\n t0 = Number(s[0]) == n,\n n100 = t0 && s[0].slice(-2);\n return n == 0 ? 'zero' : n == 1 ? 'one' : n == 2 ? 'two' : n100 >= 3 && n100 <= 10 ? 'few' : n100 >= 11 && n100 <= 99 ? 'many' : 'other';\n },\n ast: function classify(n) {\n var s = String(n).split('.'),\n v0 = !s[1];\n return n == 1 && v0 ? 'one' : 'other';\n },\n be: function classify(n) {\n var s = String(n).split('.'),\n t0 = Number(s[0]) == n,\n n10 = t0 && s[0].slice(-1),\n n100 = t0 && s[0].slice(-2);\n return n10 == 1 && n100 != 11 ? 'one' : n10 >= 2 && n10 <= 4 && (n100 < 12 || n100 > 14) ? 'few' : t0 && n10 == 0 || n10 >= 5 && n10 <= 9 || n100 >= 11 && n100 <= 14 ? 'many' : 'other';\n },\n br: function classify(n) {\n var s = String(n).split('.'),\n t0 = Number(s[0]) == n,\n n10 = t0 && s[0].slice(-1),\n n100 = t0 && s[0].slice(-2),\n n1000000 = t0 && s[0].slice(-6);\n return n10 == 1 && n100 != 11 && n100 != 71 && n100 != 91 ? 'one' : n10 == 2 && n100 != 12 && n100 != 72 && n100 != 92 ? 'two' : (n10 == 3 || n10 == 4 || n10 == 9) && (n100 < 10 || n100 > 19) && (n100 < 70 || n100 > 79) && (n100 < 90 || n100 > 99) ? 'few' : n != 0 && t0 && n1000000 == 0 ? 'many' : 'other';\n },\n bs: function classify(n) {\n var s = String(n).split('.'),\n i = s[0],\n f = s[1] || '',\n v0 = !s[1],\n i10 = i.slice(-1),\n i100 = i.slice(-2),\n f10 = f.slice(-1),\n f100 = f.slice(-2);\n return v0 && i10 == 1 && i100 != 11 || f10 == 1 && f100 != 11 ? 'one' : v0 && i10 >= 2 && i10 <= 4 && (i100 < 12 || i100 > 14) || f10 >= 2 && f10 <= 4 && (f100 < 12 || f100 > 14) ? 'few' : 'other';\n },\n cs: function classify(n) {\n var s = String(n).split('.'),\n i = s[0],\n v0 = !s[1];\n return n == 1 && v0 ? 'one' : i >= 2 && i <= 4 && v0 ? 'few' : !v0 ? 'many' : 'other';\n },\n cy: function classify(n) {\n return n == 0 ? 'zero' : n == 1 ? 'one' : n == 2 ? 'two' : n == 3 ? 'few' : n == 6 ? 'many' : 'other';\n },\n da: function classify(n) {\n var s = String(n).split('.'),\n i = s[0],\n t0 = Number(s[0]) == n;\n return n == 1 || !t0 && (i == 0 || i == 1) ? 'one' : 'other';\n },\n dsb: function classify(n) {\n var s = String(n).split('.'),\n i = s[0],\n f = s[1] || '',\n v0 = !s[1],\n i100 = i.slice(-2),\n f100 = f.slice(-2);\n return v0 && i100 == 1 || f100 == 1 ? 'one' : v0 && i100 == 2 || f100 == 2 ? 'two' : v0 && (i100 == 3 || i100 == 4) || f100 == 3 || f100 == 4 ? 'few' : 'other';\n },\n dz: function classify(n) {\n return 'other';\n },\n fil: function classify(n) {\n var s = String(n).split('.'),\n i = s[0],\n f = s[1] || '',\n v0 = !s[1],\n i10 = i.slice(-1),\n f10 = f.slice(-1);\n return v0 && (i == 1 || i == 2 || i == 3) || v0 && i10 != 4 && i10 != 6 && i10 != 9 || !v0 && f10 != 4 && f10 != 6 && f10 != 9 ? 'one' : 'other';\n },\n fr: function classify(n) {\n return n >= 0 && n < 2 ? 'one' : 'other';\n },\n ga: function classify(n) {\n var s = String(n).split('.'),\n t0 = Number(s[0]) == n;\n return n == 1 ? 'one' : n == 2 ? 'two' : t0 && n >= 3 && n <= 6 ? 'few' : t0 && n >= 7 && n <= 10 ? 'many' : 'other';\n },\n gd: function classify(n) {\n var s = String(n).split('.'),\n t0 = Number(s[0]) == n;\n return n == 1 || n == 11 ? 'one' : n == 2 || n == 12 ? 'two' : t0 && n >= 3 && n <= 10 || t0 && n >= 13 && n <= 19 ? 'few' : 'other';\n },\n he: function classify(n) {\n var s = String(n).split('.'),\n i = s[0],\n v0 = !s[1],\n t0 = Number(s[0]) == n,\n n10 = t0 && s[0].slice(-1);\n return n == 1 && v0 ? 'one' : i == 2 && v0 ? 'two' : v0 && (n < 0 || n > 10) && t0 && n10 == 0 ? 'many' : 'other';\n },\n is: function classify(n) {\n var s = String(n).split('.'),\n i = s[0],\n t0 = Number(s[0]) == n,\n i10 = i.slice(-1),\n i100 = i.slice(-2);\n return t0 && i10 == 1 && i100 != 11 || !t0 ? 'one' : 'other';\n },\n ksh: function classify(n) {\n return n == 0 ? 'zero' : n == 1 ? 'one' : 'other';\n },\n lt: function classify(n) {\n var s = String(n).split('.'),\n f = s[1] || '',\n t0 = Number(s[0]) == n,\n n10 = t0 && s[0].slice(-1),\n n100 = t0 && s[0].slice(-2);\n return n10 == 1 && (n100 < 11 || n100 > 19) ? 'one' : n10 >= 2 && n10 <= 9 && (n100 < 11 || n100 > 19) ? 'few' : f != 0 ? 'many' : 'other';\n },\n lv: function classify(n) {\n var s = String(n).split('.'),\n f = s[1] || '',\n v = f.length,\n t0 = Number(s[0]) == n,\n n10 = t0 && s[0].slice(-1),\n n100 = t0 && s[0].slice(-2),\n f100 = f.slice(-2),\n f10 = f.slice(-1);\n return t0 && n10 == 0 || n100 >= 11 && n100 <= 19 || v == 2 && f100 >= 11 && f100 <= 19 ? 'zero' : n10 == 1 && n100 != 11 || v == 2 && f10 == 1 && f100 != 11 || v != 2 && f10 == 1 ? 'one' : 'other';\n },\n mk: function classify(n) {\n var s = String(n).split('.'),\n i = s[0],\n f = s[1] || '',\n v0 = !s[1],\n i10 = i.slice(-1),\n i100 = i.slice(-2),\n f10 = f.slice(-1),\n f100 = f.slice(-2);\n return v0 && i10 == 1 && i100 != 11 || f10 == 1 && f100 != 11 ? 'one' : 'other';\n },\n mt: function classify(n) {\n var s = String(n).split('.'),\n t0 = Number(s[0]) == n,\n n100 = t0 && s[0].slice(-2);\n return n == 1 ? 'one' : n == 0 || n100 >= 2 && n100 <= 10 ? 'few' : n100 >= 11 && n100 <= 19 ? 'many' : 'other';\n },\n pa: function classify(n) {\n return n == 0 || n == 1 ? 'one' : 'other';\n },\n pl: function classify(n) {\n var s = String(n).split('.'),\n i = s[0],\n v0 = !s[1],\n i10 = i.slice(-1),\n i100 = i.slice(-2);\n return n == 1 && v0 ? 'one' : v0 && i10 >= 2 && i10 <= 4 && (i100 < 12 || i100 > 14) ? 'few' : v0 && i != 1 && (i10 == 0 || i10 == 1) || v0 && i10 >= 5 && i10 <= 9 || v0 && i100 >= 12 && i100 <= 14 ? 'many' : 'other';\n },\n pt: function classify(n) {\n var s = String(n).split('.'),\n i = s[0];\n return i == 0 || i == 1 ? 'one' : 'other';\n },\n ro: function classify(n) {\n var s = String(n).split('.'),\n v0 = !s[1],\n t0 = Number(s[0]) == n,\n n100 = t0 && s[0].slice(-2);\n return n == 1 && v0 ? 'one' : !v0 || n == 0 || n != 1 && n100 >= 1 && n100 <= 19 ? 'few' : 'other';\n },\n ru: function classify(n) {\n var s = String(n).split('.'),\n i = s[0],\n v0 = !s[1],\n i10 = i.slice(-1),\n i100 = i.slice(-2);\n return v0 && i10 == 1 && i100 != 11 ? 'one' : v0 && i10 >= 2 && i10 <= 4 && (i100 < 12 || i100 > 14) ? 'few' : v0 && i10 == 0 || v0 && i10 >= 5 && i10 <= 9 || v0 && i100 >= 11 && i100 <= 14 ? 'many' : 'other';\n },\n se: function classify(n) {\n return n == 1 ? 'one' : n == 2 ? 'two' : 'other';\n },\n si: function classify(n) {\n var s = String(n).split('.'),\n i = s[0],\n f = s[1] || '';\n return n == 0 || n == 1 || i == 0 && f == 1 ? 'one' : 'other';\n },\n sl: function classify(n) {\n var s = String(n).split('.'),\n i = s[0],\n v0 = !s[1],\n i100 = i.slice(-2);\n return v0 && i100 == 1 ? 'one' : v0 && i100 == 2 ? 'two' : v0 && (i100 == 3 || i100 == 4) || !v0 ? 'few' : 'other';\n }\n};\n$.as = $.am;\n$.az = $.af;\n$.bg = $.af;\n$.bn = $.am;\n$.ca = $.ast;\n$.ce = $.af;\n$.chr = $.af;\n$.de = $.ast;\n$.ee = $.af;\n$.el = $.af;\n$.en = $.ast;\n$.es = $.af;\n$.et = $.ast;\n$.eu = $.af;\n$.fa = $.am;\n$.fi = $.ast;\n$.fo = $.af;\n$.fur = $.af;\n$.fy = $.ast;\n$.gl = $.ast;\n$.gu = $.am;\n$.hi = $.am;\n$.hr = $.bs;\n$.hsb = $.dsb;\n$.hu = $.af;\n$.hy = $.fr;\n$.ia = $.ast;\n$.id = $.dz;\n$.it = $.ast;\n$.ja = $.dz;\n$.jgo = $.af;\n$.jv = $.dz;\n$.ka = $.af;\n$.kea = $.dz;\n$.kk = $.af;\n$.kl = $.af;\n$.km = $.dz;\n$.kn = $.am;\n$.ko = $.dz;\n$.ku = $.af;\n$.ky = $.af;\n$.lb = $.af;\n$.lkt = $.dz;\n$.lo = $.dz;\n$.ml = $.af;\n$.mn = $.af;\n$.mr = $.am;\n$.ms = $.dz;\n$.my = $.dz;\n$.nb = $.af;\n$.ne = $.af;\n$.nl = $.ast;\n$.nn = $.af;\n$.or = $.af;\n$.ps = $.af;\n$[\"pt-PT\"] = $.ast;\n$.sah = $.dz;\n$.sd = $.af;\n$.sk = $.cs;\n$.so = $.af;\n$.sq = $.af;\n$.sr = $.bs;\n$.sv = $.ast;\n$.sw = $.ast;\n$.ta = $.af;\n$.te = $.af;\n$.th = $.dz;\n$.ti = $.pa;\n$.tk = $.af;\n$.to = $.dz;\n$.tr = $.af;\n$.ug = $.af;\n$.uk = $.ru;\n$.ur = $.ast;\n$.uz = $.af;\n$.vi = $.dz;\n$.wae = $.af;\n$.yi = $.ast;\n$.yue = $.dz;\n$.zh = $.dz;\n$.zu = $.am;\nexport default $;\n//# sourceMappingURL=PluralRuleFunctions.js.map","/**\r\n * Returns a `locale` for which a function exists in `./PluralRuleFunctions.js`.\r\n * @param {string} locale\r\n * @return {string}\r\n * @example\r\n * getPluralRulesLocale(\"ru-RU-Cyrl\") // Returns \"ru\".\r\n */\nexport default function getPluralRulesLocale(locale) {\n // \"pt\" language is the only one having different pluralization rules\n // for the one (\"pt\") (Portuguese) locale and the other (\"pt-PT\") (European Portuguese).\n // http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html\n // (see the entries for \"pt\" and \"pt_PT\" there)\n if (locale === 'pt-PT') {\n return locale;\n }\n\n return getLanguageFromLanguageTag(locale);\n}\n/**\r\n * Extracts language from an IETF BCP 47 language tag.\r\n * @param {string} languageTag - IETF BCP 47 language tag.\r\n * @return {string}\r\n * @example\r\n * // Returns \"he\"\r\n * getLanguageFromLanguageTag(\"he-IL-u-ca-hebrew-tz-jeruslm\")\r\n * // Returns \"ar\"\r\n * getLanguageFromLanguageTag(\"ar-u-nu-latn\")\r\n */\n\nvar LANGUAGE_REG_EXP = /^([a-z0-9]+)/i;\n\nfunction getLanguageFromLanguageTag(languageTag) {\n var match = languageTag.match(LANGUAGE_REG_EXP);\n\n if (!match) {\n throw new TypeError(\"Invalid locale: \".concat(languageTag));\n }\n\n return match[1];\n}\n//# sourceMappingURL=getPluralRulesLocale.js.map","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n// Importing `PluralRule` polyfill from a separate package\n// results in a bundle that is larger by 1kB for some reason.\n// export { default as default } from 'intl-plural-rules-polyfill/cardinal'\nimport PluralRuleFunctions from \"./PluralRuleFunctions\";\nimport getPluralRulesLocale from \"./getPluralRulesLocale\";\n/**\r\n * `Intl.PluralRules` polyfill.\r\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/PluralRules\r\n */\n\nvar PluralRules =\n/*#__PURE__*/\nfunction () {\n function PluralRules(locale, options) {\n _classCallCheck(this, PluralRules);\n\n var locales = PluralRules.supportedLocalesOf(locale);\n\n if (locales.length === 0) {\n throw new RangeError(\"Unsupported locale: \" + locale);\n }\n\n if (options && options.type !== \"cardinal\") {\n throw new RangeError(\"Only \\\"cardinal\\\" \\\"type\\\" is supported\");\n }\n\n this.$ = PluralRuleFunctions[getPluralRulesLocale(locales[0])];\n }\n\n _createClass(PluralRules, [{\n key: \"select\",\n value: function select(number) {\n return this.$(number);\n }\n }], [{\n key: \"supportedLocalesOf\",\n value: function supportedLocalesOf(locales) {\n if (typeof locales === \"string\") {\n locales = [locales];\n }\n\n return locales.filter(function (locale) {\n return PluralRuleFunctions[getPluralRulesLocale(locale)];\n });\n }\n }]);\n\n return PluralRules;\n}();\n\nexport { PluralRules as default };\n//# sourceMappingURL=PluralRules.js.map","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { getDefaultLocale, setDefaultLocale, getLocaleData, addLocaleData } from './LocaleDataStore';\nimport resolveLocale from './resolveLocale';\nimport PluralRules from './PluralRules'; // Importing `PluralRule` polyfill from a separate package\n// results in a bundle that is larger by 1kB for some reason.\n// import PluralRules from 'intl-plural-rules-polyfill/cardinal'\n// Valid time units.\n\nexport var UNITS = [\"second\", \"minute\", \"hour\", \"day\", \"week\", \"month\", \"quarter\", \"year\"]; // Valid values for the `numeric` option.\n\nvar NUMERIC_VALUES = [\"auto\", \"always\"]; // Valid values for the `style` option.\n\nvar STYLE_VALUES = [\"long\", \"short\", \"narrow\"]; // Valid values for the `localeMatcher` option.\n\nvar LOCALE_MATCHER_VALUES = [\"lookup\", \"best fit\"];\n/**\r\n * Polyfill for `Intl.RelativeTimeFormat` proposal.\r\n * https://github.com/tc39/proposal-intl-relative-time\r\n * https://github.com/tc39/proposal-intl-relative-time/issues/55\r\n */\n\nvar RelativeTimeFormat =\n/*#__PURE__*/\nfunction () {\n /**\r\n * @param {(string|string[])} [locales] - Preferred locales (or locale).\r\n * @param {Object} [options] - Formatting options.\r\n * @param {string} [options.style=\"long\"] - One of: \"long\", \"short\", \"narrow\".\r\n * @param {string} [options.numeric=\"always\"] - (Version >= 2) One of: \"always\", \"auto\".\r\n * @param {string} [options.localeMatcher=\"lookup\"] - One of: \"lookup\", \"best fit\". Currently only \"lookup\" is supported.\r\n */\n function RelativeTimeFormat() {\n var locales = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, RelativeTimeFormat);\n\n _defineProperty(this, \"numeric\", \"always\");\n\n _defineProperty(this, \"style\", \"long\");\n\n _defineProperty(this, \"localeMatcher\", \"lookup\");\n\n var numeric = options.numeric,\n style = options.style,\n localeMatcher = options.localeMatcher; // Set `numeric` option.\n\n if (numeric !== undefined) {\n if (NUMERIC_VALUES.indexOf(numeric) < 0) {\n throw new RangeError(\"Invalid \\\"numeric\\\" option: \".concat(numeric));\n }\n\n this.numeric = numeric;\n } // Set `style` option.\n\n\n if (style !== undefined) {\n if (STYLE_VALUES.indexOf(style) < 0) {\n throw new RangeError(\"Invalid \\\"style\\\" option: \".concat(style));\n }\n\n this.style = style;\n } // Set `localeMatcher` option.\n\n\n if (localeMatcher !== undefined) {\n if (LOCALE_MATCHER_VALUES.indexOf(localeMatcher) < 0) {\n throw new RangeError(\"Invalid \\\"localeMatcher\\\" option: \".concat(localeMatcher));\n }\n\n this.localeMatcher = localeMatcher;\n } // Set `locale`.\n // Convert `locales` to an array.\n\n\n if (typeof locales === 'string') {\n locales = [locales];\n } // Add default locale.\n\n\n locales.push(getDefaultLocale()); // Choose the most appropriate locale.\n\n this.locale = RelativeTimeFormat.supportedLocalesOf(locales, {\n localeMatcher: this.localeMatcher\n })[0];\n\n if (!this.locale) {\n throw new Error(\"No supported locale was found\");\n } // Construct an `Intl.PluralRules` instance (polyfill).\n\n\n if (PluralRules.supportedLocalesOf(this.locale).length > 0) {\n this.pluralRules = new PluralRules(this.locale);\n } else {\n console.warn(\"\\\"\".concat(this.locale, \"\\\" locale is not supported\"));\n } // Use `Intl.NumberFormat` for formatting numbers (when available).\n\n\n if (typeof Intl !== 'undefined' && Intl.NumberFormat) {\n this.numberFormat = new Intl.NumberFormat(this.locale);\n this.numberingSystem = this.numberFormat.resolvedOptions().numberingSystem;\n } else {\n this.numberingSystem = 'latn';\n }\n\n this.locale = resolveLocale(this.locale, {\n localeMatcher: this.localeMatcher\n });\n }\n /**\r\n * Formats time `number` in `units` (either in past or in future).\r\n * @param {number} number - Time interval value.\r\n * @param {string} unit - Time interval measurement unit.\r\n * @return {string}\r\n * @throws {RangeError} If unit is not one of \"second\", \"minute\", \"hour\", \"day\", \"week\", \"month\", \"quarter\".\r\n * @example\r\n * // Returns \"2 days ago\"\r\n * rtf.format(-2, \"day\")\r\n * // Returns \"in 5 minutes\"\r\n * rtf.format(5, \"minute\")\r\n */\n\n\n _createClass(RelativeTimeFormat, [{\n key: \"format\",\n value: function format() {\n var _parseFormatArgs = parseFormatArgs(arguments),\n _parseFormatArgs2 = _slicedToArray(_parseFormatArgs, 2),\n number = _parseFormatArgs2[0],\n unit = _parseFormatArgs2[1];\n\n return this.getRule(number, unit).replace('{0}', this.formatNumber(Math.abs(number)));\n }\n /**\r\n * Formats time `number` in `units` (either in past or in future).\r\n * @param {number} number - Time interval value.\r\n * @param {string} unit - Time interval measurement unit.\r\n * @return {Object[]} The parts (`{ type, value }`).\r\n * @throws {RangeError} If unit is not one of \"second\", \"minute\", \"hour\", \"day\", \"week\", \"month\", \"quarter\".\r\n * @example\r\n * // Version 1.\r\n * // Returns [\r\n * // { type: \"literal\", value: \"in \" },\r\n * // { type: \"day\", value: \"100\" },\r\n * // { type: \"literal\", value: \" days\" }\r\n * // ]\r\n * rtf.formatToParts(100, \"day\")\r\n * //\r\n * // Version 2.\r\n * // Returns [\r\n * // { type: \"literal\", value: \"in \" },\r\n * // { type: \"integer\", value: \"100\", unit: \"day\" },\r\n * // { type: \"literal\", value: \" days\" }\r\n * // ]\r\n * rtf.formatToParts(100, \"day\")\r\n */\n\n }, {\n key: \"formatToParts\",\n value: function formatToParts() {\n var _parseFormatArgs3 = parseFormatArgs(arguments),\n _parseFormatArgs4 = _slicedToArray(_parseFormatArgs3, 2),\n number = _parseFormatArgs4[0],\n unit = _parseFormatArgs4[1];\n\n var rule = this.getRule(number, unit);\n var valueIndex = rule.indexOf(\"{0}\"); // \"yesterday\"/\"today\"/\"tomorrow\".\n\n if (valueIndex < 0) {\n return [{\n type: \"literal\",\n value: rule\n }];\n }\n\n var parts = [];\n\n if (valueIndex > 0) {\n parts.push({\n type: \"literal\",\n value: rule.slice(0, valueIndex)\n });\n }\n\n parts = parts.concat(this.formatNumberToParts(Math.abs(number)).map(function (part) {\n return _objectSpread({}, part, {\n unit: unit\n });\n }));\n\n if (valueIndex + \"{0}\".length < rule.length - 1) {\n parts.push({\n type: \"literal\",\n value: rule.slice(valueIndex + \"{0}\".length)\n });\n }\n\n return parts;\n }\n /**\r\n * Returns formatting rule for `value` in `units` (either in past or in future).\r\n * @param {number} value - Time interval value.\r\n * @param {string} unit - Time interval measurement unit.\r\n * @return {string}\r\n * @throws {RangeError} If unit is not one of \"second\", \"minute\", \"hour\", \"day\", \"week\", \"month\", \"quarter\".\r\n * @example\r\n * // Returns \"{0} days ago\"\r\n * getRule(-2, \"day\")\r\n */\n\n }, {\n key: \"getRule\",\n value: function getRule(value, unit) {\n // Get locale-specific time interval formatting rules\n // of a given `style` for the given value of measurement `unit`.\n //\n // E.g.:\n //\n // ```json\n // {\n // \"past\": {\n // \"one\": \"a second ago\",\n // \"other\": \"{0} seconds ago\"\n // },\n // \"future\": {\n // \"one\": \"in a second\",\n // \"other\": \"in {0} seconds\"\n // }\n // }\n // ```\n //\n var unitMessages = getLocaleData(this.locale)[this.style][unit]; // Special case for \"yesterday\"/\"today\"/\"tomorrow\".\n\n if (this.numeric === \"auto\") {\n // \"yesterday\", \"the day before yesterday\", etc.\n if (value === -2 || value === -1) {\n var message = unitMessages[\"previous\".concat(value === -1 ? '' : '-' + Math.abs(value))];\n\n if (message) {\n return message;\n }\n } // \"tomorrow\", \"the day after tomorrow\", etc.\n else if (value === 1 || value === 2) {\n var _message = unitMessages[\"next\".concat(value === 1 ? '' : '-' + Math.abs(value))];\n\n if (_message) {\n return _message;\n }\n } // \"today\"\n else if (value === 0) {\n if (unitMessages.current) {\n return unitMessages.current;\n }\n }\n } // Choose either \"past\" or \"future\" based on time `value` sign.\n // If there's only \"other\" then it's being collapsed.\n // (the resulting bundle size optimization technique)\n\n\n var pluralizedMessages = unitMessages[isNegative(value) ? \"past\" : \"future\"]; // Bundle size optimization technique.\n\n if (typeof pluralizedMessages === \"string\") {\n return pluralizedMessages;\n } // Quantify `value`.\n // There seems to be no such locale in CLDR\n // for which \"plural rules\" function is missing.\n\n\n var quantifier = this.pluralRules && this.pluralRules.select(Math.abs(value)) || 'other'; // \"other\" rule is supposed to be always present.\n // If only \"other\" rule is present then \"rules\" is not an object and is a string.\n\n return pluralizedMessages[quantifier] || pluralizedMessages.other;\n }\n /**\r\n * Formats a number into a string.\r\n * Uses `Intl.NumberFormat` when available.\r\n * @param {number} number\r\n * @return {string}\r\n */\n\n }, {\n key: \"formatNumber\",\n value: function formatNumber(number) {\n return this.numberFormat ? this.numberFormat.format(number) : String(number);\n }\n /**\r\n * Formats a number into a list of parts.\r\n * Uses `Intl.NumberFormat` when available.\r\n * @param {number} number\r\n * @return {object[]}\r\n */\n\n }, {\n key: \"formatNumberToParts\",\n value: function formatNumberToParts(number) {\n // `Intl.NumberFormat.formatToParts()` is not present, for example,\n // in Node.js 8.x while `Intl.NumberFormat` itself is present.\n return this.numberFormat && this.numberFormat.formatToParts ? this.numberFormat.formatToParts(number) : [{\n type: \"integer\",\n value: this.formatNumber(number)\n }];\n }\n /**\r\n * Returns a new object with properties reflecting the locale and date and time formatting options computed during initialization of this DateTimeFormat object.\r\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/resolvedOptions\r\n * @return {Object}\r\n */\n\n }, {\n key: \"resolvedOptions\",\n value: function resolvedOptions() {\n return {\n locale: this.locale,\n style: this.style,\n numeric: this.numeric,\n numberingSystem: this.numberingSystem\n };\n }\n }]);\n\n return RelativeTimeFormat;\n}();\n/**\r\n * Returns an array containing those of the provided locales\r\n * that are supported in collation without having to fall back\r\n * to the runtime's default locale.\r\n * @param {(string|string[])} locale - A string with a BCP 47 language tag, or an array of such strings. For the general form of the locales argument, see the Intl page.\r\n * @param {Object} [options] - An object that may have the following property:\r\n * @param {string} [options.localeMatcher=\"lookup\"] - The locale matching algorithm to use. Possible values are \"lookup\" and \"best fit\". Currently only \"lookup\" is supported.\r\n * @return {string[]} An array of strings representing a subset of the given locale tags that are supported in collation without having to fall back to the runtime's default locale.\r\n * @example\r\n * var locales = ['ban', 'id-u-co-pinyin', 'es-PY']\r\n * var options = { localeMatcher: 'lookup' }\r\n * // Returns [\"id\", \"es-PY\"]\r\n * Intl.RelativeTimeFormat.supportedLocalesOf(locales, options)\r\n */\n\n\nexport { RelativeTimeFormat as default };\n\nRelativeTimeFormat.supportedLocalesOf = function (locales) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n // Convert `locales` to an array.\n if (typeof locales === 'string') {\n locales = [locales];\n } else if (!Array.isArray(locales)) {\n throw new TypeError('Invalid \"locales\" argument');\n }\n\n return locales.filter(function (locale) {\n return resolveLocale(locale, options);\n });\n};\n/**\r\n * Adds locale data for a specific locale.\r\n * @param {Object} localeData\r\n */\n\n\nRelativeTimeFormat.addLocale = addLocaleData;\n/**\r\n * Sets default locale.\r\n * @param {string} locale\r\n */\n\nRelativeTimeFormat.setDefaultLocale = setDefaultLocale;\n/**\r\n * Gets default locale.\r\n * @return {string} locale\r\n */\n\nRelativeTimeFormat.getDefaultLocale = getDefaultLocale;\n/**\r\n * Export `Intl.PluralRules` just in case it's used somewhere else.\r\n */\n\nRelativeTimeFormat.PluralRules = PluralRules; // The specification allows units to be in plural form.\n// Convert plural to singular.\n// Example: \"seconds\" -> \"second\".\n\nvar UNIT_ERROR = 'Invalid \"unit\" argument';\n\nfunction parseUnit(unit) {\n if (_typeof(unit) === 'symbol') {\n throw new TypeError(UNIT_ERROR);\n }\n\n if (typeof unit !== 'string') {\n throw new RangeError(\"\".concat(UNIT_ERROR, \": \").concat(unit));\n }\n\n if (unit[unit.length - 1] === 's') {\n unit = unit.slice(0, unit.length - 1);\n }\n\n if (UNITS.indexOf(unit) < 0) {\n throw new RangeError(\"\".concat(UNIT_ERROR, \": \").concat(unit));\n }\n\n return unit;\n} // Converts `value` to a `Number`.\n// The specification allows value to be a non-number.\n// For example, \"-0\" is supposed to be treated as `-0`.\n// Also checks if `value` is a finite number.\n\n\nvar NUMBER_ERROR = 'Invalid \"number\" argument';\n\nfunction parseNumber(value) {\n value = Number(value);\n\n if (Number.isFinite) {\n if (!Number.isFinite(value)) {\n throw new RangeError(\"\".concat(NUMBER_ERROR, \": \").concat(value));\n }\n }\n\n return value;\n}\n/**\r\n * Tells `0` from `-0`.\r\n * https://stackoverflow.com/questions/7223359/are-0-and-0-the-same\r\n * @param {number} number\r\n * @return {Boolean}\r\n * @example\r\n * isNegativeZero(0); // false\r\n * isNegativeZero(-0); // true\r\n */\n\n\nfunction isNegativeZero(number) {\n return 1 / number === -Infinity;\n}\n\nfunction isNegative(number) {\n return number < 0 || number === 0 && isNegativeZero(number);\n}\n\nfunction parseFormatArgs(args) {\n if (args.length < 2) {\n throw new TypeError(\"\\\"unit\\\" argument is required\");\n }\n\n return [parseNumber(args[0]), parseUnit(args[1])];\n}\n//# sourceMappingURL=RelativeTimeFormat.js.map","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\r\n * A basic in-memory cache.\r\n *\r\n * import Cache from 'javascript-time-ago/Cache'\r\n * const cache = new Cache()\r\n * const object = cache.get('key1', 'key2', ...) || cache.put('key1', 'key2', ..., createObject())\r\n */\nvar Cache =\n/*#__PURE__*/\nfunction () {\n function Cache() {\n _classCallCheck(this, Cache);\n\n _defineProperty(this, \"cache\", {});\n }\n\n _createClass(Cache, [{\n key: \"get\",\n value: function get() {\n var cache = this.cache;\n\n for (var _len = arguments.length, keys = new Array(_len), _key = 0; _key < _len; _key++) {\n keys[_key] = arguments[_key];\n }\n\n for (var _i = 0; _i < keys.length; _i++) {\n var key = keys[_i];\n\n if (_typeof(cache) !== 'object') {\n return;\n }\n\n cache = cache[key];\n }\n\n return cache;\n }\n }, {\n key: \"put\",\n value: function put() {\n for (var _len2 = arguments.length, keys = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n keys[_key2] = arguments[_key2];\n }\n\n var value = keys.pop();\n var lastKey = keys.pop();\n var cache = this.cache;\n\n for (var _i2 = 0; _i2 < keys.length; _i2++) {\n var key = keys[_i2];\n\n if (_typeof(cache[key]) !== 'object') {\n cache[key] = {};\n }\n\n cache = cache[key];\n }\n\n return cache[lastKey] = value;\n }\n }]);\n\n return Cache;\n}();\n\nexport { Cache as default };\n//# sourceMappingURL=cache.js.map","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/**\r\n * Chooses the most appropriate locale\r\n * (one of the registered ones)\r\n * based on the list of preferred `locales` supplied by the user.\r\n *\r\n * @param {string[]} locales - the list of preferable locales (in [IETF format](https://en.wikipedia.org/wiki/IETF_language_tag)).\r\n * @param {Function} isLocaleDataAvailable - tests if a locale is available.\r\n *\r\n * @returns {string} The most suitable locale.\r\n *\r\n * @example\r\n * // Returns 'en'\r\n * chooseLocale(['en-US'], undefined, (locale) => locale === 'ru' || locale === 'en')\r\n */\nexport default function chooseLocale(locales, isLocaleDataAvailable) {\n // This is not an intelligent algorithm,\n // but it will do for this library's case.\n // `sr-Cyrl-BA` -> `sr-Cyrl` -> `sr`.\n for (var _iterator = locales, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {\n var _ref;\n\n if (_isArray) {\n if (_i >= _iterator.length) break;\n _ref = _iterator[_i++];\n } else {\n _i = _iterator.next();\n if (_i.done) break;\n _ref = _i.value;\n }\n\n var locale = _ref;\n\n if (isLocaleDataAvailable(locale)) {\n return locale;\n }\n\n var parts = locale.split('-');\n\n while (parts.length > 1) {\n parts.pop();\n locale = parts.join('-');\n\n if (isLocaleDataAvailable(locale)) {\n return locale;\n }\n }\n }\n\n throw new Error(\"No locale data has been registered for any of the locales: \".concat(locales.join(', ')));\n}\n/**\r\n * Whether can use `Intl.DateTimeFormat` for these `locales`.\r\n * Returns the first suitable one.\r\n * @param {(string|string[])} locales\r\n * @return {?string} The first locale that can be used.\r\n */\n\nexport function intlDateTimeFormatSupportedLocale(locales) {\n /* istanbul ignore else */\n if (intlDateTimeFormatSupported()) {\n return Intl.DateTimeFormat.supportedLocalesOf(locales)[0];\n }\n}\n/**\r\n * Whether can use `Intl.DateTimeFormat`.\r\n * @return {boolean}\r\n */\n\nexport function intlDateTimeFormatSupported() {\n // Babel transforms `typeof` into some \"branches\"\n // so istanbul will show this as \"branch not covered\".\n\n /* istanbul ignore next */\n var isIntlAvailable = (typeof Intl === \"undefined\" ? \"undefined\" : _typeof(Intl)) === 'object';\n return isIntlAvailable && typeof Intl.DateTimeFormat === 'function';\n}\n//# sourceMappingURL=locale.js.map","export var minute = 60; // in seconds\n\nexport var hour = 60 * minute; // in seconds\n\nexport var day = 24 * hour; // in seconds\n\nexport var week = 7 * day; // in seconds\n// https://www.quora.com/What-is-the-average-number-of-days-in-a-month\n\nexport var month = 30.44 * day; // in seconds\n// \"400 years have 146097 days (taking into account leap year rules)\"\n\nexport var year = 146097 / 400 * day; // in seconds\n\nexport function getSecondsInUnit(unit) {\n switch (unit) {\n case 'second':\n return 1;\n\n case 'minute':\n return minute;\n\n case 'hour':\n return hour;\n\n case 'day':\n return day;\n\n case 'week':\n return week;\n\n case 'month':\n return month;\n\n case 'year':\n return year;\n }\n} // export function getPreviousUnitFor(unit) {\n// \tswitch (unit) {\n// \t\tcase 'second':\n// \t\t\treturn 'now'\n// \t\tcase 'minute':\n// \t\t\treturn 'second'\n// \t\tcase 'hour':\n// \t\t\treturn 'minute'\n// \t\tcase 'day':\n// \t\t\treturn 'hour'\n// \t\tcase 'week':\n// \t\t\treturn 'day'\n// \t\tcase 'month':\n// \t\t\treturn 'week'\n// \t\tcase 'year':\n// \t\t\treturn 'month'\n// \t}\n// }\n//# sourceMappingURL=units.js.map","import { getSecondsInUnit } from './units';\nexport default function getStepDenominator(step) {\n // `factor` is a legacy property.\n if (step.factor !== undefined) {\n return step.factor;\n } // \"unit\" is now called \"formatAs\".\n\n\n return getSecondsInUnit(step.unit || step.formatAs) || 1;\n}\n//# sourceMappingURL=getStepDenominator.js.map","export function getRoundFunction(round) {\n switch (round) {\n case 'floor':\n return Math.floor;\n\n default:\n return Math.round;\n }\n} // For non-negative numbers.\n\nexport function getDiffRatioToNextRoundedNumber(round) {\n switch (round) {\n case 'floor':\n // Math.floor(x) = x\n // Math.floor(x + 1) = x + 1\n return 1;\n\n default:\n // Math.round(x) = x\n // Math.round(x + 0.5) = x + 1\n return 0.5;\n }\n}\n//# sourceMappingURL=round.js.map","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport { getSecondsInUnit } from './units';\nimport { getDiffRatioToNextRoundedNumber } from '../round';\nexport default function getStepMinTime(step, _ref) {\n var prevStep = _ref.prevStep,\n timestamp = _ref.timestamp,\n now = _ref.now,\n future = _ref.future,\n round = _ref.round;\n var minTime; // \"threshold_for_xxx\" is a legacy property.\n\n if (prevStep) {\n if (prevStep.id || prevStep.unit) {\n minTime = step[\"threshold_for_\".concat(prevStep.id || prevStep.unit)];\n }\n }\n\n if (minTime === undefined) {\n // \"threshold\" is a legacy property.\n if (step.threshold !== undefined) {\n // \"threshold\" is a legacy name for \"minTime\".\n minTime = step.threshold; // \"threshold\" function is deprecated.\n\n if (typeof minTime === 'function') {\n minTime = minTime(now, future);\n }\n }\n }\n\n if (minTime === undefined) {\n minTime = step.minTime;\n } // A deprecated way of specifying a different threshold\n // depending on the previous step's unit.\n\n\n if (_typeof(minTime) === 'object') {\n if (prevStep && prevStep.id && minTime[prevStep.id] !== undefined) {\n minTime = minTime[prevStep.id];\n } else {\n minTime = minTime.default;\n }\n }\n\n if (typeof minTime === 'function') {\n minTime = minTime(timestamp, {\n future: future,\n getMinTimeForUnit: function getMinTimeForUnit(toUnit, fromUnit) {\n return _getMinTimeForUnit(toUnit, fromUnit || prevStep && prevStep.formatAs, {\n round: round\n });\n }\n });\n } // Evaluate the `test()` function.\n // `test()` function is deprecated.\n\n\n if (minTime === undefined) {\n if (step.test) {\n if (step.test(timestamp, {\n now: now,\n future: future\n })) {\n // `0` threshold always passes.\n minTime = 0;\n } else {\n // `MAX_SAFE_INTEGER` threshold won't ever pass in real life.\n minTime = 9007199254740991; // Number.MAX_SAFE_INTEGER\n }\n }\n }\n\n if (minTime === undefined) {\n if (prevStep) {\n if (step.formatAs && prevStep.formatAs) {\n minTime = _getMinTimeForUnit(step.formatAs, prevStep.formatAs, {\n round: round\n });\n }\n } else {\n // The first step's `minTime` is `0` by default.\n minTime = 0;\n }\n } // Warn if no `minTime` was defined or could be deduced.\n\n\n if (minTime === undefined) {\n console.warn('[javascript-time-ago] A step should specify `minTime`:\\n' + JSON.stringify(step, null, 2));\n }\n\n return minTime;\n}\n\nfunction _getMinTimeForUnit(toUnit, fromUnit, _ref2) {\n var round = _ref2.round;\n var toUnitAmount = getSecondsInUnit(toUnit); // if (!fromUnit) {\n // \treturn toUnitAmount;\n // }\n // if (!fromUnit) {\n // \tfromUnit = getPreviousUnitFor(toUnit)\n // }\n\n var fromUnitAmount;\n\n if (fromUnit === 'now') {\n fromUnitAmount = getSecondsInUnit(toUnit);\n } else {\n fromUnitAmount = getSecondsInUnit(fromUnit);\n }\n\n if (toUnitAmount !== undefined && fromUnitAmount !== undefined) {\n return toUnitAmount - fromUnitAmount * (1 - getDiffRatioToNextRoundedNumber(round));\n }\n}\n//# sourceMappingURL=getStepMinTime.js.map","function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport getStepDenominator from './getStepDenominator';\nimport getStepMinTime from './getStepMinTime';\nimport { getRoundFunction } from '../round';\n/**\r\n * Finds an appropriate `step` of `steps` for the time interval (in seconds).\r\n *\r\n * @param {Object[]} steps - Time formatting steps.\r\n *\r\n * @param {number} secondsPassed - Time interval (in seconds).\r\n * `< 0` for past dates and `> 0` for future dates.\r\n *\r\n * @param {number} options.now - Current timestamp.\r\n *\r\n * @param {boolean} [options.future] - Whether the date should be formatted as a future one\r\n * instead of a past one.\r\n *\r\n * @param {string} [options.round] - (undocumented) Rounding mechanism.\r\n *\r\n * @param {string[]} [options.units] - A list of allowed time units.\r\n * (Example: ['second', 'minute', 'hour', …])\r\n *\r\n * @param {boolean} [options.getNextStep] - Pass true to return `[step, nextStep]` instead of just `step`.\r\n *\r\n * @return {Object|Object[]} [step] — Either a `step` or `[prevStep, step, nextStep]`.\r\n */\n\nexport default function getStep(steps, secondsPassed, _ref) {\n var now = _ref.now,\n future = _ref.future,\n round = _ref.round,\n units = _ref.units,\n getNextStep = _ref.getNextStep;\n // Ignore steps having not-supported time units in `formatAs`.\n steps = filterStepsByUnits(steps, units);\n\n var step = _getStep(steps, secondsPassed, {\n now: now,\n future: future,\n round: round\n });\n\n if (getNextStep) {\n if (step) {\n var prevStep = steps[steps.indexOf(step) - 1];\n var nextStep = steps[steps.indexOf(step) + 1];\n return [prevStep, step, nextStep];\n }\n\n return [undefined, undefined, steps[0]];\n }\n\n return step;\n}\n\nfunction _getStep(steps, secondsPassed, _ref2) {\n var now = _ref2.now,\n future = _ref2.future,\n round = _ref2.round;\n\n // If no steps fit the conditions then return nothing.\n if (steps.length === 0) {\n return;\n } // Find the most appropriate step.\n\n\n var i = getStepIndex(steps, secondsPassed, {\n now: now,\n future: future || secondsPassed < 0,\n round: round\n }); // If no step is applicable the return nothing.\n\n if (i === -1) {\n return;\n }\n\n var step = steps[i]; // Apply granularity to the time amount\n // (and fall back to the previous step\n // if the first level of granularity\n // isn't met by this amount)\n\n if (step.granularity) {\n // Recalculate the amount of seconds passed based on `granularity`.\n var secondsPassedGranular = getRoundFunction(round)(Math.abs(secondsPassed) / getStepDenominator(step) / step.granularity) * step.granularity; // If the granularity for this step is too high,\n // then fall back to the previous step.\n // (if there is any previous step)\n\n if (secondsPassedGranular === 0 && i > 0) {\n return steps[i - 1];\n }\n }\n\n return step;\n}\n/**\r\n * Iterates through steps until it finds the maximum one satisfying the `minTime` threshold.\r\n * @param {Object} steps - Steps.\r\n * @param {number} secondsPassed - How much seconds have passed since the date till `now`.\r\n * @param {number} options.now - Current timestamp.\r\n * @param {boolean} options.future - Whether the time interval should be formatted as a future one.\r\n * @param {number} [i] - Gradation step currently being tested.\r\n * @return {number} Gradation step index.\r\n */\n\n\nfunction getStepIndex(steps, secondsPassed, options) {\n var i = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var minTime = getStepMinTime(steps[i], _objectSpread({\n prevStep: steps[i - 1],\n timestamp: options.now - secondsPassed * 1000\n }, options)); // If `minTime` isn't defined or deduceable for this step, then stop.\n\n if (minTime === undefined) {\n return i - 1;\n } // If the `minTime` threshold for moving from previous step\n // to this step is too high then return the previous step.\n\n\n if (Math.abs(secondsPassed) < minTime) {\n return i - 1;\n } // If it's the last step then return it.\n\n\n if (i === steps.length - 1) {\n return i;\n } // Move to the next step.\n\n\n return getStepIndex(steps, secondsPassed, options, i + 1);\n}\n/**\r\n * Leaves only allowed steps.\r\n * @param {Object[]} steps\r\n * @param {string[]} units - Allowed time units.\r\n * @return {Object[]}\r\n */\n\n\nfunction filterStepsByUnits(steps, units) {\n return steps.filter(function (_ref3) {\n var unit = _ref3.unit,\n formatAs = _ref3.formatAs;\n // \"unit\" is now called \"formatAs\".\n unit = unit || formatAs; // If this step has a `unit` defined\n // then this `unit` must be in the list of allowed `units`.\n\n if (unit) {\n return units.indexOf(unit) >= 0;\n } // A step is not required to specify a `unit`:\n // alternatively, it could specify `format()`.\n // (see \"twitter\" style for an example)\n\n\n return true;\n });\n}\n//# sourceMappingURL=getStep.js.map","import { getSecondsInUnit } from './units';\nimport { getRoundFunction, getDiffRatioToNextRoundedNumber } from '../round';\n/**\r\n * Gets the time to next update for a step with a time unit defined.\r\n * @param {string} unit\r\n * @param {number} date — The date passed to `.format()`, converted to a timestamp.\r\n * @param {number} options.now\r\n * @param {string} [options.round] — (undocumented) Rounding mechanism.\r\n * @return {number} [timeToNextUpdate]\r\n */\n\nexport default function getTimeToNextUpdateForUnit(unit, timestamp, _ref) {\n var now = _ref.now,\n round = _ref.round;\n\n // For some units, like \"now\", there's no defined amount of seconds in them.\n if (!getSecondsInUnit(unit)) {\n // If there's no amount of seconds defined for this unit\n // then the update interval can't be determined reliably.\n return;\n }\n\n var unitDenominator = getSecondsInUnit(unit) * 1000;\n var future = timestamp > now;\n var preciseAmount = Math.abs(timestamp - now);\n var roundedAmount = getRoundFunction(round)(preciseAmount / unitDenominator) * unitDenominator;\n\n if (future) {\n if (roundedAmount > 0) {\n // Amount decreases with time.\n return preciseAmount - roundedAmount + getDiffToPreviousRoundedNumber(round, unitDenominator);\n } else {\n // Refresh right after the zero point,\n // when \"future\" changes to \"past\".\n return preciseAmount - roundedAmount + 1;\n }\n } // Amount increases with time.\n\n\n return -(preciseAmount - roundedAmount) + getDiffToNextRoundedNumber(round, unitDenominator);\n}\n\nfunction getDiffToNextRoundedNumber(round, unitDenominator) {\n return getDiffRatioToNextRoundedNumber(round) * unitDenominator;\n}\n\nfunction getDiffToPreviousRoundedNumber(round, unitDenominator) {\n return (1 - getDiffRatioToNextRoundedNumber(round)) * unitDenominator + 1;\n}\n//# sourceMappingURL=getTimeToNextUpdateForUnit.js.map","import _getTimeToNextUpdateForUnit from './getTimeToNextUpdateForUnit';\nimport getStepMinTime from './getStepMinTime';\nimport { getRoundFunction } from '../round'; // A thousand years is practically a metaphor for \"infinity\".\n\nvar YEAR = 365 * 24 * 60 * 60 * 1000;\nexport var INFINITY = 1000 * YEAR;\n/**\r\n * Gets the time to next update for a date and a step.\r\n * @param {number} date — The date passed to `.format()`, converted to a timestamp.\r\n * @param {object} step\r\n * @param {object} [options.previousStep]\r\n * @param {object} [options.nextStep]\r\n * @param {number} options.now\r\n * @param {boolean} options.future\r\n * @param {string} [options.round] - (undocumented) Rounding mechanism.\r\n * @return {number} [timeToNextUpdate]\r\n */\n\nexport default function getTimeToNextUpdate(date, step, _ref) {\n var prevStep = _ref.prevStep,\n nextStep = _ref.nextStep,\n now = _ref.now,\n future = _ref.future,\n round = _ref.round;\n var timestamp = date.getTime ? date.getTime() : date;\n\n var getTimeToNextUpdateForUnit = function getTimeToNextUpdateForUnit(unit) {\n return _getTimeToNextUpdateForUnit(unit, timestamp, {\n now: now,\n round: round\n });\n }; // For future dates, steps move from the last one to the first one,\n // while for past dates, steps move from the first one to the last one,\n // due to the fact that time flows in one direction,\n // and future dates' interval naturally becomes smaller\n // while past dates' interval naturally grows larger.\n //\n // For future dates, it's the transition\n // from the current step to the previous step,\n // therefore check the `minTime` of the current step.\n //\n // For past dates, it's the transition\n // from the current step to the next step,\n // therefore check the `minTime` of the next step.\n //\n\n\n var timeToStepChange = getTimeToStepChange(future ? step : nextStep, timestamp, {\n future: future,\n now: now,\n round: round,\n prevStep: future ? prevStep : step // isFirstStep: future && isFirstStep\n\n });\n\n if (timeToStepChange === undefined) {\n // Can't reliably determine \"time to next update\"\n // if not all of the steps provide `minTime`.\n return;\n }\n\n var timeToNextUpdate;\n\n if (step) {\n if (step.getTimeToNextUpdate) {\n timeToNextUpdate = step.getTimeToNextUpdate(timestamp, {\n getTimeToNextUpdateForUnit: getTimeToNextUpdateForUnit,\n getRoundFunction: getRoundFunction,\n now: now,\n future: future,\n round: round\n });\n }\n\n if (timeToNextUpdate === undefined) {\n // \"unit\" is now called \"formatAs\".\n var unit = step.unit || step.formatAs;\n\n if (unit) {\n // For some units, like \"now\", there's no defined amount of seconds in them.\n // In such cases, `getTimeToNextUpdateForUnit()` returns `undefined`,\n // and the next step's `minTime` could be used to calculate the update interval:\n // it will just assume that the label never changes for this step.\n timeToNextUpdate = getTimeToNextUpdateForUnit(unit);\n }\n }\n }\n\n if (timeToNextUpdate === undefined) {\n return timeToStepChange;\n }\n\n return Math.min(timeToNextUpdate, timeToStepChange);\n}\nexport function getStepChangesAt(currentOrNextStep, timestamp, _ref2) {\n var now = _ref2.now,\n future = _ref2.future,\n round = _ref2.round,\n prevStep = _ref2.prevStep;\n // The first step's `minTime` is `0` by default.\n // It doesn't \"change\" steps at zero point\n // but it does change the wording when switching\n // from \"future\" to \"past\": \"in ...\" -> \"... ago\".\n // Therefore, the label should be updated at zero-point too.\n var minTime = getStepMinTime(currentOrNextStep, {\n timestamp: timestamp,\n now: now,\n future: future,\n round: round,\n prevStep: prevStep\n });\n\n if (minTime === undefined) {\n return;\n }\n\n if (future) {\n // The step changes to the previous step\n // as soon as `timestamp - now` becomes\n // less than the `minTime` of the current step:\n // `timestamp - now === minTime - 1`\n // => `now === timestamp - minTime + 1`.\n return timestamp - minTime * 1000 + 1;\n } else {\n // The step changes to the next step\n // as soon as `now - timestamp` becomes\n // equal to `minTime` of the next step:\n // `now - timestamp === minTime`\n // => `now === timestamp + minTime`.\n // This is a special case when double-update could be skipped.\n if (minTime === 0 && timestamp === now) {\n return INFINITY;\n }\n\n return timestamp + minTime * 1000;\n }\n}\nexport function getTimeToStepChange(step, timestamp, _ref3) {\n var now = _ref3.now,\n future = _ref3.future,\n round = _ref3.round,\n prevStep = _ref3.prevStep;\n\n if (step) {\n var stepChangesAt = getStepChangesAt(step, timestamp, {\n now: now,\n future: future,\n round: round,\n prevStep: prevStep\n });\n\n if (stepChangesAt === undefined) {\n return;\n }\n\n return stepChangesAt - now;\n } else {\n if (future) {\n // No step.\n // Update right after zero point, when it changes from \"future\" to \"past\".\n return timestamp - now + 1;\n } else {\n // The last step doesn't ever change when `date` is in the past.\n return INFINITY;\n }\n }\n}\n//# sourceMappingURL=getTimeToNextUpdate.js.map","// For all locales added\n// their relative time formatter messages will be stored here.\nvar localesData = {};\nexport function getLocaleData(locale) {\n return localesData[locale];\n}\nexport function addLocaleData(localeData) {\n if (!localeData) {\n throw new Error('[javascript-time-ago] No locale data passed.');\n } // This locale data is stored in a global variable\n // and later used when calling `.format(time)`.\n\n\n localesData[localeData.locale] = localeData;\n}\n//# sourceMappingURL=LocaleDataStore.js.map","import round from '../steps/round'; // just now\n// 1 second ago\n// 2 seconds ago\n// …\n// 59 seconds ago\n// 1 minute ago\n// 2 minutes ago\n// …\n// 59 minutes ago\n// 1 minute ago\n// 2 minutes ago\n// …\n// 59 minutes ago\n// 1 hour ago\n// 2 hours ago\n// …\n// 24 hours ago\n// 1 day ago\n// 2 days ago\n// …\n// 6 days ago\n// 1 week ago\n// 2 weeks ago\n// 3 weeks ago\n// 4 weeks ago\n// 1 month ago\n// 2 months ago\n// …\n// 11 months ago\n// 1 year ago\n// 2 years ago\n// …\n//\n\nexport default {\n steps: round,\n labels: 'long'\n};\n//# sourceMappingURL=round.js.map","// just now\n// 1 second ago\n// 2 seconds ago\n// …\n// 59 seconds ago\n// 1 minute ago\n// 2 minutes ago\n// …\n// 59 minutes ago\n// 1 hour ago\n// 2 hours ago\n// …\n// 24 hours ago\n// 1 day ago\n// 2 days ago\n// …\n// 6 days ago\n// 1 week ago\n// 2 weeks ago\n// …\n// 3 weeks ago\n// 1 month ago\n// 2 months ago\n// …\n// 11 months ago\n// 1 year ago\n// 2 years ago\n// …\nexport default [{\n formatAs: 'now'\n}, {\n formatAs: 'second'\n}, {\n formatAs: 'minute'\n}, {\n formatAs: 'hour'\n}, {\n formatAs: 'day'\n}, {\n formatAs: 'week'\n}, {\n formatAs: 'month'\n}, {\n formatAs: 'year'\n}];\n//# sourceMappingURL=round.js.map","function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport round from './round'; // just now\n// 1 minute ago\n// 2 minutes ago\n// …\n// 59 minutes ago\n// 1 minute ago\n// 2 minutes ago\n// …\n// 59 minutes ago\n// 1 hour ago\n// 2 hours ago\n// …\n// 24 hours ago\n// 1 day ago\n// 2 days ago\n// …\n// 6 days ago\n// 1 week ago\n// 2 weeks ago\n// 3 weeks ago\n// 4 weeks ago\n// 1 month ago\n// 2 months ago\n// …\n// 11 months ago\n// 1 year ago\n// 2 years ago\n// …\n//\n\nexport default _objectSpread({}, round, {\n // Skip \"seconds\".\n steps: round.steps.filter(function (step) {\n return step.formatAs !== 'second';\n })\n});\n//# sourceMappingURL=roundMinute.js.map","import { minute, hour, day, week, month, year } from './units'; // \"factor\" is a legacy property.\n// Developers shouldn't need to use it in their custom steps.\n// \"threshold\" is a legacy name of \"min\".\n// Developers should use \"min\" property name instead of \"threshold\".\n// \"threshold_for_idOrUnit: value\" is a legacy way of specifying \"min: { id: value }\".\n// Developers should use \"min\" property instead of \"threshold\".\n// just now\n// 1 minute ago\n// 2 minutes ago\n// 5 minutes ago\n// 10 minutes ago\n// 15 minutes ago\n// 20 minutes ago\n// …\n// 50 minutes ago\n// an hour ago\n// 2 hours ago\n// …\n// 20 hours ago\n// a day ago\n// 2 days ago\n// 5 days ago\n// a week ago\n// 2 weeks ago\n// 3 weeks ago\n// a month ago\n// 2 months ago\n// 4 months ago\n// a year ago\n// 2 years ago\n// …\n\nexport default [{\n // This step returns the amount of seconds\n // by dividing the amount of seconds by `1`.\n factor: 1,\n // \"now\" labels are used for formatting the output.\n unit: 'now'\n}, {\n // When the language doesn't support `now` unit,\n // the first step is ignored, and it uses this `second` unit.\n threshold: 1,\n // `threshold_for_now` should be the same as `threshold` on minutes.\n threshold_for_now: 45.5,\n // This step returns the amount of seconds\n // by dividing the amount of seconds by `1`.\n factor: 1,\n // \"second\" labels are used for formatting the output.\n unit: 'second'\n}, {\n // `threshold` should be the same as `threshold_for_now` on seconds.\n threshold: 45.5,\n // Return the amount of minutes by dividing the amount\n // of seconds by the amount of seconds in a minute.\n factor: minute,\n // \"minute\" labels are used for formatting the output.\n unit: 'minute'\n}, {\n // This step is effective starting from 2.5 minutes.\n threshold: 2.5 * minute,\n // Allow only 5-minute increments of minutes starting from 2.5 minutes.\n // `granularity` — (advanced) Time interval value \"granularity\".\n // For example, it could be set to `5` for minutes to allow only 5-minute increments\n // when formatting time intervals: `0 minutes`, `5 minutes`, `10 minutes`, etc.\n // Perhaps this feature will be removed because there seem to be no use cases\n // of it in the real world.\n granularity: 5,\n // Return the amount of minutes by dividing the amount\n // of seconds by the amount of seconds in a minute.\n factor: minute,\n // \"minute\" labels are used for formatting the output.\n unit: 'minute'\n}, {\n // This step is effective starting from 22.5 minutes.\n threshold: 22.5 * minute,\n // Return the amount of minutes by dividing the amount\n // of seconds by the amount of seconds in half-an-hour.\n factor: 0.5 * hour,\n // \"half-hour\" labels are used for formatting the output.\n // (if available, which is no longer the case)\n unit: 'half-hour'\n}, {\n // This step is effective starting from 42.5 minutes.\n threshold: 42.5 * minute,\n threshold_for_minute: 52.5 * minute,\n // Return the amount of minutes by dividing the amount\n // of seconds by the amount of seconds in an hour.\n factor: hour,\n // \"hour\" labels are used for formatting the output.\n unit: 'hour'\n}, {\n // This step is effective starting from 20.5 hours.\n threshold: 20.5 / 24 * day,\n // Return the amount of minutes by dividing the amount\n // of seconds by the amount of seconds in a day.\n factor: day,\n // \"day\" labels are used for formatting the output.\n unit: 'day'\n}, {\n // This step is effective starting from 5.5 days.\n threshold: 5.5 * day,\n // Return the amount of minutes by dividing the amount\n // of seconds by the amount of seconds in a week.\n factor: week,\n // \"week\" labels are used for formatting the output.\n unit: 'week'\n}, {\n // This step is effective starting from 3.5 weeks.\n threshold: 3.5 * week,\n // Return the amount of minutes by dividing the amount\n // of seconds by the amount of seconds in a month.\n factor: month,\n // \"month\" labels are used for formatting the output.\n unit: 'month'\n}, {\n // This step is effective starting from 10.5 months.\n threshold: 10.5 * month,\n // Return the amount of minutes by dividing the amount\n // of seconds by the amount of seconds in a year.\n factor: year,\n // \"year\" labels are used for formatting the output.\n unit: 'year'\n}];\n//# sourceMappingURL=approximate.js.map","import approximate from '../steps/approximate'; // \"gradation\" is a legacy name for \"steps\".\n// It's here just for legacy compatibility.\n// Use \"steps\" name instead.\n// \"flavour\" is a legacy name for \"labels\".\n// It's here just for legacy compatibility.\n// Use \"labels\" name instead.\n// \"units\" is a legacy property.\n// It's here just for legacy compatibility.\n// Developers shouldn't need to use it in their custom styles.\n\nexport default {\n gradation: approximate,\n flavour: 'long',\n units: ['now', 'minute', 'hour', 'day', 'week', 'month', 'year']\n};\n//# sourceMappingURL=approximate.js.map","import approximate from '../steps/approximate'; // \"gradation\" is a legacy name for \"steps\".\n// It's here just for legacy compatibility.\n// Use \"steps\" name instead.\n// \"flavour\" is a legacy name for \"labels\".\n// It's here just for legacy compatibility.\n// Use \"labels\" name instead.\n// \"units\" is a legacy property.\n// It's here just for legacy compatibility.\n// Developers shouldn't need to use it in their custom styles.\n// Similar to the default style but with \"ago\" omitted.\n//\n// just now\n// 5 minutes\n// 10 minutes\n// 15 minutes\n// 20 minutes\n// an hour\n// 2 hours\n// …\n// 20 hours\n// 1 day\n// 2 days\n// a week\n// 2 weeks\n// 3 weeks\n// a month\n// 2 months\n// 3 months\n// 4 months\n// a year\n// 2 years\n//\n\nexport default {\n gradation: approximate,\n flavour: 'long-time',\n units: ['now', 'minute', 'hour', 'day', 'week', 'month', 'year']\n};\n//# sourceMappingURL=approximateTime.js.map","// Looks like this one's deprecated.\n// /**\n// * Returns a step corresponding to the unit.\n// * @param {Object[]} steps\n// * @param {string} unit\n// * @return {?Object}\n// */\n// export function getStepForUnit(steps, unit) {\n// \tfor (const step of steps) {\n// \t\tif (step.unit === unit) {\n// \t\t\treturn step\n// \t\t}\n// \t}\n// }\n// Looks like this one won't be used in the next major version.\n\n/**\r\n * Converts value to a `Date`\r\n * @param {(number|Date)} value\r\n * @return {Date}\r\n */\nexport function getDate(value) {\n return value instanceof Date ? value : new Date(value);\n}\n//# sourceMappingURL=helpers.js.map","import { day, getDate } from '../steps';\nimport { intlDateTimeFormatSupported } from '../locale'; // For compatibility with the old versions of this library.\n\nimport renameLegacyProperties from './renameLegacyProperties'; // Twitter-style relative date/time formatting.\n// (\"1m\", \"2h\", \"Mar 3\", \"Apr 4, 2012\").\n//\n// Seconds, minutes or hours are shown for shorter intervals,\n// and longer intervals are formatted using full date format.\n\nvar steps = [{\n formatAs: 'second'\n}, {\n formatAs: 'minute'\n}, {\n formatAs: 'hour'\n}]; // A cache for `Intl.DateTimeFormat` formatters\n// for various locales (is a global variable).\n\nvar formatters = {}; // Starting from day intervals, output month and day.\n\nvar monthAndDay = {\n minTime: function minTime(timestamp, _ref) {\n var future = _ref.future,\n getMinTimeForUnit = _ref.getMinTimeForUnit;\n // Returns `23.5 * 60 * 60` when `round` is \"round\",\n // and `24 * 60 * 60` when `round` is \"floor\".\n return getMinTimeForUnit('day');\n },\n format: function format(value, locale) {\n /* istanbul ignore else */\n if (!formatters[locale]) {\n formatters[locale] = {};\n }\n /* istanbul ignore else */\n\n\n if (!formatters[locale].dayMonth) {\n // \"Apr 11\" (MMMd)\n formatters[locale].dayMonth = new Intl.DateTimeFormat(locale, {\n month: 'short',\n day: 'numeric'\n });\n } // Output month and day.\n\n\n return formatters[locale].dayMonth.format(getDate(value));\n }\n}; // If the `date` happened/happens outside of current year,\n// then output day, month and year.\n// The interval should be such that the `date` lies outside of the current year.\n\nvar yearMonthAndDay = {\n minTime: function minTime(timestamp, _ref2) {\n var future = _ref2.future;\n\n if (future) {\n // January 1, 00:00, of the `date`'s year is right after\n // the maximum `now` for formatting a future date:\n // When `now` is before that date, the `date` is formatted as \"day/month/year\" (this step),\n // When `now` is equal to or after that date, the `date` is formatted as \"day/month\" (another step).\n // After that, it's hours, minutes, seconds, and after that it's no longer `future`.\n // The date is right after the maximum `now` for formatting a future date,\n // so subtract 1 millisecond from it.\n var maxFittingNow = new Date(new Date(timestamp).getFullYear(), 0).getTime() - 1; // Return `minTime` (in seconds).\n\n return (timestamp - maxFittingNow) / 1000;\n } else {\n // January 1, 00:00, of the year following the `date`'s year\n // is the minimum `now` for formatting a past date:\n // When `now` is before that date, the `date` is formatted as \"day/month\" (another step),\n // When `now` is equal to or after that date, the `date` is formatted as \"day/month/year\" (this step).\n // After that, it's hours, minutes, seconds, and after that it's no longer `future`.\n var minFittingNow = new Date(new Date(timestamp).getFullYear() + 1, 0).getTime(); // Return `minTime` (in seconds).\n\n return (minFittingNow - timestamp) / 1000;\n }\n },\n format: function format(value, locale) {\n /* istanbul ignore if */\n if (!formatters[locale]) {\n formatters[locale] = {};\n }\n /* istanbul ignore else */\n\n\n if (!formatters[locale].dayMonthYear) {\n // \"Apr 11, 2017\" (yMMMd)\n formatters[locale].dayMonthYear = new Intl.DateTimeFormat(locale, {\n year: 'numeric',\n month: 'short',\n day: 'numeric'\n });\n } // Output day, month and year.\n\n\n return formatters[locale].dayMonthYear.format(getDate(value));\n }\n}; // If `Intl.DateTimeFormat` is supported,\n// then longer time intervals will be formatted as dates.\n\n/* istanbul ignore else */\n\nif (intlDateTimeFormatSupported()) {\n steps.push(monthAndDay, yearMonthAndDay);\n} // Otherwise, if `Intl.DateTimeFormat` is not supported,\n// which could be the case when using Internet Explorer,\n// then simply mimick \"round\" steps.\nelse {\n steps.push({\n formatAs: 'day'\n }, {\n formatAs: 'week'\n }, {\n formatAs: 'month'\n }, {\n formatAs: 'year'\n });\n }\n\nexport default {\n steps: steps,\n labels: [// \"mini\" labels are only defined for a few languages.\n 'mini', // \"short-time\" labels are only defined for a few languages.\n 'short-time', // \"narrow\" and \"short\" labels are defined for all languages.\n // \"narrow\" labels can sometimes be weird (like \"+5d.\"),\n // but \"short\" labels have the \" ago\" part, so \"narrow\" seem\n // more appropriate.\n // \"short\" labels would have been more appropriate if they\n // didn't have the \" ago\" part, hence the \"short-time\" above.\n 'narrow', // Since \"narrow\" labels are always present, \"short\" element\n // of this array can be removed.\n 'short']\n};\n//# sourceMappingURL=twitter.js.map","function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport twitter from './twitter';\nexport default _objectSpread({}, twitter, {\n // Add \"now\".\n steps: [{\n formatAs: 'now'\n }].concat(twitter.steps)\n});\n//# sourceMappingURL=twitterNow.js.map","function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport twitter from './twitter';\nexport default _objectSpread({}, twitter, {\n // Skip \"seconds\".\n steps: twitter.steps.filter(function (step) {\n return step.formatAs !== 'second';\n })\n});\n//# sourceMappingURL=twitterMinute.js.map","function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport twitterMinute from './twitterMinute';\nexport default _objectSpread({}, twitterMinute, {\n // Add \"now\".\n steps: [{\n formatAs: 'now'\n }].concat(twitterMinute.steps)\n});\n//# sourceMappingURL=twitterMinuteNow.js.map","function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { minute } from '../steps/units';\nimport twitter from './twitter';\nexport default _objectSpread({}, twitter, {\n // Skip \"seconds\".\n steps: twitter.steps.filter(function (step) {\n return step.formatAs !== 'second';\n }) // Start showing `1m` from the first minute.\n .map(function (step) {\n return step.formatAs === 'minute' ? _objectSpread({}, step, {\n minTime: minute\n }) : step;\n })\n});\n//# sourceMappingURL=twitterFirstMinute.js.map","export default {\n steps: [{\n formatAs: 'second'\n }, {\n formatAs: 'minute'\n }, {\n formatAs: 'hour'\n }, {\n formatAs: 'day'\n }, {\n formatAs: 'month'\n }, {\n formatAs: 'year'\n }],\n labels: [// \"mini\" labels are only defined for a few languages.\n 'mini', // \"short-time\" labels are only defined for a few languages.\n 'short-time', // \"narrow\" and \"short\" labels are defined for all languages.\n // \"narrow\" labels can sometimes be weird (like \"+5d.\"),\n // but \"short\" labels have the \" ago\" part, so \"narrow\" seem\n // more appropriate.\n // \"short\" labels would have been more appropriate if they\n // didn't have the \" ago\" part, hence the \"short-time\" above.\n 'narrow', // Since \"narrow\" labels are always present, \"short\" element\n // of this array can be removed.\n 'short']\n};\n//# sourceMappingURL=mini.js.map","function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport mini from './mini';\nexport default _objectSpread({}, mini, {\n // Add \"now\".\n steps: [{\n formatAs: 'now'\n }].concat(mini.steps)\n});\n//# sourceMappingURL=miniNow.js.map","function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport mini from './mini';\nexport default _objectSpread({}, mini, {\n // Skip \"seconds\".\n steps: mini.steps.filter(function (step) {\n return step.formatAs !== 'second';\n })\n});\n//# sourceMappingURL=miniMinute.js.map","function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport miniMinute from './miniMinute';\nexport default _objectSpread({}, miniMinute, {\n // Add \"now\".\n steps: [{\n formatAs: 'now'\n }].concat(miniMinute.steps)\n});\n//# sourceMappingURL=miniMinuteNow.js.map","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nimport RelativeTimeFormatPolyfill from 'relative-time-format';\nimport Cache from './cache';\nimport chooseLocale from './locale';\nimport getStep from './steps/getStep';\nimport getStepDenominator from './steps/getStepDenominator';\nimport getTimeToNextUpdate from './steps/getTimeToNextUpdate';\nimport { addLocaleData, getLocaleData } from './LocaleDataStore';\nimport defaultStyle from './style/roundMinute';\nimport getStyleByName from './style/getStyleByName';\nimport { getRoundFunction } from './round'; // Valid time units.\n\nvar UNITS = ['now', // The rest are the same as in `Intl.RelativeTimeFormat`.\n'second', 'minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'];\n\nvar TimeAgo =\n/*#__PURE__*/\nfunction () {\n /**\r\n * @param {(string|string[])} locales=[] - Preferred locales (or locale).\r\n * @param {boolean} [polyfill] — Pass `false` to use native `Intl.RelativeTimeFormat` and `Intl.PluralRules` instead of the polyfills.\r\n */\n function TimeAgo() {\n var locales = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n polyfill = _ref.polyfill;\n\n _classCallCheck(this, TimeAgo);\n\n // Convert `locales` to an array.\n if (typeof locales === 'string') {\n locales = [locales];\n } // Choose the most appropriate locale\n // from the list of `locales` added by the user.\n // For example, new TimeAgo(\"en-US\") -> \"en\".\n\n\n this.locale = chooseLocale(locales.concat(TimeAgo.getDefaultLocale()), getLocaleData);\n\n if (typeof Intl !== 'undefined') {\n // Use `Intl.NumberFormat` for formatting numbers (when available).\n if (Intl.NumberFormat) {\n this.numberFormat = new Intl.NumberFormat(this.locale);\n }\n } // Some people have requested the ability to use native\n // `Intl.RelativeTimeFormat` and `Intl.PluralRules`\n // instead of the polyfills.\n // https://github.com/catamphetamine/javascript-time-ago/issues/21\n\n\n if (polyfill === false) {\n this.IntlRelativeTimeFormat = Intl.RelativeTimeFormat;\n this.IntlPluralRules = Intl.PluralRules;\n } else {\n this.IntlRelativeTimeFormat = RelativeTimeFormatPolyfill;\n this.IntlPluralRules = RelativeTimeFormatPolyfill.PluralRules;\n } // Cache `Intl.RelativeTimeFormat` instance.\n\n\n this.relativeTimeFormatCache = new Cache(); // Cache `Intl.PluralRules` instance.\n\n this.pluralRulesCache = new Cache();\n }\n /**\r\n * Formats relative date/time.\r\n *\r\n * @param {number} [options.now] - Sets the current date timestamp.\r\n *\r\n * @param {boolean} [options.future] — Tells how to format value `0`:\r\n * as \"future\" (`true`) or \"past\" (`false`).\r\n * Is `false` by default, but should have been `true` actually,\r\n * in order to correspond to `Intl.RelativeTimeFormat`\r\n * that uses `future` formatting for `0` unless `-0` is passed.\r\n *\r\n * @param {string} [options.round] — Rounding method. Overrides the style's one.\r\n *\r\n * @param {boolean} [options.getTimeToNextUpdate] — Pass `true` to return `[formattedDate, timeToNextUpdate]` instead of just `formattedDate`.\r\n *\r\n * @return {string} The formatted relative date/time. If no eligible `step` is found, then an empty string is returned.\r\n */\n\n\n _createClass(TimeAgo, [{\n key: \"format\",\n value: function format(input, style, options) {\n if (!options) {\n if (style && !isStyle(style)) {\n options = style;\n style = undefined;\n } else {\n options = {};\n }\n }\n\n if (!style) {\n style = defaultStyle;\n }\n\n if (typeof style === 'string') {\n style = getStyleByName(style);\n }\n\n var timestamp = getTimestamp(input); // Get locale messages for this type of labels.\n // \"flavour\" is a legacy name for \"labels\".\n\n var _this$getLabels = this.getLabels(style.flavour || style.labels),\n labels = _this$getLabels.labels,\n labelsType = _this$getLabels.labelsType;\n\n var now; // Can pass a custom `now`, e.g. for testing purposes.\n //\n // Legacy way was passing `now` in `style`.\n // That way is deprecated.\n\n if (style.now !== undefined) {\n now = style.now;\n } // The new way is passing `now` option to `.format()`.\n\n\n if (now === undefined && options.now !== undefined) {\n now = options.now;\n }\n\n if (now === undefined) {\n now = Date.now();\n } // how much time has passed (in seconds)\n\n\n var secondsPassed = (now - timestamp) / 1000; // in seconds\n\n var future = options.future || secondsPassed < 0;\n var nowLabel = getNowLabel(labels, getLocaleData(this.locale).now, getLocaleData(this.locale).long, future); // `custom` – A function of `{ elapsed, time, date, now, locale }`.\n //\n // Looks like `custom` function is deprecated and will be removed\n // in the next major version.\n //\n // If this function returns a value, then the `.format()` call will return that value.\n // Otherwise the relative date/time is formatted as usual.\n // This feature is currently not used anywhere and is here\n // just for providing the ultimate customization point\n // in case anyone would ever need that. Prefer using\n // `steps[step].format(value, locale)` instead.\n //\n\n if (style.custom) {\n var custom = style.custom({\n now: now,\n date: new Date(timestamp),\n time: timestamp,\n elapsed: secondsPassed,\n locale: this.locale\n });\n\n if (custom !== undefined) {\n // Won't return `timeToNextUpdate` here\n // because `custom()` seems deprecated.\n return custom;\n }\n } // Get the list of available time interval units.\n\n\n var units = getTimeIntervalMeasurementUnits( // Controlling `style.steps` through `style.units` seems to be deprecated:\n // create a new custom `style` instead.\n style.units, labels, nowLabel); // // If no available time unit is suitable, just output an empty string.\n // if (units.length === 0) {\n // \tconsole.error(`None of the \"${units.join(', ')}\" time units have been found in \"${labelsType}\" labels for \"${this.locale}\" locale.`)\n // \treturn ''\n // }\n\n var round = options.round || style.round; // Choose the appropriate time measurement unit\n // and get the corresponding rounded time amount.\n\n var _getStep = getStep( // \"gradation\" is a legacy name for \"steps\".\n // For historical reasons, \"approximate\" steps are used by default.\n // In the next major version, there'll be no default for `steps`.\n style.gradation || style.steps || defaultStyle.steps, secondsPassed, {\n now: now,\n units: units,\n round: round,\n future: future,\n getNextStep: true\n }),\n _getStep2 = _slicedToArray(_getStep, 3),\n prevStep = _getStep2[0],\n step = _getStep2[1],\n nextStep = _getStep2[2];\n\n var formattedDate = this.formatDateForStep(timestamp, step, secondsPassed, {\n labels: labels,\n labelsType: labelsType,\n nowLabel: nowLabel,\n now: now,\n future: future,\n round: round\n }) || '';\n\n if (options.getTimeToNextUpdate) {\n var timeToNextUpdate = getTimeToNextUpdate(timestamp, step, {\n nextStep: nextStep,\n prevStep: prevStep,\n now: now,\n future: future,\n round: round\n });\n return [formattedDate, timeToNextUpdate];\n }\n\n return formattedDate;\n }\n }, {\n key: \"formatDateForStep\",\n value: function formatDateForStep(timestamp, step, secondsPassed, _ref2) {\n var _this = this;\n\n var labels = _ref2.labels,\n labelsType = _ref2.labelsType,\n nowLabel = _ref2.nowLabel,\n now = _ref2.now,\n future = _ref2.future,\n round = _ref2.round;\n\n // If no step matches, then output an empty string.\n if (!step) {\n return;\n }\n\n if (step.format) {\n return step.format(timestamp, this.locale, {\n formatAs: function formatAs(unit, value) {\n // Mimicks `Intl.RelativeTimeFormat.format()`.\n return _this.formatValue(value, unit, {\n labels: labels,\n future: future\n });\n },\n now: now,\n future: future\n });\n } // \"unit\" is now called \"formatAs\".\n\n\n var unit = step.unit || step.formatAs;\n\n if (!unit) {\n throw new Error(\"[javascript-time-ago] Each step must define either `formatAs` or `format()`. Step: \".concat(JSON.stringify(step)));\n } // `Intl.RelativeTimeFormat` doesn't operate in \"now\" units.\n // Therefore, threat \"now\" as a special case.\n\n\n if (unit === 'now') {\n return nowLabel;\n } // Amount in units.\n\n\n var amount = Math.abs(secondsPassed) / getStepDenominator(step); // Apply granularity to the time amount\n // (and fallback to the previous step\n // if the first level of granularity\n // isn't met by this amount)\n //\n // `granularity` — (advanced) Time interval value \"granularity\".\n // For example, it could be set to `5` for minutes to allow only 5-minute increments\n // when formatting time intervals: `0 minutes`, `5 minutes`, `10 minutes`, etc.\n // Perhaps this feature will be removed because there seem to be no use cases\n // of it in the real world.\n //\n\n if (step.granularity) {\n // Recalculate the amount of seconds passed based on granularity\n amount = getRoundFunction(round)(amount / step.granularity) * step.granularity;\n }\n\n var valueForFormatting = -1 * Math.sign(secondsPassed) * getRoundFunction(round)(amount); // By default, this library formats a `0` in \"past\" mode,\n // unless `future: true` option is passed.\n // This is different to `relative-time-format`'s behavior\n // which formats a `0` in \"future\" mode by default, unless it's a `-0`.\n // So, convert `0` to `-0` if `future: true` option wasn't passed.\n // `=== 0` matches both `0` and `-0`.\n\n if (valueForFormatting === 0) {\n if (future) {\n valueForFormatting = 0;\n } else {\n valueForFormatting = -0;\n }\n }\n\n switch (labelsType) {\n case 'long':\n case 'short':\n case 'narrow':\n // Format the amount using `Intl.RelativeTimeFormat`.\n return this.getFormatter(labelsType).format(valueForFormatting, unit);\n\n default:\n // Format the amount.\n // (mimicks `Intl.RelativeTimeFormat` behavior for other time label styles)\n return this.formatValue(valueForFormatting, unit, {\n labels: labels,\n future: future\n });\n }\n }\n /**\r\n * Mimicks what `Intl.RelativeTimeFormat` does for additional locale styles.\r\n * @param {number} value\r\n * @param {string} unit\r\n * @param {object} options.labels — Relative time labels.\r\n * @param {boolean} [options.future] — Tells how to format value `0`: as \"future\" (`true`) or \"past\" (`false`). Is `false` by default, but should have been `true` actually.\r\n * @return {string}\r\n */\n\n }, {\n key: \"formatValue\",\n value: function formatValue(value, unit, _ref3) {\n var labels = _ref3.labels,\n future = _ref3.future;\n return this.getFormattingRule(labels, unit, value, {\n future: future\n }).replace('{0}', this.formatNumber(Math.abs(value)));\n }\n /**\r\n * Returns formatting rule for `value` in `units` (either in past or in future).\r\n * @param {object} formattingRules — Relative time labels for different units.\r\n * @param {string} unit - Time interval measurement unit.\r\n * @param {number} value - Time interval value.\r\n * @param {boolean} [options.future] — Tells how to format value `0`: as \"future\" (`true`) or \"past\" (`false`). Is `false` by default.\r\n * @return {string}\r\n * @example\r\n * // Returns \"{0} days ago\"\r\n * getFormattingRule(en.long, \"day\", -2, 'en')\r\n */\n\n }, {\n key: \"getFormattingRule\",\n value: function getFormattingRule(formattingRules, unit, value, _ref4) {\n var future = _ref4.future;\n // Passing the language is required in order to\n // be able to correctly classify the `value` as a number.\n var locale = this.locale;\n formattingRules = formattingRules[unit]; // Check for a special \"compacted\" rules case:\n // if formatting rules are the same for \"past\" and \"future\",\n // and also for all possible `value`s, then those rules are\n // stored as a single string.\n\n if (typeof formattingRules === 'string') {\n return formattingRules;\n } // Choose either \"past\" or \"future\" based on time `value` sign.\n // If \"past\" is same as \"future\" then they're stored as \"other\".\n // If there's only \"other\" then it's being collapsed.\n\n\n var pastOrFuture = value === 0 ? future ? 'future' : 'past' : value < 0 ? 'past' : 'future';\n var quantifierRules = formattingRules[pastOrFuture] || formattingRules; // Bundle size optimization technique.\n\n if (typeof quantifierRules === 'string') {\n return quantifierRules;\n } // Quantify `value`.\n\n\n var quantifier = this.getPluralRules().select(Math.abs(value)); // \"other\" rule is supposed to always be present.\n // If only \"other\" rule is present then \"rules\" is not an object and is a string.\n\n return quantifierRules[quantifier] || quantifierRules.other;\n }\n /**\r\n * Formats a number into a string.\r\n * Uses `Intl.NumberFormat` when available.\r\n * @param {number} number\r\n * @return {string}\r\n */\n\n }, {\n key: \"formatNumber\",\n value: function formatNumber(number) {\n return this.numberFormat ? this.numberFormat.format(number) : String(number);\n }\n /**\r\n * Returns an `Intl.RelativeTimeFormat` for a given `labelsType`.\r\n * @param {string} labelsType\r\n * @return {object} `Intl.RelativeTimeFormat` instance\r\n */\n\n }, {\n key: \"getFormatter\",\n value: function getFormatter(labelsType) {\n // `Intl.RelativeTimeFormat` instance creation is (hypothetically) assumed\n // a lengthy operation so the instances are cached and reused.\n return this.relativeTimeFormatCache.get(this.locale, labelsType) || this.relativeTimeFormatCache.put(this.locale, labelsType, new this.IntlRelativeTimeFormat(this.locale, {\n style: labelsType\n }));\n }\n /**\r\n * Returns an `Intl.PluralRules` instance.\r\n * @return {object} `Intl.PluralRules` instance\r\n */\n\n }, {\n key: \"getPluralRules\",\n value: function getPluralRules() {\n // `Intl.PluralRules` instance creation is (hypothetically) assumed\n // a lengthy operation so the instances are cached and reused.\n return this.pluralRulesCache.get(this.locale) || this.pluralRulesCache.put(this.locale, new this.IntlPluralRules(this.locale));\n }\n /**\r\n * Gets localized labels for this type of labels.\r\n *\r\n * @param {(string|string[])} labelsType - Relative date/time labels type.\r\n * If it's an array then all label types are tried\r\n * until a suitable one is found.\r\n *\r\n * @returns {Object} Returns an object of shape { labelsType, labels }\r\n */\n\n }, {\n key: \"getLabels\",\n value: function getLabels() {\n var labelsType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n // Convert `labels` to an array.\n if (typeof labelsType === 'string') {\n labelsType = [labelsType];\n } // Supports legacy \"tiny\" and \"mini-time\" label styles.\n\n\n labelsType = labelsType.map(function (labelsType) {\n switch (labelsType) {\n case 'tiny':\n case 'mini-time':\n return 'mini';\n\n default:\n return labelsType;\n }\n }); // \"long\" labels type is the default one.\n // (it's always present for all languages)\n\n labelsType = labelsType.concat('long'); // Find a suitable labels type.\n\n var localeData = getLocaleData(this.locale);\n\n for (var _iterator = labelsType, _isArray = Array.isArray(_iterator), _i2 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {\n var _ref5;\n\n if (_isArray) {\n if (_i2 >= _iterator.length) break;\n _ref5 = _iterator[_i2++];\n } else {\n _i2 = _iterator.next();\n if (_i2.done) break;\n _ref5 = _i2.value;\n }\n\n var _labelsType = _ref5;\n\n if (localeData[_labelsType]) {\n return {\n labelsType: _labelsType,\n labels: localeData[_labelsType]\n };\n }\n }\n }\n }]);\n\n return TimeAgo;\n}();\n/**\r\n * Default locale global variable.\r\n */\n\n\nexport { TimeAgo as default };\nvar defaultLocale = 'en';\n/**\r\n * Gets default locale.\r\n * @return {string} locale\r\n */\n\nTimeAgo.getDefaultLocale = function () {\n return defaultLocale;\n};\n/**\r\n * Sets default locale.\r\n * @param {string} locale\r\n */\n\n\nTimeAgo.setDefaultLocale = function (locale) {\n return defaultLocale = locale;\n};\n/**\r\n * Adds locale data for a specific locale.\r\n * @param {Object} localeData\r\n */\n\n\nTimeAgo.addDefaultLocale = function (localeData) {\n if (defaultLocaleHasBeenSpecified) {\n throw new Error('[javascript-time-ago] `TimeAgo.addDefaultLocale()` can only be called once. To add other locales, use `TimeAgo.addLocale()`.');\n }\n\n defaultLocaleHasBeenSpecified = true;\n TimeAgo.setDefaultLocale(localeData.locale);\n TimeAgo.addLocale(localeData);\n};\n\nvar defaultLocaleHasBeenSpecified;\n/**\r\n * Adds locale data for a specific locale.\r\n * @param {Object} localeData\r\n */\n\nTimeAgo.addLocale = function (localeData) {\n addLocaleData(localeData);\n RelativeTimeFormatPolyfill.addLocale(localeData);\n};\n/**\r\n * (legacy alias)\r\n * Adds locale data for a specific locale.\r\n * @param {Object} localeData\r\n * @deprecated\r\n */\n\n\nTimeAgo.locale = TimeAgo.addLocale;\n/**\r\n * Adds custom labels to locale data.\r\n * @param {string} locale\r\n * @param {string} name\r\n * @param {object} labels\r\n */\n\nTimeAgo.addLabels = function (locale, name, labels) {\n var localeData = getLocaleData(locale);\n\n if (!localeData) {\n addLocaleData({\n locale: locale\n });\n localeData = getLocaleData(locale); // throw new Error(`[javascript-time-ago] No data for locale \"${locale}\"`)\n }\n\n localeData[name] = labels;\n}; // Normalizes `.format()` `time` argument.\n\n\nfunction getTimestamp(input) {\n if (input.constructor === Date || isMockedDate(input)) {\n return input.getTime();\n }\n\n if (typeof input === 'number') {\n return input;\n } // For some weird reason istanbul doesn't see this `throw` covered.\n\n /* istanbul ignore next */\n\n\n throw new Error(\"Unsupported relative time formatter input: \".concat(_typeof(input), \", \").concat(input));\n} // During testing via some testing libraries `Date`s aren't actually `Date`s.\n// https://github.com/catamphetamine/javascript-time-ago/issues/22\n\n\nfunction isMockedDate(object) {\n return _typeof(object) === 'object' && typeof object.getTime === 'function';\n} // Get available time interval measurement units.\n\n\nfunction getTimeIntervalMeasurementUnits(allowedUnits, labels, nowLabel) {\n // Get all time interval measurement units that're available\n // in locale data for a given time labels style.\n var units = Object.keys(labels); // `now` unit is handled separately and is shipped in its own `now.json` file.\n // `now.json` isn't present for all locales, so it could be substituted with\n // \".second.current\".\n // Add `now` unit if it's available in locale data.\n\n if (nowLabel) {\n units.push('now');\n } // If only a specific set of available time measurement units can be used\n // then only those units are allowed (if they're present in locale data).\n\n\n if (allowedUnits) {\n units = allowedUnits.filter(function (unit) {\n return unit === 'now' || units.indexOf(unit) >= 0;\n });\n }\n\n return units;\n}\n\nfunction getNowLabel(labels, nowLabels, longLabels, future) {\n var nowLabel = labels.now || nowLabels && nowLabels.now; // Specific \"now\" message form extended locale data (if present).\n\n if (nowLabel) {\n // Bundle size optimization technique.\n if (typeof nowLabel === 'string') {\n return nowLabel;\n } // Not handling `value === 0` as `localeData.now.current` here\n // because it wouldn't make sense: \"now\" is a moment,\n // so one can't possibly differentiate between a\n // \"previous\" moment, a \"current\" moment and a \"next moment\".\n // It can only be differentiated between \"past\" and \"future\".\n\n\n if (future) {\n return nowLabel.future;\n } else {\n return nowLabel.past;\n }\n } // Use \".second.current\" as \"now\" message.\n\n\n if (longLabels && longLabels.second && longLabels.second.current) {\n return longLabels.second.current;\n }\n}\n\nvar OBJECT_CONSTRUCTOR = {}.constructor;\n\nfunction isObject(object) {\n return _typeof(object) !== undefined && object !== null && object.constructor === OBJECT_CONSTRUCTOR;\n}\n\nfunction isStyle(variable) {\n return typeof variable === 'string' || isStyleObject(variable);\n}\n\nexport function isStyleObject(object) {\n return isObject(object) && (Array.isArray(object.steps) || // `gradation` property is deprecated: it has been renamed to `steps`.\n Array.isArray(object.gradation) || // `flavour` property is deprecated: it has been renamed to `labels`.\n Array.isArray(object.flavour) || typeof object.flavour === 'string' || Array.isArray(object.labels) || typeof object.labels === 'string' || // `units` property is deprecated.\n Array.isArray(object.units) || // `custom` property is deprecated.\n typeof object.custom === 'function');\n}\n//# sourceMappingURL=TimeAgo.js.map","import round from './round';\nimport roundMinute from './roundMinute'; // `approximate` style is deprecated.\n\nimport approximate from './approximate'; // `approximateTime` style is deprecated.\n\nimport approximateTime from './approximateTime';\nimport twitter from './twitter';\nimport twitterNow from './twitterNow';\nimport twitterMinute from './twitterMinute';\nimport twitterMinuteNow from './twitterMinuteNow';\nimport twitterFirstMinute from './twitterFirstMinute';\nimport mini from './mini';\nimport miniNow from './miniNow';\nimport miniMinute from './miniMinute';\nimport miniMinuteNow from './miniMinuteNow';\nexport default function getStyleByName(style) {\n switch (style) {\n // \"default\" style name is deprecated.\n case 'default':\n case 'round':\n return round;\n\n case 'round-minute':\n return roundMinute;\n\n case 'approximate':\n return approximate;\n // \"time\" style name is deprecated.\n\n case 'time':\n case 'approximate-time':\n return approximateTime;\n\n case 'mini':\n return mini;\n\n case 'mini-now':\n return miniNow;\n\n case 'mini-minute':\n return miniMinute;\n\n case 'mini-minute-now':\n return miniMinuteNow;\n\n case 'twitter':\n return twitter;\n\n case 'twitter-now':\n return twitterNow;\n\n case 'twitter-minute':\n return twitterMinute;\n\n case 'twitter-minute-now':\n return twitterMinuteNow;\n\n case 'twitter-first-minute':\n return twitterFirstMinute;\n\n default:\n // For historical reasons, the default style is \"approximate\".\n return approximate;\n }\n}\n//# sourceMappingURL=getStyleByName.js.map"],"names":["defaultLocale","localesData","lowercaseLocaleLookup","getDefaultLocale","resolveLocale","locale","toLowerCase","options","arguments","length","undefined","localeMatcher","resolveLocaleLookup","RangeError","concat","resolvedLocale","resolveLocaleForData","parts","split","pop","_resolvedLocale","join","$","af","n","am","ar","s","String","n100","Number","slice","ast","v0","be","t0","n10","br","n1000000","bs","i","f","i10","i100","f10","f100","cs","cy","da","dsb","dz","fil","fr","ga","gd","he","is","ksh","lt","lv","v","mk","mt","pa","pl","pt","ro","ru","se","si","sl","getPluralRulesLocale","languageTag","match","LANGUAGE_REG_EXP","TypeError","getLanguageFromLanguageTag","as","az","bg","bn","ca","ce","chr","de","ee","el","en","es","et","eu","fa","fi","fo","fur","fy","gl","gu","hi","hr","hsb","hu","hy","ia","id","it","ja","jgo","jv","ka","kea","kk","kl","km","kn","ko","ku","ky","lb","lkt","lo","ml","mn","mr","ms","my","nb","ne","nl","nn","or","ps","sah","sd","sk","so","sq","sr","sv","sw","ta","te","th","ti","tk","to","tr","ug","uk","ur","uz","vi","wae","yi","yue","zh","zu","_defineProperties","target","props","descriptor","enumerable","configurable","writable","Object","defineProperty","key","PluralRules","instance","Constructor","_classCallCheck","this","locales","supportedLocalesOf","type","PluralRuleFunctions","protoProps","staticProps","value","filter","number","prototype","_typeof","obj","Symbol","iterator","constructor","_objectSpread","source","ownKeys","keys","getOwnPropertySymbols","sym","getOwnPropertyDescriptor","forEach","_defineProperty","_slicedToArray","arr","Array","isArray","_arrayWithHoles","_arr","_n","_d","_e","_s","_i","next","done","push","err","_iterableToArrayLimit","_nonIterableRest","UNITS","NUMERIC_VALUES","STYLE_VALUES","LOCALE_MATCHER_VALUES","RelativeTimeFormat","numeric","style","indexOf","Error","pluralRules","console","warn","Intl","NumberFormat","numberFormat","numberingSystem","resolvedOptions","_parseFormatArgs","parseFormatArgs","_parseFormatArgs2","unit","getRule","replace","formatNumber","Math","abs","_parseFormatArgs3","_parseFormatArgs4","rule","valueIndex","formatNumberToParts","map","part","unitMessages","message","_message","current","pluralizedMessages","isNegativeZero","select","other","format","formatToParts","addLocale","localeData","setDefaultLocale","UNIT_ERROR","parseUnit","parseNumber","isFinite","args","Cache","cache","_len","_key","_len2","_key2","lastKey","_i2","chooseLocale","isLocaleDataAvailable","_iterator","_isArray","_ref","intlDateTimeFormatSupported","DateTimeFormat","minute","hour","day","week","month","year","getSecondsInUnit","getStepDenominator","step","factor","formatAs","getRoundFunction","round","floor","getDiffRatioToNextRoundedNumber","getStepMinTime","minTime","prevStep","timestamp","now","future","threshold","default","getMinTimeForUnit","toUnit","fromUnit","_getMinTimeForUnit","test","JSON","stringify","_ref2","fromUnitAmount","toUnitAmount","getStep","steps","secondsPassed","units","getNextStep","getStepIndex","granularity","_getStep","_ref3","filterStepsByUnits","getTimeToNextUpdateForUnit","unitDenominator","preciseAmount","roundedAmount","getDiffToPreviousRoundedNumber","getDiffToNextRoundedNumber","INFINITY","getTimeToNextUpdate","date","nextStep","getTime","_getTimeToNextUpdateForUnit","timeToStepChange","stepChangesAt","currentOrNextStep","getStepChangesAt","getTimeToStepChange","timeToNextUpdate","min","getLocaleData","addLocaleData","labels","threshold_for_now","threshold_for_minute","gradation","approximate","flavour","getDate","Date","formatters","monthAndDay","dayMonth","yearMonthAndDay","getFullYear","dayMonthYear","twitter","twitterMinute","mini","miniMinute","defaultLocaleHasBeenSpecified","TimeAgo","polyfill","IntlRelativeTimeFormat","IntlPluralRules","RelativeTimeFormatPolyfill","relativeTimeFormatCache","pluralRulesCache","input","variable","object","OBJECT_CONSTRUCTOR","isObject","custom","defaultStyle","roundMinute","approximateTime","miniNow","miniMinuteNow","twitterNow","twitterMinuteNow","twitterFirstMinute","getStyleByName","isMockedDate","getTimestamp","_this$getLabels","getLabels","labelsType","nowLabel","nowLabels","longLabels","past","second","getNowLabel","long","time","elapsed","allowedUnits","getTimeIntervalMeasurementUnits","_getStep2","formattedDate","formatDateForStep","_this","formatValue","amount","valueForFormatting","sign","getFormatter","getFormattingRule","formattingRules","_ref4","quantifierRules","getPluralRules","get","put","_ref5","_labelsType","addDefaultLocale","addLabels","name"],"mappings":"8PAEA,IAAIA,EAAgB,KAGhBC,EAAc,GAGdC,EAAwB,GACrB,SAASC,IACd,OAAOH,EAoCF,SAASI,EAAcC,GAC5B,OAAIJ,EAAYI,GACPA,EAGLH,EAAsBG,EAAOC,eACxBJ,EAAsBG,EAAOC,oBADtC,ECrCa,SAASF,EAAcC,GACpC,IAAIE,EAAUC,UAAUC,OAAS,QAAsBC,IAAjBF,UAAU,GAAmBA,UAAU,GAAK,GAC9EG,EAAgBJ,EAAQI,eAAiB,SAE7C,OAAQA,GACN,IAAK,SAKL,IAAK,WAEH,OAAOC,EAAoBP,GAE7B,QACE,MAAM,IAAIQ,WAAW,mCAAqCC,OAAOH,KAkBhE,SAASC,EAAoBP,GAClC,IAAIU,EAAiBC,EAAqBX,GAE1C,GAAIU,EACF,OAAOA,EAMT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,GAkd3KyL,EAhcT,GAwcI1W,GAAgB,KAMpB0W,GAAQvW,iBAAmB,WACzB,OAAOH,IAQT0W,GAAQxG,iBAAmB,SAAU7P,GACnC,OAAOL,GAAgBK,GAQzBqW,GAAQwD,iBAAmB,SAAUjK,GACnC,GAAIwG,GACF,MAAM,IAAI5I,MAAM,gIAGlB4I,IAAgC,EAChCC,GAAQxG,iBAAiBD,EAAW5P,QACpCqW,GAAQ1G,UAAUC,IASpByG,GAAQ1G,UAAY,SAAUC,GAC5BqF,GAAcrF,GACd6G,EAA2B9G,UAAUC,IAUvCyG,GAAQrW,OAASqW,GAAQ1G,UAQzB0G,GAAQyD,UAAY,SAAU9Z,EAAQ+Z,EAAM7E,GAC1C,IAAItF,EAAaoF,GAAchV,GAE1B4P,IACHqF,GAAc,CACZjV,OAAQA,IAEV4P,EAAaoF,GAAchV,IAG7B4P,EAAWmK,GAAQ7E,GA4ErB,IAAI6B,GAAqB,GAAG1L,6FzB/jBrB,SAA2Cd,GAEhD,GAAIyG,IACF,OAAOpD,KAAKqD,eAAezG,mBAAmBD,GAAS"}
|
|
1
|
+
{"version":3,"file":"javascript-time-ago.min.js","sources":["../node_modules/relative-time-format/modules/LocaleDataStore.js","../node_modules/relative-time-format/modules/resolveLocale.js","../node_modules/relative-time-format/modules/PluralRuleFunctions.js","../node_modules/relative-time-format/modules/getPluralRulesLocale.js","../node_modules/relative-time-format/modules/PluralRules.js","../node_modules/relative-time-format/modules/RelativeTimeFormat.js","../modules/cache.js","../modules/locale.js","../modules/steps/units.js","../modules/steps/getStepDenominator.js","../modules/round.js","../modules/steps/getStepMinTime.js","../modules/steps/getStep.js","../modules/steps/getTimeToNextUpdateForUnit.js","../modules/steps/getTimeToNextUpdate.js","../modules/LocaleDataStore.js","../modules/style/round.js","../modules/steps/round.js","../modules/style/roundMinute.js","../modules/steps/approximate.js","../modules/style/approximate.js","../modules/style/approximateTime.js","../modules/steps/helpers.js","../modules/style/twitter.js","../modules/style/twitterNow.js","../modules/style/twitterMinute.js","../modules/style/twitterMinuteNow.js","../modules/style/twitterFirstMinute.js","../modules/style/mini.js","../modules/style/miniNow.js","../modules/style/miniMinute.js","../modules/style/miniMinuteNow.js","../modules/TimeAgo.js","../modules/style/getStyleByName.js"],"sourcesContent":["// Fallback locale.\n// (when not a single one of the supplied \"preferred\" locales is available)\nvar defaultLocale = 'en'; // For all locales added\n// their relative time formatter messages will be stored here.\n\nvar localesData = {}; // According to the spec BCP 47 language tags are case-insensitive.\n// https://tools.ietf.org/html/rfc5646\n\nvar lowercaseLocaleLookup = {};\nexport function getDefaultLocale() {\n return defaultLocale;\n}\nexport function setDefaultLocale(locale) {\n defaultLocale = locale;\n}\n/**\r\n * Gets locale data previously added by `addLocaleData()`.\r\n * @return {object} [localeData]\r\n */\n\nexport function getLocaleData(locale) {\n return localesData[locale];\n}\n/**\r\n * Adds locale data.\r\n * Is called by `RelativeTimeFormat.addLocale(...)`.\r\n * @param {object} localeData\r\n */\n\nexport function addLocaleData(localeData) {\n if (!localeData) {\n throw new Error('No locale data passed');\n } // This locale data is stored in a global variable\n // and later used when calling `.format(time)`.\n\n\n localesData[localeData.locale] = localeData;\n lowercaseLocaleLookup[localeData.locale.toLowerCase()] = localeData.locale;\n}\n/**\r\n * Returns a locale for which locale data has been added\r\n * via `RelativeTimeFormat.addLocale(...)`.\r\n * @param {string} locale\r\n * @return {string} [locale]\r\n */\n\nexport function resolveLocale(locale) {\n if (localesData[locale]) {\n return locale;\n }\n\n if (lowercaseLocaleLookup[locale.toLowerCase()]) {\n return lowercaseLocaleLookup[locale.toLowerCase()];\n }\n}\n//# sourceMappingURL=LocaleDataStore.js.map","import { resolveLocale as resolveLocaleForData } from './LocaleDataStore';\n/**\r\n * Resolves a locale to a supported one (if any).\r\n * @param {string} locale\r\n * @param {Object} [options] - An object that may have the following property:\r\n * @param {string} [options.localeMatcher=\"lookup\"] - The locale matching algorithm to use. Possible values are \"lookup\" and \"best fit\". Currently only \"lookup\" is supported.\r\n * @return {string} [locale]\r\n * @example\r\n * // Returns \"sr\"\r\n * resolveLocale(\"sr-Cyrl-BA\")\r\n * // Returns `undefined`\r\n * resolveLocale(\"xx-Latn\")\r\n */\n\nexport default function resolveLocale(locale) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var localeMatcher = options.localeMatcher || 'lookup';\n\n switch (localeMatcher) {\n case 'lookup':\n return resolveLocaleLookup(locale);\n // \"best fit\" locale matching is not supported.\n // https://github.com/catamphetamine/relative-time-format/issues/2\n\n case 'best fit':\n // return resolveLocaleBestFit(locale)\n return resolveLocaleLookup(locale);\n\n default:\n throw new RangeError(\"Invalid \\\"localeMatcher\\\" option: \".concat(localeMatcher));\n }\n}\n/**\r\n * Resolves a locale to a supported one (if any).\r\n * Starts from the most specific locale and gradually\r\n * falls back to less specific ones.\r\n * This is a basic implementation of the \"lookup\" algorithm.\r\n * https://tools.ietf.org/html/rfc4647#section-3.4\r\n * @param {string} locale\r\n * @return {string} [locale]\r\n * @example\r\n * // Returns \"sr\"\r\n * resolveLocaleLookup(\"sr-Cyrl-BA\")\r\n * // Returns `undefined`\r\n * resolveLocaleLookup(\"xx-Latn\")\r\n */\n\nexport function resolveLocaleLookup(locale) {\n var resolvedLocale = resolveLocaleForData(locale);\n\n if (resolvedLocale) {\n return resolvedLocale;\n } // `sr-Cyrl-BA` -> `sr-Cyrl` -> `sr`.\n\n\n var parts = locale.split('-');\n\n while (locale.length > 1) {\n parts.pop();\n locale = parts.join('-');\n\n var _resolvedLocale = resolveLocaleForData(locale);\n\n if (_resolvedLocale) {\n return _resolvedLocale;\n }\n }\n}\n//# sourceMappingURL=resolveLocale.js.map","// (this file was autogenerated by `generate-locales`)\n// \"plural rules\" functions are not stored in locale JSON files because they're not strings.\n// This file isn't big — it's about 5 kilobytes in size (minified).\n// Alternatively, the pluralization rules for each locale could be stored\n// in their JSON files in a non-parsed form and later parsed via `make-plural` library.\n// But `make-plural` library itself is relatively big in size:\n// `make-plural.min.js` is about 6 kilobytes (https://unpkg.com/make-plural/).\n// So, it's more practical to bypass runtime `make-plural` pluralization rules compilation\n// and just include the already compiled pluarlization rules for all locales in the library code.\nvar $ = {\n af: function classify(n) {\n return n == 1 ? 'one' : 'other';\n },\n am: function classify(n) {\n return n >= 0 && n <= 1 ? 'one' : 'other';\n },\n ar: function classify(n) {\n var s = String(n).split('.'),\n t0 = Number(s[0]) == n,\n n100 = t0 && s[0].slice(-2);\n return n == 0 ? 'zero' : n == 1 ? 'one' : n == 2 ? 'two' : n100 >= 3 && n100 <= 10 ? 'few' : n100 >= 11 && n100 <= 99 ? 'many' : 'other';\n },\n ast: function classify(n) {\n var s = String(n).split('.'),\n v0 = !s[1];\n return n == 1 && v0 ? 'one' : 'other';\n },\n be: function classify(n) {\n var s = String(n).split('.'),\n t0 = Number(s[0]) == n,\n n10 = t0 && s[0].slice(-1),\n n100 = t0 && s[0].slice(-2);\n return n10 == 1 && n100 != 11 ? 'one' : n10 >= 2 && n10 <= 4 && (n100 < 12 || n100 > 14) ? 'few' : t0 && n10 == 0 || n10 >= 5 && n10 <= 9 || n100 >= 11 && n100 <= 14 ? 'many' : 'other';\n },\n br: function classify(n) {\n var s = String(n).split('.'),\n t0 = Number(s[0]) == n,\n n10 = t0 && s[0].slice(-1),\n n100 = t0 && s[0].slice(-2),\n n1000000 = t0 && s[0].slice(-6);\n return n10 == 1 && n100 != 11 && n100 != 71 && n100 != 91 ? 'one' : n10 == 2 && n100 != 12 && n100 != 72 && n100 != 92 ? 'two' : (n10 == 3 || n10 == 4 || n10 == 9) && (n100 < 10 || n100 > 19) && (n100 < 70 || n100 > 79) && (n100 < 90 || n100 > 99) ? 'few' : n != 0 && t0 && n1000000 == 0 ? 'many' : 'other';\n },\n bs: function classify(n) {\n var s = String(n).split('.'),\n i = s[0],\n f = s[1] || '',\n v0 = !s[1],\n i10 = i.slice(-1),\n i100 = i.slice(-2),\n f10 = f.slice(-1),\n f100 = f.slice(-2);\n return v0 && i10 == 1 && i100 != 11 || f10 == 1 && f100 != 11 ? 'one' : v0 && i10 >= 2 && i10 <= 4 && (i100 < 12 || i100 > 14) || f10 >= 2 && f10 <= 4 && (f100 < 12 || f100 > 14) ? 'few' : 'other';\n },\n cs: function classify(n) {\n var s = String(n).split('.'),\n i = s[0],\n v0 = !s[1];\n return n == 1 && v0 ? 'one' : i >= 2 && i <= 4 && v0 ? 'few' : !v0 ? 'many' : 'other';\n },\n cy: function classify(n) {\n return n == 0 ? 'zero' : n == 1 ? 'one' : n == 2 ? 'two' : n == 3 ? 'few' : n == 6 ? 'many' : 'other';\n },\n da: function classify(n) {\n var s = String(n).split('.'),\n i = s[0],\n t0 = Number(s[0]) == n;\n return n == 1 || !t0 && (i == 0 || i == 1) ? 'one' : 'other';\n },\n dsb: function classify(n) {\n var s = String(n).split('.'),\n i = s[0],\n f = s[1] || '',\n v0 = !s[1],\n i100 = i.slice(-2),\n f100 = f.slice(-2);\n return v0 && i100 == 1 || f100 == 1 ? 'one' : v0 && i100 == 2 || f100 == 2 ? 'two' : v0 && (i100 == 3 || i100 == 4) || f100 == 3 || f100 == 4 ? 'few' : 'other';\n },\n dz: function classify(n) {\n return 'other';\n },\n fil: function classify(n) {\n var s = String(n).split('.'),\n i = s[0],\n f = s[1] || '',\n v0 = !s[1],\n i10 = i.slice(-1),\n f10 = f.slice(-1);\n return v0 && (i == 1 || i == 2 || i == 3) || v0 && i10 != 4 && i10 != 6 && i10 != 9 || !v0 && f10 != 4 && f10 != 6 && f10 != 9 ? 'one' : 'other';\n },\n fr: function classify(n) {\n return n >= 0 && n < 2 ? 'one' : 'other';\n },\n ga: function classify(n) {\n var s = String(n).split('.'),\n t0 = Number(s[0]) == n;\n return n == 1 ? 'one' : n == 2 ? 'two' : t0 && n >= 3 && n <= 6 ? 'few' : t0 && n >= 7 && n <= 10 ? 'many' : 'other';\n },\n gd: function classify(n) {\n var s = String(n).split('.'),\n t0 = Number(s[0]) == n;\n return n == 1 || n == 11 ? 'one' : n == 2 || n == 12 ? 'two' : t0 && n >= 3 && n <= 10 || t0 && n >= 13 && n <= 19 ? 'few' : 'other';\n },\n he: function classify(n) {\n var s = String(n).split('.'),\n i = s[0],\n v0 = !s[1],\n t0 = Number(s[0]) == n,\n n10 = t0 && s[0].slice(-1);\n return n == 1 && v0 ? 'one' : i == 2 && v0 ? 'two' : v0 && (n < 0 || n > 10) && t0 && n10 == 0 ? 'many' : 'other';\n },\n is: function classify(n) {\n var s = String(n).split('.'),\n i = s[0],\n t0 = Number(s[0]) == n,\n i10 = i.slice(-1),\n i100 = i.slice(-2);\n return t0 && i10 == 1 && i100 != 11 || !t0 ? 'one' : 'other';\n },\n ksh: function classify(n) {\n return n == 0 ? 'zero' : n == 1 ? 'one' : 'other';\n },\n lt: function classify(n) {\n var s = String(n).split('.'),\n f = s[1] || '',\n t0 = Number(s[0]) == n,\n n10 = t0 && s[0].slice(-1),\n n100 = t0 && s[0].slice(-2);\n return n10 == 1 && (n100 < 11 || n100 > 19) ? 'one' : n10 >= 2 && n10 <= 9 && (n100 < 11 || n100 > 19) ? 'few' : f != 0 ? 'many' : 'other';\n },\n lv: function classify(n) {\n var s = String(n).split('.'),\n f = s[1] || '',\n v = f.length,\n t0 = Number(s[0]) == n,\n n10 = t0 && s[0].slice(-1),\n n100 = t0 && s[0].slice(-2),\n f100 = f.slice(-2),\n f10 = f.slice(-1);\n return t0 && n10 == 0 || n100 >= 11 && n100 <= 19 || v == 2 && f100 >= 11 && f100 <= 19 ? 'zero' : n10 == 1 && n100 != 11 || v == 2 && f10 == 1 && f100 != 11 || v != 2 && f10 == 1 ? 'one' : 'other';\n },\n mk: function classify(n) {\n var s = String(n).split('.'),\n i = s[0],\n f = s[1] || '',\n v0 = !s[1],\n i10 = i.slice(-1),\n i100 = i.slice(-2),\n f10 = f.slice(-1),\n f100 = f.slice(-2);\n return v0 && i10 == 1 && i100 != 11 || f10 == 1 && f100 != 11 ? 'one' : 'other';\n },\n mt: function classify(n) {\n var s = String(n).split('.'),\n t0 = Number(s[0]) == n,\n n100 = t0 && s[0].slice(-2);\n return n == 1 ? 'one' : n == 0 || n100 >= 2 && n100 <= 10 ? 'few' : n100 >= 11 && n100 <= 19 ? 'many' : 'other';\n },\n pa: function classify(n) {\n return n == 0 || n == 1 ? 'one' : 'other';\n },\n pl: function classify(n) {\n var s = String(n).split('.'),\n i = s[0],\n v0 = !s[1],\n i10 = i.slice(-1),\n i100 = i.slice(-2);\n return n == 1 && v0 ? 'one' : v0 && i10 >= 2 && i10 <= 4 && (i100 < 12 || i100 > 14) ? 'few' : v0 && i != 1 && (i10 == 0 || i10 == 1) || v0 && i10 >= 5 && i10 <= 9 || v0 && i100 >= 12 && i100 <= 14 ? 'many' : 'other';\n },\n pt: function classify(n) {\n var s = String(n).split('.'),\n i = s[0];\n return i == 0 || i == 1 ? 'one' : 'other';\n },\n ro: function classify(n) {\n var s = String(n).split('.'),\n v0 = !s[1],\n t0 = Number(s[0]) == n,\n n100 = t0 && s[0].slice(-2);\n return n == 1 && v0 ? 'one' : !v0 || n == 0 || n != 1 && n100 >= 1 && n100 <= 19 ? 'few' : 'other';\n },\n ru: function classify(n) {\n var s = String(n).split('.'),\n i = s[0],\n v0 = !s[1],\n i10 = i.slice(-1),\n i100 = i.slice(-2);\n return v0 && i10 == 1 && i100 != 11 ? 'one' : v0 && i10 >= 2 && i10 <= 4 && (i100 < 12 || i100 > 14) ? 'few' : v0 && i10 == 0 || v0 && i10 >= 5 && i10 <= 9 || v0 && i100 >= 11 && i100 <= 14 ? 'many' : 'other';\n },\n se: function classify(n) {\n return n == 1 ? 'one' : n == 2 ? 'two' : 'other';\n },\n si: function classify(n) {\n var s = String(n).split('.'),\n i = s[0],\n f = s[1] || '';\n return n == 0 || n == 1 || i == 0 && f == 1 ? 'one' : 'other';\n },\n sl: function classify(n) {\n var s = String(n).split('.'),\n i = s[0],\n v0 = !s[1],\n i100 = i.slice(-2);\n return v0 && i100 == 1 ? 'one' : v0 && i100 == 2 ? 'two' : v0 && (i100 == 3 || i100 == 4) || !v0 ? 'few' : 'other';\n }\n};\n$.as = $.am;\n$.az = $.af;\n$.bg = $.af;\n$.bn = $.am;\n$.ca = $.ast;\n$.ce = $.af;\n$.chr = $.af;\n$.de = $.ast;\n$.ee = $.af;\n$.el = $.af;\n$.en = $.ast;\n$.es = $.af;\n$.et = $.ast;\n$.eu = $.af;\n$.fa = $.am;\n$.fi = $.ast;\n$.fo = $.af;\n$.fur = $.af;\n$.fy = $.ast;\n$.gl = $.ast;\n$.gu = $.am;\n$.hi = $.am;\n$.hr = $.bs;\n$.hsb = $.dsb;\n$.hu = $.af;\n$.hy = $.fr;\n$.ia = $.ast;\n$.id = $.dz;\n$.it = $.ast;\n$.ja = $.dz;\n$.jgo = $.af;\n$.jv = $.dz;\n$.ka = $.af;\n$.kea = $.dz;\n$.kk = $.af;\n$.kl = $.af;\n$.km = $.dz;\n$.kn = $.am;\n$.ko = $.dz;\n$.ku = $.af;\n$.ky = $.af;\n$.lb = $.af;\n$.lkt = $.dz;\n$.lo = $.dz;\n$.ml = $.af;\n$.mn = $.af;\n$.mr = $.am;\n$.ms = $.dz;\n$.my = $.dz;\n$.nb = $.af;\n$.ne = $.af;\n$.nl = $.ast;\n$.nn = $.af;\n$.or = $.af;\n$.ps = $.af;\n$[\"pt-PT\"] = $.ast;\n$.sah = $.dz;\n$.sd = $.af;\n$.sk = $.cs;\n$.so = $.af;\n$.sq = $.af;\n$.sr = $.bs;\n$.sv = $.ast;\n$.sw = $.ast;\n$.ta = $.af;\n$.te = $.af;\n$.th = $.dz;\n$.ti = $.pa;\n$.tk = $.af;\n$.to = $.dz;\n$.tr = $.af;\n$.ug = $.af;\n$.uk = $.ru;\n$.ur = $.ast;\n$.uz = $.af;\n$.vi = $.dz;\n$.wae = $.af;\n$.yi = $.ast;\n$.yue = $.dz;\n$.zh = $.dz;\n$.zu = $.am;\nexport default $;\n//# sourceMappingURL=PluralRuleFunctions.js.map","/**\r\n * Returns a `locale` for which a function exists in `./PluralRuleFunctions.js`.\r\n * @param {string} locale\r\n * @return {string}\r\n * @example\r\n * getPluralRulesLocale(\"ru-RU-Cyrl\") // Returns \"ru\".\r\n */\nexport default function getPluralRulesLocale(locale) {\n // \"pt\" language is the only one having different pluralization rules\n // for the one (\"pt\") (Portuguese) locale and the other (\"pt-PT\") (European Portuguese).\n // http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html\n // (see the entries for \"pt\" and \"pt_PT\" there)\n if (locale === 'pt-PT') {\n return locale;\n }\n\n return getLanguageFromLanguageTag(locale);\n}\n/**\r\n * Extracts language from an IETF BCP 47 language tag.\r\n * @param {string} languageTag - IETF BCP 47 language tag.\r\n * @return {string}\r\n * @example\r\n * // Returns \"he\"\r\n * getLanguageFromLanguageTag(\"he-IL-u-ca-hebrew-tz-jeruslm\")\r\n * // Returns \"ar\"\r\n * getLanguageFromLanguageTag(\"ar-u-nu-latn\")\r\n */\n\nvar LANGUAGE_REG_EXP = /^([a-z0-9]+)/i;\n\nfunction getLanguageFromLanguageTag(languageTag) {\n var match = languageTag.match(LANGUAGE_REG_EXP);\n\n if (!match) {\n throw new TypeError(\"Invalid locale: \".concat(languageTag));\n }\n\n return match[1];\n}\n//# sourceMappingURL=getPluralRulesLocale.js.map","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n// Importing `PluralRule` polyfill from a separate package\n// results in a bundle that is larger by 1kB for some reason.\n// export { default as default } from 'intl-plural-rules-polyfill/cardinal'\nimport PluralRuleFunctions from \"./PluralRuleFunctions\";\nimport getPluralRulesLocale from \"./getPluralRulesLocale\";\n/**\r\n * `Intl.PluralRules` polyfill.\r\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/PluralRules\r\n */\n\nvar PluralRules =\n/*#__PURE__*/\nfunction () {\n function PluralRules(locale, options) {\n _classCallCheck(this, PluralRules);\n\n var locales = PluralRules.supportedLocalesOf(locale);\n\n if (locales.length === 0) {\n throw new RangeError(\"Unsupported locale: \" + locale);\n }\n\n if (options && options.type !== \"cardinal\") {\n throw new RangeError(\"Only \\\"cardinal\\\" \\\"type\\\" is supported\");\n }\n\n this.$ = PluralRuleFunctions[getPluralRulesLocale(locales[0])];\n }\n\n _createClass(PluralRules, [{\n key: \"select\",\n value: function select(number) {\n return this.$(number);\n }\n }], [{\n key: \"supportedLocalesOf\",\n value: function supportedLocalesOf(locales) {\n if (typeof locales === \"string\") {\n locales = [locales];\n }\n\n return locales.filter(function (locale) {\n return PluralRuleFunctions[getPluralRulesLocale(locale)];\n });\n }\n }]);\n\n return PluralRules;\n}();\n\nexport { PluralRules as default };\n//# sourceMappingURL=PluralRules.js.map","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { getDefaultLocale, setDefaultLocale, getLocaleData, addLocaleData } from './LocaleDataStore';\nimport resolveLocale from './resolveLocale';\nimport PluralRules from './PluralRules'; // Importing `PluralRule` polyfill from a separate package\n// results in a bundle that is larger by 1kB for some reason.\n// import PluralRules from 'intl-plural-rules-polyfill/cardinal'\n// Valid time units.\n\nexport var UNITS = [\"second\", \"minute\", \"hour\", \"day\", \"week\", \"month\", \"quarter\", \"year\"]; // Valid values for the `numeric` option.\n\nvar NUMERIC_VALUES = [\"auto\", \"always\"]; // Valid values for the `style` option.\n\nvar STYLE_VALUES = [\"long\", \"short\", \"narrow\"]; // Valid values for the `localeMatcher` option.\n\nvar LOCALE_MATCHER_VALUES = [\"lookup\", \"best fit\"];\n/**\r\n * Polyfill for `Intl.RelativeTimeFormat` proposal.\r\n * https://github.com/tc39/proposal-intl-relative-time\r\n * https://github.com/tc39/proposal-intl-relative-time/issues/55\r\n */\n\nvar RelativeTimeFormat =\n/*#__PURE__*/\nfunction () {\n /**\r\n * @param {(string|string[])} [locales] - Preferred locales (or locale).\r\n * @param {Object} [options] - Formatting options.\r\n * @param {string} [options.style=\"long\"] - One of: \"long\", \"short\", \"narrow\".\r\n * @param {string} [options.numeric=\"always\"] - (Version >= 2) One of: \"always\", \"auto\".\r\n * @param {string} [options.localeMatcher=\"lookup\"] - One of: \"lookup\", \"best fit\". Currently only \"lookup\" is supported.\r\n */\n function RelativeTimeFormat() {\n var locales = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, RelativeTimeFormat);\n\n _defineProperty(this, \"numeric\", \"always\");\n\n _defineProperty(this, \"style\", \"long\");\n\n _defineProperty(this, \"localeMatcher\", \"lookup\");\n\n var numeric = options.numeric,\n style = options.style,\n localeMatcher = options.localeMatcher; // Set `numeric` option.\n\n if (numeric !== undefined) {\n if (NUMERIC_VALUES.indexOf(numeric) < 0) {\n throw new RangeError(\"Invalid \\\"numeric\\\" option: \".concat(numeric));\n }\n\n this.numeric = numeric;\n } // Set `style` option.\n\n\n if (style !== undefined) {\n if (STYLE_VALUES.indexOf(style) < 0) {\n throw new RangeError(\"Invalid \\\"style\\\" option: \".concat(style));\n }\n\n this.style = style;\n } // Set `localeMatcher` option.\n\n\n if (localeMatcher !== undefined) {\n if (LOCALE_MATCHER_VALUES.indexOf(localeMatcher) < 0) {\n throw new RangeError(\"Invalid \\\"localeMatcher\\\" option: \".concat(localeMatcher));\n }\n\n this.localeMatcher = localeMatcher;\n } // Set `locale`.\n // Convert `locales` to an array.\n\n\n if (typeof locales === 'string') {\n locales = [locales];\n } // Add default locale.\n\n\n locales.push(getDefaultLocale()); // Choose the most appropriate locale.\n\n this.locale = RelativeTimeFormat.supportedLocalesOf(locales, {\n localeMatcher: this.localeMatcher\n })[0];\n\n if (!this.locale) {\n throw new Error(\"No supported locale was found\");\n } // Construct an `Intl.PluralRules` instance (polyfill).\n\n\n if (PluralRules.supportedLocalesOf(this.locale).length > 0) {\n this.pluralRules = new PluralRules(this.locale);\n } else {\n console.warn(\"\\\"\".concat(this.locale, \"\\\" locale is not supported\"));\n } // Use `Intl.NumberFormat` for formatting numbers (when available).\n\n\n if (typeof Intl !== 'undefined' && Intl.NumberFormat) {\n this.numberFormat = new Intl.NumberFormat(this.locale);\n this.numberingSystem = this.numberFormat.resolvedOptions().numberingSystem;\n } else {\n this.numberingSystem = 'latn';\n }\n\n this.locale = resolveLocale(this.locale, {\n localeMatcher: this.localeMatcher\n });\n }\n /**\r\n * Formats time `number` in `units` (either in past or in future).\r\n * @param {number} number - Time interval value.\r\n * @param {string} unit - Time interval measurement unit.\r\n * @return {string}\r\n * @throws {RangeError} If unit is not one of \"second\", \"minute\", \"hour\", \"day\", \"week\", \"month\", \"quarter\".\r\n * @example\r\n * // Returns \"2 days ago\"\r\n * rtf.format(-2, \"day\")\r\n * // Returns \"in 5 minutes\"\r\n * rtf.format(5, \"minute\")\r\n */\n\n\n _createClass(RelativeTimeFormat, [{\n key: \"format\",\n value: function format() {\n var _parseFormatArgs = parseFormatArgs(arguments),\n _parseFormatArgs2 = _slicedToArray(_parseFormatArgs, 2),\n number = _parseFormatArgs2[0],\n unit = _parseFormatArgs2[1];\n\n return this.getRule(number, unit).replace('{0}', this.formatNumber(Math.abs(number)));\n }\n /**\r\n * Formats time `number` in `units` (either in past or in future).\r\n * @param {number} number - Time interval value.\r\n * @param {string} unit - Time interval measurement unit.\r\n * @return {Object[]} The parts (`{ type, value }`).\r\n * @throws {RangeError} If unit is not one of \"second\", \"minute\", \"hour\", \"day\", \"week\", \"month\", \"quarter\".\r\n * @example\r\n * // Version 1.\r\n * // Returns [\r\n * // { type: \"literal\", value: \"in \" },\r\n * // { type: \"day\", value: \"100\" },\r\n * // { type: \"literal\", value: \" days\" }\r\n * // ]\r\n * rtf.formatToParts(100, \"day\")\r\n * //\r\n * // Version 2.\r\n * // Returns [\r\n * // { type: \"literal\", value: \"in \" },\r\n * // { type: \"integer\", value: \"100\", unit: \"day\" },\r\n * // { type: \"literal\", value: \" days\" }\r\n * // ]\r\n * rtf.formatToParts(100, \"day\")\r\n */\n\n }, {\n key: \"formatToParts\",\n value: function formatToParts() {\n var _parseFormatArgs3 = parseFormatArgs(arguments),\n _parseFormatArgs4 = _slicedToArray(_parseFormatArgs3, 2),\n number = _parseFormatArgs4[0],\n unit = _parseFormatArgs4[1];\n\n var rule = this.getRule(number, unit);\n var valueIndex = rule.indexOf(\"{0}\"); // \"yesterday\"/\"today\"/\"tomorrow\".\n\n if (valueIndex < 0) {\n return [{\n type: \"literal\",\n value: rule\n }];\n }\n\n var parts = [];\n\n if (valueIndex > 0) {\n parts.push({\n type: \"literal\",\n value: rule.slice(0, valueIndex)\n });\n }\n\n parts = parts.concat(this.formatNumberToParts(Math.abs(number)).map(function (part) {\n return _objectSpread({}, part, {\n unit: unit\n });\n }));\n\n if (valueIndex + \"{0}\".length < rule.length - 1) {\n parts.push({\n type: \"literal\",\n value: rule.slice(valueIndex + \"{0}\".length)\n });\n }\n\n return parts;\n }\n /**\r\n * Returns formatting rule for `value` in `units` (either in past or in future).\r\n * @param {number} value - Time interval value.\r\n * @param {string} unit - Time interval measurement unit.\r\n * @return {string}\r\n * @throws {RangeError} If unit is not one of \"second\", \"minute\", \"hour\", \"day\", \"week\", \"month\", \"quarter\".\r\n * @example\r\n * // Returns \"{0} days ago\"\r\n * getRule(-2, \"day\")\r\n */\n\n }, {\n key: \"getRule\",\n value: function getRule(value, unit) {\n // Get locale-specific time interval formatting rules\n // of a given `style` for the given value of measurement `unit`.\n //\n // E.g.:\n //\n // ```json\n // {\n // \"past\": {\n // \"one\": \"a second ago\",\n // \"other\": \"{0} seconds ago\"\n // },\n // \"future\": {\n // \"one\": \"in a second\",\n // \"other\": \"in {0} seconds\"\n // }\n // }\n // ```\n //\n var unitMessages = getLocaleData(this.locale)[this.style][unit]; // Special case for \"yesterday\"/\"today\"/\"tomorrow\".\n\n if (this.numeric === \"auto\") {\n // \"yesterday\", \"the day before yesterday\", etc.\n if (value === -2 || value === -1) {\n var message = unitMessages[\"previous\".concat(value === -1 ? '' : '-' + Math.abs(value))];\n\n if (message) {\n return message;\n }\n } // \"tomorrow\", \"the day after tomorrow\", etc.\n else if (value === 1 || value === 2) {\n var _message = unitMessages[\"next\".concat(value === 1 ? '' : '-' + Math.abs(value))];\n\n if (_message) {\n return _message;\n }\n } // \"today\"\n else if (value === 0) {\n if (unitMessages.current) {\n return unitMessages.current;\n }\n }\n } // Choose either \"past\" or \"future\" based on time `value` sign.\n // If there's only \"other\" then it's being collapsed.\n // (the resulting bundle size optimization technique)\n\n\n var pluralizedMessages = unitMessages[isNegative(value) ? \"past\" : \"future\"]; // Bundle size optimization technique.\n\n if (typeof pluralizedMessages === \"string\") {\n return pluralizedMessages;\n } // Quantify `value`.\n // There seems to be no such locale in CLDR\n // for which \"plural rules\" function is missing.\n\n\n var quantifier = this.pluralRules && this.pluralRules.select(Math.abs(value)) || 'other'; // \"other\" rule is supposed to be always present.\n // If only \"other\" rule is present then \"rules\" is not an object and is a string.\n\n return pluralizedMessages[quantifier] || pluralizedMessages.other;\n }\n /**\r\n * Formats a number into a string.\r\n * Uses `Intl.NumberFormat` when available.\r\n * @param {number} number\r\n * @return {string}\r\n */\n\n }, {\n key: \"formatNumber\",\n value: function formatNumber(number) {\n return this.numberFormat ? this.numberFormat.format(number) : String(number);\n }\n /**\r\n * Formats a number into a list of parts.\r\n * Uses `Intl.NumberFormat` when available.\r\n * @param {number} number\r\n * @return {object[]}\r\n */\n\n }, {\n key: \"formatNumberToParts\",\n value: function formatNumberToParts(number) {\n // `Intl.NumberFormat.formatToParts()` is not present, for example,\n // in Node.js 8.x while `Intl.NumberFormat` itself is present.\n return this.numberFormat && this.numberFormat.formatToParts ? this.numberFormat.formatToParts(number) : [{\n type: \"integer\",\n value: this.formatNumber(number)\n }];\n }\n /**\r\n * Returns a new object with properties reflecting the locale and date and time formatting options computed during initialization of this DateTimeFormat object.\r\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/resolvedOptions\r\n * @return {Object}\r\n */\n\n }, {\n key: \"resolvedOptions\",\n value: function resolvedOptions() {\n return {\n locale: this.locale,\n style: this.style,\n numeric: this.numeric,\n numberingSystem: this.numberingSystem\n };\n }\n }]);\n\n return RelativeTimeFormat;\n}();\n/**\r\n * Returns an array containing those of the provided locales\r\n * that are supported in collation without having to fall back\r\n * to the runtime's default locale.\r\n * @param {(string|string[])} locale - A string with a BCP 47 language tag, or an array of such strings. For the general form of the locales argument, see the Intl page.\r\n * @param {Object} [options] - An object that may have the following property:\r\n * @param {string} [options.localeMatcher=\"lookup\"] - The locale matching algorithm to use. Possible values are \"lookup\" and \"best fit\". Currently only \"lookup\" is supported.\r\n * @return {string[]} An array of strings representing a subset of the given locale tags that are supported in collation without having to fall back to the runtime's default locale.\r\n * @example\r\n * var locales = ['ban', 'id-u-co-pinyin', 'es-PY']\r\n * var options = { localeMatcher: 'lookup' }\r\n * // Returns [\"id\", \"es-PY\"]\r\n * Intl.RelativeTimeFormat.supportedLocalesOf(locales, options)\r\n */\n\n\nexport { RelativeTimeFormat as default };\n\nRelativeTimeFormat.supportedLocalesOf = function (locales) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n // Convert `locales` to an array.\n if (typeof locales === 'string') {\n locales = [locales];\n } else if (!Array.isArray(locales)) {\n throw new TypeError('Invalid \"locales\" argument');\n }\n\n return locales.filter(function (locale) {\n return resolveLocale(locale, options);\n });\n};\n/**\r\n * Adds locale data for a specific locale.\r\n * @param {Object} localeData\r\n */\n\n\nRelativeTimeFormat.addLocale = addLocaleData;\n/**\r\n * Sets default locale.\r\n * @param {string} locale\r\n */\n\nRelativeTimeFormat.setDefaultLocale = setDefaultLocale;\n/**\r\n * Gets default locale.\r\n * @return {string} locale\r\n */\n\nRelativeTimeFormat.getDefaultLocale = getDefaultLocale;\n/**\r\n * Export `Intl.PluralRules` just in case it's used somewhere else.\r\n */\n\nRelativeTimeFormat.PluralRules = PluralRules; // The specification allows units to be in plural form.\n// Convert plural to singular.\n// Example: \"seconds\" -> \"second\".\n\nvar UNIT_ERROR = 'Invalid \"unit\" argument';\n\nfunction parseUnit(unit) {\n if (_typeof(unit) === 'symbol') {\n throw new TypeError(UNIT_ERROR);\n }\n\n if (typeof unit !== 'string') {\n throw new RangeError(\"\".concat(UNIT_ERROR, \": \").concat(unit));\n }\n\n if (unit[unit.length - 1] === 's') {\n unit = unit.slice(0, unit.length - 1);\n }\n\n if (UNITS.indexOf(unit) < 0) {\n throw new RangeError(\"\".concat(UNIT_ERROR, \": \").concat(unit));\n }\n\n return unit;\n} // Converts `value` to a `Number`.\n// The specification allows value to be a non-number.\n// For example, \"-0\" is supposed to be treated as `-0`.\n// Also checks if `value` is a finite number.\n\n\nvar NUMBER_ERROR = 'Invalid \"number\" argument';\n\nfunction parseNumber(value) {\n value = Number(value);\n\n if (Number.isFinite) {\n if (!Number.isFinite(value)) {\n throw new RangeError(\"\".concat(NUMBER_ERROR, \": \").concat(value));\n }\n }\n\n return value;\n}\n/**\r\n * Tells `0` from `-0`.\r\n * https://stackoverflow.com/questions/7223359/are-0-and-0-the-same\r\n * @param {number} number\r\n * @return {Boolean}\r\n * @example\r\n * isNegativeZero(0); // false\r\n * isNegativeZero(-0); // true\r\n */\n\n\nfunction isNegativeZero(number) {\n return 1 / number === -Infinity;\n}\n\nfunction isNegative(number) {\n return number < 0 || number === 0 && isNegativeZero(number);\n}\n\nfunction parseFormatArgs(args) {\n if (args.length < 2) {\n throw new TypeError(\"\\\"unit\\\" argument is required\");\n }\n\n return [parseNumber(args[0]), parseUnit(args[1])];\n}\n//# sourceMappingURL=RelativeTimeFormat.js.map","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\r\n * A basic in-memory cache.\r\n *\r\n * import Cache from 'javascript-time-ago/Cache'\r\n * const cache = new Cache()\r\n * const object = cache.get('key1', 'key2', ...) || cache.put('key1', 'key2', ..., createObject())\r\n */\nvar Cache =\n/*#__PURE__*/\nfunction () {\n function Cache() {\n _classCallCheck(this, Cache);\n\n _defineProperty(this, \"cache\", {});\n }\n\n _createClass(Cache, [{\n key: \"get\",\n value: function get() {\n var cache = this.cache;\n\n for (var _len = arguments.length, keys = new Array(_len), _key = 0; _key < _len; _key++) {\n keys[_key] = arguments[_key];\n }\n\n for (var _i = 0; _i < keys.length; _i++) {\n var key = keys[_i];\n\n if (_typeof(cache) !== 'object') {\n return;\n }\n\n cache = cache[key];\n }\n\n return cache;\n }\n }, {\n key: \"put\",\n value: function put() {\n for (var _len2 = arguments.length, keys = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n keys[_key2] = arguments[_key2];\n }\n\n var value = keys.pop();\n var lastKey = keys.pop();\n var cache = this.cache;\n\n for (var _i2 = 0; _i2 < keys.length; _i2++) {\n var key = keys[_i2];\n\n if (_typeof(cache[key]) !== 'object') {\n cache[key] = {};\n }\n\n cache = cache[key];\n }\n\n return cache[lastKey] = value;\n }\n }]);\n\n return Cache;\n}();\n\nexport { Cache as default };\n//# sourceMappingURL=cache.js.map","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/**\r\n * Chooses the most appropriate locale\r\n * (one of the registered ones)\r\n * based on the list of preferred `locales` supplied by the user.\r\n *\r\n * @param {string[]} locales - the list of preferable locales (in [IETF format](https://en.wikipedia.org/wiki/IETF_language_tag)).\r\n * @param {Function} isLocaleDataAvailable - tests if a locale is available.\r\n *\r\n * @returns {string} The most suitable locale.\r\n *\r\n * @example\r\n * // Returns 'en'\r\n * chooseLocale(['en-US'], undefined, (locale) => locale === 'ru' || locale === 'en')\r\n */\nexport default function chooseLocale(locales, isLocaleDataAvailable) {\n // This is not an intelligent algorithm,\n // but it will do for this library's case.\n // `sr-Cyrl-BA` -> `sr-Cyrl` -> `sr`.\n for (var _iterator = locales, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {\n var _ref;\n\n if (_isArray) {\n if (_i >= _iterator.length) break;\n _ref = _iterator[_i++];\n } else {\n _i = _iterator.next();\n if (_i.done) break;\n _ref = _i.value;\n }\n\n var locale = _ref;\n\n if (isLocaleDataAvailable(locale)) {\n return locale;\n }\n\n var parts = locale.split('-');\n\n while (parts.length > 1) {\n parts.pop();\n locale = parts.join('-');\n\n if (isLocaleDataAvailable(locale)) {\n return locale;\n }\n }\n }\n\n throw new Error(\"No locale data has been registered for any of the locales: \".concat(locales.join(', ')));\n}\n/**\r\n * Whether can use `Intl.DateTimeFormat` for these `locales`.\r\n * Returns the first suitable one.\r\n * @param {(string|string[])} locales\r\n * @return {?string} The first locale that can be used.\r\n */\n\nexport function intlDateTimeFormatSupportedLocale(locales) {\n /* istanbul ignore else */\n if (intlDateTimeFormatSupported()) {\n return Intl.DateTimeFormat.supportedLocalesOf(locales)[0];\n }\n}\n/**\r\n * Whether can use `Intl.DateTimeFormat`.\r\n * @return {boolean}\r\n */\n\nexport function intlDateTimeFormatSupported() {\n // Babel transforms `typeof` into some \"branches\"\n // so istanbul will show this as \"branch not covered\".\n\n /* istanbul ignore next */\n var isIntlAvailable = (typeof Intl === \"undefined\" ? \"undefined\" : _typeof(Intl)) === 'object';\n return isIntlAvailable && typeof Intl.DateTimeFormat === 'function';\n}\n//# sourceMappingURL=locale.js.map","export var minute = 60; // in seconds\n\nexport var hour = 60 * minute; // in seconds\n\nexport var day = 24 * hour; // in seconds\n\nexport var week = 7 * day; // in seconds\n// https://www.quora.com/What-is-the-average-number-of-days-in-a-month\n\nexport var month = 30.44 * day; // in seconds\n// \"400 years have 146097 days (taking into account leap year rules)\"\n\nexport var year = 146097 / 400 * day; // in seconds\n\nexport function getSecondsInUnit(unit) {\n switch (unit) {\n case 'second':\n return 1;\n\n case 'minute':\n return minute;\n\n case 'hour':\n return hour;\n\n case 'day':\n return day;\n\n case 'week':\n return week;\n\n case 'month':\n return month;\n\n case 'year':\n return year;\n }\n} // export function getPreviousUnitFor(unit) {\n// \tswitch (unit) {\n// \t\tcase 'second':\n// \t\t\treturn 'now'\n// \t\tcase 'minute':\n// \t\t\treturn 'second'\n// \t\tcase 'hour':\n// \t\t\treturn 'minute'\n// \t\tcase 'day':\n// \t\t\treturn 'hour'\n// \t\tcase 'week':\n// \t\t\treturn 'day'\n// \t\tcase 'month':\n// \t\t\treturn 'week'\n// \t\tcase 'year':\n// \t\t\treturn 'month'\n// \t}\n// }\n//# sourceMappingURL=units.js.map","import { getSecondsInUnit } from './units';\nexport default function getStepDenominator(step) {\n // `factor` is a legacy property.\n if (step.factor !== undefined) {\n return step.factor;\n } // \"unit\" is now called \"formatAs\".\n\n\n return getSecondsInUnit(step.unit || step.formatAs) || 1;\n}\n//# sourceMappingURL=getStepDenominator.js.map","export function getRoundFunction(round) {\n switch (round) {\n case 'floor':\n return Math.floor;\n\n default:\n return Math.round;\n }\n} // For non-negative numbers.\n\nexport function getDiffRatioToNextRoundedNumber(round) {\n switch (round) {\n case 'floor':\n // Math.floor(x) = x\n // Math.floor(x + 1) = x + 1\n return 1;\n\n default:\n // Math.round(x) = x\n // Math.round(x + 0.5) = x + 1\n return 0.5;\n }\n}\n//# sourceMappingURL=round.js.map","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nimport { getSecondsInUnit } from './units';\nimport { getDiffRatioToNextRoundedNumber } from '../round';\nexport default function getStepMinTime(step, _ref) {\n var prevStep = _ref.prevStep,\n timestamp = _ref.timestamp,\n now = _ref.now,\n future = _ref.future,\n round = _ref.round;\n var minTime; // \"threshold_for_xxx\" is a legacy property.\n\n if (prevStep) {\n if (prevStep.id || prevStep.unit) {\n minTime = step[\"threshold_for_\".concat(prevStep.id || prevStep.unit)];\n }\n }\n\n if (minTime === undefined) {\n // \"threshold\" is a legacy property.\n if (step.threshold !== undefined) {\n // \"threshold\" is a legacy name for \"minTime\".\n minTime = step.threshold; // \"threshold\" function is deprecated.\n\n if (typeof minTime === 'function') {\n minTime = minTime(now, future);\n }\n }\n }\n\n if (minTime === undefined) {\n minTime = step.minTime;\n } // A deprecated way of specifying a different threshold\n // depending on the previous step's unit.\n\n\n if (_typeof(minTime) === 'object') {\n if (prevStep && prevStep.id && minTime[prevStep.id] !== undefined) {\n minTime = minTime[prevStep.id];\n } else {\n minTime = minTime.default;\n }\n }\n\n if (typeof minTime === 'function') {\n minTime = minTime(timestamp, {\n future: future,\n getMinTimeForUnit: function getMinTimeForUnit(toUnit, fromUnit) {\n return _getMinTimeForUnit(toUnit, fromUnit || prevStep && prevStep.formatAs, {\n round: round\n });\n }\n });\n } // Evaluate the `test()` function.\n // `test()` function is deprecated.\n\n\n if (minTime === undefined) {\n if (step.test) {\n if (step.test(timestamp, {\n now: now,\n future: future\n })) {\n // `0` threshold always passes.\n minTime = 0;\n } else {\n // `MAX_SAFE_INTEGER` threshold won't ever pass in real life.\n minTime = 9007199254740991; // Number.MAX_SAFE_INTEGER\n }\n }\n }\n\n if (minTime === undefined) {\n if (prevStep) {\n if (step.formatAs && prevStep.formatAs) {\n minTime = _getMinTimeForUnit(step.formatAs, prevStep.formatAs, {\n round: round\n });\n }\n } else {\n // The first step's `minTime` is `0` by default.\n minTime = 0;\n }\n } // Warn if no `minTime` was defined or could be deduced.\n\n\n if (minTime === undefined) {\n console.warn('[javascript-time-ago] A step should specify `minTime`:\\n' + JSON.stringify(step, null, 2));\n }\n\n return minTime;\n}\n\nfunction _getMinTimeForUnit(toUnit, fromUnit, _ref2) {\n var round = _ref2.round;\n var toUnitAmount = getSecondsInUnit(toUnit); // if (!fromUnit) {\n // \treturn toUnitAmount;\n // }\n // if (!fromUnit) {\n // \tfromUnit = getPreviousUnitFor(toUnit)\n // }\n\n var fromUnitAmount;\n\n if (fromUnit === 'now') {\n fromUnitAmount = getSecondsInUnit(toUnit);\n } else {\n fromUnitAmount = getSecondsInUnit(fromUnit);\n }\n\n if (toUnitAmount !== undefined && fromUnitAmount !== undefined) {\n return toUnitAmount - fromUnitAmount * (1 - getDiffRatioToNextRoundedNumber(round));\n }\n}\n//# sourceMappingURL=getStepMinTime.js.map","function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport getStepDenominator from './getStepDenominator';\nimport getStepMinTime from './getStepMinTime';\nimport { getRoundFunction } from '../round';\n/**\r\n * Finds an appropriate `step` of `steps` for the time interval (in seconds).\r\n *\r\n * @param {Object[]} steps - Time formatting steps.\r\n *\r\n * @param {number} secondsPassed - Time interval (in seconds).\r\n * `< 0` for past dates and `> 0` for future dates.\r\n *\r\n * @param {number} options.now - Current timestamp.\r\n *\r\n * @param {boolean} [options.future] - Whether the date should be formatted as a future one\r\n * instead of a past one.\r\n *\r\n * @param {string} [options.round] - (undocumented) Rounding mechanism.\r\n *\r\n * @param {string[]} [options.units] - A list of allowed time units.\r\n * (Example: ['second', 'minute', 'hour', …])\r\n *\r\n * @param {boolean} [options.getNextStep] - Pass true to return `[step, nextStep]` instead of just `step`.\r\n *\r\n * @return {Object|Object[]} [step] — Either a `step` or `[prevStep, step, nextStep]`.\r\n */\n\nexport default function getStep(steps, secondsPassed, _ref) {\n var now = _ref.now,\n future = _ref.future,\n round = _ref.round,\n units = _ref.units,\n getNextStep = _ref.getNextStep;\n // Ignore steps having not-supported time units in `formatAs`.\n steps = filterStepsByUnits(steps, units);\n\n var step = _getStep(steps, secondsPassed, {\n now: now,\n future: future,\n round: round\n });\n\n if (getNextStep) {\n if (step) {\n var prevStep = steps[steps.indexOf(step) - 1];\n var nextStep = steps[steps.indexOf(step) + 1];\n return [prevStep, step, nextStep];\n }\n\n return [undefined, undefined, steps[0]];\n }\n\n return step;\n}\n\nfunction _getStep(steps, secondsPassed, _ref2) {\n var now = _ref2.now,\n future = _ref2.future,\n round = _ref2.round;\n\n // If no steps fit the conditions then return nothing.\n if (steps.length === 0) {\n return;\n } // Find the most appropriate step.\n\n\n var i = getStepIndex(steps, secondsPassed, {\n now: now,\n future: future || secondsPassed < 0,\n round: round\n }); // If no step is applicable the return nothing.\n\n if (i === -1) {\n return;\n }\n\n var step = steps[i]; // Apply granularity to the time amount\n // (and fall back to the previous step\n // if the first level of granularity\n // isn't met by this amount)\n\n if (step.granularity) {\n // Recalculate the amount of seconds passed based on `granularity`.\n var secondsPassedGranular = getRoundFunction(round)(Math.abs(secondsPassed) / getStepDenominator(step) / step.granularity) * step.granularity; // If the granularity for this step is too high,\n // then fall back to the previous step.\n // (if there is any previous step)\n\n if (secondsPassedGranular === 0 && i > 0) {\n return steps[i - 1];\n }\n }\n\n return step;\n}\n/**\r\n * Iterates through steps until it finds the maximum one satisfying the `minTime` threshold.\r\n * @param {Object} steps - Steps.\r\n * @param {number} secondsPassed - How much seconds have passed since the date till `now`.\r\n * @param {number} options.now - Current timestamp.\r\n * @param {boolean} options.future - Whether the time interval should be formatted as a future one.\r\n * @param {number} [i] - Gradation step currently being tested.\r\n * @return {number} Gradation step index.\r\n */\n\n\nfunction getStepIndex(steps, secondsPassed, options) {\n var i = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var minTime = getStepMinTime(steps[i], _objectSpread({\n prevStep: steps[i - 1],\n timestamp: options.now - secondsPassed * 1000\n }, options)); // If `minTime` isn't defined or deduceable for this step, then stop.\n\n if (minTime === undefined) {\n return i - 1;\n } // If the `minTime` threshold for moving from previous step\n // to this step is too high then return the previous step.\n\n\n if (Math.abs(secondsPassed) < minTime) {\n return i - 1;\n } // If it's the last step then return it.\n\n\n if (i === steps.length - 1) {\n return i;\n } // Move to the next step.\n\n\n return getStepIndex(steps, secondsPassed, options, i + 1);\n}\n/**\r\n * Leaves only allowed steps.\r\n * @param {Object[]} steps\r\n * @param {string[]} units - Allowed time units.\r\n * @return {Object[]}\r\n */\n\n\nfunction filterStepsByUnits(steps, units) {\n return steps.filter(function (_ref3) {\n var unit = _ref3.unit,\n formatAs = _ref3.formatAs;\n // \"unit\" is now called \"formatAs\".\n unit = unit || formatAs; // If this step has a `unit` defined\n // then this `unit` must be in the list of allowed `units`.\n\n if (unit) {\n return units.indexOf(unit) >= 0;\n } // A step is not required to specify a `unit`:\n // alternatively, it could specify `format()`.\n // (see \"twitter\" style for an example)\n\n\n return true;\n });\n}\n//# sourceMappingURL=getStep.js.map","import { getSecondsInUnit } from './units';\nimport { getRoundFunction, getDiffRatioToNextRoundedNumber } from '../round';\n/**\r\n * Gets the time to next update for a step with a time unit defined.\r\n * @param {string} unit\r\n * @param {number} date — The date passed to `.format()`, converted to a timestamp.\r\n * @param {number} options.now\r\n * @param {string} [options.round] — (undocumented) Rounding mechanism.\r\n * @return {number} [timeToNextUpdate]\r\n */\n\nexport default function getTimeToNextUpdateForUnit(unit, timestamp, _ref) {\n var now = _ref.now,\n round = _ref.round;\n\n // For some units, like \"now\", there's no defined amount of seconds in them.\n if (!getSecondsInUnit(unit)) {\n // If there's no amount of seconds defined for this unit\n // then the update interval can't be determined reliably.\n return;\n }\n\n var unitDenominator = getSecondsInUnit(unit) * 1000;\n var future = timestamp > now;\n var preciseAmount = Math.abs(timestamp - now);\n var roundedAmount = getRoundFunction(round)(preciseAmount / unitDenominator) * unitDenominator;\n\n if (future) {\n if (roundedAmount > 0) {\n // Amount decreases with time.\n return preciseAmount - roundedAmount + getDiffToPreviousRoundedNumber(round, unitDenominator);\n } else {\n // Refresh right after the zero point,\n // when \"future\" changes to \"past\".\n return preciseAmount - roundedAmount + 1;\n }\n } // Amount increases with time.\n\n\n return -(preciseAmount - roundedAmount) + getDiffToNextRoundedNumber(round, unitDenominator);\n}\n\nfunction getDiffToNextRoundedNumber(round, unitDenominator) {\n return getDiffRatioToNextRoundedNumber(round) * unitDenominator;\n}\n\nfunction getDiffToPreviousRoundedNumber(round, unitDenominator) {\n return (1 - getDiffRatioToNextRoundedNumber(round)) * unitDenominator + 1;\n}\n//# sourceMappingURL=getTimeToNextUpdateForUnit.js.map","import _getTimeToNextUpdateForUnit from './getTimeToNextUpdateForUnit';\nimport getStepMinTime from './getStepMinTime';\nimport { getRoundFunction } from '../round'; // A thousand years is practically a metaphor for \"infinity\".\n\nvar YEAR = 365 * 24 * 60 * 60 * 1000;\nexport var INFINITY = 1000 * YEAR;\n/**\r\n * Gets the time to next update for a date and a step.\r\n * @param {number} date — The date passed to `.format()`, converted to a timestamp.\r\n * @param {object} step\r\n * @param {object} [options.previousStep]\r\n * @param {object} [options.nextStep]\r\n * @param {number} options.now\r\n * @param {boolean} options.future\r\n * @param {string} [options.round] - (undocumented) Rounding mechanism.\r\n * @return {number} [timeToNextUpdate]\r\n */\n\nexport default function getTimeToNextUpdate(date, step, _ref) {\n var prevStep = _ref.prevStep,\n nextStep = _ref.nextStep,\n now = _ref.now,\n future = _ref.future,\n round = _ref.round;\n var timestamp = date.getTime ? date.getTime() : date;\n\n var getTimeToNextUpdateForUnit = function getTimeToNextUpdateForUnit(unit) {\n return _getTimeToNextUpdateForUnit(unit, timestamp, {\n now: now,\n round: round\n });\n }; // For future dates, steps move from the last one to the first one,\n // while for past dates, steps move from the first one to the last one,\n // due to the fact that time flows in one direction,\n // and future dates' interval naturally becomes smaller\n // while past dates' interval naturally grows larger.\n //\n // For future dates, it's the transition\n // from the current step to the previous step,\n // therefore check the `minTime` of the current step.\n //\n // For past dates, it's the transition\n // from the current step to the next step,\n // therefore check the `minTime` of the next step.\n //\n\n\n var timeToStepChange = getTimeToStepChange(future ? step : nextStep, timestamp, {\n future: future,\n now: now,\n round: round,\n prevStep: future ? prevStep : step // isFirstStep: future && isFirstStep\n\n });\n\n if (timeToStepChange === undefined) {\n // Can't reliably determine \"time to next update\"\n // if not all of the steps provide `minTime`.\n return;\n }\n\n var timeToNextUpdate;\n\n if (step) {\n if (step.getTimeToNextUpdate) {\n timeToNextUpdate = step.getTimeToNextUpdate(timestamp, {\n getTimeToNextUpdateForUnit: getTimeToNextUpdateForUnit,\n getRoundFunction: getRoundFunction,\n now: now,\n future: future,\n round: round\n });\n }\n\n if (timeToNextUpdate === undefined) {\n // \"unit\" is now called \"formatAs\".\n var unit = step.unit || step.formatAs;\n\n if (unit) {\n // For some units, like \"now\", there's no defined amount of seconds in them.\n // In such cases, `getTimeToNextUpdateForUnit()` returns `undefined`,\n // and the next step's `minTime` could be used to calculate the update interval:\n // it will just assume that the label never changes for this step.\n timeToNextUpdate = getTimeToNextUpdateForUnit(unit);\n }\n }\n }\n\n if (timeToNextUpdate === undefined) {\n return timeToStepChange;\n }\n\n return Math.min(timeToNextUpdate, timeToStepChange);\n}\nexport function getStepChangesAt(currentOrNextStep, timestamp, _ref2) {\n var now = _ref2.now,\n future = _ref2.future,\n round = _ref2.round,\n prevStep = _ref2.prevStep;\n // The first step's `minTime` is `0` by default.\n // It doesn't \"change\" steps at zero point\n // but it does change the wording when switching\n // from \"future\" to \"past\": \"in ...\" -> \"... ago\".\n // Therefore, the label should be updated at zero-point too.\n var minTime = getStepMinTime(currentOrNextStep, {\n timestamp: timestamp,\n now: now,\n future: future,\n round: round,\n prevStep: prevStep\n });\n\n if (minTime === undefined) {\n return;\n }\n\n if (future) {\n // The step changes to the previous step\n // as soon as `timestamp - now` becomes\n // less than the `minTime` of the current step:\n // `timestamp - now === minTime - 1`\n // => `now === timestamp - minTime + 1`.\n return timestamp - minTime * 1000 + 1;\n } else {\n // The step changes to the next step\n // as soon as `now - timestamp` becomes\n // equal to `minTime` of the next step:\n // `now - timestamp === minTime`\n // => `now === timestamp + minTime`.\n // This is a special case when double-update could be skipped.\n if (minTime === 0 && timestamp === now) {\n return INFINITY;\n }\n\n return timestamp + minTime * 1000;\n }\n}\nexport function getTimeToStepChange(step, timestamp, _ref3) {\n var now = _ref3.now,\n future = _ref3.future,\n round = _ref3.round,\n prevStep = _ref3.prevStep;\n\n if (step) {\n var stepChangesAt = getStepChangesAt(step, timestamp, {\n now: now,\n future: future,\n round: round,\n prevStep: prevStep\n });\n\n if (stepChangesAt === undefined) {\n return;\n }\n\n return stepChangesAt - now;\n } else {\n if (future) {\n // No step.\n // Update right after zero point, when it changes from \"future\" to \"past\".\n return timestamp - now + 1;\n } else {\n // The last step doesn't ever change when `date` is in the past.\n return INFINITY;\n }\n }\n}\n//# sourceMappingURL=getTimeToNextUpdate.js.map","// For all locales added\n// their relative time formatter messages will be stored here.\nvar localesData = {};\nexport function getLocaleData(locale) {\n return localesData[locale];\n}\nexport function addLocaleData(localeData) {\n if (!localeData) {\n throw new Error('[javascript-time-ago] No locale data passed.');\n } // This locale data is stored in a global variable\n // and later used when calling `.format(time)`.\n\n\n localesData[localeData.locale] = localeData;\n}\n//# sourceMappingURL=LocaleDataStore.js.map","import round from '../steps/round'; // just now\n// 1 second ago\n// 2 seconds ago\n// …\n// 59 seconds ago\n// 1 minute ago\n// 2 minutes ago\n// …\n// 59 minutes ago\n// 1 minute ago\n// 2 minutes ago\n// …\n// 59 minutes ago\n// 1 hour ago\n// 2 hours ago\n// …\n// 24 hours ago\n// 1 day ago\n// 2 days ago\n// …\n// 6 days ago\n// 1 week ago\n// 2 weeks ago\n// 3 weeks ago\n// 4 weeks ago\n// 1 month ago\n// 2 months ago\n// …\n// 11 months ago\n// 1 year ago\n// 2 years ago\n// …\n//\n\nexport default {\n steps: round,\n labels: 'long'\n};\n//# sourceMappingURL=round.js.map","// just now\n// 1 second ago\n// 2 seconds ago\n// …\n// 59 seconds ago\n// 1 minute ago\n// 2 minutes ago\n// …\n// 59 minutes ago\n// 1 hour ago\n// 2 hours ago\n// …\n// 24 hours ago\n// 1 day ago\n// 2 days ago\n// …\n// 6 days ago\n// 1 week ago\n// 2 weeks ago\n// …\n// 3 weeks ago\n// 1 month ago\n// 2 months ago\n// …\n// 11 months ago\n// 1 year ago\n// 2 years ago\n// …\nexport default [{\n formatAs: 'now'\n}, {\n formatAs: 'second'\n}, {\n formatAs: 'minute'\n}, {\n formatAs: 'hour'\n}, {\n formatAs: 'day'\n}, {\n formatAs: 'week'\n}, {\n formatAs: 'month'\n}, {\n formatAs: 'year'\n}];\n//# sourceMappingURL=round.js.map","function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport round from './round'; // just now\n// 1 minute ago\n// 2 minutes ago\n// …\n// 59 minutes ago\n// 1 minute ago\n// 2 minutes ago\n// …\n// 59 minutes ago\n// 1 hour ago\n// 2 hours ago\n// …\n// 24 hours ago\n// 1 day ago\n// 2 days ago\n// …\n// 6 days ago\n// 1 week ago\n// 2 weeks ago\n// 3 weeks ago\n// 4 weeks ago\n// 1 month ago\n// 2 months ago\n// …\n// 11 months ago\n// 1 year ago\n// 2 years ago\n// …\n//\n\nexport default _objectSpread({}, round, {\n // Skip \"seconds\".\n steps: round.steps.filter(function (step) {\n return step.formatAs !== 'second';\n })\n});\n//# sourceMappingURL=roundMinute.js.map","import { minute, hour, day, week, month, year } from './units'; // \"factor\" is a legacy property.\n// Developers shouldn't need to use it in their custom steps.\n// \"threshold\" is a legacy name of \"min\".\n// Developers should use \"min\" property name instead of \"threshold\".\n// \"threshold_for_idOrUnit: value\" is a legacy way of specifying \"min: { id: value }\".\n// Developers should use \"min\" property instead of \"threshold\".\n// just now\n// 1 minute ago\n// 2 minutes ago\n// 5 minutes ago\n// 10 minutes ago\n// 15 minutes ago\n// 20 minutes ago\n// …\n// 50 minutes ago\n// an hour ago\n// 2 hours ago\n// …\n// 20 hours ago\n// a day ago\n// 2 days ago\n// 5 days ago\n// a week ago\n// 2 weeks ago\n// 3 weeks ago\n// a month ago\n// 2 months ago\n// 4 months ago\n// a year ago\n// 2 years ago\n// …\n\nexport default [{\n // This step returns the amount of seconds\n // by dividing the amount of seconds by `1`.\n factor: 1,\n // \"now\" labels are used for formatting the output.\n unit: 'now'\n}, {\n // When the language doesn't support `now` unit,\n // the first step is ignored, and it uses this `second` unit.\n threshold: 1,\n // `threshold_for_now` should be the same as `threshold` on minutes.\n threshold_for_now: 45.5,\n // This step returns the amount of seconds\n // by dividing the amount of seconds by `1`.\n factor: 1,\n // \"second\" labels are used for formatting the output.\n unit: 'second'\n}, {\n // `threshold` should be the same as `threshold_for_now` on seconds.\n threshold: 45.5,\n // Return the amount of minutes by dividing the amount\n // of seconds by the amount of seconds in a minute.\n factor: minute,\n // \"minute\" labels are used for formatting the output.\n unit: 'minute'\n}, {\n // This step is effective starting from 2.5 minutes.\n threshold: 2.5 * minute,\n // Allow only 5-minute increments of minutes starting from 2.5 minutes.\n // `granularity` — (advanced) Time interval value \"granularity\".\n // For example, it could be set to `5` for minutes to allow only 5-minute increments\n // when formatting time intervals: `0 minutes`, `5 minutes`, `10 minutes`, etc.\n // Perhaps this feature will be removed because there seem to be no use cases\n // of it in the real world.\n granularity: 5,\n // Return the amount of minutes by dividing the amount\n // of seconds by the amount of seconds in a minute.\n factor: minute,\n // \"minute\" labels are used for formatting the output.\n unit: 'minute'\n}, {\n // This step is effective starting from 22.5 minutes.\n threshold: 22.5 * minute,\n // Return the amount of minutes by dividing the amount\n // of seconds by the amount of seconds in half-an-hour.\n factor: 0.5 * hour,\n // \"half-hour\" labels are used for formatting the output.\n // (if available, which is no longer the case)\n unit: 'half-hour'\n}, {\n // This step is effective starting from 42.5 minutes.\n threshold: 42.5 * minute,\n threshold_for_minute: 52.5 * minute,\n // Return the amount of minutes by dividing the amount\n // of seconds by the amount of seconds in an hour.\n factor: hour,\n // \"hour\" labels are used for formatting the output.\n unit: 'hour'\n}, {\n // This step is effective starting from 20.5 hours.\n threshold: 20.5 / 24 * day,\n // Return the amount of minutes by dividing the amount\n // of seconds by the amount of seconds in a day.\n factor: day,\n // \"day\" labels are used for formatting the output.\n unit: 'day'\n}, {\n // This step is effective starting from 5.5 days.\n threshold: 5.5 * day,\n // Return the amount of minutes by dividing the amount\n // of seconds by the amount of seconds in a week.\n factor: week,\n // \"week\" labels are used for formatting the output.\n unit: 'week'\n}, {\n // This step is effective starting from 3.5 weeks.\n threshold: 3.5 * week,\n // Return the amount of minutes by dividing the amount\n // of seconds by the amount of seconds in a month.\n factor: month,\n // \"month\" labels are used for formatting the output.\n unit: 'month'\n}, {\n // This step is effective starting from 10.5 months.\n threshold: 10.5 * month,\n // Return the amount of minutes by dividing the amount\n // of seconds by the amount of seconds in a year.\n factor: year,\n // \"year\" labels are used for formatting the output.\n unit: 'year'\n}];\n//# sourceMappingURL=approximate.js.map","import approximate from '../steps/approximate'; // \"gradation\" is a legacy name for \"steps\".\n// It's here just for legacy compatibility.\n// Use \"steps\" name instead.\n// \"flavour\" is a legacy name for \"labels\".\n// It's here just for legacy compatibility.\n// Use \"labels\" name instead.\n// \"units\" is a legacy property.\n// It's here just for legacy compatibility.\n// Developers shouldn't need to use it in their custom styles.\n\nexport default {\n gradation: approximate,\n flavour: 'long',\n units: ['now', 'minute', 'hour', 'day', 'week', 'month', 'year']\n};\n//# sourceMappingURL=approximate.js.map","import approximate from '../steps/approximate'; // \"gradation\" is a legacy name for \"steps\".\n// It's here just for legacy compatibility.\n// Use \"steps\" name instead.\n// \"flavour\" is a legacy name for \"labels\".\n// It's here just for legacy compatibility.\n// Use \"labels\" name instead.\n// \"units\" is a legacy property.\n// It's here just for legacy compatibility.\n// Developers shouldn't need to use it in their custom styles.\n// Similar to the default style but with \"ago\" omitted.\n//\n// just now\n// 5 minutes\n// 10 minutes\n// 15 minutes\n// 20 minutes\n// an hour\n// 2 hours\n// …\n// 20 hours\n// 1 day\n// 2 days\n// a week\n// 2 weeks\n// 3 weeks\n// a month\n// 2 months\n// 3 months\n// 4 months\n// a year\n// 2 years\n//\n\nexport default {\n gradation: approximate,\n flavour: 'long-time',\n units: ['now', 'minute', 'hour', 'day', 'week', 'month', 'year']\n};\n//# sourceMappingURL=approximateTime.js.map","// Looks like this one's deprecated.\n// /**\n// * Returns a step corresponding to the unit.\n// * @param {Object[]} steps\n// * @param {string} unit\n// * @return {?Object}\n// */\n// export function getStepForUnit(steps, unit) {\n// \tfor (const step of steps) {\n// \t\tif (step.unit === unit) {\n// \t\t\treturn step\n// \t\t}\n// \t}\n// }\n// Looks like this one won't be used in the next major version.\n\n/**\r\n * Converts value to a `Date`\r\n * @param {(number|Date)} value\r\n * @return {Date}\r\n */\nexport function getDate(value) {\n return value instanceof Date ? value : new Date(value);\n}\n//# sourceMappingURL=helpers.js.map","import { day, getDate } from '../steps';\nimport { intlDateTimeFormatSupported } from '../locale'; // For compatibility with the old versions of this library.\n\nimport renameLegacyProperties from './renameLegacyProperties'; // Twitter-style relative date/time formatting.\n// (\"1m\", \"2h\", \"Mar 3\", \"Apr 4, 2012\").\n//\n// Seconds, minutes or hours are shown for shorter intervals,\n// and longer intervals are formatted using full date format.\n\nvar steps = [{\n formatAs: 'second'\n}, {\n formatAs: 'minute'\n}, {\n formatAs: 'hour'\n}]; // A cache for `Intl.DateTimeFormat` formatters\n// for various locales (is a global variable).\n\nvar formatters = {}; // Starting from day intervals, output month and day.\n\nvar monthAndDay = {\n minTime: function minTime(timestamp, _ref) {\n var future = _ref.future,\n getMinTimeForUnit = _ref.getMinTimeForUnit;\n // Returns `23.5 * 60 * 60` when `round` is \"round\",\n // and `24 * 60 * 60` when `round` is \"floor\".\n return getMinTimeForUnit('day');\n },\n format: function format(value, locale) {\n /* istanbul ignore else */\n if (!formatters[locale]) {\n formatters[locale] = {};\n }\n /* istanbul ignore else */\n\n\n if (!formatters[locale].dayMonth) {\n // \"Apr 11\" (MMMd)\n formatters[locale].dayMonth = new Intl.DateTimeFormat(locale, {\n month: 'short',\n day: 'numeric'\n });\n } // Output month and day.\n\n\n return formatters[locale].dayMonth.format(getDate(value));\n }\n}; // If the `date` happened/happens outside of current year,\n// then output day, month and year.\n// The interval should be such that the `date` lies outside of the current year.\n\nvar yearMonthAndDay = {\n minTime: function minTime(timestamp, _ref2) {\n var future = _ref2.future;\n\n if (future) {\n // January 1, 00:00, of the `date`'s year is right after\n // the maximum `now` for formatting a future date:\n // When `now` is before that date, the `date` is formatted as \"day/month/year\" (this step),\n // When `now` is equal to or after that date, the `date` is formatted as \"day/month\" (another step).\n // After that, it's hours, minutes, seconds, and after that it's no longer `future`.\n // The date is right after the maximum `now` for formatting a future date,\n // so subtract 1 millisecond from it.\n var maxFittingNow = new Date(new Date(timestamp).getFullYear(), 0).getTime() - 1; // Return `minTime` (in seconds).\n\n return (timestamp - maxFittingNow) / 1000;\n } else {\n // January 1, 00:00, of the year following the `date`'s year\n // is the minimum `now` for formatting a past date:\n // When `now` is before that date, the `date` is formatted as \"day/month\" (another step),\n // When `now` is equal to or after that date, the `date` is formatted as \"day/month/year\" (this step).\n // After that, it's hours, minutes, seconds, and after that it's no longer `future`.\n var minFittingNow = new Date(new Date(timestamp).getFullYear() + 1, 0).getTime(); // Return `minTime` (in seconds).\n\n return (minFittingNow - timestamp) / 1000;\n }\n },\n format: function format(value, locale) {\n /* istanbul ignore if */\n if (!formatters[locale]) {\n formatters[locale] = {};\n }\n /* istanbul ignore else */\n\n\n if (!formatters[locale].dayMonthYear) {\n // \"Apr 11, 2017\" (yMMMd)\n formatters[locale].dayMonthYear = new Intl.DateTimeFormat(locale, {\n year: 'numeric',\n month: 'short',\n day: 'numeric'\n });\n } // Output day, month and year.\n\n\n return formatters[locale].dayMonthYear.format(getDate(value));\n }\n}; // If `Intl.DateTimeFormat` is supported,\n// then longer time intervals will be formatted as dates.\n\n/* istanbul ignore else */\n\nif (intlDateTimeFormatSupported()) {\n steps.push(monthAndDay, yearMonthAndDay);\n} // Otherwise, if `Intl.DateTimeFormat` is not supported,\n// which could be the case when using Internet Explorer,\n// then simply mimick \"round\" steps.\nelse {\n steps.push({\n formatAs: 'day'\n }, {\n formatAs: 'week'\n }, {\n formatAs: 'month'\n }, {\n formatAs: 'year'\n });\n }\n\nexport default {\n steps: steps,\n labels: [// \"mini\" labels are only defined for a few languages.\n 'mini', // \"short-time\" labels are only defined for a few languages.\n 'short-time', // \"narrow\" and \"short\" labels are defined for all languages.\n // \"narrow\" labels can sometimes be weird (like \"+5d.\"),\n // but \"short\" labels have the \" ago\" part, so \"narrow\" seem\n // more appropriate.\n // \"short\" labels would have been more appropriate if they\n // didn't have the \" ago\" part, hence the \"short-time\" above.\n 'narrow', // Since \"narrow\" labels are always present, \"short\" element\n // of this array can be removed.\n 'short']\n};\n//# sourceMappingURL=twitter.js.map","function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport twitter from './twitter';\nexport default _objectSpread({}, twitter, {\n // Add \"now\".\n steps: [{\n formatAs: 'now'\n }].concat(twitter.steps)\n});\n//# sourceMappingURL=twitterNow.js.map","function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport twitter from './twitter';\nexport default _objectSpread({}, twitter, {\n // Skip \"seconds\".\n steps: twitter.steps.filter(function (step) {\n return step.formatAs !== 'second';\n })\n});\n//# sourceMappingURL=twitterMinute.js.map","function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport twitterMinute from './twitterMinute';\nexport default _objectSpread({}, twitterMinute, {\n // Add \"now\".\n steps: [{\n formatAs: 'now'\n }].concat(twitterMinute.steps)\n});\n//# sourceMappingURL=twitterMinuteNow.js.map","function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { minute } from '../steps/units';\nimport twitter from './twitter';\nexport default _objectSpread({}, twitter, {\n // Skip \"seconds\".\n steps: twitter.steps.filter(function (step) {\n return step.formatAs !== 'second';\n }) // Start showing `1m` from the first minute.\n .map(function (step) {\n return step.formatAs === 'minute' ? _objectSpread({}, step, {\n minTime: minute\n }) : step;\n })\n});\n//# sourceMappingURL=twitterFirstMinute.js.map","export default {\n steps: [{\n formatAs: 'second'\n }, {\n formatAs: 'minute'\n }, {\n formatAs: 'hour'\n }, {\n formatAs: 'day'\n }, {\n formatAs: 'month'\n }, {\n formatAs: 'year'\n }],\n labels: [// \"mini\" labels are only defined for a few languages.\n 'mini', // \"short-time\" labels are only defined for a few languages.\n 'short-time', // \"narrow\" and \"short\" labels are defined for all languages.\n // \"narrow\" labels can sometimes be weird (like \"+5d.\"),\n // but \"short\" labels have the \" ago\" part, so \"narrow\" seem\n // more appropriate.\n // \"short\" labels would have been more appropriate if they\n // didn't have the \" ago\" part, hence the \"short-time\" above.\n 'narrow', // Since \"narrow\" labels are always present, \"short\" element\n // of this array can be removed.\n 'short']\n};\n//# sourceMappingURL=mini.js.map","function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport mini from './mini';\nexport default _objectSpread({}, mini, {\n // Add \"now\".\n steps: [{\n formatAs: 'now'\n }].concat(mini.steps)\n});\n//# sourceMappingURL=miniNow.js.map","function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport mini from './mini';\nexport default _objectSpread({}, mini, {\n // Skip \"seconds\".\n steps: mini.steps.filter(function (step) {\n return step.formatAs !== 'second';\n })\n});\n//# sourceMappingURL=miniMinute.js.map","function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport miniMinute from './miniMinute';\nexport default _objectSpread({}, miniMinute, {\n // Add \"now\".\n steps: [{\n formatAs: 'now'\n }].concat(miniMinute.steps)\n});\n//# sourceMappingURL=miniMinuteNow.js.map","function _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nimport RelativeTimeFormatPolyfill from 'relative-time-format';\nimport Cache from './cache';\nimport chooseLocale from './locale';\nimport getStep from './steps/getStep';\nimport getStepDenominator from './steps/getStepDenominator';\nimport getTimeToNextUpdate from './steps/getTimeToNextUpdate';\nimport { addLocaleData, getLocaleData } from './LocaleDataStore';\nimport defaultStyle from './style/roundMinute';\nimport getStyleByName from './style/getStyleByName';\nimport { getRoundFunction } from './round'; // Valid time units.\n\nvar UNITS = ['now', // The rest are the same as in `Intl.RelativeTimeFormat`.\n'second', 'minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'];\n\nvar TimeAgo =\n/*#__PURE__*/\nfunction () {\n /**\r\n * @param {(string|string[])} locales=[] - Preferred locales (or locale).\r\n * @param {boolean} [polyfill] — Pass `false` to use native `Intl.RelativeTimeFormat` and `Intl.PluralRules` instead of the polyfills.\r\n */\n function TimeAgo() {\n var locales = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n polyfill = _ref.polyfill;\n\n _classCallCheck(this, TimeAgo);\n\n // Convert `locales` to an array.\n if (typeof locales === 'string') {\n locales = [locales];\n } // Choose the most appropriate locale\n // from the list of `locales` added by the user.\n // For example, new TimeAgo(\"en-US\") -> \"en\".\n\n\n this.locale = chooseLocale(locales.concat(TimeAgo.getDefaultLocale()), getLocaleData);\n\n if (typeof Intl !== 'undefined') {\n // Use `Intl.NumberFormat` for formatting numbers (when available).\n if (Intl.NumberFormat) {\n this.numberFormat = new Intl.NumberFormat(this.locale);\n }\n } // Some people have requested the ability to use native\n // `Intl.RelativeTimeFormat` and `Intl.PluralRules`\n // instead of the polyfills.\n // https://github.com/catamphetamine/javascript-time-ago/issues/21\n\n\n if (polyfill === false) {\n this.IntlRelativeTimeFormat = Intl.RelativeTimeFormat;\n this.IntlPluralRules = Intl.PluralRules;\n } else {\n this.IntlRelativeTimeFormat = RelativeTimeFormatPolyfill;\n this.IntlPluralRules = RelativeTimeFormatPolyfill.PluralRules;\n } // Cache `Intl.RelativeTimeFormat` instance.\n\n\n this.relativeTimeFormatCache = new Cache(); // Cache `Intl.PluralRules` instance.\n\n this.pluralRulesCache = new Cache();\n }\n /**\r\n * Formats relative date/time.\r\n *\r\n * @param {number} [options.now] - Sets the current date timestamp.\r\n *\r\n * @param {boolean} [options.future] — Tells how to format value `0`:\r\n * as \"future\" (`true`) or \"past\" (`false`).\r\n * Is `false` by default, but should have been `true` actually,\r\n * in order to correspond to `Intl.RelativeTimeFormat`\r\n * that uses `future` formatting for `0` unless `-0` is passed.\r\n *\r\n * @param {string} [options.round] — Rounding method. Overrides the style's one.\r\n *\r\n * @param {boolean} [options.getTimeToNextUpdate] — Pass `true` to return `[formattedDate, timeToNextUpdate]` instead of just `formattedDate`.\r\n *\r\n * @return {string} The formatted relative date/time. If no eligible `step` is found, then an empty string is returned.\r\n */\n\n\n _createClass(TimeAgo, [{\n key: \"format\",\n value: function format(input, style, options) {\n if (!options) {\n if (style && !isStyle(style)) {\n options = style;\n style = undefined;\n } else {\n options = {};\n }\n }\n\n if (!style) {\n style = defaultStyle;\n }\n\n if (typeof style === 'string') {\n style = getStyleByName(style);\n }\n\n var timestamp = getTimestamp(input); // Get locale messages for this type of labels.\n // \"flavour\" is a legacy name for \"labels\".\n\n var _this$getLabels = this.getLabels(style.flavour || style.labels),\n labels = _this$getLabels.labels,\n labelsType = _this$getLabels.labelsType;\n\n var now; // Can pass a custom `now`, e.g. for testing purposes.\n //\n // Legacy way was passing `now` in `style`.\n // That way is deprecated.\n\n if (style.now !== undefined) {\n now = style.now;\n } // The new way is passing `now` option to `.format()`.\n\n\n if (now === undefined && options.now !== undefined) {\n now = options.now;\n }\n\n if (now === undefined) {\n now = Date.now();\n } // how much time has passed (in seconds)\n\n\n var secondsPassed = (now - timestamp) / 1000; // in seconds\n\n var future = options.future || secondsPassed < 0;\n var nowLabel = getNowLabel(labels, getLocaleData(this.locale).now, getLocaleData(this.locale).long, future); // `custom` – A function of `{ elapsed, time, date, now, locale }`.\n //\n // Looks like `custom` function is deprecated and will be removed\n // in the next major version.\n //\n // If this function returns a value, then the `.format()` call will return that value.\n // Otherwise the relative date/time is formatted as usual.\n // This feature is currently not used anywhere and is here\n // just for providing the ultimate customization point\n // in case anyone would ever need that. Prefer using\n // `steps[step].format(value, locale)` instead.\n //\n\n if (style.custom) {\n var custom = style.custom({\n now: now,\n date: new Date(timestamp),\n time: timestamp,\n elapsed: secondsPassed,\n locale: this.locale\n });\n\n if (custom !== undefined) {\n // Won't return `timeToNextUpdate` here\n // because `custom()` seems deprecated.\n return custom;\n }\n } // Get the list of available time interval units.\n\n\n var units = getTimeIntervalMeasurementUnits( // Controlling `style.steps` through `style.units` seems to be deprecated:\n // create a new custom `style` instead.\n style.units, labels, nowLabel); // // If no available time unit is suitable, just output an empty string.\n // if (units.length === 0) {\n // \tconsole.error(`None of the \"${units.join(', ')}\" time units have been found in \"${labelsType}\" labels for \"${this.locale}\" locale.`)\n // \treturn ''\n // }\n\n var round = options.round || style.round; // Choose the appropriate time measurement unit\n // and get the corresponding rounded time amount.\n\n var _getStep = getStep( // \"gradation\" is a legacy name for \"steps\".\n // For historical reasons, \"approximate\" steps are used by default.\n // In the next major version, there'll be no default for `steps`.\n style.gradation || style.steps || defaultStyle.steps, secondsPassed, {\n now: now,\n units: units,\n round: round,\n future: future,\n getNextStep: true\n }),\n _getStep2 = _slicedToArray(_getStep, 3),\n prevStep = _getStep2[0],\n step = _getStep2[1],\n nextStep = _getStep2[2];\n\n var formattedDate = this.formatDateForStep(timestamp, step, secondsPassed, {\n labels: labels,\n labelsType: labelsType,\n nowLabel: nowLabel,\n now: now,\n future: future,\n round: round\n }) || '';\n\n if (options.getTimeToNextUpdate) {\n var timeToNextUpdate = getTimeToNextUpdate(timestamp, step, {\n nextStep: nextStep,\n prevStep: prevStep,\n now: now,\n future: future,\n round: round\n });\n return [formattedDate, timeToNextUpdate];\n }\n\n return formattedDate;\n }\n }, {\n key: \"formatDateForStep\",\n value: function formatDateForStep(timestamp, step, secondsPassed, _ref2) {\n var _this = this;\n\n var labels = _ref2.labels,\n labelsType = _ref2.labelsType,\n nowLabel = _ref2.nowLabel,\n now = _ref2.now,\n future = _ref2.future,\n round = _ref2.round;\n\n // If no step matches, then output an empty string.\n if (!step) {\n return;\n }\n\n if (step.format) {\n return step.format(timestamp, this.locale, {\n formatAs: function formatAs(unit, value) {\n // Mimicks `Intl.RelativeTimeFormat.format()`.\n return _this.formatValue(value, unit, {\n labels: labels,\n future: future\n });\n },\n now: now,\n future: future\n });\n } // \"unit\" is now called \"formatAs\".\n\n\n var unit = step.unit || step.formatAs;\n\n if (!unit) {\n throw new Error(\"[javascript-time-ago] Each step must define either `formatAs` or `format()`. Step: \".concat(JSON.stringify(step)));\n } // `Intl.RelativeTimeFormat` doesn't operate in \"now\" units.\n // Therefore, threat \"now\" as a special case.\n\n\n if (unit === 'now') {\n return nowLabel;\n } // Amount in units.\n\n\n var amount = Math.abs(secondsPassed) / getStepDenominator(step); // Apply granularity to the time amount\n // (and fallback to the previous step\n // if the first level of granularity\n // isn't met by this amount)\n //\n // `granularity` — (advanced) Time interval value \"granularity\".\n // For example, it could be set to `5` for minutes to allow only 5-minute increments\n // when formatting time intervals: `0 minutes`, `5 minutes`, `10 minutes`, etc.\n // Perhaps this feature will be removed because there seem to be no use cases\n // of it in the real world.\n //\n\n if (step.granularity) {\n // Recalculate the amount of seconds passed based on granularity\n amount = getRoundFunction(round)(amount / step.granularity) * step.granularity;\n }\n\n var valueForFormatting = -1 * Math.sign(secondsPassed) * getRoundFunction(round)(amount); // By default, this library formats a `0` in \"past\" mode,\n // unless `future: true` option is passed.\n // This is different to `relative-time-format`'s behavior\n // which formats a `0` in \"future\" mode by default, unless it's a `-0`.\n // So, convert `0` to `-0` if `future: true` option wasn't passed.\n // `=== 0` matches both `0` and `-0`.\n\n if (valueForFormatting === 0) {\n if (future) {\n valueForFormatting = 0;\n } else {\n valueForFormatting = -0;\n }\n }\n\n switch (labelsType) {\n case 'long':\n case 'short':\n case 'narrow':\n // Format the amount using `Intl.RelativeTimeFormat`.\n return this.getFormatter(labelsType).format(valueForFormatting, unit);\n\n default:\n // Format the amount.\n // (mimicks `Intl.RelativeTimeFormat` behavior for other time label styles)\n return this.formatValue(valueForFormatting, unit, {\n labels: labels,\n future: future\n });\n }\n }\n /**\r\n * Mimicks what `Intl.RelativeTimeFormat` does for additional locale styles.\r\n * @param {number} value\r\n * @param {string} unit\r\n * @param {object} options.labels — Relative time labels.\r\n * @param {boolean} [options.future] — Tells how to format value `0`: as \"future\" (`true`) or \"past\" (`false`). Is `false` by default, but should have been `true` actually.\r\n * @return {string}\r\n */\n\n }, {\n key: \"formatValue\",\n value: function formatValue(value, unit, _ref3) {\n var labels = _ref3.labels,\n future = _ref3.future;\n return this.getFormattingRule(labels, unit, value, {\n future: future\n }).replace('{0}', this.formatNumber(Math.abs(value)));\n }\n /**\r\n * Returns formatting rule for `value` in `units` (either in past or in future).\r\n * @param {object} formattingRules — Relative time labels for different units.\r\n * @param {string} unit - Time interval measurement unit.\r\n * @param {number} value - Time interval value.\r\n * @param {boolean} [options.future] — Tells how to format value `0`: as \"future\" (`true`) or \"past\" (`false`). Is `false` by default.\r\n * @return {string}\r\n * @example\r\n * // Returns \"{0} days ago\"\r\n * getFormattingRule(en.long, \"day\", -2, 'en')\r\n */\n\n }, {\n key: \"getFormattingRule\",\n value: function getFormattingRule(formattingRules, unit, value, _ref4) {\n var future = _ref4.future;\n // Passing the language is required in order to\n // be able to correctly classify the `value` as a number.\n var locale = this.locale;\n formattingRules = formattingRules[unit]; // Check for a special \"compacted\" rules case:\n // if formatting rules are the same for \"past\" and \"future\",\n // and also for all possible `value`s, then those rules are\n // stored as a single string.\n\n if (typeof formattingRules === 'string') {\n return formattingRules;\n } // Choose either \"past\" or \"future\" based on time `value` sign.\n // If \"past\" is same as \"future\" then they're stored as \"other\".\n // If there's only \"other\" then it's being collapsed.\n\n\n var pastOrFuture = value === 0 ? future ? 'future' : 'past' : value < 0 ? 'past' : 'future';\n var quantifierRules = formattingRules[pastOrFuture] || formattingRules; // Bundle size optimization technique.\n\n if (typeof quantifierRules === 'string') {\n return quantifierRules;\n } // Quantify `value`.\n\n\n var quantifier = this.getPluralRules().select(Math.abs(value)); // \"other\" rule is supposed to always be present.\n // If only \"other\" rule is present then \"rules\" is not an object and is a string.\n\n return quantifierRules[quantifier] || quantifierRules.other;\n }\n /**\r\n * Formats a number into a string.\r\n * Uses `Intl.NumberFormat` when available.\r\n * @param {number} number\r\n * @return {string}\r\n */\n\n }, {\n key: \"formatNumber\",\n value: function formatNumber(number) {\n return this.numberFormat ? this.numberFormat.format(number) : String(number);\n }\n /**\r\n * Returns an `Intl.RelativeTimeFormat` for a given `labelsType`.\r\n * @param {string} labelsType\r\n * @return {object} `Intl.RelativeTimeFormat` instance\r\n */\n\n }, {\n key: \"getFormatter\",\n value: function getFormatter(labelsType) {\n // `Intl.RelativeTimeFormat` instance creation is (hypothetically) assumed\n // a lengthy operation so the instances are cached and reused.\n return this.relativeTimeFormatCache.get(this.locale, labelsType) || this.relativeTimeFormatCache.put(this.locale, labelsType, new this.IntlRelativeTimeFormat(this.locale, {\n style: labelsType\n }));\n }\n /**\r\n * Returns an `Intl.PluralRules` instance.\r\n * @return {object} `Intl.PluralRules` instance\r\n */\n\n }, {\n key: \"getPluralRules\",\n value: function getPluralRules() {\n // `Intl.PluralRules` instance creation is (hypothetically) assumed\n // a lengthy operation so the instances are cached and reused.\n return this.pluralRulesCache.get(this.locale) || this.pluralRulesCache.put(this.locale, new this.IntlPluralRules(this.locale));\n }\n /**\r\n * Gets localized labels for this type of labels.\r\n *\r\n * @param {(string|string[])} labelsType - Relative date/time labels type.\r\n * If it's an array then all label types are tried\r\n * until a suitable one is found.\r\n *\r\n * @returns {Object} Returns an object of shape { labelsType, labels }\r\n */\n\n }, {\n key: \"getLabels\",\n value: function getLabels() {\n var labelsType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n // Convert `labels` to an array.\n if (typeof labelsType === 'string') {\n labelsType = [labelsType];\n } // Supports legacy \"tiny\" and \"mini-time\" label styles.\n\n\n labelsType = labelsType.map(function (labelsType) {\n switch (labelsType) {\n case 'tiny':\n case 'mini-time':\n return 'mini';\n\n default:\n return labelsType;\n }\n }); // \"long\" labels type is the default one.\n // (it's always present for all languages)\n\n labelsType = labelsType.concat('long'); // Find a suitable labels type.\n\n var localeData = getLocaleData(this.locale);\n\n for (var _iterator = labelsType, _isArray = Array.isArray(_iterator), _i2 = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {\n var _ref5;\n\n if (_isArray) {\n if (_i2 >= _iterator.length) break;\n _ref5 = _iterator[_i2++];\n } else {\n _i2 = _iterator.next();\n if (_i2.done) break;\n _ref5 = _i2.value;\n }\n\n var _labelsType = _ref5;\n\n if (localeData[_labelsType]) {\n return {\n labelsType: _labelsType,\n labels: localeData[_labelsType]\n };\n }\n }\n }\n }]);\n\n return TimeAgo;\n}();\n/**\r\n * Default locale global variable.\r\n */\n\n\nexport { TimeAgo as default };\nvar defaultLocale = 'en';\n/**\r\n * Gets default locale.\r\n * @return {string} locale\r\n */\n\nTimeAgo.getDefaultLocale = function () {\n return defaultLocale;\n};\n/**\r\n * Sets default locale.\r\n * @param {string} locale\r\n */\n\n\nTimeAgo.setDefaultLocale = function (locale) {\n return defaultLocale = locale;\n};\n/**\r\n * Adds locale data for a specific locale.\r\n * @param {Object} localeData\r\n */\n\n\nTimeAgo.addDefaultLocale = function (localeData) {\n if (defaultLocaleHasBeenSpecified) {\n return console.error('[javascript-time-ago] `TimeAgo.addDefaultLocale()` can only be called once. To add other locales, use `TimeAgo.addLocale()`.');\n }\n\n defaultLocaleHasBeenSpecified = true;\n TimeAgo.setDefaultLocale(localeData.locale);\n TimeAgo.addLocale(localeData);\n};\n\nvar defaultLocaleHasBeenSpecified;\n/**\r\n * Adds locale data for a specific locale.\r\n * @param {Object} localeData\r\n */\n\nTimeAgo.addLocale = function (localeData) {\n addLocaleData(localeData);\n RelativeTimeFormatPolyfill.addLocale(localeData);\n};\n/**\r\n * (legacy alias)\r\n * Adds locale data for a specific locale.\r\n * @param {Object} localeData\r\n * @deprecated\r\n */\n\n\nTimeAgo.locale = TimeAgo.addLocale;\n/**\r\n * Adds custom labels to locale data.\r\n * @param {string} locale\r\n * @param {string} name\r\n * @param {object} labels\r\n */\n\nTimeAgo.addLabels = function (locale, name, labels) {\n var localeData = getLocaleData(locale);\n\n if (!localeData) {\n addLocaleData({\n locale: locale\n });\n localeData = getLocaleData(locale); // throw new Error(`[javascript-time-ago] No data for locale \"${locale}\"`)\n }\n\n localeData[name] = labels;\n}; // Normalizes `.format()` `time` argument.\n\n\nfunction getTimestamp(input) {\n if (input.constructor === Date || isMockedDate(input)) {\n return input.getTime();\n }\n\n if (typeof input === 'number') {\n return input;\n } // For some weird reason istanbul doesn't see this `throw` covered.\n\n /* istanbul ignore next */\n\n\n throw new Error(\"Unsupported relative time formatter input: \".concat(_typeof(input), \", \").concat(input));\n} // During testing via some testing libraries `Date`s aren't actually `Date`s.\n// https://github.com/catamphetamine/javascript-time-ago/issues/22\n\n\nfunction isMockedDate(object) {\n return _typeof(object) === 'object' && typeof object.getTime === 'function';\n} // Get available time interval measurement units.\n\n\nfunction getTimeIntervalMeasurementUnits(allowedUnits, labels, nowLabel) {\n // Get all time interval measurement units that're available\n // in locale data for a given time labels style.\n var units = Object.keys(labels); // `now` unit is handled separately and is shipped in its own `now.json` file.\n // `now.json` isn't present for all locales, so it could be substituted with\n // \".second.current\".\n // Add `now` unit if it's available in locale data.\n\n if (nowLabel) {\n units.push('now');\n } // If only a specific set of available time measurement units can be used\n // then only those units are allowed (if they're present in locale data).\n\n\n if (allowedUnits) {\n units = allowedUnits.filter(function (unit) {\n return unit === 'now' || units.indexOf(unit) >= 0;\n });\n }\n\n return units;\n}\n\nfunction getNowLabel(labels, nowLabels, longLabels, future) {\n var nowLabel = labels.now || nowLabels && nowLabels.now; // Specific \"now\" message form extended locale data (if present).\n\n if (nowLabel) {\n // Bundle size optimization technique.\n if (typeof nowLabel === 'string') {\n return nowLabel;\n } // Not handling `value === 0` as `localeData.now.current` here\n // because it wouldn't make sense: \"now\" is a moment,\n // so one can't possibly differentiate between a\n // \"previous\" moment, a \"current\" moment and a \"next moment\".\n // It can only be differentiated between \"past\" and \"future\".\n\n\n if (future) {\n return nowLabel.future;\n } else {\n return nowLabel.past;\n }\n } // Use \".second.current\" as \"now\" message.\n\n\n if (longLabels && longLabels.second && longLabels.second.current) {\n return longLabels.second.current;\n }\n}\n\nvar OBJECT_CONSTRUCTOR = {}.constructor;\n\nfunction isObject(object) {\n return _typeof(object) !== undefined && object !== null && object.constructor === OBJECT_CONSTRUCTOR;\n}\n\nfunction isStyle(variable) {\n return typeof variable === 'string' || isStyleObject(variable);\n}\n\nexport function isStyleObject(object) {\n return isObject(object) && (Array.isArray(object.steps) || // `gradation` property is deprecated: it has been renamed to `steps`.\n Array.isArray(object.gradation) || // `flavour` property is deprecated: it has been renamed to `labels`.\n Array.isArray(object.flavour) || typeof object.flavour === 'string' || Array.isArray(object.labels) || typeof object.labels === 'string' || // `units` property is deprecated.\n Array.isArray(object.units) || // `custom` property is deprecated.\n typeof object.custom === 'function');\n}\n//# sourceMappingURL=TimeAgo.js.map","import round from './round';\nimport roundMinute from './roundMinute'; // `approximate` style is deprecated.\n\nimport approximate from './approximate'; // `approximateTime` style is deprecated.\n\nimport approximateTime from './approximateTime';\nimport twitter from './twitter';\nimport twitterNow from './twitterNow';\nimport twitterMinute from './twitterMinute';\nimport twitterMinuteNow from './twitterMinuteNow';\nimport twitterFirstMinute from './twitterFirstMinute';\nimport mini from './mini';\nimport miniNow from './miniNow';\nimport miniMinute from './miniMinute';\nimport miniMinuteNow from './miniMinuteNow';\nexport default function getStyleByName(style) {\n switch (style) {\n // \"default\" style name is deprecated.\n case 'default':\n case 'round':\n return round;\n\n case 'round-minute':\n return roundMinute;\n\n case 'approximate':\n return approximate;\n // \"time\" style name is deprecated.\n\n case 'time':\n case 'approximate-time':\n return approximateTime;\n\n case 'mini':\n return mini;\n\n case 'mini-now':\n return miniNow;\n\n case 'mini-minute':\n return miniMinute;\n\n case 'mini-minute-now':\n return miniMinuteNow;\n\n case 'twitter':\n return twitter;\n\n case 'twitter-now':\n return twitterNow;\n\n case 'twitter-minute':\n return twitterMinute;\n\n case 'twitter-minute-now':\n return twitterMinuteNow;\n\n case 'twitter-first-minute':\n return twitterFirstMinute;\n\n default:\n // For historical reasons, the default style is \"approximate\".\n return approximate;\n }\n}\n//# sourceMappingURL=getStyleByName.js.map"],"names":["defaultLocale","localesData","lowercaseLocaleLookup","getDefaultLocale","resolveLocale","locale","toLowerCase","options","arguments","length","undefined","localeMatcher","resolveLocaleLookup","RangeError","concat","resolvedLocale","resolveLocaleForData","parts","split","pop","_resolvedLocale","join","$","af","n","am","ar","s","String","n100","Number","slice","ast","v0","be","t0","n10","br","n1000000","bs","i","f","i10","i100","f10","f100","cs","cy","da","dsb","dz","fil","fr","ga","gd","he","is","ksh","lt","lv","v","mk","mt","pa","pl","pt","ro","ru","se","si","sl","getPluralRulesLocale","languageTag","match","LANGUAGE_REG_EXP","TypeError","getLanguageFromLanguageTag","as","az","bg","bn","ca","ce","chr","de","ee","el","en","es","et","eu","fa","fi","fo","fur","fy","gl","gu","hi","hr","hsb","hu","hy","ia","id","it","ja","jgo","jv","ka","kea","kk","kl","km","kn","ko","ku","ky","lb","lkt","lo","ml","mn","mr","ms","my","nb","ne","nl","nn","or","ps","sah","sd","sk","so","sq","sr","sv","sw","ta","te","th","ti","tk","to","tr","ug","uk","ur","uz","vi","wae","yi","yue","zh","zu","_defineProperties","target","props","descriptor","enumerable","configurable","writable","Object","defineProperty","key","PluralRules","instance","Constructor","_classCallCheck","this","locales","supportedLocalesOf","type","PluralRuleFunctions","protoProps","staticProps","value","filter","number","prototype","_typeof","obj","Symbol","iterator","constructor","_objectSpread","source","ownKeys","keys","getOwnPropertySymbols","sym","getOwnPropertyDescriptor","forEach","_defineProperty","_slicedToArray","arr","Array","isArray","_arrayWithHoles","_arr","_n","_d","_e","_s","_i","next","done","push","err","_iterableToArrayLimit","_nonIterableRest","UNITS","NUMERIC_VALUES","STYLE_VALUES","LOCALE_MATCHER_VALUES","RelativeTimeFormat","numeric","style","indexOf","Error","pluralRules","console","warn","Intl","NumberFormat","numberFormat","numberingSystem","resolvedOptions","_parseFormatArgs","parseFormatArgs","_parseFormatArgs2","unit","getRule","replace","formatNumber","Math","abs","_parseFormatArgs3","_parseFormatArgs4","rule","valueIndex","formatNumberToParts","map","part","unitMessages","message","_message","current","pluralizedMessages","isNegativeZero","select","other","format","formatToParts","addLocale","localeData","setDefaultLocale","UNIT_ERROR","parseUnit","parseNumber","isFinite","args","Cache","cache","_len","_key","_len2","_key2","lastKey","_i2","chooseLocale","isLocaleDataAvailable","_iterator","_isArray","_ref","intlDateTimeFormatSupported","DateTimeFormat","minute","hour","day","week","month","year","getSecondsInUnit","getStepDenominator","step","factor","formatAs","getRoundFunction","round","floor","getDiffRatioToNextRoundedNumber","getStepMinTime","minTime","prevStep","timestamp","now","future","threshold","default","getMinTimeForUnit","toUnit","fromUnit","_getMinTimeForUnit","test","JSON","stringify","_ref2","fromUnitAmount","toUnitAmount","getStep","steps","secondsPassed","units","getNextStep","getStepIndex","granularity","_getStep","_ref3","filterStepsByUnits","getTimeToNextUpdateForUnit","unitDenominator","preciseAmount","roundedAmount","getDiffToPreviousRoundedNumber","getDiffToNextRoundedNumber","INFINITY","getTimeToNextUpdate","date","nextStep","getTime","_getTimeToNextUpdateForUnit","timeToStepChange","stepChangesAt","currentOrNextStep","getStepChangesAt","getTimeToStepChange","timeToNextUpdate","min","getLocaleData","addLocaleData","labels","threshold_for_now","threshold_for_minute","gradation","approximate","flavour","getDate","Date","formatters","monthAndDay","dayMonth","yearMonthAndDay","getFullYear","dayMonthYear","twitter","twitterMinute","mini","miniMinute","defaultLocaleHasBeenSpecified","TimeAgo","polyfill","IntlRelativeTimeFormat","IntlPluralRules","RelativeTimeFormatPolyfill","relativeTimeFormatCache","pluralRulesCache","input","variable","object","OBJECT_CONSTRUCTOR","isObject","custom","defaultStyle","roundMinute","approximateTime","miniNow","miniMinuteNow","twitterNow","twitterMinuteNow","twitterFirstMinute","getStyleByName","isMockedDate","getTimestamp","_this$getLabels","getLabels","labelsType","nowLabel","nowLabels","longLabels","past","second","getNowLabel","long","time","elapsed","allowedUnits","getTimeIntervalMeasurementUnits","_getStep2","formattedDate","formatDateForStep","_this","formatValue","amount","valueForFormatting","sign","getFormatter","getFormattingRule","formattingRules","_ref4","quantifierRules","getPluralRules","get","put","_ref5","_labelsType","addDefaultLocale","error","addLabels","name"],"mappings":"8PAEA,IAAIA,EAAgB,KAGhBC,EAAc,GAGdC,EAAwB,GACrB,SAASC,IACd,OAAOH,EAoCF,SAASI,EAAcC,GAC5B,OAAIJ,EAAYI,GACPA,EAGLH,EAAsBG,EAAOC,eACxBJ,EAAsBG,EAAOC,oBADtC,ECrCa,SAASF,EAAcC,GACpC,IAAIE,EAAUC,UAAUC,OAAS,QAAsBC,IAAjBF,UAAU,GAAmBA,UAAU,GAAK,GAC9EG,EAAgBJ,EAAQI,eAAiB,SAE7C,OAAQA,GACN,IAAK,SAKL,IAAK,WAEH,OAAOC,EAAoBP,GAE7B,QACE,MAAM,IAAI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