@witlink/components 2.0.3 → 2.0.4
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/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +212 -205
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { InputNumber as
|
|
2
|
-
import { defineComponent as j, useSlots as we,
|
|
3
|
-
import
|
|
1
|
+
import { InputNumber as le, DateRangePicker as Le, Select as Oe, Divider as Re, Space as Ue, Input as ke, Button as ie, Drawer as je, App as Be, Modal as Ie, ConfigProvider as We, TextArea as Fe, Table as ze, Popover as qe, Row as Ke, Col as Ve, Slider as He, message as Xe } from "antdv-next";
|
|
2
|
+
import { defineComponent as j, useSlots as we, openBlock as w, createBlock as U, mergeProps as F, createSlots as ce, renderList as V, unref as S, withCtx as P, renderSlot as I, normalizeProps as ue, guardReactiveProps as $e, useAttrs as Ye, ref as x, markRaw as Ee, createElementBlock as T, createElementVNode as $, watch as Q, resolveDynamicComponent as Ze, createVNode as E, isRef as Z, withModifiers as se, getCurrentInstance as J, render as G, h as W, computed as L, onMounted as Pe, onUnmounted as Ge, normalizeClass as Qe, normalizeStyle as fe, useModel as ee, resolveDirective as Je, withKeys as et, Fragment as X, createTextVNode as te, toDisplayString as re, withDirectives as tt, mergeModels as z, nextTick as me, useCssVars as nt, createCommentVNode as ve, shallowRef as H, shallowReadonly as ot, toValue as K, getCurrentScope as at, onScopeDispose as st, toRaw as rt } from "vue";
|
|
3
|
+
import ge from "dayjs";
|
|
4
4
|
import "antdv-next/dist/modal/useModal/types";
|
|
5
5
|
import { ElScrollbar as lt, ElTooltip as it } from "element-plus";
|
|
6
6
|
import { isNullOrUndef as q, hasPermission as ct } from "./utils.js";
|
|
7
|
-
import { UserCenterKey as xn, buildTree as Cn, exportFile as Sn, forEachTree as kn, getButtonPermissions as wn, getLocale as $n, getMenuInfo as En, getToken as Pn, getUserCenterParams as Dn, getUserCenterParamsByUrl as An, getUserInfo as
|
|
7
|
+
import { UserCenterKey as xn, buildTree as Cn, exportFile as Sn, forEachTree as kn, getButtonPermissions as wn, getLocale as $n, getMenuInfo as En, getToken as Pn, getUserCenterParams as Dn, getUserCenterParamsByUrl as An, getUserInfo as Mn, is as Tn, isArray as Nn, isAsyncFunction as Ln, isBoolean as On, isClient as Rn, isDate as Un, isDef as jn, isElement as Bn, isFunction as In, isImageDom as Wn, isNull as Fn, isNumber as zn, isObject as qn, isPromise as Kn, isServer as Vn, isString as Hn, isUndef as Xn, isWindow as Yn, logoutToUserCenter as Zn, removeAll as Gn, removeLocale as Qn, removeToken as Jn, setLocale as eo, setMenuInfo as to, setToken as no, setUserCenterParams as oo, setUserInfo as ao, toUserCenterConsole as so } from "./utils.js";
|
|
8
8
|
const ut = /* @__PURE__ */ j({
|
|
9
9
|
inheritAttrs: !1,
|
|
10
10
|
__name: "index",
|
|
@@ -16,15 +16,15 @@ const ut = /* @__PURE__ */ j({
|
|
|
16
16
|
},
|
|
17
17
|
setup(e) {
|
|
18
18
|
const n = we();
|
|
19
|
-
return (t,
|
|
20
|
-
const i =
|
|
19
|
+
return (t, a) => {
|
|
20
|
+
const i = le;
|
|
21
21
|
return w(), U(i, F({
|
|
22
22
|
mode: e.customControls ? "spinner" : ""
|
|
23
|
-
}, t.$attrs),
|
|
23
|
+
}, t.$attrs), ce({ _: 2 }, [
|
|
24
24
|
V(Object.keys(S(n)), (r) => ({
|
|
25
25
|
name: r,
|
|
26
26
|
fn: P((c) => [
|
|
27
|
-
I(t.$slots, r,
|
|
27
|
+
I(t.$slots, r, ue($e(c)))
|
|
28
28
|
])
|
|
29
29
|
}))
|
|
30
30
|
]), 1040, ["mode"]);
|
|
@@ -65,9 +65,9 @@ const ut = /* @__PURE__ */ j({
|
|
|
65
65
|
},
|
|
66
66
|
emits: ["update:value", "change"],
|
|
67
67
|
setup(e, { emit: n }) {
|
|
68
|
-
const t = e,
|
|
68
|
+
const t = e, a = n, i = Ye(), r = x(), c = x(), o = (l) => {
|
|
69
69
|
var A, O, R;
|
|
70
|
-
const g = t.maxUnit || t.unit, h = t.minUnit || t.unit, y =
|
|
70
|
+
const g = t.maxUnit || t.unit, h = t.minUnit || t.unit, y = ge().add(t.max, g), v = ge().subtract(t.min, h), k = t.interval;
|
|
71
71
|
if (!((A = r.value) != null && A.length))
|
|
72
72
|
return l.isAfter(y) || l.isBefore(v);
|
|
73
73
|
const f = t.intervalUnit || t.unit, p = i.picker || "date", d = (O = r.value[0]) == null ? void 0 : O.startOf(p), _ = (R = r.value[1]) == null ? void 0 : R.endOf(p), b = d && (l.diff(d, f) > k || l.isAfter(y));
|
|
@@ -75,8 +75,8 @@ const ut = /* @__PURE__ */ j({
|
|
|
75
75
|
}, u = (l) => {
|
|
76
76
|
l ? (r.value = [], c.value = []) : c.value = void 0;
|
|
77
77
|
}, m = (l) => {
|
|
78
|
-
|
|
79
|
-
},
|
|
78
|
+
a("update:value", l), a("change", l);
|
|
79
|
+
}, s = (l) => {
|
|
80
80
|
r.value = l;
|
|
81
81
|
};
|
|
82
82
|
return (l, g) => {
|
|
@@ -86,12 +86,12 @@ const ut = /* @__PURE__ */ j({
|
|
|
86
86
|
"disabled-date": o,
|
|
87
87
|
onChange: m,
|
|
88
88
|
onOpenChange: u,
|
|
89
|
-
onCalendarChange:
|
|
90
|
-
}, l.$attrs),
|
|
89
|
+
onCalendarChange: s
|
|
90
|
+
}, l.$attrs), ce({ _: 2 }, [
|
|
91
91
|
V(Object.keys(l.$slots), (y) => ({
|
|
92
92
|
name: y,
|
|
93
93
|
fn: P((v) => [
|
|
94
|
-
I(l.$slots, y,
|
|
94
|
+
I(l.$slots, y, ue($e(v)))
|
|
95
95
|
])
|
|
96
96
|
}))
|
|
97
97
|
]), 1040, ["value"]);
|
|
@@ -104,7 +104,7 @@ const ut = /* @__PURE__ */ j({
|
|
|
104
104
|
height: "1.2em"
|
|
105
105
|
};
|
|
106
106
|
function ft(e, n) {
|
|
107
|
-
return w(),
|
|
107
|
+
return w(), T("svg", pt, [...n[0] || (n[0] = [
|
|
108
108
|
$("path", {
|
|
109
109
|
fill: "currentColor",
|
|
110
110
|
d: "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8"
|
|
@@ -113,7 +113,7 @@ function ft(e, n) {
|
|
|
113
113
|
fill: "currentColor",
|
|
114
114
|
d: "M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8Z"
|
|
115
115
|
}, null, -1)
|
|
116
|
-
]));
|
|
116
|
+
])]);
|
|
117
117
|
}
|
|
118
118
|
const mt = Ee({ name: "ant-design-plus", render: ft }), vt = /* @__PURE__ */ j({
|
|
119
119
|
inheritAttrs: !1,
|
|
@@ -127,10 +127,10 @@ const mt = Ee({ name: "ant-design-plus", render: ft }), vt = /* @__PURE__ */ j({
|
|
|
127
127
|
}
|
|
128
128
|
},
|
|
129
129
|
setup(e) {
|
|
130
|
-
const n = e, t = x([]),
|
|
130
|
+
const n = e, t = x([]), a = x();
|
|
131
131
|
function i() {
|
|
132
|
-
const r =
|
|
133
|
-
r && t.value.every((c) => c.value !== r) && (t.value.push({ value: r }),
|
|
132
|
+
const r = a.value;
|
|
133
|
+
r && t.value.every((c) => c.value !== r) && (t.value.push({ value: r }), a.value = "");
|
|
134
134
|
}
|
|
135
135
|
return Q(
|
|
136
136
|
() => n.options,
|
|
@@ -140,7 +140,7 @@ const mt = Ee({ name: "ant-design-plus", render: ft }), vt = /* @__PURE__ */ j({
|
|
|
140
140
|
},
|
|
141
141
|
{ immediate: !0 }
|
|
142
142
|
), (r, c) => {
|
|
143
|
-
const o = Re, u = ke, m = mt,
|
|
143
|
+
const o = Re, u = ke, m = mt, s = ie, l = Ue, g = Oe;
|
|
144
144
|
return w(), U(g, F({ options: S(t) }, r.$attrs), {
|
|
145
145
|
popupRender: P((h) => [
|
|
146
146
|
(w(), U(Ze(h))),
|
|
@@ -148,13 +148,13 @@ const mt = Ee({ name: "ant-design-plus", render: ft }), vt = /* @__PURE__ */ j({
|
|
|
148
148
|
E(l, null, {
|
|
149
149
|
default: P(() => [
|
|
150
150
|
E(u, {
|
|
151
|
-
value: S(
|
|
152
|
-
"onUpdate:value": c[0] || (c[0] = (y) => Z(
|
|
151
|
+
value: S(a),
|
|
152
|
+
"onUpdate:value": c[0] || (c[0] = (y) => Z(a) ? a.value = y : null),
|
|
153
153
|
placeholder: e.inputPlaceholder
|
|
154
154
|
}, null, 8, ["value", "placeholder"]),
|
|
155
|
-
E(
|
|
155
|
+
E(s, {
|
|
156
156
|
type: "text",
|
|
157
|
-
onClick:
|
|
157
|
+
onClick: se(i, ["prevent"])
|
|
158
158
|
}, {
|
|
159
159
|
default: P(() => [
|
|
160
160
|
E(m)
|
|
@@ -170,17 +170,17 @@ const mt = Ee({ name: "ant-design-plus", render: ft }), vt = /* @__PURE__ */ j({
|
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
172
|
});
|
|
173
|
-
function
|
|
173
|
+
function de(e) {
|
|
174
174
|
e || (e = J());
|
|
175
|
-
const n = (e == null ? void 0 : e.provides) || {}, t = gt(n, "ConfigConsumerContext"),
|
|
175
|
+
const n = (e == null ? void 0 : e.provides) || {}, t = gt(n, "ConfigConsumerContext"), a = n[t].value;
|
|
176
176
|
return Object.fromEntries(
|
|
177
|
-
Object.entries(
|
|
177
|
+
Object.entries(a).map(([r, c]) => [r, S(c)])
|
|
178
178
|
);
|
|
179
179
|
}
|
|
180
180
|
function gt(e, n) {
|
|
181
181
|
for (; e; ) {
|
|
182
182
|
const t = Reflect.ownKeys(e).find(
|
|
183
|
-
(
|
|
183
|
+
(a) => a === n || typeof a == "symbol" && a.description === n
|
|
184
184
|
);
|
|
185
185
|
if (t)
|
|
186
186
|
return t;
|
|
@@ -199,7 +199,7 @@ function gn(e) {
|
|
|
199
199
|
return null;
|
|
200
200
|
}
|
|
201
201
|
const N = je;
|
|
202
|
-
let B,
|
|
202
|
+
let B, he, D, ye;
|
|
203
203
|
N.destroy = function() {
|
|
204
204
|
const e = N.instanceArr || [], n = e.pop();
|
|
205
205
|
if (n && G(null, n.container), e.length > 0) {
|
|
@@ -215,11 +215,11 @@ N.destroyAll = function() {
|
|
|
215
215
|
}), N.instanceArr = [];
|
|
216
216
|
};
|
|
217
217
|
function hn() {
|
|
218
|
-
var
|
|
218
|
+
var s, l;
|
|
219
219
|
const e = J();
|
|
220
220
|
if (!D) {
|
|
221
221
|
const g = Be.useApp();
|
|
222
|
-
D = g.modal,
|
|
222
|
+
D = g.modal, he = g.message, ye = g.notification;
|
|
223
223
|
}
|
|
224
224
|
D.info || (D = Ie);
|
|
225
225
|
const n = {
|
|
@@ -230,7 +230,7 @@ function hn() {
|
|
|
230
230
|
zh: "请输入",
|
|
231
231
|
en: "Please Enter",
|
|
232
232
|
fr: "Veuillez entrer"
|
|
233
|
-
},
|
|
233
|
+
}, a = de(), i = ((l = (s = a == null ? void 0 : a.locale) == null ? void 0 : s.locale) == null ? void 0 : l.slice(0, 2)) || "en";
|
|
234
234
|
function r({ title: g, ...h }) {
|
|
235
235
|
const y = x();
|
|
236
236
|
return c({
|
|
@@ -309,7 +309,7 @@ function hn() {
|
|
|
309
309
|
};
|
|
310
310
|
v.footer === void 0 && Object.assign(_, {
|
|
311
311
|
footer: () => W(
|
|
312
|
-
|
|
312
|
+
ie,
|
|
313
313
|
{
|
|
314
314
|
onClick: () => {
|
|
315
315
|
N.destroy();
|
|
@@ -336,9 +336,9 @@ function hn() {
|
|
|
336
336
|
...v
|
|
337
337
|
},
|
|
338
338
|
_
|
|
339
|
-
), A =
|
|
339
|
+
), A = a.getPrefixCls(), O = W(
|
|
340
340
|
We,
|
|
341
|
-
{ ...
|
|
341
|
+
{ ...a, prefixCls: A },
|
|
342
342
|
{ default: () => C }
|
|
343
343
|
);
|
|
344
344
|
O.appContext = e.appContext, G(O, k), f.push({ instance: C, comp: h, compInstance: d, container: k });
|
|
@@ -353,9 +353,9 @@ function hn() {
|
|
|
353
353
|
N.destroy();
|
|
354
354
|
}
|
|
355
355
|
return {
|
|
356
|
-
message:
|
|
356
|
+
message: he,
|
|
357
357
|
modal: D,
|
|
358
|
-
notification:
|
|
358
|
+
notification: ye,
|
|
359
359
|
confirm: D.confirm,
|
|
360
360
|
info: D.info,
|
|
361
361
|
warn: D.warning,
|
|
@@ -386,11 +386,11 @@ const ht = /* @__PURE__ */ j({
|
|
|
386
386
|
}
|
|
387
387
|
},
|
|
388
388
|
setup(e, { expose: n }) {
|
|
389
|
-
const t = e,
|
|
389
|
+
const t = e, a = we(), i = x([]), r = x(!1), c = x(0), o = x(1), u = x(10), m = x(), s = x(), l = {
|
|
390
390
|
zh: "共 {num} 条",
|
|
391
391
|
en: "Total {num} items",
|
|
392
392
|
fr: "Total de {num}"
|
|
393
|
-
}, g =
|
|
393
|
+
}, g = de(), h = L(() => {
|
|
394
394
|
var _, b;
|
|
395
395
|
return ((b = (_ = g == null ? void 0 : g.locale) == null ? void 0 : _.locale) == null ? void 0 : b.slice(0, 2)) || "en";
|
|
396
396
|
}), y = L(() => ({
|
|
@@ -406,7 +406,7 @@ const ht = /* @__PURE__ */ j({
|
|
|
406
406
|
if (typeof t.loadData == "function") {
|
|
407
407
|
r.value = !0;
|
|
408
408
|
let _;
|
|
409
|
-
t.newFieldName ? _ = { current: o.value, size: u.value } : _ = { pageNo: o.value, pageSize: u.value }, t.formatSortParams && ((d =
|
|
409
|
+
t.newFieldName ? _ = { current: o.value, size: u.value } : _ = { pageNo: o.value, pageSize: u.value }, t.formatSortParams && ((d = s.value) != null && d.orderMap) && (_[s.value.field + "SortField"] = s.value.orderMap), t.loadData(_, m.value, s.value).then((b) => {
|
|
410
410
|
if (r.value = !1, (b == null ? void 0 : b.code) === 0) {
|
|
411
411
|
const C = b.result || {};
|
|
412
412
|
t.newFieldName ? (c.value = C.total, i.value = C.records) : (c.value = C.totalCount, i.value = C.data);
|
|
@@ -422,7 +422,7 @@ const ht = /* @__PURE__ */ j({
|
|
|
422
422
|
};
|
|
423
423
|
b.orderMap = C[b.order] || "";
|
|
424
424
|
}
|
|
425
|
-
|
|
425
|
+
s.value = b, v();
|
|
426
426
|
}
|
|
427
427
|
function f() {
|
|
428
428
|
o.value = 1, v();
|
|
@@ -442,11 +442,11 @@ const ht = /* @__PURE__ */ j({
|
|
|
442
442
|
pagination: S(y),
|
|
443
443
|
dataSource: S(i),
|
|
444
444
|
onChange: k
|
|
445
|
-
}, d.$attrs),
|
|
446
|
-
V(Object.keys(S(
|
|
445
|
+
}, d.$attrs), ce({ _: 2 }, [
|
|
446
|
+
V(Object.keys(S(a)), (C) => ({
|
|
447
447
|
name: C,
|
|
448
448
|
fn: P((A) => [
|
|
449
|
-
C !== "emptyText" ? I(d.$slots, C,
|
|
449
|
+
C !== "emptyText" ? I(d.$slots, C, ue(F({ key: 0 }, A))) : I(d.$slots, C, { key: 1 })
|
|
450
450
|
])
|
|
451
451
|
}))
|
|
452
452
|
]), 1040, ["loading", "pagination", "dataSource"]);
|
|
@@ -454,12 +454,12 @@ const ht = /* @__PURE__ */ j({
|
|
|
454
454
|
}
|
|
455
455
|
}), yt = (e, n) => {
|
|
456
456
|
const t = e.__vccOpts || e;
|
|
457
|
-
for (const [
|
|
458
|
-
t[
|
|
457
|
+
for (const [a, i] of n)
|
|
458
|
+
t[a] = i;
|
|
459
459
|
return t;
|
|
460
460
|
}, _t = {}, bt = { class: "page-header" }, xt = { class: "page-header-heading" }, Ct = { class: "page-header-heading-left" }, St = { class: "page-header-heading-title" }, kt = { class: "page-header-heading-extra" };
|
|
461
461
|
function wt(e, n) {
|
|
462
|
-
return w(),
|
|
462
|
+
return w(), T("div", bt, [
|
|
463
463
|
$("div", xt, [
|
|
464
464
|
$("div", Ct, [
|
|
465
465
|
$("span", St, [
|
|
@@ -489,7 +489,7 @@ const $t = /* @__PURE__ */ yt(_t, [["render", wt]]), Et = /* @__PURE__ */ j({
|
|
|
489
489
|
}
|
|
490
490
|
},
|
|
491
491
|
setup(e) {
|
|
492
|
-
const n = e, t = x(),
|
|
492
|
+
const n = e, t = x(), a = x(), i = x({}), r = x({}), c = x(0.2);
|
|
493
493
|
function o(m) {
|
|
494
494
|
i.value = { width: `calc(${m * 100}% - 5px)` }, r.value = { width: `calc(${(1 - m) * 100}% - 5px)` };
|
|
495
495
|
}
|
|
@@ -497,10 +497,10 @@ const $t = /* @__PURE__ */ yt(_t, [["render", wt]]), Et = /* @__PURE__ */ j({
|
|
|
497
497
|
const m = t.value;
|
|
498
498
|
if (!m)
|
|
499
499
|
return;
|
|
500
|
-
const
|
|
500
|
+
const s = m.clientWidth, l = m.getBoundingClientRect(), g = l.left;
|
|
501
501
|
function h(v) {
|
|
502
502
|
v.preventDefault(), (v.clientX < l.left || v.clientX > l.right || v.clientY < l.top || v.clientY > l.bottom) && y();
|
|
503
|
-
const f = (v.clientX - g) /
|
|
503
|
+
const f = (v.clientX - g) / s;
|
|
504
504
|
f > n.leftMin && f < n.leftMax && (c.value = f, o(f));
|
|
505
505
|
}
|
|
506
506
|
function y() {
|
|
@@ -509,29 +509,29 @@ const $t = /* @__PURE__ */ yt(_t, [["render", wt]]), Et = /* @__PURE__ */ j({
|
|
|
509
509
|
document.addEventListener("mousemove", h), document.addEventListener("mouseup", y);
|
|
510
510
|
}
|
|
511
511
|
return Pe(() => {
|
|
512
|
-
o(c.value),
|
|
512
|
+
o(c.value), a.value && a.value.addEventListener("mousedown", u, !1);
|
|
513
513
|
}), Ge(() => {
|
|
514
|
-
|
|
515
|
-
}), (m,
|
|
514
|
+
a.value && a.value.removeEventListener("mousedown", u);
|
|
515
|
+
}), (m, s) => (w(), T("div", {
|
|
516
516
|
ref_key: "container",
|
|
517
517
|
ref: t,
|
|
518
518
|
class: Qe(["wl-splitter", { bordered: e.bordered }])
|
|
519
519
|
}, [
|
|
520
520
|
$("div", {
|
|
521
521
|
class: "my-left",
|
|
522
|
-
style:
|
|
522
|
+
style: fe(S(i))
|
|
523
523
|
}, [
|
|
524
524
|
I(m.$slots, "left")
|
|
525
525
|
], 4),
|
|
526
526
|
$("div", {
|
|
527
527
|
ref_key: "spliter",
|
|
528
|
-
ref:
|
|
528
|
+
ref: a,
|
|
529
529
|
style: { height: "100%", width: "10px" },
|
|
530
530
|
class: "my-spliter"
|
|
531
531
|
}, null, 512),
|
|
532
532
|
$("div", {
|
|
533
533
|
class: "my-right",
|
|
534
|
-
style:
|
|
534
|
+
style: fe(S(r))
|
|
535
535
|
}, [
|
|
536
536
|
I(m.$slots, "right")
|
|
537
537
|
], 4)
|
|
@@ -546,7 +546,7 @@ const $t = /* @__PURE__ */ yt(_t, [["render", wt]]), Et = /* @__PURE__ */ j({
|
|
|
546
546
|
xmlns: "http://www.w3.org/2000/svg"
|
|
547
547
|
};
|
|
548
548
|
function Dt(e, n) {
|
|
549
|
-
return w(),
|
|
549
|
+
return w(), T("svg", Pt, [...n[0] || (n[0] = [
|
|
550
550
|
$("path", {
|
|
551
551
|
d: "M7.3125 5.5L2.3125 12L7.3125 18.5H22.3125V5.5H7.3125Z",
|
|
552
552
|
stroke: "#272E3B",
|
|
@@ -565,9 +565,9 @@ function Dt(e, n) {
|
|
|
565
565
|
"stroke-linecap": "round",
|
|
566
566
|
"stroke-linejoin": "round"
|
|
567
567
|
}, null, -1)
|
|
568
|
-
]));
|
|
568
|
+
])]);
|
|
569
569
|
}
|
|
570
|
-
const At = Ee({ name: "local-clear", render: Dt }),
|
|
570
|
+
const At = Ee({ name: "local-clear", render: Dt }), Mt = { class: "nums-box" }, Tt = { class: "btn-box" }, Nt = /* @__PURE__ */ j({
|
|
571
571
|
inheritAttrs: !1,
|
|
572
572
|
__name: "index",
|
|
573
573
|
props: /* @__PURE__ */ z({
|
|
@@ -593,11 +593,11 @@ const At = Ee({ name: "local-clear", render: Dt }), Tt = { class: "nums-box" },
|
|
|
593
593
|
}),
|
|
594
594
|
emits: /* @__PURE__ */ z(["enter"], ["update:value"]),
|
|
595
595
|
setup(e, { emit: n }) {
|
|
596
|
-
const t = e,
|
|
596
|
+
const t = e, a = n, i = x(), r = x(), c = x(["7", "8", "9", "4", "5", "6", "1", "2", "3", "0", "00", "."]), o = ee(e, "value"), u = x(!1);
|
|
597
597
|
function m() {
|
|
598
598
|
u.value = !0;
|
|
599
599
|
}
|
|
600
|
-
function
|
|
600
|
+
function s() {
|
|
601
601
|
k();
|
|
602
602
|
}
|
|
603
603
|
function l(f) {
|
|
@@ -612,7 +612,7 @@ const At = Ee({ name: "local-clear", render: Dt }), Tt = { class: "nums-box" },
|
|
|
612
612
|
const p = String(o.value), d = i.value.getElementsByTagName("input")[0], _ = d.selectionStart || 0, b = d.selectionEnd || 0;
|
|
613
613
|
o.value = `${p.slice(0, _)}${f}${p.slice(b)}`;
|
|
614
614
|
const C = _ + f.length;
|
|
615
|
-
|
|
615
|
+
me(() => {
|
|
616
616
|
r.value.setSelectionRange(C, C);
|
|
617
617
|
});
|
|
618
618
|
}
|
|
@@ -623,7 +623,7 @@ const At = Ee({ name: "local-clear", render: Dt }), Tt = { class: "nums-box" },
|
|
|
623
623
|
const f = String(o.value);
|
|
624
624
|
if (f != null && f.length) {
|
|
625
625
|
const p = i.value.getElementsByTagName("input")[0], d = p.selectionStart || 0, _ = p.selectionEnd || 0, b = d > 0 ? d - 1 : 0;
|
|
626
|
-
d === _ ? o.value = f.slice(0, b) + f.slice(_) : o.value = f.slice(0, d) + f.slice(_),
|
|
626
|
+
d === _ ? o.value = f.slice(0, b) + f.slice(_) : o.value = f.slice(0, d) + f.slice(_), me(() => {
|
|
627
627
|
r.value.setSelectionRange(b, b);
|
|
628
628
|
});
|
|
629
629
|
}
|
|
@@ -637,11 +637,11 @@ const At = Ee({ name: "local-clear", render: Dt }), Tt = { class: "nums-box" },
|
|
|
637
637
|
function k() {
|
|
638
638
|
const f = t.min, p = t.max;
|
|
639
639
|
let d = parseFloat(o.value || "0");
|
|
640
|
-
q(f) || (d = d > f ? d : f), q(p) || (d = d > p ? p : d), o.value = Number(d).toFixed(t.precision), u.value = !1,
|
|
640
|
+
q(f) || (d = d > f ? d : f), q(p) || (d = d > p ? p : d), o.value = Number(d).toFixed(t.precision), u.value = !1, a("enter");
|
|
641
641
|
}
|
|
642
642
|
return (f, p) => {
|
|
643
|
-
const d =
|
|
644
|
-
return w(),
|
|
643
|
+
const d = ie, _ = Ve, b = At, C = Ke, A = ke, O = qe, R = Je("longpress");
|
|
644
|
+
return w(), T("div", {
|
|
645
645
|
class: "number-keyboard",
|
|
646
646
|
ref_key: "numberKeyboard",
|
|
647
647
|
ref: i
|
|
@@ -653,36 +653,36 @@ const At = Ee({ name: "local-clear", render: Dt }), Tt = { class: "nums-box" },
|
|
|
653
653
|
arrow: !1,
|
|
654
654
|
align: { offset: [0, 0] },
|
|
655
655
|
open: S(u),
|
|
656
|
-
"onUpdate:open": p[2] || (p[2] = (
|
|
656
|
+
"onUpdate:open": p[2] || (p[2] = (M) => Z(u) ? u.value = M : null)
|
|
657
657
|
}, {
|
|
658
658
|
content: P(() => [
|
|
659
659
|
$("div", {
|
|
660
660
|
class: "keyboard-panel",
|
|
661
|
-
onMousedownCapture: p[0] || (p[0] =
|
|
661
|
+
onMousedownCapture: p[0] || (p[0] = se(() => {
|
|
662
662
|
}, ["prevent", "stop"]))
|
|
663
663
|
}, [
|
|
664
664
|
E(C, { gutter: "8" }, {
|
|
665
665
|
default: P(() => [
|
|
666
666
|
E(_, { span: 18 }, {
|
|
667
667
|
default: P(() => [
|
|
668
|
-
$("div",
|
|
669
|
-
(w(!0),
|
|
668
|
+
$("div", Mt, [
|
|
669
|
+
(w(!0), T(X, null, V(e.quickNums, (M) => (w(), U(d, {
|
|
670
670
|
class: "btn-num",
|
|
671
|
-
key:
|
|
672
|
-
onClick: (Ne) => l(
|
|
671
|
+
key: M,
|
|
672
|
+
onClick: (Ne) => l(M)
|
|
673
673
|
}, {
|
|
674
674
|
default: P(() => [
|
|
675
|
-
te(
|
|
675
|
+
te(re(M), 1)
|
|
676
676
|
]),
|
|
677
677
|
_: 2
|
|
678
678
|
}, 1032, ["onClick"]))), 128)),
|
|
679
|
-
(w(!0),
|
|
679
|
+
(w(!0), T(X, null, V(S(c), (M) => (w(), U(d, {
|
|
680
680
|
class: "btn-num",
|
|
681
|
-
key:
|
|
682
|
-
onClick: (Ne) => g(
|
|
681
|
+
key: M,
|
|
682
|
+
onClick: (Ne) => g(M)
|
|
683
683
|
}, {
|
|
684
684
|
default: P(() => [
|
|
685
|
-
te(
|
|
685
|
+
te(re(M), 1)
|
|
686
686
|
]),
|
|
687
687
|
_: 2
|
|
688
688
|
}, 1032, ["onClick"]))), 128))
|
|
@@ -692,7 +692,7 @@ const At = Ee({ name: "local-clear", render: Dt }), Tt = { class: "nums-box" },
|
|
|
692
692
|
}),
|
|
693
693
|
E(_, { span: 6 }, {
|
|
694
694
|
default: P(() => [
|
|
695
|
-
$("div",
|
|
695
|
+
$("div", Tt, [
|
|
696
696
|
tt((w(), U(d, {
|
|
697
697
|
class: "btn-clear",
|
|
698
698
|
onClick: h
|
|
@@ -707,11 +707,11 @@ const At = Ee({ name: "local-clear", render: Dt }), Tt = { class: "nums-box" },
|
|
|
707
707
|
E(d, {
|
|
708
708
|
class: "btn-enter",
|
|
709
709
|
type: "primary",
|
|
710
|
-
onClick:
|
|
710
|
+
onClick: se(v, ["stop"])
|
|
711
711
|
}, {
|
|
712
|
-
default: P(() => p[3] || (p[3] = [
|
|
713
|
-
te("Enter ")
|
|
714
|
-
])),
|
|
712
|
+
default: P(() => [...p[3] || (p[3] = [
|
|
713
|
+
te("Enter ", -1)
|
|
714
|
+
])]),
|
|
715
715
|
_: 1
|
|
716
716
|
})
|
|
717
717
|
])
|
|
@@ -728,10 +728,10 @@ const At = Ee({ name: "local-clear", render: Dt }), Tt = { class: "nums-box" },
|
|
|
728
728
|
ref_key: "inputRef",
|
|
729
729
|
ref: r,
|
|
730
730
|
value: o.value,
|
|
731
|
-
"onUpdate:value": p[1] || (p[1] = (
|
|
731
|
+
"onUpdate:value": p[1] || (p[1] = (M) => o.value = M)
|
|
732
732
|
}, f.$attrs, {
|
|
733
733
|
onFocus: m,
|
|
734
|
-
onBlur:
|
|
734
|
+
onBlur: s,
|
|
735
735
|
onKeyup: et(v, ["enter"])
|
|
736
736
|
}), null, 16, ["value"])
|
|
737
737
|
]),
|
|
@@ -769,40 +769,40 @@ const At = Ee({ name: "local-clear", render: Dt }), Tt = { class: "nums-box" },
|
|
|
769
769
|
}),
|
|
770
770
|
emits: /* @__PURE__ */ z(["change"], ["update:value"]),
|
|
771
771
|
setup(e, { emit: n }) {
|
|
772
|
-
nt((
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
772
|
+
nt((s) => ({
|
|
773
|
+
v6ffd511e: S(c),
|
|
774
|
+
v1201d0a5: S(o),
|
|
775
|
+
v1201d466: S(u)
|
|
776
776
|
}));
|
|
777
|
-
const t = e,
|
|
778
|
-
const
|
|
777
|
+
const t = e, a = ee(e, "value"), i = n, r = L(() => {
|
|
778
|
+
const s = {}, l = Array.from(t.flagStops), g = t.min || 0, h = t.max || 100, y = [g, ...a.value, h];
|
|
779
779
|
for (let v = 0; v < y.length; v++) {
|
|
780
780
|
const k = y[v];
|
|
781
|
-
if (
|
|
781
|
+
if (s[k] = k, v > 0) {
|
|
782
782
|
const f = l.shift(), p = y[v - 1], d = p + (k - p) / 2;
|
|
783
|
-
|
|
783
|
+
s[d] = { style: { top: "-28px" }, label: f };
|
|
784
784
|
}
|
|
785
785
|
}
|
|
786
|
-
return
|
|
786
|
+
return s;
|
|
787
787
|
}), c = L(() => {
|
|
788
|
-
const
|
|
788
|
+
const s = a.value, l = t.min || 0, g = t.max || 100, h = Math.floor((s[0] - l) / (g - l) * 100), y = t.colorStops, v = y[0], k = y[y.length - 1];
|
|
789
789
|
return `linear-gradient(90deg, ${v} 0%, ${v} ${h}%, ${k} ${h}%, ${k} 100%)`;
|
|
790
790
|
}), o = L(() => t.colorStops[1]), u = L(() => t.colorStops[2]);
|
|
791
|
-
function m(
|
|
791
|
+
function m(s) {
|
|
792
792
|
const l = t.min || 0, g = t.max || 100;
|
|
793
|
-
|
|
793
|
+
s[0] <= l ? s[0] = l + 1 : s.at(-1) >= g && (s[s.length - 1] = g - 1), s.length === new Set(s).size && (a.value = s, i("change", s));
|
|
794
794
|
}
|
|
795
|
-
return (
|
|
795
|
+
return (s, l) => {
|
|
796
796
|
const g = He;
|
|
797
797
|
return w(), U(g, F({
|
|
798
798
|
class: "rate-slider",
|
|
799
|
-
value:
|
|
799
|
+
value: a.value,
|
|
800
800
|
min: e.min,
|
|
801
801
|
max: e.max,
|
|
802
802
|
range: "",
|
|
803
803
|
marks: S(r),
|
|
804
804
|
onChange: m
|
|
805
|
-
},
|
|
805
|
+
}, s.$attrs), null, 16, ["value", "min", "max", "marks"]);
|
|
806
806
|
};
|
|
807
807
|
}
|
|
808
808
|
}), Ot = { class: "ip-input" }, Rt = { class: "ip-wrapper" }, Ut = {
|
|
@@ -821,48 +821,48 @@ const At = Ee({ name: "local-clear", render: Dt }), Tt = { class: "nums-box" },
|
|
|
821
821
|
}),
|
|
822
822
|
emits: ["update:value"],
|
|
823
823
|
setup(e) {
|
|
824
|
-
const n = e, t = ee(e, "value"),
|
|
824
|
+
const n = e, t = ee(e, "value"), a = x(["", "", "", ""]), i = x(), r = x(""), c = x(), o = (s) => {
|
|
825
825
|
var g, h;
|
|
826
|
-
const l =
|
|
826
|
+
const l = a.value[s];
|
|
827
827
|
if (l && (!/^\d+$/.test(l) || parseInt(l) > 255)) {
|
|
828
|
-
|
|
828
|
+
a.value[s] = "";
|
|
829
829
|
return;
|
|
830
830
|
}
|
|
831
|
-
parseInt(l) >= 100 && (
|
|
832
|
-
}, u = (
|
|
831
|
+
parseInt(l) >= 100 && (s < 3 ? (g = i.value) != null && g.length && i.value[s + 1].focus() : n.hasPort && ((h = c.value) == null || h.focus())), t.value = `${a.value.join(".")}${n.hasPort ? ":" + r.value : ""}`;
|
|
832
|
+
}, u = (s, l) => {
|
|
833
833
|
var g, h;
|
|
834
|
-
l.key === " " &&
|
|
834
|
+
l.key === " " && s < 3 && (l.preventDefault(), (g = i.value) != null && g.length && i.value[s + 1].focus()), l.key === "Backspace" && a.value[s] === "" && s > 0 && (h = i.value) != null && h.length && i.value[s - 1].focus();
|
|
835
835
|
};
|
|
836
836
|
function m() {
|
|
837
|
-
t.value = `${
|
|
837
|
+
t.value = `${a.value.join(".")}${n.hasPort ? ":" + (r.value || "") : ""}`;
|
|
838
838
|
}
|
|
839
839
|
return Q(
|
|
840
840
|
() => t.value,
|
|
841
|
-
(
|
|
842
|
-
if (
|
|
843
|
-
let l =
|
|
841
|
+
(s) => {
|
|
842
|
+
if (s) {
|
|
843
|
+
let l = s;
|
|
844
844
|
if (n.hasPort) {
|
|
845
|
-
const h =
|
|
845
|
+
const h = s.split(":");
|
|
846
846
|
r.value = h[1] || "", l = h[0];
|
|
847
847
|
}
|
|
848
848
|
const g = l.split(".");
|
|
849
|
-
g.length === 4 && (
|
|
849
|
+
g.length === 4 && (a.value = g);
|
|
850
850
|
} else
|
|
851
|
-
|
|
851
|
+
a.value = ["", "", "", ""], r.value = "";
|
|
852
852
|
},
|
|
853
853
|
{ immediate: !0 }
|
|
854
|
-
), (
|
|
855
|
-
const g =
|
|
856
|
-
return w(),
|
|
854
|
+
), (s, l) => {
|
|
855
|
+
const g = le;
|
|
856
|
+
return w(), T("div", Ot, [
|
|
857
857
|
$("div", Rt, [
|
|
858
|
-
(w(!0),
|
|
858
|
+
(w(!0), T(X, null, V(S(a), (h, y) => (w(), T(X, { key: y }, [
|
|
859
859
|
E(g, {
|
|
860
860
|
ref_for: !0,
|
|
861
861
|
ref_key: "ipPartArr",
|
|
862
862
|
ref: i,
|
|
863
863
|
class: "ip-part",
|
|
864
|
-
value: S(
|
|
865
|
-
"onUpdate:value": (v) => S(
|
|
864
|
+
value: S(a)[y],
|
|
865
|
+
"onUpdate:value": (v) => S(a)[y] = v,
|
|
866
866
|
min: 0,
|
|
867
867
|
max: 255,
|
|
868
868
|
precision: 0,
|
|
@@ -870,10 +870,10 @@ const At = Ee({ name: "local-clear", render: Dt }), Tt = { class: "nums-box" },
|
|
|
870
870
|
onChange: (v) => o(y),
|
|
871
871
|
onKeydown: (v) => u(y, v)
|
|
872
872
|
}, null, 8, ["value", "onUpdate:value", "onChange", "onKeydown"]),
|
|
873
|
-
y < 3 ? (w(),
|
|
873
|
+
y < 3 ? (w(), T("span", Ut, ".")) : ve("", !0)
|
|
874
874
|
], 64))), 128))
|
|
875
875
|
]),
|
|
876
|
-
e.hasPort ? (w(),
|
|
876
|
+
e.hasPort ? (w(), T(X, { key: 0 }, [
|
|
877
877
|
l[1] || (l[1] = $("span", { class: "ip-port-separator" }, ":", -1)),
|
|
878
878
|
E(g, {
|
|
879
879
|
ref_key: "portRef",
|
|
@@ -887,7 +887,7 @@ const At = Ee({ name: "local-clear", render: Dt }), Tt = { class: "nums-box" },
|
|
|
887
887
|
controls: !1,
|
|
888
888
|
onChange: m
|
|
889
889
|
}, null, 8, ["value"])
|
|
890
|
-
], 64)) :
|
|
890
|
+
], 64)) : ve("", !0)
|
|
891
891
|
]);
|
|
892
892
|
};
|
|
893
893
|
}
|
|
@@ -917,26 +917,26 @@ const At = Ee({ name: "local-clear", render: Dt }), Tt = { class: "nums-box" },
|
|
|
917
917
|
}),
|
|
918
918
|
emits: /* @__PURE__ */ z(["change"], ["update:value"]),
|
|
919
919
|
setup(e, { emit: n }) {
|
|
920
|
-
const t = e,
|
|
921
|
-
const
|
|
922
|
-
return q(
|
|
920
|
+
const t = e, a = ee(e, "value"), i = n, r = L(() => {
|
|
921
|
+
const s = a.value[1];
|
|
922
|
+
return q(s) ? t.max : s;
|
|
923
923
|
}), c = L(() => {
|
|
924
|
-
const
|
|
925
|
-
return q(
|
|
924
|
+
const s = a.value[0];
|
|
925
|
+
return q(s) ? t.min : s;
|
|
926
926
|
}), o = x(), u = x();
|
|
927
927
|
function m() {
|
|
928
|
-
const
|
|
929
|
-
|
|
928
|
+
const s = [o.value, u.value];
|
|
929
|
+
a.value = s, i("change", s);
|
|
930
930
|
}
|
|
931
931
|
return Q(
|
|
932
|
-
() =>
|
|
933
|
-
(
|
|
934
|
-
|
|
932
|
+
() => a.value,
|
|
933
|
+
(s) => {
|
|
934
|
+
s != null && s.length ? (o.value = s[0], u.value = s[1]) : (o.value = void 0, u.value = void 0);
|
|
935
935
|
},
|
|
936
936
|
{ immediate: !0 }
|
|
937
|
-
), (
|
|
938
|
-
const g =
|
|
939
|
-
return w(),
|
|
937
|
+
), (s, l) => {
|
|
938
|
+
const g = le;
|
|
939
|
+
return w(), T("div", Bt, [
|
|
940
940
|
E(g, {
|
|
941
941
|
min: t.min,
|
|
942
942
|
max: S(r),
|
|
@@ -945,7 +945,7 @@ const At = Ee({ name: "local-clear", render: Dt }), Tt = { class: "nums-box" },
|
|
|
945
945
|
placeholder: e.placeholder[0] || "",
|
|
946
946
|
onChange: m
|
|
947
947
|
}, null, 8, ["min", "max", "value", "placeholder"]),
|
|
948
|
-
$("span", It,
|
|
948
|
+
$("span", It, re(e.separator), 1),
|
|
949
949
|
E(g, {
|
|
950
950
|
min: S(c),
|
|
951
951
|
max: t.max,
|
|
@@ -957,7 +957,7 @@ const At = Ee({ name: "local-clear", render: Dt }), Tt = { class: "nums-box" },
|
|
|
957
957
|
]);
|
|
958
958
|
};
|
|
959
959
|
}
|
|
960
|
-
}),
|
|
960
|
+
}), _e = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
961
961
|
__proto__: null,
|
|
962
962
|
AInputNumberEx: ut,
|
|
963
963
|
APageHeader: $t,
|
|
@@ -973,7 +973,7 @@ const At = Ee({ name: "local-clear", render: Dt }), Tt = { class: "nums-box" },
|
|
|
973
973
|
function De(e) {
|
|
974
974
|
return at() ? (st(e), !0) : !1;
|
|
975
975
|
}
|
|
976
|
-
const
|
|
976
|
+
const pe = typeof window < "u" && typeof document < "u";
|
|
977
977
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
978
978
|
const Ft = Object.prototype.toString, zt = (e) => Ft.call(e) === "[object Object]";
|
|
979
979
|
function qt(e) {
|
|
@@ -982,8 +982,8 @@ function qt(e) {
|
|
|
982
982
|
return n || (n = e()), n;
|
|
983
983
|
}
|
|
984
984
|
return t.reset = async () => {
|
|
985
|
-
const
|
|
986
|
-
n = void 0,
|
|
985
|
+
const a = n;
|
|
986
|
+
n = void 0, a && await a;
|
|
987
987
|
}, t;
|
|
988
988
|
}
|
|
989
989
|
function ne(e) {
|
|
@@ -991,7 +991,7 @@ function ne(e) {
|
|
|
991
991
|
}
|
|
992
992
|
function Kt(e, n, t = {}) {
|
|
993
993
|
const {
|
|
994
|
-
immediate:
|
|
994
|
+
immediate: a = !0,
|
|
995
995
|
immediateCallback: i = !1
|
|
996
996
|
} = t, r = H(!1);
|
|
997
997
|
let c = null;
|
|
@@ -1001,12 +1001,12 @@ function Kt(e, n, t = {}) {
|
|
|
1001
1001
|
function u() {
|
|
1002
1002
|
r.value = !1, o();
|
|
1003
1003
|
}
|
|
1004
|
-
function m(...
|
|
1004
|
+
function m(...s) {
|
|
1005
1005
|
i && e(), o(), r.value = !0, c = setTimeout(() => {
|
|
1006
|
-
r.value = !1, c = null, e(...
|
|
1006
|
+
r.value = !1, c = null, e(...s);
|
|
1007
1007
|
}, K(n));
|
|
1008
1008
|
}
|
|
1009
|
-
return
|
|
1009
|
+
return a && (r.value = !0, pe && m()), De(u), {
|
|
1010
1010
|
isPending: ot(r),
|
|
1011
1011
|
start: m,
|
|
1012
1012
|
stop: u
|
|
@@ -1022,8 +1022,8 @@ function Vt(e, n, t) {
|
|
|
1022
1022
|
}
|
|
1023
1023
|
);
|
|
1024
1024
|
}
|
|
1025
|
-
const Ht =
|
|
1026
|
-
function
|
|
1025
|
+
const Ht = pe ? window : void 0, Ae = pe ? window.navigator : void 0;
|
|
1026
|
+
function Me(e) {
|
|
1027
1027
|
var n;
|
|
1028
1028
|
const t = K(e);
|
|
1029
1029
|
return (n = t == null ? void 0 : t.$el) != null ? n : t;
|
|
@@ -1031,28 +1031,28 @@ function Te(e) {
|
|
|
1031
1031
|
function Y(...e) {
|
|
1032
1032
|
const n = [], t = () => {
|
|
1033
1033
|
n.forEach((o) => o()), n.length = 0;
|
|
1034
|
-
},
|
|
1034
|
+
}, a = (o, u, m, s) => (o.addEventListener(u, m, s), () => o.removeEventListener(u, m, s)), i = L(() => {
|
|
1035
1035
|
const o = ne(K(e[0])).filter((u) => u != null);
|
|
1036
1036
|
return o.every((u) => typeof u != "string") ? o : void 0;
|
|
1037
1037
|
}), r = Vt(
|
|
1038
1038
|
() => {
|
|
1039
1039
|
var o, u;
|
|
1040
1040
|
return [
|
|
1041
|
-
(u = (o = i.value) == null ? void 0 : o.map((m) =>
|
|
1041
|
+
(u = (o = i.value) == null ? void 0 : o.map((m) => Me(m))) != null ? u : [Ht].filter((m) => m != null),
|
|
1042
1042
|
ne(K(i.value ? e[1] : e[0])),
|
|
1043
1043
|
ne(S(i.value ? e[2] : e[1])),
|
|
1044
1044
|
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
1045
1045
|
K(i.value ? e[3] : e[2])
|
|
1046
1046
|
];
|
|
1047
1047
|
},
|
|
1048
|
-
([o, u, m,
|
|
1048
|
+
([o, u, m, s]) => {
|
|
1049
1049
|
if (t(), !(o != null && o.length) || !(u != null && u.length) || !(m != null && m.length))
|
|
1050
1050
|
return;
|
|
1051
|
-
const l = zt(
|
|
1051
|
+
const l = zt(s) ? { ...s } : s;
|
|
1052
1052
|
n.push(
|
|
1053
1053
|
...o.flatMap(
|
|
1054
1054
|
(g) => u.flatMap(
|
|
1055
|
-
(h) => m.map((y) =>
|
|
1055
|
+
(h) => m.map((y) => a(g, h, y, l))
|
|
1056
1056
|
)
|
|
1057
1057
|
)
|
|
1058
1058
|
);
|
|
@@ -1069,30 +1069,30 @@ function Xt() {
|
|
|
1069
1069
|
e.value = !0;
|
|
1070
1070
|
}, n), e;
|
|
1071
1071
|
}
|
|
1072
|
-
function
|
|
1072
|
+
function Te(e) {
|
|
1073
1073
|
const n = Xt();
|
|
1074
1074
|
return L(() => (n.value, !!e()));
|
|
1075
1075
|
}
|
|
1076
1076
|
const Yt = 500, Zt = 10;
|
|
1077
1077
|
function Gt(e, n, t) {
|
|
1078
|
-
var
|
|
1079
|
-
const r = L(() =>
|
|
1078
|
+
var a, i;
|
|
1079
|
+
const r = L(() => Me(e));
|
|
1080
1080
|
let c, o, u, m = !1;
|
|
1081
|
-
function
|
|
1081
|
+
function s() {
|
|
1082
1082
|
c && (clearTimeout(c), c = void 0), o = void 0, u = void 0, m = !1;
|
|
1083
1083
|
}
|
|
1084
1084
|
function l(f) {
|
|
1085
1085
|
var p, d, _;
|
|
1086
1086
|
const [b, C, A] = [u, o, m];
|
|
1087
|
-
if (
|
|
1087
|
+
if (s(), !(t != null && t.onMouseUp) || !C || !b || (p = t == null ? void 0 : t.modifiers) != null && p.self && f.target !== r.value)
|
|
1088
1088
|
return;
|
|
1089
1089
|
(d = t == null ? void 0 : t.modifiers) != null && d.prevent && f.preventDefault(), (_ = t == null ? void 0 : t.modifiers) != null && _.stop && f.stopPropagation();
|
|
1090
|
-
const O = f.x - C.x, R = f.y - C.y,
|
|
1091
|
-
t.onMouseUp(f.timeStamp - b,
|
|
1090
|
+
const O = f.x - C.x, R = f.y - C.y, M = Math.sqrt(O * O + R * R);
|
|
1091
|
+
t.onMouseUp(f.timeStamp - b, M, A);
|
|
1092
1092
|
}
|
|
1093
1093
|
function g(f) {
|
|
1094
1094
|
var p, d, _, b;
|
|
1095
|
-
(p = t == null ? void 0 : t.modifiers) != null && p.self && f.target !== r.value || (
|
|
1095
|
+
(p = t == null ? void 0 : t.modifiers) != null && p.self && f.target !== r.value || (s(), (d = t == null ? void 0 : t.modifiers) != null && d.prevent && f.preventDefault(), (_ = t == null ? void 0 : t.modifiers) != null && _.stop && f.stopPropagation(), o = {
|
|
1096
1096
|
x: f.x,
|
|
1097
1097
|
y: f.y
|
|
1098
1098
|
}, u = f.timeStamp, c = setTimeout(
|
|
@@ -1108,10 +1108,10 @@ function Gt(e, n, t) {
|
|
|
1108
1108
|
return;
|
|
1109
1109
|
(d = t == null ? void 0 : t.modifiers) != null && d.prevent && f.preventDefault(), (_ = t == null ? void 0 : t.modifiers) != null && _.stop && f.stopPropagation();
|
|
1110
1110
|
const C = f.x - o.x, A = f.y - o.y;
|
|
1111
|
-
Math.sqrt(C * C + A * A) >= ((b = t == null ? void 0 : t.distanceThreshold) != null ? b : Zt) &&
|
|
1111
|
+
Math.sqrt(C * C + A * A) >= ((b = t == null ? void 0 : t.distanceThreshold) != null ? b : Zt) && s();
|
|
1112
1112
|
}
|
|
1113
1113
|
const y = {
|
|
1114
|
-
capture: (
|
|
1114
|
+
capture: (a = t == null ? void 0 : t.modifiers) == null ? void 0 : a.capture,
|
|
1115
1115
|
once: (i = t == null ? void 0 : t.modifiers) == null ? void 0 : i.once
|
|
1116
1116
|
}, v = [
|
|
1117
1117
|
Y(r, "pointerdown", g, y),
|
|
@@ -1120,20 +1120,20 @@ function Gt(e, n, t) {
|
|
|
1120
1120
|
];
|
|
1121
1121
|
return () => v.forEach((f) => f());
|
|
1122
1122
|
}
|
|
1123
|
-
function
|
|
1123
|
+
function be(e, n = {}) {
|
|
1124
1124
|
const {
|
|
1125
1125
|
controls: t = !1,
|
|
1126
|
-
navigator:
|
|
1127
|
-
} = n, i =
|
|
1128
|
-
var
|
|
1129
|
-
o.value = (l = (
|
|
1126
|
+
navigator: a = Ae
|
|
1127
|
+
} = n, i = Te(() => a && "permissions" in a), r = H(), c = typeof e == "string" ? { name: e } : e, o = H(), u = () => {
|
|
1128
|
+
var s, l;
|
|
1129
|
+
o.value = (l = (s = r.value) == null ? void 0 : s.state) != null ? l : "prompt";
|
|
1130
1130
|
};
|
|
1131
1131
|
Y(r, "change", u, { passive: !0 });
|
|
1132
1132
|
const m = qt(async () => {
|
|
1133
1133
|
if (i.value) {
|
|
1134
1134
|
if (!r.value)
|
|
1135
1135
|
try {
|
|
1136
|
-
r.value = await
|
|
1136
|
+
r.value = await a.permissions.query(c);
|
|
1137
1137
|
} catch {
|
|
1138
1138
|
r.value = void 0;
|
|
1139
1139
|
} finally {
|
|
@@ -1153,22 +1153,22 @@ function Qt(e = {}) {
|
|
|
1153
1153
|
const {
|
|
1154
1154
|
navigator: n = Ae,
|
|
1155
1155
|
read: t = !1,
|
|
1156
|
-
source:
|
|
1156
|
+
source: a,
|
|
1157
1157
|
copiedDuring: i = 1500,
|
|
1158
1158
|
legacy: r = !1
|
|
1159
|
-
} = e, c =
|
|
1159
|
+
} = e, c = Te(() => n && "clipboard" in n), o = be("clipboard-read"), u = be("clipboard-write"), m = L(() => c.value || r), s = H(""), l = H(!1), g = Kt(() => l.value = !1, i, { immediate: !1 });
|
|
1160
1160
|
async function h() {
|
|
1161
1161
|
let p = !(c.value && f(o.value));
|
|
1162
1162
|
if (!p)
|
|
1163
1163
|
try {
|
|
1164
|
-
|
|
1164
|
+
s.value = await n.clipboard.readText();
|
|
1165
1165
|
} catch {
|
|
1166
1166
|
p = !0;
|
|
1167
1167
|
}
|
|
1168
|
-
p && (
|
|
1168
|
+
p && (s.value = k());
|
|
1169
1169
|
}
|
|
1170
1170
|
m.value && t && Y(["copy", "cut"], h, { passive: !0 });
|
|
1171
|
-
async function y(p = K(
|
|
1171
|
+
async function y(p = K(a)) {
|
|
1172
1172
|
if (m.value && p != null) {
|
|
1173
1173
|
let d = !(c.value && f(u.value));
|
|
1174
1174
|
if (!d)
|
|
@@ -1177,7 +1177,7 @@ function Qt(e = {}) {
|
|
|
1177
1177
|
} catch {
|
|
1178
1178
|
d = !0;
|
|
1179
1179
|
}
|
|
1180
|
-
d && v(p),
|
|
1180
|
+
d && v(p), s.value = p, l.value = !0, g.start();
|
|
1181
1181
|
}
|
|
1182
1182
|
}
|
|
1183
1183
|
function v(p) {
|
|
@@ -1193,7 +1193,7 @@ function Qt(e = {}) {
|
|
|
1193
1193
|
}
|
|
1194
1194
|
return {
|
|
1195
1195
|
isSupported: m,
|
|
1196
|
-
text:
|
|
1196
|
+
text: s,
|
|
1197
1197
|
copied: l,
|
|
1198
1198
|
copy: y
|
|
1199
1199
|
};
|
|
@@ -1203,7 +1203,7 @@ let oe;
|
|
|
1203
1203
|
const en = {
|
|
1204
1204
|
mounted(e, n, t) {
|
|
1205
1205
|
var c, o;
|
|
1206
|
-
const
|
|
1206
|
+
const a = de(t.ctx), i = ((o = (c = a == null ? void 0 : a.locale) == null ? void 0 : c.locale) == null ? void 0 : o.slice(0, 2)) || "en", r = {
|
|
1207
1207
|
zh: "复制成功",
|
|
1208
1208
|
en: "Copy successfully",
|
|
1209
1209
|
fr: "Copie réussie"
|
|
@@ -1220,8 +1220,8 @@ const en = {
|
|
|
1220
1220
|
}
|
|
1221
1221
|
}, tn = {
|
|
1222
1222
|
beforeMount(e, n, t) {
|
|
1223
|
-
const
|
|
1224
|
-
if (!
|
|
1223
|
+
const a = e.tagName === "INPUT" ? e : e.querySelector("input");
|
|
1224
|
+
if (!a)
|
|
1225
1225
|
return;
|
|
1226
1226
|
const i = n.value, r = {
|
|
1227
1227
|
letterNumber: /^\w*$/,
|
|
@@ -1256,9 +1256,9 @@ const en = {
|
|
|
1256
1256
|
case "insertFromPaste":
|
|
1257
1257
|
//粘贴
|
|
1258
1258
|
case "insertFromDrop":
|
|
1259
|
-
const
|
|
1260
|
-
if (
|
|
1261
|
-
const l =
|
|
1259
|
+
const s = o.dataTransfer || o.clipboardData || null;
|
|
1260
|
+
if (s) {
|
|
1261
|
+
const l = s.getData("text") || "";
|
|
1262
1262
|
o.target.selectionStart = e._start + l.length, o.target.selectionEnd = e._start + l.length;
|
|
1263
1263
|
}
|
|
1264
1264
|
break;
|
|
@@ -1278,17 +1278,17 @@ const en = {
|
|
|
1278
1278
|
e._input = u ? o.target.value : "", e._start = o.target.selectionStart, e._end = o.target.selectionEnd;
|
|
1279
1279
|
}, e._handleDrop = (o) => {
|
|
1280
1280
|
o.stopPropagation();
|
|
1281
|
-
},
|
|
1281
|
+
}, a.addEventListener("input", e._handleInput), a.addEventListener("keydown", e._handleKeydown), a.addEventListener("drop", e._handleDrop);
|
|
1282
1282
|
},
|
|
1283
1283
|
unmounted(e) {
|
|
1284
1284
|
const n = e.tagName === "INPUT" ? e : e.querySelector("input");
|
|
1285
1285
|
n && (n.removeEventListener("input", e._handleInput), n.removeEventListener("keydown", e._handleKeydown), n.removeEventListener("drop", e._handleDrop));
|
|
1286
1286
|
}
|
|
1287
1287
|
};
|
|
1288
|
-
function
|
|
1289
|
-
const
|
|
1290
|
-
if (
|
|
1291
|
-
const i =
|
|
1288
|
+
function ae(e, n, t) {
|
|
1289
|
+
const a = n.value;
|
|
1290
|
+
if (a) {
|
|
1291
|
+
const i = a / 2;
|
|
1292
1292
|
e.style.marginLeft = `-${i}px`, e.style.marginRight = `-${i}px`;
|
|
1293
1293
|
const r = e.children;
|
|
1294
1294
|
if (r != null && r.length)
|
|
@@ -1303,10 +1303,17 @@ const nn = {
|
|
|
1303
1303
|
e.classList.add("ant-row"), e.style.display = "flex", e.style.flexWrap = "wrap", e.style.flexDirection = "row", e.style.minWidth = 0;
|
|
1304
1304
|
},
|
|
1305
1305
|
mounted(e, n, t) {
|
|
1306
|
-
|
|
1306
|
+
ae(e, n);
|
|
1307
|
+
const a = new MutationObserver(
|
|
1308
|
+
() => ae(e, n)
|
|
1309
|
+
);
|
|
1310
|
+
a.observe(e, { childList: !0 }), e.observer = a;
|
|
1311
|
+
},
|
|
1312
|
+
updated(e, n, t, a) {
|
|
1313
|
+
ae(e, n);
|
|
1307
1314
|
},
|
|
1308
|
-
|
|
1309
|
-
|
|
1315
|
+
unmounted(e, n, t) {
|
|
1316
|
+
e.observer && (e.observer.disconnect(), e.observer = null);
|
|
1310
1317
|
}
|
|
1311
1318
|
}, on = {
|
|
1312
1319
|
beforeMount(e, n) {
|
|
@@ -1316,14 +1323,14 @@ const nn = {
|
|
|
1316
1323
|
}
|
|
1317
1324
|
}, an = {
|
|
1318
1325
|
mounted(e, n, t) {
|
|
1319
|
-
const { value:
|
|
1326
|
+
const { value: a } = n, {
|
|
1320
1327
|
content: i = "",
|
|
1321
1328
|
placement: r = "top",
|
|
1322
1329
|
enabled: c = !0,
|
|
1323
1330
|
padding: o = 8,
|
|
1324
1331
|
// 默认左右间距8px,用来判断文本的测量宽度是否超出元素宽度
|
|
1325
1332
|
...u
|
|
1326
|
-
} = typeof
|
|
1333
|
+
} = typeof a == "string" ? { content: a } : a;
|
|
1327
1334
|
if (e.tooltipDisabled = !1, !c)
|
|
1328
1335
|
e.tooltipDisabled = !0;
|
|
1329
1336
|
else if (n.modifiers.exceed) {
|
|
@@ -1335,14 +1342,14 @@ const nn = {
|
|
|
1335
1342
|
left: 0,
|
|
1336
1343
|
bottom: 0,
|
|
1337
1344
|
right: 0
|
|
1338
|
-
}),
|
|
1345
|
+
}), s = x({
|
|
1339
1346
|
getBoundingClientRect: () => m.value
|
|
1340
1347
|
}), l = W(it, {
|
|
1341
1348
|
visible: !1,
|
|
1342
1349
|
content: i,
|
|
1343
1350
|
placement: r,
|
|
1344
1351
|
virtualTriggering: !0,
|
|
1345
|
-
virtualRef:
|
|
1352
|
+
virtualRef: s.value,
|
|
1346
1353
|
popperClass: "vtooltip",
|
|
1347
1354
|
...u
|
|
1348
1355
|
}), g = document.createDocumentFragment();
|
|
@@ -1355,7 +1362,7 @@ const nn = {
|
|
|
1355
1362
|
updated(e, n) {
|
|
1356
1363
|
if (e.tooltipVm) {
|
|
1357
1364
|
const { value: t } = n, {
|
|
1358
|
-
content:
|
|
1365
|
+
content: a = "",
|
|
1359
1366
|
placement: i = "top",
|
|
1360
1367
|
enabled: r = !0,
|
|
1361
1368
|
padding: c = 8,
|
|
@@ -1365,11 +1372,11 @@ const nn = {
|
|
|
1365
1372
|
if (e.tooltipDisabled = !1, !r)
|
|
1366
1373
|
e.tooltipDisabled = !0;
|
|
1367
1374
|
else if (n.modifiers.exceed) {
|
|
1368
|
-
const m = e.clientWidth,
|
|
1369
|
-
e.tooltipDisabled = m ?
|
|
1375
|
+
const m = e.clientWidth, s = xe(a);
|
|
1376
|
+
e.tooltipDisabled = m ? s < m - c * 2 : !0;
|
|
1370
1377
|
}
|
|
1371
1378
|
const u = e.tooltipVm;
|
|
1372
|
-
u.component && (Object.assign(u.component.props, { content:
|
|
1379
|
+
u.component && (Object.assign(u.component.props, { content: a, placement: i, ...o }), u.component.update());
|
|
1373
1380
|
}
|
|
1374
1381
|
},
|
|
1375
1382
|
unmounted(e) {
|
|
@@ -1377,8 +1384,8 @@ const nn = {
|
|
|
1377
1384
|
}
|
|
1378
1385
|
};
|
|
1379
1386
|
function xe(e, n) {
|
|
1380
|
-
const
|
|
1381
|
-
return
|
|
1387
|
+
const a = document.createElement("canvas").getContext("2d");
|
|
1388
|
+
return a.font = "14px Arial", a.measureText(e).width;
|
|
1382
1389
|
}
|
|
1383
1390
|
const sn = {
|
|
1384
1391
|
beforeMount(e, n) {
|
|
@@ -1395,11 +1402,11 @@ function Ce(e, n = 4) {
|
|
|
1395
1402
|
}
|
|
1396
1403
|
const rn = {
|
|
1397
1404
|
mounted(e, n) {
|
|
1398
|
-
const { value: t } = n, { content:
|
|
1405
|
+
const { value: t } = n, { content: a = "", spaceNum: i = 4 } = typeof t == "object" ? t || {} : { content: t + "" }, r = a.replace(/\s+/g, "");
|
|
1399
1406
|
e.textContent = Ce(r, i) || "-";
|
|
1400
1407
|
},
|
|
1401
1408
|
updated(e, n) {
|
|
1402
|
-
const { value: t } = n, { content:
|
|
1409
|
+
const { value: t } = n, { content: a = "", spaceNum: i = 4 } = typeof t == "object" ? t || {} : { content: t + "" }, r = a.replace(/\s+/g, "");
|
|
1403
1410
|
e.textContent = Ce(r, i) || "-";
|
|
1404
1411
|
}
|
|
1405
1412
|
}, ln = {
|
|
@@ -1418,8 +1425,8 @@ const rn = {
|
|
|
1418
1425
|
tooltip: an
|
|
1419
1426
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1420
1427
|
function cn(e) {
|
|
1421
|
-
Object.keys(
|
|
1422
|
-
e.component(n,
|
|
1428
|
+
Object.keys(_e).forEach((n) => {
|
|
1429
|
+
e.component(n, _e[n]);
|
|
1423
1430
|
}), Object.keys(Se).forEach((n) => {
|
|
1424
1431
|
e.directive(n, Se[n]);
|
|
1425
1432
|
});
|
|
@@ -1449,10 +1456,10 @@ export {
|
|
|
1449
1456
|
Pn as getToken,
|
|
1450
1457
|
Dn as getUserCenterParams,
|
|
1451
1458
|
An as getUserCenterParamsByUrl,
|
|
1452
|
-
|
|
1459
|
+
Mn as getUserInfo,
|
|
1453
1460
|
ct as hasPermission,
|
|
1454
1461
|
tn as inputlimit,
|
|
1455
|
-
|
|
1462
|
+
Tn as is,
|
|
1456
1463
|
Nn as isArray,
|
|
1457
1464
|
Ln as isAsyncFunction,
|
|
1458
1465
|
On as isBoolean,
|
|
@@ -1486,7 +1493,7 @@ export {
|
|
|
1486
1493
|
rn as space,
|
|
1487
1494
|
so as toUserCenterConsole,
|
|
1488
1495
|
an as tooltip,
|
|
1489
|
-
|
|
1496
|
+
de as useConfigProvider,
|
|
1490
1497
|
gn as useFindParent,
|
|
1491
1498
|
hn as useModal
|
|
1492
1499
|
};
|