@das-fed/web 6.3.0-beta.8 → 6.4.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm-map.json +10 -9
- package/index-CTiS2AQx.js +68 -0
- package/index-CTiS2AQx.js.gz +0 -0
- package/index-DZPzbqdK.js +10 -0
- package/index-DjsZCo03.js +70 -0
- package/index-DjsZCo03.js.gz +0 -0
- package/index-LVjuqzoG.js +11086 -0
- package/index-LVjuqzoG.js.gz +0 -0
- package/index.js +27 -2202
- package/package.json +11 -7
- package/packages/create-das-web-app/index.js +307 -289
- package/packages/create-das-web-app/index.js.gz +0 -0
- package/packages/i18n/index.js +29 -30
- package/packages/i18n/index.js.gz +0 -0
- package/packages/layout/index.js +302 -290
- package/packages/layout/index.js.gz +0 -0
- package/packages/layout/style.css +1 -1
- package/packages/layout/style.css.gz +0 -0
- package/packages/main-app-framework/index-2WWk8ggi.js +9022 -0
- package/packages/main-app-framework/index-2WWk8ggi.js.gz +0 -0
- package/packages/main-app-framework/index-BqkWKMMe.js +70 -0
- package/packages/main-app-framework/index-BqkWKMMe.js.gz +0 -0
- package/packages/main-app-framework/index-CRT8yHn-.js +10 -0
- package/packages/main-app-framework/index-Twj2RXRy.js +68 -0
- package/packages/main-app-framework/index-Twj2RXRy.js.gz +0 -0
- package/packages/main-app-framework/index.js +5 -0
- package/packages/main-app-framework/style.css +1 -0
- package/packages/main-app-framework/style.css.gz +0 -0
- package/packages/micro-frontend/index.js +174 -170
- package/packages/micro-frontend/index.js.gz +0 -0
- package/packages/style/index.js +5 -2
- package/packages/theme/index.js +38 -39
- package/packages/theme/index.js.gz +0 -0
- package/style.css +1 -1
- package/style.css.gz +0 -0
- package/types/create-das-web-app/index.d.ts +1 -1
- package/types/create-das-web-app/router/index.d.ts +2 -1
- package/types/i18n/index.d.ts +2 -2
- package/types/index.d.ts +1 -0
- package/types/layout/store/index.d.ts +1 -1
- package/types/main-app-framework/business/alarm/api.d.ts +34 -0
- package/types/main-app-framework/business/alarm/components/hooks/use-handle-alarm.d.ts +7 -0
- package/types/main-app-framework/business/alarm/use-alarm.d.ts +12 -0
- package/types/main-app-framework/business/index.d.ts +4 -0
- package/types/main-app-framework/business/message-notify/index.d.ts +1 -0
- package/types/main-app-framework/business/remote-control/apis.d.ts +6 -0
- package/types/main-app-framework/business/remote-control/createServiceConnection.d.ts +3 -0
- package/types/main-app-framework/business/remote-control/index.d.ts +1 -0
- package/types/main-app-framework/business/video-link/api.d.ts +28 -0
- package/types/main-app-framework/business/video-link/index.d.ts +6 -0
- package/types/main-app-framework/business/video-link/open.d.ts +4 -0
- package/types/main-app-framework/business/video-link/video-dialog/hooks/PlayerProvider.d.ts +4 -0
- package/types/main-app-framework/business/video-link/video-dialog/hooks/index.d.ts +6 -0
- package/types/main-app-framework/components/entry-page-tip/index.d.ts +3 -0
- package/types/main-app-framework/components/entry-page-tip/src/index.d.ts +1 -0
- package/types/main-app-framework/components/entry-page-tip/src/open.d.ts +5 -0
- package/types/main-app-framework/components/entry-page-tip/theme/index.d.ts +6 -0
- package/types/main-app-framework/components/index.d.ts +3 -0
- package/types/main-app-framework/components/person-set-dialog/index.d.ts +4 -0
- package/types/main-app-framework/components/person-set-dialog/src/api.d.ts +2 -0
- package/types/main-app-framework/components/watermark/index.d.ts +3 -0
- package/types/main-app-framework/components/watermark/src/api.d.ts +1 -0
- package/types/main-app-framework/constant/index.d.ts +6 -0
- package/types/main-app-framework/index.d.ts +28 -0
- package/types/main-app-framework/init-config/get-manu-config/api.d.ts +4 -0
- package/types/main-app-framework/init-config/get-manu-config/getInstanceInfo.d.ts +1 -0
- package/types/main-app-framework/init-config/get-manu-config/index.d.ts +47 -0
- package/types/main-app-framework/init-config/get-nav-config/api.d.ts +2 -0
- package/types/main-app-framework/init-config/get-nav-config/index.d.ts +4 -0
- package/types/main-app-framework/init-config/get-project-config/api.d.ts +4 -0
- package/types/main-app-framework/init-config/get-project-config/index.d.ts +1 -0
- package/types/main-app-framework/init-config/get-system-config/api.d.ts +8 -0
- package/types/main-app-framework/init-config/get-system-config/index.d.ts +11 -0
- package/types/main-app-framework/init-config/get-tenant-config/api.d.ts +6 -0
- package/types/main-app-framework/init-config/get-tenant-config/index.d.ts +6 -0
- package/types/main-app-framework/init-config/index.d.ts +5 -0
- package/types/main-app-framework/init-layout/apis/index.d.ts +2 -0
- package/types/main-app-framework/init-layout/hooks/nav-slots/index.d.ts +4 -0
- package/types/main-app-framework/init-layout/hooks/nav-slots/use-change-enterprises.d.ts +8 -0
- package/types/main-app-framework/init-layout/hooks/nav-slots/use-project.d.ts +1 -0
- package/types/main-app-framework/init-layout/hooks/nav-slots/use-search.d.ts +4 -0
- package/types/main-app-framework/init-layout/hooks/nav-slots/use-user-command.d.ts +4 -0
- package/types/main-app-framework/init-layout/hooks/use-entry-app.d.ts +11 -0
- package/types/main-app-framework/init-layout/hooks/use-entry-menu.d.ts +7 -0
- package/types/main-app-framework/init-layout/hooks/use-initialization.d.ts +8 -0
- package/types/main-app-framework/init-layout/hooks/use-menu.d.ts +1 -0
- package/types/main-app-framework/init-layout/hooks/use-nav.d.ts +1 -0
- package/types/main-app-framework/init-layout/hooks/use-route-reload-unload.d.ts +4 -0
- package/types/main-app-framework/init-layout/hooks/use-route-watcher.d.ts +3 -0
- package/types/main-app-framework/init-layout/hooks/use-system-confirm.d.ts +1 -0
- package/types/main-app-framework/init-layout/hooks/use-tabs.d.ts +5 -0
- package/types/main-app-framework/init-layout/index.d.ts +11 -0
- package/types/main-app-framework/init-layout/store/index.d.ts +4 -0
- package/types/main-app-framework/init-platform/api.d.ts +2 -0
- package/types/main-app-framework/init-platform/index.d.ts +4 -0
- package/types/main-app-framework/micro-apps/index.d.ts +3 -0
- package/types/main-app-framework/micro-apps/use-device-panel-watcher.d.ts +1 -0
- package/types/main-app-framework/micro-apps/use-iot-watcher.d.ts +1 -0
- package/types/main-app-framework/micro-apps/use-user-info-watcher.d.ts +3 -0
- package/types/main-app-framework/pages/app/api.d.ts +2 -0
- package/types/main-app-framework/utils/index.d.ts +3 -0
- package/types/main-app-framework/utils/src/layout-confirm.d.ts +12 -0
- package/types/main-app-framework/utils/src/set-common-info.d.ts +62 -0
- package/types/main-app-framework/utils/src/tools.d.ts +1 -0
- package/types/micro-frontend/store.d.ts +5 -5
- package/types/theme/index.d.ts +1 -1
- package/index.js.gz +0 -0
- package/types/create-das-web-app/get-global-config.d.ts +0 -2
|
@@ -1,82 +1,81 @@
|
|
|
1
|
-
import { effectScope as
|
|
2
|
-
import { initTheme as
|
|
3
|
-
import { initI18n as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
const ae = {
|
|
1
|
+
import { effectScope as re, ref as H, markRaw as B, toRaw as A, watch as oe, unref as se, createApp as ie } from "vue";
|
|
2
|
+
import { initTheme as ae } from "@das-fed/web/packages/theme/index";
|
|
3
|
+
import { initI18n as ce } from "@das-fed/web/packages/i18n/index";
|
|
4
|
+
import { DasWebLayout as le } from "@das-fed/web/packages/layout/index";
|
|
5
|
+
import { createRouter as ue, createWebHistory as fe } from "vue-router";
|
|
6
|
+
const de = {
|
|
8
7
|
install: (e, t) => {
|
|
9
8
|
var n;
|
|
10
9
|
const r = (n = t == null ? void 0 : t.plugins) == null ? void 0 : n.glob;
|
|
11
|
-
r && Object.values(r).sort((o,
|
|
10
|
+
r && Object.values(r).sort((o, s) => (o.index ?? 0) - (s.index ?? 0)).filter((o) => o ? !!(o.default && o.default.install || o.install) : !1).forEach((o) => {
|
|
12
11
|
o.default && o.default.install && e.use(o.default, t), o.install && e.use(o, t);
|
|
13
12
|
});
|
|
14
13
|
}
|
|
15
14
|
};
|
|
16
|
-
var
|
|
17
|
-
function
|
|
18
|
-
return
|
|
15
|
+
var ge = !1;
|
|
16
|
+
function he() {
|
|
17
|
+
return J().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
19
18
|
}
|
|
20
|
-
function
|
|
19
|
+
function J() {
|
|
21
20
|
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
22
21
|
}
|
|
23
|
-
const
|
|
24
|
-
let
|
|
25
|
-
function
|
|
22
|
+
const pe = typeof Proxy == "function", me = "devtools-plugin:setup", _e = "plugin:settings:set";
|
|
23
|
+
let v, R;
|
|
24
|
+
function ye() {
|
|
26
25
|
var e;
|
|
27
|
-
return
|
|
26
|
+
return v !== void 0 || (typeof window < "u" && window.performance ? (v = !0, R = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (v = !0, R = globalThis.perf_hooks.performance) : v = !1), v;
|
|
28
27
|
}
|
|
29
|
-
function
|
|
30
|
-
return
|
|
28
|
+
function be() {
|
|
29
|
+
return ye() ? R.now() : Date.now();
|
|
31
30
|
}
|
|
32
|
-
class
|
|
31
|
+
class Se {
|
|
33
32
|
constructor(t, r) {
|
|
34
33
|
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = r;
|
|
35
34
|
const n = {};
|
|
36
35
|
if (t.settings)
|
|
37
|
-
for (const
|
|
38
|
-
const
|
|
39
|
-
n[
|
|
36
|
+
for (const i in t.settings) {
|
|
37
|
+
const a = t.settings[i];
|
|
38
|
+
n[i] = a.defaultValue;
|
|
40
39
|
}
|
|
41
40
|
const o = `__vue-devtools-plugin-settings__${t.id}`;
|
|
42
|
-
let
|
|
41
|
+
let s = Object.assign({}, n);
|
|
43
42
|
try {
|
|
44
|
-
const
|
|
45
|
-
Object.assign(
|
|
43
|
+
const i = localStorage.getItem(o), a = JSON.parse(i);
|
|
44
|
+
Object.assign(s, a);
|
|
46
45
|
} catch {
|
|
47
46
|
}
|
|
48
47
|
this.fallbacks = {
|
|
49
48
|
getSettings() {
|
|
50
|
-
return
|
|
49
|
+
return s;
|
|
51
50
|
},
|
|
52
|
-
setSettings(
|
|
51
|
+
setSettings(i) {
|
|
53
52
|
try {
|
|
54
|
-
localStorage.setItem(o, JSON.stringify(
|
|
53
|
+
localStorage.setItem(o, JSON.stringify(i));
|
|
55
54
|
} catch {
|
|
56
55
|
}
|
|
57
|
-
|
|
56
|
+
s = i;
|
|
58
57
|
},
|
|
59
58
|
now() {
|
|
60
|
-
return
|
|
59
|
+
return be();
|
|
61
60
|
}
|
|
62
|
-
}, r && r.on(
|
|
63
|
-
|
|
61
|
+
}, r && r.on(_e, (i, a) => {
|
|
62
|
+
i === this.plugin.id && this.fallbacks.setSettings(a);
|
|
64
63
|
}), this.proxiedOn = new Proxy({}, {
|
|
65
|
-
get: (
|
|
64
|
+
get: (i, a) => this.target ? this.target.on[a] : (...c) => {
|
|
66
65
|
this.onQueue.push({
|
|
67
|
-
method:
|
|
66
|
+
method: a,
|
|
68
67
|
args: c
|
|
69
68
|
});
|
|
70
69
|
}
|
|
71
70
|
}), this.proxiedTarget = new Proxy({}, {
|
|
72
|
-
get: (
|
|
73
|
-
method:
|
|
71
|
+
get: (i, a) => this.target ? this.target[a] : a === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(a) ? (...c) => (this.targetQueue.push({
|
|
72
|
+
method: a,
|
|
74
73
|
args: c,
|
|
75
74
|
resolve: () => {
|
|
76
75
|
}
|
|
77
|
-
}), this.fallbacks[
|
|
76
|
+
}), this.fallbacks[a](...c)) : (...c) => new Promise((l) => {
|
|
78
77
|
this.targetQueue.push({
|
|
79
|
-
method:
|
|
78
|
+
method: a,
|
|
80
79
|
args: c,
|
|
81
80
|
resolve: l
|
|
82
81
|
});
|
|
@@ -91,44 +90,44 @@ class pe {
|
|
|
91
90
|
r.resolve(await this.target[r.method](...r.args));
|
|
92
91
|
}
|
|
93
92
|
}
|
|
94
|
-
function
|
|
95
|
-
const r = e, n =
|
|
96
|
-
if (o && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !
|
|
97
|
-
o.emit(
|
|
93
|
+
function z(e, t) {
|
|
94
|
+
const r = e, n = J(), o = he(), s = pe && r.enableEarlyProxy;
|
|
95
|
+
if (o && (n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !s))
|
|
96
|
+
o.emit(me, e, t);
|
|
98
97
|
else {
|
|
99
|
-
const
|
|
98
|
+
const i = s ? new Se(r, o) : null;
|
|
100
99
|
(n.__VUE_DEVTOOLS_PLUGINS__ = n.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
|
101
100
|
pluginDescriptor: r,
|
|
102
101
|
setupFn: t,
|
|
103
|
-
proxy:
|
|
104
|
-
}),
|
|
102
|
+
proxy: i
|
|
103
|
+
}), i && t(i.proxiedTarget);
|
|
105
104
|
}
|
|
106
105
|
}
|
|
107
106
|
/*!
|
|
108
|
-
* pinia v2.
|
|
109
|
-
* (c)
|
|
107
|
+
* pinia v2.2.0
|
|
108
|
+
* (c) 2024 Eduardo San Martin Morote
|
|
110
109
|
* @license MIT
|
|
111
110
|
*/
|
|
112
|
-
const
|
|
111
|
+
const ve = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
|
|
113
112
|
/* istanbul ignore next */
|
|
114
113
|
Symbol()
|
|
115
114
|
);
|
|
116
|
-
var
|
|
115
|
+
var S;
|
|
117
116
|
(function(e) {
|
|
118
117
|
e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
|
|
119
|
-
})(
|
|
120
|
-
const
|
|
121
|
-
function
|
|
118
|
+
})(S || (S = {}));
|
|
119
|
+
const W = typeof window < "u", U = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof global == "object" && global.global === global ? global : typeof globalThis == "object" ? globalThis : { HTMLElement: null };
|
|
120
|
+
function we(e, { autoBom: t = !1 } = {}) {
|
|
122
121
|
return t && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type) ? new Blob(["\uFEFF", e], { type: e.type }) : e;
|
|
123
122
|
}
|
|
124
|
-
function
|
|
123
|
+
function L(e, t, r) {
|
|
125
124
|
const n = new XMLHttpRequest();
|
|
126
125
|
n.open("GET", e), n.responseType = "blob", n.onload = function() {
|
|
127
|
-
|
|
126
|
+
K(n.response, t, r);
|
|
128
127
|
}, n.onerror = function() {
|
|
129
128
|
}, n.send();
|
|
130
129
|
}
|
|
131
|
-
function
|
|
130
|
+
function Q(e) {
|
|
132
131
|
const t = new XMLHttpRequest();
|
|
133
132
|
t.open("HEAD", e, !1);
|
|
134
133
|
try {
|
|
@@ -137,7 +136,7 @@ function F(e) {
|
|
|
137
136
|
}
|
|
138
137
|
return t.status >= 200 && t.status <= 299;
|
|
139
138
|
}
|
|
140
|
-
function
|
|
139
|
+
function I(e) {
|
|
141
140
|
try {
|
|
142
141
|
e.dispatchEvent(new MouseEvent("click"));
|
|
143
142
|
} catch {
|
|
@@ -145,54 +144,54 @@ function v(e) {
|
|
|
145
144
|
r.initMouseEvent("click", !0, !0, window, 0, 0, 0, 80, 20, !1, !1, !1, !1, 0, null), e.dispatchEvent(r);
|
|
146
145
|
}
|
|
147
146
|
}
|
|
148
|
-
const
|
|
147
|
+
const E = typeof navigator == "object" ? navigator : { userAgent: "" }, Y = /Macintosh/.test(E.userAgent) && /AppleWebKit/.test(E.userAgent) && !/Safari/.test(E.userAgent), K = W ? (
|
|
149
148
|
// Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
|
|
150
|
-
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !
|
|
149
|
+
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !Y ? Oe : (
|
|
151
150
|
// Use msSaveOrOpenBlob as a second approach
|
|
152
|
-
"msSaveOrOpenBlob" in
|
|
151
|
+
"msSaveOrOpenBlob" in E ? Ie : (
|
|
153
152
|
// Fallback to using FileReader and a popup
|
|
154
|
-
|
|
153
|
+
Ee
|
|
155
154
|
)
|
|
156
155
|
)
|
|
157
156
|
) : () => {
|
|
158
157
|
};
|
|
159
|
-
function
|
|
158
|
+
function Oe(e, t = "download", r) {
|
|
160
159
|
const n = document.createElement("a");
|
|
161
|
-
n.download = t, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin !== location.origin ?
|
|
160
|
+
n.download = t, n.rel = "noopener", typeof e == "string" ? (n.href = e, n.origin !== location.origin ? Q(n.href) ? L(e, t, r) : (n.target = "_blank", I(n)) : I(n)) : (n.href = URL.createObjectURL(e), setTimeout(function() {
|
|
162
161
|
URL.revokeObjectURL(n.href);
|
|
163
162
|
}, 4e4), setTimeout(function() {
|
|
164
|
-
|
|
163
|
+
I(n);
|
|
165
164
|
}, 0));
|
|
166
165
|
}
|
|
167
|
-
function
|
|
166
|
+
function Ie(e, t = "download", r) {
|
|
168
167
|
if (typeof e == "string")
|
|
169
|
-
if (
|
|
170
|
-
|
|
168
|
+
if (Q(e))
|
|
169
|
+
L(e, t, r);
|
|
171
170
|
else {
|
|
172
171
|
const n = document.createElement("a");
|
|
173
172
|
n.href = e, n.target = "_blank", setTimeout(function() {
|
|
174
|
-
|
|
173
|
+
I(n);
|
|
175
174
|
});
|
|
176
175
|
}
|
|
177
176
|
else
|
|
178
|
-
navigator.msSaveOrOpenBlob(
|
|
177
|
+
navigator.msSaveOrOpenBlob(we(e, r), t);
|
|
179
178
|
}
|
|
180
|
-
function
|
|
179
|
+
function Ee(e, t, r, n) {
|
|
181
180
|
if (n = n || open("", "_blank"), n && (n.document.title = n.document.body.innerText = "downloading..."), typeof e == "string")
|
|
182
|
-
return
|
|
183
|
-
const o = e.type === "application/octet-stream",
|
|
184
|
-
if ((
|
|
185
|
-
const
|
|
186
|
-
|
|
187
|
-
let c =
|
|
181
|
+
return L(e, t, r);
|
|
182
|
+
const o = e.type === "application/octet-stream", s = /constructor/i.test(String(U.HTMLElement)) || "safari" in U, i = /CriOS\/[\d]+/.test(navigator.userAgent);
|
|
183
|
+
if ((i || o && s || Y) && typeof FileReader < "u") {
|
|
184
|
+
const a = new FileReader();
|
|
185
|
+
a.onloadend = function() {
|
|
186
|
+
let c = a.result;
|
|
188
187
|
if (typeof c != "string")
|
|
189
188
|
throw n = null, new Error("Wrong reader.result type");
|
|
190
|
-
c =
|
|
191
|
-
},
|
|
189
|
+
c = i ? c : c.replace(/^data:[^;]*;/, "data:attachment/file;"), n ? n.location.href = c : location.assign(c), n = null;
|
|
190
|
+
}, a.readAsDataURL(e);
|
|
192
191
|
} else {
|
|
193
|
-
const
|
|
194
|
-
n ? n.location.assign(
|
|
195
|
-
URL.revokeObjectURL(
|
|
192
|
+
const a = URL.createObjectURL(e);
|
|
193
|
+
n ? n.location.assign(a) : location.href = a, n = null, setTimeout(function() {
|
|
194
|
+
URL.revokeObjectURL(a);
|
|
196
195
|
}, 4e4);
|
|
197
196
|
}
|
|
198
197
|
}
|
|
@@ -200,73 +199,73 @@ function u(e, t) {
|
|
|
200
199
|
const r = "🍍 " + e;
|
|
201
200
|
typeof __VUE_DEVTOOLS_TOAST__ == "function" && __VUE_DEVTOOLS_TOAST__(r, t);
|
|
202
201
|
}
|
|
203
|
-
function
|
|
202
|
+
function j(e) {
|
|
204
203
|
return "_a" in e && "install" in e;
|
|
205
204
|
}
|
|
206
|
-
function
|
|
205
|
+
function q() {
|
|
207
206
|
if (!("clipboard" in navigator))
|
|
208
207
|
return u("Your browser doesn't support the Clipboard API", "error"), !0;
|
|
209
208
|
}
|
|
210
|
-
function
|
|
209
|
+
function X(e) {
|
|
211
210
|
return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (u('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
|
|
212
211
|
}
|
|
213
|
-
async function
|
|
214
|
-
if (!
|
|
212
|
+
async function Te(e) {
|
|
213
|
+
if (!q())
|
|
215
214
|
try {
|
|
216
215
|
await navigator.clipboard.writeText(JSON.stringify(e.state.value)), u("Global state copied to clipboard.");
|
|
217
216
|
} catch (t) {
|
|
218
|
-
if (
|
|
217
|
+
if (X(t))
|
|
219
218
|
return;
|
|
220
219
|
u("Failed to serialize the state. Check the console for more details.", "error");
|
|
221
220
|
}
|
|
222
221
|
}
|
|
223
|
-
async function
|
|
224
|
-
if (!
|
|
222
|
+
async function $e(e) {
|
|
223
|
+
if (!q())
|
|
225
224
|
try {
|
|
226
|
-
|
|
225
|
+
Z(e, JSON.parse(await navigator.clipboard.readText())), u("Global state pasted from clipboard.");
|
|
227
226
|
} catch (t) {
|
|
228
|
-
if (
|
|
227
|
+
if (X(t))
|
|
229
228
|
return;
|
|
230
229
|
u("Failed to deserialize the state from clipboard. Check the console for more details.", "error");
|
|
231
230
|
}
|
|
232
231
|
}
|
|
233
|
-
async function
|
|
232
|
+
async function Ae(e) {
|
|
234
233
|
try {
|
|
235
|
-
|
|
234
|
+
K(new Blob([JSON.stringify(e.state.value)], {
|
|
236
235
|
type: "text/plain;charset=utf-8"
|
|
237
236
|
}), "pinia-state.json");
|
|
238
237
|
} catch {
|
|
239
238
|
u("Failed to export the state as JSON. Check the console for more details.", "error");
|
|
240
239
|
}
|
|
241
240
|
}
|
|
242
|
-
let
|
|
243
|
-
function
|
|
244
|
-
|
|
241
|
+
let m;
|
|
242
|
+
function Pe() {
|
|
243
|
+
m || (m = document.createElement("input"), m.type = "file", m.accept = ".json");
|
|
245
244
|
function e() {
|
|
246
245
|
return new Promise((t, r) => {
|
|
247
|
-
|
|
248
|
-
const n =
|
|
246
|
+
m.onchange = async () => {
|
|
247
|
+
const n = m.files;
|
|
249
248
|
if (!n)
|
|
250
249
|
return t(null);
|
|
251
250
|
const o = n.item(0);
|
|
252
251
|
return t(o ? { text: await o.text(), file: o } : null);
|
|
253
|
-
},
|
|
252
|
+
}, m.oncancel = () => t(null), m.onerror = r, m.click();
|
|
254
253
|
});
|
|
255
254
|
}
|
|
256
255
|
return e;
|
|
257
256
|
}
|
|
258
|
-
async function
|
|
257
|
+
async function ke(e) {
|
|
259
258
|
try {
|
|
260
|
-
const r = await
|
|
259
|
+
const r = await Pe()();
|
|
261
260
|
if (!r)
|
|
262
261
|
return;
|
|
263
262
|
const { text: n, file: o } = r;
|
|
264
|
-
|
|
263
|
+
Z(e, JSON.parse(n)), u(`Global state imported from "${o.name}".`);
|
|
265
264
|
} catch {
|
|
266
265
|
u("Failed to import the state from JSON. Check the console for more details.", "error");
|
|
267
266
|
}
|
|
268
267
|
}
|
|
269
|
-
function
|
|
268
|
+
function Z(e, t) {
|
|
270
269
|
for (const r in t) {
|
|
271
270
|
const n = e.state.value[r];
|
|
272
271
|
n ? Object.assign(n, t[r]) : e.state.value[r] = t[r];
|
|
@@ -279,31 +278,31 @@ function g(e) {
|
|
|
279
278
|
}
|
|
280
279
|
};
|
|
281
280
|
}
|
|
282
|
-
const
|
|
283
|
-
function
|
|
284
|
-
return
|
|
281
|
+
const ee = "🍍 Pinia (root)", T = "_root";
|
|
282
|
+
function Re(e) {
|
|
283
|
+
return j(e) ? {
|
|
285
284
|
id: T,
|
|
286
|
-
label:
|
|
285
|
+
label: ee
|
|
287
286
|
} : {
|
|
288
287
|
id: e.$id,
|
|
289
288
|
label: e.$id
|
|
290
289
|
};
|
|
291
290
|
}
|
|
292
|
-
function
|
|
293
|
-
if (
|
|
291
|
+
function Ne(e) {
|
|
292
|
+
if (j(e)) {
|
|
294
293
|
const r = Array.from(e._s.keys()), n = e._s;
|
|
295
294
|
return {
|
|
296
|
-
state: r.map((
|
|
295
|
+
state: r.map((s) => ({
|
|
297
296
|
editable: !0,
|
|
298
|
-
key:
|
|
299
|
-
value: e.state.value[
|
|
297
|
+
key: s,
|
|
298
|
+
value: e.state.value[s]
|
|
300
299
|
})),
|
|
301
|
-
getters: r.filter((
|
|
302
|
-
const
|
|
300
|
+
getters: r.filter((s) => n.get(s)._getters).map((s) => {
|
|
301
|
+
const i = n.get(s);
|
|
303
302
|
return {
|
|
304
303
|
editable: !1,
|
|
305
|
-
key:
|
|
306
|
-
value:
|
|
304
|
+
key: s,
|
|
305
|
+
value: i._getters.reduce((a, c) => (a[c] = i[c], a), {})
|
|
307
306
|
};
|
|
308
307
|
})
|
|
309
308
|
};
|
|
@@ -325,7 +324,7 @@ function Ae(e) {
|
|
|
325
324
|
value: e[r]
|
|
326
325
|
}))), t;
|
|
327
326
|
}
|
|
328
|
-
function
|
|
327
|
+
function Le(e) {
|
|
329
328
|
return e ? Array.isArray(e) ? e.reduce((t, r) => (t.keys.push(r.key), t.operations.push(r.type), t.oldValue[r.key] = r.oldValue, t.newValue[r.key] = r.newValue, t), {
|
|
330
329
|
oldValue: {},
|
|
331
330
|
keys: [],
|
|
@@ -338,36 +337,36 @@ function $e(e) {
|
|
|
338
337
|
newValue: e.newValue
|
|
339
338
|
} : {};
|
|
340
339
|
}
|
|
341
|
-
function
|
|
340
|
+
function je(e) {
|
|
342
341
|
switch (e) {
|
|
343
|
-
case
|
|
342
|
+
case S.direct:
|
|
344
343
|
return "mutation";
|
|
345
|
-
case
|
|
344
|
+
case S.patchFunction:
|
|
346
345
|
return "$patch";
|
|
347
|
-
case
|
|
346
|
+
case S.patchObject:
|
|
348
347
|
return "$patch";
|
|
349
348
|
default:
|
|
350
349
|
return "unknown";
|
|
351
350
|
}
|
|
352
351
|
}
|
|
353
|
-
let
|
|
354
|
-
const
|
|
355
|
-
function
|
|
356
|
-
|
|
352
|
+
let w = !0;
|
|
353
|
+
const $ = [], b = "pinia:mutations", f = "pinia", { assign: xe } = Object, P = (e) => "🍍 " + e;
|
|
354
|
+
function De(e, t) {
|
|
355
|
+
z({
|
|
357
356
|
id: "dev.esm.pinia",
|
|
358
357
|
label: "Pinia 🍍",
|
|
359
358
|
logo: "https://pinia.vuejs.org/logo.svg",
|
|
360
359
|
packageName: "pinia",
|
|
361
360
|
homepage: "https://pinia.vuejs.org",
|
|
362
|
-
componentStateTypes:
|
|
361
|
+
componentStateTypes: $,
|
|
363
362
|
app: e
|
|
364
363
|
}, (r) => {
|
|
365
364
|
typeof r.now != "function" && u("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), r.addTimelineLayer({
|
|
366
|
-
id:
|
|
365
|
+
id: b,
|
|
367
366
|
label: "Pinia 🍍",
|
|
368
367
|
color: 15064968
|
|
369
368
|
}), r.addInspector({
|
|
370
|
-
id:
|
|
369
|
+
id: f,
|
|
371
370
|
label: "Pinia 🍍",
|
|
372
371
|
icon: "storage",
|
|
373
372
|
treeFilterPlaceholder: "Search stores",
|
|
@@ -375,28 +374,28 @@ function Le(e, t) {
|
|
|
375
374
|
{
|
|
376
375
|
icon: "content_copy",
|
|
377
376
|
action: () => {
|
|
378
|
-
|
|
377
|
+
Te(t);
|
|
379
378
|
},
|
|
380
379
|
tooltip: "Serialize and copy the state"
|
|
381
380
|
},
|
|
382
381
|
{
|
|
383
382
|
icon: "content_paste",
|
|
384
383
|
action: async () => {
|
|
385
|
-
await
|
|
384
|
+
await $e(t), r.sendInspectorTree(f), r.sendInspectorState(f);
|
|
386
385
|
},
|
|
387
386
|
tooltip: "Replace the state with the content of your clipboard"
|
|
388
387
|
},
|
|
389
388
|
{
|
|
390
389
|
icon: "save",
|
|
391
390
|
action: () => {
|
|
392
|
-
|
|
391
|
+
Ae(t);
|
|
393
392
|
},
|
|
394
393
|
tooltip: "Save the state as a JSON file"
|
|
395
394
|
},
|
|
396
395
|
{
|
|
397
396
|
icon: "folder_open",
|
|
398
397
|
action: async () => {
|
|
399
|
-
await
|
|
398
|
+
await ke(t), r.sendInspectorTree(f), r.sendInspectorState(f);
|
|
400
399
|
},
|
|
401
400
|
tooltip: "Import the state from a JSON file"
|
|
402
401
|
}
|
|
@@ -412,38 +411,38 @@ function Le(e, t) {
|
|
|
412
411
|
}
|
|
413
412
|
]
|
|
414
413
|
}), r.on.inspectComponent((n, o) => {
|
|
415
|
-
const
|
|
416
|
-
if (
|
|
417
|
-
const
|
|
418
|
-
Object.values(
|
|
414
|
+
const s = n.componentInstance && n.componentInstance.proxy;
|
|
415
|
+
if (s && s._pStores) {
|
|
416
|
+
const i = n.componentInstance.proxy._pStores;
|
|
417
|
+
Object.values(i).forEach((a) => {
|
|
419
418
|
n.instanceData.state.push({
|
|
420
|
-
type:
|
|
419
|
+
type: P(a.$id),
|
|
421
420
|
key: "state",
|
|
422
421
|
editable: !0,
|
|
423
|
-
value:
|
|
422
|
+
value: a._isOptionsAPI ? {
|
|
424
423
|
_custom: {
|
|
425
|
-
value:
|
|
424
|
+
value: A(a.$state),
|
|
426
425
|
actions: [
|
|
427
426
|
{
|
|
428
427
|
icon: "restore",
|
|
429
428
|
tooltip: "Reset the state of this store",
|
|
430
|
-
action: () =>
|
|
429
|
+
action: () => a.$reset()
|
|
431
430
|
}
|
|
432
431
|
]
|
|
433
432
|
}
|
|
434
433
|
} : (
|
|
435
434
|
// NOTE: workaround to unwrap transferred refs
|
|
436
|
-
Object.keys(
|
|
435
|
+
Object.keys(a.$state).reduce((c, l) => (c[l] = a.$state[l], c), {})
|
|
437
436
|
)
|
|
438
|
-
}),
|
|
439
|
-
type:
|
|
437
|
+
}), a._getters && a._getters.length && n.instanceData.state.push({
|
|
438
|
+
type: P(a.$id),
|
|
440
439
|
key: "getters",
|
|
441
440
|
editable: !1,
|
|
442
|
-
value:
|
|
441
|
+
value: a._getters.reduce((c, l) => {
|
|
443
442
|
try {
|
|
444
|
-
c[l] =
|
|
445
|
-
} catch (
|
|
446
|
-
c[l] =
|
|
443
|
+
c[l] = a[l];
|
|
444
|
+
} catch (d) {
|
|
445
|
+
c[l] = d;
|
|
447
446
|
}
|
|
448
447
|
return c;
|
|
449
448
|
}, {})
|
|
@@ -451,48 +450,48 @@ function Le(e, t) {
|
|
|
451
450
|
});
|
|
452
451
|
}
|
|
453
452
|
}), r.on.getInspectorTree((n) => {
|
|
454
|
-
if (n.app === e && n.inspectorId ===
|
|
453
|
+
if (n.app === e && n.inspectorId === f) {
|
|
455
454
|
let o = [t];
|
|
456
|
-
o = o.concat(Array.from(t._s.values())), n.rootNodes = (n.filter ? o.filter((
|
|
455
|
+
o = o.concat(Array.from(t._s.values())), n.rootNodes = (n.filter ? o.filter((s) => "$id" in s ? s.$id.toLowerCase().includes(n.filter.toLowerCase()) : ee.toLowerCase().includes(n.filter.toLowerCase())) : o).map(Re);
|
|
457
456
|
}
|
|
458
|
-
}), r.on.getInspectorState((n) => {
|
|
459
|
-
if (n.app === e && n.inspectorId ===
|
|
457
|
+
}), globalThis.$pinia = t, r.on.getInspectorState((n) => {
|
|
458
|
+
if (n.app === e && n.inspectorId === f) {
|
|
460
459
|
const o = n.nodeId === T ? t : t._s.get(n.nodeId);
|
|
461
460
|
if (!o)
|
|
462
461
|
return;
|
|
463
|
-
o && (n.state =
|
|
462
|
+
o && (n.nodeId !== T && (globalThis.$store = A(o)), n.state = Ne(o));
|
|
464
463
|
}
|
|
465
464
|
}), r.on.editInspectorState((n, o) => {
|
|
466
|
-
if (n.app === e && n.inspectorId ===
|
|
467
|
-
const
|
|
468
|
-
if (!
|
|
465
|
+
if (n.app === e && n.inspectorId === f) {
|
|
466
|
+
const s = n.nodeId === T ? t : t._s.get(n.nodeId);
|
|
467
|
+
if (!s)
|
|
469
468
|
return u(`store "${n.nodeId}" not found`, "error");
|
|
470
|
-
const { path:
|
|
471
|
-
|
|
469
|
+
const { path: i } = n;
|
|
470
|
+
j(s) ? i.unshift("state") : (i.length !== 1 || !s._customProperties.has(i[0]) || i[0] in s.$state) && i.unshift("$state"), w = !1, n.set(s, i, n.state.value), w = !0;
|
|
472
471
|
}
|
|
473
472
|
}), r.on.editComponentState((n) => {
|
|
474
473
|
if (n.type.startsWith("🍍")) {
|
|
475
|
-
const o = n.type.replace(/^🍍\s*/, ""),
|
|
476
|
-
if (!
|
|
474
|
+
const o = n.type.replace(/^🍍\s*/, ""), s = t._s.get(o);
|
|
475
|
+
if (!s)
|
|
477
476
|
return u(`store "${o}" not found`, "error");
|
|
478
|
-
const { path:
|
|
479
|
-
if (
|
|
477
|
+
const { path: i } = n;
|
|
478
|
+
if (i[0] !== "state")
|
|
480
479
|
return u(`Invalid path for store "${o}":
|
|
481
|
-
${
|
|
480
|
+
${i}
|
|
482
481
|
Only state can be modified.`);
|
|
483
|
-
|
|
482
|
+
i[0] = "$state", w = !1, n.set(s, i, n.state.value), w = !0;
|
|
484
483
|
}
|
|
485
484
|
});
|
|
486
485
|
});
|
|
487
486
|
}
|
|
488
|
-
function
|
|
489
|
-
|
|
487
|
+
function Ve(e, t) {
|
|
488
|
+
$.includes(P(t.$id)) || $.push(P(t.$id)), z({
|
|
490
489
|
id: "dev.esm.pinia",
|
|
491
490
|
label: "Pinia 🍍",
|
|
492
491
|
logo: "https://pinia.vuejs.org/logo.svg",
|
|
493
492
|
packageName: "pinia",
|
|
494
493
|
homepage: "https://pinia.vuejs.org",
|
|
495
|
-
componentStateTypes:
|
|
494
|
+
componentStateTypes: $,
|
|
496
495
|
app: e,
|
|
497
496
|
settings: {
|
|
498
497
|
logStoreChanges: {
|
|
@@ -508,10 +507,10 @@ function Re(e, t) {
|
|
|
508
507
|
}
|
|
509
508
|
}, (r) => {
|
|
510
509
|
const n = typeof r.now == "function" ? r.now.bind(r) : Date.now;
|
|
511
|
-
t.$onAction(({ after:
|
|
512
|
-
const
|
|
510
|
+
t.$onAction(({ after: i, onError: a, name: c, args: l }) => {
|
|
511
|
+
const d = te++;
|
|
513
512
|
r.addTimelineEvent({
|
|
514
|
-
layerId:
|
|
513
|
+
layerId: b,
|
|
515
514
|
event: {
|
|
516
515
|
time: n(),
|
|
517
516
|
title: "🛫 " + c,
|
|
@@ -521,11 +520,11 @@ function Re(e, t) {
|
|
|
521
520
|
action: g(c),
|
|
522
521
|
args: l
|
|
523
522
|
},
|
|
524
|
-
groupId:
|
|
523
|
+
groupId: d
|
|
525
524
|
}
|
|
526
|
-
}),
|
|
527
|
-
|
|
528
|
-
layerId:
|
|
525
|
+
}), i((h) => {
|
|
526
|
+
_ = void 0, r.addTimelineEvent({
|
|
527
|
+
layerId: b,
|
|
529
528
|
event: {
|
|
530
529
|
time: n(),
|
|
531
530
|
title: "🛬 " + c,
|
|
@@ -534,14 +533,14 @@ function Re(e, t) {
|
|
|
534
533
|
store: g(t.$id),
|
|
535
534
|
action: g(c),
|
|
536
535
|
args: l,
|
|
537
|
-
result:
|
|
536
|
+
result: h
|
|
538
537
|
},
|
|
539
|
-
groupId:
|
|
538
|
+
groupId: d
|
|
540
539
|
}
|
|
541
540
|
});
|
|
542
|
-
}),
|
|
543
|
-
|
|
544
|
-
layerId:
|
|
541
|
+
}), a((h) => {
|
|
542
|
+
_ = void 0, r.addTimelineEvent({
|
|
543
|
+
layerId: b,
|
|
545
544
|
event: {
|
|
546
545
|
time: n(),
|
|
547
546
|
logType: "error",
|
|
@@ -551,53 +550,53 @@ function Re(e, t) {
|
|
|
551
550
|
store: g(t.$id),
|
|
552
551
|
action: g(c),
|
|
553
552
|
args: l,
|
|
554
|
-
error:
|
|
553
|
+
error: h
|
|
555
554
|
},
|
|
556
|
-
groupId:
|
|
555
|
+
groupId: d
|
|
557
556
|
}
|
|
558
557
|
});
|
|
559
558
|
});
|
|
560
|
-
}, !0), t._customProperties.forEach((
|
|
561
|
-
|
|
562
|
-
r.notifyComponentUpdate(), r.sendInspectorState(
|
|
563
|
-
layerId:
|
|
559
|
+
}, !0), t._customProperties.forEach((i) => {
|
|
560
|
+
oe(() => se(t[i]), (a, c) => {
|
|
561
|
+
r.notifyComponentUpdate(), r.sendInspectorState(f), w && r.addTimelineEvent({
|
|
562
|
+
layerId: b,
|
|
564
563
|
event: {
|
|
565
564
|
time: n(),
|
|
566
565
|
title: "Change",
|
|
567
|
-
subtitle:
|
|
566
|
+
subtitle: i,
|
|
568
567
|
data: {
|
|
569
|
-
newValue:
|
|
568
|
+
newValue: a,
|
|
570
569
|
oldValue: c
|
|
571
570
|
},
|
|
572
|
-
groupId:
|
|
571
|
+
groupId: _
|
|
573
572
|
}
|
|
574
573
|
});
|
|
575
574
|
}, { deep: !0 });
|
|
576
|
-
}), t.$subscribe(({ events:
|
|
577
|
-
if (r.notifyComponentUpdate(), r.sendInspectorState(
|
|
575
|
+
}), t.$subscribe(({ events: i, type: a }, c) => {
|
|
576
|
+
if (r.notifyComponentUpdate(), r.sendInspectorState(f), !w)
|
|
578
577
|
return;
|
|
579
578
|
const l = {
|
|
580
579
|
time: n(),
|
|
581
|
-
title:
|
|
582
|
-
data:
|
|
583
|
-
groupId:
|
|
580
|
+
title: je(a),
|
|
581
|
+
data: xe({ store: g(t.$id) }, Le(i)),
|
|
582
|
+
groupId: _
|
|
584
583
|
};
|
|
585
|
-
|
|
584
|
+
a === S.patchFunction ? l.subtitle = "⤵️" : a === S.patchObject ? l.subtitle = "🧩" : i && !Array.isArray(i) && (l.subtitle = i.type), i && (l.data["rawEvent(s)"] = {
|
|
586
585
|
_custom: {
|
|
587
586
|
display: "DebuggerEvent",
|
|
588
587
|
type: "object",
|
|
589
588
|
tooltip: "raw DebuggerEvent[]",
|
|
590
|
-
value:
|
|
589
|
+
value: i
|
|
591
590
|
}
|
|
592
591
|
}), r.addTimelineEvent({
|
|
593
|
-
layerId:
|
|
592
|
+
layerId: b,
|
|
594
593
|
event: l
|
|
595
594
|
});
|
|
596
595
|
}, { detached: !0, flush: "sync" });
|
|
597
596
|
const o = t._hotUpdate;
|
|
598
|
-
t._hotUpdate =
|
|
599
|
-
o(
|
|
600
|
-
layerId:
|
|
597
|
+
t._hotUpdate = B((i) => {
|
|
598
|
+
o(i), r.addTimelineEvent({
|
|
599
|
+
layerId: b,
|
|
601
600
|
event: {
|
|
602
601
|
time: n(),
|
|
603
602
|
title: "🔥 " + t.$id,
|
|
@@ -607,54 +606,57 @@ function Re(e, t) {
|
|
|
607
606
|
info: g("HMR update")
|
|
608
607
|
}
|
|
609
608
|
}
|
|
610
|
-
}), r.notifyComponentUpdate(), r.sendInspectorTree(
|
|
609
|
+
}), r.notifyComponentUpdate(), r.sendInspectorTree(f), r.sendInspectorState(f);
|
|
611
610
|
});
|
|
612
|
-
const { $dispose:
|
|
611
|
+
const { $dispose: s } = t;
|
|
613
612
|
t.$dispose = () => {
|
|
614
|
-
|
|
615
|
-
}, r.notifyComponentUpdate(), r.sendInspectorTree(
|
|
613
|
+
s(), r.notifyComponentUpdate(), r.sendInspectorTree(f), r.sendInspectorState(f), r.getSettings().logStoreChanges && u(`Disposed "${t.$id}" store 🗑`);
|
|
614
|
+
}, r.notifyComponentUpdate(), r.sendInspectorTree(f), r.sendInspectorState(f), r.getSettings().logStoreChanges && u(`"${t.$id}" store installed 🆕`);
|
|
616
615
|
});
|
|
617
616
|
}
|
|
618
|
-
let
|
|
619
|
-
function
|
|
620
|
-
const n = t.reduce((o,
|
|
617
|
+
let te = 0, _;
|
|
618
|
+
function C(e, t, r) {
|
|
619
|
+
const n = t.reduce((o, s) => (o[s] = A(e)[s], o), {});
|
|
621
620
|
for (const o in n)
|
|
622
621
|
e[o] = function() {
|
|
623
|
-
const
|
|
622
|
+
const s = te, i = r ? new Proxy(e, {
|
|
624
623
|
get(...c) {
|
|
625
|
-
return
|
|
624
|
+
return _ = s, Reflect.get(...c);
|
|
626
625
|
},
|
|
627
626
|
set(...c) {
|
|
628
|
-
return
|
|
627
|
+
return _ = s, Reflect.set(...c);
|
|
629
628
|
}
|
|
630
629
|
}) : e;
|
|
631
|
-
|
|
632
|
-
const
|
|
633
|
-
return
|
|
630
|
+
_ = s;
|
|
631
|
+
const a = n[o].apply(i, arguments);
|
|
632
|
+
return _ = void 0, a;
|
|
634
633
|
};
|
|
635
634
|
}
|
|
636
|
-
function
|
|
637
|
-
if (t.$id.startsWith("__hot:"))
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
635
|
+
function Ue({ app: e, store: t, options: r }) {
|
|
636
|
+
if (!t.$id.startsWith("__hot:")) {
|
|
637
|
+
if (t._isOptionsAPI = !!r.state, !t._p._testing) {
|
|
638
|
+
C(t, Object.keys(r.actions), t._isOptionsAPI);
|
|
639
|
+
const n = t._hotUpdate;
|
|
640
|
+
A(t)._hotUpdate = function(o) {
|
|
641
|
+
n.apply(this, arguments), C(t, Object.keys(o._hmrPayload.actions), !!t._isOptionsAPI);
|
|
642
|
+
};
|
|
643
|
+
}
|
|
644
|
+
Ve(
|
|
645
|
+
e,
|
|
646
|
+
// FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
|
|
647
|
+
t
|
|
648
|
+
);
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
function Ce() {
|
|
652
|
+
const e = re(!0), t = e.run(() => H({}));
|
|
651
653
|
let r = [], n = [];
|
|
652
|
-
const o =
|
|
653
|
-
install(
|
|
654
|
-
o._a =
|
|
654
|
+
const o = B({
|
|
655
|
+
install(s) {
|
|
656
|
+
o._a = s, s.provide(ve, o), s.config.globalProperties.$pinia = o, process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && W && De(s, o), n.forEach((i) => r.push(i)), n = [];
|
|
655
657
|
},
|
|
656
|
-
use(
|
|
657
|
-
return !this._a && !
|
|
658
|
+
use(s) {
|
|
659
|
+
return !this._a && !ge ? n.push(s) : r.push(s), this;
|
|
658
660
|
},
|
|
659
661
|
_p: r,
|
|
660
662
|
// it's actually undefined here
|
|
@@ -664,107 +666,107 @@ function je() {
|
|
|
664
666
|
_s: /* @__PURE__ */ new Map(),
|
|
665
667
|
state: t
|
|
666
668
|
});
|
|
667
|
-
return
|
|
669
|
+
return process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && typeof Proxy < "u" && o.use(Ue), o;
|
|
668
670
|
}
|
|
669
671
|
process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
|
|
670
672
|
/* istanbul ignore next */
|
|
671
673
|
Symbol()
|
|
672
674
|
);
|
|
673
|
-
function
|
|
675
|
+
function Me(e) {
|
|
674
676
|
return typeof e == "object" && e !== null;
|
|
675
677
|
}
|
|
676
|
-
function
|
|
677
|
-
return e =
|
|
678
|
+
function M(e, t) {
|
|
679
|
+
return e = Me(e) ? e : /* @__PURE__ */ Object.create(null), new Proxy(e, {
|
|
678
680
|
get(r, n, o) {
|
|
679
681
|
return n === "key" ? Reflect.get(r, n, o) : Reflect.get(r, n, o) || Reflect.get(t, n, o);
|
|
680
682
|
}
|
|
681
683
|
});
|
|
682
684
|
}
|
|
683
|
-
function
|
|
685
|
+
function Ge(e, t) {
|
|
684
686
|
return t.reduce((r, n) => r == null ? void 0 : r[n], e);
|
|
685
687
|
}
|
|
686
|
-
function
|
|
688
|
+
function Fe(e, t, r) {
|
|
687
689
|
return t.slice(0, -1).reduce((n, o) => /^(__proto__)$/.test(o) ? {} : n[o] = n[o] || {}, e)[t[t.length - 1]] = r, e;
|
|
688
690
|
}
|
|
689
|
-
function
|
|
691
|
+
function He(e, t) {
|
|
690
692
|
return t.reduce((r, n) => {
|
|
691
693
|
const o = n.split(".");
|
|
692
|
-
return
|
|
694
|
+
return Fe(r, o, Ge(e, o));
|
|
693
695
|
}, {});
|
|
694
696
|
}
|
|
695
|
-
function
|
|
697
|
+
function Be(e, t) {
|
|
696
698
|
return (r) => {
|
|
697
699
|
var n;
|
|
698
700
|
try {
|
|
699
701
|
const {
|
|
700
702
|
storage: o = localStorage,
|
|
701
|
-
beforeRestore:
|
|
702
|
-
afterRestore:
|
|
703
|
-
serializer:
|
|
703
|
+
beforeRestore: s = void 0,
|
|
704
|
+
afterRestore: i = void 0,
|
|
705
|
+
serializer: a = {
|
|
704
706
|
serialize: JSON.stringify,
|
|
705
707
|
deserialize: JSON.parse
|
|
706
708
|
},
|
|
707
709
|
key: c = t.$id,
|
|
708
710
|
paths: l = null,
|
|
709
|
-
debug:
|
|
711
|
+
debug: d = !1
|
|
710
712
|
} = r;
|
|
711
713
|
return {
|
|
712
714
|
storage: o,
|
|
713
|
-
beforeRestore:
|
|
714
|
-
afterRestore:
|
|
715
|
-
serializer:
|
|
716
|
-
key: ((n = e.key) != null ? n : (
|
|
715
|
+
beforeRestore: s,
|
|
716
|
+
afterRestore: i,
|
|
717
|
+
serializer: a,
|
|
718
|
+
key: ((n = e.key) != null ? n : (h) => h)(typeof c == "string" ? c : c(t.$id)),
|
|
717
719
|
paths: l,
|
|
718
|
-
debug:
|
|
720
|
+
debug: d
|
|
719
721
|
};
|
|
720
722
|
} catch {
|
|
721
723
|
return r.debug, null;
|
|
722
724
|
}
|
|
723
725
|
};
|
|
724
726
|
}
|
|
725
|
-
function
|
|
727
|
+
function G(e, { storage: t, serializer: r, key: n, debug: o }) {
|
|
726
728
|
try {
|
|
727
|
-
const
|
|
728
|
-
|
|
729
|
+
const s = t == null ? void 0 : t.getItem(n);
|
|
730
|
+
s && e.$patch(r == null ? void 0 : r.deserialize(s));
|
|
729
731
|
} catch {
|
|
730
732
|
}
|
|
731
733
|
}
|
|
732
|
-
function
|
|
734
|
+
function F(e, { storage: t, serializer: r, key: n, paths: o, debug: s }) {
|
|
733
735
|
try {
|
|
734
|
-
const
|
|
735
|
-
t.setItem(n, r.serialize(
|
|
736
|
+
const i = Array.isArray(o) ? He(e, o) : e;
|
|
737
|
+
t.setItem(n, r.serialize(i));
|
|
736
738
|
} catch {
|
|
737
739
|
}
|
|
738
740
|
}
|
|
739
|
-
function
|
|
741
|
+
function Je(e = {}) {
|
|
740
742
|
return (t) => {
|
|
741
743
|
const { auto: r = !1 } = e, {
|
|
742
744
|
options: { persist: n = r },
|
|
743
745
|
store: o,
|
|
744
|
-
pinia:
|
|
746
|
+
pinia: s
|
|
745
747
|
} = t;
|
|
746
748
|
if (!n)
|
|
747
749
|
return;
|
|
748
|
-
if (!(o.$id in
|
|
749
|
-
const
|
|
750
|
-
|
|
750
|
+
if (!(o.$id in s.state.value)) {
|
|
751
|
+
const a = s._s.get(o.$id.replace("__hot:", ""));
|
|
752
|
+
a && Promise.resolve().then(() => a.$persist());
|
|
751
753
|
return;
|
|
752
754
|
}
|
|
753
|
-
const
|
|
755
|
+
const i = (Array.isArray(n) ? n.map((a) => M(a, e)) : [M(n, e)]).map(Be(e, o)).filter(Boolean);
|
|
754
756
|
o.$persist = () => {
|
|
755
|
-
|
|
756
|
-
|
|
757
|
+
i.forEach((a) => {
|
|
758
|
+
F(o.$state, a);
|
|
757
759
|
});
|
|
758
|
-
}, o.$hydrate = ({ runHooks:
|
|
759
|
-
|
|
760
|
-
const { beforeRestore: l, afterRestore:
|
|
761
|
-
|
|
760
|
+
}, o.$hydrate = ({ runHooks: a = !0 } = {}) => {
|
|
761
|
+
i.forEach((c) => {
|
|
762
|
+
const { beforeRestore: l, afterRestore: d } = c;
|
|
763
|
+
a && (l == null || l(t)), G(o, c), a && (d == null || d(t));
|
|
762
764
|
});
|
|
763
|
-
},
|
|
764
|
-
const { beforeRestore: c, afterRestore: l } =
|
|
765
|
-
c == null || c(t),
|
|
766
|
-
(
|
|
767
|
-
|
|
765
|
+
}, i.forEach((a) => {
|
|
766
|
+
const { beforeRestore: c, afterRestore: l } = a;
|
|
767
|
+
c == null || c(t), G(o, a), l == null || l(t), o.$subscribe(
|
|
768
|
+
(d, h) => {
|
|
769
|
+
F(h, a);
|
|
768
770
|
},
|
|
769
771
|
{
|
|
770
772
|
detached: !0
|
|
@@ -773,27 +775,43 @@ function Me(e = {}) {
|
|
|
773
775
|
});
|
|
774
776
|
};
|
|
775
777
|
}
|
|
776
|
-
var
|
|
777
|
-
const
|
|
778
|
-
|
|
779
|
-
const
|
|
780
|
-
var
|
|
781
|
-
const t = ((
|
|
782
|
-
|
|
783
|
-
|
|
778
|
+
var ze = Je();
|
|
779
|
+
const N = Ce();
|
|
780
|
+
N.use(ze);
|
|
781
|
+
const We = (e) => {
|
|
782
|
+
var l, d, h, x, D;
|
|
783
|
+
const t = ((l = e == null ? void 0 : e.router) == null ? void 0 : l.routerBase) ?? "/", r = ((d = e == null ? void 0 : e.router) == null ? void 0 : d.options) || {};
|
|
784
|
+
let n = Object.assign(((h = e == null ? void 0 : e.router) == null ? void 0 : h.glob) || {});
|
|
785
|
+
const o = Object.values(n).filter((y) => !!y).flat().sort((y, O) => (y.index ?? 0) - (O.index ?? 0)), s = [];
|
|
786
|
+
(x = e == null ? void 0 : e.microApps) == null || x.map((y) => {
|
|
787
|
+
var V;
|
|
788
|
+
const O = Object.values(((V = y.router) == null ? void 0 : V.glob) || {}).filter((p) => !!p).flat().sort((p, ne) => (p.index ?? 0) - (ne.index ?? 0));
|
|
789
|
+
s.push(
|
|
790
|
+
...O.map((p) => ({ ...p, path: `/${y.microAppName}${p.path}` }))
|
|
791
|
+
), s.push(
|
|
792
|
+
...O.map((p) => ({ path: p.path, redirect: `/${y.microAppName}${p.path}` }))
|
|
793
|
+
);
|
|
784
794
|
});
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
795
|
+
const i = ((D = e == null ? void 0 : e.router) == null ? void 0 : D.routers) || [], a = [
|
|
796
|
+
...k(o, e),
|
|
797
|
+
...k(i, e),
|
|
798
|
+
...k(s, e)
|
|
799
|
+
];
|
|
800
|
+
return { router: ue({ history: fe(t), routes: a, ...r }) };
|
|
801
|
+
}, k = (e, t) => e.map((r) => {
|
|
802
|
+
const n = r.meta || {};
|
|
803
|
+
return n.keepAlive = n.keepAlive ?? (t == null ? void 0 : t.keepAlive) ?? !0, { ...r, meta: n };
|
|
804
|
+
}), Ze = (e) => {
|
|
805
|
+
e || (e = {});
|
|
806
|
+
const t = H(!0);
|
|
807
|
+
Promise.all([ae(e), ce(e)]).then(() => {
|
|
790
808
|
t.value = !1;
|
|
791
809
|
});
|
|
792
|
-
const { container: r, component: n, props: o } = (e == null ? void 0 : e.root) || {},
|
|
793
|
-
|
|
794
|
-
const { router:
|
|
795
|
-
return
|
|
810
|
+
const { container: r, component: n, props: o } = (e == null ? void 0 : e.root) || {}, s = ie(n || le, o);
|
|
811
|
+
s.use(de, e), s.use(N);
|
|
812
|
+
const { router: i } = We(e);
|
|
813
|
+
return s.use(i), s.mount(r || "#app"), { app: s, router: i, loading: t, store: N };
|
|
796
814
|
};
|
|
797
815
|
export {
|
|
798
|
-
|
|
816
|
+
Ze as createDasWebApp
|
|
799
817
|
};
|