x-essential-lib 0.6.5 → 0.6.7
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/dist/index.js +334 -334
- package/dist/utils/permission.d.ts +26 -26
- package/dist/utils/router.d.ts +1 -1
- package/package.json +6 -6
- package/dist/utils/globalState.d.ts +0 -16
package/dist/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.id="x-essential-lib",a.appendChild(document.createTextNode('.x-cont[data-v-7ab74c70]{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center}.lds-spinner[data-v-7ab74c70]{color:official;display:inline-block;position:relative;width:40px;height:40px}.lds-spinner div[data-v-7ab74c70]{transform-origin:20px 20px;animation:lds-spinner-7ab74c70 1.2s linear infinite}.lds-spinner div[data-v-7ab74c70]:after{content:" ";display:block;position:absolute;top:3px;left:18px;width:2px;height:6px;border-radius:5%;background:#9e9e9e}.lds-spinner div[data-v-7ab74c70]:nth-child(1){transform:rotate(0);animation-delay:-1.1s}.lds-spinner div[data-v-7ab74c70]:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.lds-spinner div[data-v-7ab74c70]:nth-child(3){transform:rotate(60deg);animation-delay:-.9s}.lds-spinner div[data-v-7ab74c70]:nth-child(4){transform:rotate(90deg);animation-delay:-.8s}.lds-spinner div[data-v-7ab74c70]:nth-child(5){transform:rotate(120deg);animation-delay:-.7s}.lds-spinner div[data-v-7ab74c70]:nth-child(6){transform:rotate(150deg);animation-delay:-.6s}.lds-spinner div[data-v-7ab74c70]:nth-child(7){transform:rotate(180deg);animation-delay:-.5s}.lds-spinner div[data-v-7ab74c70]:nth-child(8){transform:rotate(210deg);animation-delay:-.4s}.lds-spinner div[data-v-7ab74c70]:nth-child(9){transform:rotate(240deg);animation-delay:-.3s}.lds-spinner div[data-v-7ab74c70]:nth-child(10){transform:rotate(270deg);animation-delay:-.2s}.lds-spinner div[data-v-7ab74c70]:nth-child(11){transform:rotate(300deg);animation-delay:-.1s}.lds-spinner div[data-v-7ab74c70]:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes lds-spinner-7ab74c70{0%{opacity:1}to{opacity:0}}.x-item[data-v-d5cfe252]{width:600px}@media (max-width: 600px){.x-item[data-v-d5cfe252]{width:calc(100vw - 16px)}}.x-cont[data-v-d525e6f5]{position:absolute;left:50%;bottom:20px;transform:translate(-50%);z-index:9999}')),document.head.appendChild(a)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
import { ref as d, defineComponent as T, computed as g, onMounted as V, onBeforeUnmount as I, watch as Z, resolveComponent as h, openBlock as D, createBlock as O, withKeys as F, withModifiers as W, withCtx as w, createVNode as
|
|
2
|
+
import { ref as d, defineComponent as T, computed as g, onMounted as V, onBeforeUnmount as I, watch as Z, resolveComponent as h, openBlock as D, createBlock as O, withKeys as F, withModifiers as W, withCtx as w, createVNode as C, createTextVNode as E, toDisplayString as q, createElementBlock as Q, normalizeStyle as re, pushScopeId as fe, popScopeId as ge, createElementVNode as v, createCommentVNode as ne, unref as le, Fragment as ve, renderList as me, getCurrentScope as he, onScopeDispose as we, watchEffect as ye, getCurrentInstance as xe } from "vue";
|
|
3
3
|
import { useI18n as Y } from "vue-i18n";
|
|
4
4
|
import { defineStore as ce } from "pinia";
|
|
5
5
|
import ke from "axios";
|
|
6
|
-
import { useRouter as ue, useRoute as
|
|
7
|
-
import { useTheme as P, useDisplay as
|
|
6
|
+
import { useRouter as ue, useRoute as Ce } from "vue-router";
|
|
7
|
+
import { useTheme as P, useDisplay as be } from "vuetify";
|
|
8
8
|
const G = ce("global", () => {
|
|
9
|
-
const e = d(),
|
|
9
|
+
const e = d(), o = d("en"), t = d({}), r = d(""), a = d("");
|
|
10
10
|
return {
|
|
11
11
|
dark: e,
|
|
12
|
-
locale:
|
|
12
|
+
locale: o,
|
|
13
13
|
permissionObjects: t,
|
|
14
|
-
permissionChecksum:
|
|
15
|
-
lastAppPath:
|
|
14
|
+
permissionChecksum: r,
|
|
15
|
+
lastAppPath: a
|
|
16
16
|
};
|
|
17
17
|
}), $ = ce("viewMgr", () => {
|
|
18
18
|
const e = d([]);
|
|
19
|
-
function
|
|
19
|
+
function o() {
|
|
20
20
|
return e.value.length <= 0;
|
|
21
21
|
}
|
|
22
22
|
function t() {
|
|
@@ -24,18 +24,18 @@ const G = ce("global", () => {
|
|
|
24
24
|
if (u > 0)
|
|
25
25
|
return e.value[u - 1];
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
return e.value.find((
|
|
27
|
+
function r(u) {
|
|
28
|
+
return e.value.find((s) => s === u) !== void 0;
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
const
|
|
32
|
-
|
|
30
|
+
function a(u) {
|
|
31
|
+
const s = e.value.findIndex((_) => _ === u);
|
|
32
|
+
s !== -1 && e.value.splice(s, 1), e.value.push(u);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
const
|
|
36
|
-
|
|
34
|
+
function l(u) {
|
|
35
|
+
const s = e.value.findIndex((_) => _ === u);
|
|
36
|
+
s !== -1 && e.value.splice(s, 1);
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function n() {
|
|
39
39
|
console.assert(e.value.length > 0), e.value.pop();
|
|
40
40
|
}
|
|
41
41
|
function c() {
|
|
@@ -43,21 +43,21 @@ const G = ce("global", () => {
|
|
|
43
43
|
}
|
|
44
44
|
return {
|
|
45
45
|
views: e,
|
|
46
|
-
isEmpty:
|
|
46
|
+
isEmpty: o,
|
|
47
47
|
lastView: t,
|
|
48
|
-
hasView:
|
|
49
|
-
addView:
|
|
50
|
-
delView:
|
|
51
|
-
popView:
|
|
48
|
+
hasView: r,
|
|
49
|
+
addView: a,
|
|
50
|
+
delView: l,
|
|
51
|
+
popView: n,
|
|
52
52
|
clearViews: c
|
|
53
53
|
};
|
|
54
54
|
});
|
|
55
55
|
/*! js-cookie v3.0.5 | MIT */
|
|
56
56
|
function X(e) {
|
|
57
|
-
for (var
|
|
58
|
-
var t = arguments[
|
|
59
|
-
for (var
|
|
60
|
-
e[
|
|
57
|
+
for (var o = 1; o < arguments.length; o++) {
|
|
58
|
+
var t = arguments[o];
|
|
59
|
+
for (var r in t)
|
|
60
|
+
e[r] = t[r];
|
|
61
61
|
}
|
|
62
62
|
return e;
|
|
63
63
|
}
|
|
@@ -72,190 +72,190 @@ var De = {
|
|
|
72
72
|
);
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
|
-
function J(e,
|
|
76
|
-
function t(
|
|
75
|
+
function J(e, o) {
|
|
76
|
+
function t(a, l, n) {
|
|
77
77
|
if (!(typeof document > "u")) {
|
|
78
|
-
|
|
78
|
+
n = X({}, o, n), typeof n.expires == "number" && (n.expires = new Date(Date.now() + n.expires * 864e5)), n.expires && (n.expires = n.expires.toUTCString()), a = encodeURIComponent(a).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
79
79
|
var c = "";
|
|
80
|
-
for (var u in
|
|
81
|
-
|
|
82
|
-
return document.cookie =
|
|
80
|
+
for (var u in n)
|
|
81
|
+
n[u] && (c += "; " + u, n[u] !== !0 && (c += "=" + n[u].split(";")[0]));
|
|
82
|
+
return document.cookie = a + "=" + e.write(l, a) + c;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
function
|
|
86
|
-
if (!(typeof document > "u" || arguments.length && !
|
|
87
|
-
for (var
|
|
88
|
-
var u =
|
|
85
|
+
function r(a) {
|
|
86
|
+
if (!(typeof document > "u" || arguments.length && !a)) {
|
|
87
|
+
for (var l = document.cookie ? document.cookie.split("; ") : [], n = {}, c = 0; c < l.length; c++) {
|
|
88
|
+
var u = l[c].split("="), s = u.slice(1).join("=");
|
|
89
89
|
try {
|
|
90
90
|
var _ = decodeURIComponent(u[0]);
|
|
91
|
-
if (
|
|
91
|
+
if (n[_] = e.read(s, _), a === _)
|
|
92
92
|
break;
|
|
93
93
|
} catch {
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
return
|
|
96
|
+
return a ? n[a] : n;
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
return Object.create(
|
|
100
100
|
{
|
|
101
101
|
set: t,
|
|
102
|
-
get:
|
|
103
|
-
remove: function(
|
|
102
|
+
get: r,
|
|
103
|
+
remove: function(a, l) {
|
|
104
104
|
t(
|
|
105
|
-
|
|
105
|
+
a,
|
|
106
106
|
"",
|
|
107
|
-
X({},
|
|
107
|
+
X({}, l, {
|
|
108
108
|
expires: -1
|
|
109
109
|
})
|
|
110
110
|
);
|
|
111
111
|
},
|
|
112
|
-
withAttributes: function(
|
|
113
|
-
return J(this.converter, X({}, this.attributes,
|
|
112
|
+
withAttributes: function(a) {
|
|
113
|
+
return J(this.converter, X({}, this.attributes, a));
|
|
114
114
|
},
|
|
115
|
-
withConverter: function(
|
|
116
|
-
return J(X({}, this.converter,
|
|
115
|
+
withConverter: function(a) {
|
|
116
|
+
return J(X({}, this.converter, a), this.attributes);
|
|
117
117
|
}
|
|
118
118
|
},
|
|
119
119
|
{
|
|
120
|
-
attributes: { value: Object.freeze(
|
|
120
|
+
attributes: { value: Object.freeze(o) },
|
|
121
121
|
converter: { value: Object.freeze(e) }
|
|
122
122
|
}
|
|
123
123
|
);
|
|
124
124
|
}
|
|
125
125
|
var j = J(De, { path: "/" });
|
|
126
126
|
function xt(e) {
|
|
127
|
-
const
|
|
127
|
+
const o = ke.create({
|
|
128
128
|
timeout: 6e3
|
|
129
129
|
});
|
|
130
|
-
return
|
|
130
|
+
return o.defaults.baseURL = e.baseUrl, o.interceptors.request.use(
|
|
131
131
|
(t) => Le(t),
|
|
132
132
|
(t) => {
|
|
133
133
|
Ve(t, e.onError);
|
|
134
134
|
}
|
|
135
|
-
),
|
|
135
|
+
), o.interceptors.response.use(
|
|
136
136
|
(t) => Me(t),
|
|
137
137
|
(t) => Se(t, e.onError)
|
|
138
|
-
),
|
|
138
|
+
), o;
|
|
139
139
|
}
|
|
140
140
|
function Le(e) {
|
|
141
|
-
const
|
|
142
|
-
return e.headers.Authorization = "Basic " +
|
|
141
|
+
const o = j.get("accessToken") ?? "";
|
|
142
|
+
return e.headers.Authorization = "Basic " + o, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
|
|
143
143
|
}
|
|
144
|
-
function Ve(e,
|
|
145
|
-
console.error(e),
|
|
144
|
+
function Ve(e, o) {
|
|
145
|
+
console.error(e), o("request timeout");
|
|
146
146
|
}
|
|
147
147
|
function Me(e) {
|
|
148
148
|
return e.data;
|
|
149
149
|
}
|
|
150
|
-
function Se(e,
|
|
151
|
-
var
|
|
150
|
+
function Se(e, o) {
|
|
151
|
+
var a;
|
|
152
152
|
const t = e.response;
|
|
153
153
|
if (!t)
|
|
154
154
|
return Promise.reject(e);
|
|
155
155
|
t.status === 401 && Ae();
|
|
156
|
-
let
|
|
157
|
-
return
|
|
156
|
+
let r = (a = t.data) == null ? void 0 : a.message;
|
|
157
|
+
return r || (r = {
|
|
158
158
|
code: t.status,
|
|
159
159
|
message: t.statusText
|
|
160
|
-
}),
|
|
160
|
+
}), o(r), Promise.reject(e);
|
|
161
161
|
}
|
|
162
162
|
function Ae() {
|
|
163
163
|
j.remove("accessToken"), j.remove("refreshToken"), j.remove("activeOrg"), ue().replace({ path: "/passport/login" });
|
|
164
164
|
}
|
|
165
165
|
function qe(e) {
|
|
166
|
-
return { all: e = e || /* @__PURE__ */ new Map(), on: function(
|
|
167
|
-
var
|
|
168
|
-
|
|
169
|
-
}, off: function(
|
|
170
|
-
var
|
|
171
|
-
|
|
172
|
-
}, emit: function(
|
|
173
|
-
var
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}), (
|
|
177
|
-
o
|
|
166
|
+
return { all: e = e || /* @__PURE__ */ new Map(), on: function(o, t) {
|
|
167
|
+
var r = e.get(o);
|
|
168
|
+
r ? r.push(t) : e.set(o, [t]);
|
|
169
|
+
}, off: function(o, t) {
|
|
170
|
+
var r = e.get(o);
|
|
171
|
+
r && (t ? r.splice(r.indexOf(t) >>> 0, 1) : e.set(o, []));
|
|
172
|
+
}, emit: function(o, t) {
|
|
173
|
+
var r = e.get(o);
|
|
174
|
+
r && r.slice().map(function(a) {
|
|
175
|
+
a(t);
|
|
176
|
+
}), (r = e.get("*")) && r.slice().map(function(a) {
|
|
177
|
+
a(o, t);
|
|
178
178
|
});
|
|
179
179
|
} };
|
|
180
180
|
}
|
|
181
|
-
const
|
|
181
|
+
const p = function() {
|
|
182
182
|
return window.eventBus || (window.eventBus = qe()), window.eventBus;
|
|
183
183
|
}();
|
|
184
184
|
async function kt(e) {
|
|
185
|
-
return new Promise((
|
|
186
|
-
setTimeout(
|
|
185
|
+
return new Promise((o) => {
|
|
186
|
+
setTimeout(o, e);
|
|
187
187
|
});
|
|
188
188
|
}
|
|
189
|
-
async function ee(e,
|
|
190
|
-
const
|
|
191
|
-
return new Promise((
|
|
192
|
-
const
|
|
193
|
-
e() ?
|
|
189
|
+
async function ee(e, o, t) {
|
|
190
|
+
const r = Date.now();
|
|
191
|
+
return new Promise((a) => {
|
|
192
|
+
const l = async () => {
|
|
193
|
+
e() ? a(!0) : o && Date.now() - r > o ? a(!1) : setTimeout(l, t ?? 30);
|
|
194
194
|
};
|
|
195
|
-
|
|
195
|
+
l();
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
|
-
function Re(e,
|
|
198
|
+
function Re(e, o) {
|
|
199
199
|
const t = document.getElementById("single-spa-application:" + e);
|
|
200
|
-
t && (t.classList.remove("app-left", "app-right", "app-reset"),
|
|
200
|
+
t && (t.classList.remove("app-left", "app-right", "app-reset"), o ? t.classList.add("app-left") : t.classList.add("app-right"), setTimeout(() => {
|
|
201
201
|
t.classList.add("app-reset");
|
|
202
202
|
}, 50));
|
|
203
203
|
}
|
|
204
|
-
let
|
|
205
|
-
function
|
|
204
|
+
let oe = Date.now();
|
|
205
|
+
function pe() {
|
|
206
206
|
const e = Date.now();
|
|
207
|
-
return e -
|
|
207
|
+
return e - oe > 500 ? (oe = e, !0) : !1;
|
|
208
208
|
}
|
|
209
209
|
let Ie = 0;
|
|
210
|
-
function
|
|
210
|
+
function se() {
|
|
211
211
|
return ++Ie;
|
|
212
212
|
}
|
|
213
|
-
async function
|
|
214
|
-
if (!
|
|
213
|
+
async function Ct(e) {
|
|
214
|
+
if (!pe())
|
|
215
215
|
return;
|
|
216
|
-
let
|
|
217
|
-
const
|
|
218
|
-
t =
|
|
219
|
-
},
|
|
220
|
-
return
|
|
216
|
+
let o = !1, t;
|
|
217
|
+
const r = (l) => {
|
|
218
|
+
t = l, o = !0;
|
|
219
|
+
}, a = se();
|
|
220
|
+
return p.on("confirmDlgResult" + a, r), p.emit("confirmDlg", { ...e, seq: a }), await ee(() => o), p.off("confirmDlgResult" + a, r), t;
|
|
221
221
|
}
|
|
222
|
-
async function
|
|
223
|
-
if (!
|
|
222
|
+
async function bt(e) {
|
|
223
|
+
if (!pe())
|
|
224
224
|
return;
|
|
225
|
-
let
|
|
226
|
-
const
|
|
227
|
-
t =
|
|
228
|
-
},
|
|
229
|
-
return
|
|
225
|
+
let o = !1, t;
|
|
226
|
+
const r = (l) => {
|
|
227
|
+
t = l, o = !0;
|
|
228
|
+
}, a = se();
|
|
229
|
+
return p.on("promptDlgResult" + a, r), p.emit("promptDlg", { ...e, seq: a }), await ee(() => o), p.off("promptDlgResult" + a, r), t;
|
|
230
230
|
}
|
|
231
231
|
function Dt(e) {
|
|
232
|
-
|
|
232
|
+
p.emit("openWaitDlg", { text: e });
|
|
233
233
|
}
|
|
234
234
|
function Lt() {
|
|
235
|
-
|
|
235
|
+
p.emit("closeWaitDlg");
|
|
236
236
|
}
|
|
237
|
-
function Vt(e,
|
|
238
|
-
|
|
237
|
+
function Vt(e, o) {
|
|
238
|
+
p.emit("message", { type: "error", text: e, timeout: o });
|
|
239
239
|
}
|
|
240
|
-
function Mt(e,
|
|
241
|
-
|
|
240
|
+
function Mt(e, o) {
|
|
241
|
+
p.emit("message", { type: "info", text: e, timeout: o });
|
|
242
242
|
}
|
|
243
|
-
function St(e,
|
|
244
|
-
|
|
243
|
+
function St(e, o) {
|
|
244
|
+
p.emit("message", { type: "success", text: e, timeout: o });
|
|
245
245
|
}
|
|
246
|
-
function At(e,
|
|
247
|
-
|
|
246
|
+
function At(e, o) {
|
|
247
|
+
p.emit("message", { type: "warning", text: e, timeout: o });
|
|
248
248
|
}
|
|
249
|
-
var Oe = /* @__PURE__ */ ((e) => (e.list_app_group = "list_app_group", e.create_app_group = "create_app_group", e.delete_app_group = "delete_app_group", e.update_app_group = "update_app_group", e.arrange_app_group = "arrange_app_group", e.list_app = "list_app", e.get_app = "get_app", e.create_app = "create_app", e.delete_app = "delete_app", e.update_app = "update_app", e.list_app_release = "list_app_release", e.get_app_release = "get_app_release", e.create_app_release = "create_app_release", e.delete_app_release = "delete_app_release", e.deploy_app_release = "deploy_app_release", e.open_app_layer = "open_app_layer", e.open_app = "open_app", e.
|
|
250
|
-
function
|
|
249
|
+
var Oe = /* @__PURE__ */ ((e) => (e.list_app_group = "list_app_group", e.create_app_group = "create_app_group", e.delete_app_group = "delete_app_group", e.update_app_group = "update_app_group", e.arrange_app_group = "arrange_app_group", e.list_app = "list_app", e.get_app = "get_app", e.create_app = "create_app", e.delete_app = "delete_app", e.update_app = "update_app", e.list_app_release = "list_app_release", e.get_app_release = "get_app_release", e.create_app_release = "create_app_release", e.delete_app_release = "delete_app_release", e.deploy_app_release = "deploy_app_release", e.open_app_layer = "open_app_layer", e.open_app = "open_app", e.list_compute_space = "list_compute_space", e.get_compute_space = "get_compute_space", e.create_compute_space = "create_compute_space", e.delete_compute_space = "delete_compute_space", e.update_compute_space = "update_compute_space", e.arrange_compute_space = "arrange_compute_space", e.list_func_group = "list_func_group", e.create_func_group = "create_func_group", e.delete_func_group = "delete_func_group", e.update_func_group = "update_func_group", e.arrange_func_group = "arrange_func_group", e.list_func = "list_func", e.get_func = "get_func", e.create_func = "create_func", e.delete_func = "delete_func", e.update_func = "update_func", e.debug_func = "debug_func", e.call_func = "call_func", e.list_func_release = "list_func_release", e.get_func_release = "get_func_release", e.create_func_release = "create_func_release", e.delete_func_release = "delete_func_release", e.deploy_func_release = "deploy_func_release", e.list_flow_group = "list_flow_group", e.create_flow_group = "create_flow_group", e.delete_flow_group = "delete_flow_group", e.update_flow_group = "update_flow_group", e.arrange_flow_group = "arrange_flow_group", e.list_flow = "list_flow", e.get_flow = "get_flow", e.create_flow = "create_flow", e.delete_flow = "delete_flow", e.update_flow = "update_flow", e.call_flow = "call_flow", e.list_flow_release = "list_flow_release", e.get_flow_release = "get_flow_release", e.create_flow_release = "create_flow_release", e.delete_flow_release = "delete_flow_release", e.deploy_flow_release = "deploy_flow_release", e.list_task = "list_task", e.get_task = "get_task", e.create_task = "create_task", e.delete_task = "delete_task", e.update_task = "update_task", e.call_task = "call_task", e.open_compute_layer = "open_compute_layer", e.list_data_space = "list_data_space", e.get_data_space = "get_data_space", e.create_data_space = "create_data_space", e.delete_data_space = "delete_data_space", e.update_data_space = "update_data_space", e.arrange_data_space = "arrange_data_space", e.list_model_group = "list_model_group", e.create_model_group = "create_model_group", e.delete_model_group = "delete_model_group", e.update_model_group = "update_model_group", e.arrange_model_group = "arrange_model_group", e.list_model = "list_model", e.get_model = "get_model", e.create_model = "create_model", e.delete_model = "delete_model", e.update_model = "update_model", e.get_model_data = "get_model_data", e.create_model_data = "create_model_data", e.delete_model_data = "delete_model_data", e.update_model_data = "update_model_data", e.get_graph = "get_graph", e.update_graph = "update_graph", e.list_change = "list_change", e.apply_change = "apply_change", e.open_data_layer = "open_data_layer", e.list_resource_space = "list_resource_space", e.get_resource_space = "get_resource_space", e.create_resource_space = "create_resource_space", e.delete_resource_space = "delete_resource_space", e.update_resource_space = "update_resource_space", e.arrange_resource_space = "arrange_resource_space", e.list_dir = "list_dir", e.create_dir = "create_dir", e.delete_dir = "delete_dir", e.update_dir = "update_dir", e.move_dir = "move_dir", e.list_resource = "list_resource", e.get_resource = "get_resource", e.create_resource = "create_resource", e.delete_resource = "delete_resource", e.update_resource = "update_resource", e.move_resource = "move_resource", e.open_resource_layer = "open_resource_layer", e.list_org_member = "list_org_member", e.add_org_member = "add_org_member", e.remove_org_member = "remove_org_member", e.update_org_member = "update_org_member", e.list_org_role = "list_org_role", e.get_org_role = "get_org_role", e.create_org_role = "create_org_role", e.delete_org_role = "delete_org_role", e.update_org_role = "update_org_role", e.arrange_org_role = "arrange_org_role", e.get_org_structure = "get_org_structure", e.update_org_structure = "update_org_structure", e.filter_model = "filter_model", e))(Oe || {});
|
|
250
|
+
function ae(e, o) {
|
|
251
251
|
if (!e)
|
|
252
252
|
return !1;
|
|
253
253
|
let t = e;
|
|
254
|
-
return Object.keys(t).length <= 0 || (
|
|
254
|
+
return Object.keys(t).length <= 0 || (o.split("/").forEach((a) => {
|
|
255
255
|
if (Object.keys(t).length <= 0)
|
|
256
256
|
return !0;
|
|
257
|
-
if (t[
|
|
258
|
-
t = t[
|
|
257
|
+
if (t[a])
|
|
258
|
+
t = t[a];
|
|
259
259
|
else
|
|
260
260
|
return !1;
|
|
261
261
|
}), Object.keys(t).length <= 0);
|
|
@@ -347,51 +347,51 @@ const Ee = [
|
|
|
347
347
|
requiredState: "org"
|
|
348
348
|
},
|
|
349
349
|
{
|
|
350
|
-
app: "x-
|
|
351
|
-
path: "/
|
|
350
|
+
app: "x-compute-mf",
|
|
351
|
+
path: "/compute",
|
|
352
352
|
level: 1,
|
|
353
353
|
requiredState: "org",
|
|
354
354
|
mainActive: 2
|
|
355
355
|
},
|
|
356
356
|
{
|
|
357
|
-
app: "x-
|
|
358
|
-
path: "/
|
|
357
|
+
app: "x-data-mf",
|
|
358
|
+
path: "/data",
|
|
359
359
|
level: 1,
|
|
360
360
|
requiredState: "org",
|
|
361
361
|
mainActive: 2
|
|
362
362
|
},
|
|
363
363
|
{
|
|
364
|
-
app: "x-
|
|
365
|
-
path: "/
|
|
364
|
+
app: "x-resource-mf",
|
|
365
|
+
path: "/resource",
|
|
366
366
|
level: 1,
|
|
367
367
|
requiredState: "org",
|
|
368
368
|
mainActive: 2
|
|
369
369
|
}
|
|
370
370
|
];
|
|
371
371
|
function K(e) {
|
|
372
|
-
let
|
|
373
|
-
const
|
|
374
|
-
return Ee.forEach((
|
|
375
|
-
const
|
|
376
|
-
let
|
|
377
|
-
for (let c = 0; c <
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
}),
|
|
372
|
+
let o, t = 0;
|
|
373
|
+
const r = e.split("/").filter((a) => a.trim() !== "");
|
|
374
|
+
return Ee.forEach((a) => {
|
|
375
|
+
const l = a.path.split("/").filter((c) => c.trim() !== "");
|
|
376
|
+
let n = 0;
|
|
377
|
+
for (let c = 0; c < r.length && !(c >= l.length || r[c] !== l[c]); c++)
|
|
378
|
+
n++;
|
|
379
|
+
n > 0 && n > t && (o = a, t = n);
|
|
380
|
+
}), o;
|
|
381
381
|
}
|
|
382
382
|
const N = d("");
|
|
383
|
-
function L(e,
|
|
383
|
+
function L(e, o) {
|
|
384
384
|
const t = G();
|
|
385
|
-
|
|
386
|
-
const
|
|
387
|
-
if (!
|
|
385
|
+
o === "/" && (o = t.lastAppPath);
|
|
386
|
+
const r = K(e), a = K(o);
|
|
387
|
+
if (!r) {
|
|
388
388
|
console.assert(!1);
|
|
389
389
|
return;
|
|
390
390
|
}
|
|
391
|
-
if (console.info(`~~~~routeChange~~~~ ${
|
|
391
|
+
if (console.info(`~~~~routeChange~~~~ ${o} -> ${e}`), !a)
|
|
392
392
|
return;
|
|
393
|
-
const
|
|
394
|
-
|
|
393
|
+
const l = r.app === a.app, n = r.path === a.path, c = r.level >= a.level;
|
|
394
|
+
l ? n ? N.value = "" : N.value = c ? "inner-left" : "inner-right" : (N.value = "", Re(r.app, c));
|
|
395
395
|
}
|
|
396
396
|
function je() {
|
|
397
397
|
return !!j.get("accessToken");
|
|
@@ -399,112 +399,112 @@ function je() {
|
|
|
399
399
|
function Te() {
|
|
400
400
|
return !!j.get("activeOrg");
|
|
401
401
|
}
|
|
402
|
-
function qt(e,
|
|
403
|
-
const
|
|
404
|
-
if (!
|
|
402
|
+
function qt(e, o, t) {
|
|
403
|
+
const r = je(), a = Te(), l = K(e.path);
|
|
404
|
+
if (!l) {
|
|
405
405
|
console.assert(!1), t();
|
|
406
406
|
return;
|
|
407
407
|
}
|
|
408
|
-
if (
|
|
409
|
-
if (
|
|
410
|
-
if (
|
|
411
|
-
const
|
|
412
|
-
L(
|
|
408
|
+
if (l.requiredState === "auth")
|
|
409
|
+
if (r)
|
|
410
|
+
if (a) {
|
|
411
|
+
const n = "/main";
|
|
412
|
+
L(n, o.path), t({ path: n });
|
|
413
413
|
} else
|
|
414
|
-
L(e.path,
|
|
414
|
+
L(e.path, o.path), t();
|
|
415
415
|
else {
|
|
416
|
-
const
|
|
417
|
-
L(
|
|
416
|
+
const n = "/passport/login";
|
|
417
|
+
L(n, o.path), t({ path: n });
|
|
418
418
|
}
|
|
419
|
-
else if (
|
|
420
|
-
if (
|
|
421
|
-
if (
|
|
422
|
-
L(e.path,
|
|
419
|
+
else if (l.requiredState === "org")
|
|
420
|
+
if (r)
|
|
421
|
+
if (a)
|
|
422
|
+
L(e.path, o.path), t();
|
|
423
423
|
else {
|
|
424
|
-
const
|
|
425
|
-
L(
|
|
424
|
+
const n = "/org/joinOrCreate";
|
|
425
|
+
L(n, o.path), t({ path: n });
|
|
426
426
|
}
|
|
427
427
|
else {
|
|
428
|
-
const
|
|
429
|
-
L(
|
|
428
|
+
const n = "/passport/login";
|
|
429
|
+
L(n, o.path), t({ path: n });
|
|
430
430
|
}
|
|
431
|
-
else if (
|
|
432
|
-
if (
|
|
433
|
-
const
|
|
434
|
-
L(
|
|
431
|
+
else if (r)
|
|
432
|
+
if (a) {
|
|
433
|
+
const n = "/main";
|
|
434
|
+
L(n, o.path), t({ path: n });
|
|
435
435
|
} else {
|
|
436
|
-
const
|
|
437
|
-
L(
|
|
436
|
+
const n = "/org/joinOrCreate";
|
|
437
|
+
L(n, o.path), t({ path: n });
|
|
438
438
|
}
|
|
439
439
|
else
|
|
440
|
-
L(e.path,
|
|
440
|
+
L(e.path, o.path), t();
|
|
441
441
|
}
|
|
442
442
|
const Be = /* @__PURE__ */ T({
|
|
443
443
|
__name: "index",
|
|
444
444
|
setup(e) {
|
|
445
|
-
const { t:
|
|
445
|
+
const { t: o } = Y(), t = $(), r = g({
|
|
446
446
|
get() {
|
|
447
447
|
return t.hasView("confirmDlg");
|
|
448
448
|
},
|
|
449
449
|
set(m) {
|
|
450
450
|
m ? t.addView("confirmDlg") : t.delView("confirmDlg");
|
|
451
451
|
}
|
|
452
|
-
}),
|
|
452
|
+
}), a = d(""), l = d(""), n = d(""), c = d(""), u = d(""), s = d("");
|
|
453
453
|
let _ = 0, y = !1;
|
|
454
454
|
const i = (m) => {
|
|
455
|
-
var x,
|
|
456
|
-
|
|
455
|
+
var x, b, S, R;
|
|
456
|
+
a.value = m.title, l.value = m.text, n.value = ((x = m.cancel) == null ? void 0 : x.color) ?? "primary", c.value = ((b = m.cancel) == null ? void 0 : b.text) ?? o("dlg.common.cancel"), u.value = ((S = m.confirm) == null ? void 0 : S.color) ?? "primary", s.value = ((R = m.confirm) == null ? void 0 : R.text) ?? o("dlg.common.confirm"), _ = m.seq, y = !1, r.value = !0;
|
|
457
457
|
};
|
|
458
458
|
V(() => {
|
|
459
|
-
|
|
459
|
+
p.on("confirmDlg", i);
|
|
460
460
|
}), I(() => {
|
|
461
|
-
|
|
461
|
+
p.off("confirmDlg", i);
|
|
462
462
|
});
|
|
463
463
|
const M = () => {
|
|
464
|
-
|
|
464
|
+
r.value = !1, y || (p.emit("confirmDlgResult" + _, !0), y = !0);
|
|
465
465
|
};
|
|
466
|
-
return Z(
|
|
467
|
-
!m && !y && (
|
|
466
|
+
return Z(r, (m) => {
|
|
467
|
+
!m && !y && (p.emit("confirmDlgResult" + _, !1), y = !0);
|
|
468
468
|
}), (m, x) => {
|
|
469
|
-
const
|
|
469
|
+
const b = h("v-card-text"), S = h("v-btn"), R = h("v-card-actions"), f = h("v-card"), k = h("v-dialog");
|
|
470
470
|
return D(), O(k, {
|
|
471
|
-
modelValue:
|
|
472
|
-
"onUpdate:modelValue": x[1] || (x[1] = (A) =>
|
|
471
|
+
modelValue: r.value,
|
|
472
|
+
"onUpdate:modelValue": x[1] || (x[1] = (A) => r.value = A),
|
|
473
473
|
transition: "dialog-top-transition",
|
|
474
474
|
"max-width": "600px",
|
|
475
475
|
onKeydown: [
|
|
476
|
-
x[2] || (x[2] = F(W((A) =>
|
|
476
|
+
x[2] || (x[2] = F(W((A) => r.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
477
477
|
F(W(M, ["stop", "prevent"]), ["enter"])
|
|
478
478
|
]
|
|
479
479
|
}, {
|
|
480
480
|
default: w(() => [
|
|
481
|
-
|
|
481
|
+
C(f, { title: a.value }, {
|
|
482
482
|
default: w(() => [
|
|
483
|
-
b
|
|
483
|
+
C(b, null, {
|
|
484
484
|
default: w(() => [
|
|
485
|
-
E(q(
|
|
485
|
+
E(q(l.value), 1)
|
|
486
486
|
]),
|
|
487
487
|
_: 1
|
|
488
488
|
}),
|
|
489
|
-
|
|
489
|
+
C(R, { class: "d-flex justify-end" }, {
|
|
490
490
|
default: w(() => [
|
|
491
|
-
|
|
492
|
-
color:
|
|
491
|
+
C(S, {
|
|
492
|
+
color: n.value,
|
|
493
493
|
variant: "text",
|
|
494
|
-
onClick: x[0] || (x[0] = (A) =>
|
|
494
|
+
onClick: x[0] || (x[0] = (A) => r.value = !1)
|
|
495
495
|
}, {
|
|
496
496
|
default: w(() => [
|
|
497
497
|
E(q(c.value), 1)
|
|
498
498
|
]),
|
|
499
499
|
_: 1
|
|
500
500
|
}, 8, ["color"]),
|
|
501
|
-
|
|
501
|
+
C(S, {
|
|
502
502
|
color: u.value,
|
|
503
503
|
variant: "text",
|
|
504
504
|
onClick: M
|
|
505
505
|
}, {
|
|
506
506
|
default: w(() => [
|
|
507
|
-
E(q(
|
|
507
|
+
E(q(s.value), 1)
|
|
508
508
|
]),
|
|
509
509
|
_: 1
|
|
510
510
|
}, 8, ["color"])
|
|
@@ -540,19 +540,19 @@ const Be = /* @__PURE__ */ T({
|
|
|
540
540
|
zIndex: { default: 1 }
|
|
541
541
|
},
|
|
542
542
|
setup(e) {
|
|
543
|
-
const
|
|
544
|
-
background:
|
|
543
|
+
const o = P(), t = e, r = g(() => ({
|
|
544
|
+
background: o.current.value.dark ? "#1e1e1e" : "#ffffff",
|
|
545
545
|
zIndex: t.zIndex
|
|
546
546
|
}));
|
|
547
|
-
return (
|
|
547
|
+
return (a, l) => (D(), Q("div", {
|
|
548
548
|
class: "x-cont",
|
|
549
|
-
style:
|
|
549
|
+
style: re(r.value)
|
|
550
550
|
}, $e, 4));
|
|
551
551
|
}
|
|
552
|
-
}), te = (e,
|
|
552
|
+
}), te = (e, o) => {
|
|
553
553
|
const t = e.__vccOpts || e;
|
|
554
|
-
for (const [
|
|
555
|
-
t[
|
|
554
|
+
for (const [r, a] of o)
|
|
555
|
+
t[r] = a;
|
|
556
556
|
return t;
|
|
557
557
|
}, ze = /* @__PURE__ */ te(He, [["__scopeId", "data-v-7ab74c70"]]);
|
|
558
558
|
var Xe = "M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z", Fe = "M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z", Ke = "M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z", Ze = "M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z", Ge = "M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z";
|
|
@@ -565,11 +565,11 @@ const Ne = /* @__PURE__ */ T({
|
|
|
565
565
|
timeout: { default: 5e3 }
|
|
566
566
|
},
|
|
567
567
|
emits: ["timeout"],
|
|
568
|
-
setup(e, { emit:
|
|
569
|
-
const t = e,
|
|
568
|
+
setup(e, { emit: o }) {
|
|
569
|
+
const t = e, r = g(() => ({
|
|
570
570
|
width: "calc(100% - 64px)",
|
|
571
571
|
overflowWrap: "break-word"
|
|
572
|
-
})),
|
|
572
|
+
})), a = g(() => {
|
|
573
573
|
switch (t.type) {
|
|
574
574
|
case "success":
|
|
575
575
|
return Fe;
|
|
@@ -582,33 +582,33 @@ const Ne = /* @__PURE__ */ T({
|
|
|
582
582
|
default:
|
|
583
583
|
return "";
|
|
584
584
|
}
|
|
585
|
-
}),
|
|
585
|
+
}), l = d(!0), n = o;
|
|
586
586
|
return V(() => {
|
|
587
587
|
setTimeout(() => {
|
|
588
|
-
|
|
588
|
+
n("timeout", t.id);
|
|
589
589
|
}, t.timeout);
|
|
590
|
-
}), Z(
|
|
591
|
-
c ||
|
|
590
|
+
}), Z(l, (c) => {
|
|
591
|
+
c || n("timeout", t.id);
|
|
592
592
|
}), (c, u) => {
|
|
593
|
-
const
|
|
593
|
+
const s = h("v-icon"), _ = h("v-sheet");
|
|
594
594
|
return D(), O(_, {
|
|
595
595
|
class: "x-item d-flex align-center py-2 mb-2",
|
|
596
596
|
color: t.type,
|
|
597
597
|
elevation: 1
|
|
598
598
|
}, {
|
|
599
599
|
default: w(() => [
|
|
600
|
-
|
|
600
|
+
a.value ? (D(), O(s, {
|
|
601
601
|
key: 0,
|
|
602
602
|
class: "mx-1",
|
|
603
|
-
icon:
|
|
604
|
-
}, null, 8, ["icon"])) :
|
|
603
|
+
icon: a.value
|
|
604
|
+
}, null, 8, ["icon"])) : ne("", !0),
|
|
605
605
|
v("div", {
|
|
606
|
-
style:
|
|
606
|
+
style: re(r.value)
|
|
607
607
|
}, q(t.text), 5),
|
|
608
|
-
|
|
608
|
+
C(s, {
|
|
609
609
|
class: "mx-1",
|
|
610
|
-
icon:
|
|
611
|
-
onClick: u[0] || (u[0] = (y) =>
|
|
610
|
+
icon: le(Ke),
|
|
611
|
+
onClick: u[0] || (u[0] = (y) => n("timeout", t.id))
|
|
612
612
|
}, null, 8, ["icon"])
|
|
613
613
|
]),
|
|
614
614
|
_: 1
|
|
@@ -618,114 +618,114 @@ const Ne = /* @__PURE__ */ T({
|
|
|
618
618
|
}), Qe = /* @__PURE__ */ te(Ne, [["__scopeId", "data-v-d5cfe252"]]), Je = /* @__PURE__ */ T({
|
|
619
619
|
__name: "index",
|
|
620
620
|
setup(e) {
|
|
621
|
-
const
|
|
621
|
+
const o = d([]);
|
|
622
622
|
V(() => {
|
|
623
|
-
|
|
623
|
+
p.on("message", t);
|
|
624
624
|
}), I(() => {
|
|
625
|
-
|
|
625
|
+
p.off("message", t);
|
|
626
626
|
});
|
|
627
627
|
const t = (c) => {
|
|
628
|
-
|
|
629
|
-
},
|
|
630
|
-
|
|
628
|
+
l(c.type, c.text, c.timeout);
|
|
629
|
+
}, r = (c) => {
|
|
630
|
+
n(c);
|
|
631
631
|
};
|
|
632
|
-
let
|
|
633
|
-
const
|
|
634
|
-
const _ =
|
|
635
|
-
|
|
636
|
-
},
|
|
637
|
-
const u =
|
|
638
|
-
u >= 0 &&
|
|
632
|
+
let a = 0;
|
|
633
|
+
const l = (c, u, s) => {
|
|
634
|
+
const _ = a++;
|
|
635
|
+
o.value.push({ id: _, type: c, text: u, timeout: s });
|
|
636
|
+
}, n = (c) => {
|
|
637
|
+
const u = o.value.findIndex((s) => s.id === c);
|
|
638
|
+
u >= 0 && o.value.splice(u, 1);
|
|
639
639
|
};
|
|
640
640
|
return (c, u) => (D(), Q("div", {
|
|
641
641
|
class: "x-cont d-flex flex-column-reverse align-center",
|
|
642
642
|
onClick: u[0] || (u[0] = W(() => {
|
|
643
643
|
}, ["stop"]))
|
|
644
644
|
}, [
|
|
645
|
-
(D(!0), Q(ve, null, me(
|
|
646
|
-
id:
|
|
647
|
-
key:
|
|
648
|
-
type:
|
|
649
|
-
text:
|
|
650
|
-
timeout:
|
|
651
|
-
onTimeout:
|
|
645
|
+
(D(!0), Q(ve, null, me(o.value, (s) => (D(), O(Qe, {
|
|
646
|
+
id: s.id,
|
|
647
|
+
key: s.id,
|
|
648
|
+
type: s.type,
|
|
649
|
+
text: s.text,
|
|
650
|
+
timeout: s.timeout,
|
|
651
|
+
onTimeout: r
|
|
652
652
|
}, null, 8, ["id", "type", "text", "timeout"]))), 128))
|
|
653
653
|
]));
|
|
654
654
|
}
|
|
655
655
|
}), Ye = /* @__PURE__ */ te(Je, [["__scopeId", "data-v-d525e6f5"]]), Pe = /* @__PURE__ */ T({
|
|
656
656
|
__name: "index",
|
|
657
657
|
setup(e) {
|
|
658
|
-
const { t:
|
|
658
|
+
const { t: o } = Y(), t = $(), r = g({
|
|
659
659
|
get() {
|
|
660
660
|
return t.hasView("promptDlg");
|
|
661
661
|
},
|
|
662
662
|
set(f) {
|
|
663
663
|
f ? t.addView("promptDlg") : t.delView("promptDlg");
|
|
664
664
|
}
|
|
665
|
-
}),
|
|
666
|
-
let x = 0,
|
|
665
|
+
}), a = d(""), l = d(""), n = d(""), c = d(""), u = d(), s = d(""), _ = d(""), y = d(""), i = d(""), M = d(""), m = d();
|
|
666
|
+
let x = 0, b = !1;
|
|
667
667
|
const S = async (f) => {
|
|
668
668
|
var k, A, H, z, B;
|
|
669
|
-
|
|
669
|
+
a.value = f.title, l.value = f.text, n.value = f.label, c.value = f.placeholder, u.value = f.rules, s.value = f.value, _.value = ((k = f.cancel) == null ? void 0 : k.color) ?? "primary", y.value = ((A = f.cancel) == null ? void 0 : A.text) ?? o("dlg.common.cancel"), i.value = ((H = f.confirm) == null ? void 0 : H.color) ?? "primary", M.value = ((z = f.confirm) == null ? void 0 : z.text) ?? o("dlg.common.confirm"), x = f.seq, b = !1, r.value = !0, await ee(() => !!m.value, 1e3), (B = m.value) == null || B.focus();
|
|
670
670
|
};
|
|
671
671
|
V(() => {
|
|
672
|
-
|
|
672
|
+
p.on("promptDlg", S);
|
|
673
673
|
}), I(() => {
|
|
674
|
-
|
|
674
|
+
p.off("promptDlg", S);
|
|
675
675
|
});
|
|
676
676
|
const R = () => {
|
|
677
|
-
|
|
677
|
+
r.value = !1, b || (p.emit("promptDlgResult" + x, s.value ?? ""), b = !0);
|
|
678
678
|
};
|
|
679
|
-
return Z(
|
|
680
|
-
!f && !
|
|
679
|
+
return Z(r, (f) => {
|
|
680
|
+
!f && !b && (p.emit("promptDlgResult" + x, void 0), b = !0);
|
|
681
681
|
}), (f, k) => {
|
|
682
682
|
const A = h("v-card-text"), H = h("v-text-field"), z = h("v-form"), B = h("v-btn"), de = h("v-card-actions"), _e = h("v-card"), ie = h("v-dialog");
|
|
683
683
|
return D(), O(ie, {
|
|
684
|
-
modelValue:
|
|
685
|
-
"onUpdate:modelValue": k[2] || (k[2] = (U) =>
|
|
684
|
+
modelValue: r.value,
|
|
685
|
+
"onUpdate:modelValue": k[2] || (k[2] = (U) => r.value = U),
|
|
686
686
|
transition: "dialog-top-transition",
|
|
687
687
|
"max-width": "600px",
|
|
688
688
|
onKeydown: [
|
|
689
|
-
k[3] || (k[3] = F(W((U) =>
|
|
689
|
+
k[3] || (k[3] = F(W((U) => r.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
690
690
|
F(W(R, ["stop", "prevent"]), ["enter"])
|
|
691
691
|
]
|
|
692
692
|
}, {
|
|
693
693
|
default: w(() => [
|
|
694
|
-
|
|
694
|
+
C(_e, { title: a.value }, {
|
|
695
695
|
default: w(() => [
|
|
696
|
-
|
|
696
|
+
l.value ? (D(), O(A, { key: 0 }, {
|
|
697
697
|
default: w(() => [
|
|
698
|
-
E(q(
|
|
698
|
+
E(q(l.value), 1)
|
|
699
699
|
]),
|
|
700
700
|
_: 1
|
|
701
|
-
})) :
|
|
702
|
-
|
|
701
|
+
})) : ne("", !0),
|
|
702
|
+
C(z, { class: "mx-3" }, {
|
|
703
703
|
default: w(() => [
|
|
704
|
-
|
|
704
|
+
C(H, {
|
|
705
705
|
ref_key: "target",
|
|
706
706
|
ref: m,
|
|
707
|
-
modelValue:
|
|
708
|
-
"onUpdate:modelValue": k[0] || (k[0] = (U) =>
|
|
709
|
-
label:
|
|
707
|
+
modelValue: s.value,
|
|
708
|
+
"onUpdate:modelValue": k[0] || (k[0] = (U) => s.value = U),
|
|
709
|
+
label: n.value,
|
|
710
710
|
placeholder: c.value,
|
|
711
711
|
rules: u.value
|
|
712
712
|
}, null, 8, ["modelValue", "label", "placeholder", "rules"])
|
|
713
713
|
]),
|
|
714
714
|
_: 1
|
|
715
715
|
}),
|
|
716
|
-
|
|
716
|
+
C(de, { class: "d-flex justify-end" }, {
|
|
717
717
|
default: w(() => [
|
|
718
|
-
|
|
718
|
+
C(B, {
|
|
719
719
|
color: _.value,
|
|
720
720
|
variant: "text",
|
|
721
|
-
onClick: k[1] || (k[1] = (U) =>
|
|
721
|
+
onClick: k[1] || (k[1] = (U) => r.value = !1)
|
|
722
722
|
}, {
|
|
723
723
|
default: w(() => [
|
|
724
724
|
E(q(y.value), 1)
|
|
725
725
|
]),
|
|
726
726
|
_: 1
|
|
727
727
|
}, 8, ["color"]),
|
|
728
|
-
|
|
728
|
+
C(B, {
|
|
729
729
|
color: i.value,
|
|
730
730
|
variant: "text",
|
|
731
731
|
onClick: R
|
|
@@ -746,44 +746,44 @@ const Ne = /* @__PURE__ */ T({
|
|
|
746
746
|
}, 8, ["modelValue", "onKeydown"]);
|
|
747
747
|
};
|
|
748
748
|
}
|
|
749
|
-
}), et = { class: "mx-auto my-auto" }, tt = { class: "w-100 h-100 d-flex align-center justify-center" },
|
|
749
|
+
}), et = { class: "mx-auto my-auto" }, tt = { class: "w-100 h-100 d-flex align-center justify-center" }, ot = { class: "text-body-1" }, at = /* @__PURE__ */ T({
|
|
750
750
|
__name: "index",
|
|
751
751
|
setup(e) {
|
|
752
|
-
const { t:
|
|
752
|
+
const { t: o } = Y(), t = $(), r = g({
|
|
753
753
|
get() {
|
|
754
754
|
return t.hasView("waitDlg");
|
|
755
755
|
},
|
|
756
756
|
set(c) {
|
|
757
757
|
c ? t.addView("waitDlg") : t.delView("waitDlg");
|
|
758
758
|
}
|
|
759
|
-
}),
|
|
760
|
-
|
|
761
|
-
},
|
|
762
|
-
|
|
759
|
+
}), a = d(""), l = (c) => {
|
|
760
|
+
a.value = c.text ?? o("dlg.common.waiting"), r.value = !0;
|
|
761
|
+
}, n = () => {
|
|
762
|
+
r.value = !1;
|
|
763
763
|
};
|
|
764
764
|
return V(() => {
|
|
765
|
-
|
|
765
|
+
p.on("openWaitDlg", l), p.on("closeWaitDlg", n);
|
|
766
766
|
}), I(() => {
|
|
767
|
-
|
|
767
|
+
p.off("openWaitDlg", l), p.off("closeWaitDlg", n);
|
|
768
768
|
}), (c, u) => {
|
|
769
|
-
const
|
|
769
|
+
const s = h("v-card"), _ = h("v-dialog");
|
|
770
770
|
return D(), O(_, {
|
|
771
|
-
modelValue:
|
|
772
|
-
"onUpdate:modelValue": u[0] || (u[0] = (y) =>
|
|
771
|
+
modelValue: r.value,
|
|
772
|
+
"onUpdate:modelValue": u[0] || (u[0] = (y) => r.value = y),
|
|
773
773
|
persistent: "",
|
|
774
774
|
"no-click-animation": "",
|
|
775
775
|
fullscreen: ""
|
|
776
776
|
}, {
|
|
777
777
|
default: w(() => [
|
|
778
778
|
v("div", et, [
|
|
779
|
-
|
|
779
|
+
C(s, {
|
|
780
780
|
width: "300px",
|
|
781
781
|
height: "80px",
|
|
782
782
|
loading: ""
|
|
783
783
|
}, {
|
|
784
784
|
default: w(() => [
|
|
785
785
|
v("div", tt, [
|
|
786
|
-
v("span",
|
|
786
|
+
v("span", ot, q(a.value), 1)
|
|
787
787
|
])
|
|
788
788
|
]),
|
|
789
789
|
_: 1
|
|
@@ -794,79 +794,79 @@ const Ne = /* @__PURE__ */ T({
|
|
|
794
794
|
}, 8, ["modelValue"]);
|
|
795
795
|
};
|
|
796
796
|
}
|
|
797
|
-
}),
|
|
798
|
-
e.component("XConfirmDlg", Be), e.component("XLoading", ze), e.component("XMessage", Ye), e.component("XPromptDlg", Pe), e.component("XWaitDlg",
|
|
797
|
+
}), rt = (e) => {
|
|
798
|
+
e.component("XConfirmDlg", Be), e.component("XLoading", ze), e.component("XMessage", Ye), e.component("XPromptDlg", Pe), e.component("XWaitDlg", at);
|
|
799
799
|
};
|
|
800
800
|
function Rt() {
|
|
801
|
-
const e = P(),
|
|
801
|
+
const e = P(), o = g(() => e.global.current.value.colors.primary), t = g(() => e.global.current.value.colors.secondary), r = g(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), a = g(() => e.current.value.dark ? "#272727" : "#eeeeee"), l = g(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), n = g(() => e.current.value.dark ? "#303030" : "#f6f6f6"), c = g(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
|
|
802
802
|
return {
|
|
803
|
-
primaryColor:
|
|
803
|
+
primaryColor: o,
|
|
804
804
|
secondaryColor: t,
|
|
805
|
-
backgroundColor0:
|
|
806
|
-
backgroundColor1:
|
|
807
|
-
backgroundColor2:
|
|
808
|
-
highlightColor:
|
|
805
|
+
backgroundColor0: r,
|
|
806
|
+
backgroundColor1: a,
|
|
807
|
+
backgroundColor2: l,
|
|
808
|
+
highlightColor: n,
|
|
809
809
|
borderColor: c
|
|
810
810
|
};
|
|
811
811
|
}
|
|
812
|
-
function
|
|
812
|
+
function nt(e) {
|
|
813
813
|
return he() ? (we(e), !0) : !1;
|
|
814
814
|
}
|
|
815
|
-
function
|
|
816
|
-
return typeof e == "function" ? e() :
|
|
815
|
+
function lt(e) {
|
|
816
|
+
return typeof e == "function" ? e() : le(e);
|
|
817
817
|
}
|
|
818
818
|
const ct = typeof window < "u" && typeof document < "u";
|
|
819
819
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
820
820
|
const ut = ct ? window : void 0;
|
|
821
|
-
function
|
|
822
|
-
const e = d(!1),
|
|
823
|
-
return
|
|
821
|
+
function pt() {
|
|
822
|
+
const e = d(!1), o = xe();
|
|
823
|
+
return o && V(() => {
|
|
824
824
|
e.value = !0;
|
|
825
|
-
},
|
|
825
|
+
}, o), e;
|
|
826
826
|
}
|
|
827
|
-
function
|
|
828
|
-
const
|
|
829
|
-
return g(() => (
|
|
827
|
+
function st(e) {
|
|
828
|
+
const o = pt();
|
|
829
|
+
return g(() => (o.value, !!e()));
|
|
830
830
|
}
|
|
831
|
-
function dt(e,
|
|
832
|
-
const { window: t = ut } =
|
|
833
|
-
let
|
|
834
|
-
const
|
|
835
|
-
|
|
831
|
+
function dt(e, o = {}) {
|
|
832
|
+
const { window: t = ut } = o, r = st(() => t && "matchMedia" in t && typeof t.matchMedia == "function");
|
|
833
|
+
let a;
|
|
834
|
+
const l = d(!1), n = (s) => {
|
|
835
|
+
l.value = s.matches;
|
|
836
836
|
}, c = () => {
|
|
837
|
-
|
|
837
|
+
a && ("removeEventListener" in a ? a.removeEventListener("change", n) : a.removeListener(n));
|
|
838
838
|
}, u = ye(() => {
|
|
839
|
-
|
|
839
|
+
r.value && (c(), a = t.matchMedia(lt(e)), "addEventListener" in a ? a.addEventListener("change", n) : a.addListener(n), l.value = a.matches);
|
|
840
840
|
});
|
|
841
|
-
return
|
|
842
|
-
u(), c(),
|
|
843
|
-
}),
|
|
841
|
+
return nt(() => {
|
|
842
|
+
u(), c(), a = void 0;
|
|
843
|
+
}), l;
|
|
844
844
|
}
|
|
845
845
|
function _t(e) {
|
|
846
846
|
return dt("(prefers-color-scheme: dark)", e);
|
|
847
847
|
}
|
|
848
848
|
function it() {
|
|
849
|
-
const e =
|
|
850
|
-
return { dark:
|
|
849
|
+
const e = be(), o = G(), t = _t(), r = g(() => typeof o.dark == "boolean" ? o.dark : t.value), a = g(() => !!window.cordova), l = g(() => e.width.value <= 1280 ? e.width.value + "px" : e.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
|
|
850
|
+
return { dark: r, sysBarAvail: a, compactWidth: l };
|
|
851
851
|
}
|
|
852
852
|
function It() {
|
|
853
|
-
const e =
|
|
853
|
+
const e = Ce(), o = ue(), t = P(), { dark: r } = it(), a = G(), l = $();
|
|
854
854
|
Z(
|
|
855
|
-
|
|
855
|
+
r,
|
|
856
856
|
(i) => {
|
|
857
857
|
t.global.name.value = i ? "dark" : "light";
|
|
858
858
|
},
|
|
859
859
|
{ immediate: !0 }
|
|
860
860
|
);
|
|
861
|
-
const
|
|
861
|
+
const n = (i) => {
|
|
862
862
|
if (i.key === "Escape") {
|
|
863
863
|
c();
|
|
864
864
|
return;
|
|
865
865
|
}
|
|
866
866
|
}, c = () => {
|
|
867
867
|
var M;
|
|
868
|
-
if (!
|
|
869
|
-
|
|
868
|
+
if (!l.isEmpty()) {
|
|
869
|
+
l.hasView("waitDlg") || l.popView();
|
|
870
870
|
return;
|
|
871
871
|
}
|
|
872
872
|
const i = K(e.path);
|
|
@@ -875,61 +875,61 @@ function It() {
|
|
|
875
875
|
},
|
|
876
876
|
() => {
|
|
877
877
|
}
|
|
878
|
-
) :
|
|
878
|
+
) : o.back();
|
|
879
879
|
};
|
|
880
880
|
V(() => {
|
|
881
|
-
window.addEventListener("keydown",
|
|
881
|
+
window.addEventListener("keydown", n), p.on("backbutton", c);
|
|
882
882
|
}), I(() => {
|
|
883
|
-
window.removeEventListener("keydown",
|
|
883
|
+
window.removeEventListener("keydown", n), p.off("backbutton", c);
|
|
884
884
|
});
|
|
885
885
|
const u = (i) => {
|
|
886
|
-
|
|
887
|
-
},
|
|
888
|
-
|
|
886
|
+
a.dark = i;
|
|
887
|
+
}, s = (i) => {
|
|
888
|
+
a.locale = i;
|
|
889
889
|
}, _ = (i) => {
|
|
890
|
-
|
|
890
|
+
a.permissionObjects = i[0], a.permissionChecksum = i[1];
|
|
891
891
|
}, y = (i) => {
|
|
892
|
-
|
|
892
|
+
a.lastAppPath = i;
|
|
893
893
|
};
|
|
894
894
|
V(() => {
|
|
895
|
-
|
|
895
|
+
p.on("updateDark", u), p.on("updateLocale", s), p.on("updatePermission", _), p.on("updateLastAppPath", y), p.emit("syncGlobalState");
|
|
896
896
|
}), I(() => {
|
|
897
|
-
|
|
897
|
+
p.off("updateDark", u), p.off("updateLocale", s), p.off("updatePermission", _), p.off("updateLastAppPath", y);
|
|
898
898
|
});
|
|
899
899
|
}
|
|
900
900
|
function Ot() {
|
|
901
901
|
const e = G();
|
|
902
|
-
function
|
|
903
|
-
const
|
|
904
|
-
return
|
|
902
|
+
function o(t, r) {
|
|
903
|
+
const a = e.permissionObjects[t];
|
|
904
|
+
return a ? r ? !(!ae(a.includes, r) || ae(a.excludes, r)) : !0 : !1;
|
|
905
905
|
}
|
|
906
|
-
return { verifyPermission:
|
|
906
|
+
return { verifyPermission: o };
|
|
907
907
|
}
|
|
908
|
-
function Et(e,
|
|
909
|
-
const t = $(),
|
|
908
|
+
function Et(e, o) {
|
|
909
|
+
const t = $(), r = g({
|
|
910
910
|
get() {
|
|
911
911
|
return t.hasView(e);
|
|
912
912
|
},
|
|
913
|
-
set(
|
|
914
|
-
|
|
913
|
+
set(l) {
|
|
914
|
+
l ? t.addView(e) : t.delView(e);
|
|
915
915
|
}
|
|
916
|
-
}),
|
|
917
|
-
|
|
916
|
+
}), a = (l) => {
|
|
917
|
+
o == null || o(l), r.value = !0;
|
|
918
918
|
};
|
|
919
919
|
return V(() => {
|
|
920
|
-
|
|
920
|
+
p.on(e, a);
|
|
921
921
|
}), I(() => {
|
|
922
|
-
|
|
923
|
-
}), { open:
|
|
922
|
+
p.off(e, a);
|
|
923
|
+
}), { open: r };
|
|
924
924
|
}
|
|
925
|
-
const ft = (e,
|
|
926
|
-
const
|
|
927
|
-
return
|
|
925
|
+
const ft = (e, o, t) => {
|
|
926
|
+
const r = e[o];
|
|
927
|
+
return r ? typeof r == "function" ? r() : Promise.resolve(r) : new Promise((a, l) => {
|
|
928
928
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
929
|
-
|
|
929
|
+
l.bind(
|
|
930
930
|
null,
|
|
931
931
|
new Error(
|
|
932
|
-
"Unknown variable dynamic import: " +
|
|
932
|
+
"Unknown variable dynamic import: " + o + (o.split("/").length !== t ? ". Note that variables only represent file names one level deep." : "")
|
|
933
933
|
)
|
|
934
934
|
)
|
|
935
935
|
);
|
|
@@ -938,15 +938,15 @@ const ft = (e, a, t) => {
|
|
|
938
938
|
async function jt(e) {
|
|
939
939
|
return (await ft(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./en-iuzmkt0n.js"), "./locales/zhHans/index.ts": () => import("./zhHans-m6y1by9n.js") }), `./locales/${e}/index.ts`, 4)).default;
|
|
940
940
|
}
|
|
941
|
-
const Tt = { install:
|
|
941
|
+
const Tt = { install: rt };
|
|
942
942
|
export {
|
|
943
943
|
Oe as Permission,
|
|
944
944
|
Re as appAppear,
|
|
945
945
|
Lt as closeWaitDlg,
|
|
946
946
|
xt as createAxios,
|
|
947
947
|
Tt as default,
|
|
948
|
-
|
|
949
|
-
|
|
948
|
+
p as eventBus,
|
|
949
|
+
ae as isExist,
|
|
950
950
|
jt as loadLocaleMessageEssential,
|
|
951
951
|
K as matchRouteMeta,
|
|
952
952
|
Vt as messageError,
|
|
@@ -954,8 +954,8 @@ export {
|
|
|
954
954
|
St as messageSuccess,
|
|
955
955
|
At as messageWarning,
|
|
956
956
|
qt as onBeforeEach,
|
|
957
|
-
|
|
958
|
-
|
|
957
|
+
Ct as openConfirmDlg,
|
|
958
|
+
bt as openPromptDlg,
|
|
959
959
|
Dt as openWaitDlg,
|
|
960
960
|
N as routeTransName,
|
|
961
961
|
Rt as useColor,
|