@das-fed/upf-utils 6.4.0-hot.11 → 6.4.0-hot.13

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.
Files changed (204) hide show
  1. package/api-services/es5.d.ts +2 -0
  2. package/api-services/es5.js +1125 -1074
  3. package/api-services/i18n/es5.d.ts +63 -0
  4. package/api-services/index.js +852 -813
  5. package/api-services/index.js.gz +0 -0
  6. package/api-services/modules/app-manage/es5.d.ts +2 -0
  7. package/api-services/modules/app-manage/es5.js +957 -909
  8. package/api-services/modules/app-manage/index.js +746 -711
  9. package/api-services/modules/app-manage/index.js.gz +0 -0
  10. package/api-services/modules/authentication/es5.d.ts +2 -0
  11. package/api-services/modules/authentication/es5.js +1650 -1587
  12. package/api-services/modules/authentication/index.js +1410 -1353
  13. package/api-services/modules/authentication/index.js.gz +0 -0
  14. package/api-services/modules/bems/es5.d.ts +6 -0
  15. package/api-services/modules/bems/es5.js +1645 -1582
  16. package/api-services/modules/bems/index.js +1404 -1347
  17. package/api-services/modules/bems/index.js.gz +0 -0
  18. package/api-services/modules/contract/es5.d.ts +2 -0
  19. package/api-services/modules/contract/es5.js +1250 -1199
  20. package/api-services/modules/contract/index.js +1035 -996
  21. package/api-services/modules/contract/index.js.gz +0 -0
  22. package/api-services/modules/duty-manage/es5.d.ts +7 -0
  23. package/api-services/modules/duty-manage/es5.js +963 -912
  24. package/api-services/modules/duty-manage/index.js +755 -716
  25. package/api-services/modules/duty-manage/index.js.gz +0 -0
  26. package/api-services/modules/enterpriseright/es5.d.ts +2 -0
  27. package/api-services/modules/enterpriseright/es5.js +1250 -1199
  28. package/api-services/modules/enterpriseright/index.js +1035 -996
  29. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  30. package/api-services/modules/es5.d.ts +21 -0
  31. package/api-services/modules/es5.js +1113 -1062
  32. package/api-services/modules/file/es5.d.ts +37 -0
  33. package/api-services/modules/file/es5.js +1005 -954
  34. package/api-services/modules/file/index.js +786 -747
  35. package/api-services/modules/file/index.js.gz +0 -0
  36. package/api-services/modules/gateway-edge/es5.d.ts +2 -0
  37. package/api-services/modules/gateway-edge/es5.js +1250 -1199
  38. package/api-services/modules/gateway-edge/index.js +1035 -996
  39. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  40. package/api-services/modules/index.js +856 -817
  41. package/api-services/modules/index.js.gz +0 -0
  42. package/api-services/modules/iot/es5.d.ts +16 -0
  43. package/api-services/modules/iot/es5.js +1389 -1350
  44. package/api-services/modules/iot/index.js +1153 -1132
  45. package/api-services/modules/iot/index.js.gz +0 -0
  46. package/api-services/modules/justauth/es5.d.ts +3 -0
  47. package/api-services/modules/justauth/es5.js +1327 -1285
  48. package/api-services/modules/justauth/index.js +1111 -1086
  49. package/api-services/modules/justauth/index.js.gz +0 -0
  50. package/api-services/modules/knowledge/es5.d.ts +2 -0
  51. package/api-services/modules/knowledge/es5.js +1052 -998
  52. package/api-services/modules/knowledge/index.js +822 -779
  53. package/api-services/modules/knowledge/index.js.gz +0 -0
  54. package/api-services/modules/link/es5.d.ts +2 -0
  55. package/api-services/modules/link/es5.js +1250 -1199
  56. package/api-services/modules/link/index.js +1035 -996
  57. package/api-services/modules/link/index.js.gz +0 -0
  58. package/api-services/modules/permission/es5.d.ts +2 -0
  59. package/api-services/modules/permission/es5.js +1250 -1199
  60. package/api-services/modules/permission/index.js +1035 -996
  61. package/api-services/modules/permission/index.js.gz +0 -0
  62. package/api-services/modules/platformManage/es5.d.ts +14 -0
  63. package/api-services/modules/platformManage/es5.js +1334 -1274
  64. package/api-services/modules/platformManage/index.js +1123 -1070
  65. package/api-services/modules/platformManage/index.js.gz +0 -0
  66. package/api-services/modules/portal/es5.d.ts +2 -0
  67. package/api-services/modules/portal/es5.js +1250 -1199
  68. package/api-services/modules/portal/index.js +1035 -996
  69. package/api-services/modules/portal/index.js.gz +0 -0
  70. package/api-services/modules/space-manage/es5.d.ts +2 -0
  71. package/api-services/modules/space-manage/es5.js +968 -917
  72. package/api-services/modules/space-manage/index.js +763 -724
  73. package/api-services/modules/space-manage/index.js.gz +0 -0
  74. package/api-services/modules/super-admin/es5.d.ts +8 -0
  75. package/api-services/modules/super-admin/es5.js +1260 -1209
  76. package/api-services/modules/super-admin/index.js +1038 -999
  77. package/api-services/modules/super-admin/index.js.gz +0 -0
  78. package/api-services/modules/supplier/es5.d.ts +6 -0
  79. package/api-services/modules/supplier/es5.js +1249 -1198
  80. package/api-services/modules/supplier/index.js +1032 -993
  81. package/api-services/modules/supplier/index.js.gz +0 -0
  82. package/api-services/modules/supplychain-manage/es5.d.ts +2 -0
  83. package/api-services/modules/supplychain-manage/es5.js +983 -932
  84. package/api-services/modules/supplychain-manage/index.js +775 -736
  85. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  86. package/api-services/modules/systemConfiguration/es5.d.ts +2 -0
  87. package/api-services/modules/systemConfiguration/es5.js +1250 -1199
  88. package/api-services/modules/systemConfiguration/index.js +1035 -996
  89. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  90. package/api-services/modules/tool/es5.d.ts +2 -0
  91. package/api-services/modules/tool/es5.js +971 -920
  92. package/api-services/modules/tool/index.js +764 -725
  93. package/api-services/modules/tool/index.js.gz +0 -0
  94. package/api-services/src/create-service/es5.d.ts +1 -0
  95. package/api-services/src/create-service/es5.js +1396 -1357
  96. package/api-services/src/create-service/index.js +1170 -1149
  97. package/api-services/src/create-service/index.js.gz +0 -0
  98. package/atob/es5.d.ts +2 -0
  99. package/common-info/es5.d.ts +73 -0
  100. package/common-info/es5.js +2155 -2063
  101. package/common-info/getIframeUrl/es5.d.ts +9 -0
  102. package/common-info/getInfoFromUrl/es5.d.ts +8 -0
  103. package/common-info/getPermissionMethod/es5.d.ts +77 -0
  104. package/common-info/getPermissionMethod/es5.js +1414 -1313
  105. package/common-info/getPermissionMethod/index.d.ts +57 -6
  106. package/common-info/getPermissionMethod/index.js +1155 -1073
  107. package/common-info/getPermissionMethod/index.js.gz +0 -0
  108. package/common-info/index.d.ts +5 -8
  109. package/common-info/index.js +1818 -1751
  110. package/common-info/index.js.gz +0 -0
  111. package/common-info/set-personal-info/es5.d.ts +5 -0
  112. package/common-info/type.d.ts +2 -2
  113. package/common-tools/arr-tools/es5.d.ts +15 -0
  114. package/common-tools/calc-text-width/es5.d.ts +1 -0
  115. package/common-tools/date-format/es5.d.ts +7 -0
  116. package/common-tools/es5.d.ts +15 -0
  117. package/common-tools/es5.js +9 -0
  118. package/common-tools/extract-file-name/es5.d.ts +1 -0
  119. package/common-tools/get-file-extension/es5.d.ts +6 -0
  120. package/common-tools/get-url-params/es5.d.ts +46 -0
  121. package/common-tools/handle-data/es5.d.ts +34 -0
  122. package/common-tools/handle-data/es5.js +44 -6
  123. package/common-tools/handle-data/index.d.ts +16 -1
  124. package/common-tools/handle-data/index.js +1 -1
  125. package/common-tools/handle-data/index.js.gz +0 -0
  126. package/common-tools/index.d.ts +1 -0
  127. package/common-tools/index.js +1 -0
  128. package/common-tools/nest-tree-format/es5.d.ts +30 -0
  129. package/common-tools/obj-tools/es5.d.ts +7 -0
  130. package/common-tools/platform-tools/es5.d.ts +19 -0
  131. package/common-tools/queue-promise/es5.d.ts +6 -0
  132. package/common-tools/setHtmlMinWH/es5.d.ts +5 -0
  133. package/common-tools/timezone-format/es5.d.ts +132 -0
  134. package/common-tools/timezone-format/es5.js +822 -0
  135. package/common-tools/timezone-format/get-iana-data/dayjs-timezone-iana-plugin.d.ts +72 -0
  136. package/common-tools/timezone-format/get-iana-data/iana-api-fetch.d.ts +21 -0
  137. package/common-tools/timezone-format/get-iana-data/moment-iana-loader.d.ts +29 -0
  138. package/common-tools/timezone-format/index.d.ts +132 -0
  139. package/common-tools/timezone-format/index.js +439 -0
  140. package/common-tools/timezone-format/index.js.gz +0 -0
  141. package/common-tools/update-browser-title/es5.d.ts +1 -0
  142. package/common-tools/update-fav-icon/es5.d.ts +11 -0
  143. package/config/es5.d.ts +2 -0
  144. package/create-api-service/access-token-auto-refresh/es5.d.ts +20 -0
  145. package/create-api-service/access-token-auto-refresh/es5.js +27 -26
  146. package/create-api-service/access-token-auto-refresh/index.js +27 -26
  147. package/create-api-service/access-token-auto-refresh/index.js.gz +0 -0
  148. package/create-api-service/check-token/es5.d.ts +12 -0
  149. package/create-api-service/es5.d.ts +8 -0
  150. package/create-api-service/es5.js +1397 -1358
  151. package/create-api-service/i18n/es5.d.ts +39 -0
  152. package/create-api-service/index.js +1171 -1150
  153. package/create-api-service/index.js.gz +0 -0
  154. package/create-api-service/proxy-sso/es5.d.ts +3 -0
  155. package/create-api-service/sso/es5.d.ts +21 -0
  156. package/create-api-service/token-refresh-shared/es5.d.ts +30 -0
  157. package/curring-http/es5.d.ts +12 -0
  158. package/dimple-canvas/es5.d.ts +3 -0
  159. package/directive/auth/es5.d.ts +8 -0
  160. package/directive/auth/es5.js +50 -42
  161. package/directive/auth/index.d.ts +1 -1
  162. package/directive/auth/index.js +42 -34
  163. package/directive/auth/index.js.gz +0 -0
  164. package/directive/clickOutside/es5.d.ts +6 -0
  165. package/directive/es5.d.ts +3 -0
  166. package/directive/hoverInside/es5.d.ts +6 -0
  167. package/directive/utils/es5.d.ts +7 -0
  168. package/dom-check-in/es5.d.ts +6 -0
  169. package/dom-watcher/es5.d.ts +25 -0
  170. package/esm-map.json +66 -3
  171. package/hooks/popup-manager/use-zindex/es5.d.ts +3 -0
  172. package/hooks/use-get-auth/apis.d.ts +4 -0
  173. package/hooks/use-get-auth/es5.d.ts +8 -0
  174. package/hooks/use-get-auth/es5.js +325 -57
  175. package/hooks/use-get-auth/index.d.ts +8 -4
  176. package/hooks/use-get-auth/index.js +71 -16
  177. package/hooks/use-get-auth/index.js.gz +0 -0
  178. package/i18n-bridge/es5.d.ts +10 -0
  179. package/index.d.ts +2 -0
  180. package/index.js +2 -0
  181. package/load-js/es5.d.ts +3 -0
  182. package/nextTiken/es5.d.ts +12 -0
  183. package/oss/es5.d.ts +2 -0
  184. package/package.json +4 -3
  185. package/pinyin-first-character/es5.d.ts +2 -0
  186. package/process-engine-info/es5.d.ts +13 -0
  187. package/pure-image-src/es5.d.ts +2 -0
  188. package/size-watcher/es5.d.ts +6 -0
  189. package/style/es5.d.ts +2 -0
  190. package/theme/es5.d.ts +111 -0
  191. package/theme/es5.js +1676 -0
  192. package/theme/index.d.ts +111 -0
  193. package/theme/index.js +1118 -0
  194. package/theme/index.js.gz +0 -0
  195. package/token-tools/es5.d.ts +21 -0
  196. package/use-low-code/es5.d.ts +1 -0
  197. package/use-low-code/es5.js +37 -53
  198. package/use-low-code/index.js +36 -31
  199. package/use-low-code/index.js.gz +0 -0
  200. package/vue/es5.d.ts +1 -0
  201. package/vue/hooks/use-model-value/es5.d.ts +9 -0
  202. package/webSocket-service/es5.d.ts +41 -0
  203. package/with-install/es5.d.ts +11 -0
  204. package/use-low-code/style.css +0 -1
