@witlink/usercenter 1.0.0

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.
Files changed (49) hide show
  1. package/README.md +155 -0
  2. package/dist/404.e6ab6ba0.mjs +10 -0
  3. package/dist/Card.71482621.mjs +1078 -0
  4. package/dist/DictEx.754c617b.mjs +156 -0
  5. package/dist/FooterToolBar.2546fb1f.mjs +33 -0
  6. package/dist/RegionSelect.5272534b.mjs +71 -0
  7. package/dist/Standard.64ae6a8d.mjs +113 -0
  8. package/dist/WebClient.0ac67ce0.mjs +153 -0
  9. package/dist/assets/FooterToolBar.d4297046.css +1 -0
  10. package/dist/assets/Standard.badeec91.css +1 -0
  11. package/dist/assets/WebClient.2a3e464e.css +1 -0
  12. package/dist/assets/index.01a0fb63.css +1 -0
  13. package/dist/assets/index.19e5ba4c.css +1 -0
  14. package/dist/assets/index.2164de3b.css +1 -0
  15. package/dist/assets/index.269f5360.css +1 -0
  16. package/dist/assets/index.28bdbdc3.css +1 -0
  17. package/dist/assets/index.3150518d.css +1 -0
  18. package/dist/assets/index.3a0797c4.css +1 -0
  19. package/dist/assets/index.53c37fa8.css +1 -0
  20. package/dist/assets/index.7c8e2d8f.css +1 -0
  21. package/dist/assets/index.b965b94b.css +1 -0
  22. package/dist/assets/index.fb7724ee.css +1 -0
  23. package/dist/index.003313e6.mjs +69436 -0
  24. package/dist/index.05ef920d.mjs +1129 -0
  25. package/dist/index.1953dbda.mjs +498 -0
  26. package/dist/index.1af0e30d.mjs +10 -0
  27. package/dist/index.2242d1a7.mjs +125 -0
  28. package/dist/index.2291c8e2.mjs +125 -0
  29. package/dist/index.3c2af165.mjs +761 -0
  30. package/dist/index.919ac6b4.mjs +7431 -0
  31. package/dist/index.941a34c0.mjs +874 -0
  32. package/dist/index.96479524.mjs +754 -0
  33. package/dist/index.9803c44f.mjs +125 -0
  34. package/dist/index.a000e9cf.mjs +1445 -0
  35. package/dist/index.b3eb7c5d.mjs +10 -0
  36. package/dist/index.c9138cba.mjs +1104 -0
  37. package/dist/index.ceea88a4.mjs +1073 -0
  38. package/dist/index.da7dd593.mjs +10 -0
  39. package/dist/index.e271ee9d.mjs +643 -0
  40. package/dist/index.e7802e27.mjs +786 -0
  41. package/dist/index.ef2e93a1.mjs +386 -0
  42. package/dist/index.f701b909.mjs +142 -0
  43. package/dist/index.f9becca6.mjs +6 -0
  44. package/dist/index.fa4bb855.mjs +7645 -0
  45. package/dist/index.html +1 -0
  46. package/dist/use-dict-by-type.c90c1d31.mjs +24 -0
  47. package/dist/usercenter.umd.js +6237 -0
  48. package/package.json +26 -0
  49. package/version.md +2 -0
