x-essential-lib 0.7.3 → 0.7.4

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