cdn.js 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642
  1. (() => {
  2. var _window$dateFns;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);}function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(o);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];return arr2;}function _iterableToArrayLimit(r, l) {var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];if (null != t) {var e,n,i,u,a = [],f = !0,o = !1;try {if (i = (t = t.call(r)).next, 0 === l) {if (Object(t) !== t) return;f = !1;} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);} catch (r) {o = !0, n = r;} finally {try {if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;} finally {if (o) throw n;}}return a;}}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}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);}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/it/_lib/formatDistance.js
  13. var formatDistanceLocale = {
  14. lessThanXSeconds: {
  15. one: "meno di un secondo",
  16. other: "meno di {{count}} secondi"
  17. },
  18. xSeconds: {
  19. one: "un secondo",
  20. other: "{{count}} secondi"
  21. },
  22. halfAMinute: "alcuni secondi",
  23. lessThanXMinutes: {
  24. one: "meno di un minuto",
  25. other: "meno di {{count}} minuti"
  26. },
  27. xMinutes: {
  28. one: "un minuto",
  29. other: "{{count}} minuti"
  30. },
  31. aboutXHours: {
  32. one: "circa un'ora",
  33. other: "circa {{count}} ore"
  34. },
  35. xHours: {
  36. one: "un'ora",
  37. other: "{{count}} ore"
  38. },
  39. xDays: {
  40. one: "un giorno",
  41. other: "{{count}} giorni"
  42. },
  43. aboutXWeeks: {
  44. one: "circa una settimana",
  45. other: "circa {{count}} settimane"
  46. },
  47. xWeeks: {
  48. one: "una settimana",
  49. other: "{{count}} settimane"
  50. },
  51. aboutXMonths: {
  52. one: "circa un mese",
  53. other: "circa {{count}} mesi"
  54. },
  55. xMonths: {
  56. one: "un mese",
  57. other: "{{count}} mesi"
  58. },
  59. aboutXYears: {
  60. one: "circa un anno",
  61. other: "circa {{count}} anni"
  62. },
  63. xYears: {
  64. one: "un anno",
  65. other: "{{count}} anni"
  66. },
  67. overXYears: {
  68. one: "pi\xF9 di un anno",
  69. other: "pi\xF9 di {{count}} anni"
  70. },
  71. almostXYears: {
  72. one: "quasi un anno",
  73. other: "quasi {{count}} anni"
  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}}", count.toString());
  85. }
  86. if (options !== null && options !== void 0 && options.addSuffix) {
  87. if (options.comparison && options.comparison > 0) {
  88. return "tra " + result;
  89. } else {
  90. return result + " fa";
  91. }
  92. }
  93. return result;
  94. };
  95. // lib/constants.js
  96. var daysInWeek = 7;
  97. var daysInYear = 365.2425;
  98. var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;
  99. var minTime = -maxTime;
  100. var millisecondsInWeek = 604800000;
  101. var millisecondsInDay = 86400000;
  102. var millisecondsInMinute = 60000;
  103. var millisecondsInHour = 3600000;
  104. var millisecondsInSecond = 1000;
  105. var minutesInYear = 525600;
  106. var minutesInMonth = 43200;
  107. var minutesInDay = 1440;
  108. var minutesInHour = 60;
  109. var monthsInQuarter = 3;
  110. var monthsInYear = 12;
  111. var quartersInYear = 4;
  112. var secondsInHour = 3600;
  113. var secondsInMinute = 60;
  114. var secondsInDay = secondsInHour * 24;
  115. var secondsInWeek = secondsInDay * 7;
  116. var secondsInYear = secondsInDay * daysInYear;
  117. var secondsInMonth = secondsInYear / 12;
  118. var secondsInQuarter = secondsInMonth * 3;
  119. var constructFromSymbol = Symbol.for("constructDateFrom");
  120. // lib/constructFrom.js
  121. function constructFrom(date, value) {
  122. if (typeof date === "function")
  123. return date(value);
  124. if (date && _typeof(date) === "object" && constructFromSymbol in date)
  125. return date[constructFromSymbol](value);
  126. if (date instanceof Date)
  127. return new date.constructor(value);
  128. return new Date(value);
  129. }
  130. // lib/_lib/normalizeDates.js
  131. function normalizeDates(context) {for (var _len = arguments.length, dates = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {dates[_key - 1] = arguments[_key];}
  132. var normalize = constructFrom.bind(null, context || dates.find(function (date) {return _typeof(date) === "object";}));
  133. return dates.map(normalize);
  134. }
  135. // lib/_lib/defaultOptions.js
  136. function getDefaultOptions() {
  137. return defaultOptions;
  138. }
  139. function setDefaultOptions(newOptions) {
  140. defaultOptions = newOptions;
  141. }
  142. var defaultOptions = {};
  143. // lib/toDate.js
  144. function toDate(argument, context) {
  145. return constructFrom(context || argument, argument);
  146. }
  147. // lib/startOfWeek.js
  148. function startOfWeek(date, options) {var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _defaultOptions3$loca;
  149. var defaultOptions3 = getDefaultOptions();
  150. var weekStartsOn = (_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 || (_options$locale = options.locale) === null || _options$locale === void 0 || (_options$locale = _options$locale.options) === null || _options$locale === void 0 ? void 0 : _options$locale.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions3.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions3$loca = defaultOptions3.locale) === null || _defaultOptions3$loca === void 0 || (_defaultOptions3$loca = _defaultOptions3$loca.options) === null || _defaultOptions3$loca === void 0 ? void 0 : _defaultOptions3$loca.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0;
  151. var _date = toDate(date, options === null || options === void 0 ? void 0 : options.in);
  152. var day = _date.getDay();
  153. var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
  154. _date.setDate(_date.getDate() - diff);
  155. _date.setHours(0, 0, 0, 0);
  156. return _date;
  157. }
  158. // lib/isSameWeek.js
  159. function isSameWeek(laterDate, earlierDate, options) {
  160. var _normalizeDates = normalizeDates(options === null || options === void 0 ? void 0 : options.in, laterDate, earlierDate),_normalizeDates2 = _slicedToArray(_normalizeDates, 2),laterDate_ = _normalizeDates2[0],earlierDate_ = _normalizeDates2[1];
  161. return +startOfWeek(laterDate_, options) === +startOfWeek(earlierDate_, options);
  162. }
  163. // lib/locale/it/_lib/formatRelative.js
  164. function _lastWeek(day) {
  165. switch (day) {
  166. case 0:
  167. return "'domenica scorsa alle' p";
  168. default:
  169. return "'" + weekdays[day] + " scorso alle' p";
  170. }
  171. }
  172. function thisWeek(day) {
  173. return "'" + weekdays[day] + " alle' p";
  174. }
  175. function _nextWeek(day) {
  176. switch (day) {
  177. case 0:
  178. return "'domenica prossima alle' p";
  179. default:
  180. return "'" + weekdays[day] + " prossimo alle' p";
  181. }
  182. }
  183. var weekdays = [
  184. "domenica",
  185. "luned\xEC",
  186. "marted\xEC",
  187. "mercoled\xEC",
  188. "gioved\xEC",
  189. "venerd\xEC",
  190. "sabato"];
  191. var formatRelativeLocale = {
  192. lastWeek: function lastWeek(date, baseDate, options) {
  193. var day = date.getDay();
  194. if (isSameWeek(date, baseDate, options)) {
  195. return thisWeek(day);
  196. } else {
  197. return _lastWeek(day);
  198. }
  199. },
  200. yesterday: "'ieri alle' p",
  201. today: "'oggi alle' p",
  202. tomorrow: "'domani alle' p",
  203. nextWeek: function nextWeek(date, baseDate, options) {
  204. var day = date.getDay();
  205. if (isSameWeek(date, baseDate, options)) {
  206. return thisWeek(day);
  207. } else {
  208. return _nextWeek(day);
  209. }
  210. },
  211. other: "P"
  212. };
  213. var formatRelative = function formatRelative(token, date, baseDate, options) {
  214. var format = formatRelativeLocale[token];
  215. if (typeof format === "function") {
  216. return format(date, baseDate, options);
  217. }
  218. return format;
  219. };
  220. // lib/locale/_lib/buildLocalizeFn.js
  221. function buildLocalizeFn(args) {
  222. return function (value, options) {
  223. var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
  224. var valuesArray;
  225. if (context === "formatting" && args.formattingValues) {
  226. var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
  227. var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
  228. valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
  229. } else {
  230. var _defaultWidth = args.defaultWidth;
  231. var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
  232. valuesArray = args.values[_width] || args.values[_defaultWidth];
  233. }
  234. var index = args.argumentCallback ? args.argumentCallback(value) : value;
  235. return valuesArray[index];
  236. };
  237. }
  238. // lib/locale/it/_lib/localize.js
  239. var eraValues = {
  240. narrow: ["aC", "dC"],
  241. abbreviated: ["a.C.", "d.C."],
  242. wide: ["avanti Cristo", "dopo Cristo"]
  243. };
  244. var quarterValues = {
  245. narrow: ["1", "2", "3", "4"],
  246. abbreviated: ["T1", "T2", "T3", "T4"],
  247. wide: ["1\xBA trimestre", "2\xBA trimestre", "3\xBA trimestre", "4\xBA trimestre"]
  248. };
  249. var monthValues = {
  250. narrow: ["G", "F", "M", "A", "M", "G", "L", "A", "S", "O", "N", "D"],
  251. abbreviated: [
  252. "gen",
  253. "feb",
  254. "mar",
  255. "apr",
  256. "mag",
  257. "giu",
  258. "lug",
  259. "ago",
  260. "set",
  261. "ott",
  262. "nov",
  263. "dic"],
  264. wide: [
  265. "gennaio",
  266. "febbraio",
  267. "marzo",
  268. "aprile",
  269. "maggio",
  270. "giugno",
  271. "luglio",
  272. "agosto",
  273. "settembre",
  274. "ottobre",
  275. "novembre",
  276. "dicembre"]
  277. };
  278. var dayValues = {
  279. narrow: ["D", "L", "M", "M", "G", "V", "S"],
  280. short: ["dom", "lun", "mar", "mer", "gio", "ven", "sab"],
  281. abbreviated: ["dom", "lun", "mar", "mer", "gio", "ven", "sab"],
  282. wide: [
  283. "domenica",
  284. "luned\xEC",
  285. "marted\xEC",
  286. "mercoled\xEC",
  287. "gioved\xEC",
  288. "venerd\xEC",
  289. "sabato"]
  290. };
  291. var dayPeriodValues = {
  292. narrow: {
  293. am: "m.",
  294. pm: "p.",
  295. midnight: "mezzanotte",
  296. noon: "mezzogiorno",
  297. morning: "mattina",
  298. afternoon: "pomeriggio",
  299. evening: "sera",
  300. night: "notte"
  301. },
  302. abbreviated: {
  303. am: "AM",
  304. pm: "PM",
  305. midnight: "mezzanotte",
  306. noon: "mezzogiorno",
  307. morning: "mattina",
  308. afternoon: "pomeriggio",
  309. evening: "sera",
  310. night: "notte"
  311. },
  312. wide: {
  313. am: "AM",
  314. pm: "PM",
  315. midnight: "mezzanotte",
  316. noon: "mezzogiorno",
  317. morning: "mattina",
  318. afternoon: "pomeriggio",
  319. evening: "sera",
  320. night: "notte"
  321. }
  322. };
  323. var formattingDayPeriodValues = {
  324. narrow: {
  325. am: "m.",
  326. pm: "p.",
  327. midnight: "mezzanotte",
  328. noon: "mezzogiorno",
  329. morning: "di mattina",
  330. afternoon: "del pomeriggio",
  331. evening: "di sera",
  332. night: "di notte"
  333. },
  334. abbreviated: {
  335. am: "AM",
  336. pm: "PM",
  337. midnight: "mezzanotte",
  338. noon: "mezzogiorno",
  339. morning: "di mattina",
  340. afternoon: "del pomeriggio",
  341. evening: "di sera",
  342. night: "di notte"
  343. },
  344. wide: {
  345. am: "AM",
  346. pm: "PM",
  347. midnight: "mezzanotte",
  348. noon: "mezzogiorno",
  349. morning: "di mattina",
  350. afternoon: "del pomeriggio",
  351. evening: "di sera",
  352. night: "di notte"
  353. }
  354. };
  355. var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
  356. var number = Number(dirtyNumber);
  357. return String(number);
  358. };
  359. var localize = {
  360. ordinalNumber: ordinalNumber,
  361. era: buildLocalizeFn({
  362. values: eraValues,
  363. defaultWidth: "wide"
  364. }),
  365. quarter: buildLocalizeFn({
  366. values: quarterValues,
  367. defaultWidth: "wide",
  368. argumentCallback: function argumentCallback(quarter) {return quarter - 1;}
  369. }),
  370. month: buildLocalizeFn({
  371. values: monthValues,
  372. defaultWidth: "wide"
  373. }),
  374. day: buildLocalizeFn({
  375. values: dayValues,
  376. defaultWidth: "wide"
  377. }),
  378. dayPeriod: buildLocalizeFn({
  379. values: dayPeriodValues,
  380. defaultWidth: "wide",
  381. formattingValues: formattingDayPeriodValues,
  382. defaultFormattingWidth: "wide"
  383. })
  384. };
  385. // lib/locale/_lib/buildMatchFn.js
  386. function buildMatchFn(args) {
  387. return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  388. var width = options.width;
  389. var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
  390. var matchResult = string.match(matchPattern);
  391. if (!matchResult) {
  392. return null;
  393. }
  394. var matchedString = matchResult[0];
  395. var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
  396. var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
  397. var value;
  398. value = args.valueCallback ? args.valueCallback(key) : key;
  399. value = options.valueCallback ? options.valueCallback(value) : value;
  400. var rest = string.slice(matchedString.length);
  401. return { value: value, rest: rest };
  402. };
  403. }
  404. function findKey(object, predicate) {
  405. for (var key in object) {
  406. if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
  407. return key;
  408. }
  409. }
  410. return;
  411. }
  412. function findIndex(array, predicate) {
  413. for (var key = 0; key < array.length; key++) {
  414. if (predicate(array[key])) {
  415. return key;
  416. }
  417. }
  418. return;
  419. }
  420. // lib/locale/_lib/buildMatchPatternFn.js
  421. function buildMatchPatternFn(args) {
  422. return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  423. var matchResult = string.match(args.matchPattern);
  424. if (!matchResult)
  425. return null;
  426. var matchedString = matchResult[0];
  427. var parseResult = string.match(args.parsePattern);
  428. if (!parseResult)
  429. return null;
  430. var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
  431. value = options.valueCallback ? options.valueCallback(value) : value;
  432. var rest = string.slice(matchedString.length);
  433. return { value: value, rest: rest };
  434. };
  435. }
  436. // lib/locale/it/_lib/match.js
  437. var matchOrdinalNumberPattern = /^(\d+)(º)?/i;
  438. var parseOrdinalNumberPattern = /\d+/i;
  439. var matchEraPatterns = {
  440. narrow: /^(aC|dC)/i,
  441. abbreviated: /^(a\.?\s?C\.?|a\.?\s?e\.?\s?v\.?|d\.?\s?C\.?|e\.?\s?v\.?)/i,
  442. wide: /^(avanti Cristo|avanti Era Volgare|dopo Cristo|Era Volgare)/i
  443. };
  444. var parseEraPatterns = {
  445. any: [/^a/i, /^(d|e)/i]
  446. };
  447. var matchQuarterPatterns = {
  448. narrow: /^[1234]/i,
  449. abbreviated: /^t[1234]/i,
  450. wide: /^[1234](º)? trimestre/i
  451. };
  452. var parseQuarterPatterns = {
  453. any: [/1/i, /2/i, /3/i, /4/i]
  454. };
  455. var matchMonthPatterns = {
  456. narrow: /^[gfmalsond]/i,
  457. abbreviated: /^(gen|feb|mar|apr|mag|giu|lug|ago|set|ott|nov|dic)/i,
  458. wide: /^(gennaio|febbraio|marzo|aprile|maggio|giugno|luglio|agosto|settembre|ottobre|novembre|dicembre)/i
  459. };
  460. var parseMonthPatterns = {
  461. narrow: [
  462. /^g/i,
  463. /^f/i,
  464. /^m/i,
  465. /^a/i,
  466. /^m/i,
  467. /^g/i,
  468. /^l/i,
  469. /^a/i,
  470. /^s/i,
  471. /^o/i,
  472. /^n/i,
  473. /^d/i],
  474. any: [
  475. /^ge/i,
  476. /^f/i,
  477. /^mar/i,
  478. /^ap/i,
  479. /^mag/i,
  480. /^gi/i,
  481. /^l/i,
  482. /^ag/i,
  483. /^s/i,
  484. /^o/i,
  485. /^n/i,
  486. /^d/i]
  487. };
  488. var matchDayPatterns = {
  489. narrow: /^[dlmgvs]/i,
  490. short: /^(do|lu|ma|me|gi|ve|sa)/i,
  491. abbreviated: /^(dom|lun|mar|mer|gio|ven|sab)/i,
  492. wide: /^(domenica|luned[i|ì]|marted[i|ì]|mercoled[i|ì]|gioved[i|ì]|venerd[i|ì]|sabato)/i
  493. };
  494. var parseDayPatterns = {
  495. narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^g/i, /^v/i, /^s/i],
  496. any: [/^d/i, /^l/i, /^ma/i, /^me/i, /^g/i, /^v/i, /^s/i]
  497. };
  498. var matchDayPeriodPatterns = {
  499. narrow: /^(a|m\.|p|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i,
  500. any: /^([ap]\.?\s?m\.?|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i
  501. };
  502. var parseDayPeriodPatterns = {
  503. any: {
  504. am: /^a/i,
  505. pm: /^p/i,
  506. midnight: /^mezza/i,
  507. noon: /^mezzo/i,
  508. morning: /mattina/i,
  509. afternoon: /pomeriggio/i,
  510. evening: /sera/i,
  511. night: /notte/i
  512. }
  513. };
  514. var match = {
  515. ordinalNumber: buildMatchPatternFn({
  516. matchPattern: matchOrdinalNumberPattern,
  517. parsePattern: parseOrdinalNumberPattern,
  518. valueCallback: function valueCallback(value) {return parseInt(value, 10);}
  519. }),
  520. era: buildMatchFn({
  521. matchPatterns: matchEraPatterns,
  522. defaultMatchWidth: "wide",
  523. parsePatterns: parseEraPatterns,
  524. defaultParseWidth: "any"
  525. }),
  526. quarter: buildMatchFn({
  527. matchPatterns: matchQuarterPatterns,
  528. defaultMatchWidth: "wide",
  529. parsePatterns: parseQuarterPatterns,
  530. defaultParseWidth: "any",
  531. valueCallback: function valueCallback(index) {return index + 1;}
  532. }),
  533. month: buildMatchFn({
  534. matchPatterns: matchMonthPatterns,
  535. defaultMatchWidth: "wide",
  536. parsePatterns: parseMonthPatterns,
  537. defaultParseWidth: "any"
  538. }),
  539. day: buildMatchFn({
  540. matchPatterns: matchDayPatterns,
  541. defaultMatchWidth: "wide",
  542. parsePatterns: parseDayPatterns,
  543. defaultParseWidth: "any"
  544. }),
  545. dayPeriod: buildMatchFn({
  546. matchPatterns: matchDayPeriodPatterns,
  547. defaultMatchWidth: "any",
  548. parsePatterns: parseDayPeriodPatterns,
  549. defaultParseWidth: "any"
  550. })
  551. };
  552. // lib/locale/_lib/buildFormatLongFn.js
  553. function buildFormatLongFn(args) {
  554. return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  555. var width = options.width ? String(options.width) : args.defaultWidth;
  556. var format = args.formats[width] || args.formats[args.defaultWidth];
  557. return format;
  558. };
  559. }
  560. // lib/locale/it-CH/_lib/formatLong.js
  561. var dateFormats = {
  562. full: "EEEE d MMMM y",
  563. long: "d MMMM y",
  564. medium: "d MMM y",
  565. short: "dd.MM.y"
  566. };
  567. var timeFormats = {
  568. full: "HH:mm:ss zzzz",
  569. long: "HH:mm:ss z",
  570. medium: "HH:mm:ss",
  571. short: "HH:mm"
  572. };
  573. var dateTimeFormats = {
  574. full: "{{date}} {{time}}",
  575. long: "{{date}} {{time}}",
  576. medium: "{{date}} {{time}}",
  577. short: "{{date}} {{time}}"
  578. };
  579. var formatLong = {
  580. date: buildFormatLongFn({
  581. formats: dateFormats,
  582. defaultWidth: "full"
  583. }),
  584. time: buildFormatLongFn({
  585. formats: timeFormats,
  586. defaultWidth: "full"
  587. }),
  588. dateTime: buildFormatLongFn({
  589. formats: dateTimeFormats,
  590. defaultWidth: "full"
  591. })
  592. };
  593. // lib/locale/it-CH.js
  594. var itCH = {
  595. code: "it-CH",
  596. formatDistance: formatDistance,
  597. formatLong: formatLong,
  598. formatRelative: formatRelative,
  599. localize: localize,
  600. match: match,
  601. options: {
  602. weekStartsOn: 1,
  603. firstWeekContainsDate: 4
  604. }
  605. };
  606. // lib/locale/it-CH/cdn.js
  607. window.dateFns = _objectSpread(_objectSpread({},
  608. window.dateFns), {}, {
  609. locale: _objectSpread(_objectSpread({}, (_window$dateFns =
  610. window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
  611. itCH: itCH }) });
  612. //# debugId=B365EEB1D70EFC6164756E2164756E21
  613. //# sourceMappingURL=cdn.js.map
  614. })();