x-essential-lib 0.5.73 → 0.5.75

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 CHANGED
@@ -1,22 +1,65 @@
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-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-8c2268ea]{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
- var ve = Object.defineProperty;
3
- var me = (e, t, a) => t in e ? ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
4
- var U = (e, t, a) => (me(e, typeof t != "symbol" ? t + "" : t, a), a);
5
- import { ref as i, watch as R, computed as f, onMounted as A, onBeforeUnmount as T, defineComponent as B, resolveComponent as v, openBlock as k, createBlock as I, unref as K, isRef as Y, withKeys as N, withModifiers as $, withCtx as m, createVNode as y, createTextVNode as O, toDisplayString as V, createElementBlock as J, normalizeStyle as he, pushScopeId as we, popScopeId as ye, createElementVNode as g, reactive as xe, Fragment as be, renderList as ke, createCommentVNode as Ce } from "vue";
6
- import { useLocale as Z, useTheme as P, useDisplay as Se } from "vuetify";
7
- import { defineStore as ne } from "pinia";
8
- import De from "axios";
9
- import { useRouter as re, useRoute as Re } from "vue-router";
2
+ import { ref as i, computed as g, onMounted as R, onBeforeUnmount as O, defineComponent as j, watch as X, resolveComponent as m, openBlock as C, createBlock as I, unref as z, isRef as J, withKeys as F, withModifiers as E, withCtx as h, createVNode as x, createTextVNode as q, toDisplayString as V, createElementBlock as H, normalizeStyle as ge, pushScopeId as ve, popScopeId as me, createElementVNode as v, reactive as he, Fragment as we, renderList as xe, createCommentVNode as ye } from "vue";
3
+ import { useLocale as Q, useTheme as Y, useDisplay as ke } from "vuetify";
4
+ import { defineStore as le } from "pinia";
5
+ import be from "axios";
6
+ import { useRouter as ne, useRoute as Ce } from "vue-router";
7
+ const Z = le("global", () => {
8
+ const e = i(), a = i("en"), t = i({}), l = i(""), o = i("");
9
+ return {
10
+ dark: e,
11
+ locale: a,
12
+ permissionObjects: t,
13
+ permissionChecksum: l,
14
+ lastAppPath: o
15
+ };
16
+ }), re = le("viewMgr", () => {
17
+ const e = i([]);
18
+ function a() {
19
+ return e.value.length <= 0;
20
+ }
21
+ function t() {
22
+ const p = e.value.length;
23
+ if (p > 0)
24
+ return e.value[p - 1];
25
+ }
26
+ function l(p) {
27
+ return e.value.find((_) => _ === p) !== void 0;
28
+ }
29
+ function o(p) {
30
+ e.value.push(p);
31
+ }
32
+ function r(p) {
33
+ const _ = e.value.findIndex((s) => s === p);
34
+ _ !== -1 && e.value.splice(_, 1);
35
+ }
36
+ function n() {
37
+ console.assert(e.value.length > 0), e.value.pop();
38
+ }
39
+ function c() {
40
+ e.value = [];
41
+ }
42
+ return {
43
+ views: e,
44
+ isEmpty: a,
45
+ lastView: t,
46
+ hasView: l,
47
+ addView: o,
48
+ delView: r,
49
+ popView: n,
50
+ clearViews: c
51
+ };
52
+ });
10
53
  /*! js-cookie v3.0.5 | MIT */
11
- function F(e) {
12
- for (var t = 1; t < arguments.length; t++) {
13
- var a = arguments[t];
14
- for (var l in a)
15
- e[l] = a[l];
54
+ function W(e) {
55
+ for (var a = 1; a < arguments.length; a++) {
56
+ var t = arguments[a];
57
+ for (var l in t)
58
+ e[l] = t[l];
16
59
  }
17
60
  return e;
18
61
  }
19
- var Ve = {
62
+ var De = {
20
63
  read: function(e) {
21
64
  return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
22
65
  },
@@ -27,23 +70,23 @@ var Ve = {
27
70
  );
28
71
  }
29
72
  };
30
- function Q(e, t) {
31
- function a(o, r, n) {
73
+ function G(e, a) {
74
+ function t(o, r, n) {
32
75
  if (!(typeof document > "u")) {
33
- n = F({}, t, n), typeof n.expires == "number" && (n.expires = new Date(Date.now() + n.expires * 864e5)), n.expires && (n.expires = n.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
34
- var s = "";
35
- for (var u in n)
36
- n[u] && (s += "; " + u, n[u] !== !0 && (s += "=" + n[u].split(";")[0]));
37
- return document.cookie = o + "=" + e.write(r, o) + s;
76
+ n = W({}, a, n), typeof n.expires == "number" && (n.expires = new Date(Date.now() + n.expires * 864e5)), n.expires && (n.expires = n.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
77
+ var c = "";
78
+ for (var p in n)
79
+ n[p] && (c += "; " + p, n[p] !== !0 && (c += "=" + n[p].split(";")[0]));
80
+ return document.cookie = o + "=" + e.write(r, o) + c;
38
81
  }
39
82
  }
40
83
  function l(o) {
41
84
  if (!(typeof document > "u" || arguments.length && !o)) {
42
- for (var r = document.cookie ? document.cookie.split("; ") : [], n = {}, s = 0; s < r.length; s++) {
43
- var u = r[s].split("="), _ = u.slice(1).join("=");
85
+ for (var r = document.cookie ? document.cookie.split("; ") : [], n = {}, c = 0; c < r.length; c++) {
86
+ var p = r[c].split("="), _ = p.slice(1).join("=");
44
87
  try {
45
- var h = decodeURIComponent(u[0]);
46
- if (n[h] = e.read(_, h), o === h)
88
+ var s = decodeURIComponent(p[0]);
89
+ if (n[s] = e.read(_, s), o === s)
47
90
  break;
48
91
  } catch {
49
92
  }
@@ -53,226 +96,170 @@ function Q(e, t) {
53
96
  }
54
97
  return Object.create(
55
98
  {
56
- set: a,
99
+ set: t,
57
100
  get: l,
58
101
  remove: function(o, r) {
59
- a(
102
+ t(
60
103
  o,
61
104
  "",
62
- F({}, r, {
105
+ W({}, r, {
63
106
  expires: -1
64
107
  })
65
108
  );
66
109
  },
67
110
  withAttributes: function(o) {
68
- return Q(this.converter, F({}, this.attributes, o));
111
+ return G(this.converter, W({}, this.attributes, o));
69
112
  },
70
113
  withConverter: function(o) {
71
- return Q(F({}, this.converter, o), this.attributes);
114
+ return G(W({}, this.converter, o), this.attributes);
72
115
  }
73
116
  },
74
117
  {
75
- attributes: { value: Object.freeze(t) },
118
+ attributes: { value: Object.freeze(a) },
76
119
  converter: { value: Object.freeze(e) }
77
120
  }
78
121
  );
79
122
  }
80
- var j = Q(Ve, { path: "/" });
81
- function ct(e) {
82
- const t = De.create({
123
+ var A = G(De, { path: "/" });
124
+ function ot(e) {
125
+ const a = be.create({
83
126
  timeout: 6e3
84
127
  });
85
- return t.defaults.baseURL = e.baseUrl, t.interceptors.request.use(
86
- (a) => Ae(a),
87
- (a) => {
88
- qe(a, e.onError);
128
+ return a.defaults.baseURL = e.baseUrl, a.interceptors.request.use(
129
+ (t) => Se(t),
130
+ (t) => {
131
+ Ve(t, e.onError);
89
132
  }
90
- ), t.interceptors.response.use(
91
- (a) => Oe(a),
92
- (a) => je(a, e.onError)
93
- ), t;
133
+ ), a.interceptors.response.use(
134
+ (t) => Re(t),
135
+ (t) => qe(t, e.onError)
136
+ ), a;
94
137
  }
95
- function Ae(e) {
96
- const t = j.get("accessToken") ?? "";
97
- return e.headers.Authorization = "Basic " + t, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
138
+ function Se(e) {
139
+ const a = A.get("accessToken") ?? "";
140
+ return e.headers.Authorization = "Basic " + a, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
98
141
  }
99
- function qe(e, t) {
100
- console.error(e), t("request timeout");
142
+ function Ve(e, a) {
143
+ console.error(e), a("request timeout");
101
144
  }
102
- function Oe(e) {
145
+ function Re(e) {
103
146
  return e.data;
104
147
  }
105
- function je(e, t) {
148
+ function qe(e, a) {
106
149
  var o;
107
- const a = e.response;
108
- if (!a)
150
+ const t = e.response;
151
+ if (!t)
109
152
  return Promise.reject(e);
110
- a.status === 401 && Ie();
111
- let l = (o = a.data) == null ? void 0 : o.message;
153
+ t.status === 401 && Ae();
154
+ let l = (o = t.data) == null ? void 0 : o.message;
112
155
  return l || (l = {
113
- code: a.status,
114
- message: a.statusText
115
- }), t(l), Promise.reject(e);
116
- }
117
- function Ie() {
118
- j.remove("accessToken"), j.remove("refreshToken"), j.remove("activeOrg"), re().replace({ path: "/passport/login" });
119
- }
120
- function Te(e) {
121
- return { all: e = e || /* @__PURE__ */ new Map(), on: function(t, a) {
122
- var l = e.get(t);
123
- l ? l.push(a) : e.set(t, [a]);
124
- }, off: function(t, a) {
125
- var l = e.get(t);
126
- l && (a ? l.splice(l.indexOf(a) >>> 0, 1) : e.set(t, []));
127
- }, emit: function(t, a) {
128
- var l = e.get(t);
156
+ code: t.status,
157
+ message: t.statusText
158
+ }), a(l), Promise.reject(e);
159
+ }
160
+ function Ae() {
161
+ A.remove("accessToken"), A.remove("refreshToken"), A.remove("activeOrg"), ne().replace({ path: "/passport/login" });
162
+ }
163
+ function Ie(e) {
164
+ return { all: e = e || /* @__PURE__ */ new Map(), on: function(a, t) {
165
+ var l = e.get(a);
166
+ l ? l.push(t) : e.set(a, [t]);
167
+ }, off: function(a, t) {
168
+ var l = e.get(a);
169
+ l && (t ? l.splice(l.indexOf(t) >>> 0, 1) : e.set(a, []));
170
+ }, emit: function(a, t) {
171
+ var l = e.get(a);
129
172
  l && l.slice().map(function(o) {
130
- o(a);
173
+ o(t);
131
174
  }), (l = e.get("*")) && l.slice().map(function(o) {
132
- o(t, a);
175
+ o(a, t);
133
176
  });
134
177
  } };
135
178
  }
136
- const c = function() {
137
- return window.eventBus || (window.eventBus = Te()), window.eventBus;
179
+ const u = function() {
180
+ return window.eventBus || (window.eventBus = Ie()), window.eventBus;
138
181
  }();
139
- async function st(e) {
140
- return new Promise((t) => {
141
- setTimeout(t, e);
182
+ async function lt(e) {
183
+ return new Promise((a) => {
184
+ setTimeout(a, e);
142
185
  });
143
186
  }
144
- async function ee(e, t, a) {
187
+ async function P(e, a, t) {
145
188
  const l = Date.now();
146
189
  return new Promise((o) => {
147
190
  const r = async () => {
148
- e() ? o(!0) : t && Date.now() - l > t ? o(!1) : setTimeout(r, a ?? 30);
191
+ e() ? o(!0) : a && Date.now() - l > a ? o(!1) : setTimeout(r, t ?? 30);
149
192
  };
150
193
  r();
151
194
  });
152
195
  }
153
- function Be(e, t) {
196
+ function Oe(e, a) {
154
197
  var o;
155
- const a = "single-spa-application:" + e, l = (o = document.getElementById(a)) == null ? void 0 : o.classList;
156
- l && (l.remove("app-left", "app-right", "app-reset"), t ? l.add("app-left") : l.add("app-right"), setTimeout(() => {
198
+ const t = "single-spa-application:" + e, l = (o = document.getElementById(t)) == null ? void 0 : o.classList;
199
+ l && (l.remove("app-left", "app-right", "app-reset"), a ? l.add("app-left") : l.add("app-right"), setTimeout(() => {
157
200
  l.add("app-reset");
158
201
  }, 50));
159
202
  }
160
- let oe = Date.now();
203
+ let ae = Date.now();
161
204
  function ce() {
162
205
  const e = Date.now();
163
- return e - oe > 500 ? (oe = e, !0) : !1;
206
+ return e - ae > 500 ? (ae = e, !0) : !1;
164
207
  }
165
- let Le = 0;
166
- function se() {
167
- return ++Le;
208
+ let je = 0;
209
+ function ue() {
210
+ return ++je;
168
211
  }
169
- async function ut(e) {
212
+ async function nt(e) {
170
213
  if (!ce())
171
214
  return;
172
- let t = !1, a;
215
+ let a = !1, t;
173
216
  const l = (r) => {
174
- a = r, t = !0;
175
- }, o = se();
176
- return c.on("confirmDlgResult" + o, l), c.emit("confirmDlg", { ...e, seq: o }), await ee(() => t), console.log("confirm dlg closed", o, t, a), c.off("confirmDlgResult" + o, l), a;
217
+ t = r, a = !0;
218
+ }, o = ue();
219
+ return u.on("confirmDlgResult" + o, l), u.emit("confirmDlg", { ...e, seq: o }), await P(() => a), console.log("confirm dlg closed", o, a, t), u.off("confirmDlgResult" + o, l), t;
177
220
  }
178
- async function pt(e) {
221
+ async function rt(e) {
179
222
  if (!ce())
180
223
  return;
181
- let t = !1, a;
224
+ let a = !1, t;
182
225
  const l = (r) => {
183
- a = r, t = !0;
184
- }, o = se();
185
- return c.on("promptDlgResult" + o, l), c.emit("promptDlg", { ...e, seq: o }), await ee(() => t), console.log("prompt dlg closed", o, t, a), c.off("promptDlgResult" + o, l), a;
186
- }
187
- function _t() {
188
- c.emit("openWaitDlg");
189
- }
190
- function dt() {
191
- c.emit("closeWaitDlg");
192
- }
193
- class it {
194
- constructor(t, a) {
195
- U(this, "master");
196
- U(this, "localeHook");
197
- U(this, "alreadySync", !1);
198
- U(this, "handlers", [
199
- (t) => this.onDarkChange(t),
200
- (t) => this.onLocaleChange(t),
201
- (t) => this.onPermissionChange(t),
202
- (t) => this.onLastAppPathChange(t),
203
- () => this.onSync()
204
- ]);
205
- this.master = t, this.localeHook = a, c.on("globalStateDarkChange", this.handlers[0]), c.on("globalStateLocaleChange", this.handlers[1]), c.on("globalStatePermissionChange", this.handlers[2]), c.on("globalStateLastAppPathChange", this.handlers[3]), this.master && c.on("globalStateSync", this.handlers[4]);
206
- }
207
- async sync() {
208
- var a;
209
- if (this.master) {
210
- console.assert(!1, "master can not call sync");
211
- return;
212
- }
213
- if (this.alreadySync) {
214
- console.assert(!1, "call sync duplicate");
215
- return;
216
- }
217
- c.emit("globalStateSync");
218
- const t = C();
219
- await ((a = this.localeHook) == null ? void 0 : a.call(this, t.locale)), this.alreadySync = !0;
220
- }
221
- dispose() {
222
- c.off("globalStateDarkChange", this.handlers[0]), c.off("globalStateLocaleChange", this.handlers[1]), c.off("globalStatePermissionChange", this.handlers[2]), c.off("globalStateLastAppPathChange", this.handlers[3]), this.master && c.off("globalStateSync", this.handlers[4]);
223
- }
224
- onDarkChange(t) {
225
- const a = C();
226
- a.dark = t;
227
- }
228
- onLocaleChange(t) {
229
- var l;
230
- const a = C();
231
- a.locale = t, this.alreadySync && ((l = this.localeHook) == null || l.call(this, t));
232
- }
233
- onPermissionChange(t) {
234
- const a = C();
235
- a.permissionObjects = t[0], a.permissionChecksum = t[1];
236
- }
237
- onLastAppPathChange(t) {
238
- const a = C();
239
- a.lastAppPath = t;
240
- }
241
- onSync() {
242
- const t = C();
243
- c.emit("globalStateDarkChange", t.dark), c.emit("globalStateLocaleChange", t.locale), c.emit("globalStatePermissionChange", [
244
- t.permissionObjects,
245
- t.permissionChecksum
246
- ]), c.emit("globalStateLastAppPathChange", t.lastAppPath);
247
- }
226
+ t = r, a = !0;
227
+ }, o = ue();
228
+ return u.on("promptDlgResult" + o, l), u.emit("promptDlg", { ...e, seq: o }), await P(() => a), console.log("prompt dlg closed", o, a, t), u.off("promptDlgResult" + o, l), t;
248
229
  }
249
- function ft(e, t) {
250
- c.emit("message", { type: "error", text: e, timeout: t });
230
+ function ct() {
231
+ u.emit("openWaitDlg");
251
232
  }
252
- function gt(e, t) {
253
- c.emit("message", { type: "info", text: e, timeout: t });
233
+ function ut() {
234
+ u.emit("closeWaitDlg");
254
235
  }
255
- function vt(e, t) {
256
- c.emit("message", { type: "success", text: e, timeout: t });
236
+ function pt(e, a) {
237
+ u.emit("message", { type: "error", text: e, timeout: a });
257
238
  }
258
- function mt(e, t) {
259
- c.emit("message", { type: "warning", text: e, timeout: t });
239
+ function st(e, a) {
240
+ u.emit("message", { type: "info", text: e, timeout: a });
260
241
  }
261
- 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 || {});
262
- function le(e, t) {
242
+ function _t(e, a) {
243
+ u.emit("message", { type: "success", text: e, timeout: a });
244
+ }
245
+ function dt(e, a) {
246
+ u.emit("message", { type: "warning", text: e, timeout: a });
247
+ }
248
+ var Te = /* @__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))(Te || {});
249
+ function oe(e, a) {
263
250
  if (!e)
264
251
  return !1;
265
- let a = e;
266
- return Object.keys(a).length <= 0 || (t.split("/").forEach((o) => {
267
- if (Object.keys(a).length <= 0)
252
+ let t = e;
253
+ return Object.keys(t).length <= 0 || (a.split("/").forEach((o) => {
254
+ if (Object.keys(t).length <= 0)
268
255
  return !0;
269
- if (a[o])
270
- a = a[o];
256
+ if (t[o])
257
+ t = t[o];
271
258
  else
272
259
  return !1;
273
- }), Object.keys(a).length <= 0);
260
+ }), Object.keys(t).length <= 0);
274
261
  }
275
- const Me = [
262
+ const Ue = [
276
263
  {
277
264
  app: "x-passport-mf",
278
265
  path: "/passport/login",
@@ -380,229 +367,164 @@ const Me = [
380
367
  mainActive: 2
381
368
  }
382
369
  ];
383
- function G(e) {
384
- let t, a = 0;
370
+ function K(e) {
371
+ let a, t = 0;
385
372
  const l = e.split("/").filter((o) => o.trim() !== "");
386
- return Me.forEach((o) => {
387
- const r = o.path.split("/").filter((s) => s.trim() !== "");
373
+ return Ue.forEach((o) => {
374
+ const r = o.path.split("/").filter((c) => c.trim() !== "");
388
375
  let n = 0;
389
- for (let s = 0; s < l.length && !(s >= r.length || l[s] !== r[s]); s++)
376
+ for (let c = 0; c < l.length && !(c >= r.length || l[c] !== r[c]); c++)
390
377
  n++;
391
- n > 0 && n >= a && (t = o, a = n);
392
- }), t;
393
- }
394
- const X = i("");
395
- function b(e, t) {
396
- const a = C();
397
- t === "/" && (t = a.lastAppPath);
398
- const l = G(e), o = G(t);
378
+ n > 0 && n >= t && (a = o, t = n);
379
+ }), a;
380
+ }
381
+ const N = i("");
382
+ function b(e, a) {
383
+ const t = Z();
384
+ a === "/" && (a = t.lastAppPath);
385
+ const l = K(e), o = K(a);
399
386
  if (!l) {
400
387
  console.assert(!1, "invalid to route meta");
401
388
  return;
402
389
  }
403
- if (console.info(`~~~~routeChange~~~~ ${t} -> ${e}`), !o)
390
+ if (console.info(`~~~~routeChange~~~~ ${a} -> ${e}`), !o)
404
391
  return;
405
- const r = l.app === o.app, n = l.path === o.path, s = l.level >= o.level;
406
- r ? n ? X.value = "" : X.value = s ? "inner-left" : "inner-right" : (X.value = "", Be(l.app, s));
392
+ const r = l.app === o.app, n = l.path === o.path, c = l.level >= o.level;
393
+ r ? n ? N.value = "" : N.value = c ? "inner-left" : "inner-right" : (N.value = "", Oe(l.app, c));
407
394
  }
408
- function Ue() {
409
- return !!j.get("accessToken");
395
+ function Be() {
396
+ return !!A.get("accessToken");
410
397
  }
411
- function $e() {
412
- return !!j.get("activeOrg");
398
+ function Ee() {
399
+ return !!A.get("activeOrg");
413
400
  }
414
- function ht(e, t, a) {
415
- const l = Ue(), o = $e(), r = G(e.path);
401
+ function ft(e, a, t) {
402
+ const l = Be(), o = Ee(), r = K(e.path);
416
403
  if (!r) {
417
- a();
404
+ t();
418
405
  return;
419
406
  }
420
407
  if (r.requiredState === "auth")
421
408
  if (l)
422
409
  if (o) {
423
410
  const n = "/main";
424
- b(n, t.path), a({ path: n });
411
+ b(n, a.path), t({ path: n });
425
412
  } else
426
- b(e.path, t.path), a();
413
+ b(e.path, a.path), t();
427
414
  else {
428
415
  const n = "/passport/login";
429
- b(n, t.path), a({ path: n });
416
+ b(n, a.path), t({ path: n });
430
417
  }
431
418
  else if (r.requiredState === "org")
432
419
  if (l)
433
420
  if (o)
434
- b(e.path, t.path), a();
421
+ b(e.path, a.path), t();
435
422
  else {
436
423
  const n = "/org/joinOrCreate";
437
- b(n, t.path), a({ path: n });
424
+ b(n, a.path), t({ path: n });
438
425
  }
439
426
  else {
440
427
  const n = "/passport/login";
441
- b(n, t.path), a({ path: n });
428
+ b(n, a.path), t({ path: n });
442
429
  }
443
430
  else if (l)
444
431
  if (o) {
445
432
  const n = "/main";
446
- b(n, t.path), a({ path: n });
433
+ b(n, a.path), t({ path: n });
447
434
  } else {
448
435
  const n = "/org/joinOrCreate";
449
- b(n, t.path), a({ path: n });
436
+ b(n, a.path), t({ path: n });
450
437
  }
451
438
  else
452
- b(e.path, t.path), a();
453
- }
454
- const C = ne(
455
- "global",
456
- () => {
457
- const e = i(), t = i("en"), a = i({}), l = i(""), o = i("");
458
- return R(e, (r) => {
459
- c.emit("globalStateDarkChange", r);
460
- }), R(t, (r) => {
461
- c.emit("globalStateLocaleChange", r);
462
- }), R([a, l], (r) => {
463
- c.emit("globalStatePermissionChange", r);
464
- }), R(o, (r) => {
465
- c.emit("globalStateLastAppPathChange", r);
466
- }), {
467
- dark: e,
468
- locale: t,
469
- permissionObjects: a,
470
- permissionChecksum: l,
471
- lastAppPath: o
472
- };
473
- },
474
- {
475
- persist: [
476
- {
477
- paths: ["dark", "locale"],
478
- storage: localStorage
479
- }
480
- ]
481
- }
482
- ), ue = ne("viewMgr", () => {
483
- const e = i([]);
484
- function t() {
485
- return e.value.length <= 0;
486
- }
487
- function a() {
488
- const u = e.value.length;
489
- if (u > 0)
490
- return e.value[u - 1];
491
- }
492
- function l(u) {
493
- return e.value.find((_) => _ === u) !== void 0;
494
- }
495
- function o(u) {
496
- e.value.push(u);
497
- }
498
- function r(u) {
499
- const _ = e.value.findIndex((h) => h === u);
500
- _ !== -1 && e.value.splice(_, 1);
501
- }
502
- function n() {
503
- console.assert(e.value.length > 0), e.value.pop();
504
- }
505
- function s() {
506
- e.value = [];
507
- }
508
- return {
509
- views: e,
510
- isEmpty: t,
511
- lastView: a,
512
- hasView: l,
513
- addView: o,
514
- delView: r,
515
- popView: n,
516
- clearViews: s
517
- };
518
- });
519
- function te(e, t) {
520
- const a = ue(), l = f({
439
+ b(e.path, a.path), t();
440
+ }
441
+ function ee(e, a) {
442
+ const t = re(), l = g({
521
443
  get() {
522
- return a.hasView(e);
444
+ return t.hasView(e);
523
445
  },
524
446
  set(r) {
525
- r ? a.addView(e) : a.delView(e);
447
+ r ? t.addView(e) : t.delView(e);
526
448
  }
527
449
  }), o = (r) => {
528
- t == null || t(r), l.value = !0;
450
+ a == null || a(r), l.value = !0;
529
451
  };
530
- return A(() => {
531
- c.on(e, o);
532
- }), T(() => {
533
- c.off(e, o);
452
+ return R(() => {
453
+ u.on(e, o);
454
+ }), O(() => {
455
+ u.off(e, o);
534
456
  }), { open: l };
535
457
  }
536
- const We = /* @__PURE__ */ B({
458
+ const Me = /* @__PURE__ */ j({
537
459
  __name: "index",
538
460
  setup(e) {
539
- const t = Z(), { open: a } = te("confirmDlgInternal"), l = i(""), o = i(""), r = i(), n = i(), s = f(() => {
540
- var d;
541
- return ((d = r.value) == null ? void 0 : d.color) ?? "primary";
542
- }), u = f(() => {
543
- var d;
544
- return ((d = r.value) == null ? void 0 : d.text) ?? t.t("cancel");
545
- }), _ = f(() => {
546
- var d;
547
- return ((d = n.value) == null ? void 0 : d.color) ?? "primary";
548
- }), h = f(() => {
549
- var d;
550
- return ((d = n.value) == null ? void 0 : d.text) ?? t.t("confirm");
461
+ const a = Q(), { open: t } = ee("confirmDlgInternal"), l = i(""), o = i(""), r = i(), n = i(), c = g(() => {
462
+ var f;
463
+ return ((f = r.value) == null ? void 0 : f.color) ?? "primary";
464
+ }), p = g(() => {
465
+ var f;
466
+ return ((f = r.value) == null ? void 0 : f.text) ?? a.t("cancel");
467
+ }), _ = g(() => {
468
+ var f;
469
+ return ((f = n.value) == null ? void 0 : f.color) ?? "primary";
470
+ }), s = g(() => {
471
+ var f;
472
+ return ((f = n.value) == null ? void 0 : f.text) ?? a.t("confirm");
551
473
  });
552
- let q = 0, S = !1;
553
- const W = (d) => {
554
- l.value = d.title, o.value = d.text, r.value = d.cancel, n.value = d.confirm, q = d.seq, S = !1, a.value = !0;
474
+ let k = 0, D = !1;
475
+ const M = (f) => {
476
+ l.value = f.title, o.value = f.text, r.value = f.cancel, n.value = f.confirm, k = f.seq, D = !1, t.value = !0;
555
477
  };
556
- A(() => {
557
- c.on("confirmDlg", W);
558
- }), T(() => {
559
- c.off("confirmDlg", W);
478
+ R(() => {
479
+ u.on("confirmDlg", M);
480
+ }), O(() => {
481
+ u.off("confirmDlg", M);
560
482
  });
561
- const z = () => {
562
- a.value = !1, S || (c.emit("confirmDlgResult" + q, !0), S = !0);
483
+ const L = () => {
484
+ t.value = !1, D || (u.emit("confirmDlgResult" + k, !0), D = !0);
563
485
  };
564
- return R(a, (d) => {
565
- !d && !S && (c.emit("confirmDlgResult" + q, !1), S = !0);
566
- }), (d, x) => {
567
- const D = v("v-card-text"), L = v("v-btn"), H = v("v-card-actions"), p = v("v-card"), w = v("v-dialog");
568
- return k(), I(w, {
569
- modelValue: K(a),
570
- "onUpdate:modelValue": x[1] || (x[1] = (E) => Y(a) ? a.value = E : null),
486
+ return X(t, (f) => {
487
+ !f && !D && (u.emit("confirmDlgResult" + k, !1), D = !0);
488
+ }), (f, y) => {
489
+ const S = m("v-card-text"), T = m("v-btn"), $ = m("v-card-actions"), d = m("v-card"), w = m("v-dialog");
490
+ return C(), I(w, {
491
+ modelValue: z(t),
492
+ "onUpdate:modelValue": y[1] || (y[1] = (U) => J(t) ? t.value = U : null),
571
493
  onKeydown: [
572
- x[2] || (x[2] = N($((E) => a.value = !1, ["stop", "prevent"]), ["esc"])),
573
- N($(z, ["stop", "prevent"]), ["enter"])
494
+ y[2] || (y[2] = F(E((U) => t.value = !1, ["stop", "prevent"]), ["esc"])),
495
+ F(E(L, ["stop", "prevent"]), ["enter"])
574
496
  ],
575
497
  transition: "dialog-top-transition",
576
498
  "max-width": "600px"
577
499
  }, {
578
- default: m(() => [
579
- y(p, { title: l.value }, {
580
- default: m(() => [
581
- y(D, null, {
582
- default: m(() => [
583
- O(V(o.value), 1)
500
+ default: h(() => [
501
+ x(d, { title: l.value }, {
502
+ default: h(() => [
503
+ x(S, null, {
504
+ default: h(() => [
505
+ q(V(o.value), 1)
584
506
  ]),
585
507
  _: 1
586
508
  }),
587
- y(H, { class: "d-flex justify-end" }, {
588
- default: m(() => [
589
- y(L, {
590
- onClick: x[0] || (x[0] = (E) => a.value = !1),
591
- color: s.value,
509
+ x($, { class: "d-flex justify-end" }, {
510
+ default: h(() => [
511
+ x(T, {
512
+ onClick: y[0] || (y[0] = (U) => t.value = !1),
513
+ color: c.value,
592
514
  variant: "text"
593
515
  }, {
594
- default: m(() => [
595
- O(V(u.value), 1)
516
+ default: h(() => [
517
+ q(V(p.value), 1)
596
518
  ]),
597
519
  _: 1
598
520
  }, 8, ["color"]),
599
- y(L, {
600
- onClick: z,
521
+ x(T, {
522
+ onClick: L,
601
523
  color: _.value,
602
524
  variant: "text"
603
525
  }, {
604
- default: m(() => [
605
- O(V(h.value), 1)
526
+ default: h(() => [
527
+ q(V(s.value), 1)
606
528
  ]),
607
529
  _: 1
608
530
  }, 8, ["color"])
@@ -617,22 +539,22 @@ const We = /* @__PURE__ */ B({
617
539
  }, 8, ["modelValue", "onKeydown"]);
618
540
  };
619
541
  }
620
- }), ze = (e) => (we("data-v-f4ad116e"), e = e(), ye(), e), He = /* @__PURE__ */ ze(() => /* @__PURE__ */ g("div", { class: "lds-spinner" }, [
621
- /* @__PURE__ */ g("div"),
622
- /* @__PURE__ */ g("div"),
623
- /* @__PURE__ */ g("div"),
624
- /* @__PURE__ */ g("div"),
625
- /* @__PURE__ */ g("div"),
626
- /* @__PURE__ */ g("div"),
627
- /* @__PURE__ */ g("div"),
628
- /* @__PURE__ */ g("div"),
629
- /* @__PURE__ */ g("div"),
630
- /* @__PURE__ */ g("div"),
631
- /* @__PURE__ */ g("div"),
632
- /* @__PURE__ */ g("div")
633
- ], -1)), Fe = [
634
- He
635
- ], Ke = /* @__PURE__ */ B({
542
+ }), Le = (e) => (ve("data-v-f4ad116e"), e = e(), me(), e), $e = /* @__PURE__ */ Le(() => /* @__PURE__ */ v("div", { class: "lds-spinner" }, [
543
+ /* @__PURE__ */ v("div"),
544
+ /* @__PURE__ */ v("div"),
545
+ /* @__PURE__ */ v("div"),
546
+ /* @__PURE__ */ v("div"),
547
+ /* @__PURE__ */ v("div"),
548
+ /* @__PURE__ */ v("div"),
549
+ /* @__PURE__ */ v("div"),
550
+ /* @__PURE__ */ v("div"),
551
+ /* @__PURE__ */ v("div"),
552
+ /* @__PURE__ */ v("div"),
553
+ /* @__PURE__ */ v("div"),
554
+ /* @__PURE__ */ v("div")
555
+ ], -1)), We = [
556
+ $e
557
+ ], ze = /* @__PURE__ */ j({
636
558
  __name: "index",
637
559
  props: {
638
560
  zIndex: {
@@ -641,21 +563,21 @@ const We = /* @__PURE__ */ B({
641
563
  }
642
564
  },
643
565
  setup(e) {
644
- const t = P(), a = e, l = f(() => ({
645
- background: t.current.value.dark ? "#1e1e1e" : "#ffffff",
646
- zIndex: a.zIndex
566
+ const a = Y(), t = e, l = g(() => ({
567
+ background: a.current.value.dark ? "#1e1e1e" : "#ffffff",
568
+ zIndex: t.zIndex
647
569
  }));
648
- return (o, r) => (k(), J("div", {
570
+ return (o, r) => (C(), H("div", {
649
571
  class: "x-cont",
650
- style: he(l.value)
651
- }, Fe, 4));
572
+ style: ge(l.value)
573
+ }, We, 4));
652
574
  }
653
- }), pe = (e, t) => {
654
- const a = e.__vccOpts || e;
655
- for (const [l, o] of t)
656
- a[l] = o;
657
- return a;
658
- }, Ne = /* @__PURE__ */ pe(Ke, [["__scopeId", "data-v-f4ad116e"]]), Ge = /* @__PURE__ */ B({
575
+ }), pe = (e, a) => {
576
+ const t = e.__vccOpts || e;
577
+ for (const [l, o] of a)
578
+ t[l] = o;
579
+ return t;
580
+ }, Fe = /* @__PURE__ */ pe(ze, [["__scopeId", "data-v-f4ad116e"]]), Ke = /* @__PURE__ */ j({
659
581
  __name: "item",
660
582
  props: {
661
583
  id: {},
@@ -664,19 +586,19 @@ const We = /* @__PURE__ */ B({
664
586
  timeout: { default: 5e3 }
665
587
  },
666
588
  emits: ["timeout"],
667
- setup(e, { emit: t }) {
668
- const a = e, l = i(!0), o = t;
669
- return A(() => {
589
+ setup(e, { emit: a }) {
590
+ const t = e, l = i(!0), o = a;
591
+ return R(() => {
670
592
  setTimeout(() => {
671
- o("timeout", a.id);
672
- }, a.timeout);
673
- }), R(l, (r) => {
674
- r || o("timeout", a.id);
593
+ o("timeout", t.id);
594
+ }, t.timeout);
595
+ }), X(l, (r) => {
596
+ r || o("timeout", t.id);
675
597
  }), (r, n) => {
676
- const s = v("v-alert");
677
- return k(), I(s, {
598
+ const c = m("v-alert");
599
+ return C(), I(c, {
678
600
  modelValue: l.value,
679
- "onUpdate:modelValue": n[0] || (n[0] = (u) => l.value = u),
601
+ "onUpdate:modelValue": n[0] || (n[0] = (p) => l.value = p),
680
602
  class: "mt-2",
681
603
  "max-width": "90%",
682
604
  width: "500px",
@@ -688,34 +610,34 @@ const We = /* @__PURE__ */ B({
688
610
  }, null, 8, ["modelValue", "type", "text"]);
689
611
  };
690
612
  }
691
- }), Xe = /* @__PURE__ */ B({
613
+ }), Ne = /* @__PURE__ */ j({
692
614
  __name: "index",
693
615
  setup(e) {
694
- const t = xe({ items: [] });
695
- A(() => {
696
- c.on("message", a);
697
- }), T(() => {
698
- c.off("message", a);
616
+ const a = he({ items: [] });
617
+ R(() => {
618
+ u.on("message", t);
619
+ }), O(() => {
620
+ u.off("message", t);
699
621
  });
700
- const a = (s) => {
701
- r(s.type, s.text, s.timeout);
702
- }, l = (s) => {
703
- n(s);
622
+ const t = (c) => {
623
+ r(c.type, c.text, c.timeout);
624
+ }, l = (c) => {
625
+ n(c);
704
626
  };
705
627
  let o = 0;
706
- const r = (s, u, _) => {
707
- const h = o++;
708
- t.items.push({ id: h, type: s, text: u, timeout: _ });
709
- }, n = (s) => {
710
- const u = t.items.findIndex((_) => _.id === s);
711
- u >= 0 && t.items.splice(u, 1);
628
+ const r = (c, p, _) => {
629
+ const s = o++;
630
+ a.items.push({ id: s, type: c, text: p, timeout: _ });
631
+ }, n = (c) => {
632
+ const p = a.items.findIndex((_) => _.id === c);
633
+ p >= 0 && a.items.splice(p, 1);
712
634
  };
713
- return (s, u) => (k(), J("div", {
714
- onClick: u[0] || (u[0] = $(() => {
635
+ return (c, p) => (C(), H("div", {
636
+ onClick: p[0] || (p[0] = E(() => {
715
637
  }, ["stop"])),
716
638
  class: "x-cont d-flex flex-column-reverse align-center"
717
639
  }, [
718
- (k(!0), J(be, null, ke(t.items, (_) => (k(), I(Ge, {
640
+ (C(!0), H(we, null, xe(a.items, (_) => (C(), I(Ke, {
719
641
  onTimeout: l,
720
642
  id: _.id,
721
643
  type: _.type,
@@ -725,91 +647,91 @@ const We = /* @__PURE__ */ B({
725
647
  }, null, 8, ["id", "type", "text", "timeout"]))), 128))
726
648
  ]));
727
649
  }
728
- }), Je = /* @__PURE__ */ pe(Xe, [["__scopeId", "data-v-8c2268ea"]]), Qe = /* @__PURE__ */ B({
650
+ }), He = /* @__PURE__ */ pe(Ne, [["__scopeId", "data-v-8c2268ea"]]), Ge = /* @__PURE__ */ j({
729
651
  __name: "index",
730
652
  setup(e) {
731
- const t = Z(), { open: a } = te("promptDlgInternal"), l = i(""), o = i(""), r = i(), n = i(), s = i(), u = i(""), _ = i(), h = i(), q = f(() => {
732
- var p;
733
- return ((p = _.value) == null ? void 0 : p.color) ?? "primary";
734
- }), S = f(() => {
735
- var p;
736
- return ((p = _.value) == null ? void 0 : p.text) ?? t.t("cancel");
737
- }), W = f(() => {
738
- var p;
739
- return ((p = h.value) == null ? void 0 : p.color) ?? "primary";
740
- }), z = f(() => {
741
- var p;
742
- return ((p = h.value) == null ? void 0 : p.text) ?? t.t("confirm");
743
- }), d = i();
744
- let x = 0, D = !1;
745
- const L = async (p) => {
653
+ const a = Q(), { open: t } = ee("promptDlgInternal"), l = i(""), o = i(""), r = i(), n = i(), c = i(), p = i(""), _ = i(), s = i(), k = g(() => {
654
+ var d;
655
+ return ((d = _.value) == null ? void 0 : d.color) ?? "primary";
656
+ }), D = g(() => {
657
+ var d;
658
+ return ((d = _.value) == null ? void 0 : d.text) ?? a.t("cancel");
659
+ }), M = g(() => {
660
+ var d;
661
+ return ((d = s.value) == null ? void 0 : d.color) ?? "primary";
662
+ }), L = g(() => {
663
+ var d;
664
+ return ((d = s.value) == null ? void 0 : d.text) ?? a.t("confirm");
665
+ }), f = i();
666
+ let y = 0, S = !1;
667
+ const T = async (d) => {
746
668
  var w;
747
- l.value = p.title, o.value = p.text, r.value = p.label, n.value = p.placeholder, s.value = p.rules, u.value = p.value, _.value = p.cancel, h.value = p.confirm, x = p.seq, D = !1, a.value = !0, await ee(() => d.value !== void 0, 1e3), (w = d.value) == null || w.focus();
669
+ l.value = d.title, o.value = d.text, r.value = d.label, n.value = d.placeholder, c.value = d.rules, p.value = d.value, _.value = d.cancel, s.value = d.confirm, y = d.seq, S = !1, t.value = !0, await P(() => f.value !== void 0, 1e3), (w = f.value) == null || w.focus();
748
670
  };
749
- A(() => {
750
- c.on("promptDlg", L);
751
- }), T(() => {
752
- c.off("promptDlg", L);
671
+ R(() => {
672
+ u.on("promptDlg", T);
673
+ }), O(() => {
674
+ u.off("promptDlg", T);
753
675
  });
754
- const H = () => {
755
- a.value = !1, D || (c.emit("promptDlgResult" + x, u.value ?? ""), D = !0);
676
+ const $ = () => {
677
+ t.value = !1, S || (u.emit("promptDlgResult" + y, p.value ?? ""), S = !0);
756
678
  };
757
- return R(a, (p) => {
758
- !p && !D && (c.emit("promptDlgResult" + x, void 0), D = !0);
759
- }), (p, w) => {
760
- const E = v("v-card-text"), _e = v("v-text-field"), de = v("v-form"), ae = v("v-btn"), ie = v("v-card-actions"), fe = v("v-card"), ge = v("v-dialog");
761
- return k(), I(ge, {
762
- modelValue: K(a),
763
- "onUpdate:modelValue": w[2] || (w[2] = (M) => Y(a) ? a.value = M : null),
679
+ return X(t, (d) => {
680
+ !d && !S && (u.emit("promptDlgResult" + y, void 0), S = !0);
681
+ }), (d, w) => {
682
+ const U = m("v-card-text"), se = m("v-text-field"), _e = m("v-form"), te = m("v-btn"), de = m("v-card-actions"), fe = m("v-card"), ie = m("v-dialog");
683
+ return C(), I(ie, {
684
+ modelValue: z(t),
685
+ "onUpdate:modelValue": w[2] || (w[2] = (B) => J(t) ? t.value = B : null),
764
686
  onKeydown: [
765
- w[3] || (w[3] = N($((M) => a.value = !1, ["stop", "prevent"]), ["esc"])),
766
- N($(H, ["stop", "prevent"]), ["enter"])
687
+ w[3] || (w[3] = F(E((B) => t.value = !1, ["stop", "prevent"]), ["esc"])),
688
+ F(E($, ["stop", "prevent"]), ["enter"])
767
689
  ],
768
690
  transition: "dialog-top-transition",
769
691
  "max-width": "600px"
770
692
  }, {
771
- default: m(() => [
772
- y(fe, { title: l.value }, {
773
- default: m(() => [
774
- o.value ? (k(), I(E, { key: 0 }, {
775
- default: m(() => [
776
- O(V(o.value), 1)
693
+ default: h(() => [
694
+ x(fe, { title: l.value }, {
695
+ default: h(() => [
696
+ o.value ? (C(), I(U, { key: 0 }, {
697
+ default: h(() => [
698
+ q(V(o.value), 1)
777
699
  ]),
778
700
  _: 1
779
- })) : Ce("", !0),
780
- y(de, { class: "mx-3" }, {
781
- default: m(() => [
782
- y(_e, {
783
- modelValue: u.value,
784
- "onUpdate:modelValue": w[0] || (w[0] = (M) => u.value = M),
701
+ })) : ye("", !0),
702
+ x(_e, { class: "mx-3" }, {
703
+ default: h(() => [
704
+ x(se, {
705
+ modelValue: p.value,
706
+ "onUpdate:modelValue": w[0] || (w[0] = (B) => p.value = B),
785
707
  label: r.value,
786
708
  placeholder: n.value,
787
- rules: s.value,
709
+ rules: c.value,
788
710
  ref_key: "target",
789
- ref: d
711
+ ref: f
790
712
  }, null, 8, ["modelValue", "label", "placeholder", "rules"])
791
713
  ]),
792
714
  _: 1
793
715
  }),
794
- y(ie, { class: "d-flex justify-end" }, {
795
- default: m(() => [
796
- y(ae, {
797
- onClick: w[1] || (w[1] = (M) => a.value = !1),
798
- color: q.value,
716
+ x(de, { class: "d-flex justify-end" }, {
717
+ default: h(() => [
718
+ x(te, {
719
+ onClick: w[1] || (w[1] = (B) => t.value = !1),
720
+ color: k.value,
799
721
  variant: "text"
800
722
  }, {
801
- default: m(() => [
802
- O(V(S.value), 1)
723
+ default: h(() => [
724
+ q(V(D.value), 1)
803
725
  ]),
804
726
  _: 1
805
727
  }, 8, ["color"]),
806
- y(ae, {
807
- onClick: H,
808
- color: W.value,
728
+ x(te, {
729
+ onClick: $,
730
+ color: M.value,
809
731
  variant: "text"
810
732
  }, {
811
- default: m(() => [
812
- O(V(z.value), 1)
733
+ default: h(() => [
734
+ q(V(L.value), 1)
813
735
  ]),
814
736
  _: 1
815
737
  }, 8, ["color"])
@@ -824,37 +746,37 @@ const We = /* @__PURE__ */ B({
824
746
  }, 8, ["modelValue", "onKeydown"]);
825
747
  };
826
748
  }
827
- }), Ye = { class: "mx-auto my-auto" }, Ze = { class: "d-flex align-center justify-center w-100 h-100" }, Pe = /* @__PURE__ */ B({
749
+ }), Xe = { class: "mx-auto my-auto" }, Je = { class: "d-flex align-center justify-center w-100 h-100" }, Qe = /* @__PURE__ */ j({
828
750
  __name: "index",
829
751
  setup(e) {
830
- const t = Z(), { open: a } = te("waitDlg"), l = () => {
831
- a.value = !0;
752
+ const a = Q(), { open: t } = ee("waitDlg"), l = () => {
753
+ t.value = !0;
832
754
  }, o = () => {
833
- a.value = !1;
755
+ t.value = !1;
834
756
  };
835
- return A(() => {
836
- c.on("openWaitDlg", l), c.on("closeWaitDlg", o);
837
- }), T(() => {
838
- c.off("openWaitDlg", l), c.off("closeWaitDlg", o);
757
+ return R(() => {
758
+ u.on("openWaitDlg", l), u.on("closeWaitDlg", o);
759
+ }), O(() => {
760
+ u.off("openWaitDlg", l), u.off("closeWaitDlg", o);
839
761
  }), (r, n) => {
840
- const s = v("v-card"), u = v("v-dialog");
841
- return k(), I(u, {
842
- modelValue: K(a),
843
- "onUpdate:modelValue": n[0] || (n[0] = (_) => Y(a) ? a.value = _ : null),
762
+ const c = m("v-card"), p = m("v-dialog");
763
+ return C(), I(p, {
764
+ modelValue: z(t),
765
+ "onUpdate:modelValue": n[0] || (n[0] = (_) => J(t) ? t.value = _ : null),
844
766
  persistent: "",
845
767
  "no-click-animation": "",
846
768
  fullscreen: ""
847
769
  }, {
848
- default: m(() => [
849
- g("div", Ye, [
850
- y(s, {
770
+ default: h(() => [
771
+ v("div", Xe, [
772
+ x(c, {
851
773
  width: "300px",
852
774
  height: "80px",
853
775
  loading: ""
854
776
  }, {
855
- default: m(() => [
856
- g("div", Ze, [
857
- g("span", null, V(K(t).t("waitingResponse")), 1)
777
+ default: h(() => [
778
+ v("div", Je, [
779
+ v("span", null, V(z(a).t("waitingResponse")), 1)
858
780
  ])
859
781
  ]),
860
782
  _: 1
@@ -865,90 +787,93 @@ const We = /* @__PURE__ */ B({
865
787
  }, 8, ["modelValue"]);
866
788
  };
867
789
  }
868
- }), et = (e) => {
869
- e.component("x-confirm-dlg", We), e.component("x-loading", Ne), e.component("x-message", Je), e.component("x-prompt-dlg", Qe), e.component("x-wait-dlg", Pe);
790
+ }), Ye = (e) => {
791
+ e.component("x-confirm-dlg", Me), e.component("x-loading", Fe), e.component("x-message", He), e.component("x-prompt-dlg", Ge), e.component("x-wait-dlg", Qe);
870
792
  };
871
- function wt() {
872
- const e = P(), t = f(() => e.global.current.value.colors.primary), a = f(() => e.global.current.value.colors.secondary), l = f(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), o = f(() => e.current.value.dark ? "#272727" : "#eeeeee"), r = f(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), n = f(() => e.current.value.dark ? "#303030" : "#f6f6f6"), s = f(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
793
+ function it() {
794
+ const e = Y(), a = g(() => e.global.current.value.colors.primary), t = g(() => e.global.current.value.colors.secondary), l = g(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), o = g(() => e.current.value.dark ? "#272727" : "#eeeeee"), r = g(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), n = g(() => e.current.value.dark ? "#303030" : "#f6f6f6"), c = g(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
873
795
  return {
874
- primaryColor: t,
875
- secondaryColor: a,
796
+ primaryColor: a,
797
+ secondaryColor: t,
876
798
  backgroundColor0: l,
877
799
  backgroundColor1: o,
878
800
  backgroundColor2: r,
879
801
  highlightColor: n,
880
- borderColor: s
802
+ borderColor: c
881
803
  };
882
804
  }
883
- function yt() {
884
- const e = Re(), t = re(), a = ue(), l = () => {
885
- console.log("onPause");
886
- }, o = () => {
887
- console.log("onResume");
805
+ function gt() {
806
+ const e = Ce(), a = ne(), t = Z(), l = re(), o = (s) => {
807
+ if (s.key === "Escape") {
808
+ r();
809
+ return;
810
+ }
888
811
  }, r = () => {
889
- var u;
890
- if (!a.isEmpty()) {
891
- a.hasView("waitDlg") || a.popView();
812
+ var k;
813
+ if (!l.isEmpty()) {
814
+ l.hasView("waitDlg") || l.popView();
892
815
  return;
893
816
  }
894
- const s = G(e.path);
895
- (s == null ? void 0 : s.level) === 0 ? (u = navigator == null ? void 0 : navigator.Backbutton) == null || u.goHome(
817
+ const s = K(e.path);
818
+ (s == null ? void 0 : s.level) === 0 ? (k = navigator == null ? void 0 : navigator.Backbutton) == null || k.goHome(
896
819
  () => {
897
820
  },
898
821
  () => {
899
822
  }
900
- ) : t.back();
823
+ ) : a.back();
901
824
  }, n = (s) => {
902
- if (s.key === "Escape") {
903
- r();
904
- return;
905
- }
825
+ t.dark = s;
826
+ }, c = (s) => {
827
+ t.locale = s;
828
+ }, p = (s) => {
829
+ t.permissionObjects = s[0], t.permissionChecksum = s[1];
830
+ }, _ = (s) => {
831
+ t.lastAppPath = s;
906
832
  };
907
- A(() => {
908
- c.on("pause", l), c.on("resume", o), c.on("backbutton", r), window.addEventListener("keydown", n);
909
- }), T(() => {
910
- c.off("pause", l), c.off("resume", o), c.off("backbutton", r), window.removeEventListener("keydown", n);
833
+ R(() => {
834
+ window.addEventListener("keydown", o), u.on("backbutton", r), u.on("updateDark", n), u.on("updateLocale", c), u.on("updatePermission", p), u.on("updateLastAppPath", _), u.emit("syncGlobalState");
835
+ }), O(() => {
836
+ window.removeEventListener("keydown", o), u.off("backbutton", r), u.off("updateDark", n), u.off("updateLocale", c), u.off("updatePermission", p), u.off("updateLastAppPath", _);
911
837
  });
912
838
  }
913
- function xt() {
914
- const e = C();
915
- function t(a, l) {
916
- const o = e.permissionObjects[a];
917
- return o ? l ? !(!le(o.includes, l) || le(o.excludes, l)) : !0 : !1;
839
+ function vt() {
840
+ const e = Z();
841
+ function a(t, l) {
842
+ const o = e.permissionObjects[t];
843
+ return o ? l ? !(!oe(o.includes, l) || oe(o.excludes, l)) : !0 : !1;
918
844
  }
919
- return { verifyPermission: t };
845
+ return { verifyPermission: a };
920
846
  }
921
- function bt() {
922
- const e = P(), t = Se(), a = f(() => e.current.value.dark), l = f(() => !!window.cordova), o = f(() => t.width.value <= 1280 ? t.width.value + "px" : t.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
923
- return { dark: a, sysBarAvail: l, compactWidth: o };
847
+ function mt() {
848
+ const e = Y(), a = ke(), t = g(() => e.current.value.dark), l = g(() => !!window.cordova), o = g(() => a.width.value <= 1280 ? a.width.value + "px" : a.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
849
+ return { dark: t, sysBarAvail: l, compactWidth: o };
924
850
  }
925
- const kt = { install: et };
851
+ const ht = { install: Ye };
926
852
  export {
927
- it as GlobalState,
928
- Ee as Permission,
929
- Be as appAppear,
930
- dt as closeWaitDlg,
931
- ct as createAxios,
932
- kt as default,
933
- c as eventBus,
934
- le as isExist,
935
- G as matchRouteMeta,
936
- ft as messageError,
937
- gt as messageInfo,
938
- vt as messageSuccess,
939
- mt as messageWarning,
940
- ht as onBeforeEach,
941
- ut as openConfirmDlg,
942
- pt as openPromptDlg,
943
- _t as openWaitDlg,
944
- X as routeTransName,
945
- wt as useColor,
946
- C as useGlobalStore,
947
- yt as useMicroApp,
948
- xt as usePermission,
949
- bt as useSystem,
950
- ue as useViewMgrStore,
951
- te as useViewStack,
952
- st as waitMs,
953
- ee as waitUtil
853
+ Te as Permission,
854
+ Oe as appAppear,
855
+ ut as closeWaitDlg,
856
+ ot as createAxios,
857
+ ht as default,
858
+ u as eventBus,
859
+ oe as isExist,
860
+ K as matchRouteMeta,
861
+ pt as messageError,
862
+ st as messageInfo,
863
+ _t as messageSuccess,
864
+ dt as messageWarning,
865
+ ft as onBeforeEach,
866
+ nt as openConfirmDlg,
867
+ rt as openPromptDlg,
868
+ ct as openWaitDlg,
869
+ N as routeTransName,
870
+ it as useColor,
871
+ Z as useGlobalStore,
872
+ gt as useMicroApp,
873
+ vt as usePermission,
874
+ mt as useSystem,
875
+ re as useViewMgrStore,
876
+ ee as useViewStack,
877
+ lt as waitMs,
878
+ P as waitUtil
954
879
  };