云链智安app
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473
  1. export default (function () {
  2. "use strict";
  3. var t = 1e3,
  4. e = 6e4,
  5. n = 36e5,
  6. r = "millisecond",
  7. i = "second",
  8. s = "minute",
  9. u = "hour",
  10. a = "day",
  11. o = "week",
  12. c = "month",
  13. f = "quarter",
  14. h = "year",
  15. d = "date",
  16. l = "Invalid Date",
  17. $ =
  18. /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,
  19. y =
  20. /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,
  21. M = {
  22. name: "en",
  23. weekdays:
  24. "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
  25. months:
  26. "January_February_March_April_May_June_July_August_September_October_November_December".split(
  27. "_",
  28. ),
  29. ordinal: function (t) {
  30. var e = ["th", "st", "nd", "rd"],
  31. n = t % 100;
  32. return "[" + t + (e[(n - 20) % 10] || e[n] || e[0]) + "]";
  33. },
  34. },
  35. m = function (t, e, n) {
  36. var r = String(t);
  37. return !r || r.length >= e ? t : "" + Array(e + 1 - r.length).join(n) + t;
  38. },
  39. v = {
  40. s: m,
  41. z: function (t) {
  42. var e = -t.utcOffset(),
  43. n = Math.abs(e),
  44. r = Math.floor(n / 60),
  45. i = n % 60;
  46. return (e <= 0 ? "+" : "-") + m(r, 2, "0") + ":" + m(i, 2, "0");
  47. },
  48. m: function t(e, n) {
  49. if (e.date() < n.date()) return -t(n, e);
  50. var r = 12 * (n.year() - e.year()) + (n.month() - e.month()),
  51. i = e.clone().add(r, c),
  52. s = n - i < 0,
  53. u = e.clone().add(r + (s ? -1 : 1), c);
  54. return +(-(r + (n - i) / (s ? i - u : u - i)) || 0);
  55. },
  56. a: function (t) {
  57. return t < 0 ? Math.ceil(t) || 0 : Math.floor(t);
  58. },
  59. p: function (t) {
  60. return (
  61. { M: c, y: h, w: o, d: a, D: d, h: u, m: s, s: i, ms: r, Q: f }[t] ||
  62. String(t || "")
  63. .toLowerCase()
  64. .replace(/s$/, "")
  65. );
  66. },
  67. u: function (t) {
  68. return void 0 === t;
  69. },
  70. },
  71. g = "en",
  72. D = {};
  73. D[g] = M;
  74. var p = "$isDayjsObject",
  75. S = function (t) {
  76. return t instanceof _ || !(!t || !t[p]);
  77. },
  78. w = function t(e, n, r) {
  79. var i;
  80. if (!e) return g;
  81. if ("string" == typeof e) {
  82. var s = e.toLowerCase();
  83. D[s] && (i = s), n && ((D[s] = n), (i = s));
  84. var u = e.split("-");
  85. if (!i && u.length > 1) return t(u[0]);
  86. } else {
  87. var a = e.name;
  88. (D[a] = e), (i = a);
  89. }
  90. return !r && i && (g = i), i || (!r && g);
  91. },
  92. O = function (t, e) {
  93. if (S(t)) return t.clone();
  94. var n = "object" == typeof e ? e : {};
  95. return (n.date = t), (n.args = arguments), new _(n);
  96. },
  97. b = v;
  98. (b.l = w),
  99. (b.i = S),
  100. (b.w = function (t, e) {
  101. return O(t, { locale: e.$L, utc: e.$u, x: e.$x, $offset: e.$offset });
  102. });
  103. var _ = (function () {
  104. function M(t) {
  105. (this.$L = w(t.locale, null, !0)),
  106. this.parse(t),
  107. (this.$x = this.$x || t.x || {}),
  108. (this[p] = !0);
  109. }
  110. var m = M.prototype;
  111. return (
  112. (m.parse = function (t) {
  113. (this.$d = (function (t) {
  114. var e = t.date,
  115. n = t.utc;
  116. if (null === e) return new Date(NaN);
  117. if (b.u(e)) return new Date();
  118. if (e instanceof Date) return new Date(e);
  119. if ("string" == typeof e && !/Z$/i.test(e)) {
  120. var r = e.match($);
  121. if (r) {
  122. var i = r[2] - 1 || 0,
  123. s = (r[7] || "0").substring(0, 3);
  124. return n
  125. ? new Date(
  126. Date.UTC(
  127. r[1],
  128. i,
  129. r[3] || 1,
  130. r[4] || 0,
  131. r[5] || 0,
  132. r[6] || 0,
  133. s,
  134. ),
  135. )
  136. : new Date(
  137. r[1],
  138. i,
  139. r[3] || 1,
  140. r[4] || 0,
  141. r[5] || 0,
  142. r[6] || 0,
  143. s,
  144. );
  145. }
  146. }
  147. return new Date(e);
  148. })(t)),
  149. this.init();
  150. }),
  151. (m.init = function () {
  152. var t = this.$d;
  153. (this.$y = t.getFullYear()),
  154. (this.$M = t.getMonth()),
  155. (this.$D = t.getDate()),
  156. (this.$W = t.getDay()),
  157. (this.$H = t.getHours()),
  158. (this.$m = t.getMinutes()),
  159. (this.$s = t.getSeconds()),
  160. (this.$ms = t.getMilliseconds());
  161. }),
  162. (m.$utils = function () {
  163. return b;
  164. }),
  165. (m.isValid = function () {
  166. return !(this.$d.toString() === l);
  167. }),
  168. (m.isSame = function (t, e) {
  169. var n = O(t);
  170. return this.startOf(e) <= n && n <= this.endOf(e);
  171. }),
  172. (m.isAfter = function (t, e) {
  173. return O(t) < this.startOf(e);
  174. }),
  175. (m.isBefore = function (t, e) {
  176. return this.endOf(e) < O(t);
  177. }),
  178. (m.$g = function (t, e, n) {
  179. return b.u(t) ? this[e] : this.set(n, t);
  180. }),
  181. (m.unix = function () {
  182. return Math.floor(this.valueOf() / 1e3);
  183. }),
  184. (m.valueOf = function () {
  185. return this.$d.getTime();
  186. }),
  187. (m.startOf = function (t, e) {
  188. var n = this,
  189. r = !!b.u(e) || e,
  190. f = b.p(t),
  191. l = function (t, e) {
  192. var i = b.w(
  193. n.$u ? Date.UTC(n.$y, e, t) : new Date(n.$y, e, t),
  194. n,
  195. );
  196. return r ? i : i.endOf(a);
  197. },
  198. $ = function (t, e) {
  199. return b.w(
  200. n
  201. .toDate()
  202. [
  203. t
  204. ].apply(n.toDate("s"), (r ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e)),
  205. n,
  206. );
  207. },
  208. y = this.$W,
  209. M = this.$M,
  210. m = this.$D,
  211. v = "set" + (this.$u ? "UTC" : "");
  212. switch (f) {
  213. case h:
  214. return r ? l(1, 0) : l(31, 11);
  215. case c:
  216. return r ? l(1, M) : l(0, M + 1);
  217. case o:
  218. var g = this.$locale().weekStart || 0,
  219. D = (y < g ? y + 7 : y) - g;
  220. return l(r ? m - D : m + (6 - D), M);
  221. case a:
  222. case d:
  223. return $(v + "Hours", 0);
  224. case u:
  225. return $(v + "Minutes", 1);
  226. case s:
  227. return $(v + "Seconds", 2);
  228. case i:
  229. return $(v + "Milliseconds", 3);
  230. default:
  231. return this.clone();
  232. }
  233. }),
  234. (m.endOf = function (t) {
  235. return this.startOf(t, !1);
  236. }),
  237. (m.$set = function (t, e) {
  238. var n,
  239. o = b.p(t),
  240. f = "set" + (this.$u ? "UTC" : ""),
  241. l = ((n = {}),
  242. (n[a] = f + "Date"),
  243. (n[d] = f + "Date"),
  244. (n[c] = f + "Month"),
  245. (n[h] = f + "FullYear"),
  246. (n[u] = f + "Hours"),
  247. (n[s] = f + "Minutes"),
  248. (n[i] = f + "Seconds"),
  249. (n[r] = f + "Milliseconds"),
  250. n)[o],
  251. $ = o === a ? this.$D + (e - this.$W) : e;
  252. if (o === c || o === h) {
  253. var y = this.clone().set(d, 1);
  254. y.$d[l]($),
  255. y.init(),
  256. (this.$d = y.set(d, Math.min(this.$D, y.daysInMonth())).$d);
  257. } else l && this.$d[l]($);
  258. return this.init(), this;
  259. }),
  260. (m.set = function (t, e) {
  261. return this.clone().$set(t, e);
  262. }),
  263. (m.get = function (t) {
  264. return this[b.p(t)]();
  265. }),
  266. (m.add = function (r, f) {
  267. var d,
  268. l = this;
  269. r = Number(r);
  270. var $ = b.p(f),
  271. y = function (t) {
  272. var e = O(l);
  273. return b.w(e.date(e.date() + Math.round(t * r)), l);
  274. };
  275. if ($ === c) return this.set(c, this.$M + r);
  276. if ($ === h) return this.set(h, this.$y + r);
  277. if ($ === a) return y(1);
  278. if ($ === o) return y(7);
  279. var M = ((d = {}), (d[s] = e), (d[u] = n), (d[i] = t), d)[$] || 1,
  280. m = this.$d.getTime() + r * M;
  281. return b.w(m, this);
  282. }),
  283. (m.subtract = function (t, e) {
  284. return this.add(-1 * t, e);
  285. }),
  286. (m.format = function (t) {
  287. var e = this,
  288. n = this.$locale();
  289. if (!this.isValid()) return n.invalidDate || l;
  290. var r = t || "YYYY-MM-DDTHH:mm:ssZ",
  291. i = b.z(this),
  292. s = this.$H,
  293. u = this.$m,
  294. a = this.$M,
  295. o = n.weekdays,
  296. c = n.months,
  297. f = n.meridiem,
  298. h = function (t, n, i, s) {
  299. return (t && (t[n] || t(e, r))) || i[n].slice(0, s);
  300. },
  301. d = function (t) {
  302. return b.s(s % 12 || 12, t, "0");
  303. },
  304. $ =
  305. f ||
  306. function (t, e, n) {
  307. var r = t < 12 ? "AM" : "PM";
  308. return n ? r.toLowerCase() : r;
  309. };
  310. return r.replace(y, function (t, r) {
  311. return (
  312. r ||
  313. (function (t) {
  314. switch (t) {
  315. case "YY":
  316. return String(e.$y).slice(-2);
  317. case "YYYY":
  318. return b.s(e.$y, 4, "0");
  319. case "M":
  320. return a + 1;
  321. case "MM":
  322. return b.s(a + 1, 2, "0");
  323. case "MMM":
  324. return h(n.monthsShort, a, c, 3);
  325. case "MMMM":
  326. return h(c, a);
  327. case "D":
  328. return e.$D;
  329. case "DD":
  330. return b.s(e.$D, 2, "0");
  331. case "d":
  332. return String(e.$W);
  333. case "dd":
  334. return h(n.weekdaysMin, e.$W, o, 2);
  335. case "ddd":
  336. return h(n.weekdaysShort, e.$W, o, 3);
  337. case "dddd":
  338. return o[e.$W];
  339. case "H":
  340. return String(s);
  341. case "HH":
  342. return b.s(s, 2, "0");
  343. case "h":
  344. return d(1);
  345. case "hh":
  346. return d(2);
  347. case "a":
  348. return $(s, u, !0);
  349. case "A":
  350. return $(s, u, !1);
  351. case "m":
  352. return String(u);
  353. case "mm":
  354. return b.s(u, 2, "0");
  355. case "s":
  356. return String(e.$s);
  357. case "ss":
  358. return b.s(e.$s, 2, "0");
  359. case "SSS":
  360. return b.s(e.$ms, 3, "0");
  361. case "Z":
  362. return i;
  363. }
  364. return null;
  365. })(t) ||
  366. i.replace(":", "")
  367. );
  368. });
  369. }),
  370. (m.utcOffset = function () {
  371. return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
  372. }),
  373. (m.diff = function (r, d, l) {
  374. var $,
  375. y = this,
  376. M = b.p(d),
  377. m = O(r),
  378. v = (m.utcOffset() - this.utcOffset()) * e,
  379. g = this - m,
  380. D = function () {
  381. return b.m(y, m);
  382. };
  383. switch (M) {
  384. case h:
  385. $ = D() / 12;
  386. break;
  387. case c:
  388. $ = D();
  389. break;
  390. case f:
  391. $ = D() / 3;
  392. break;
  393. case o:
  394. $ = (g - v) / 6048e5;
  395. break;
  396. case a:
  397. $ = (g - v) / 864e5;
  398. break;
  399. case u:
  400. $ = g / n;
  401. break;
  402. case s:
  403. $ = g / e;
  404. break;
  405. case i:
  406. $ = g / t;
  407. break;
  408. default:
  409. $ = g;
  410. }
  411. return l ? $ : b.a($);
  412. }),
  413. (m.daysInMonth = function () {
  414. return this.endOf(c).$D;
  415. }),
  416. (m.$locale = function () {
  417. return D[this.$L];
  418. }),
  419. (m.locale = function (t, e) {
  420. if (!t) return this.$L;
  421. var n = this.clone(),
  422. r = w(t, e, !0);
  423. return r && (n.$L = r), n;
  424. }),
  425. (m.clone = function () {
  426. return b.w(this.$d, this);
  427. }),
  428. (m.toDate = function () {
  429. return new Date(this.valueOf());
  430. }),
  431. (m.toJSON = function () {
  432. return this.isValid() ? this.toISOString() : null;
  433. }),
  434. (m.toISOString = function () {
  435. return this.$d.toISOString();
  436. }),
  437. (m.toString = function () {
  438. return this.$d.toUTCString();
  439. }),
  440. M
  441. );
  442. })(),
  443. k = _.prototype;
  444. return (
  445. (O.prototype = k),
  446. [
  447. ["$ms", r],
  448. ["$s", i],
  449. ["$m", s],
  450. ["$H", u],
  451. ["$W", a],
  452. ["$M", c],
  453. ["$y", h],
  454. ["$D", d],
  455. ].forEach(function (t) {
  456. k[t[1]] = function (e) {
  457. return this.$g(e, t[0], t[1]);
  458. };
  459. }),
  460. (O.extend = function (t, e) {
  461. return t.$i || (t(e, _, O), (t.$i = !0)), O;
  462. }),
  463. (O.locale = w),
  464. (O.isDayjs = S),
  465. (O.unix = function (t) {
  466. return O(1e3 * t);
  467. }),
  468. (O.en = D[g]),
  469. (O.Ls = D),
  470. (O.p = {}),
  471. O
  472. );
  473. })();