cdn.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  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/ar-DZ/_lib/formatDistance.js
  13. var formatDistanceLocale = {
  14. lessThanXSeconds: {
  15. one: "\u0623\u0642\u0644 \u0645\u0646 \u062B\u0627\u0646\u064A\u0629 \u0648\u0627\u062D\u062F\u0629",
  16. two: "\u0623\u0642\u0644 \u0645\u0646 \u062B\u0627\u0646\u062A\u064A\u0646",
  17. threeToTen: "\u0623\u0642\u0644 \u0645\u0646 {{count}} \u062B\u0648\u0627\u0646\u064A",
  18. other: "\u0623\u0642\u0644 \u0645\u0646 {{count}} \u062B\u0627\u0646\u064A\u0629"
  19. },
  20. xSeconds: {
  21. one: "\u062B\u0627\u0646\u064A\u0629 \u0648\u0627\u062D\u062F\u0629",
  22. two: "\u062B\u0627\u0646\u062A\u064A\u0646",
  23. threeToTen: "{{count}} \u062B\u0648\u0627\u0646\u064A",
  24. other: "{{count}} \u062B\u0627\u0646\u064A\u0629"
  25. },
  26. halfAMinute: "\u0646\u0635\u0641 \u062F\u0642\u064A\u0642\u0629",
  27. lessThanXMinutes: {
  28. one: "\u0623\u0642\u0644 \u0645\u0646 \u062F\u0642\u064A\u0642\u0629",
  29. two: "\u0623\u0642\u0644 \u0645\u0646 \u062F\u0642\u064A\u0642\u062A\u064A\u0646",
  30. threeToTen: "\u0623\u0642\u0644 \u0645\u0646 {{count}} \u062F\u0642\u0627\u0626\u0642",
  31. other: "\u0623\u0642\u0644 \u0645\u0646 {{count}} \u062F\u0642\u064A\u0642\u0629"
  32. },
  33. xMinutes: {
  34. one: "\u062F\u0642\u064A\u0642\u0629 \u0648\u0627\u062D\u062F\u0629",
  35. two: "\u062F\u0642\u064A\u0642\u062A\u064A\u0646",
  36. threeToTen: "{{count}} \u062F\u0642\u0627\u0626\u0642",
  37. other: "{{count}} \u062F\u0642\u064A\u0642\u0629"
  38. },
  39. aboutXHours: {
  40. one: "\u0633\u0627\u0639\u0629 \u0648\u0627\u062D\u062F\u0629 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
  41. two: "\u0633\u0627\u0639\u062A\u064A\u0646 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
  42. threeToTen: "{{count}} \u0633\u0627\u0639\u0627\u062A \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
  43. other: "{{count}} \u0633\u0627\u0639\u0629 \u062A\u0642\u0631\u064A\u0628\u0627\u064B"
  44. },
  45. xHours: {
  46. one: "\u0633\u0627\u0639\u0629 \u0648\u0627\u062D\u062F\u0629",
  47. two: "\u0633\u0627\u0639\u062A\u064A\u0646",
  48. threeToTen: "{{count}} \u0633\u0627\u0639\u0627\u062A",
  49. other: "{{count}} \u0633\u0627\u0639\u0629"
  50. },
  51. xDays: {
  52. one: "\u064A\u0648\u0645 \u0648\u0627\u062D\u062F",
  53. two: "\u064A\u0648\u0645\u064A\u0646",
  54. threeToTen: "{{count}} \u0623\u064A\u0627\u0645",
  55. other: "{{count}} \u064A\u0648\u0645"
  56. },
  57. aboutXWeeks: {
  58. one: "\u0623\u0633\u0628\u0648\u0639 \u0648\u0627\u062D\u062F \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
  59. two: "\u0623\u0633\u0628\u0648\u0639\u064A\u0646 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
  60. threeToTen: "{{count}} \u0623\u0633\u0627\u0628\u064A\u0639 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
  61. other: "{{count}} \u0623\u0633\u0628\u0648\u0639 \u062A\u0642\u0631\u064A\u0628\u0627\u064B"
  62. },
  63. xWeeks: {
  64. one: "\u0623\u0633\u0628\u0648\u0639 \u0648\u0627\u062D\u062F",
  65. two: "\u0623\u0633\u0628\u0648\u0639\u064A\u0646",
  66. threeToTen: "{{count}} \u0623\u0633\u0627\u0628\u064A\u0639",
  67. other: "{{count}} \u0623\u0633\u0628\u0648\u0639"
  68. },
  69. aboutXMonths: {
  70. one: "\u0634\u0647\u0631 \u0648\u0627\u062D\u062F \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
  71. two: "\u0634\u0647\u0631\u064A\u0646 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
  72. threeToTen: "{{count}} \u0623\u0634\u0647\u0631 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
  73. other: "{{count}} \u0634\u0647\u0631 \u062A\u0642\u0631\u064A\u0628\u0627\u064B"
  74. },
  75. xMonths: {
  76. one: "\u0634\u0647\u0631 \u0648\u0627\u062D\u062F",
  77. two: "\u0634\u0647\u0631\u064A\u0646",
  78. threeToTen: "{{count}} \u0623\u0634\u0647\u0631",
  79. other: "{{count}} \u0634\u0647\u0631"
  80. },
  81. aboutXYears: {
  82. one: "\u0639\u0627\u0645 \u0648\u0627\u062D\u062F \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
  83. two: "\u0639\u0627\u0645\u064A\u0646 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
  84. threeToTen: "{{count}} \u0623\u0639\u0648\u0627\u0645 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
  85. other: "{{count}} \u0639\u0627\u0645 \u062A\u0642\u0631\u064A\u0628\u0627\u064B"
  86. },
  87. xYears: {
  88. one: "\u0639\u0627\u0645 \u0648\u0627\u062D\u062F",
  89. two: "\u0639\u0627\u0645\u064A\u0646",
  90. threeToTen: "{{count}} \u0623\u0639\u0648\u0627\u0645",
  91. other: "{{count}} \u0639\u0627\u0645"
  92. },
  93. overXYears: {
  94. one: "\u0623\u0643\u062B\u0631 \u0645\u0646 \u0639\u0627\u0645",
  95. two: "\u0623\u0643\u062B\u0631 \u0645\u0646 \u0639\u0627\u0645\u064A\u0646",
  96. threeToTen: "\u0623\u0643\u062B\u0631 \u0645\u0646 {{count}} \u0623\u0639\u0648\u0627\u0645",
  97. other: "\u0623\u0643\u062B\u0631 \u0645\u0646 {{count}} \u0639\u0627\u0645"
  98. },
  99. almostXYears: {
  100. one: "\u0639\u0627\u0645 \u0648\u0627\u062D\u062F \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
  101. two: "\u0639\u0627\u0645\u064A\u0646 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
  102. threeToTen: "{{count}} \u0623\u0639\u0648\u0627\u0645 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
  103. other: "{{count}} \u0639\u0627\u0645 \u062A\u0642\u0631\u064A\u0628\u0627\u064B"
  104. }
  105. };
  106. var formatDistance = function formatDistance(token, count, options) {
  107. options = options || {};
  108. var usageGroup = formatDistanceLocale[token];
  109. var result;
  110. if (typeof usageGroup === "string") {
  111. result = usageGroup;
  112. } else if (count === 1) {
  113. result = usageGroup.one;
  114. } else if (count === 2) {
  115. result = usageGroup.two;
  116. } else if (count <= 10) {
  117. result = usageGroup.threeToTen.replace("{{count}}", String(count));
  118. } else {
  119. result = usageGroup.other.replace("{{count}}", String(count));
  120. }
  121. if (options.addSuffix) {
  122. if (options.comparison && options.comparison > 0) {
  123. return "\u0641\u064A \u062E\u0644\u0627\u0644 " + result;
  124. } else {
  125. return "\u0645\u0646\u0630 " + result;
  126. }
  127. }
  128. return result;
  129. };
  130. // lib/locale/_lib/buildFormatLongFn.js
  131. function buildFormatLongFn(args) {
  132. return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  133. var width = options.width ? String(options.width) : args.defaultWidth;
  134. var format = args.formats[width] || args.formats[args.defaultWidth];
  135. return format;
  136. };
  137. }
  138. // lib/locale/ar-DZ/_lib/formatLong.js
  139. var dateFormats = {
  140. full: "EEEE, MMMM do, y",
  141. long: "MMMM do, y",
  142. medium: "MMM d, y",
  143. short: "MM/dd/yyyy"
  144. };
  145. var timeFormats = {
  146. full: "h:mm:ss a zzzz",
  147. long: "h:mm:ss a z",
  148. medium: "h:mm:ss a",
  149. short: "h:mm a"
  150. };
  151. var dateTimeFormats = {
  152. full: "{{date}} '\u0639\u0646\u062F' {{time}}",
  153. long: "{{date}} '\u0639\u0646\u062F' {{time}}",
  154. medium: "{{date}}, {{time}}",
  155. short: "{{date}}, {{time}}"
  156. };
  157. var formatLong = {
  158. date: buildFormatLongFn({
  159. formats: dateFormats,
  160. defaultWidth: "full"
  161. }),
  162. time: buildFormatLongFn({
  163. formats: timeFormats,
  164. defaultWidth: "full"
  165. }),
  166. dateTime: buildFormatLongFn({
  167. formats: dateTimeFormats,
  168. defaultWidth: "full"
  169. })
  170. };
  171. // lib/locale/ar-DZ/_lib/formatRelative.js
  172. var formatRelativeLocale = {
  173. lastWeek: "'\u0623\u062E\u0631' eeee '\u0639\u0646\u062F' p",
  174. yesterday: "'\u0623\u0645\u0633 \u0639\u0646\u062F' p",
  175. today: "'\u0627\u0644\u064A\u0648\u0645 \u0639\u0646\u062F' p",
  176. tomorrow: "'\u063A\u062F\u0627\u064B \u0639\u0646\u062F' p",
  177. nextWeek: "eeee '\u0639\u0646\u062F' p",
  178. other: "P"
  179. };
  180. var formatRelative = function formatRelative(token, _date, _baseDate, _options) {
  181. return formatRelativeLocale[token];
  182. };
  183. // lib/locale/_lib/buildLocalizeFn.js
  184. function buildLocalizeFn(args) {
  185. return function (value, options) {
  186. var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
  187. var valuesArray;
  188. if (context === "formatting" && args.formattingValues) {
  189. var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
  190. var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
  191. valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
  192. } else {
  193. var _defaultWidth = args.defaultWidth;
  194. var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
  195. valuesArray = args.values[_width] || args.values[_defaultWidth];
  196. }
  197. var index = args.argumentCallback ? args.argumentCallback(value) : value;
  198. return valuesArray[index];
  199. };
  200. }
  201. // lib/locale/ar-DZ/_lib/localize.js
  202. var eraValues = {
  203. narrow: ["\u0642", "\u0628"],
  204. abbreviated: ["\u0642.\u0645.", "\u0628.\u0645."],
  205. wide: ["\u0642\u0628\u0644 \u0627\u0644\u0645\u064A\u0644\u0627\u062F", "\u0628\u0639\u062F \u0627\u0644\u0645\u064A\u0644\u0627\u062F"]
  206. };
  207. var quarterValues = {
  208. narrow: ["1", "2", "3", "4"],
  209. abbreviated: ["\u06311", "\u06312", "\u06313", "\u06314"],
  210. wide: ["\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0623\u0648\u0644", "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062B\u0627\u0646\u064A", "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062B\u0627\u0644\u062B", "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0631\u0627\u0628\u0639"]
  211. };
  212. var monthValues = {
  213. narrow: ["\u062C", "\u0641", "\u0645", "\u0623", "\u0645", "\u062C", "\u062C", "\u0623", "\u0633", "\u0623", "\u0646", "\u062F"],
  214. abbreviated: [
  215. "\u062C\u0627\u0646\u0640",
  216. "\u0641\u064A\u0641\u0640",
  217. "\u0645\u0627\u0631\u0633",
  218. "\u0623\u0641\u0631\u064A\u0644",
  219. "\u0645\u0627\u064A\u0640",
  220. "\u062C\u0648\u0627\u0646\u0640",
  221. "\u062C\u0648\u064A\u0640",
  222. "\u0623\u0648\u062A",
  223. "\u0633\u0628\u062A\u0640",
  224. "\u0623\u0643\u062A\u0640",
  225. "\u0646\u0648\u0641\u0640",
  226. "\u062F\u064A\u0633\u0640"],
  227. wide: [
  228. "\u062C\u0627\u0646\u0641\u064A",
  229. "\u0641\u064A\u0641\u0631\u064A",
  230. "\u0645\u0627\u0631\u0633",
  231. "\u0623\u0641\u0631\u064A\u0644",
  232. "\u0645\u0627\u064A",
  233. "\u062C\u0648\u0627\u0646",
  234. "\u062C\u0648\u064A\u0644\u064A\u0629",
  235. "\u0623\u0648\u062A",
  236. "\u0633\u0628\u062A\u0645\u0628\u0631",
  237. "\u0623\u0643\u062A\u0648\u0628\u0631",
  238. "\u0646\u0648\u0641\u0645\u0628\u0631",
  239. "\u062F\u064A\u0633\u0645\u0628\u0631"]
  240. };
  241. var dayValues = {
  242. narrow: ["\u062D", "\u0646", "\u062B", "\u0631", "\u062E", "\u062C", "\u0633"],
  243. short: ["\u0623\u062D\u062F", "\u0627\u062B\u0646\u064A\u0646", "\u062B\u0644\u0627\u062B\u0627\u0621", "\u0623\u0631\u0628\u0639\u0627\u0621", "\u062E\u0645\u064A\u0633", "\u062C\u0645\u0639\u0629", "\u0633\u0628\u062A"],
  244. abbreviated: ["\u0623\u062D\u062F", "\u0627\u062B\u0646\u0640", "\u062B\u0644\u0627", "\u0623\u0631\u0628\u0640", "\u062E\u0645\u064A\u0640", "\u062C\u0645\u0639\u0629", "\u0633\u0628\u062A"],
  245. wide: [
  246. "\u0627\u0644\u0623\u062D\u062F",
  247. "\u0627\u0644\u0627\u062B\u0646\u064A\u0646",
  248. "\u0627\u0644\u062B\u0644\u0627\u062B\u0627\u0621",
  249. "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
  250. "\u0627\u0644\u062E\u0645\u064A\u0633",
  251. "\u0627\u0644\u062C\u0645\u0639\u0629",
  252. "\u0627\u0644\u0633\u0628\u062A"]
  253. };
  254. var dayPeriodValues = {
  255. narrow: {
  256. am: "\u0635",
  257. pm: "\u0645",
  258. midnight: "\u0646",
  259. noon: "\u0638",
  260. morning: "\u0635\u0628\u0627\u062D\u0627\u064B",
  261. afternoon: "\u0628\u0639\u062F \u0627\u0644\u0638\u0647\u0631",
  262. evening: "\u0645\u0633\u0627\u0621\u0627\u064B",
  263. night: "\u0644\u064A\u0644\u0627\u064B"
  264. },
  265. abbreviated: {
  266. am: "\u0635",
  267. pm: "\u0645",
  268. midnight: "\u0646\u0635\u0641 \u0627\u0644\u0644\u064A\u0644",
  269. noon: "\u0638\u0647\u0631",
  270. morning: "\u0635\u0628\u0627\u062D\u0627\u064B",
  271. afternoon: "\u0628\u0639\u062F \u0627\u0644\u0638\u0647\u0631",
  272. evening: "\u0645\u0633\u0627\u0621\u0627\u064B",
  273. night: "\u0644\u064A\u0644\u0627\u064B"
  274. },
  275. wide: {
  276. am: "\u0635",
  277. pm: "\u0645",
  278. midnight: "\u0646\u0635\u0641 \u0627\u0644\u0644\u064A\u0644",
  279. noon: "\u0638\u0647\u0631",
  280. morning: "\u0635\u0628\u0627\u062D\u0627\u064B",
  281. afternoon: "\u0628\u0639\u062F \u0627\u0644\u0638\u0647\u0631",
  282. evening: "\u0645\u0633\u0627\u0621\u0627\u064B",
  283. night: "\u0644\u064A\u0644\u0627\u064B"
  284. }
  285. };
  286. var formattingDayPeriodValues = {
  287. narrow: {
  288. am: "\u0635",
  289. pm: "\u0645",
  290. midnight: "\u0646",
  291. noon: "\u0638",
  292. morning: "\u0641\u064A \u0627\u0644\u0635\u0628\u0627\u062D",
  293. afternoon: "\u0628\u0639\u062F \u0627\u0644\u0638\u0640\u0647\u0631",
  294. evening: "\u0641\u064A \u0627\u0644\u0645\u0633\u0627\u0621",
  295. night: "\u0641\u064A \u0627\u0644\u0644\u064A\u0644"
  296. },
  297. abbreviated: {
  298. am: "\u0635",
  299. pm: "\u0645",
  300. midnight: "\u0646\u0635\u0641 \u0627\u0644\u0644\u064A\u0644",
  301. noon: "\u0638\u0647\u0631",
  302. morning: "\u0641\u064A \u0627\u0644\u0635\u0628\u0627\u062D",
  303. afternoon: "\u0628\u0639\u062F \u0627\u0644\u0638\u0647\u0631",
  304. evening: "\u0641\u064A \u0627\u0644\u0645\u0633\u0627\u0621",
  305. night: "\u0641\u064A \u0627\u0644\u0644\u064A\u0644"
  306. },
  307. wide: {
  308. am: "\u0635",
  309. pm: "\u0645",
  310. midnight: "\u0646\u0635\u0641 \u0627\u0644\u0644\u064A\u0644",
  311. noon: "\u0638\u0647\u0631",
  312. morning: "\u0635\u0628\u0627\u062D\u0627\u064B",
  313. afternoon: "\u0628\u0639\u062F \u0627\u0644\u0638\u0640\u0647\u0631",
  314. evening: "\u0641\u064A \u0627\u0644\u0645\u0633\u0627\u0621",
  315. night: "\u0641\u064A \u0627\u0644\u0644\u064A\u0644"
  316. }
  317. };
  318. var ordinalNumber = function ordinalNumber(dirtyNumber) {
  319. return String(dirtyNumber);
  320. };
  321. var localize = {
  322. ordinalNumber: ordinalNumber,
  323. era: buildLocalizeFn({
  324. values: eraValues,
  325. defaultWidth: "wide"
  326. }),
  327. quarter: buildLocalizeFn({
  328. values: quarterValues,
  329. defaultWidth: "wide",
  330. argumentCallback: function argumentCallback(quarter) {return Number(quarter) - 1;}
  331. }),
  332. month: buildLocalizeFn({
  333. values: monthValues,
  334. defaultWidth: "wide"
  335. }),
  336. day: buildLocalizeFn({
  337. values: dayValues,
  338. defaultWidth: "wide"
  339. }),
  340. dayPeriod: buildLocalizeFn({
  341. values: dayPeriodValues,
  342. defaultWidth: "wide",
  343. formattingValues: formattingDayPeriodValues,
  344. defaultFormattingWidth: "wide"
  345. })
  346. };
  347. // lib/locale/_lib/buildMatchPatternFn.js
  348. function buildMatchPatternFn(args) {
  349. return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  350. var matchResult = string.match(args.matchPattern);
  351. if (!matchResult)
  352. return null;
  353. var matchedString = matchResult[0];
  354. var parseResult = string.match(args.parsePattern);
  355. if (!parseResult)
  356. return null;
  357. var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
  358. value = options.valueCallback ? options.valueCallback(value) : value;
  359. var rest = string.slice(matchedString.length);
  360. return { value: value, rest: rest };
  361. };
  362. }
  363. // lib/locale/_lib/buildMatchFn.js
  364. function buildMatchFn(args) {
  365. return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  366. var width = options.width;
  367. var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
  368. var matchResult = string.match(matchPattern);
  369. if (!matchResult) {
  370. return null;
  371. }
  372. var matchedString = matchResult[0];
  373. var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
  374. var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
  375. var value;
  376. value = args.valueCallback ? args.valueCallback(key) : key;
  377. value = options.valueCallback ? options.valueCallback(value) : value;
  378. var rest = string.slice(matchedString.length);
  379. return { value: value, rest: rest };
  380. };
  381. }
  382. function findKey(object, predicate) {
  383. for (var key in object) {
  384. if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
  385. return key;
  386. }
  387. }
  388. return;
  389. }
  390. function findIndex(array, predicate) {
  391. for (var key = 0; key < array.length; key++) {
  392. if (predicate(array[key])) {
  393. return key;
  394. }
  395. }
  396. return;
  397. }
  398. // lib/locale/ar-DZ/_lib/match.js
  399. var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
  400. var parseOrdinalNumberPattern = /\d+/i;
  401. var matchEraPatterns = {
  402. narrow: /^(ق|ب)/i,
  403. abbreviated: /^(ق\.?\s?م\.?|ق\.?\s?م\.?\s?|a\.?\s?d\.?|c\.?\s?)/i,
  404. wide: /^(قبل الميلاد|قبل الميلاد|بعد الميلاد|بعد الميلاد)/i
  405. };
  406. var parseEraPatterns = {
  407. any: [/^قبل/i, /^بعد/i]
  408. };
  409. var matchQuarterPatterns = {
  410. narrow: /^[1234]/i,
  411. abbreviated: /^ر[1234]/i,
  412. wide: /^الربع [1234]/i
  413. };
  414. var parseQuarterPatterns = {
  415. any: [/1/i, /2/i, /3/i, /4/i]
  416. };
  417. var matchMonthPatterns = {
  418. narrow: /^[جفمأسند]/i,
  419. abbreviated: /^(جان|فيف|مار|أفر|ماي|جوا|جوي|أوت|سبت|أكت|نوف|ديس)/i,
  420. wide: /^(جانفي|فيفري|مارس|أفريل|ماي|جوان|جويلية|أوت|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/i
  421. };
  422. var parseMonthPatterns = {
  423. narrow: [
  424. /^ج/i,
  425. /^ف/i,
  426. /^م/i,
  427. /^أ/i,
  428. /^م/i,
  429. /^ج/i,
  430. /^ج/i,
  431. /^أ/i,
  432. /^س/i,
  433. /^أ/i,
  434. /^ن/i,
  435. /^د/i],
  436. any: [
  437. /^جان/i,
  438. /^فيف/i,
  439. /^مار/i,
  440. /^أفر/i,
  441. /^ماي/i,
  442. /^جوا/i,
  443. /^جوي/i,
  444. /^أوت/i,
  445. /^سبت/i,
  446. /^أكت/i,
  447. /^نوف/i,
  448. /^ديس/i]
  449. };
  450. var matchDayPatterns = {
  451. narrow: /^[حنثرخجس]/i,
  452. short: /^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,
  453. abbreviated: /^(أحد|اثن|ثلا|أرب|خمي|جمعة|سبت)/i,
  454. wide: /^(الأحد|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/i
  455. };
  456. var parseDayPatterns = {
  457. narrow: [/^ح/i, /^ن/i, /^ث/i, /^ر/i, /^خ/i, /^ج/i, /^س/i],
  458. wide: [
  459. /^الأحد/i,
  460. /^الاثنين/i,
  461. /^الثلاثاء/i,
  462. /^الأربعاء/i,
  463. /^الخميس/i,
  464. /^الجمعة/i,
  465. /^السبت/i],
  466. any: [/^أح/i, /^اث/i, /^ث/i, /^أر/i, /^خ/i, /^ج/i, /^س/i]
  467. };
  468. var matchDayPeriodPatterns = {
  469. narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
  470. any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
  471. };
  472. var parseDayPeriodPatterns = {
  473. any: {
  474. am: /^a/i,
  475. pm: /^p/i,
  476. midnight: /^mi/i,
  477. noon: /^no/i,
  478. morning: /morning/i,
  479. afternoon: /afternoon/i,
  480. evening: /evening/i,
  481. night: /night/i
  482. }
  483. };
  484. var match = {
  485. ordinalNumber: buildMatchPatternFn({
  486. matchPattern: matchOrdinalNumberPattern,
  487. parsePattern: parseOrdinalNumberPattern,
  488. valueCallback: function valueCallback(value) {return parseInt(value, 10);}
  489. }),
  490. era: buildMatchFn({
  491. matchPatterns: matchEraPatterns,
  492. defaultMatchWidth: "wide",
  493. parsePatterns: parseEraPatterns,
  494. defaultParseWidth: "any"
  495. }),
  496. quarter: buildMatchFn({
  497. matchPatterns: matchQuarterPatterns,
  498. defaultMatchWidth: "wide",
  499. parsePatterns: parseQuarterPatterns,
  500. defaultParseWidth: "any",
  501. valueCallback: function valueCallback(index) {return Number(index) + 1;}
  502. }),
  503. month: buildMatchFn({
  504. matchPatterns: matchMonthPatterns,
  505. defaultMatchWidth: "wide",
  506. parsePatterns: parseMonthPatterns,
  507. defaultParseWidth: "any"
  508. }),
  509. day: buildMatchFn({
  510. matchPatterns: matchDayPatterns,
  511. defaultMatchWidth: "wide",
  512. parsePatterns: parseDayPatterns,
  513. defaultParseWidth: "any"
  514. }),
  515. dayPeriod: buildMatchFn({
  516. matchPatterns: matchDayPeriodPatterns,
  517. defaultMatchWidth: "any",
  518. parsePatterns: parseDayPeriodPatterns,
  519. defaultParseWidth: "any"
  520. })
  521. };
  522. // lib/locale/ar-DZ.js
  523. var arDZ = {
  524. code: "ar-DZ",
  525. formatDistance: formatDistance,
  526. formatLong: formatLong,
  527. formatRelative: formatRelative,
  528. localize: localize,
  529. match: match,
  530. options: {
  531. weekStartsOn: 0,
  532. firstWeekContainsDate: 1
  533. }
  534. };
  535. // lib/locale/ar-DZ/cdn.js
  536. window.dateFns = _objectSpread(_objectSpread({},
  537. window.dateFns), {}, {
  538. locale: _objectSpread(_objectSpread({}, (_window$dateFns =
  539. window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
  540. arDZ: arDZ }) });
  541. //# debugId=3CD8BDC99FECD03B64756E2164756E21
  542. //# sourceMappingURL=cdn.js.map
  543. })();