cdn.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755
  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/pl/_lib/formatDistance.js
  13. function declensionGroup(scheme, count) {
  14. if (count === 1) {
  15. return scheme.one;
  16. }
  17. var rem100 = count % 100;
  18. if (rem100 <= 20 && rem100 > 10) {
  19. return scheme.other;
  20. }
  21. var rem10 = rem100 % 10;
  22. if (rem10 >= 2 && rem10 <= 4) {
  23. return scheme.twoFour;
  24. }
  25. return scheme.other;
  26. }
  27. function declension(scheme, count, time) {
  28. var group = declensionGroup(scheme, count);
  29. var finalText = typeof group === "string" ? group : group[time];
  30. return finalText.replace("{{count}}", String(count));
  31. }
  32. var formatDistanceLocale = {
  33. lessThanXSeconds: {
  34. one: {
  35. regular: "mniej ni\u017C sekunda",
  36. past: "mniej ni\u017C sekund\u0119",
  37. future: "mniej ni\u017C sekund\u0119"
  38. },
  39. twoFour: "mniej ni\u017C {{count}} sekundy",
  40. other: "mniej ni\u017C {{count}} sekund"
  41. },
  42. xSeconds: {
  43. one: {
  44. regular: "sekunda",
  45. past: "sekund\u0119",
  46. future: "sekund\u0119"
  47. },
  48. twoFour: "{{count}} sekundy",
  49. other: "{{count}} sekund"
  50. },
  51. halfAMinute: {
  52. one: "p\xF3\u0142 minuty",
  53. twoFour: "p\xF3\u0142 minuty",
  54. other: "p\xF3\u0142 minuty"
  55. },
  56. lessThanXMinutes: {
  57. one: {
  58. regular: "mniej ni\u017C minuta",
  59. past: "mniej ni\u017C minut\u0119",
  60. future: "mniej ni\u017C minut\u0119"
  61. },
  62. twoFour: "mniej ni\u017C {{count}} minuty",
  63. other: "mniej ni\u017C {{count}} minut"
  64. },
  65. xMinutes: {
  66. one: {
  67. regular: "minuta",
  68. past: "minut\u0119",
  69. future: "minut\u0119"
  70. },
  71. twoFour: "{{count}} minuty",
  72. other: "{{count}} minut"
  73. },
  74. aboutXHours: {
  75. one: {
  76. regular: "oko\u0142o godziny",
  77. past: "oko\u0142o godziny",
  78. future: "oko\u0142o godzin\u0119"
  79. },
  80. twoFour: "oko\u0142o {{count}} godziny",
  81. other: "oko\u0142o {{count}} godzin"
  82. },
  83. xHours: {
  84. one: {
  85. regular: "godzina",
  86. past: "godzin\u0119",
  87. future: "godzin\u0119"
  88. },
  89. twoFour: "{{count}} godziny",
  90. other: "{{count}} godzin"
  91. },
  92. xDays: {
  93. one: {
  94. regular: "dzie\u0144",
  95. past: "dzie\u0144",
  96. future: "1 dzie\u0144"
  97. },
  98. twoFour: "{{count}} dni",
  99. other: "{{count}} dni"
  100. },
  101. aboutXWeeks: {
  102. one: "oko\u0142o tygodnia",
  103. twoFour: "oko\u0142o {{count}} tygodni",
  104. other: "oko\u0142o {{count}} tygodni"
  105. },
  106. xWeeks: {
  107. one: "tydzie\u0144",
  108. twoFour: "{{count}} tygodnie",
  109. other: "{{count}} tygodni"
  110. },
  111. aboutXMonths: {
  112. one: "oko\u0142o miesi\u0105c",
  113. twoFour: "oko\u0142o {{count}} miesi\u0105ce",
  114. other: "oko\u0142o {{count}} miesi\u0119cy"
  115. },
  116. xMonths: {
  117. one: "miesi\u0105c",
  118. twoFour: "{{count}} miesi\u0105ce",
  119. other: "{{count}} miesi\u0119cy"
  120. },
  121. aboutXYears: {
  122. one: "oko\u0142o rok",
  123. twoFour: "oko\u0142o {{count}} lata",
  124. other: "oko\u0142o {{count}} lat"
  125. },
  126. xYears: {
  127. one: "rok",
  128. twoFour: "{{count}} lata",
  129. other: "{{count}} lat"
  130. },
  131. overXYears: {
  132. one: "ponad rok",
  133. twoFour: "ponad {{count}} lata",
  134. other: "ponad {{count}} lat"
  135. },
  136. almostXYears: {
  137. one: "prawie rok",
  138. twoFour: "prawie {{count}} lata",
  139. other: "prawie {{count}} lat"
  140. }
  141. };
  142. var formatDistance = function formatDistance(token, count, options) {
  143. var scheme = formatDistanceLocale[token];
  144. if (!(options !== null && options !== void 0 && options.addSuffix)) {
  145. return declension(scheme, count, "regular");
  146. }
  147. if (options.comparison && options.comparison > 0) {
  148. return "za " + declension(scheme, count, "future");
  149. } else {
  150. return declension(scheme, count, "past") + " temu";
  151. }
  152. };
  153. // lib/locale/_lib/buildFormatLongFn.js
  154. function buildFormatLongFn(args) {
  155. return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  156. var width = options.width ? String(options.width) : args.defaultWidth;
  157. var format = args.formats[width] || args.formats[args.defaultWidth];
  158. return format;
  159. };
  160. }
  161. // lib/locale/pl/_lib/formatLong.js
  162. var dateFormats = {
  163. full: "EEEE, do MMMM y",
  164. long: "do MMMM y",
  165. medium: "do MMM y",
  166. short: "dd.MM.y"
  167. };
  168. var timeFormats = {
  169. full: "HH:mm:ss zzzz",
  170. long: "HH:mm:ss z",
  171. medium: "HH:mm:ss",
  172. short: "HH:mm"
  173. };
  174. var dateTimeFormats = {
  175. full: "{{date}} {{time}}",
  176. long: "{{date}} {{time}}",
  177. medium: "{{date}}, {{time}}",
  178. short: "{{date}}, {{time}}"
  179. };
  180. var formatLong = {
  181. date: buildFormatLongFn({
  182. formats: dateFormats,
  183. defaultWidth: "full"
  184. }),
  185. time: buildFormatLongFn({
  186. formats: timeFormats,
  187. defaultWidth: "full"
  188. }),
  189. dateTime: buildFormatLongFn({
  190. formats: dateTimeFormats,
  191. defaultWidth: "full"
  192. })
  193. };
  194. // lib/constants.js
  195. var daysInWeek = 7;
  196. var daysInYear = 365.2425;
  197. var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;
  198. var minTime = -maxTime;
  199. var millisecondsInWeek = 604800000;
  200. var millisecondsInDay = 86400000;
  201. var millisecondsInMinute = 60000;
  202. var millisecondsInHour = 3600000;
  203. var millisecondsInSecond = 1000;
  204. var minutesInYear = 525600;
  205. var minutesInMonth = 43200;
  206. var minutesInDay = 1440;
  207. var minutesInHour = 60;
  208. var monthsInQuarter = 3;
  209. var monthsInYear = 12;
  210. var quartersInYear = 4;
  211. var secondsInHour = 3600;
  212. var secondsInMinute = 60;
  213. var secondsInDay = secondsInHour * 24;
  214. var secondsInWeek = secondsInDay * 7;
  215. var secondsInYear = secondsInDay * daysInYear;
  216. var secondsInMonth = secondsInYear / 12;
  217. var secondsInQuarter = secondsInMonth * 3;
  218. var constructFromSymbol = Symbol.for("constructDateFrom");
  219. // lib/constructFrom.js
  220. function constructFrom(date, value) {
  221. if (typeof date === "function")
  222. return date(value);
  223. if (date && _typeof(date) === "object" && constructFromSymbol in date)
  224. return date[constructFromSymbol](value);
  225. if (date instanceof Date)
  226. return new date.constructor(value);
  227. return new Date(value);
  228. }
  229. // lib/_lib/normalizeDates.js
  230. 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];}
  231. var normalize = constructFrom.bind(null, context || dates.find(function (date) {return _typeof(date) === "object";}));
  232. return dates.map(normalize);
  233. }
  234. // lib/_lib/defaultOptions.js
  235. function getDefaultOptions() {
  236. return defaultOptions;
  237. }
  238. function setDefaultOptions(newOptions) {
  239. defaultOptions = newOptions;
  240. }
  241. var defaultOptions = {};
  242. // lib/toDate.js
  243. function toDate(argument, context) {
  244. return constructFrom(context || argument, argument);
  245. }
  246. // lib/startOfWeek.js
  247. function startOfWeek(date, options) {var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _defaultOptions3$loca;
  248. var defaultOptions3 = getDefaultOptions();
  249. 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;
  250. var _date = toDate(date, options === null || options === void 0 ? void 0 : options.in);
  251. var day = _date.getDay();
  252. var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
  253. _date.setDate(_date.getDate() - diff);
  254. _date.setHours(0, 0, 0, 0);
  255. return _date;
  256. }
  257. // lib/isSameWeek.js
  258. function isSameWeek(laterDate, earlierDate, options) {
  259. var _normalizeDates = normalizeDates(options === null || options === void 0 ? void 0 : options.in, laterDate, earlierDate),_normalizeDates2 = _slicedToArray(_normalizeDates, 2),laterDate_ = _normalizeDates2[0],earlierDate_ = _normalizeDates2[1];
  260. return +startOfWeek(laterDate_, options) === +startOfWeek(earlierDate_, options);
  261. }
  262. // lib/locale/pl/_lib/formatRelative.js
  263. function dayAndTimeWithAdjective(token, date, baseDate, options) {
  264. var adjectives;
  265. if (isSameWeek(date, baseDate, options)) {
  266. adjectives = adjectivesThisWeek;
  267. } else if (token === "lastWeek") {
  268. adjectives = adjectivesLastWeek;
  269. } else if (token === "nextWeek") {
  270. adjectives = adjectivesNextWeek;
  271. } else {
  272. throw new Error("Cannot determine adjectives for token ".concat(token));
  273. }
  274. var day = date.getDay();
  275. var grammaticalGender = dayGrammaticalGender[day];
  276. var adjective = adjectives[grammaticalGender];
  277. return "'".concat(adjective, "' eeee 'o' p");
  278. }
  279. var adjectivesLastWeek = {
  280. masculine: "ostatni",
  281. feminine: "ostatnia"
  282. };
  283. var adjectivesThisWeek = {
  284. masculine: "ten",
  285. feminine: "ta"
  286. };
  287. var adjectivesNextWeek = {
  288. masculine: "nast\u0119pny",
  289. feminine: "nast\u0119pna"
  290. };
  291. var dayGrammaticalGender = {
  292. 0: "feminine",
  293. 1: "masculine",
  294. 2: "masculine",
  295. 3: "feminine",
  296. 4: "masculine",
  297. 5: "masculine",
  298. 6: "feminine"
  299. };
  300. var formatRelativeLocale = {
  301. lastWeek: dayAndTimeWithAdjective,
  302. yesterday: "'wczoraj o' p",
  303. today: "'dzisiaj o' p",
  304. tomorrow: "'jutro o' p",
  305. nextWeek: dayAndTimeWithAdjective,
  306. other: "P"
  307. };
  308. var formatRelative = function formatRelative(token, date, baseDate, options) {
  309. var format = formatRelativeLocale[token];
  310. if (typeof format === "function") {
  311. return format(token, date, baseDate, options);
  312. }
  313. return format;
  314. };
  315. // lib/locale/_lib/buildLocalizeFn.js
  316. function buildLocalizeFn(args) {
  317. return function (value, options) {
  318. var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
  319. var valuesArray;
  320. if (context === "formatting" && args.formattingValues) {
  321. var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
  322. var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
  323. valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
  324. } else {
  325. var _defaultWidth = args.defaultWidth;
  326. var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
  327. valuesArray = args.values[_width] || args.values[_defaultWidth];
  328. }
  329. var index = args.argumentCallback ? args.argumentCallback(value) : value;
  330. return valuesArray[index];
  331. };
  332. }
  333. // lib/locale/pl/_lib/localize.js
  334. var eraValues = {
  335. narrow: ["p.n.e.", "n.e."],
  336. abbreviated: ["p.n.e.", "n.e."],
  337. wide: ["przed nasz\u0105 er\u0105", "naszej ery"]
  338. };
  339. var quarterValues = {
  340. narrow: ["1", "2", "3", "4"],
  341. abbreviated: ["I kw.", "II kw.", "III kw.", "IV kw."],
  342. wide: ["I kwarta\u0142", "II kwarta\u0142", "III kwarta\u0142", "IV kwarta\u0142"]
  343. };
  344. var monthValues = {
  345. narrow: ["S", "L", "M", "K", "M", "C", "L", "S", "W", "P", "L", "G"],
  346. abbreviated: [
  347. "sty",
  348. "lut",
  349. "mar",
  350. "kwi",
  351. "maj",
  352. "cze",
  353. "lip",
  354. "sie",
  355. "wrz",
  356. "pa\u017A",
  357. "lis",
  358. "gru"],
  359. wide: [
  360. "stycze\u0144",
  361. "luty",
  362. "marzec",
  363. "kwiecie\u0144",
  364. "maj",
  365. "czerwiec",
  366. "lipiec",
  367. "sierpie\u0144",
  368. "wrzesie\u0144",
  369. "pa\u017Adziernik",
  370. "listopad",
  371. "grudzie\u0144"]
  372. };
  373. var monthFormattingValues = {
  374. narrow: ["s", "l", "m", "k", "m", "c", "l", "s", "w", "p", "l", "g"],
  375. abbreviated: [
  376. "sty",
  377. "lut",
  378. "mar",
  379. "kwi",
  380. "maj",
  381. "cze",
  382. "lip",
  383. "sie",
  384. "wrz",
  385. "pa\u017A",
  386. "lis",
  387. "gru"],
  388. wide: [
  389. "stycznia",
  390. "lutego",
  391. "marca",
  392. "kwietnia",
  393. "maja",
  394. "czerwca",
  395. "lipca",
  396. "sierpnia",
  397. "wrze\u015Bnia",
  398. "pa\u017Adziernika",
  399. "listopada",
  400. "grudnia"]
  401. };
  402. var dayValues = {
  403. narrow: ["N", "P", "W", "\u015A", "C", "P", "S"],
  404. short: ["nie", "pon", "wto", "\u015Bro", "czw", "pi\u0105", "sob"],
  405. abbreviated: ["niedz.", "pon.", "wt.", "\u015Br.", "czw.", "pt.", "sob."],
  406. wide: [
  407. "niedziela",
  408. "poniedzia\u0142ek",
  409. "wtorek",
  410. "\u015Broda",
  411. "czwartek",
  412. "pi\u0105tek",
  413. "sobota"]
  414. };
  415. var dayFormattingValues = {
  416. narrow: ["n", "p", "w", "\u015B", "c", "p", "s"],
  417. short: ["nie", "pon", "wto", "\u015Bro", "czw", "pi\u0105", "sob"],
  418. abbreviated: ["niedz.", "pon.", "wt.", "\u015Br.", "czw.", "pt.", "sob."],
  419. wide: [
  420. "niedziela",
  421. "poniedzia\u0142ek",
  422. "wtorek",
  423. "\u015Broda",
  424. "czwartek",
  425. "pi\u0105tek",
  426. "sobota"]
  427. };
  428. var dayPeriodValues = {
  429. narrow: {
  430. am: "a",
  431. pm: "p",
  432. midnight: "p\xF3\u0142n.",
  433. noon: "po\u0142",
  434. morning: "rano",
  435. afternoon: "popo\u0142.",
  436. evening: "wiecz.",
  437. night: "noc"
  438. },
  439. abbreviated: {
  440. am: "AM",
  441. pm: "PM",
  442. midnight: "p\xF3\u0142noc",
  443. noon: "po\u0142udnie",
  444. morning: "rano",
  445. afternoon: "popo\u0142udnie",
  446. evening: "wiecz\xF3r",
  447. night: "noc"
  448. },
  449. wide: {
  450. am: "AM",
  451. pm: "PM",
  452. midnight: "p\xF3\u0142noc",
  453. noon: "po\u0142udnie",
  454. morning: "rano",
  455. afternoon: "popo\u0142udnie",
  456. evening: "wiecz\xF3r",
  457. night: "noc"
  458. }
  459. };
  460. var dayPeriodFormattingValues = {
  461. narrow: {
  462. am: "a",
  463. pm: "p",
  464. midnight: "o p\xF3\u0142n.",
  465. noon: "w po\u0142.",
  466. morning: "rano",
  467. afternoon: "po po\u0142.",
  468. evening: "wiecz.",
  469. night: "w nocy"
  470. },
  471. abbreviated: {
  472. am: "AM",
  473. pm: "PM",
  474. midnight: "o p\xF3\u0142nocy",
  475. noon: "w po\u0142udnie",
  476. morning: "rano",
  477. afternoon: "po po\u0142udniu",
  478. evening: "wieczorem",
  479. night: "w nocy"
  480. },
  481. wide: {
  482. am: "AM",
  483. pm: "PM",
  484. midnight: "o p\xF3\u0142nocy",
  485. noon: "w po\u0142udnie",
  486. morning: "rano",
  487. afternoon: "po po\u0142udniu",
  488. evening: "wieczorem",
  489. night: "w nocy"
  490. }
  491. };
  492. var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
  493. return String(dirtyNumber);
  494. };
  495. var localize = {
  496. ordinalNumber: ordinalNumber,
  497. era: buildLocalizeFn({
  498. values: eraValues,
  499. defaultWidth: "wide"
  500. }),
  501. quarter: buildLocalizeFn({
  502. values: quarterValues,
  503. defaultWidth: "wide",
  504. argumentCallback: function argumentCallback(quarter) {return quarter - 1;}
  505. }),
  506. month: buildLocalizeFn({
  507. values: monthValues,
  508. defaultWidth: "wide",
  509. formattingValues: monthFormattingValues,
  510. defaultFormattingWidth: "wide"
  511. }),
  512. day: buildLocalizeFn({
  513. values: dayValues,
  514. defaultWidth: "wide",
  515. formattingValues: dayFormattingValues,
  516. defaultFormattingWidth: "wide"
  517. }),
  518. dayPeriod: buildLocalizeFn({
  519. values: dayPeriodValues,
  520. defaultWidth: "wide",
  521. formattingValues: dayPeriodFormattingValues,
  522. defaultFormattingWidth: "wide"
  523. })
  524. };
  525. // lib/locale/_lib/buildMatchFn.js
  526. function buildMatchFn(args) {
  527. return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  528. var width = options.width;
  529. var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
  530. var matchResult = string.match(matchPattern);
  531. if (!matchResult) {
  532. return null;
  533. }
  534. var matchedString = matchResult[0];
  535. var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
  536. var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
  537. var value;
  538. value = args.valueCallback ? args.valueCallback(key) : key;
  539. value = options.valueCallback ? options.valueCallback(value) : value;
  540. var rest = string.slice(matchedString.length);
  541. return { value: value, rest: rest };
  542. };
  543. }
  544. function findKey(object, predicate) {
  545. for (var key in object) {
  546. if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
  547. return key;
  548. }
  549. }
  550. return;
  551. }
  552. function findIndex(array, predicate) {
  553. for (var key = 0; key < array.length; key++) {
  554. if (predicate(array[key])) {
  555. return key;
  556. }
  557. }
  558. return;
  559. }
  560. // lib/locale/_lib/buildMatchPatternFn.js
  561. function buildMatchPatternFn(args) {
  562. return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  563. var matchResult = string.match(args.matchPattern);
  564. if (!matchResult)
  565. return null;
  566. var matchedString = matchResult[0];
  567. var parseResult = string.match(args.parsePattern);
  568. if (!parseResult)
  569. return null;
  570. var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
  571. value = options.valueCallback ? options.valueCallback(value) : value;
  572. var rest = string.slice(matchedString.length);
  573. return { value: value, rest: rest };
  574. };
  575. }
  576. // lib/locale/pl/_lib/match.js
  577. var matchOrdinalNumberPattern = /^(\d+)?/i;
  578. var parseOrdinalNumberPattern = /\d+/i;
  579. var matchEraPatterns = {
  580. narrow: /^(p\.?\s*n\.?\s*e\.?\s*|n\.?\s*e\.?\s*)/i,
  581. abbreviated: /^(p\.?\s*n\.?\s*e\.?\s*|n\.?\s*e\.?\s*)/i,
  582. wide: /^(przed\s*nasz(ą|a)\s*er(ą|a)|naszej\s*ery)/i
  583. };
  584. var parseEraPatterns = {
  585. any: [/^p/i, /^n/i]
  586. };
  587. var matchQuarterPatterns = {
  588. narrow: /^[1234]/i,
  589. abbreviated: /^(I|II|III|IV)\s*kw\.?/i,
  590. wide: /^(I|II|III|IV)\s*kwarta(ł|l)/i
  591. };
  592. var parseQuarterPatterns = {
  593. narrow: [/1/i, /2/i, /3/i, /4/i],
  594. any: [/^I kw/i, /^II kw/i, /^III kw/i, /^IV kw/i]
  595. };
  596. var matchMonthPatterns = {
  597. narrow: /^[slmkcwpg]/i,
  598. abbreviated: /^(sty|lut|mar|kwi|maj|cze|lip|sie|wrz|pa(ź|z)|lis|gru)/i,
  599. wide: /^(stycznia|stycze(ń|n)|lutego|luty|marca|marzec|kwietnia|kwiecie(ń|n)|maja|maj|czerwca|czerwiec|lipca|lipiec|sierpnia|sierpie(ń|n)|wrze(ś|s)nia|wrzesie(ń|n)|pa(ź|z)dziernika|pa(ź|z)dziernik|listopada|listopad|grudnia|grudzie(ń|n))/i
  600. };
  601. var parseMonthPatterns = {
  602. narrow: [
  603. /^s/i,
  604. /^l/i,
  605. /^m/i,
  606. /^k/i,
  607. /^m/i,
  608. /^c/i,
  609. /^l/i,
  610. /^s/i,
  611. /^w/i,
  612. /^p/i,
  613. /^l/i,
  614. /^g/i],
  615. any: [
  616. /^st/i,
  617. /^lu/i,
  618. /^mar/i,
  619. /^k/i,
  620. /^maj/i,
  621. /^c/i,
  622. /^lip/i,
  623. /^si/i,
  624. /^w/i,
  625. /^p/i,
  626. /^lis/i,
  627. /^g/i]
  628. };
  629. var matchDayPatterns = {
  630. narrow: /^[npwścs]/i,
  631. short: /^(nie|pon|wto|(ś|s)ro|czw|pi(ą|a)|sob)/i,
  632. abbreviated: /^(niedz|pon|wt|(ś|s)r|czw|pt|sob)\.?/i,
  633. wide: /^(niedziela|poniedzia(ł|l)ek|wtorek|(ś|s)roda|czwartek|pi(ą|a)tek|sobota)/i
  634. };
  635. var parseDayPatterns = {
  636. narrow: [/^n/i, /^p/i, /^w/i, /^ś/i, /^c/i, /^p/i, /^s/i],
  637. abbreviated: [/^n/i, /^po/i, /^w/i, /^(ś|s)r/i, /^c/i, /^pt/i, /^so/i],
  638. any: [/^n/i, /^po/i, /^w/i, /^(ś|s)r/i, /^c/i, /^pi/i, /^so/i]
  639. };
  640. var matchDayPeriodPatterns = {
  641. narrow: /^(^a$|^p$|pó(ł|l)n\.?|o\s*pó(ł|l)n\.?|po(ł|l)\.?|w\s*po(ł|l)\.?|po\s*po(ł|l)\.?|rano|wiecz\.?|noc|w\s*nocy)/i,
  642. any: /^(am|pm|pó(ł|l)noc|o\s*pó(ł|l)nocy|po(ł|l)udnie|w\s*po(ł|l)udnie|popo(ł|l)udnie|po\s*po(ł|l)udniu|rano|wieczór|wieczorem|noc|w\s*nocy)/i
  643. };
  644. var parseDayPeriodPatterns = {
  645. narrow: {
  646. am: /^a$/i,
  647. pm: /^p$/i,
  648. midnight: /pó(ł|l)n/i,
  649. noon: /po(ł|l)/i,
  650. morning: /rano/i,
  651. afternoon: /po\s*po(ł|l)/i,
  652. evening: /wiecz/i,
  653. night: /noc/i
  654. },
  655. any: {
  656. am: /^am/i,
  657. pm: /^pm/i,
  658. midnight: /pó(ł|l)n/i,
  659. noon: /po(ł|l)/i,
  660. morning: /rano/i,
  661. afternoon: /po\s*po(ł|l)/i,
  662. evening: /wiecz/i,
  663. night: /noc/i
  664. }
  665. };
  666. var match = {
  667. ordinalNumber: buildMatchPatternFn({
  668. matchPattern: matchOrdinalNumberPattern,
  669. parsePattern: parseOrdinalNumberPattern,
  670. valueCallback: function valueCallback(value) {return parseInt(value, 10);}
  671. }),
  672. era: buildMatchFn({
  673. matchPatterns: matchEraPatterns,
  674. defaultMatchWidth: "wide",
  675. parsePatterns: parseEraPatterns,
  676. defaultParseWidth: "any"
  677. }),
  678. quarter: buildMatchFn({
  679. matchPatterns: matchQuarterPatterns,
  680. defaultMatchWidth: "wide",
  681. parsePatterns: parseQuarterPatterns,
  682. defaultParseWidth: "any",
  683. valueCallback: function valueCallback(index) {return index + 1;}
  684. }),
  685. month: buildMatchFn({
  686. matchPatterns: matchMonthPatterns,
  687. defaultMatchWidth: "wide",
  688. parsePatterns: parseMonthPatterns,
  689. defaultParseWidth: "any"
  690. }),
  691. day: buildMatchFn({
  692. matchPatterns: matchDayPatterns,
  693. defaultMatchWidth: "wide",
  694. parsePatterns: parseDayPatterns,
  695. defaultParseWidth: "any"
  696. }),
  697. dayPeriod: buildMatchFn({
  698. matchPatterns: matchDayPeriodPatterns,
  699. defaultMatchWidth: "any",
  700. parsePatterns: parseDayPeriodPatterns,
  701. defaultParseWidth: "any"
  702. })
  703. };
  704. // lib/locale/pl.js
  705. var pl = {
  706. code: "pl",
  707. formatDistance: formatDistance,
  708. formatLong: formatLong,
  709. formatRelative: formatRelative,
  710. localize: localize,
  711. match: match,
  712. options: {
  713. weekStartsOn: 1,
  714. firstWeekContainsDate: 4
  715. }
  716. };
  717. // lib/locale/pl/cdn.js
  718. window.dateFns = _objectSpread(_objectSpread({},
  719. window.dateFns), {}, {
  720. locale: _objectSpread(_objectSpread({}, (_window$dateFns =
  721. window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
  722. pl: pl }) });
  723. //# debugId=4EC04C3729EE1DF164756E2164756E21
  724. //# sourceMappingURL=cdn.js.map
  725. })();