mvframe 1.1.23 → 1.1.25
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/composition.js +221 -211
- package/dist/vendor.js +1 -1
- package/package.json +1 -1
package/dist/composition.js
CHANGED
|
@@ -2,25 +2,25 @@ import { M as z, g as D, s as G } from "./vendor.js";
|
|
|
2
2
|
import { a as Ve, m as Ue, b as Be, c as Ne, p as Fe, u as We } from "./vendor.js";
|
|
3
3
|
import j from "axios";
|
|
4
4
|
const Y = "lang", $e = (e, t) => {
|
|
5
|
-
var
|
|
6
|
-
const
|
|
7
|
-
var
|
|
8
|
-
if (!
|
|
5
|
+
var a, i;
|
|
6
|
+
const n = typeof window < "u", s = () => {
|
|
7
|
+
var g;
|
|
8
|
+
if (!n)
|
|
9
9
|
return { innerWidth: 1920, innerHeight: 1080 };
|
|
10
|
-
const
|
|
11
|
-
innerWidth:
|
|
12
|
-
innerHeight:
|
|
13
|
-
outerWidth:
|
|
14
|
-
outerHeight:
|
|
15
|
-
screenWidth: u.width ??
|
|
16
|
-
screenHeight: u.height ??
|
|
17
|
-
availWidth: u.availWidth ??
|
|
18
|
-
availHeight: u.availHeight ??
|
|
19
|
-
devicePixelRatio:
|
|
20
|
-
bodyHeight:
|
|
21
|
-
drawerHeight: parseInt(
|
|
22
|
-
pageHeight:
|
|
23
|
-
pageWidth:
|
|
10
|
+
const o = window, l = typeof navigator < "u" ? o.navigator : {}, u = o.screen || {}, d = o.visualViewport, h = {
|
|
11
|
+
innerWidth: o.innerWidth,
|
|
12
|
+
innerHeight: o.innerHeight,
|
|
13
|
+
outerWidth: o.outerWidth,
|
|
14
|
+
outerHeight: o.outerHeight,
|
|
15
|
+
screenWidth: u.width ?? o.innerWidth,
|
|
16
|
+
screenHeight: u.height ?? o.innerHeight,
|
|
17
|
+
availWidth: u.availWidth ?? o.innerWidth,
|
|
18
|
+
availHeight: u.availHeight ?? o.innerHeight,
|
|
19
|
+
devicePixelRatio: o.devicePixelRatio || 1,
|
|
20
|
+
bodyHeight: o.innerHeight - ((g = t.pinia) != null && g.useTab ? 36 : 0) - 64 - 32,
|
|
21
|
+
drawerHeight: parseInt(o.innerHeight * 0.9),
|
|
22
|
+
pageHeight: o.innerHeight - 64 - 32,
|
|
23
|
+
pageWidth: o.innerWidth
|
|
24
24
|
};
|
|
25
25
|
d && (h.visualViewportWidth = d.width, h.visualViewportHeight = d.height, h.visualViewportScale = d.scale);
|
|
26
26
|
const c = l.userAgent || "";
|
|
@@ -32,215 +32,215 @@ const Y = "lang", $e = (e, t) => {
|
|
|
32
32
|
cookieEnabled: !!l.cookieEnabled,
|
|
33
33
|
onLine: l.onLine !== !1,
|
|
34
34
|
maxTouchPoints: l.maxTouchPoints || 0,
|
|
35
|
-
isTouch: "ontouchstart" in
|
|
35
|
+
isTouch: "ontouchstart" in o || (l.maxTouchPoints || 0) > 0,
|
|
36
36
|
isMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Mobile/i.test(
|
|
37
37
|
c
|
|
38
38
|
)
|
|
39
39
|
}, console.info(h), h;
|
|
40
|
-
},
|
|
40
|
+
}, r = () => {
|
|
41
41
|
var l;
|
|
42
|
-
const
|
|
42
|
+
const o = s();
|
|
43
43
|
globalThis.$config = globalThis.$config || {}, globalThis.$config.options = {
|
|
44
44
|
...globalThis.$config.options || {},
|
|
45
|
-
...
|
|
45
|
+
...o
|
|
46
46
|
}, (l = e == null ? void 0 : e.config) != null && l.globalProperties && (e.config.globalProperties.$config = globalThis.$config);
|
|
47
47
|
};
|
|
48
|
-
|
|
48
|
+
r(), n && (window.addEventListener("resize", r, { passive: !0 }), (i = (a = window.visualViewport) == null ? void 0 : a.addEventListener) == null || i.call(a, "resize", r, {
|
|
49
49
|
passive: !0
|
|
50
50
|
}));
|
|
51
51
|
}, ve = (e, t) => {
|
|
52
52
|
var u, d, h;
|
|
53
|
-
const
|
|
53
|
+
const n = t || {}, s = Array.isArray(n.use) && n.use.length > 0 ? n.use : z;
|
|
54
54
|
globalThis.$config = globalThis.$config || {}, globalThis.$config.langUse = s.filter(
|
|
55
55
|
(c) => c && c.use !== !1 && c.value
|
|
56
56
|
), (u = e == null ? void 0 : e.config) != null && u.globalProperties && (e.config.globalProperties.$config = globalThis.$config);
|
|
57
|
-
const
|
|
57
|
+
const a = (typeof localStorage < "u" ? localStorage.getItem(Y) : null) || ((d = globalThis.$config) == null ? void 0 : d.lang) || "en_us", i = Object.assign(
|
|
58
58
|
{},
|
|
59
|
-
D(
|
|
59
|
+
D(a),
|
|
60
60
|
((h = globalThis.$config) == null ? void 0 : h.langMaps) || {},
|
|
61
|
-
|
|
62
|
-
),
|
|
61
|
+
n.langMaps || {}
|
|
62
|
+
), o = (c, g) => !g || globalThis.$getType(g) !== "Object" ? c : String(c).replace(
|
|
63
63
|
/\{([A-Za-z0-9_.$-]+)\}/g,
|
|
64
|
-
(
|
|
65
|
-
), l = (c,
|
|
64
|
+
(m, I) => Object.prototype.hasOwnProperty.call(g, I) ? g[I] : m
|
|
65
|
+
), l = (c, g) => {
|
|
66
66
|
if (c) {
|
|
67
|
-
const
|
|
68
|
-
return
|
|
67
|
+
const m = i[c] || c;
|
|
68
|
+
return o(m, g);
|
|
69
69
|
} else
|
|
70
70
|
return c ?? "";
|
|
71
71
|
};
|
|
72
72
|
globalThis.$patchLangMaps = (c) => {
|
|
73
|
-
c && globalThis.$getType(c) === "Object" && Object.assign(
|
|
73
|
+
c && globalThis.$getType(c) === "Object" && Object.assign(i, c);
|
|
74
74
|
}, globalThis.$l = l, e.config.globalProperties.$l = l, e.config.globalProperties.$patchLangMaps = globalThis.$patchLangMaps, String.prototype.$l = function() {
|
|
75
75
|
return $l(this);
|
|
76
76
|
};
|
|
77
77
|
}, Ae = (e, t) => {
|
|
78
78
|
if (!e || !t) return !1;
|
|
79
|
-
const
|
|
80
|
-
return
|
|
79
|
+
const n = e.getBoundingClientRect(), s = t.getBoundingClientRect(), r = s.right > n.left && s.left < n.right, a = s.bottom > n.top && s.top < n.bottom;
|
|
80
|
+
return r && a;
|
|
81
81
|
}, K = (e, t) => {
|
|
82
82
|
if (e === t) return !0;
|
|
83
83
|
if (e == null || t == null || typeof e != "object" || typeof t != "object")
|
|
84
84
|
return JSON.stringify(e) === JSON.stringify(t);
|
|
85
|
-
const
|
|
86
|
-
if (
|
|
87
|
-
for (const
|
|
88
|
-
if (!s.includes(
|
|
85
|
+
const n = Object.keys(e), s = Object.keys(t);
|
|
86
|
+
if (n.length !== s.length) return !1;
|
|
87
|
+
for (const r of n)
|
|
88
|
+
if (!s.includes(r) || !K(e[r], t[r])) return !1;
|
|
89
89
|
return !0;
|
|
90
90
|
}, O = "download", X = 150, J = (e, t = O) => {
|
|
91
|
-
const
|
|
92
|
-
if (!s) return
|
|
93
|
-
const
|
|
94
|
-
return
|
|
91
|
+
const n = t || O, s = String(e ?? "").trim();
|
|
92
|
+
if (!s) return n;
|
|
93
|
+
const a = s.replace(/[/\\?%*:|"<>]/g, "_").replace(/\.\./g, "_").split(/[/\\]/).pop() || n, i = 200;
|
|
94
|
+
return a.length > i ? a.slice(0, i) : a;
|
|
95
95
|
}, Z = (e) => {
|
|
96
96
|
const t = ((e == null ? void 0 : e.type) || "").toLowerCase();
|
|
97
97
|
return t ? t.includes("spreadsheet") || t.includes("ms-excel") || t.includes("excel") && t.includes("application") : !1;
|
|
98
98
|
}, $ = (e, t) => {
|
|
99
|
-
const
|
|
100
|
-
|
|
99
|
+
const n = URL.createObjectURL(e), s = J(t), r = document.createElement("a");
|
|
100
|
+
r.href = n, r.download = s, r.style.display = "none", document.body.appendChild(r);
|
|
101
101
|
try {
|
|
102
|
-
|
|
102
|
+
r.click();
|
|
103
103
|
} finally {
|
|
104
|
-
document.body.removeChild(
|
|
104
|
+
document.body.removeChild(r), setTimeout(() => URL.revokeObjectURL(n), X);
|
|
105
105
|
}
|
|
106
106
|
}, Q = (e) => {
|
|
107
107
|
if (!e || e.source !== void 0 || e.type === void 0)
|
|
108
108
|
return e;
|
|
109
|
-
const { type: t, data:
|
|
109
|
+
const { type: t, data: n, url: s, headers: r, name: a, filename: i, init: o, ...l } = e, u = i ?? a;
|
|
110
110
|
return t === "csv" ? {
|
|
111
111
|
...l,
|
|
112
112
|
source: "inline",
|
|
113
|
-
content:
|
|
113
|
+
content: n,
|
|
114
114
|
filename: u,
|
|
115
115
|
bom: e.bom
|
|
116
116
|
} : t === "excel" ? {
|
|
117
117
|
...l,
|
|
118
118
|
source: "fetch",
|
|
119
119
|
url: s,
|
|
120
|
-
init: { ...
|
|
120
|
+
init: { ...o || {}, headers: r ?? (o == null ? void 0 : o.headers) },
|
|
121
121
|
response: "blob",
|
|
122
122
|
expectExcel: !0,
|
|
123
123
|
filename: u
|
|
124
124
|
} : e;
|
|
125
125
|
}, Le = async (e = {}) => {
|
|
126
126
|
const t = Q(e), {
|
|
127
|
-
source:
|
|
127
|
+
source: n = "inline",
|
|
128
128
|
content: s,
|
|
129
|
-
blob:
|
|
130
|
-
bom:
|
|
131
|
-
mime:
|
|
132
|
-
url:
|
|
129
|
+
blob: r,
|
|
130
|
+
bom: a = !0,
|
|
131
|
+
mime: i,
|
|
132
|
+
url: o,
|
|
133
133
|
init: l,
|
|
134
134
|
response: u = "blob",
|
|
135
135
|
openIn: d = "self",
|
|
136
136
|
expectExcel: h,
|
|
137
137
|
filename: c,
|
|
138
|
-
name:
|
|
139
|
-
error:
|
|
138
|
+
name: g,
|
|
139
|
+
error: m = () => {
|
|
140
140
|
},
|
|
141
141
|
// 避免 legacy 字段渗入后续逻辑
|
|
142
|
-
type:
|
|
142
|
+
type: I,
|
|
143
143
|
data: Te,
|
|
144
144
|
headers: Me,
|
|
145
145
|
...we
|
|
146
|
-
} = t, w = c ??
|
|
146
|
+
} = t, w = c ?? g;
|
|
147
147
|
try {
|
|
148
|
-
if (
|
|
149
|
-
if (
|
|
150
|
-
$(
|
|
148
|
+
if (n === "inline") {
|
|
149
|
+
if (r instanceof Blob) {
|
|
150
|
+
$(r, w);
|
|
151
151
|
return;
|
|
152
152
|
}
|
|
153
153
|
if (s == null) {
|
|
154
|
-
|
|
154
|
+
m(new Error("content or blob is required for inline"));
|
|
155
155
|
return;
|
|
156
156
|
}
|
|
157
|
-
const p = typeof s == "string" ? s : String(s),
|
|
158
|
-
$(new Blob([
|
|
157
|
+
const p = typeof s == "string" ? s : String(s), S = a ? "\uFEFF" + p : p, R = i || (a ? "text/csv;charset=utf-8" : "text/plain;charset=utf-8");
|
|
158
|
+
$(new Blob([S], { type: R }), w);
|
|
159
159
|
return;
|
|
160
160
|
}
|
|
161
|
-
if (
|
|
162
|
-
if (!
|
|
163
|
-
|
|
161
|
+
if (n === "fetch") {
|
|
162
|
+
if (!o) {
|
|
163
|
+
m(new Error("url is required for fetch"));
|
|
164
164
|
return;
|
|
165
165
|
}
|
|
166
|
-
const p = await fetch(
|
|
166
|
+
const p = await fetch(o, l);
|
|
167
167
|
if (!p.ok) {
|
|
168
|
-
|
|
168
|
+
m(new Error(`fetch failed: ${p.status}`));
|
|
169
169
|
return;
|
|
170
170
|
}
|
|
171
171
|
if (u === "text") {
|
|
172
|
-
const
|
|
172
|
+
const R = await p.text(), W = a ? "\uFEFF" + R : R, q = i || (a ? "text/csv;charset=utf-8" : "text/plain;charset=utf-8");
|
|
173
173
|
$(new Blob([W], { type: q }), w);
|
|
174
174
|
return;
|
|
175
175
|
}
|
|
176
|
-
const
|
|
177
|
-
if (h && !Z(
|
|
178
|
-
|
|
176
|
+
const S = await p.blob();
|
|
177
|
+
if (h && !Z(S)) {
|
|
178
|
+
m(new Error("excel does not exist"));
|
|
179
179
|
return;
|
|
180
180
|
}
|
|
181
|
-
$(
|
|
181
|
+
$(S, w);
|
|
182
182
|
return;
|
|
183
183
|
}
|
|
184
|
-
if (
|
|
185
|
-
if (!
|
|
186
|
-
|
|
184
|
+
if (n === "open") {
|
|
185
|
+
if (!o) {
|
|
186
|
+
m(new Error("url is required for open"));
|
|
187
187
|
return;
|
|
188
188
|
}
|
|
189
|
-
d === "blank" ? window.open(
|
|
189
|
+
d === "blank" ? window.open(o, "_blank", "noopener,noreferrer") : window.location.href = o;
|
|
190
190
|
return;
|
|
191
191
|
}
|
|
192
|
-
|
|
192
|
+
m(new Error(`unknown source: ${n}`));
|
|
193
193
|
} catch (p) {
|
|
194
|
-
|
|
194
|
+
m(p instanceof Error ? p : new Error(String(p)));
|
|
195
195
|
}
|
|
196
196
|
};
|
|
197
|
-
function ee(e, t,
|
|
197
|
+
function ee(e, t, n) {
|
|
198
198
|
if (t === "" || t === void 0 || t === null)
|
|
199
199
|
return "";
|
|
200
|
-
const s = globalThis.$fa,
|
|
201
|
-
if ((
|
|
202
|
-
const
|
|
200
|
+
const s = globalThis.$fa, r = globalThis.$fu, a = (n == null ? void 0 : n.precision) ?? 2, i = n == null ? void 0 : n.unit;
|
|
201
|
+
if ((i === "currency" || i === "%") && r) {
|
|
202
|
+
const o = {
|
|
203
203
|
[e]: {
|
|
204
|
-
unit:
|
|
205
|
-
precision:
|
|
204
|
+
unit: i === "currency" ? "currency" : "%",
|
|
205
|
+
precision: a
|
|
206
206
|
}
|
|
207
207
|
};
|
|
208
208
|
try {
|
|
209
|
-
return
|
|
209
|
+
return r({
|
|
210
210
|
prop: e,
|
|
211
|
-
currency:
|
|
211
|
+
currency: n == null ? void 0 : n.currency,
|
|
212
212
|
value: t,
|
|
213
|
-
obj:
|
|
213
|
+
obj: o
|
|
214
214
|
});
|
|
215
215
|
} catch {
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
if (s)
|
|
219
219
|
try {
|
|
220
|
-
return s(t,
|
|
220
|
+
return s(t, a);
|
|
221
221
|
} catch {
|
|
222
222
|
return String(t);
|
|
223
223
|
}
|
|
224
224
|
return String(t);
|
|
225
225
|
}
|
|
226
|
-
function Pe(e, t,
|
|
227
|
-
const { columns: s = [] } = e || {}, { resolveMetric:
|
|
228
|
-
return !s.length || !t || typeof t != "object" ? [] : s.map((
|
|
229
|
-
const
|
|
230
|
-
if (!
|
|
226
|
+
function Pe(e, t, n = {}) {
|
|
227
|
+
const { columns: s = [] } = e || {}, { resolveMetric: r } = n;
|
|
228
|
+
return !s.length || !t || typeof t != "object" ? [] : s.map((a) => {
|
|
229
|
+
const i = a.property ?? a.prop ?? "";
|
|
230
|
+
if (!i)
|
|
231
231
|
return "";
|
|
232
|
-
let
|
|
233
|
-
if (
|
|
232
|
+
let o = t[i];
|
|
233
|
+
if (o === void 0 && (o = ""), o === "")
|
|
234
234
|
return "";
|
|
235
|
-
const l = typeof
|
|
235
|
+
const l = typeof r == "function" ? r(i) : void 0;
|
|
236
236
|
try {
|
|
237
|
-
return ee(
|
|
237
|
+
return ee(i, o, l);
|
|
238
238
|
} catch {
|
|
239
|
-
return String(
|
|
239
|
+
return String(o);
|
|
240
240
|
}
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
|
-
const
|
|
243
|
+
const C = "mvframe_primary", V = "mvframe_theme", k = "mvframe_theme_name", te = "dark", v = "main", A = "mv-theme-", T = { r: 255, g: 255, b: 255 }, ne = { r: 0, g: 0, b: 0 }, U = [1, 3, 5, 7, 9], re = [
|
|
244
244
|
"--el-color-primary-light-3",
|
|
245
245
|
"--el-color-primary-light-5",
|
|
246
246
|
"--el-color-primary-light-7",
|
|
@@ -254,56 +254,56 @@ function L(e) {
|
|
|
254
254
|
let t = String(e).trim().replace(/^#/, "");
|
|
255
255
|
if (t.length === 3 && (t = t.split("").map((s) => s + s).join("")), t.length >= 8 && (t = t.slice(0, 6)), t.length !== 6 || Number.isNaN(parseInt(t, 16)))
|
|
256
256
|
return null;
|
|
257
|
-
const
|
|
257
|
+
const n = parseInt(t, 16);
|
|
258
258
|
return {
|
|
259
|
-
r:
|
|
260
|
-
g:
|
|
261
|
-
b:
|
|
259
|
+
r: n >> 16 & 255,
|
|
260
|
+
g: n >> 8 & 255,
|
|
261
|
+
b: n & 255
|
|
262
262
|
};
|
|
263
263
|
}
|
|
264
|
-
function y(e, t,
|
|
265
|
-
const s = (
|
|
266
|
-
return `#${[s(e), s(t), s(
|
|
264
|
+
function y(e, t, n) {
|
|
265
|
+
const s = (r) => Math.max(0, Math.min(255, Math.round(r)));
|
|
266
|
+
return `#${[s(e), s(t), s(n)].map((r) => r.toString(16).padStart(2, "0")).join("")}`;
|
|
267
267
|
}
|
|
268
|
-
function B(e, t,
|
|
269
|
-
const
|
|
270
|
-
return `rgba(${
|
|
268
|
+
function B(e, t, n, s) {
|
|
269
|
+
const r = (i) => Math.max(0, Math.min(255, Math.round(i))), a = Math.max(0, Math.min(1, s));
|
|
270
|
+
return `rgba(${r(e)}, ${r(t)}, ${r(n)}, ${a})`;
|
|
271
271
|
}
|
|
272
272
|
function oe(e) {
|
|
273
|
-
const t = [e.r, e.g, e.b].map((
|
|
273
|
+
const t = [e.r, e.g, e.b].map((n) => (n /= 255, n <= 0.03928 ? n / 12.92 : ((n + 0.055) / 1.055) ** 2.4));
|
|
274
274
|
return 0.2126 * t[0] + 0.7152 * t[1] + 0.0722 * t[2];
|
|
275
275
|
}
|
|
276
276
|
function N(e) {
|
|
277
277
|
return oe(e) > 0.5 ? "#1a1a1a" : "#ffffff";
|
|
278
278
|
}
|
|
279
|
-
function b(e, t,
|
|
280
|
-
const s =
|
|
279
|
+
function b(e, t, n) {
|
|
280
|
+
const s = n / 100, r = 1 - s;
|
|
281
281
|
return {
|
|
282
|
-
r: e.r * s + t.r *
|
|
283
|
-
g: e.g * s + t.g *
|
|
284
|
-
b: e.b * s + t.b *
|
|
282
|
+
r: e.r * s + t.r * r,
|
|
283
|
+
g: e.g * s + t.g * r,
|
|
284
|
+
b: e.b * s + t.b * r
|
|
285
285
|
};
|
|
286
286
|
}
|
|
287
|
-
function
|
|
288
|
-
const
|
|
289
|
-
if (!
|
|
287
|
+
function ae(e, t = "light") {
|
|
288
|
+
const n = L(e);
|
|
289
|
+
if (!n)
|
|
290
290
|
return null;
|
|
291
|
-
const s = b(T,
|
|
291
|
+
const s = b(T, n, 30), r = b(T, n, 50), a = b(T, n, 70), i = b(T, n, 80), o = b(T, n, 90), l = b(ne, n, 20);
|
|
292
292
|
return {
|
|
293
293
|
"--el-color-primary-light-3": y(s.r, s.g, s.b),
|
|
294
|
-
"--el-color-primary-light-5": y(
|
|
295
|
-
"--el-color-primary-light-7": t === "dark" ? B(
|
|
296
|
-
"--el-color-primary-light-8": y(
|
|
297
|
-
"--el-color-primary-light-9": y(
|
|
294
|
+
"--el-color-primary-light-5": y(r.r, r.g, r.b),
|
|
295
|
+
"--el-color-primary-light-7": t === "dark" ? B(n.r, n.g, n.b, 0.7) : y(a.r, a.g, a.b),
|
|
296
|
+
"--el-color-primary-light-8": y(i.r, i.g, i.b),
|
|
297
|
+
"--el-color-primary-light-9": y(o.r, o.g, o.b),
|
|
298
298
|
"--el-color-primary-dark-2": y(l.r, l.g, l.b)
|
|
299
299
|
};
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function ie(e) {
|
|
302
302
|
const t = L(e);
|
|
303
303
|
return t ? Object.fromEntries(
|
|
304
|
-
U.map((
|
|
305
|
-
`--color-primary${
|
|
306
|
-
B(t.r, t.g, t.b,
|
|
304
|
+
U.map((n) => [
|
|
305
|
+
`--color-primary${n}`,
|
|
306
|
+
B(t.r, t.g, t.b, n / 10)
|
|
307
307
|
])
|
|
308
308
|
) : null;
|
|
309
309
|
}
|
|
@@ -311,7 +311,7 @@ function le(e) {
|
|
|
311
311
|
e.style.removeProperty("--el-color-primary"), e.style.removeProperty("--color-on-primary-text");
|
|
312
312
|
for (const t of se)
|
|
313
313
|
e.style.removeProperty(t);
|
|
314
|
-
for (const t of
|
|
314
|
+
for (const t of re)
|
|
315
315
|
e.style.removeProperty(t);
|
|
316
316
|
}
|
|
317
317
|
function F(e) {
|
|
@@ -320,7 +320,7 @@ function F(e) {
|
|
|
320
320
|
}
|
|
321
321
|
function ce(e) {
|
|
322
322
|
const t = [...e.classList].find(
|
|
323
|
-
(
|
|
323
|
+
(n) => n.startsWith(A)
|
|
324
324
|
);
|
|
325
325
|
return t ? t.slice(A.length) : v;
|
|
326
326
|
}
|
|
@@ -331,45 +331,45 @@ function he(e) {
|
|
|
331
331
|
return e.classList.contains("light") ? "light" : e.classList.contains("dark") ? "dark" : te;
|
|
332
332
|
}
|
|
333
333
|
function de(e, t) {
|
|
334
|
-
const
|
|
335
|
-
return ue(e), e.classList.add(`${A}${
|
|
334
|
+
const n = F(t);
|
|
335
|
+
return ue(e), e.classList.add(`${A}${n}`), n;
|
|
336
336
|
}
|
|
337
|
-
function
|
|
337
|
+
function ge(e, t, n = "light") {
|
|
338
338
|
const s = L(t.startsWith("#") ? t : `#${t}`);
|
|
339
339
|
if (!s)
|
|
340
340
|
return !1;
|
|
341
|
-
const
|
|
342
|
-
e.style.setProperty("--color-primary",
|
|
343
|
-
const
|
|
344
|
-
|
|
345
|
-
const
|
|
346
|
-
return
|
|
341
|
+
const r = y(s.r, s.g, s.b);
|
|
342
|
+
e.style.setProperty("--color-primary", r), e.style.setProperty("--el-color-primary", r), e.style.setProperty("--color-on-primary-text", N(s));
|
|
343
|
+
const a = ie(r);
|
|
344
|
+
a && Object.entries(a).forEach(([o, l]) => e.style.setProperty(o, l));
|
|
345
|
+
const i = ae(r, n);
|
|
346
|
+
return i && Object.entries(i).forEach(([o, l]) => e.style.setProperty(o, l)), !0;
|
|
347
347
|
}
|
|
348
|
-
function
|
|
349
|
-
const t = document.documentElement,
|
|
348
|
+
function me(e = {}) {
|
|
349
|
+
const t = document.documentElement, n = (e.mode ?? he(t)) === "light" ? "light" : "dark", s = e.theme ?? ce(t);
|
|
350
350
|
if (de(t, s), e.primary != null && e.primary !== "") {
|
|
351
|
-
const
|
|
352
|
-
if (!
|
|
353
|
-
t.style.setProperty("--color-primary",
|
|
354
|
-
const
|
|
355
|
-
|
|
351
|
+
const r = String(e.primary).trim();
|
|
352
|
+
if (!ge(t, r, n)) {
|
|
353
|
+
t.style.setProperty("--color-primary", r), t.style.setProperty("--el-color-primary", r);
|
|
354
|
+
const a = L(r.startsWith("#") ? r : `#${r}`);
|
|
355
|
+
a && t.style.setProperty("--color-on-primary-text", N(a));
|
|
356
356
|
}
|
|
357
357
|
} else (e.primary === null || e.primary === "") && (t.style.removeProperty("--color-primary"), le(t));
|
|
358
|
-
t.classList.toggle("light",
|
|
358
|
+
t.classList.toggle("light", n === "light"), t.classList.toggle("dark", n === "dark");
|
|
359
359
|
}
|
|
360
|
-
function
|
|
361
|
-
e.primary !== void 0 && (e.primary == null || e.primary === "" ? localStorage.removeItem(
|
|
362
|
-
|
|
360
|
+
function Ie(e) {
|
|
361
|
+
e.primary !== void 0 && (e.primary == null || e.primary === "" ? localStorage.removeItem(C) : localStorage.setItem(C, String(e.primary))), e.mode !== void 0 && localStorage.setItem(V, e.mode), e.theme !== void 0 && (e.theme == null || e.theme === "" ? localStorage.removeItem(k) : localStorage.setItem(
|
|
362
|
+
k,
|
|
363
363
|
F(e.theme)
|
|
364
364
|
));
|
|
365
365
|
}
|
|
366
|
-
function
|
|
367
|
-
var
|
|
368
|
-
const e = localStorage.getItem(
|
|
369
|
-
|
|
366
|
+
function Ce() {
|
|
367
|
+
var r;
|
|
368
|
+
const e = localStorage.getItem(C), t = localStorage.getItem(V), n = localStorage.getItem(k) || ((r = globalThis.$config) == null ? void 0 : r.theme) || v, s = t === "light" ? "light" : "dark";
|
|
369
|
+
me({
|
|
370
370
|
primary: e != null && e !== "" ? e : null,
|
|
371
371
|
mode: s,
|
|
372
|
-
theme:
|
|
372
|
+
theme: n
|
|
373
373
|
});
|
|
374
374
|
}
|
|
375
375
|
const pe = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 };
|
|
@@ -377,7 +377,7 @@ let M = null;
|
|
|
377
377
|
function H(e) {
|
|
378
378
|
G("error", e);
|
|
379
379
|
}
|
|
380
|
-
function
|
|
380
|
+
function ke(e) {
|
|
381
381
|
M = e && typeof e == "object" ? e : null;
|
|
382
382
|
}
|
|
383
383
|
function P(e) {
|
|
@@ -386,8 +386,8 @@ function P(e) {
|
|
|
386
386
|
const t = typeof globalThis < "u" ? globalThis.__MVFRAME_ENV__ : null;
|
|
387
387
|
if (t && t[e] != null && t[e] !== "")
|
|
388
388
|
return String(t[e]);
|
|
389
|
-
const
|
|
390
|
-
return
|
|
389
|
+
const n = typeof import.meta < "u" ? pe : null;
|
|
390
|
+
return n && n[e] != null && n[e] !== "" ? String(n[e]) : "";
|
|
391
391
|
}
|
|
392
392
|
const _ = j.create({
|
|
393
393
|
timeout: 0,
|
|
@@ -395,17 +395,17 @@ const _ = j.create({
|
|
|
395
395
|
});
|
|
396
396
|
let f = [];
|
|
397
397
|
const fe = j.CancelToken, ye = (e) => {
|
|
398
|
-
const t = e.url + "_" + e.headers["Content-HI"] + "_" + e.ex,
|
|
398
|
+
const t = e.url + "_" + e.headers["Content-HI"] + "_" + e.ex, n = [];
|
|
399
399
|
if (f.length)
|
|
400
400
|
for (let s in f)
|
|
401
|
-
f[s].v === t &&
|
|
402
|
-
|
|
401
|
+
f[s].v === t && n.push(s);
|
|
402
|
+
n.length > 0 && (f[n[0]].cb(), f.splice(n[0], 1));
|
|
403
403
|
}, E = (e) => {
|
|
404
404
|
if (e != null && e.url) {
|
|
405
405
|
const t = e.url + "_" + e.headers["Content-HI"] + "_" + e.ex;
|
|
406
|
-
for (let
|
|
407
|
-
if (f[
|
|
408
|
-
f.splice(
|
|
406
|
+
for (let n in f)
|
|
407
|
+
if (f[n].v === t) {
|
|
408
|
+
f.splice(n, 1);
|
|
409
409
|
break;
|
|
410
410
|
}
|
|
411
411
|
}
|
|
@@ -413,11 +413,11 @@ const fe = j.CancelToken, ye = (e) => {
|
|
|
413
413
|
_.interceptors.request.use(
|
|
414
414
|
(e) => {
|
|
415
415
|
e.headers = e.headers || {};
|
|
416
|
-
const { login: t, accountInfo:
|
|
417
|
-
return s && e.headers["Content-HI"] && (e.headers.Authorization = `Bearer ${s}`), globalThis.$config.useRqLang && (e.headers.lang = globalThis.$config.lang || "en_us"),
|
|
416
|
+
const { login: t, accountInfo: n = {} } = window.$store.launch(), { access_token: s } = t.info, r = e.noaccount === !0 || e.noAccount === !0;
|
|
417
|
+
return s && e.headers["Content-HI"] && (e.headers.Authorization = `Bearer ${s}`), globalThis.$config.useRqLang && (e.headers.lang = globalThis.$config.lang || "en_us"), n.partner_org_id && !r && (e.data ? e.method.toLowerCase() === "get" ? e.params.accountId = n.partner_org_id : e.data.accountId = n.partner_org_id : e.method.toLowerCase() === "get" ? e.params = { accountId: n.partner_org_id } : e.data = { accountId: n.partner_org_id }), ye(e), e.cancelToken = new fe((a) => {
|
|
418
418
|
f.push({
|
|
419
419
|
v: e.url + "_" + e.headers["Content-HI"] + "_" + e.ex,
|
|
420
|
-
cb:
|
|
420
|
+
cb: a
|
|
421
421
|
});
|
|
422
422
|
}), e;
|
|
423
423
|
},
|
|
@@ -425,28 +425,28 @@ _.interceptors.request.use(
|
|
|
425
425
|
);
|
|
426
426
|
_.interceptors.response.use(
|
|
427
427
|
({ data: e, config: t }) => {
|
|
428
|
-
var
|
|
428
|
+
var a;
|
|
429
429
|
if (e == null || typeof e != "object" || Array.isArray(e))
|
|
430
430
|
return E(t), e;
|
|
431
|
-
let { code:
|
|
432
|
-
if (
|
|
431
|
+
let { code: n, message: s, msg: r } = e;
|
|
432
|
+
if (r = r || s, n === 200)
|
|
433
433
|
E(t);
|
|
434
|
-
else if (
|
|
434
|
+
else if (n === 500) {
|
|
435
435
|
if (t.showMsg !== !1) {
|
|
436
|
-
const
|
|
436
|
+
const i = (a = t == null ? void 0 : t.headers) != null && a.CONTACT_CUSTOMER_SERVICE ? window.$l("CONTACT_CUSTOMER_SERVICE") : "";
|
|
437
437
|
H({
|
|
438
438
|
grouping: !0,
|
|
439
439
|
showClose: !0,
|
|
440
440
|
duration: 0,
|
|
441
|
-
message: [
|
|
441
|
+
message: [r, i].filter(Boolean).join(" ")
|
|
442
442
|
});
|
|
443
443
|
}
|
|
444
444
|
E(t);
|
|
445
|
-
} else
|
|
445
|
+
} else n === 403 && window.location.replace("/"), E(t);
|
|
446
446
|
return e;
|
|
447
447
|
},
|
|
448
448
|
(e) => {
|
|
449
|
-
var
|
|
449
|
+
var n, s, r, a, i;
|
|
450
450
|
let t = !1;
|
|
451
451
|
if (e && e.response)
|
|
452
452
|
switch (e.response.status) {
|
|
@@ -466,12 +466,12 @@ _.interceptors.response.use(
|
|
|
466
466
|
e.message = `Connection Error-${e.response.status}`;
|
|
467
467
|
}
|
|
468
468
|
else
|
|
469
|
-
(
|
|
469
|
+
(n = e.stack) != null && n.includes("timeout") ? e.message = window.$l("Timeout, Please Refresh") : (e.message = window.$l("Connect Failed"), t = !0);
|
|
470
470
|
return t || ((s = e == null ? void 0 : e.response) == null ? void 0 : s.status) !== 403 && H({
|
|
471
471
|
grouping: !0,
|
|
472
|
-
message: `${e.message} ${(
|
|
472
|
+
message: `${e.message} ${(a = (r = e.config) == null ? void 0 : r.headers) == null ? void 0 : a["Content-HI"]}`
|
|
473
473
|
}), E(e.config), e.code === "ERR_CANCELED" ? Promise.resolve({ code: e.code, msg: e.message }) : Promise.resolve({
|
|
474
|
-
code: (
|
|
474
|
+
code: (i = e.response) == null ? void 0 : i.status,
|
|
475
475
|
msg: e.message
|
|
476
476
|
});
|
|
477
477
|
}
|
|
@@ -489,68 +489,78 @@ function _e(e) {
|
|
|
489
489
|
if (e.baseURL = P("VITE_APP_BASEURL"), e.method = "post", e.headers = {
|
|
490
490
|
...e.headers,
|
|
491
491
|
"Content-HI": e.url
|
|
492
|
-
}, e.data
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
492
|
+
}, e.data) {
|
|
493
|
+
if (globalThis.$getType(e.data) === "Object") {
|
|
494
|
+
const { emptyMap: n = [void 0, null], emptyString: s = !1 } = e;
|
|
495
|
+
s && globalThis.$getType(n) === "Array" && n.push("");
|
|
496
|
+
const r = {
|
|
497
|
+
lang: localStorage.getItem("lang") || "en_us"
|
|
498
|
+
};
|
|
499
|
+
n.length && (Object.keys(e.data).forEach((a) => {
|
|
500
|
+
const i = e.data[a];
|
|
501
|
+
n.includes(i) || (r[a] = i);
|
|
502
|
+
}), e.data = r);
|
|
503
|
+
}
|
|
504
|
+
} else
|
|
505
|
+
e.data = {
|
|
506
|
+
lang: localStorage.getItem("lang") || "en_us"
|
|
507
|
+
};
|
|
501
508
|
return e.url = e.ver ? `api/${e.ver}/ads` : "api/v3/ads", _(e);
|
|
502
509
|
}
|
|
503
|
-
function
|
|
510
|
+
function x(e) {
|
|
504
511
|
const {
|
|
505
512
|
data: t,
|
|
506
|
-
url:
|
|
513
|
+
url: n,
|
|
507
514
|
ex: s,
|
|
508
|
-
method:
|
|
509
|
-
emptyString:
|
|
510
|
-
emptyMap:
|
|
511
|
-
useToken:
|
|
515
|
+
method: r = "post",
|
|
516
|
+
emptyString: a = !1,
|
|
517
|
+
emptyMap: i = [void 0, null],
|
|
518
|
+
useToken: o = !0
|
|
512
519
|
} = e;
|
|
513
|
-
e.method =
|
|
520
|
+
e.method = r;
|
|
514
521
|
const { login: l } = globalThis.$store.launch(), { access_token: u } = l.info || {}, d = {};
|
|
515
|
-
if (
|
|
522
|
+
if (a && globalThis.$getType(i) === "Array" && i.push(""), i.length) {
|
|
516
523
|
for (let h in t)
|
|
517
|
-
|
|
524
|
+
i.indexOf(t[h]) === -1 && (d[h] = t[h]);
|
|
518
525
|
e.data = d;
|
|
519
526
|
}
|
|
520
|
-
return e.baseURL = P("VITE_APP_AIURL"), e.headers
|
|
527
|
+
return e.baseURL = P("VITE_APP_AIURL"), e.headers ? e.headers = {
|
|
521
528
|
...e.headers,
|
|
522
529
|
"Content-Type": "application/json",
|
|
523
|
-
token:
|
|
524
|
-
}
|
|
530
|
+
token: o && u != null ? String(u) : ""
|
|
531
|
+
} : e.headers = {
|
|
532
|
+
"Content-Type": "application/json",
|
|
533
|
+
token: o && u != null ? String(u) : ""
|
|
534
|
+
}, _(e);
|
|
525
535
|
}
|
|
526
|
-
const
|
|
536
|
+
const xe = x;
|
|
527
537
|
function Oe(e) {
|
|
528
|
-
globalThis.$login = be, globalThis.$get = Ee, globalThis.$post = _e, globalThis.$form =
|
|
538
|
+
globalThis.$login = be, globalThis.$get = Ee, globalThis.$post = _e, globalThis.$form = x, globalThis.$xform = x;
|
|
529
539
|
}
|
|
530
540
|
export {
|
|
531
541
|
te as MVFRAME_DEFAULT_THEME_MODE,
|
|
532
542
|
v as MVFRAME_DEFAULT_THEME_NAME,
|
|
533
543
|
Y as MVFRAME_STORAGE_LANG,
|
|
534
|
-
|
|
544
|
+
C as MVFRAME_STORAGE_PRIMARY,
|
|
535
545
|
V as MVFRAME_STORAGE_THEME,
|
|
536
|
-
|
|
546
|
+
k as MVFRAME_STORAGE_THEME_NAME,
|
|
537
547
|
A as MVFRAME_THEME_CLASS_PREFIX,
|
|
538
|
-
|
|
548
|
+
me as applyMvframeTheme,
|
|
539
549
|
K as deepEqual,
|
|
540
550
|
Le as download,
|
|
541
551
|
ee as formatSummaryCell,
|
|
542
552
|
Ve as getMaps,
|
|
543
553
|
Oe as installRq,
|
|
544
554
|
Ae as isInView,
|
|
545
|
-
|
|
555
|
+
Ce as loadMvframeTheme,
|
|
546
556
|
Ue as mapLang,
|
|
547
557
|
Be as mapLangPath,
|
|
548
558
|
Ne as mergeMaps,
|
|
549
559
|
Fe as patchMaps,
|
|
550
|
-
|
|
560
|
+
Ie as persistMvframeTheme,
|
|
551
561
|
J as sanitizeDownloadFileName,
|
|
552
|
-
|
|
553
|
-
|
|
562
|
+
ke as setMvframeRqEnv,
|
|
563
|
+
x as useForm,
|
|
554
564
|
Ee as useGet,
|
|
555
565
|
ve as useLang,
|
|
556
566
|
be as useLogin,
|
|
@@ -558,5 +568,5 @@ export {
|
|
|
558
568
|
$e as useOptions,
|
|
559
569
|
_e as usePost,
|
|
560
570
|
Pe as useRemoteSummary,
|
|
561
|
-
|
|
571
|
+
xe as useXform
|
|
562
572
|
};
|
package/dist/vendor.js
CHANGED
|
@@ -13948,7 +13948,7 @@ const Yr = (a, o = {}) => {
|
|
|
13948
13948
|
}, Wr = {
|
|
13949
13949
|
name: "Matt Avias Frame",
|
|
13950
13950
|
copyright: "©2026",
|
|
13951
|
-
version: "1.1.
|
|
13951
|
+
version: "1.1.25",
|
|
13952
13952
|
author: "Matt Avias",
|
|
13953
13953
|
date: "2026-02-26",
|
|
13954
13954
|
/** 默认语言 key,与 `$getLang`、localStorage `lang` 一致;业务在 app.use(mvframe, { config }) 里覆盖 */
|