general-basic-form 2.2.1 → 2.2.2
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/README.md +3 -0
- package/dist/index.js +532 -530
- package/dist/index.umd.cjs +6 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -51,7 +51,7 @@ function xc() {
|
|
|
51
51
|
function t(N) {
|
|
52
52
|
if (N == null) return null;
|
|
53
53
|
if (typeof N == "function")
|
|
54
|
-
return N.$$typeof ===
|
|
54
|
+
return N.$$typeof === z ? null : N.displayName || N.name || null;
|
|
55
55
|
if (typeof N == "string") return N;
|
|
56
56
|
switch (N) {
|
|
57
57
|
case v:
|
|
@@ -64,7 +64,7 @@ function xc() {
|
|
|
64
64
|
return "Suspense";
|
|
65
65
|
case C:
|
|
66
66
|
return "SuspenseList";
|
|
67
|
-
case
|
|
67
|
+
case V:
|
|
68
68
|
return "Activity";
|
|
69
69
|
}
|
|
70
70
|
if (typeof N == "object")
|
|
@@ -82,7 +82,7 @@ function xc() {
|
|
|
82
82
|
return N = N.displayName, N || (N = P.displayName || P.name || "", N = N !== "" ? "ForwardRef(" + N + ")" : "ForwardRef"), N;
|
|
83
83
|
case E:
|
|
84
84
|
return P = N.displayName || null, P !== null ? P : t(N.type) || "Memo";
|
|
85
|
-
case
|
|
85
|
+
case j:
|
|
86
86
|
P = N._payload, N = N._init;
|
|
87
87
|
try {
|
|
88
88
|
return t(N(P));
|
|
@@ -103,8 +103,8 @@ function xc() {
|
|
|
103
103
|
}
|
|
104
104
|
if (P) {
|
|
105
105
|
P = console;
|
|
106
|
-
var
|
|
107
|
-
return
|
|
106
|
+
var M = P.error, F = typeof Symbol == "function" && Symbol.toStringTag && N[Symbol.toStringTag] || N.constructor.name || "Object";
|
|
107
|
+
return M.call(
|
|
108
108
|
P,
|
|
109
109
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
110
110
|
F
|
|
@@ -113,7 +113,7 @@ function xc() {
|
|
|
113
113
|
}
|
|
114
114
|
function r(N) {
|
|
115
115
|
if (N === v) return "<>";
|
|
116
|
-
if (typeof N == "object" && N !== null && N.$$typeof ===
|
|
116
|
+
if (typeof N == "object" && N !== null && N.$$typeof === j)
|
|
117
117
|
return "<...>";
|
|
118
118
|
try {
|
|
119
119
|
var P = t(N);
|
|
@@ -123,44 +123,44 @@ function xc() {
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
function o() {
|
|
126
|
-
var N =
|
|
126
|
+
var N = k.A;
|
|
127
127
|
return N === null ? null : N.getOwner();
|
|
128
128
|
}
|
|
129
129
|
function a() {
|
|
130
130
|
return Error("react-stack-top-frame");
|
|
131
131
|
}
|
|
132
132
|
function s(N) {
|
|
133
|
-
if (
|
|
133
|
+
if (T.call(N, "key")) {
|
|
134
134
|
var P = Object.getOwnPropertyDescriptor(N, "key").get;
|
|
135
135
|
if (P && P.isReactWarning) return !1;
|
|
136
136
|
}
|
|
137
137
|
return N.key !== void 0;
|
|
138
138
|
}
|
|
139
139
|
function i(N, P) {
|
|
140
|
-
function
|
|
141
|
-
|
|
140
|
+
function M() {
|
|
141
|
+
D || (D = !0, console.error(
|
|
142
142
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
143
143
|
P
|
|
144
144
|
));
|
|
145
145
|
}
|
|
146
|
-
|
|
147
|
-
get:
|
|
146
|
+
M.isReactWarning = !0, Object.defineProperty(N, "key", {
|
|
147
|
+
get: M,
|
|
148
148
|
configurable: !0
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
151
|
function c() {
|
|
152
152
|
var N = t(this.type);
|
|
153
|
-
return
|
|
153
|
+
return L[N] || (L[N] = !0, console.error(
|
|
154
154
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
155
155
|
)), N = this.props.ref, N !== void 0 ? N : null;
|
|
156
156
|
}
|
|
157
|
-
function l(N, P,
|
|
158
|
-
var _ =
|
|
157
|
+
function l(N, P, M, F, W, Q) {
|
|
158
|
+
var _ = M.ref;
|
|
159
159
|
return N = {
|
|
160
160
|
$$typeof: y,
|
|
161
161
|
type: N,
|
|
162
162
|
key: P,
|
|
163
|
-
props:
|
|
163
|
+
props: M,
|
|
164
164
|
_owner: F
|
|
165
165
|
}, (_ !== void 0 ? _ : null) !== null ? Object.defineProperty(N, "ref", {
|
|
166
166
|
enumerable: !1,
|
|
@@ -187,11 +187,11 @@ function xc() {
|
|
|
187
187
|
value: Q
|
|
188
188
|
}), Object.freeze && (Object.freeze(N.props), Object.freeze(N)), N;
|
|
189
189
|
}
|
|
190
|
-
function f(N, P,
|
|
190
|
+
function f(N, P, M, F, W, Q) {
|
|
191
191
|
var _ = P.children;
|
|
192
192
|
if (_ !== void 0)
|
|
193
193
|
if (F)
|
|
194
|
-
if (
|
|
194
|
+
if (I(_)) {
|
|
195
195
|
for (F = 0; F < _.length; F++)
|
|
196
196
|
u(_[F]);
|
|
197
197
|
Object.freeze && Object.freeze(_);
|
|
@@ -200,7 +200,7 @@ function xc() {
|
|
|
200
200
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
201
201
|
);
|
|
202
202
|
else u(_);
|
|
203
|
-
if (
|
|
203
|
+
if (T.call(P, "key")) {
|
|
204
204
|
_ = t(N);
|
|
205
205
|
var G = Object.keys(P).filter(function(te) {
|
|
206
206
|
return te !== "key";
|
|
@@ -218,30 +218,30 @@ React keys must be passed directly to JSX without using spread:
|
|
|
218
218
|
_
|
|
219
219
|
), se[_ + F] = !0);
|
|
220
220
|
}
|
|
221
|
-
if (_ = null,
|
|
222
|
-
|
|
221
|
+
if (_ = null, M !== void 0 && (n(M), _ = "" + M), s(P) && (n(P.key), _ = "" + P.key), "key" in P) {
|
|
222
|
+
M = {};
|
|
223
223
|
for (var ee in P)
|
|
224
|
-
ee !== "key" && (
|
|
225
|
-
} else
|
|
224
|
+
ee !== "key" && (M[ee] = P[ee]);
|
|
225
|
+
} else M = P;
|
|
226
226
|
return _ && i(
|
|
227
|
-
|
|
227
|
+
M,
|
|
228
228
|
typeof N == "function" ? N.displayName || N.name || "Unknown" : N
|
|
229
229
|
), l(
|
|
230
230
|
N,
|
|
231
231
|
_,
|
|
232
|
-
|
|
232
|
+
M,
|
|
233
233
|
o(),
|
|
234
234
|
W,
|
|
235
235
|
Q
|
|
236
236
|
);
|
|
237
237
|
}
|
|
238
238
|
function u(N) {
|
|
239
|
-
d(N) ? N._store && (N._store.validated = 1) : typeof N == "object" && N !== null && N.$$typeof ===
|
|
239
|
+
d(N) ? N._store && (N._store.validated = 1) : typeof N == "object" && N !== null && N.$$typeof === j && (N._payload.status === "fulfilled" ? d(N._payload.value) && N._payload.value._store && (N._payload.value._store.validated = 1) : N._store && (N._store.validated = 1));
|
|
240
240
|
}
|
|
241
241
|
function d(N) {
|
|
242
242
|
return typeof N == "object" && N !== null && N.$$typeof === y;
|
|
243
243
|
}
|
|
244
|
-
var g = B, y = Symbol.for("react.transitional.element"), m = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), b = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), x = Symbol.for("react.consumer"), S = Symbol.for("react.context"), R = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), C = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"),
|
|
244
|
+
var g = B, y = Symbol.for("react.transitional.element"), m = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), b = Symbol.for("react.strict_mode"), w = Symbol.for("react.profiler"), x = Symbol.for("react.consumer"), S = Symbol.for("react.context"), R = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), C = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), j = Symbol.for("react.lazy"), V = Symbol.for("react.activity"), z = Symbol.for("react.client.reference"), k = g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, T = Object.prototype.hasOwnProperty, I = Array.isArray, $ = console.createTask ? console.createTask : function() {
|
|
245
245
|
return null;
|
|
246
246
|
};
|
|
247
247
|
g = {
|
|
@@ -249,29 +249,29 @@ React keys must be passed directly to JSX without using spread:
|
|
|
249
249
|
return N();
|
|
250
250
|
}
|
|
251
251
|
};
|
|
252
|
-
var
|
|
252
|
+
var D, L = {}, A = g.react_stack_bottom_frame.bind(
|
|
253
253
|
g,
|
|
254
254
|
a
|
|
255
|
-
)(), Z =
|
|
256
|
-
Jt.Fragment = v, Jt.jsx = function(N, P,
|
|
257
|
-
var F = 1e4 >
|
|
255
|
+
)(), Z = $(r(a)), se = {};
|
|
256
|
+
Jt.Fragment = v, Jt.jsx = function(N, P, M) {
|
|
257
|
+
var F = 1e4 > k.recentlyCreatedOwnerStacks++;
|
|
258
258
|
return f(
|
|
259
259
|
N,
|
|
260
260
|
P,
|
|
261
|
-
|
|
261
|
+
M,
|
|
262
262
|
!1,
|
|
263
263
|
F ? Error("react-stack-top-frame") : A,
|
|
264
|
-
F ?
|
|
264
|
+
F ? $(r(N)) : Z
|
|
265
265
|
);
|
|
266
|
-
}, Jt.jsxs = function(N, P,
|
|
267
|
-
var F = 1e4 >
|
|
266
|
+
}, Jt.jsxs = function(N, P, M) {
|
|
267
|
+
var F = 1e4 > k.recentlyCreatedOwnerStacks++;
|
|
268
268
|
return f(
|
|
269
269
|
N,
|
|
270
270
|
P,
|
|
271
|
-
|
|
271
|
+
M,
|
|
272
272
|
!0,
|
|
273
273
|
F ? Error("react-stack-top-frame") : A,
|
|
274
|
-
F ?
|
|
274
|
+
F ? $(r(N)) : Z
|
|
275
275
|
);
|
|
276
276
|
};
|
|
277
277
|
})()), Jt;
|
|
@@ -1190,15 +1190,15 @@ const me = (t) => {
|
|
|
1190
1190
|
"bottom-left",
|
|
1191
1191
|
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
1192
1192
|
"left-bottom"
|
|
1193
|
-
], R = () => [...S(), U, H], O = () => ["auto", "hidden", "clip", "visible", "scroll"], C = () => ["auto", "contain", "none"], E = () => [U, H, c],
|
|
1193
|
+
], R = () => [...S(), U, H], O = () => ["auto", "hidden", "clip", "visible", "scroll"], C = () => ["auto", "contain", "none"], E = () => [U, H, c], j = () => [Dt, "full", "auto", ...E()], V = () => [Je, "none", "subgrid", U, H], z = () => ["auto", {
|
|
1194
1194
|
span: ["full", Je, U, H]
|
|
1195
|
-
}, Je, U, H],
|
|
1195
|
+
}, Je, U, H], k = () => [Je, "auto", U, H], T = () => ["auto", "min", "max", "fr", U, H], I = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], $ = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], D = () => ["auto", ...E()], L = () => [Dt, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...E()], A = () => [t, U, H], Z = () => [...S(), na, ta, {
|
|
1196
1196
|
position: [U, H]
|
|
1197
1197
|
}], se = () => ["no-repeat", {
|
|
1198
1198
|
repeat: ["", "x", "y", "space", "round"]
|
|
1199
1199
|
}], N = () => ["auto", "cover", "contain", hu, pu, {
|
|
1200
1200
|
size: [U, H]
|
|
1201
|
-
}], P = () => [xr, Zt, mt],
|
|
1201
|
+
}], P = () => [xr, Zt, mt], M = () => [
|
|
1202
1202
|
// Deprecated since Tailwind CSS v4.0.0
|
|
1203
1203
|
"",
|
|
1204
1204
|
"none",
|
|
@@ -1391,63 +1391,63 @@ const me = (t) => {
|
|
|
1391
1391
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1392
1392
|
*/
|
|
1393
1393
|
inset: [{
|
|
1394
|
-
inset:
|
|
1394
|
+
inset: j()
|
|
1395
1395
|
}],
|
|
1396
1396
|
/**
|
|
1397
1397
|
* Right / Left
|
|
1398
1398
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1399
1399
|
*/
|
|
1400
1400
|
"inset-x": [{
|
|
1401
|
-
"inset-x":
|
|
1401
|
+
"inset-x": j()
|
|
1402
1402
|
}],
|
|
1403
1403
|
/**
|
|
1404
1404
|
* Top / Bottom
|
|
1405
1405
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1406
1406
|
*/
|
|
1407
1407
|
"inset-y": [{
|
|
1408
|
-
"inset-y":
|
|
1408
|
+
"inset-y": j()
|
|
1409
1409
|
}],
|
|
1410
1410
|
/**
|
|
1411
1411
|
* Start
|
|
1412
1412
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1413
1413
|
*/
|
|
1414
1414
|
start: [{
|
|
1415
|
-
start:
|
|
1415
|
+
start: j()
|
|
1416
1416
|
}],
|
|
1417
1417
|
/**
|
|
1418
1418
|
* End
|
|
1419
1419
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1420
1420
|
*/
|
|
1421
1421
|
end: [{
|
|
1422
|
-
end:
|
|
1422
|
+
end: j()
|
|
1423
1423
|
}],
|
|
1424
1424
|
/**
|
|
1425
1425
|
* Top
|
|
1426
1426
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1427
1427
|
*/
|
|
1428
1428
|
top: [{
|
|
1429
|
-
top:
|
|
1429
|
+
top: j()
|
|
1430
1430
|
}],
|
|
1431
1431
|
/**
|
|
1432
1432
|
* Right
|
|
1433
1433
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1434
1434
|
*/
|
|
1435
1435
|
right: [{
|
|
1436
|
-
right:
|
|
1436
|
+
right: j()
|
|
1437
1437
|
}],
|
|
1438
1438
|
/**
|
|
1439
1439
|
* Bottom
|
|
1440
1440
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1441
1441
|
*/
|
|
1442
1442
|
bottom: [{
|
|
1443
|
-
bottom:
|
|
1443
|
+
bottom: j()
|
|
1444
1444
|
}],
|
|
1445
1445
|
/**
|
|
1446
1446
|
* Left
|
|
1447
1447
|
* @see https://tailwindcss.com/docs/top-right-bottom-left
|
|
1448
1448
|
*/
|
|
1449
1449
|
left: [{
|
|
1450
|
-
left:
|
|
1450
|
+
left: j()
|
|
1451
1451
|
}],
|
|
1452
1452
|
/**
|
|
1453
1453
|
* Visibility
|
|
@@ -1518,56 +1518,56 @@ const me = (t) => {
|
|
|
1518
1518
|
* @see https://tailwindcss.com/docs/grid-template-columns
|
|
1519
1519
|
*/
|
|
1520
1520
|
"grid-cols": [{
|
|
1521
|
-
"grid-cols":
|
|
1521
|
+
"grid-cols": V()
|
|
1522
1522
|
}],
|
|
1523
1523
|
/**
|
|
1524
1524
|
* Grid Column Start / End
|
|
1525
1525
|
* @see https://tailwindcss.com/docs/grid-column
|
|
1526
1526
|
*/
|
|
1527
1527
|
"col-start-end": [{
|
|
1528
|
-
col:
|
|
1528
|
+
col: z()
|
|
1529
1529
|
}],
|
|
1530
1530
|
/**
|
|
1531
1531
|
* Grid Column Start
|
|
1532
1532
|
* @see https://tailwindcss.com/docs/grid-column
|
|
1533
1533
|
*/
|
|
1534
1534
|
"col-start": [{
|
|
1535
|
-
"col-start":
|
|
1535
|
+
"col-start": k()
|
|
1536
1536
|
}],
|
|
1537
1537
|
/**
|
|
1538
1538
|
* Grid Column End
|
|
1539
1539
|
* @see https://tailwindcss.com/docs/grid-column
|
|
1540
1540
|
*/
|
|
1541
1541
|
"col-end": [{
|
|
1542
|
-
"col-end":
|
|
1542
|
+
"col-end": k()
|
|
1543
1543
|
}],
|
|
1544
1544
|
/**
|
|
1545
1545
|
* Grid Template Rows
|
|
1546
1546
|
* @see https://tailwindcss.com/docs/grid-template-rows
|
|
1547
1547
|
*/
|
|
1548
1548
|
"grid-rows": [{
|
|
1549
|
-
"grid-rows":
|
|
1549
|
+
"grid-rows": V()
|
|
1550
1550
|
}],
|
|
1551
1551
|
/**
|
|
1552
1552
|
* Grid Row Start / End
|
|
1553
1553
|
* @see https://tailwindcss.com/docs/grid-row
|
|
1554
1554
|
*/
|
|
1555
1555
|
"row-start-end": [{
|
|
1556
|
-
row:
|
|
1556
|
+
row: z()
|
|
1557
1557
|
}],
|
|
1558
1558
|
/**
|
|
1559
1559
|
* Grid Row Start
|
|
1560
1560
|
* @see https://tailwindcss.com/docs/grid-row
|
|
1561
1561
|
*/
|
|
1562
1562
|
"row-start": [{
|
|
1563
|
-
"row-start":
|
|
1563
|
+
"row-start": k()
|
|
1564
1564
|
}],
|
|
1565
1565
|
/**
|
|
1566
1566
|
* Grid Row End
|
|
1567
1567
|
* @see https://tailwindcss.com/docs/grid-row
|
|
1568
1568
|
*/
|
|
1569
1569
|
"row-end": [{
|
|
1570
|
-
"row-end":
|
|
1570
|
+
"row-end": k()
|
|
1571
1571
|
}],
|
|
1572
1572
|
/**
|
|
1573
1573
|
* Grid Auto Flow
|
|
@@ -1581,14 +1581,14 @@ const me = (t) => {
|
|
|
1581
1581
|
* @see https://tailwindcss.com/docs/grid-auto-columns
|
|
1582
1582
|
*/
|
|
1583
1583
|
"auto-cols": [{
|
|
1584
|
-
"auto-cols":
|
|
1584
|
+
"auto-cols": T()
|
|
1585
1585
|
}],
|
|
1586
1586
|
/**
|
|
1587
1587
|
* Grid Auto Rows
|
|
1588
1588
|
* @see https://tailwindcss.com/docs/grid-auto-rows
|
|
1589
1589
|
*/
|
|
1590
1590
|
"auto-rows": [{
|
|
1591
|
-
"auto-rows":
|
|
1591
|
+
"auto-rows": T()
|
|
1592
1592
|
}],
|
|
1593
1593
|
/**
|
|
1594
1594
|
* Gap
|
|
@@ -1616,35 +1616,35 @@ const me = (t) => {
|
|
|
1616
1616
|
* @see https://tailwindcss.com/docs/justify-content
|
|
1617
1617
|
*/
|
|
1618
1618
|
"justify-content": [{
|
|
1619
|
-
justify: [
|
|
1619
|
+
justify: [...I(), "normal"]
|
|
1620
1620
|
}],
|
|
1621
1621
|
/**
|
|
1622
1622
|
* Justify Items
|
|
1623
1623
|
* @see https://tailwindcss.com/docs/justify-items
|
|
1624
1624
|
*/
|
|
1625
1625
|
"justify-items": [{
|
|
1626
|
-
"justify-items": [
|
|
1626
|
+
"justify-items": [...$(), "normal"]
|
|
1627
1627
|
}],
|
|
1628
1628
|
/**
|
|
1629
1629
|
* Justify Self
|
|
1630
1630
|
* @see https://tailwindcss.com/docs/justify-self
|
|
1631
1631
|
*/
|
|
1632
1632
|
"justify-self": [{
|
|
1633
|
-
"justify-self": ["auto",
|
|
1633
|
+
"justify-self": ["auto", ...$()]
|
|
1634
1634
|
}],
|
|
1635
1635
|
/**
|
|
1636
1636
|
* Align Content
|
|
1637
1637
|
* @see https://tailwindcss.com/docs/align-content
|
|
1638
1638
|
*/
|
|
1639
1639
|
"align-content": [{
|
|
1640
|
-
content: ["normal",
|
|
1640
|
+
content: ["normal", ...I()]
|
|
1641
1641
|
}],
|
|
1642
1642
|
/**
|
|
1643
1643
|
* Align Items
|
|
1644
1644
|
* @see https://tailwindcss.com/docs/align-items
|
|
1645
1645
|
*/
|
|
1646
1646
|
"align-items": [{
|
|
1647
|
-
items: [
|
|
1647
|
+
items: [...$(), {
|
|
1648
1648
|
baseline: ["", "last"]
|
|
1649
1649
|
}]
|
|
1650
1650
|
}],
|
|
@@ -1653,7 +1653,7 @@ const me = (t) => {
|
|
|
1653
1653
|
* @see https://tailwindcss.com/docs/align-self
|
|
1654
1654
|
*/
|
|
1655
1655
|
"align-self": [{
|
|
1656
|
-
self: ["auto",
|
|
1656
|
+
self: ["auto", ...$(), {
|
|
1657
1657
|
baseline: ["", "last"]
|
|
1658
1658
|
}]
|
|
1659
1659
|
}],
|
|
@@ -1662,21 +1662,21 @@ const me = (t) => {
|
|
|
1662
1662
|
* @see https://tailwindcss.com/docs/place-content
|
|
1663
1663
|
*/
|
|
1664
1664
|
"place-content": [{
|
|
1665
|
-
"place-content":
|
|
1665
|
+
"place-content": I()
|
|
1666
1666
|
}],
|
|
1667
1667
|
/**
|
|
1668
1668
|
* Place Items
|
|
1669
1669
|
* @see https://tailwindcss.com/docs/place-items
|
|
1670
1670
|
*/
|
|
1671
1671
|
"place-items": [{
|
|
1672
|
-
"place-items": [
|
|
1672
|
+
"place-items": [...$(), "baseline"]
|
|
1673
1673
|
}],
|
|
1674
1674
|
/**
|
|
1675
1675
|
* Place Self
|
|
1676
1676
|
* @see https://tailwindcss.com/docs/place-self
|
|
1677
1677
|
*/
|
|
1678
1678
|
"place-self": [{
|
|
1679
|
-
"place-self": ["auto",
|
|
1679
|
+
"place-self": ["auto", ...$()]
|
|
1680
1680
|
}],
|
|
1681
1681
|
// Spacing
|
|
1682
1682
|
/**
|
|
@@ -1747,63 +1747,63 @@ const me = (t) => {
|
|
|
1747
1747
|
* @see https://tailwindcss.com/docs/margin
|
|
1748
1748
|
*/
|
|
1749
1749
|
m: [{
|
|
1750
|
-
m:
|
|
1750
|
+
m: D()
|
|
1751
1751
|
}],
|
|
1752
1752
|
/**
|
|
1753
1753
|
* Margin X
|
|
1754
1754
|
* @see https://tailwindcss.com/docs/margin
|
|
1755
1755
|
*/
|
|
1756
1756
|
mx: [{
|
|
1757
|
-
mx:
|
|
1757
|
+
mx: D()
|
|
1758
1758
|
}],
|
|
1759
1759
|
/**
|
|
1760
1760
|
* Margin Y
|
|
1761
1761
|
* @see https://tailwindcss.com/docs/margin
|
|
1762
1762
|
*/
|
|
1763
1763
|
my: [{
|
|
1764
|
-
my:
|
|
1764
|
+
my: D()
|
|
1765
1765
|
}],
|
|
1766
1766
|
/**
|
|
1767
1767
|
* Margin Start
|
|
1768
1768
|
* @see https://tailwindcss.com/docs/margin
|
|
1769
1769
|
*/
|
|
1770
1770
|
ms: [{
|
|
1771
|
-
ms:
|
|
1771
|
+
ms: D()
|
|
1772
1772
|
}],
|
|
1773
1773
|
/**
|
|
1774
1774
|
* Margin End
|
|
1775
1775
|
* @see https://tailwindcss.com/docs/margin
|
|
1776
1776
|
*/
|
|
1777
1777
|
me: [{
|
|
1778
|
-
me:
|
|
1778
|
+
me: D()
|
|
1779
1779
|
}],
|
|
1780
1780
|
/**
|
|
1781
1781
|
* Margin Top
|
|
1782
1782
|
* @see https://tailwindcss.com/docs/margin
|
|
1783
1783
|
*/
|
|
1784
1784
|
mt: [{
|
|
1785
|
-
mt:
|
|
1785
|
+
mt: D()
|
|
1786
1786
|
}],
|
|
1787
1787
|
/**
|
|
1788
1788
|
* Margin Right
|
|
1789
1789
|
* @see https://tailwindcss.com/docs/margin
|
|
1790
1790
|
*/
|
|
1791
1791
|
mr: [{
|
|
1792
|
-
mr:
|
|
1792
|
+
mr: D()
|
|
1793
1793
|
}],
|
|
1794
1794
|
/**
|
|
1795
1795
|
* Margin Bottom
|
|
1796
1796
|
* @see https://tailwindcss.com/docs/margin
|
|
1797
1797
|
*/
|
|
1798
1798
|
mb: [{
|
|
1799
|
-
mb:
|
|
1799
|
+
mb: D()
|
|
1800
1800
|
}],
|
|
1801
1801
|
/**
|
|
1802
1802
|
* Margin Left
|
|
1803
1803
|
* @see https://tailwindcss.com/docs/margin
|
|
1804
1804
|
*/
|
|
1805
1805
|
ml: [{
|
|
1806
|
-
ml:
|
|
1806
|
+
ml: D()
|
|
1807
1807
|
}],
|
|
1808
1808
|
/**
|
|
1809
1809
|
* Space Between X
|
|
@@ -1837,14 +1837,14 @@ const me = (t) => {
|
|
|
1837
1837
|
* @see https://tailwindcss.com/docs/width#setting-both-width-and-height
|
|
1838
1838
|
*/
|
|
1839
1839
|
size: [{
|
|
1840
|
-
size:
|
|
1840
|
+
size: L()
|
|
1841
1841
|
}],
|
|
1842
1842
|
/**
|
|
1843
1843
|
* Width
|
|
1844
1844
|
* @see https://tailwindcss.com/docs/width
|
|
1845
1845
|
*/
|
|
1846
1846
|
w: [{
|
|
1847
|
-
w: [i, "screen", ...
|
|
1847
|
+
w: [i, "screen", ...L()]
|
|
1848
1848
|
}],
|
|
1849
1849
|
/**
|
|
1850
1850
|
* Min-Width
|
|
@@ -1856,7 +1856,7 @@ const me = (t) => {
|
|
|
1856
1856
|
"screen",
|
|
1857
1857
|
/** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
|
|
1858
1858
|
"none",
|
|
1859
|
-
...
|
|
1859
|
+
...L()
|
|
1860
1860
|
]
|
|
1861
1861
|
}],
|
|
1862
1862
|
/**
|
|
@@ -1874,7 +1874,7 @@ const me = (t) => {
|
|
|
1874
1874
|
{
|
|
1875
1875
|
screen: [s]
|
|
1876
1876
|
},
|
|
1877
|
-
...
|
|
1877
|
+
...L()
|
|
1878
1878
|
]
|
|
1879
1879
|
}],
|
|
1880
1880
|
/**
|
|
@@ -1882,21 +1882,21 @@ const me = (t) => {
|
|
|
1882
1882
|
* @see https://tailwindcss.com/docs/height
|
|
1883
1883
|
*/
|
|
1884
1884
|
h: [{
|
|
1885
|
-
h: ["screen", "lh", ...
|
|
1885
|
+
h: ["screen", "lh", ...L()]
|
|
1886
1886
|
}],
|
|
1887
1887
|
/**
|
|
1888
1888
|
* Min-Height
|
|
1889
1889
|
* @see https://tailwindcss.com/docs/min-height
|
|
1890
1890
|
*/
|
|
1891
1891
|
"min-h": [{
|
|
1892
|
-
"min-h": ["screen", "lh", "none", ...
|
|
1892
|
+
"min-h": ["screen", "lh", "none", ...L()]
|
|
1893
1893
|
}],
|
|
1894
1894
|
/**
|
|
1895
1895
|
* Max-Height
|
|
1896
1896
|
* @see https://tailwindcss.com/docs/max-height
|
|
1897
1897
|
*/
|
|
1898
1898
|
"max-h": [{
|
|
1899
|
-
"max-h": ["screen", "lh", ...
|
|
1899
|
+
"max-h": ["screen", "lh", ...L()]
|
|
1900
1900
|
}],
|
|
1901
1901
|
// ------------------
|
|
1902
1902
|
// --- Typography ---
|
|
@@ -2251,105 +2251,105 @@ const me = (t) => {
|
|
|
2251
2251
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2252
2252
|
*/
|
|
2253
2253
|
rounded: [{
|
|
2254
|
-
rounded:
|
|
2254
|
+
rounded: M()
|
|
2255
2255
|
}],
|
|
2256
2256
|
/**
|
|
2257
2257
|
* Border Radius Start
|
|
2258
2258
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2259
2259
|
*/
|
|
2260
2260
|
"rounded-s": [{
|
|
2261
|
-
"rounded-s":
|
|
2261
|
+
"rounded-s": M()
|
|
2262
2262
|
}],
|
|
2263
2263
|
/**
|
|
2264
2264
|
* Border Radius End
|
|
2265
2265
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2266
2266
|
*/
|
|
2267
2267
|
"rounded-e": [{
|
|
2268
|
-
"rounded-e":
|
|
2268
|
+
"rounded-e": M()
|
|
2269
2269
|
}],
|
|
2270
2270
|
/**
|
|
2271
2271
|
* Border Radius Top
|
|
2272
2272
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2273
2273
|
*/
|
|
2274
2274
|
"rounded-t": [{
|
|
2275
|
-
"rounded-t":
|
|
2275
|
+
"rounded-t": M()
|
|
2276
2276
|
}],
|
|
2277
2277
|
/**
|
|
2278
2278
|
* Border Radius Right
|
|
2279
2279
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2280
2280
|
*/
|
|
2281
2281
|
"rounded-r": [{
|
|
2282
|
-
"rounded-r":
|
|
2282
|
+
"rounded-r": M()
|
|
2283
2283
|
}],
|
|
2284
2284
|
/**
|
|
2285
2285
|
* Border Radius Bottom
|
|
2286
2286
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2287
2287
|
*/
|
|
2288
2288
|
"rounded-b": [{
|
|
2289
|
-
"rounded-b":
|
|
2289
|
+
"rounded-b": M()
|
|
2290
2290
|
}],
|
|
2291
2291
|
/**
|
|
2292
2292
|
* Border Radius Left
|
|
2293
2293
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2294
2294
|
*/
|
|
2295
2295
|
"rounded-l": [{
|
|
2296
|
-
"rounded-l":
|
|
2296
|
+
"rounded-l": M()
|
|
2297
2297
|
}],
|
|
2298
2298
|
/**
|
|
2299
2299
|
* Border Radius Start Start
|
|
2300
2300
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2301
2301
|
*/
|
|
2302
2302
|
"rounded-ss": [{
|
|
2303
|
-
"rounded-ss":
|
|
2303
|
+
"rounded-ss": M()
|
|
2304
2304
|
}],
|
|
2305
2305
|
/**
|
|
2306
2306
|
* Border Radius Start End
|
|
2307
2307
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2308
2308
|
*/
|
|
2309
2309
|
"rounded-se": [{
|
|
2310
|
-
"rounded-se":
|
|
2310
|
+
"rounded-se": M()
|
|
2311
2311
|
}],
|
|
2312
2312
|
/**
|
|
2313
2313
|
* Border Radius End End
|
|
2314
2314
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2315
2315
|
*/
|
|
2316
2316
|
"rounded-ee": [{
|
|
2317
|
-
"rounded-ee":
|
|
2317
|
+
"rounded-ee": M()
|
|
2318
2318
|
}],
|
|
2319
2319
|
/**
|
|
2320
2320
|
* Border Radius End Start
|
|
2321
2321
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2322
2322
|
*/
|
|
2323
2323
|
"rounded-es": [{
|
|
2324
|
-
"rounded-es":
|
|
2324
|
+
"rounded-es": M()
|
|
2325
2325
|
}],
|
|
2326
2326
|
/**
|
|
2327
2327
|
* Border Radius Top Left
|
|
2328
2328
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2329
2329
|
*/
|
|
2330
2330
|
"rounded-tl": [{
|
|
2331
|
-
"rounded-tl":
|
|
2331
|
+
"rounded-tl": M()
|
|
2332
2332
|
}],
|
|
2333
2333
|
/**
|
|
2334
2334
|
* Border Radius Top Right
|
|
2335
2335
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2336
2336
|
*/
|
|
2337
2337
|
"rounded-tr": [{
|
|
2338
|
-
"rounded-tr":
|
|
2338
|
+
"rounded-tr": M()
|
|
2339
2339
|
}],
|
|
2340
2340
|
/**
|
|
2341
2341
|
* Border Radius Bottom Right
|
|
2342
2342
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2343
2343
|
*/
|
|
2344
2344
|
"rounded-br": [{
|
|
2345
|
-
"rounded-br":
|
|
2345
|
+
"rounded-br": M()
|
|
2346
2346
|
}],
|
|
2347
2347
|
/**
|
|
2348
2348
|
* Border Radius Bottom Left
|
|
2349
2349
|
* @see https://tailwindcss.com/docs/border-radius
|
|
2350
2350
|
*/
|
|
2351
2351
|
"rounded-bl": [{
|
|
2352
|
-
"rounded-bl":
|
|
2352
|
+
"rounded-bl": M()
|
|
2353
2353
|
}],
|
|
2354
2354
|
/**
|
|
2355
2355
|
* Border Width
|
|
@@ -3802,18 +3802,18 @@ const cs = (t) => {
|
|
|
3802
3802
|
} = S;
|
|
3803
3803
|
return /* @__PURE__ */ h.jsxs("div", { children: [
|
|
3804
3804
|
C && /* @__PURE__ */ h.jsx(l, {}),
|
|
3805
|
-
/* @__PURE__ */ h.jsx(a, { heading: R, children: O.map((
|
|
3805
|
+
/* @__PURE__ */ h.jsx(a, { heading: R, children: O.map((j) => {
|
|
3806
3806
|
const {
|
|
3807
|
-
label:
|
|
3808
|
-
value:
|
|
3809
|
-
onSelect:
|
|
3807
|
+
label: V,
|
|
3808
|
+
value: z,
|
|
3809
|
+
onSelect: k = () => {
|
|
3810
3810
|
},
|
|
3811
|
-
shortcut:
|
|
3812
|
-
} =
|
|
3813
|
-
return /* @__PURE__ */ h.jsxs(i, { value: `${
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
] },
|
|
3811
|
+
shortcut: T
|
|
3812
|
+
} = j;
|
|
3813
|
+
return /* @__PURE__ */ h.jsxs(i, { value: `${z}`, onSelect: k, children: [
|
|
3814
|
+
V,
|
|
3815
|
+
T && /* @__PURE__ */ h.jsx(f, { children: T })
|
|
3816
|
+
] }, z);
|
|
3817
3817
|
}) })
|
|
3818
3818
|
] }, E);
|
|
3819
3819
|
})
|
|
@@ -3974,11 +3974,11 @@ var Ou = "DismissableLayer", Kr = "dismissableLayer.update", _u = "dismissableLa
|
|
|
3974
3974
|
onDismiss: i,
|
|
3975
3975
|
...c
|
|
3976
3976
|
} = t, l = p.useContext(fs), [f, u] = p.useState(null), d = f?.ownerDocument ?? globalThis?.document, [, g] = p.useState({}), y = ue(e, (C) => u(C)), m = Array.from(l.layers), [v] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), b = m.indexOf(v), w = f ? m.indexOf(f) : -1, x = l.layersWithOutsidePointerEventsDisabled.size > 0, S = w >= b, R = Mu((C) => {
|
|
3977
|
-
const E = C.target,
|
|
3978
|
-
!S ||
|
|
3977
|
+
const E = C.target, j = [...l.branches].some((V) => V.contains(E));
|
|
3978
|
+
!S || j || (o?.(C), s?.(C), C.defaultPrevented || i?.());
|
|
3979
3979
|
}, d), O = ju((C) => {
|
|
3980
3980
|
const E = C.target;
|
|
3981
|
-
[...l.branches].some((
|
|
3981
|
+
[...l.branches].some((V) => V.contains(E)) || (a?.(C), s?.(C), C.defaultPrevented || i?.());
|
|
3982
3982
|
}, d);
|
|
3983
3983
|
return Nu((C) => {
|
|
3984
3984
|
w === l.layers.size - 1 && (r?.(C), !C.defaultPrevented && i && (C.preventDefault(), i()));
|
|
@@ -4697,8 +4697,8 @@ function Td(t) {
|
|
|
4697
4697
|
return !1;
|
|
4698
4698
|
if (!r.current && "changedTouches" in m && (x || S) && (r.current = R), !R)
|
|
4699
4699
|
return !0;
|
|
4700
|
-
var
|
|
4701
|
-
return Cd(
|
|
4700
|
+
var j = r.current || R;
|
|
4701
|
+
return Cd(j, v, m, j === "h" ? x : S);
|
|
4702
4702
|
}, []), c = p.useCallback(function(m) {
|
|
4703
4703
|
var v = m;
|
|
4704
4704
|
if (!(!Mt.length || Mt[Mt.length - 1] !== a)) {
|
|
@@ -5373,15 +5373,15 @@ function ff({ activeSnapPointProp: t, setActiveSnapPointProp: e, snapPoints: n,
|
|
|
5373
5373
|
height: 0
|
|
5374
5374
|
};
|
|
5375
5375
|
var E;
|
|
5376
|
-
return (E = n?.map((
|
|
5377
|
-
const
|
|
5378
|
-
let
|
|
5379
|
-
if (
|
|
5380
|
-
const
|
|
5381
|
-
return d ? i === "bottom" ? C.height -
|
|
5376
|
+
return (E = n?.map((j) => {
|
|
5377
|
+
const V = typeof j == "string";
|
|
5378
|
+
let z = 0;
|
|
5379
|
+
if (V && (z = parseInt(j, 10)), pe(i)) {
|
|
5380
|
+
const T = V ? z : d ? j * C.height : 0;
|
|
5381
|
+
return d ? i === "bottom" ? C.height - T : -C.height + T : T;
|
|
5382
5382
|
}
|
|
5383
|
-
const
|
|
5384
|
-
return d ? i === "right" ? C.width -
|
|
5383
|
+
const k = V ? z : d ? j * C.width : 0;
|
|
5384
|
+
return d ? i === "right" ? C.width - k : -C.width + k : k;
|
|
5385
5385
|
})) != null ? E : [];
|
|
5386
5386
|
}, [
|
|
5387
5387
|
n,
|
|
@@ -5392,17 +5392,17 @@ function ff({ activeSnapPointProp: t, setActiveSnapPointProp: e, snapPoints: n,
|
|
|
5392
5392
|
m
|
|
5393
5393
|
]), x = B.useCallback((C) => {
|
|
5394
5394
|
var E;
|
|
5395
|
-
const
|
|
5396
|
-
s(
|
|
5395
|
+
const j = (E = b?.findIndex((V) => V === C)) != null ? E : null;
|
|
5396
|
+
s(j), ge(r.current, {
|
|
5397
5397
|
transition: `transform ${de.DURATION}s cubic-bezier(${de.EASE.join(",")})`,
|
|
5398
5398
|
transform: pe(i) ? `translate3d(0, ${C}px, 0)` : `translate3d(${C}px, 0, 0)`
|
|
5399
|
-
}), b &&
|
|
5399
|
+
}), b && j !== b.length - 1 && a !== void 0 && j !== a && j < a ? ge(o.current, {
|
|
5400
5400
|
transition: `opacity ${de.DURATION}s cubic-bezier(${de.EASE.join(",")})`,
|
|
5401
5401
|
opacity: "0"
|
|
5402
5402
|
}) : ge(o.current, {
|
|
5403
5403
|
transition: `opacity ${de.DURATION}s cubic-bezier(${de.EASE.join(",")})`,
|
|
5404
5404
|
opacity: "1"
|
|
5405
|
-
}), u(n?.[Math.max(
|
|
5405
|
+
}), u(n?.[Math.max(j, 0)]);
|
|
5406
5406
|
}, [
|
|
5407
5407
|
r.current,
|
|
5408
5408
|
n,
|
|
@@ -5414,7 +5414,7 @@ function ff({ activeSnapPointProp: t, setActiveSnapPointProp: e, snapPoints: n,
|
|
|
5414
5414
|
B.useEffect(() => {
|
|
5415
5415
|
if (f || t) {
|
|
5416
5416
|
var C;
|
|
5417
|
-
const E = (C = n?.findIndex((
|
|
5417
|
+
const E = (C = n?.findIndex((j) => j === t || j === f)) != null ? C : -1;
|
|
5418
5418
|
b && E !== -1 && typeof b[E] == "number" && x(b[E]);
|
|
5419
5419
|
}
|
|
5420
5420
|
}, [
|
|
@@ -5424,31 +5424,31 @@ function ff({ activeSnapPointProp: t, setActiveSnapPointProp: e, snapPoints: n,
|
|
|
5424
5424
|
b,
|
|
5425
5425
|
x
|
|
5426
5426
|
]);
|
|
5427
|
-
function S({ draggedDistance: C, closeDrawer: E, velocity:
|
|
5427
|
+
function S({ draggedDistance: C, closeDrawer: E, velocity: j, dismissible: V }) {
|
|
5428
5428
|
if (a === void 0) return;
|
|
5429
|
-
const
|
|
5430
|
-
if (
|
|
5429
|
+
const z = i === "bottom" || i === "right" ? (w ?? 0) - C : (w ?? 0) + C, k = m === a - 1, T = m === 0, I = C > 0;
|
|
5430
|
+
if (k && ge(o.current, {
|
|
5431
5431
|
transition: `opacity ${de.DURATION}s cubic-bezier(${de.EASE.join(",")})`
|
|
5432
|
-
}), !l &&
|
|
5433
|
-
|
|
5432
|
+
}), !l && j > 2 && !I) {
|
|
5433
|
+
V ? E() : x(b[0]);
|
|
5434
5434
|
return;
|
|
5435
5435
|
}
|
|
5436
|
-
if (!l &&
|
|
5436
|
+
if (!l && j > 2 && I && b && n) {
|
|
5437
5437
|
x(b[n.length - 1]);
|
|
5438
5438
|
return;
|
|
5439
5439
|
}
|
|
5440
|
-
const
|
|
5441
|
-
if (
|
|
5442
|
-
const
|
|
5443
|
-
if (
|
|
5440
|
+
const $ = b?.reduce((L, A) => typeof L != "number" || typeof A != "number" ? L : Math.abs(A - z) < Math.abs(L - z) ? A : L), D = pe(i) ? window.innerHeight : window.innerWidth;
|
|
5441
|
+
if (j > Gs && Math.abs(C) < D * 0.4) {
|
|
5442
|
+
const L = I ? 1 : -1;
|
|
5443
|
+
if (L > 0 && y && n) {
|
|
5444
5444
|
x(b[n.length - 1]);
|
|
5445
5445
|
return;
|
|
5446
5446
|
}
|
|
5447
|
-
if (
|
|
5448
|
-
x(b[m +
|
|
5447
|
+
if (T && L < 0 && V && E(), m === null) return;
|
|
5448
|
+
x(b[m + L]);
|
|
5449
5449
|
return;
|
|
5450
5450
|
}
|
|
5451
|
-
x(
|
|
5451
|
+
x($);
|
|
5452
5452
|
}
|
|
5453
5453
|
function R({ draggedDistance: C }) {
|
|
5454
5454
|
if (w === null) return;
|
|
@@ -5459,13 +5459,13 @@ function ff({ activeSnapPointProp: t, setActiveSnapPointProp: e, snapPoints: n,
|
|
|
5459
5459
|
}
|
|
5460
5460
|
function O(C, E) {
|
|
5461
5461
|
if (!n || typeof m != "number" || !b || a === void 0) return null;
|
|
5462
|
-
const
|
|
5462
|
+
const j = m === a - 1;
|
|
5463
5463
|
if (m >= a && E)
|
|
5464
5464
|
return 0;
|
|
5465
|
-
if (
|
|
5466
|
-
if (!v && !
|
|
5467
|
-
const
|
|
5468
|
-
return
|
|
5465
|
+
if (j && !E) return 1;
|
|
5466
|
+
if (!v && !j) return null;
|
|
5467
|
+
const z = j ? m + 1 : m - 1, k = j ? b[z] - b[z - 1] : b[z + 1] - b[z], T = C / Math.abs(k);
|
|
5468
|
+
return j ? 1 - T : T;
|
|
5469
5469
|
}
|
|
5470
5470
|
return {
|
|
5471
5471
|
isLastSnapPoint: y,
|
|
@@ -5589,19 +5589,19 @@ function gf({ isOpen: t, modal: e, nested: n, hasBeenOpened: r, preventScrollRes
|
|
|
5589
5589
|
restorePositionSetting: f
|
|
5590
5590
|
};
|
|
5591
5591
|
}
|
|
5592
|
-
function hf({ open: t, onOpenChange: e, children: n, onDrag: r, onRelease: o, snapPoints: a, shouldScaleBackground: s = !1, setBackgroundColorOnScale: i = !0, closeThreshold: c = cf, scrollLockTimeout: l = uf, dismissible: f = !0, handleOnly: u = !1, fadeFromIndex: d = a && a.length - 1, activeSnapPoint: g, setActiveSnapPoint: y, fixed: m, modal: v = !0, onClose: b, nested: w, noBodyStyles: x = !1, direction: S = "bottom", defaultOpen: R = !1, disablePreventScroll: O = !0, snapToSequentialPoint: C = !1, preventScrollRestoration: E = !1, repositionInputs:
|
|
5593
|
-
var
|
|
5594
|
-
const [
|
|
5592
|
+
function hf({ open: t, onOpenChange: e, children: n, onDrag: r, onRelease: o, snapPoints: a, shouldScaleBackground: s = !1, setBackgroundColorOnScale: i = !0, closeThreshold: c = cf, scrollLockTimeout: l = uf, dismissible: f = !0, handleOnly: u = !1, fadeFromIndex: d = a && a.length - 1, activeSnapPoint: g, setActiveSnapPoint: y, fixed: m, modal: v = !0, onClose: b, nested: w, noBodyStyles: x = !1, direction: S = "bottom", defaultOpen: R = !1, disablePreventScroll: O = !0, snapToSequentialPoint: C = !1, preventScrollRestoration: E = !1, repositionInputs: j = !0, onAnimationEnd: V, container: z, autoFocus: k = !1 }) {
|
|
5593
|
+
var T, I;
|
|
5594
|
+
const [$ = !1, D] = Xs({
|
|
5595
5595
|
defaultProp: R,
|
|
5596
5596
|
prop: t,
|
|
5597
5597
|
onChange: (Y) => {
|
|
5598
5598
|
e?.(Y), !Y && !w && lc(), setTimeout(() => {
|
|
5599
|
-
|
|
5599
|
+
V?.(Y);
|
|
5600
5600
|
}, de.DURATION * 1e3), Y && !v && typeof window < "u" && window.requestAnimationFrame(() => {
|
|
5601
5601
|
document.body.style.pointerEvents = "auto";
|
|
5602
5602
|
}), Y || (document.body.style.pointerEvents = "auto");
|
|
5603
5603
|
}
|
|
5604
|
-
}), [
|
|
5604
|
+
}), [L, A] = B.useState(!1), [Z, se] = B.useState(!1), [N, P] = B.useState(!1), M = B.useRef(null), F = B.useRef(null), W = B.useRef(null), Q = B.useRef(null), _ = B.useRef(null), G = B.useRef(!1), ee = B.useRef(null), te = B.useRef(0), oe = B.useRef(!1), le = B.useRef(!R), be = B.useRef(0), q = B.useRef(null), Ot = B.useRef(((T = q.current) == null ? void 0 : T.getBoundingClientRect().height) || 0), _t = B.useRef(((I = q.current) == null ? void 0 : I.getBoundingClientRect().width) || 0), ft = B.useRef(0), rc = B.useCallback((Y) => {
|
|
5605
5605
|
a && Y === Yt.length - 1 && (F.current = /* @__PURE__ */ new Date());
|
|
5606
5606
|
}, []), { activeSnapPoint: oc, activeSnapPointIndex: At, setActiveSnapPoint: Lo, onRelease: ac, snapPointsOffset: Yt, onDrag: sc, shouldFade: Fo, getPercentageDragged: ic } = ff({
|
|
5607
5607
|
snapPoints: a,
|
|
@@ -5609,20 +5609,20 @@ function hf({ open: t, onOpenChange: e, children: n, onDrag: r, onRelease: o, sn
|
|
|
5609
5609
|
setActiveSnapPointProp: y,
|
|
5610
5610
|
drawerRef: q,
|
|
5611
5611
|
fadeFromIndex: d,
|
|
5612
|
-
overlayRef:
|
|
5612
|
+
overlayRef: M,
|
|
5613
5613
|
onSnapPointChange: rc,
|
|
5614
5614
|
direction: S,
|
|
5615
|
-
container:
|
|
5615
|
+
container: z,
|
|
5616
5616
|
snapToSequentialPoint: C
|
|
5617
5617
|
});
|
|
5618
5618
|
ef({
|
|
5619
|
-
isDisabled:
|
|
5619
|
+
isDisabled: !$ || Z || !v || N || !L || !j || !O
|
|
5620
5620
|
});
|
|
5621
5621
|
const { restorePositionSetting: lc } = gf({
|
|
5622
|
-
isOpen:
|
|
5622
|
+
isOpen: $,
|
|
5623
5623
|
modal: v,
|
|
5624
5624
|
nested: w ?? !1,
|
|
5625
|
-
hasBeenOpened:
|
|
5625
|
+
hasBeenOpened: L,
|
|
5626
5626
|
preventScrollRestoration: E,
|
|
5627
5627
|
noBodyStyles: x
|
|
5628
5628
|
});
|
|
@@ -5672,7 +5672,7 @@ function hf({ open: t, onOpenChange: e, children: n, onDrag: r, onRelease: o, sn
|
|
|
5672
5672
|
if (pt !== null && (Te = pt), fe && Te >= 1 || !G.current && !Bo(Y.target, ae)) return;
|
|
5673
5673
|
if (q.current.classList.add(Dr), G.current = !0, ge(q.current, {
|
|
5674
5674
|
transition: "none"
|
|
5675
|
-
}), ge(
|
|
5675
|
+
}), ge(M.current, {
|
|
5676
5676
|
transition: "none"
|
|
5677
5677
|
}), a && sc({
|
|
5678
5678
|
draggedDistance: ce
|
|
@@ -5684,10 +5684,10 @@ function hf({ open: t, onOpenChange: e, children: n, onDrag: r, onRelease: o, sn
|
|
|
5684
5684
|
return;
|
|
5685
5685
|
}
|
|
5686
5686
|
const Qe = 1 - Te;
|
|
5687
|
-
if ((Fo || d && At === d - 1) && (r?.(Y, Te), ge(
|
|
5687
|
+
if ((Fo || d && At === d - 1) && (r?.(Y, Te), ge(M.current, {
|
|
5688
5688
|
opacity: `${Qe}`,
|
|
5689
5689
|
transition: "none"
|
|
5690
|
-
}, !0)), we &&
|
|
5690
|
+
}, !0)), we && M.current && s) {
|
|
5691
5691
|
const Me = Math.min(xn() + Te * (1 - xn()), 1), Sn = 8 - Te * 8, Vo = Math.max(0, 14 - Te * 14);
|
|
5692
5692
|
ge(we, {
|
|
5693
5693
|
borderRadius: `${Sn}px`,
|
|
@@ -5710,7 +5710,7 @@ function hf({ open: t, onOpenChange: e, children: n, onDrag: r, onRelease: o, sn
|
|
|
5710
5710
|
}, []), B.useEffect(() => {
|
|
5711
5711
|
var Y;
|
|
5712
5712
|
function ie() {
|
|
5713
|
-
if (!q.current || !
|
|
5713
|
+
if (!q.current || !j) return;
|
|
5714
5714
|
const ce = document.activeElement;
|
|
5715
5715
|
if (qr(ce) || oe.current) {
|
|
5716
5716
|
var ae;
|
|
@@ -5741,7 +5741,7 @@ function hf({ open: t, onOpenChange: e, children: n, onDrag: r, onRelease: o, sn
|
|
|
5741
5741
|
Yt
|
|
5742
5742
|
]);
|
|
5743
5743
|
function Xt(Y) {
|
|
5744
|
-
dc(), b?.(), Y ||
|
|
5744
|
+
dc(), b?.(), Y || D(!1), setTimeout(() => {
|
|
5745
5745
|
a && Lo(a[0]);
|
|
5746
5746
|
}, de.DURATION * 1e3);
|
|
5747
5747
|
}
|
|
@@ -5751,10 +5751,10 @@ function hf({ open: t, onOpenChange: e, children: n, onDrag: r, onRelease: o, sn
|
|
|
5751
5751
|
ge(q.current, {
|
|
5752
5752
|
transform: "translate3d(0, 0, 0)",
|
|
5753
5753
|
transition: `transform ${de.DURATION}s cubic-bezier(${de.EASE.join(",")})`
|
|
5754
|
-
}), ge(
|
|
5754
|
+
}), ge(M.current, {
|
|
5755
5755
|
transition: `opacity ${de.DURATION}s cubic-bezier(${de.EASE.join(",")})`,
|
|
5756
5756
|
opacity: "1"
|
|
5757
|
-
}), s && ie && ie > 0 &&
|
|
5757
|
+
}), s && ie && ie > 0 && $ && ge(Y, {
|
|
5758
5758
|
borderRadius: `${qs}px`,
|
|
5759
5759
|
overflow: "hidden",
|
|
5760
5760
|
...pe(S) ? {
|
|
@@ -5807,12 +5807,12 @@ function hf({ open: t, onOpenChange: e, children: n, onDrag: r, onRelease: o, sn
|
|
|
5807
5807
|
}
|
|
5808
5808
|
o?.(Y, !0), zo();
|
|
5809
5809
|
}
|
|
5810
|
-
B.useEffect(() => (
|
|
5810
|
+
B.useEffect(() => ($ && (ge(document.documentElement, {
|
|
5811
5811
|
scrollBehavior: "auto"
|
|
5812
5812
|
}), F.current = /* @__PURE__ */ new Date()), () => {
|
|
5813
5813
|
af(document.documentElement, "scrollBehavior");
|
|
5814
5814
|
}), [
|
|
5815
|
-
|
|
5815
|
+
$
|
|
5816
5816
|
]);
|
|
5817
5817
|
function pc(Y) {
|
|
5818
5818
|
const ie = Y ? (window.innerWidth - gt) / window.innerWidth : 1, ce = Y ? -gt : 0;
|
|
@@ -5851,16 +5851,16 @@ function hf({ open: t, onOpenChange: e, children: n, onDrag: r, onRelease: o, sn
|
|
|
5851
5851
|
]), /* @__PURE__ */ B.createElement(Ls, {
|
|
5852
5852
|
defaultOpen: R,
|
|
5853
5853
|
onOpenChange: (Y) => {
|
|
5854
|
-
!f && !Y || (Y ? A(!0) : Xt(!0),
|
|
5854
|
+
!f && !Y || (Y ? A(!0) : Xt(!0), D(Y));
|
|
5855
5855
|
},
|
|
5856
|
-
open:
|
|
5856
|
+
open: $
|
|
5857
5857
|
}, /* @__PURE__ */ B.createElement(Vs.Provider, {
|
|
5858
5858
|
value: {
|
|
5859
5859
|
activeSnapPoint: oc,
|
|
5860
5860
|
snapPoints: a,
|
|
5861
5861
|
setActiveSnapPoint: Lo,
|
|
5862
5862
|
drawerRef: q,
|
|
5863
|
-
overlayRef:
|
|
5863
|
+
overlayRef: M,
|
|
5864
5864
|
onOpenChange: e,
|
|
5865
5865
|
onPress: cc,
|
|
5866
5866
|
onRelease: fc,
|
|
@@ -5868,7 +5868,7 @@ function hf({ open: t, onOpenChange: e, children: n, onDrag: r, onRelease: o, sn
|
|
|
5868
5868
|
dismissible: f,
|
|
5869
5869
|
shouldAnimate: le,
|
|
5870
5870
|
handleOnly: u,
|
|
5871
|
-
isOpen:
|
|
5871
|
+
isOpen: $,
|
|
5872
5872
|
isDragging: Z,
|
|
5873
5873
|
shouldFade: Fo,
|
|
5874
5874
|
closeDrawer: Xt,
|
|
@@ -5883,8 +5883,8 @@ function hf({ open: t, onOpenChange: e, children: n, onDrag: r, onRelease: o, sn
|
|
|
5883
5883
|
shouldScaleBackground: s,
|
|
5884
5884
|
setBackgroundColorOnScale: i,
|
|
5885
5885
|
noBodyStyles: x,
|
|
5886
|
-
container:
|
|
5887
|
-
autoFocus:
|
|
5886
|
+
container: z,
|
|
5887
|
+
autoFocus: k
|
|
5888
5888
|
}
|
|
5889
5889
|
}, n));
|
|
5890
5890
|
}
|
|
@@ -5907,34 +5907,34 @@ const Qs = /* @__PURE__ */ B.forwardRef(function({ ...t }, e) {
|
|
|
5907
5907
|
});
|
|
5908
5908
|
Qs.displayName = "Drawer.Overlay";
|
|
5909
5909
|
const Js = /* @__PURE__ */ B.forwardRef(function({ onPointerDownOutside: t, style: e, onOpenAutoFocus: n, ...r }, o) {
|
|
5910
|
-
const { drawerRef: a, onPress: s, onRelease: i, onDrag: c, keyboardIsOpen: l, snapPointsOffset: f, activeSnapPointIndex: u, modal: d, isOpen: g, direction: y, snapPoints: m, container: v, handleOnly: b, shouldAnimate: w, autoFocus: x } = gn(), [S, R] = B.useState(!1), O = Us(o, a), C = B.useRef(null), E = B.useRef(null),
|
|
5910
|
+
const { drawerRef: a, onPress: s, onRelease: i, onDrag: c, keyboardIsOpen: l, snapPointsOffset: f, activeSnapPointIndex: u, modal: d, isOpen: g, direction: y, snapPoints: m, container: v, handleOnly: b, shouldAnimate: w, autoFocus: x } = gn(), [S, R] = B.useState(!1), O = Us(o, a), C = B.useRef(null), E = B.useRef(null), j = B.useRef(!1), V = m && m.length > 0;
|
|
5911
5911
|
mf();
|
|
5912
|
-
const
|
|
5913
|
-
if (
|
|
5914
|
-
const
|
|
5912
|
+
const z = (T, I, $ = 0) => {
|
|
5913
|
+
if (j.current) return !0;
|
|
5914
|
+
const D = Math.abs(T.y), L = Math.abs(T.x), A = L > D, Z = [
|
|
5915
5915
|
"bottom",
|
|
5916
5916
|
"right"
|
|
5917
|
-
].includes(
|
|
5918
|
-
if (
|
|
5919
|
-
if (!(
|
|
5917
|
+
].includes(I) ? 1 : -1;
|
|
5918
|
+
if (I === "left" || I === "right") {
|
|
5919
|
+
if (!(T.x * Z < 0) && L >= 0 && L <= $)
|
|
5920
5920
|
return A;
|
|
5921
|
-
} else if (!(
|
|
5921
|
+
} else if (!(T.y * Z < 0) && D >= 0 && D <= $)
|
|
5922
5922
|
return !A;
|
|
5923
|
-
return
|
|
5923
|
+
return j.current = !0, !0;
|
|
5924
5924
|
};
|
|
5925
5925
|
B.useEffect(() => {
|
|
5926
|
-
|
|
5926
|
+
V && window.requestAnimationFrame(() => {
|
|
5927
5927
|
R(!0);
|
|
5928
5928
|
});
|
|
5929
5929
|
}, []);
|
|
5930
|
-
function T
|
|
5931
|
-
C.current = null,
|
|
5930
|
+
function k(T) {
|
|
5931
|
+
C.current = null, j.current = !1, i(T);
|
|
5932
5932
|
}
|
|
5933
5933
|
return /* @__PURE__ */ B.createElement(zs, {
|
|
5934
5934
|
"data-vaul-drawer-direction": y,
|
|
5935
5935
|
"data-vaul-drawer": "",
|
|
5936
5936
|
"data-vaul-delayed-snap-points": S ? "true" : "false",
|
|
5937
|
-
"data-vaul-snap-points": g &&
|
|
5937
|
+
"data-vaul-snap-points": g && V ? "true" : "false",
|
|
5938
5938
|
"data-vaul-custom-container": v ? "true" : "false",
|
|
5939
5939
|
"data-vaul-animate": w?.current ? "true" : "false",
|
|
5940
5940
|
...r,
|
|
@@ -5943,44 +5943,44 @@ const Js = /* @__PURE__ */ B.forwardRef(function({ onPointerDownOutside: t, styl
|
|
|
5943
5943
|
"--snap-point-height": `${f[u ?? 0]}px`,
|
|
5944
5944
|
...e
|
|
5945
5945
|
} : e,
|
|
5946
|
-
onPointerDown: (
|
|
5947
|
-
b || (r.onPointerDown == null || r.onPointerDown.call(r,
|
|
5948
|
-
x:
|
|
5949
|
-
y:
|
|
5950
|
-
}, s(
|
|
5946
|
+
onPointerDown: (T) => {
|
|
5947
|
+
b || (r.onPointerDown == null || r.onPointerDown.call(r, T), C.current = {
|
|
5948
|
+
x: T.pageX,
|
|
5949
|
+
y: T.pageY
|
|
5950
|
+
}, s(T));
|
|
5951
5951
|
},
|
|
5952
|
-
onOpenAutoFocus: (
|
|
5953
|
-
n?.(
|
|
5952
|
+
onOpenAutoFocus: (T) => {
|
|
5953
|
+
n?.(T), x || T.preventDefault();
|
|
5954
5954
|
},
|
|
5955
|
-
onPointerDownOutside: (
|
|
5956
|
-
if (t?.(
|
|
5957
|
-
|
|
5955
|
+
onPointerDownOutside: (T) => {
|
|
5956
|
+
if (t?.(T), !d || T.defaultPrevented) {
|
|
5957
|
+
T.preventDefault();
|
|
5958
5958
|
return;
|
|
5959
5959
|
}
|
|
5960
5960
|
l.current && (l.current = !1);
|
|
5961
5961
|
},
|
|
5962
|
-
onFocusOutside: (
|
|
5962
|
+
onFocusOutside: (T) => {
|
|
5963
5963
|
if (!d) {
|
|
5964
|
-
|
|
5964
|
+
T.preventDefault();
|
|
5965
5965
|
return;
|
|
5966
5966
|
}
|
|
5967
5967
|
},
|
|
5968
|
-
onPointerMove: (
|
|
5969
|
-
if (E.current =
|
|
5970
|
-
const
|
|
5971
|
-
|
|
5972
|
-
x:
|
|
5973
|
-
y:
|
|
5974
|
-
}, y,
|
|
5968
|
+
onPointerMove: (T) => {
|
|
5969
|
+
if (E.current = T, b || (r.onPointerMove == null || r.onPointerMove.call(r, T), !C.current)) return;
|
|
5970
|
+
const I = T.pageY - C.current.y, $ = T.pageX - C.current.x, D = T.pointerType === "touch" ? 10 : 2;
|
|
5971
|
+
z({
|
|
5972
|
+
x: $,
|
|
5973
|
+
y: I
|
|
5974
|
+
}, y, D) ? c(T) : (Math.abs($) > D || Math.abs(I) > D) && (C.current = null);
|
|
5975
5975
|
},
|
|
5976
|
-
onPointerUp: (
|
|
5977
|
-
r.onPointerUp == null || r.onPointerUp.call(r,
|
|
5976
|
+
onPointerUp: (T) => {
|
|
5977
|
+
r.onPointerUp == null || r.onPointerUp.call(r, T), C.current = null, j.current = !1, i(T);
|
|
5978
5978
|
},
|
|
5979
|
-
onPointerOut: (
|
|
5980
|
-
r.onPointerOut == null || r.onPointerOut.call(r,
|
|
5979
|
+
onPointerOut: (T) => {
|
|
5980
|
+
r.onPointerOut == null || r.onPointerOut.call(r, T), k(E.current);
|
|
5981
5981
|
},
|
|
5982
|
-
onContextMenu: (
|
|
5983
|
-
r.onContextMenu == null || r.onContextMenu.call(r,
|
|
5982
|
+
onContextMenu: (T) => {
|
|
5983
|
+
r.onContextMenu == null || r.onContextMenu.call(r, T), E.current && k(E.current);
|
|
5984
5984
|
}
|
|
5985
5985
|
});
|
|
5986
5986
|
});
|
|
@@ -6269,44 +6269,44 @@ const Df = (t) => {
|
|
|
6269
6269
|
value: v
|
|
6270
6270
|
} = d, {
|
|
6271
6271
|
queryParams: b
|
|
6272
|
-
} = Ye(Ve), [w, x] = Le(!1), [S, R] = Le({}), O = Af.useMediaQuery("(min-width: 768px)"), C = (
|
|
6272
|
+
} = Ye(Ve), [w, x] = Le(!1), [S, R] = Le({}), O = Af.useMediaQuery("(min-width: 768px)"), C = (V) => {
|
|
6273
6273
|
x(!1);
|
|
6274
6274
|
};
|
|
6275
6275
|
_e(() => {
|
|
6276
6276
|
if (!r.options)
|
|
6277
6277
|
return;
|
|
6278
|
-
const
|
|
6279
|
-
for (let
|
|
6280
|
-
for (let
|
|
6281
|
-
r.options[
|
|
6282
|
-
const
|
|
6283
|
-
|
|
6278
|
+
const V = {};
|
|
6279
|
+
for (let z = 0; z < r.options?.length; z++)
|
|
6280
|
+
for (let k = 0; k < r.options[z]?.children?.length; k++) {
|
|
6281
|
+
r.options[z].children[k].onSelect = C;
|
|
6282
|
+
const T = r.options[z].children[k];
|
|
6283
|
+
V[T.value] = T.label;
|
|
6284
6284
|
}
|
|
6285
6285
|
R({
|
|
6286
|
-
...
|
|
6286
|
+
...V
|
|
6287
6287
|
});
|
|
6288
6288
|
}, [r.options]), _e(() => {
|
|
6289
6289
|
if (!r.option)
|
|
6290
6290
|
return;
|
|
6291
|
-
const
|
|
6292
|
-
for (let
|
|
6293
|
-
const
|
|
6294
|
-
|
|
6291
|
+
const V = {};
|
|
6292
|
+
for (let z = 0; z < r.option?.length; z++) {
|
|
6293
|
+
const k = r.option[z];
|
|
6294
|
+
V[k.value] = k.label;
|
|
6295
6295
|
}
|
|
6296
6296
|
R({
|
|
6297
|
-
...
|
|
6297
|
+
...V
|
|
6298
6298
|
});
|
|
6299
6299
|
}, [r.option]);
|
|
6300
6300
|
const E = () => {
|
|
6301
|
-
let
|
|
6302
|
-
m === "command" && S[b[r.prop]] && (
|
|
6303
|
-
let
|
|
6304
|
-
return b[y] && b[y].length > 0 && (
|
|
6301
|
+
let V;
|
|
6302
|
+
m === "command" && S[b[r.prop]] && (V = S[b[r.prop]]);
|
|
6303
|
+
let z = [];
|
|
6304
|
+
return b[y] && b[y].length > 0 && (z = b[y]), v && v.length > 0 && (z = v), e.current && (z = e.current.checkedList()), m === "checkbox-list" && z && z.length > 0 && (V = z.map((k) => /* @__PURE__ */ h.jsx(Of, { children: S[k] }, k))), /* @__PURE__ */ h.jsx(a, { variant: "outline", className: "w-full justify-center-safe", style: {
|
|
6305
6305
|
maxWidth: "200px",
|
|
6306
6306
|
overflowX: "auto",
|
|
6307
6307
|
overflowY: "hidden"
|
|
6308
|
-
}, children:
|
|
6309
|
-
},
|
|
6308
|
+
}, children: V || S[d?.value] || d?.placeholder });
|
|
6309
|
+
}, j = () => {
|
|
6310
6310
|
if (m === "command")
|
|
6311
6311
|
return /* @__PURE__ */ h.jsx(ds, { id: o, coms: n, item: r });
|
|
6312
6312
|
if (m === "checkbox-list")
|
|
@@ -6316,7 +6316,7 @@ const Df = (t) => {
|
|
|
6316
6316
|
};
|
|
6317
6317
|
return O ? /* @__PURE__ */ h.jsxs(l, { open: w, onOpenChange: x, children: [
|
|
6318
6318
|
/* @__PURE__ */ h.jsx(u, { asChild: !0, children: E() }),
|
|
6319
|
-
/* @__PURE__ */ h.jsx(f, { className: "w-[200px] p-0", align: "start", children:
|
|
6319
|
+
/* @__PURE__ */ h.jsx(f, { className: "w-[200px] p-0", align: "start", children: j() })
|
|
6320
6320
|
] }) : /* @__PURE__ */ h.jsxs(s, { open: w, onOpenChange: x, children: [
|
|
6321
6321
|
/* @__PURE__ */ h.jsx(c, { asChild: !0, children: E() }),
|
|
6322
6322
|
/* @__PURE__ */ h.jsxs(i, { children: [
|
|
@@ -6324,7 +6324,7 @@ const Df = (t) => {
|
|
|
6324
6324
|
/* @__PURE__ */ h.jsx(Tf, {}),
|
|
6325
6325
|
/* @__PURE__ */ h.jsx(kf, {})
|
|
6326
6326
|
] }),
|
|
6327
|
-
/* @__PURE__ */ h.jsx("div", { className: "mt-4 border-t", children:
|
|
6327
|
+
/* @__PURE__ */ h.jsx("div", { className: "mt-4 border-t", children: j() })
|
|
6328
6328
|
] })
|
|
6329
6329
|
] });
|
|
6330
6330
|
}, If = (t) => {
|
|
@@ -6575,113 +6575,115 @@ const Xf = [
|
|
|
6575
6575
|
dim: i = 1,
|
|
6576
6576
|
columns: c = [],
|
|
6577
6577
|
heading: l = i != 1,
|
|
6578
|
-
itemWidth: f = "auto"
|
|
6578
|
+
itemWidth: f = "auto",
|
|
6579
|
+
onChange: u = () => {
|
|
6580
|
+
}
|
|
6579
6581
|
} = o, {
|
|
6580
|
-
Button:
|
|
6581
|
-
} = e,
|
|
6582
|
-
for (let
|
|
6583
|
-
|
|
6582
|
+
Button: d
|
|
6583
|
+
} = e, g = [];
|
|
6584
|
+
for (let k = 0; k < i; k++)
|
|
6585
|
+
g.push({});
|
|
6584
6586
|
const {
|
|
6585
|
-
dispatchQueryParams:
|
|
6586
|
-
queryParams:
|
|
6587
|
-
formLoading:
|
|
6588
|
-
} = Ye(Ve),
|
|
6589
|
-
const
|
|
6590
|
-
for (let $ = 0; $ <
|
|
6591
|
-
const
|
|
6587
|
+
dispatchQueryParams: y,
|
|
6588
|
+
queryParams: m,
|
|
6589
|
+
formLoading: v
|
|
6590
|
+
} = Ye(Ve), b = (k, T = "") => {
|
|
6591
|
+
const I = [];
|
|
6592
|
+
for (let $ = 0; $ < g.length; $++) {
|
|
6593
|
+
const D = {
|
|
6592
6594
|
key: "",
|
|
6593
6595
|
value: ""
|
|
6594
6596
|
};
|
|
6595
|
-
|
|
6596
|
-
}
|
|
6597
|
-
return
|
|
6598
|
-
}, [
|
|
6599
|
-
|
|
6600
|
-
},
|
|
6601
|
-
const T = [...
|
|
6602
|
-
n.removeItemAction && await n.removeItemAction(
|
|
6603
|
-
},
|
|
6604
|
-
let
|
|
6605
|
-
typeof T?.target?.value == "string" ?
|
|
6597
|
+
D.key = `${a}[${k}][${$}]`, D.value = (typeof T == "object" ? T?.[c?.[$]?.prop] : T) || "", I.push(D);
|
|
6598
|
+
}
|
|
6599
|
+
return I;
|
|
6600
|
+
}, [w, x] = Le([[...b(0)]]), S = () => {
|
|
6601
|
+
x([...w, [...b(w.length)]]);
|
|
6602
|
+
}, R = async (k) => {
|
|
6603
|
+
const T = [...w];
|
|
6604
|
+
n.removeItemAction && await n.removeItemAction(m?.[n.prop], k), T.splice(k, 1), x(T), C(T);
|
|
6605
|
+
}, O = (k, T) => {
|
|
6606
|
+
let I;
|
|
6607
|
+
typeof T?.target?.value == "string" ? I = T?.target?.value : I = T;
|
|
6606
6608
|
const {
|
|
6607
6609
|
rowIndex: $,
|
|
6608
|
-
columnIndex:
|
|
6609
|
-
} =
|
|
6610
|
-
L[$][
|
|
6611
|
-
},
|
|
6610
|
+
columnIndex: D
|
|
6611
|
+
} = k, L = [...w];
|
|
6612
|
+
L[$][D].value = I, x(L), C(L);
|
|
6613
|
+
}, C = (k) => {
|
|
6612
6614
|
let T = [];
|
|
6613
|
-
i === 1 ? T =
|
|
6615
|
+
i === 1 ? T = k.flat().map((I) => I.value) : T = k.map((I) => {
|
|
6614
6616
|
const $ = {};
|
|
6615
|
-
return
|
|
6616
|
-
$[c[L]?.prop] =
|
|
6617
|
+
return I.forEach((D, L) => {
|
|
6618
|
+
$[c[L]?.prop] = D.value;
|
|
6617
6619
|
}), $;
|
|
6618
|
-
}),
|
|
6620
|
+
}), y({
|
|
6619
6621
|
data: {
|
|
6620
|
-
...
|
|
6622
|
+
...m,
|
|
6621
6623
|
[n.prop]: [...T]
|
|
6622
6624
|
}
|
|
6623
|
-
});
|
|
6625
|
+
}), u(T);
|
|
6624
6626
|
};
|
|
6625
6627
|
_e(() => {
|
|
6626
|
-
|
|
6627
|
-
}, [
|
|
6628
|
-
const
|
|
6629
|
-
const
|
|
6630
|
-
if (
|
|
6631
|
-
for (let
|
|
6632
|
-
const $ =
|
|
6633
|
-
T.push([...
|
|
6628
|
+
E();
|
|
6629
|
+
}, [m?.[n.prop]]);
|
|
6630
|
+
const E = async () => {
|
|
6631
|
+
const k = m?.[n.prop], T = [];
|
|
6632
|
+
if (k && Array.isArray(k) && k.length > 0)
|
|
6633
|
+
for (let I = 0; I < k.length; I++) {
|
|
6634
|
+
const $ = k[I];
|
|
6635
|
+
T.push([...b(I, $)]);
|
|
6634
6636
|
}
|
|
6635
|
-
|
|
6637
|
+
x(T);
|
|
6636
6638
|
};
|
|
6637
|
-
let
|
|
6639
|
+
let j = "w-full", V = {}, z = "flex";
|
|
6638
6640
|
switch (f) {
|
|
6639
6641
|
case "auto":
|
|
6640
|
-
|
|
6642
|
+
j = "w-full";
|
|
6641
6643
|
break;
|
|
6642
6644
|
case "mean":
|
|
6643
|
-
let
|
|
6645
|
+
let k = 1;
|
|
6644
6646
|
c.forEach((T) => {
|
|
6645
|
-
T.setting?.className?.match(/hidden/i) || (
|
|
6646
|
-
}),
|
|
6647
|
-
width: `${1 /
|
|
6647
|
+
T.setting?.className?.match(/hidden/i) || (k += 1);
|
|
6648
|
+
}), j = "flex-none", V = {
|
|
6649
|
+
width: `${1 / k * 100}%`
|
|
6648
6650
|
};
|
|
6649
6651
|
break;
|
|
6650
6652
|
}
|
|
6651
6653
|
return /* @__PURE__ */ h.jsxs("div", { id: r, children: [
|
|
6652
|
-
/* @__PURE__ */ h.jsx("div", { className: `flex gap-${s} mb-${s} justify-end`, children: /* @__PURE__ */ h.jsxs(
|
|
6654
|
+
/* @__PURE__ */ h.jsx("div", { className: `flex gap-${s} mb-${s} justify-end`, children: /* @__PURE__ */ h.jsxs(d, { onClick: S, disabled: v, children: [
|
|
6653
6655
|
/* @__PURE__ */ h.jsx(Gf, {}),
|
|
6654
6656
|
"添加",
|
|
6655
6657
|
n.label
|
|
6656
6658
|
] }) }),
|
|
6657
|
-
|
|
6658
|
-
|
|
6659
|
-
let
|
|
6659
|
+
w.map((k, T) => /* @__PURE__ */ h.jsxs("div", { className: `${z} gap-${s} mb-${s} items-end`, children: [
|
|
6660
|
+
k.map((I, $) => {
|
|
6661
|
+
let D = {
|
|
6660
6662
|
...n
|
|
6661
6663
|
};
|
|
6662
6664
|
const L = n?.setting?.columns?.[$];
|
|
6663
|
-
return L && (
|
|
6665
|
+
return L && (D = {
|
|
6664
6666
|
...L
|
|
6665
|
-
}),
|
|
6666
|
-
...
|
|
6667
|
-
name:
|
|
6668
|
-
value:
|
|
6669
|
-
onChange:
|
|
6667
|
+
}), D.type === "form-list" && (D.type = "input"), D.setting = {
|
|
6668
|
+
...D.setting,
|
|
6669
|
+
name: I.key,
|
|
6670
|
+
value: I.value,
|
|
6671
|
+
onChange: O.bind(void 0, {
|
|
6670
6672
|
rowIndex: T,
|
|
6671
6673
|
columnIndex: $
|
|
6672
6674
|
}),
|
|
6673
|
-
onValueChange:
|
|
6675
|
+
onValueChange: O.bind(void 0, {
|
|
6674
6676
|
rowIndex: T,
|
|
6675
6677
|
columnIndex: $
|
|
6676
6678
|
})
|
|
6677
|
-
}, ["input"].includes(
|
|
6678
|
-
...
|
|
6679
|
+
}, ["input", "input-group"].includes(D.type) && delete D.setting.onValueChange, /* @__PURE__ */ h.jsxs("div", { className: `${j} ${D?.setting?.className?.match(/hidden/i) ? "hidden" : ""}`, style: {
|
|
6680
|
+
...V
|
|
6679
6681
|
}, children: [
|
|
6680
|
-
l && T === 0 ? /* @__PURE__ */ h.jsx("h3", { className: "inline-block text-base", children:
|
|
6681
|
-
/* @__PURE__ */ h.jsx(Zs, { className: "w-full", coms: e, item:
|
|
6682
|
-
] },
|
|
6682
|
+
l && T === 0 ? /* @__PURE__ */ h.jsx("h3", { className: "inline-block text-base", children: D.label }) : [],
|
|
6683
|
+
/* @__PURE__ */ h.jsx(Zs, { className: "w-full", coms: e, item: D, id: I.key, type: D.type })
|
|
6684
|
+
] }, I.key);
|
|
6683
6685
|
}),
|
|
6684
|
-
/* @__PURE__ */ h.jsx(
|
|
6686
|
+
/* @__PURE__ */ h.jsx(d, { variant: "outline", size: "icon", className: "rounded-full", disabled: v, onClick: R.bind(void 0, T), children: /* @__PURE__ */ h.jsx(Qf, { color: "red" }) })
|
|
6685
6687
|
] }, T))
|
|
6686
6688
|
] });
|
|
6687
6689
|
};
|
|
@@ -7336,9 +7338,9 @@ const Ta = {
|
|
|
7336
7338
|
const n = {
|
|
7337
7339
|
...Ta,
|
|
7338
7340
|
...t,
|
|
7339
|
-
handleQuery: (
|
|
7341
|
+
handleQuery: (k) => {
|
|
7340
7342
|
yt.handleQuery({
|
|
7341
|
-
queryParameter:
|
|
7343
|
+
queryParameter: k,
|
|
7342
7344
|
vm: {
|
|
7343
7345
|
...Ta,
|
|
7344
7346
|
...t
|
|
@@ -7371,49 +7373,49 @@ const Ta = {
|
|
|
7371
7373
|
queryWhenReady: d = !1
|
|
7372
7374
|
} = n, {
|
|
7373
7375
|
Button: g
|
|
7374
|
-
} = a, [y, m] = Le(!1), [v, b] = Le(!1), [w, x] = Le({}), S = (
|
|
7376
|
+
} = a, [y, m] = Le(!1), [v, b] = Le(!1), [w, x] = Le({}), S = (k, T) => {
|
|
7375
7377
|
const {
|
|
7376
|
-
data:
|
|
7377
|
-
} =
|
|
7378
|
+
data: I
|
|
7379
|
+
} = T;
|
|
7378
7380
|
return s({
|
|
7379
|
-
|
|
7381
|
+
...I
|
|
7380
7382
|
}), {
|
|
7381
|
-
|
|
7383
|
+
...I
|
|
7382
7384
|
};
|
|
7383
|
-
}, R = (
|
|
7384
|
-
const
|
|
7385
|
-
...
|
|
7385
|
+
}, R = (k) => {
|
|
7386
|
+
const T = {
|
|
7387
|
+
...k
|
|
7386
7388
|
};
|
|
7387
|
-
let
|
|
7388
|
-
return r.forEach((
|
|
7389
|
-
|
|
7390
|
-
}), b(!0),
|
|
7389
|
+
let I = {};
|
|
7390
|
+
return r.forEach(($) => {
|
|
7391
|
+
$.prop && (I[$.prop] = T[$.prop] || "");
|
|
7392
|
+
}), b(!0), I;
|
|
7391
7393
|
}, [O, C] = yc(S, i, R);
|
|
7392
7394
|
Ha(() => {
|
|
7393
|
-
const
|
|
7395
|
+
const k = yt.initQueryParams({
|
|
7394
7396
|
vm: n,
|
|
7395
7397
|
dispatchQueryParams: C
|
|
7396
7398
|
});
|
|
7397
7399
|
C({
|
|
7398
|
-
data:
|
|
7400
|
+
data: k
|
|
7399
7401
|
});
|
|
7400
7402
|
}, [v]);
|
|
7401
7403
|
const E = async () => {
|
|
7402
|
-
let
|
|
7403
|
-
for (const [
|
|
7404
|
-
const
|
|
7405
|
-
if (
|
|
7406
|
-
const
|
|
7407
|
-
item:
|
|
7404
|
+
let k = {};
|
|
7405
|
+
for (const [T, I] of Object.entries(O)) {
|
|
7406
|
+
const $ = r.find((D) => D.prop === T);
|
|
7407
|
+
if ($ && $.rules) {
|
|
7408
|
+
const D = yt.getItemRules({
|
|
7409
|
+
item: $,
|
|
7408
7410
|
vm: n
|
|
7409
7411
|
});
|
|
7410
|
-
for (const
|
|
7412
|
+
for (const L of D)
|
|
7411
7413
|
try {
|
|
7412
|
-
if (
|
|
7413
|
-
throw new Error(
|
|
7414
|
-
if (
|
|
7415
|
-
throw new Error(
|
|
7416
|
-
|
|
7414
|
+
if (L.required && !I)
|
|
7415
|
+
throw new Error(L.message || `${$.label}不能为空`);
|
|
7416
|
+
if (L.pattern && !L.pattern.test(I))
|
|
7417
|
+
throw new Error(L.message || `${$.label}格式不正确`);
|
|
7418
|
+
L.validator && await new Promise((A, Z) => {
|
|
7417
7419
|
const se = (N) => {
|
|
7418
7420
|
if (N) {
|
|
7419
7421
|
Z(N);
|
|
@@ -7421,23 +7423,23 @@ const Ta = {
|
|
|
7421
7423
|
}
|
|
7422
7424
|
A();
|
|
7423
7425
|
};
|
|
7424
|
-
|
|
7426
|
+
L.validator(L, I, se);
|
|
7425
7427
|
});
|
|
7426
7428
|
} catch (A) {
|
|
7427
|
-
T
|
|
7429
|
+
k[T] || (k[T] = []), k[T].push({
|
|
7428
7430
|
message: A.message || "校验失败"
|
|
7429
7431
|
});
|
|
7430
7432
|
}
|
|
7431
7433
|
}
|
|
7432
7434
|
}
|
|
7433
7435
|
return x({
|
|
7434
|
-
...
|
|
7436
|
+
...k
|
|
7435
7437
|
}), {
|
|
7436
|
-
...
|
|
7438
|
+
...k
|
|
7437
7439
|
};
|
|
7438
|
-
},
|
|
7440
|
+
}, j = async (k) => {
|
|
7439
7441
|
await E();
|
|
7440
|
-
},
|
|
7442
|
+
}, V = () => {
|
|
7441
7443
|
yt.resetQuery({
|
|
7442
7444
|
vm: {
|
|
7443
7445
|
...n,
|
|
@@ -7445,9 +7447,9 @@ const Ta = {
|
|
|
7445
7447
|
},
|
|
7446
7448
|
dispatchQueryParams: C
|
|
7447
7449
|
});
|
|
7448
|
-
},
|
|
7449
|
-
const
|
|
7450
|
-
Object.keys(
|
|
7450
|
+
}, z = async (k) => {
|
|
7451
|
+
const T = await E();
|
|
7452
|
+
Object.keys(T).length == 0 && (m(!0), await yt.handleQuery({
|
|
7451
7453
|
queryParameter: {
|
|
7452
7454
|
defaultPageFirst: !d
|
|
7453
7455
|
},
|
|
@@ -7472,26 +7474,26 @@ const Ta = {
|
|
|
7472
7474
|
queryParams: O,
|
|
7473
7475
|
message: w,
|
|
7474
7476
|
formLoading: y
|
|
7475
|
-
}, children: /* @__PURE__ */ h.jsx("form", { action:
|
|
7476
|
-
r.map((
|
|
7477
|
-
const
|
|
7478
|
-
return /* @__PURE__ */ h.jsxs(Ea, { "data-invalid": w?.[
|
|
7479
|
-
|
|
7480
|
-
/* @__PURE__ */ h.jsx(ip, { htmlFor:
|
|
7481
|
-
/* @__PURE__ */ h.jsx(Zs, { coms: a, item:
|
|
7482
|
-
/^form-list$/i.test(
|
|
7483
|
-
|
|
7484
|
-
/* @__PURE__ */ h.jsx(up, { errors: w?.[
|
|
7485
|
-
|
|
7486
|
-
] },
|
|
7477
|
+
}, children: /* @__PURE__ */ h.jsx("form", { action: j, children: /* @__PURE__ */ h.jsxs(ap, { ...c, children: [
|
|
7478
|
+
r.map((k, T) => {
|
|
7479
|
+
const I = ze();
|
|
7480
|
+
return /* @__PURE__ */ h.jsxs(Ea, { "data-invalid": w?.[k.prop] && w?.[k.prop].length > 0, ...k.fieldSetting, children: [
|
|
7481
|
+
k.legend && /* @__PURE__ */ h.jsx(op, { ...k.legend?.setting, children: k.legend?.legend || k.legend }),
|
|
7482
|
+
/* @__PURE__ */ h.jsx(ip, { htmlFor: I, ...f, children: k.label }),
|
|
7483
|
+
/* @__PURE__ */ h.jsx(Zs, { coms: a, item: k, id: I, type: k.type }),
|
|
7484
|
+
/^form-list$/i.test(k.type) && /* @__PURE__ */ h.jsx(ni, { id: I, coms: a, item: k }),
|
|
7485
|
+
k.description && k.description.length > 0 && k.description.map(($, D) => /* @__PURE__ */ h.jsx(lp, { children: $ }, D)),
|
|
7486
|
+
/* @__PURE__ */ h.jsx(up, { errors: w?.[k.prop] || [] }),
|
|
7487
|
+
k.separator && /* @__PURE__ */ h.jsx(cp, { children: k.separator })
|
|
7488
|
+
] }, k.prop);
|
|
7487
7489
|
}),
|
|
7488
7490
|
o,
|
|
7489
7491
|
/* @__PURE__ */ h.jsxs(Ea, { orientation: "horizontal", ...l, children: [
|
|
7490
|
-
/* @__PURE__ */ h.jsxs(g, { disabled: y, formAction:
|
|
7492
|
+
/* @__PURE__ */ h.jsxs(g, { disabled: y, formAction: z, children: [
|
|
7491
7493
|
y ? /* @__PURE__ */ h.jsx(Jf, {}) : [],
|
|
7492
7494
|
"提交"
|
|
7493
7495
|
] }),
|
|
7494
|
-
/* @__PURE__ */ h.jsx(g, { disabled: y, variant: "outline", type: "button", onClick:
|
|
7496
|
+
/* @__PURE__ */ h.jsx(g, { disabled: y, variant: "outline", type: "button", onClick: V, children: "重置" })
|
|
7495
7497
|
] })
|
|
7496
7498
|
] }) }) });
|
|
7497
7499
|
};
|
|
@@ -8153,17 +8155,17 @@ const Gp = (t) => ({
|
|
|
8153
8155
|
}, g = To(o), y = Po(g), m = await s.getDimensions(l), v = g === "y", b = v ? "top" : "left", w = v ? "bottom" : "right", x = v ? "clientHeight" : "clientWidth", S = a.reference[y] + a.reference[g] - d[g] - a.floating[y], R = d[g] - a.reference[g], O = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
|
|
8154
8156
|
let C = O ? O[x] : 0;
|
|
8155
8157
|
(!C || !await (s.isElement == null ? void 0 : s.isElement(O))) && (C = i.floating[x] || a.floating[y]);
|
|
8156
|
-
const E = S / 2 - R / 2,
|
|
8158
|
+
const E = S / 2 - R / 2, j = C / 2 - m[y] / 2 - 1, V = rt(u[b], j), z = rt(u[w], j), k = V, T = C - m[y] - z, I = C / 2 - m[y] / 2 + E, $ = Jr(k, I, T), D = !c.arrow && Kt(o) != null && I !== $ && a.reference[y] / 2 - (I < k ? V : z) - m[y] / 2 < 0, L = D ? I < k ? I - k : I - T : 0;
|
|
8157
8159
|
return {
|
|
8158
|
-
[g]: d[g] +
|
|
8160
|
+
[g]: d[g] + L,
|
|
8159
8161
|
data: {
|
|
8160
|
-
[g]:
|
|
8161
|
-
centerOffset:
|
|
8162
|
-
...
|
|
8163
|
-
alignmentOffset:
|
|
8162
|
+
[g]: $,
|
|
8163
|
+
centerOffset: I - $ - L,
|
|
8164
|
+
...D && {
|
|
8165
|
+
alignmentOffset: L
|
|
8164
8166
|
}
|
|
8165
8167
|
},
|
|
8166
|
-
reset:
|
|
8168
|
+
reset: D
|
|
8167
8169
|
};
|
|
8168
8170
|
}
|
|
8169
8171
|
}), qp = function(t) {
|
|
@@ -8192,36 +8194,36 @@ const Gp = (t) => ({
|
|
|
8192
8194
|
return {};
|
|
8193
8195
|
const b = qe(o), w = $e(i), x = qe(i) === i, S = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), R = d || (x || !m ? [Gn(i)] : Bp(i)), O = y !== "none";
|
|
8194
8196
|
!d && O && R.push(...Hp(i, m, y, S));
|
|
8195
|
-
const C = [i, ...R], E = await dn(e, v),
|
|
8196
|
-
let
|
|
8197
|
-
if (f &&
|
|
8198
|
-
const
|
|
8199
|
-
|
|
8197
|
+
const C = [i, ...R], E = await dn(e, v), j = [];
|
|
8198
|
+
let V = ((r = a.flip) == null ? void 0 : r.overflows) || [];
|
|
8199
|
+
if (f && j.push(E[b]), u) {
|
|
8200
|
+
const I = Fp(o, s, S);
|
|
8201
|
+
j.push(E[I[0]], E[I[1]]);
|
|
8200
8202
|
}
|
|
8201
|
-
if (
|
|
8203
|
+
if (V = [...V, {
|
|
8202
8204
|
placement: o,
|
|
8203
|
-
overflows:
|
|
8204
|
-
}], !
|
|
8205
|
-
var
|
|
8206
|
-
const
|
|
8207
|
-
if (
|
|
8205
|
+
overflows: j
|
|
8206
|
+
}], !j.every((I) => I <= 0)) {
|
|
8207
|
+
var z, k;
|
|
8208
|
+
const I = (((z = a.flip) == null ? void 0 : z.index) || 0) + 1, $ = C[I];
|
|
8209
|
+
if ($ && (!(u === "alignment" ? w !== $e($) : !1) || // We leave the current main axis only if every placement on that axis
|
|
8208
8210
|
// overflows the main axis.
|
|
8209
|
-
|
|
8211
|
+
V.every((A) => $e(A.placement) === w ? A.overflows[0] > 0 : !0)))
|
|
8210
8212
|
return {
|
|
8211
8213
|
data: {
|
|
8212
|
-
index:
|
|
8213
|
-
overflows:
|
|
8214
|
+
index: I,
|
|
8215
|
+
overflows: V
|
|
8214
8216
|
},
|
|
8215
8217
|
reset: {
|
|
8216
|
-
placement:
|
|
8218
|
+
placement: $
|
|
8217
8219
|
}
|
|
8218
8220
|
};
|
|
8219
|
-
let
|
|
8220
|
-
if (!
|
|
8221
|
+
let D = (k = V.filter((L) => L.overflows[0] <= 0).sort((L, A) => L.overflows[1] - A.overflows[1])[0]) == null ? void 0 : k.placement;
|
|
8222
|
+
if (!D)
|
|
8221
8223
|
switch (g) {
|
|
8222
8224
|
case "bestFit": {
|
|
8223
|
-
var
|
|
8224
|
-
const
|
|
8225
|
+
var T;
|
|
8226
|
+
const L = (T = V.filter((A) => {
|
|
8225
8227
|
if (O) {
|
|
8226
8228
|
const Z = $e(A.placement);
|
|
8227
8229
|
return Z === w || // Create a bias to the `y` side axis due to horizontal
|
|
@@ -8229,18 +8231,18 @@ const Gp = (t) => ({
|
|
|
8229
8231
|
Z === "y";
|
|
8230
8232
|
}
|
|
8231
8233
|
return !0;
|
|
8232
|
-
}).map((A) => [A.placement, A.overflows.filter((Z) => Z > 0).reduce((Z, se) => Z + se, 0)]).sort((A, Z) => A[1] - Z[1])[0]) == null ? void 0 :
|
|
8233
|
-
|
|
8234
|
+
}).map((A) => [A.placement, A.overflows.filter((Z) => Z > 0).reduce((Z, se) => Z + se, 0)]).sort((A, Z) => A[1] - Z[1])[0]) == null ? void 0 : T[0];
|
|
8235
|
+
L && (D = L);
|
|
8234
8236
|
break;
|
|
8235
8237
|
}
|
|
8236
8238
|
case "initialPlacement":
|
|
8237
|
-
|
|
8239
|
+
D = i;
|
|
8238
8240
|
break;
|
|
8239
8241
|
}
|
|
8240
|
-
if (o !==
|
|
8242
|
+
if (o !== D)
|
|
8241
8243
|
return {
|
|
8242
8244
|
reset: {
|
|
8243
|
-
placement:
|
|
8245
|
+
placement: D
|
|
8244
8246
|
}
|
|
8245
8247
|
};
|
|
8246
8248
|
}
|
|
@@ -8472,16 +8474,16 @@ const Qp = function(t) {
|
|
|
8472
8474
|
const w = m - f.top - f.bottom, x = y - f.left - f.right, S = rt(m - f[v], w), R = rt(y - f[b], x), O = !e.middlewareData.shift;
|
|
8473
8475
|
let C = S, E = R;
|
|
8474
8476
|
if ((n = e.middlewareData.shift) != null && n.enabled.x && (E = x), (r = e.middlewareData.shift) != null && r.enabled.y && (C = w), O && !d) {
|
|
8475
|
-
const
|
|
8476
|
-
g ? E = y - 2 * (
|
|
8477
|
+
const V = Re(f.left, 0), z = Re(f.right, 0), k = Re(f.top, 0), T = Re(f.bottom, 0);
|
|
8478
|
+
g ? E = y - 2 * (V !== 0 || z !== 0 ? V + z : Re(f.left, f.right)) : C = m - 2 * (k !== 0 || T !== 0 ? k + T : Re(f.top, f.bottom));
|
|
8477
8479
|
}
|
|
8478
8480
|
await c({
|
|
8479
8481
|
...e,
|
|
8480
8482
|
availableWidth: E,
|
|
8481
8483
|
availableHeight: C
|
|
8482
8484
|
});
|
|
8483
|
-
const
|
|
8484
|
-
return y !==
|
|
8485
|
+
const j = await s.getDimensions(i.floating);
|
|
8486
|
+
return y !== j.width || m !== j.height ? {
|
|
8485
8487
|
reset: {
|
|
8486
8488
|
rects: !0
|
|
8487
8489
|
}
|
|
@@ -9061,7 +9063,7 @@ function jm(t) {
|
|
|
9061
9063
|
A !== O.current && (O.current = A, m(A));
|
|
9062
9064
|
}, []), x = p.useCallback((A) => {
|
|
9063
9065
|
A !== C.current && (C.current = A, b(A));
|
|
9064
|
-
}, []), S = a || y, R = s || v, O = p.useRef(null), C = p.useRef(null), E = p.useRef(f),
|
|
9066
|
+
}, []), S = a || y, R = s || v, O = p.useRef(null), C = p.useRef(null), E = p.useRef(f), j = c != null, V = jr(c), z = jr(o), k = jr(l), T = p.useCallback(() => {
|
|
9065
9067
|
if (!O.current || !C.current)
|
|
9066
9068
|
return;
|
|
9067
9069
|
const A = {
|
|
@@ -9069,57 +9071,57 @@ function jm(t) {
|
|
|
9069
9071
|
strategy: n,
|
|
9070
9072
|
middleware: d
|
|
9071
9073
|
};
|
|
9072
|
-
|
|
9074
|
+
z.current && (A.platform = z.current), Dm(O.current, C.current, A).then((Z) => {
|
|
9073
9075
|
const se = {
|
|
9074
9076
|
...Z,
|
|
9075
9077
|
// The floating element's position may be recomputed while it's closed
|
|
9076
9078
|
// but still mounted (such as when transitioning out). To ensure
|
|
9077
9079
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
9078
9080
|
// setting it to `true` when `open === false` (must be specified).
|
|
9079
|
-
isPositioned:
|
|
9081
|
+
isPositioned: k.current !== !1
|
|
9080
9082
|
};
|
|
9081
|
-
|
|
9083
|
+
I.current && !Yn(E.current, se) && (E.current = se, mn.flushSync(() => {
|
|
9082
9084
|
u(se);
|
|
9083
9085
|
}));
|
|
9084
9086
|
});
|
|
9085
|
-
}, [d, e, n,
|
|
9087
|
+
}, [d, e, n, z, k]);
|
|
9086
9088
|
Bn(() => {
|
|
9087
9089
|
l === !1 && E.current.isPositioned && (E.current.isPositioned = !1, u((A) => ({
|
|
9088
9090
|
...A,
|
|
9089
9091
|
isPositioned: !1
|
|
9090
9092
|
})));
|
|
9091
9093
|
}, [l]);
|
|
9092
|
-
const
|
|
9093
|
-
Bn(() => (
|
|
9094
|
-
|
|
9094
|
+
const I = p.useRef(!1);
|
|
9095
|
+
Bn(() => (I.current = !0, () => {
|
|
9096
|
+
I.current = !1;
|
|
9095
9097
|
}), []), Bn(() => {
|
|
9096
9098
|
if (S && (O.current = S), R && (C.current = R), S && R) {
|
|
9097
|
-
if (
|
|
9098
|
-
return
|
|
9099
|
-
|
|
9099
|
+
if (V.current)
|
|
9100
|
+
return V.current(S, R, T);
|
|
9101
|
+
T();
|
|
9100
9102
|
}
|
|
9101
|
-
}, [S, R,
|
|
9102
|
-
const
|
|
9103
|
+
}, [S, R, T, V, j]);
|
|
9104
|
+
const $ = p.useMemo(() => ({
|
|
9103
9105
|
reference: O,
|
|
9104
9106
|
floating: C,
|
|
9105
9107
|
setReference: w,
|
|
9106
9108
|
setFloating: x
|
|
9107
|
-
}), [w, x]),
|
|
9109
|
+
}), [w, x]), D = p.useMemo(() => ({
|
|
9108
9110
|
reference: S,
|
|
9109
9111
|
floating: R
|
|
9110
|
-
}), [S, R]),
|
|
9112
|
+
}), [S, R]), L = p.useMemo(() => {
|
|
9111
9113
|
const A = {
|
|
9112
9114
|
position: n,
|
|
9113
9115
|
left: 0,
|
|
9114
9116
|
top: 0
|
|
9115
9117
|
};
|
|
9116
|
-
if (!
|
|
9118
|
+
if (!D.floating)
|
|
9117
9119
|
return A;
|
|
9118
|
-
const Z = Fa(
|
|
9120
|
+
const Z = Fa(D.floating, f.x), se = Fa(D.floating, f.y);
|
|
9119
9121
|
return i ? {
|
|
9120
9122
|
...A,
|
|
9121
9123
|
transform: "translate(" + Z + "px, " + se + "px)",
|
|
9122
|
-
...Ai(
|
|
9124
|
+
...Ai(D.floating) >= 1.5 && {
|
|
9123
9125
|
willChange: "transform"
|
|
9124
9126
|
}
|
|
9125
9127
|
} : {
|
|
@@ -9127,14 +9129,14 @@ function jm(t) {
|
|
|
9127
9129
|
left: Z,
|
|
9128
9130
|
top: se
|
|
9129
9131
|
};
|
|
9130
|
-
}, [n, i,
|
|
9132
|
+
}, [n, i, D.floating, f.x, f.y]);
|
|
9131
9133
|
return p.useMemo(() => ({
|
|
9132
9134
|
...f,
|
|
9133
|
-
update:
|
|
9134
|
-
refs:
|
|
9135
|
-
elements:
|
|
9136
|
-
floatingStyles:
|
|
9137
|
-
}), [f,
|
|
9135
|
+
update: T,
|
|
9136
|
+
refs: $,
|
|
9137
|
+
elements: D,
|
|
9138
|
+
floatingStyles: L
|
|
9139
|
+
}), [f, T, $, D, L]);
|
|
9138
9140
|
}
|
|
9139
9141
|
const $m = (t) => {
|
|
9140
9142
|
function e(n) {
|
|
@@ -9227,15 +9229,15 @@ var Ao = "PopperContent", [qm, Ym] = Ii(Ao), Fi = p.forwardRef(
|
|
|
9227
9229
|
updatePositionStrategy: g = "optimized",
|
|
9228
9230
|
onPlaced: y,
|
|
9229
9231
|
...m
|
|
9230
|
-
} = t, v = Mi(Ao, n), [b, w] = p.useState(null), x = ue(e, (_) => w(_)), [S, R] = p.useState(null), O = fi(S), C = O?.width ?? 0, E = O?.height ?? 0,
|
|
9231
|
-
padding:
|
|
9232
|
-
boundary:
|
|
9232
|
+
} = t, v = Mi(Ao, n), [b, w] = p.useState(null), x = ue(e, (_) => w(_)), [S, R] = p.useState(null), O = fi(S), C = O?.width ?? 0, E = O?.height ?? 0, j = r + (a !== "center" ? "-" + a : ""), V = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, z = Array.isArray(l) ? l : [l], k = z.length > 0, T = {
|
|
9233
|
+
padding: V,
|
|
9234
|
+
boundary: z.filter(Qm),
|
|
9233
9235
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
9234
|
-
altBoundary:
|
|
9235
|
-
}, { refs:
|
|
9236
|
+
altBoundary: k
|
|
9237
|
+
}, { refs: I, floatingStyles: $, placement: D, isPositioned: L, middlewareData: A } = jm({
|
|
9236
9238
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
9237
9239
|
strategy: "fixed",
|
|
9238
|
-
placement:
|
|
9240
|
+
placement: j,
|
|
9239
9241
|
whileElementsMounted: (..._) => Pm(..._, {
|
|
9240
9242
|
animationFrame: g === "always"
|
|
9241
9243
|
}),
|
|
@@ -9248,11 +9250,11 @@ var Ao = "PopperContent", [qm, Ym] = Ii(Ao), Fi = p.forwardRef(
|
|
|
9248
9250
|
mainAxis: !0,
|
|
9249
9251
|
crossAxis: !1,
|
|
9250
9252
|
limiter: u === "partial" ? Bm() : void 0,
|
|
9251
|
-
...
|
|
9253
|
+
...T
|
|
9252
9254
|
}),
|
|
9253
|
-
c && zm({ ...
|
|
9255
|
+
c && zm({ ...T }),
|
|
9254
9256
|
Vm({
|
|
9255
|
-
...
|
|
9257
|
+
...T,
|
|
9256
9258
|
apply: ({ elements: _, rects: G, availableWidth: ee, availableHeight: te }) => {
|
|
9257
9259
|
const { width: oe, height: le } = G.reference, be = _.floating.style;
|
|
9258
9260
|
be.setProperty("--radix-popper-available-width", `${ee}px`), be.setProperty("--radix-popper-available-height", `${te}px`), be.setProperty("--radix-popper-anchor-width", `${oe}px`), be.setProperty("--radix-popper-anchor-height", `${le}px`);
|
|
@@ -9260,23 +9262,23 @@ var Ao = "PopperContent", [qm, Ym] = Ii(Ao), Fi = p.forwardRef(
|
|
|
9260
9262
|
}),
|
|
9261
9263
|
S && Hm({ element: S, padding: i }),
|
|
9262
9264
|
Jm({ arrowWidth: C, arrowHeight: E }),
|
|
9263
|
-
d && Wm({ strategy: "referenceHidden", ...
|
|
9265
|
+
d && Wm({ strategy: "referenceHidden", ...T })
|
|
9264
9266
|
]
|
|
9265
|
-
}), [Z, se] = Vi(
|
|
9267
|
+
}), [Z, se] = Vi(D), N = tt(y);
|
|
9266
9268
|
ye(() => {
|
|
9267
|
-
|
|
9268
|
-
}, [
|
|
9269
|
-
const P = A.arrow?.x,
|
|
9269
|
+
L && N?.();
|
|
9270
|
+
}, [L, N]);
|
|
9271
|
+
const P = A.arrow?.x, M = A.arrow?.y, F = A.arrow?.centerOffset !== 0, [W, Q] = p.useState();
|
|
9270
9272
|
return ye(() => {
|
|
9271
9273
|
b && Q(window.getComputedStyle(b).zIndex);
|
|
9272
9274
|
}, [b]), /* @__PURE__ */ h.jsx(
|
|
9273
9275
|
"div",
|
|
9274
9276
|
{
|
|
9275
|
-
ref:
|
|
9277
|
+
ref: I.setFloating,
|
|
9276
9278
|
"data-radix-popper-content-wrapper": "",
|
|
9277
9279
|
style: {
|
|
9278
|
-
|
|
9279
|
-
transform:
|
|
9280
|
+
...$,
|
|
9281
|
+
transform: L ? $.transform : "translate(0, -200%)",
|
|
9280
9282
|
// keep off the page when measuring
|
|
9281
9283
|
minWidth: "max-content",
|
|
9282
9284
|
zIndex: W,
|
|
@@ -9300,7 +9302,7 @@ var Ao = "PopperContent", [qm, Ym] = Ii(Ao), Fi = p.forwardRef(
|
|
|
9300
9302
|
placedSide: Z,
|
|
9301
9303
|
onArrowChange: R,
|
|
9302
9304
|
arrowX: P,
|
|
9303
|
-
arrowY:
|
|
9305
|
+
arrowY: M,
|
|
9304
9306
|
shouldHideArrow: F,
|
|
9305
9307
|
children: /* @__PURE__ */ h.jsx(
|
|
9306
9308
|
X.div,
|
|
@@ -9313,7 +9315,7 @@ var Ao = "PopperContent", [qm, Ym] = Ii(Ao), Fi = p.forwardRef(
|
|
|
9313
9315
|
...m.style,
|
|
9314
9316
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
9315
9317
|
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
9316
|
-
animation:
|
|
9318
|
+
animation: L ? void 0 : "none"
|
|
9317
9319
|
}
|
|
9318
9320
|
}
|
|
9319
9321
|
)
|
|
@@ -9438,12 +9440,12 @@ var tg = [" ", "Enter", "ArrowUp", "ArrowDown"], ng = [" ", "Enter"], Et = "Sele
|
|
|
9438
9440
|
defaultProp: o ?? !1,
|
|
9439
9441
|
onChange: a,
|
|
9440
9442
|
caller: Et
|
|
9441
|
-
}), [
|
|
9443
|
+
}), [j, V] = xt({
|
|
9442
9444
|
prop: s,
|
|
9443
9445
|
defaultProp: i,
|
|
9444
9446
|
onChange: c,
|
|
9445
9447
|
caller: Et
|
|
9446
|
-
}),
|
|
9448
|
+
}), z = p.useRef(null), k = v ? y || !!v.closest("form") : !0, [T, I] = p.useState(/* @__PURE__ */ new Set()), $ = Array.from(T).map((D) => D.props.value).join(";");
|
|
9447
9449
|
return /* @__PURE__ */ h.jsx(Wi, { ...m, children: /* @__PURE__ */ h.jsxs(
|
|
9448
9450
|
og,
|
|
9449
9451
|
{
|
|
@@ -9456,31 +9458,31 @@ var tg = [" ", "Enter", "ArrowUp", "ArrowDown"], ng = [" ", "Enter"], Et = "Sele
|
|
|
9456
9458
|
valueNodeHasChildren: S,
|
|
9457
9459
|
onValueNodeHasChildrenChange: R,
|
|
9458
9460
|
contentId: xe(),
|
|
9459
|
-
value:
|
|
9460
|
-
onValueChange:
|
|
9461
|
+
value: j,
|
|
9462
|
+
onValueChange: V,
|
|
9461
9463
|
open: C,
|
|
9462
9464
|
onOpenChange: E,
|
|
9463
9465
|
dir: O,
|
|
9464
|
-
triggerPointerDownPosRef:
|
|
9466
|
+
triggerPointerDownPosRef: z,
|
|
9465
9467
|
disabled: d,
|
|
9466
9468
|
children: [
|
|
9467
9469
|
/* @__PURE__ */ h.jsx(pr.Provider, { scope: e, children: /* @__PURE__ */ h.jsx(
|
|
9468
9470
|
ag,
|
|
9469
9471
|
{
|
|
9470
9472
|
scope: t.__scopeSelect,
|
|
9471
|
-
onNativeOptionAdd: p.useCallback((
|
|
9472
|
-
|
|
9473
|
+
onNativeOptionAdd: p.useCallback((D) => {
|
|
9474
|
+
I((L) => new Set(L).add(D));
|
|
9473
9475
|
}, []),
|
|
9474
|
-
onNativeOptionRemove: p.useCallback((
|
|
9475
|
-
|
|
9476
|
-
const A = new Set(
|
|
9477
|
-
return A.delete(
|
|
9476
|
+
onNativeOptionRemove: p.useCallback((D) => {
|
|
9477
|
+
I((L) => {
|
|
9478
|
+
const A = new Set(L);
|
|
9479
|
+
return A.delete(D), A;
|
|
9478
9480
|
});
|
|
9479
9481
|
}, []),
|
|
9480
9482
|
children: n
|
|
9481
9483
|
}
|
|
9482
9484
|
) }),
|
|
9483
|
-
|
|
9485
|
+
k ? /* @__PURE__ */ h.jsxs(
|
|
9484
9486
|
hl,
|
|
9485
9487
|
{
|
|
9486
9488
|
"aria-hidden": !0,
|
|
@@ -9488,16 +9490,16 @@ var tg = [" ", "Enter", "ArrowUp", "ArrowDown"], ng = [" ", "Enter"], Et = "Sele
|
|
|
9488
9490
|
tabIndex: -1,
|
|
9489
9491
|
name: f,
|
|
9490
9492
|
autoComplete: u,
|
|
9491
|
-
value:
|
|
9492
|
-
onChange: (
|
|
9493
|
+
value: j,
|
|
9494
|
+
onChange: (D) => V(D.target.value),
|
|
9493
9495
|
disabled: d,
|
|
9494
9496
|
form: y,
|
|
9495
9497
|
children: [
|
|
9496
|
-
|
|
9497
|
-
Array.from(
|
|
9498
|
+
j === void 0 ? /* @__PURE__ */ h.jsx("option", { value: "" }) : null,
|
|
9499
|
+
Array.from(T)
|
|
9498
9500
|
]
|
|
9499
9501
|
},
|
|
9500
|
-
|
|
9502
|
+
$
|
|
9501
9503
|
) : null
|
|
9502
9504
|
]
|
|
9503
9505
|
}
|
|
@@ -9612,26 +9614,26 @@ var ke = 10, [tl, ut] = qt(Rt), cg = "SelectContentImpl", ug = /* @__PURE__ */ w
|
|
|
9612
9614
|
avoidCollisions: v,
|
|
9613
9615
|
//
|
|
9614
9616
|
...b
|
|
9615
|
-
} = t, w = ct(Rt, n), [x, S] = p.useState(null), [R, O] = p.useState(null), C = ue(e, (_) => S(_)), [E,
|
|
9617
|
+
} = t, w = ct(Rt, n), [x, S] = p.useState(null), [R, O] = p.useState(null), C = ue(e, (_) => S(_)), [E, j] = p.useState(null), [V, z] = p.useState(
|
|
9616
9618
|
null
|
|
9617
|
-
),
|
|
9619
|
+
), k = mr(n), [T, I] = p.useState(!1), $ = p.useRef(!1);
|
|
9618
9620
|
p.useEffect(() => {
|
|
9619
9621
|
if (x) return mo(x);
|
|
9620
9622
|
}, [x]), po();
|
|
9621
|
-
const
|
|
9623
|
+
const D = p.useCallback(
|
|
9622
9624
|
(_) => {
|
|
9623
|
-
const [G, ...ee] =
|
|
9625
|
+
const [G, ...ee] = k().map((le) => le.ref.current), [te] = ee.slice(-1), oe = document.activeElement;
|
|
9624
9626
|
for (const le of _)
|
|
9625
9627
|
if (le === oe || (le?.scrollIntoView({ block: "nearest" }), le === G && R && (R.scrollTop = 0), le === te && R && (R.scrollTop = R.scrollHeight), le?.focus(), document.activeElement !== oe)) return;
|
|
9626
9628
|
},
|
|
9627
|
-
[
|
|
9628
|
-
),
|
|
9629
|
-
() =>
|
|
9630
|
-
[
|
|
9629
|
+
[k, R]
|
|
9630
|
+
), L = p.useCallback(
|
|
9631
|
+
() => D([E, x]),
|
|
9632
|
+
[D, E, x]
|
|
9631
9633
|
);
|
|
9632
9634
|
p.useEffect(() => {
|
|
9633
|
-
|
|
9634
|
-
}, [
|
|
9635
|
+
T && L();
|
|
9636
|
+
}, [T, L]);
|
|
9635
9637
|
const { onOpenChange: A, triggerPointerDownPosRef: Z } = w;
|
|
9636
9638
|
p.useEffect(() => {
|
|
9637
9639
|
if (x) {
|
|
@@ -9655,18 +9657,18 @@ var ke = 10, [tl, ut] = qt(Rt), cg = "SelectContentImpl", ug = /* @__PURE__ */ w
|
|
|
9655
9657
|
};
|
|
9656
9658
|
}, [A]);
|
|
9657
9659
|
const [se, N] = yl((_) => {
|
|
9658
|
-
const G =
|
|
9660
|
+
const G = k().filter((oe) => !oe.disabled), ee = G.find((oe) => oe.ref.current === document.activeElement), te = bl(G, _, ee);
|
|
9659
9661
|
te && setTimeout(() => te.ref.current.focus());
|
|
9660
9662
|
}), P = p.useCallback(
|
|
9661
9663
|
(_, G, ee) => {
|
|
9662
|
-
const te =
|
|
9663
|
-
(w.value !== void 0 && w.value === G || te) && (
|
|
9664
|
+
const te = !$.current && !ee;
|
|
9665
|
+
(w.value !== void 0 && w.value === G || te) && (j(_), te && ($.current = !0));
|
|
9664
9666
|
},
|
|
9665
9667
|
[w.value]
|
|
9666
|
-
),
|
|
9668
|
+
), M = p.useCallback(() => x?.focus(), [x]), F = p.useCallback(
|
|
9667
9669
|
(_, G, ee) => {
|
|
9668
|
-
const te =
|
|
9669
|
-
(w.value !== void 0 && w.value === G || te) &&
|
|
9670
|
+
const te = !$.current && !ee;
|
|
9671
|
+
(w.value !== void 0 && w.value === G || te) && z(_);
|
|
9670
9672
|
},
|
|
9671
9673
|
[w.value]
|
|
9672
9674
|
), W = r === "popper" ? to : rl, Q = W === to ? {
|
|
@@ -9690,12 +9692,12 @@ var ke = 10, [tl, ut] = qt(Rt), cg = "SelectContentImpl", ug = /* @__PURE__ */ w
|
|
|
9690
9692
|
onViewportChange: O,
|
|
9691
9693
|
itemRefCallback: P,
|
|
9692
9694
|
selectedItem: E,
|
|
9693
|
-
onItemLeave:
|
|
9695
|
+
onItemLeave: M,
|
|
9694
9696
|
itemTextRefCallback: F,
|
|
9695
|
-
focusSelectedItem:
|
|
9696
|
-
selectedItemText:
|
|
9697
|
+
focusSelectedItem: L,
|
|
9698
|
+
selectedItemText: V,
|
|
9697
9699
|
position: r,
|
|
9698
|
-
isPositioned:
|
|
9700
|
+
isPositioned: T,
|
|
9699
9701
|
searchRef: se,
|
|
9700
9702
|
children: /* @__PURE__ */ h.jsx(ar, { as: ug, allowPinchZoom: !0, children: /* @__PURE__ */ h.jsx(
|
|
9701
9703
|
nr,
|
|
@@ -9727,7 +9729,7 @@ var ke = 10, [tl, ut] = qt(Rt), cg = "SelectContentImpl", ug = /* @__PURE__ */ w
|
|
|
9727
9729
|
onContextMenu: (_) => _.preventDefault(),
|
|
9728
9730
|
...b,
|
|
9729
9731
|
...Q,
|
|
9730
|
-
onPlaced: () =>
|
|
9732
|
+
onPlaced: () => I(!0),
|
|
9731
9733
|
ref: C,
|
|
9732
9734
|
style: {
|
|
9733
9735
|
// flex layout so we can place the scroll buttons properly
|
|
@@ -9740,12 +9742,12 @@ var ke = 10, [tl, ut] = qt(Rt), cg = "SelectContentImpl", ug = /* @__PURE__ */ w
|
|
|
9740
9742
|
onKeyDown: ne(b.onKeyDown, (_) => {
|
|
9741
9743
|
const G = _.ctrlKey || _.altKey || _.metaKey;
|
|
9742
9744
|
if (_.key === "Tab" && _.preventDefault(), !G && _.key.length === 1 && N(_.key), ["ArrowUp", "ArrowDown", "Home", "End"].includes(_.key)) {
|
|
9743
|
-
let te =
|
|
9745
|
+
let te = k().filter((oe) => !oe.disabled).map((oe) => oe.ref.current);
|
|
9744
9746
|
if (["ArrowUp", "End"].includes(_.key) && (te = te.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(_.key)) {
|
|
9745
9747
|
const oe = _.target, le = te.indexOf(oe);
|
|
9746
9748
|
te = te.slice(le + 1);
|
|
9747
9749
|
}
|
|
9748
|
-
setTimeout(() =>
|
|
9750
|
+
setTimeout(() => D(te)), _.preventDefault();
|
|
9749
9751
|
}
|
|
9750
9752
|
})
|
|
9751
9753
|
}
|
|
@@ -9762,9 +9764,9 @@ nl.displayName = cg;
|
|
|
9762
9764
|
var dg = "SelectItemAlignedPosition", rl = p.forwardRef((t, e) => {
|
|
9763
9765
|
const { __scopeSelect: n, onPlaced: r, ...o } = t, a = ct(Rt, n), s = ut(Rt, n), [i, c] = p.useState(null), [l, f] = p.useState(null), u = ue(e, (C) => f(C)), d = mr(n), g = p.useRef(!1), y = p.useRef(!0), { viewport: m, selectedItem: v, selectedItemText: b, focusSelectedItem: w } = s, x = p.useCallback(() => {
|
|
9764
9766
|
if (a.trigger && a.valueNode && i && l && m && v && b) {
|
|
9765
|
-
const C = a.trigger.getBoundingClientRect(), E = l.getBoundingClientRect(),
|
|
9767
|
+
const C = a.trigger.getBoundingClientRect(), E = l.getBoundingClientRect(), j = a.valueNode.getBoundingClientRect(), V = b.getBoundingClientRect();
|
|
9766
9768
|
if (a.dir !== "rtl") {
|
|
9767
|
-
const oe =
|
|
9769
|
+
const oe = V.left - E.left, le = j.left - oe, be = C.left - le, q = C.width + be, Ot = Math.max(q, E.width), _t = window.innerWidth - ke, ft = ka(le, [
|
|
9768
9770
|
ke,
|
|
9769
9771
|
// Prevents the content from going off the starting edge of the
|
|
9770
9772
|
// viewport. It may still go off the ending edge, but this can be
|
|
@@ -9775,33 +9777,33 @@ var dg = "SelectItemAlignedPosition", rl = p.forwardRef((t, e) => {
|
|
|
9775
9777
|
]);
|
|
9776
9778
|
i.style.minWidth = q + "px", i.style.left = ft + "px";
|
|
9777
9779
|
} else {
|
|
9778
|
-
const oe = E.right -
|
|
9780
|
+
const oe = E.right - V.right, le = window.innerWidth - j.right - oe, be = window.innerWidth - C.right - le, q = C.width + be, Ot = Math.max(q, E.width), _t = window.innerWidth - ke, ft = ka(le, [
|
|
9779
9781
|
ke,
|
|
9780
9782
|
Math.max(ke, _t - Ot)
|
|
9781
9783
|
]);
|
|
9782
9784
|
i.style.minWidth = q + "px", i.style.right = ft + "px";
|
|
9783
9785
|
}
|
|
9784
|
-
const
|
|
9786
|
+
const z = d(), k = window.innerHeight - ke * 2, T = m.scrollHeight, I = window.getComputedStyle(l), $ = parseInt(I.borderTopWidth, 10), D = parseInt(I.paddingTop, 10), L = parseInt(I.borderBottomWidth, 10), A = parseInt(I.paddingBottom, 10), Z = $ + D + T + A + L, se = Math.min(v.offsetHeight * 5, Z), N = window.getComputedStyle(m), P = parseInt(N.paddingTop, 10), M = parseInt(N.paddingBottom, 10), F = C.top + C.height / 2 - ke, W = k - F, Q = v.offsetHeight / 2, _ = v.offsetTop + Q, G = $ + D + _, ee = Z - G;
|
|
9785
9787
|
if (G <= F) {
|
|
9786
|
-
const oe =
|
|
9788
|
+
const oe = z.length > 0 && v === z[z.length - 1].ref.current;
|
|
9787
9789
|
i.style.bottom = "0px";
|
|
9788
9790
|
const le = l.clientHeight - m.offsetTop - m.offsetHeight, be = Math.max(
|
|
9789
9791
|
W,
|
|
9790
9792
|
Q + // viewport might have padding bottom, include it to avoid a scrollable viewport
|
|
9791
|
-
(oe ?
|
|
9793
|
+
(oe ? M : 0) + le + L
|
|
9792
9794
|
), q = G + be;
|
|
9793
9795
|
i.style.height = q + "px";
|
|
9794
9796
|
} else {
|
|
9795
|
-
const oe =
|
|
9797
|
+
const oe = z.length > 0 && v === z[0].ref.current;
|
|
9796
9798
|
i.style.top = "0px";
|
|
9797
9799
|
const be = Math.max(
|
|
9798
9800
|
F,
|
|
9799
|
-
|
|
9801
|
+
$ + m.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
|
|
9800
9802
|
(oe ? P : 0) + Q
|
|
9801
9803
|
) + ee;
|
|
9802
9804
|
i.style.height = be + "px", m.scrollTop = G - F + m.offsetTop;
|
|
9803
9805
|
}
|
|
9804
|
-
i.style.margin = `${ke}px 0`, i.style.minHeight = se + "px", i.style.maxHeight =
|
|
9806
|
+
i.style.margin = `${ke}px 0`, i.style.minHeight = se + "px", i.style.maxHeight = k + "px", r?.(), requestAnimationFrame(() => g.current = !0);
|
|
9805
9807
|
}
|
|
9806
9808
|
}, [
|
|
9807
9809
|
d,
|
|
@@ -10345,8 +10347,8 @@ function Jg(t, e, n) {
|
|
|
10345
10347
|
}
|
|
10346
10348
|
var rn = '[cmdk-group=""]', Fr = '[cmdk-group-items=""]', Zg = '[cmdk-group-heading=""]', xl = '[cmdk-item=""]', Va = `${xl}:not([aria-disabled="true"])`, io = "cmdk-item-select", $t = "data-value", eh = (t, e, n) => Jg(t, e, n), Sl = p.createContext(void 0), yn = () => p.useContext(Sl), Cl = p.createContext(void 0), Mo = () => p.useContext(Cl), El = p.createContext(void 0), Rl = p.forwardRef((t, e) => {
|
|
10347
10349
|
let n = Lt(() => {
|
|
10348
|
-
var P,
|
|
10349
|
-
return { search: "", value: (
|
|
10350
|
+
var P, M;
|
|
10351
|
+
return { search: "", value: (M = (P = t.value) != null ? P : t.defaultValue) != null ? M : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
|
|
10350
10352
|
}), r = Lt(() => /* @__PURE__ */ new Set()), o = Lt(() => /* @__PURE__ */ new Map()), a = Lt(() => /* @__PURE__ */ new Map()), s = Lt(() => /* @__PURE__ */ new Set()), i = Pl(t), { label: c, children: l, value: f, onValueChange: u, filter: d, shouldFilter: g, loop: y, disablePointerSelection: m = !1, vimBindings: v = !0, ...b } = t, w = xe(), x = xe(), S = xe(), R = p.useRef(null), O = dh();
|
|
10351
10353
|
Pt(() => {
|
|
10352
10354
|
if (f !== void 0) {
|
|
@@ -10354,12 +10356,12 @@ var rn = '[cmdk-group=""]', Fr = '[cmdk-group-items=""]', Zg = '[cmdk-group-head
|
|
|
10354
10356
|
n.current.value = P, C.emit();
|
|
10355
10357
|
}
|
|
10356
10358
|
}, [f]), Pt(() => {
|
|
10357
|
-
O(6,
|
|
10359
|
+
O(6, T);
|
|
10358
10360
|
}, []);
|
|
10359
|
-
let C = p.useMemo(() => ({ subscribe: (P) => (s.current.add(P), () => s.current.delete(P)), snapshot: () => n.current, setState: (P,
|
|
10361
|
+
let C = p.useMemo(() => ({ subscribe: (P) => (s.current.add(P), () => s.current.delete(P)), snapshot: () => n.current, setState: (P, M, F) => {
|
|
10360
10362
|
var W, Q, _, G;
|
|
10361
|
-
if (!Object.is(n.current[P],
|
|
10362
|
-
if (n.current[P] =
|
|
10363
|
+
if (!Object.is(n.current[P], M)) {
|
|
10364
|
+
if (n.current[P] = M, P === "search") k(), V(), O(1, z);
|
|
10363
10365
|
else if (P === "value") {
|
|
10364
10366
|
if (document.activeElement.hasAttribute("cmdk-input") || document.activeElement.hasAttribute("cmdk-root")) {
|
|
10365
10367
|
let ee = document.getElementById(S);
|
|
@@ -10367,9 +10369,9 @@ var rn = '[cmdk-group=""]', Fr = '[cmdk-group-items=""]', Zg = '[cmdk-group-head
|
|
|
10367
10369
|
}
|
|
10368
10370
|
if (O(7, () => {
|
|
10369
10371
|
var ee;
|
|
10370
|
-
n.current.selectedItemId = (ee =
|
|
10371
|
-
}), F || O(5,
|
|
10372
|
-
let ee =
|
|
10372
|
+
n.current.selectedItemId = (ee = I()) == null ? void 0 : ee.id, C.emit();
|
|
10373
|
+
}), F || O(5, T), ((Q = i.current) == null ? void 0 : Q.value) !== void 0) {
|
|
10374
|
+
let ee = M ?? "";
|
|
10373
10375
|
(G = (_ = i.current).onValueChange) == null || G.call(_, ee);
|
|
10374
10376
|
return;
|
|
10375
10377
|
}
|
|
@@ -10378,57 +10380,57 @@ var rn = '[cmdk-group=""]', Fr = '[cmdk-group-items=""]', Zg = '[cmdk-group-head
|
|
|
10378
10380
|
}
|
|
10379
10381
|
}, emit: () => {
|
|
10380
10382
|
s.current.forEach((P) => P());
|
|
10381
|
-
} }), []), E = p.useMemo(() => ({ value: (P,
|
|
10383
|
+
} }), []), E = p.useMemo(() => ({ value: (P, M, F) => {
|
|
10382
10384
|
var W;
|
|
10383
|
-
|
|
10384
|
-
|
|
10385
|
+
M !== ((W = a.current.get(P)) == null ? void 0 : W.value) && (a.current.set(P, { value: M, keywords: F }), n.current.filtered.items.set(P, j(M, F)), O(2, () => {
|
|
10386
|
+
V(), C.emit();
|
|
10385
10387
|
}));
|
|
10386
|
-
}, item: (P,
|
|
10387
|
-
|
|
10388
|
+
}, item: (P, M) => (r.current.add(P), M && (o.current.has(M) ? o.current.get(M).add(P) : o.current.set(M, /* @__PURE__ */ new Set([P]))), O(3, () => {
|
|
10389
|
+
k(), V(), n.current.value || z(), C.emit();
|
|
10388
10390
|
}), () => {
|
|
10389
10391
|
a.current.delete(P), r.current.delete(P), n.current.filtered.items.delete(P);
|
|
10390
|
-
let F =
|
|
10392
|
+
let F = I();
|
|
10391
10393
|
O(4, () => {
|
|
10392
|
-
|
|
10394
|
+
k(), F?.getAttribute("id") === P && z(), C.emit();
|
|
10393
10395
|
});
|
|
10394
10396
|
}), group: (P) => (o.current.has(P) || o.current.set(P, /* @__PURE__ */ new Set()), () => {
|
|
10395
10397
|
a.current.delete(P), o.current.delete(P);
|
|
10396
10398
|
}), filter: () => i.current.shouldFilter, label: c || t["aria-label"], getDisablePointerSelection: () => i.current.disablePointerSelection, listId: w, inputId: S, labelId: x, listInnerRef: R }), []);
|
|
10397
|
-
function
|
|
10399
|
+
function j(P, M) {
|
|
10398
10400
|
var F, W;
|
|
10399
10401
|
let Q = (W = (F = i.current) == null ? void 0 : F.filter) != null ? W : eh;
|
|
10400
|
-
return P ? Q(P, n.current.search,
|
|
10402
|
+
return P ? Q(P, n.current.search, M) : 0;
|
|
10401
10403
|
}
|
|
10402
|
-
function
|
|
10404
|
+
function V() {
|
|
10403
10405
|
if (!n.current.search || i.current.shouldFilter === !1) return;
|
|
10404
|
-
let P = n.current.filtered.items,
|
|
10406
|
+
let P = n.current.filtered.items, M = [];
|
|
10405
10407
|
n.current.filtered.groups.forEach((W) => {
|
|
10406
10408
|
let Q = o.current.get(W), _ = 0;
|
|
10407
10409
|
Q.forEach((G) => {
|
|
10408
10410
|
let ee = P.get(G);
|
|
10409
10411
|
_ = Math.max(ee, _);
|
|
10410
|
-
}),
|
|
10412
|
+
}), M.push([W, _]);
|
|
10411
10413
|
});
|
|
10412
10414
|
let F = R.current;
|
|
10413
|
-
|
|
10415
|
+
$().sort((W, Q) => {
|
|
10414
10416
|
var _, G;
|
|
10415
10417
|
let ee = W.getAttribute("id"), te = Q.getAttribute("id");
|
|
10416
10418
|
return ((_ = P.get(te)) != null ? _ : 0) - ((G = P.get(ee)) != null ? G : 0);
|
|
10417
10419
|
}).forEach((W) => {
|
|
10418
10420
|
let Q = W.closest(Fr);
|
|
10419
10421
|
Q ? Q.appendChild(W.parentElement === Q ? W : W.closest(`${Fr} > *`)) : F.appendChild(W.parentElement === F ? W : W.closest(`${Fr} > *`));
|
|
10420
|
-
}),
|
|
10422
|
+
}), M.sort((W, Q) => Q[1] - W[1]).forEach((W) => {
|
|
10421
10423
|
var Q;
|
|
10422
10424
|
let _ = (Q = R.current) == null ? void 0 : Q.querySelector(`${rn}[${$t}="${encodeURIComponent(W[0])}"]`);
|
|
10423
10425
|
_?.parentElement.appendChild(_);
|
|
10424
10426
|
});
|
|
10425
10427
|
}
|
|
10426
|
-
function
|
|
10427
|
-
let P =
|
|
10428
|
-
C.setState("value",
|
|
10428
|
+
function z() {
|
|
10429
|
+
let P = $().find((F) => F.getAttribute("aria-disabled") !== "true"), M = P?.getAttribute($t);
|
|
10430
|
+
C.setState("value", M || void 0);
|
|
10429
10431
|
}
|
|
10430
|
-
function
|
|
10431
|
-
var P,
|
|
10432
|
+
function k() {
|
|
10433
|
+
var P, M, F, W;
|
|
10432
10434
|
if (!n.current.search || i.current.shouldFilter === !1) {
|
|
10433
10435
|
n.current.filtered.count = r.current.size;
|
|
10434
10436
|
return;
|
|
@@ -10436,7 +10438,7 @@ var rn = '[cmdk-group=""]', Fr = '[cmdk-group-items=""]', Zg = '[cmdk-group-head
|
|
|
10436
10438
|
n.current.filtered.groups = /* @__PURE__ */ new Set();
|
|
10437
10439
|
let Q = 0;
|
|
10438
10440
|
for (let _ of r.current) {
|
|
10439
|
-
let G = (
|
|
10441
|
+
let G = (M = (P = a.current.get(_)) == null ? void 0 : P.value) != null ? M : "", ee = (W = (F = a.current.get(_)) == null ? void 0 : F.keywords) != null ? W : [], te = j(G, ee);
|
|
10440
10442
|
n.current.filtered.items.set(_, te), te > 0 && Q++;
|
|
10441
10443
|
}
|
|
10442
10444
|
for (let [_, G] of o.current) for (let ee of G) if (n.current.filtered.items.get(ee) > 0) {
|
|
@@ -10445,41 +10447,41 @@ var rn = '[cmdk-group=""]', Fr = '[cmdk-group-items=""]', Zg = '[cmdk-group-head
|
|
|
10445
10447
|
}
|
|
10446
10448
|
n.current.filtered.count = Q;
|
|
10447
10449
|
}
|
|
10448
|
-
function
|
|
10449
|
-
var P,
|
|
10450
|
-
let W =
|
|
10451
|
-
W && (((P = W.parentElement) == null ? void 0 : P.firstChild) === W && ((F = (
|
|
10450
|
+
function T() {
|
|
10451
|
+
var P, M, F;
|
|
10452
|
+
let W = I();
|
|
10453
|
+
W && (((P = W.parentElement) == null ? void 0 : P.firstChild) === W && ((F = (M = W.closest(rn)) == null ? void 0 : M.querySelector(Zg)) == null || F.scrollIntoView({ block: "nearest" })), W.scrollIntoView({ block: "nearest" }));
|
|
10452
10454
|
}
|
|
10453
|
-
function
|
|
10455
|
+
function I() {
|
|
10454
10456
|
var P;
|
|
10455
10457
|
return (P = R.current) == null ? void 0 : P.querySelector(`${xl}[aria-selected="true"]`);
|
|
10456
10458
|
}
|
|
10457
|
-
function
|
|
10459
|
+
function $() {
|
|
10458
10460
|
var P;
|
|
10459
10461
|
return Array.from(((P = R.current) == null ? void 0 : P.querySelectorAll(Va)) || []);
|
|
10460
10462
|
}
|
|
10461
|
-
function
|
|
10462
|
-
let
|
|
10463
|
-
|
|
10463
|
+
function D(P) {
|
|
10464
|
+
let M = $()[P];
|
|
10465
|
+
M && C.setState("value", M.getAttribute($t));
|
|
10464
10466
|
}
|
|
10465
|
-
function
|
|
10466
|
-
var
|
|
10467
|
-
let F =
|
|
10468
|
-
(
|
|
10467
|
+
function L(P) {
|
|
10468
|
+
var M;
|
|
10469
|
+
let F = I(), W = $(), Q = W.findIndex((G) => G === F), _ = W[Q + P];
|
|
10470
|
+
(M = i.current) != null && M.loop && (_ = Q + P < 0 ? W[W.length - 1] : Q + P === W.length ? W[0] : W[Q + P]), _ && C.setState("value", _.getAttribute($t));
|
|
10469
10471
|
}
|
|
10470
10472
|
function A(P) {
|
|
10471
|
-
let
|
|
10473
|
+
let M = I(), F = M?.closest(rn), W;
|
|
10472
10474
|
for (; F && !W; ) F = P > 0 ? ch(F, rn) : uh(F, rn), W = F?.querySelector(Va);
|
|
10473
|
-
W ? C.setState("value", W.getAttribute($t)) :
|
|
10475
|
+
W ? C.setState("value", W.getAttribute($t)) : L(P);
|
|
10474
10476
|
}
|
|
10475
|
-
let Z = () =>
|
|
10476
|
-
P.preventDefault(), P.metaKey ? Z() : P.altKey ? A(1) :
|
|
10477
|
+
let Z = () => D($().length - 1), se = (P) => {
|
|
10478
|
+
P.preventDefault(), P.metaKey ? Z() : P.altKey ? A(1) : L(1);
|
|
10477
10479
|
}, N = (P) => {
|
|
10478
|
-
P.preventDefault(), P.metaKey ?
|
|
10480
|
+
P.preventDefault(), P.metaKey ? D(0) : P.altKey ? A(-1) : L(-1);
|
|
10479
10481
|
};
|
|
10480
10482
|
return p.createElement(X.div, { ref: e, tabIndex: -1, ...b, "cmdk-root": "", onKeyDown: (P) => {
|
|
10481
|
-
var
|
|
10482
|
-
(
|
|
10483
|
+
var M;
|
|
10484
|
+
(M = b.onKeyDown) == null || M.call(b, P);
|
|
10483
10485
|
let F = P.nativeEvent.isComposing || P.keyCode === 229;
|
|
10484
10486
|
if (!(P.defaultPrevented || F)) switch (P.key) {
|
|
10485
10487
|
case "n":
|
|
@@ -10501,7 +10503,7 @@ var rn = '[cmdk-group=""]', Fr = '[cmdk-group-items=""]', Zg = '[cmdk-group-head
|
|
|
10501
10503
|
break;
|
|
10502
10504
|
}
|
|
10503
10505
|
case "Home": {
|
|
10504
|
-
P.preventDefault(),
|
|
10506
|
+
P.preventDefault(), D(0);
|
|
10505
10507
|
break;
|
|
10506
10508
|
}
|
|
10507
10509
|
case "End": {
|
|
@@ -10510,7 +10512,7 @@ var rn = '[cmdk-group=""]', Fr = '[cmdk-group-items=""]', Zg = '[cmdk-group-head
|
|
|
10510
10512
|
}
|
|
10511
10513
|
case "Enter": {
|
|
10512
10514
|
P.preventDefault();
|
|
10513
|
-
let W =
|
|
10515
|
+
let W = I();
|
|
10514
10516
|
if (W) {
|
|
10515
10517
|
let Q = new Event(io);
|
|
10516
10518
|
W.dispatchEvent(Q);
|
|
@@ -11600,14 +11602,14 @@ var pv = p.forwardRef((t, e) => {
|
|
|
11600
11602
|
R.current = !0;
|
|
11601
11603
|
}),
|
|
11602
11604
|
onFocus: ne(t.onFocus, (E) => {
|
|
11603
|
-
const
|
|
11604
|
-
if (E.target === E.currentTarget &&
|
|
11605
|
-
const
|
|
11606
|
-
if (E.currentTarget.dispatchEvent(
|
|
11607
|
-
const
|
|
11605
|
+
const j = !R.current;
|
|
11606
|
+
if (E.target === E.currentTarget && j && !b) {
|
|
11607
|
+
const V = new CustomEvent(zr, lv);
|
|
11608
|
+
if (E.currentTarget.dispatchEvent(V), !V.defaultPrevented) {
|
|
11609
|
+
const z = S().filter((D) => D.focusable), k = z.find((D) => D.active), T = z.find((D) => D.id === m), $ = [k, T, ...z].filter(
|
|
11608
11610
|
Boolean
|
|
11609
|
-
).map((
|
|
11610
|
-
Kl(
|
|
11611
|
+
).map((D) => D.ref.current);
|
|
11612
|
+
Kl($, f);
|
|
11611
11613
|
}
|
|
11612
11614
|
}
|
|
11613
11615
|
R.current = !1;
|