@@ -0,0 +1,439 @@
1
+ import f from "dayjs";
2
+ import tt from "dayjs/plugin/utc";
3
+ import et from "dayjs/plugin/timezone";
4
+ import "@das-fed/upf-utils/config";
5
+ const P = "/api/admin/basic-application/sys-info/v1/license/time-zone-packed-data";
6
+ function nt() {
7
+ if (typeof localStorage > "u")
8
+ return null;
9
+ try {
10
+ return localStorage.getItem("accessToken");
11
+ } catch {
12
+ return null;
13
+ }
14
+ }
15
+ function ot() {
16
+ const t = nt();
17
+ if (!(t == null || t === ""))
18
+ return t.trim().startsWith("Bearer ") ? t.trim() : `Bearer ${t.trim()}`;
19
+ }
20
+ function $(t = {}) {
21
+ const e = t.authorization !== void 0 ? t.authorization === "" || t.authorization == null ? void 0 : t.authorization : ot(), n = { ...t.headers || {} };
22
+ if (e != null && e !== "" && (n.Authorization = e), Object.keys(n).length !== 0)
23
+ return { headers: n };
24
+ }
25
+ let L = null, I = null;
26
+ function _(t) {
27
+ if (!t || typeof t != "object")
28
+ throw new Error("Invalid IANA response: expected an object");
29
+ const e = t;
30
+ if (!Array.isArray(e.zones))
31
+ throw new Error("Invalid IANA response: missing zones array");
32
+ const n = e.links;
33
+ return {
34
+ version: typeof e.version == "string" ? e.version : void 0,
35
+ zones: e.zones,
36
+ links: Array.isArray(n) ? n : []
37
+ };
38
+ }
39
+ async function rt(t, e) {
40
+ if (typeof fetch != "function")
41
+ throw new Error("fetch is not available. Pass preloadFromApi options.fetchJson.");
42
+ const n = await fetch(t, e);
43
+ if (!n.ok)
44
+ throw new Error(`IANA request failed: ${n.status} ${n.statusText}`);
45
+ return n.json();
46
+ }
47
+ function V(t) {
48
+ return I = _(t), L = mt(I), I;
49
+ }
50
+ function at() {
51
+ return I;
52
+ }
53
+ async function st(t = {}) {
54
+ const e = t.url ?? P, n = $({
55
+ authorization: t.authorization,
56
+ headers: t.headers
57
+ }), o = await (t.fetchJson ?? rt)(e, n), a = t.parseResponse ? t.parseResponse(o) : _(o);
58
+ return V(a);
59
+ }
60
+ function it() {
61
+ L = null, I = null;
62
+ }
63
+ function F(t) {
64
+ return t > 96 ? t - 87 : t > 64 ? t - 29 : t - 48;
65
+ }
66
+ function ct(t) {
67
+ let e = 1, n = 0, r = 0, o = 1;
68
+ const a = t.split("."), c = a[0], i = a[1] || "";
69
+ t.charCodeAt(0) === 45 && (e = -1);
70
+ for (let s = 0; s < c.length; s++) {
71
+ const l = c.charCodeAt(s);
72
+ l !== 45 && (n = 60 * n + F(l));
73
+ }
74
+ for (let s = 0; s < i.length; s++)
75
+ o = o / 60, r += F(i.charCodeAt(s)) * o;
76
+ return (n + r) * e;
77
+ }
78
+ function v(t) {
79
+ const e = [];
80
+ for (const n of t)
81
+ e.push(ct(n));
82
+ return e;
83
+ }
84
+ function ft(t) {
85
+ let e = 0;
86
+ const n = [];
87
+ for (const r of t)
88
+ e += r, n.push(Math.round(e * 6e4));
89
+ return n.push(1 / 0), n;
90
+ }
91
+ function lt(t, e) {
92
+ const n = [];
93
+ for (const r of e)
94
+ n.push(t[r]);
95
+ return n;
96
+ }
97
+ function ut(t) {
98
+ const e = t.split("|");
99
+ if (e.length < 5)
100
+ throw new Error("Invalid packed zone format");
101
+ const n = e[0].toLowerCase(), r = v(e[2].split(" ")), o = v(e[3].split("")), a = ft(v(e[4].split(" "))), c = lt(r, o);
102
+ return {
103
+ name: n,
104
+ rule: {
105
+ u: a,
106
+ o: c
107
+ }
108
+ };
109
+ }
110
+ function mt(t) {
111
+ if (!t || !Array.isArray(t.zones))
112
+ throw new TypeError("packed iana data must contain zones array");
113
+ const e = {};
114
+ for (const r of t.zones) {
115
+ const o = ut(r);
116
+ e[o.name] = o.rule;
117
+ }
118
+ const n = t.links || [];
119
+ for (const r of n) {
120
+ const o = r.split("|");
121
+ if (o.length < 2)
122
+ continue;
123
+ const a = o[0].toLowerCase(), c = o[1].toLowerCase(), i = e[c];
124
+ i && (e[a] = i);
125
+ }
126
+ return e;
127
+ }
128
+ function dt() {
129
+ if (!L)
130
+ throw new Error(
131
+ "IANA data not loaded. Await dayjsTimezoneIanaPlugin.preloadFromApi({ url: ... }) before dayjs.extend(dayjsTimezoneIanaPlugin)."
132
+ );
133
+ return L;
134
+ }
135
+ function ht(t, e, n) {
136
+ const r = typeof e == "string" ? e.toLowerCase() : "", o = n[r];
137
+ if (o === void 0)
138
+ throw Error("Unknown Time Zone " + e);
139
+ const a = o.o, c = o.u, i = c.length - 1;
140
+ for (let s = 0; s < i; s++) {
141
+ let l = a[s];
142
+ const u = a[s && s - 1];
143
+ if (l > u && (l = u), t < c[s] - l * 6e4)
144
+ return a[s];
145
+ }
146
+ return a[i];
147
+ }
148
+ const Tt = (t, e, n) => {
149
+ var s, l;
150
+ let r = "";
151
+ const o = n.tz, a = (s = o == null ? void 0 : o.guess) == null ? void 0 : s.bind(o), c = (l = o == null ? void 0 : o.setDefault) == null ? void 0 : l.bind(o), i = (u, h, p) => {
152
+ const Z = p || h || r, T = p ? h : void 0;
153
+ return (typeof n.utc == "function" ? n.utc(u, T) : n(u, T).utc()).tz(Z);
154
+ };
155
+ o && Object.assign(i, o), i.setDefault = (u) => {
156
+ r = u, c == null || c(u);
157
+ }, i.guess = () => a ? a() : typeof Intl < "u" && typeof Intl.DateTimeFormat == "function" ? Intl.DateTimeFormat().resolvedOptions().timeZone || r || "UTC" : r || "UTC", n.tz = i, e.prototype.tz = function(u = r, h) {
158
+ var g;
159
+ const p = u || ((g = i.guess) == null ? void 0 : g.call(i)) || "UTC", Z = this.utc().valueOf(), T = ht(Z, p, dt());
160
+ return this.utcOffset(-T, h);
161
+ };
162
+ }, m = Tt;
163
+ m.preloadFromApi = st;
164
+ m.preloadFromData = V;
165
+ m.getCachedPackedData = at;
166
+ m.clearIanaCache = it;
167
+ function yt(t) {
168
+ if (!t || typeof t != "object")
169
+ throw new Error("Invalid IANA response: expected an object");
170
+ const e = t;
171
+ if (!Array.isArray(e.zones))
172
+ throw new Error("Invalid IANA response: missing zones array");
173
+ const n = e.links;
174
+ return {
175
+ version: typeof e.version == "string" ? e.version : void 0,
176
+ zones: e.zones,
177
+ links: Array.isArray(n) ? n : []
178
+ };
179
+ }
180
+ function Y(t, e) {
181
+ if (!t || typeof t.tz != "object" || typeof t.tz.load != "function")
182
+ throw new Error("moment.tz.load is missing. Import moment-timezone before calling loadIanaData.");
183
+ if (!e || !Array.isArray(e.zones))
184
+ throw new Error("Invalid packed IANA data: zones must be an array");
185
+ t.tz.load(e);
186
+ }
187
+ async function pt(t, e) {
188
+ if (typeof fetch != "function")
189
+ throw new Error("fetch is not available. Pass loadIanaFromApi options.fetchJson in Node or polyfill fetch.");
190
+ const n = await fetch(t, e);
191
+ if (!n.ok)
192
+ throw new Error(`IANA request failed: ${n.status} ${n.statusText}`);
193
+ return n.json();
194
+ }
195
+ async function O(t, e, n) {
196
+ let r = P, o = {};
197
+ typeof e == "string" ? (r = e, o = n ?? {}) : e != null && (o = e);
198
+ const a = $({
199
+ authorization: o.authorization,
200
+ headers: o.headers
201
+ }), i = await (o.fetchJson ?? pt)(r, a), s = o.parseResponse ? o.parseResponse(i) : yt(i);
202
+ return Y(t, s), s;
203
+ }
204
+ f.extend(tt);
205
+ f.extend(et);
206
+ const D = "zh-CN", gt = "YYYY.MM.DD HH:mm:ss", S = "YYYY-MM-DD HH:mm:ss", H = "YYYY-MM-DD HH:mm", M = "UTC", j = {
207
+ zh: "夏令时",
208
+ default: "DST"
209
+ }, y = /* @__PURE__ */ new Set();
210
+ var U, N;
211
+ const Dt = (N = (U = f.tz) == null ? void 0 : U.guess) == null ? void 0 : N.bind(f.tz);
212
+ let b = !1;
213
+ const w = (t) => (t || "").trim(), It = () => {
214
+ if (!(typeof Intl > "u" || typeof Intl.DateTimeFormat != "function"))
215
+ try {
216
+ return Intl.DateTimeFormat().resolvedOptions().timeZone;
217
+ } catch {
218
+ return;
219
+ }
220
+ }, wt = (t) => {
221
+ if (!t) return !1;
222
+ if (typeof Intl > "u" || typeof Intl.DateTimeFormat != "function") return !0;
223
+ try {
224
+ return new Intl.DateTimeFormat(void 0, { timeZone: t }), !0;
225
+ } catch {
226
+ return !1;
227
+ }
228
+ }, z = (t) => {
229
+ const e = w(t);
230
+ return e ? y.size ? y.has(e) : wt(e) : !1;
231
+ }, C = (t) => (y.clear(), t.zones.forEach((e) => {
232
+ const n = e.split("|")[0];
233
+ n && y.add(n);
234
+ }), (t.links || []).forEach((e) => {
235
+ e.split("|").forEach((n) => {
236
+ n && y.add(n);
237
+ });
238
+ }), Array.from(y)), Yt = () => Array.from(y), Ht = async (t, e = {}) => {
239
+ const n = m.preloadFromData(t), r = C(n);
240
+ return b || (f.extend(m), b = !0), J(e.defaultTimeZone), { data: n, knownTimeZones: r };
241
+ }, Jt = async (t = {}) => {
242
+ const e = await m.preloadFromApi(t), n = C(e);
243
+ return b || (f.extend(m), b = !0), J(t.defaultTimeZone), { data: e, knownTimeZones: n };
244
+ }, Rt = (t, e) => (Y(t, e), C(e), e), Bt = async (t, e = {}) => {
245
+ const { url: n, ...r } = e, o = n ? await O(t, n, r) : await O(t, r);
246
+ return C(o), o;
247
+ }, zt = () => {
248
+ var n;
249
+ const t = (n = f.tz) == null ? void 0 : n.guess, e = typeof t == "function" ? t : Dt;
250
+ try {
251
+ return e == null ? void 0 : e();
252
+ } catch {
253
+ return;
254
+ }
255
+ }, At = () => {
256
+ let t = "";
257
+ try {
258
+ t = typeof sessionStorage > "u" ? "" : sessionStorage.getItem("timeZone") || "";
259
+ } catch {
260
+ t = "";
261
+ }
262
+ const e = t || zt() || It();
263
+ return z(e) ? w(e) : M;
264
+ }, d = (t) => {
265
+ const e = w(t) || At();
266
+ return z(e) ? e : M;
267
+ }, J = (t) => {
268
+ var r, o;
269
+ const e = w(t), n = f.tz;
270
+ return e ? z(e) ? ((o = n == null ? void 0 : n.setDefault) == null || o.call(n, e), !0) : !1 : ((r = n == null ? void 0 : n.setDefault) == null || r.call(n, M), !0);
271
+ }, Zt = () => {
272
+ var t;
273
+ return typeof window < "u" && ((t = window.navigator) != null && t.language) ? window.navigator.language : D;
274
+ }, Lt = (t, e = []) => {
275
+ const r = t || Zt() || D, o = r.toLowerCase();
276
+ if (!e.length)
277
+ return o === "en" ? "en-US" : o === "zh" || o === "zh-cn" ? D : r;
278
+ const a = e.find((s) => s.toLowerCase() === o);
279
+ if (a) return a;
280
+ const c = o.split("-")[0], i = e.find((s) => s.toLowerCase().split("-")[0] === c);
281
+ return i || (c === "en" ? e.find((s) => s.toLowerCase().startsWith("en-")) || r : c === "zh" ? e.find((s) => s.toLowerCase().startsWith("zh-")) || D : r);
282
+ }, A = (t) => {
283
+ if (f.isDayjs(t)) return t;
284
+ if (t == null || t === "") return f();
285
+ const e = f(t);
286
+ return e.isValid() ? e : f();
287
+ }, k = (t) => t == null || t === "", R = (t) => f.isDayjs(t) ? t : k(t) ? f() : f(t), B = (t, e = !1) => {
288
+ const n = w(t);
289
+ return n ? d(n) : e ? d() : "";
290
+ }, bt = (t, e) => A(t).tz(d(e)).utcOffset(), kt = (t, e, n = H) => A(t).tz(d(e)).format(n), St = (t, e) => R(t).format(e.format), W = (t, e) => {
291
+ const n = e.format || S, r = B(e.timeZone, e.useClientTimeZone);
292
+ if (!r) return St(t, { format: n });
293
+ if (e.inputMode === "local")
294
+ return k(t) ? f().tz(r).format(n) : f.tz(t, r).format(n);
295
+ const o = R(t);
296
+ return o.isValid() ? o.tz(r).format(n) : o.format(n);
297
+ }, Ct = (t) => typeof t == "function", Et = (t, e) => {
298
+ var s, l;
299
+ const { moment: n } = e, r = e.format || S;
300
+ if (!Ct(n)) return W(t, { ...e, dateLibrary: "dayjs" });
301
+ const o = k(t) ? void 0 : t, a = B(e.timeZone, e.useClientTimeZone);
302
+ if (!a || typeof n.tz != "function") return n(o).format(r);
303
+ if (e.inputMode === "local")
304
+ return k(t) ? ((l = (s = n()).tz) == null ? void 0 : l.call(s, a).format(r)) || n().format(r) : n.tz(o, a).format(r);
305
+ const c = n(o);
306
+ return (typeof c.tz == "function" ? c.tz(a) : n.tz(o, a)).format(r);
307
+ }, vt = (t, e = {}) => {
308
+ const n = typeof e == "string" ? { format: e } : e || {}, r = {
309
+ ...n,
310
+ format: n.format || S
311
+ };
312
+ return r.dateLibrary === "moment" ? Et(t, r) : W(t, r);
313
+ }, Wt = (t, e = S, n = {}) => vt(t, { ...n, format: e }), x = (t) => String(t).padStart(2, "0"), G = (t) => `UTC${t}`, K = (t, e) => {
314
+ const n = bt(t, e), r = n >= 0 ? "+" : "-", o = Math.abs(n);
315
+ return `UTC${r}${x(Math.floor(o / 60))}:${x(o % 60)}`;
316
+ }, Mt = (t, e = /* @__PURE__ */ new Date()) => {
317
+ const n = t.currentUtcOffsetText || t.baseUtcOffsetText;
318
+ return n ? `UTC${n}` : K(e, t.timeZoneId);
319
+ }, Ft = (t, e) => {
320
+ const n = t.match(/([+-]\d{1,2})(?::?(\d{2}))?/) || [];
321
+ if (!n[1]) return e;
322
+ const r = n[1].startsWith("-") ? "-" : "+", o = n[1].replace(/[+-]/, "").padStart(2, "0"), a = n[2] || "00";
323
+ return `UTC${r}${o}:${a}`;
324
+ }, Ot = (t, e, n) => {
325
+ var o, a;
326
+ const r = G(n.format("Z"));
327
+ try {
328
+ const c = Intl.DateTimeFormat.supportedLocalesOf([e])[0] || e, i = (a = (o = new Intl.DateTimeFormat(c, { timeZone: t, timeZoneName: "long" }).formatToParts(n.toDate()).find((s) => s.type === "timeZoneName")) == null ? void 0 : o.value) == null ? void 0 : a.trim();
329
+ return i ? /^(gmt|utc)/i.test(i) ? Ft(i, r) : i : r;
330
+ } catch {
331
+ return r;
332
+ }
333
+ }, q = (t, e) => {
334
+ const n = e.year();
335
+ return Array.from(
336
+ new Set(
337
+ Array.from({ length: 12 }, (r, o) => {
338
+ const a = `${o + 1}`.padStart(2, "0"), c = `${n}-${a}-15 12:00:00`;
339
+ return f.tz(c, t).utcOffset();
340
+ })
341
+ )
342
+ );
343
+ }, Q = (t, e) => {
344
+ const n = d(t);
345
+ if (!z(n)) return !1;
346
+ const r = A(e).tz(n);
347
+ return q(n, r).length > 1;
348
+ }, E = (t, e) => {
349
+ const n = d(t);
350
+ if (!z(n)) return !1;
351
+ const r = A(e).tz(n), o = q(n, r);
352
+ return o.length <= 1 ? !1 : r.utcOffset() === Math.max(...o);
353
+ }, Gt = (t, e) => E(t, e), X = (t) => {
354
+ if (t === 1 || t === "1") return !0;
355
+ if (t === 0 || t === "0") return !1;
356
+ }, jt = (t, e) => {
357
+ const n = X(t.dynamicOffsetFlag);
358
+ return typeof n == "boolean" ? n : Q(t.timeZoneId, e);
359
+ }, xt = (t, e) => {
360
+ const n = X(t.currentDstFlag);
361
+ return typeof n == "boolean" ? n : E(t.timeZoneId, e);
362
+ }, Kt = (t, e = /* @__PURE__ */ new Date()) => t.map((n) => {
363
+ const r = n.tzShowName || Mt(n, e), o = jt(n, e);
364
+ return {
365
+ value: n.timeZoneId,
366
+ zoneName: r,
367
+ label: r,
368
+ hasDST: o,
369
+ isDST: o ? xt(n, e) : !1
370
+ };
371
+ }), Ut = (t) => {
372
+ const e = t.toLowerCase().split("-")[0];
373
+ return j[e] || j.default;
374
+ }, Nt = (t) => typeof t.showDaylightSavingLabel == "boolean" ? t.showDaylightSavingLabel : t.showDaylightSavingMarker ?? !0, qt = (t, e, n = {}) => {
375
+ const {
376
+ showZoneLabel: r = !0,
377
+ zoneLabel: o,
378
+ hasDST: a,
379
+ isDST: c,
380
+ standardTimeLabel: i,
381
+ daylightSavingLabel: s,
382
+ format: l = H
383
+ } = n, u = d(e), h = kt(t, u, l), p = typeof a == "boolean" ? a : Q(u, t), T = (typeof c == "boolean" ? c : E(u, t)) ? s : i, g = p && T ? `[${T}]` : "";
384
+ return r ? [h, o || K(t, u), g].filter(Boolean).join(" ") : [h, g].filter(Boolean).join(" ");
385
+ }, Qt = (t = {}) => {
386
+ const e = Lt(t.locale, t.supportedLocales), n = d(t.timeZone), r = A(t.value).tz(n), o = Ot(n, e, r), a = G(r.format("Z")), c = E(n, r), i = c ? Ut(e) : "", s = Nt(t), l = c && s ? `${o} - ${i}` : o;
387
+ return {
388
+ formattedValue: r.format(t.format || gt),
389
+ locale: e,
390
+ timeZone: n,
391
+ timeZoneName: o,
392
+ timeZoneLabel: l,
393
+ offsetLabel: a,
394
+ offsetMinutes: r.utcOffset(),
395
+ isDaylightSavingTime: c,
396
+ daylightSavingLabel: i
397
+ };
398
+ };
399
+ export {
400
+ P as TIME_ZONE_PACKED_DATA_URL,
401
+ Ht as applyDayjsIanaTimeZoneData,
402
+ Rt as applyMomentIanaTimeZoneData,
403
+ _ as assertPackedIanaData,
404
+ yt as assertPackedIanaTzData,
405
+ $ as buildIanaFetchInit,
406
+ Kt as buildTimeZoneDisplayOptions,
407
+ it as clearDayjsIanaCache,
408
+ mt as createIanaDbFromPackedData,
409
+ m as dayjsTimezoneIanaPlugin,
410
+ qt as formatClientLocalDateTimeLine,
411
+ kt as formatInTimeZone,
412
+ vt as formatLocalDateTime,
413
+ K as formatTimeZoneOffsetLabel,
414
+ nt as getAccessTokenFromLocalStorage,
415
+ at as getCachedDayjsPackedIanaData,
416
+ At as getClientTimeZone,
417
+ ot as getDefaultIanaAuthorization,
418
+ Yt as getKnownTimeZoneIds,
419
+ Qt as getTimeZoneDisplayInfo,
420
+ bt as getZoneUtcOffset,
421
+ Gt as isDaylightSavingTime,
422
+ z as isKnownTimeZone,
423
+ Jt as loadDayjsIanaTimeZoneData,
424
+ Y as loadIanaData,
425
+ O as loadIanaFromApi,
426
+ Y as loadMomentIanaData,
427
+ O as loadMomentIanaFromApi,
428
+ Bt as loadMomentIanaTimeZoneData,
429
+ Lt as normalizeLocaleCode,
430
+ st as preloadDayjsIanaFromApi,
431
+ V as preloadDayjsIanaFromData,
432
+ C as rebuildKnownTimeZoneIds,
433
+ d as resolveTimeZone,
434
+ Mt as resolveUtcOffsetFallback,
435
+ J as setDefaultTimeZone,
436
+ Q as timeZoneHasDST,
437
+ E as timeZoneIsDST,
438
+ Wt as toLocalDate
439
+ };
@@ -0,0 +1 @@
1
+ export declare const setBrowseTitle: (defaultTitle?: string) => any;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * 设置平台的favIcon
3
+ * @param favIcon 图标
4
+ * @param defaultIcon 默认图标
5
+ */
6
+ export declare const updateFavIcon: (favIcon: string, defaultIcon?: string) => void;
7
+ /**
8
+ * 设置平台的favIcon,如果localStorage中没有则调用接口获取
9
+ * @param defaultIcon 默认图标
10
+ */
11
+ export declare const setDasHtmlIcon: (defaultIcon?: string) => any;
@@ -0,0 +1,2 @@
1
+ declare const getConfig: () => any;
2
+ export { getConfig };
@@ -0,0 +1,20 @@
1
+ import { RefreshDataType } from '@das-fed/upf-utils/create-api-service/token-refresh-shared';
2
+
3
+ export interface AccessTokenAutoRefreshOptions {
4
+ refreshScope?: string;
5
+ maxStartRetry?: number;
6
+ onTokenApplied?: (data: RefreshDataType) => void;
7
+ redirectToLogin?: () => void;
8
+ }
9
+ export declare const applyRefreshedToken: (data: RefreshDataType) => void;
10
+ export declare const configureAccessTokenAutoRefresh: (options?: AccessTokenAutoRefreshOptions) => void;
11
+ export declare const startAccessTokenAutoRefresh: () => boolean;
12
+ export declare const stopAccessTokenAutoRefresh: () => void;
13
+ export declare const getAccessTokenAutoRefreshState: () => {
14
+ started: boolean;
15
+ tokenReady: any;
16
+ accessTokenExpiredAt: any;
17
+ refreshTokenExpiredAt: any;
18
+ refreshScope: any;
19
+ };
20
+ export type { RefreshDataType };
@@ -33,20 +33,20 @@ var X = function X(e) {
33
33
  o = function o() {
34
34
  return c.refreshScope || tokenRefreshShared.DEFAULT_REFRESH_SCOPE;
35
35
  },
36
- S = function S() {
36
+ w = function w() {
37
37
  return X(tokenTools.getAccessTokenInfo("tokenInfo")) || {};
38
38
  },
39
39
  T = function T() {
40
40
  var e = tokenTools.getAccessTokenInfo("accessTokenExpiredAt"),
41
- r = S();
41
+ r = w();
42
42
  return tokenRefreshShared.toTimestamp((r == null ? undefined : r.accessExp) || (r == null ? undefined : r.accessTokenExpiredAt) || e);
43
43
  },
44
44
  m = function m() {
45
- var e = S();
45
+ var e = w();
46
46
  return String((e == null ? undefined : e.refreshToken) || tokenTools.getAccessTokenInfo("refreshToken") || "").trim();
47
47
  },
48
48
  C = function C() {
49
- var e = S();
49
+ var e = w();
50
50
  return tokenRefreshShared.toTimestamp(e == null ? undefined : e.refreshExp);
51
51
  },
52
52
  E = function E() {
@@ -68,21 +68,22 @@ var X = function X(e) {
68
68
  p && (clearTimeout(p), p = null), l && (clearTimeout(l), l = null), R && (clearTimeout(R), R = null);
69
69
  },
70
70
  j = function j() {
71
- var e;
72
71
  try {
73
- var r = "/login";
74
- if (location.pathname === r) return;
75
- if (window.sessionStorage.clear(), window.localStorage.clear(), window.__isAutoCloseApp = !1, (e = window.top) != null && e.vueRouter) {
76
- window.top.vueRouter.replace(r);
72
+ var e = "/login";
73
+ if (location.pathname === e) return;
74
+ window.sessionStorage.clear(), window.localStorage.clear(), window.__isAutoCloseApp = !1;
75
+ var r = window.top;
76
+ if (r != null && r.vueRouter) {
77
+ r.vueRouter.replace(e);
77
78
  return;
78
79
  }
79
- window.location.replace("/#".concat(r));
80
+ window.location.replace("/#".concat(e));
80
81
  } catch (_unused2) {
81
82
  window.location.replace("/#/login");
82
83
  }
83
84
  },
84
85
  a = function a() {
85
- w(), (c.redirectToLogin || j)();
86
+ S(), (c.redirectToLogin || j)();
86
87
  },
87
88
  G = function G() {
88
89
  var e = T();
@@ -106,7 +107,7 @@ var X = function X(e) {
106
107
  var k = r - t;
107
108
  return k > 0 ? k : 0;
108
109
  },
109
- W = function W(e) {
110
+ $ = function $(e) {
110
111
  var f;
111
112
  var r = String((e == null ? undefined : e.accessToken) || "").trim(),
112
113
  s = String((e == null ? undefined : e.refreshToken) || "").trim() || m(),
@@ -117,7 +118,7 @@ var X = function X(e) {
117
118
  refreshToken: s
118
119
  });
119
120
  try {
120
- var t = S(),
121
+ var t = w(),
121
122
  k = _objectSpread(_objectSpread(_objectSpread({}, t), e), {}, {
122
123
  accessToken: r,
123
124
  refreshToken: s || (t == null ? void 0 : t.refreshToken) || "",
@@ -149,7 +150,7 @@ var X = function X(e) {
149
150
  _context.n = 2;
150
151
  break;
151
152
  }
152
- w();
153
+ S();
153
154
  return _context.a(2);
154
155
  case 2:
155
156
  e = m();
@@ -193,7 +194,7 @@ var X = function X(e) {
193
194
  refreshExp: (s == null ? void 0 : s.refreshExp) || C(),
194
195
  accessTokenExpiredAt: tokenRefreshShared.toTimestamp((s == null ? void 0 : s.accessTokenExpiredAt) || (s == null ? void 0 : s.accessExp))
195
196
  });
196
- n != null && n.accessToken && n != null && n.accessExp && W(n), tokenRefreshShared.resolveRefreshResult(n, o()), y();
197
+ n != null && n.accessToken && n != null && n.accessExp && $(n), tokenRefreshShared.resolveRefreshResult(n, o()), y();
197
198
  _context.n = 11;
198
199
  break;
199
200
  case 9:
@@ -206,7 +207,7 @@ var X = function X(e) {
206
207
  a();
207
208
  return _context.a(2);
208
209
  case 10:
209
- w();
210
+ S();
210
211
  case 11:
211
212
  return _context.a(2);
212
213
  }
@@ -226,7 +227,7 @@ var X = function X(e) {
226
227
  _context2.n = 1;
227
228
  break;
228
229
  }
229
- w();
230
+ S();
230
231
  return _context2.a(2);
231
232
  case 1:
232
233
  e = tokenRefreshShared.getRefreshPrecheckResult(E());
@@ -279,7 +280,7 @@ var X = function X(e) {
279
280
  p = null, F();
280
281
  }, e)), _O();
281
282
  },
282
- z = function z() {
283
+ Q = function Q() {
283
284
  var _ref4, _e$maxStartRetry;
284
285
  var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
285
286
  c = _objectSpread(_objectSpread(_objectSpread({}, c), e), {}, {
@@ -287,7 +288,7 @@ var X = function X(e) {
287
288
  maxStartRetry: (_ref4 = (_e$maxStartRetry = e.maxStartRetry) !== null && _e$maxStartRetry !== void 0 ? _e$maxStartRetry : c.maxStartRetry) !== null && _ref4 !== void 0 ? _ref4 : I
288
289
  });
289
290
  },
290
- Q = function Q() {
291
+ V = function V() {
291
292
  if (i) return true;
292
293
  var e = function e() {
293
294
  return h() ? (i = true, u = 0, H(), y(), true) : false;
@@ -306,10 +307,10 @@ var X = function X(e) {
306
307
  };
307
308
  return _r(), false;
308
309
  },
309
- w = function w() {
310
+ S = function S() {
310
311
  i = false, N(), tokenRefreshShared.clearRefreshState(o()), u = 0;
311
312
  },
312
- V = function V() {
313
+ W = function W() {
313
314
  return {
314
315
  started: i,
315
316
  tokenReady: h(),
@@ -318,8 +319,8 @@ var X = function X(e) {
318
319
  refreshScope: o()
319
320
  };
320
321
  };
321
- exports.applyRefreshedToken = W;
322
- exports.configureAccessTokenAutoRefresh = z;
323
- exports.getAccessTokenAutoRefreshState = V;
324
- exports.startAccessTokenAutoRefresh = Q;
325
- exports.stopAccessTokenAutoRefresh = w;
322
+ exports.applyRefreshedToken = $;
323
+ exports.configureAccessTokenAutoRefresh = Q;
324
+ exports.getAccessTokenAutoRefreshState = W;
325
+ exports.startAccessTokenAutoRefresh = V;
326
+ exports.stopAccessTokenAutoRefresh = S;