@@ -0,0 +1,1073 @@
1
+ import { aj as nt, v as R, b3 as rt, e as z, f as A, T as at, R as Ae, d as v, t as F, am as ee, w as ye, al as le, j as lt, b4 as it, b5 as ot, r as Te, b6 as He, b7 as Ge, b8 as Ue, b9 as st, ba as ut, bb as dt, bc as ct, bd as ft, u as pt, n as mt, be as gt, p as vt, bf as bt, o as ht, bg as he, q as St, ai as $t, bh as Ve, bi as Be, bj as Nt, P as Se } from "./index.003313e6.mjs";
2
+ import { createVNode as b, defineComponent as Ie, ref as Le, onBeforeUnmount as qe, shallowRef as _, computed as W, watch as te } from "vue";
3
+ var yt = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z" } }] }, name: "up", theme: "outlined" };
4
+ const wt = yt;
5
+ function Fe(e) {
6
+ for (var t = 1; t < arguments.length; t++) {
7
+ var n = arguments[t] != null ? Object(arguments[t]) : {}, r = Object.keys(n);
8
+ typeof Object.getOwnPropertySymbols == "function" && (r = r.concat(Object.getOwnPropertySymbols(n).filter(function(l) {
9
+ return Object.getOwnPropertyDescriptor(n, l).enumerable;
10
+ }))), r.forEach(function(l) {
11
+ xt(e, l, n[l]);
12
+ });
13
+ }
14
+ return e;
15
+ }
16
+ function xt(e, t, n) {
17
+ return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
18
+ }
19
+ var Ee = function(t, n) {
20
+ var r = Fe({}, t, n.attrs);
21
+ return b(nt, Fe({}, r, {
22
+ icon: wt
23
+ }), null);
24
+ };
25
+ Ee.displayName = "UpOutlined";
26
+ Ee.inheritAttrs = !1;
27
+ const It = Ee;
28
+ function we() {
29
+ return typeof BigInt == "function";
30
+ }
31
+ function ne(e) {
32
+ let t = e.trim(), n = t.startsWith("-");
33
+ n && (t = t.slice(1)), t = t.replace(/(\.\d*[^0])0*$/, "$1").replace(/\.0*$/, "").replace(/^0+/, ""), t.startsWith(".") && (t = `0${t}`);
34
+ const r = t || "0", l = r.split("."), o = l[0] || "0", d = l[1] || "0";
35
+ o === "0" && d === "0" && (n = !1);
36
+ const c = n ? "-" : "";
37
+ return {
38
+ negative: n,
39
+ negativeStr: c,
40
+ trimStr: r,
41
+ integerStr: o,
42
+ decimalStr: d,
43
+ fullStr: `${c}${r}`
44
+ };
45
+ }
46
+ function Ce(e) {
47
+ const t = String(e);
48
+ return !Number.isNaN(Number(t)) && t.includes("e");
49
+ }
50
+ function re(e) {
51
+ const t = String(e);
52
+ if (Ce(e)) {
53
+ let n = Number(t.slice(t.indexOf("e-") + 2));
54
+ const r = t.match(/\.(\d+)/);
55
+ return r != null && r[1] && (n += r[1].length), n;
56
+ }
57
+ return t.includes(".") && Pe(t) ? t.length - t.indexOf(".") - 1 : 0;
58
+ }
59
+ function Oe(e) {
60
+ let t = String(e);
61
+ if (Ce(e)) {
62
+ if (e > Number.MAX_SAFE_INTEGER)
63
+ return String(we() ? BigInt(e).toString() : Number.MAX_SAFE_INTEGER);
64
+ if (e < Number.MIN_SAFE_INTEGER)
65
+ return String(we() ? BigInt(e).toString() : Number.MIN_SAFE_INTEGER);
66
+ t = e.toFixed(re(t));
67
+ }
68
+ return ne(t).fullStr;
69
+ }
70
+ function Pe(e) {
71
+ return typeof e == "number" ? !Number.isNaN(e) : e ? /^\s*-?\d+(\.\d+)?\s*$/.test(e) || /^\s*-?\d+\.\s*$/.test(e) || /^\s*-?\.\d+\s*$/.test(e) : !1;
72
+ }
73
+ function ke(e) {
74
+ return !e && e !== 0 && !Number.isNaN(e) || !String(e).trim();
75
+ }
76
+ class j {
77
+ constructor(t) {
78
+ if (this.origin = "", ke(t)) {
79
+ this.empty = !0;
80
+ return;
81
+ }
82
+ this.origin = String(t), this.number = Number(t);
83
+ }
84
+ negate() {
85
+ return new j(-this.toNumber());
86
+ }
87
+ add(t) {
88
+ if (this.isInvalidate())
89
+ return new j(t);
90
+ const n = Number(t);
91
+ if (Number.isNaN(n))
92
+ return this;
93
+ const r = this.number + n;
94
+ if (r > Number.MAX_SAFE_INTEGER)
95
+ return new j(Number.MAX_SAFE_INTEGER);
96
+ if (r < Number.MIN_SAFE_INTEGER)
97
+ return new j(Number.MIN_SAFE_INTEGER);
98
+ const l = Math.max(re(this.number), re(n));
99
+ return new j(r.toFixed(l));
100
+ }
101
+ isEmpty() {
102
+ return this.empty;
103
+ }
104
+ isNaN() {
105
+ return Number.isNaN(this.number);
106
+ }
107
+ isInvalidate() {
108
+ return this.isEmpty() || this.isNaN();
109
+ }
110
+ equals(t) {
111
+ return this.toNumber() === (t == null ? void 0 : t.toNumber());
112
+ }
113
+ lessEquals(t) {
114
+ return this.add(t.negate().toString()).toNumber() <= 0;
115
+ }
116
+ toNumber() {
117
+ return this.number;
118
+ }
119
+ toString() {
120
+ return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0) ? this.isInvalidate() ? "" : Oe(this.number) : this.origin;
121
+ }
122
+ }
123
+ class q {
124
+ constructor(t) {
125
+ if (this.origin = "", ke(t)) {
126
+ this.empty = !0;
127
+ return;
128
+ }
129
+ if (this.origin = String(t), t === "-" || Number.isNaN(t)) {
130
+ this.nan = !0;
131
+ return;
132
+ }
133
+ let n = t;
134
+ if (Ce(n) && (n = Number(n)), n = typeof n == "string" ? n : Oe(n), Pe(n)) {
135
+ const r = ne(n);
136
+ this.negative = r.negative;
137
+ const l = r.trimStr.split(".");
138
+ this.integer = BigInt(l[0]);
139
+ const o = l[1] || "0";
140
+ this.decimal = BigInt(o), this.decimalLen = o.length;
141
+ } else
142
+ this.nan = !0;
143
+ }
144
+ getMark() {
145
+ return this.negative ? "-" : "";
146
+ }
147
+ getIntegerStr() {
148
+ return this.integer.toString();
149
+ }
150
+ getDecimalStr() {
151
+ return this.decimal.toString().padStart(this.decimalLen, "0");
152
+ }
153
+ alignDecimal(t) {
154
+ const n = `${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(t, "0")}`;
155
+ return BigInt(n);
156
+ }
157
+ negate() {
158
+ const t = new q(this.toString());
159
+ return t.negative = !t.negative, t;
160
+ }
161
+ add(t) {
162
+ if (this.isInvalidate())
163
+ return new q(t);
164
+ const n = new q(t);
165
+ if (n.isInvalidate())
166
+ return this;
167
+ const r = Math.max(this.getDecimalStr().length, n.getDecimalStr().length), l = this.alignDecimal(r), o = n.alignDecimal(r), d = (l + o).toString(), {
168
+ negativeStr: c,
169
+ trimStr: m
170
+ } = ne(d), f = `${c}${m.padStart(r + 1, "0")}`;
171
+ return new q(`${f.slice(0, -r)}.${f.slice(-r)}`);
172
+ }
173
+ isEmpty() {
174
+ return this.empty;
175
+ }
176
+ isNaN() {
177
+ return this.nan;
178
+ }
179
+ isInvalidate() {
180
+ return this.isEmpty() || this.isNaN();
181
+ }
182
+ equals(t) {
183
+ return this.toString() === (t == null ? void 0 : t.toString());
184
+ }
185
+ lessEquals(t) {
186
+ return this.add(t.negate().toString()).toNumber() <= 0;
187
+ }
188
+ toNumber() {
189
+ return this.isNaN() ? NaN : Number(this.toString());
190
+ }
191
+ toString() {
192
+ return (arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0) ? this.isInvalidate() ? "" : ne(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr : this.origin;
193
+ }
194
+ }
195
+ function P(e) {
196
+ return we() ? new q(e) : new j(e);
197
+ }
198
+ function xe(e, t, n) {
199
+ let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
200
+ if (e === "")
201
+ return "";
202
+ const {
203
+ negativeStr: l,
204
+ integerStr: o,
205
+ decimalStr: d
206
+ } = ne(e), c = `${t}${d}`, m = `${l}${o}`;
207
+ if (n >= 0) {
208
+ const f = Number(d[n]);
209
+ if (f >= 5 && !r) {
210
+ const s = P(e).add(`${l}0.${"0".repeat(n)}${10 - f}`);
211
+ return xe(s.toString(), t, n, r);
212
+ }
213
+ return n === 0 ? m : `${m}${t}${d.padEnd(n, "0").slice(0, n)}`;
214
+ }
215
+ return c === ".0" ? m : `${m}${c}`;
216
+ }
217
+ const Et = 200, Ct = 600, Ot = Ie({
218
+ compatConfig: {
219
+ MODE: 3
220
+ },
221
+ name: "StepHandler",
222
+ inheritAttrs: !1,
223
+ props: {
224
+ prefixCls: String,
225
+ upDisabled: Boolean,
226
+ downDisabled: Boolean,
227
+ onStep: R()
228
+ },
229
+ slots: Object,
230
+ setup(e, t) {
231
+ let {
232
+ slots: n,
233
+ emit: r
234
+ } = t;
235
+ const l = Le(), o = (c, m) => {
236
+ c.preventDefault(), r("step", m);
237
+ function f() {
238
+ r("step", m), l.value = setTimeout(f, Et);
239
+ }
240
+ l.value = setTimeout(f, Ct);
241
+ }, d = () => {
242
+ clearTimeout(l.value);
243
+ };
244
+ return qe(() => {
245
+ d();
246
+ }), () => {
247
+ if (rt())
248
+ return null;
249
+ const {
250
+ prefixCls: c,
251
+ upDisabled: m,
252
+ downDisabled: f
253
+ } = e, s = `${c}-handler`, w = z(s, `${s}-up`, {
254
+ [`${s}-up-disabled`]: m
255
+ }), S = z(s, `${s}-down`, {
256
+ [`${s}-down-disabled`]: f
257
+ }), I = {
258
+ unselectable: "on",
259
+ role: "button",
260
+ onMouseup: d,
261
+ onMouseleave: d
262
+ }, {
263
+ upNode: $,
264
+ downNode: E
265
+ } = n;
266
+ return b("div", {
267
+ class: `${s}-wrap`
268
+ }, [b("span", A(A({}, I), {}, {
269
+ onMousedown: (D) => {
270
+ o(D, !0);
271
+ },
272
+ "aria-label": "Increase Value",
273
+ "aria-disabled": m,
274
+ class: w
275
+ }), [($ == null ? void 0 : $()) || b("span", {
276
+ unselectable: "on",
277
+ class: `${c}-handler-up-inner`
278
+ }, null)]), b("span", A(A({}, I), {}, {
279
+ onMousedown: (D) => {
280
+ o(D, !1);
281
+ },
282
+ "aria-label": "Decrease Value",
283
+ "aria-disabled": f,
284
+ class: S
285
+ }), [(E == null ? void 0 : E()) || b("span", {
286
+ unselectable: "on",
287
+ class: `${c}-handler-down-inner`
288
+ }, null)])]);
289
+ };
290
+ }
291
+ });
292
+ function Pt(e, t) {
293
+ const n = Le(null);
294
+ function r() {
295
+ try {
296
+ const {
297
+ selectionStart: o,
298
+ selectionEnd: d,
299
+ value: c
300
+ } = e.value, m = c.substring(0, o), f = c.substring(d);
301
+ n.value = {
302
+ start: o,
303
+ end: d,
304
+ value: c,
305
+ beforeTxt: m,
306
+ afterTxt: f
307
+ };
308
+ } catch {
309
+ }
310
+ }
311
+ function l() {
312
+ if (e.value && n.value && t.value)
313
+ try {
314
+ const {
315
+ value: o
316
+ } = e.value, {
317
+ beforeTxt: d,
318
+ afterTxt: c,
319
+ start: m
320
+ } = n.value;
321
+ let f = o.length;
322
+ if (o.endsWith(c))
323
+ f = o.length - n.value.afterTxt.length;
324
+ else if (o.startsWith(d))
325
+ f = d.length;
326
+ else {
327
+ const s = d[m - 1], w = o.indexOf(s, m - 1);
328
+ w !== -1 && (f = w + 1);
329
+ }
330
+ e.value.setSelectionRange(f, f);
331
+ } catch (o) {
332
+ at(!1, `Something warning of cursor restore. Please fire issue about this: ${o.message}`);
333
+ }
334
+ }
335
+ return [r, l];
336
+ }
337
+ const _t = () => {
338
+ const e = _(0), t = () => {
339
+ Ae.cancel(e.value);
340
+ };
341
+ return qe(() => {
342
+ t();
343
+ }), (n) => {
344
+ t(), e.value = Ae(() => {
345
+ n();
346
+ });
347
+ };
348
+ };
349
+ var Dt = globalThis && globalThis.__rest || function(e, t) {
350
+ var n = {};
351
+ for (var r in e)
352
+ Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
353
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
354
+ for (var l = 0, r = Object.getOwnPropertySymbols(e); l < r.length; l++)
355
+ t.indexOf(r[l]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[l]) && (n[r[l]] = e[r[l]]);
356
+ return n;
357
+ };
358
+ const je = (e, t) => e || t.isEmpty() ? t.toString() : t.toNumber(), ze = (e) => {
359
+ const t = P(e);
360
+ return t.isInvalidate() ? null : t;
361
+ }, Xe = () => ({
362
+ stringMode: F(),
363
+ defaultValue: ee([String, Number]),
364
+ value: ee([String, Number]),
365
+ prefixCls: ye(),
366
+ min: ee([String, Number]),
367
+ max: ee([String, Number]),
368
+ step: ee([String, Number], 1),
369
+ tabindex: Number,
370
+ controls: F(!0),
371
+ readonly: F(),
372
+ disabled: F(),
373
+ autofocus: F(),
374
+ keyboard: F(!0),
375
+ parser: R(),
376
+ formatter: R(),
377
+ precision: Number,
378
+ decimalSeparator: String,
379
+ onInput: R(),
380
+ onChange: R(),
381
+ onPressEnter: R(),
382
+ onStep: R(),
383
+ onBlur: R(),
384
+ onFocus: R()
385
+ }), Mt = Ie({
386
+ compatConfig: {
387
+ MODE: 3
388
+ },
389
+ name: "InnerInputNumber",
390
+ inheritAttrs: !1,
391
+ props: v(v({}, Xe()), {
392
+ lazy: Boolean
393
+ }),
394
+ slots: Object,
395
+ setup(e, t) {
396
+ let {
397
+ attrs: n,
398
+ slots: r,
399
+ emit: l,
400
+ expose: o
401
+ } = t;
402
+ const d = _(), c = _(!1), m = _(!1), f = _(!1), s = _(P(e.value));
403
+ function w(a) {
404
+ e.value === void 0 && (s.value = a);
405
+ }
406
+ const S = (a, i) => {
407
+ if (!i)
408
+ return e.precision >= 0 ? e.precision : Math.max(re(a), re(e.step));
409
+ }, I = (a) => {
410
+ const i = String(a);
411
+ if (e.parser)
412
+ return e.parser(i);
413
+ let u = i;
414
+ return e.decimalSeparator && (u = u.replace(e.decimalSeparator, ".")), u.replace(/[^\w.-]+/g, "");
415
+ }, $ = _(""), E = (a, i) => {
416
+ if (e.formatter)
417
+ return e.formatter(a, {
418
+ userTyping: i,
419
+ input: String($.value)
420
+ });
421
+ let u = typeof a == "number" ? Oe(a) : a;
422
+ if (!i) {
423
+ const g = S(u, i);
424
+ if (Pe(u) && (e.decimalSeparator || g >= 0)) {
425
+ const y = e.decimalSeparator || ".";
426
+ u = xe(u, y, g);
427
+ }
428
+ }
429
+ return u;
430
+ }, D = (() => {
431
+ const a = e.value;
432
+ return s.value.isInvalidate() && ["string", "number"].includes(typeof a) ? Number.isNaN(a) ? "" : a : E(s.value.toString(), !1);
433
+ })();
434
+ $.value = D;
435
+ function C(a, i) {
436
+ $.value = E(
437
+ a.isInvalidate() ? a.toString(!1) : a.toString(!i),
438
+ i
439
+ );
440
+ }
441
+ const O = W(() => ze(e.max)), N = W(() => ze(e.min)), x = W(() => !O.value || !s.value || s.value.isInvalidate() ? !1 : O.value.lessEquals(s.value)), T = W(() => !N.value || !s.value || s.value.isInvalidate() ? !1 : s.value.lessEquals(N.value)), [k, X] = Pt(d, c), K = (a) => O.value && !a.lessEquals(O.value) ? O.value : N.value && !N.value.lessEquals(a) ? N.value : null, ie = (a) => !K(a), Y = (a, i) => {
442
+ var u;
443
+ let g = a, y = ie(g) || g.isEmpty();
444
+ if (!g.isEmpty() && !i && (g = K(g) || g, y = !0), !e.readonly && !e.disabled && y) {
445
+ const M = g.toString(), B = S(M, i);
446
+ return B >= 0 && (g = P(xe(M, ".", B))), g.equals(s.value) || (w(g), (u = e.onChange) === null || u === void 0 || u.call(e, g.isEmpty() ? null : je(e.stringMode, g)), e.value === void 0 && C(g, i)), g;
447
+ }
448
+ return s.value;
449
+ }, oe = _t(), J = (a) => {
450
+ var i;
451
+ if (k(), $.value = a, !f.value) {
452
+ const u = I(a), g = P(u);
453
+ g.isNaN() || Y(g, !0);
454
+ }
455
+ (i = e.onInput) === null || i === void 0 || i.call(e, a), oe(() => {
456
+ let u = a;
457
+ e.parser || (u = a.replace(/。/g, ".")), u !== a && J(u);
458
+ });
459
+ }, h = () => {
460
+ f.value = !0;
461
+ }, Q = () => {
462
+ f.value = !1, J(d.value.value);
463
+ }, H = (a) => {
464
+ J(a.target.value);
465
+ }, G = (a) => {
466
+ var i, u;
467
+ if (a && x.value || !a && T.value)
468
+ return;
469
+ m.value = !1;
470
+ let g = P(e.step);
471
+ a || (g = g.negate());
472
+ const y = (s.value || P(0)).add(g.toString()), M = Y(y, !1);
473
+ (i = e.onStep) === null || i === void 0 || i.call(e, je(e.stringMode, M), {
474
+ offset: e.step,
475
+ type: a ? "up" : "down"
476
+ }), (u = d.value) === null || u === void 0 || u.focus();
477
+ }, V = (a) => {
478
+ const i = P(I($.value));
479
+ let u = i;
480
+ i.isNaN() ? u = s.value : u = Y(i, a), e.value !== void 0 ? C(s.value, !1) : u.isNaN() || C(u, !1);
481
+ }, se = (a) => {
482
+ var i;
483
+ const {
484
+ which: u
485
+ } = a;
486
+ m.value = !0, u === le.ENTER && (f.value || (m.value = !1), V(!1), (i = e.onPressEnter) === null || i === void 0 || i.call(e, a)), e.keyboard !== !1 && !f.value && [le.UP, le.DOWN].includes(u) && (G(le.UP === u), a.preventDefault());
487
+ }, ue = () => {
488
+ m.value = !1;
489
+ }, de = (a) => {
490
+ V(!1), c.value = !1, m.value = !1, l("blur", a);
491
+ };
492
+ return te(() => e.precision, () => {
493
+ s.value.isInvalidate() || C(s.value, !1);
494
+ }, {
495
+ flush: "post"
496
+ }), te(() => e.value, () => {
497
+ const a = P(e.value);
498
+ s.value = a;
499
+ const i = P(I($.value));
500
+ (!a.equals(i) || !m.value || e.formatter) && C(a, m.value);
501
+ }, {
502
+ flush: "post"
503
+ }), te($, () => {
504
+ e.formatter && X();
505
+ }, {
506
+ flush: "post"
507
+ }), te(() => e.disabled, (a) => {
508
+ a && (c.value = !1);
509
+ }), o({
510
+ focus: () => {
511
+ var a;
512
+ (a = d.value) === null || a === void 0 || a.focus();
513
+ },
514
+ blur: () => {
515
+ var a;
516
+ (a = d.value) === null || a === void 0 || a.blur();
517
+ }
518
+ }), () => {
519
+ const a = v(v({}, n), e), {
520
+ prefixCls: i = "rc-input-number",
521
+ min: u,
522
+ max: g,
523
+ step: y = 1,
524
+ defaultValue: M,
525
+ value: B,
526
+ disabled: Z,
527
+ readonly: ae,
528
+ keyboard: _e,
529
+ controls: p = !0,
530
+ autofocus: ce,
531
+ stringMode: U,
532
+ parser: fe,
533
+ formatter: pe,
534
+ precision: L,
535
+ decimalSeparator: me,
536
+ onChange: ge,
537
+ onInput: ve,
538
+ onPressEnter: De,
539
+ onStep: Me,
540
+ lazy: Ke,
541
+ class: Ye,
542
+ style: Je
543
+ } = a, Qe = Dt(a, ["prefixCls", "min", "max", "step", "defaultValue", "value", "disabled", "readonly", "keyboard", "controls", "autofocus", "stringMode", "parser", "formatter", "precision", "decimalSeparator", "onChange", "onInput", "onPressEnter", "onStep", "lazy", "class", "style"]), {
544
+ upHandler: Ze,
545
+ downHandler: et
546
+ } = r, Re = `${i}-input`, be = {};
547
+ return Ke ? be.onChange = H : be.onInput = H, b("div", {
548
+ class: z(i, Ye, {
549
+ [`${i}-focused`]: c.value,
550
+ [`${i}-disabled`]: Z,
551
+ [`${i}-readonly`]: ae,
552
+ [`${i}-not-a-number`]: s.value.isNaN(),
553
+ [`${i}-out-of-range`]: !s.value.isInvalidate() && !ie(s.value)
554
+ }),
555
+ style: Je,
556
+ onKeydown: se,
557
+ onKeyup: ue
558
+ }, [p && b(Ot, {
559
+ prefixCls: i,
560
+ upDisabled: x.value,
561
+ downDisabled: T.value,
562
+ onStep: G
563
+ }, {
564
+ upNode: Ze,
565
+ downNode: et
566
+ }), b("div", {
567
+ class: `${Re}-wrap`
568
+ }, [b("input", A(A(A({
569
+ autofocus: ce,
570
+ autocomplete: "off",
571
+ role: "spinbutton",
572
+ "aria-valuemin": u,
573
+ "aria-valuemax": g,
574
+ "aria-valuenow": s.value.isInvalidate() ? null : s.value.toString(),
575
+ step: y
576
+ }, Qe), {}, {
577
+ ref: d,
578
+ class: Re,
579
+ value: $.value,
580
+ disabled: Z,
581
+ readonly: ae,
582
+ onFocus: (tt) => {
583
+ c.value = !0, l("focus", tt);
584
+ }
585
+ }, be), {}, {
586
+ onBlur: de,
587
+ onCompositionstart: h,
588
+ onCompositionend: Q
589
+ }), null)])]);
590
+ };
591
+ }
592
+ });
593
+ function $e(e) {
594
+ return e != null;
595
+ }
596
+ const Rt = (e) => {
597
+ const {
598
+ componentCls: t,
599
+ lineWidth: n,
600
+ lineType: r,
601
+ colorBorder: l,
602
+ borderRadius: o,
603
+ fontSizeLG: d,
604
+ controlHeightLG: c,
605
+ controlHeightSM: m,
606
+ colorError: f,
607
+ inputPaddingHorizontalSM: s,
608
+ colorTextDescription: w,
609
+ motionDurationMid: S,
610
+ colorPrimary: I,
611
+ controlHeight: $,
612
+ inputPaddingHorizontal: E,
613
+ colorBgContainer: D,
614
+ colorTextDisabled: C,
615
+ borderRadiusSM: O,
616
+ borderRadiusLG: N,
617
+ controlWidth: x,
618
+ handleVisible: T
619
+ } = e;
620
+ return [
621
+ {
622
+ [t]: v(v(v(v({}, Te(e)), He(e)), Ge(e, t)), {
623
+ display: "inline-block",
624
+ width: x,
625
+ margin: 0,
626
+ padding: 0,
627
+ border: `${n}px ${r} ${l}`,
628
+ borderRadius: o,
629
+ "&-rtl": {
630
+ direction: "rtl",
631
+ [`${t}-input`]: {
632
+ direction: "rtl"
633
+ }
634
+ },
635
+ "&-lg": {
636
+ padding: 0,
637
+ fontSize: d,
638
+ borderRadius: N,
639
+ [`input${t}-input`]: {
640
+ height: c - 2 * n
641
+ }
642
+ },
643
+ "&-sm": {
644
+ padding: 0,
645
+ borderRadius: O,
646
+ [`input${t}-input`]: {
647
+ height: m - 2 * n,
648
+ padding: `0 ${s}px`
649
+ }
650
+ },
651
+ "&:hover": v({}, Ue(e)),
652
+ "&-focused": v({}, st(e)),
653
+ "&-disabled": v(v({}, ut(e)), {
654
+ [`${t}-input`]: {
655
+ cursor: "not-allowed"
656
+ }
657
+ }),
658
+ "&-out-of-range": {
659
+ input: {
660
+ color: f
661
+ }
662
+ },
663
+ "&-group": v(v(v({}, Te(e)), dt(e)), {
664
+ "&-wrapper": {
665
+ display: "inline-block",
666
+ textAlign: "start",
667
+ verticalAlign: "top",
668
+ [`${t}-affix-wrapper`]: {
669
+ width: "100%"
670
+ },
671
+ "&-lg": {
672
+ [`${t}-group-addon`]: {
673
+ borderRadius: N
674
+ }
675
+ },
676
+ "&-sm": {
677
+ [`${t}-group-addon`]: {
678
+ borderRadius: O
679
+ }
680
+ }
681
+ }
682
+ }),
683
+ [t]: {
684
+ "&-input": v(v({
685
+ width: "100%",
686
+ height: $ - 2 * n,
687
+ padding: `0 ${E}px`,
688
+ textAlign: "start",
689
+ backgroundColor: "transparent",
690
+ border: 0,
691
+ borderRadius: o,
692
+ outline: 0,
693
+ transition: `all ${S} linear`,
694
+ appearance: "textfield",
695
+ color: e.colorText,
696
+ fontSize: "inherit",
697
+ verticalAlign: "top"
698
+ }, ct(e.colorTextPlaceholder)), {
699
+ '&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button': {
700
+ margin: 0,
701
+ webkitAppearance: "none",
702
+ appearance: "none"
703
+ }
704
+ })
705
+ }
706
+ })
707
+ },
708
+ {
709
+ [t]: {
710
+ [`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]: {
711
+ opacity: 1
712
+ },
713
+ [`${t}-handler-wrap`]: {
714
+ position: "absolute",
715
+ insetBlockStart: 0,
716
+ insetInlineEnd: 0,
717
+ width: e.handleWidth,
718
+ height: "100%",
719
+ background: D,
720
+ borderStartStartRadius: 0,
721
+ borderStartEndRadius: o,
722
+ borderEndEndRadius: o,
723
+ borderEndStartRadius: 0,
724
+ opacity: T === !0 ? 1 : 0,
725
+ display: "flex",
726
+ flexDirection: "column",
727
+ alignItems: "stretch",
728
+ transition: `opacity ${S} linear ${S}`,
729
+ [`${t}-handler`]: {
730
+ display: "flex",
731
+ alignItems: "center",
732
+ justifyContent: "center",
733
+ flex: "auto",
734
+ height: "40%",
735
+ [`
736
+ ${t}-handler-up-inner,
737
+ ${t}-handler-down-inner
738
+ `]: {
739
+ marginInlineEnd: 0,
740
+ fontSize: e.handleFontSize
741
+ }
742
+ }
743
+ },
744
+ [`${t}-handler`]: {
745
+ height: "50%",
746
+ overflow: "hidden",
747
+ color: w,
748
+ fontWeight: "bold",
749
+ lineHeight: 0,
750
+ textAlign: "center",
751
+ cursor: "pointer",
752
+ borderInlineStart: `${n}px ${r} ${l}`,
753
+ transition: `all ${S} linear`,
754
+ "&:active": {
755
+ background: e.colorFillAlter
756
+ },
757
+ "&:hover": {
758
+ height: "60%",
759
+ [`
760
+ ${t}-handler-up-inner,
761
+ ${t}-handler-down-inner
762
+ `]: {
763
+ color: I
764
+ }
765
+ },
766
+ "&-up-inner, &-down-inner": v(v({}, ft()), {
767
+ color: w,
768
+ transition: `all ${S} linear`,
769
+ userSelect: "none"
770
+ })
771
+ },
772
+ [`${t}-handler-up`]: {
773
+ borderStartEndRadius: o
774
+ },
775
+ [`${t}-handler-down`]: {
776
+ borderBlockStart: `${n}px ${r} ${l}`,
777
+ borderEndEndRadius: o
778
+ },
779
+ "&-disabled, &-readonly": {
780
+ [`${t}-handler-wrap`]: {
781
+ display: "none"
782
+ }
783
+ },
784
+ [`
785
+ ${t}-handler-up-disabled,
786
+ ${t}-handler-down-disabled
787
+ `]: {
788
+ cursor: "not-allowed"
789
+ },
790
+ [`
791
+ ${t}-handler-up-disabled:hover &-handler-up-inner,
792
+ ${t}-handler-down-disabled:hover &-handler-down-inner
793
+ `]: {
794
+ color: C
795
+ }
796
+ }
797
+ },
798
+ {
799
+ [`${t}-borderless`]: {
800
+ borderColor: "transparent",
801
+ boxShadow: "none",
802
+ [`${t}-handler-down`]: {
803
+ borderBlockStartWidth: 0
804
+ }
805
+ }
806
+ }
807
+ ];
808
+ }, At = (e) => {
809
+ const {
810
+ componentCls: t,
811
+ inputPaddingHorizontal: n,
812
+ inputAffixPadding: r,
813
+ controlWidth: l,
814
+ borderRadiusLG: o,
815
+ borderRadiusSM: d
816
+ } = e;
817
+ return {
818
+ [`${t}-affix-wrapper`]: v(v(v({}, He(e)), Ge(e, `${t}-affix-wrapper`)), {
819
+ position: "relative",
820
+ display: "inline-flex",
821
+ width: l,
822
+ padding: 0,
823
+ paddingInlineStart: n,
824
+ "&-lg": {
825
+ borderRadius: o
826
+ },
827
+ "&-sm": {
828
+ borderRadius: d
829
+ },
830
+ [`&:not(${t}-affix-wrapper-disabled):hover`]: v(v({}, Ue(e)), {
831
+ zIndex: 1
832
+ }),
833
+ "&-focused, &:focus": {
834
+ zIndex: 1
835
+ },
836
+ "&-disabled": {
837
+ [`${t}[disabled]`]: {
838
+ background: "transparent"
839
+ }
840
+ },
841
+ [`> div${t}`]: {
842
+ width: "100%",
843
+ border: "none",
844
+ outline: "none",
845
+ [`&${t}-focused`]: {
846
+ boxShadow: "none !important"
847
+ }
848
+ },
849
+ [`input${t}-input`]: {
850
+ padding: 0
851
+ },
852
+ "&::before": {
853
+ width: 0,
854
+ visibility: "hidden",
855
+ content: '"\\a0"'
856
+ },
857
+ [`${t}-handler-wrap`]: {
858
+ zIndex: 2
859
+ },
860
+ [t]: {
861
+ "&-prefix, &-suffix": {
862
+ display: "flex",
863
+ flex: "none",
864
+ alignItems: "center",
865
+ pointerEvents: "none"
866
+ },
867
+ "&-prefix": {
868
+ marginInlineEnd: r
869
+ },
870
+ "&-suffix": {
871
+ position: "absolute",
872
+ insetBlockStart: 0,
873
+ insetInlineEnd: 0,
874
+ zIndex: 1,
875
+ height: "100%",
876
+ marginInlineEnd: n,
877
+ marginInlineStart: r
878
+ }
879
+ }
880
+ })
881
+ };
882
+ }, Tt = lt("InputNumber", (e) => {
883
+ const t = it(e);
884
+ return [
885
+ Rt(t),
886
+ At(t),
887
+ ot(t)
888
+ ];
889
+ }, (e) => ({
890
+ controlWidth: 90,
891
+ handleWidth: e.controlHeightSM - e.lineWidth * 2,
892
+ handleFontSize: e.fontSize / 2,
893
+ handleVisible: "auto"
894
+ }));
895
+ var Vt = globalThis && globalThis.__rest || function(e, t) {
896
+ var n = {};
897
+ for (var r in e)
898
+ Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
899
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
900
+ for (var l = 0, r = Object.getOwnPropertySymbols(e); l < r.length; l++)
901
+ t.indexOf(r[l]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[l]) && (n[r[l]] = e[r[l]]);
902
+ return n;
903
+ };
904
+ const We = Xe(), Bt = () => v(v({}, We), {
905
+ size: ye(),
906
+ bordered: F(!0),
907
+ placeholder: String,
908
+ name: String,
909
+ id: String,
910
+ type: String,
911
+ addonBefore: Se.any,
912
+ addonAfter: Se.any,
913
+ prefix: Se.any,
914
+ "onUpdate:value": We.onChange,
915
+ valueModifiers: Object,
916
+ status: ye()
917
+ }), Ne = Ie({
918
+ compatConfig: {
919
+ MODE: 3
920
+ },
921
+ name: "AInputNumber",
922
+ inheritAttrs: !1,
923
+ props: Bt(),
924
+ slots: Object,
925
+ setup(e, t) {
926
+ let {
927
+ emit: n,
928
+ expose: r,
929
+ attrs: l,
930
+ slots: o
931
+ } = t;
932
+ var d;
933
+ const c = pt(), m = mt.useInject(), f = W(() => gt(m.status, e.status)), {
934
+ prefixCls: s,
935
+ size: w,
936
+ direction: S,
937
+ disabled: I
938
+ } = vt("input-number", e), {
939
+ compactSize: $,
940
+ compactItemClassnames: E
941
+ } = bt(s, S), D = ht(), C = W(() => {
942
+ var h;
943
+ return (h = I.value) !== null && h !== void 0 ? h : D.value;
944
+ }), [O, N] = Tt(s), x = W(() => $.value || w.value), T = _((d = e.value) !== null && d !== void 0 ? d : e.defaultValue), k = _(!1);
945
+ te(() => e.value, () => {
946
+ T.value = e.value;
947
+ });
948
+ const X = _(null), K = () => {
949
+ var h;
950
+ (h = X.value) === null || h === void 0 || h.focus();
951
+ };
952
+ r({
953
+ focus: K,
954
+ blur: () => {
955
+ var h;
956
+ (h = X.value) === null || h === void 0 || h.blur();
957
+ }
958
+ });
959
+ const Y = (h) => {
960
+ e.value === void 0 && (T.value = h), n("update:value", h), n("change", h), c.onFieldChange();
961
+ }, oe = (h) => {
962
+ k.value = !1, n("blur", h), c.onFieldBlur();
963
+ }, J = (h) => {
964
+ k.value = !0, n("focus", h);
965
+ };
966
+ return () => {
967
+ var h, Q, H, G;
968
+ const {
969
+ hasFeedback: V,
970
+ isFormItemInput: se,
971
+ feedbackIcon: ue
972
+ } = m, de = (h = e.id) !== null && h !== void 0 ? h : c.id.value, a = v(v(v({}, l), e), {
973
+ id: de,
974
+ disabled: C.value
975
+ }), {
976
+ class: i,
977
+ bordered: u,
978
+ readonly: g,
979
+ style: y,
980
+ addonBefore: M = (Q = o.addonBefore) === null || Q === void 0 ? void 0 : Q.call(o),
981
+ addonAfter: B = (H = o.addonAfter) === null || H === void 0 ? void 0 : H.call(o),
982
+ prefix: Z = (G = o.prefix) === null || G === void 0 ? void 0 : G.call(o),
983
+ valueModifiers: ae = {}
984
+ } = a, _e = Vt(a, ["class", "bordered", "readonly", "style", "addonBefore", "addonAfter", "prefix", "valueModifiers"]), p = s.value, ce = z({
985
+ [`${p}-lg`]: x.value === "large",
986
+ [`${p}-sm`]: x.value === "small",
987
+ [`${p}-rtl`]: S.value === "rtl",
988
+ [`${p}-readonly`]: g,
989
+ [`${p}-borderless`]: !u,
990
+ [`${p}-in-form-item`]: se
991
+ }, he(p, f.value), i, E.value, N.value);
992
+ let U = b(Mt, A(A({}, St(_e, ["size", "defaultValue"])), {}, {
993
+ ref: X,
994
+ lazy: !!ae.lazy,
995
+ value: T.value,
996
+ class: ce,
997
+ prefixCls: p,
998
+ readonly: g,
999
+ onChange: Y,
1000
+ onBlur: oe,
1001
+ onFocus: J
1002
+ }), {
1003
+ upHandler: o.upIcon ? () => b("span", {
1004
+ class: `${p}-handler-up-inner`
1005
+ }, [o.upIcon()]) : () => b(It, {
1006
+ class: `${p}-handler-up-inner`
1007
+ }, null),
1008
+ downHandler: o.downIcon ? () => b("span", {
1009
+ class: `${p}-handler-down-inner`
1010
+ }, [o.downIcon()]) : () => b($t, {
1011
+ class: `${p}-handler-down-inner`
1012
+ }, null)
1013
+ });
1014
+ const fe = $e(M) || $e(B), pe = $e(Z);
1015
+ if (pe || V) {
1016
+ const L = z(`${p}-affix-wrapper`, he(`${p}-affix-wrapper`, f.value, V), {
1017
+ [`${p}-affix-wrapper-focused`]: k.value,
1018
+ [`${p}-affix-wrapper-disabled`]: C.value,
1019
+ [`${p}-affix-wrapper-sm`]: x.value === "small",
1020
+ [`${p}-affix-wrapper-lg`]: x.value === "large",
1021
+ [`${p}-affix-wrapper-rtl`]: S.value === "rtl",
1022
+ [`${p}-affix-wrapper-readonly`]: g,
1023
+ [`${p}-affix-wrapper-borderless`]: !u,
1024
+ [`${i}`]: !fe && i
1025
+ }, N.value);
1026
+ U = b("div", {
1027
+ class: L,
1028
+ style: y,
1029
+ onClick: K
1030
+ }, [pe && b("span", {
1031
+ class: `${p}-prefix`
1032
+ }, [Z]), U, V && b("span", {
1033
+ class: `${p}-suffix`
1034
+ }, [ue])]);
1035
+ }
1036
+ if (fe) {
1037
+ const L = `${p}-group`, me = `${L}-addon`, ge = M ? b("div", {
1038
+ class: me
1039
+ }, [M]) : null, ve = B ? b("div", {
1040
+ class: me
1041
+ }, [B]) : null, De = z(`${p}-wrapper`, L, {
1042
+ [`${L}-rtl`]: S.value === "rtl"
1043
+ }, N.value), Me = z(`${p}-group-wrapper`, {
1044
+ [`${p}-group-wrapper-sm`]: x.value === "small",
1045
+ [`${p}-group-wrapper-lg`]: x.value === "large",
1046
+ [`${p}-group-wrapper-rtl`]: S.value === "rtl"
1047
+ }, he(`${s}-group-wrapper`, f.value, V), i, N.value);
1048
+ U = b("div", {
1049
+ class: Me,
1050
+ style: y
1051
+ }, [b("div", {
1052
+ class: De
1053
+ }, [ge && b(Ve, null, {
1054
+ default: () => [b(Be, null, {
1055
+ default: () => [ge]
1056
+ })]
1057
+ }), U, ve && b(Ve, null, {
1058
+ default: () => [b(Be, null, {
1059
+ default: () => [ve]
1060
+ })]
1061
+ })])]);
1062
+ }
1063
+ return O(Nt(U, {
1064
+ style: y
1065
+ }));
1066
+ };
1067
+ }
1068
+ }), zt = v(Ne, {
1069
+ install: (e) => (e.component(Ne.name, Ne), e)
1070
+ });
1071
+ export {
1072
+ zt as _
1073
+ };