mvframe 1.1.35 → 1.1.39

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