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