yxuse 3.0.26 → 3.0.27
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/lib/_commonjsHelpers.cjs.js +1 -0
- package/lib/_commonjsHelpers.es.js +8 -0
- package/lib/components.cjs.js +1 -1
- package/lib/components.es.js +12 -10
- package/lib/hooks.cjs.js +1 -1
- package/lib/hooks.es.js +3 -2
- package/lib/index.cjs.js +1 -1
- package/lib/index.cjs10.js +1 -0
- package/lib/index.cjs2.js +5 -36
- package/lib/index.cjs2.js.gz +0 -0
- package/lib/index.cjs6.js +32 -1
- package/lib/index.cjs6.js.gz +0 -0
- package/lib/index.es.js +16 -14
- package/lib/index.es10.js +310 -0
- package/lib/index.es10.js.gz +0 -0
- package/lib/index.es2.js +1806 -7140
- package/lib/index.es2.js.gz +0 -0
- package/lib/index.es6.js +5373 -304
- package/lib/index.es6.js.gz +0 -0
- package/lib/index.es7.js +2 -2
- package/lib/index.es7.js.gz +0 -0
- package/lib/index.es9.js +4 -4
- package/lib/theme.cjs.js +1 -1
- package/lib/theme.es.js +12 -10
- package/lib/translate.cjs.js +1 -0
- package/lib/translate.es.js +11 -0
- package/package.json +6 -1
- package/types/translate/index.d.ts +2 -2
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
import { ref as R } from "vue";
|
|
2
|
+
import { c as X, g as tt } from "./_commonjsHelpers.es.js";
|
|
3
|
+
var q = { exports: {} };
|
|
4
|
+
(function(H, st) {
|
|
5
|
+
(function(A, x) {
|
|
6
|
+
H.exports = x();
|
|
7
|
+
})(X, function() {
|
|
8
|
+
var A = 1e3, x = 6e4, z = 36e5, I = "millisecond", S = "second", w = "minute", _ = "hour", M = "day", j = "week", m = "month", E = "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 = /\[([^\]]+)]|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, Q = { 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) {
|
|
9
|
+
var n = ["th", "st", "nd", "rd"], t = s % 100;
|
|
10
|
+
return "[" + s + (n[(t - 20) % 10] || n[t] || n[0]) + "]";
|
|
11
|
+
} }, F = function(s, n, t) {
|
|
12
|
+
var r = String(s);
|
|
13
|
+
return !r || r.length >= n ? s : "" + Array(n + 1 - r.length).join(t) + s;
|
|
14
|
+
}, K = { s: F, z: function(s) {
|
|
15
|
+
var n = -s.utcOffset(), t = Math.abs(n), r = Math.floor(t / 60), e = t % 60;
|
|
16
|
+
return (n <= 0 ? "+" : "-") + F(r, 2, "0") + ":" + F(e, 2, "0");
|
|
17
|
+
}, m: function s(n, t) {
|
|
18
|
+
if (n.date() < t.date())
|
|
19
|
+
return -s(t, n);
|
|
20
|
+
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);
|
|
21
|
+
return +(-(r + (t - e) / (i ? e - u : u - e)) || 0);
|
|
22
|
+
}, a: function(s) {
|
|
23
|
+
return s < 0 ? Math.ceil(s) || 0 : Math.floor(s);
|
|
24
|
+
}, p: function(s) {
|
|
25
|
+
return { M: m, y, w: j, d: M, D: O, h: _, m: w, s: S, ms: I, Q: E }[s] || String(s || "").toLowerCase().replace(/s$/, "");
|
|
26
|
+
}, u: function(s) {
|
|
27
|
+
return s === void 0;
|
|
28
|
+
} }, Y = "en", g = {};
|
|
29
|
+
g[Y] = Q;
|
|
30
|
+
var Z = "$isDayjsObject", N = function(s) {
|
|
31
|
+
return s instanceof L || !(!s || !s[Z]);
|
|
32
|
+
}, C = function s(n, t, r) {
|
|
33
|
+
var e;
|
|
34
|
+
if (!n)
|
|
35
|
+
return Y;
|
|
36
|
+
if (typeof n == "string") {
|
|
37
|
+
var i = n.toLowerCase();
|
|
38
|
+
g[i] && (e = i), t && (g[i] = t, e = i);
|
|
39
|
+
var u = n.split("-");
|
|
40
|
+
if (!e && u.length > 1)
|
|
41
|
+
return s(u[0]);
|
|
42
|
+
} else {
|
|
43
|
+
var o = n.name;
|
|
44
|
+
g[o] = n, e = o;
|
|
45
|
+
}
|
|
46
|
+
return !r && e && (Y = e), e || !r && Y;
|
|
47
|
+
}, f = function(s, n) {
|
|
48
|
+
if (N(s))
|
|
49
|
+
return s.clone();
|
|
50
|
+
var t = typeof n == "object" ? n : {};
|
|
51
|
+
return t.date = s, t.args = arguments, new L(t);
|
|
52
|
+
}, a = K;
|
|
53
|
+
a.l = C, a.i = N, a.w = function(s, n) {
|
|
54
|
+
return f(s, { locale: n.$L, utc: n.$u, x: n.$x, $offset: n.$offset });
|
|
55
|
+
};
|
|
56
|
+
var L = function() {
|
|
57
|
+
function s(t) {
|
|
58
|
+
this.$L = C(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[Z] = !0;
|
|
59
|
+
}
|
|
60
|
+
var n = s.prototype;
|
|
61
|
+
return n.parse = function(t) {
|
|
62
|
+
this.$d = function(r) {
|
|
63
|
+
var e = r.date, i = r.utc;
|
|
64
|
+
if (e === null)
|
|
65
|
+
return /* @__PURE__ */ new Date(NaN);
|
|
66
|
+
if (a.u(e))
|
|
67
|
+
return /* @__PURE__ */ new Date();
|
|
68
|
+
if (e instanceof Date)
|
|
69
|
+
return new Date(e);
|
|
70
|
+
if (typeof e == "string" && !/Z$/i.test(e)) {
|
|
71
|
+
var u = e.match(B);
|
|
72
|
+
if (u) {
|
|
73
|
+
var o = u[2] - 1 || 0, c = (u[7] || "0").substring(0, 3);
|
|
74
|
+
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);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return new Date(e);
|
|
78
|
+
}(t), this.init();
|
|
79
|
+
}, n.init = function() {
|
|
80
|
+
var t = this.$d;
|
|
81
|
+
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();
|
|
82
|
+
}, n.$utils = function() {
|
|
83
|
+
return a;
|
|
84
|
+
}, n.isValid = function() {
|
|
85
|
+
return this.$d.toString() !== J;
|
|
86
|
+
}, n.isSame = function(t, r) {
|
|
87
|
+
var e = f(t);
|
|
88
|
+
return this.startOf(r) <= e && e <= this.endOf(r);
|
|
89
|
+
}, n.isAfter = function(t, r) {
|
|
90
|
+
return f(t) < this.startOf(r);
|
|
91
|
+
}, n.isBefore = function(t, r) {
|
|
92
|
+
return this.endOf(r) < f(t);
|
|
93
|
+
}, n.$g = function(t, r, e) {
|
|
94
|
+
return a.u(t) ? this[r] : this.set(e, t);
|
|
95
|
+
}, n.unix = function() {
|
|
96
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
97
|
+
}, n.valueOf = function() {
|
|
98
|
+
return this.$d.getTime();
|
|
99
|
+
}, n.startOf = function(t, r) {
|
|
100
|
+
var e = this, i = !!a.u(r) || r, u = a.p(t), o = function(p, l) {
|
|
101
|
+
var v = a.w(e.$u ? Date.UTC(e.$y, l, p) : new Date(e.$y, l, p), e);
|
|
102
|
+
return i ? v : v.endOf(M);
|
|
103
|
+
}, c = function(p, l) {
|
|
104
|
+
return a.w(e.toDate()[p].apply(e.toDate("s"), (i ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(l)), e);
|
|
105
|
+
}, h = this.$W, d = this.$M, $ = this.$D, b = "set" + (this.$u ? "UTC" : "");
|
|
106
|
+
switch (u) {
|
|
107
|
+
case y:
|
|
108
|
+
return i ? o(1, 0) : o(31, 11);
|
|
109
|
+
case m:
|
|
110
|
+
return i ? o(1, d) : o(0, d + 1);
|
|
111
|
+
case j:
|
|
112
|
+
var D = this.$locale().weekStart || 0, k = (h < D ? h + 7 : h) - D;
|
|
113
|
+
return o(i ? $ - k : $ + (6 - k), d);
|
|
114
|
+
case M:
|
|
115
|
+
case O:
|
|
116
|
+
return c(b + "Hours", 0);
|
|
117
|
+
case _:
|
|
118
|
+
return c(b + "Minutes", 1);
|
|
119
|
+
case w:
|
|
120
|
+
return c(b + "Seconds", 2);
|
|
121
|
+
case S:
|
|
122
|
+
return c(b + "Milliseconds", 3);
|
|
123
|
+
default:
|
|
124
|
+
return this.clone();
|
|
125
|
+
}
|
|
126
|
+
}, n.endOf = function(t) {
|
|
127
|
+
return this.startOf(t, !1);
|
|
128
|
+
}, n.$set = function(t, r) {
|
|
129
|
+
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[I] = u + "Milliseconds", e)[i], c = i === M ? this.$D + (r - this.$W) : r;
|
|
130
|
+
if (i === m || i === y) {
|
|
131
|
+
var h = this.clone().set(O, 1);
|
|
132
|
+
h.$d[o](c), h.init(), this.$d = h.set(O, Math.min(this.$D, h.daysInMonth())).$d;
|
|
133
|
+
} else
|
|
134
|
+
o && this.$d[o](c);
|
|
135
|
+
return this.init(), this;
|
|
136
|
+
}, n.set = function(t, r) {
|
|
137
|
+
return this.clone().$set(t, r);
|
|
138
|
+
}, n.get = function(t) {
|
|
139
|
+
return this[a.p(t)]();
|
|
140
|
+
}, n.add = function(t, r) {
|
|
141
|
+
var e, i = this;
|
|
142
|
+
t = Number(t);
|
|
143
|
+
var u = a.p(r), o = function(d) {
|
|
144
|
+
var $ = f(i);
|
|
145
|
+
return a.w($.date($.date() + Math.round(d * t)), i);
|
|
146
|
+
};
|
|
147
|
+
if (u === m)
|
|
148
|
+
return this.set(m, this.$M + t);
|
|
149
|
+
if (u === y)
|
|
150
|
+
return this.set(y, this.$y + t);
|
|
151
|
+
if (u === M)
|
|
152
|
+
return o(1);
|
|
153
|
+
if (u === j)
|
|
154
|
+
return o(7);
|
|
155
|
+
var c = (e = {}, e[w] = x, e[_] = z, e[S] = A, e)[u] || 1, h = this.$d.getTime() + t * c;
|
|
156
|
+
return a.w(h, this);
|
|
157
|
+
}, n.subtract = function(t, r) {
|
|
158
|
+
return this.add(-1 * t, r);
|
|
159
|
+
}, n.format = function(t) {
|
|
160
|
+
var r = this, e = this.$locale();
|
|
161
|
+
if (!this.isValid())
|
|
162
|
+
return e.invalidDate || J;
|
|
163
|
+
var i = t || "YYYY-MM-DDTHH:mm:ssZ", u = a.z(this), o = this.$H, c = this.$m, h = this.$M, d = e.weekdays, $ = e.months, b = e.meridiem, D = function(l, v, T, W) {
|
|
164
|
+
return l && (l[v] || l(r, i)) || T[v].slice(0, W);
|
|
165
|
+
}, k = function(l) {
|
|
166
|
+
return a.s(o % 12 || 12, l, "0");
|
|
167
|
+
}, p = b || function(l, v, T) {
|
|
168
|
+
var W = l < 12 ? "AM" : "PM";
|
|
169
|
+
return T ? W.toLowerCase() : W;
|
|
170
|
+
};
|
|
171
|
+
return i.replace(G, function(l, v) {
|
|
172
|
+
return v || function(T) {
|
|
173
|
+
switch (T) {
|
|
174
|
+
case "YY":
|
|
175
|
+
return String(r.$y).slice(-2);
|
|
176
|
+
case "YYYY":
|
|
177
|
+
return a.s(r.$y, 4, "0");
|
|
178
|
+
case "M":
|
|
179
|
+
return h + 1;
|
|
180
|
+
case "MM":
|
|
181
|
+
return a.s(h + 1, 2, "0");
|
|
182
|
+
case "MMM":
|
|
183
|
+
return D(e.monthsShort, h, $, 3);
|
|
184
|
+
case "MMMM":
|
|
185
|
+
return D($, h);
|
|
186
|
+
case "D":
|
|
187
|
+
return r.$D;
|
|
188
|
+
case "DD":
|
|
189
|
+
return a.s(r.$D, 2, "0");
|
|
190
|
+
case "d":
|
|
191
|
+
return String(r.$W);
|
|
192
|
+
case "dd":
|
|
193
|
+
return D(e.weekdaysMin, r.$W, d, 2);
|
|
194
|
+
case "ddd":
|
|
195
|
+
return D(e.weekdaysShort, r.$W, d, 3);
|
|
196
|
+
case "dddd":
|
|
197
|
+
return d[r.$W];
|
|
198
|
+
case "H":
|
|
199
|
+
return String(o);
|
|
200
|
+
case "HH":
|
|
201
|
+
return a.s(o, 2, "0");
|
|
202
|
+
case "h":
|
|
203
|
+
return k(1);
|
|
204
|
+
case "hh":
|
|
205
|
+
return k(2);
|
|
206
|
+
case "a":
|
|
207
|
+
return p(o, c, !0);
|
|
208
|
+
case "A":
|
|
209
|
+
return p(o, c, !1);
|
|
210
|
+
case "m":
|
|
211
|
+
return String(c);
|
|
212
|
+
case "mm":
|
|
213
|
+
return a.s(c, 2, "0");
|
|
214
|
+
case "s":
|
|
215
|
+
return String(r.$s);
|
|
216
|
+
case "ss":
|
|
217
|
+
return a.s(r.$s, 2, "0");
|
|
218
|
+
case "SSS":
|
|
219
|
+
return a.s(r.$ms, 3, "0");
|
|
220
|
+
case "Z":
|
|
221
|
+
return u;
|
|
222
|
+
}
|
|
223
|
+
return null;
|
|
224
|
+
}(l) || u.replace(":", "");
|
|
225
|
+
});
|
|
226
|
+
}, n.utcOffset = function() {
|
|
227
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
228
|
+
}, n.diff = function(t, r, e) {
|
|
229
|
+
var i, u = this, o = a.p(r), c = f(t), h = (c.utcOffset() - this.utcOffset()) * x, d = this - c, $ = function() {
|
|
230
|
+
return a.m(u, c);
|
|
231
|
+
};
|
|
232
|
+
switch (o) {
|
|
233
|
+
case y:
|
|
234
|
+
i = $() / 12;
|
|
235
|
+
break;
|
|
236
|
+
case m:
|
|
237
|
+
i = $();
|
|
238
|
+
break;
|
|
239
|
+
case E:
|
|
240
|
+
i = $() / 3;
|
|
241
|
+
break;
|
|
242
|
+
case j:
|
|
243
|
+
i = (d - h) / 6048e5;
|
|
244
|
+
break;
|
|
245
|
+
case M:
|
|
246
|
+
i = (d - h) / 864e5;
|
|
247
|
+
break;
|
|
248
|
+
case _:
|
|
249
|
+
i = d / z;
|
|
250
|
+
break;
|
|
251
|
+
case w:
|
|
252
|
+
i = d / x;
|
|
253
|
+
break;
|
|
254
|
+
case S:
|
|
255
|
+
i = d / A;
|
|
256
|
+
break;
|
|
257
|
+
default:
|
|
258
|
+
i = d;
|
|
259
|
+
}
|
|
260
|
+
return e ? i : a.a(i);
|
|
261
|
+
}, n.daysInMonth = function() {
|
|
262
|
+
return this.endOf(m).$D;
|
|
263
|
+
}, n.$locale = function() {
|
|
264
|
+
return g[this.$L];
|
|
265
|
+
}, n.locale = function(t, r) {
|
|
266
|
+
if (!t)
|
|
267
|
+
return this.$L;
|
|
268
|
+
var e = this.clone(), i = C(t, r, !0);
|
|
269
|
+
return i && (e.$L = i), e;
|
|
270
|
+
}, n.clone = function() {
|
|
271
|
+
return a.w(this.$d, this);
|
|
272
|
+
}, n.toDate = function() {
|
|
273
|
+
return new Date(this.valueOf());
|
|
274
|
+
}, n.toJSON = function() {
|
|
275
|
+
return this.isValid() ? this.toISOString() : null;
|
|
276
|
+
}, n.toISOString = function() {
|
|
277
|
+
return this.$d.toISOString();
|
|
278
|
+
}, n.toString = function() {
|
|
279
|
+
return this.$d.toUTCString();
|
|
280
|
+
}, s;
|
|
281
|
+
}(), V = L.prototype;
|
|
282
|
+
return f.prototype = V, [["$ms", I], ["$s", S], ["$m", w], ["$H", _], ["$W", M], ["$M", m], ["$y", y], ["$D", O]].forEach(function(s) {
|
|
283
|
+
V[s[1]] = function(n) {
|
|
284
|
+
return this.$g(n, s[0], s[1]);
|
|
285
|
+
};
|
|
286
|
+
}), f.extend = function(s, n) {
|
|
287
|
+
return s.$i || (s(n, L, f), s.$i = !0), f;
|
|
288
|
+
}, f.locale = C, f.isDayjs = N, f.unix = function(s) {
|
|
289
|
+
return f(1e3 * s);
|
|
290
|
+
}, f.en = g[Y], f.Ls = g, f.p = {}, f;
|
|
291
|
+
});
|
|
292
|
+
})(q);
|
|
293
|
+
var et = q.exports;
|
|
294
|
+
const nt = /* @__PURE__ */ tt(et), P = R("");
|
|
295
|
+
let U;
|
|
296
|
+
const rt = () => {
|
|
297
|
+
const H = () => {
|
|
298
|
+
U = setTimeout(() => {
|
|
299
|
+
P.value = nt().format("YYYY-MM-DD HH:mm:ss"), U && clearTimeout(U), H();
|
|
300
|
+
}, 1e3);
|
|
301
|
+
};
|
|
302
|
+
return H(), { time: P };
|
|
303
|
+
}, at = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
304
|
+
__proto__: null,
|
|
305
|
+
useTime: rt
|
|
306
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
307
|
+
export {
|
|
308
|
+
rt as u,
|
|
309
|
+
at as y
|
|
310
|
+
};
|
|
Binary file
|