@das-fed/web 6.4.0-test.2 → 6.4.0-test.20

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 (78) hide show
  1. package/esm-map.json +3 -1
  2. package/{index-3y8fHBtE.js → index-DozcsJQ6.js} +1 -1
  3. package/index-SnQNzohF.js +81 -0
  4. package/index-SnQNzohF.js.gz +0 -0
  5. package/index-oWBd5vf_.js +13331 -0
  6. package/index-oWBd5vf_.js.gz +0 -0
  7. package/index.js +22 -20
  8. package/package.json +8 -6
  9. package/packages/i18n/index.js +172 -31
  10. package/packages/i18n/index.js.gz +0 -0
  11. package/packages/layout/index.js +454 -518
  12. package/packages/layout/index.js.gz +0 -0
  13. package/packages/layout/style.css +2 -2
  14. package/packages/layout/style.css.gz +0 -0
  15. package/packages/main-app-framework/index-CmHORAF1.js +81 -0
  16. package/packages/main-app-framework/index-CmHORAF1.js.gz +0 -0
  17. package/packages/main-app-framework/{index-DnFSz1TN.js → index-DAaPMAIp.js} +1 -1
  18. package/packages/main-app-framework/index-JNn4Rtac.js +11956 -0
  19. package/packages/main-app-framework/index-JNn4Rtac.js.gz +0 -0
  20. package/packages/main-app-framework/index.js +3 -2
  21. package/packages/main-app-framework/style.css +1 -1
  22. package/packages/main-app-framework/style.css.gz +0 -0
  23. package/packages/micro-frontend/index.js +305 -302
  24. package/packages/micro-frontend/index.js.gz +0 -0
  25. package/packages/style/style.css +1 -1
  26. package/packages/style/style.css.gz +0 -0
  27. package/style.css +2 -2
  28. package/style.css.gz +0 -0
  29. package/types/create-das-web-app/index.d.ts +1 -1
  30. package/types/i18n/global.d.ts +583 -0
  31. package/types/i18n/index.d.ts +6 -4
  32. package/types/layout/store/index.d.ts +7 -2
  33. package/types/layout/store/menu.d.ts +2 -0
  34. package/types/layout/store/nav.d.ts +2 -1
  35. package/types/layout/store/tab.d.ts +1 -0
  36. package/types/main-app-framework/business/alarm/use-alarm.d.ts +4 -4
  37. package/types/main-app-framework/business/video-link/index.d.ts +3 -3
  38. package/types/main-app-framework/business/video-link/video-dialog/hooks/PlayerProvider.d.ts +3 -3
  39. package/types/main-app-framework/components/person-set-dialog/index.d.ts +1 -1
  40. package/types/main-app-framework/components/person-set-dialog/src/api.d.ts +2 -0
  41. package/types/main-app-framework/components/person-set-dialog/src/components/index.d.ts +2 -0
  42. package/types/main-app-framework/components/person-set-dialog/src/components/set-home/api.d.ts +20 -0
  43. package/types/main-app-framework/components/person-set-dialog/src/components/set-home/use-link-form/hooks/use-builtIn-dialog.d.ts +19 -0
  44. package/types/main-app-framework/components/person-set-dialog/src/components/set-home/use-link-form/hooks/use-notBuiltIn-dialog.d.ts +22 -0
  45. package/types/main-app-framework/constant/index.d.ts +1 -1
  46. package/types/main-app-framework/data-track/api.d.ts +2 -0
  47. package/types/main-app-framework/data-track/index.d.ts +2 -0
  48. package/types/main-app-framework/i18n/index.d.ts +518 -0
  49. package/types/main-app-framework/index.d.ts +2 -1
  50. package/types/main-app-framework/init-config/get-nav-config/api.d.ts +2 -0
  51. package/types/main-app-framework/init-config/get-nav-config/index.d.ts +4 -3
  52. package/types/main-app-framework/init-config/get-project-config/api.d.ts +3 -2
  53. package/types/main-app-framework/init-config/get-system-config/api.d.ts +2 -0
  54. package/types/main-app-framework/init-config/get-system-config/index.d.ts +4 -4
  55. package/types/main-app-framework/init-config/get-tenant-config/api.d.ts +1 -1
  56. package/types/main-app-framework/init-layout/hooks/nav-slots/use-change-enterprises.d.ts +3 -3
  57. package/types/main-app-framework/init-layout/hooks/nav-slots/use-user-command.d.ts +2 -2
  58. package/types/main-app-framework/init-layout/hooks/use-initialization.d.ts +5 -4
  59. package/types/main-app-framework/init-layout/hooks/use-tabs.d.ts +3 -3
  60. package/types/main-app-framework/init-platform/index.d.ts +1 -1
  61. package/types/main-app-framework/utils/src/get-portal-url/crypto.d.ts +14 -0
  62. package/types/main-app-framework/utils/src/get-portal-url/encrypt.d.ts +42 -0
  63. package/types/main-app-framework/utils/src/get-portal-url/generate-url.d.ts +4 -0
  64. package/types/main-app-framework/utils/src/get-portal-url/handle-portal-params.d.ts +2 -0
  65. package/types/main-app-framework/utils/src/get-portal-url/index.d.ts +2 -0
  66. package/types/main-app-framework/utils/src/get-portal-url/type.d.ts +16 -0
  67. package/types/main-app-framework/utils/src/set-common-info.d.ts +4 -2
  68. package/types/main-app-framework/utils/src/tools.d.ts +5 -1
  69. package/types/micro-frontend/store.d.ts +5 -5
  70. package/types/theme/index.d.ts +1 -1
  71. package/index-DEYJwN2T.js +0 -7173
  72. package/index-DEYJwN2T.js.gz +0 -0
  73. package/index-DXnYb5jk.js +0 -74
  74. package/index-DXnYb5jk.js.gz +0 -0
  75. package/packages/main-app-framework/index-Bo4ASgsm.js +0 -5859
  76. package/packages/main-app-framework/index-Bo4ASgsm.js.gz +0 -0
  77. package/packages/main-app-framework/index-Xn4wzM8V.js +0 -74
  78. package/packages/main-app-framework/index-Xn4wzM8V.js.gz +0 -0
@@ -1,34 +1,37 @@
1
1
  import '@das-fed/web/packages/micro-frontend/style.css';
