@das-fed/upf-utils 6.4.0-dev.257 → 6.4.0-dev.258
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 +2073 -2505
- package/api-services/index.js +1552 -1842
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/es5.js +1555 -1982
- package/api-services/modules/app-manage/index.js +1255 -1537
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/es5.js +1354 -1793
- package/api-services/modules/authentication/index.js +1043 -1343
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/es5.js +1354 -1796
- package/api-services/modules/bems/index.js +1040 -1344
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/es5.js +1554 -1983
- package/api-services/modules/contract/index.js +1251 -1537
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/es5.js +1408 -1859
- package/api-services/modules/duty-manage/index.js +1112 -1430
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/es5.js +1490 -1929
- package/api-services/modules/enterpriseright/index.js +1188 -1488
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/es5.js +2070 -2497
- package/api-services/modules/file/es5.js +2124 -2561
- package/api-services/modules/file/index.js +1634 -1930
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/es5.js +1350 -1792
- package/api-services/modules/gateway-edge/index.js +1037 -1341
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +1551 -1833
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/es5.js +1560 -1999
- package/api-services/modules/iot/index.js +1239 -1539
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/es5.js +1556 -1985
- package/api-services/modules/justauth/index.js +1252 -1538
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/es5.js +1491 -1930
- package/api-services/modules/knowledge/index.js +1192 -1492
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/es5.js +1490 -1929
- package/api-services/modules/link/index.js +1188 -1488
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/es5.js +1354 -1793
- package/api-services/modules/permission/index.js +1043 -1343
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/es5.js +1607 -2034
- package/api-services/modules/platformManage/index.js +1297 -1579
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/es5.js +1356 -1792
- package/api-services/modules/portal/index.js +1047 -1343
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/es5.js +1490 -1929
- package/api-services/modules/space-manage/index.js +1188 -1488
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/es5.js +1360 -1799
- package/api-services/modules/super-admin/index.js +1046 -1346
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/es5.js +1556 -1983
- package/api-services/modules/supplier/index.js +1251 -1533
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/es5.js +1400 -1848
- package/api-services/modules/supplychain-manage/index.js +1111 -1425
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/es5.js +1490 -1929
- package/api-services/modules/systemConfiguration/index.js +1188 -1488
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/es5.js +1555 -1982
- package/api-services/modules/tool/index.js +1255 -1537
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/es5.js +1492 -1931
- package/api-services/src/create-service/index.js +1193 -1493
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/es5.js +1712 -2151
- package/common-info/getPermissionMethod/es5.js +1828 -2255
- package/common-info/getPermissionMethod/index.js +1475 -1757
- package/common-info/getPermissionMethod/index.js.gz +0 -0
- package/common-info/index.js +1295 -1595
- package/common-info/index.js.gz +0 -0
- package/common-tools/es5.d.ts +0 -1
- package/common-tools/es5.js +0 -9
- package/common-tools/index.d.ts +0 -1
- package/common-tools/index.js +0 -1
- package/common-tools/timezone-format/es5.js +160 -162
- package/common-tools/timezone-format/index.js +116 -118
- package/common-tools/timezone-format/index.js.gz +0 -0
- package/create-api-service/es5.js +1553 -1982
- package/create-api-service/index.js +1251 -1537
- package/create-api-service/index.js.gz +0 -0
- package/index.d.ts +0 -1
- package/index.js +0 -1
- package/package.json +3 -3
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import u from "dayjs";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import "@das-fed/upf-utils/config";
|
|
2
|
+
import Pe from "dayjs/plugin/utc";
|
|
3
|
+
import Ue from "dayjs/plugin/timezone";
|
|
5
4
|
const K = "/api/admin/basic-application/sys-info/v1/license/time-zone-packed-data";
|
|
6
5
|
function me() {
|
|
7
6
|
if (typeof localStorage > "u")
|
|
@@ -42,7 +41,7 @@ const ne = [
|
|
|
42
41
|
"etc/gmt+0",
|
|
43
42
|
"etc/gmt-0",
|
|
44
43
|
"etc/greenwich"
|
|
45
|
-
],
|
|
44
|
+
], je = { u: [1 / 0], o: [0] };
|
|
46
45
|
function W(e) {
|
|
47
46
|
if (!e || typeof e != "object")
|
|
48
47
|
throw new Error("Invalid IANA response: expected an object");
|
|
@@ -56,7 +55,7 @@ function W(e) {
|
|
|
56
55
|
links: Array.isArray(n) ? n : []
|
|
57
56
|
};
|
|
58
57
|
}
|
|
59
|
-
async function
|
|
58
|
+
async function Oe(e, t) {
|
|
60
59
|
if (typeof fetch != "function")
|
|
61
60
|
throw new Error("fetch is not available. Pass preloadFromApi options.fetchJson.");
|
|
62
61
|
const n = await fetch(e, t);
|
|
@@ -74,7 +73,7 @@ async function he(e = {}) {
|
|
|
74
73
|
const t = e.url ?? K, n = B({
|
|
75
74
|
authorization: e.authorization,
|
|
76
75
|
headers: e.headers
|
|
77
|
-
}), r = await (e.fetchJson ??
|
|
76
|
+
}), r = await (e.fetchJson ?? Oe)(t, n), a = e.parseResponse ? e.parseResponse(r) : W(r);
|
|
78
77
|
return q(a);
|
|
79
78
|
}
|
|
80
79
|
function ge() {
|
|
@@ -83,7 +82,7 @@ function ge() {
|
|
|
83
82
|
function re(e) {
|
|
84
83
|
return e > 96 ? e - 87 : e > 64 ? e - 29 : e - 48;
|
|
85
84
|
}
|
|
86
|
-
function
|
|
85
|
+
function $e(e) {
|
|
87
86
|
let t = 1, n = 0, o = 0, r = 1;
|
|
88
87
|
const a = e.split("."), s = a[0], c = a[1] || "";
|
|
89
88
|
e.charCodeAt(0) === 45 && (t = -1);
|
|
@@ -98,21 +97,21 @@ function xe(e) {
|
|
|
98
97
|
function R(e) {
|
|
99
98
|
const t = [];
|
|
100
99
|
for (const n of e)
|
|
101
|
-
t.push(
|
|
100
|
+
t.push($e(n));
|
|
102
101
|
return t;
|
|
103
102
|
}
|
|
104
103
|
function oe(e) {
|
|
105
104
|
const t = e.trim();
|
|
106
105
|
return t ? t.split(" ") : [];
|
|
107
106
|
}
|
|
108
|
-
function
|
|
107
|
+
function xe(e) {
|
|
109
108
|
let t = 0;
|
|
110
109
|
const n = [];
|
|
111
110
|
for (const o of e)
|
|
112
111
|
t += o, n.push(Math.round(t * 6e4));
|
|
113
112
|
return n.push(1 / 0), n;
|
|
114
113
|
}
|
|
115
|
-
function
|
|
114
|
+
function Ve(e, t) {
|
|
116
115
|
const n = [];
|
|
117
116
|
for (const o of t)
|
|
118
117
|
n.push(e[o]);
|
|
@@ -121,11 +120,11 @@ function Re(e, t) {
|
|
|
121
120
|
function F(e) {
|
|
122
121
|
return typeof e == "string" ? e.trim().toLowerCase() : "";
|
|
123
122
|
}
|
|
124
|
-
function
|
|
123
|
+
function Re(e) {
|
|
125
124
|
const t = e.split("|");
|
|
126
125
|
if (t.length < 5)
|
|
127
126
|
throw new Error("Invalid packed zone format");
|
|
128
|
-
const n = F(t[0]), o = R(oe(t[2])), r = R(t[3].split("")), a =
|
|
127
|
+
const n = F(t[0]), o = R(oe(t[2])), r = R(t[3].split("")), a = xe(R(oe(t[4]))), s = Ve(o, r);
|
|
129
128
|
return {
|
|
130
129
|
name: n,
|
|
131
130
|
rule: {
|
|
@@ -134,14 +133,14 @@ function Ye(e) {
|
|
|
134
133
|
}
|
|
135
134
|
};
|
|
136
135
|
}
|
|
137
|
-
function
|
|
136
|
+
function Ye(e, t, n) {
|
|
138
137
|
const o = F(t), r = F(n);
|
|
139
138
|
if (!o || !r) return;
|
|
140
139
|
const a = e[o], s = e[r];
|
|
141
140
|
a && !s ? e[r] = a : s && !a && (e[o] = s);
|
|
142
141
|
}
|
|
143
|
-
function
|
|
144
|
-
const t = ne.map((n) => e[n]).find(Boolean) ||
|
|
142
|
+
function Ge(e) {
|
|
143
|
+
const t = ne.map((n) => e[n]).find(Boolean) || je;
|
|
145
144
|
ne.forEach((n) => {
|
|
146
145
|
e[n] || (e[n] = t);
|
|
147
146
|
});
|
|
@@ -151,24 +150,24 @@ function Ie(e) {
|
|
|
151
150
|
throw new TypeError("packed iana data must contain zones array");
|
|
152
151
|
const t = {};
|
|
153
152
|
for (const o of e.zones) {
|
|
154
|
-
const r =
|
|
153
|
+
const r = Re(o);
|
|
155
154
|
t[r.name] = r.rule;
|
|
156
155
|
}
|
|
157
156
|
const n = e.links || [];
|
|
158
157
|
for (const o of n) {
|
|
159
158
|
const r = o.split("|");
|
|
160
|
-
r.length < 2 ||
|
|
159
|
+
r.length < 2 || Ye(t, r[0], r[1]);
|
|
161
160
|
}
|
|
162
|
-
return
|
|
161
|
+
return Ge(t), t;
|
|
163
162
|
}
|
|
164
|
-
function
|
|
163
|
+
function He() {
|
|
165
164
|
if (!M)
|
|
166
165
|
throw new Error(
|
|
167
166
|
"IANA data not loaded. Await dayjsTimezoneIanaPlugin.preloadFromApi({ url: ... }) before dayjs.extend(dayjsTimezoneIanaPlugin)."
|
|
168
167
|
);
|
|
169
168
|
return M;
|
|
170
169
|
}
|
|
171
|
-
function
|
|
170
|
+
function Je(e, t, n) {
|
|
172
171
|
const o = F(t), r = n[o];
|
|
173
172
|
if (r === void 0)
|
|
174
173
|
throw Error("Unknown Time Zone " + t);
|
|
@@ -181,21 +180,21 @@ function Ke(e, t, n) {
|
|
|
181
180
|
}
|
|
182
181
|
return a[c];
|
|
183
182
|
}
|
|
184
|
-
const
|
|
183
|
+
const Ke = (e, t, n) => {
|
|
185
184
|
var i, f;
|
|
186
185
|
let o = "";
|
|
187
186
|
const r = n.tz, a = (i = r == null ? void 0 : r.guess) == null ? void 0 : i.bind(r), s = (f = r == null ? void 0 : r.setDefault) == null ? void 0 : f.bind(r), c = (l, d, Z) => {
|
|
188
|
-
const
|
|
189
|
-
return (typeof n.utc == "function" ? n.utc(l, g) : n(l, g).utc()).tz(
|
|
187
|
+
const v = Z || d || o, g = Z ? d : void 0;
|
|
188
|
+
return (typeof n.utc == "function" ? n.utc(l, g) : n(l, g).utc()).tz(v);
|
|
190
189
|
};
|
|
191
190
|
r && Object.assign(c, r), c.setDefault = (l) => {
|
|
192
191
|
o = l, s == null || s(l);
|
|
193
192
|
}, c.guess = () => a ? a() : 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) {
|
|
194
193
|
var D;
|
|
195
|
-
const Z = l || ((D = c.guess) == null ? void 0 : D.call(c)) || "UTC",
|
|
194
|
+
const Z = l || ((D = c.guess) == null ? void 0 : D.call(c)) || "UTC", v = this.utc().valueOf(), g = Je(v, Z, He());
|
|
196
195
|
return this.utcOffset(-g, d);
|
|
197
196
|
};
|
|
198
|
-
}, L =
|
|
197
|
+
}, L = Ke;
|
|
199
198
|
L.preloadFromApi = he;
|
|
200
199
|
L.preloadFromData = q;
|
|
201
200
|
L.getCachedPackedData = Te;
|
|
@@ -221,7 +220,7 @@ function Ze(e, t) {
|
|
|
221
220
|
throw new Error("Invalid packed IANA data: zones must be an array");
|
|
222
221
|
n.load(t);
|
|
223
222
|
}
|
|
224
|
-
async function
|
|
223
|
+
async function Be(e, t) {
|
|
225
224
|
if (typeof fetch != "function")
|
|
226
225
|
throw new Error("fetch is not available. Pass loadIanaFromApi options.fetchJson in Node or polyfill fetch.");
|
|
227
226
|
const n = await fetch(e, t);
|
|
@@ -229,21 +228,21 @@ async function We(e, t) {
|
|
|
229
228
|
throw new Error(`IANA request failed: ${n.status} ${n.statusText}`);
|
|
230
229
|
return n.json();
|
|
231
230
|
}
|
|
232
|
-
async function
|
|
231
|
+
async function We(e, t, n) {
|
|
233
232
|
let o = K, r = {};
|
|
234
233
|
typeof t == "string" ? (o = t, r = n ?? {}) : t != null && (r = t);
|
|
235
234
|
const a = B({
|
|
236
235
|
authorization: r.authorization,
|
|
237
236
|
headers: r.headers
|
|
238
|
-
}), c = await (r.fetchJson ??
|
|
237
|
+
}), c = await (r.fetchJson ?? Be)(o, a), i = r.parseResponse ? r.parseResponse(c) : ye(c);
|
|
239
238
|
return Ze(e, i), i;
|
|
240
239
|
}
|
|
240
|
+
u.extend(Pe);
|
|
241
241
|
u.extend(Ue);
|
|
242
|
-
|
|
243
|
-
const p = L, $t = W, xt = q, Vt = Te, Rt = he, Yt = ge, Gt = Ie, Ht = K, Jt = me, Kt = de, Bt = B, Wt = ye, De = Ze, qt = De, Y = qe, Qt = Y, y = "zh-CN", Qe = "YYYY.MM.DD HH:mm:ss", w = "YYYY-MM-DD HH:mm:ss", pe = "YYYY-MM-DD HH:mm", O = "UTC", Q = "timeZone", Ae = "timezonechange", Xe = "__UPF_TIMEZONE_CHANGE__", G = "__UPF_IANA_TIMEZONE_DATA__", et = "ianatimezonedatachange", ae = {
|
|
242
|
+
const p = L, Ot = W, $t = q, xt = Te, Vt = he, Rt = ge, Yt = Ie, Gt = K, Ht = me, Jt = de, Kt = B, Bt = ye, De = Ze, Wt = De, Y = We, qt = Y, y = "zh-CN", qe = "YYYY.MM.DD HH:mm:ss", w = "YYYY-MM-DD HH:mm:ss", pe = "YYYY-MM-DD HH:mm", O = "UTC", Q = "timeZone", Ae = "timezonechange", Qe = "__UPF_TIMEZONE_CHANGE__", G = "__UPF_IANA_TIMEZONE_DATA__", Xe = "ianatimezonedatachange", ae = {
|
|
244
243
|
zh: "夏令时",
|
|
245
244
|
default: "DST"
|
|
246
|
-
},
|
|
245
|
+
}, et = [
|
|
247
246
|
"UTC",
|
|
248
247
|
"UCT",
|
|
249
248
|
"Zulu",
|
|
@@ -264,12 +263,12 @@ const p = L, $t = W, xt = q, Vt = Te, Rt = he, Yt = ge, Gt = Ie, Ht = K, Jt = me
|
|
|
264
263
|
"Etc/Greenwich"
|
|
265
264
|
], E = /* @__PURE__ */ new Set();
|
|
266
265
|
var fe, le;
|
|
267
|
-
const
|
|
266
|
+
const tt = (le = (fe = u.tz) == null ? void 0 : fe.guess) == null ? void 0 : le.bind(u.tz);
|
|
268
267
|
let A = !1, se = "", N = null;
|
|
269
268
|
const m = (e) => (e || "").trim(), H = (e) => {
|
|
270
269
|
const t = m(e);
|
|
271
270
|
t && E.add(t);
|
|
272
|
-
},
|
|
271
|
+
}, nt = () => et.forEach(H), h = () => typeof window > "u" ? void 0 : window, rt = (e) => e === "iana" ? "iana" : "fallback", P = (e, t) => {
|
|
273
272
|
if (!e || typeof e != "object") return null;
|
|
274
273
|
const n = e;
|
|
275
274
|
if (!Array.isArray(n.zones)) return null;
|
|
@@ -280,7 +279,7 @@ const m = (e) => (e || "").trim(), H = (e) => {
|
|
|
280
279
|
version: typeof n.version == "string" ? n.version : void 0,
|
|
281
280
|
zones: o,
|
|
282
281
|
links: r,
|
|
283
|
-
source:
|
|
282
|
+
source: rt(t || n.source),
|
|
284
283
|
timestamp: Number(n.timestamp || Date.now())
|
|
285
284
|
};
|
|
286
285
|
}, ie = (e) => {
|
|
@@ -300,7 +299,7 @@ const m = (e) => (e || "").trim(), H = (e) => {
|
|
|
300
299
|
try {
|
|
301
300
|
const r = P(n[G]);
|
|
302
301
|
if ((r == null ? void 0 : r.source) === "iana" && o.source !== "iana") return r;
|
|
303
|
-
n[G] = o, t.dispatchEvent !== !1 && n.dispatchEvent(new CustomEvent(
|
|
302
|
+
n[G] = o, t.dispatchEvent !== !1 && n.dispatchEvent(new CustomEvent(Xe, { detail: o }));
|
|
304
303
|
} catch {
|
|
305
304
|
}
|
|
306
305
|
return o;
|
|
@@ -311,7 +310,7 @@ const m = (e) => (e || "").trim(), H = (e) => {
|
|
|
311
310
|
} catch {
|
|
312
311
|
return null;
|
|
313
312
|
}
|
|
314
|
-
},
|
|
313
|
+
}, ot = () => {
|
|
315
314
|
var t;
|
|
316
315
|
const e = h();
|
|
317
316
|
if (!(e != null && e.name)) return null;
|
|
@@ -327,7 +326,7 @@ const m = (e) => (e || "").trim(), H = (e) => {
|
|
|
327
326
|
} catch {
|
|
328
327
|
return "";
|
|
329
328
|
}
|
|
330
|
-
},
|
|
329
|
+
}, at = (e) => {
|
|
331
330
|
try {
|
|
332
331
|
typeof sessionStorage < "u" && sessionStorage.setItem(Q, e);
|
|
333
332
|
} catch {
|
|
@@ -372,7 +371,7 @@ const _e = () => {
|
|
|
372
371
|
} catch {
|
|
373
372
|
return;
|
|
374
373
|
}
|
|
375
|
-
},
|
|
374
|
+
}, st = (e) => {
|
|
376
375
|
if (!e) return !1;
|
|
377
376
|
if (typeof Intl > "u" || typeof Intl.DateTimeFormat != "function") return !0;
|
|
378
377
|
try {
|
|
@@ -382,7 +381,7 @@ const _e = () => {
|
|
|
382
381
|
}
|
|
383
382
|
}, b = (e) => {
|
|
384
383
|
const t = m(e);
|
|
385
|
-
return t ? E.size ? E.has(t) :
|
|
384
|
+
return t ? E.size ? E.has(t) : st(t) : !1;
|
|
386
385
|
}, S = (e) => (E.clear(), e.zones.forEach((t) => {
|
|
387
386
|
const n = t.split("|")[0];
|
|
388
387
|
H(n);
|
|
@@ -390,7 +389,7 @@ const _e = () => {
|
|
|
390
389
|
t.split("|").forEach((n) => {
|
|
391
390
|
H(n);
|
|
392
391
|
});
|
|
393
|
-
}),
|
|
392
|
+
}), nt(), Array.from(E)), Qt = () => Array.from(E), it = async (e, t = {}) => {
|
|
394
393
|
const n = t.runtimeSource || "fallback", o = Ee();
|
|
395
394
|
if ((o == null ? void 0 : o.source) === "iana" && n !== "iana") {
|
|
396
395
|
const s = p.preloadFromData(o), c = S(s);
|
|
@@ -402,15 +401,15 @@ const _e = () => {
|
|
|
402
401
|
we(s, { source: n });
|
|
403
402
|
}
|
|
404
403
|
return { data: r, knownTimeZones: a };
|
|
405
|
-
},
|
|
404
|
+
}, Xt = async (e = {}) => {
|
|
406
405
|
const t = await p.preloadFromApi(e), n = S(t);
|
|
407
406
|
return A || (u.extend(p), A = !0), j(e.defaultTimeZone), e.writeRuntimeSnapshot !== !1 && we(t, { source: e.runtimeSource || "iana" }), { data: t, knownTimeZones: n };
|
|
408
|
-
},
|
|
407
|
+
}, en = (e, t) => (De(e, t), S(t), t), tn = async (e, t = {}) => {
|
|
409
408
|
const { url: n, ...o } = t, r = n ? await Y(e, n, o) : await Y(e, o);
|
|
410
409
|
return S(r), r;
|
|
411
|
-
},
|
|
410
|
+
}, ct = () => {
|
|
412
411
|
var n;
|
|
413
|
-
const e = (n = u.tz) == null ? void 0 : n.guess, t = typeof e == "function" ? e :
|
|
412
|
+
const e = (n = u.tz) == null ? void 0 : n.guess, t = typeof e == "function" ? e : tt;
|
|
414
413
|
try {
|
|
415
414
|
return t == null ? void 0 : t();
|
|
416
415
|
} catch {
|
|
@@ -420,9 +419,9 @@ const _e = () => {
|
|
|
420
419
|
var o, r;
|
|
421
420
|
const t = m(e), n = u.tz;
|
|
422
421
|
return t ? b(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
|
-
},
|
|
424
|
-
const e =
|
|
425
|
-
return !e || !t || ie(Ee()) === t ? Promise.resolve(null) : (N && se === t || (se = t, N =
|
|
422
|
+
}, ut = () => {
|
|
423
|
+
const e = ot(), t = ie(e);
|
|
424
|
+
return !e || !t || ie(Ee()) === t ? Promise.resolve(null) : (N && se === t || (se = t, N = it(e, {
|
|
426
425
|
defaultTimeZone: U || x() || $(),
|
|
427
426
|
runtimeSource: e.source
|
|
428
427
|
}).catch((n) => null)), N);
|
|
@@ -447,18 +446,18 @@ const _e = () => {
|
|
|
447
446
|
a && (a.__UPF_TIMEZONE_SNAPSHOT__ = o);
|
|
448
447
|
} catch {
|
|
449
448
|
}
|
|
450
|
-
return t.persist !== !1 &&
|
|
449
|
+
return t.persist !== !1 && at(n), t.syncDefault !== !1 && j(n), t.notify !== !1 && r && ft(o), t.dispatchEvent !== !1 && lt(o), n;
|
|
451
450
|
}, mt = (e, t = {}) => ee(m(e), {
|
|
452
451
|
persist: !0,
|
|
453
452
|
notify: !0,
|
|
454
453
|
dispatchEvent: !0,
|
|
455
454
|
syncDefault: !0,
|
|
456
455
|
...t
|
|
457
|
-
}),
|
|
458
|
-
|
|
456
|
+
}), nn = (e = "sync") => {
|
|
457
|
+
ut();
|
|
459
458
|
const t = X() || x() || $();
|
|
460
459
|
return t || Se.value ? ee(t, { source: e, persist: !1, dispatchEvent: !1 }) : "";
|
|
461
|
-
},
|
|
460
|
+
}, rn = (e) => (J.add(e), () => J.delete(e)), dt = (e) => {
|
|
462
461
|
var n, o, r, a;
|
|
463
462
|
if (typeof e == "string") return ze(e);
|
|
464
463
|
if (!e || typeof e != "object") return null;
|
|
@@ -481,15 +480,14 @@ const _e = () => {
|
|
|
481
480
|
e.key === Q && te({ timeZone: e.newValue || "", source: "storage" }, "storage");
|
|
482
481
|
}, gt = (e) => {
|
|
483
482
|
const t = e.data;
|
|
484
|
-
!t || t.type !==
|
|
483
|
+
!t || t.type !== Qe || te(t.detail || t, "message");
|
|
485
484
|
}, It = () => {
|
|
486
485
|
const e = h();
|
|
487
486
|
return !e || ce ? !1 : (ce = !0, e.addEventListener(Ae, Tt), e.addEventListener("storage", ht), e.addEventListener("message", gt), !0);
|
|
488
487
|
};
|
|
489
488
|
It();
|
|
490
|
-
Le();
|
|
491
489
|
const yt = () => {
|
|
492
|
-
const t = m(Se.value) || X() || x() || $() ||
|
|
490
|
+
const t = m(Se.value) || X() || x() || $() || ct() || _e();
|
|
493
491
|
return b(t) ? m(t) : O;
|
|
494
492
|
}, T = (e) => {
|
|
495
493
|
const t = m(e) || yt();
|
|
@@ -508,27 +506,27 @@ const yt = () => {
|
|
|
508
506
|
}, C = (e) => {
|
|
509
507
|
if (u.isDayjs(e)) return e;
|
|
510
508
|
if (e == null || e === "") return u();
|
|
511
|
-
const t = u(
|
|
509
|
+
const t = u(k(e));
|
|
512
510
|
return t.isValid() ? t : u();
|
|
513
|
-
}, _ = (e) => e == null || e === "",
|
|
511
|
+
}, _ = (e) => e == null || e === "", k = (e) => {
|
|
514
512
|
if (typeof e != "string") return e;
|
|
515
513
|
const t = e.trim();
|
|
516
514
|
return /^\d{13}$/.test(t) ? Number(t) : /^\d{10}$/.test(t) ? Number(t) * 1e3 : e;
|
|
517
|
-
},
|
|
515
|
+
}, Le = (e) => u.isDayjs(e) ? e : _(e) ? u() : u(k(e)), be = (e, t = !1) => {
|
|
518
516
|
const n = m(e);
|
|
519
517
|
return n ? T(n) : t ? T() : "";
|
|
520
|
-
}, pt = (e, t) => C(e).tz(T(t)).utcOffset(), At = (e, t, n = pe) => C(e).tz(T(t)).format(n), wt = (e, t) =>
|
|
521
|
-
const n = t.format || w, o =
|
|
518
|
+
}, pt = (e, t) => C(e).tz(T(t)).utcOffset(), At = (e, t, n = pe) => C(e).tz(T(t)).format(n), wt = (e, t) => Le(e).format(t.format), Ce = (e, t) => {
|
|
519
|
+
const n = t.format || w, o = be(t.timeZone, t.useClientTimeZone);
|
|
522
520
|
if (!o) return wt(e, { format: n });
|
|
523
521
|
if (t.inputMode === "local")
|
|
524
|
-
return _(e) ? u().tz(o).format(n) : u.tz(
|
|
525
|
-
const r =
|
|
522
|
+
return _(e) ? u().tz(o).format(n) : u.tz(k(e), o).format(n);
|
|
523
|
+
const r = Le(e);
|
|
526
524
|
return r.isValid() ? r.tz(o).format(n) : r.format(n);
|
|
527
525
|
}, Et = (e) => typeof e == "function", zt = (e, t) => {
|
|
528
526
|
var i, f;
|
|
529
527
|
const { moment: n } = t, o = t.format || w;
|
|
530
|
-
if (!Et(n)) return
|
|
531
|
-
const r = _(e) ? void 0 :
|
|
528
|
+
if (!Et(n)) return Ce(e, { ...t, dateLibrary: "dayjs" });
|
|
529
|
+
const r = _(e) ? void 0 : k(e), a = be(t.timeZone, t.useClientTimeZone);
|
|
532
530
|
if (!a || typeof n.tz != "function") return n(r).format(o);
|
|
533
531
|
if (t.inputMode === "local")
|
|
534
532
|
return _(e) ? ((f = (i = n()).tz) == null ? void 0 : f.call(i, a).format(o)) || n().format(o) : n.tz(r, a).format(o);
|
|
@@ -539,9 +537,9 @@ const yt = () => {
|
|
|
539
537
|
...n,
|
|
540
538
|
format: n.format || w
|
|
541
539
|
};
|
|
542
|
-
return o.dateLibrary === "moment" ? zt(e, o) :
|
|
543
|
-
},
|
|
544
|
-
function
|
|
540
|
+
return o.dateLibrary === "moment" ? zt(e, o) : Ce(e, o);
|
|
541
|
+
}, on = (e, t = w, n = {}) => St(e, { ...n, format: t }), I = (e) => String(e).padStart(2, "0"), _t = (e) => u.isDayjs(e) ? e.toDate() : _(e) ? /* @__PURE__ */ new Date() : new Date(k(e)), ue = (e, t, n) => t.replace(/YYYY/g, n.year || `${e.getFullYear()}`).replace(/MM/g, n.month || I(e.getMonth() + 1)).replace(/DD/g, n.day || I(e.getDate())).replace(/HH/g, n.hour || I(e.getHours())).replace(/mm/g, n.minute || I(e.getMinutes())).replace(/ss/g, n.second || I(e.getSeconds())), Lt = () => _e() || O;
|
|
542
|
+
function an(e, t, n = w, o = y) {
|
|
545
543
|
const r = typeof t == "object" && t !== null ? t : { timeZone: t, format: n, locale: o }, a = _t(e);
|
|
546
544
|
if (Number.isNaN(a.getTime())) return "";
|
|
547
545
|
const s = m(r.timeZone) || Lt(), c = r.format || w;
|
|
@@ -561,18 +559,18 @@ function sn(e, t, n = w, o = y) {
|
|
|
561
559
|
return ue(a, c, {});
|
|
562
560
|
}
|
|
563
561
|
}
|
|
564
|
-
const ke = (e) => `UTC${e}`,
|
|
562
|
+
const ke = (e) => `UTC${e}`, ve = (e, t) => {
|
|
565
563
|
const n = pt(e, t), o = n >= 0 ? "+" : "-", r = Math.abs(n);
|
|
566
564
|
return `UTC${o}${I(Math.floor(r / 60))}:${I(r % 60)}`;
|
|
567
565
|
}, bt = (e, t = /* @__PURE__ */ new Date()) => {
|
|
568
566
|
const n = e.currentUtcOffsetText || e.baseUtcOffsetText;
|
|
569
|
-
return n ? `UTC${n}` :
|
|
567
|
+
return n ? `UTC${n}` : ve(t, e.timeZoneId);
|
|
570
568
|
}, Ct = (e, t) => {
|
|
571
569
|
const n = e.match(/([+-]\d{1,2})(?::?(\d{2}))?/) || [];
|
|
572
570
|
if (!n[1]) return t;
|
|
573
571
|
const o = n[1].startsWith("-") ? "-" : "+", r = n[1].replace(/[+-]/, "").padStart(2, "0"), a = n[2] || "00";
|
|
574
572
|
return `UTC${o}${r}:${a}`;
|
|
575
|
-
},
|
|
573
|
+
}, kt = (e, t, n) => {
|
|
576
574
|
var r, a;
|
|
577
575
|
const o = ke(n.format("Z"));
|
|
578
576
|
try {
|
|
@@ -581,7 +579,7 @@ const ke = (e) => `UTC${e}`, Ne = (e, t) => {
|
|
|
581
579
|
} catch {
|
|
582
580
|
return o;
|
|
583
581
|
}
|
|
584
|
-
},
|
|
582
|
+
}, Ne = (e, t) => {
|
|
585
583
|
const n = t.year();
|
|
586
584
|
return Array.from(
|
|
587
585
|
new Set(
|
|
@@ -591,27 +589,27 @@ const ke = (e) => `UTC${e}`, Ne = (e, t) => {
|
|
|
591
589
|
})
|
|
592
590
|
)
|
|
593
591
|
);
|
|
594
|
-
},
|
|
592
|
+
}, Me = (e, t) => {
|
|
595
593
|
const n = T(e);
|
|
596
594
|
if (!b(n)) return !1;
|
|
597
595
|
const o = C(t).tz(n);
|
|
598
|
-
return
|
|
596
|
+
return Ne(n, o).length > 1;
|
|
599
597
|
}, V = (e, t) => {
|
|
600
598
|
const n = T(e);
|
|
601
599
|
if (!b(n)) return !1;
|
|
602
|
-
const o = C(t).tz(n), r =
|
|
600
|
+
const o = C(t).tz(n), r = Ne(n, o);
|
|
603
601
|
return r.length <= 1 ? !1 : o.utcOffset() === Math.max(...r);
|
|
604
|
-
},
|
|
602
|
+
}, sn = (e, t) => V(e, t), Fe = (e) => {
|
|
605
603
|
if (e === 1 || e === "1") return !0;
|
|
606
604
|
if (e === 0 || e === "0") return !1;
|
|
607
|
-
},
|
|
608
|
-
const n =
|
|
609
|
-
return typeof n == "boolean" ? n :
|
|
605
|
+
}, vt = (e, t) => {
|
|
606
|
+
const n = Fe(e.dynamicOffsetFlag);
|
|
607
|
+
return typeof n == "boolean" ? n : Me(e.timeZoneId, t);
|
|
610
608
|
}, Nt = (e, t) => {
|
|
611
|
-
const n =
|
|
609
|
+
const n = Fe(e.currentDstFlag);
|
|
612
610
|
return typeof n == "boolean" ? n : V(e.timeZoneId, t);
|
|
613
|
-
},
|
|
614
|
-
const o = n.tzShowName || bt(n, t), r =
|
|
611
|
+
}, cn = (e, t = /* @__PURE__ */ new Date()) => e.map((n) => {
|
|
612
|
+
const o = n.tzShowName || bt(n, t), r = vt(n, t);
|
|
615
613
|
return {
|
|
616
614
|
value: n.timeZoneId,
|
|
617
615
|
zoneName: o,
|
|
@@ -622,7 +620,7 @@ const ke = (e) => `UTC${e}`, Ne = (e, t) => {
|
|
|
622
620
|
}), Mt = (e) => {
|
|
623
621
|
const t = e.toLowerCase().split("-")[0];
|
|
624
622
|
return ae[t] || ae.default;
|
|
625
|
-
}, Ft = (e) => typeof e.showDaylightSavingLabel == "boolean" ? e.showDaylightSavingLabel : e.showDaylightSavingMarker ?? !0,
|
|
623
|
+
}, Ft = (e) => typeof e.showDaylightSavingLabel == "boolean" ? e.showDaylightSavingLabel : e.showDaylightSavingMarker ?? !0, un = (e, t, n = {}) => {
|
|
626
624
|
const {
|
|
627
625
|
showZoneLabel: o = !0,
|
|
628
626
|
zoneLabel: r,
|
|
@@ -631,12 +629,12 @@ const ke = (e) => `UTC${e}`, Ne = (e, t) => {
|
|
|
631
629
|
standardTimeLabel: c,
|
|
632
630
|
daylightSavingLabel: i,
|
|
633
631
|
format: f = pe
|
|
634
|
-
} = n, l = T(t), d = At(e, l, f), Z = typeof a == "boolean" ? a :
|
|
635
|
-
return o ? [d, r ||
|
|
636
|
-
},
|
|
637
|
-
const t = Dt(e.locale, e.supportedLocales), n = T(e.timeZone), o = C(e.value).tz(n), r =
|
|
632
|
+
} = n, l = T(t), d = At(e, l, f), Z = typeof a == "boolean" ? a : Me(l, e), g = (typeof s == "boolean" ? s : V(l, e)) ? i : c, D = Z && g ? `[${g}]` : "";
|
|
633
|
+
return o ? [d, r || ve(e, l), D].filter(Boolean).join(" ") : [d, D].filter(Boolean).join(" ");
|
|
634
|
+
}, fn = (e = {}) => {
|
|
635
|
+
const t = Dt(e.locale, e.supportedLocales), n = T(e.timeZone), o = C(e.value).tz(n), r = kt(n, t, o), a = ke(o.format("Z")), s = V(n, o), c = s ? Mt(t) : "", i = Ft(e), f = s && i ? `${r} - ${c}` : r;
|
|
638
636
|
return {
|
|
639
|
-
formattedValue: o.format(e.format ||
|
|
637
|
+
formattedValue: o.format(e.format || qe),
|
|
640
638
|
locale: t,
|
|
641
639
|
timeZone: n,
|
|
642
640
|
timeZoneName: r,
|
|
@@ -648,58 +646,58 @@ const ke = (e) => `UTC${e}`, Ne = (e, t) => {
|
|
|
648
646
|
};
|
|
649
647
|
};
|
|
650
648
|
export {
|
|
651
|
-
|
|
649
|
+
Xe as IANA_TIMEZONE_DATA_CHANGE_EVENT,
|
|
652
650
|
Ae as TIMEZONE_CHANGE_EVENT,
|
|
653
|
-
|
|
651
|
+
Gt as TIME_ZONE_PACKED_DATA_URL,
|
|
654
652
|
G as UPF_IANA_TIMEZONE_DATA_KEY,
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
653
|
+
Qe as UPF_TIMEZONE_MESSAGE_TYPE,
|
|
654
|
+
it as applyDayjsIanaTimeZoneData,
|
|
655
|
+
en as applyMomentIanaTimeZoneData,
|
|
656
|
+
Ot as assertPackedIanaData,
|
|
657
|
+
Bt as assertPackedIanaTzData,
|
|
658
|
+
Kt as buildIanaFetchInit,
|
|
659
|
+
cn as buildTimeZoneDisplayOptions,
|
|
660
|
+
Rt as clearDayjsIanaCache,
|
|
663
661
|
Se as clientTimeZone,
|
|
664
|
-
|
|
662
|
+
Yt as createIanaDbFromPackedData,
|
|
665
663
|
p as dayjsTimezoneIanaPlugin,
|
|
666
|
-
|
|
667
|
-
|
|
664
|
+
ut as ensureInjectedIanaTimeZoneData,
|
|
665
|
+
un as formatClientLocalDateTimeLine,
|
|
668
666
|
At as formatInTimeZone,
|
|
669
667
|
St as formatLocalDateTime,
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
668
|
+
an as formatLocalDateTimeIntl,
|
|
669
|
+
ve as formatTimeZoneOffsetLabel,
|
|
670
|
+
Ht as getAccessTokenFromLocalStorage,
|
|
673
671
|
Lt as getBrowserTimeZone,
|
|
674
|
-
|
|
672
|
+
xt as getCachedDayjsPackedIanaData,
|
|
675
673
|
yt as getClientTimeZone,
|
|
676
|
-
|
|
677
|
-
|
|
674
|
+
Jt as getDefaultIanaAuthorization,
|
|
675
|
+
Qt as getKnownTimeZoneIds,
|
|
678
676
|
Ee as getRuntimeIanaTimeZoneDataSnapshot,
|
|
679
|
-
|
|
677
|
+
fn as getTimeZoneDisplayInfo,
|
|
680
678
|
pt as getZoneUtcOffset,
|
|
681
679
|
It as initClientTimeZoneSync,
|
|
682
|
-
|
|
680
|
+
sn as isDaylightSavingTime,
|
|
683
681
|
b as isKnownTimeZone,
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
682
|
+
Xt as loadDayjsIanaTimeZoneData,
|
|
683
|
+
Wt as loadIanaData,
|
|
684
|
+
qt as loadIanaFromApi,
|
|
687
685
|
De as loadMomentIanaData,
|
|
688
686
|
Y as loadMomentIanaFromApi,
|
|
689
|
-
|
|
687
|
+
tn as loadMomentIanaTimeZoneData,
|
|
690
688
|
Dt as normalizeLocaleCode,
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
689
|
+
rn as onClientTimeZoneChange,
|
|
690
|
+
Vt as preloadDayjsIanaFromApi,
|
|
691
|
+
$t as preloadDayjsIanaFromData,
|
|
692
|
+
ot as readInjectedParentIanaTimeZoneDataSnapshot,
|
|
695
693
|
S as rebuildKnownTimeZoneIds,
|
|
696
694
|
T as resolveTimeZone,
|
|
697
695
|
bt as resolveUtcOffsetFallback,
|
|
698
696
|
mt as setClientTimeZone,
|
|
699
697
|
j as setDefaultTimeZone,
|
|
700
698
|
we as setRuntimeIanaTimeZoneDataSnapshot,
|
|
701
|
-
|
|
702
|
-
|
|
699
|
+
nn as syncClientTimeZone,
|
|
700
|
+
Me as timeZoneHasDST,
|
|
703
701
|
V as timeZoneIsDST,
|
|
704
|
-
|
|
702
|
+
on as toLocalDate
|
|
705
703
|
};
|
|
Binary file
|