mvframe 1.0.18 → 1.0.20
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 +126 -124
- package/dist/css/cpt.css +1 -1
- package/dist/css/style.css +1 -1
- package/dist/dayjs.js +500 -436
- package/dist/element-plus.js +1 -1
- package/dist/util.js +66 -64
- package/dist/vendor.js +2264 -2145
- package/package.json +1 -1
package/dist/element-plus.js
CHANGED
|
@@ -6,7 +6,7 @@ import { i as no, c as vi, w as Os, s as Od, a as jn, b as ca, d as pi, l as ia,
|
|
|
6
6
|
import { S as mm } from "./async-validator.js";
|
|
7
7
|
import { w as gm, E as Ga } from "./@sxzz.js";
|
|
8
8
|
import { T as Sl } from "./@ctrl.js";
|
|
9
|
-
import { d as Ue, c as hi, l as Vd, a as bm, w as ym, b as Cm, e as wm,
|
|
9
|
+
import { d as Ue, c as hi, l as Vd, a as bm, w as ym, b as Cm, e as wm, f as Sm, g as km } from "./dayjs.js";
|
|
10
10
|
import { m as Em } from "./memoize-one.js";
|
|
11
11
|
import { Y as Tm } from "./normalize-wheel-es.js";
|
|
12
12
|
import { o as $m, f as Nm, s as Im, a as xm, b as Om, d as Rm, c as Mm } from "./@floating-ui.js";
|
package/dist/util.js
CHANGED
|
@@ -1,82 +1,84 @@
|
|
|
1
|
-
import { MVFRAME_STORAGE_LANG as
|
|
2
|
-
import { d as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { MVFRAME_STORAGE_LANG as N } from "./composition.js";
|
|
2
|
+
import { d as f, i as I, q as P } from "./dayjs.js";
|
|
3
|
+
f.extend(I);
|
|
4
|
+
f.extend(P);
|
|
5
|
+
const Y = (s) => {
|
|
6
|
+
globalThis.$d = f;
|
|
7
|
+
const u = (e) => {
|
|
6
8
|
if (e.startsWith("/"))
|
|
7
9
|
return new URL(e, import.meta.url).href;
|
|
8
10
|
if (e)
|
|
9
11
|
return new URL((/* @__PURE__ */ Object.assign({}))[`/src/assets/img/${e}`], import.meta.url).href;
|
|
10
12
|
throw new Error("please provide an image url with getImg");
|
|
11
13
|
};
|
|
12
|
-
s.config.globalProperties.$getImg =
|
|
14
|
+
s.config.globalProperties.$getImg = u, globalThis.$getImg = u, globalThis.$getLang = () => {
|
|
13
15
|
var e;
|
|
14
|
-
return localStorage.getItem(
|
|
16
|
+
return localStorage.getItem(N) || ((e = globalThis.$config) == null ? void 0 : e.lang) || "en_us";
|
|
15
17
|
}, globalThis.token = "WQpvrYIEnSzAxhOWrbUpGvElhGztdOjOGOdbrSlhUYlrQArOdpMhY1vYMSA7l4xMOUl9MAl1I6AvSrQ8vlE0bpChQ0UWMMlYt0hQC0M0pSz0rUhvlIllSWzMESnAMUlt";
|
|
16
|
-
const
|
|
17
|
-
globalThis.$md5 = (e) =>
|
|
18
|
-
const
|
|
18
|
+
const $ = (e) => Number(e.match(/\d+(\.\d+)?/g).join(""));
|
|
19
|
+
globalThis.$md5 = (e) => $(e);
|
|
20
|
+
const y = (e, r = 0) => {
|
|
19
21
|
let o = parseInt(Math.random() * e);
|
|
20
22
|
return o += r, o;
|
|
21
23
|
};
|
|
22
|
-
globalThis.$rn =
|
|
23
|
-
const
|
|
24
|
+
globalThis.$rn = y;
|
|
25
|
+
const T = (e, r) => {
|
|
24
26
|
let o = [];
|
|
25
27
|
for (let t = 0; t < e; t++)
|
|
26
28
|
o.push(r(t));
|
|
27
29
|
return o;
|
|
28
30
|
};
|
|
29
|
-
globalThis.$fd =
|
|
30
|
-
const
|
|
31
|
-
s.config.globalProperties.$toUpperCamel =
|
|
32
|
-
const
|
|
31
|
+
globalThis.$fd = T;
|
|
32
|
+
const g = (e, r = !1) => e.substr(0, 1).toUpperCase() + (r ? e.substr(1, e.length).toLowerCase() : e.substr(1, e.length));
|
|
33
|
+
s.config.globalProperties.$toUpperCamel = g, globalThis.$toUpperCamel = g;
|
|
34
|
+
const p = (e, r = 2) => {
|
|
33
35
|
const o = globalThis.$getType(e);
|
|
34
36
|
let t;
|
|
35
37
|
o === "Number" ? (e = e.toFixed(r), t = String(e), e = String(Math.abs(e))) : o === "String" && (t = e, e = String(Math.abs(Number(e))));
|
|
36
|
-
const
|
|
37
|
-
let
|
|
38
|
-
|
|
38
|
+
const n = e.split(".");
|
|
39
|
+
let l = n[0].split("");
|
|
40
|
+
l = l.reverse();
|
|
39
41
|
let a = [];
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
l.forEach((U, m) => {
|
|
43
|
+
m !== 0 && m % 3 === 0 && a.push(","), a.push(U);
|
|
42
44
|
});
|
|
43
45
|
let i = a.reverse().join("");
|
|
44
|
-
return globalThis.$getType(r) === "Number" && r > 0 && (i += ".",
|
|
46
|
+
return globalThis.$getType(r) === "Number" && r > 0 && (i += ".", n[1] ? i += n[1].padEnd(r, 0).substr(0, r) : i += "0".padEnd(r, "0")), Number(t) !== Number(e) ? `-${i}` : i;
|
|
45
47
|
};
|
|
46
|
-
globalThis.$fa =
|
|
47
|
-
const
|
|
48
|
-
var
|
|
48
|
+
globalThis.$fa = p, s.config.globalProperties.$fa = p;
|
|
49
|
+
const C = (e, r) => {
|
|
50
|
+
var n, l;
|
|
49
51
|
const o = r == null ? void 0 : r[e];
|
|
50
52
|
if (o != null)
|
|
51
53
|
return o;
|
|
52
|
-
const t = (
|
|
54
|
+
const t = (l = (n = globalThis.$config) == null ? void 0 : n.table) == null ? void 0 : l.summaryMetric;
|
|
53
55
|
return t == null ? null : typeof t == "function" ? t(e) ?? null : t[e] ?? null;
|
|
54
|
-
},
|
|
55
|
-
const
|
|
56
|
-
if (
|
|
56
|
+
}, b = ({ prop: e, currency: r, value: o, obj: t }) => {
|
|
57
|
+
const n = C(e, t);
|
|
58
|
+
if (n == null || typeof n != "object")
|
|
57
59
|
return globalThis.$fa(o, 2);
|
|
58
|
-
if (
|
|
59
|
-
const
|
|
60
|
-
return
|
|
60
|
+
if (n.unit === "currency") {
|
|
61
|
+
const l = r ?? n.currency;
|
|
62
|
+
return l ? `${l} ${globalThis.$fa(o, n == null ? void 0 : n.precision)}` : globalThis.$fa(o, n == null ? void 0 : n.precision);
|
|
61
63
|
}
|
|
62
|
-
return
|
|
64
|
+
return n.unit === "%" ? `${globalThis.$fa(o, n == null ? void 0 : n.precision)}%` : globalThis.$fa(o, n == null ? void 0 : n.precision);
|
|
63
65
|
};
|
|
64
|
-
globalThis.$fu =
|
|
65
|
-
const
|
|
66
|
+
globalThis.$fu = b, s.config.globalProperties.$fu = b;
|
|
67
|
+
const k = (e = () => {
|
|
66
68
|
}, r = 2) => {
|
|
67
69
|
const o = Math.max(0, Number(r) || 2) * 100;
|
|
68
|
-
return new Promise((t,
|
|
70
|
+
return new Promise((t, n) => {
|
|
69
71
|
setTimeout(() => {
|
|
70
72
|
try {
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
} catch (
|
|
74
|
-
l
|
|
73
|
+
const l = e();
|
|
74
|
+
l != null && typeof l.then == "function" ? Promise.resolve(l).then((a) => t(a === void 0 ? !0 : a)).catch(n) : t(l === void 0 ? !0 : l);
|
|
75
|
+
} catch (l) {
|
|
76
|
+
n(l);
|
|
75
77
|
}
|
|
76
78
|
}, o);
|
|
77
79
|
});
|
|
78
80
|
};
|
|
79
|
-
globalThis.$pm =
|
|
81
|
+
globalThis.$pm = k;
|
|
80
82
|
const M = (e = () => {
|
|
81
83
|
}, r = 500) => {
|
|
82
84
|
let o;
|
|
@@ -102,47 +104,47 @@ const R = (s) => {
|
|
|
102
104
|
data: r
|
|
103
105
|
};
|
|
104
106
|
}, globalThis.$getType = (e) => Object.prototype.toString.call(e).slice(8, -1);
|
|
105
|
-
const
|
|
107
|
+
const h = (e) => {
|
|
106
108
|
var o;
|
|
107
109
|
const r = (o = s.config.globalProperties) == null ? void 0 : o.$message;
|
|
108
110
|
r != null && r.success && r.success({ message: e, center: !0, duration: 5e3 });
|
|
109
|
-
},
|
|
110
|
-
var
|
|
111
|
+
}, d = (e, r) => {
|
|
112
|
+
var n;
|
|
111
113
|
if (!e) {
|
|
112
114
|
console.info("No Value");
|
|
113
115
|
return;
|
|
114
116
|
}
|
|
115
|
-
const o = ((
|
|
117
|
+
const o = ((n = globalThis.$l) == null ? void 0 : n.call(globalThis, "Copied")) || "Copied";
|
|
116
118
|
let t;
|
|
117
119
|
if (r ? globalThis.$getType(r) !== "Boolean" ? t = `${o} ${r}: ${e}` : t = `${o}: ${e}` : t = o, navigator.clipboard && globalThis.isSecureContext)
|
|
118
|
-
navigator.clipboard.writeText(e).then(() =>
|
|
120
|
+
navigator.clipboard.writeText(e).then(() => h(t));
|
|
119
121
|
else {
|
|
120
|
-
let
|
|
121
|
-
|
|
122
|
+
let l = document.createElement("textarea");
|
|
123
|
+
l.value = e, l.style.position = "fixed", l.style.opacity = 0, document.body.appendChild(l), l.select(), document.execCommand("Copy"), l.remove(), h(t);
|
|
122
124
|
}
|
|
123
125
|
};
|
|
124
|
-
globalThis.$copy =
|
|
125
|
-
const
|
|
126
|
-
globalThis.$sc =
|
|
126
|
+
globalThis.$copy = d, s.config.globalProperties.$copy = d;
|
|
127
|
+
const x = (e) => e < 1e3 ? e : e < 1e6 ? parseInt(e / 1e3) + "k" : parseInt(e / 1e6) + "m";
|
|
128
|
+
globalThis.$sc = x;
|
|
127
129
|
const F = {
|
|
128
130
|
cpa: "avgCPA",
|
|
129
131
|
cpt: "avgCPT"
|
|
130
|
-
},
|
|
132
|
+
}, O = (e, r = F) => {
|
|
131
133
|
const o = r[e.name];
|
|
132
134
|
o && (e.name = o);
|
|
133
135
|
};
|
|
134
|
-
globalThis.$nr =
|
|
135
|
-
const
|
|
136
|
+
globalThis.$nr = O;
|
|
137
|
+
const w = (e, r) => (Object.keys(e).forEach((o) => {
|
|
136
138
|
objMap[o] && (e[objMap[o]] = e[o], delete e[o]);
|
|
137
139
|
}), e);
|
|
138
|
-
globalThis.$nro =
|
|
139
|
-
const
|
|
140
|
+
globalThis.$nro = w;
|
|
141
|
+
const A = (e) => {
|
|
140
142
|
let r = 0;
|
|
141
143
|
return Object.keys(e).forEach((o) => {
|
|
142
144
|
(globalThis.$getType(e[o]) === "Array" && e[o].length !== 0 || e[o]) && r++;
|
|
143
145
|
}), r;
|
|
144
146
|
};
|
|
145
|
-
globalThis.$pc =
|
|
147
|
+
globalThis.$pc = A;
|
|
146
148
|
const c = {
|
|
147
149
|
info: {
|
|
148
150
|
tag: "background-color:#0085FF; color:#f1f7ff; border-radius: 2px 0 0 2px;",
|
|
@@ -164,7 +166,7 @@ const R = (s) => {
|
|
|
164
166
|
tag: "background-color:#20c997; color:#f6fffc; border-radius: 2px 0 0 2px;",
|
|
165
167
|
style: "background-color:#f6fffc; color:#20c997;"
|
|
166
168
|
}
|
|
167
|
-
},
|
|
169
|
+
}, S = (e) => {
|
|
168
170
|
let r = !1;
|
|
169
171
|
for (let o in e)
|
|
170
172
|
if (globalThis.$getType(e[o]) === "Object") {
|
|
@@ -172,11 +174,11 @@ const R = (s) => {
|
|
|
172
174
|
break;
|
|
173
175
|
}
|
|
174
176
|
return r;
|
|
175
|
-
},
|
|
176
|
-
globalThis.$c = {},
|
|
177
|
+
}, E = ["info", "log", "warn", "error", "success"];
|
|
178
|
+
globalThis.$c = {}, E.forEach((e) => {
|
|
177
179
|
globalThis.$c[e] = (...r) => {
|
|
178
180
|
const o = e.toUpperCase();
|
|
179
|
-
|
|
181
|
+
S(r) ? (console.groupCollapsed(`%c ${o} `, `${c[e].tag}`), console[e](r), console.groupEnd()) : console.info(
|
|
180
182
|
`%c ${o} %c┆${r}┆`,
|
|
181
183
|
`${c[e].tag}`,
|
|
182
184
|
`${c[e].style}`
|
|
@@ -191,12 +193,12 @@ const R = (s) => {
|
|
|
191
193
|
let o = r === "Array" ? [] : {};
|
|
192
194
|
for (let t in e)
|
|
193
195
|
if (Object.prototype.hasOwnProperty.call(e, t)) {
|
|
194
|
-
const
|
|
195
|
-
|
|
196
|
+
const n = window.$getType(e[t]);
|
|
197
|
+
n === "Object" || n === "Array" ? o[t] = window.$deepClone(e[t]) : o[t] = e[t];
|
|
196
198
|
}
|
|
197
199
|
return o;
|
|
198
200
|
};
|
|
199
201
|
};
|
|
200
202
|
export {
|
|
201
|
-
|
|
203
|
+
Y as u
|
|
202
204
|
};
|