@das-fed/upf-utils 6.4.0-dev.258 → 6.4.0-dev.260

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 (102) hide show
  1. package/api-services/es5.js +1752 -1788
  2. package/api-services/index.js +1407 -1441
  3. package/api-services/index.js.gz +0 -0
  4. package/api-services/modules/app-manage/es5.js +721 -749
  5. package/api-services/modules/app-manage/index.js +565 -588
  6. package/api-services/modules/app-manage/index.js.gz +0 -0
  7. package/api-services/modules/authentication/es5.js +980 -1005
  8. package/api-services/modules/authentication/index.js +773 -792
  9. package/api-services/modules/authentication/index.js.gz +0 -0
  10. package/api-services/modules/bems/es5.js +798 -826
  11. package/api-services/modules/bems/index.js +644 -667
  12. package/api-services/modules/bems/index.js.gz +0 -0
  13. package/api-services/modules/contract/es5.js +963 -989
  14. package/api-services/modules/contract/index.js +763 -782
  15. package/api-services/modules/contract/index.js.gz +0 -0
  16. package/api-services/modules/duty-manage/es5.js +1288 -1304
  17. package/api-services/modules/duty-manage/index.js +1065 -1070
  18. package/api-services/modules/duty-manage/index.js.gz +0 -0
  19. package/api-services/modules/enterpriseright/es5.js +735 -763
  20. package/api-services/modules/enterpriseright/index.js +581 -604
  21. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  22. package/api-services/modules/es5.js +1378 -1419
  23. package/api-services/modules/file/es5.js +797 -826
  24. package/api-services/modules/file/index.js +625 -649
  25. package/api-services/modules/file/index.js.gz +0 -0
  26. package/api-services/modules/gateway-edge/es5.js +1281 -1297
  27. package/api-services/modules/gateway-edge/index.js +1063 -1068
  28. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  29. package/api-services/modules/index.js +1091 -1133
  30. package/api-services/modules/index.js.gz +0 -0
  31. package/api-services/modules/iot/es5.js +1366 -1406
  32. package/api-services/modules/iot/index.js +1121 -1162
  33. package/api-services/modules/iot/index.js.gz +0 -0
  34. package/api-services/modules/justauth/es5.js +1253 -1288
  35. package/api-services/modules/justauth/index.js +1032 -1065
  36. package/api-services/modules/justauth/index.js.gz +0 -0
  37. package/api-services/modules/knowledge/es5.js +1232 -1272
  38. package/api-services/modules/knowledge/index.js +1019 -1060
  39. package/api-services/modules/knowledge/index.js.gz +0 -0
  40. package/api-services/modules/link/es5.js +1236 -1276
  41. package/api-services/modules/link/index.js +1018 -1059
  42. package/api-services/modules/link/index.js.gz +0 -0
  43. package/api-services/modules/permission/es5.js +1281 -1297
  44. package/api-services/modules/permission/index.js +1063 -1068
  45. package/api-services/modules/permission/index.js.gz +0 -0
  46. package/api-services/modules/platformManage/es5.js +718 -746
  47. package/api-services/modules/platformManage/index.js +568 -591
  48. package/api-services/modules/platformManage/index.js.gz +0 -0
  49. package/api-services/modules/portal/es5.js +1279 -1298
  50. package/api-services/modules/portal/index.js +1061 -1070
  51. package/api-services/modules/portal/index.js.gz +0 -0
  52. package/api-services/modules/space-manage/es5.js +721 -749
  53. package/api-services/modules/space-manage/index.js +565 -588
  54. package/api-services/modules/space-manage/index.js.gz +0 -0
  55. package/api-services/modules/super-admin/es5.js +743 -771
  56. package/api-services/modules/super-admin/index.js +581 -604
  57. package/api-services/modules/super-admin/index.js.gz +0 -0
  58. package/api-services/modules/supplier/es5.js +726 -754
  59. package/api-services/modules/supplier/index.js +577 -600
  60. package/api-services/modules/supplier/index.js.gz +0 -0
  61. package/api-services/modules/supplychain-manage/es5.js +1279 -1298
  62. package/api-services/modules/supplychain-manage/index.js +1061 -1070
  63. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  64. package/api-services/modules/systemConfiguration/es5.js +735 -763
  65. package/api-services/modules/systemConfiguration/index.js +581 -604
  66. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  67. package/api-services/modules/tool/es5.js +735 -763
  68. package/api-services/modules/tool/index.js +581 -604
  69. package/api-services/modules/tool/index.js.gz +0 -0
  70. package/api-services/src/create-service/es5.js +733 -761
  71. package/api-services/src/create-service/index.js +580 -603
  72. package/api-services/src/create-service/index.js.gz +0 -0
  73. package/common-info/es5.js +1333 -1373
  74. package/common-info/getPermissionMethod/es5.js +767 -795
  75. package/common-info/getPermissionMethod/index.js +608 -631
  76. package/common-info/getPermissionMethod/index.js.gz +0 -0
  77. package/common-info/index.js +1096 -1137
  78. package/common-info/index.js.gz +0 -0
  79. package/common-tools/es5.d.ts +1 -0
  80. package/common-tools/es5.js +9 -0
  81. package/common-tools/index.d.ts +1 -0
  82. package/common-tools/index.js +1 -0
  83. package/common-tools/timezone-format/es5.d.ts +5 -110
  84. package/common-tools/timezone-format/es5.js +473 -662
  85. package/common-tools/timezone-format/get-iana-data/dayjs-timezone-iana-plugin.d.ts +72 -0
  86. package/common-tools/timezone-format/get-iana-data/iana-api-fetch.d.ts +21 -0
  87. package/common-tools/timezone-format/get-iana-data/moment-iana-loader.d.ts +29 -0
  88. package/common-tools/timezone-format/index.d.ts +5 -110
  89. package/common-tools/timezone-format/index.js +328 -446
  90. package/common-tools/timezone-format/index.js.gz +0 -0
  91. package/create-api-service/es5.js +1250 -1285
  92. package/create-api-service/index.js +1031 -1064
  93. package/create-api-service/index.js.gz +0 -0
  94. package/esm-map.json +7 -26
  95. package/index.d.ts +1 -0
  96. package/index.js +1 -0
  97. package/package.json +3 -3
  98. package/theme/es5.d.ts +8 -22
  99. package/theme/es5.js +354 -367
  100. package/theme/index.d.ts +8 -22
  101. package/theme/index.js +255 -276
  102. package/theme/index.js.gz +0 -0
