cdn.js 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494
  1. (() => {
  2. var _window$dateFns;function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}var __defProp = Object.defineProperty;
  3. var __export = function __export(target, all) {
  4. for (var name in all)
  5. __defProp(target, name, {
  6. get: all[name],
  7. enumerable: true,
  8. configurable: true,
  9. set: function set(newValue) {return all[name] = function () {return newValue;};}
  10. });
  11. };
  12. // lib/locale/eo/_lib/formatDistance.js
  13. var formatDistanceLocale = {
  14. lessThanXSeconds: {
  15. one: "malpli ol sekundo",
  16. other: "malpli ol {{count}} sekundoj"
  17. },
  18. xSeconds: {
  19. one: "1 sekundo",
  20. other: "{{count}} sekundoj"
  21. },
  22. halfAMinute: "duonminuto",
  23. lessThanXMinutes: {
  24. one: "malpli ol minuto",
  25. other: "malpli ol {{count}} minutoj"
  26. },
  27. xMinutes: {
  28. one: "1 minuto",
  29. other: "{{count}} minutoj"
  30. },
  31. aboutXHours: {
  32. one: "proksimume 1 horo",
  33. other: "proksimume {{count}} horoj"
  34. },
  35. xHours: {
  36. one: "1 horo",
  37. other: "{{count}} horoj"
  38. },
  39. xDays: {
  40. one: "1 tago",
  41. other: "{{count}} tagoj"
  42. },
  43. aboutXMonths: {
  44. one: "proksimume 1 monato",
  45. other: "proksimume {{count}} monatoj"
  46. },
  47. xWeeks: {
  48. one: "1 semajno",
  49. other: "{{count}} semajnoj"
  50. },
  51. aboutXWeeks: {
  52. one: "proksimume 1 semajno",
  53. other: "proksimume {{count}} semajnoj"
  54. },
  55. xMonths: {
  56. one: "1 monato",
  57. other: "{{count}} monatoj"
  58. },
  59. aboutXYears: {
  60. one: "proksimume 1 jaro",
  61. other: "proksimume {{count}} jaroj"
  62. },
  63. xYears: {
  64. one: "1 jaro",
  65. other: "{{count}} jaroj"
  66. },
  67. overXYears: {
  68. one: "pli ol 1 jaro",
  69. other: "pli ol {{count}} jaroj"
  70. },
  71. almostXYears: {
  72. one: "preska\u016D 1 jaro",
  73. other: "preska\u016D {{count}} jaroj"
  74. }
  75. };
  76. var formatDistance = function formatDistance(token, count, options) {
  77. var result;
  78. var tokenValue = formatDistanceLocale[token];
  79. if (typeof tokenValue === "string") {
  80. result = tokenValue;
  81. } else if (count === 1) {
  82. result = tokenValue.one;
  83. } else {
  84. result = tokenValue.other.replace("{{count}}", String(count));
  85. }
  86. if (options !== null && options !== void 0 && options.addSuffix) {
  87. if (options !== null && options !== void 0 && options.comparison && options.comparison > 0) {
  88. return "post " + result;
  89. } else {
  90. return "anta\u016D " + result;
  91. }
  92. }
  93. return result;
  94. };
  95. // lib/locale/_lib/buildFormatLongFn.js
  96. function buildFormatLongFn(args) {
  97. return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  98. var width = options.width ? String(options.width) : args.defaultWidth;
  99. var format = args.formats[width] || args.formats[args.defaultWidth];
  100. return format;
  101. };
  102. }
  103. // lib/locale/eo/_lib/formatLong.js
  104. var dateFormats = {
  105. full: "EEEE, do 'de' MMMM y",
  106. long: "y-MMMM-dd",
  107. medium: "y-MMM-dd",
  108. short: "yyyy-MM-dd"
  109. };
  110. var timeFormats = {
  111. full: "Ho 'horo kaj' m:ss zzzz",
  112. long: "HH:mm:ss z",
  113. medium: "HH:mm:ss",
  114. short: "HH:mm"
  115. };
  116. var dateTimeFormats = {
  117. any: "{{date}} {{time}}"
  118. };
  119. var formatLong = {
  120. date: buildFormatLongFn({
  121. formats: dateFormats,
  122. defaultWidth: "full"
  123. }),
  124. time: buildFormatLongFn({
  125. formats: timeFormats,
  126. defaultWidth: "full"
  127. }),
  128. dateTime: buildFormatLongFn({
  129. formats: dateTimeFormats,
  130. defaultWidth: "any"
  131. })
  132. };
  133. // lib/locale/eo/_lib/formatRelative.js
  134. var formatRelativeLocale = {
  135. lastWeek: "'pasinta' eeee 'je' p",
  136. yesterday: "'hiera\u016D je' p",
  137. today: "'hodia\u016D je' p",
  138. tomorrow: "'morga\u016D je' p",
  139. nextWeek: "eeee 'je' p",
  140. other: "P"
  141. };
  142. var formatRelative = function formatRelative(token, _date, _baseDate, _options) {return formatRelativeLocale[token];};
  143. // lib/locale/_lib/buildLocalizeFn.js
  144. function buildLocalizeFn(args) {
  145. return function (value, options) {
  146. var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
  147. var valuesArray;
  148. if (context === "formatting" && args.formattingValues) {
  149. var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
  150. var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
  151. valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
  152. } else {
  153. var _defaultWidth = args.defaultWidth;
  154. var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
  155. valuesArray = args.values[_width] || args.values[_defaultWidth];
  156. }
  157. var index = args.argumentCallback ? args.argumentCallback(value) : value;
  158. return valuesArray[index];
  159. };
  160. }
  161. // lib/locale/eo/_lib/localize.js
  162. var eraValues = {
  163. narrow: ["aK", "pK"],
  164. abbreviated: ["a.K.E.", "p.K.E."],
  165. wide: ["anta\u016D Komuna Erao", "Komuna Erao"]
  166. };
  167. var quarterValues = {
  168. narrow: ["1", "2", "3", "4"],
  169. abbreviated: ["K1", "K2", "K3", "K4"],
  170. wide: [
  171. "1-a kvaronjaro",
  172. "2-a kvaronjaro",
  173. "3-a kvaronjaro",
  174. "4-a kvaronjaro"]
  175. };
  176. var monthValues = {
  177. narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
  178. abbreviated: [
  179. "jan",
  180. "feb",
  181. "mar",
  182. "apr",
  183. "maj",
  184. "jun",
  185. "jul",
  186. "a\u016Dg",
  187. "sep",
  188. "okt",
  189. "nov",
  190. "dec"],
  191. wide: [
  192. "januaro",
  193. "februaro",
  194. "marto",
  195. "aprilo",
  196. "majo",
  197. "junio",
  198. "julio",
  199. "a\u016Dgusto",
  200. "septembro",
  201. "oktobro",
  202. "novembro",
  203. "decembro"]
  204. };
  205. var dayValues = {
  206. narrow: ["D", "L", "M", "M", "\u0134", "V", "S"],
  207. short: ["di", "lu", "ma", "me", "\u0135a", "ve", "sa"],
  208. abbreviated: ["dim", "lun", "mar", "mer", "\u0135a\u016D", "ven", "sab"],
  209. wide: [
  210. "diman\u0109o",
  211. "lundo",
  212. "mardo",
  213. "merkredo",
  214. "\u0135a\u016Ddo",
  215. "vendredo",
  216. "sabato"]
  217. };
  218. var dayPeriodValues = {
  219. narrow: {
  220. am: "a",
  221. pm: "p",
  222. midnight: "noktomezo",
  223. noon: "tagmezo",
  224. morning: "matene",
  225. afternoon: "posttagmeze",
  226. evening: "vespere",
  227. night: "nokte"
  228. },
  229. abbreviated: {
  230. am: "a.t.m.",
  231. pm: "p.t.m.",
  232. midnight: "noktomezo",
  233. noon: "tagmezo",
  234. morning: "matene",
  235. afternoon: "posttagmeze",
  236. evening: "vespere",
  237. night: "nokte"
  238. },
  239. wide: {
  240. am: "anta\u016Dtagmeze",
  241. pm: "posttagmeze",
  242. midnight: "noktomezo",
  243. noon: "tagmezo",
  244. morning: "matene",
  245. afternoon: "posttagmeze",
  246. evening: "vespere",
  247. night: "nokte"
  248. }
  249. };
  250. var ordinalNumber = function ordinalNumber(dirtyNumber) {
  251. var number = Number(dirtyNumber);
  252. return number + "-a";
  253. };
  254. var localize = {
  255. ordinalNumber: ordinalNumber,
  256. era: buildLocalizeFn({
  257. values: eraValues,
  258. defaultWidth: "wide"
  259. }),
  260. quarter: buildLocalizeFn({
  261. values: quarterValues,
  262. defaultWidth: "wide",
  263. argumentCallback: function argumentCallback(quarter) {
  264. return Number(quarter) - 1;
  265. }
  266. }),
  267. month: buildLocalizeFn({
  268. values: monthValues,
  269. defaultWidth: "wide"
  270. }),
  271. day: buildLocalizeFn({
  272. values: dayValues,
  273. defaultWidth: "wide"
  274. }),
  275. dayPeriod: buildLocalizeFn({
  276. values: dayPeriodValues,
  277. defaultWidth: "wide"
  278. })
  279. };
  280. // lib/locale/_lib/buildMatchPatternFn.js
  281. function buildMatchPatternFn(args) {
  282. return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  283. var matchResult = string.match(args.matchPattern);
  284. if (!matchResult)
  285. return null;
  286. var matchedString = matchResult[0];
  287. var parseResult = string.match(args.parsePattern);
  288. if (!parseResult)
  289. return null;
  290. var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
  291. value = options.valueCallback ? options.valueCallback(value) : value;
  292. var rest = string.slice(matchedString.length);
  293. return { value: value, rest: rest };
  294. };
  295. }
  296. // lib/locale/_lib/buildMatchFn.js
  297. function buildMatchFn(args) {
  298. return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  299. var width = options.width;
  300. var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
  301. var matchResult = string.match(matchPattern);
  302. if (!matchResult) {
  303. return null;
  304. }
  305. var matchedString = matchResult[0];
  306. var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
  307. var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
  308. var value;
  309. value = args.valueCallback ? args.valueCallback(key) : key;
  310. value = options.valueCallback ? options.valueCallback(value) : value;
  311. var rest = string.slice(matchedString.length);
  312. return { value: value, rest: rest };
  313. };
  314. }
  315. function findKey(object, predicate) {
  316. for (var key in object) {
  317. if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
  318. return key;
  319. }
  320. }
  321. return;
  322. }
  323. function findIndex(array, predicate) {
  324. for (var key = 0; key < array.length; key++) {
  325. if (predicate(array[key])) {
  326. return key;
  327. }
  328. }
  329. return;
  330. }
  331. // lib/locale/eo/_lib/match.js
  332. var matchOrdinalNumberPattern = /^(\d+)(-?a)?/i;
  333. var parseOrdinalNumberPattern = /\d+/i;
  334. var matchEraPatterns = {
  335. narrow: /^([ap]k)/i,
  336. abbreviated: /^([ap]\.?\s?k\.?\s?e\.?)/i,
  337. wide: /^((antaǔ |post )?komuna erao)/i
  338. };
  339. var parseEraPatterns = {
  340. any: [/^a/i, /^[kp]/i]
  341. };
  342. var matchQuarterPatterns = {
  343. narrow: /^[1234]/i,
  344. abbreviated: /^k[1234]/i,
  345. wide: /^[1234](-?a)? kvaronjaro/i
  346. };
  347. var parseQuarterPatterns = {
  348. any: [/1/i, /2/i, /3/i, /4/i]
  349. };
  350. var matchMonthPatterns = {
  351. narrow: /^[jfmasond]/i,
  352. abbreviated: /^(jan|feb|mar|apr|maj|jun|jul|a(ŭ|ux|uh|u)g|sep|okt|nov|dec)/i,
  353. wide: /^(januaro|februaro|marto|aprilo|majo|junio|julio|a(ŭ|ux|uh|u)gusto|septembro|oktobro|novembro|decembro)/i
  354. };
  355. var parseMonthPatterns = {
  356. narrow: [
  357. /^j/i,
  358. /^f/i,
  359. /^m/i,
  360. /^a/i,
  361. /^m/i,
  362. /^j/i,
  363. /^j/i,
  364. /^a/i,
  365. /^s/i,
  366. /^o/i,
  367. /^n/i,
  368. /^d/i],
  369. any: [
  370. /^ja/i,
  371. /^f/i,
  372. /^mar/i,
  373. /^ap/i,
  374. /^maj/i,
  375. /^jun/i,
  376. /^jul/i,
  377. /^a(u|ŭ)/i,
  378. /^s/i,
  379. /^o/i,
  380. /^n/i,
  381. /^d/i]
  382. };
  383. var matchDayPatterns = {
  384. narrow: /^[dlmĵjvs]/i,
  385. short: /^(di|lu|ma|me|(ĵ|jx|jh|j)a|ve|sa)/i,
  386. abbreviated: /^(dim|lun|mar|mer|(ĵ|jx|jh|j)a(ŭ|ux|uh|u)|ven|sab)/i,
  387. wide: /^(diman(ĉ|cx|ch|c)o|lundo|mardo|merkredo|(ĵ|jx|jh|j)a(ŭ|ux|uh|u)do|vendredo|sabato)/i
  388. };
  389. var parseDayPatterns = {
  390. narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^(j|ĵ)/i, /^v/i, /^s/i],
  391. any: [/^d/i, /^l/i, /^ma/i, /^me/i, /^(j|ĵ)/i, /^v/i, /^s/i]
  392. };
  393. var matchDayPeriodPatterns = {
  394. narrow: /^([ap]|(posttagmez|noktomez|tagmez|maten|vesper|nokt)[eo])/i,
  395. abbreviated: /^([ap][.\s]?t[.\s]?m[.\s]?|(posttagmez|noktomez|tagmez|maten|vesper|nokt)[eo])/i,
  396. wide: /^(anta(ŭ|ux)tagmez|posttagmez|noktomez|tagmez|maten|vesper|nokt)[eo]/i
  397. };
  398. var parseDayPeriodPatterns = {
  399. any: {
  400. am: /^a/i,
  401. pm: /^p/i,
  402. midnight: /^noktom/i,
  403. noon: /^t/i,
  404. morning: /^m/i,
  405. afternoon: /^posttagmeze/i,
  406. evening: /^v/i,
  407. night: /^n/i
  408. }
  409. };
  410. var match = {
  411. ordinalNumber: buildMatchPatternFn({
  412. matchPattern: matchOrdinalNumberPattern,
  413. parsePattern: parseOrdinalNumberPattern,
  414. valueCallback: function valueCallback(value) {
  415. return parseInt(value, 10);
  416. }
  417. }),
  418. era: buildMatchFn({
  419. matchPatterns: matchEraPatterns,
  420. defaultMatchWidth: "wide",
  421. parsePatterns: parseEraPatterns,
  422. defaultParseWidth: "any"
  423. }),
  424. quarter: buildMatchFn({
  425. matchPatterns: matchQuarterPatterns,
  426. defaultMatchWidth: "wide",
  427. parsePatterns: parseQuarterPatterns,
  428. defaultParseWidth: "any",
  429. valueCallback: function valueCallback(index) {
  430. return index + 1;
  431. }
  432. }),
  433. month: buildMatchFn({
  434. matchPatterns: matchMonthPatterns,
  435. defaultMatchWidth: "wide",
  436. parsePatterns: parseMonthPatterns,
  437. defaultParseWidth: "any"
  438. }),
  439. day: buildMatchFn({
  440. matchPatterns: matchDayPatterns,
  441. defaultMatchWidth: "wide",
  442. parsePatterns: parseDayPatterns,
  443. defaultParseWidth: "any"
  444. }),
  445. dayPeriod: buildMatchFn({
  446. matchPatterns: matchDayPeriodPatterns,
  447. defaultMatchWidth: "wide",
  448. parsePatterns: parseDayPeriodPatterns,
  449. defaultParseWidth: "any"
  450. })
  451. };
  452. // lib/locale/eo.js
  453. var eo = {
  454. code: "eo",
  455. formatDistance: formatDistance,
  456. formatLong: formatLong,
  457. formatRelative: formatRelative,
  458. localize: localize,
  459. match: match,
  460. options: {
  461. weekStartsOn: 1,
  462. firstWeekContainsDate: 4
  463. }
  464. };
  465. // lib/locale/eo/cdn.js
  466. window.dateFns = _objectSpread(_objectSpread({},
  467. window.dateFns), {}, {
  468. locale: _objectSpread(_objectSpread({}, (_window$dateFns =
  469. window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
  470. eo: eo }) });
  471. //# debugId=9C855B5FFB38286264756E2164756E21
  472. //# sourceMappingURL=cdn.js.map
  473. })();