@das-fed/upf-utils 6.4.0-dev.270 → 6.4.0-dev.271
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/api-services/es5.js +1672 -1660
- package/api-services/index.js +1362 -1344
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/es5.js +850 -852
- package/api-services/modules/app-manage/index.js +667 -671
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/bems/es5.js +1141 -1153
- package/api-services/modules/bems/index.js +946 -964
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/es5.js +1122 -1134
- package/api-services/modules/contract/index.js +930 -948
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/es5.js +1134 -1122
- package/api-services/modules/enterpriseright/index.js +948 -930
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/file/es5.js +1548 -1536
- package/api-services/modules/file/index.js +1284 -1266
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/iot/es5.js +1229 -1241
- package/api-services/modules/iot/index.js +1021 -1039
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/knowledge/es5.js +1122 -1134
- package/api-services/modules/knowledge/index.js +930 -948
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/permission/es5.js +1122 -1134
- package/api-services/modules/permission/index.js +930 -948
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/es5.js +1238 -1226
- package/api-services/modules/platformManage/index.js +1032 -1014
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/es5.js +1122 -1134
- package/api-services/modules/portal/index.js +930 -948
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/es5.js +1122 -1110
- package/api-services/modules/space-manage/index.js +936 -918
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/es5.js +1134 -1122
- package/api-services/modules/supplychain-manage/index.js +948 -930
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/es5.js +1134 -1122
- package/api-services/modules/systemConfiguration/index.js +948 -930
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/common-info/getPermissionMethod/es5.js +1356 -1365
- package/common-info/getPermissionMethod/index.js +1121 -1135
- package/common-info/getPermissionMethod/index.js.gz +0 -0
- package/common-tools/timezone-format/es5.d.ts +25 -0
- package/common-tools/timezone-format/es5.js +545 -456
- package/common-tools/timezone-format/index.d.ts +25 -0
- package/common-tools/timezone-format/index.js +376 -326
- package/common-tools/timezone-format/index.js.gz +0 -0
- package/curring-http/es5.js +406 -417
- package/curring-http/index.js +323 -321
- package/curring-http/index.js.gz +0 -0
- package/esm-map.json +7 -1
- package/package.json +3 -3
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import f from "dayjs";
|
|
2
|
-
import { ref as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import { ref as Se } from "vue";
|
|
3
|
+
import Me from "dayjs/plugin/utc";
|
|
4
|
+
import _e from "dayjs/plugin/timezone";
|
|
5
5
|
import "@das-fed/upf-utils/config";
|
|
6
|
-
const
|
|
7
|
-
function
|
|
6
|
+
const re = "/api/admin/basic-application/sys-info/v1/license/time-zone-packed-data";
|
|
7
|
+
function Le() {
|
|
8
8
|
if (typeof localStorage > "u")
|
|
9
9
|
return null;
|
|
10
10
|
try {
|
|
@@ -13,17 +13,17 @@ function pe() {
|
|
|
13
13
|
return null;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
const e =
|
|
16
|
+
function Ce() {
|
|
17
|
+
const e = Le();
|
|
18
18
|
if (!(e == null || e === ""))
|
|
19
19
|
return e.trim().startsWith("Bearer ") ? e.trim() : `Bearer ${e.trim()}`;
|
|
20
20
|
}
|
|
21
21
|
function oe(e = {}) {
|
|
22
|
-
const t = e.authorization !== void 0 ? e.authorization === "" || e.authorization == null ? void 0 : e.authorization :
|
|
22
|
+
const t = e.authorization !== void 0 ? e.authorization === "" || e.authorization == null ? void 0 : e.authorization : Ce(), n = { ...e.headers || {} };
|
|
23
23
|
if (t != null && t !== "" && (n.Authorization = t), Object.keys(n).length !== 0)
|
|
24
24
|
return { headers: n };
|
|
25
25
|
}
|
|
26
|
-
let
|
|
26
|
+
let L = null, S = null;
|
|
27
27
|
const J = [
|
|
28
28
|
"utc",
|
|
29
29
|
"uct",
|
|
@@ -43,8 +43,8 @@ const J = [
|
|
|
43
43
|
"etc/gmt+0",
|
|
44
44
|
"etc/gmt-0",
|
|
45
45
|
"etc/greenwich"
|
|
46
|
-
],
|
|
47
|
-
function
|
|
46
|
+
], be = { u: [1 / 0], o: [0] };
|
|
47
|
+
function se(e) {
|
|
48
48
|
if (!e || typeof e != "object")
|
|
49
49
|
throw new Error("Invalid IANA response: expected an object");
|
|
50
50
|
const t = e;
|
|
@@ -57,7 +57,7 @@ function re(e) {
|
|
|
57
57
|
links: Array.isArray(n) ? n : []
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
|
-
async function
|
|
60
|
+
async function ke(e, t) {
|
|
61
61
|
if (typeof fetch != "function")
|
|
62
62
|
throw new Error("fetch is not available. Pass preloadFromApi options.fetchJson.");
|
|
63
63
|
const n = await fetch(e, t);
|
|
@@ -65,68 +65,68 @@ async function ze(e, t) {
|
|
|
65
65
|
throw new Error(`IANA request failed: ${n.status} ${n.statusText}`);
|
|
66
66
|
return n.json();
|
|
67
67
|
}
|
|
68
|
-
function
|
|
69
|
-
return
|
|
68
|
+
function ae(e) {
|
|
69
|
+
return S = se(e), L = xe(S), S;
|
|
70
70
|
}
|
|
71
|
-
function
|
|
72
|
-
return
|
|
71
|
+
function Ne() {
|
|
72
|
+
return S;
|
|
73
73
|
}
|
|
74
|
-
async function
|
|
75
|
-
const t = e.url ??
|
|
74
|
+
async function Oe(e = {}) {
|
|
75
|
+
const t = e.url ?? re, n = oe({
|
|
76
76
|
authorization: e.authorization,
|
|
77
77
|
headers: e.headers
|
|
78
|
-
}),
|
|
79
|
-
return
|
|
78
|
+
}), o = await (e.fetchJson ?? ke)(t, n), s = e.parseResponse ? e.parseResponse(o) : se(o);
|
|
79
|
+
return ae(s);
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
|
|
81
|
+
function ve() {
|
|
82
|
+
L = null, S = null;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function W(e) {
|
|
85
85
|
return e > 96 ? e - 87 : e > 64 ? e - 29 : e - 48;
|
|
86
86
|
}
|
|
87
|
-
function
|
|
88
|
-
let t = 1, n = 0,
|
|
87
|
+
function Pe(e) {
|
|
88
|
+
let t = 1, n = 0, r = 0, o = 1;
|
|
89
89
|
const s = e.split("."), i = s[0], c = s[1] || "";
|
|
90
90
|
e.charCodeAt(0) === 45 && (t = -1);
|
|
91
91
|
for (let a = 0; a < i.length; a++) {
|
|
92
92
|
const u = i.charCodeAt(a);
|
|
93
|
-
u !== 45 && (n = 60 * n +
|
|
93
|
+
u !== 45 && (n = 60 * n + W(u));
|
|
94
94
|
}
|
|
95
95
|
for (let a = 0; a < c.length; a++)
|
|
96
|
-
|
|
97
|
-
return (n +
|
|
96
|
+
o = o / 60, r += W(c.charCodeAt(a)) * o;
|
|
97
|
+
return (n + r) * t;
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function Y(e) {
|
|
100
100
|
const t = [];
|
|
101
101
|
for (const n of e)
|
|
102
|
-
t.push(
|
|
102
|
+
t.push(Pe(n));
|
|
103
103
|
return t;
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function K(e) {
|
|
106
106
|
const t = e.trim();
|
|
107
107
|
return t ? t.split(" ") : [];
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function Ye(e) {
|
|
110
110
|
let t = 0;
|
|
111
111
|
const n = [];
|
|
112
|
-
for (const
|
|
113
|
-
t +=
|
|
112
|
+
for (const r of e)
|
|
113
|
+
t += r, n.push(Math.round(t * 6e4));
|
|
114
114
|
return n.push(1 / 0), n;
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function Ue(e, t) {
|
|
117
117
|
const n = [];
|
|
118
|
-
for (const
|
|
119
|
-
n.push(e[
|
|
118
|
+
for (const r of t)
|
|
119
|
+
n.push(e[r]);
|
|
120
120
|
return n;
|
|
121
121
|
}
|
|
122
122
|
function C(e) {
|
|
123
123
|
return typeof e == "string" ? e.trim().toLowerCase() : "";
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function Fe(e) {
|
|
126
126
|
const t = e.split("|");
|
|
127
127
|
if (t.length < 5)
|
|
128
128
|
throw new Error("Invalid packed zone format");
|
|
129
|
-
const n = C(t[0]),
|
|
129
|
+
const n = C(t[0]), r = Y(K(t[2])), o = Y(t[3].split("")), s = Ye(Y(K(t[4]))), i = Ue(r, o);
|
|
130
130
|
return {
|
|
131
131
|
name: n,
|
|
132
132
|
rule: {
|
|
@@ -135,73 +135,73 @@ function ve(e) {
|
|
|
135
135
|
}
|
|
136
136
|
};
|
|
137
137
|
}
|
|
138
|
-
function
|
|
139
|
-
const
|
|
140
|
-
if (!
|
|
141
|
-
const s = e[
|
|
142
|
-
s && !i ? e[
|
|
138
|
+
function Ve(e, t, n) {
|
|
139
|
+
const r = C(t), o = C(n);
|
|
140
|
+
if (!r || !o) return;
|
|
141
|
+
const s = e[r], i = e[o];
|
|
142
|
+
s && !i ? e[o] = s : i && !s && (e[r] = i);
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
const t = J.map((n) => e[n]).find(Boolean) ||
|
|
144
|
+
function je(e) {
|
|
145
|
+
const t = J.map((n) => e[n]).find(Boolean) || be;
|
|
146
146
|
J.forEach((n) => {
|
|
147
147
|
e[n] || (e[n] = t);
|
|
148
148
|
});
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function xe(e) {
|
|
151
151
|
if (!e || !Array.isArray(e.zones))
|
|
152
152
|
throw new TypeError("packed iana data must contain zones array");
|
|
153
153
|
const t = {};
|
|
154
|
-
for (const
|
|
155
|
-
const
|
|
156
|
-
t[
|
|
154
|
+
for (const r of e.zones) {
|
|
155
|
+
const o = Fe(r);
|
|
156
|
+
t[o.name] = o.rule;
|
|
157
157
|
}
|
|
158
158
|
const n = e.links || [];
|
|
159
|
-
for (const
|
|
160
|
-
const
|
|
161
|
-
|
|
159
|
+
for (const r of n) {
|
|
160
|
+
const o = r.split("|");
|
|
161
|
+
o.length < 2 || Ve(t, o[0], o[1]);
|
|
162
162
|
}
|
|
163
|
-
return
|
|
163
|
+
return je(t), t;
|
|
164
164
|
}
|
|
165
|
-
function
|
|
166
|
-
if (!
|
|
165
|
+
function Re() {
|
|
166
|
+
if (!L)
|
|
167
167
|
throw new Error(
|
|
168
168
|
"IANA data not loaded. Await dayjsTimezoneIanaPlugin.preloadFromApi({ url: ... }) before dayjs.extend(dayjsTimezoneIanaPlugin)."
|
|
169
169
|
);
|
|
170
|
-
return
|
|
170
|
+
return L;
|
|
171
171
|
}
|
|
172
|
-
function
|
|
173
|
-
const
|
|
174
|
-
if (
|
|
172
|
+
function He(e, t, n) {
|
|
173
|
+
const r = C(t), o = n[r];
|
|
174
|
+
if (o === void 0)
|
|
175
175
|
throw Error("Unknown Time Zone " + t);
|
|
176
|
-
const s =
|
|
176
|
+
const s = o.o, i = o.u, c = i.length - 1;
|
|
177
177
|
for (let a = 0; a < c; a++) {
|
|
178
178
|
let u = s[a];
|
|
179
|
-
const
|
|
180
|
-
if (u >
|
|
179
|
+
const m = s[a && a - 1];
|
|
180
|
+
if (u > m && (u = m), e < i[a] - u * 6e4)
|
|
181
181
|
return s[a];
|
|
182
182
|
}
|
|
183
183
|
return s[c];
|
|
184
184
|
}
|
|
185
|
-
const
|
|
185
|
+
const Ge = (e, t, n) => {
|
|
186
186
|
var a, u;
|
|
187
|
-
let
|
|
188
|
-
const
|
|
189
|
-
const
|
|
190
|
-
return (typeof n.utc == "function" ? n.utc(
|
|
187
|
+
let r = "";
|
|
188
|
+
const o = n.tz, s = (a = o == null ? void 0 : o.guess) == null ? void 0 : a.bind(o), i = (u = o == null ? void 0 : o.setDefault) == null ? void 0 : u.bind(o), c = (m, g, D) => {
|
|
189
|
+
const _ = D || g || r, y = D ? g : void 0;
|
|
190
|
+
return (typeof n.utc == "function" ? n.utc(m, y) : n(m, y).utc()).tz(_);
|
|
191
191
|
};
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
}, c.guess = () => s ? s() : typeof Intl < "u" && typeof Intl.DateTimeFormat == "function" ? Intl.DateTimeFormat().resolvedOptions().timeZone ||
|
|
195
|
-
var
|
|
196
|
-
const
|
|
197
|
-
return this.utcOffset(-
|
|
192
|
+
o && Object.assign(c, o), c.setDefault = (m) => {
|
|
193
|
+
r = m, i == null || i(m);
|
|
194
|
+
}, c.guess = () => s ? s() : typeof Intl < "u" && typeof Intl.DateTimeFormat == "function" ? Intl.DateTimeFormat().resolvedOptions().timeZone || r || "UTC" : r || "UTC", n.tz = c, t.prototype.tz = function(m = r, g) {
|
|
195
|
+
var I;
|
|
196
|
+
const D = m || ((I = c.guess) == null ? void 0 : I.call(c)) || "UTC", _ = this.utc().valueOf(), y = He(_, D, Re());
|
|
197
|
+
return this.utcOffset(-y, g);
|
|
198
198
|
};
|
|
199
|
-
},
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
function
|
|
199
|
+
}, T = Ge;
|
|
200
|
+
T.preloadFromApi = Oe;
|
|
201
|
+
T.preloadFromData = ae;
|
|
202
|
+
T.getCachedPackedData = Ne;
|
|
203
|
+
T.clearIanaCache = ve;
|
|
204
|
+
function $e(e) {
|
|
205
205
|
if (!e || typeof e != "object")
|
|
206
206
|
throw new Error("Invalid IANA response: expected an object");
|
|
207
207
|
const t = e;
|
|
@@ -214,14 +214,14 @@ function Ye(e) {
|
|
|
214
214
|
links: Array.isArray(n) ? n : []
|
|
215
215
|
};
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function ie(e, t) {
|
|
218
218
|
if (!e || typeof e.tz != "object" || typeof e.tz.load != "function")
|
|
219
219
|
throw new Error("moment.tz.load is missing. Import moment-timezone before calling loadIanaData.");
|
|
220
220
|
if (!t || !Array.isArray(t.zones))
|
|
221
221
|
throw new Error("Invalid packed IANA data: zones must be an array");
|
|
222
222
|
e.tz.load(t);
|
|
223
223
|
}
|
|
224
|
-
async function
|
|
224
|
+
async function Be(e, t) {
|
|
225
225
|
if (typeof fetch != "function")
|
|
226
226
|
throw new Error("fetch is not available. Pass loadIanaFromApi options.fetchJson in Node or polyfill fetch.");
|
|
227
227
|
const n = await fetch(e, t);
|
|
@@ -229,21 +229,21 @@ async function je(e, t) {
|
|
|
229
229
|
throw new Error(`IANA request failed: ${n.status} ${n.statusText}`);
|
|
230
230
|
return n.json();
|
|
231
231
|
}
|
|
232
|
-
async function
|
|
233
|
-
let
|
|
234
|
-
typeof t == "string" ? (
|
|
232
|
+
async function q(e, t, n) {
|
|
233
|
+
let r = re, o = {};
|
|
234
|
+
typeof t == "string" ? (r = t, o = n ?? {}) : t != null && (o = t);
|
|
235
235
|
const s = oe({
|
|
236
|
-
authorization:
|
|
237
|
-
headers:
|
|
238
|
-
}), c = await (
|
|
239
|
-
return
|
|
236
|
+
authorization: o.authorization,
|
|
237
|
+
headers: o.headers
|
|
238
|
+
}), c = await (o.fetchJson ?? Be)(r, s), a = o.parseResponse ? o.parseResponse(c) : $e(c);
|
|
239
|
+
return ie(e, a), a;
|
|
240
240
|
}
|
|
241
|
-
f.extend(
|
|
242
|
-
f.extend(
|
|
243
|
-
const
|
|
241
|
+
f.extend(Me);
|
|
242
|
+
f.extend(_e);
|
|
243
|
+
const A = "zh-CN", Je = "YYYY.MM.DD HH:mm:ss", w = "YYYY-MM-DD HH:mm:ss", We = "YYYY-MM-DD HH:mm:ss.SSS", Ke = "YYYY-MM-DDTHH:mm:ssZ", ce = "YYYY-MM-DD HH:mm", N = "UTC", j = "timeZone", fe = "timezonechange", qe = "__UPF_TIMEZONE_CHANGE__", Xe = "ianatimezonedatachange", X = {
|
|
244
244
|
zh: "夏令时",
|
|
245
245
|
default: "DST"
|
|
246
|
-
},
|
|
246
|
+
}, Qe = [
|
|
247
247
|
"UTC",
|
|
248
248
|
"UCT",
|
|
249
249
|
"Zulu",
|
|
@@ -262,75 +262,75 @@ const I = "zh-CN", Ve = "YYYY.MM.DD HH:mm:ss", A = "YYYY-MM-DD HH:mm:ss", ie = "
|
|
|
262
262
|
"Etc/GMT+0",
|
|
263
263
|
"Etc/GMT-0",
|
|
264
264
|
"Etc/Greenwich"
|
|
265
|
-
],
|
|
266
|
-
var
|
|
267
|
-
const
|
|
268
|
-
let
|
|
269
|
-
const
|
|
270
|
-
const t =
|
|
271
|
-
t &&
|
|
272
|
-
},
|
|
265
|
+
], et = f, E = /* @__PURE__ */ new Set();
|
|
266
|
+
var te, ne;
|
|
267
|
+
const tt = (ne = (te = f.tz) == null ? void 0 : te.guess) == null ? void 0 : ne.bind(f.tz);
|
|
268
|
+
let b = !1;
|
|
269
|
+
const l = (e) => (e || "").trim(), U = (e) => {
|
|
270
|
+
const t = l(e);
|
|
271
|
+
t && E.add(t);
|
|
272
|
+
}, nt = () => Qe.forEach(U), p = () => typeof window > "u" ? void 0 : window, rt = (e) => ({
|
|
273
273
|
version: typeof e.version == "string" ? e.version : void 0,
|
|
274
274
|
zones: Array.isArray(e.zones) ? e.zones.filter((t) => typeof t == "string") : [],
|
|
275
275
|
links: Array.isArray(e.links) ? e.links.filter((t) => typeof t == "string") : []
|
|
276
|
-
}),
|
|
277
|
-
...
|
|
276
|
+
}), F = (e, t, n = Date.now()) => ({
|
|
277
|
+
...rt(e),
|
|
278
278
|
source: t,
|
|
279
279
|
timestamp: n
|
|
280
|
-
}),
|
|
281
|
-
const n =
|
|
280
|
+
}), O = (e, t = "iana") => {
|
|
281
|
+
const n = F(e, t);
|
|
282
282
|
try {
|
|
283
|
-
const
|
|
284
|
-
|
|
283
|
+
const r = p();
|
|
284
|
+
r && (r.__UPF_IANA_TIMEZONE_DATA__ = n, r.dispatchEvent(new CustomEvent(Xe, { detail: n })));
|
|
285
285
|
} catch {
|
|
286
286
|
}
|
|
287
287
|
return n;
|
|
288
|
-
},
|
|
289
|
-
var
|
|
290
|
-
const e =
|
|
288
|
+
}, ot = () => {
|
|
289
|
+
var r;
|
|
290
|
+
const e = p(), t = e == null ? void 0 : e.__UPF_IANA_TIMEZONE_DATA__;
|
|
291
291
|
if (t && Array.isArray(t.zones) && t.zones.length)
|
|
292
|
-
return
|
|
292
|
+
return F(
|
|
293
293
|
t,
|
|
294
294
|
t.source === "fallback" ? "fallback" : "iana",
|
|
295
295
|
Number(t.timestamp || Date.now())
|
|
296
296
|
);
|
|
297
|
-
const n = (
|
|
298
|
-
return n ?
|
|
299
|
-
},
|
|
297
|
+
const n = (r = T.getCachedPackedData) == null ? void 0 : r.call(T);
|
|
298
|
+
return n ? F(n, "iana") : null;
|
|
299
|
+
}, Vt = ot, x = () => {
|
|
300
300
|
try {
|
|
301
|
-
return typeof sessionStorage > "u" ? "" :
|
|
301
|
+
return typeof sessionStorage > "u" ? "" : l(sessionStorage.getItem(j));
|
|
302
302
|
} catch {
|
|
303
303
|
return "";
|
|
304
304
|
}
|
|
305
|
-
},
|
|
305
|
+
}, st = (e) => {
|
|
306
306
|
try {
|
|
307
307
|
typeof sessionStorage < "u" && sessionStorage.setItem(j, e);
|
|
308
308
|
} catch {
|
|
309
309
|
}
|
|
310
|
-
},
|
|
310
|
+
}, R = () => {
|
|
311
311
|
var t;
|
|
312
|
-
const e =
|
|
312
|
+
const e = p();
|
|
313
313
|
if (!(e != null && e.name)) return "";
|
|
314
314
|
try {
|
|
315
315
|
const n = (t = JSON.parse(e.name || "{}")) == null ? void 0 : t.parentData;
|
|
316
|
-
return
|
|
316
|
+
return l(n == null ? void 0 : n.timeZone);
|
|
317
317
|
} catch {
|
|
318
318
|
return "";
|
|
319
319
|
}
|
|
320
|
-
},
|
|
321
|
-
timeZone:
|
|
320
|
+
}, ue = (e, t) => ({
|
|
321
|
+
timeZone: l(e),
|
|
322
322
|
source: t,
|
|
323
323
|
timestamp: Date.now()
|
|
324
|
-
}),
|
|
324
|
+
}), k = Se(x() || R()), V = /* @__PURE__ */ new Set();
|
|
325
325
|
let Q = !1;
|
|
326
|
-
const
|
|
326
|
+
const le = () => {
|
|
327
327
|
if (!(typeof Intl > "u" || typeof Intl.DateTimeFormat != "function"))
|
|
328
328
|
try {
|
|
329
329
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
330
330
|
} catch {
|
|
331
331
|
return;
|
|
332
332
|
}
|
|
333
|
-
},
|
|
333
|
+
}, at = (e) => {
|
|
334
334
|
if (!e) return !1;
|
|
335
335
|
if (typeof Intl > "u" || typeof Intl.DateTimeFormat != "function") return !0;
|
|
336
336
|
try {
|
|
@@ -338,145 +338,189 @@ const qe = () => {
|
|
|
338
338
|
} catch {
|
|
339
339
|
return !1;
|
|
340
340
|
}
|
|
341
|
-
},
|
|
342
|
-
const t =
|
|
343
|
-
return t ?
|
|
344
|
-
},
|
|
341
|
+
}, z = (e) => {
|
|
342
|
+
const t = l(e);
|
|
343
|
+
return t ? E.size ? E.has(t) : at(t) : !1;
|
|
344
|
+
}, v = (e) => (E.clear(), e.zones.forEach((t) => {
|
|
345
345
|
const n = t.split("|")[0];
|
|
346
346
|
U(n);
|
|
347
347
|
}), (e.links || []).forEach((t) => {
|
|
348
348
|
t.split("|").forEach((n) => {
|
|
349
349
|
U(n);
|
|
350
350
|
});
|
|
351
|
-
}),
|
|
352
|
-
const n =
|
|
353
|
-
return
|
|
354
|
-
},
|
|
355
|
-
const t = await
|
|
356
|
-
return
|
|
357
|
-
},
|
|
358
|
-
const { url: n, ...
|
|
359
|
-
return
|
|
360
|
-
},
|
|
351
|
+
}), nt(), Array.from(E)), jt = () => Array.from(E), xt = async (e, t = {}) => {
|
|
352
|
+
const n = T.preloadFromData(e), r = v(n);
|
|
353
|
+
return b || (f.extend(T), b = !0), H(t.defaultTimeZone), t.syncRuntimeSnapshot !== !1 && O(n, t.runtimeSource || "iana"), { data: n, knownTimeZones: r };
|
|
354
|
+
}, Rt = async (e = {}) => {
|
|
355
|
+
const t = await T.preloadFromApi(e), n = v(t);
|
|
356
|
+
return b || (f.extend(T), b = !0), H(e.defaultTimeZone), e.syncRuntimeSnapshot !== !1 && O(t, e.runtimeSource || "iana"), { data: t, knownTimeZones: n };
|
|
357
|
+
}, Ht = (e, t) => (ie(e, t), v(t), O(t, "iana"), t), Gt = async (e, t = {}) => {
|
|
358
|
+
const { url: n, ...r } = t, o = n ? await q(e, n, r) : await q(e, r);
|
|
359
|
+
return v(o), O(o, "iana"), o;
|
|
360
|
+
}, me = () => {
|
|
361
361
|
var n;
|
|
362
|
-
const e = (n = f.tz) == null ? void 0 : n.guess, t = typeof e == "function" ? e :
|
|
362
|
+
const e = (n = f.tz) == null ? void 0 : n.guess, t = typeof e == "function" ? e : tt;
|
|
363
363
|
try {
|
|
364
364
|
return t == null ? void 0 : t();
|
|
365
365
|
} catch {
|
|
366
366
|
return;
|
|
367
367
|
}
|
|
368
|
-
},
|
|
369
|
-
var
|
|
370
|
-
const t =
|
|
371
|
-
return t ?
|
|
372
|
-
},
|
|
373
|
-
|
|
368
|
+
}, H = (e) => {
|
|
369
|
+
var r, o;
|
|
370
|
+
const t = l(e), n = f.tz;
|
|
371
|
+
return t ? z(t) ? ((o = n == null ? void 0 : n.setDefault) == null || o.call(n, t), !0) : !1 : ((r = n == null ? void 0 : n.setDefault) == null || r.call(n, N), !0);
|
|
372
|
+
}, it = (e) => {
|
|
373
|
+
V.forEach((t) => {
|
|
374
374
|
try {
|
|
375
375
|
t(e.timeZone, e);
|
|
376
376
|
} catch {
|
|
377
377
|
}
|
|
378
378
|
});
|
|
379
|
-
},
|
|
379
|
+
}, ct = (e) => {
|
|
380
380
|
var t;
|
|
381
381
|
try {
|
|
382
|
-
(t =
|
|
382
|
+
(t = p()) == null || t.dispatchEvent(new CustomEvent(fe, { detail: e }));
|
|
383
383
|
} catch {
|
|
384
384
|
}
|
|
385
385
|
}, G = (e, t = {}) => {
|
|
386
|
-
const n =
|
|
387
|
-
|
|
386
|
+
const n = l(e), r = ue(n, t.source), o = k.value !== n;
|
|
387
|
+
o && (k.value = n);
|
|
388
388
|
try {
|
|
389
|
-
const s =
|
|
390
|
-
s && (s.__UPF_TIMEZONE_SNAPSHOT__ =
|
|
389
|
+
const s = p();
|
|
390
|
+
s && (s.__UPF_TIMEZONE_SNAPSHOT__ = r);
|
|
391
391
|
} catch {
|
|
392
392
|
}
|
|
393
|
-
return t.persist !== !1 &&
|
|
394
|
-
},
|
|
393
|
+
return t.persist !== !1 && st(n), t.syncDefault !== !1 && H(n), t.notify !== !1 && o && it(r), t.dispatchEvent !== !1 && ct(r), n;
|
|
394
|
+
}, $t = (e, t = {}) => G(l(e), {
|
|
395
395
|
persist: !0,
|
|
396
396
|
notify: !0,
|
|
397
397
|
dispatchEvent: !0,
|
|
398
398
|
syncDefault: !0,
|
|
399
399
|
...t
|
|
400
|
-
}),
|
|
401
|
-
const t =
|
|
402
|
-
return t ||
|
|
403
|
-
},
|
|
404
|
-
var n,
|
|
405
|
-
if (typeof e == "string") return
|
|
400
|
+
}), Bt = (e = "sync") => {
|
|
401
|
+
const t = x() || R();
|
|
402
|
+
return t || k.value ? G(t, { source: e, dispatchEvent: !1 }) : "";
|
|
403
|
+
}, Jt = (e) => (V.add(e), () => V.delete(e)), ft = (e) => {
|
|
404
|
+
var n, r, o, s;
|
|
405
|
+
if (typeof e == "string") return ue(e);
|
|
406
406
|
if (!e || typeof e != "object") return null;
|
|
407
407
|
const t = "timeZone" in e ? e.timeZone : e != null && e.detail && "timeZone" in e.detail ? e.detail.timeZone : e != null && e.params && "timeZone" in e.params ? e.params.timeZone : void 0;
|
|
408
408
|
return t == null ? null : {
|
|
409
|
-
timeZone:
|
|
410
|
-
source: e.source || ((n = e.detail) == null ? void 0 : n.source) || ((
|
|
411
|
-
timestamp: Number(e.timestamp || ((
|
|
409
|
+
timeZone: l(t),
|
|
410
|
+
source: e.source || ((n = e.detail) == null ? void 0 : n.source) || ((r = e.params) == null ? void 0 : r.source),
|
|
411
|
+
timestamp: Number(e.timestamp || ((o = e.detail) == null ? void 0 : o.timestamp) || ((s = e.params) == null ? void 0 : s.timestamp) || Date.now())
|
|
412
412
|
};
|
|
413
|
-
},
|
|
414
|
-
const n =
|
|
413
|
+
}, $ = (e, t) => {
|
|
414
|
+
const n = ft(e);
|
|
415
415
|
n && G(n.timeZone, {
|
|
416
416
|
source: n.source || t,
|
|
417
417
|
dispatchEvent: !1
|
|
418
418
|
});
|
|
419
|
-
},
|
|
420
|
-
|
|
421
|
-
},
|
|
422
|
-
e.key === j &&
|
|
423
|
-
},
|
|
419
|
+
}, ut = (e) => {
|
|
420
|
+
$(e.detail, "window-event");
|
|
421
|
+
}, lt = (e) => {
|
|
422
|
+
e.key === j && $({ timeZone: e.newValue || "", source: "storage" }, "storage");
|
|
423
|
+
}, mt = (e) => {
|
|
424
424
|
const t = e.data;
|
|
425
|
-
!t || t.type !==
|
|
426
|
-
},
|
|
427
|
-
const e =
|
|
428
|
-
return !e || Q ? !1 : (Q = !0, e.addEventListener(
|
|
425
|
+
!t || t.type !== qe || $(t.detail || t, "message");
|
|
426
|
+
}, dt = () => {
|
|
427
|
+
const e = p();
|
|
428
|
+
return !e || Q ? !1 : (Q = !0, e.addEventListener(fe, ut), e.addEventListener("storage", lt), e.addEventListener("message", mt), !0);
|
|
429
429
|
};
|
|
430
|
-
|
|
431
|
-
const
|
|
432
|
-
const t =
|
|
433
|
-
return
|
|
434
|
-
},
|
|
435
|
-
const t =
|
|
436
|
-
return
|
|
437
|
-
},
|
|
430
|
+
dt();
|
|
431
|
+
const Tt = () => {
|
|
432
|
+
const t = l(k.value) || x() || R() || me() || le();
|
|
433
|
+
return z(t) ? l(t) : N;
|
|
434
|
+
}, d = (e) => {
|
|
435
|
+
const t = l(e) || Tt();
|
|
436
|
+
return z(t) ? t : N;
|
|
437
|
+
}, de = () => {
|
|
438
|
+
const e = me() || le();
|
|
439
|
+
return z(e) ? l(e) : N;
|
|
440
|
+
}, Te = (e = {}) => {
|
|
441
|
+
const t = l(e.timeZone);
|
|
442
|
+
return t ? d(t) : e.useClientTimeZone ? d() : de();
|
|
443
|
+
}, B = (e) => e === "instant" || e === "local" ? e : "none", he = (e = {}) => B(e.timeZoneMode) !== "none", ht = () => {
|
|
438
444
|
var e;
|
|
439
|
-
return typeof window < "u" && ((e = window.navigator) != null && e.language) ? window.navigator.language :
|
|
440
|
-
},
|
|
441
|
-
const
|
|
445
|
+
return typeof window < "u" && ((e = window.navigator) != null && e.language) ? window.navigator.language : A;
|
|
446
|
+
}, Ze = (e, t = []) => {
|
|
447
|
+
const r = e || ht() || A, o = r.toLowerCase();
|
|
442
448
|
if (!t.length)
|
|
443
|
-
return
|
|
444
|
-
const s = t.find((a) => a.toLowerCase() ===
|
|
449
|
+
return o === "en" ? "en-US" : o === "zh" || o === "zh-cn" ? A : r;
|
|
450
|
+
const s = t.find((a) => a.toLowerCase() === o);
|
|
445
451
|
if (s) return s;
|
|
446
|
-
const i =
|
|
447
|
-
return c || (i === "en" ? t.find((a) => a.toLowerCase().startsWith("en-")) ||
|
|
448
|
-
},
|
|
452
|
+
const i = o.split("-")[0], c = t.find((a) => a.toLowerCase().split("-")[0] === i);
|
|
453
|
+
return c || (i === "en" ? t.find((a) => a.toLowerCase().startsWith("en-")) || r : i === "zh" ? t.find((a) => a.toLowerCase().startsWith("zh-")) || A : r);
|
|
454
|
+
}, M = (e) => {
|
|
449
455
|
if (f.isDayjs(e)) return e;
|
|
450
456
|
if (e == null || e === "") return f();
|
|
451
457
|
const t = f(e);
|
|
452
458
|
return t.isValid() ? t : f();
|
|
453
|
-
},
|
|
454
|
-
const n =
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
+
}, h = (e) => e == null || e === "", Z = (e) => f.isDayjs(e) ? e : h(e) ? f() : f(e), Zt = (e, t = {}) => {
|
|
460
|
+
const n = B(t.timeZoneMode);
|
|
461
|
+
if (n === "none") return Z(e);
|
|
462
|
+
const r = Te(t);
|
|
463
|
+
if (n === "local")
|
|
464
|
+
return h(e) ? f().tz(r) : f.isDayjs(e) ? e.tz(r) : f.tz(e, r);
|
|
465
|
+
const o = Z(e);
|
|
466
|
+
return o.isValid() ? o.tz(r) : o;
|
|
467
|
+
}, ge = (e, t = !1) => {
|
|
468
|
+
const n = l(e);
|
|
469
|
+
return n ? d(n) : t ? d() : "";
|
|
470
|
+
}, Wt = () => et, Kt = (e, t = {}) => he(t) ? h(e) ? null : Zt(e, t) : e, gt = (e, t = {}) => {
|
|
471
|
+
const n = B(t.timeZoneMode), r = t.timeZoneValueFormat || (n === "instant" ? Ke : w);
|
|
472
|
+
return e.format(r);
|
|
473
|
+
}, qt = (e, t = {}) => {
|
|
474
|
+
if (!he(t) || h(e)) return e;
|
|
475
|
+
const n = Te(t), r = Z(e);
|
|
476
|
+
if (!r.isValid()) return e;
|
|
477
|
+
const o = r.format(We), s = f.tz(o, n);
|
|
478
|
+
return gt(s, t);
|
|
479
|
+
}, yt = (e, t) => M(e).tz(d(t)).utcOffset(), Dt = (e, t, n = ce) => M(e).tz(d(t)).format(n), It = /^(\d{4}-\d{2}-\d{2})/, At = (e = {}) => {
|
|
480
|
+
const t = l(e.timeZone);
|
|
481
|
+
return t ? d(t) : e.useClientTimeZone === !1 ? de() : d();
|
|
482
|
+
}, Et = (e, t, n) => {
|
|
483
|
+
if (h(e)) return "";
|
|
484
|
+
if (n === "instant") {
|
|
485
|
+
const o = Z(e);
|
|
486
|
+
return o.isValid() ? o.tz(t).format("YYYY-MM-DD") : "";
|
|
487
|
+
}
|
|
488
|
+
if (typeof e == "string") {
|
|
489
|
+
const o = e.trim().match(It);
|
|
490
|
+
if (o != null && o[1]) return o[1];
|
|
491
|
+
}
|
|
492
|
+
const r = Z(e);
|
|
493
|
+
return r.isValid() ? r.format("YYYY-MM-DD") : "";
|
|
494
|
+
}, ye = (e, t = {}, n) => {
|
|
495
|
+
const r = At(t), o = Et(e, r, t.inputMode || "date");
|
|
496
|
+
if (!o) return;
|
|
497
|
+
const s = f.tz(o, r);
|
|
498
|
+
if (s.isValid())
|
|
499
|
+
return (n === "start" ? s.startOf("day") : s.endOf("day")).valueOf();
|
|
500
|
+
}, Xt = (e, t = {}) => ye(e, t, "start"), Qt = (e, t = {}) => ye(e, t, "end"), wt = (e, t) => Z(e).format(t.format), De = (e, t) => {
|
|
501
|
+
const n = t.format || w, r = ge(t.timeZone, t.useClientTimeZone);
|
|
502
|
+
if (!r) return wt(e, { format: n });
|
|
459
503
|
if (t.inputMode === "local")
|
|
460
|
-
return
|
|
461
|
-
const
|
|
462
|
-
return
|
|
463
|
-
},
|
|
504
|
+
return h(e) ? f().tz(r).format(n) : f.tz(e, r).format(n);
|
|
505
|
+
const o = Z(e);
|
|
506
|
+
return o.isValid() ? o.tz(r).format(n) : o.format(n);
|
|
507
|
+
}, pt = (e) => typeof e == "function" && typeof (e == null ? void 0 : e.tz) == "function", zt = (e, t) => {
|
|
464
508
|
var a, u;
|
|
465
|
-
const { moment: n } = t,
|
|
466
|
-
if (!
|
|
467
|
-
const
|
|
468
|
-
if (!s || typeof n.tz != "function") return n(
|
|
509
|
+
const { moment: n } = t, r = t.format || w;
|
|
510
|
+
if (!pt(n)) return De(e, { ...t, dateLibrary: "dayjs" });
|
|
511
|
+
const o = h(e) ? void 0 : e, s = ge(t.timeZone, t.useClientTimeZone);
|
|
512
|
+
if (!s || typeof n.tz != "function") return n(o).format(r);
|
|
469
513
|
if (t.inputMode === "local")
|
|
470
|
-
return
|
|
471
|
-
const i = n(
|
|
472
|
-
return (typeof i.tz == "function" ? i.tz(s) : n.tz(
|
|
473
|
-
},
|
|
474
|
-
const n = typeof t == "string" ? { format: t } : t || {},
|
|
514
|
+
return h(e) ? ((u = (a = n()).tz) == null ? void 0 : u.call(a, s).format(r)) || n().format(r) : n.tz(o, s).format(r);
|
|
515
|
+
const i = n(o);
|
|
516
|
+
return (typeof i.tz == "function" ? i.tz(s) : n.tz(o, s)).format(r);
|
|
517
|
+
}, Ie = (e, t = {}) => {
|
|
518
|
+
const n = typeof t == "string" ? { format: t } : t || {}, r = {
|
|
475
519
|
...n,
|
|
476
|
-
format: n.format ||
|
|
520
|
+
format: n.format || w
|
|
477
521
|
};
|
|
478
|
-
return
|
|
479
|
-
},
|
|
522
|
+
return r.dateLibrary === "moment" ? zt(e, r) : De(e, r);
|
|
523
|
+
}, St = (e, t, n) => new Intl.DateTimeFormat(n, {
|
|
480
524
|
timeZone: t,
|
|
481
525
|
year: "numeric",
|
|
482
526
|
month: "2-digit",
|
|
@@ -485,8 +529,8 @@ const it = () => {
|
|
|
485
529
|
minute: "2-digit",
|
|
486
530
|
second: "2-digit",
|
|
487
531
|
hourCycle: "h23"
|
|
488
|
-
}).formatToParts(e).reduce((
|
|
489
|
-
const
|
|
532
|
+
}).formatToParts(e).reduce((o, s) => (s.type !== "literal" && (o[s.type] = s.value), o), {}), Mt = (e, t, n) => {
|
|
533
|
+
const r = {
|
|
490
534
|
YYYY: t.year || "0000",
|
|
491
535
|
YY: (t.year || "0000").slice(-2),
|
|
492
536
|
MM: t.month || "01",
|
|
@@ -501,155 +545,161 @@ const it = () => {
|
|
|
501
545
|
s: String(Number(t.second || "0")),
|
|
502
546
|
SSS: n
|
|
503
547
|
};
|
|
504
|
-
return e.replace(/YYYY|SSS|YY|MM|DD|HH|mm|ss|M|D|H|m|s/g, (
|
|
505
|
-
},
|
|
506
|
-
const n = typeof t == "string" ? { format: t } : t || {},
|
|
507
|
-
if (!i.isValid()) return i.format(
|
|
548
|
+
return e.replace(/YYYY|SSS|YY|MM|DD|HH|mm|ss|M|D|H|m|s/g, (o) => r[o] ?? o);
|
|
549
|
+
}, en = (e, t = {}) => {
|
|
550
|
+
const n = typeof t == "string" ? { format: t } : t || {}, r = n.format || w, o = Ze(n.locale || A), s = d(n.timeZone), i = Z(e);
|
|
551
|
+
if (!i.isValid()) return i.format(r);
|
|
508
552
|
try {
|
|
509
|
-
const c = i.toDate(), a =
|
|
510
|
-
return
|
|
553
|
+
const c = i.toDate(), a = St(c, s, o), u = String(c.getMilliseconds()).padStart(3, "0");
|
|
554
|
+
return Mt(r, a, u);
|
|
511
555
|
} catch {
|
|
512
|
-
return
|
|
556
|
+
return Ie(e, { format: r, timeZone: s });
|
|
513
557
|
}
|
|
514
|
-
},
|
|
515
|
-
const n =
|
|
516
|
-
return `UTC${
|
|
517
|
-
},
|
|
558
|
+
}, tn = (e, t = w, n = {}) => Ie(e, { ...n, format: t }), ee = (e) => String(e).padStart(2, "0"), Ae = (e) => `UTC${e}`, Ee = (e, t) => {
|
|
559
|
+
const n = yt(e, t), r = n >= 0 ? "+" : "-", o = Math.abs(n);
|
|
560
|
+
return `UTC${r}${ee(Math.floor(o / 60))}:${ee(o % 60)}`;
|
|
561
|
+
}, _t = (e, t = /* @__PURE__ */ new Date()) => {
|
|
518
562
|
const n = e.currentUtcOffsetText || e.baseUtcOffsetText;
|
|
519
|
-
return n ? `UTC${n}` :
|
|
520
|
-
},
|
|
563
|
+
return n ? `UTC${n}` : Ee(t, e.timeZoneId);
|
|
564
|
+
}, Lt = (e, t) => {
|
|
521
565
|
const n = e.match(/([+-]\d{1,2})(?::?(\d{2}))?/) || [];
|
|
522
566
|
if (!n[1]) return t;
|
|
523
|
-
const
|
|
524
|
-
return `UTC${
|
|
525
|
-
},
|
|
526
|
-
var
|
|
527
|
-
const
|
|
567
|
+
const r = n[1].startsWith("-") ? "-" : "+", o = n[1].replace(/[+-]/, "").padStart(2, "0"), s = n[2] || "00";
|
|
568
|
+
return `UTC${r}${o}:${s}`;
|
|
569
|
+
}, Ct = (e, t, n) => {
|
|
570
|
+
var o, s;
|
|
571
|
+
const r = Ae(n.format("Z"));
|
|
528
572
|
try {
|
|
529
|
-
const i = Intl.DateTimeFormat.supportedLocalesOf([t])[0] || t, c = (s = (
|
|
530
|
-
return c ? /^(gmt|utc)/i.test(c) ?
|
|
573
|
+
const i = Intl.DateTimeFormat.supportedLocalesOf([t])[0] || t, c = (s = (o = new Intl.DateTimeFormat(i, { timeZone: e, timeZoneName: "long" }).formatToParts(n.toDate()).find((a) => a.type === "timeZoneName")) == null ? void 0 : o.value) == null ? void 0 : s.trim();
|
|
574
|
+
return c ? /^(gmt|utc)/i.test(c) ? Lt(c, r) : c : r;
|
|
531
575
|
} catch {
|
|
532
|
-
return
|
|
576
|
+
return r;
|
|
533
577
|
}
|
|
534
|
-
},
|
|
578
|
+
}, we = (e, t) => {
|
|
535
579
|
const n = t.year();
|
|
536
580
|
return Array.from(
|
|
537
581
|
new Set(
|
|
538
|
-
Array.from({ length: 12 }, (
|
|
539
|
-
const s = `${
|
|
582
|
+
Array.from({ length: 12 }, (r, o) => {
|
|
583
|
+
const s = `${o + 1}`.padStart(2, "0"), i = `${n}-${s}-15 12:00:00`;
|
|
540
584
|
return f.tz(i, e).utcOffset();
|
|
541
585
|
})
|
|
542
586
|
)
|
|
543
587
|
);
|
|
544
|
-
},
|
|
545
|
-
const n =
|
|
546
|
-
if (!
|
|
547
|
-
const
|
|
548
|
-
return
|
|
549
|
-
},
|
|
550
|
-
const n =
|
|
551
|
-
if (!
|
|
552
|
-
const
|
|
553
|
-
return
|
|
554
|
-
},
|
|
588
|
+
}, pe = (e, t) => {
|
|
589
|
+
const n = d(e);
|
|
590
|
+
if (!z(n)) return !1;
|
|
591
|
+
const r = M(t).tz(n);
|
|
592
|
+
return we(n, r).length > 1;
|
|
593
|
+
}, P = (e, t) => {
|
|
594
|
+
const n = d(e);
|
|
595
|
+
if (!z(n)) return !1;
|
|
596
|
+
const r = M(t).tz(n), o = we(n, r);
|
|
597
|
+
return o.length <= 1 ? !1 : r.utcOffset() === Math.max(...o);
|
|
598
|
+
}, nn = (e, t) => P(e, t), ze = (e) => {
|
|
555
599
|
if (e === 1 || e === "1") return !0;
|
|
556
600
|
if (e === 0 || e === "0") return !1;
|
|
557
|
-
},
|
|
558
|
-
const n =
|
|
559
|
-
return typeof n == "boolean" ? n :
|
|
560
|
-
},
|
|
561
|
-
const n =
|
|
562
|
-
return typeof n == "boolean" ? n :
|
|
563
|
-
},
|
|
564
|
-
const
|
|
601
|
+
}, bt = (e, t) => {
|
|
602
|
+
const n = ze(e.dynamicOffsetFlag);
|
|
603
|
+
return typeof n == "boolean" ? n : pe(e.timeZoneId, t);
|
|
604
|
+
}, kt = (e, t) => {
|
|
605
|
+
const n = ze(e.currentDstFlag);
|
|
606
|
+
return typeof n == "boolean" ? n : P(e.timeZoneId, t);
|
|
607
|
+
}, rn = (e, t = /* @__PURE__ */ new Date()) => e.map((n) => {
|
|
608
|
+
const r = n.tzShowName || _t(n, t), o = bt(n, t);
|
|
565
609
|
return {
|
|
566
610
|
value: n.timeZoneId,
|
|
567
|
-
zoneName:
|
|
568
|
-
label:
|
|
569
|
-
hasDST:
|
|
570
|
-
isDST:
|
|
611
|
+
zoneName: r,
|
|
612
|
+
label: r,
|
|
613
|
+
hasDST: o,
|
|
614
|
+
isDST: o ? kt(n, t) : !1
|
|
571
615
|
};
|
|
572
|
-
}),
|
|
616
|
+
}), Nt = (e) => {
|
|
573
617
|
const t = e.toLowerCase().split("-")[0];
|
|
574
|
-
return
|
|
575
|
-
},
|
|
618
|
+
return X[t] || X.default;
|
|
619
|
+
}, Ot = (e) => typeof e.showDaylightSavingLabel == "boolean" ? e.showDaylightSavingLabel : e.showDaylightSavingMarker ?? !0, on = (e, t, n = {}) => {
|
|
576
620
|
const {
|
|
577
|
-
showZoneLabel:
|
|
578
|
-
zoneLabel:
|
|
621
|
+
showZoneLabel: r = !0,
|
|
622
|
+
zoneLabel: o,
|
|
579
623
|
hasDST: s,
|
|
580
624
|
isDST: i,
|
|
581
625
|
standardTimeLabel: c,
|
|
582
626
|
daylightSavingLabel: a,
|
|
583
|
-
format: u =
|
|
584
|
-
} = n,
|
|
585
|
-
return
|
|
586
|
-
},
|
|
587
|
-
const t =
|
|
627
|
+
format: u = ce
|
|
628
|
+
} = n, m = d(t), g = Dt(e, m, u), D = typeof s == "boolean" ? s : pe(m, e), y = (typeof i == "boolean" ? i : P(m, e)) ? a : c, I = D && y ? `[${y}]` : "";
|
|
629
|
+
return r ? [g, o || Ee(e, m), I].filter(Boolean).join(" ") : [g, I].filter(Boolean).join(" ");
|
|
630
|
+
}, sn = (e = {}) => {
|
|
631
|
+
const t = Ze(e.locale, e.supportedLocales), n = d(e.timeZone), r = M(e.value).tz(n), o = Ct(n, t, r), s = Ae(r.format("Z")), i = P(n, r), c = i ? Nt(t) : "", a = Ot(e), u = i && a ? `${o} - ${c}` : o;
|
|
588
632
|
return {
|
|
589
|
-
formattedValue:
|
|
633
|
+
formattedValue: r.format(e.format || Je),
|
|
590
634
|
locale: t,
|
|
591
635
|
timeZone: n,
|
|
592
|
-
timeZoneName:
|
|
636
|
+
timeZoneName: o,
|
|
593
637
|
timeZoneLabel: u,
|
|
594
638
|
offsetLabel: s,
|
|
595
|
-
offsetMinutes:
|
|
639
|
+
offsetMinutes: r.utcOffset(),
|
|
596
640
|
isDaylightSavingTime: i,
|
|
597
641
|
daylightSavingLabel: c
|
|
598
642
|
};
|
|
599
643
|
};
|
|
600
644
|
export {
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
645
|
+
Xe as IANA_TIMEZONE_DATA_CHANGE_EVENT,
|
|
646
|
+
fe as TIMEZONE_CHANGE_EVENT,
|
|
647
|
+
re as TIME_ZONE_PACKED_DATA_URL,
|
|
648
|
+
qe as UPF_TIMEZONE_MESSAGE_TYPE,
|
|
649
|
+
xt as applyDayjsIanaTimeZoneData,
|
|
650
|
+
Ht as applyMomentIanaTimeZoneData,
|
|
651
|
+
se as assertPackedIanaData,
|
|
652
|
+
$e as assertPackedIanaTzData,
|
|
609
653
|
oe as buildIanaFetchInit,
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
654
|
+
rn as buildTimeZoneDisplayOptions,
|
|
655
|
+
ve as clearDayjsIanaCache,
|
|
656
|
+
k as clientTimeZone,
|
|
657
|
+
xe as createIanaDbFromPackedData,
|
|
658
|
+
T as dayjsTimezoneIanaPlugin,
|
|
659
|
+
on as formatClientLocalDateTimeLine,
|
|
660
|
+
Dt as formatInTimeZone,
|
|
661
|
+
Ie as formatLocalDateTime,
|
|
662
|
+
en as formatLocalDateTimeIntl,
|
|
663
|
+
Ee as formatTimeZoneOffsetLabel,
|
|
664
|
+
qt as fromTimeZonePickerValue,
|
|
665
|
+
Le as getAccessTokenFromLocalStorage,
|
|
666
|
+
Ne as getCachedDayjsPackedIanaData,
|
|
667
|
+
Tt as getClientTimeZone,
|
|
668
|
+
Ce as getDefaultIanaAuthorization,
|
|
669
|
+
jt as getKnownTimeZoneIds,
|
|
670
|
+
ot as getRuntimeIanaTimeZoneDataSnapshot,
|
|
671
|
+
Vt as getRuntimeNameZoneDataSnapshot,
|
|
672
|
+
Wt as getTimeZoneDayjs,
|
|
673
|
+
sn as getTimeZoneDisplayInfo,
|
|
674
|
+
yt as getZoneUtcOffset,
|
|
675
|
+
dt as initClientTimeZoneSync,
|
|
676
|
+
nn as isDaylightSavingTime,
|
|
677
|
+
z as isKnownTimeZone,
|
|
678
|
+
pt as isMomentTimezoneFormatInstance,
|
|
679
|
+
he as isTimeZonePickerModeEnabled,
|
|
680
|
+
Rt as loadDayjsIanaTimeZoneData,
|
|
681
|
+
ie as loadIanaData,
|
|
682
|
+
q as loadIanaFromApi,
|
|
683
|
+
ie as loadMomentIanaData,
|
|
684
|
+
q as loadMomentIanaFromApi,
|
|
685
|
+
Gt as loadMomentIanaTimeZoneData,
|
|
686
|
+
Ze as normalizeLocaleCode,
|
|
687
|
+
Jt as onClientTimeZoneChange,
|
|
688
|
+
Oe as preloadDayjsIanaFromApi,
|
|
689
|
+
ae as preloadDayjsIanaFromData,
|
|
690
|
+
v as rebuildKnownTimeZoneIds,
|
|
691
|
+
Te as resolvePickerTimeZone,
|
|
692
|
+
d as resolveTimeZone,
|
|
693
|
+
_t as resolveUtcOffsetFallback,
|
|
694
|
+
$t as setClientTimeZone,
|
|
695
|
+
H as setDefaultTimeZone,
|
|
696
|
+
O as setRuntimeIanaTimeZoneDataSnapshot,
|
|
697
|
+
Bt as syncClientTimeZone,
|
|
698
|
+
et as timeZoneDayjs,
|
|
699
|
+
pe as timeZoneHasDST,
|
|
700
|
+
P as timeZoneIsDST,
|
|
701
|
+
tn as toLocalDate,
|
|
702
|
+
Kt as toTimeZonePickerValue,
|
|
703
|
+
Qt as toTimestampAtZoneEndOfDay,
|
|
704
|
+
Xt as toTimestampAtZoneStartOfDay
|
|
655
705
|
};
|