mvframe 1.1.24 → 1.1.26

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.
@@ -1,10 +1,10 @@
1
1
  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
- const Y = "lang", $e = (e, t) => {
4
+ const Y = "lang", Re = (e, t) => {
5
5
  var i, a;
6
- const n = typeof window < "u", s = () => {
7
- var m;
6
+ const n = typeof window < "u", r = () => {
7
+ var p;
8
8
  if (!n)
9
9
  return { innerWidth: 1920, innerHeight: 1080 };
10
10
  const o = window, l = typeof navigator < "u" ? o.navigator : {}, u = o.screen || {}, d = o.visualViewport, h = {
@@ -17,7 +17,7 @@ const Y = "lang", $e = (e, t) => {
17
17
  availWidth: u.availWidth ?? o.innerWidth,
18
18
  availHeight: u.availHeight ?? o.innerHeight,
19
19
  devicePixelRatio: o.devicePixelRatio || 1,
20
- bodyHeight: o.innerHeight - ((m = t.pinia) != null && m.useTab ? 36 : 0) - 64 - 32,
20
+ bodyHeight: o.innerHeight - ((p = t.pinia) != null && p.useTab ? 36 : 0) - 64 - 32,
21
21
  drawerHeight: parseInt(o.innerHeight * 0.9),
22
22
  pageHeight: o.innerHeight - 64 - 32,
23
23
  pageWidth: o.innerWidth
@@ -37,21 +37,21 @@ const Y = "lang", $e = (e, t) => {
37
37
  c
38
38
  )
39
39
  }, console.info(h), h;
40
- }, r = () => {
40
+ }, s = () => {
41
41
  var l;
42
- const o = s();
42
+ const o = r();
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
- r(), n && (window.addEventListener("resize", r, { passive: !0 }), (a = (i = window.visualViewport) == null ? void 0 : i.addEventListener) == null || a.call(i, "resize", r, {
48
+ s(), n && (window.addEventListener("resize", s, { passive: !0 }), (a = (i = window.visualViewport) == null ? void 0 : i.addEventListener) == null || a.call(i, "resize", s, {
49
49
  passive: !0
50
50
  }));
51
51
  }, ve = (e, t) => {
52
52
  var u, d, h;
53
- const n = t || {}, s = Array.isArray(n.use) && n.use.length > 0 ? n.use : z;
54
- globalThis.$config = globalThis.$config || {}, globalThis.$config.langUse = s.filter(
53
+ const n = t || {}, r = Array.isArray(n.use) && n.use.length > 0 ? n.use : z;
54
+ globalThis.$config = globalThis.$config || {}, globalThis.$config.langUse = r.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
57
  const i = (typeof localStorage < "u" ? localStorage.getItem(Y) : null) || ((d = globalThis.$config) == null ? void 0 : d.lang) || "en_us", a = Object.assign(
@@ -59,13 +59,13 @@ const Y = "lang", $e = (e, t) => {
59
59
  D(i),
60
60
  ((h = globalThis.$config) == null ? void 0 : h.langMaps) || {},
61
61
  n.langMaps || {}
62
- ), o = (c, m) => !m || globalThis.$getType(m) !== "Object" ? c : String(c).replace(
62
+ ), o = (c, p) => !p || globalThis.$getType(p) !== "Object" ? c : String(c).replace(
63
63
  /\{([A-Za-z0-9_.$-]+)\}/g,
64
- (p, C) => Object.prototype.hasOwnProperty.call(m, C) ? m[C] : p
65
- ), l = (c, m) => {
64
+ (m, C) => Object.prototype.hasOwnProperty.call(p, C) ? p[C] : m
65
+ ), l = (c, p) => {
66
66
  if (c) {
67
- const p = a[c] || c;
68
- return o(p, m);
67
+ const m = a[c] || c;
68
+ return o(m, p);
69
69
  } else
70
70
  return c ?? "";
71
71
  };
@@ -76,37 +76,37 @@ const Y = "lang", $e = (e, t) => {
76
76
  };
77
77
  }, Ae = (e, t) => {
78
78
  if (!e || !t) return !1;
79
- const n = e.getBoundingClientRect(), s = t.getBoundingClientRect(), r = s.right > n.left && s.left < n.right, i = s.bottom > n.top && s.top < n.bottom;
80
- return r && i;
79
+ const n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), s = r.right > n.left && r.left < n.right, i = r.bottom > n.top && r.top < n.bottom;
80
+ return s && i;
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 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;
85
+ const n = Object.keys(e), r = Object.keys(t);
86
+ if (n.length !== r.length) return !1;
87
+ for (const s of n)
88
+ if (!r.includes(s) || !K(e[s], t[s])) return !1;
89
89
  return !0;
90
90
  }, O = "download", X = 150, J = (e, t = O) => {
91
- const n = t || O, s = String(e ?? "").trim();
92
- if (!s) return n;
93
- const i = s.replace(/[/\\?%*:|"<>]/g, "_").replace(/\.\./g, "_").split(/[/\\]/).pop() || n, a = 200;
91
+ const n = t || O, r = String(e ?? "").trim();
92
+ if (!r) return n;
93
+ const i = r.replace(/[/\\?%*:|"<>]/g, "_").replace(/\.\./g, "_").split(/[/\\]/).pop() || n, a = 200;
94
94
  return i.length > a ? i.slice(0, a) : i;
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
- }, $ = (e, t) => {
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);
98
+ }, R = (e, t) => {
99
+ const n = URL.createObjectURL(e), r = J(t), s = document.createElement("a");
100
+ s.href = n, s.download = r, s.style.display = "none", document.body.appendChild(s);
101
101
  try {
102
- r.click();
102
+ s.click();
103
103
  } finally {
104
- document.body.removeChild(r), setTimeout(() => URL.revokeObjectURL(n), X);
104
+ document.body.removeChild(s), 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: n, url: s, headers: r, name: i, filename: a, init: o, ...l } = e, u = a ?? i;
109
+ const { type: t, data: n, url: r, headers: s, name: i, filename: a, init: o, ...l } = e, u = a ?? i;
110
110
  return t === "csv" ? {
111
111
  ...l,
112
112
  source: "inline",
@@ -116,8 +116,8 @@ const Y = "lang", $e = (e, t) => {
116
116
  } : t === "excel" ? {
117
117
  ...l,
118
118
  source: "fetch",
119
- url: s,
120
- init: { ...o || {}, headers: r ?? (o == null ? void 0 : o.headers) },
119
+ url: r,
120
+ init: { ...o || {}, headers: s ?? (o == null ? void 0 : o.headers) },
121
121
  response: "blob",
122
122
  expectExcel: !0,
123
123
  filename: u
@@ -125,8 +125,8 @@ const Y = "lang", $e = (e, t) => {
125
125
  }, Le = async (e = {}) => {
126
126
  const t = Q(e), {
127
127
  source: n = "inline",
128
- content: s,
129
- blob: r,
128
+ content: r,
129
+ blob: s,
130
130
  bom: i = !0,
131
131
  mime: a,
132
132
  url: o,
@@ -135,70 +135,70 @@ const Y = "lang", $e = (e, t) => {
135
135
  openIn: d = "self",
136
136
  expectExcel: h,
137
137
  filename: c,
138
- name: m,
139
- error: p = () => {
138
+ name: p,
139
+ error: m = () => {
140
140
  },
141
141
  // 避免 legacy 字段渗入后续逻辑
142
142
  type: C,
143
- data: _e,
143
+ data: Te,
144
144
  headers: Me,
145
145
  ...we
146
- } = t, w = c ?? m;
146
+ } = t, w = c ?? p;
147
147
  try {
148
148
  if (n === "inline") {
149
- if (r instanceof Blob) {
150
- $(r, w);
149
+ if (s instanceof Blob) {
150
+ R(s, w);
151
151
  return;
152
152
  }
153
- if (s == null) {
154
- p(new Error("content or blob is required for inline"));
153
+ if (r == null) {
154
+ m(new Error("content or blob is required for inline"));
155
155
  return;
156
156
  }
157
- const g = typeof s == "string" ? s : String(s), R = i ? "\uFEFF" + g : g, S = a || (i ? "text/csv;charset=utf-8" : "text/plain;charset=utf-8");
158
- $(new Blob([R], { type: S }), w);
157
+ const g = typeof r == "string" ? r : String(r), S = i ? "\uFEFF" + g : g, $ = a || (i ? "text/csv;charset=utf-8" : "text/plain;charset=utf-8");
158
+ R(new Blob([S], { type: $ }), w);
159
159
  return;
160
160
  }
161
161
  if (n === "fetch") {
162
162
  if (!o) {
163
- p(new Error("url is required for fetch"));
163
+ m(new Error("url is required for fetch"));
164
164
  return;
165
165
  }
166
166
  const g = await fetch(o, l);
167
167
  if (!g.ok) {
168
- p(new Error(`fetch failed: ${g.status}`));
168
+ m(new Error(`fetch failed: ${g.status}`));
169
169
  return;
170
170
  }
171
171
  if (u === "text") {
172
- const S = await g.text(), W = i ? "\uFEFF" + S : S, q = a || (i ? "text/csv;charset=utf-8" : "text/plain;charset=utf-8");
173
- $(new Blob([W], { type: q }), w);
172
+ const $ = await g.text(), W = i ? "\uFEFF" + $ : $, q = a || (i ? "text/csv;charset=utf-8" : "text/plain;charset=utf-8");
173
+ R(new Blob([W], { type: q }), w);
174
174
  return;
175
175
  }
176
- const R = await g.blob();
177
- if (h && !Z(R)) {
178
- p(new Error("excel does not exist"));
176
+ const S = await g.blob();
177
+ if (h && !Z(S)) {
178
+ m(new Error("excel does not exist"));
179
179
  return;
180
180
  }
181
- $(R, w);
181
+ R(S, w);
182
182
  return;
183
183
  }
184
184
  if (n === "open") {
185
185
  if (!o) {
186
- p(new Error("url is required for open"));
186
+ m(new Error("url is required for open"));
187
187
  return;
188
188
  }
189
189
  d === "blank" ? window.open(o, "_blank", "noopener,noreferrer") : window.location.href = o;
190
190
  return;
191
191
  }
192
- p(new Error(`unknown source: ${n}`));
192
+ m(new Error(`unknown source: ${n}`));
193
193
  } catch (g) {
194
- p(g instanceof Error ? g : new Error(String(g)));
194
+ m(g instanceof Error ? g : new Error(String(g)));
195
195
  }
196
196
  };
197
197
  function ee(e, t, n) {
198
198
  if (t === "" || t === void 0 || t === null)
199
199
  return "";
200
- const s = globalThis.$fa, r = globalThis.$fu, i = (n == null ? void 0 : n.precision) ?? 2, a = n == null ? void 0 : n.unit;
201
- if ((a === "currency" || a === "%") && r) {
200
+ const r = globalThis.$fa, s = globalThis.$fu, i = (n == null ? void 0 : n.precision) ?? 2, a = n == null ? void 0 : n.unit;
201
+ if ((a === "currency" || a === "%") && s) {
202
202
  const o = {
203
203
  [e]: {
204
204
  unit: a === "currency" ? "currency" : "%",
@@ -206,7 +206,7 @@ function ee(e, t, n) {
206
206
  }
207
207
  };
208
208
  try {
209
- return r({
209
+ return s({
210
210
  prop: e,
211
211
  currency: n == null ? void 0 : n.currency,
212
212
  value: t,
@@ -215,24 +215,24 @@ function ee(e, t, n) {
215
215
  } catch {
216
216
  }
217
217
  }
218
- if (s)
218
+ if (r)
219
219
  try {
220
- return s(t, i);
220
+ return r(t, i);
221
221
  } catch {
222
222
  return String(t);
223
223
  }
224
224
  return String(t);
225
225
  }
226
226
  function Pe(e, t, n = {}) {
227
- const { columns: s = [] } = e || {}, { resolveMetric: r } = n;
228
- return !s.length || !t || typeof t != "object" ? [] : s.map((i) => {
227
+ const { columns: r = [] } = e || {}, { resolveMetric: s } = n;
228
+ return !r.length || !t || typeof t != "object" ? [] : r.map((i) => {
229
229
  const a = i.property ?? i.prop ?? "";
230
230
  if (!a)
231
231
  return "";
232
232
  let o = t[a];
233
233
  if (o === void 0 && (o = ""), o === "")
234
234
  return "";
235
- const l = typeof r == "function" ? r(a) : void 0;
235
+ const l = typeof s == "function" ? s(a) : void 0;
236
236
  try {
237
237
  return ee(a, o, l);
238
238
  } catch {
@@ -240,7 +240,7 @@ function Pe(e, t, n = {}) {
240
240
  }
241
241
  });
242
242
  }
243
- const I = "mvframe_primary", V = "mvframe_theme", k = "mvframe_theme_name", te = "dark", v = "main", A = "mv-theme-", _ = { r: 255, g: 255, b: 255 }, ne = { r: 0, g: 0, b: 0 }, U = [1, 3, 5, 7, 9], re = [
243
+ const I = "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",
@@ -252,7 +252,7 @@ const I = "mvframe_primary", V = "mvframe_theme", k = "mvframe_theme_name", te =
252
252
  );
253
253
  function L(e) {
254
254
  let t = String(e).trim().replace(/^#/, "");
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)))
255
+ if (t.length === 3 && (t = t.split("").map((r) => r + r).join("")), t.length >= 8 && (t = t.slice(0, 6)), t.length !== 6 || Number.isNaN(parseInt(t, 16)))
256
256
  return null;
257
257
  const n = parseInt(t, 16);
258
258
  return {
@@ -262,12 +262,12 @@ function L(e) {
262
262
  };
263
263
  }
264
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("")}`;
265
+ const r = (s) => Math.max(0, Math.min(255, Math.round(s)));
266
+ return `#${[r(e), r(t), r(n)].map((s) => s.toString(16).padStart(2, "0")).join("")}`;
267
267
  }
268
- function B(e, t, n, s) {
269
- const r = (a) => Math.max(0, Math.min(255, Math.round(a))), i = Math.max(0, Math.min(1, s));
270
- return `rgba(${r(e)}, ${r(t)}, ${r(n)}, ${i})`;
268
+ function B(e, t, n, r) {
269
+ const s = (a) => Math.max(0, Math.min(255, Math.round(a))), i = Math.max(0, Math.min(1, r));
270
+ return `rgba(${s(e)}, ${s(t)}, ${s(n)}, ${i})`;
271
271
  }
272
272
  function oe(e) {
273
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));
@@ -277,21 +277,21 @@ function N(e) {
277
277
  return oe(e) > 0.5 ? "#1a1a1a" : "#ffffff";
278
278
  }
279
279
  function b(e, t, n) {
280
- const s = n / 100, r = 1 - s;
280
+ const r = n / 100, s = 1 - r;
281
281
  return {
282
- r: e.r * s + t.r * r,
283
- g: e.g * s + t.g * r,
284
- b: e.b * s + t.b * r
282
+ r: e.r * r + t.r * s,
283
+ g: e.g * r + t.g * s,
284
+ b: e.b * r + t.b * s
285
285
  };
286
286
  }
287
287
  function ie(e, t = "light") {
288
288
  const n = L(e);
289
289
  if (!n)
290
290
  return null;
291
- const s = b(_, n, 30), r = b(_, n, 50), i = b(_, n, 70), a = b(_, n, 80), o = b(_, n, 90), l = b(ne, n, 20);
291
+ const r = b(T, n, 30), s = b(T, n, 50), i = b(T, n, 70), a = b(T, n, 80), o = b(T, n, 90), l = b(ne, n, 20);
292
292
  return {
293
- "--el-color-primary-light-3": y(s.r, s.g, s.b),
294
- "--el-color-primary-light-5": y(r.r, r.g, r.b),
293
+ "--el-color-primary-light-3": y(r.r, r.g, r.b),
294
+ "--el-color-primary-light-5": y(s.r, s.g, s.b),
295
295
  "--el-color-primary-light-7": t === "dark" ? B(n.r, n.g, n.b, 0.7) : y(i.r, i.g, i.b),
296
296
  "--el-color-primary-light-8": y(a.r, a.g, a.b),
297
297
  "--el-color-primary-light-9": y(o.r, o.g, o.b),
@@ -334,24 +334,24 @@ function de(e, t) {
334
334
  const n = F(t);
335
335
  return ue(e), e.classList.add(`${A}${n}`), n;
336
336
  }
337
- function me(e, t, n = "light") {
338
- const s = L(t.startsWith("#") ? t : `#${t}`);
339
- if (!s)
337
+ function pe(e, t, n = "light") {
338
+ const r = L(t.startsWith("#") ? t : `#${t}`);
339
+ if (!r)
340
340
  return !1;
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 i = ae(r);
341
+ const s = y(r.r, r.g, r.b);
342
+ e.style.setProperty("--color-primary", s), e.style.setProperty("--el-color-primary", s), e.style.setProperty("--color-on-primary-text", N(r));
343
+ const i = ae(s);
344
344
  i && Object.entries(i).forEach(([o, l]) => e.style.setProperty(o, l));
345
- const a = ie(r, n);
345
+ const a = ie(s, n);
346
346
  return a && Object.entries(a).forEach(([o, l]) => e.style.setProperty(o, l)), !0;
347
347
  }
348
- function pe(e = {}) {
349
- const t = document.documentElement, n = (e.mode ?? he(t)) === "light" ? "light" : "dark", s = e.theme ?? ce(t);
350
- if (de(t, s), e.primary != null && e.primary !== "") {
351
- const r = String(e.primary).trim();
352
- if (!me(t, r, n)) {
353
- t.style.setProperty("--color-primary", r), t.style.setProperty("--el-color-primary", r);
354
- const i = L(r.startsWith("#") ? r : `#${r}`);
348
+ function me(e = {}) {
349
+ const t = document.documentElement, n = (e.mode ?? he(t)) === "light" ? "light" : "dark", r = e.theme ?? ce(t);
350
+ if (de(t, r), e.primary != null && e.primary !== "") {
351
+ const s = String(e.primary).trim();
352
+ if (!pe(t, s, n)) {
353
+ t.style.setProperty("--color-primary", s), t.style.setProperty("--el-color-primary", s);
354
+ const i = L(s.startsWith("#") ? s : `#${s}`);
355
355
  i && t.style.setProperty("--color-on-primary-text", N(i));
356
356
  }
357
357
  } else (e.primary === null || e.primary === "") && (t.style.removeProperty("--color-primary"), le(t));
@@ -364,11 +364,11 @@ function Ce(e) {
364
364
  ));
365
365
  }
366
366
  function Ie() {
367
- var r;
368
- const e = localStorage.getItem(I), t = localStorage.getItem(V), n = localStorage.getItem(k) || ((r = globalThis.$config) == null ? void 0 : r.theme) || v, s = t === "light" ? "light" : "dark";
369
- pe({
367
+ var s;
368
+ const e = localStorage.getItem(I), t = localStorage.getItem(V), n = localStorage.getItem(k) || ((s = globalThis.$config) == null ? void 0 : s.theme) || v, r = t === "light" ? "light" : "dark";
369
+ me({
370
370
  primary: e != null && e !== "" ? e : null,
371
- mode: s,
371
+ mode: r,
372
372
  theme: n
373
373
  });
374
374
  }
@@ -389,7 +389,7 @@ function P(e) {
389
389
  const n = typeof import.meta < "u" ? ge : null;
390
390
  return n && n[e] != null && n[e] !== "" ? String(n[e]) : "";
391
391
  }
392
- const T = j.create({
392
+ const _ = j.create({
393
393
  timeout: 0,
394
394
  withCredentials: !1
395
395
  });
@@ -397,8 +397,8 @@ let f = [];
397
397
  const fe = j.CancelToken, ye = (e) => {
398
398
  const t = e.url + "_" + e.headers["Content-HI"] + "_" + e.ex, n = [];
399
399
  if (f.length)
400
- for (let s in f)
401
- f[s].v === t && n.push(s);
400
+ for (let r in f)
401
+ f[r].v === t && n.push(r);
402
402
  n.length > 0 && (f[n[0]].cb(), f.splice(n[0], 1));
403
403
  }, E = (e) => {
404
404
  if (e != null && e.url) {
@@ -410,11 +410,11 @@ const fe = j.CancelToken, ye = (e) => {
410
410
  }
411
411
  }
412
412
  };
413
- T.interceptors.request.use(
413
+ _.interceptors.request.use(
414
414
  (e) => {
415
415
  e.headers = e.headers || {};
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((i) => {
416
+ const { login: t, accountInfo: n = {} } = window.$store.launch(), { access_token: r } = t.info, s = e.noaccount === !0 || e.noAccount === !0;
417
+ return r && e.headers["Content-HI"] && (e.headers.Authorization = `Bearer ${r}`), globalThis.$config.useRqLang && (e.headers.lang = globalThis.$config.lang || "en_us"), n.partner_org_id && !s && (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((i) => {
418
418
  f.push({
419
419
  v: e.url + "_" + e.headers["Content-HI"] + "_" + e.ex,
420
420
  cb: i
@@ -423,13 +423,13 @@ T.interceptors.request.use(
423
423
  },
424
424
  (e) => Promise.reject(e)
425
425
  );
426
- T.interceptors.response.use(
426
+ _.interceptors.response.use(
427
427
  ({ data: e, config: t }) => {
428
428
  var i;
429
429
  if (e == null || typeof e != "object" || Array.isArray(e))
430
430
  return E(t), e;
431
- let { code: n, message: s, msg: r } = e;
432
- if (r = r || s, n === 200)
431
+ let { code: n, message: r, msg: s } = e;
432
+ if (s = s || r, n === 200)
433
433
  E(t);
434
434
  else if (n === 500) {
435
435
  if (t.showMsg !== !1) {
@@ -438,7 +438,7 @@ T.interceptors.response.use(
438
438
  grouping: !0,
439
439
  showClose: !0,
440
440
  duration: 0,
441
- message: [r, a].filter(Boolean).join(" ")
441
+ message: [s, a].filter(Boolean).join(" ")
442
442
  });
443
443
  }
444
444
  E(t);
@@ -446,7 +446,7 @@ T.interceptors.response.use(
446
446
  return e;
447
447
  },
448
448
  (e) => {
449
- var n, s, r, i, a;
449
+ var n, r, s, i, a;
450
450
  let t = !1;
451
451
  if (e && e.response)
452
452
  switch (e.response.status) {
@@ -467,9 +467,9 @@ T.interceptors.response.use(
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
- return t || ((s = e == null ? void 0 : e.response) == null ? void 0 : s.status) !== 403 && H({
470
+ return t || ((r = e == null ? void 0 : e.response) == null ? void 0 : r.status) !== 403 && H({
471
471
  grouping: !0,
472
- message: `${e.message} ${(i = (r = e.config) == null ? void 0 : r.headers) == null ? void 0 : i["Content-HI"]}`
472
+ message: `${e.message} ${(i = (s = e.config) == null ? void 0 : s.headers) == null ? void 0 : i["Content-HI"]}`
473
473
  }), E(e.config), e.code === "ERR_CANCELED" ? Promise.resolve({ code: e.code, msg: e.message }) : Promise.resolve({
474
474
  code: (a = e.response) == null ? void 0 : a.status,
475
475
  msg: e.message
@@ -477,40 +477,49 @@ T.interceptors.response.use(
477
477
  }
478
478
  );
479
479
  function be(e) {
480
- return e.baseURL = P("VITE_APP_BASEURL"), e.method = "get", e.headers = { "Content-Type": "application/x-www-form-urlencoded" }, e.data && (e.params = e.data), T(e);
480
+ return e.baseURL = P("VITE_APP_BASEURL"), e.method = "get", e.headers = { "Content-Type": "application/x-www-form-urlencoded" }, e.data && (e.params = e.data), _(e);
481
481
  }
482
482
  function Ee(e) {
483
483
  return e.baseURL = P("VITE_APP_BASEURL"), e.method = "get", e.headers = {
484
484
  ...e.headers,
485
485
  "Content-HI": e.url
486
- }, e.url = e.ver ? `api/${e.ver}/ads` : "api/v3/ads", e.data && (e.params = e.data), T(e);
486
+ }, e.url = e.ver ? `api/${e.ver}/ads` : "api/v3/ads", e.data && (e.params = e.data), _(e);
487
487
  }
488
- function Te(e) {
489
- if (e.baseURL = P("VITE_APP_BASEURL"), e.method = "post", e.headers = {
488
+ function _e(e) {
489
+ e.baseURL = P("VITE_APP_BASEURL"), e.method = "post", e.headers = {
490
490
  ...e.headers,
491
491
  "Content-HI": e.url
492
- }, e.data && globalThis.$getType(e.data) === "Object") {
493
- const { emptyMap: n = [void 0, null], emptyString: s = !1 } = e;
494
- s && globalThis.$getType(n) === "Array" && n.push("");
495
- const r = {};
496
- n.length && (Object.keys(e.data).forEach((i) => {
497
- const a = e.data[i];
498
- n.includes(a) || (r[i] = a);
499
- }), e.data = r);
500
- }
501
- return e.url = e.ver ? `api/${e.ver}/ads` : "api/v3/ads", T(e);
492
+ };
493
+ let t = (localStorage.getItem("lang") || "en_us").split("_");
494
+ if (t = t.length > 1 ? `${t[0]}-${t[1].toUpperCase()}` : t[0], e.data) {
495
+ if (globalThis.$getType(e.data) === "Object") {
496
+ const { emptyMap: r = [void 0, null], emptyString: s = !1 } = e;
497
+ s && globalThis.$getType(r) === "Array" && r.push("");
498
+ const i = {
499
+ lang: t
500
+ };
501
+ r.length && (Object.keys(e.data).forEach((a) => {
502
+ const o = e.data[a];
503
+ r.includes(o) || (i[a] = o);
504
+ }), e.data = i);
505
+ }
506
+ } else
507
+ e.data = {
508
+ lang: t
509
+ };
510
+ return e.url = e.ver ? `api/${e.ver}/ads` : "api/v3/ads", _(e);
502
511
  }
503
512
  function x(e) {
504
513
  const {
505
514
  data: t,
506
515
  url: n,
507
- ex: s,
508
- method: r = "post",
516
+ ex: r,
517
+ method: s = "post",
509
518
  emptyString: i = !1,
510
519
  emptyMap: a = [void 0, null],
511
520
  useToken: o = !0
512
521
  } = e;
513
- e.method = r;
522
+ e.method = s;
514
523
  const { login: l } = globalThis.$store.launch(), { access_token: u } = l.info || {}, d = {};
515
524
  if (i && globalThis.$getType(a) === "Array" && a.push(""), a.length) {
516
525
  for (let h in t)
@@ -524,11 +533,11 @@ function x(e) {
524
533
  } : e.headers = {
525
534
  "Content-Type": "application/json",
526
535
  token: o && u != null ? String(u) : ""
527
- }, T(e);
536
+ }, _(e);
528
537
  }
529
538
  const xe = x;
530
539
  function Oe(e) {
531
- globalThis.$login = be, globalThis.$get = Ee, globalThis.$post = Te, globalThis.$form = x, globalThis.$xform = x;
540
+ globalThis.$login = be, globalThis.$get = Ee, globalThis.$post = _e, globalThis.$form = x, globalThis.$xform = x;
532
541
  }
533
542
  export {
534
543
  te as MVFRAME_DEFAULT_THEME_MODE,
@@ -538,7 +547,7 @@ export {
538
547
  V as MVFRAME_STORAGE_THEME,
539
548
  k as MVFRAME_STORAGE_THEME_NAME,
540
549
  A as MVFRAME_THEME_CLASS_PREFIX,
541
- pe as applyMvframeTheme,
550
+ me as applyMvframeTheme,
542
551
  K as deepEqual,
543
552
  Le as download,
544
553
  ee as formatSummaryCell,
@@ -558,8 +567,8 @@ export {
558
567
  ve as useLang,
559
568
  be as useLogin,
560
569
  We as useMap,
561
- $e as useOptions,
562
- Te as usePost,
570
+ Re as useOptions,
571
+ _e as usePost,
563
572
  Pe as useRemoteSummary,
564
573
  xe as useXform
565
574
  };
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.24",
13951
+ version: "1.1.26",
13952
13952
  author: "Matt Avias",
13953
13953
  date: "2026-02-26",
13954
13954
  /** 默认语言 key,与 `$getLang`、localStorage `lang` 一致;业务在 app.use(mvframe, { config }) 里覆盖 */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mvframe",
3
3
  "packageManager": "yarn@4.4.1",
4
- "version": "1.1.24",
4
+ "version": "1.1.26",
5
5
  "author": "matt avis",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",