package/theme/index.js CHANGED
@@ -1,10 +1,9 @@
1
- import { bus as pe } from "@das-fed/mframe";
2
- import { ref as me, onMounted as de, onUnmounted as ge } from "vue";
3
- const m = "#ffffff", d = "#000000", be = 0.115, re = (e) => {
1
+ import { bus as se } from "@das-fed/mframe";
2
+ const m = "#ffffff", d = "#000000", fe = 0.115, X = (e) => {
4
3
  const r = String(e || "").trim();
5
4
  return /^#([\da-f]{3}|[\da-f]{6})$/i.test(r) ? r.length === 4 ? `#${r.slice(1).split("").map((t) => `${t}${t}`).join("")}` : r : "";
6
- }, D = (e) => {
7
- const r = re(e);
5
+ }, B = (e) => {
6
+ const r = X(e);
8
7
  if (!r)
9
8
  return null;
10
9
  const t = r.slice(1);
@@ -13,19 +12,19 @@ const m = "#ffffff", d = "#000000", be = 0.115, re = (e) => {
13
12
  green: Number.parseInt(t.slice(2, 4), 16),
14
13
  blue: Number.parseInt(t.slice(4, 6), 16)
15
14
  };
16
- }, V = (e) => Math.min(255, Math.max(0, Math.round(e))), te = (e, r, t, o) => {
17
- const u = D(e), n = D(r);
15
+ }, H = (e) => Math.min(255, Math.max(0, Math.round(e))), Q = (e, r, t, o) => {
16
+ const u = B(e), n = B(r);
18
17
  if (!u || !n)
19
18
  return o;
20
- const l = Math.min(1, Math.max(0, t)), i = V(u.red * l + n.red * (1 - l)), s = V(u.green * l + n.green * (1 - l)), c = V(u.blue * l + n.blue * (1 - l));
19
+ const l = Math.min(1, Math.max(0, t)), i = H(u.red * l + n.red * (1 - l)), s = H(u.green * l + n.green * (1 - l)), c = H(u.blue * l + n.blue * (1 - l));
21
20
  return `#${[i, s, c].map((p) => p.toString(16).padStart(2, "0")).join("")}`;
22
- }, he = (e, r, t) => {
23
- const o = D(e);
21
+ }, ce = (e, r, t) => {
22
+ const o = B(e);
24
23
  if (!o)
25
24
  return t;
26
25
  const u = Math.min(1, Math.max(0, r));
27
26
  return `rgba(${o.red}, ${o.green}, ${o.blue}, ${u})`;
28
- }, R = (e, r = m) => te(e || "#5582F3", r || m, be, "#ebf1fe"), W = "#5582f3", G = "#e63946", ye = [
27
+ }, D = (e, r = m) => Q(e || "#5582F3", r || m, fe, "#ebf1fe"), z = "#5582f3", j = "#e63946", pe = [
29
28
  {
30
29
  group: "foundation",
31
30
  name: "brand",
@@ -108,7 +107,7 @@ const m = "#ffffff", d = "#000000", be = 0.115, re = (e) => {
108
107
  description: "圆角和阴影等样式效果",
109
108
  variables: ["--upf-border-radius", "--upf-box-shadow", "--upf-box-shadow-elevated"]
110
109
  }
111
- ], F = [
110
+ ], S = [
112
111
  { name: "--upf-brand-primary", label: "品牌主色", hint: "品牌主色,建议用于导航背景、Logo等品牌识别场景", category: "brand" },
113
112
  { name: "--upf-brand-secondary", label: "品牌辅色", hint: "品牌辅色,用于辅助品牌识别和强调元素", category: "brand" },
114
113
  { name: "--upf-color-primary", label: "主色", hint: "功能主色,用于按钮、交互元素、状态反馈", category: "basic" },
@@ -117,7 +116,7 @@ const m = "#ffffff", d = "#000000", be = 0.115, re = (e) => {
117
116
  label: "主色高亮背景",
118
117
  hint: "主色配套高亮背景,默认跟随主色自动生成透明背景,也可手动覆盖",
119
118
  category: "basic",
120
- fallback: (e) => R(e["--upf-color-primary"], e["--upf-bg-primary"]),
119
+ fallback: (e) => D(e["--upf-color-primary"], e["--upf-bg-primary"]),
121
120
  fallbackDeps: ["--upf-color-primary", "--upf-bg-primary"]
122
121
  },
123
122
  { name: "--upf-color-success", label: "成功色", hint: "成功状态色,用于成功提示、成功按钮", category: "basic" },
@@ -161,14 +160,14 @@ const m = "#ffffff", d = "#000000", be = 0.115, re = (e) => {
161
160
  { name: "--upf-border-radius", label: "圆角", hint: "圆角大小,用于组件圆角", category: "effect" },
162
161
  { name: "--upf-box-shadow", label: "阴影", hint: "阴影效果,用于普通阴影", category: "effect" },
163
162
  { name: "--upf-box-shadow-elevated", label: "浮层阴影", hint: "浮层阴影,用于弹窗、浮层阴影", category: "effect" }
164
- ], ve = F.map((e) => e.name), xe = F.reduce((e, r) => (e[r.name] = r.label, e), {}), Ee = F.reduce((e, r) => (e[r.name] = r.hint, e), {}), Te = {
163
+ ], me = S.map((e) => e.name), de = S.reduce((e, r) => (e[r.name] = r.label, e), {}), ge = S.reduce((e, r) => (e[r.name] = r.hint, e), {}), be = {
165
164
  "--upf-nav-bg": "--upf-brand-primary",
166
165
  "--upf-color-primary-bg": "--upf-color-primary",
167
166
  "--upf-menu-active-text": "--upf-color-primary",
168
167
  "--upf-tab-active-text": "--upf-color-primary"
169
- }, x = {
170
- "--upf-color-primary": W,
171
- "--upf-color-primary-bg": R(W),
168
+ }, v = {
169
+ "--upf-color-primary": z,
170
+ "--upf-color-primary-bg": D(z),
172
171
  "--upf-color-success": "#52c41a",
173
172
  "--upf-color-warning": "#faad14",
174
173
  "--upf-color-error": "#ff4d4f",
@@ -183,9 +182,9 @@ const m = "#ffffff", d = "#000000", be = 0.115, re = (e) => {
183
182
  "--upf-tab-text": "#666666",
184
183
  "--upf-tab-active-bg": "#ffffff",
185
184
  "--upf-border-radius": "4px"
186
- }, h = {
185
+ }, y = {
187
186
  default: {
188
- ...x,
187
+ ...v,
189
188
  "--upf-brand-primary": "#0e5fd8",
190
189
  "--upf-brand-secondary": "#3579de",
191
190
  "--upf-text-primary": "#231815",
@@ -210,7 +209,7 @@ const m = "#ffffff", d = "#000000", be = 0.115, re = (e) => {
210
209
  "--upf-box-shadow-elevated": "0 4px 16px rgba(0, 0, 0, 0.15)"
211
210
  },
212
211
  cjb: {
213
- ...x,
212
+ ...v,
214
213
  "--upf-brand-primary": "#ffffff",
215
214
  "--upf-brand-secondary": "#f2f6ff",
216
215
  "--upf-text-primary": "#212121",
@@ -235,7 +234,7 @@ const m = "#ffffff", d = "#000000", be = 0.115, re = (e) => {
235
234
  "--upf-box-shadow-elevated": "0 4px 16px rgba(0, 0, 0, 0.12)"
236
235
  },
237
236
  ssl: {
238
- ...x,
237
+ ...v,
239
238
  "--upf-brand-primary": "#1f2346",
240
239
  "--upf-brand-secondary": "#2d3158",
241
240
  "--upf-text-primary": "#231815",
@@ -261,11 +260,11 @@ const m = "#ffffff", d = "#000000", be = 0.115, re = (e) => {
261
260
  "--upf-box-shadow-elevated": "0 10px 28px rgba(35, 41, 75, 0.12)"
262
261
  },
263
262
  dkh: {
264
- ...x,
263
+ ...v,
265
264
  "--upf-brand-primary": "#eb0e1b",
266
265
  "--upf-brand-secondary": "#f15760",
267
- "--upf-color-primary": G,
268
- "--upf-color-primary-bg": R(G),
266
+ "--upf-color-primary": j,
267
+ "--upf-color-primary-bg": D(j),
269
268
  "--upf-text-primary": "#231815",
270
269
  "--upf-text-secondary": "#666666",
271
270
  "--upf-text-placeholder": "#bfbfbf",
@@ -287,7 +286,7 @@ const m = "#ffffff", d = "#000000", be = 0.115, re = (e) => {
287
286
  "--upf-box-shadow": "0 2px 8px rgba(0, 0, 0, 0.08)",
288
287
  "--upf-box-shadow-elevated": "0 4px 16px rgba(0, 0, 0, 0.12)"
289
288
  }
290
- }, Ce = (e, r) => {
289
+ }, he = (e, r) => {
291
290
  if (!r)
292
291
  return "";
293
292
  if (typeof r == "function")
@@ -299,40 +298,83 @@ const m = "#ffffff", d = "#000000", be = 0.115, re = (e) => {
299
298
  return u;
300
299
  }
301
300
  return "";
302
- }, Y = (e) => Object.entries(e || {}).reduce((r, [t, o]) => (r[t] = String(o ?? "").trim(), r), {}), pr = () => [...ve], mr = () => ({ ...xe }), dr = () => ({ ...Ee }), gr = () => ye.map((e) => ({
301
+ }, $ = (e) => Object.entries(e || {}).reduce((r, [t, o]) => (r[t] = String(o ?? "").trim(), r), {}), br = () => [...me], hr = () => ({ ...de }), yr = () => ({ ...ge }), vr = () => pe.map((e) => ({
303
302
  ...e,
304
303
  variables: [...e.variables]
305
- })), br = () => ({ ...Te }), Se = (e, r = h.default) => {
306
- const t = Y(e), o = Y(r), u = {
304
+ })), xr = () => ({ ...be }), ye = (e, r = y.default) => {
305
+ const t = $(e), o = $(r), u = {
307
306
  ...o,
308
307
  ...t
309
308
  };
310
- return F.reduce((n, l) => {
309
+ return S.reduce((n, l) => {
311
310
  var p;
312
- const i = t[l.name] || "", s = (p = l.fallbackDeps) == null ? void 0 : p.some((K) => !!t[K]), c = Ce({ ...u, ...n }, l.fallback);
311
+ const i = t[l.name] || "", s = (p = l.fallbackDeps) == null ? void 0 : p.some((U) => !!t[U]), c = he({ ...u, ...n }, l.fallback);
313
312
  return n[l.name] = i || (s ? c : "") || o[l.name] || c, n;
314
313
  }, {});
315
- }, oe = (e) => e, a = (e, r) => {
316
- const t = oe(e);
314
+ }, ve = y.cjb, xe = {
315
+ name: "cjb",
316
+ displayName: "纯净白",
317
+ description: "白底壳层主题,内容区沿用浅蓝高亮交互色",
318
+ mode: "light",
319
+ source: "preset",
320
+ basePresetName: "cjb",
321
+ variables: ve
322
+ }, Ee = y.default, Te = {
323
+ name: "default",
324
+ displayName: "经典蓝",
325
+ description: "经典蓝导航主题,内容区沿用浅底与高亮蓝交互色",
326
+ mode: "light",
327
+ source: "preset",
328
+ basePresetName: "default",
329
+ variables: Ee
330
+ }, Ce = y.dkh, Se = {
331
+ name: "dkh",
332
+ displayName: "大咖红",
333
+ description: "大咖红主题,壳层与内容交互色保持同系红色",
334
+ mode: "light",
335
+ source: "preset",
336
+ basePresetName: "dkh",
337
+ variables: Ce
338
+ }, we = y.ssl, Fe = {
339
+ name: "ssl",
340
+ displayName: "深邃蓝",
341
+ description: "深邃蓝壳层主题,内容区沿用浅底与高亮蓝交互色",
342
+ mode: "dark",
343
+ source: "preset",
344
+ basePresetName: "ssl",
345
+ variables: we
346
+ }, _e = ["default", "cjb", "ssl", "dkh"], R = {
347
+ default: Te,
348
+ cjb: xe,
349
+ ssl: Fe,
350
+ dkh: Se
351
+ }, Ne = (e) => ({ ...e }), Z = (e) => ({
352
+ ...e,
353
+ variables: Ne(e.variables)
354
+ }), g = (e) => {
355
+ const r = String(e || "").trim();
356
+ return R[r] ? Z(R[r]) : void 0;
357
+ }, Ae = () => _e.map((e) => Z(R[e])), ee = (e) => e, a = (e, r) => {
358
+ const t = ee(e);
317
359
  return String((r ? t[r] : "") ?? "");
318
360
  }, f = (e, r) => r.map((t) => ({ target: t, from: e })), M = (e) => {
319
- const r = oe(e);
361
+ const r = ee(e);
320
362
  return {
321
363
  ...Object.entries(r).reduce((o, [u, n]) => (o[u] = String(n ?? ""), o), {}),
322
- ...Se(r)
364
+ ...ye(r)
323
365
  };
324
- }, we = {
366
+ }, ke = {
325
367
  "#5582f3": "#3761CA",
326
368
  "#e63946": "#C9303C"
327
- }, q = (e, r) => {
369
+ }, K = (e, r) => {
328
370
  const t = e || "#5582F3";
329
- return we[re(t).toLowerCase()] || r(t, d, 0.84, "#3761CA");
330
- }, Fe = "#999", Ne = (e) => [e.themeName, e.basePresetName].some((r) => String(r || "").trim() === "dkh"), ke = (e) => Ne(e) ? Fe : a(e.variables, "--upf-color-primary"), _e = (e) => Array.isArray(e) ? [...e] : [e], N = (e, r, t = {}) => r.reduce((o, u) => {
331
- const n = u.resolve ? u.resolve({ variables: e, result: o, mixHexColor: te, toRgbaColor: he, ...t }) : u.from ? a(e, String(u.from)) : String(u.value ?? "");
332
- return _e(u.target).forEach((l) => {
371
+ return ke[X(t).toLowerCase()] || r(t, d, 0.84, "#3761CA");
372
+ }, He = "#999", Ve = (e) => [e.themeName, e.basePresetName].some((r) => String(r || "").trim() === "dkh"), Be = (e) => Ve(e) ? He : a(e.variables, "--upf-color-primary"), Re = (e) => Array.isArray(e) ? [...e] : [e], w = (e, r, t = {}) => r.reduce((o, u) => {
373
+ const n = u.resolve ? u.resolve({ variables: e, result: o, mixHexColor: Q, toRgbaColor: ce, ...t }) : u.from ? a(e, String(u.from)) : String(u.value ?? "");
374
+ return Re(u.target).forEach((l) => {
333
375
  o[l] = String(n ?? "");
334
376
  }), o;
335
- }, {}), Ae = [
377
+ }, {}), De = [
336
378
  { target: "--upf-primary", from: "--upf-color-primary" },
337
379
  { target: "--upf-text", from: "--upf-text-primary" },
338
380
  { target: "--upf-surface", from: "--upf-bg-primary" },
@@ -342,7 +384,7 @@ const m = "#ffffff", d = "#000000", be = 0.115, re = (e) => {
342
384
  { target: "--upf-menu-item-hover-bg", from: "--upf-menu-hover-bg" },
343
385
  { target: "--upf-menu-item-active-bg", from: "--upf-menu-active-bg" },
344
386
  { target: "--upf-menu-item-active-text", from: "--upf-menu-active-text" }
345
- ], He = [
387
+ ], Me = [
346
388
  { target: "--el-color-primary", from: "--upf-color-primary" },
347
389
  { target: "--el-color-success", from: "--upf-color-success" },
348
390
  { target: "--el-color-warning", from: "--upf-color-warning" },
@@ -375,7 +417,7 @@ const m = "#ffffff", d = "#000000", be = 0.115, re = (e) => {
375
417
  target: "--el-checkbox-input-border",
376
418
  resolve: ({ variables: e }) => `1px solid ${a(e, "--upf-border-color")}`
377
419
  }
378
- ], Ve = [
420
+ ], Pe = [
379
421
  { target: "--das-ui-color-primary-level1", from: "--upf-color-primary-bg" },
380
422
  ...f("--upf-color-primary-bg", [
381
423
  "--das-ui-color-primary-level1",
@@ -459,7 +501,7 @@ const m = "#ffffff", d = "#000000", be = 0.115, re = (e) => {
459
501
  { target: "--das-input-base-border-color", from: "--upf-border-color" },
460
502
  {
461
503
  target: ["--upf-form-active-border-color", "--das-input-active-border-color", "--upf-date-picker-active-border-color"],
462
- resolve: ke
504
+ resolve: Be
463
505
  },
464
506
  { target: "--das-input-font-color", from: "--upf-text-primary" },
465
507
  { target: "--das-input-sub-font-color", from: "--upf-text-placeholder" },
@@ -688,7 +730,7 @@ const m = "#ffffff", d = "#000000", be = 0.115, re = (e) => {
688
730
  { target: "--das-ui-layout-aside-menu-expired-color", from: "--upf-text-disabled" },
689
731
  { target: "--das-ui-layout-aside-menu-top-left-icon-color", from: "--upf-color-primary" },
690
732
  { target: "--das-ui-layout-aside-menu-top-right-icon-color", from: "--upf-text-secondary" }
691
- ], Be = [
733
+ ], Ie = [
692
734
  // 同源变量集中维护,新增 target 时优先追加到对应 source 分组。
693
735
  ...f("--upf-color-primary", [
694
736
  "--upf-button-primary",
@@ -751,7 +793,7 @@ const m = "#ffffff", d = "#000000", be = 0.115, re = (e) => {
751
793
  },
752
794
  {
753
795
  target: "--upf-button-active",
754
- resolve: ({ variables: e, mixHexColor: r }) => q(a(e, "--upf-color-primary"), r)
796
+ resolve: ({ variables: e, mixHexColor: r }) => K(a(e, "--upf-color-primary"), r)
755
797
  },
756
798
  {
757
799
  target: "--upf-button-disabled",
@@ -767,7 +809,7 @@ const m = "#ffffff", d = "#000000", be = 0.115, re = (e) => {
767
809
  },
768
810
  {
769
811
  target: "--upf-button-set-active",
770
- resolve: ({ variables: e, mixHexColor: r }) => q(a(e, "--upf-color-primary"), r)
812
+ resolve: ({ variables: e, mixHexColor: r }) => K(a(e, "--upf-color-primary"), r)
771
813
  },
772
814
  {
773
815
  target: "--upf-button-set-disabled",
@@ -971,112 +1013,69 @@ const m = "#ffffff", d = "#000000", be = 0.115, re = (e) => {
971
1013
  },
972
1014
  { target: "--upf-app-container-app-bg-override", from: "--upf-nav-bg" },
973
1015
  { target: "--upf-app-container-app-text-override", from: "--upf-nav-text" }
974
- ], De = (e, r = {}) => N(e, Ae, r), Re = (e, r = {}) => N(e, He, r), Me = (e, r = {}) => N(e, Ve, r), Oe = (e, r = {}) => N(e, Be, r), O = (e, r = {}) => {
975
- const t = M(e), { includeElementAndDasUiBridges: o = !0, themeName: u, basePresetName: n } = r, l = { themeName: u, basePresetName: n }, i = Oe(t, l), s = {
1016
+ ], Oe = (e, r = {}) => w(e, De, r), Le = (e, r = {}) => w(e, Me, r), Ue = (e, r = {}) => w(e, Pe, r), ze = (e, r = {}) => w(e, Ie, r), P = (e, r = {}) => {
1017
+ const t = M(e), { includeElementAndDasUiBridges: o = !0, themeName: u, basePresetName: n } = r, l = { themeName: u, basePresetName: n }, i = ze(t, l), s = {
976
1018
  ...t,
977
1019
  ...i
978
1020
  };
979
1021
  return {
980
1022
  ...t,
981
1023
  ...i,
982
- ...o ? Re(s, l) : {},
983
- ...o ? Me(s, l) : {},
984
- ...De(s, l)
1024
+ ...o ? Le(s, l) : {},
1025
+ ...o ? Ue(s, l) : {},
1026
+ ...Oe(s, l)
985
1027
  };
986
- }, Pe = ["default", "cjb", "ssl", "dkh"], y = (e) => ({ ...e }), C = {
987
- default: {
988
- name: "default",
989
- displayName: "经典蓝",
990
- description: "经典蓝导航主题,内容区沿用浅底与高亮蓝交互色",
991
- mode: "light",
992
- source: "preset",
993
- basePresetName: "default",
994
- variables: y(h.default)
995
- },
996
- cjb: {
997
- name: "cjb",
998
- displayName: "纯净白",
999
- description: "白底壳层主题,内容区沿用浅蓝高亮交互色",
1000
- mode: "light",
1001
- source: "preset",
1002
- basePresetName: "cjb",
1003
- variables: y(h.cjb)
1004
- },
1005
- ssl: {
1006
- name: "ssl",
1007
- displayName: "深邃蓝",
1008
- description: "深邃蓝壳层主题,内容区沿用浅底与高亮蓝交互色",
1009
- mode: "dark",
1010
- source: "preset",
1011
- basePresetName: "ssl",
1012
- variables: y(h.ssl)
1013
- },
1014
- dkh: {
1015
- name: "dkh",
1016
- displayName: "大咖红",
1017
- description: "大咖红主题,壳层与内容交互色保持同系红色",
1018
- mode: "light",
1019
- source: "preset",
1020
- basePresetName: "dkh",
1021
- variables: y(h.dkh)
1022
- }
1023
- }, P = (e) => ({
1024
- ...e,
1025
- variables: y(e.variables)
1026
- }), v = (e) => {
1027
- const r = String(e || "").trim();
1028
- return C[r] ? P(C[r]) : void 0;
1029
- }, hr = () => Pe.map((e) => P(C[e])), I = () => P(C.default), J = "themeChange", S = "upf-theme-root-vars", Ie = "upf-default-theme-vars", w = "upf-theme-config", Le = ["--upf-color-primary", "--upf-brand-primary"], X = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakSet(), b = /* @__PURE__ */ new WeakMap(), T = (e) => e ? Object.entries(e).reduce((r, [t, o]) => (r[t] = String(o ?? ""), r), {}) : null, L = (e) => e || (typeof document > "u" ? null : document.documentElement), ae = (e) => !!(e && String(e.tagName || "").toLowerCase() === "style"), k = (e) => e.head || e.documentElement, ue = (e, r) => {
1030
- const t = k(e);
1028
+ }, W = "themeChange", T = "upf-theme-root-vars", je = "upf-default-theme-vars", C = "upf-theme-config", $e = ["--upf-color-primary", "--upf-brand-primary"], G = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakSet(), h = /* @__PURE__ */ new WeakMap(), E = (e) => e ? Object.entries(e).reduce((r, [t, o]) => (r[t] = String(o ?? ""), r), {}) : null, Er = (e) => g(e), Tr = () => Ae(), F = () => g("default"), Cr = () => ({ ...F().variables }), I = (e) => e || (typeof document > "u" ? null : document.documentElement), re = (e) => !!(e && String(e.tagName || "").toLowerCase() === "style"), _ = (e) => e.head || e.documentElement, te = (e, r) => {
1029
+ const t = _(e);
1031
1030
  t && (r.parentNode !== t || t.lastElementChild !== r) && t.appendChild(r);
1032
- }, Z = (e) => {
1031
+ }, q = (e) => {
1033
1032
  var u;
1034
- if (Q.has(e))
1033
+ if (Y.has(e))
1035
1034
  return;
1036
- const r = k(e), t = ((u = e.defaultView) == null ? void 0 : u.MutationObserver) || (typeof MutationObserver < "u" ? MutationObserver : void 0);
1035
+ const r = _(e), t = ((u = e.defaultView) == null ? void 0 : u.MutationObserver) || (typeof MutationObserver < "u" ? MutationObserver : void 0);
1037
1036
  if (!r || !t)
1038
1037
  return;
1039
1038
  new t(() => {
1040
- const n = e.getElementById(S);
1041
- ae(n) && ue(e, n);
1042
- }).observe(r, { childList: !0 }), Q.add(e);
1043
- }, Ue = (e) => {
1044
- const r = e.getElementById(S);
1045
- if (ae(r))
1046
- return ue(e, r), Z(e), r;
1039
+ const n = e.getElementById(T);
1040
+ re(n) && te(e, n);
1041
+ }).observe(r, { childList: !0 }), Y.add(e);
1042
+ }, Ke = (e) => {
1043
+ const r = e.getElementById(T);
1044
+ if (re(r))
1045
+ return te(e, r), q(e), r;
1047
1046
  const t = e.createElement("style");
1048
- return t.id = S, k(e).appendChild(t), Z(e), t;
1049
- }, U = (e) => {
1047
+ return t.id = T, _(e).appendChild(t), q(e), t;
1048
+ }, O = (e) => {
1050
1049
  const r = Object.entries(e).filter(([, t]) => String(t ?? "").trim()).map(([t, o]) => ` ${t}: ${String(o ?? "")};`).join(`
1051
1050
  `);
1052
1051
  return r ? `:root {
1053
1052
  ${r}
1054
1053
  }` : ":root {}";
1055
- }, ze = (e = "default", r = {}) => {
1056
- const t = v(e) || I();
1057
- return U(O(t.variables, {
1054
+ }, We = (e = "default", r = {}) => {
1055
+ const t = g(e) || F();
1056
+ return O(P(t.variables, {
1058
1057
  ...r,
1059
1058
  themeName: r.themeName || t.name,
1060
1059
  basePresetName: r.basePresetName || t.basePresetName
1061
1060
  }));
1062
- }, yr = (e = {}) => ze("default", e), je = (e) => {
1063
- const r = e.getElementById(S);
1061
+ }, Sr = (e = {}) => We("default", e), Ge = (e) => {
1062
+ const r = e.getElementById(T);
1064
1063
  if (r != null && r.textContent)
1065
1064
  return !0;
1066
- const t = b.get(e) || b.get(e.documentElement);
1065
+ const t = h.get(e) || h.get(e.documentElement);
1067
1066
  return !!(t && Object.keys(t).length);
1068
- }, $e = (e) => {
1067
+ }, Ye = (e) => {
1069
1068
  var o;
1070
1069
  const r = ((o = e.defaultView) == null ? void 0 : o.getComputedStyle) || (typeof getComputedStyle == "function" ? getComputedStyle : void 0);
1071
1070
  if (!r || !e.documentElement)
1072
1071
  return !1;
1073
1072
  const t = r(e.documentElement);
1074
- return Le.some((u) => t.getPropertyValue(u).trim());
1075
- }, z = (e) => Object.prototype.toString.call(e) === "[object Object]", _ = (e) => ({
1073
+ return $e.some((u) => t.getPropertyValue(u).trim());
1074
+ }, L = (e) => Object.prototype.toString.call(e) === "[object Object]", N = (e) => ({
1076
1075
  themeName: e.name,
1077
1076
  basePresetName: e.basePresetName,
1078
1077
  variables: e.variables
1079
- }), E = () => _(I()), ne = (e) => {
1078
+ }), x = () => N(F()), oe = (e) => {
1080
1079
  if (typeof window > "u")
1081
1080
  return null;
1082
1081
  try {
@@ -1084,31 +1083,31 @@ ${r}
1084
1083
  if (!r)
1085
1084
  return null;
1086
1085
  const t = JSON.parse(r);
1087
- return z(t) ? t : null;
1086
+ return L(t) ? t : null;
1088
1087
  } catch {
1089
1088
  return null;
1090
1089
  }
1091
- }, Ke = (e, r) => {
1092
- if (!z(e))
1090
+ }, qe = (e, r) => {
1091
+ if (!L(e))
1093
1092
  return null;
1094
1093
  const t = { ...r };
1095
1094
  return Object.entries(e).forEach(([o, u]) => {
1096
1095
  !o.startsWith("--") || typeof u != "string" && typeof u != "number" || (t[o] = String(u));
1097
1096
  }), M(t);
1098
- }, le = (e) => {
1099
- const r = z(e.customTheme) ? e.customTheme : null;
1097
+ }, ae = (e) => {
1098
+ const r = L(e.customTheme) ? e.customTheme : null;
1100
1099
  if (!r)
1101
1100
  return null;
1102
- const t = String(r.basePresetName || e.remoteTheme || "").trim(), o = v(t) || I(), u = Ke(r.variables, o.variables);
1101
+ const t = String(r.basePresetName || e.remoteTheme || "").trim(), o = g(t) || F(), u = qe(r.variables, o.variables);
1103
1102
  return u ? {
1104
1103
  themeName: "custom",
1105
1104
  basePresetName: o.name,
1106
1105
  variables: u
1107
1106
  } : null;
1108
- }, We = (e) => {
1107
+ }, Je = (e) => {
1109
1108
  if (!e.useStoredTheme)
1110
1109
  return null;
1111
- const r = String(e.storageKey || w).trim() || w, t = ne(r);
1110
+ const r = String(e.storageKey || C).trim() || C, t = oe(r);
1112
1111
  if (!t)
1113
1112
  return null;
1114
1113
  const o = [t.currentTheme, t.remoteTheme];
@@ -1117,61 +1116,61 @@ ${r}
1117
1116
  if (!n)
1118
1117
  continue;
1119
1118
  if (n === "custom") {
1120
- const i = le(t);
1119
+ const i = ae(t);
1121
1120
  if (i)
1122
1121
  return i;
1123
1122
  continue;
1124
1123
  }
1125
- const l = v(n);
1124
+ const l = g(n);
1126
1125
  if (l)
1127
- return _(l);
1126
+ return N(l);
1128
1127
  }
1129
1128
  return null;
1130
- }, Ge = (e) => {
1129
+ }, Xe = (e) => {
1131
1130
  const r = e.documentElement, t = [r.getAttribute("data-theme"), r.getAttribute("data-skin")];
1132
1131
  for (const o of t) {
1133
- const u = v(String(o || "").trim());
1132
+ const u = g(String(o || "").trim());
1134
1133
  if (u)
1135
- return _(u);
1134
+ return N(u);
1136
1135
  }
1137
1136
  return null;
1138
- }, Ye = (e, r) => {
1137
+ }, Qe = (e, r) => {
1139
1138
  const t = String(r.presetName || "").trim();
1140
1139
  if (t) {
1141
1140
  if (t === "custom") {
1142
1141
  if (r.useStoredTheme === !1)
1143
- return E();
1144
- const u = String(r.storageKey || w).trim() || w, n = ne(u);
1145
- return (n ? le(n) : null) || E();
1142
+ return x();
1143
+ const u = String(r.storageKey || C).trim() || C, n = oe(u);
1144
+ return (n ? ae(n) : null) || x();
1146
1145
  }
1147
- const o = v(t);
1148
- return o ? _(o) : E();
1146
+ const o = g(t);
1147
+ return o ? N(o) : x();
1149
1148
  }
1150
- return Ge(e) || We(r) || E();
1151
- }, qe = (e, r) => {
1152
- const t = k(e);
1149
+ return Xe(e) || Je(r) || x();
1150
+ }, Ze = (e, r) => {
1151
+ const t = _(e);
1153
1152
  (r.parentNode !== t || t.firstChild !== r) && t.insertBefore(r, t.firstChild);
1154
- }, vr = (e = {}) => {
1153
+ }, wr = (e = {}) => {
1155
1154
  var p;
1156
1155
  if (typeof document > "u")
1157
1156
  return null;
1158
- const r = ((p = e.root) == null ? void 0 : p.ownerDocument) || document, t = Ye(r, e), o = e.styleId || Ie;
1159
- if (!e.force && je(r))
1157
+ const r = ((p = e.root) == null ? void 0 : p.ownerDocument) || document, t = Qe(r, e), o = e.styleId || je;
1158
+ if (!e.force && Ge(r))
1160
1159
  return null;
1161
1160
  const u = r.getElementById(o);
1162
- if (!e.force && !u && $e(r))
1161
+ if (!e.force && !u && Ye(r))
1163
1162
  return null;
1164
1163
  const n = u || r.createElement("style");
1165
1164
  n.id || (n.id = o);
1166
- const l = e.themeName || t.themeName, i = e.basePresetName || t.basePresetName, s = U(O(t.variables, {
1165
+ const l = e.themeName || t.themeName, i = e.basePresetName || t.basePresetName, s = O(P(t.variables, {
1167
1166
  includeElementAndDasUiBridges: e.includeElementAndDasUiBridges,
1168
1167
  themeName: l,
1169
1168
  basePresetName: i
1170
1169
  }));
1171
- n.textContent !== s && (n.textContent = s), qe(r, n);
1170
+ n.textContent !== s && (n.textContent = s), Ze(r, n);
1172
1171
  const { setThemeAttributes: c = !0 } = e;
1173
1172
  return c && ((e.themeName || !r.documentElement.getAttribute("data-theme")) && r.documentElement.setAttribute("data-theme", l), e.skinName !== null && !r.documentElement.getAttribute("data-skin") && r.documentElement.setAttribute("data-skin", e.skinName || i)), n;
1174
- }, ee = (e, r) => {
1173
+ }, J = (e, r) => {
1175
1174
  if (!e.length || !r.length)
1176
1175
  return;
1177
1176
  const t = new Set(r);
@@ -1179,22 +1178,22 @@ ${r}
1179
1178
  const u = e[o];
1180
1179
  t.has(u) && e.removeProperty(u);
1181
1180
  }
1182
- }, Je = (e, r) => {
1183
- const t = Ue(e), o = U(r);
1184
- (X.get(e) !== o || t.textContent !== o) && (t.textContent = o, X.set(e, o));
1181
+ }, er = (e, r) => {
1182
+ const t = Ke(e), o = O(r);
1183
+ (G.get(e) !== o || t.textContent !== o) && (t.textContent = o, G.set(e, o));
1185
1184
  const u = Object.keys(r);
1186
- ee(e.documentElement.style, u), e.body && ee(e.body.style, u);
1187
- }, Xe = (e) => {
1185
+ J(e.documentElement.style, u), e.body && J(e.body.style, u);
1186
+ }, rr = (e) => {
1188
1187
  typeof window > "u" || (window.__UPF_THEME_SNAPSHOT__ = e);
1189
- }, Qe = (e, r) => {
1190
- const t = T(r) || {}, o = e.ownerDocument || document;
1191
- b.set(e, t);
1188
+ }, tr = (e, r) => {
1189
+ const t = E(r) || {}, o = e.ownerDocument || document;
1190
+ h.set(e, t);
1192
1191
  const u = e === o.documentElement || e === o.body;
1193
- u && b.set(o, t), u && typeof window < "u" && o === document && (window.__UPF_THEME_RUNTIME_VARIABLES__ = t);
1194
- }, Ze = (e) => {
1195
- const r = L(e), t = (r == null ? void 0 : r.ownerDocument) || (typeof document < "u" ? document : null), o = typeof window < "u" && t === document && window.__UPF_THEME_RUNTIME_VARIABLES__ || null;
1196
- return (r ? b.get(r) : null) || (t ? b.get(t) : null) || o;
1197
- }, er = (e = !0) => {
1192
+ u && h.set(o, t), u && typeof window < "u" && o === document && (window.__UPF_THEME_RUNTIME_VARIABLES__ = t);
1193
+ }, or = (e) => {
1194
+ const r = I(e), t = (r == null ? void 0 : r.ownerDocument) || (typeof document < "u" ? document : null), o = typeof window < "u" && t === document && window.__UPF_THEME_RUNTIME_VARIABLES__ || null;
1195
+ return (r ? h.get(r) : null) || (t ? h.get(t) : null) || o;
1196
+ }, ar = (e = !0) => {
1198
1197
  var r;
1199
1198
  if (typeof window > "u" || !window.name)
1200
1199
  return null;
@@ -1209,183 +1208,163 @@ ${r}
1209
1208
  } catch {
1210
1209
  return null;
1211
1210
  }
1212
- }, rr = (e, r) => {
1211
+ }, ur = (e, r) => {
1213
1212
  if (r !== void 0)
1214
1213
  return r;
1215
1214
  const t = e.config || {};
1216
1215
  return String(t.basePresetName || t.name || e.themeName || "").trim() || null;
1217
- }, tr = (e, r = {}) => {
1218
- const t = L(r.root);
1216
+ }, nr = (e, r = {}) => {
1217
+ const t = I(r.root);
1219
1218
  if (!t)
1220
1219
  return {};
1221
- const o = M(e), u = r.includeBridges === !1 ? Object.entries(o).reduce((l, [i, s]) => (l[i] = String(s ?? ""), l), {}) : O(o, {
1220
+ const o = M(e), u = r.includeBridges === !1 ? Object.entries(o).reduce((l, [i, s]) => (l[i] = String(s ?? ""), l), {}) : P(o, {
1222
1221
  includeElementAndDasUiBridges: r.includeElementAndDasUiBridges,
1223
1222
  themeName: r.themeName,
1224
1223
  basePresetName: r.basePresetName
1225
1224
  }), n = t.ownerDocument || document;
1226
- return t === n.documentElement || t === n.body ? Je(n, u) : Object.entries(u).forEach(([l, i]) => {
1225
+ return t === n.documentElement || t === n.body ? er(n, u) : Object.entries(u).forEach(([l, i]) => {
1227
1226
  t.style.getPropertyValue(l) !== i && t.style.setProperty(l, i);
1228
- }), Qe(t, u), r.themeName && t.setAttribute("data-theme", r.themeName), r.skinName === null ? t.removeAttribute("data-skin") : r.skinName && t.setAttribute("data-skin", r.skinName), u;
1229
- }, ie = (e, r = {}) => {
1230
- const t = e.config || {}, o = tr(e.variables || {}, {
1227
+ }), tr(t, u), r.themeName && t.setAttribute("data-theme", r.themeName), r.skinName === null ? t.removeAttribute("data-skin") : r.skinName && t.setAttribute("data-skin", r.skinName), u;
1228
+ }, ue = (e, r = {}) => {
1229
+ const t = e.config || {}, o = nr(e.variables || {}, {
1231
1230
  ...r,
1232
1231
  themeName: r.themeName || e.themeName,
1233
1232
  basePresetName: r.basePresetName || String(t.basePresetName || t.name || ""),
1234
- skinName: rr(e, r.skinName)
1233
+ skinName: ur(e, r.skinName)
1235
1234
  });
1236
- return Xe(e), o;
1237
- }, B = (e, r, t = !0) => {
1235
+ return rr(e), o;
1236
+ }, V = (e, r, t = !0) => {
1238
1237
  try {
1239
1238
  return e && e.__THEME_API__ || null;
1240
1239
  } catch {
1241
1240
  return null;
1242
1241
  }
1243
- }, A = (e = !0) => typeof window > "u" ? null : B(window, "current", e) || B(window.parent, "parent", e) || B(window.top, "top", e), j = (e = {}) => {
1242
+ }, A = (e = !0) => typeof window > "u" ? null : V(window, "current", e) || V(window.parent, "parent", e) || V(window.top, "top", e), ne = (e = {}) => {
1244
1243
  const r = A(e.debug), t = r != null && r.getCurrentTheme ? r.getCurrentTheme() : null;
1245
1244
  if (t)
1246
1245
  return t;
1247
1246
  const o = (typeof window < "u" ? window.__UPF_THEME_SNAPSHOT__ : null) || null;
1248
- return o || er(e.debug);
1249
- }, or = (e = {}) => {
1250
- const r = Ze(e.root);
1247
+ return o || ar(e.debug);
1248
+ }, lr = (e = {}) => {
1249
+ const r = or(e.root);
1251
1250
  if (r)
1252
- return T(r);
1253
- const t = j(e);
1251
+ return E(r);
1252
+ const t = ne(e);
1254
1253
  if (t != null && t.variables)
1255
- return T(t.variables);
1254
+ return E(t.variables);
1256
1255
  const o = A(e.debug);
1257
1256
  if (!o)
1258
1257
  return null;
1259
1258
  const u = o.getVariables ? o.getVariables() : null;
1260
- return T(u);
1261
- }, ar = (e, r = !0) => {
1259
+ return E(u);
1260
+ }, Fr = (e, r = !0) => {
1262
1261
  const t = A(r);
1263
1262
  return t != null && t.changeTheme ? (t.changeTheme(e), !0) : !1;
1264
- }, $ = (e = {}) => {
1265
- const r = j(e);
1266
- return r ? (ie(r, e), r) : (e.debug, null);
1267
- }, xr = (e = {}) => $({
1263
+ }, le = (e = {}) => {
1264
+ const r = ne(e);
1265
+ return r ? (ue(r, e), r) : (e.debug, null);
1266
+ }, _r = (e = {}) => le({
1268
1267
  includeBridges: !1,
1269
1268
  includeElementAndDasUiBridges: !1,
1270
1269
  ...e
1271
- }), ur = (e, r = !0) => {
1270
+ }), ir = (e, r = !0) => {
1272
1271
  try {
1273
- const t = pe("microApp");
1274
- return t.event.on(J, e), () => {
1275
- t.event.off(J, e);
1272
+ const t = se("microApp");
1273
+ return t.event.on(W, e), () => {
1274
+ t.event.off(W, e);
1276
1275
  };
1277
1276
  } catch {
1278
1277
  return null;
1279
1278
  }
1280
- }, nr = (e, r) => e != null && e.onThemeChange ? e.onThemeChange(r) : null, lr = (e) => e ? [String(e.themeName || ""), String(e.source || ""), String(Number(e.timestamp) || 0)].join("|") : "", ir = (e) => {
1279
+ }, sr = (e, r) => e != null && e.onThemeChange ? e.onThemeChange(r) : null, fr = (e) => e ? [String(e.themeName || ""), String(e.source || ""), String(Number(e.timestamp) || 0)].join("|") : "", cr = (e) => {
1281
1280
  let r = "";
1282
1281
  return (t) => {
1283
- const o = lr(t);
1282
+ const o = fr(t);
1284
1283
  o && o === r || (r = o, e(t));
1285
1284
  };
1286
- }, sr = (e, r, t = !1, o = !0) => {
1287
- const u = ir(r), n = nr(e, u), l = ur(u, o), s = (t ? [n, l] : [l, n]).filter(Boolean);
1285
+ }, pr = (e, r, t = !1, o = !0) => {
1286
+ const u = cr(r), n = sr(e, u), l = ir(u, o), s = (t ? [n, l] : [l, n]).filter(Boolean);
1288
1287
  return s.length ? () => {
1289
1288
  s.forEach((c) => c());
1290
1289
  } : null;
1291
- }, se = (e = {}) => {
1290
+ }, mr = (e = {}) => {
1292
1291
  const { syncOnInit: r = !0, preferWindowSubscription: t = !1, onThemeChange: o, debug: u = !0, ...n } = e, l = A(u);
1293
1292
  let i = !1, s = null, c = null;
1294
1293
  const p = () => {
1295
- i || $({ ...n, debug: u });
1296
- }, H = sr(l, (g) => {
1297
- ie(g, n), o && (g == null ? void 0 : g.source) !== "mountSync" && o(g);
1294
+ i || le({ ...n, debug: u });
1295
+ }, k = pr(l, (b) => {
1296
+ ue(b, n), o && (b == null ? void 0 : b.source) !== "mountSync" && o(b);
1298
1297
  }, t, u);
1299
- return r && (p(), (typeof queueMicrotask == "function" ? queueMicrotask : (ce) => Promise.resolve().then(ce))(p), typeof requestAnimationFrame == "function" ? s = requestAnimationFrame(() => {
1298
+ return r && (p(), (typeof queueMicrotask == "function" ? queueMicrotask : (ie) => Promise.resolve().then(ie))(p), typeof requestAnimationFrame == "function" ? s = requestAnimationFrame(() => {
1300
1299
  s = null, p();
1301
1300
  }) : c = setTimeout(() => {
1302
1301
  c = null, p();
1303
1302
  }, 16)), () => {
1304
- i = !0, s !== null && typeof cancelAnimationFrame == "function" && (cancelAnimationFrame(s), s = null), c !== null && (clearTimeout(c), c = null), H == null || H();
1303
+ i = !0, s !== null && typeof cancelAnimationFrame == "function" && (cancelAnimationFrame(s), s = null), c !== null && (clearTimeout(c), c = null), k == null || k();
1305
1304
  };
1306
- }, Er = (e = {}) => se({
1305
+ }, Nr = (e = {}) => mr({
1307
1306
  includeBridges: !1,
1308
1307
  includeElementAndDasUiBridges: !1,
1309
1308
  ...e
1310
- }), fe = (e, r) => {
1309
+ }), dr = (e, r) => {
1311
1310
  var n;
1312
- const t = L(r), o = String(e || "").trim();
1311
+ const t = I(r), o = String(e || "").trim();
1313
1312
  if (!t || !o)
1314
1313
  return "";
1315
1314
  const u = typeof getComputedStyle > "u" ? "" : getComputedStyle(t).getPropertyValue(o).trim();
1316
- return u || String(((n = or({ root: t, debug: !1 })) == null ? void 0 : n[o]) ?? "");
1317
- }, Tr = (e) => `var(${String(e || "").trim()})`, Cr = (e, r) => ({
1318
- value: fe(String(e || "").trim(), r)
1319
- }), Sr = (e = {}) => {
1320
- const r = me("default");
1321
- let t = null;
1322
- return de(() => {
1323
- t = se({
1324
- ...e,
1325
- onThemeChange: (u) => {
1326
- r.value = u.themeName, e.onThemeChange && e.onThemeChange(u);
1327
- }
1328
- });
1329
- const o = j({ debug: e.debug });
1330
- o && (r.value = o.themeName);
1331
- }), ge(() => {
1332
- t == null || t();
1333
- }), {
1334
- currentTheme: r,
1335
- getVariable: (o) => fe(o, e.root),
1336
- syncTheme: () => $(e),
1337
- changeTheme: (o) => ar(o, e.debug)
1338
- };
1339
- };
1315
+ return u || String(((n = lr({ root: t, debug: !1 })) == null ? void 0 : n[o]) ?? "");
1316
+ }, Ar = (e) => `var(${String(e || "").trim()})`, kr = (e, r) => ({
1317
+ value: dr(String(e || "").trim(), r)
1318
+ });
1340
1319
  export {
1341
- Pe as BUILTIN_PRESET_THEME_NAMES,
1342
- Ve as DAS_UI_THEME_BRIDGE_ITEMS,
1343
- He as ELEMENT_THEME_BRIDGE_ITEMS,
1344
- Ae as LEGACY_THEME_BRIDGE_ITEMS,
1345
- C as PRESET_THEMES,
1346
- h as PRESET_THEME_VARIABLES,
1347
- ye as THEME_SOURCE_VARIABLE_CATEGORIES,
1348
- Ee as THEME_SOURCE_VARIABLE_HINTS,
1349
- xe as THEME_SOURCE_VARIABLE_LABELS,
1350
- F as THEME_SOURCE_VARIABLE_META,
1351
- ve as THEME_SOURCE_VARIABLE_NAMES,
1352
- Te as THEME_SOURCE_VARIABLE_RELATIONS,
1353
- Be as UPF_COMPONENT_THEME_BRIDGE_ITEMS,
1354
- ie as applyThemeEventToDocument,
1355
- tr as applyThemeVariablesToDocument,
1356
- yr as buildDefaultThemeCssText,
1357
- ze as buildPresetThemeCssText,
1358
- O as buildRuntimeThemeVariables,
1359
- ar as changeTheme,
1360
- P as clonePresetTheme,
1361
- vr as ensureDefaultThemeStyle,
1362
- hr as getAllPresetThemes,
1363
- j as getCurrentTheme,
1364
- er as getHostThemeSnapshotFromWindowName,
1365
- v as getPresetTheme,
1320
+ _e as BUILTIN_PRESET_THEME_NAMES,
1321
+ Pe as DAS_UI_THEME_BRIDGE_ITEMS,
1322
+ Me as ELEMENT_THEME_BRIDGE_ITEMS,
1323
+ De as LEGACY_THEME_BRIDGE_ITEMS,
1324
+ R as PRESET_THEMES,
1325
+ y as PRESET_THEME_VARIABLES,
1326
+ pe as THEME_SOURCE_VARIABLE_CATEGORIES,
1327
+ ge as THEME_SOURCE_VARIABLE_HINTS,
1328
+ de as THEME_SOURCE_VARIABLE_LABELS,
1329
+ S as THEME_SOURCE_VARIABLE_META,
1330
+ me as THEME_SOURCE_VARIABLE_NAMES,
1331
+ be as THEME_SOURCE_VARIABLE_RELATIONS,
1332
+ Ie as UPF_COMPONENT_THEME_BRIDGE_ITEMS,
1333
+ ue as applyThemeEventToDocument,
1334
+ nr as applyThemeVariablesToDocument,
1335
+ Sr as buildDefaultThemeCssText,
1336
+ We as buildPresetThemeCssText,
1337
+ P as buildRuntimeThemeVariables,
1338
+ Fr as changeTheme,
1339
+ wr as ensureDefaultThemeStyle,
1340
+ Tr as getAllPresetThemes,
1341
+ ne as getCurrentTheme,
1342
+ F as getDefaultPresetTheme,
1343
+ Cr as getDefaultThemeVariables,
1344
+ ar as getHostThemeSnapshotFromWindowName,
1345
+ Er as getPresetTheme,
1366
1346
  A as getThemeAPI,
1367
- gr as getThemeSourceVariableCategories,
1368
- dr as getThemeSourceVariableHints,
1369
- mr as getThemeSourceVariableLabels,
1370
- pr as getThemeSourceVariableNames,
1371
- br as getThemeSourceVariableRelations,
1372
- fe as getThemeVariable,
1373
- or as getThemeVariables,
1374
- Tr as getVar,
1375
- Cr as getVarValue,
1376
- Er as initHostThemeRootSync,
1377
- se as initSubAppThemeSync,
1378
- te as mixHexColor,
1379
- re as normalizeHexColor,
1380
- Se as normalizeThemeSourceVariables,
1381
- R as resolvePrimaryBgColor,
1382
- N as resolveThemeBridgeVariables,
1383
- xr as syncHostThemeRoot,
1384
- $ as syncThemeFromHost,
1385
- Me as toDasUiColorOverrides,
1386
- Re as toElementThemeVariables,
1387
- De as toLegacyThemeVariables,
1388
- he as toRgbaColor,
1389
- Oe as toUpfComponentThemeVariables,
1390
- Sr as useSubAppTheme
1347
+ vr as getThemeSourceVariableCategories,
1348
+ yr as getThemeSourceVariableHints,
1349
+ hr as getThemeSourceVariableLabels,
1350
+ br as getThemeSourceVariableNames,
1351
+ xr as getThemeSourceVariableRelations,
1352
+ dr as getThemeVariable,
1353
+ lr as getThemeVariables,
1354
+ Ar as getVar,
1355
+ kr as getVarValue,
1356
+ Nr as initHostThemeRootSync,
1357
+ mr as initSubAppThemeSync,
1358
+ Q as mixHexColor,
1359
+ X as normalizeHexColor,
1360
+ ye as normalizeThemeSourceVariables,
1361
+ D as resolvePrimaryBgColor,
1362
+ w as resolveThemeBridgeVariables,
1363
+ _r as syncHostThemeRoot,
1364
+ le as syncThemeFromHost,
1365
+ Ue as toDasUiColorOverrides,
1366
+ Le as toElementThemeVariables,
1367
+ Oe as toLegacyThemeVariables,
1368
+ ce as toRgbaColor,
1369
+ ze as toUpfComponentThemeVariables
1391
1370
  };