x-essential-lib 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +427 -426
  2. package/package.json +1 -2
package/dist/index.js CHANGED
@@ -1,23 +1,28 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.id="x-essential-lib",t.appendChild(document.createTextNode('.inner-left-enter-active,.inner-right-enter-active{transition:transform .35s ease}.inner-left-enter-from{transform:translate(-100%)}.inner-right-enter-from{transform:translate(100%)}.inner-left-enter-to,.inner-right-enter-to{transform:translate(0)}.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-70ed4b89]{position:absolute;left:50%;bottom:20px;transform:translate(-50%);z-index:9999}')),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
- const xe = Pinia.defineStore, O = Vue.ref, $e = Vue.watch, be = Vuetify.useTheme, J = xe(
2
+ import { ref as i, watch as W, computed as f, onMounted as C, onBeforeUnmount as V, defineComponent as R, resolveComponent as v, openBlock as b, createBlock as O, unref as N, isRef as F, withKeys as U, withModifiers as M, withCtx as m, createVNode as y, createTextVNode as T, toDisplayString as D, createElementBlock as z, normalizeStyle as ge, pushScopeId as ve, popScopeId as me, createElementVNode as g, reactive as he, Fragment as we, renderList as ye, createCommentVNode as ke } from "vue";
3
+ import { useTheme as H, useLocale as J, useDisplay as xe } from "vuetify";
4
+ import { defineStore as le } from "pinia";
5
+ import be from "axios";
6
+ import { useRouter as oe, useRoute as Ce } from "vue-router";
7
+ const X = le(
3
8
  "global",
4
9
  () => {
5
- const e = be(), o = O();
6
- $e(
7
- o,
8
- (r) => {
9
- e.global.name.value = r ? "dark" : "light";
10
+ const e = H(), a = i();
11
+ W(
12
+ a,
13
+ (n) => {
14
+ e.global.name.value = n ? "dark" : "light";
10
15
  },
11
16
  {
12
17
  immediate: !0
13
18
  }
14
19
  );
15
- const t = O("en"), n = O({}), a = O("");
20
+ const t = i("en"), l = i({}), o = i("");
16
21
  return {
17
- dark: o,
22
+ dark: a,
18
23
  locale: t,
19
- permissionObjects: n,
20
- permissionChecksum: a
24
+ permissionObjects: l,
25
+ permissionChecksum: o
21
26
  };
22
27
  },
23
28
  {
@@ -28,9 +33,9 @@ const xe = Pinia.defineStore, O = Vue.ref, $e = Vue.watch, be = Vuetify.useTheme
28
33
  }
29
34
  ]
30
35
  }
31
- ), Ce = Pinia.defineStore, Se = Vue.ref, de = Ce("viewMgr", () => {
32
- const e = Se([]);
33
- function o() {
36
+ ), re = le("viewMgr", () => {
37
+ const e = i([]);
38
+ function a() {
34
39
  return e.value.length <= 0;
35
40
  }
36
41
  function t() {
@@ -38,165 +43,165 @@ const xe = Pinia.defineStore, O = Vue.ref, $e = Vue.watch, be = Vuetify.useTheme
38
43
  if (s > 0)
39
44
  return e.value[s - 1];
40
45
  }
41
- function n(s) {
46
+ function l(s) {
42
47
  return e.value.find((c) => c === s) !== void 0;
43
48
  }
44
- function a(s) {
45
- r(s), e.value.push(s);
49
+ function o(s) {
50
+ n(s), e.value.push(s);
46
51
  }
47
- function r(s) {
48
- const c = e.value.findIndex((g) => g === s);
52
+ function n(s) {
53
+ const c = e.value.findIndex((w) => w === s);
49
54
  c !== -1 && e.value.splice(c, 1);
50
55
  }
51
- function l() {
56
+ function r() {
52
57
  e.value.pop();
53
58
  }
54
59
  function u() {
55
60
  e.value = [];
56
61
  }
57
- return { isEmpty: o, lastView: t, hasView: n, addView: a, delView: r, popView: l, clearViews: u };
58
- }), ie = ie, Be = VueRouter.useRouter, j = require("js-cookie");
59
- function po(e) {
60
- const o = ie.create({
62
+ return { isEmpty: a, lastView: t, hasView: l, addView: o, delView: n, popView: r, clearViews: u };
63
+ }), K = require("js-cookie");
64
+ function at(e) {
65
+ const a = be.create({
61
66
  timeout: 6e3
62
67
  });
63
- return o.defaults.baseURL = e.baseUrl, o.interceptors.request.use(
64
- (t) => De(t),
68
+ return a.defaults.baseURL = e.baseUrl, a.interceptors.request.use(
69
+ (t) => Se(t),
65
70
  (t) => {
66
- Re(t, e.onError);
71
+ qe(t, e.onError);
67
72
  }
68
- ), o.interceptors.response.use(
69
- (t) => qe(t),
70
- (t) => Me(t, e.onError)
71
- ), o;
73
+ ), a.interceptors.response.use(
74
+ (t) => De(t),
75
+ (t) => Ve(t, e.onError)
76
+ ), a;
72
77
  }
73
- function De(e) {
74
- const o = j.get("accessToken") ?? "";
75
- return e.headers.Authorization = "Basic " + o, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
78
+ function Se(e) {
79
+ const a = K.get("accessToken") ?? "";
80
+ return e.headers.Authorization = "Basic " + a, e.headers["Content-Type"] = "application/json", e.data = JSON.stringify(e.data), e;
76
81
  }
77
- function Re(e, o) {
78
- console.error(e), o("request timeout");
82
+ function qe(e, a) {
83
+ console.error(e), a("request timeout");
79
84
  }
80
- function qe(e) {
85
+ function De(e) {
81
86
  return e.data;
82
87
  }
83
- function Me(e, o) {
84
- var a;
88
+ function Ve(e, a) {
89
+ var o;
85
90
  const t = e.response;
86
91
  if (!t)
87
92
  return Promise.reject(e);
88
93
  t.status === 401 && Te();
89
- let n = (a = t.data) == null ? void 0 : a.message;
90
- return n || (n = {
94
+ let l = (o = t.data) == null ? void 0 : o.message;
95
+ return l || (l = {
91
96
  code: t.status,
92
97
  message: t.statusText
93
- }), o(n), Promise.reject(e);
98
+ }), a(l), Promise.reject(e);
94
99
  }
95
100
  function Te() {
96
- j.remove("accessToken"), j.remove("refreshToken"), j.remove("activeOrg"), Be().replace({ path: "/passport/login" });
97
- }
98
- function Ee(e) {
99
- return { all: e = e || /* @__PURE__ */ new Map(), on: function(o, t) {
100
- var n = e.get(o);
101
- n ? n.push(t) : e.set(o, [t]);
102
- }, off: function(o, t) {
103
- var n = e.get(o);
104
- n && (t ? n.splice(n.indexOf(t) >>> 0, 1) : e.set(o, []));
105
- }, emit: function(o, t) {
106
- var n = e.get(o);
107
- n && n.slice().map(function(a) {
108
- a(t);
109
- }), (n = e.get("*")) && n.slice().map(function(a) {
110
- a(o, t);
101
+ K.remove("accessToken"), K.remove("refreshToken"), K.remove("activeOrg"), oe().replace({ path: "/passport/login" });
102
+ }
103
+ function Oe(e) {
104
+ return { all: e = e || /* @__PURE__ */ new Map(), on: function(a, t) {
105
+ var l = e.get(a);
106
+ l ? l.push(t) : e.set(a, [t]);
107
+ }, off: function(a, t) {
108
+ var l = e.get(a);
109
+ l && (t ? l.splice(l.indexOf(t) >>> 0, 1) : e.set(a, []));
110
+ }, emit: function(a, t) {
111
+ var l = e.get(a);
112
+ l && l.slice().map(function(o) {
113
+ o(t);
114
+ }), (l = e.get("*")) && l.slice().map(function(o) {
115
+ o(a, t);
111
116
  });
112
117
  } };
113
118
  }
114
- const p = Ee();
115
- async function _o(e) {
116
- return new Promise((o) => {
117
- setTimeout(o, e);
119
+ const p = Oe();
120
+ async function lt(e) {
121
+ return new Promise((a) => {
122
+ setTimeout(a, e);
118
123
  });
119
124
  }
120
- async function X(e, o, t) {
121
- const n = Date.now();
122
- return new Promise((a) => {
123
- const r = async () => {
124
- e() ? a(!0) : o && Date.now() - n > o ? a(!1) : setTimeout(r, t ?? 30);
125
+ async function G(e, a, t) {
126
+ const l = Date.now();
127
+ return new Promise((o) => {
128
+ const n = async () => {
129
+ e() ? o(!0) : a && Date.now() - l > a ? o(!1) : setTimeout(n, t ?? 30);
125
130
  };
126
- r();
131
+ n();
127
132
  });
128
133
  }
129
- let Z = Date.now();
130
- function fe() {
134
+ let P = Date.now();
135
+ function ne() {
131
136
  const e = Date.now();
132
- return e - Z > 500 ? (Z = e, !0) : !1;
137
+ return e - P > 500 ? (P = e, !0) : !1;
133
138
  }
134
- let Oe = 0;
135
- function ge() {
136
- return ++Oe;
139
+ let Re = 0;
140
+ function ce() {
141
+ return ++Re;
137
142
  }
138
- async function io(e) {
139
- if (!fe())
143
+ async function ot(e) {
144
+ if (!ne())
140
145
  return;
141
- let o = !1, t;
142
- const n = (r) => {
143
- t = r, o = !0;
144
- }, a = ge();
145
- return p.on("confirmDlgResult" + a, n), p.emit("confirmDlg", { ...e, seq: a }), await X(() => o), p.off("confirmDlgResult" + a, n), t;
146
- }
147
- async function fo(e) {
148
- if (!fe())
146
+ let a = !1, t;
147
+ const l = (n) => {
148
+ t = n, a = !0;
149
+ }, o = ce();
150
+ return p.on("confirmDlgResult" + o, l), p.emit("confirmDlg", { ...e, seq: o }), await G(() => a), p.off("confirmDlgResult" + o, l), t;
151
+ }
152
+ async function rt(e) {
153
+ if (!ne())
149
154
  return;
150
- let o = !1, t;
151
- const n = (r) => {
152
- t = r, o = !0;
153
- }, a = ge();
154
- return p.on("promptDlgResult" + a, n), p.emit("promptDlg", { ...e, seq: a }), await X(() => o), p.off("promptDlgResult" + a, n), t;
155
+ let a = !1, t;
156
+ const l = (n) => {
157
+ t = n, a = !0;
158
+ }, o = ce();
159
+ return p.on("promptDlgResult" + o, l), p.emit("promptDlg", { ...e, seq: o }), await G(() => a), p.off("promptDlgResult" + o, l), t;
155
160
  }
156
- function go() {
161
+ function nt() {
157
162
  p.emit("openWaitDlg");
158
163
  }
159
- function vo() {
164
+ function ct() {
160
165
  p.emit("closeWaitDlg");
161
166
  }
162
- function mo(e, o) {
163
- p.emit("message", { type: "error", text: e, timeout: o });
167
+ function ut(e, a) {
168
+ p.emit("message", { type: "error", text: e, timeout: a });
164
169
  }
165
- function ho(e, o) {
166
- p.emit("message", { type: "info", text: e, timeout: o });
170
+ function st(e, a) {
171
+ p.emit("message", { type: "info", text: e, timeout: a });
167
172
  }
168
- function Vo(e, o) {
169
- p.emit("message", { type: "success", text: e, timeout: o });
173
+ function pt(e, a) {
174
+ p.emit("message", { type: "success", text: e, timeout: a });
170
175
  }
171
- function wo(e, o) {
172
- p.emit("message", { type: "warning", text: e, timeout: o });
176
+ function _t(e, a) {
177
+ p.emit("message", { type: "warning", text: e, timeout: a });
173
178
  }
174
- function yo(e) {
175
- var n, a;
179
+ function dt(e) {
180
+ var l, o;
176
181
  if (!window.appAppear) {
177
182
  window.appAppear = !0;
178
183
  return;
179
184
  }
180
- const o = "single-spa-application:" + e, t = (n = document.getElementById(o)) == null ? void 0 : n.classList;
181
- t && (t.remove("app-left", "app-right", "app-reset"), (a = window.routeExtras) != null && a.forward ? t.add("app-left") : t.add("app-right"), setTimeout(() => {
185
+ const a = "single-spa-application:" + e, t = (l = document.getElementById(a)) == null ? void 0 : l.classList;
186
+ t && (t.remove("app-left", "app-right", "app-reset"), (o = window.routeExtras) != null && o.forward ? t.add("app-left") : t.add("app-right"), setTimeout(() => {
182
187
  t.add("app-reset");
183
188
  }, 0));
184
189
  }
185
- var Ue = /* @__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))(Ue || {});
186
- function P(e, o) {
190
+ var je = /* @__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))(je || {});
191
+ function ee(e, a) {
187
192
  if (!e)
188
193
  return !1;
189
194
  let t = e;
190
- return Object.keys(t).length <= 0 || (o.split("/").forEach((a) => {
195
+ return Object.keys(t).length <= 0 || (a.split("/").forEach((o) => {
191
196
  if (Object.keys(t).length <= 0)
192
197
  return !0;
193
- if (t[a])
194
- t = t[a];
198
+ if (t[o])
199
+ t = t[o];
195
200
  else
196
201
  return !1;
197
202
  }), Object.keys(t).length <= 0);
198
203
  }
199
- const Ne = Vue.ref, ve = require("js-cookie"), Ie = [
204
+ const ue = require("js-cookie"), Ie = [
200
205
  { path: "/passport/login", level: 0 },
201
206
  { path: "/passport/loginAccount", level: 1 },
202
207
  { path: "/passport/register", level: 1 },
@@ -216,167 +221,166 @@ const Ne = Vue.ref, ve = require("js-cookie"), Ie = [
216
221
  { path: "/calc", level: 1, requiredState: "org" },
217
222
  { path: "/data", level: 1, requiredState: "org" }
218
223
  ];
219
- function G(e) {
220
- let o, t = 0;
221
- const n = e.split("/");
222
- return Ie.forEach((a) => {
223
- const r = a.path.split("/");
224
- let l = 0;
225
- for (let u = 0; u < n.length && !(u >= r.length || n[u] !== r[u]); u++)
226
- l++;
227
- l >= t && (o = a, t = l);
228
- }), o;
229
- }
230
- function ee(e) {
224
+ function Q(e) {
225
+ let a, t = 0;
226
+ const l = e.split("/");
227
+ return Ie.forEach((o) => {
228
+ const n = o.path.split("/");
229
+ let r = 0;
230
+ for (let u = 0; u < l.length && !(u >= n.length || l[u] !== n[u]); u++)
231
+ r++;
232
+ r >= t && (a = o, t = r);
233
+ }), a;
234
+ }
235
+ function te(e) {
231
236
  if (e === "/")
232
237
  return { app: "", path: "/", level: -1 };
233
- const o = G(e);
234
- if (!o)
238
+ const a = Q(e);
239
+ if (!a)
235
240
  return { app: "invalidApp", path: "/invalidApp/invalidRoute", level: -1 };
236
241
  const t = e.split("/");
237
- return console.assert(t.length >= 2), { app: t[1], path: o.path, level: o.level };
242
+ return console.assert(t.length >= 2), { app: t[1], path: a.path, level: a.level };
238
243
  }
239
- const te = Ne("");
240
- function m(e, o) {
241
- const t = ee(e), n = ee(o), a = t.app === n.app, r = t.path === n.path, l = t.level >= n.level;
244
+ const ae = i("");
245
+ function x(e, a) {
246
+ const t = te(e), l = te(a), o = t.app === l.app, n = t.path === l.path, r = t.level >= l.level;
242
247
  console.info(
243
- `~~~~before route change~~~~ ${n.path} -> ${t.path} inner=${a} forward=${l}`
244
- ), a ? r ? te.value = "" : te.value = l ? "inner-left" : "inner-right" : window.routeExtras = { forward: l };
248
+ `~~~~before route change~~~~ ${l.path} -> ${t.path} inner=${o} forward=${r}`
249
+ ), o ? n ? ae.value = "" : ae.value = r ? "inner-left" : "inner-right" : window.routeExtras = { forward: r };
245
250
  }
246
- function je() {
247
- return !!ve.get("accessToken");
251
+ function Ee() {
252
+ return !!ue.get("accessToken");
248
253
  }
249
- function Le() {
250
- return !!ve.get("activeOrg");
254
+ function $e() {
255
+ return !!ue.get("activeOrg");
251
256
  }
252
- function ko(e, o, t) {
253
- const n = je(), a = Le(), r = G(e.path);
254
- if (!r) {
257
+ function ft(e, a, t) {
258
+ const l = Ee(), o = $e(), n = Q(e.path);
259
+ if (!n) {
255
260
  t();
256
261
  return;
257
262
  }
258
- if (r.requiredState === "auth")
259
- if (n)
260
- if (a) {
261
- const l = "/main";
262
- m(l, o.path), t({ path: l });
263
+ if (n.requiredState === "auth")
264
+ if (l)
265
+ if (o) {
266
+ const r = "/main";
267
+ x(r, a.path), t({ path: r });
263
268
  } else
264
- m(e.path, o.path), t();
269
+ x(e.path, a.path), t();
265
270
  else {
266
- const l = "/passport/login";
267
- m(l, o.path), t({ path: l });
271
+ const r = "/passport/login";
272
+ x(r, a.path), t({ path: r });
268
273
  }
269
- else if (r.requiredState === "org")
270
- if (n)
271
- if (a)
272
- m(e.path, o.path), t();
274
+ else if (n.requiredState === "org")
275
+ if (l)
276
+ if (o)
277
+ x(e.path, a.path), t();
273
278
  else {
274
- const l = "/org/joinOrCreate";
275
- m(l, o.path), t({ path: l });
279
+ const r = "/org/joinOrCreate";
280
+ x(r, a.path), t({ path: r });
276
281
  }
277
282
  else {
278
- const l = "/passport/login";
279
- m(l, o.path), t({ path: l });
283
+ const r = "/passport/login";
284
+ x(r, a.path), t({ path: r });
280
285
  }
281
- else if (n)
282
- if (a) {
283
- const l = "/main";
284
- m(l, o.path), t({ path: l });
286
+ else if (l)
287
+ if (o) {
288
+ const r = "/main";
289
+ x(r, a.path), t({ path: r });
285
290
  } else {
286
- const l = "/org/joinOrCreate";
287
- m(l, o.path), t({ path: l });
291
+ const r = "/org/joinOrCreate";
292
+ x(r, a.path), t({ path: r });
288
293
  }
289
294
  else
290
- m(e.path, o.path), t();
295
+ x(e.path, a.path), t();
291
296
  }
292
- const Ae = Vue.computed, Ke = Vue.onMounted, We = Vue.onBeforeUnmount;
293
- function Q(e, o) {
294
- const t = de(), n = Ae({
297
+ function Y(e, a) {
298
+ const t = re(), l = f({
295
299
  get() {
296
300
  return t.hasView(e);
297
301
  },
298
- set(r) {
299
- r ? t.addView(e) : t.delView(e);
302
+ set(n) {
303
+ n ? t.addView(e) : t.delView(e);
300
304
  }
301
- }), a = (r) => {
302
- o == null || o(r), n.value = !0;
305
+ }), o = (n) => {
306
+ a == null || a(n), l.value = !0;
303
307
  };
304
- return Ke(() => {
305
- p.on(e, a);
306
- }), We(() => {
307
- p.off(e, a);
308
- }), { open: n };
308
+ return C(() => {
309
+ p.on(e, o);
310
+ }), V(() => {
311
+ p.off(e, o);
312
+ }), { open: l };
309
313
  }
310
- const ze = Vue.defineComponent, He = Vue.unref, L = Vue.toDisplayString, A = Vue.createTextVNode, R = Vue.resolveComponent, $ = Vue.withCtx, q = Vue.createVNode, Fe = Vue.isRef, oe = Vue.withModifiers, ne = Vue.withKeys, Je = Vue.openBlock, Xe = Vue.createBlock, U = Vue.ref, N = Vue.computed, Ge = Vue.onMounted, Qe = Vue.onBeforeUnmount, Ye = Vue.watch, Ze = Vuetify.useLocale, Pe = /* @__PURE__ */ ze({
314
+ const Me = /* @__PURE__ */ R({
311
315
  __name: "index",
312
316
  setup(e) {
313
- const o = Ze(), { open: t } = Q("confirmDlg"), n = U(""), a = U(""), r = U(), l = U(), u = N(() => {
317
+ const a = J(), { open: t } = Y("confirmDlg"), l = i(""), o = i(""), n = i(), r = i(), u = f(() => {
314
318
  var d;
315
- return ((d = r.value) == null ? void 0 : d.color) ?? "primary";
316
- }), s = N(() => {
319
+ return ((d = n.value) == null ? void 0 : d.color) ?? "primary";
320
+ }), s = f(() => {
317
321
  var d;
318
- return ((d = r.value) == null ? void 0 : d.text) ?? o.t("cancel");
319
- }), c = N(() => {
322
+ return ((d = n.value) == null ? void 0 : d.text) ?? a.t("cancel");
323
+ }), c = f(() => {
320
324
  var d;
321
- return ((d = l.value) == null ? void 0 : d.color) ?? "primary";
322
- }), g = N(() => {
325
+ return ((d = r.value) == null ? void 0 : d.color) ?? "primary";
326
+ }), w = f(() => {
323
327
  var d;
324
- return ((d = l.value) == null ? void 0 : d.text) ?? o.t("confirm");
328
+ return ((d = r.value) == null ? void 0 : d.text) ?? a.t("confirm");
325
329
  });
326
- let C = 0, V = !1;
327
- const M = (d) => {
328
- n.value = d.title, a.value = d.text, r.value = d.cancel, l.value = d.confirm, C = d.seq, V = !1, t.value = !0;
330
+ let j = 0, S = !1;
331
+ const A = (d) => {
332
+ l.value = d.title, o.value = d.text, n.value = d.cancel, r.value = d.confirm, j = d.seq, S = !1, t.value = !0;
329
333
  };
330
- Ge(() => {
331
- p.on("confirmDlg", M);
332
- }), Qe(() => {
333
- p.off("confirmDlg", M);
334
+ C(() => {
335
+ p.on("confirmDlg", A);
336
+ }), V(() => {
337
+ p.off("confirmDlg", A);
334
338
  });
335
- const T = () => {
336
- t.value = !1, V || (p.emit("confirmDlgResult" + C, !0), V = !0);
339
+ const B = () => {
340
+ t.value = !1, S || (p.emit("confirmDlgResult" + j, !0), S = !0);
337
341
  };
338
- return Ye(t, (d) => {
339
- !d && !V && (p.emit("confirmDlgResult" + C, !1), V = !0);
340
- }), (d, v) => {
341
- const w = R("v-card-text"), S = R("v-btn"), E = R("v-card-actions"), _ = R("v-card"), i = R("v-dialog");
342
- return Je(), Xe(i, {
343
- modelValue: He(t),
344
- "onUpdate:modelValue": v[1] || (v[1] = (B) => Fe(t) ? t.value = B : null),
342
+ return W(t, (d) => {
343
+ !d && !S && (p.emit("confirmDlgResult" + j, !1), S = !0);
344
+ }), (d, k) => {
345
+ const q = v("v-card-text"), I = v("v-btn"), L = v("v-card-actions"), _ = v("v-card"), h = v("v-dialog");
346
+ return b(), O(h, {
347
+ modelValue: N(t),
348
+ "onUpdate:modelValue": k[1] || (k[1] = (E) => F(t) ? t.value = E : null),
345
349
  onKeydown: [
346
- v[2] || (v[2] = ne(oe((B) => t.value = !1, ["stop", "prevent"]), ["esc"])),
347
- ne(oe(T, ["stop", "prevent"]), ["enter"])
350
+ k[2] || (k[2] = U(M((E) => t.value = !1, ["stop", "prevent"]), ["esc"])),
351
+ U(M(B, ["stop", "prevent"]), ["enter"])
348
352
  ],
349
353
  transition: "dialog-top-transition",
350
354
  "max-width": "600px"
351
355
  }, {
352
- default: $(() => [
353
- q(_, { title: n.value }, {
354
- default: $(() => [
355
- q(w, null, {
356
- default: $(() => [
357
- A(L(a.value), 1)
356
+ default: m(() => [
357
+ y(_, { title: l.value }, {
358
+ default: m(() => [
359
+ y(q, null, {
360
+ default: m(() => [
361
+ T(D(o.value), 1)
358
362
  ]),
359
363
  _: 1
360
364
  }),
361
- q(E, { class: "d-flex justify-end" }, {
362
- default: $(() => [
363
- q(S, {
364
- onClick: v[0] || (v[0] = (B) => t.value = !1),
365
+ y(L, { class: "d-flex justify-end" }, {
366
+ default: m(() => [
367
+ y(I, {
368
+ onClick: k[0] || (k[0] = (E) => t.value = !1),
365
369
  color: u.value,
366
370
  variant: "text"
367
371
  }, {
368
- default: $(() => [
369
- A(L(s.value), 1)
372
+ default: m(() => [
373
+ T(D(s.value), 1)
370
374
  ]),
371
375
  _: 1
372
376
  }, 8, ["color"]),
373
- q(S, {
374
- onClick: T,
377
+ y(I, {
378
+ onClick: B,
375
379
  color: c.value,
376
380
  variant: "text"
377
381
  }, {
378
- default: $(() => [
379
- A(L(g.value), 1)
382
+ default: m(() => [
383
+ T(D(w.value), 1)
380
384
  ]),
381
385
  _: 1
382
386
  }, 8, ["color"])
@@ -391,22 +395,22 @@ const ze = Vue.defineComponent, He = Vue.unref, L = Vue.toDisplayString, A = Vue
391
395
  }, 8, ["modelValue", "onKeydown"]);
392
396
  };
393
397
  }
394
- }), et = Vue.defineComponent, f = Vue.createElementVNode, tt = Vue.normalizeStyle, ot = Vue.openBlock, nt = Vue.createElementBlock, at = Vue.pushScopeId, lt = Vue.popScopeId, rt = (e) => (at("data-v-f4ad116e"), e = e(), lt(), e), ct = /* @__PURE__ */ rt(() => /* @__PURE__ */ f("div", { class: "lds-spinner" }, [
395
- /* @__PURE__ */ f("div"),
396
- /* @__PURE__ */ f("div"),
397
- /* @__PURE__ */ f("div"),
398
- /* @__PURE__ */ f("div"),
399
- /* @__PURE__ */ f("div"),
400
- /* @__PURE__ */ f("div"),
401
- /* @__PURE__ */ f("div"),
402
- /* @__PURE__ */ f("div"),
403
- /* @__PURE__ */ f("div"),
404
- /* @__PURE__ */ f("div"),
405
- /* @__PURE__ */ f("div"),
406
- /* @__PURE__ */ f("div")
407
- ], -1)), ut = [
408
- ct
409
- ], st = Vue.computed, pt = Vuetify.useTheme, _t = /* @__PURE__ */ et({
398
+ }), Ae = (e) => (ve("data-v-f4ad116e"), e = e(), me(), e), Be = /* @__PURE__ */ Ae(() => /* @__PURE__ */ g("div", { class: "lds-spinner" }, [
399
+ /* @__PURE__ */ g("div"),
400
+ /* @__PURE__ */ g("div"),
401
+ /* @__PURE__ */ g("div"),
402
+ /* @__PURE__ */ g("div"),
403
+ /* @__PURE__ */ g("div"),
404
+ /* @__PURE__ */ g("div"),
405
+ /* @__PURE__ */ g("div"),
406
+ /* @__PURE__ */ g("div"),
407
+ /* @__PURE__ */ g("div"),
408
+ /* @__PURE__ */ g("div"),
409
+ /* @__PURE__ */ g("div"),
410
+ /* @__PURE__ */ g("div")
411
+ ], -1)), Le = [
412
+ Be
413
+ ], Ke = /* @__PURE__ */ R({
410
414
  __name: "index",
411
415
  props: {
412
416
  zIndex: {
@@ -415,21 +419,21 @@ const ze = Vue.defineComponent, He = Vue.unref, L = Vue.toDisplayString, A = Vue
415
419
  }
416
420
  },
417
421
  setup(e) {
418
- const o = pt(), t = e, n = st(() => ({
419
- background: o.current.value.dark ? "#1e1e1e" : "#ffffff",
422
+ const a = H(), t = e, l = f(() => ({
423
+ background: a.current.value.dark ? "#1e1e1e" : "#ffffff",
420
424
  zIndex: t.zIndex
421
425
  }));
422
- return (a, r) => (ot(), nt("div", {
426
+ return (o, n) => (b(), z("div", {
423
427
  class: "x-cont",
424
- style: tt(n.value)
425
- }, ut, 4));
428
+ style: ge(l.value)
429
+ }, Le, 4));
426
430
  }
427
- }), me = (e, o) => {
431
+ }), se = (e, a) => {
428
432
  const t = e.__vccOpts || e;
429
- for (const [n, a] of o)
430
- t[n] = a;
433
+ for (const [l, o] of a)
434
+ t[l] = o;
431
435
  return t;
432
- }, dt = /* @__PURE__ */ me(_t, [["__scopeId", "data-v-f4ad116e"]]), it = Vue.defineComponent, ft = Vue.resolveComponent, gt = Vue.openBlock, vt = Vue.createBlock, mt = Vue.ref, ht = Vue.computed, Vt = Vue.onMounted, wt = Vue.watch, yt = /* @__PURE__ */ it({
436
+ }, Ne = /* @__PURE__ */ se(Ke, [["__scopeId", "data-v-f4ad116e"]]), Ue = /* @__PURE__ */ R({
433
437
  __name: "item",
434
438
  props: {
435
439
  id: {
@@ -450,39 +454,39 @@ const ze = Vue.defineComponent, He = Vue.unref, L = Vue.toDisplayString, A = Vue
450
454
  }
451
455
  },
452
456
  emits: ["timeout"],
453
- setup(e, { emit: o }) {
454
- const t = e, n = mt(!0), a = o, r = ht(() => {
455
- let l = "";
457
+ setup(e, { emit: a }) {
458
+ const t = e, l = i(!0), o = a, n = f(() => {
459
+ let r = "";
456
460
  switch (t.type) {
457
461
  case "error":
458
- l = "cancel";
462
+ r = "cancel";
459
463
  break;
460
464
  case "info":
461
- l = "info";
465
+ r = "info";
462
466
  break;
463
467
  case "success":
464
- l = "check-circle";
468
+ r = "check-circle";
465
469
  break;
466
470
  case "warning":
467
- l = "error";
471
+ r = "error";
468
472
  break;
469
473
  }
470
- return l;
474
+ return r;
471
475
  });
472
- return Vt(() => {
476
+ return C(() => {
473
477
  setTimeout(() => {
474
- a("timeout", t.id);
478
+ o("timeout", t.id);
475
479
  }, t.timeout);
476
- }), wt(n, (l) => {
477
- l || a("timeout", t.id);
478
- }), (l, u) => {
479
- const s = ft("v-alert");
480
- return gt(), vt(s, {
481
- modelValue: n.value,
482
- "onUpdate:modelValue": u[0] || (u[0] = (c) => n.value = c),
480
+ }), W(l, (r) => {
481
+ r || o("timeout", t.id);
482
+ }), (r, u) => {
483
+ const s = v("v-alert");
484
+ return b(), O(s, {
485
+ modelValue: l.value,
486
+ "onUpdate:modelValue": u[0] || (u[0] = (c) => l.value = c),
483
487
  class: "mt-2",
484
488
  type: e.type,
485
- icon: r.value,
489
+ icon: n.value,
486
490
  text: e.text,
487
491
  "max-width": "90%",
488
492
  width: "500px",
@@ -492,35 +496,35 @@ const ze = Vue.defineComponent, He = Vue.unref, L = Vue.toDisplayString, A = Vue
492
496
  }, null, 8, ["modelValue", "type", "icon", "text"]);
493
497
  };
494
498
  }
495
- }), kt = Vue.defineComponent, xt = Vue.renderList, $t = Vue.Fragment, K = Vue.openBlock, ae = Vue.createElementBlock, bt = Vue.createBlock, Ct = Vue.withModifiers, St = Vue.reactive, Bt = Vue.onMounted, Dt = Vue.onBeforeUnmount, Rt = /* @__PURE__ */ kt({
499
+ }), We = /* @__PURE__ */ R({
496
500
  __name: "index",
497
501
  setup(e) {
498
- const o = St({ items: [] });
499
- Bt(() => {
502
+ const a = he({ items: [] });
503
+ C(() => {
500
504
  p.on("message", t);
501
- }), Dt(() => {
505
+ }), V(() => {
502
506
  p.off("message", t);
503
507
  });
504
508
  const t = (u) => {
505
- r(u.type, u.text, u.timeout);
506
- }, n = (u) => {
507
- l(u);
508
- };
509
- let a = 0;
510
- const r = (u, s, c) => {
511
- const g = a++;
512
- o.items.push({ id: g, type: u, text: s, timeout: c });
509
+ n(u.type, u.text, u.timeout);
513
510
  }, l = (u) => {
514
- const s = o.items.findIndex((c) => c.id === u);
515
- s >= 0 && o.items.splice(s, 1);
511
+ r(u);
512
+ };
513
+ let o = 0;
514
+ const n = (u, s, c) => {
515
+ const w = o++;
516
+ a.items.push({ id: w, type: u, text: s, timeout: c });
517
+ }, r = (u) => {
518
+ const s = a.items.findIndex((c) => c.id === u);
519
+ s >= 0 && a.items.splice(s, 1);
516
520
  };
517
- return (u, s) => (K(), ae("div", {
518
- onClick: s[0] || (s[0] = Ct(() => {
521
+ return (u, s) => (b(), z("div", {
522
+ onClick: s[0] || (s[0] = M(() => {
519
523
  }, ["stop"])),
520
524
  class: "x-cont d-flex flex-column-reverse align-center"
521
525
  }, [
522
- (K(!0), ae($t, null, xt(o.items, (c) => (K(), bt(yt, {
523
- onTimeout: n,
526
+ (b(!0), z(we, null, ye(a.items, (c) => (b(), O(Ue, {
527
+ onTimeout: l,
524
528
  id: c.id,
525
529
  type: c.type,
526
530
  text: c.text,
@@ -529,65 +533,65 @@ const ze = Vue.defineComponent, He = Vue.unref, L = Vue.toDisplayString, A = Vue
529
533
  }, null, 8, ["id", "type", "text", "timeout"]))), 128))
530
534
  ]));
531
535
  }
532
- }), qt = /* @__PURE__ */ me(Rt, [["__scopeId", "data-v-70ed4b89"]]), Mt = Vue.defineComponent, Tt = Vue.unref, W = Vue.toDisplayString, z = Vue.createTextVNode, y = Vue.resolveComponent, k = Vue.withCtx, le = Vue.openBlock, re = Vue.createBlock, Et = Vue.createCommentVNode, b = Vue.createVNode, Ot = Vue.isRef, ce = Vue.withModifiers, ue = Vue.withKeys, h = Vue.ref, I = Vue.computed, Ut = Vue.onMounted, Nt = Vue.onBeforeUnmount, It = Vue.watch, jt = Vuetify.useLocale, Lt = /* @__PURE__ */ Mt({
536
+ }), He = /* @__PURE__ */ se(We, [["__scopeId", "data-v-70ed4b89"]]), ze = /* @__PURE__ */ R({
533
537
  __name: "index",
534
538
  setup(e) {
535
- const o = jt(), { open: t } = Q("promptDlg"), n = h(""), a = h(""), r = h(), l = h(), u = h(), s = h(""), c = h(), g = h(), C = I(() => {
539
+ const a = J(), { open: t } = Y("promptDlg"), l = i(""), o = i(""), n = i(), r = i(), u = i(), s = i(""), c = i(), w = i(), j = f(() => {
536
540
  var _;
537
541
  return ((_ = c.value) == null ? void 0 : _.color) ?? "primary";
538
- }), V = I(() => {
542
+ }), S = f(() => {
539
543
  var _;
540
- return ((_ = c.value) == null ? void 0 : _.text) ?? o.t("cancel");
541
- }), M = I(() => {
544
+ return ((_ = c.value) == null ? void 0 : _.text) ?? a.t("cancel");
545
+ }), A = f(() => {
542
546
  var _;
543
- return ((_ = g.value) == null ? void 0 : _.color) ?? "primary";
544
- }), T = I(() => {
547
+ return ((_ = w.value) == null ? void 0 : _.color) ?? "primary";
548
+ }), B = f(() => {
545
549
  var _;
546
- return ((_ = g.value) == null ? void 0 : _.text) ?? o.t("confirm");
547
- }), d = h();
548
- let v = 0, w = !1;
549
- const S = async (_) => {
550
- var i;
551
- n.value = _.title, a.value = _.text, r.value = _.label, l.value = _.placeholder, u.value = _.rules, s.value = _.value, c.value = _.cancel, g.value = _.confirm, v = _.seq, w = !1, t.value = !0, await X(() => d.value !== void 0, 1e3), (i = d.value) == null || i.focus();
550
+ return ((_ = w.value) == null ? void 0 : _.text) ?? a.t("confirm");
551
+ }), d = i();
552
+ let k = 0, q = !1;
553
+ const I = async (_) => {
554
+ var h;
555
+ l.value = _.title, o.value = _.text, n.value = _.label, r.value = _.placeholder, u.value = _.rules, s.value = _.value, c.value = _.cancel, w.value = _.confirm, k = _.seq, q = !1, t.value = !0, await G(() => d.value !== void 0, 1e3), (h = d.value) == null || h.focus();
552
556
  };
553
- Ut(() => {
554
- p.on("promptDlg", S);
555
- }), Nt(() => {
556
- p.off("promptDlg", S);
557
+ C(() => {
558
+ p.on("promptDlg", I);
559
+ }), V(() => {
560
+ p.off("promptDlg", I);
557
561
  });
558
- const E = () => {
559
- t.value = !1, w || (p.emit("promptDlgResult" + v, s.value ?? ""), w = !0);
562
+ const L = () => {
563
+ t.value = !1, q || (p.emit("promptDlgResult" + k, s.value ?? ""), q = !0);
560
564
  };
561
- return It(t, (_) => {
562
- !_ && !w && (p.emit("promptDlgResult" + v, void 0), w = !0);
563
- }), (_, i) => {
564
- const B = y("v-card-text"), he = y("v-text-field"), Ve = y("v-form"), Y = y("v-btn"), we = y("v-card-actions"), ye = y("v-card"), ke = y("v-dialog");
565
- return le(), re(ke, {
566
- modelValue: Tt(t),
567
- "onUpdate:modelValue": i[2] || (i[2] = (D) => Ot(t) ? t.value = D : null),
565
+ return W(t, (_) => {
566
+ !_ && !q && (p.emit("promptDlgResult" + k, void 0), q = !0);
567
+ }), (_, h) => {
568
+ const E = v("v-card-text"), pe = v("v-text-field"), _e = v("v-form"), Z = v("v-btn"), de = v("v-card-actions"), fe = v("v-card"), ie = v("v-dialog");
569
+ return b(), O(ie, {
570
+ modelValue: N(t),
571
+ "onUpdate:modelValue": h[2] || (h[2] = ($) => F(t) ? t.value = $ : null),
568
572
  onKeydown: [
569
- i[3] || (i[3] = ue(ce((D) => t.value = !1, ["stop", "prevent"]), ["esc"])),
570
- ue(ce(E, ["stop", "prevent"]), ["enter"])
573
+ h[3] || (h[3] = U(M(($) => t.value = !1, ["stop", "prevent"]), ["esc"])),
574
+ U(M(L, ["stop", "prevent"]), ["enter"])
571
575
  ],
572
576
  transition: "dialog-top-transition",
573
577
  "max-width": "600px"
574
578
  }, {
575
- default: k(() => [
576
- b(ye, { title: n.value }, {
577
- default: k(() => [
578
- a.value ? (le(), re(B, { key: 0 }, {
579
- default: k(() => [
580
- z(W(a.value), 1)
579
+ default: m(() => [
580
+ y(fe, { title: l.value }, {
581
+ default: m(() => [
582
+ o.value ? (b(), O(E, { key: 0 }, {
583
+ default: m(() => [
584
+ T(D(o.value), 1)
581
585
  ]),
582
586
  _: 1
583
- })) : Et("", !0),
584
- b(Ve, { class: "mx-3" }, {
585
- default: k(() => [
586
- b(he, {
587
+ })) : ke("", !0),
588
+ y(_e, { class: "mx-3" }, {
589
+ default: m(() => [
590
+ y(pe, {
587
591
  modelValue: s.value,
588
- "onUpdate:modelValue": i[0] || (i[0] = (D) => s.value = D),
589
- label: r.value,
590
- placeholder: l.value,
592
+ "onUpdate:modelValue": h[0] || (h[0] = ($) => s.value = $),
593
+ label: n.value,
594
+ placeholder: r.value,
591
595
  rules: u.value,
592
596
  ref_key: "target",
593
597
  ref: d
@@ -595,25 +599,25 @@ const ze = Vue.defineComponent, He = Vue.unref, L = Vue.toDisplayString, A = Vue
595
599
  ]),
596
600
  _: 1
597
601
  }),
598
- b(we, { class: "d-flex justify-end" }, {
599
- default: k(() => [
600
- b(Y, {
601
- onClick: i[1] || (i[1] = (D) => t.value = !1),
602
- color: C.value,
602
+ y(de, { class: "d-flex justify-end" }, {
603
+ default: m(() => [
604
+ y(Z, {
605
+ onClick: h[1] || (h[1] = ($) => t.value = !1),
606
+ color: j.value,
603
607
  variant: "text"
604
608
  }, {
605
- default: k(() => [
606
- z(W(V.value), 1)
609
+ default: m(() => [
610
+ T(D(S.value), 1)
607
611
  ]),
608
612
  _: 1
609
613
  }, 8, ["color"]),
610
- b(Y, {
611
- onClick: E,
612
- color: M.value,
614
+ y(Z, {
615
+ onClick: L,
616
+ color: A.value,
613
617
  variant: "text"
614
618
  }, {
615
- default: k(() => [
616
- z(W(T.value), 1)
619
+ default: m(() => [
620
+ T(D(B.value), 1)
617
621
  ]),
618
622
  _: 1
619
623
  }, 8, ["color"])
@@ -628,37 +632,37 @@ const ze = Vue.defineComponent, He = Vue.unref, L = Vue.toDisplayString, A = Vue
628
632
  }, 8, ["modelValue", "onKeydown"]);
629
633
  };
630
634
  }
631
- }), At = Vue.defineComponent, se = Vue.unref, Kt = Vue.toDisplayString, H = Vue.createElementVNode, pe = Vue.resolveComponent, _e = Vue.withCtx, Wt = Vue.createVNode, zt = Vue.isRef, Ht = Vue.openBlock, Ft = Vue.createBlock, Jt = { class: "mx-auto my-auto" }, Xt = { class: "d-flex align-center justify-center w-100 h-100" }, Gt = Vue.onMounted, Qt = Vue.onBeforeUnmount, Yt = Vuetify.useLocale, Zt = /* @__PURE__ */ At({
635
+ }), Fe = { class: "mx-auto my-auto" }, Je = { class: "d-flex align-center justify-center w-100 h-100" }, Xe = /* @__PURE__ */ R({
632
636
  __name: "index",
633
637
  setup(e) {
634
- const o = Yt(), { open: t } = Q("waitDlg"), n = () => {
638
+ const a = J(), { open: t } = Y("waitDlg"), l = () => {
635
639
  t.value = !0;
636
- }, a = () => {
640
+ }, o = () => {
637
641
  t.value = !1;
638
642
  };
639
- return Gt(() => {
640
- p.on("openWaitDlg", n), p.on("closeWaitDlg", a);
641
- }), Qt(() => {
642
- p.off("openWaitDlg", n), p.off("closeWaitDlg", a);
643
- }), (r, l) => {
644
- const u = pe("v-card"), s = pe("v-dialog");
645
- return Ht(), Ft(s, {
646
- modelValue: se(t),
647
- "onUpdate:modelValue": l[0] || (l[0] = (c) => zt(t) ? t.value = c : null),
643
+ return C(() => {
644
+ p.on("openWaitDlg", l), p.on("closeWaitDlg", o);
645
+ }), V(() => {
646
+ p.off("openWaitDlg", l), p.off("closeWaitDlg", o);
647
+ }), (n, r) => {
648
+ const u = v("v-card"), s = v("v-dialog");
649
+ return b(), O(s, {
650
+ modelValue: N(t),
651
+ "onUpdate:modelValue": r[0] || (r[0] = (c) => F(t) ? t.value = c : null),
648
652
  persistent: "",
649
653
  "no-click-animation": "",
650
654
  fullscreen: ""
651
655
  }, {
652
- default: _e(() => [
653
- H("div", Jt, [
654
- Wt(u, {
656
+ default: m(() => [
657
+ g("div", Fe, [
658
+ y(u, {
655
659
  width: "300px",
656
660
  height: "80px",
657
661
  loading: ""
658
662
  }, {
659
- default: _e(() => [
660
- H("div", Xt, [
661
- H("span", null, Kt(se(o).t("waitingResponse")), 1)
663
+ default: m(() => [
664
+ g("div", Je, [
665
+ g("span", null, D(N(a).t("waitingResponse")), 1)
662
666
  ])
663
667
  ]),
664
668
  _: 1
@@ -669,26 +673,25 @@ const ze = Vue.defineComponent, He = Vue.unref, L = Vue.toDisplayString, A = Vue
669
673
  }, 8, ["modelValue"]);
670
674
  };
671
675
  }
672
- }), Pt = (e) => {
673
- e.component("x-confirm-dlg", Pe), e.component("x-loading", dt), e.component("x-message", qt), e.component("x-prompt-dlg", Lt), e.component("x-wait-dlg", Zt);
674
- }, x = Vue.computed, eo = Vuetify.useTheme;
675
- function xo() {
676
- const e = eo(), o = x(() => e.global.current.value.colors.primary), t = x(() => e.global.current.value.colors.secondary), n = x(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), a = x(() => e.current.value.dark ? "#272727" : "#eeeeee"), r = x(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), l = x(() => e.current.value.dark ? "#303030" : "#f6f6f6"), u = x(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
676
+ }), Ge = (e) => {
677
+ e.component("x-confirm-dlg", Me), e.component("x-loading", Ne), e.component("x-message", He), e.component("x-prompt-dlg", ze), e.component("x-wait-dlg", Xe);
678
+ };
679
+ function it() {
680
+ const e = H(), a = f(() => e.global.current.value.colors.primary), t = f(() => e.global.current.value.colors.secondary), l = f(() => e.current.value.dark ? "#2e2e2e" : "#bdbdbd"), o = f(() => e.current.value.dark ? "#272727" : "#eeeeee"), n = f(() => e.current.value.dark ? "#1e1e1e" : "#ffffff"), r = f(() => e.current.value.dark ? "#303030" : "#f6f6f6"), u = f(() => e.current.value.dark ? "#ffffff1f" : "#0000001f");
677
681
  return {
678
- primaryColor: o,
682
+ primaryColor: a,
679
683
  secondaryColor: t,
680
- backgroundColor0: n,
681
- backgroundColor1: a,
682
- backgroundColor2: r,
683
- highlightColor: l,
684
+ backgroundColor0: l,
685
+ backgroundColor1: o,
686
+ backgroundColor2: n,
687
+ highlightColor: r,
684
688
  borderColor: u
685
689
  };
686
690
  }
687
- const to = Vue.onMounted, oo = Vue.onBeforeUnmount, no = VueRouter.useRoute, ao = VueRouter.useRouter;
688
- function $o(e) {
689
- const o = no(), t = ao(), n = J(), a = de(), r = (c) => {
691
+ function gt(e) {
692
+ const a = Ce(), t = oe(), l = X(), o = re(), n = (c) => {
690
693
  if (c.key === "Escape") {
691
- l();
694
+ r();
692
695
  return;
693
696
  }
694
697
  if (!e && c.ctrlKey && c.shiftKey && c.key.toLowerCase() === "d") {
@@ -699,106 +702,104 @@ function $o(e) {
699
702
  s();
700
703
  return;
701
704
  }
702
- }, l = () => {
703
- var g;
704
- if (!a.isEmpty()) {
705
- a.hasView("waitDlg") || a.popView();
705
+ }, r = () => {
706
+ var w;
707
+ if (!o.isEmpty()) {
708
+ o.hasView("waitDlg") || o.popView();
706
709
  return;
707
710
  }
708
- const c = G(o.path);
709
- (c == null ? void 0 : c.level) === 0 ? (g = navigator == null ? void 0 : navigator.Backbutton) == null || g.goHome(
711
+ const c = Q(a.path);
712
+ (c == null ? void 0 : c.level) === 0 ? (w = navigator == null ? void 0 : navigator.Backbutton) == null || w.goHome(
710
713
  () => {
711
714
  },
712
715
  () => {
713
716
  }
714
717
  ) : t.back();
715
718
  }, u = () => {
716
- n.dark = !n.dark;
719
+ l.dark = !l.dark;
717
720
  }, s = () => {
718
- n.locale === "en" ? n.locale = "zhHans" : n.locale = "en";
721
+ l.locale === "en" ? l.locale = "zhHans" : l.locale = "en";
719
722
  };
720
- return to(() => {
721
- window.addEventListener("keydown", r, !1);
722
- }), oo(() => {
723
- window.removeEventListener("keydown", r, !1);
723
+ return C(() => {
724
+ window.addEventListener("keydown", n, !1);
725
+ }), V(() => {
726
+ window.removeEventListener("keydown", n, !1);
724
727
  }), {};
725
728
  }
726
- function bo() {
727
- const e = J();
728
- function o(t, n) {
729
- const a = e.permissionObjects[t];
730
- return a ? n ? !(!P(a.includes, n) || P(a.excludes, n)) : !0 : !1;
729
+ function vt() {
730
+ const e = X();
731
+ function a(t, l) {
732
+ const o = e.permissionObjects[t];
733
+ return o ? l ? !(!ee(o.includes, l) || ee(o.excludes, l)) : !0 : !1;
731
734
  }
732
- return { verifyPermission: o };
735
+ return { verifyPermission: a };
733
736
  }
734
- const lo = Vue.onBeforeUnmount, ro = Vue.onMounted;
735
- function co(e, o) {
736
- return e.post("pullPermission", o);
737
+ function Qe(e, a) {
738
+ return e.post("pullPermission", a);
737
739
  }
738
- function Co(e) {
739
- const o = J();
740
+ function mt(e) {
741
+ const a = X();
740
742
  let t;
741
- const n = () => {
743
+ const l = () => {
742
744
  clearTimeout(t), t = setTimeout(async () => {
743
- await a(), t && n();
745
+ await o(), t && l();
744
746
  }, 3e3);
745
- }, a = async () => {
747
+ }, o = async () => {
746
748
  try {
747
- const { update: r, permissions: l } = await co(e, {
748
- checksum: o.permissionChecksum
749
+ const { update: n, permissions: r } = await Qe(e, {
750
+ checksum: a.permissionChecksum
749
751
  });
750
- if (!r)
752
+ if (!n)
751
753
  return;
752
754
  const u = {};
753
- for (const s in l) {
755
+ for (const s in r) {
754
756
  if (s === "checksum")
755
757
  continue;
756
- const c = l[s];
758
+ const c = r[s];
757
759
  u[s] = JSON.parse(c);
758
760
  }
759
- o.permissionObjects = u, o.permissionChecksum = l.checksum ?? "";
760
- } catch (r) {
761
- console.error(r);
761
+ a.permissionObjects = u, a.permissionChecksum = r.checksum ?? "";
762
+ } catch (n) {
763
+ console.error(n);
762
764
  }
763
765
  };
764
- return ro(() => {
765
- a(), n();
766
- }), lo(() => {
766
+ return C(() => {
767
+ o(), l();
768
+ }), V(() => {
767
769
  clearTimeout(t), t = void 0;
768
770
  }), {};
769
771
  }
770
- const F = Vue.computed, uo = Vuetify.useDisplay, so = Vuetify.useTheme;
771
- function So() {
772
- const e = so(), o = uo(), t = F(() => e.current.value.dark), n = F(() => !!window.cordova), a = F(() => o.width.value <= 1280 ? o.width.value + "px" : o.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
773
- return { dark: t, sysBarAvail: n, compactWidth: a };
772
+ function ht() {
773
+ const e = H(), a = xe(), t = f(() => e.current.value.dark), l = f(() => !!window.cordova), o = f(() => a.width.value <= 1280 ? a.width.value + "px" : a.width.value <= 1920 ? 1920 / 2.5 + "px" : 2560 / 2.5 + "px");
774
+ return { dark: t, sysBarAvail: l, compactWidth: o };
774
775
  }
775
- const Bo = { install: Pt };
776
+ const wt = { install: Ge };
776
777
  export {
777
- Ue as Permission,
778
- yo as appAppear,
779
- vo as closeWaitDlg,
780
- po as createAxios,
781
- Bo as default,
778
+ je as Permission,
779
+ dt as appAppear,
780
+ ct as closeWaitDlg,
781
+ at as createAxios,
782
+ wt as default,
782
783
  p as eventBus,
783
- P as isExist,
784
- G as matchRouteMeta,
785
- mo as messageError,
786
- ho as messageInfo,
787
- Vo as messageSuccess,
788
- wo as messageWarning,
789
- ko as onBeforeEach,
790
- io as openConfirmDlg,
791
- fo as openPromptDlg,
792
- go as openWaitDlg,
793
- te as routeTransName,
794
- xo as useColor,
795
- J as useGlobalStore,
796
- $o as useHotkey,
797
- bo as usePermission,
798
- Co as usePullPermission,
799
- So as useSystem,
800
- de as useViewMgrStore,
801
- Q as useViewStack,
802
- _o as waitMs,
803
- X as waitUtil
784
+ ee as isExist,
785
+ Q as matchRouteMeta,
786
+ ut as messageError,
787
+ st as messageInfo,
788
+ pt as messageSuccess,
789
+ _t as messageWarning,
790
+ ft as onBeforeEach,
791
+ ot as openConfirmDlg,
792
+ rt as openPromptDlg,
793
+ nt as openWaitDlg,
794
+ ae as routeTransName,
795
+ it as useColor,
796
+ X as useGlobalStore,
797
+ gt as useHotkey,
798
+ vt as usePermission,
799
+ mt as usePullPermission,
800
+ ht as useSystem,
801
+ re as useViewMgrStore,
802
+ Y as useViewStack,
803
+ lt as waitMs,
804
+ G as waitUtil
804
805
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-essential-lib",
3
3
  "private": false,
4
- "version": "0.4.0",
4
+ "version": "0.4.1",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -50,7 +50,6 @@
50
50
  "typescript": "^5.2.2",
51
51
  "vite": "^5.2.0",
52
52
  "vite-plugin-css-injected-by-js": "^3.5.0",
53
- "vite-plugin-externals": "^0.6.2",
54
53
  "vite-plugin-vuetify": "^2.0.3",
55
54
  "vue-tsc": "^2.0.6"
56
55
  }