vdrag-topo-utils 1.7.0 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/_virtual/_commonjsHelpers.js +8 -0
- package/dist/es/_virtual/dayjs.min.js +4 -0
- package/dist/es/_virtual/index.js +4 -0
- package/dist/es/node_modules/.pnpm/dayjs@1.11.21/node_modules/dayjs/dayjs.min.js +296 -0
- package/dist/es/node_modules/.pnpm/eventemitter3@5.0.4/node_modules/eventemitter3/index.js +117 -0
- package/dist/es/packages/utils/src/bus.js +5 -0
- package/dist/es/{src → packages/utils/src}/time.js +1 -1
- package/dist/lib/_virtual/_commonjsHelpers.js +1 -0
- package/dist/lib/_virtual/dayjs.min.js +1 -0
- package/dist/lib/_virtual/index.js +1 -0
- package/dist/lib/node_modules/.pnpm/dayjs@1.11.21/node_modules/dayjs/dayjs.min.js +1 -0
- package/dist/lib/node_modules/.pnpm/eventemitter3@5.0.4/node_modules/eventemitter3/index.js +1 -0
- package/dist/lib/packages/utils/src/bus.js +1 -0
- package/dist/lib/packages/utils/src/time.js +1 -0
- package/package.json +1 -1
- package/dist/es/src/bus.js +0 -5
- package/dist/lib/src/bus.js +0 -1
- package/dist/lib/src/time.js +0 -1
- /package/dist/es/{index.js → packages/utils/index.js} +0 -0
- /package/dist/es/{src → packages/utils/src}/app.js +0 -0
- /package/dist/es/{src → packages/utils/src}/browser.js +0 -0
- /package/dist/es/{src → packages/utils/src}/coord.js +0 -0
- /package/dist/es/{src → packages/utils/src}/dom.js +0 -0
- /package/dist/es/{src → packages/utils/src}/file.js +0 -0
- /package/dist/es/{src → packages/utils/src}/http.js +0 -0
- /package/dist/es/{src → packages/utils/src}/image.js +0 -0
- /package/dist/es/{src → packages/utils/src}/mouse.js +0 -0
- /package/dist/es/{src → packages/utils/src}/number.js +0 -0
- /package/dist/es/{src → packages/utils/src}/object.js +0 -0
- /package/dist/es/{src → packages/utils/src}/string.js +0 -0
- /package/dist/es/{src → packages/utils/src}/type.js +0 -0
- /package/dist/es/{src → packages/utils/src}/withinstall.js +0 -0
- /package/dist/es/{types → packages/utils/types}/index.js +0 -0
- /package/dist/lib/{index.js → packages/utils/index.js} +0 -0
- /package/dist/lib/{src → packages/utils/src}/app.js +0 -0
- /package/dist/lib/{src → packages/utils/src}/browser.js +0 -0
- /package/dist/lib/{src → packages/utils/src}/coord.js +0 -0
- /package/dist/lib/{src → packages/utils/src}/dom.js +0 -0
- /package/dist/lib/{src → packages/utils/src}/file.js +0 -0
- /package/dist/lib/{src → packages/utils/src}/http.js +0 -0
- /package/dist/lib/{src → packages/utils/src}/image.js +0 -0
- /package/dist/lib/{src → packages/utils/src}/mouse.js +0 -0
- /package/dist/lib/{src → packages/utils/src}/number.js +0 -0
- /package/dist/lib/{src → packages/utils/src}/object.js +0 -0
- /package/dist/lib/{src → packages/utils/src}/string.js +0 -0
- /package/dist/lib/{src → packages/utils/src}/type.js +0 -0
- /package/dist/lib/{src → packages/utils/src}/withinstall.js +0 -0
- /package/dist/lib/{types → packages/utils/types}/index.js +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var o = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
|
+
function l(e) {
|
|
3
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
|
+
}
|
|
5
|
+
export {
|
|
6
|
+
o as commonjsGlobal,
|
|
7
|
+
l as getDefaultExportFromCjs
|
|
8
|
+
};
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import { commonjsGlobal as Q, getDefaultExportFromCjs as K } from "../../../../../_virtual/_commonjsHelpers.js";
|
|
2
|
+
import { __module as E } from "../../../../../_virtual/dayjs.min.js";
|
|
3
|
+
(function(V, X) {
|
|
4
|
+
(function(W, Y) {
|
|
5
|
+
V.exports = Y();
|
|
6
|
+
})(Q, function() {
|
|
7
|
+
var W = 1e3, Y = 6e4, N = 36e5, A = "millisecond", S = "second", w = "minute", O = "hour", M = "day", T = "week", m = "month", U = "quarter", y = "year", _ = "date", J = "Invalid Date", q = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, B = /\[([^\]]+)]|YYYY|YY|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, G = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(s) {
|
|
8
|
+
var n = ["th", "st", "nd", "rd"], t = s % 100;
|
|
9
|
+
return "[" + s + (n[(t - 20) % 10] || n[t] || n[0]) + "]";
|
|
10
|
+
} }, I = function(s, n, t) {
|
|
11
|
+
var r = String(s);
|
|
12
|
+
return !r || r.length >= n ? s : "" + Array(n + 1 - r.length).join(t) + s;
|
|
13
|
+
}, P = { s: I, z: function(s) {
|
|
14
|
+
var n = -s.utcOffset(), t = Math.abs(n), r = Math.floor(t / 60), e = t % 60;
|
|
15
|
+
return (n <= 0 ? "+" : "-") + I(r, 2, "0") + ":" + I(e, 2, "0");
|
|
16
|
+
}, m: function s(n, t) {
|
|
17
|
+
if (n.date() < t.date())
|
|
18
|
+
return -s(t, n);
|
|
19
|
+
var r = 12 * (t.year() - n.year()) + (t.month() - n.month()), e = n.clone().add(r, m), i = t - e < 0, u = n.clone().add(r + (i ? -1 : 1), m);
|
|
20
|
+
return +(-(r + (t - e) / (i ? e - u : u - e)) || 0);
|
|
21
|
+
}, a: function(s) {
|
|
22
|
+
return s < 0 ? Math.ceil(s) || 0 : Math.floor(s);
|
|
23
|
+
}, p: function(s) {
|
|
24
|
+
return { M: m, y, w: T, d: M, D: _, h: O, m: w, s: S, ms: A, Q: U }[s] || String(s || "").toLowerCase().replace(/s$/, "");
|
|
25
|
+
}, u: function(s) {
|
|
26
|
+
return s === void 0;
|
|
27
|
+
} }, k = "en", D = {};
|
|
28
|
+
D[k] = G;
|
|
29
|
+
var Z = "$isDayjsObject", F = function(s) {
|
|
30
|
+
return s instanceof C || !(!s || !s[Z]);
|
|
31
|
+
}, j = function s(n, t, r) {
|
|
32
|
+
var e;
|
|
33
|
+
if (!n)
|
|
34
|
+
return k;
|
|
35
|
+
if (typeof n == "string") {
|
|
36
|
+
var i = n.toLowerCase();
|
|
37
|
+
D[i] && (e = i), t && (D[i] = t, e = i);
|
|
38
|
+
var u = n.split("-");
|
|
39
|
+
if (!e && u.length > 1)
|
|
40
|
+
return s(u[0]);
|
|
41
|
+
} else {
|
|
42
|
+
var o = n.name;
|
|
43
|
+
D[o] = n, e = o;
|
|
44
|
+
}
|
|
45
|
+
return !r && e && (k = e), e || !r && k;
|
|
46
|
+
}, f = function(s, n) {
|
|
47
|
+
if (F(s))
|
|
48
|
+
return s.clone();
|
|
49
|
+
var t = typeof n == "object" ? n : {};
|
|
50
|
+
return t.date = s, t.args = arguments, new C(t);
|
|
51
|
+
}, a = P;
|
|
52
|
+
a.l = j, a.i = F, a.w = function(s, n) {
|
|
53
|
+
return f(s, { locale: n.$L, utc: n.$u, x: n.$x, $offset: n.$offset });
|
|
54
|
+
};
|
|
55
|
+
var C = function() {
|
|
56
|
+
function s(t) {
|
|
57
|
+
this.$L = j(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[Z] = !0;
|
|
58
|
+
}
|
|
59
|
+
var n = s.prototype;
|
|
60
|
+
return n.parse = function(t) {
|
|
61
|
+
this.$d = function(r) {
|
|
62
|
+
var e = r.date, i = r.utc;
|
|
63
|
+
if (e === null)
|
|
64
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
65
|
+
if (a.u(e))
|
|
66
|
+
return /* @__PURE__ */ new Date();
|
|
67
|
+
if (e instanceof Date)
|
|
68
|
+
return new Date(e);
|
|
69
|
+
if (typeof e == "string" && !/Z$/i.test(e)) {
|
|
70
|
+
var u = e.match(q);
|
|
71
|
+
if (u) {
|
|
72
|
+
var o = u[2] - 1 || 0, c = (u[7] || "0").substring(0, 3);
|
|
73
|
+
return i ? new Date(Date.UTC(u[1], o, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, c)) : new Date(u[1], o, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, c);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return new Date(e);
|
|
77
|
+
}(t), this.init();
|
|
78
|
+
}, n.init = function() {
|
|
79
|
+
var t = this.$d;
|
|
80
|
+
this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
|
|
81
|
+
}, n.$utils = function() {
|
|
82
|
+
return a;
|
|
83
|
+
}, n.isValid = function() {
|
|
84
|
+
return this.$d.toString() !== J;
|
|
85
|
+
}, n.isSame = function(t, r) {
|
|
86
|
+
var e = f(t);
|
|
87
|
+
return this.startOf(r) <= e && e <= this.endOf(r);
|
|
88
|
+
}, n.isAfter = function(t, r) {
|
|
89
|
+
return f(t) < this.startOf(r);
|
|
90
|
+
}, n.isBefore = function(t, r) {
|
|
91
|
+
return this.endOf(r) < f(t);
|
|
92
|
+
}, n.$g = function(t, r, e) {
|
|
93
|
+
return a.u(t) ? this[r] : this.set(e, t);
|
|
94
|
+
}, n.unix = function() {
|
|
95
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
96
|
+
}, n.valueOf = function() {
|
|
97
|
+
return this.$d.getTime();
|
|
98
|
+
}, n.startOf = function(t, r) {
|
|
99
|
+
var e = this, i = !!a.u(r) || r, u = a.p(t), o = function(p, $) {
|
|
100
|
+
var v = a.w(e.$u ? Date.UTC(e.$y, $, p) : new Date(e.$y, $, p), e);
|
|
101
|
+
return i ? v : v.endOf(M);
|
|
102
|
+
}, c = function(p, $) {
|
|
103
|
+
return a.w(e.toDate()[p].apply(e.toDate("s"), (i ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice($)), e);
|
|
104
|
+
}, h = this.$W, d = this.$M, l = this.$D, b = "set" + (this.$u ? "UTC" : "");
|
|
105
|
+
switch (u) {
|
|
106
|
+
case y:
|
|
107
|
+
return i ? o(1, 0) : o(31, 11);
|
|
108
|
+
case m:
|
|
109
|
+
return i ? o(1, d) : o(0, d + 1);
|
|
110
|
+
case T:
|
|
111
|
+
var g = this.$locale().weekStart || 0, x = (h < g ? h + 7 : h) - g;
|
|
112
|
+
return o(i ? l - x : l + (6 - x), d);
|
|
113
|
+
case M:
|
|
114
|
+
case _:
|
|
115
|
+
return c(b + "Hours", 0);
|
|
116
|
+
case O:
|
|
117
|
+
return c(b + "Minutes", 1);
|
|
118
|
+
case w:
|
|
119
|
+
return c(b + "Seconds", 2);
|
|
120
|
+
case S:
|
|
121
|
+
return c(b + "Milliseconds", 3);
|
|
122
|
+
default:
|
|
123
|
+
return this.clone();
|
|
124
|
+
}
|
|
125
|
+
}, n.endOf = function(t) {
|
|
126
|
+
return this.startOf(t, !1);
|
|
127
|
+
}, n.$set = function(t, r) {
|
|
128
|
+
var e, i = a.p(t), u = "set" + (this.$u ? "UTC" : ""), o = (e = {}, e[M] = u + "Date", e[_] = u + "Date", e[m] = u + "Month", e[y] = u + "FullYear", e[O] = u + "Hours", e[w] = u + "Minutes", e[S] = u + "Seconds", e[A] = u + "Milliseconds", e)[i], c = i === M ? this.$D + (r - this.$W) : r;
|
|
129
|
+
if (i === m || i === y) {
|
|
130
|
+
var h = this.clone().set(_, 1);
|
|
131
|
+
h.$d[o](c), h.init(), this.$d = h.set(_, Math.min(this.$D, h.daysInMonth())).$d;
|
|
132
|
+
} else
|
|
133
|
+
o && this.$d[o](c);
|
|
134
|
+
return this.init(), this;
|
|
135
|
+
}, n.set = function(t, r) {
|
|
136
|
+
return this.clone().$set(t, r);
|
|
137
|
+
}, n.get = function(t) {
|
|
138
|
+
return this[a.p(t)]();
|
|
139
|
+
}, n.add = function(t, r) {
|
|
140
|
+
var e, i = this;
|
|
141
|
+
t = Number(t);
|
|
142
|
+
var u = a.p(r), o = function(d) {
|
|
143
|
+
var l = f(i);
|
|
144
|
+
return a.w(l.date(l.date() + Math.round(d * t)), i);
|
|
145
|
+
};
|
|
146
|
+
if (u === m)
|
|
147
|
+
return this.set(m, this.$M + t);
|
|
148
|
+
if (u === y)
|
|
149
|
+
return this.set(y, this.$y + t);
|
|
150
|
+
if (u === M)
|
|
151
|
+
return o(1);
|
|
152
|
+
if (u === T)
|
|
153
|
+
return o(7);
|
|
154
|
+
var c = (e = {}, e[w] = Y, e[O] = N, e[S] = W, e)[u] || 1, h = this.$d.getTime() + t * c;
|
|
155
|
+
return a.w(h, this);
|
|
156
|
+
}, n.subtract = function(t, r) {
|
|
157
|
+
return this.add(-1 * t, r);
|
|
158
|
+
}, n.format = function(t) {
|
|
159
|
+
var r = this, e = this.$locale();
|
|
160
|
+
if (!this.isValid())
|
|
161
|
+
return e.invalidDate || J;
|
|
162
|
+
var i = t || "YYYY-MM-DDTHH:mm:ssZ", u = a.z(this), o = this.$H, c = this.$m, h = this.$M, d = e.weekdays, l = e.months, b = e.meridiem, g = function($, v, H, L) {
|
|
163
|
+
return $ && ($[v] || $(r, i)) || H[v].slice(0, L);
|
|
164
|
+
}, x = function($) {
|
|
165
|
+
return a.s(o % 12 || 12, $, "0");
|
|
166
|
+
}, p = b || function($, v, H) {
|
|
167
|
+
var L = $ < 12 ? "AM" : "PM";
|
|
168
|
+
return H ? L.toLowerCase() : L;
|
|
169
|
+
};
|
|
170
|
+
return i.replace(B, function($, v) {
|
|
171
|
+
return v || function(H) {
|
|
172
|
+
switch (H) {
|
|
173
|
+
case "YY":
|
|
174
|
+
return String(r.$y).slice(-2);
|
|
175
|
+
case "YYYY":
|
|
176
|
+
return a.s(r.$y, 4, "0");
|
|
177
|
+
case "M":
|
|
178
|
+
return h + 1;
|
|
179
|
+
case "MM":
|
|
180
|
+
return a.s(h + 1, 2, "0");
|
|
181
|
+
case "MMM":
|
|
182
|
+
return g(e.monthsShort, h, l, 3);
|
|
183
|
+
case "MMMM":
|
|
184
|
+
return g(l, h);
|
|
185
|
+
case "D":
|
|
186
|
+
return r.$D;
|
|
187
|
+
case "DD":
|
|
188
|
+
return a.s(r.$D, 2, "0");
|
|
189
|
+
case "d":
|
|
190
|
+
return String(r.$W);
|
|
191
|
+
case "dd":
|
|
192
|
+
return g(e.weekdaysMin, r.$W, d, 2);
|
|
193
|
+
case "ddd":
|
|
194
|
+
return g(e.weekdaysShort, r.$W, d, 3);
|
|
195
|
+
case "dddd":
|
|
196
|
+
return d[r.$W];
|
|
197
|
+
case "H":
|
|
198
|
+
return String(o);
|
|
199
|
+
case "HH":
|
|
200
|
+
return a.s(o, 2, "0");
|
|
201
|
+
case "h":
|
|
202
|
+
return x(1);
|
|
203
|
+
case "hh":
|
|
204
|
+
return x(2);
|
|
205
|
+
case "a":
|
|
206
|
+
return p(o, c, !0);
|
|
207
|
+
case "A":
|
|
208
|
+
return p(o, c, !1);
|
|
209
|
+
case "m":
|
|
210
|
+
return String(c);
|
|
211
|
+
case "mm":
|
|
212
|
+
return a.s(c, 2, "0");
|
|
213
|
+
case "s":
|
|
214
|
+
return String(r.$s);
|
|
215
|
+
case "ss":
|
|
216
|
+
return a.s(r.$s, 2, "0");
|
|
217
|
+
case "SSS":
|
|
218
|
+
return a.s(r.$ms, 3, "0");
|
|
219
|
+
case "Z":
|
|
220
|
+
return u;
|
|
221
|
+
}
|
|
222
|
+
return null;
|
|
223
|
+
}($) || u.replace(":", "");
|
|
224
|
+
});
|
|
225
|
+
}, n.utcOffset = function() {
|
|
226
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
227
|
+
}, n.diff = function(t, r, e) {
|
|
228
|
+
var i, u = this, o = a.p(r), c = f(t), h = (c.utcOffset() - this.utcOffset()) * Y, d = this - c, l = function() {
|
|
229
|
+
return a.m(u, c);
|
|
230
|
+
};
|
|
231
|
+
switch (o) {
|
|
232
|
+
case y:
|
|
233
|
+
i = l() / 12;
|
|
234
|
+
break;
|
|
235
|
+
case m:
|
|
236
|
+
i = l();
|
|
237
|
+
break;
|
|
238
|
+
case U:
|
|
239
|
+
i = l() / 3;
|
|
240
|
+
break;
|
|
241
|
+
case T:
|
|
242
|
+
i = (d - h) / 6048e5;
|
|
243
|
+
break;
|
|
244
|
+
case M:
|
|
245
|
+
i = (d - h) / 864e5;
|
|
246
|
+
break;
|
|
247
|
+
case O:
|
|
248
|
+
i = d / N;
|
|
249
|
+
break;
|
|
250
|
+
case w:
|
|
251
|
+
i = d / Y;
|
|
252
|
+
break;
|
|
253
|
+
case S:
|
|
254
|
+
i = d / W;
|
|
255
|
+
break;
|
|
256
|
+
default:
|
|
257
|
+
i = d;
|
|
258
|
+
}
|
|
259
|
+
return e ? i : a.a(i);
|
|
260
|
+
}, n.daysInMonth = function() {
|
|
261
|
+
return this.endOf(m).$D;
|
|
262
|
+
}, n.$locale = function() {
|
|
263
|
+
return D[this.$L];
|
|
264
|
+
}, n.locale = function(t, r) {
|
|
265
|
+
if (!t)
|
|
266
|
+
return this.$L;
|
|
267
|
+
var e = this.clone(), i = j(t, r, !0);
|
|
268
|
+
return i && (e.$L = i), e;
|
|
269
|
+
}, n.clone = function() {
|
|
270
|
+
return a.w(this.$d, this);
|
|
271
|
+
}, n.toDate = function() {
|
|
272
|
+
return new Date(this.valueOf());
|
|
273
|
+
}, n.toJSON = function() {
|
|
274
|
+
return this.isValid() ? this.toISOString() : null;
|
|
275
|
+
}, n.toISOString = function() {
|
|
276
|
+
return this.$d.toISOString();
|
|
277
|
+
}, n.toString = function() {
|
|
278
|
+
return this.$d.toUTCString();
|
|
279
|
+
}, s;
|
|
280
|
+
}(), z = C.prototype;
|
|
281
|
+
return f.prototype = z, [["$ms", A], ["$s", S], ["$m", w], ["$H", O], ["$W", M], ["$M", m], ["$y", y], ["$D", _]].forEach(function(s) {
|
|
282
|
+
z[s[1]] = function(n) {
|
|
283
|
+
return this.$g(n, s[0], s[1]);
|
|
284
|
+
};
|
|
285
|
+
}), f.extend = function(s, n) {
|
|
286
|
+
return s.$i || (s(n, C, f), s.$i = !0), f;
|
|
287
|
+
}, f.locale = j, f.isDayjs = F, f.unix = function(s) {
|
|
288
|
+
return f(1e3 * s);
|
|
289
|
+
}, f.en = D[k], f.Ls = D, f.p = {}, f;
|
|
290
|
+
});
|
|
291
|
+
})(E);
|
|
292
|
+
var R = E.exports;
|
|
293
|
+
const nt = /* @__PURE__ */ K(R);
|
|
294
|
+
export {
|
|
295
|
+
nt as default
|
|
296
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { getDefaultExportFromCjs as b } from "../../../../../_virtual/_commonjsHelpers.js";
|
|
2
|
+
import { __module as x } from "../../../../../_virtual/index.js";
|
|
3
|
+
(function(w) {
|
|
4
|
+
var d = Object.prototype.hasOwnProperty, c = "~";
|
|
5
|
+
function h() {
|
|
6
|
+
}
|
|
7
|
+
Object.create && (h.prototype = /* @__PURE__ */ Object.create(null), new h().__proto__ || (c = !1));
|
|
8
|
+
function g(s, t, n) {
|
|
9
|
+
this.fn = s, this.context = t, this.once = n || !1;
|
|
10
|
+
}
|
|
11
|
+
function m(s, t, n, r, l) {
|
|
12
|
+
if (typeof n != "function")
|
|
13
|
+
throw new TypeError("The listener must be a function");
|
|
14
|
+
var u = new g(n, r || s, l), o = c ? c + t : t;
|
|
15
|
+
return s._events[o] ? s._events[o].fn ? s._events[o] = [s._events[o], u] : s._events[o].push(u) : (s._events[o] = u, s._eventsCount++), s;
|
|
16
|
+
}
|
|
17
|
+
function y(s, t) {
|
|
18
|
+
--s._eventsCount === 0 ? s._events = new h() : delete s._events[t];
|
|
19
|
+
}
|
|
20
|
+
function f() {
|
|
21
|
+
this._events = new h(), this._eventsCount = 0;
|
|
22
|
+
}
|
|
23
|
+
f.prototype.eventNames = function() {
|
|
24
|
+
var t = [], n, r;
|
|
25
|
+
if (this._eventsCount === 0)
|
|
26
|
+
return t;
|
|
27
|
+
for (r in n = this._events)
|
|
28
|
+
d.call(n, r) && t.push(c ? r.slice(1) : r);
|
|
29
|
+
return Object.getOwnPropertySymbols ? t.concat(Object.getOwnPropertySymbols(n)) : t;
|
|
30
|
+
}, f.prototype.listeners = function(t) {
|
|
31
|
+
var n = c ? c + t : t, r = this._events[n];
|
|
32
|
+
if (!r)
|
|
33
|
+
return [];
|
|
34
|
+
if (r.fn)
|
|
35
|
+
return [r.fn];
|
|
36
|
+
for (var l = 0, u = r.length, o = new Array(u); l < u; l++)
|
|
37
|
+
o[l] = r[l].fn;
|
|
38
|
+
return o;
|
|
39
|
+
}, f.prototype.listenerCount = function(t) {
|
|
40
|
+
var n = c ? c + t : t, r = this._events[n];
|
|
41
|
+
return r ? r.fn ? 1 : r.length : 0;
|
|
42
|
+
}, f.prototype.emit = function(t, n, r, l, u, o) {
|
|
43
|
+
var a = c ? c + t : t;
|
|
44
|
+
if (!this._events[a])
|
|
45
|
+
return !1;
|
|
46
|
+
var e = this._events[a], p = arguments.length, v, i;
|
|
47
|
+
if (e.fn) {
|
|
48
|
+
switch (e.once && this.removeListener(t, e.fn, void 0, !0), p) {
|
|
49
|
+
case 1:
|
|
50
|
+
return e.fn.call(e.context), !0;
|
|
51
|
+
case 2:
|
|
52
|
+
return e.fn.call(e.context, n), !0;
|
|
53
|
+
case 3:
|
|
54
|
+
return e.fn.call(e.context, n, r), !0;
|
|
55
|
+
case 4:
|
|
56
|
+
return e.fn.call(e.context, n, r, l), !0;
|
|
57
|
+
case 5:
|
|
58
|
+
return e.fn.call(e.context, n, r, l, u), !0;
|
|
59
|
+
case 6:
|
|
60
|
+
return e.fn.call(e.context, n, r, l, u, o), !0;
|
|
61
|
+
}
|
|
62
|
+
for (i = 1, v = new Array(p - 1); i < p; i++)
|
|
63
|
+
v[i - 1] = arguments[i];
|
|
64
|
+
e.fn.apply(e.context, v);
|
|
65
|
+
} else {
|
|
66
|
+
var E = e.length, _;
|
|
67
|
+
for (i = 0; i < E; i++)
|
|
68
|
+
switch (e[i].once && this.removeListener(t, e[i].fn, void 0, !0), p) {
|
|
69
|
+
case 1:
|
|
70
|
+
e[i].fn.call(e[i].context);
|
|
71
|
+
break;
|
|
72
|
+
case 2:
|
|
73
|
+
e[i].fn.call(e[i].context, n);
|
|
74
|
+
break;
|
|
75
|
+
case 3:
|
|
76
|
+
e[i].fn.call(e[i].context, n, r);
|
|
77
|
+
break;
|
|
78
|
+
case 4:
|
|
79
|
+
e[i].fn.call(e[i].context, n, r, l);
|
|
80
|
+
break;
|
|
81
|
+
default:
|
|
82
|
+
if (!v)
|
|
83
|
+
for (_ = 1, v = new Array(p - 1); _ < p; _++)
|
|
84
|
+
v[_ - 1] = arguments[_];
|
|
85
|
+
e[i].fn.apply(e[i].context, v);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return !0;
|
|
89
|
+
}, f.prototype.on = function(t, n, r) {
|
|
90
|
+
return m(this, t, n, r, !1);
|
|
91
|
+
}, f.prototype.once = function(t, n, r) {
|
|
92
|
+
return m(this, t, n, r, !0);
|
|
93
|
+
}, f.prototype.removeListener = function(t, n, r, l) {
|
|
94
|
+
var u = c ? c + t : t;
|
|
95
|
+
if (!this._events[u])
|
|
96
|
+
return this;
|
|
97
|
+
if (!n)
|
|
98
|
+
return y(this, u), this;
|
|
99
|
+
var o = this._events[u];
|
|
100
|
+
if (o.fn)
|
|
101
|
+
o.fn === n && (!l || o.once) && (!r || o.context === r) && y(this, u);
|
|
102
|
+
else {
|
|
103
|
+
for (var a = 0, e = [], p = o.length; a < p; a++)
|
|
104
|
+
(o[a].fn !== n || l && !o[a].once || r && o[a].context !== r) && e.push(o[a]);
|
|
105
|
+
e.length ? this._events[u] = e.length === 1 ? e[0] : e : y(this, u);
|
|
106
|
+
}
|
|
107
|
+
return this;
|
|
108
|
+
}, f.prototype.removeAllListeners = function(t) {
|
|
109
|
+
var n;
|
|
110
|
+
return t ? (n = c ? c + t : t, this._events[n] && y(this, n)) : (this._events = new h(), this._eventsCount = 0), this;
|
|
111
|
+
}, f.prototype.off = f.prototype.removeListener, f.prototype.addListener = f.prototype.on, f.prefixed = c, f.EventEmitter = f, w.exports = f;
|
|
112
|
+
})(x);
|
|
113
|
+
var L = x.exports;
|
|
114
|
+
const A = /* @__PURE__ */ b(L);
|
|
115
|
+
export {
|
|
116
|
+
A as default
|
|
117
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var o=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}exports.commonjsGlobal=o;exports.getDefaultExportFromCjs=l;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const z=require("../../../../../_virtual/_commonjsHelpers.js"),E=require("../../../../../_virtual/dayjs.min.js");(function(V,X){(function(W,Y){V.exports=Y()})(z.commonjsGlobal,function(){var W=1e3,Y=6e4,N=36e5,A="millisecond",S="second",w="minute",_="hour",M="day",T="week",m="month",U="quarter",y="year",O="date",J="Invalid Date",B=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,G=/\[([^\]]+)]|YYYY|YY|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,P={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(s){var n=["th","st","nd","rd"],t=s%100;return"["+s+(n[(t-20)%10]||n[t]||n[0])+"]"}},I=function(s,n,t){var r=String(s);return!r||r.length>=n?s:""+Array(n+1-r.length).join(t)+s},Q={s:I,z:function(s){var n=-s.utcOffset(),t=Math.abs(n),r=Math.floor(t/60),e=t%60;return(n<=0?"+":"-")+I(r,2,"0")+":"+I(e,2,"0")},m:function s(n,t){if(n.date()<t.date())return-s(t,n);var r=12*(t.year()-n.year())+(t.month()-n.month()),e=n.clone().add(r,m),i=t-e<0,u=n.clone().add(r+(i?-1:1),m);return+(-(r+(t-e)/(i?e-u:u-e))||0)},a:function(s){return s<0?Math.ceil(s)||0:Math.floor(s)},p:function(s){return{M:m,y,w:T,d:M,D:O,h:_,m:w,s:S,ms:A,Q:U}[s]||String(s||"").toLowerCase().replace(/s$/,"")},u:function(s){return s===void 0}},k="en",D={};D[k]=P;var Z="$isDayjsObject",F=function(s){return s instanceof C||!(!s||!s[Z])},j=function s(n,t,r){var e;if(!n)return k;if(typeof n=="string"){var i=n.toLowerCase();D[i]&&(e=i),t&&(D[i]=t,e=i);var u=n.split("-");if(!e&&u.length>1)return s(u[0])}else{var o=n.name;D[o]=n,e=o}return!r&&e&&(k=e),e||!r&&k},f=function(s,n){if(F(s))return s.clone();var t=typeof n=="object"?n:{};return t.date=s,t.args=arguments,new C(t)},a=Q;a.l=j,a.i=F,a.w=function(s,n){return f(s,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var C=function(){function s(t){this.$L=j(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[Z]=!0}var n=s.prototype;return n.parse=function(t){this.$d=function(r){var e=r.date,i=r.utc;if(e===null)return new Date(NaN);if(a.u(e))return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){var u=e.match(B);if(u){var o=u[2]-1||0,c=(u[7]||"0").substring(0,3);return i?new Date(Date.UTC(u[1],o,u[3]||1,u[4]||0,u[5]||0,u[6]||0,c)):new Date(u[1],o,u[3]||1,u[4]||0,u[5]||0,u[6]||0,c)}}return new Date(e)}(t),this.init()},n.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},n.$utils=function(){return a},n.isValid=function(){return this.$d.toString()!==J},n.isSame=function(t,r){var e=f(t);return this.startOf(r)<=e&&e<=this.endOf(r)},n.isAfter=function(t,r){return f(t)<this.startOf(r)},n.isBefore=function(t,r){return this.endOf(r)<f(t)},n.$g=function(t,r,e){return a.u(t)?this[r]:this.set(e,t)},n.unix=function(){return Math.floor(this.valueOf()/1e3)},n.valueOf=function(){return this.$d.getTime()},n.startOf=function(t,r){var e=this,i=!!a.u(r)||r,u=a.p(t),o=function(p,$){var v=a.w(e.$u?Date.UTC(e.$y,$,p):new Date(e.$y,$,p),e);return i?v:v.endOf(M)},c=function(p,$){return a.w(e.toDate()[p].apply(e.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice($)),e)},h=this.$W,d=this.$M,l=this.$D,b="set"+(this.$u?"UTC":"");switch(u){case y:return i?o(1,0):o(31,11);case m:return i?o(1,d):o(0,d+1);case T:var g=this.$locale().weekStart||0,x=(h<g?h+7:h)-g;return o(i?l-x:l+(6-x),d);case M:case O:return c(b+"Hours",0);case _:return c(b+"Minutes",1);case w:return c(b+"Seconds",2);case S:return c(b+"Milliseconds",3);default:return this.clone()}},n.endOf=function(t){return this.startOf(t,!1)},n.$set=function(t,r){var e,i=a.p(t),u="set"+(this.$u?"UTC":""),o=(e={},e[M]=u+"Date",e[O]=u+"Date",e[m]=u+"Month",e[y]=u+"FullYear",e[_]=u+"Hours",e[w]=u+"Minutes",e[S]=u+"Seconds",e[A]=u+"Milliseconds",e)[i],c=i===M?this.$D+(r-this.$W):r;if(i===m||i===y){var h=this.clone().set(O,1);h.$d[o](c),h.init(),this.$d=h.set(O,Math.min(this.$D,h.daysInMonth())).$d}else o&&this.$d[o](c);return this.init(),this},n.set=function(t,r){return this.clone().$set(t,r)},n.get=function(t){return this[a.p(t)]()},n.add=function(t,r){var e,i=this;t=Number(t);var u=a.p(r),o=function(d){var l=f(i);return a.w(l.date(l.date()+Math.round(d*t)),i)};if(u===m)return this.set(m,this.$M+t);if(u===y)return this.set(y,this.$y+t);if(u===M)return o(1);if(u===T)return o(7);var c=(e={},e[w]=Y,e[_]=N,e[S]=W,e)[u]||1,h=this.$d.getTime()+t*c;return a.w(h,this)},n.subtract=function(t,r){return this.add(-1*t,r)},n.format=function(t){var r=this,e=this.$locale();if(!this.isValid())return e.invalidDate||J;var i=t||"YYYY-MM-DDTHH:mm:ssZ",u=a.z(this),o=this.$H,c=this.$m,h=this.$M,d=e.weekdays,l=e.months,b=e.meridiem,g=function($,v,H,L){return $&&($[v]||$(r,i))||H[v].slice(0,L)},x=function($){return a.s(o%12||12,$,"0")},p=b||function($,v,H){var L=$<12?"AM":"PM";return H?L.toLowerCase():L};return i.replace(G,function($,v){return v||function(H){switch(H){case"YY":return String(r.$y).slice(-2);case"YYYY":return a.s(r.$y,4,"0");case"M":return h+1;case"MM":return a.s(h+1,2,"0");case"MMM":return g(e.monthsShort,h,l,3);case"MMMM":return g(l,h);case"D":return r.$D;case"DD":return a.s(r.$D,2,"0");case"d":return String(r.$W);case"dd":return g(e.weekdaysMin,r.$W,d,2);case"ddd":return g(e.weekdaysShort,r.$W,d,3);case"dddd":return d[r.$W];case"H":return String(o);case"HH":return a.s(o,2,"0");case"h":return x(1);case"hh":return x(2);case"a":return p(o,c,!0);case"A":return p(o,c,!1);case"m":return String(c);case"mm":return a.s(c,2,"0");case"s":return String(r.$s);case"ss":return a.s(r.$s,2,"0");case"SSS":return a.s(r.$ms,3,"0");case"Z":return u}return null}($)||u.replace(":","")})},n.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},n.diff=function(t,r,e){var i,u=this,o=a.p(r),c=f(t),h=(c.utcOffset()-this.utcOffset())*Y,d=this-c,l=function(){return a.m(u,c)};switch(o){case y:i=l()/12;break;case m:i=l();break;case U:i=l()/3;break;case T:i=(d-h)/6048e5;break;case M:i=(d-h)/864e5;break;case _:i=d/N;break;case w:i=d/Y;break;case S:i=d/W;break;default:i=d}return e?i:a.a(i)},n.daysInMonth=function(){return this.endOf(m).$D},n.$locale=function(){return D[this.$L]},n.locale=function(t,r){if(!t)return this.$L;var e=this.clone(),i=j(t,r,!0);return i&&(e.$L=i),e},n.clone=function(){return a.w(this.$d,this)},n.toDate=function(){return new Date(this.valueOf())},n.toJSON=function(){return this.isValid()?this.toISOString():null},n.toISOString=function(){return this.$d.toISOString()},n.toString=function(){return this.$d.toUTCString()},s}(),q=C.prototype;return f.prototype=q,[["$ms",A],["$s",S],["$m",w],["$H",_],["$W",M],["$M",m],["$y",y],["$D",O]].forEach(function(s){q[s[1]]=function(n){return this.$g(n,s[0],s[1])}}),f.extend=function(s,n){return s.$i||(s(n,C,f),s.$i=!0),f},f.locale=j,f.isDayjs=F,f.unix=function(s){return f(1e3*s)},f.en=D[k],f.Ls=D,f.p={},f})})(E.__module);var K=E.__module.exports;const R=z.getDefaultExportFromCjs(K);module.exports=R;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const b=require("../../../../../_virtual/_commonjsHelpers.js"),m=require("../../../../../_virtual/index.js");(function(d){var w=Object.prototype.hasOwnProperty,c="~";function h(){}Object.create&&(h.prototype=Object.create(null),new h().__proto__||(c=!1));function g(s,t,n){this.fn=s,this.context=t,this.once=n||!1}function x(s,t,n,r,l){if(typeof n!="function")throw new TypeError("The listener must be a function");var u=new g(n,r||s,l),o=c?c+t:t;return s._events[o]?s._events[o].fn?s._events[o]=[s._events[o],u]:s._events[o].push(u):(s._events[o]=u,s._eventsCount++),s}function y(s,t){--s._eventsCount===0?s._events=new h:delete s._events[t]}function f(){this._events=new h,this._eventsCount=0}f.prototype.eventNames=function(){var t=[],n,r;if(this._eventsCount===0)return t;for(r in n=this._events)w.call(n,r)&&t.push(c?r.slice(1):r);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(n)):t},f.prototype.listeners=function(t){var n=c?c+t:t,r=this._events[n];if(!r)return[];if(r.fn)return[r.fn];for(var l=0,u=r.length,o=new Array(u);l<u;l++)o[l]=r[l].fn;return o},f.prototype.listenerCount=function(t){var n=c?c+t:t,r=this._events[n];return r?r.fn?1:r.length:0},f.prototype.emit=function(t,n,r,l,u,o){var a=c?c+t:t;if(!this._events[a])return!1;var e=this._events[a],p=arguments.length,v,i;if(e.fn){switch(e.once&&this.removeListener(t,e.fn,void 0,!0),p){case 1:return e.fn.call(e.context),!0;case 2:return e.fn.call(e.context,n),!0;case 3:return e.fn.call(e.context,n,r),!0;case 4:return e.fn.call(e.context,n,r,l),!0;case 5:return e.fn.call(e.context,n,r,l,u),!0;case 6:return e.fn.call(e.context,n,r,l,u,o),!0}for(i=1,v=new Array(p-1);i<p;i++)v[i-1]=arguments[i];e.fn.apply(e.context,v)}else{var E=e.length,_;for(i=0;i<E;i++)switch(e[i].once&&this.removeListener(t,e[i].fn,void 0,!0),p){case 1:e[i].fn.call(e[i].context);break;case 2:e[i].fn.call(e[i].context,n);break;case 3:e[i].fn.call(e[i].context,n,r);break;case 4:e[i].fn.call(e[i].context,n,r,l);break;default:if(!v)for(_=1,v=new Array(p-1);_<p;_++)v[_-1]=arguments[_];e[i].fn.apply(e[i].context,v)}}return!0},f.prototype.on=function(t,n,r){return x(this,t,n,r,!1)},f.prototype.once=function(t,n,r){return x(this,t,n,r,!0)},f.prototype.removeListener=function(t,n,r,l){var u=c?c+t:t;if(!this._events[u])return this;if(!n)return y(this,u),this;var o=this._events[u];if(o.fn)o.fn===n&&(!l||o.once)&&(!r||o.context===r)&&y(this,u);else{for(var a=0,e=[],p=o.length;a<p;a++)(o[a].fn!==n||l&&!o[a].once||r&&o[a].context!==r)&&e.push(o[a]);e.length?this._events[u]=e.length===1?e[0]:e:y(this,u)}return this},f.prototype.removeAllListeners=function(t){var n;return t?(n=c?c+t:t,this._events[n]&&y(this,n)):(this._events=new h,this._eventsCount=0),this},f.prototype.off=f.prototype.removeListener,f.prototype.addListener=f.prototype.on,f.prefixed=c,f.EventEmitter=f,d.exports=f})(m.__module);var L=m.__module.exports;const C=b.getDefaultExportFromCjs(L);module.exports=C;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("../../../node_modules/.pnpm/eventemitter3@5.0.4/node_modules/eventemitter3/index.js"),s=new e;module.exports=s;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../../../node_modules/.pnpm/dayjs@1.11.21/node_modules/dayjs/dayjs.min.js");function i(){return Date.now()}const u=(e=Date.now(),n="Y-M-D h:m:s")=>{const o=new Date(e||Date.now()),t={Y:`${o.getFullYear()}`,M:`${o.getMonth()+1}`,D:`${o.getDate()}`,h:o.getHours(),m:o.getMinutes(),s:o.getSeconds()},r=c=>c>10?c:"0"+c;return(n||"Y-M-D h:m:s").replace("Y",t.Y).replace("M",t.M).replace("D",t.D).replace("h",r(t.h)).replace("m",r(t.m)).replace("s",r(t.s))},m=e=>Number(e)>=10?e:"0"+e;function D(){let e=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(o){const t=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(o=="x"?t:t&3|8).toString(16)})}function f(e){const n=new Date;let t=new Date(e).getTime()-n.getTime();return t<=0&&(t=0),Math.ceil(t/(60*60*24*1e3))}const l=(e,n)=>(n-e)/(1e3*3600*24),x=e=>{const n=new Date;let t=new Date(e).getTime()-n.getTime();return t<=0&&(t=0),Math.ceil(t/(60*60*24*1e3))};function g(e,n,o,t){const r=s(`${e} ${n}`),a=s(`${o} ${t}`);return!r.isValid()||!a.isValid()||a.isBefore(r)?!1:a.isAfter(r.add(1,"year"))}function d(e){if(!e)return"";const n=String(e).trim().split(":");return n.length>=2?`${n[0]}:${n[1]}`:""}const h=(e,n,o)=>{const t=e*60*60,r=n*60,a=o;return Number(t)+Number(r)+Number(a)},T=e=>{const n=Math.floor(e/3600),o=Math.floor(e%(60*60)/60),t=Math.floor(e%60);return`${n}时${o}分${t}秒`};exports.calcTotalFlightTime=h;exports.countDown=x;exports.formatDate=u;exports.formatDate_02=m;exports.formatShortTime=d;exports.formatTime=T;exports.generateUUID=D;exports.getDaysDiffBetweenDates=l;exports.getDaysDiffFromNow=f;exports.getTimestamp=i;exports.isExceedOneYear=g;
|
package/package.json
CHANGED
package/dist/es/src/bus.js
DELETED
package/dist/lib/src/bus.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("eventemitter3"),t=new e.EventEmitter;module.exports=t;
|
package/dist/lib/src/time.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("dayjs");function i(){return Date.now()}const u=(e=Date.now(),n="Y-M-D h:m:s")=>{const o=new Date(e||Date.now()),t={Y:`${o.getFullYear()}`,M:`${o.getMonth()+1}`,D:`${o.getDate()}`,h:o.getHours(),m:o.getMinutes(),s:o.getSeconds()},r=c=>c>10?c:"0"+c;return(n||"Y-M-D h:m:s").replace("Y",t.Y).replace("M",t.M).replace("D",t.D).replace("h",r(t.h)).replace("m",r(t.m)).replace("s",r(t.s))},m=e=>Number(e)>=10?e:"0"+e;function D(){let e=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(o){const t=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(o=="x"?t:t&3|8).toString(16)})}function f(e){const n=new Date;let t=new Date(e).getTime()-n.getTime();return t<=0&&(t=0),Math.ceil(t/(60*60*24*1e3))}const l=(e,n)=>(n-e)/(1e3*3600*24),x=e=>{const n=new Date;let t=new Date(e).getTime()-n.getTime();return t<=0&&(t=0),Math.ceil(t/(60*60*24*1e3))};function g(e,n,o,t){const r=s(`${e} ${n}`),a=s(`${o} ${t}`);return!r.isValid()||!a.isValid()||a.isBefore(r)?!1:a.isAfter(r.add(1,"year"))}function d(e){if(!e)return"";const n=String(e).trim().split(":");return n.length>=2?`${n[0]}:${n[1]}`:""}const h=(e,n,o)=>{const t=e*60*60,r=n*60,a=o;return Number(t)+Number(r)+Number(a)},T=e=>{const n=Math.floor(e/3600),o=Math.floor(e%(60*60)/60),t=Math.floor(e%60);return`${n}时${o}分${t}秒`};exports.calcTotalFlightTime=h;exports.countDown=x;exports.formatDate=u;exports.formatDate_02=m;exports.formatShortTime=d;exports.formatTime=T;exports.generateUUID=D;exports.getDaysDiffBetweenDates=l;exports.getDaysDiffFromNow=f;exports.getTimestamp=i;exports.isExceedOneYear=g;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|