x-essential-lib 0.5.13 → 0.5.15
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/composables/microApp.d.ts +1 -2
- package/dist/index.d.ts +1 -3
- package/dist/index.js +403 -487
- package/dist/store/index.d.ts +0 -1
- package/package.json +10 -11
package/dist/index.js
CHANGED
|
@@ -1,19 +1,56 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var
|
|
2
|
-
import { ref as
|
|
3
|
-
import {
|
|
4
|
-
import { defineStore as
|
|
5
|
-
import
|
|
6
|
-
import { useRouter as re, useRoute as
|
|
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-f4ad116e]{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;align-items:center;justify-content:center}.lds-spinner[data-v-f4ad116e]{color:official;display:inline-block;position:relative;width:40px;height:40px}.lds-spinner div[data-v-f4ad116e]{transform-origin:20px 20px;animation:lds-spinner-f4ad116e 1.2s linear infinite}.lds-spinner div[data-v-f4ad116e]:after{content:" ";display:block;position:absolute;top:3px;left:18px;width:2px;height:6px;border-radius:5%;background:#9e9e9e}.lds-spinner div[data-v-f4ad116e]:nth-child(1){transform:rotate(0);animation-delay:-1.1s}.lds-spinner div[data-v-f4ad116e]:nth-child(2){transform:rotate(30deg);animation-delay:-1s}.lds-spinner div[data-v-f4ad116e]:nth-child(3){transform:rotate(60deg);animation-delay:-.9s}.lds-spinner div[data-v-f4ad116e]:nth-child(4){transform:rotate(90deg);animation-delay:-.8s}.lds-spinner div[data-v-f4ad116e]:nth-child(5){transform:rotate(120deg);animation-delay:-.7s}.lds-spinner div[data-v-f4ad116e]:nth-child(6){transform:rotate(150deg);animation-delay:-.6s}.lds-spinner div[data-v-f4ad116e]:nth-child(7){transform:rotate(180deg);animation-delay:-.5s}.lds-spinner div[data-v-f4ad116e]:nth-child(8){transform:rotate(210deg);animation-delay:-.4s}.lds-spinner div[data-v-f4ad116e]:nth-child(9){transform:rotate(240deg);animation-delay:-.3s}.lds-spinner div[data-v-f4ad116e]:nth-child(10){transform:rotate(270deg);animation-delay:-.2s}.lds-spinner div[data-v-f4ad116e]:nth-child(11){transform:rotate(300deg);animation-delay:-.1s}.lds-spinner div[data-v-f4ad116e]:nth-child(12){transform:rotate(330deg);animation-delay:0s}@keyframes lds-spinner-f4ad116e{0%{opacity:1}to{opacity:0}}.x-cont[data-v-0ce1c82d]{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 f, computed as i, onMounted as C, onBeforeUnmount as S, defineComponent as j, watch as K, resolveComponent as v, openBlock as b, createBlock as T, unref as L, isRef as J, withKeys as F, withModifiers as B, withCtx as m, createVNode as y, createTextVNode as I, toDisplayString as R, createElementBlock as H, normalizeStyle as ge, pushScopeId as ve, popScopeId as me, createElementVNode as g, reactive as he, Fragment as we, renderList as ye, createCommentVNode as xe } from "vue";
|
|
3
|
+
import { useLocale as G, useTheme as N, useDisplay as ke } from "vuetify";
|
|
4
|
+
import { defineStore as be } from "pinia";
|
|
5
|
+
import Ce from "axios";
|
|
6
|
+
import { useRouter as re, useRoute as De } from "vue-router";
|
|
7
|
+
const ne = be("viewMgr", () => {
|
|
8
|
+
const e = f([]);
|
|
9
|
+
function a() {
|
|
10
|
+
return e.value.length <= 0;
|
|
11
|
+
}
|
|
12
|
+
function t() {
|
|
13
|
+
const u = e.value.length;
|
|
14
|
+
if (u > 0)
|
|
15
|
+
return e.value[u - 1];
|
|
16
|
+
}
|
|
17
|
+
function o(u) {
|
|
18
|
+
return e.value.find((s) => s === u) !== void 0;
|
|
19
|
+
}
|
|
20
|
+
function l(u) {
|
|
21
|
+
e.value.push(u);
|
|
22
|
+
}
|
|
23
|
+
function n(u) {
|
|
24
|
+
const s = e.value.findIndex((h) => h === u);
|
|
25
|
+
s !== -1 && e.value.splice(s, e.value.length - s);
|
|
26
|
+
}
|
|
27
|
+
function r() {
|
|
28
|
+
console.assert(e.value.length > 0), e.value.pop();
|
|
29
|
+
}
|
|
30
|
+
function c() {
|
|
31
|
+
e.value = [];
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
views: e,
|
|
35
|
+
isEmpty: a,
|
|
36
|
+
lastView: t,
|
|
37
|
+
hasView: o,
|
|
38
|
+
addView: l,
|
|
39
|
+
delView: n,
|
|
40
|
+
popView: r,
|
|
41
|
+
clearViews: c
|
|
42
|
+
};
|
|
43
|
+
});
|
|
7
44
|
/*! js-cookie v3.0.5 | MIT */
|
|
8
|
-
function
|
|
45
|
+
function z(e) {
|
|
9
46
|
for (var a = 1; a < arguments.length; a++) {
|
|
10
47
|
var t = arguments[a];
|
|
11
|
-
for (var
|
|
12
|
-
e[
|
|
48
|
+
for (var o in t)
|
|
49
|
+
e[o] = t[o];
|
|
13
50
|
}
|
|
14
51
|
return e;
|
|
15
52
|
}
|
|
16
|
-
var
|
|
53
|
+
var Ve = {
|
|
17
54
|
read: function(e) {
|
|
18
55
|
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
19
56
|
},
|
|
@@ -25,47 +62,47 @@ var De = {
|
|
|
25
62
|
}
|
|
26
63
|
};
|
|
27
64
|
function X(e, a) {
|
|
28
|
-
function t(
|
|
65
|
+
function t(l, n, r) {
|
|
29
66
|
if (!(typeof document > "u")) {
|
|
30
|
-
r =
|
|
67
|
+
r = z({}, a, r), typeof r.expires == "number" && (r.expires = new Date(Date.now() + r.expires * 864e5)), r.expires && (r.expires = r.expires.toUTCString()), l = encodeURIComponent(l).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
31
68
|
var c = "";
|
|
32
69
|
for (var u in r)
|
|
33
70
|
r[u] && (c += "; " + u, r[u] !== !0 && (c += "=" + r[u].split(";")[0]));
|
|
34
|
-
return document.cookie =
|
|
71
|
+
return document.cookie = l + "=" + e.write(n, l) + c;
|
|
35
72
|
}
|
|
36
73
|
}
|
|
37
|
-
function l
|
|
38
|
-
if (!(typeof document > "u" || arguments.length && !
|
|
74
|
+
function o(l) {
|
|
75
|
+
if (!(typeof document > "u" || arguments.length && !l)) {
|
|
39
76
|
for (var n = document.cookie ? document.cookie.split("; ") : [], r = {}, c = 0; c < n.length; c++) {
|
|
40
|
-
var u = n[c].split("="),
|
|
77
|
+
var u = n[c].split("="), s = u.slice(1).join("=");
|
|
41
78
|
try {
|
|
42
|
-
var
|
|
43
|
-
if (r[
|
|
79
|
+
var h = decodeURIComponent(u[0]);
|
|
80
|
+
if (r[h] = e.read(s, h), l === h)
|
|
44
81
|
break;
|
|
45
82
|
} catch {
|
|
46
83
|
}
|
|
47
84
|
}
|
|
48
|
-
return
|
|
85
|
+
return l ? r[l] : r;
|
|
49
86
|
}
|
|
50
87
|
}
|
|
51
88
|
return Object.create(
|
|
52
89
|
{
|
|
53
90
|
set: t,
|
|
54
|
-
get:
|
|
55
|
-
remove: function(
|
|
91
|
+
get: o,
|
|
92
|
+
remove: function(l, n) {
|
|
56
93
|
t(
|
|
57
|
-
|
|
94
|
+
l,
|
|
58
95
|
"",
|
|
59
|
-
|
|
96
|
+
z({}, n, {
|
|
60
97
|
expires: -1
|
|
61
98
|
})
|
|
62
99
|
);
|
|
63
100
|
},
|
|
64
|
-
withAttributes: function(
|
|
65
|
-
return X(this.converter,
|
|
101
|
+
withAttributes: function(l) {
|
|
102
|
+
return X(this.converter, z({}, this.attributes, l));
|
|
66
103
|
},
|
|
67
|
-
withConverter: function(
|
|
68
|
-
return X(
|
|
104
|
+
withConverter: function(l) {
|
|
105
|
+
return X(z({}, this.converter, l), this.attributes);
|
|
69
106
|
}
|
|
70
107
|
},
|
|
71
108
|
{
|
|
@@ -74,153 +111,153 @@ function X(e, a) {
|
|
|
74
111
|
}
|
|
75
112
|
);
|
|
76
113
|
}
|
|
77
|
-
var
|
|
78
|
-
function
|
|
79
|
-
const a =
|
|
114
|
+
var O = X(Ve, { path: "/" });
|
|
115
|
+
function ot(e) {
|
|
116
|
+
const a = Ce.create({
|
|
80
117
|
timeout: 6e3
|
|
81
118
|
});
|
|
82
119
|
return a.defaults.baseURL = e.baseUrl, a.interceptors.request.use(
|
|
83
|
-
(t) =>
|
|
120
|
+
(t) => Re(t),
|
|
84
121
|
(t) => {
|
|
85
|
-
|
|
122
|
+
Se(t, e.onError);
|
|
86
123
|
}
|
|
87
124
|
), a.interceptors.response.use(
|
|
88
|
-
(t) =>
|
|
89
|
-
(t) =>
|
|
125
|
+
(t) => qe(t),
|
|
126
|
+
(t) => Ie(t, e.onError)
|
|
90
127
|
), a;
|
|
91
128
|
}
|
|
92
|
-
function
|
|
93
|
-
const a =
|
|
129
|
+
function Re(e) {
|
|
130
|
+
const a = O.get("accessToken") ?? "";
|
|
94
131
|
return e.headers.Authorization = "Basic " + a, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
|
|
95
132
|
}
|
|
96
|
-
function
|
|
133
|
+
function Se(e, a) {
|
|
97
134
|
console.error(e), a("request timeout");
|
|
98
135
|
}
|
|
99
|
-
function
|
|
136
|
+
function qe(e) {
|
|
100
137
|
return e.data;
|
|
101
138
|
}
|
|
102
|
-
function
|
|
103
|
-
var
|
|
139
|
+
function Ie(e, a) {
|
|
140
|
+
var l;
|
|
104
141
|
const t = e.response;
|
|
105
142
|
if (!t)
|
|
106
143
|
return Promise.reject(e);
|
|
107
144
|
t.status === 401 && Oe();
|
|
108
|
-
let
|
|
109
|
-
return
|
|
145
|
+
let o = (l = t.data) == null ? void 0 : l.message;
|
|
146
|
+
return o || (o = {
|
|
110
147
|
code: t.status,
|
|
111
148
|
message: t.statusText
|
|
112
|
-
}), a(
|
|
149
|
+
}), a(o), Promise.reject(e);
|
|
113
150
|
}
|
|
114
151
|
function Oe() {
|
|
115
|
-
|
|
152
|
+
O.remove("accessToken"), O.remove("refreshToken"), O.remove("activeOrg"), re().replace({ path: "/passport/login" });
|
|
116
153
|
}
|
|
117
154
|
function Te(e) {
|
|
118
155
|
return { all: e = e || /* @__PURE__ */ new Map(), on: function(a, t) {
|
|
119
|
-
var
|
|
120
|
-
|
|
156
|
+
var o = e.get(a);
|
|
157
|
+
o ? o.push(t) : e.set(a, [t]);
|
|
121
158
|
}, off: function(a, t) {
|
|
122
|
-
var
|
|
123
|
-
|
|
159
|
+
var o = e.get(a);
|
|
160
|
+
o && (t ? o.splice(o.indexOf(t) >>> 0, 1) : e.set(a, []));
|
|
124
161
|
}, emit: function(a, t) {
|
|
125
|
-
var
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}), (
|
|
129
|
-
|
|
162
|
+
var o = e.get(a);
|
|
163
|
+
o && o.slice().map(function(l) {
|
|
164
|
+
l(t);
|
|
165
|
+
}), (o = e.get("*")) && o.slice().map(function(l) {
|
|
166
|
+
l(a, t);
|
|
130
167
|
});
|
|
131
168
|
} };
|
|
132
169
|
}
|
|
133
|
-
const
|
|
134
|
-
async function
|
|
170
|
+
const p = Te();
|
|
171
|
+
async function rt(e) {
|
|
135
172
|
return new Promise((a) => {
|
|
136
173
|
setTimeout(a, e);
|
|
137
174
|
});
|
|
138
175
|
}
|
|
139
|
-
async function
|
|
140
|
-
const
|
|
141
|
-
return new Promise((
|
|
176
|
+
async function Q(e, a, t) {
|
|
177
|
+
const o = Date.now();
|
|
178
|
+
return new Promise((l) => {
|
|
142
179
|
const n = async () => {
|
|
143
|
-
e() ?
|
|
180
|
+
e() ? l(!0) : a && Date.now() - o > a ? l(!1) : setTimeout(n, t ?? 30);
|
|
144
181
|
};
|
|
145
182
|
n();
|
|
146
183
|
});
|
|
147
184
|
}
|
|
148
185
|
let ee = Date.now();
|
|
149
|
-
function
|
|
186
|
+
function ce() {
|
|
150
187
|
const e = Date.now();
|
|
151
188
|
return e - ee > 500 ? (ee = e, !0) : !1;
|
|
152
189
|
}
|
|
153
190
|
let je = 0;
|
|
154
|
-
function
|
|
191
|
+
function ue() {
|
|
155
192
|
return ++je;
|
|
156
193
|
}
|
|
157
|
-
async function
|
|
158
|
-
if (!
|
|
194
|
+
async function nt(e) {
|
|
195
|
+
if (!ce())
|
|
159
196
|
return;
|
|
160
197
|
let a = !1, t;
|
|
161
|
-
const
|
|
198
|
+
const o = (n) => {
|
|
162
199
|
t = n, a = !0;
|
|
163
|
-
},
|
|
164
|
-
return
|
|
200
|
+
}, l = ue();
|
|
201
|
+
return p.on("confirmDlgResult" + l, o), p.emit("confirmDlg", { ...e, seq: l }), await Q(() => a), p.off("confirmDlgResult" + l, o), t;
|
|
165
202
|
}
|
|
166
|
-
async function
|
|
167
|
-
if (!
|
|
203
|
+
async function ct(e) {
|
|
204
|
+
if (!ce())
|
|
168
205
|
return;
|
|
169
206
|
let a = !1, t;
|
|
170
|
-
const
|
|
207
|
+
const o = (n) => {
|
|
171
208
|
t = n, a = !0;
|
|
172
|
-
},
|
|
173
|
-
return
|
|
209
|
+
}, l = ue();
|
|
210
|
+
return p.on("promptDlgResult" + l, o), p.emit("promptDlg", { ...e, seq: l }), await Q(() => a), p.off("promptDlgResult" + l, o), t;
|
|
174
211
|
}
|
|
175
|
-
function
|
|
176
|
-
|
|
212
|
+
function ut() {
|
|
213
|
+
p.emit("openWaitDlg");
|
|
177
214
|
}
|
|
178
215
|
function pt() {
|
|
179
|
-
|
|
216
|
+
p.emit("closeWaitDlg");
|
|
180
217
|
}
|
|
181
|
-
var
|
|
218
|
+
var Ee = /* @__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_calc_space = "list_calc_space", e.get_calc_space = "get_calc_space", e.create_calc_space = "create_calc_space", e.delete_calc_space = "delete_calc_space", e.update_calc_space = "update_calc_space", e.arrange_calc_space = "arrange_calc_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_calc_layer = "open_calc_layer", e.list_db_space = "list_db_space", e.get_db_space = "get_db_space", e.create_db_space = "create_db_space", e.delete_db_space = "delete_db_space", e.update_db_space = "update_db_space", e.arrange_db_space = "arrange_db_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_asset_space = "list_asset_space", e.get_asset_space = "get_asset_space", e.create_asset_space = "create_asset_space", e.delete_asset_space = "delete_asset_space", e.update_asset_space = "update_asset_space", e.arrange_asset_space = "arrange_asset_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_asset = "list_asset", e.get_asset = "get_asset", e.create_asset = "create_asset", e.delete_asset = "delete_asset", e.update_asset = "update_asset", e.move_asset = "move_asset", e.open_asset_layer = "open_asset_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))(Ee || {});
|
|
182
219
|
function te(e, a) {
|
|
183
220
|
if (!e)
|
|
184
221
|
return !1;
|
|
185
222
|
let t = e;
|
|
186
|
-
return Object.keys(t).length <= 0 || (a.split("/").forEach((
|
|
223
|
+
return Object.keys(t).length <= 0 || (a.split("/").forEach((l) => {
|
|
187
224
|
if (Object.keys(t).length <= 0)
|
|
188
225
|
return !0;
|
|
189
|
-
if (t[
|
|
190
|
-
t = t[
|
|
226
|
+
if (t[l])
|
|
227
|
+
t = t[l];
|
|
191
228
|
else
|
|
192
229
|
return !1;
|
|
193
230
|
}), Object.keys(t).length <= 0);
|
|
194
231
|
}
|
|
195
|
-
const _t =
|
|
196
|
-
function
|
|
232
|
+
const _t = f(1), ae = f(), st = f("en"), Ae = f({}), dt = f("");
|
|
233
|
+
function ft(e, a) {
|
|
197
234
|
const t = Ae.value[e];
|
|
198
235
|
return t ? a ? !(!te(t.includes, a) || te(t.excludes, a)) : !0 : !1;
|
|
199
236
|
}
|
|
200
|
-
function
|
|
201
|
-
|
|
237
|
+
function it(e, a) {
|
|
238
|
+
p.emit("message", { type: "error", text: e, timeout: a });
|
|
202
239
|
}
|
|
203
|
-
function
|
|
204
|
-
|
|
240
|
+
function gt(e, a) {
|
|
241
|
+
p.emit("message", { type: "info", text: e, timeout: a });
|
|
205
242
|
}
|
|
206
|
-
function
|
|
207
|
-
|
|
243
|
+
function vt(e, a) {
|
|
244
|
+
p.emit("message", { type: "success", text: e, timeout: a });
|
|
208
245
|
}
|
|
209
|
-
function
|
|
210
|
-
|
|
246
|
+
function mt(e, a) {
|
|
247
|
+
p.emit("message", { type: "warning", text: e, timeout: a });
|
|
211
248
|
}
|
|
212
|
-
function
|
|
213
|
-
var
|
|
249
|
+
function ht(e) {
|
|
250
|
+
var o, l;
|
|
214
251
|
if (!window.appAppear) {
|
|
215
252
|
window.appAppear = !0;
|
|
216
253
|
return;
|
|
217
254
|
}
|
|
218
|
-
const a = "single-spa-application:" + e, t = (
|
|
219
|
-
t && (t.remove("app-left", "app-right", "app-reset"), (
|
|
255
|
+
const a = "single-spa-application:" + e, t = (o = document.getElementById(a)) == null ? void 0 : o.classList;
|
|
256
|
+
t && (t.remove("app-left", "app-right", "app-reset"), (l = window.routeExtras) != null && l.forward ? t.add("app-left") : t.add("app-right"), setTimeout(() => {
|
|
220
257
|
t.add("app-reset");
|
|
221
258
|
}, 0));
|
|
222
259
|
}
|
|
223
|
-
const
|
|
260
|
+
const Ue = [
|
|
224
261
|
{ path: "/passport/login", level: 0 },
|
|
225
262
|
{ path: "/passport/loginAccount", level: 1 },
|
|
226
263
|
{ path: "/passport/register", level: 1 },
|
|
@@ -239,238 +276,166 @@ const Ee = [
|
|
|
239
276
|
{ path: "/calc", level: 1, requiredState: "org" },
|
|
240
277
|
{ path: "/data", level: 1, requiredState: "org" }
|
|
241
278
|
];
|
|
242
|
-
function
|
|
279
|
+
function Y(e) {
|
|
243
280
|
let a, t = 0;
|
|
244
|
-
const
|
|
245
|
-
return
|
|
246
|
-
const n =
|
|
281
|
+
const o = e.split("/").filter((l) => l.trim() !== "");
|
|
282
|
+
return Ue.forEach((l) => {
|
|
283
|
+
const n = l.path.split("/").filter((c) => c.trim() !== "");
|
|
247
284
|
let r = 0;
|
|
248
|
-
for (let c = 0; c <
|
|
285
|
+
for (let c = 0; c < o.length && !(c >= n.length || o[c] !== n[c]); c++)
|
|
249
286
|
r++;
|
|
250
|
-
r > 0 && r >= t && (a =
|
|
287
|
+
r > 0 && r >= t && (a = l, t = r);
|
|
251
288
|
}), a;
|
|
252
289
|
}
|
|
253
|
-
function
|
|
290
|
+
function le(e) {
|
|
254
291
|
if (e === "/")
|
|
255
292
|
return { app: "", path: "/", level: -1 };
|
|
256
|
-
const a =
|
|
293
|
+
const a = Y(e);
|
|
257
294
|
if (!a)
|
|
258
295
|
return { app: "invalidApp", path: "/invalidApp/invalidRoute", level: -1 };
|
|
259
296
|
const t = e.split("/");
|
|
260
297
|
return console.assert(t.length >= 2), { app: t[1], path: a.path, level: a.level };
|
|
261
298
|
}
|
|
262
|
-
const oe =
|
|
263
|
-
function
|
|
264
|
-
const t =
|
|
299
|
+
const oe = f("");
|
|
300
|
+
function k(e, a) {
|
|
301
|
+
const t = le(e), o = le(a), l = t.app === o.app, n = t.path === o.path, r = t.level >= o.level;
|
|
265
302
|
console.info(
|
|
266
|
-
`~~~~before route change~~~~ ${
|
|
267
|
-
),
|
|
303
|
+
`~~~~before route change~~~~ ${o.path} -> ${t.path} inner=${l} forward=${r}`
|
|
304
|
+
), l ? n ? oe.value = "" : oe.value = r ? "inner-left" : "inner-right" : window.routeExtras = { forward: r };
|
|
268
305
|
}
|
|
269
306
|
function Be() {
|
|
270
|
-
return !!
|
|
307
|
+
return !!O.get("accessToken");
|
|
271
308
|
}
|
|
272
309
|
function Me() {
|
|
273
|
-
return !!
|
|
310
|
+
return !!O.get("activeOrg");
|
|
274
311
|
}
|
|
275
|
-
function
|
|
276
|
-
const
|
|
312
|
+
function wt(e, a, t) {
|
|
313
|
+
const o = Be(), l = Me(), n = Y(e.path);
|
|
277
314
|
if (!n) {
|
|
278
315
|
t();
|
|
279
316
|
return;
|
|
280
317
|
}
|
|
281
318
|
if (n.requiredState === "auth")
|
|
282
|
-
if (
|
|
283
|
-
if (
|
|
319
|
+
if (o)
|
|
320
|
+
if (l) {
|
|
284
321
|
const r = "/main";
|
|
285
|
-
|
|
322
|
+
k(r, a.path), t({ path: r });
|
|
286
323
|
} else
|
|
287
|
-
|
|
324
|
+
k(e.path, a.path), t();
|
|
288
325
|
else {
|
|
289
326
|
const r = "/passport/login";
|
|
290
|
-
|
|
327
|
+
k(r, a.path), t({ path: r });
|
|
291
328
|
}
|
|
292
329
|
else if (n.requiredState === "org")
|
|
293
|
-
if (
|
|
294
|
-
if (
|
|
295
|
-
|
|
330
|
+
if (o)
|
|
331
|
+
if (l)
|
|
332
|
+
k(e.path, a.path), t();
|
|
296
333
|
else {
|
|
297
334
|
const r = "/org/joinOrCreate";
|
|
298
|
-
|
|
335
|
+
k(r, a.path), t({ path: r });
|
|
299
336
|
}
|
|
300
337
|
else {
|
|
301
338
|
const r = "/passport/login";
|
|
302
|
-
|
|
339
|
+
k(r, a.path), t({ path: r });
|
|
303
340
|
}
|
|
304
|
-
else if (
|
|
305
|
-
if (
|
|
341
|
+
else if (o)
|
|
342
|
+
if (l) {
|
|
306
343
|
const r = "/main";
|
|
307
|
-
|
|
344
|
+
k(r, a.path), t({ path: r });
|
|
308
345
|
} else {
|
|
309
346
|
const r = "/org/joinOrCreate";
|
|
310
|
-
|
|
347
|
+
k(r, a.path), t({ path: r });
|
|
311
348
|
}
|
|
312
349
|
else
|
|
313
|
-
|
|
314
|
-
}
|
|
315
|
-
const Ue = le(
|
|
316
|
-
"global",
|
|
317
|
-
() => {
|
|
318
|
-
const e = H(), a = d(!0), t = d(1), l = d(), o = d("en"), n = d({}), r = d("");
|
|
319
|
-
return N(
|
|
320
|
-
l,
|
|
321
|
-
() => {
|
|
322
|
-
s.emit("darkchange", l.value), e.global.name.value = l.value ? "dark" : "light";
|
|
323
|
-
},
|
|
324
|
-
{
|
|
325
|
-
immediate: !0
|
|
326
|
-
}
|
|
327
|
-
), {
|
|
328
|
-
running: a,
|
|
329
|
-
mainActive: t,
|
|
330
|
-
dark: l,
|
|
331
|
-
locale: o,
|
|
332
|
-
permissionObjects: n,
|
|
333
|
-
permissionChecksum: r
|
|
334
|
-
};
|
|
335
|
-
},
|
|
336
|
-
{
|
|
337
|
-
persist: [
|
|
338
|
-
{
|
|
339
|
-
storage: localStorage,
|
|
340
|
-
paths: [
|
|
341
|
-
"mainActive",
|
|
342
|
-
"dark",
|
|
343
|
-
"locale",
|
|
344
|
-
"permissionObjects",
|
|
345
|
-
"permissionChecksum"
|
|
346
|
-
]
|
|
347
|
-
}
|
|
348
|
-
]
|
|
349
|
-
}
|
|
350
|
-
), ue = le("viewMgr", () => {
|
|
351
|
-
const e = d([]);
|
|
352
|
-
function a() {
|
|
353
|
-
return e.value.length <= 0;
|
|
354
|
-
}
|
|
355
|
-
function t() {
|
|
356
|
-
const u = e.value.length;
|
|
357
|
-
if (u > 0)
|
|
358
|
-
return e.value[u - 1];
|
|
359
|
-
}
|
|
360
|
-
function l(u) {
|
|
361
|
-
return e.value.find((_) => _ === u) !== void 0;
|
|
362
|
-
}
|
|
363
|
-
function o(u) {
|
|
364
|
-
e.value.push(u);
|
|
365
|
-
}
|
|
366
|
-
function n(u) {
|
|
367
|
-
const _ = e.value.findIndex((v) => v === u);
|
|
368
|
-
_ !== -1 && e.value.splice(_, e.value.length - _);
|
|
369
|
-
}
|
|
370
|
-
function r() {
|
|
371
|
-
console.assert(e.value.length > 0), e.value.pop();
|
|
372
|
-
}
|
|
373
|
-
function c() {
|
|
374
|
-
e.value = [];
|
|
375
|
-
}
|
|
376
|
-
return {
|
|
377
|
-
views: e,
|
|
378
|
-
isEmpty: a,
|
|
379
|
-
lastView: t,
|
|
380
|
-
hasView: l,
|
|
381
|
-
addView: o,
|
|
382
|
-
delView: n,
|
|
383
|
-
popView: r,
|
|
384
|
-
clearViews: c
|
|
385
|
-
};
|
|
386
|
-
});
|
|
350
|
+
k(e.path, a.path), t();
|
|
351
|
+
}
|
|
387
352
|
function Z(e, a) {
|
|
388
|
-
const t =
|
|
353
|
+
const t = ne(), o = i({
|
|
389
354
|
get() {
|
|
390
355
|
return t.hasView(e);
|
|
391
356
|
},
|
|
392
357
|
set(n) {
|
|
393
358
|
n ? t.addView(e) : t.delView(e);
|
|
394
359
|
}
|
|
395
|
-
}),
|
|
396
|
-
a == null || a(n),
|
|
360
|
+
}), l = (n) => {
|
|
361
|
+
a == null || a(n), o.value = !0;
|
|
397
362
|
};
|
|
398
|
-
return
|
|
399
|
-
|
|
400
|
-
}),
|
|
401
|
-
|
|
402
|
-
}), { open:
|
|
363
|
+
return C(() => {
|
|
364
|
+
p.on(e, l);
|
|
365
|
+
}), S(() => {
|
|
366
|
+
p.off(e, l);
|
|
367
|
+
}), { open: o };
|
|
403
368
|
}
|
|
404
|
-
const $e = /* @__PURE__ */
|
|
369
|
+
const $e = /* @__PURE__ */ j({
|
|
405
370
|
__name: "index",
|
|
406
371
|
setup(e) {
|
|
407
|
-
const a =
|
|
408
|
-
var
|
|
409
|
-
return ((
|
|
410
|
-
}), u =
|
|
411
|
-
var
|
|
412
|
-
return ((
|
|
413
|
-
}),
|
|
414
|
-
var
|
|
415
|
-
return ((
|
|
416
|
-
}),
|
|
417
|
-
var
|
|
418
|
-
return ((
|
|
372
|
+
const a = G(), { open: t } = Z("confirmDlg"), o = f(""), l = f(""), n = f(), r = f(), c = i(() => {
|
|
373
|
+
var d;
|
|
374
|
+
return ((d = n.value) == null ? void 0 : d.color) ?? "primary";
|
|
375
|
+
}), u = i(() => {
|
|
376
|
+
var d;
|
|
377
|
+
return ((d = n.value) == null ? void 0 : d.text) ?? a.t("cancel");
|
|
378
|
+
}), s = i(() => {
|
|
379
|
+
var d;
|
|
380
|
+
return ((d = r.value) == null ? void 0 : d.color) ?? "primary";
|
|
381
|
+
}), h = i(() => {
|
|
382
|
+
var d;
|
|
383
|
+
return ((d = r.value) == null ? void 0 : d.text) ?? a.t("confirm");
|
|
419
384
|
});
|
|
420
|
-
let
|
|
421
|
-
const
|
|
422
|
-
|
|
385
|
+
let q = 0, D = !1;
|
|
386
|
+
const M = (d) => {
|
|
387
|
+
o.value = d.title, l.value = d.text, n.value = d.cancel, r.value = d.confirm, q = d.seq, D = !1, t.value = !0;
|
|
423
388
|
};
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
}),
|
|
427
|
-
|
|
389
|
+
C(() => {
|
|
390
|
+
p.on("confirmDlg", M);
|
|
391
|
+
}), S(() => {
|
|
392
|
+
p.off("confirmDlg", M);
|
|
428
393
|
});
|
|
429
|
-
const
|
|
430
|
-
t.value = !1,
|
|
394
|
+
const $ = () => {
|
|
395
|
+
t.value = !1, D || (p.emit("confirmDlgResult" + q, !0), D = !0);
|
|
431
396
|
};
|
|
432
|
-
return
|
|
433
|
-
!
|
|
434
|
-
}), (
|
|
435
|
-
const
|
|
436
|
-
return
|
|
437
|
-
modelValue:
|
|
438
|
-
"onUpdate:modelValue":
|
|
397
|
+
return K(t, (d) => {
|
|
398
|
+
!d && !D && (p.emit("confirmDlgResult" + q, !1), D = !0);
|
|
399
|
+
}), (d, x) => {
|
|
400
|
+
const V = v("v-card-text"), E = v("v-btn"), W = v("v-card-actions"), _ = v("v-card"), w = v("v-dialog");
|
|
401
|
+
return b(), T(w, {
|
|
402
|
+
modelValue: L(t),
|
|
403
|
+
"onUpdate:modelValue": x[1] || (x[1] = (A) => J(t) ? t.value = A : null),
|
|
439
404
|
onKeydown: [
|
|
440
|
-
|
|
441
|
-
|
|
405
|
+
x[2] || (x[2] = F(B((A) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
406
|
+
F(B($, ["stop", "prevent"]), ["enter"])
|
|
442
407
|
],
|
|
443
408
|
transition: "dialog-top-transition",
|
|
444
409
|
"max-width": "600px"
|
|
445
410
|
}, {
|
|
446
|
-
default:
|
|
447
|
-
|
|
448
|
-
default:
|
|
449
|
-
|
|
450
|
-
default:
|
|
451
|
-
|
|
411
|
+
default: m(() => [
|
|
412
|
+
y(_, { title: o.value }, {
|
|
413
|
+
default: m(() => [
|
|
414
|
+
y(V, null, {
|
|
415
|
+
default: m(() => [
|
|
416
|
+
I(R(l.value), 1)
|
|
452
417
|
]),
|
|
453
418
|
_: 1
|
|
454
419
|
}),
|
|
455
|
-
|
|
456
|
-
default:
|
|
457
|
-
|
|
458
|
-
onClick:
|
|
420
|
+
y(W, { class: "d-flex justify-end" }, {
|
|
421
|
+
default: m(() => [
|
|
422
|
+
y(E, {
|
|
423
|
+
onClick: x[0] || (x[0] = (A) => t.value = !1),
|
|
459
424
|
color: c.value,
|
|
460
425
|
variant: "text"
|
|
461
426
|
}, {
|
|
462
|
-
default:
|
|
463
|
-
|
|
427
|
+
default: m(() => [
|
|
428
|
+
I(R(u.value), 1)
|
|
464
429
|
]),
|
|
465
430
|
_: 1
|
|
466
431
|
}, 8, ["color"]),
|
|
467
|
-
|
|
468
|
-
onClick:
|
|
469
|
-
color:
|
|
432
|
+
y(E, {
|
|
433
|
+
onClick: $,
|
|
434
|
+
color: s.value,
|
|
470
435
|
variant: "text"
|
|
471
436
|
}, {
|
|
472
|
-
default:
|
|
473
|
-
|
|
437
|
+
default: m(() => [
|
|
438
|
+
I(R(h.value), 1)
|
|
474
439
|
]),
|
|
475
440
|
_: 1
|
|
476
441
|
}, 8, ["color"])
|
|
@@ -485,22 +450,22 @@ const $e = /* @__PURE__ */ M({
|
|
|
485
450
|
}, 8, ["modelValue", "onKeydown"]);
|
|
486
451
|
};
|
|
487
452
|
}
|
|
488
|
-
}),
|
|
489
|
-
/* @__PURE__ */
|
|
490
|
-
/* @__PURE__ */
|
|
491
|
-
/* @__PURE__ */
|
|
492
|
-
/* @__PURE__ */
|
|
493
|
-
/* @__PURE__ */
|
|
494
|
-
/* @__PURE__ */
|
|
495
|
-
/* @__PURE__ */
|
|
496
|
-
/* @__PURE__ */
|
|
497
|
-
/* @__PURE__ */
|
|
498
|
-
/* @__PURE__ */
|
|
499
|
-
/* @__PURE__ */
|
|
500
|
-
/* @__PURE__ */
|
|
501
|
-
], -1)),
|
|
502
|
-
|
|
503
|
-
],
|
|
453
|
+
}), We = (e) => (ve("data-v-f4ad116e"), e = e(), me(), e), ze = /* @__PURE__ */ We(() => /* @__PURE__ */ g("div", { class: "lds-spinner" }, [
|
|
454
|
+
/* @__PURE__ */ g("div"),
|
|
455
|
+
/* @__PURE__ */ g("div"),
|
|
456
|
+
/* @__PURE__ */ g("div"),
|
|
457
|
+
/* @__PURE__ */ g("div"),
|
|
458
|
+
/* @__PURE__ */ g("div"),
|
|
459
|
+
/* @__PURE__ */ g("div"),
|
|
460
|
+
/* @__PURE__ */ g("div"),
|
|
461
|
+
/* @__PURE__ */ g("div"),
|
|
462
|
+
/* @__PURE__ */ g("div"),
|
|
463
|
+
/* @__PURE__ */ g("div"),
|
|
464
|
+
/* @__PURE__ */ g("div"),
|
|
465
|
+
/* @__PURE__ */ g("div")
|
|
466
|
+
], -1)), Le = [
|
|
467
|
+
ze
|
|
468
|
+
], Fe = /* @__PURE__ */ j({
|
|
504
469
|
__name: "index",
|
|
505
470
|
props: {
|
|
506
471
|
zIndex: {
|
|
@@ -509,21 +474,21 @@ const $e = /* @__PURE__ */ M({
|
|
|
509
474
|
}
|
|
510
475
|
},
|
|
511
476
|
setup(e) {
|
|
512
|
-
const a =
|
|
477
|
+
const a = N(), t = e, o = i(() => ({
|
|
513
478
|
background: a.current.value.dark ? "#1e1e1e" : "#ffffff",
|
|
514
479
|
zIndex: t.zIndex
|
|
515
480
|
}));
|
|
516
|
-
return (
|
|
481
|
+
return (l, n) => (b(), H("div", {
|
|
517
482
|
class: "x-cont",
|
|
518
|
-
style: ge(
|
|
519
|
-
},
|
|
483
|
+
style: ge(o.value)
|
|
484
|
+
}, Le, 4));
|
|
520
485
|
}
|
|
521
|
-
}),
|
|
486
|
+
}), pe = (e, a) => {
|
|
522
487
|
const t = e.__vccOpts || e;
|
|
523
|
-
for (const [
|
|
524
|
-
t[
|
|
488
|
+
for (const [o, l] of a)
|
|
489
|
+
t[o] = l;
|
|
525
490
|
return t;
|
|
526
|
-
},
|
|
491
|
+
}, Ke = /* @__PURE__ */ pe(Fe, [["__scopeId", "data-v-f4ad116e"]]), Ne = /* @__PURE__ */ j({
|
|
527
492
|
__name: "item",
|
|
528
493
|
props: {
|
|
529
494
|
id: {},
|
|
@@ -533,18 +498,18 @@ const $e = /* @__PURE__ */ M({
|
|
|
533
498
|
},
|
|
534
499
|
emits: ["timeout"],
|
|
535
500
|
setup(e, { emit: a }) {
|
|
536
|
-
const t = e,
|
|
537
|
-
return
|
|
501
|
+
const t = e, o = f(!0), l = a;
|
|
502
|
+
return C(() => {
|
|
538
503
|
setTimeout(() => {
|
|
539
|
-
|
|
504
|
+
l("timeout", t.id);
|
|
540
505
|
}, t.timeout);
|
|
541
|
-
}),
|
|
542
|
-
n ||
|
|
506
|
+
}), K(o, (n) => {
|
|
507
|
+
n || l("timeout", t.id);
|
|
543
508
|
}), (n, r) => {
|
|
544
|
-
const c =
|
|
545
|
-
return
|
|
546
|
-
modelValue:
|
|
547
|
-
"onUpdate:modelValue": r[0] || (r[0] = (u) =>
|
|
509
|
+
const c = v("v-alert");
|
|
510
|
+
return b(), T(c, {
|
|
511
|
+
modelValue: o.value,
|
|
512
|
+
"onUpdate:modelValue": r[0] || (r[0] = (u) => o.value = u),
|
|
548
513
|
class: "mt-2",
|
|
549
514
|
"max-width": "90%",
|
|
550
515
|
width: "500px",
|
|
@@ -556,128 +521,128 @@ const $e = /* @__PURE__ */ M({
|
|
|
556
521
|
}, null, 8, ["modelValue", "type", "text"]);
|
|
557
522
|
};
|
|
558
523
|
}
|
|
559
|
-
}), He = /* @__PURE__ */
|
|
524
|
+
}), He = /* @__PURE__ */ j({
|
|
560
525
|
__name: "index",
|
|
561
526
|
setup(e) {
|
|
562
527
|
const a = he({ items: [] });
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
}),
|
|
566
|
-
|
|
528
|
+
C(() => {
|
|
529
|
+
p.on("message", t);
|
|
530
|
+
}), S(() => {
|
|
531
|
+
p.off("message", t);
|
|
567
532
|
});
|
|
568
533
|
const t = (c) => {
|
|
569
534
|
n(c.type, c.text, c.timeout);
|
|
570
|
-
},
|
|
535
|
+
}, o = (c) => {
|
|
571
536
|
r(c);
|
|
572
537
|
};
|
|
573
|
-
let
|
|
574
|
-
const n = (c, u,
|
|
575
|
-
const
|
|
576
|
-
a.items.push({ id:
|
|
538
|
+
let l = 0;
|
|
539
|
+
const n = (c, u, s) => {
|
|
540
|
+
const h = l++;
|
|
541
|
+
a.items.push({ id: h, type: c, text: u, timeout: s });
|
|
577
542
|
}, r = (c) => {
|
|
578
|
-
const u = a.items.findIndex((
|
|
543
|
+
const u = a.items.findIndex((s) => s.id === c);
|
|
579
544
|
u >= 0 && a.items.splice(u, 1);
|
|
580
545
|
};
|
|
581
|
-
return (c, u) => (
|
|
582
|
-
onClick: u[0] || (u[0] =
|
|
546
|
+
return (c, u) => (b(), H("div", {
|
|
547
|
+
onClick: u[0] || (u[0] = B(() => {
|
|
583
548
|
}, ["stop"])),
|
|
584
549
|
class: "x-cont d-flex flex-column-reverse align-center"
|
|
585
550
|
}, [
|
|
586
|
-
(
|
|
587
|
-
onTimeout:
|
|
588
|
-
id:
|
|
589
|
-
type:
|
|
590
|
-
text:
|
|
591
|
-
timeout:
|
|
592
|
-
key:
|
|
551
|
+
(b(!0), H(we, null, ye(a.items, (s) => (b(), T(Ne, {
|
|
552
|
+
onTimeout: o,
|
|
553
|
+
id: s.id,
|
|
554
|
+
type: s.type,
|
|
555
|
+
text: s.text,
|
|
556
|
+
timeout: s.timeout,
|
|
557
|
+
key: s.id
|
|
593
558
|
}, null, 8, ["id", "type", "text", "timeout"]))), 128))
|
|
594
559
|
]));
|
|
595
560
|
}
|
|
596
|
-
}),
|
|
561
|
+
}), Xe = /* @__PURE__ */ pe(He, [["__scopeId", "data-v-0ce1c82d"]]), Je = /* @__PURE__ */ j({
|
|
597
562
|
__name: "index",
|
|
598
563
|
setup(e) {
|
|
599
|
-
const a =
|
|
600
|
-
var
|
|
601
|
-
return ((
|
|
602
|
-
}),
|
|
603
|
-
var
|
|
604
|
-
return ((
|
|
605
|
-
}),
|
|
606
|
-
var
|
|
607
|
-
return ((
|
|
608
|
-
}),
|
|
609
|
-
var
|
|
610
|
-
return ((
|
|
611
|
-
}),
|
|
612
|
-
let
|
|
613
|
-
const
|
|
614
|
-
var
|
|
615
|
-
|
|
564
|
+
const a = G(), { open: t } = Z("promptDlg"), o = f(""), l = f(""), n = f(), r = f(), c = f(), u = f(""), s = f(), h = f(), q = i(() => {
|
|
565
|
+
var _;
|
|
566
|
+
return ((_ = s.value) == null ? void 0 : _.color) ?? "primary";
|
|
567
|
+
}), D = i(() => {
|
|
568
|
+
var _;
|
|
569
|
+
return ((_ = s.value) == null ? void 0 : _.text) ?? a.t("cancel");
|
|
570
|
+
}), M = i(() => {
|
|
571
|
+
var _;
|
|
572
|
+
return ((_ = h.value) == null ? void 0 : _.color) ?? "primary";
|
|
573
|
+
}), $ = i(() => {
|
|
574
|
+
var _;
|
|
575
|
+
return ((_ = h.value) == null ? void 0 : _.text) ?? a.t("confirm");
|
|
576
|
+
}), d = f();
|
|
577
|
+
let x = 0, V = !1;
|
|
578
|
+
const E = async (_) => {
|
|
579
|
+
var w;
|
|
580
|
+
o.value = _.title, l.value = _.text, n.value = _.label, r.value = _.placeholder, c.value = _.rules, u.value = _.value, s.value = _.cancel, h.value = _.confirm, x = _.seq, V = !1, t.value = !0, await Q(() => d.value !== void 0, 1e3), (w = d.value) == null || w.focus();
|
|
616
581
|
};
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
}),
|
|
620
|
-
|
|
582
|
+
C(() => {
|
|
583
|
+
p.on("promptDlg", E);
|
|
584
|
+
}), S(() => {
|
|
585
|
+
p.off("promptDlg", E);
|
|
621
586
|
});
|
|
622
|
-
const
|
|
623
|
-
t.value = !1,
|
|
587
|
+
const W = () => {
|
|
588
|
+
t.value = !1, V || (p.emit("promptDlgResult" + x, u.value ?? ""), V = !0);
|
|
624
589
|
};
|
|
625
|
-
return
|
|
626
|
-
!
|
|
627
|
-
}), (
|
|
628
|
-
const
|
|
629
|
-
return
|
|
630
|
-
modelValue:
|
|
631
|
-
"onUpdate:modelValue":
|
|
590
|
+
return K(t, (_) => {
|
|
591
|
+
!_ && !V && (p.emit("promptDlgResult" + x, void 0), V = !0);
|
|
592
|
+
}), (_, w) => {
|
|
593
|
+
const A = v("v-card-text"), _e = v("v-text-field"), se = v("v-form"), P = v("v-btn"), de = v("v-card-actions"), fe = v("v-card"), ie = v("v-dialog");
|
|
594
|
+
return b(), T(ie, {
|
|
595
|
+
modelValue: L(t),
|
|
596
|
+
"onUpdate:modelValue": w[2] || (w[2] = (U) => J(t) ? t.value = U : null),
|
|
632
597
|
onKeydown: [
|
|
633
|
-
|
|
634
|
-
|
|
598
|
+
w[3] || (w[3] = F(B((U) => t.value = !1, ["stop", "prevent"]), ["esc"])),
|
|
599
|
+
F(B(W, ["stop", "prevent"]), ["enter"])
|
|
635
600
|
],
|
|
636
601
|
transition: "dialog-top-transition",
|
|
637
602
|
"max-width": "600px"
|
|
638
603
|
}, {
|
|
639
|
-
default:
|
|
640
|
-
|
|
641
|
-
default:
|
|
642
|
-
|
|
643
|
-
default:
|
|
644
|
-
|
|
604
|
+
default: m(() => [
|
|
605
|
+
y(fe, { title: o.value }, {
|
|
606
|
+
default: m(() => [
|
|
607
|
+
l.value ? (b(), T(A, { key: 0 }, {
|
|
608
|
+
default: m(() => [
|
|
609
|
+
I(R(l.value), 1)
|
|
645
610
|
]),
|
|
646
611
|
_: 1
|
|
647
612
|
})) : xe("", !0),
|
|
648
|
-
|
|
649
|
-
default:
|
|
650
|
-
|
|
613
|
+
y(se, { class: "mx-3" }, {
|
|
614
|
+
default: m(() => [
|
|
615
|
+
y(_e, {
|
|
651
616
|
modelValue: u.value,
|
|
652
|
-
"onUpdate:modelValue":
|
|
617
|
+
"onUpdate:modelValue": w[0] || (w[0] = (U) => u.value = U),
|
|
653
618
|
label: n.value,
|
|
654
619
|
placeholder: r.value,
|
|
655
620
|
rules: c.value,
|
|
656
621
|
ref_key: "target",
|
|
657
|
-
ref:
|
|
622
|
+
ref: d
|
|
658
623
|
}, null, 8, ["modelValue", "label", "placeholder", "rules"])
|
|
659
624
|
]),
|
|
660
625
|
_: 1
|
|
661
626
|
}),
|
|
662
|
-
|
|
663
|
-
default:
|
|
664
|
-
|
|
665
|
-
onClick:
|
|
666
|
-
color:
|
|
627
|
+
y(de, { class: "d-flex justify-end" }, {
|
|
628
|
+
default: m(() => [
|
|
629
|
+
y(P, {
|
|
630
|
+
onClick: w[1] || (w[1] = (U) => t.value = !1),
|
|
631
|
+
color: q.value,
|
|
667
632
|
variant: "text"
|
|
668
633
|
}, {
|
|
669
|
-
default:
|
|
670
|
-
|
|
634
|
+
default: m(() => [
|
|
635
|
+
I(R(D.value), 1)
|
|
671
636
|
]),
|
|
672
637
|
_: 1
|
|
673
638
|
}, 8, ["color"]),
|
|
674
|
-
|
|
675
|
-
onClick:
|
|
676
|
-
color:
|
|
639
|
+
y(P, {
|
|
640
|
+
onClick: W,
|
|
641
|
+
color: M.value,
|
|
677
642
|
variant: "text"
|
|
678
643
|
}, {
|
|
679
|
-
default:
|
|
680
|
-
|
|
644
|
+
default: m(() => [
|
|
645
|
+
I(R($.value), 1)
|
|
681
646
|
]),
|
|
682
647
|
_: 1
|
|
683
648
|
}, 8, ["color"])
|
|
@@ -692,37 +657,37 @@ const $e = /* @__PURE__ */ M({
|
|
|
692
657
|
}, 8, ["modelValue", "onKeydown"]);
|
|
693
658
|
};
|
|
694
659
|
}
|
|
695
|
-
}), Ge = { class: "mx-auto my-auto" }, Qe = { class: "d-flex align-center justify-center w-100 h-100" }, Ye = /* @__PURE__ */
|
|
660
|
+
}), Ge = { class: "mx-auto my-auto" }, Qe = { class: "d-flex align-center justify-center w-100 h-100" }, Ye = /* @__PURE__ */ j({
|
|
696
661
|
__name: "index",
|
|
697
662
|
setup(e) {
|
|
698
|
-
const a =
|
|
663
|
+
const a = G(), { open: t } = Z("waitDlg"), o = () => {
|
|
699
664
|
t.value = !0;
|
|
700
|
-
},
|
|
665
|
+
}, l = () => {
|
|
701
666
|
t.value = !1;
|
|
702
667
|
};
|
|
703
|
-
return
|
|
704
|
-
|
|
705
|
-
}),
|
|
706
|
-
|
|
668
|
+
return C(() => {
|
|
669
|
+
p.on("openWaitDlg", o), p.on("closeWaitDlg", l);
|
|
670
|
+
}), S(() => {
|
|
671
|
+
p.off("openWaitDlg", o), p.off("closeWaitDlg", l);
|
|
707
672
|
}), (n, r) => {
|
|
708
|
-
const c =
|
|
709
|
-
return
|
|
710
|
-
modelValue:
|
|
711
|
-
"onUpdate:modelValue": r[0] || (r[0] = (
|
|
673
|
+
const c = v("v-card"), u = v("v-dialog");
|
|
674
|
+
return b(), T(u, {
|
|
675
|
+
modelValue: L(t),
|
|
676
|
+
"onUpdate:modelValue": r[0] || (r[0] = (s) => J(t) ? t.value = s : null),
|
|
712
677
|
persistent: "",
|
|
713
678
|
"no-click-animation": "",
|
|
714
679
|
fullscreen: ""
|
|
715
680
|
}, {
|
|
716
|
-
default:
|
|
717
|
-
|
|
718
|
-
|
|
681
|
+
default: m(() => [
|
|
682
|
+
g("div", Ge, [
|
|
683
|
+
y(c, {
|
|
719
684
|
width: "300px",
|
|
720
685
|
height: "80px",
|
|
721
686
|
loading: ""
|
|
722
687
|
}, {
|
|
723
|
-
default:
|
|
724
|
-
|
|
725
|
-
|
|
688
|
+
default: m(() => [
|
|
689
|
+
g("div", Qe, [
|
|
690
|
+
g("span", null, R(L(a).t("waitingResponse")), 1)
|
|
726
691
|
])
|
|
727
692
|
]),
|
|
728
693
|
_: 1
|
|
@@ -734,137 +699,88 @@ const $e = /* @__PURE__ */ M({
|
|
|
734
699
|
};
|
|
735
700
|
}
|
|
736
701
|
}), Ze = (e) => {
|
|
737
|
-
e.component("x-confirm-dlg", $e), e.component("x-loading",
|
|
702
|
+
e.component("x-confirm-dlg", $e), e.component("x-loading", Ke), e.component("x-message", Xe), e.component("x-prompt-dlg", Je), e.component("x-wait-dlg", Ye);
|
|
738
703
|
};
|
|
739
|
-
function
|
|
740
|
-
const e =
|
|
704
|
+
function yt() {
|
|
705
|
+
const e = N(), a = i(() => e.global.current.value.colors.primary), t = i(() => e.global.current.value.colors.secondary), o = i(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), l = i(() => e.current.value.dark ? "#272727" : "#eeeeee"), n = i(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), r = i(() => e.current.value.dark ? "#303030" : "#f6f6f6"), c = i(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
|
|
741
706
|
return {
|
|
742
707
|
primaryColor: a,
|
|
743
708
|
secondaryColor: t,
|
|
744
|
-
backgroundColor0:
|
|
745
|
-
backgroundColor1:
|
|
709
|
+
backgroundColor0: o,
|
|
710
|
+
backgroundColor1: l,
|
|
746
711
|
backgroundColor2: n,
|
|
747
712
|
highlightColor: r,
|
|
748
713
|
borderColor: c
|
|
749
714
|
};
|
|
750
715
|
}
|
|
751
|
-
function
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
if (!
|
|
762
|
-
|
|
716
|
+
function xt() {
|
|
717
|
+
const e = De(), a = re(), t = N(), o = ne();
|
|
718
|
+
K(
|
|
719
|
+
ae,
|
|
720
|
+
() => {
|
|
721
|
+
t.global.name.value = ae.value ? "dark" : "light";
|
|
722
|
+
},
|
|
723
|
+
{ immediate: !0 }
|
|
724
|
+
);
|
|
725
|
+
const l = () => {
|
|
726
|
+
if (!o.isEmpty()) {
|
|
727
|
+
o.hasView("waitDlg") || o.popView();
|
|
763
728
|
return;
|
|
764
729
|
}
|
|
765
|
-
const
|
|
766
|
-
(
|
|
767
|
-
() => {
|
|
768
|
-
},
|
|
769
|
-
() => {
|
|
770
|
-
}
|
|
771
|
-
) : l.back();
|
|
730
|
+
const r = Y(e.path);
|
|
731
|
+
(r == null ? void 0 : r.level) === 0 || a.back();
|
|
772
732
|
};
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
}),
|
|
776
|
-
|
|
733
|
+
C(() => {
|
|
734
|
+
p.on("backbutton", l);
|
|
735
|
+
}), S(() => {
|
|
736
|
+
p.off("backbutton", l);
|
|
777
737
|
});
|
|
778
|
-
const
|
|
779
|
-
if (
|
|
780
|
-
|
|
781
|
-
return;
|
|
782
|
-
}
|
|
783
|
-
if (!e && f.ctrlKey && f.altKey && f.code === "KeyD") {
|
|
784
|
-
o.dark = !o.dark;
|
|
785
|
-
return;
|
|
786
|
-
}
|
|
787
|
-
if (!e && f.ctrlKey && f.altKey && f.code === "KeyL") {
|
|
788
|
-
o.locale === "en" ? o.locale = "zhHans" : o.locale = "en";
|
|
738
|
+
const n = (r) => {
|
|
739
|
+
if (r.key === "Escape") {
|
|
740
|
+
l();
|
|
789
741
|
return;
|
|
790
742
|
}
|
|
791
743
|
};
|
|
792
|
-
|
|
793
|
-
window.addEventListener("keydown",
|
|
794
|
-
}),
|
|
795
|
-
window.removeEventListener("keydown",
|
|
796
|
-
});
|
|
797
|
-
let v;
|
|
798
|
-
const D = async () => {
|
|
799
|
-
if (!o.running)
|
|
800
|
-
return;
|
|
801
|
-
const f = F(t.path);
|
|
802
|
-
if (!(!f || f.requiredState !== "org"))
|
|
803
|
-
try {
|
|
804
|
-
const { update: p, permissions: y } = await Pe(a, {
|
|
805
|
-
checksum: o.permissionChecksum
|
|
806
|
-
});
|
|
807
|
-
if (!p)
|
|
808
|
-
return;
|
|
809
|
-
const C = {};
|
|
810
|
-
for (const S in y) {
|
|
811
|
-
if (S === "checksum")
|
|
812
|
-
continue;
|
|
813
|
-
const I = y[S];
|
|
814
|
-
C[S] = JSON.parse(I);
|
|
815
|
-
}
|
|
816
|
-
o.permissionObjects = C, o.permissionChecksum = y.checksum ?? "";
|
|
817
|
-
} catch (p) {
|
|
818
|
-
console.error(p);
|
|
819
|
-
}
|
|
820
|
-
}, b = async (f) => {
|
|
821
|
-
f && await D(), clearTimeout(v), v = setTimeout(async () => {
|
|
822
|
-
await D(), v && b();
|
|
823
|
-
}, 3e3);
|
|
824
|
-
}, j = () => {
|
|
825
|
-
clearTimeout(v), v = void 0;
|
|
826
|
-
};
|
|
827
|
-
R(() => {
|
|
828
|
-
a && b(!0);
|
|
829
|
-
}), O(() => {
|
|
830
|
-
j();
|
|
744
|
+
C(() => {
|
|
745
|
+
window.addEventListener("keydown", n);
|
|
746
|
+
}), S(() => {
|
|
747
|
+
window.removeEventListener("keydown", n);
|
|
831
748
|
});
|
|
832
749
|
}
|
|
833
|
-
function
|
|
834
|
-
const e =
|
|
835
|
-
return { dark: t, sysBarAvail:
|
|
750
|
+
function kt() {
|
|
751
|
+
const e = N(), a = ke(), t = i(() => e.current.value.dark), o = i(() => !!window.cordova), l = i(() => a.width.value <= 1280 ? a.width.value + "px" : a.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
|
|
752
|
+
return { dark: t, sysBarAvail: o, compactWidth: l };
|
|
836
753
|
}
|
|
837
|
-
const
|
|
754
|
+
const bt = { install: Ze };
|
|
838
755
|
export {
|
|
839
|
-
|
|
840
|
-
|
|
756
|
+
Ee as Permission,
|
|
757
|
+
ht as appAppear,
|
|
841
758
|
pt as closeWaitDlg,
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
759
|
+
ot as createAxios,
|
|
760
|
+
ae as dark,
|
|
761
|
+
bt as default,
|
|
762
|
+
p as eventBus,
|
|
846
763
|
te as isExist,
|
|
847
|
-
|
|
764
|
+
st as locale,
|
|
848
765
|
_t as mainActive,
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
766
|
+
Y as matchRouteMeta,
|
|
767
|
+
it as messageError,
|
|
768
|
+
gt as messageInfo,
|
|
769
|
+
vt as messageSuccess,
|
|
770
|
+
mt as messageWarning,
|
|
771
|
+
wt as onBeforeEach,
|
|
772
|
+
nt as openConfirmDlg,
|
|
773
|
+
ct as openPromptDlg,
|
|
774
|
+
ut as openWaitDlg,
|
|
775
|
+
dt as permissionChecksum,
|
|
859
776
|
Ae as permissionObjects,
|
|
860
777
|
oe as routeTransName,
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
ue as useViewMgrStore,
|
|
778
|
+
yt as useColor,
|
|
779
|
+
xt as useMicroApp,
|
|
780
|
+
kt as useSystem,
|
|
781
|
+
ne as useViewMgrStore,
|
|
866
782
|
Z as useViewStack,
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
783
|
+
ft as verifyPermission,
|
|
784
|
+
rt as waitMs,
|
|
785
|
+
Q as waitUtil
|
|
870
786
|
};
|