2
- import { ref as w, watch as M, reactive as O, getCurrentScope as oe, onScopeDispose as ce, unref as I, getCurrentInstance as le, onMounted as ue, nextTick as Z, defineComponent as x, computed as D, openBlock as E, createElementBlock as N, Fragment as $, renderList as de, withDirectives as pe, createBlock as ee, vShow as me, createCommentVNode as fe, mergeProps as ve, withCtx as C, renderSlot as V, createVNode as F, onActivated as Ae } from "vue";
3
- import { DasWebLayout as he, DasWebNav as we, DasWebMenu as ge, DasWebTabs as ye } from "@das-fed/web/packages/layout/index";
4
- const z = w("/das-micro-app"), f = w([]), k = w(!1), R = w([]), T = w(!0);
5
- let A = null, h = null, L = null;
2
+ import { ref as w, watch as M, reactive as C, getCurrentScope as ue, onScopeDispose as de, unref as I, getCurrentInstance as pe, onMounted as me, nextTick as ne, defineComponent as x, computed as D, openBlock as E, createElementBlock as N, Fragment as z, renderList as fe, withDirectives as ve, createBlock as se, vShow as he, createCommentVNode as Ae, mergeProps as we, withCtx as O, renderSlot as V, createVNode as T, onActivated as ge } from "vue";
3
+ import { DasWebLayout as ye, DasWebNav as Me, DasWebMenu as Le, DasWebTabs as _e } from "@das-fed/web/packages/layout/index";
4
+ const W = w("/das-micro-app"), f = w([]), k = w(!1), F = w([]), R = w(!0);
5
+ let A = null, v = null, _ = null;
6
6
  const b = (e, t, n) => {
7
- var c, a, i, s;
8
- const r = f.value.find((o) => o.name === e);
9
- if (r) {
10
- if (r.entry.startsWith("/") || r.entry.match(location.origin)) {
11
- (a = (c = r.dom) == null ? void 0 : c.contentWindow) == null || a.postMessage({ type: t, data: n });
12
- return;
13
- }
14
- (s = (i = r.dom) == null ? void 0 : i.contentWindow) == null || s.postMessage({ type: t, data: n }, r.entry);
15
- }
16
- }, q = (e, t) => {
17
- var r;
18
- const { origin: n } = new URL(location.href);
19
- (r = window.top) == null || r.postMessage({ type: e, data: t }, n);
20
- }, Me = () => {
21
- h || (h || (h = {}), window.addEventListener(
7
+ var c;
8
+ const { origin: s } = new URL(location.href);
9
+ (c = window.self) == null || c.postMessage({ type: t, data: n }, s);
10
+ }, be = (e) => new Promise((t) => {
11
+ const n = () => {
12
+ if (v != null && v[e]) return t();
13
+ setTimeout(() => n(), 50);
14
+ };
15
+ n();
16
+ }), q = (e, t, n) => {
17
+ var a;
18
+ const { awaitListener: s = !1 } = n, { origin: c } = new URL(location.href);
19
+ s ? be(e).then(() => {
20
+ var i;
21
+ (i = window.self) == null || i.postMessage({ type: e, data: t }, c);
22
+ }) : (a = window.self) == null || a.postMessage({ type: e, data: t }, c);
23
+ }, Ie = () => {
24
+ v || (v || (v = {}), window.addEventListener(
22
25
  "message",
23
26
  (e) => {
24
27
  const { type: t, source: n } = e.data || {};
25
- if (n !== "react-devtools-content-script" && h[t])
26
- for (const r in h[t])
27
- h[t][r](e.data);
28
+ if (n !== "react-devtools-content-script" && v[t])
29
+ for (const s in v[t])
30
+ v[t][s](e.data);
28
31
  },
29
32
  !1
30
33
  ));
31
- }, _e = () => {
34
+ }, Ee = () => {
32
35
  A || (A || (A = {}), window.addEventListener(
33
36
  "message",
34
37
  (e) => {
@@ -39,26 +42,26 @@ const b = (e, t, n) => {
39
42
  },
40
43
  !1
41
44
  ));
42
- }, Le = (e, t) => {
43
- _e();
45
+ }, Se = (e, t) => {
46
+ Ee();
44
47
  const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8);
45
48
  return A[e] || (A[e] = {}), A[e][n] = t, {
46
49
  remove: () => {
47
50
  A[e] && A[e][n] && delete A[e][n];
48
51
  }
49
52
  };
50
- }, be = (e, t) => {
51
- Me();
53
+ }, Pe = (e, t) => {
54
+ Ie();
52
55
  const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8);
53
- return h[e] || (h[e] = {}), h[e][n] = t, {
56
+ return v[e] || (v[e] = {}), v[e][n] = t, {
54
57
  remove: () => {
55
- h[e] && h[e][n] && delete h[e][n];
58
+ v[e] && v[e][n] && delete v[e][n];
56
59
  }
57
60
  };
58
61
  }, Q = async (e) => {
59
62
  await Promise.all(
60
63
  f.value.filter((t) => t.loaded).map((t) => new Promise(async (n) => {
61
- t.dom || await new Promise((r) => M(() => t.dom, r)), setTimeout(() => {
64
+ t.dom || await new Promise((s) => M(() => t.dom, s)), setTimeout(() => {
62
65
  b(t.name, "sessionStorage", e), n(!0);
63
66
  }, 0);
64
67
  }))
@@ -66,14 +69,14 @@ const b = (e, t, n) => {
66
69
  }, d = {
67
70
  loadMicroApp: (e) => {
68
71
  k.value = !0;
69
- const t = f.value.find((i) => i.name === e), n = f.value.find((i) => i.actived), r = !!t, c = !(t != null && t.loaded), a = t == null ? void 0 : t.actived;
70
- if (!r) {
72
+ const t = f.value.find((i) => i.name === e), n = f.value.find((i) => i.actived), s = !!t, c = !(t != null && t.loaded), a = t == null ? void 0 : t.actived;
73
+ if (!s) {
71
74
  n && (n.actived = !1);
72
75
  return;
73
76
  }
74
77
  if (t.isFirstActived = !0, c) {
75
78
  t.src = t.entry;
76
- const i = f.value.find((s) => s.actived);
79
+ const i = f.value.find((r) => r.actived);
77
80
  i && (i.actived = !1), t.loaded = !0, t.actived = !0;
78
81
  return;
79
82
  }
@@ -107,8 +110,8 @@ const b = (e, t, n) => {
107
110
  });
108
111
  },
109
112
  setMicroAppRoute: async (e, t, n) => {
110
- const r = f.value.find((s) => s.name === t);
111
- if (!r || !r.loaded || !r.actived || (r.dom || await new Promise((s) => M(() => r.dom, s)), !r.actived)) return r;
113
+ const s = f.value.find((r) => r.name === t);
114
+ if (!s || !s.loaded || !s.actived || (s.dom || await new Promise((r) => M(() => s.dom, r)), !s.actived)) return s;
112
115
  const c = n.path || n, a = n.query || {}, i = n.params || {};
113
116
  return e.push({
114
117
  path: `/${t}${c}`,
@@ -116,18 +119,18 @@ const b = (e, t, n) => {
116
119
  // @ts-ignore
117
120
  params: i
118
121
  }), setTimeout(() => {
119
- const { isFirstActived: s } = r;
122
+ const { isFirstActived: r } = s;
120
123
  b(t, "router", {
121
- cmd: s ? "replace" : "push",
124
+ cmd: r ? "replace" : "push",
122
125
  route: n,
123
126
  microAppName: t
124
- }), s && (r.isFirstActived = !1);
125
- }, 0), r;
127
+ }), r && (s.isFirstActived = !1);
128
+ }, 0), s;
126
129
  },
127
130
  sendMessageToMicroApp: b,
128
131
  sendMessageToMainApp: q,
129
- addEventListenerFromMainApp: Le,
130
- addEventListenerFromMicroApp: be,
132
+ addEventListenerFromMainApp: Se,
133
+ addEventListenerFromMicroApp: Pe,
131
134
  setMainAppOverlay: (e, t) => {
132
135
  q("bodyOverlay", { visible: e, style: t });
133
136
  },
@@ -146,39 +149,40 @@ const b = (e, t, n) => {
146
149
  },
147
150
  addMicroAppLifeCycleListener: (e, t) => {
148
151
  const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8);
149
- L || (L = {});
150
- const r = () => {
151
- L[n] && delete L[n];
152
+ _ || (_ = {});
153
+ const s = () => {
154
+ _[n] && delete _[n];
152
155
  };
153
- return L[n] = {
156
+ return _[n] = {
154
157
  type: e,
155
158
  handler: async (c) => await t(c),
156
- remove: r
157
- }, { remove: r };
159
+ remove: s
160
+ }, { remove: s };
158
161
  },
159
162
  triggerMicroAppLifeCycleListener: (e, t, n) => {
160
163
  var a;
161
- const r = L, { autoRemove: c = !1 } = n || {};
162
- for (const i in r) {
163
- const s = r[i];
164
- s.type === e && ((a = s == null ? void 0 : s.handler) == null || a.call(s, t).then(() => {
165
- c && s.remove();
164
+ const s = _, { autoRemove: c = !1 } = n || {};
165
+ for (const i in s) {
166
+ const r = s[i];
167
+ r.type === e && ((a = r == null ? void 0 : r.handler) == null || a.call(r, t).then(() => {
168
+ c && r.remove();
166
169
  }));
167
170
  }
168
171
  },
169
172
  reloadMicroAppRoute: async (e, t) => {
170
- const n = f.value.find((r) => r.name === e);
171
- n && (!n.loaded || !n.actived || (n.dom || await new Promise((r) => M(() => n.dom, r)), b(e, "route", { cmd: "reload", path: t })));
173
+ const n = f.value.find((s) => s.name === e);
174
+ n && (!n.loaded || !n.actived || (n.dom || await new Promise((s) => M(() => n.dom, s)), b(e, "route", { cmd: "reload", path: t })));
172
175
  },
173
176
  unloadMicroAppRoute: async (e, t) => {
174
- const n = f.value.find((r) => r.name === e);
175
- n && (!n.loaded || !n.actived || (n.dom || await new Promise((r) => M(() => n.dom, r)), b(e, "route", { cmd: "unload", path: t })));
177
+ const n = f.value.find((s) => s.name === e);
178
+ n && (!n.loaded || !n.actived || (n.dom || await new Promise((s) => M(() => n.dom, s)), b(e, "route", { cmd: "unload", path: t })));
176
179
  },
177
180
  setMainAppLayoutVisible: (e) => {
178
181
  q("layoutVisible", { visible: e });
179
182
  }
180
- }, u = O({
183
+ }, l = C({
181
184
  visible: !1,
185
+ theme: "default",
182
186
  logo: "",
183
187
  items: [],
184
188
  projects: [],
@@ -188,53 +192,56 @@ const b = (e, t, n) => {
188
192
  // activeItem: '',
189
193
  // activeProject: {},
190
194
  eventListeners: {}
191
- }), Ie = {
195
+ }), j = {
192
196
  show: () => {
193
- u.visible = !0;
197
+ l.visible = !0;
194
198
  },
195
199
  hide: () => {
196
- u.visible = !1;
200
+ l.visible = !1;
197
201
  },
198
202
  setLogo: (e) => {
199
- u.logo = e;
203
+ l.logo = e;
204
+ },
205
+ setTheme: (e) => {
206
+ l.theme = e;
200
207
  },
201
208
  setItems: (e) => {
202
- u.visible || (u.visible = !0), u.items = e;
209
+ l.visible || (l.visible = !0), l.items = e;
203
210
  },
204
- getItems: () => u.items,
211
+ getItems: () => l.items,
205
212
  removeItem: (e) => {
206
- const t = u.items.filter((n) => n.value !== e);
207
- u.items = t;
213
+ const t = l.items.filter((n) => n.value !== e);
214
+ l.items = t;
208
215
  },
209
216
  appendItem: (e) => {
210
- u.visible || (u.visible = !0), !u.items.find((n) => n.value == e.value) && u.items.push(e);
217
+ l.visible || (l.visible = !0), !l.items.find((n) => n.value == e.value) && l.items.push(e);
211
218
  },
212
219
  setActiveItem: (e) => {
213
- u.activeItem = e;
220
+ l.activeItem = e;
214
221
  },
215
222
  setConfig: (e) => {
216
- u.config = e;
223
+ l.config = e;
217
224
  },
218
225
  setProjects: (e) => {
219
- u.projects = e;
226
+ l.projects = e;
220
227
  },
221
228
  setProjectConfig: (e) => {
222
- u.projectConfig = e;
229
+ l.projectConfig = e;
223
230
  },
224
231
  setActiveProject: (e) => {
225
- u.activeProject = e;
232
+ l.activeProject = e;
226
233
  },
227
234
  setUserInfo: (e) => {
228
- u.userInfo = e;
235
+ l.userInfo = e;
229
236
  },
230
237
  setSearchConfig: (e) => {
231
- u.searchConfig = e;
238
+ l.searchConfig = e;
232
239
  },
233
240
  triggerEventListener: (e, t, n) => {
234
241
  var i;
235
- const r = u.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
236
- for (const s in r) {
237
- const o = r[s];
242
+ const s = l.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
243
+ for (const r in s) {
244
+ const o = s[r];
238
245
  o.type === e && a.push(
239
246
  (i = o == null ? void 0 : o.handler) == null ? void 0 : i.call(o, t).then(() => {
240
247
  c && o.remove();
@@ -244,10 +251,10 @@ const b = (e, t, n) => {
244
251
  return Promise.all(a).then(() => !0).catch(() => !1);
245
252
  },
246
253
  addEventListener: (e, t) => {
247
- const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), r = () => {
248
- u.eventListeners[n] && delete u.eventListeners[n];
254
+ const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
255
+ l.eventListeners[n] && delete l.eventListeners[n];
249
256
  };
250
- return u.eventListeners[n] = {
257
+ return l.eventListeners[n] = {
251
258
  type: e,
252
259
  handler: async (c) => {
253
260
  try {
@@ -256,30 +263,38 @@ const b = (e, t, n) => {
256
263
  throw a;
257
264
  }
258
265
  },
259
- remove: r
266
+ remove: s
260
267
  }, {
261
- remove: r
268
+ remove: s
262
269
  };
263
270
  }
264
- }, y = O({
271
+ }, g = C({
272
+ theme: "default",
265
273
  items: [],
274
+ collapse: !1,
266
275
  eventListeners: {}
267
- }), Ee = {
276
+ }), H = {
268
277
  setItems: (e) => {
269
- y.items = e;
278
+ g.items = e;
279
+ },
280
+ getItems: () => g.items,
281
+ setTheme: (e) => {
282
+ g.theme = e;
270
283
  },
271
- getItems: () => y.items,
272
284
  setActiveItem: (e) => {
273
- y.activeItem = e;
285
+ g.activeItem = e;
286
+ },
287
+ setCollapse: (e) => {
288
+ g.collapse = e;
274
289
  },
275
290
  setPopupClassName: (e) => {
276
- y.popupClassName = e;
291
+ g.popupClassName = e;
277
292
  },
278
293
  triggerEventListener: (e, t, n) => {
279
294
  var i;
280
- const r = y.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
281
- for (const s in r) {
282
- const o = r[s];
295
+ const s = g.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
296
+ for (const r in s) {
297
+ const o = s[r];
283
298
  o.type === e && a.push(
284
299
  (i = o == null ? void 0 : o.handler) == null ? void 0 : i.call(o, t).then(() => {
285
300
  c && o.remove();
@@ -289,10 +304,10 @@ const b = (e, t, n) => {
289
304
  return Promise.all(a).then(() => !0).catch(() => !1);
290
305
  },
291
306
  addEventListener: (e, t) => {
292
- const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), r = () => {
293
- y.eventListeners[n] && delete y.eventListeners[n];
307
+ const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
308
+ g.eventListeners[n] && delete g.eventListeners[n];
294
309
  };
295
- return y.eventListeners[n] = {
310
+ return g.eventListeners[n] = {
296
311
  type: e,
297
312
  handler: async (c) => {
298
313
  try {
@@ -301,35 +316,39 @@ const b = (e, t, n) => {
301
316
  throw a;
302
317
  }
303
318
  },
304
- remove: r
319
+ remove: s
305
320
  }, {
306
- remove: r
321
+ remove: s
307
322
  };
308
323
  }
309
- }, v = O({
324
+ }, h = C({
325
+ theme: "default",
310
326
  items: [],
311
327
  eventListeners: {}
312
- }), Se = {
328
+ }), U = {
313
329
  setItems: (e) => {
314
- v.items = e;
330
+ h.items = e;
331
+ },
332
+ getItems: () => h.items,
333
+ setTheme: (e) => {
334
+ h.theme = e;
315
335
  },
316
- getItems: () => v.items,
317
336
  removeItem: (e) => {
318
- const t = v.items.filter((n) => n.value !== e);
319
- v.items = t;
337
+ const t = h.items.filter((n) => n.value !== e);
338
+ h.items = t;
320
339
  },
321
340
  appendItem: (e) => {
322
- const t = v.items.findIndex((n) => n.value == e.value);
323
- t !== -1 ? v.items.splice(t, 1, e) : v.items.push(e);
341
+ const t = h.items.findIndex((n) => n.value == e.value);
342
+ t !== -1 ? h.items.splice(t, 1, e) : h.items.push(e);
324
343
  },
325
344
  setActiveItem: (e) => {
326
- v.activeItem = e;
345
+ h.activeItem = e;
327
346
  },
328
347
  triggerEventListener: (e, t, n) => {
329
348
  var i;
330
- const r = v.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
331
- for (const s in r) {
332
- const o = r[s];
349
+ const s = h.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
350
+ for (const r in s) {
351
+ const o = s[r];
333
352
  o.type === e && a.push(
334
353
  (i = o == null ? void 0 : o.handler) == null ? void 0 : i.call(o, t).then(() => {
335
354
  c && o.remove();
@@ -339,10 +358,10 @@ const b = (e, t, n) => {
339
358
  return Promise.all(a).then(() => !0).catch(() => !1);
340
359
  },
341
360
  addEventListener: (e, t) => {
342
- const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), r = () => {
343
- v.eventListeners[n] && delete v.eventListeners[n];
361
+ const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
362
+ h.eventListeners[n] && delete h.eventListeners[n];
344
363
  };
345
- return v.eventListeners[n] = {
364
+ return h.eventListeners[n] = {
346
365
  type: e,
347
366
  handler: async (c) => {
348
367
  try {
@@ -351,19 +370,19 @@ const b = (e, t, n) => {
351
370
  throw a;
352
371
  }
353
372
  },
354
- remove: r
373
+ remove: s
355
374
  }, {
356
- remove: r
375
+ remove: s
357
376
  };
358
377
  }
359
- }, P = O({
378
+ }, P = C({
360
379
  eventListeners: {}
361
- }), Pe = {
380
+ }), Ce = {
362
381
  triggerEventListener: (e, t, n) => {
363
382
  var i;
364
- const r = P.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
365
- for (const s in r) {
366
- const o = r[s];
383
+ const s = P.eventListeners, { autoRemove: c = !1 } = n || {}, a = [];
384
+ for (const r in s) {
385
+ const o = s[r];
367
386
  o.type === e && a.push(
368
387
  (i = o == null ? void 0 : o.handler) == null ? void 0 : i.call(o, t).then(() => {
369
388
  c && o.remove();
@@ -373,7 +392,7 @@ const b = (e, t, n) => {
373
392
  return Promise.all(a).then(() => !0).catch(() => !1);
374
393
  },
375
394
  addEventListener: (e, t) => {
376
- const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), r = () => {
395
+ const n = (/* @__PURE__ */ new Date()).getTime() + Math.random().toString(36).slice(-8), s = () => {
377
396
  P.eventListeners[n] && delete P.eventListeners[n];
378
397
  };
379
398
  return P.eventListeners[n] = {
@@ -385,81 +404,84 @@ const b = (e, t, n) => {
385
404
  throw a;
386
405
  }
387
406
  },
388
- remove: r
407
+ remove: s
389
408
  }, {
390
- remove: r
409
+ remove: s
391
410
  };
392
411
  }
393
- }, W = O({
412
+ }, B = C({
394
413
  visible: !1,
395
414
  style: {}
396
415
  }), Oe = {
397
416
  set: (e, t) => {
398
- W.visible = e, t || (t = {}), t.transition || (t.transition = "all 0.3s"), t && (W.style = t);
417
+ B.visible = e, t || (t = {}), t.transition || (t.transition = "all 0.3s"), t && (B.style = t);
399
418
  }
400
- }, Ce = {
401
- nav: u,
402
- menu: y,
403
- tab: v,
404
- overlay: W,
419
+ }, Te = {
420
+ nav: l,
421
+ menu: g,
422
+ tab: h,
423
+ overlay: B,
405
424
  iframeView: P,
406
425
  visible: w(!0)
407
- }, j = {
408
- nav: Ie,
409
- menu: Ee,
410
- tab: Se,
426
+ }, G = {
427
+ nav: j,
428
+ menu: H,
429
+ tab: U,
411
430
  overlay: Oe,
412
- iframeView: Pe,
413
- setVisible: (e) => Ce.visible.value = e
414
- }, te = (e, t) => {
431
+ iframeView: Ce,
432
+ setVisible: (e) => Te.visible.value = e,
433
+ setTheme: (e) => {
434
+ j.setTheme(e), H.setTheme(e), U.setTheme(e);
435
+ }
436
+ }, re = (e, t) => {
415
437
  const n = e.__vccOpts || e;
416
- for (const [r, c] of t)
417
- n[r] = c;
438
+ for (const [s, c] of t)
439
+ n[s] = c;
418
440
  return n;
419
441
  };
420
- var H;
421
- const B = typeof window < "u", Fe = (e) => typeof e == "string", Re = () => {
442
+ var J;
443
+ const $ = typeof window < "u", Fe = (e) => typeof e == "string", Re = () => {
422
444
  };
423
- B && ((H = window == null ? void 0 : window.navigator) != null && H.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
424
- function ne(e) {
445
+ $ && ((J = window == null ? void 0 : window.navigator) != null && J.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
446
+ function ae(e) {
425
447
  return typeof e == "function" ? e() : I(e);
426
448
  }
427
- function Te(e) {
449
+ function De(e) {
428
450
  return e;
429
451
  }
430
- function re(e) {
431
- return oe() ? (ce(e), !0) : !1;
452
+ function ie(e) {
453
+ return ue() ? (de(e), !0) : !1;
432
454
  }
433
- function De(e, t = !0) {
434
- le() ? ue(e) : t ? e() : Z(e);
455
+ function Ne(e, t = !0) {
456
+ pe() ? me(e) : t ? e() : ne(e);
435
457
  }
436
- function se(e) {
458
+ function oe(e) {
437
459
  var t;
438
- const n = ne(e);
460
+ const n = ae(e);
439
461
  return (t = n == null ? void 0 : n.$el) != null ? t : n;
440
462
  }
441
- const Ne = B ? window : void 0, ke = B ? window.document : void 0;
442
- function xe(...e) {
443
- let t, n, r, c;
444
- if (Fe(e[0]) || Array.isArray(e[0]) ? ([n, r, c] = e, t = Ne) : [t, n, r, c] = e, !t)
463
+ const ke = $ ? window : void 0, xe = $ ? window.document : void 0;
464
+ function Ve(...e) {
465
+ let t, n, s, c;
466
+ if (Fe(e[0]) || Array.isArray(e[0]) ? ([n, s, c] = e, t = ke) : [t, n, s, c] = e, !t)
445
467
  return Re;
446
- Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
468
+ Array.isArray(n) || (n = [n]), Array.isArray(s) || (s = [s]);
447
469
  const a = [], i = () => {
448
- a.forEach((l) => l()), a.length = 0;
449
- }, s = (l, g, m, _) => (l.addEventListener(g, m, _), () => l.removeEventListener(g, m, _)), o = M(() => [se(t), ne(c)], ([l, g]) => {
450
- i(), l && a.push(...n.flatMap((m) => r.map((_) => s(l, m, _, g))));
470
+ a.forEach((u) => u()), a.length = 0;
471
+ }, r = (u, y, m, L) => (u.addEventListener(y, m, L), () => u.removeEventListener(y, m, L)), o = M(() => [oe(t), ae(c)], ([u, y]) => {
472
+ i(), u && a.push(...n.flatMap((m) => s.map((L) => r(u, m, L, y))));
451
473
  }, { immediate: !0, flush: "post" }), p = () => {
452
474
  o(), i();
453
475
  };
454
- return re(p), p;
476
+ return ie(p), p;
455
477
  }
456
- function Ve(e, t = !1) {
457
- const n = w(), r = () => n.value = !!e();
458
- return r(), De(r, t), n;
478
+ function qe(e, t = !1) {
479
+ const n = w(), s = () => n.value = !!e();
480
+ return s(), Ne(s, t), n;
459
481
  }
460
- const U = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, G = "__vueuse_ssr_handlers__";
461
- U[G] = U[G] || {};
462
- const J = [
482
+ const K = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, X = "__vueuse_ssr_handlers__";
483
+ K[X] = K[X] || {};
484
+ const Y = [
463
485
  [
464
486
  "requestFullscreen",
465
487
  "exitFullscreen",
@@ -501,54 +523,54 @@ const J = [
501
523
  "MSFullscreenError"
502
524
  ]
503
525
  ];
504
- function qe(e, t = {}) {
505
- const { document: n = ke, autoExit: r = !1 } = t, c = n == null ? void 0 : n.querySelector("html"), a = w(!1);
506
- let i = J[0];
507
- const s = Ve(() => {
526
+ function Qe(e, t = {}) {
527
+ const { document: n = xe, autoExit: s = !1 } = t, c = n == null ? void 0 : n.querySelector("html"), a = w(!1);
528
+ let i = Y[0];
529
+ const r = qe(() => {
508
530
  if (n) {
509
- for (const S of J)
531
+ for (const S of Y)
510
532
  if (S[1] in n)
511
533
  return i = S, !0;
512
534
  } else
513
535
  return !1;
514
536
  return !1;
515
- }), [o, p, l, , g] = i;
537
+ }), [o, p, u, , y] = i;
516
538
  async function m() {
517
- s.value && (n != null && n[l] && await n[p](), a.value = !1);
539
+ r.value && (n != null && n[u] && await n[p](), a.value = !1);
518
540
  }
519
- async function _() {
520
- if (!s.value)
541
+ async function L() {
542
+ if (!r.value)
521
543
  return;
522
544
  await m();
523
- const S = se(c);
545
+ const S = oe(c);
524
546
  S && (await S[o](), a.value = !0);
525
547
  }
526
- async function ie() {
527
- a.value ? await m() : await _();
548
+ async function le() {
549
+ a.value ? await m() : await L();
528
550
  }
529
- return n && xe(n, g, () => {
530
- a.value = !!(n != null && n[l]);
531
- }, !1), r && re(m), {
532
- isSupported: s,
551
+ return n && Ve(n, y, () => {
552
+ a.value = !!(n != null && n[u]);
553
+ }, !1), s && ie(m), {
554
+ isSupported: r,
533
555
  isFullscreen: a,
534
- enter: _,
556
+ enter: L,
535
557
  exit: m,
536
- toggle: ie
558
+ toggle: le
537
559
  };
538
560
  }
539
- var K;
561
+ var Z;
540
562
  (function(e) {
541
563
  e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
542
- })(K || (K = {}));
543
- var Qe = Object.defineProperty, X = Object.getOwnPropertySymbols, We = Object.prototype.hasOwnProperty, Be = Object.prototype.propertyIsEnumerable, Y = (e, t, n) => t in e ? Qe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, $e = (e, t) => {
564
+ })(Z || (Z = {}));
565
+ var Be = Object.defineProperty, ee = Object.getOwnPropertySymbols, $e = Object.prototype.hasOwnProperty, ze = Object.prototype.propertyIsEnumerable, te = (e, t, n) => t in e ? Be(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, We = (e, t) => {
544
566
  for (var n in t || (t = {}))
545
- We.call(t, n) && Y(e, n, t[n]);
546
- if (X)
547
- for (var n of X(t))
548
- Be.call(t, n) && Y(e, n, t[n]);
567
+ $e.call(t, n) && te(e, n, t[n]);
568
+ if (ee)
569
+ for (var n of ee(t))
570
+ ze.call(t, n) && te(e, n, t[n]);
549
571
  return e;
550
572
  };
551
- const ze = {
573
+ const je = {
552
574
  easeInSine: [0.12, 0, 0.39, 0],
553
575
  easeOutSine: [0.61, 1, 0.88, 1],
554
576
  easeInOutSine: [0.37, 0, 0.63, 1],
@@ -574,10 +596,10 @@ const ze = {
574
596
  easeOutBack: [0.34, 1.56, 0.64, 1],
575
597
  easeInOutBack: [0.68, -0.6, 0.32, 1.6]
576
598
  };
577
- $e({
578
- linear: Te
579
- }, ze);
580
- const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
599
+ We({
600
+ linear: De
601
+ }, je);
602
+ const He = ["src", "entry", "name"], Ue = /* @__PURE__ */ x({
581
603
  __name: "das-micro-app",
582
604
  props: {
583
605
  src: {},
@@ -586,27 +608,27 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
586
608
  },
587
609
  emits: ["onLoaded", "onActivated", "onDeactivated"],
588
610
  setup(e, { emit: t }) {
589
- const n = e, r = t, c = (s) => {
590
- r("onLoaded", s);
611
+ const n = e, s = t, c = (r) => {
612
+ s("onLoaded", r);
591
613
  }, a = D(() => n.actived);
592
- return M(() => a.value, (s) => {
593
- s && r("onActivated"), s || r("onDeactivated");
594
- }), (s, o) => (E(), N("iframe", {
614
+ return M(() => a.value, (r) => {
615
+ r && s("onActivated"), r || s("onDeactivated");
616
+ }), (r, o) => (E(), N("iframe", {
595
617
  class: "das-micro-app",
596
618
  src: n.src,
597
619
  entry: n.src,
598
620
  name: n.name,
599
621
  frameborder: "0",
600
622
  onLoad: c
601
- }, null, 40, je));
623
+ }, null, 40, He));
602
624
  }
603
- }), Ue = /* @__PURE__ */ te(He, [["__scopeId", "data-v-8ae871f6"]]), Ge = /* @__PURE__ */ x({
625
+ }), Ge = /* @__PURE__ */ re(Ue, [["__scopeId", "data-v-8ae871f6"]]), Je = /* @__PURE__ */ x({
604
626
  __name: "das-micro-apps",
605
627
  setup(e) {
606
628
  const t = w(null), n = async (a, i) => {
607
- const s = f.value.find((m) => m.name === i);
608
- if (!s) return;
609
- s.dom = a.target, await Z(), await new Promise((m) => setTimeout(m, 50));
629
+ const r = f.value.find((m) => m.name === i);
630
+ if (!r) return;
631
+ r.dom = a.target, await ne(), await new Promise((m) => setTimeout(m, 50));
610
632
  const o = () => {
611
633
  const m = t.value.getBoundingClientRect() || {};
612
634
  return m.width = t.value.clientWidth, m.height = t.value.clientHeight, m;
@@ -614,63 +636,45 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
614
636
  d.sendMessageToMicroApp(i, "onLoaded", {
615
637
  href: location.href,
616
638
  microAppContainerRect: o(),
617
- entry: s.entry,
618
- name: s.name
639
+ entry: r.entry,
640
+ name: r.name
619
641
  });
620
- const { dom: p, ...l } = s;
621
- d.triggerMicroAppLifeCycleListener("onLoaded", l), new ResizeObserver(() => {
642
+ const { dom: p, ...u } = r;
643
+ d.triggerMicroAppLifeCycleListener("onLoaded", u), new ResizeObserver(() => {
622
644
  d.sendMessageToMicroApp(i, "resize", o());
623
645
  }).observe(t.value), d.sendMessageToMicroApp(i, "setProxyMessageStatus", { visible: !0, parentHref: location.href }), d.sendMessageToMicroApp(i, "setProxSsoStatus", { visible: !0, parentHref: location.href });
624
- }, r = (a, i) => {
625
- const s = f.value.find((l) => l.name === i);
626
- if (!s) return;
627
- const { dom: o, ...p } = s;
646
+ }, s = (a, i) => {
647
+ const r = f.value.find((u) => u.name === i);
648
+ if (!r) return;
649
+ const { dom: o, ...p } = r;
628
650
  d.sendMessageToMicroApp(i, "onActivated"), d.triggerMicroAppLifeCycleListener("onActivated", p);
629
651
  }, c = (a, i) => {
630
- const s = f.value.find((l) => l.name === i);
631
- if (!s) return;
632
- const { dom: o, ...p } = s;
652
+ const r = f.value.find((u) => u.name === i);
653
+ if (!r) return;
654
+ const { dom: o, ...p } = r;
633
655
  d.sendMessageToMicroApp(i, "onDeactivated"), d.triggerMicroAppLifeCycleListener("onDeactivated", p);
634
656
  };
635
- return (a, i) => (E(), N(
636
- "div",
637
- {
638
- ref_key: "containerRef",
639
- ref: t,
640
- class: "das-micro-app-container"
641
- },
642
- [
643
- (E(!0), N(
644
- $,
645
- null,
646
- de(I(f), (s) => (E(), N(
647
- $,
648
- null,
649
- [
650
- s.loaded ? pe((E(), ee(Ue, {
651
- key: 0,
652
- src: s.src || "",
653
- name: s.name,
654
- actived: s.actived,
655
- onOnLoaded: (o) => n(o, s.name),
656
- onOnActivated: (o) => r(o, s.name),
657
- onOnDeactivated: (o) => c(o, s.name)
658
- }, null, 8, ["src", "name", "actived", "onOnLoaded", "onOnActivated", "onOnDeactivated"])), [
659
- [me, s.actived]
660
- ]) : fe("v-if", !0)
661
- ],
662
- 64
663
- /* STABLE_FRAGMENT */
664
- ))),
665
- 256
666
- /* UNKEYED_FRAGMENT */
667
- ))
668
- ],
669
- 512
670
- /* NEED_PATCH */
671
- ));
657
+ return (a, i) => (E(), N("div", {
658
+ ref_key: "containerRef",
659
+ ref: t,
660
+ class: "das-micro-app-container"
661
+ }, [
662
+ (E(!0), N(z, null, fe(I(f), (r) => (E(), N(z, null, [
663
+ r.loaded ? ve((E(), se(Ge, {
664
+ key: 0,
665
+ src: r.src || "",
666
+ name: r.name,
667
+ actived: r.actived,
668
+ onOnLoaded: (o) => n(o, r.name),
669
+ onOnActivated: (o) => s(o, r.name),
670
+ onOnDeactivated: (o) => c(o, r.name)
671
+ }, null, 8, ["src", "name", "actived", "onOnLoaded", "onOnActivated", "onOnDeactivated"])), [
672
+ [he, r.actived]
673
+ ]) : Ae("", !0)
674
+ ], 64))), 256))
675
+ ], 512));
672
676
  }
673
- }), Je = /* @__PURE__ */ te(Ge, [["__scopeId", "data-v-3abdb1e9"]]), Ze = /* @__PURE__ */ x({
677
+ }), Ke = /* @__PURE__ */ re(Je, [["__scopeId", "data-v-3abdb1e9"]]), et = /* @__PURE__ */ x({
674
678
  __name: "das-main-app-layout",
675
679
  props: {
676
680
  transitionConfig: { default: () => {
@@ -684,93 +688,92 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
684
688
  } }
685
689
  },
686
690
  setup(e) {
687
- const t = e, n = D(() => !k.value), r = D(() => ({
691
+ const t = e, n = D(() => !k.value), s = D(() => ({
688
692
  "enter-active-class": "animate__animated animate__fadeInLeft",
689
693
  ...t.transitionConfig
690
694
  })), c = D(() => ({ showLayout: t.showLayout, showAside: t.showAside, showTabs: t.showTabs }));
691
- return (a, i) => (E(), ee(I(he), ve({
692
- "transition-config": r.value,
695
+ return (a, i) => (E(), se(I(ye), we({
696
+ "transition-config": s.value,
693
697
  "router-view-visible": n.value
694
698
  }, c.value), {
695
- header: C(() => [
699
+ header: O(() => [
696
700
  V(a.$slots, "header", {}, () => [
697
- F(I(we))
701
+ T(I(Me))
698
702
  ])
699
703
  ]),
700
- aside: C(() => [
704
+ aside: O(() => [
701
705
  V(a.$slots, "aside", {}, () => [
702
- F(I(ge), { menuAttr: a.menuAttr }, null, 8, ["menuAttr"])
706
+ T(I(Le), { menuAttr: a.menuAttr }, null, 8, ["menuAttr"])
703
707
  ])
704
708
  ]),
705
- tab: C(() => [
709
+ tab: O(() => [
706
710
  V(a.$slots, "tab", {}, () => [
707
- F(I(ye), { tabsAttr: a.tabsAttr }, null, 8, ["tabsAttr"])
711
+ T(I(_e), { tabsAttr: a.tabsAttr }, null, 8, ["tabsAttr"])
708
712
  ])
709
713
  ]),
710
- default: C(() => [
711
- F(Je)
714
+ default: O(() => [
715
+ T(Ke)
712
716
  ]),
713
717
  _: 3
714
- /* FORWARDED */
715
718
  }, 16, ["transition-config", "router-view-visible"]));
716
719
  }
717
- }), ae = /* @__PURE__ */ x({
720
+ }), ce = /* @__PURE__ */ x({
718
721
  __name: "das-micro-app-ghost",
719
722
  setup(e) {
720
- return Ae(() => {
723
+ return ge(() => {
721
724
  setTimeout(() => {
722
725
  document.documentElement.checkVisibility() && history.back();
723
726
  }, 300);
724
727
  }), (t, n) => null;
725
728
  }
726
- }), Ke = (e) => ["http://", "https://", "ws://", "wss://", "/"].find((n) => e.startsWith(n)) ? e : `/${e}`, et = (e, t) => {
729
+ }), Xe = (e) => ["http://", "https://", "ws://", "wss://", "/"].find((n) => e.startsWith(n)) ? e : `/${e}`, tt = (e, t) => {
727
730
  if (!(e != null && e.microApps) || !Array.isArray(e.microApps)) return;
728
- window.__IN_DAS_MAIN_APP = !0, e != null && e.microAppRouterPrefix && (z.value = e.microAppRouterPrefix), f.value = (e.microApps || []).filter((c) => !!c.name).map((c) => ({ ...c, entry: Ke(c.entry || c.name) })), t == null || t.addRoute({
731
+ window.__IN_DAS_MAIN_APP = !0, e != null && e.microAppRouterPrefix && (W.value = e.microAppRouterPrefix), f.value = (e.microApps || []).filter((c) => !!c.name).map((c) => ({ ...c, entry: Xe(c.entry || c.name) })), t == null || t.addRoute({
729
732
  name: "das-micro-app",
730
- path: `${z.value}/:pathMatch(.*)*`,
731
- component: ae,
733
+ path: `${W.value}/:pathMatch(.*)*`,
734
+ component: ce,
732
735
  meta: { isMicroApp: !0, keepAlive: !0 }
733
736
  }), d.addEventListenerFromMicroApp("bodyOverlay", (c) => {
734
737
  const { visible: a, style: i } = c.data;
735
- j.overlay.set(a, i);
738
+ G.overlay.set(a, i);
736
739
  }), d.addEventListenerFromMicroApp("layoutVisible", (c) => {
737
740
  const { visible: a } = c.data;
738
- j.setVisible(a);
741
+ G.setVisible(a);
739
742
  }), d.addEventListenerFromMicroApp("route", (c) => {
740
- const { name: a, cmd: i, path: s } = c.data;
741
- i === "reload" && d.reloadMicroAppRoute(a, s), i === "unload" && d.unloadMicroAppRoute(a, s);
743
+ const { name: a, cmd: i, path: r } = c.data;
744
+ i === "reload" && d.reloadMicroAppRoute(a, r), i === "unload" && d.unloadMicroAppRoute(a, r);
742
745
  });
743
- const { enter: n, exit: r } = qe();
746
+ const { enter: n, exit: s } = Qe();
744
747
  d.addEventListenerFromMicroApp("fullscreen", (c) => {
745
748
  const a = c.data;
746
- a && n(), a || r();
749
+ a && n(), a || s();
747
750
  }), d.addEventListenerFromMicroApp("location", (c) => {
748
751
  const { cmd: a, isAutoCloseApp: i } = c.data || {};
749
752
  a === "reload" && (i !== void 0 && (window.__isAutoCloseApp = i), location.reload());
750
753
  });
751
- }, tt = (e, t) => {
754
+ }, nt = (e, t) => {
752
755
  if (!(e != null && e.microAppName)) return;
753
756
  window.config.microAppName = e.microAppName, window.self !== window.top && e.microAppName && (window.__IN_DAS_MICRO_APP = !0);
754
757
  const n = "das-micro-app-ghost";
755
758
  t == null || t.addRoute({
756
759
  name: n,
757
760
  path: `/${n}/:pathMatch(.*)*`,
758
- component: ae,
761
+ component: ce,
759
762
  meta: { isMicroApp: !0, keepAlive: !0 }
760
763
  });
761
- const r = w(!1), c = w(!1), a = w("");
764
+ const s = w(!1), c = w(!1), a = w("");
762
765
  M(
763
766
  () => t.currentRoute.value,
764
767
  (i) => {
765
- if (r.value) {
766
- r.value = !1;
768
+ if (s.value) {
769
+ s.value = !1;
767
770
  return;
768
771
  }
769
772
  if (c.value) {
770
773
  c.value = !1;
771
774
  return;
772
775
  }
773
- const { path: s, query: o, params: p, meta: l } = i;
776
+ const { path: r, query: o, params: p, meta: u } = i;
774
777
  if (a.value.includes(i.path)) {
775
778
  a.value = "";
776
779
  return;
@@ -778,45 +781,45 @@ const je = ["src", "entry", "name"], He = /* @__PURE__ */ x({
778
781
  d.sendMessageToMainApp("router", {
779
782
  cmd: "push",
780
783
  route: {
781
- path: s,
784
+ path: r,
782
785
  query: { ...o, microAppName: e.microAppName },
783
786
  params: p,
784
- meta: l
787
+ meta: u
785
788
  }
786
789
  });
787
790
  }
788
791
  ), d.addEventListenerFromMainApp("router", async (i) => {
789
- var l;
790
- const { cmd: s, route: o, microAppName: p = "" } = i.data;
791
- a.value = ("/" + p + o.path).replace(/\/\//g, "/"), (l = t == null ? void 0 : t[s]) == null || l.call(t, o);
792
+ var u;
793
+ const { cmd: r, route: o, microAppName: p = "" } = i.data;
794
+ a.value = ("/" + p + o.path).replace(/\/\//g, "/"), (u = t == null ? void 0 : t[r]) == null || u.call(t, o);
792
795
  }), d.addEventListenerFromMainApp("onLoaded", (i) => {
793
- const { href: s, microAppContainerRect: o } = i.data;
794
- window.__IN_DAS_MICRO_APP = !0, window.__DAS_MICRO_APP_NAME = e.microAppName, window.__DAS_MAIN_APP_HREF = s, window.__DAS_MICRO_APP_CONTAINER_RECT = o;
796
+ const { href: r, microAppContainerRect: o } = i.data;
797
+ window.__IN_DAS_MICRO_APP = !0, window.__DAS_MICRO_APP_NAME = e.microAppName, window.__DAS_MAIN_APP_HREF = r, window.__DAS_MICRO_APP_CONTAINER_RECT = o;
795
798
  }), d.addEventListenerFromMainApp("onDeactivated", (i) => {
796
- const { name: s = "", path: o, params: p = {}, query: l = {} } = t.currentRoute.value;
799
+ const { name: r = "", path: o, params: p = {}, query: u = {} } = t.currentRoute.value;
797
800
  c.value = !0, t == null || t.push({
798
801
  name: n,
799
- query: { microAppName: e.microAppName, fromQuery: JSON.stringify(l), fromPath: o },
802
+ query: { microAppName: e.microAppName, fromQuery: JSON.stringify(u), fromPath: o },
800
803
  params: p
801
804
  });
802
805
  }), d.addEventListenerFromMainApp("onActivated", (i) => {
803
- const { name: s = "", params: o = {}, query: p = {} } = t.currentRoute.value, { fromPath: l = "", fromQuery: g = "{}" } = p || {};
804
- r.value = !0, t == null || t.push({ path: l, query: JSON.parse(g), params: o });
806
+ const { name: r = "", params: o = {}, query: p = {} } = t.currentRoute.value, { fromPath: u = "", fromQuery: y = "{}" } = p || {};
807
+ s.value = !0, t == null || t.push({ path: u, query: JSON.parse(y), params: o });
805
808
  }), d.addEventListenerFromMainApp("sessionStorage", (i) => {
806
- const { cmd: s, key: o, value: p } = i.data;
807
- s === "setItem" && window.sessionStorage.setItem(o, p), s === "getItem" && window.sessionStorage.getItem(o), s === "removeItem" && window.sessionStorage.removeItem(o), s === "clear" && window.sessionStorage.clear();
809
+ const { cmd: r, key: o, value: p } = i.data;
810
+ r === "setItem" && window.sessionStorage.setItem(o, p), r === "getItem" && window.sessionStorage.getItem(o), r === "removeItem" && window.sessionStorage.removeItem(o), r === "clear" && window.sessionStorage.clear();
808
811
  }), d.addEventListenerFromMainApp("route", (i) => {
809
- const { cmd: s, path: o } = i.data;
810
- s === "reload" && (R.value.push(o), T.value = !1, setTimeout(() => {
811
- T.value = !0, R.value = [];
812
- }, 300)), s === "unload" && (R.value.push(o), T.value = !1, setTimeout(() => {
813
- T.value = !0, R.value = [];
812
+ const { cmd: r, path: o } = i.data;
813
+ r === "reload" && (F.value.push(o), R.value = !1, setTimeout(() => {
814
+ R.value = !0, F.value = [];
815
+ }, 300)), r === "unload" && (F.value.push(o), R.value = !1, setTimeout(() => {
816
+ R.value = !0, F.value = [];
814
817
  }, 100));
815
818
  });
816
819
  };
817
820
  export {
818
- Ze as DasMainAppLayout,
819
- et as initMainApp,
820
- tt as initMicroApp,
821
+ et as DasMainAppLayout,
822
+ tt as initMainApp,
823
+ nt as initMicroApp,
821
824
  d as microFrontend
822
825
  };