@varlet/ui 3.20.7 → 3.20.8
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/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/snackbar/core.mjs +59 -15
- package/es/snackbar/index.mjs +1 -0
- package/es/snackbar/props.mjs +1 -0
- package/es/snackbar/snackbar.css +1 -1
- package/es/varlet.css +1 -1
- package/es/varlet.esm.js +4182 -4136
- package/highlight/web-types.en-US.json +10 -1
- package/highlight/web-types.zh-CN.json +15 -6
- package/lib/varlet.cjs.js +167 -122
- package/lib/varlet.css +1 -1
- package/package.json +10 -10
- package/types/select.d.ts +2 -2
- package/types/snackbar.d.ts +2 -0
- package/types/styleVars.d.ts +2 -0
- package/umd/varlet.js +7 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
|
-
"version": "3.20.
|
|
4
|
+
"version": "3.20.8",
|
|
5
5
|
"name": "VARLET",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -8670,6 +8670,15 @@
|
|
|
8670
8670
|
"kind": "expression"
|
|
8671
8671
|
}
|
|
8672
8672
|
},
|
|
8673
|
+
{
|
|
8674
|
+
"name": "progress",
|
|
8675
|
+
"description": "Whether to show dismissal countdown",
|
|
8676
|
+
"default": "false",
|
|
8677
|
+
"value": {
|
|
8678
|
+
"type": "boolean",
|
|
8679
|
+
"kind": "expression"
|
|
8680
|
+
}
|
|
8681
|
+
},
|
|
8673
8682
|
{
|
|
8674
8683
|
"name": "elevation",
|
|
8675
8684
|
"description": "Elevation level, options `true` `false` and level of `0-24`",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"framework": "vue",
|
|
4
|
-
"version": "3.20.
|
|
4
|
+
"version": "3.20.8",
|
|
5
5
|
"name": "VARLET",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -8572,7 +8572,7 @@
|
|
|
8572
8572
|
},
|
|
8573
8573
|
{
|
|
8574
8574
|
"name": "position",
|
|
8575
|
-
"description": "`Snackbar`
|
|
8575
|
+
"description": "`Snackbar` 位置,可选值为 `top center bottom`",
|
|
8576
8576
|
"default": "top",
|
|
8577
8577
|
"value": {
|
|
8578
8578
|
"type": "string",
|
|
@@ -8588,6 +8588,15 @@
|
|
|
8588
8588
|
"kind": "expression"
|
|
8589
8589
|
}
|
|
8590
8590
|
},
|
|
8591
|
+
{
|
|
8592
|
+
"name": "progress",
|
|
8593
|
+
"description": "是否显示自动关闭倒计时进度条",
|
|
8594
|
+
"default": "false",
|
|
8595
|
+
"value": {
|
|
8596
|
+
"type": "boolean",
|
|
8597
|
+
"kind": "expression"
|
|
8598
|
+
}
|
|
8599
|
+
},
|
|
8591
8600
|
{
|
|
8592
8601
|
"name": "elevation",
|
|
8593
8602
|
"description": "海拔高度,可选值为 `true` `false` 和 `0-24` 的等级",
|
|
@@ -8626,7 +8635,7 @@
|
|
|
8626
8635
|
},
|
|
8627
8636
|
{
|
|
8628
8637
|
"name": "loading-type",
|
|
8629
|
-
"description": "Loading
|
|
8638
|
+
"description": "Loading 类型(见 `Loading` 组件)",
|
|
8630
8639
|
"default": "circle",
|
|
8631
8640
|
"value": {
|
|
8632
8641
|
"type": "string",
|
|
@@ -8635,7 +8644,7 @@
|
|
|
8635
8644
|
},
|
|
8636
8645
|
{
|
|
8637
8646
|
"name": "loading-size",
|
|
8638
|
-
"description": "Loading
|
|
8647
|
+
"description": "Loading 大小(见 `Loading` 组件)",
|
|
8639
8648
|
"default": "normal",
|
|
8640
8649
|
"value": {
|
|
8641
8650
|
"type": "string",
|
|
@@ -8644,7 +8653,7 @@
|
|
|
8644
8653
|
},
|
|
8645
8654
|
{
|
|
8646
8655
|
"name": "loading-color",
|
|
8647
|
-
"description": "
|
|
8656
|
+
"description": "Loading 颜色(见 `Loading` 组件)",
|
|
8648
8657
|
"default": "currentColor",
|
|
8649
8658
|
"value": {
|
|
8650
8659
|
"type": "string",
|
|
@@ -8653,7 +8662,7 @@
|
|
|
8653
8662
|
},
|
|
8654
8663
|
{
|
|
8655
8664
|
"name": "loading-radius",
|
|
8656
|
-
"description": "Loading
|
|
8665
|
+
"description": "Loading 半径(见 `Loading` 组件)",
|
|
8657
8666
|
"default": "-",
|
|
8658
8667
|
"value": {
|
|
8659
8668
|
"type": "string | number",
|
package/lib/varlet.cjs.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
let vue = require("vue");
|
|
6
|
-
//#region ../../node_modules/.pnpm/rattail@2.1.1_oxfmt@0.
|
|
6
|
+
//#region ../../node_modules/.pnpm/rattail@2.1.1_oxfmt@0.72.0_vite-plus@1.1.0_@types+node@22.19.17_@vitest+coverage-istanbul@5.0_av5tye26zac23ejqbw3p6coe4y/node_modules/rattail/dist/callOrReturn-Kvk3rYZJ.mjs
|
|
7
7
|
function isArray(val) {
|
|
8
8
|
return Array.isArray(val);
|
|
9
9
|
}
|
|
@@ -86,7 +86,7 @@ function init(converter, defaultAttributes) {
|
|
|
86
86
|
}
|
|
87
87
|
init(defaultConverter, { path: "/" });
|
|
88
88
|
//#endregion
|
|
89
|
-
//#region ../../node_modules/.pnpm/rattail@2.1.1_oxfmt@0.
|
|
89
|
+
//#region ../../node_modules/.pnpm/rattail@2.1.1_oxfmt@0.72.0_vite-plus@1.1.0_@types+node@22.19.17_@vitest+coverage-istanbul@5.0_av5tye26zac23ejqbw3p6coe4y/node_modules/rattail/dist/index.mjs
|
|
90
90
|
function clamp$1(num, min, max) {
|
|
91
91
|
return Math.min(max, Math.max(min, num));
|
|
92
92
|
}
|
|
@@ -4994,10 +4994,7 @@ function computeOffsets(_ref) {
|
|
|
4994
4994
|
case start$1:
|
|
4995
4995
|
offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);
|
|
4996
4996
|
break;
|
|
4997
|
-
case "end":
|
|
4998
|
-
offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);
|
|
4999
|
-
break;
|
|
5000
|
-
default:
|
|
4997
|
+
case "end": offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);
|
|
5001
4998
|
}
|
|
5002
4999
|
}
|
|
5003
5000
|
return offsets;
|
|
@@ -7364,7 +7361,6 @@ var Dayjs = /*#__PURE__*/ function() {
|
|
|
7364
7361
|
case "ss": return Utils.s(_this3.$s, 2, "0");
|
|
7365
7362
|
case "SSS": return Utils.s(_this3.$ms, 3, "0");
|
|
7366
7363
|
case "Z": return zoneStr;
|
|
7367
|
-
default: break;
|
|
7368
7364
|
}
|
|
7369
7365
|
return null;
|
|
7370
7366
|
};
|
|
@@ -7410,9 +7406,7 @@ var Dayjs = /*#__PURE__*/ function() {
|
|
|
7410
7406
|
case S:
|
|
7411
7407
|
result = diff / MILLISECONDS_A_SECOND;
|
|
7412
7408
|
break;
|
|
7413
|
-
default:
|
|
7414
|
-
result = diff;
|
|
7415
|
-
break;
|
|
7409
|
+
default: result = diff;
|
|
7416
7410
|
}
|
|
7417
7411
|
return _float ? result : Utils.a(result);
|
|
7418
7412
|
};
|
|
@@ -10779,13 +10773,13 @@ P.cubeRoot = P.cbrt = function() {
|
|
|
10779
10773
|
if (!x.isFinite() || x.isZero()) return new Ctor(x);
|
|
10780
10774
|
external = false;
|
|
10781
10775
|
s = x.s * mathpow(x.s * x, 1 / 3);
|
|
10782
|
-
if (!s || Math.abs(s) ==
|
|
10776
|
+
if (!s || Math.abs(s) == 1 / 0) {
|
|
10783
10777
|
n = digitsToString(x.d);
|
|
10784
10778
|
e = x.e;
|
|
10785
10779
|
if (s = (e - n.length + 1) % 3) n += s == 1 || s == -2 ? "0" : "00";
|
|
10786
10780
|
s = mathpow(n, 1 / 3);
|
|
10787
10781
|
e = mathfloor((e + 1) / 3) - (e % 3 == (e < 0 ? -1 : 2));
|
|
10788
|
-
if (s ==
|
|
10782
|
+
if (s == 1 / 0) n = "5e" + e;
|
|
10789
10783
|
else {
|
|
10790
10784
|
n = s.toExponential();
|
|
10791
10785
|
n = n.slice(0, n.indexOf("e") + 1) + e;
|
|
@@ -10856,7 +10850,7 @@ P.greaterThanOrEqualTo = P.gte = function(y) {
|
|
|
10856
10850
|
};
|
|
10857
10851
|
P.hyperbolicCosine = P.cosh = function() {
|
|
10858
10852
|
var k, n, pr, rm, len, x = this, Ctor = x.constructor, one = new Ctor(1);
|
|
10859
|
-
if (!x.isFinite()) return new Ctor(x.s ?
|
|
10853
|
+
if (!x.isFinite()) return new Ctor(x.s ? 1 / 0 : NaN);
|
|
10860
10854
|
if (x.isZero()) return one;
|
|
10861
10855
|
pr = Ctor.precision;
|
|
10862
10856
|
rm = Ctor.rounding;
|
|
@@ -11062,11 +11056,13 @@ P.logarithm = P.log = function(base) {
|
|
|
11062
11056
|
isBase10 = base.eq(10);
|
|
11063
11057
|
}
|
|
11064
11058
|
d = arg.d;
|
|
11065
|
-
if (arg.s < 0 || !d || !d[0] || arg.eq(1)) return new Ctor(d && !d[0] ? -
|
|
11066
|
-
if (isBase10)
|
|
11067
|
-
|
|
11068
|
-
|
|
11069
|
-
|
|
11059
|
+
if (arg.s < 0 || !d || !d[0] || arg.eq(1)) return new Ctor(d && !d[0] ? -1 / 0 : arg.s != 1 ? NaN : d ? 0 : 1 / 0);
|
|
11060
|
+
if (isBase10) {
|
|
11061
|
+
if (d.length > 1) inf = true;
|
|
11062
|
+
else {
|
|
11063
|
+
for (k = d[0]; k % 10 === 0;) k /= 10;
|
|
11064
|
+
inf = k !== 1;
|
|
11065
|
+
}
|
|
11070
11066
|
}
|
|
11071
11067
|
external = false;
|
|
11072
11068
|
sd = pr + guard;
|
|
@@ -11284,15 +11280,15 @@ P.sine = P.sin = function() {
|
|
|
11284
11280
|
};
|
|
11285
11281
|
P.squareRoot = P.sqrt = function() {
|
|
11286
11282
|
var m, n, sd, r, rep, t, x = this, d = x.d, e = x.e, s = x.s, Ctor = x.constructor;
|
|
11287
|
-
if (s !== 1 || !d || !d[0]) return new Ctor(!s || s < 0 && (!d || d[0]) ? NaN : d ? x :
|
|
11283
|
+
if (s !== 1 || !d || !d[0]) return new Ctor(!s || s < 0 && (!d || d[0]) ? NaN : d ? x : 1 / 0);
|
|
11288
11284
|
external = false;
|
|
11289
11285
|
s = Math.sqrt(+x);
|
|
11290
|
-
if (s == 0 || s ==
|
|
11286
|
+
if (s == 0 || s == 1 / 0) {
|
|
11291
11287
|
n = digitsToString(d);
|
|
11292
11288
|
if ((n.length + e) % 2 == 0) n += "0";
|
|
11293
11289
|
s = Math.sqrt(n);
|
|
11294
11290
|
e = mathfloor((e + 1) / 2) - (e < 0 || e % 2);
|
|
11295
|
-
if (s ==
|
|
11291
|
+
if (s == 1 / 0) n = "5e" + e;
|
|
11296
11292
|
else {
|
|
11297
11293
|
n = s.toExponential();
|
|
11298
11294
|
n = n.slice(0, n.indexOf("e") + 1) + e;
|
|
@@ -11589,8 +11585,8 @@ function checkInt32(i, min, max) {
|
|
|
11589
11585
|
if (i !== ~~i || i < min || i > max) throw Error(invalidArgument + i);
|
|
11590
11586
|
}
|
|
11591
11587
|
function checkRoundingDigits(d, i, rm, repeating) {
|
|
11592
|
-
var di, k, r, rd;
|
|
11593
|
-
for (
|
|
11588
|
+
var di, k = d[0], r, rd;
|
|
11589
|
+
for (; k >= 10; k /= 10) --i;
|
|
11594
11590
|
if (--i < 0) {
|
|
11595
11591
|
i += LOG_BASE;
|
|
11596
11592
|
di = 0;
|
|
@@ -11600,12 +11596,13 @@ function checkRoundingDigits(d, i, rm, repeating) {
|
|
|
11600
11596
|
}
|
|
11601
11597
|
k = mathpow(10, LOG_BASE - i);
|
|
11602
11598
|
rd = d[di] % k | 0;
|
|
11603
|
-
if (repeating == null)
|
|
11604
|
-
if (i
|
|
11605
|
-
|
|
11606
|
-
|
|
11607
|
-
|
|
11608
|
-
|
|
11599
|
+
if (repeating == null) {
|
|
11600
|
+
if (i < 3) {
|
|
11601
|
+
if (i == 0) rd = rd / 100 | 0;
|
|
11602
|
+
else if (i == 1) rd = rd / 10 | 0;
|
|
11603
|
+
r = rm < 4 && rd == 99999 || rm > 3 && rd == 49999 || rd == 5e4 || rd == 0;
|
|
11604
|
+
} else r = (rm < 4 && rd + 1 == k || rm > 3 && rd + 1 == k / 2) && (d[di + 1] / k / 100 | 0) == mathpow(10, i - 2) - 1 || (rd == k / 2 || rd == 0) && (d[di + 1] / k / 100 | 0) == 0;
|
|
11605
|
+
} else if (i < 4) {
|
|
11609
11606
|
if (i == 0) rd = rd / 1e3 | 0;
|
|
11610
11607
|
else if (i == 1) rd = rd / 100 | 0;
|
|
11611
11608
|
else if (i == 2) rd = rd / 10 | 0;
|
|
@@ -11803,14 +11800,15 @@ function finalise(x, sd, rm, isTruncated) {
|
|
|
11803
11800
|
} else {
|
|
11804
11801
|
xdi = Math.ceil((i + 1) / LOG_BASE);
|
|
11805
11802
|
k = xd.length;
|
|
11806
|
-
if (xdi >= k)
|
|
11807
|
-
|
|
11808
|
-
|
|
11809
|
-
|
|
11810
|
-
|
|
11811
|
-
|
|
11812
|
-
|
|
11813
|
-
|
|
11803
|
+
if (xdi >= k) {
|
|
11804
|
+
if (isTruncated) {
|
|
11805
|
+
for (; k++ <= xdi;) xd.push(0);
|
|
11806
|
+
w = rd = 0;
|
|
11807
|
+
digits = 1;
|
|
11808
|
+
i %= LOG_BASE;
|
|
11809
|
+
j = i - LOG_BASE + 1;
|
|
11810
|
+
} else break out;
|
|
11811
|
+
} else {
|
|
11814
11812
|
w = k = xd[xdi];
|
|
11815
11813
|
for (digits = 1; k >= 10; k /= 10) digits++;
|
|
11816
11814
|
i %= LOG_BASE;
|
|
@@ -11957,7 +11955,7 @@ function maxOrMin(Ctor, args, n) {
|
|
|
11957
11955
|
}
|
|
11958
11956
|
function naturalExponential(x, sd) {
|
|
11959
11957
|
var denominator, guard, j, pow, sum, t, wpr, rep = 0, i = 0, k = 0, Ctor = x.constructor, rm = Ctor.rounding, pr = Ctor.precision;
|
|
11960
|
-
if (!x.d || !x.d[0] || x.e > 17) return new Ctor(x.d ? !x.d[0] ? 1 : x.s < 0 ? 0 :
|
|
11958
|
+
if (!x.d || !x.d[0] || x.e > 17) return new Ctor(x.d ? !x.d[0] ? 1 : x.s < 0 ? 0 : 1 / 0 : x.s ? x.s < 0 ? 0 : x : NaN);
|
|
11961
11959
|
if (sd == null) {
|
|
11962
11960
|
external = false;
|
|
11963
11961
|
wpr = pr;
|
|
@@ -11978,13 +11976,14 @@ function naturalExponential(x, sd) {
|
|
|
11978
11976
|
if (digitsToString(t.d).slice(0, wpr) === digitsToString(sum.d).slice(0, wpr)) {
|
|
11979
11977
|
j = k;
|
|
11980
11978
|
while (j--) sum = finalise(sum.times(sum), wpr, 1);
|
|
11981
|
-
if (sd == null)
|
|
11982
|
-
|
|
11983
|
-
|
|
11984
|
-
|
|
11985
|
-
|
|
11986
|
-
|
|
11987
|
-
|
|
11979
|
+
if (sd == null) {
|
|
11980
|
+
if (rep < 3 && checkRoundingDigits(sum.d, wpr - guard, rm, rep)) {
|
|
11981
|
+
Ctor.precision = wpr += 10;
|
|
11982
|
+
denominator = pow = t = new Ctor(1);
|
|
11983
|
+
i = 0;
|
|
11984
|
+
rep++;
|
|
11985
|
+
} else return finalise(sum, Ctor.precision = pr, rm, external = true);
|
|
11986
|
+
} else {
|
|
11988
11987
|
Ctor.precision = pr;
|
|
11989
11988
|
return sum;
|
|
11990
11989
|
}
|
|
@@ -11994,7 +11993,7 @@ function naturalExponential(x, sd) {
|
|
|
11994
11993
|
}
|
|
11995
11994
|
function naturalLogarithm(y, sd) {
|
|
11996
11995
|
var c, c0, denominator, e, numerator, rep, sum, t, wpr, x1, x2, n = 1, guard = 10, x = y, xd = x.d, Ctor = x.constructor, rm = Ctor.rounding, pr = Ctor.precision;
|
|
11997
|
-
if (x.s < 0 || !xd || !xd[0] || !x.e && xd[0] == 1 && xd.length == 1) return new Ctor(xd && !xd[0] ? -
|
|
11996
|
+
if (x.s < 0 || !xd || !xd[0] || !x.e && xd[0] == 1 && xd.length == 1) return new Ctor(xd && !xd[0] ? -1 / 0 : x.s != 1 ? NaN : xd ? 0 : x);
|
|
11998
11997
|
if (sd == null) {
|
|
11999
11998
|
external = false;
|
|
12000
11999
|
wpr = pr;
|
|
@@ -12031,13 +12030,14 @@ function naturalLogarithm(y, sd) {
|
|
|
12031
12030
|
sum = sum.times(2);
|
|
12032
12031
|
if (e !== 0) sum = sum.plus(getLn10(Ctor, wpr + 2, pr).times(e + ""));
|
|
12033
12032
|
sum = divide(sum, new Ctor(n), wpr, 1);
|
|
12034
|
-
if (sd == null)
|
|
12035
|
-
|
|
12036
|
-
|
|
12037
|
-
|
|
12038
|
-
|
|
12039
|
-
|
|
12040
|
-
|
|
12033
|
+
if (sd == null) {
|
|
12034
|
+
if (checkRoundingDigits(sum.d, wpr - guard, rm, rep)) {
|
|
12035
|
+
Ctor.precision = wpr += guard;
|
|
12036
|
+
t = numerator = x = divide(x1.minus(1), x1.plus(1), wpr, 1);
|
|
12037
|
+
x2 = finalise(x.times(x), wpr, 1);
|
|
12038
|
+
denominator = rep = 1;
|
|
12039
|
+
} else return finalise(sum, Ctor.precision = pr, rm, external = true);
|
|
12040
|
+
} else {
|
|
12041
12041
|
Ctor.precision = pr;
|
|
12042
12042
|
return sum;
|
|
12043
12043
|
}
|
|
@@ -12250,13 +12250,15 @@ function toStringBinary(x, baseOut, sd, rm) {
|
|
|
12250
12250
|
for (len = xd.length; !xd[len - 1]; --len);
|
|
12251
12251
|
for (i = 0, str = ""; i < len; i++) str += NUMERALS.charAt(xd[i]);
|
|
12252
12252
|
if (isExp) {
|
|
12253
|
-
if (len > 1)
|
|
12254
|
-
|
|
12255
|
-
|
|
12256
|
-
|
|
12257
|
-
|
|
12258
|
-
|
|
12259
|
-
|
|
12253
|
+
if (len > 1) {
|
|
12254
|
+
if (baseOut == 16 || baseOut == 8) {
|
|
12255
|
+
i = baseOut == 16 ? 4 : 3;
|
|
12256
|
+
for (--len; len % i; len++) str += "0";
|
|
12257
|
+
xd = convertBase(str, base, baseOut);
|
|
12258
|
+
for (len = xd.length; !xd[len - 1]; --len);
|
|
12259
|
+
for (i = 1, str = "1."; i < len; i++) str += NUMERALS.charAt(xd[i]);
|
|
12260
|
+
} else str = str.charAt(0) + "." + str.slice(1);
|
|
12261
|
+
}
|
|
12260
12262
|
str = str + (e < 0 ? "p" : "p+") + e;
|
|
12261
12263
|
} else if (e < 0) {
|
|
12262
12264
|
for (; ++e;) str = "0" + str;
|
|
@@ -12359,14 +12361,20 @@ function config(obj) {
|
|
|
12359
12361
|
];
|
|
12360
12362
|
for (i = 0; i < ps.length; i += 3) {
|
|
12361
12363
|
if (p = ps[i], useDefaults) this[p] = DEFAULTS[p];
|
|
12362
|
-
if ((v = obj[p]) !== void 0)
|
|
12363
|
-
|
|
12364
|
+
if ((v = obj[p]) !== void 0) {
|
|
12365
|
+
if (mathfloor(v) === v && v >= ps[i + 1] && v <= ps[i + 2]) this[p] = v;
|
|
12366
|
+
else throw Error(invalidArgument + p + ": " + v);
|
|
12367
|
+
}
|
|
12364
12368
|
}
|
|
12365
12369
|
if (p = "crypto", useDefaults) this[p] = DEFAULTS[p];
|
|
12366
|
-
if ((v = obj[p]) !== void 0)
|
|
12367
|
-
|
|
12368
|
-
|
|
12369
|
-
|
|
12370
|
+
if ((v = obj[p]) !== void 0) {
|
|
12371
|
+
if (v === true || v === false || v === 0 || v === 1) {
|
|
12372
|
+
if (v) {
|
|
12373
|
+
if (typeof crypto != "undefined" && crypto && (crypto.getRandomValues || crypto.randomBytes)) this[p] = true;
|
|
12374
|
+
else throw Error(cryptoUnavailable);
|
|
12375
|
+
} else this[p] = false;
|
|
12376
|
+
} else throw Error(invalidArgument + p + ": " + v);
|
|
12377
|
+
}
|
|
12370
12378
|
return this;
|
|
12371
12379
|
}
|
|
12372
12380
|
function cos(x) {
|
|
@@ -12383,17 +12391,18 @@ function clone(obj) {
|
|
|
12383
12391
|
x.constructor = Decimal;
|
|
12384
12392
|
if (isDecimalInstance(v)) {
|
|
12385
12393
|
x.s = v.s;
|
|
12386
|
-
if (external)
|
|
12387
|
-
|
|
12388
|
-
|
|
12389
|
-
|
|
12390
|
-
|
|
12391
|
-
|
|
12394
|
+
if (external) {
|
|
12395
|
+
if (!v.d || v.e > Decimal.maxE) {
|
|
12396
|
+
x.e = NaN;
|
|
12397
|
+
x.d = null;
|
|
12398
|
+
} else if (v.e < Decimal.minE) {
|
|
12399
|
+
x.e = 0;
|
|
12400
|
+
x.d = [0];
|
|
12401
|
+
} else {
|
|
12402
|
+
x.e = v.e;
|
|
12403
|
+
x.d = v.d.slice();
|
|
12404
|
+
}
|
|
12392
12405
|
} else {
|
|
12393
|
-
x.e = v.e;
|
|
12394
|
-
x.d = v.d.slice();
|
|
12395
|
-
}
|
|
12396
|
-
else {
|
|
12397
12406
|
x.e = v.e;
|
|
12398
12407
|
x.d = v.d ? v.d.slice() : v.d;
|
|
12399
12408
|
}
|
|
@@ -12413,20 +12422,21 @@ function clone(obj) {
|
|
|
12413
12422
|
} else x.s = 1;
|
|
12414
12423
|
if (v === ~~v && v < 1e7) {
|
|
12415
12424
|
for (e = 0, i = v; i >= 10; i /= 10) e++;
|
|
12416
|
-
if (external)
|
|
12417
|
-
|
|
12418
|
-
|
|
12419
|
-
|
|
12420
|
-
|
|
12421
|
-
|
|
12425
|
+
if (external) {
|
|
12426
|
+
if (e > Decimal.maxE) {
|
|
12427
|
+
x.e = NaN;
|
|
12428
|
+
x.d = null;
|
|
12429
|
+
} else if (e < Decimal.minE) {
|
|
12430
|
+
x.e = 0;
|
|
12431
|
+
x.d = [0];
|
|
12432
|
+
} else {
|
|
12433
|
+
x.e = e;
|
|
12434
|
+
x.d = [v];
|
|
12435
|
+
}
|
|
12422
12436
|
} else {
|
|
12423
12437
|
x.e = e;
|
|
12424
12438
|
x.d = [v];
|
|
12425
12439
|
}
|
|
12426
|
-
else {
|
|
12427
|
-
x.e = e;
|
|
12428
|
-
x.d = [v];
|
|
12429
|
-
}
|
|
12430
12440
|
return;
|
|
12431
12441
|
}
|
|
12432
12442
|
if (v * 0 !== 0) {
|
|
@@ -12544,7 +12554,7 @@ function hypot() {
|
|
|
12544
12554
|
if (!n.d) {
|
|
12545
12555
|
if (n.s) {
|
|
12546
12556
|
external = true;
|
|
12547
|
-
return new this(
|
|
12557
|
+
return new this(1 / 0);
|
|
12548
12558
|
}
|
|
12549
12559
|
t = n;
|
|
12550
12560
|
} else if (t.d) t = t.plus(n.times(n));
|
|
@@ -15447,8 +15457,6 @@ var __spreadValues$21 = (a, b) => {
|
|
|
15447
15457
|
return a;
|
|
15448
15458
|
};
|
|
15449
15459
|
var dayjs$4 = createDayjs();
|
|
15450
|
-
var DAYS_PER_WEEK = 7;
|
|
15451
|
-
var WEEKS_PER_PANEL = 6;
|
|
15452
15460
|
var MonthOffset = {
|
|
15453
15461
|
Prev: -1,
|
|
15454
15462
|
Current: 0,
|
|
@@ -15526,7 +15534,7 @@ var __sfc__$64 = (0, vue.defineComponent)({
|
|
|
15526
15534
|
const lastDayjsObject = firstDayjsObject.endOf(DatePickerUnits.Month);
|
|
15527
15535
|
const daysInMonth = firstDayjsObject.daysInMonth();
|
|
15528
15536
|
const leadingCount = Math.max(0, sortWeekList.value.findIndex((week) => week === `${firstDayjsObject.day()}`));
|
|
15529
|
-
const trailingCount =
|
|
15537
|
+
const trailingCount = 42 - leadingCount - daysInMonth;
|
|
15530
15538
|
const cells = [];
|
|
15531
15539
|
for (let offset = leadingCount; offset > 0; offset--) cells.push(createCell(firstDayjsObject.subtract(offset, DatePickerUnits.Day), MonthOffset.Prev));
|
|
15532
15540
|
for (let day = 1; day <= daysInMonth; day++) cells.push(createCell(firstDayjsObject.date(day), MonthOffset.Current));
|
|
@@ -17919,7 +17927,8 @@ function Dialog(options) {
|
|
|
17919
17927
|
if (!inBrowser()) return Promise.resolve();
|
|
17920
17928
|
return new Promise((resolve) => {
|
|
17921
17929
|
Dialog.close();
|
|
17922
|
-
const
|
|
17930
|
+
const dialogOptions = normalizeOptions$2(options);
|
|
17931
|
+
const reactiveDialogOptions = (0, vue.reactive)(dialogOptions);
|
|
17923
17932
|
reactiveDialogOptions.teleport = "body";
|
|
17924
17933
|
singletonOptions$2 = reactiveDialogOptions;
|
|
17925
17934
|
const { unmountInstance } = mountInstance(stdin_default$400, reactiveDialogOptions, {
|
|
@@ -20040,7 +20049,8 @@ function normalizeOptions$1(options = {}) {
|
|
|
20040
20049
|
function ImagePreview(options) {
|
|
20041
20050
|
if (!inBrowser()) return;
|
|
20042
20051
|
ImagePreview.close();
|
|
20043
|
-
const
|
|
20052
|
+
const imagePreviewOptions = normalizeOptions$1(options);
|
|
20053
|
+
const reactiveImagePreviewOptions = (0, vue.reactive)(imagePreviewOptions);
|
|
20044
20054
|
reactiveImagePreviewOptions.teleport = "body";
|
|
20045
20055
|
singletonOptions$1 = reactiveImagePreviewOptions;
|
|
20046
20056
|
const { unmountInstance } = mountInstance(stdin_default$388, reactiveImagePreviewOptions, {
|
|
@@ -22336,7 +22346,8 @@ var singletonOptions;
|
|
|
22336
22346
|
function Picker(options) {
|
|
22337
22347
|
return new Promise((resolve) => {
|
|
22338
22348
|
Picker.close();
|
|
22339
|
-
const
|
|
22349
|
+
const pickerOptions = isArray(options) ? { columns: options } : options;
|
|
22350
|
+
const reactivePickerOptions = (0, vue.reactive)(pickerOptions);
|
|
22340
22351
|
reactivePickerOptions.dynamic = true;
|
|
22341
22352
|
reactivePickerOptions.teleport = "body";
|
|
22342
22353
|
singletonOptions = reactivePickerOptions;
|
|
@@ -22573,12 +22584,8 @@ var __sfc__$37 = (0, vue.defineComponent)({
|
|
|
22573
22584
|
const roundValue = clamp$1(Math.round(toNumber(value)), MIN, MAX);
|
|
22574
22585
|
const strokeOffset = `${(MAX - roundValue) / MAX * CIRCUMFERENCE}`;
|
|
22575
22586
|
const strokeWidth = toPxNum(lineWidth) / toPxNum(size) * diameter;
|
|
22576
|
-
const
|
|
22577
|
-
|
|
22578
|
-
const endPositionX = 0;
|
|
22579
|
-
const endPositionY = -2 * RADIUS;
|
|
22580
|
-
const path = `M ${diameter / 2} ${diameter / 2} m ${beginPositionX} ${beginPositionY} a ${RADIUS} ${RADIUS}
|
|
22581
|
-
0 1 1 ${endPositionX} 40 a ${RADIUS} ${RADIUS} 0 1 1 0 ${endPositionY}`;
|
|
22587
|
+
const path = `M ${diameter / 2} ${diameter / 2} m 0 -20 a ${RADIUS} ${RADIUS}
|
|
22588
|
+
0 1 1 0 40 a ${RADIUS} ${RADIUS} 0 1 1 0 -40`;
|
|
22582
22589
|
return {
|
|
22583
22590
|
strokeWidth,
|
|
22584
22591
|
viewBox,
|
|
@@ -25551,6 +25558,7 @@ var props$74 = {
|
|
|
25551
25558
|
type: Number,
|
|
25552
25559
|
default: 3e3
|
|
25553
25560
|
},
|
|
25561
|
+
progress: Boolean,
|
|
25554
25562
|
elevation: {
|
|
25555
25563
|
type: [
|
|
25556
25564
|
Boolean,
|
|
@@ -25593,6 +25601,7 @@ var ICON_TYPE_DICT = {
|
|
|
25593
25601
|
loading: ""
|
|
25594
25602
|
};
|
|
25595
25603
|
function __render__$15(_ctx, _cache) {
|
|
25604
|
+
var _a;
|
|
25596
25605
|
const _component_var_icon = (0, vue.resolveComponent)("var-icon");
|
|
25597
25606
|
const _component_var_loading = (0, vue.resolveComponent)("var-loading");
|
|
25598
25607
|
return (0, vue.withDirectives)(((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
@@ -25602,7 +25611,7 @@ function __render__$15(_ctx, _cache) {
|
|
|
25602
25611
|
zIndex: _ctx.zIndex
|
|
25603
25612
|
})
|
|
25604
25613
|
}, [(0, vue.createElementVNode)("div", {
|
|
25605
|
-
class: (0, vue.normalizeClass)(_ctx.classes(_ctx.n("wrapper"), _ctx.n(`wrapper-${_ctx.position}`), _ctx.formatElevation(_ctx.elevation, 4), [_ctx.vertical, _ctx.n("vertical")], [_ctx.type && _ctx.SNACKBAR_TYPE.includes(_ctx.type), _ctx.n(`wrapper-${_ctx.type}`)])),
|
|
25614
|
+
class: (0, vue.normalizeClass)(_ctx.classes(_ctx.n("wrapper"), _ctx.n(`wrapper-${_ctx.position}`), _ctx.formatElevation(_ctx.elevation, 4), [_ctx.vertical, _ctx.n("vertical")], [_ctx.showProgress, _ctx.n("wrapper--progress")], [_ctx.type && _ctx.SNACKBAR_TYPE.includes(_ctx.type), _ctx.n(`wrapper-${_ctx.type}`)])),
|
|
25606
25615
|
style: (0, vue.normalizeStyle)({ zIndex: _ctx.zIndex })
|
|
25607
25616
|
}, [
|
|
25608
25617
|
(0, vue.createElementVNode)("div", { class: (0, vue.normalizeClass)([_ctx.n("content"), _ctx.contentClass]) }, [(0, vue.renderSlot)(_ctx.$slots, "default", {}, () => [(0, vue.createTextVNode)((0, vue.toDisplayString)(_ctx.content), 1)])], 2),
|
|
@@ -25631,7 +25640,15 @@ function __render__$15(_ctx, _cache) {
|
|
|
25631
25640
|
_ctx.$slots.action ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
25632
25641
|
key: 1,
|
|
25633
25642
|
class: (0, vue.normalizeClass)(_ctx.n("action"))
|
|
25634
|
-
}, [(0, vue.renderSlot)(_ctx.$slots, "action")], 2)) : (0, vue.createCommentVNode)("v-if", true)
|
|
25643
|
+
}, [(0, vue.renderSlot)(_ctx.$slots, "action")], 2)) : (0, vue.createCommentVNode)("v-if", true),
|
|
25644
|
+
_ctx.showProgress ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
25645
|
+
key: (_a = _ctx.countdown) == null ? void 0 : _a.id,
|
|
25646
|
+
class: (0, vue.normalizeClass)(_ctx.n("progress")),
|
|
25647
|
+
"aria-hidden": "true"
|
|
25648
|
+
}, [(0, vue.createElementVNode)("div", {
|
|
25649
|
+
class: (0, vue.normalizeClass)(_ctx.n("progress-bar")),
|
|
25650
|
+
style: (0, vue.normalizeStyle)(_ctx.progressStyle)
|
|
25651
|
+
}, null, 6)], 2)) : (0, vue.createCommentVNode)("v-if", true)
|
|
25635
25652
|
], 6)], 6)), [[vue.vShow, _ctx.show]]);
|
|
25636
25653
|
}
|
|
25637
25654
|
var __sfc__$15 = (0, vue.defineComponent)({
|
|
@@ -25642,7 +25659,9 @@ var __sfc__$15 = (0, vue.defineComponent)({
|
|
|
25642
25659
|
},
|
|
25643
25660
|
props: props$74,
|
|
25644
25661
|
setup(props2) {
|
|
25645
|
-
|
|
25662
|
+
let timer;
|
|
25663
|
+
let countdownId = 0;
|
|
25664
|
+
const countdown = (0, vue.shallowRef)();
|
|
25646
25665
|
const { zIndex } = useZIndex(() => props2.show, 1);
|
|
25647
25666
|
useLock(() => props2.show, () => props2.lockScroll);
|
|
25648
25667
|
const isForbidClick = (0, vue.computed)(() => {
|
|
@@ -25650,35 +25669,57 @@ var __sfc__$15 = (0, vue.defineComponent)({
|
|
|
25650
25669
|
return type === "loading" || forbidClick;
|
|
25651
25670
|
});
|
|
25652
25671
|
const iconName = (0, vue.computed)(() => !props2.type ? "" : ICON_TYPE_DICT[props2.type]);
|
|
25672
|
+
const showProgress = (0, vue.computed)(() => props2.progress && countdown.value !== void 0 && countdown.value.duration > 0 && Number.isFinite(countdown.value.duration));
|
|
25673
|
+
const progressStyle = (0, vue.computed)(() => {
|
|
25674
|
+
if (!props2.progress || !countdown.value) return;
|
|
25675
|
+
const { duration, startedAt } = countdown.value;
|
|
25676
|
+
return {
|
|
25677
|
+
animationDuration: `${duration}ms`,
|
|
25678
|
+
animationDelay: `${-Math.max(0, Date.now() - startedAt)}ms`
|
|
25679
|
+
};
|
|
25680
|
+
});
|
|
25681
|
+
function clearCountdown() {
|
|
25682
|
+
clearTimeout(timer);
|
|
25683
|
+
timer = void 0;
|
|
25684
|
+
countdown.value = void 0;
|
|
25685
|
+
}
|
|
25653
25686
|
function updateAfterDuration() {
|
|
25654
|
-
|
|
25655
|
-
|
|
25687
|
+
clearCountdown();
|
|
25688
|
+
if (!props2.show || props2.type === "loading") return;
|
|
25689
|
+
countdown.value = {
|
|
25690
|
+
id: countdownId++,
|
|
25691
|
+
duration: props2.duration,
|
|
25692
|
+
startedAt: Date.now()
|
|
25693
|
+
};
|
|
25694
|
+
timer = setTimeout(() => {
|
|
25695
|
+
clearCountdown();
|
|
25696
|
+
call(props2["onUpdate:show"], false);
|
|
25656
25697
|
}, props2.duration);
|
|
25657
25698
|
}
|
|
25658
25699
|
(0, vue.watch)(() => props2.show, (show) => {
|
|
25659
|
-
if (show)
|
|
25660
|
-
|
|
25661
|
-
updateAfterDuration();
|
|
25662
|
-
} else {
|
|
25663
|
-
clearTimeout(timer.value);
|
|
25664
|
-
call(props2.onClose);
|
|
25665
|
-
}
|
|
25666
|
-
});
|
|
25667
|
-
(0, vue.watch)(() => props2._update, () => {
|
|
25668
|
-
clearTimeout(timer.value);
|
|
25669
|
-
updateAfterDuration();
|
|
25700
|
+
if (show) call(props2.onOpen);
|
|
25701
|
+
else call(props2.onClose);
|
|
25670
25702
|
});
|
|
25703
|
+
(0, vue.watch)([
|
|
25704
|
+
() => props2.show,
|
|
25705
|
+
() => props2.type === "loading",
|
|
25706
|
+
() => props2._update
|
|
25707
|
+
], updateAfterDuration);
|
|
25671
25708
|
onSmartMounted(() => {
|
|
25672
25709
|
if (props2.show) {
|
|
25673
25710
|
call(props2.onOpen);
|
|
25674
25711
|
updateAfterDuration();
|
|
25675
25712
|
}
|
|
25676
25713
|
});
|
|
25714
|
+
(0, vue.onUnmounted)(clearCountdown);
|
|
25677
25715
|
return {
|
|
25678
25716
|
SNACKBAR_TYPE,
|
|
25679
25717
|
zIndex,
|
|
25680
25718
|
iconName,
|
|
25681
25719
|
isForbidClick,
|
|
25720
|
+
countdown,
|
|
25721
|
+
showProgress,
|
|
25722
|
+
progressStyle,
|
|
25682
25723
|
n: n$17,
|
|
25683
25724
|
classes: classes$13,
|
|
25684
25725
|
formatElevation
|
|
@@ -25770,6 +25811,7 @@ var defaultOptionsValue = {
|
|
|
25770
25811
|
action: "",
|
|
25771
25812
|
position: "top",
|
|
25772
25813
|
duration: 3e3,
|
|
25814
|
+
progress: false,
|
|
25773
25815
|
elevation: true,
|
|
25774
25816
|
vertical: false,
|
|
25775
25817
|
contentClass: void 0,
|
|
@@ -25950,12 +25992,15 @@ function computeMargin(y, x, options) {
|
|
|
25950
25992
|
"flex-end",
|
|
25951
25993
|
"start",
|
|
25952
25994
|
"end"
|
|
25953
|
-
].includes(justify))
|
|
25954
|
-
|
|
25955
|
-
|
|
25956
|
-
else if (justify === "space-
|
|
25957
|
-
else if (
|
|
25958
|
-
|
|
25995
|
+
].includes(justify)) {
|
|
25996
|
+
if (index !== lastIndex) margin = `${half(y)} ${x} ${half(y)} 0`;
|
|
25997
|
+
else margin = `${half(y)} 0`;
|
|
25998
|
+
} else if (justify === "space-around") margin = `${half(y)} ${half(x)}`;
|
|
25999
|
+
else if (justify === "space-between") {
|
|
26000
|
+
if (index === 0) margin = `${half(y)} ${half(x)} ${half(y)} 0`;
|
|
26001
|
+
else if (index === lastIndex) margin = `${half(y)} 0 ${half(y)} ${half(x)}`;
|
|
26002
|
+
else margin = `${half(y)} ${half(x)}`;
|
|
26003
|
+
}
|
|
25959
26004
|
}
|
|
25960
26005
|
if (direction === "column" && index !== lastIndex) margin = `0 0 ${y} 0`;
|
|
25961
26006
|
return margin;
|
|
@@ -32910,7 +32955,7 @@ var _WatermarkComponent = stdin_default$108;
|
|
|
32910
32955
|
var stdin_default$102 = stdin_default$108;
|
|
32911
32956
|
//#endregion
|
|
32912
32957
|
//#region es/index.bundle.mjs
|
|
32913
|
-
var version = "3.20.
|
|
32958
|
+
var version = "3.20.8";
|
|
32914
32959
|
function install(app) {
|
|
32915
32960
|
stdin_default.install && app.use(stdin_default);
|
|
32916
32961
|
stdin_default$1.install && app.use(stdin_default$1);
|