@unizap/uniui 1.0.37 → 1.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/uniui.css +1 -1
- package/dist/uniui.js +655 -663
- package/dist/uniui.umd.cjs +44 -44
- package/package.json +1 -1
package/dist/uniui.js
CHANGED
|
@@ -55,7 +55,7 @@ function io() {
|
|
|
55
55
|
return m.$$typeof === ee ? null : m.displayName || m.name || null;
|
|
56
56
|
if (typeof m == "string") return m;
|
|
57
57
|
switch (m) {
|
|
58
|
-
case
|
|
58
|
+
case f:
|
|
59
59
|
return "Fragment";
|
|
60
60
|
case C:
|
|
61
61
|
return "Profiler";
|
|
@@ -72,11 +72,11 @@ function io() {
|
|
|
72
72
|
switch (typeof m.tag == "number" && console.error(
|
|
73
73
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
74
74
|
), m.$$typeof) {
|
|
75
|
-
case
|
|
75
|
+
case x:
|
|
76
76
|
return "Portal";
|
|
77
77
|
case w:
|
|
78
78
|
return (m.displayName || "Context") + ".Provider";
|
|
79
|
-
case
|
|
79
|
+
case M:
|
|
80
80
|
return (m._context.displayName || "Context") + ".Consumer";
|
|
81
81
|
case L:
|
|
82
82
|
var y = m.render;
|
|
@@ -104,8 +104,8 @@ function io() {
|
|
|
104
104
|
}
|
|
105
105
|
if (y) {
|
|
106
106
|
y = console;
|
|
107
|
-
var
|
|
108
|
-
return
|
|
107
|
+
var E = y.error, _ = typeof Symbol == "function" && Symbol.toStringTag && m[Symbol.toStringTag] || m.constructor.name || "Object";
|
|
108
|
+
return E.call(
|
|
109
109
|
y,
|
|
110
110
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
111
111
|
_
|
|
@@ -113,7 +113,7 @@ function io() {
|
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
function o(m) {
|
|
116
|
-
if (m ===
|
|
116
|
+
if (m === f) return "<>";
|
|
117
117
|
if (typeof m == "object" && m !== null && m.$$typeof === H)
|
|
118
118
|
return "<...>";
|
|
119
119
|
try {
|
|
@@ -138,14 +138,14 @@ function io() {
|
|
|
138
138
|
return m.key !== void 0;
|
|
139
139
|
}
|
|
140
140
|
function s(m, y) {
|
|
141
|
-
function
|
|
141
|
+
function E() {
|
|
142
142
|
Y || (Y = !0, console.error(
|
|
143
143
|
"%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)",
|
|
144
144
|
y
|
|
145
145
|
));
|
|
146
146
|
}
|
|
147
|
-
|
|
148
|
-
get:
|
|
147
|
+
E.isReactWarning = !0, Object.defineProperty(m, "key", {
|
|
148
|
+
get: E,
|
|
149
149
|
configurable: !0
|
|
150
150
|
});
|
|
151
151
|
}
|
|
@@ -155,14 +155,14 @@ function io() {
|
|
|
155
155
|
"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."
|
|
156
156
|
)), m = this.props.ref, m !== void 0 ? m : null;
|
|
157
157
|
}
|
|
158
|
-
function p(m, y,
|
|
159
|
-
return
|
|
160
|
-
$$typeof:
|
|
158
|
+
function p(m, y, E, _, F, z, A, R) {
|
|
159
|
+
return E = z.ref, m = {
|
|
160
|
+
$$typeof: g,
|
|
161
161
|
type: m,
|
|
162
162
|
key: y,
|
|
163
163
|
props: z,
|
|
164
164
|
_owner: F
|
|
165
|
-
}, (
|
|
165
|
+
}, (E !== void 0 ? E : null) !== null ? Object.defineProperty(m, "ref", {
|
|
166
166
|
enumerable: !1,
|
|
167
167
|
get: c
|
|
168
168
|
}) : Object.defineProperty(m, "ref", { enumerable: !1, value: null }), m._store = {}, Object.defineProperty(m._store, "validated", {
|
|
@@ -187,19 +187,19 @@ function io() {
|
|
|
187
187
|
value: R
|
|
188
188
|
}), Object.freeze && (Object.freeze(m.props), Object.freeze(m)), m;
|
|
189
189
|
}
|
|
190
|
-
function u(m, y,
|
|
190
|
+
function u(m, y, E, _, F, z, A, R) {
|
|
191
191
|
var $ = y.children;
|
|
192
192
|
if ($ !== void 0)
|
|
193
193
|
if (_)
|
|
194
194
|
if (U($)) {
|
|
195
195
|
for (_ = 0; _ < $.length; _++)
|
|
196
|
-
|
|
196
|
+
v($[_]);
|
|
197
197
|
Object.freeze && Object.freeze($);
|
|
198
198
|
} else
|
|
199
199
|
console.error(
|
|
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
|
-
else
|
|
202
|
+
else v($);
|
|
203
203
|
if (ce.call(y, "key")) {
|
|
204
204
|
$ = e(m);
|
|
205
205
|
var V = Object.keys(y).filter(function(j) {
|
|
@@ -218,13 +218,13 @@ React keys must be passed directly to JSX without using spread:
|
|
|
218
218
|
$
|
|
219
219
|
), K[$ + _] = !0);
|
|
220
220
|
}
|
|
221
|
-
if ($ = null,
|
|
222
|
-
|
|
221
|
+
if ($ = null, E !== void 0 && (t(E), $ = "" + E), l(y) && (t(y.key), $ = "" + y.key), "key" in y) {
|
|
222
|
+
E = {};
|
|
223
223
|
for (var q in y)
|
|
224
|
-
q !== "key" && (
|
|
225
|
-
} else
|
|
224
|
+
q !== "key" && (E[q] = y[q]);
|
|
225
|
+
} else E = y;
|
|
226
226
|
return $ && s(
|
|
227
|
-
|
|
227
|
+
E,
|
|
228
228
|
typeof m == "function" ? m.displayName || m.name || "Unknown" : m
|
|
229
229
|
), p(
|
|
230
230
|
m,
|
|
@@ -232,44 +232,44 @@ React keys must be passed directly to JSX without using spread:
|
|
|
232
232
|
z,
|
|
233
233
|
F,
|
|
234
234
|
r(),
|
|
235
|
-
|
|
235
|
+
E,
|
|
236
236
|
A,
|
|
237
237
|
R
|
|
238
238
|
);
|
|
239
239
|
}
|
|
240
|
-
function
|
|
241
|
-
typeof m == "object" && m !== null && m.$$typeof ===
|
|
240
|
+
function v(m) {
|
|
241
|
+
typeof m == "object" && m !== null && m.$$typeof === g && m._store && (m._store.validated = 1);
|
|
242
242
|
}
|
|
243
|
-
var
|
|
243
|
+
var d = Ce, g = Symbol.for("react.transitional.element"), x = Symbol.for("react.portal"), f = Symbol.for("react.fragment"), h = Symbol.for("react.strict_mode"), C = Symbol.for("react.profiler"), M = Symbol.for("react.consumer"), w = Symbol.for("react.context"), L = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), I = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), H = Symbol.for("react.lazy"), N = Symbol.for("react.activity"), ee = Symbol.for("react.client.reference"), ie = d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ce = Object.prototype.hasOwnProperty, U = Array.isArray, O = console.createTask ? console.createTask : function() {
|
|
244
244
|
return null;
|
|
245
245
|
};
|
|
246
|
-
|
|
246
|
+
d = {
|
|
247
247
|
"react-stack-bottom-frame": function(m) {
|
|
248
248
|
return m();
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
|
-
var Y, D = {}, Q =
|
|
252
|
-
|
|
251
|
+
var Y, D = {}, Q = d["react-stack-bottom-frame"].bind(
|
|
252
|
+
d,
|
|
253
253
|
i
|
|
254
254
|
)(), pe = O(o(i)), K = {};
|
|
255
|
-
Ae.Fragment =
|
|
255
|
+
Ae.Fragment = f, Ae.jsx = function(m, y, E, _, F) {
|
|
256
256
|
var z = 1e4 > ie.recentlyCreatedOwnerStacks++;
|
|
257
257
|
return u(
|
|
258
258
|
m,
|
|
259
259
|
y,
|
|
260
|
-
|
|
260
|
+
E,
|
|
261
261
|
!1,
|
|
262
262
|
_,
|
|
263
263
|
F,
|
|
264
264
|
z ? Error("react-stack-top-frame") : Q,
|
|
265
265
|
z ? O(o(m)) : pe
|
|
266
266
|
);
|
|
267
|
-
}, Ae.jsxs = function(m, y,
|
|
267
|
+
}, Ae.jsxs = function(m, y, E, _, F) {
|
|
268
268
|
var z = 1e4 > ie.recentlyCreatedOwnerStacks++;
|
|
269
269
|
return u(
|
|
270
270
|
m,
|
|
271
271
|
y,
|
|
272
|
-
|
|
272
|
+
E,
|
|
273
273
|
!0,
|
|
274
274
|
_,
|
|
275
275
|
F,
|
|
@@ -617,31 +617,31 @@ const me = {
|
|
|
617
617
|
fullWidth: c = !1,
|
|
618
618
|
disabled: p = !1,
|
|
619
619
|
roundedFull: u = !1,
|
|
620
|
-
size:
|
|
621
|
-
type:
|
|
622
|
-
autoFocus:
|
|
623
|
-
href:
|
|
624
|
-
target:
|
|
620
|
+
size: v = "medium",
|
|
621
|
+
type: d = "button",
|
|
622
|
+
autoFocus: g = !1,
|
|
623
|
+
href: x,
|
|
624
|
+
target: f,
|
|
625
625
|
...h
|
|
626
626
|
}) => {
|
|
627
627
|
var b;
|
|
628
|
-
const C = le(null),
|
|
628
|
+
const C = le(null), M = le(null), w = (I) => {
|
|
629
629
|
const T = C.current;
|
|
630
630
|
if (!T) return;
|
|
631
631
|
const H = document.createElement("span"), N = T.getBoundingClientRect(), ee = Math.max(N.width, N.height);
|
|
632
632
|
H.style.width = H.style.height = `${ee}px`, H.style.left = `${I.clientX - N.left - ee / 2}px`, H.style.top = `${I.clientY - N.top - ee / 2}px`, H.className = "ripple", T.appendChild(H), setTimeout(() => H.remove(), 600), l == null || l(I);
|
|
633
633
|
}, L = ((b = me[o]) == null ? void 0 : b[t === "filled" ? "filled" : t === "outlined" ? "outline" : "transparent"]) || "";
|
|
634
|
-
return /* @__PURE__ */ a.jsx(a.Fragment, { children:
|
|
634
|
+
return /* @__PURE__ */ a.jsx(a.Fragment, { children: x ? /* @__PURE__ */ a.jsxs(
|
|
635
635
|
"a",
|
|
636
636
|
{
|
|
637
|
-
ref:
|
|
638
|
-
href:
|
|
639
|
-
target:
|
|
637
|
+
ref: M,
|
|
638
|
+
href: x,
|
|
639
|
+
target: f,
|
|
640
640
|
className: `relative leading-none no-underline inline-flex font-medium overflow-hidden flex items-center justify-center gap-1 transition-all focus:outline-0
|
|
641
641
|
${t === "outlined" && "border"}
|
|
642
642
|
${L}
|
|
643
643
|
${s}
|
|
644
|
-
${
|
|
644
|
+
${v === "small" ? "text-sm h-8 px-3" : v === "large" ? "text-lg h-12 px-6" : "text-base h-10 px-5"}
|
|
645
645
|
${c ? "w-full" : ""}
|
|
646
646
|
${u ? "rounded-full" : "rounded-md"}
|
|
647
647
|
${p ? `${t === "filled" && "!bg-color-gray-300 !text-color-white"} ${t === "outlined" && "!border-color-gray-200 !text-color-gray-300"} cursor-not-allowed hover:bg-color-transparent !text-color-gray-300` : "cursor-pointer"}
|
|
@@ -656,19 +656,19 @@ const me = {
|
|
|
656
656
|
"button",
|
|
657
657
|
{
|
|
658
658
|
ref: C,
|
|
659
|
-
type:
|
|
659
|
+
type: d,
|
|
660
660
|
disabled: p,
|
|
661
661
|
onClick: w,
|
|
662
662
|
className: `relative leading-none font-medium overflow-hidden flex items-center justify-center gap-1 transition-all focus:outline-0
|
|
663
663
|
${t === "outlined" && "border"}
|
|
664
664
|
${L}
|
|
665
665
|
${s}
|
|
666
|
-
${
|
|
666
|
+
${v === "small" ? "text-sm h-8 px-3" : v === "large" ? "text-lg h-12 px-6" : "text-base h-10 px-5"}
|
|
667
667
|
${c ? "w-full" : ""}
|
|
668
668
|
${u ? "rounded-full" : "rounded-md"}
|
|
669
669
|
${p ? `${t === "filled" && "!bg-color-gray-300 !text-color-white"} ${t === "outlined" && "!border-color-gray-200 !text-color-gray-300"} cursor-not-allowed hover:bg-color-transparent !text-color-gray-300` : "cursor-pointer"}
|
|
670
670
|
`,
|
|
671
|
-
autoFocus:
|
|
671
|
+
autoFocus: g,
|
|
672
672
|
...h,
|
|
673
673
|
children: [
|
|
674
674
|
r && /* @__PURE__ */ a.jsx("span", { className: "mr-1", children: r }),
|
|
@@ -801,7 +801,7 @@ var Gt;
|
|
|
801
801
|
function lo() {
|
|
802
802
|
if (Gt) return te;
|
|
803
803
|
Gt = 1;
|
|
804
|
-
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, r = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, u = e ? Symbol.for("react.forward_ref") : 60112,
|
|
804
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, r = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, u = e ? Symbol.for("react.forward_ref") : 60112, v = e ? Symbol.for("react.suspense") : 60113, d = e ? Symbol.for("react.suspense_list") : 60120, g = e ? Symbol.for("react.memo") : 60115, x = e ? Symbol.for("react.lazy") : 60116, f = e ? Symbol.for("react.block") : 60121, h = e ? Symbol.for("react.fundamental") : 60117, C = e ? Symbol.for("react.responder") : 60118, M = e ? Symbol.for("react.scope") : 60119;
|
|
805
805
|
function w(b) {
|
|
806
806
|
if (typeof b == "object" && b !== null) {
|
|
807
807
|
var I = b.$$typeof;
|
|
@@ -813,14 +813,14 @@ function lo() {
|
|
|
813
813
|
case o:
|
|
814
814
|
case i:
|
|
815
815
|
case r:
|
|
816
|
-
case
|
|
816
|
+
case v:
|
|
817
817
|
return b;
|
|
818
818
|
default:
|
|
819
819
|
switch (b = b && b.$$typeof, b) {
|
|
820
820
|
case s:
|
|
821
821
|
case u:
|
|
822
|
-
case
|
|
823
|
-
case
|
|
822
|
+
case x:
|
|
823
|
+
case g:
|
|
824
824
|
case l:
|
|
825
825
|
return b;
|
|
826
826
|
default:
|
|
@@ -835,7 +835,7 @@ function lo() {
|
|
|
835
835
|
function L(b) {
|
|
836
836
|
return w(b) === p;
|
|
837
837
|
}
|
|
838
|
-
return te.AsyncMode = c, te.ConcurrentMode = p, te.ContextConsumer = s, te.ContextProvider = l, te.Element = n, te.ForwardRef = u, te.Fragment = o, te.Lazy =
|
|
838
|
+
return te.AsyncMode = c, te.ConcurrentMode = p, te.ContextConsumer = s, te.ContextProvider = l, te.Element = n, te.ForwardRef = u, te.Fragment = o, te.Lazy = x, te.Memo = g, te.Portal = t, te.Profiler = i, te.StrictMode = r, te.Suspense = v, te.isAsyncMode = function(b) {
|
|
839
839
|
return L(b) || w(b) === c;
|
|
840
840
|
}, te.isConcurrentMode = L, te.isContextConsumer = function(b) {
|
|
841
841
|
return w(b) === s;
|
|
@@ -848,9 +848,9 @@ function lo() {
|
|
|
848
848
|
}, te.isFragment = function(b) {
|
|
849
849
|
return w(b) === o;
|
|
850
850
|
}, te.isLazy = function(b) {
|
|
851
|
-
return w(b) ===
|
|
851
|
+
return w(b) === x;
|
|
852
852
|
}, te.isMemo = function(b) {
|
|
853
|
-
return w(b) ===
|
|
853
|
+
return w(b) === g;
|
|
854
854
|
}, te.isPortal = function(b) {
|
|
855
855
|
return w(b) === t;
|
|
856
856
|
}, te.isProfiler = function(b) {
|
|
@@ -858,9 +858,9 @@ function lo() {
|
|
|
858
858
|
}, te.isStrictMode = function(b) {
|
|
859
859
|
return w(b) === r;
|
|
860
860
|
}, te.isSuspense = function(b) {
|
|
861
|
-
return w(b) ===
|
|
861
|
+
return w(b) === v;
|
|
862
862
|
}, te.isValidElementType = function(b) {
|
|
863
|
-
return typeof b == "string" || typeof b == "function" || b === o || b === p || b === i || b === r || b ===
|
|
863
|
+
return typeof b == "string" || typeof b == "function" || b === o || b === p || b === i || b === r || b === v || b === d || typeof b == "object" && b !== null && (b.$$typeof === x || b.$$typeof === g || b.$$typeof === l || b.$$typeof === s || b.$$typeof === u || b.$$typeof === h || b.$$typeof === C || b.$$typeof === M || b.$$typeof === f);
|
|
864
864
|
}, te.typeOf = w, te;
|
|
865
865
|
}
|
|
866
866
|
var ne = {};
|
|
@@ -875,10 +875,10 @@ var ne = {};
|
|
|
875
875
|
var Zt;
|
|
876
876
|
function so() {
|
|
877
877
|
return Zt || (Zt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
878
|
-
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, r = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, u = e ? Symbol.for("react.forward_ref") : 60112,
|
|
878
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, r = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, u = e ? Symbol.for("react.forward_ref") : 60112, v = e ? Symbol.for("react.suspense") : 60113, d = e ? Symbol.for("react.suspense_list") : 60120, g = e ? Symbol.for("react.memo") : 60115, x = e ? Symbol.for("react.lazy") : 60116, f = e ? Symbol.for("react.block") : 60121, h = e ? Symbol.for("react.fundamental") : 60117, C = e ? Symbol.for("react.responder") : 60118, M = e ? Symbol.for("react.scope") : 60119;
|
|
879
879
|
function w(S) {
|
|
880
880
|
return typeof S == "string" || typeof S == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
881
|
-
S === o || S === p || S === i || S === r || S ===
|
|
881
|
+
S === o || S === p || S === i || S === r || S === v || S === d || typeof S == "object" && S !== null && (S.$$typeof === x || S.$$typeof === g || S.$$typeof === l || S.$$typeof === s || S.$$typeof === u || S.$$typeof === h || S.$$typeof === C || S.$$typeof === M || S.$$typeof === f);
|
|
882
882
|
}
|
|
883
883
|
function L(S) {
|
|
884
884
|
if (typeof S == "object" && S !== null) {
|
|
@@ -892,15 +892,15 @@ function so() {
|
|
|
892
892
|
case o:
|
|
893
893
|
case i:
|
|
894
894
|
case r:
|
|
895
|
-
case
|
|
895
|
+
case v:
|
|
896
896
|
return X;
|
|
897
897
|
default:
|
|
898
898
|
var J = X && X.$$typeof;
|
|
899
899
|
switch (J) {
|
|
900
900
|
case s:
|
|
901
901
|
case u:
|
|
902
|
-
case
|
|
903
|
-
case
|
|
902
|
+
case x:
|
|
903
|
+
case g:
|
|
904
904
|
case l:
|
|
905
905
|
return J;
|
|
906
906
|
default:
|
|
@@ -912,7 +912,7 @@ function so() {
|
|
|
912
912
|
}
|
|
913
913
|
}
|
|
914
914
|
}
|
|
915
|
-
var b = c, I = p, T = s, H = l, N = n, ee = u, ie = o, ce =
|
|
915
|
+
var b = c, I = p, T = s, H = l, N = n, ee = u, ie = o, ce = x, U = g, O = t, Y = i, D = r, Q = v, pe = !1;
|
|
916
916
|
function K(S) {
|
|
917
917
|
return pe || (pe = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), m(S) || L(S) === c;
|
|
918
918
|
}
|
|
@@ -922,7 +922,7 @@ function so() {
|
|
|
922
922
|
function y(S) {
|
|
923
923
|
return L(S) === s;
|
|
924
924
|
}
|
|
925
|
-
function
|
|
925
|
+
function E(S) {
|
|
926
926
|
return L(S) === l;
|
|
927
927
|
}
|
|
928
928
|
function _(S) {
|
|
@@ -935,10 +935,10 @@ function so() {
|
|
|
935
935
|
return L(S) === o;
|
|
936
936
|
}
|
|
937
937
|
function A(S) {
|
|
938
|
-
return L(S) ===
|
|
938
|
+
return L(S) === x;
|
|
939
939
|
}
|
|
940
940
|
function R(S) {
|
|
941
|
-
return L(S) ===
|
|
941
|
+
return L(S) === g;
|
|
942
942
|
}
|
|
943
943
|
function $(S) {
|
|
944
944
|
return L(S) === t;
|
|
@@ -950,9 +950,9 @@ function so() {
|
|
|
950
950
|
return L(S) === r;
|
|
951
951
|
}
|
|
952
952
|
function j(S) {
|
|
953
|
-
return L(S) ===
|
|
953
|
+
return L(S) === v;
|
|
954
954
|
}
|
|
955
|
-
ne.AsyncMode = b, ne.ConcurrentMode = I, ne.ContextConsumer = T, ne.ContextProvider = H, ne.Element = N, ne.ForwardRef = ee, ne.Fragment = ie, ne.Lazy = ce, ne.Memo = U, ne.Portal = O, ne.Profiler = Y, ne.StrictMode = D, ne.Suspense = Q, ne.isAsyncMode = K, ne.isConcurrentMode = m, ne.isContextConsumer = y, ne.isContextProvider =
|
|
955
|
+
ne.AsyncMode = b, ne.ConcurrentMode = I, ne.ContextConsumer = T, ne.ContextProvider = H, ne.Element = N, ne.ForwardRef = ee, ne.Fragment = ie, ne.Lazy = ce, ne.Memo = U, ne.Portal = O, ne.Profiler = Y, ne.StrictMode = D, ne.Suspense = Q, ne.isAsyncMode = K, ne.isConcurrentMode = m, ne.isContextConsumer = y, ne.isContextProvider = E, ne.isElement = _, ne.isForwardRef = F, ne.isFragment = z, ne.isLazy = A, ne.isMemo = R, ne.isPortal = $, ne.isProfiler = V, ne.isStrictMode = q, ne.isSuspense = j, ne.isValidElementType = w, ne.typeOf = L;
|
|
956
956
|
}()), ne;
|
|
957
957
|
}
|
|
958
958
|
var Yt;
|
|
@@ -999,12 +999,12 @@ function co() {
|
|
|
999
999
|
return ct = r() ? Object.assign : function(i, l) {
|
|
1000
1000
|
for (var s, c = o(i), p, u = 1; u < arguments.length; u++) {
|
|
1001
1001
|
s = Object(arguments[u]);
|
|
1002
|
-
for (var
|
|
1003
|
-
n.call(s,
|
|
1002
|
+
for (var v in s)
|
|
1003
|
+
n.call(s, v) && (c[v] = s[v]);
|
|
1004
1004
|
if (e) {
|
|
1005
1005
|
p = e(s);
|
|
1006
|
-
for (var
|
|
1007
|
-
t.call(s, p[
|
|
1006
|
+
for (var d = 0; d < p.length; d++)
|
|
1007
|
+
t.call(s, p[d]) && (c[p[d]] = s[p[d]]);
|
|
1008
1008
|
}
|
|
1009
1009
|
}
|
|
1010
1010
|
return c;
|
|
@@ -1042,25 +1042,25 @@ function uo() {
|
|
|
1042
1042
|
if (process.env.NODE_ENV !== "production") {
|
|
1043
1043
|
for (var u in i)
|
|
1044
1044
|
if (o(i, u)) {
|
|
1045
|
-
var
|
|
1045
|
+
var v;
|
|
1046
1046
|
try {
|
|
1047
1047
|
if (typeof i[u] != "function") {
|
|
1048
|
-
var
|
|
1048
|
+
var d = Error(
|
|
1049
1049
|
(c || "React class") + ": " + s + " type `" + u + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[u] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
1050
1050
|
);
|
|
1051
|
-
throw
|
|
1051
|
+
throw d.name = "Invariant Violation", d;
|
|
1052
1052
|
}
|
|
1053
|
-
|
|
1054
|
-
} catch (
|
|
1055
|
-
|
|
1053
|
+
v = i[u](l, u, c, s, null, n);
|
|
1054
|
+
} catch (x) {
|
|
1055
|
+
v = x;
|
|
1056
1056
|
}
|
|
1057
|
-
if (
|
|
1058
|
-
(c || "React class") + ": type specification of " + s + " `" + u + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof
|
|
1059
|
-
),
|
|
1060
|
-
t[
|
|
1061
|
-
var
|
|
1057
|
+
if (v && !(v instanceof Error) && e(
|
|
1058
|
+
(c || "React class") + ": type specification of " + s + " `" + u + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof v + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
1059
|
+
), v instanceof Error && !(v.message in t)) {
|
|
1060
|
+
t[v.message] = !0;
|
|
1061
|
+
var g = p ? p() : "";
|
|
1062
1062
|
e(
|
|
1063
|
-
"Failed " + s + " type: " +
|
|
1063
|
+
"Failed " + s + " type: " + v.message + (g ?? "")
|
|
1064
1064
|
);
|
|
1065
1065
|
}
|
|
1066
1066
|
}
|
|
@@ -1089,12 +1089,12 @@ function po() {
|
|
|
1089
1089
|
}
|
|
1090
1090
|
return gt = function(s, c) {
|
|
1091
1091
|
var p = typeof Symbol == "function" && Symbol.iterator, u = "@@iterator";
|
|
1092
|
-
function
|
|
1092
|
+
function v(m) {
|
|
1093
1093
|
var y = m && (p && m[p] || m[u]);
|
|
1094
1094
|
if (typeof y == "function")
|
|
1095
1095
|
return y;
|
|
1096
1096
|
}
|
|
1097
|
-
var
|
|
1097
|
+
var d = "<<anonymous>>", g = {
|
|
1098
1098
|
array: C("array"),
|
|
1099
1099
|
bigint: C("bigint"),
|
|
1100
1100
|
bool: C("boolean"),
|
|
@@ -1103,7 +1103,7 @@ function po() {
|
|
|
1103
1103
|
object: C("object"),
|
|
1104
1104
|
string: C("string"),
|
|
1105
1105
|
symbol: C("symbol"),
|
|
1106
|
-
any:
|
|
1106
|
+
any: M(),
|
|
1107
1107
|
arrayOf: w,
|
|
1108
1108
|
element: L(),
|
|
1109
1109
|
elementType: b(),
|
|
@@ -1115,18 +1115,18 @@ function po() {
|
|
|
1115
1115
|
shape: ce,
|
|
1116
1116
|
exact: U
|
|
1117
1117
|
};
|
|
1118
|
-
function
|
|
1118
|
+
function x(m, y) {
|
|
1119
1119
|
return m === y ? m !== 0 || 1 / m === 1 / y : m !== m && y !== y;
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1121
|
+
function f(m, y) {
|
|
1122
1122
|
this.message = m, this.data = y && typeof y == "object" ? y : {}, this.stack = "";
|
|
1123
1123
|
}
|
|
1124
|
-
|
|
1124
|
+
f.prototype = Error.prototype;
|
|
1125
1125
|
function h(m) {
|
|
1126
1126
|
if (process.env.NODE_ENV !== "production")
|
|
1127
|
-
var y = {},
|
|
1127
|
+
var y = {}, E = 0;
|
|
1128
1128
|
function _(z, A, R, $, V, q, j) {
|
|
1129
|
-
if ($ = $ ||
|
|
1129
|
+
if ($ = $ || d, q = q || R, j !== t) {
|
|
1130
1130
|
if (c) {
|
|
1131
1131
|
var S = new Error(
|
|
1132
1132
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
@@ -1135,22 +1135,22 @@ function po() {
|
|
|
1135
1135
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
1136
1136
|
var k = $ + ":" + R;
|
|
1137
1137
|
!y[k] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
1138
|
-
|
|
1138
|
+
E < 3 && (i(
|
|
1139
1139
|
"You are manually calling a React.PropTypes validation function for the `" + q + "` prop on `" + $ + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
1140
|
-
), y[k] = !0,
|
|
1140
|
+
), y[k] = !0, E++);
|
|
1141
1141
|
}
|
|
1142
1142
|
}
|
|
1143
|
-
return A[R] == null ? z ? A[R] === null ? new
|
|
1143
|
+
return A[R] == null ? z ? A[R] === null ? new f("The " + V + " `" + q + "` is marked as required " + ("in `" + $ + "`, but its value is `null`.")) : new f("The " + V + " `" + q + "` is marked as required in " + ("`" + $ + "`, but its value is `undefined`.")) : null : m(A, R, $, V, q);
|
|
1144
1144
|
}
|
|
1145
1145
|
var F = _.bind(null, !1);
|
|
1146
1146
|
return F.isRequired = _.bind(null, !0), F;
|
|
1147
1147
|
}
|
|
1148
1148
|
function C(m) {
|
|
1149
|
-
function y(
|
|
1150
|
-
var $ =
|
|
1149
|
+
function y(E, _, F, z, A, R) {
|
|
1150
|
+
var $ = E[_], V = D($);
|
|
1151
1151
|
if (V !== m) {
|
|
1152
1152
|
var q = Q($);
|
|
1153
|
-
return new
|
|
1153
|
+
return new f(
|
|
1154
1154
|
"Invalid " + z + " `" + A + "` of type " + ("`" + q + "` supplied to `" + F + "`, expected ") + ("`" + m + "`."),
|
|
1155
1155
|
{ expectedType: m }
|
|
1156
1156
|
);
|
|
@@ -1159,17 +1159,17 @@ function po() {
|
|
|
1159
1159
|
}
|
|
1160
1160
|
return h(y);
|
|
1161
1161
|
}
|
|
1162
|
-
function
|
|
1162
|
+
function M() {
|
|
1163
1163
|
return h(l);
|
|
1164
1164
|
}
|
|
1165
1165
|
function w(m) {
|
|
1166
|
-
function y(
|
|
1166
|
+
function y(E, _, F, z, A) {
|
|
1167
1167
|
if (typeof m != "function")
|
|
1168
|
-
return new
|
|
1169
|
-
var R =
|
|
1168
|
+
return new f("Property `" + A + "` of component `" + F + "` has invalid PropType notation inside arrayOf.");
|
|
1169
|
+
var R = E[_];
|
|
1170
1170
|
if (!Array.isArray(R)) {
|
|
1171
1171
|
var $ = D(R);
|
|
1172
|
-
return new
|
|
1172
|
+
return new f("Invalid " + z + " `" + A + "` of type " + ("`" + $ + "` supplied to `" + F + "`, expected an array."));
|
|
1173
1173
|
}
|
|
1174
1174
|
for (var V = 0; V < R.length; V++) {
|
|
1175
1175
|
var q = m(R, V, F, z, A + "[" + V + "]", t);
|
|
@@ -1181,32 +1181,32 @@ function po() {
|
|
|
1181
1181
|
return h(y);
|
|
1182
1182
|
}
|
|
1183
1183
|
function L() {
|
|
1184
|
-
function m(y,
|
|
1185
|
-
var A = y[
|
|
1184
|
+
function m(y, E, _, F, z) {
|
|
1185
|
+
var A = y[E];
|
|
1186
1186
|
if (!s(A)) {
|
|
1187
1187
|
var R = D(A);
|
|
1188
|
-
return new
|
|
1188
|
+
return new f("Invalid " + F + " `" + z + "` of type " + ("`" + R + "` supplied to `" + _ + "`, expected a single ReactElement."));
|
|
1189
1189
|
}
|
|
1190
1190
|
return null;
|
|
1191
1191
|
}
|
|
1192
1192
|
return h(m);
|
|
1193
1193
|
}
|
|
1194
1194
|
function b() {
|
|
1195
|
-
function m(y,
|
|
1196
|
-
var A = y[
|
|
1195
|
+
function m(y, E, _, F, z) {
|
|
1196
|
+
var A = y[E];
|
|
1197
1197
|
if (!e.isValidElementType(A)) {
|
|
1198
1198
|
var R = D(A);
|
|
1199
|
-
return new
|
|
1199
|
+
return new f("Invalid " + F + " `" + z + "` of type " + ("`" + R + "` supplied to `" + _ + "`, expected a single ReactElement type."));
|
|
1200
1200
|
}
|
|
1201
1201
|
return null;
|
|
1202
1202
|
}
|
|
1203
1203
|
return h(m);
|
|
1204
1204
|
}
|
|
1205
1205
|
function I(m) {
|
|
1206
|
-
function y(
|
|
1207
|
-
if (!(
|
|
1208
|
-
var R = m.name ||
|
|
1209
|
-
return new
|
|
1206
|
+
function y(E, _, F, z, A) {
|
|
1207
|
+
if (!(E[_] instanceof m)) {
|
|
1208
|
+
var R = m.name || d, $ = K(E[_]);
|
|
1209
|
+
return new f("Invalid " + z + " `" + A + "` of type " + ("`" + $ + "` supplied to `" + F + "`, expected ") + ("instance of `" + R + "`."));
|
|
1210
1210
|
}
|
|
1211
1211
|
return null;
|
|
1212
1212
|
}
|
|
@@ -1217,25 +1217,25 @@ function po() {
|
|
|
1217
1217
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? i(
|
|
1218
1218
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
1219
1219
|
) : i("Invalid argument supplied to oneOf, expected an array.")), l;
|
|
1220
|
-
function y(
|
|
1221
|
-
for (var R =
|
|
1222
|
-
if (
|
|
1220
|
+
function y(E, _, F, z, A) {
|
|
1221
|
+
for (var R = E[_], $ = 0; $ < m.length; $++)
|
|
1222
|
+
if (x(R, m[$]))
|
|
1223
1223
|
return null;
|
|
1224
1224
|
var V = JSON.stringify(m, function(j, S) {
|
|
1225
1225
|
var k = Q(S);
|
|
1226
1226
|
return k === "symbol" ? String(S) : S;
|
|
1227
1227
|
});
|
|
1228
|
-
return new
|
|
1228
|
+
return new f("Invalid " + z + " `" + A + "` of value `" + String(R) + "` " + ("supplied to `" + F + "`, expected one of " + V + "."));
|
|
1229
1229
|
}
|
|
1230
1230
|
return h(y);
|
|
1231
1231
|
}
|
|
1232
1232
|
function H(m) {
|
|
1233
|
-
function y(
|
|
1233
|
+
function y(E, _, F, z, A) {
|
|
1234
1234
|
if (typeof m != "function")
|
|
1235
|
-
return new
|
|
1236
|
-
var R =
|
|
1235
|
+
return new f("Property `" + A + "` of component `" + F + "` has invalid PropType notation inside objectOf.");
|
|
1236
|
+
var R = E[_], $ = D(R);
|
|
1237
1237
|
if ($ !== "object")
|
|
1238
|
-
return new
|
|
1238
|
+
return new f("Invalid " + z + " `" + A + "` of type " + ("`" + $ + "` supplied to `" + F + "`, expected an object."));
|
|
1239
1239
|
for (var V in R)
|
|
1240
1240
|
if (o(R, V)) {
|
|
1241
1241
|
var q = m(R, V, F, z, A + "." + V, t);
|
|
@@ -1250,10 +1250,10 @@ function po() {
|
|
|
1250
1250
|
if (!Array.isArray(m))
|
|
1251
1251
|
return process.env.NODE_ENV !== "production" && i("Invalid argument supplied to oneOfType, expected an instance of array."), l;
|
|
1252
1252
|
for (var y = 0; y < m.length; y++) {
|
|
1253
|
-
var
|
|
1254
|
-
if (typeof
|
|
1253
|
+
var E = m[y];
|
|
1254
|
+
if (typeof E != "function")
|
|
1255
1255
|
return i(
|
|
1256
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + pe(
|
|
1256
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + pe(E) + " at index " + y + "."
|
|
1257
1257
|
), l;
|
|
1258
1258
|
}
|
|
1259
1259
|
function _(F, z, A, R, $) {
|
|
@@ -1264,26 +1264,26 @@ function po() {
|
|
|
1264
1264
|
S.data && o(S.data, "expectedType") && V.push(S.data.expectedType);
|
|
1265
1265
|
}
|
|
1266
1266
|
var k = V.length > 0 ? ", expected one of type [" + V.join(", ") + "]" : "";
|
|
1267
|
-
return new
|
|
1267
|
+
return new f("Invalid " + R + " `" + $ + "` supplied to " + ("`" + A + "`" + k + "."));
|
|
1268
1268
|
}
|
|
1269
1269
|
return h(_);
|
|
1270
1270
|
}
|
|
1271
1271
|
function ee() {
|
|
1272
|
-
function m(y,
|
|
1273
|
-
return O(y[
|
|
1272
|
+
function m(y, E, _, F, z) {
|
|
1273
|
+
return O(y[E]) ? null : new f("Invalid " + F + " `" + z + "` supplied to " + ("`" + _ + "`, expected a ReactNode."));
|
|
1274
1274
|
}
|
|
1275
1275
|
return h(m);
|
|
1276
1276
|
}
|
|
1277
|
-
function ie(m, y,
|
|
1278
|
-
return new
|
|
1279
|
-
(m || "React class") + ": " + y + " type `" +
|
|
1277
|
+
function ie(m, y, E, _, F) {
|
|
1278
|
+
return new f(
|
|
1279
|
+
(m || "React class") + ": " + y + " type `" + E + "." + _ + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + F + "`."
|
|
1280
1280
|
);
|
|
1281
1281
|
}
|
|
1282
1282
|
function ce(m) {
|
|
1283
|
-
function y(
|
|
1284
|
-
var R =
|
|
1283
|
+
function y(E, _, F, z, A) {
|
|
1284
|
+
var R = E[_], $ = D(R);
|
|
1285
1285
|
if ($ !== "object")
|
|
1286
|
-
return new
|
|
1286
|
+
return new f("Invalid " + z + " `" + A + "` of type `" + $ + "` " + ("supplied to `" + F + "`, expected `object`."));
|
|
1287
1287
|
for (var V in m) {
|
|
1288
1288
|
var q = m[V];
|
|
1289
1289
|
if (typeof q != "function")
|
|
@@ -1297,18 +1297,18 @@ function po() {
|
|
|
1297
1297
|
return h(y);
|
|
1298
1298
|
}
|
|
1299
1299
|
function U(m) {
|
|
1300
|
-
function y(
|
|
1301
|
-
var R =
|
|
1300
|
+
function y(E, _, F, z, A) {
|
|
1301
|
+
var R = E[_], $ = D(R);
|
|
1302
1302
|
if ($ !== "object")
|
|
1303
|
-
return new
|
|
1304
|
-
var V = n({},
|
|
1303
|
+
return new f("Invalid " + z + " `" + A + "` of type `" + $ + "` " + ("supplied to `" + F + "`, expected `object`."));
|
|
1304
|
+
var V = n({}, E[_], m);
|
|
1305
1305
|
for (var q in V) {
|
|
1306
1306
|
var j = m[q];
|
|
1307
1307
|
if (o(m, q) && typeof j != "function")
|
|
1308
1308
|
return ie(F, z, A, q, Q(j));
|
|
1309
1309
|
if (!j)
|
|
1310
|
-
return new
|
|
1311
|
-
"Invalid " + z + " `" + A + "` key `" + q + "` supplied to `" + F + "`.\nBad object: " + JSON.stringify(
|
|
1310
|
+
return new f(
|
|
1311
|
+
"Invalid " + z + " `" + A + "` key `" + q + "` supplied to `" + F + "`.\nBad object: " + JSON.stringify(E[_], null, " ") + `
|
|
1312
1312
|
Valid keys: ` + JSON.stringify(Object.keys(m), null, " ")
|
|
1313
1313
|
);
|
|
1314
1314
|
var S = j(R, q, F, z, A + "." + q, t);
|
|
@@ -1332,15 +1332,15 @@ Valid keys: ` + JSON.stringify(Object.keys(m), null, " ")
|
|
|
1332
1332
|
return m.every(O);
|
|
1333
1333
|
if (m === null || s(m))
|
|
1334
1334
|
return !0;
|
|
1335
|
-
var y =
|
|
1335
|
+
var y = v(m);
|
|
1336
1336
|
if (y) {
|
|
1337
|
-
var
|
|
1337
|
+
var E = y.call(m), _;
|
|
1338
1338
|
if (y !== m.entries) {
|
|
1339
|
-
for (; !(_ =
|
|
1339
|
+
for (; !(_ = E.next()).done; )
|
|
1340
1340
|
if (!O(_.value))
|
|
1341
1341
|
return !1;
|
|
1342
1342
|
} else
|
|
1343
|
-
for (; !(_ =
|
|
1343
|
+
for (; !(_ = E.next()).done; ) {
|
|
1344
1344
|
var F = _.value;
|
|
1345
1345
|
if (F && !O(F[1]))
|
|
1346
1346
|
return !1;
|
|
@@ -1386,9 +1386,9 @@ Valid keys: ` + JSON.stringify(Object.keys(m), null, " ")
|
|
|
1386
1386
|
}
|
|
1387
1387
|
}
|
|
1388
1388
|
function K(m) {
|
|
1389
|
-
return !m.constructor || !m.constructor.name ?
|
|
1389
|
+
return !m.constructor || !m.constructor.name ? d : m.constructor.name;
|
|
1390
1390
|
}
|
|
1391
|
-
return
|
|
1391
|
+
return g.checkPropTypes = r, g.resetWarningCache = r.resetWarningCache, g.PropTypes = g, g;
|
|
1392
1392
|
}, gt;
|
|
1393
1393
|
}
|
|
1394
1394
|
var ft, Qt;
|
|
@@ -1401,12 +1401,12 @@ function go() {
|
|
|
1401
1401
|
function t() {
|
|
1402
1402
|
}
|
|
1403
1403
|
return t.resetWarningCache = n, ft = function() {
|
|
1404
|
-
function o(l, s, c, p, u,
|
|
1405
|
-
if (
|
|
1406
|
-
var
|
|
1404
|
+
function o(l, s, c, p, u, v) {
|
|
1405
|
+
if (v !== e) {
|
|
1406
|
+
var d = new Error(
|
|
1407
1407
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
1408
1408
|
);
|
|
1409
|
-
throw
|
|
1409
|
+
throw d.name = "Invariant Violation", d;
|
|
1410
1410
|
}
|
|
1411
1411
|
}
|
|
1412
1412
|
o.isRequired = o;
|
|
@@ -1461,15 +1461,15 @@ function _e(e, n, t, o) {
|
|
|
1461
1461
|
function s(u) {
|
|
1462
1462
|
try {
|
|
1463
1463
|
p(o.next(u));
|
|
1464
|
-
} catch (
|
|
1465
|
-
l(
|
|
1464
|
+
} catch (v) {
|
|
1465
|
+
l(v);
|
|
1466
1466
|
}
|
|
1467
1467
|
}
|
|
1468
1468
|
function c(u) {
|
|
1469
1469
|
try {
|
|
1470
1470
|
p(o.throw(u));
|
|
1471
|
-
} catch (
|
|
1472
|
-
l(
|
|
1471
|
+
} catch (v) {
|
|
1472
|
+
l(v);
|
|
1473
1473
|
}
|
|
1474
1474
|
}
|
|
1475
1475
|
function p(u) {
|
|
@@ -2969,8 +2969,8 @@ function $e(e) {
|
|
|
2969
2969
|
function qo(e) {
|
|
2970
2970
|
var n = e.files, t = e.accept, o = e.minSize, r = e.maxSize, i = e.multiple, l = e.maxFiles, s = e.validator;
|
|
2971
2971
|
return !i && n.length > 1 || i && l >= 1 && n.length > l ? !1 : n.every(function(c) {
|
|
2972
|
-
var p = Pn(c, t), u = ze(p, 1),
|
|
2973
|
-
return
|
|
2972
|
+
var p = Pn(c, t), u = ze(p, 1), v = u[0], d = Fn(c, o, r), g = ze(d, 1), x = g[0], f = s ? s(c) : null;
|
|
2973
|
+
return v && x && !f;
|
|
2974
2974
|
});
|
|
2975
2975
|
}
|
|
2976
2976
|
function Qe(e) {
|
|
@@ -3350,16 +3350,16 @@ var Mt = {
|
|
|
3350
3350
|
fileRejections: []
|
|
3351
3351
|
};
|
|
3352
3352
|
function Tn() {
|
|
3353
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = ae(ae({}, zn), e), t = n.accept, o = n.disabled, r = n.getFilesFromEvent, i = n.maxSize, l = n.minSize, s = n.multiple, c = n.maxFiles, p = n.onDragEnter, u = n.onDragLeave,
|
|
3353
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = ae(ae({}, zn), e), t = n.accept, o = n.disabled, r = n.getFilesFromEvent, i = n.maxSize, l = n.minSize, s = n.multiple, c = n.maxFiles, p = n.onDragEnter, u = n.onDragLeave, v = n.onDragOver, d = n.onDrop, g = n.onDropAccepted, x = n.onDropRejected, f = n.onFileDialogCancel, h = n.onFileDialogOpen, C = n.useFsAccessApi, M = n.autoFocus, w = n.preventDropOnDocument, L = n.noClick, b = n.noKeyboard, I = n.noDrag, T = n.noDragEventsBubbling, H = n.onError, N = n.validator, ee = Me(function() {
|
|
3354
3354
|
return Uo(t);
|
|
3355
3355
|
}, [t]), ie = Me(function() {
|
|
3356
3356
|
return Wo(t);
|
|
3357
3357
|
}, [t]), ce = Me(function() {
|
|
3358
3358
|
return typeof h == "function" ? h : gn;
|
|
3359
3359
|
}, [h]), U = Me(function() {
|
|
3360
|
-
return typeof
|
|
3361
|
-
}, [
|
|
3362
|
-
!
|
|
3360
|
+
return typeof f == "function" ? f : gn;
|
|
3361
|
+
}, [f]), O = le(null), Y = le(null), D = eo(ur, Mt), Q = xt(D, 2), pe = Q[0], K = Q[1], m = pe.isFocused, y = pe.isFileDialogActive, E = le(typeof window < "u" && window.isSecureContext && C && Yo()), _ = function() {
|
|
3362
|
+
!E.current && y && setTimeout(function() {
|
|
3363
3363
|
if (Y.current) {
|
|
3364
3364
|
var B = Y.current.files;
|
|
3365
3365
|
B.length || (K({
|
|
@@ -3372,7 +3372,7 @@ function Tn() {
|
|
|
3372
3372
|
return window.addEventListener("focus", _, !1), function() {
|
|
3373
3373
|
window.removeEventListener("focus", _, !1);
|
|
3374
3374
|
};
|
|
3375
|
-
}, [Y, y, U,
|
|
3375
|
+
}, [Y, y, U, E]);
|
|
3376
3376
|
var F = le([]), z = function(B) {
|
|
3377
3377
|
O.current && O.current.contains(B.target) || (B.preventDefault(), F.current = []);
|
|
3378
3378
|
};
|
|
@@ -3381,9 +3381,9 @@ function Tn() {
|
|
|
3381
3381
|
w && (document.removeEventListener("dragover", pn), document.removeEventListener("drop", z));
|
|
3382
3382
|
};
|
|
3383
3383
|
}, [O, w]), se(function() {
|
|
3384
|
-
return !o &&
|
|
3384
|
+
return !o && M && O.current && O.current.focus(), function() {
|
|
3385
3385
|
};
|
|
3386
|
-
}, [O,
|
|
3386
|
+
}, [O, M, o]);
|
|
3387
3387
|
var A = oe(function(P) {
|
|
3388
3388
|
H ? H(P) : console.error(P);
|
|
3389
3389
|
}, [H]), R = oe(function(P) {
|
|
@@ -3416,8 +3416,8 @@ function Tn() {
|
|
|
3416
3416
|
P.dataTransfer.dropEffect = "copy";
|
|
3417
3417
|
} catch {
|
|
3418
3418
|
}
|
|
3419
|
-
return B &&
|
|
3420
|
-
}, [
|
|
3419
|
+
return B && v && v(P), !1;
|
|
3420
|
+
}, [v, T]), V = oe(function(P) {
|
|
3421
3421
|
P.preventDefault(), P.persist(), Ve(P);
|
|
3422
3422
|
var B = F.current.filter(function(fe) {
|
|
3423
3423
|
return O.current && O.current.contains(fe);
|
|
@@ -3453,8 +3453,8 @@ function Tn() {
|
|
|
3453
3453
|
fileRejections: fe,
|
|
3454
3454
|
isDragReject: fe.length > 0,
|
|
3455
3455
|
type: "setFiles"
|
|
3456
|
-
}),
|
|
3457
|
-
}, [K, s, ee, l, i, c,
|
|
3456
|
+
}), d && d(ge, fe, B), fe.length > 0 && x && x(fe, B), ge.length > 0 && g && g(ge, B);
|
|
3457
|
+
}, [K, s, ee, l, i, c, d, g, x, N]), j = oe(function(P) {
|
|
3458
3458
|
P.preventDefault(), P.persist(), Ve(P), F.current = [], Ye(P) && Promise.resolve(r(P)).then(function(B) {
|
|
3459
3459
|
Qe(P) && !T || q(B, P);
|
|
3460
3460
|
}).catch(function(B) {
|
|
@@ -3463,7 +3463,7 @@ function Tn() {
|
|
|
3463
3463
|
type: "reset"
|
|
3464
3464
|
});
|
|
3465
3465
|
}, [r, q, A, T]), S = oe(function() {
|
|
3466
|
-
if (
|
|
3466
|
+
if (E.current) {
|
|
3467
3467
|
K({
|
|
3468
3468
|
type: "openDialog"
|
|
3469
3469
|
}), ce();
|
|
@@ -3480,7 +3480,7 @@ function Tn() {
|
|
|
3480
3480
|
}).catch(function(B) {
|
|
3481
3481
|
Ko(B) ? (U(B), K({
|
|
3482
3482
|
type: "closeDialog"
|
|
3483
|
-
})) : Xo(B) ? (
|
|
3483
|
+
})) : Xo(B) ? (E.current = !1, Y.current ? (Y.current.value = null, Y.current.click()) : A(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))) : A(B);
|
|
3484
3484
|
});
|
|
3485
3485
|
return;
|
|
3486
3486
|
}
|
|
@@ -3615,15 +3615,15 @@ const Pi = ({
|
|
|
3615
3615
|
subLabel: c = "Maximum size: 2 MB",
|
|
3616
3616
|
icon: p = /* @__PURE__ */ a.jsx("svg", { className: "size-4", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M3 19H21V21H3V19ZM13 5.82843V17H11V5.82843L4.92893 11.8995L3.51472 10.4853L12 2L20.4853 10.4853L19.0711 11.8995L13 5.82843Z" }) }),
|
|
3617
3617
|
wrapperClass: u = "",
|
|
3618
|
-
iconClass:
|
|
3619
|
-
labelClass:
|
|
3620
|
-
subLabelClass:
|
|
3621
|
-
showList:
|
|
3622
|
-
listView:
|
|
3618
|
+
iconClass: v = "",
|
|
3619
|
+
labelClass: d = "",
|
|
3620
|
+
subLabelClass: g = "",
|
|
3621
|
+
showList: x = !0,
|
|
3622
|
+
listView: f = !0,
|
|
3623
3623
|
showListImage: h = !1,
|
|
3624
3624
|
uploadedFiles: C = [],
|
|
3625
3625
|
// New prop for pre-uploaded files
|
|
3626
|
-
onDeleteCallback:
|
|
3626
|
+
onDeleteCallback: M = () => {
|
|
3627
3627
|
}
|
|
3628
3628
|
//
|
|
3629
3629
|
}) => {
|
|
@@ -3662,7 +3662,7 @@ const Pi = ({
|
|
|
3662
3662
|
o
|
|
3663
3663
|
]
|
|
3664
3664
|
), H = (U) => {
|
|
3665
|
-
L((O) => O.filter((Y, D) => D !== U)),
|
|
3665
|
+
L((O) => O.filter((Y, D) => D !== U)), M(w);
|
|
3666
3666
|
}, { getRootProps: N, getInputProps: ee, isDragActive: ie, isDragReject: ce } = Tn({
|
|
3667
3667
|
onDrop: T,
|
|
3668
3668
|
accept: t,
|
|
@@ -3688,9 +3688,9 @@ const Pi = ({
|
|
|
3688
3688
|
className: "flex flex-col items-center justify-center text-center px-6 pt-6 pb-4 cursor-pointer",
|
|
3689
3689
|
children: [
|
|
3690
3690
|
/* @__PURE__ */ a.jsx("input", { ...ee() }),
|
|
3691
|
-
/* @__PURE__ */ a.jsx("div", { className: `text-4xl mb-2 ${
|
|
3692
|
-
/* @__PURE__ */ a.jsx("p", { className: `text-sm font-medium ${
|
|
3693
|
-
c && /* @__PURE__ */ a.jsx("p", { className: `text-xs mt-1 ${
|
|
3691
|
+
/* @__PURE__ */ a.jsx("div", { className: `text-4xl mb-2 ${v}`, children: p }),
|
|
3692
|
+
/* @__PURE__ */ a.jsx("p", { className: `text-sm font-medium ${d}`, children: s }),
|
|
3693
|
+
c && /* @__PURE__ */ a.jsx("p", { className: `text-xs mt-1 ${g}`, children: c })
|
|
3694
3694
|
]
|
|
3695
3695
|
}
|
|
3696
3696
|
),
|
|
@@ -3698,10 +3698,10 @@ const Pi = ({
|
|
|
3698
3698
|
"• ",
|
|
3699
3699
|
U
|
|
3700
3700
|
] }, O)) }),
|
|
3701
|
-
|
|
3701
|
+
x && w.length > 0 && /* @__PURE__ */ a.jsx(
|
|
3702
3702
|
"ul",
|
|
3703
3703
|
{
|
|
3704
|
-
className: `w-full ${
|
|
3704
|
+
className: `w-full ${f ? "space-y-2" : "grid grid-columns-2 gap-2"} px-4 pb-4`,
|
|
3705
3705
|
children: w.map((U, O) => /* @__PURE__ */ a.jsxs(
|
|
3706
3706
|
"li",
|
|
3707
3707
|
{
|
|
@@ -3814,24 +3814,24 @@ const dr = {
|
|
|
3814
3814
|
variant: c = "outlined",
|
|
3815
3815
|
rounded: p = "medium",
|
|
3816
3816
|
...u
|
|
3817
|
-
},
|
|
3818
|
-
const
|
|
3817
|
+
}, v) => {
|
|
3818
|
+
const d = le([]), g = (f, h) => {
|
|
3819
3819
|
var w;
|
|
3820
|
-
const C =
|
|
3820
|
+
const C = f.target.value.replace(/[^0-9]/g, "").slice(0, 1);
|
|
3821
3821
|
if (!C && t[h] === void 0) return;
|
|
3822
|
-
const
|
|
3823
|
-
o == null || o(
|
|
3824
|
-
},
|
|
3825
|
-
var C,
|
|
3826
|
-
|
|
3822
|
+
const M = t.substring(0, h) + C + t.substring(h + 1, i);
|
|
3823
|
+
o == null || o(M), C && h < i - 1 && ((w = d.current[h + 1]) == null || w.focus()), r && M.length === i && !M.split("").some((L) => !L) && r(M);
|
|
3824
|
+
}, x = (f, h) => {
|
|
3825
|
+
var C, M, w;
|
|
3826
|
+
f.key === "Backspace" && !t[h] && h > 0 ? (o == null || o(
|
|
3827
3827
|
t.substring(0, h - 1) + "" + t.substring(h, i)
|
|
3828
|
-
), (C =
|
|
3828
|
+
), (C = d.current[h - 1]) == null || C.focus(), f.preventDefault()) : f.key === "ArrowLeft" && h > 0 ? ((M = d.current[h - 1]) == null || M.focus(), f.preventDefault()) : f.key === "ArrowRight" && h < i - 1 && ((w = d.current[h + 1]) == null || w.focus(), f.preventDefault());
|
|
3829
3829
|
};
|
|
3830
|
-
return /* @__PURE__ */ a.jsx("div", { className: `flex justify-center gap-2 ${e}`, children: Array.from({ length: i }).map((
|
|
3830
|
+
return /* @__PURE__ */ a.jsx("div", { className: `flex justify-center gap-2 ${e}`, children: Array.from({ length: i }).map((f, h) => /* @__PURE__ */ a.jsx(
|
|
3831
3831
|
"input",
|
|
3832
3832
|
{
|
|
3833
3833
|
ref: (C) => {
|
|
3834
|
-
|
|
3834
|
+
d.current[h] = C;
|
|
3835
3835
|
},
|
|
3836
3836
|
type: "text",
|
|
3837
3837
|
inputMode: "numeric",
|
|
@@ -3846,8 +3846,8 @@ const dr = {
|
|
|
3846
3846
|
${n}
|
|
3847
3847
|
`,
|
|
3848
3848
|
value: t[h] || "",
|
|
3849
|
-
onChange: (C) =>
|
|
3850
|
-
onKeyDown: (C) =>
|
|
3849
|
+
onChange: (C) => g(C, h),
|
|
3850
|
+
onKeyDown: (C) => x(C, h),
|
|
3851
3851
|
...u
|
|
3852
3852
|
},
|
|
3853
3853
|
h
|
|
@@ -3875,31 +3875,31 @@ const xr = {
|
|
|
3875
3875
|
endIcon: c,
|
|
3876
3876
|
error: p,
|
|
3877
3877
|
maxLength: u,
|
|
3878
|
-
label:
|
|
3879
|
-
labelClassName:
|
|
3880
|
-
variant:
|
|
3881
|
-
size:
|
|
3882
|
-
...
|
|
3878
|
+
label: v,
|
|
3879
|
+
labelClassName: d = "",
|
|
3880
|
+
variant: g = "outlined",
|
|
3881
|
+
size: x = "medium",
|
|
3882
|
+
...f
|
|
3883
3883
|
}, h) => {
|
|
3884
|
-
const C = p ? "border-color-red-500 focus-within:ring-color-red-500" : "border-color-gray-200",
|
|
3884
|
+
const C = p ? "border-color-red-500 focus-within:ring-color-red-500" : "border-color-gray-200", M = p ? "text-color-red-500" : l;
|
|
3885
3885
|
return /* @__PURE__ */ a.jsxs("div", { className: "w-full", children: [
|
|
3886
|
-
|
|
3887
|
-
/* @__PURE__ */ a.jsxs("div", { className: `flex items-center w-full rounded-md border focus-within:ring-1 ${C} ${vr[
|
|
3888
|
-
s && /* @__PURE__ */ a.jsx("span", { className: `pl-3 ${
|
|
3886
|
+
v && /* @__PURE__ */ a.jsx("label", { className: `text-sm font-medium text-color-gray-700 mb-1 block ${d}`, children: v }),
|
|
3887
|
+
/* @__PURE__ */ a.jsxs("div", { className: `flex items-center w-full rounded-md border focus-within:ring-1 ${C} ${vr[g]} ${r}`, children: [
|
|
3888
|
+
s && /* @__PURE__ */ a.jsx("span", { className: `pl-3 ${M}`, children: s }),
|
|
3889
3889
|
/* @__PURE__ */ a.jsx(
|
|
3890
3890
|
"input",
|
|
3891
3891
|
{
|
|
3892
|
-
...
|
|
3892
|
+
...f,
|
|
3893
3893
|
ref: h,
|
|
3894
3894
|
type: o,
|
|
3895
3895
|
placeholder: e,
|
|
3896
3896
|
defaultValue: n,
|
|
3897
3897
|
maxLength: u,
|
|
3898
3898
|
onChange: t,
|
|
3899
|
-
className: `grow outline-0 w-full font-medium placeholder:font-normal bg-color-transparent ${xr[
|
|
3899
|
+
className: `grow outline-0 w-full font-medium placeholder:font-normal bg-color-transparent ${xr[x]} ${i}`
|
|
3900
3900
|
}
|
|
3901
3901
|
),
|
|
3902
|
-
c && /* @__PURE__ */ a.jsx("span", { className: `pr-3 ${
|
|
3902
|
+
c && /* @__PURE__ */ a.jsx("span", { className: `pr-3 ${M}`, children: c })
|
|
3903
3903
|
] }),
|
|
3904
3904
|
p && /* @__PURE__ */ a.jsx("p", { className: "text-color-red-500 text-xs mt-1", children: p })
|
|
3905
3905
|
] });
|
|
@@ -3975,22 +3975,22 @@ const In = ({
|
|
|
3975
3975
|
autoFocus: c = !1,
|
|
3976
3976
|
...p
|
|
3977
3977
|
}) => {
|
|
3978
|
-
var
|
|
3979
|
-
const u = le(null),
|
|
3980
|
-
const
|
|
3981
|
-
if (!
|
|
3982
|
-
const h = document.createElement("span"), C =
|
|
3983
|
-
h.style.width = h.style.height = `${
|
|
3984
|
-
},
|
|
3978
|
+
var g;
|
|
3979
|
+
const u = le(null), v = (x) => {
|
|
3980
|
+
const f = u.current;
|
|
3981
|
+
if (!f) return;
|
|
3982
|
+
const h = document.createElement("span"), C = f.getBoundingClientRect(), M = Math.max(C.width, C.height);
|
|
3983
|
+
h.style.width = h.style.height = `${M}px`, h.style.left = `${x.clientX - C.left - M / 2}px`, h.style.top = `${x.clientY - C.top - M / 2}px`, h.className = "ripple_small", f.appendChild(h), setTimeout(() => h.remove(), 600), o == null || o(x);
|
|
3984
|
+
}, d = ((g = me[n]) == null ? void 0 : g[e === "filled" ? "filled" : e === "outlined" ? "outline" : "transparent"]) || "";
|
|
3985
3985
|
return /* @__PURE__ */ a.jsx(
|
|
3986
3986
|
"button",
|
|
3987
3987
|
{
|
|
3988
3988
|
ref: u,
|
|
3989
3989
|
type: "button",
|
|
3990
3990
|
disabled: i,
|
|
3991
|
-
onClick:
|
|
3991
|
+
onClick: v,
|
|
3992
3992
|
className: `relative overflow-hidden flex items-center justify-center gap-1 transition-all focus:outline-0
|
|
3993
|
-
${
|
|
3993
|
+
${d}
|
|
3994
3994
|
${e === "outlined" && "border"}
|
|
3995
3995
|
${r}
|
|
3996
3996
|
${s === "small" ? "text-sm size-8" : s === "large" ? "text-lg size-12" : "text-base size-10"}
|
|
@@ -4022,12 +4022,12 @@ const In = ({
|
|
|
4022
4022
|
href: c,
|
|
4023
4023
|
target: p = "_self",
|
|
4024
4024
|
avatar: u,
|
|
4025
|
-
icon:
|
|
4025
|
+
icon: v
|
|
4026
4026
|
}) => {
|
|
4027
|
-
var C,
|
|
4028
|
-
const
|
|
4027
|
+
var C, M;
|
|
4028
|
+
const d = (C = me[n]) == null ? void 0 : C.filled, g = (M = me[n]) == null ? void 0 : M.outline, x = br[o], f = `inline-flex items-center rounded-full font-medium leading-none ${t === "outlined" ? `border ${g}` : d} ${x} ${i ? "cursor-pointer transition hover:opacity-80" : ""}`.trim(), h = /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
4029
4029
|
u && /* @__PURE__ */ a.jsx(In, { ...typeof u == "object" ? u : {}, className: `-ml-1 mr-1 ${fn[o]}` }),
|
|
4030
|
-
|
|
4030
|
+
v && /* @__PURE__ */ a.jsx("span", { className: "mr-1 -ml-1", children: v }),
|
|
4031
4031
|
/* @__PURE__ */ a.jsx("span", { children: e }),
|
|
4032
4032
|
l && /* @__PURE__ */ a.jsx(
|
|
4033
4033
|
je,
|
|
@@ -4049,14 +4049,14 @@ const In = ({
|
|
|
4049
4049
|
{
|
|
4050
4050
|
href: c,
|
|
4051
4051
|
target: p,
|
|
4052
|
-
className: `no-underline ${
|
|
4052
|
+
className: `no-underline ${f} ${r}`,
|
|
4053
4053
|
onClick: i,
|
|
4054
4054
|
children: h
|
|
4055
4055
|
}
|
|
4056
4056
|
) : /* @__PURE__ */ a.jsx(
|
|
4057
4057
|
"span",
|
|
4058
4058
|
{
|
|
4059
|
-
className: `${
|
|
4059
|
+
className: `${f} ${r}`,
|
|
4060
4060
|
onClick: i,
|
|
4061
4061
|
children: h
|
|
4062
4062
|
}
|
|
@@ -4152,20 +4152,20 @@ function G(e, n, t) {
|
|
|
4152
4152
|
let l;
|
|
4153
4153
|
t.key && t.debug && (l = Date.now());
|
|
4154
4154
|
const s = e(i);
|
|
4155
|
-
if (!(s.length !== o.length || s.some((u,
|
|
4155
|
+
if (!(s.length !== o.length || s.some((u, v) => o[v] !== u)))
|
|
4156
4156
|
return r;
|
|
4157
4157
|
o = s;
|
|
4158
4158
|
let p;
|
|
4159
4159
|
if (t.key && t.debug && (p = Date.now()), r = n(...s), t == null || t.onChange == null || t.onChange(r), t.key && t.debug && t != null && t.debug()) {
|
|
4160
|
-
const u = Math.round((Date.now() - l) * 100) / 100,
|
|
4161
|
-
for (
|
|
4162
|
-
|
|
4163
|
-
return
|
|
4160
|
+
const u = Math.round((Date.now() - l) * 100) / 100, v = Math.round((Date.now() - p) * 100) / 100, d = v / 16, g = (x, f) => {
|
|
4161
|
+
for (x = String(x); x.length < f; )
|
|
4162
|
+
x = " " + x;
|
|
4163
|
+
return x;
|
|
4164
4164
|
};
|
|
4165
|
-
console.info(`%c⏱ ${
|
|
4165
|
+
console.info(`%c⏱ ${g(v, 5)} /${g(u, 5)} ms`, `
|
|
4166
4166
|
font-size: .6rem;
|
|
4167
4167
|
font-weight: bold;
|
|
4168
|
-
color: hsl(${Math.max(0, Math.min(120 - 120 *
|
|
4168
|
+
color: hsl(${Math.max(0, Math.min(120 - 120 * d, 120))}deg 100% 31%);`, t == null ? void 0 : t.key);
|
|
4169
4169
|
}
|
|
4170
4170
|
return r;
|
|
4171
4171
|
};
|
|
@@ -4210,16 +4210,16 @@ function jr(e, n, t, o) {
|
|
|
4210
4210
|
...n
|
|
4211
4211
|
}, c = s.accessorKey;
|
|
4212
4212
|
let p = (r = (i = s.id) != null ? i : c ? typeof String.prototype.replaceAll == "function" ? c.replaceAll(".", "_") : c.replace(/\./g, "_") : void 0) != null ? r : typeof s.header == "string" ? s.header : void 0, u;
|
|
4213
|
-
if (s.accessorFn ? u = s.accessorFn : c && (c.includes(".") ? u = (
|
|
4214
|
-
let
|
|
4215
|
-
for (const
|
|
4216
|
-
var
|
|
4217
|
-
|
|
4213
|
+
if (s.accessorFn ? u = s.accessorFn : c && (c.includes(".") ? u = (d) => {
|
|
4214
|
+
let g = d;
|
|
4215
|
+
for (const f of c.split(".")) {
|
|
4216
|
+
var x;
|
|
4217
|
+
g = (x = g) == null ? void 0 : x[f], process.env.NODE_ENV !== "production" && g === void 0 && console.warn(`"${f}" in deeply nested key "${c}" returned undefined.`);
|
|
4218
4218
|
}
|
|
4219
|
-
return
|
|
4220
|
-
} : u = (
|
|
4219
|
+
return g;
|
|
4220
|
+
} : u = (d) => d[s.accessorKey]), !p)
|
|
4221
4221
|
throw process.env.NODE_ENV !== "production" ? new Error(s.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
|
|
4222
|
-
let
|
|
4222
|
+
let v = {
|
|
4223
4223
|
id: `${String(p)}`,
|
|
4224
4224
|
accessorFn: u,
|
|
4225
4225
|
parent: o,
|
|
@@ -4227,21 +4227,21 @@ function jr(e, n, t, o) {
|
|
|
4227
4227
|
columnDef: s,
|
|
4228
4228
|
columns: [],
|
|
4229
4229
|
getFlatColumns: G(() => [!0], () => {
|
|
4230
|
-
var f;
|
|
4231
|
-
return [x, ...(f = x.columns) == null ? void 0 : f.flatMap((d) => d.getFlatColumns())];
|
|
4232
|
-
}, Z(e.options, "debugColumns", "column.getFlatColumns")),
|
|
4233
|
-
getLeafColumns: G(() => [e._getOrderColumnsFn()], (f) => {
|
|
4234
4230
|
var d;
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4231
|
+
return [v, ...(d = v.columns) == null ? void 0 : d.flatMap((g) => g.getFlatColumns())];
|
|
4232
|
+
}, Z(e.options, "debugColumns", "column.getFlatColumns")),
|
|
4233
|
+
getLeafColumns: G(() => [e._getOrderColumnsFn()], (d) => {
|
|
4234
|
+
var g;
|
|
4235
|
+
if ((g = v.columns) != null && g.length) {
|
|
4236
|
+
let x = v.columns.flatMap((f) => f.getLeafColumns());
|
|
4237
|
+
return d(x);
|
|
4238
4238
|
}
|
|
4239
|
-
return [
|
|
4239
|
+
return [v];
|
|
4240
4240
|
}, Z(e.options, "debugColumns", "column.getLeafColumns"))
|
|
4241
4241
|
};
|
|
4242
|
-
for (const
|
|
4243
|
-
|
|
4244
|
-
return
|
|
4242
|
+
for (const d of e._features)
|
|
4243
|
+
d.createColumn == null || d.createColumn(v, e);
|
|
4244
|
+
return v;
|
|
4245
4245
|
}
|
|
4246
4246
|
const xe = "debugHeaders";
|
|
4247
4247
|
function mn(e, n, t) {
|
|
@@ -4277,7 +4277,7 @@ const Sr = {
|
|
|
4277
4277
|
createTable: (e) => {
|
|
4278
4278
|
e.getHeaderGroups = G(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o, r) => {
|
|
4279
4279
|
var i, l;
|
|
4280
|
-
const s = (i = o == null ? void 0 : o.map((
|
|
4280
|
+
const s = (i = o == null ? void 0 : o.map((v) => t.find((d) => d.id === v)).filter(Boolean)) != null ? i : [], c = (l = r == null ? void 0 : r.map((v) => t.find((d) => d.id === v)).filter(Boolean)) != null ? l : [], p = t.filter((v) => !(o != null && o.includes(v.id)) && !(r != null && r.includes(v.id)));
|
|
4281
4281
|
return We(n, [...s, ...p, ...c], e);
|
|
4282
4282
|
}, Z(e.options, xe, "getHeaderGroups")), e.getCenterHeaderGroups = G(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o, r) => (t = t.filter((i) => !(o != null && o.includes(i.id)) && !(r != null && r.includes(i.id))), We(n, t, e, "center")), Z(e.options, xe, "getCenterHeaderGroups")), e.getLeftHeaderGroups = G(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (n, t, o) => {
|
|
4283
4283
|
var r;
|
|
@@ -4305,58 +4305,58 @@ const Sr = {
|
|
|
4305
4305
|
function We(e, n, t, o) {
|
|
4306
4306
|
var r, i;
|
|
4307
4307
|
let l = 0;
|
|
4308
|
-
const s = function(
|
|
4309
|
-
|
|
4310
|
-
var
|
|
4311
|
-
(
|
|
4308
|
+
const s = function(d, g) {
|
|
4309
|
+
g === void 0 && (g = 1), l = Math.max(l, g), d.filter((x) => x.getIsVisible()).forEach((x) => {
|
|
4310
|
+
var f;
|
|
4311
|
+
(f = x.columns) != null && f.length && s(x.columns, g + 1);
|
|
4312
4312
|
}, 0);
|
|
4313
4313
|
};
|
|
4314
4314
|
s(e);
|
|
4315
4315
|
let c = [];
|
|
4316
|
-
const p = (
|
|
4317
|
-
const
|
|
4318
|
-
depth:
|
|
4319
|
-
id: [o, `${
|
|
4316
|
+
const p = (d, g) => {
|
|
4317
|
+
const x = {
|
|
4318
|
+
depth: g,
|
|
4319
|
+
id: [o, `${g}`].filter(Boolean).join("_"),
|
|
4320
4320
|
headers: []
|
|
4321
|
-
},
|
|
4322
|
-
|
|
4323
|
-
const C = [...
|
|
4321
|
+
}, f = [];
|
|
4322
|
+
d.forEach((h) => {
|
|
4323
|
+
const C = [...f].reverse()[0], M = h.column.depth === x.depth;
|
|
4324
4324
|
let w, L = !1;
|
|
4325
|
-
if (
|
|
4325
|
+
if (M && h.column.parent ? w = h.column.parent : (w = h.column, L = !0), C && (C == null ? void 0 : C.column) === w)
|
|
4326
4326
|
C.subHeaders.push(h);
|
|
4327
4327
|
else {
|
|
4328
4328
|
const b = mn(t, w, {
|
|
4329
|
-
id: [o,
|
|
4329
|
+
id: [o, g, w.id, h == null ? void 0 : h.id].filter(Boolean).join("_"),
|
|
4330
4330
|
isPlaceholder: L,
|
|
4331
|
-
placeholderId: L ? `${
|
|
4332
|
-
depth:
|
|
4333
|
-
index:
|
|
4331
|
+
placeholderId: L ? `${f.filter((I) => I.column === w).length}` : void 0,
|
|
4332
|
+
depth: g,
|
|
4333
|
+
index: f.length
|
|
4334
4334
|
});
|
|
4335
|
-
b.subHeaders.push(h),
|
|
4335
|
+
b.subHeaders.push(h), f.push(b);
|
|
4336
4336
|
}
|
|
4337
|
-
|
|
4338
|
-
}), c.push(
|
|
4339
|
-
}, u = n.map((
|
|
4337
|
+
x.headers.push(h), h.headerGroup = x;
|
|
4338
|
+
}), c.push(x), g > 0 && p(f, g - 1);
|
|
4339
|
+
}, u = n.map((d, g) => mn(t, d, {
|
|
4340
4340
|
depth: l,
|
|
4341
|
-
index:
|
|
4341
|
+
index: g
|
|
4342
4342
|
}));
|
|
4343
4343
|
p(u, l - 1), c.reverse();
|
|
4344
|
-
const
|
|
4345
|
-
let
|
|
4346
|
-
|
|
4344
|
+
const v = (d) => d.filter((x) => x.column.getIsVisible()).map((x) => {
|
|
4345
|
+
let f = 0, h = 0, C = [0];
|
|
4346
|
+
x.subHeaders && x.subHeaders.length ? (C = [], v(x.subHeaders).forEach((w) => {
|
|
4347
4347
|
let {
|
|
4348
4348
|
colSpan: L,
|
|
4349
4349
|
rowSpan: b
|
|
4350
4350
|
} = w;
|
|
4351
|
-
|
|
4352
|
-
})) :
|
|
4353
|
-
const
|
|
4354
|
-
return h = h +
|
|
4355
|
-
colSpan:
|
|
4351
|
+
f += L, C.push(b);
|
|
4352
|
+
})) : f = 1;
|
|
4353
|
+
const M = Math.min(...C);
|
|
4354
|
+
return h = h + M, x.colSpan = f, x.rowSpan = h, {
|
|
4355
|
+
colSpan: f,
|
|
4356
4356
|
rowSpan: h
|
|
4357
4357
|
};
|
|
4358
4358
|
});
|
|
4359
|
-
return
|
|
4359
|
+
return v((r = (i = c[0]) == null ? void 0 : i.headers) != null ? r : []), c;
|
|
4360
4360
|
}
|
|
4361
4361
|
const kr = (e, n, t, o, r, i, l) => {
|
|
4362
4362
|
let s = {
|
|
@@ -4729,20 +4729,20 @@ const Or = {
|
|
|
4729
4729
|
if (t === "right") {
|
|
4730
4730
|
var s, c;
|
|
4731
4731
|
return {
|
|
4732
|
-
left: ((s = r == null ? void 0 : r.left) != null ? s : []).filter((
|
|
4733
|
-
right: [...((c = r == null ? void 0 : r.right) != null ? c : []).filter((
|
|
4732
|
+
left: ((s = r == null ? void 0 : r.left) != null ? s : []).filter((v) => !(o != null && o.includes(v))),
|
|
4733
|
+
right: [...((c = r == null ? void 0 : r.right) != null ? c : []).filter((v) => !(o != null && o.includes(v))), ...o]
|
|
4734
4734
|
};
|
|
4735
4735
|
}
|
|
4736
4736
|
if (t === "left") {
|
|
4737
4737
|
var p, u;
|
|
4738
4738
|
return {
|
|
4739
|
-
left: [...((p = r == null ? void 0 : r.left) != null ? p : []).filter((
|
|
4740
|
-
right: ((u = r == null ? void 0 : r.right) != null ? u : []).filter((
|
|
4739
|
+
left: [...((p = r == null ? void 0 : r.left) != null ? p : []).filter((v) => !(o != null && o.includes(v))), ...o],
|
|
4740
|
+
right: ((u = r == null ? void 0 : r.right) != null ? u : []).filter((v) => !(o != null && o.includes(v)))
|
|
4741
4741
|
};
|
|
4742
4742
|
}
|
|
4743
4743
|
return {
|
|
4744
|
-
left: ((i = r == null ? void 0 : r.left) != null ? i : []).filter((
|
|
4745
|
-
right: ((l = r == null ? void 0 : r.right) != null ? l : []).filter((
|
|
4744
|
+
left: ((i = r == null ? void 0 : r.left) != null ? i : []).filter((v) => !(o != null && o.includes(v))),
|
|
4745
|
+
right: ((l = r == null ? void 0 : r.right) != null ? l : []).filter((v) => !(o != null && o.includes(v)))
|
|
4746
4746
|
};
|
|
4747
4747
|
});
|
|
4748
4748
|
}, e.getCanPin = () => e.getLeafColumns().some((o) => {
|
|
@@ -4854,10 +4854,10 @@ const Or = {
|
|
|
4854
4854
|
return (i) => {
|
|
4855
4855
|
if (!o || !r || (i.persist == null || i.persist(), wt(i) && i.touches && i.touches.length > 1))
|
|
4856
4856
|
return;
|
|
4857
|
-
const l = e.getSize(), s = e ? e.getLeafHeaders().map((C) => [C.column.id, C.column.getSize()]) : [[o.id, o.getSize()]], c = wt(i) ? Math.round(i.touches[0].clientX) : i.clientX, p = {}, u = (C,
|
|
4858
|
-
typeof
|
|
4857
|
+
const l = e.getSize(), s = e ? e.getLeafHeaders().map((C) => [C.column.id, C.column.getSize()]) : [[o.id, o.getSize()]], c = wt(i) ? Math.round(i.touches[0].clientX) : i.clientX, p = {}, u = (C, M) => {
|
|
4858
|
+
typeof M == "number" && (n.setColumnSizingInfo((w) => {
|
|
4859
4859
|
var L, b;
|
|
4860
|
-
const I = n.options.columnResizeDirection === "rtl" ? -1 : 1, T = (
|
|
4860
|
+
const I = n.options.columnResizeDirection === "rtl" ? -1 : 1, T = (M - ((L = w == null ? void 0 : w.startOffset) != null ? L : 0)) * I, H = Math.max(T / ((b = w == null ? void 0 : w.startSize) != null ? b : 0), -0.999999);
|
|
4861
4861
|
return w.columnSizingStart.forEach((N) => {
|
|
4862
4862
|
let [ee, ie] = N;
|
|
4863
4863
|
p[ee] = Math.round(Math.max(ie + ie * H, 0) * 100) / 100;
|
|
@@ -4870,9 +4870,9 @@ const Or = {
|
|
|
4870
4870
|
...w,
|
|
4871
4871
|
...p
|
|
4872
4872
|
})));
|
|
4873
|
-
},
|
|
4874
|
-
u("end", C), n.setColumnSizingInfo((
|
|
4875
|
-
...
|
|
4873
|
+
}, v = (C) => u("move", C), d = (C) => {
|
|
4874
|
+
u("end", C), n.setColumnSizingInfo((M) => ({
|
|
4875
|
+
...M,
|
|
4876
4876
|
isResizingColumn: !1,
|
|
4877
4877
|
startOffset: null,
|
|
4878
4878
|
startSize: null,
|
|
@@ -4880,21 +4880,21 @@ const Or = {
|
|
|
4880
4880
|
deltaPercentage: null,
|
|
4881
4881
|
columnSizingStart: []
|
|
4882
4882
|
}));
|
|
4883
|
-
},
|
|
4884
|
-
moveHandler: (C) =>
|
|
4883
|
+
}, g = t || typeof document < "u" ? document : null, x = {
|
|
4884
|
+
moveHandler: (C) => v(C.clientX),
|
|
4885
4885
|
upHandler: (C) => {
|
|
4886
|
-
|
|
4886
|
+
g == null || g.removeEventListener("mousemove", x.moveHandler), g == null || g.removeEventListener("mouseup", x.upHandler), d(C.clientX);
|
|
4887
4887
|
}
|
|
4888
|
-
},
|
|
4889
|
-
moveHandler: (C) => (C.cancelable && (C.preventDefault(), C.stopPropagation()),
|
|
4888
|
+
}, f = {
|
|
4889
|
+
moveHandler: (C) => (C.cancelable && (C.preventDefault(), C.stopPropagation()), v(C.touches[0].clientX), !1),
|
|
4890
4890
|
upHandler: (C) => {
|
|
4891
|
-
var
|
|
4892
|
-
|
|
4891
|
+
var M;
|
|
4892
|
+
g == null || g.removeEventListener("touchmove", f.moveHandler), g == null || g.removeEventListener("touchend", f.upHandler), C.cancelable && (C.preventDefault(), C.stopPropagation()), d((M = C.touches[0]) == null ? void 0 : M.clientX);
|
|
4893
4893
|
}
|
|
4894
4894
|
}, h = Hr() ? {
|
|
4895
4895
|
passive: !1
|
|
4896
4896
|
} : !1;
|
|
4897
|
-
wt(i) ? (
|
|
4897
|
+
wt(i) ? (g == null || g.addEventListener("touchmove", f.moveHandler, h), g == null || g.addEventListener("touchend", f.upHandler, h)) : (g == null || g.addEventListener("mousemove", x.moveHandler, h), g == null || g.addEventListener("mouseup", x.upHandler, h)), n.setColumnSizingInfo((C) => ({
|
|
4898
4898
|
...C,
|
|
4899
4899
|
startOffset: c,
|
|
4900
4900
|
startSize: l,
|
|
@@ -5233,22 +5233,22 @@ const Br = {
|
|
|
5233
5233
|
n.setRowPinning((c) => {
|
|
5234
5234
|
var p, u;
|
|
5235
5235
|
if (t === "bottom") {
|
|
5236
|
-
var
|
|
5236
|
+
var v, d;
|
|
5237
5237
|
return {
|
|
5238
|
-
top: ((
|
|
5239
|
-
bottom: [...((
|
|
5238
|
+
top: ((v = c == null ? void 0 : c.top) != null ? v : []).filter((f) => !(s != null && s.has(f))),
|
|
5239
|
+
bottom: [...((d = c == null ? void 0 : c.bottom) != null ? d : []).filter((f) => !(s != null && s.has(f))), ...Array.from(s)]
|
|
5240
5240
|
};
|
|
5241
5241
|
}
|
|
5242
5242
|
if (t === "top") {
|
|
5243
|
-
var
|
|
5243
|
+
var g, x;
|
|
5244
5244
|
return {
|
|
5245
|
-
top: [...((
|
|
5246
|
-
bottom: ((
|
|
5245
|
+
top: [...((g = c == null ? void 0 : c.top) != null ? g : []).filter((f) => !(s != null && s.has(f))), ...Array.from(s)],
|
|
5246
|
+
bottom: ((x = c == null ? void 0 : c.bottom) != null ? x : []).filter((f) => !(s != null && s.has(f)))
|
|
5247
5247
|
};
|
|
5248
5248
|
}
|
|
5249
5249
|
return {
|
|
5250
|
-
top: ((p = c == null ? void 0 : c.top) != null ? p : []).filter((
|
|
5251
|
-
bottom: ((u = c == null ? void 0 : c.bottom) != null ? u : []).filter((
|
|
5250
|
+
top: ((p = c == null ? void 0 : c.top) != null ? p : []).filter((f) => !(s != null && s.has(f))),
|
|
5251
|
+
bottom: ((u = c == null ? void 0 : c.bottom) != null ? u : []).filter((f) => !(s != null && s.has(f)))
|
|
5252
5252
|
};
|
|
5253
5253
|
});
|
|
5254
5254
|
}, e.getCanPin = () => {
|
|
@@ -5539,20 +5539,20 @@ const Ne = {
|
|
|
5539
5539
|
}, e.toggleSorting = (t, o) => {
|
|
5540
5540
|
const r = e.getNextSortingOrder(), i = typeof t < "u" && t !== null;
|
|
5541
5541
|
n.setSorting((l) => {
|
|
5542
|
-
const s = l == null ? void 0 : l.find((
|
|
5543
|
-
let p = [], u,
|
|
5542
|
+
const s = l == null ? void 0 : l.find((g) => g.id === e.id), c = l == null ? void 0 : l.findIndex((g) => g.id === e.id);
|
|
5543
|
+
let p = [], u, v = i ? t : r === "desc";
|
|
5544
5544
|
if (l != null && l.length && e.getCanMultiSort() && o ? s ? u = "toggle" : u = "add" : l != null && l.length && c !== l.length - 1 ? u = "replace" : s ? u = "toggle" : u = "replace", u === "toggle" && (i || r || (u = "remove")), u === "add") {
|
|
5545
|
-
var
|
|
5545
|
+
var d;
|
|
5546
5546
|
p = [...l, {
|
|
5547
5547
|
id: e.id,
|
|
5548
|
-
desc:
|
|
5549
|
-
}], p.splice(0, p.length - ((
|
|
5550
|
-
} else u === "toggle" ? p = l.map((
|
|
5551
|
-
...
|
|
5552
|
-
desc:
|
|
5553
|
-
} :
|
|
5548
|
+
desc: v
|
|
5549
|
+
}], p.splice(0, p.length - ((d = n.options.maxMultiSortColCount) != null ? d : Number.MAX_SAFE_INTEGER));
|
|
5550
|
+
} else u === "toggle" ? p = l.map((g) => g.id === e.id ? {
|
|
5551
|
+
...g,
|
|
5552
|
+
desc: v
|
|
5553
|
+
} : g) : u === "remove" ? p = l.filter((g) => g.id !== e.id) : p = [{
|
|
5554
5554
|
id: e.id,
|
|
5555
|
-
desc:
|
|
5555
|
+
desc: v
|
|
5556
5556
|
}];
|
|
5557
5557
|
return p;
|
|
5558
5558
|
});
|
|
@@ -5619,103 +5619,103 @@ function ri(e) {
|
|
|
5619
5619
|
let r = {
|
|
5620
5620
|
_features: o
|
|
5621
5621
|
};
|
|
5622
|
-
const i = r._features.reduce((
|
|
5622
|
+
const i = r._features.reduce((d, g) => Object.assign(d, g.getDefaultOptions == null ? void 0 : g.getDefaultOptions(r)), {}), l = (d) => r.options.mergeOptions ? r.options.mergeOptions(i, d) : {
|
|
5623
5623
|
...i,
|
|
5624
|
-
...
|
|
5624
|
+
...d
|
|
5625
5625
|
};
|
|
5626
5626
|
let c = {
|
|
5627
5627
|
...{},
|
|
5628
5628
|
...(t = e.initialState) != null ? t : {}
|
|
5629
5629
|
};
|
|
5630
|
-
r._features.forEach((
|
|
5631
|
-
var
|
|
5632
|
-
c = (
|
|
5630
|
+
r._features.forEach((d) => {
|
|
5631
|
+
var g;
|
|
5632
|
+
c = (g = d.getInitialState == null ? void 0 : d.getInitialState(c)) != null ? g : c;
|
|
5633
5633
|
});
|
|
5634
5634
|
const p = [];
|
|
5635
5635
|
let u = !1;
|
|
5636
|
-
const
|
|
5636
|
+
const v = {
|
|
5637
5637
|
_features: o,
|
|
5638
5638
|
options: {
|
|
5639
5639
|
...i,
|
|
5640
5640
|
...e
|
|
5641
5641
|
},
|
|
5642
5642
|
initialState: c,
|
|
5643
|
-
_queue: (
|
|
5644
|
-
p.push(
|
|
5643
|
+
_queue: (d) => {
|
|
5644
|
+
p.push(d), u || (u = !0, Promise.resolve().then(() => {
|
|
5645
5645
|
for (; p.length; )
|
|
5646
5646
|
p.shift()();
|
|
5647
5647
|
u = !1;
|
|
5648
|
-
}).catch((
|
|
5649
|
-
throw
|
|
5648
|
+
}).catch((g) => setTimeout(() => {
|
|
5649
|
+
throw g;
|
|
5650
5650
|
})));
|
|
5651
5651
|
},
|
|
5652
5652
|
reset: () => {
|
|
5653
5653
|
r.setState(r.initialState);
|
|
5654
5654
|
},
|
|
5655
|
-
setOptions: (
|
|
5656
|
-
const
|
|
5657
|
-
r.options = l(
|
|
5655
|
+
setOptions: (d) => {
|
|
5656
|
+
const g = ke(d, r.options);
|
|
5657
|
+
r.options = l(g);
|
|
5658
5658
|
},
|
|
5659
5659
|
getState: () => r.options.state,
|
|
5660
|
-
setState: (
|
|
5661
|
-
r.options.onStateChange == null || r.options.onStateChange(
|
|
5660
|
+
setState: (d) => {
|
|
5661
|
+
r.options.onStateChange == null || r.options.onStateChange(d);
|
|
5662
5662
|
},
|
|
5663
|
-
_getRowId: (
|
|
5664
|
-
var
|
|
5665
|
-
return (
|
|
5663
|
+
_getRowId: (d, g, x) => {
|
|
5664
|
+
var f;
|
|
5665
|
+
return (f = r.options.getRowId == null ? void 0 : r.options.getRowId(d, g, x)) != null ? f : `${x ? [x.id, g].join(".") : g}`;
|
|
5666
5666
|
},
|
|
5667
5667
|
getCoreRowModel: () => (r._getCoreRowModel || (r._getCoreRowModel = r.options.getCoreRowModel(r)), r._getCoreRowModel()),
|
|
5668
5668
|
// The final calls start at the bottom of the model,
|
|
5669
5669
|
// expanded rows, which then work their way up
|
|
5670
5670
|
getRowModel: () => r.getPaginationRowModel(),
|
|
5671
5671
|
//in next version, we should just pass in the row model as the optional 2nd arg
|
|
5672
|
-
getRow: (
|
|
5673
|
-
let
|
|
5674
|
-
if (!
|
|
5675
|
-
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${
|
|
5676
|
-
return
|
|
5672
|
+
getRow: (d, g) => {
|
|
5673
|
+
let x = (g ? r.getPrePaginationRowModel() : r.getRowModel()).rowsById[d];
|
|
5674
|
+
if (!x && (x = r.getCoreRowModel().rowsById[d], !x))
|
|
5675
|
+
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${d}`) : new Error();
|
|
5676
|
+
return x;
|
|
5677
5677
|
},
|
|
5678
|
-
_getDefaultColumnDef: G(() => [r.options.defaultColumn], (
|
|
5679
|
-
var
|
|
5680
|
-
return
|
|
5681
|
-
header: (
|
|
5682
|
-
const
|
|
5683
|
-
return
|
|
5678
|
+
_getDefaultColumnDef: G(() => [r.options.defaultColumn], (d) => {
|
|
5679
|
+
var g;
|
|
5680
|
+
return d = (g = d) != null ? g : {}, {
|
|
5681
|
+
header: (x) => {
|
|
5682
|
+
const f = x.header.column.columnDef;
|
|
5683
|
+
return f.accessorKey ? f.accessorKey : f.accessorFn ? f.id : null;
|
|
5684
5684
|
},
|
|
5685
5685
|
// footer: props => props.header.column.id,
|
|
5686
|
-
cell: (
|
|
5687
|
-
var
|
|
5688
|
-
return (
|
|
5686
|
+
cell: (x) => {
|
|
5687
|
+
var f, h;
|
|
5688
|
+
return (f = (h = x.renderValue()) == null || h.toString == null ? void 0 : h.toString()) != null ? f : null;
|
|
5689
5689
|
},
|
|
5690
|
-
...r._features.reduce((
|
|
5691
|
-
...
|
|
5690
|
+
...r._features.reduce((x, f) => Object.assign(x, f.getDefaultColumnDef == null ? void 0 : f.getDefaultColumnDef()), {}),
|
|
5691
|
+
...d
|
|
5692
5692
|
};
|
|
5693
5693
|
}, Z(e, "debugColumns", "_getDefaultColumnDef")),
|
|
5694
5694
|
_getColumnDefs: () => r.options.columns,
|
|
5695
|
-
getAllColumns: G(() => [r._getColumnDefs()], (
|
|
5696
|
-
const
|
|
5697
|
-
return h === void 0 && (h = 0),
|
|
5698
|
-
const
|
|
5699
|
-
return
|
|
5695
|
+
getAllColumns: G(() => [r._getColumnDefs()], (d) => {
|
|
5696
|
+
const g = function(x, f, h) {
|
|
5697
|
+
return h === void 0 && (h = 0), x.map((C) => {
|
|
5698
|
+
const M = jr(r, C, h, f), w = C;
|
|
5699
|
+
return M.columns = w.columns ? g(w.columns, M, h + 1) : [], M;
|
|
5700
5700
|
});
|
|
5701
5701
|
};
|
|
5702
|
-
return d
|
|
5702
|
+
return g(d);
|
|
5703
5703
|
}, Z(e, "debugColumns", "getAllColumns")),
|
|
5704
|
-
getAllFlatColumns: G(() => [r.getAllColumns()], (
|
|
5705
|
-
_getAllFlatColumnsById: G(() => [r.getAllFlatColumns()], (
|
|
5706
|
-
getAllLeafColumns: G(() => [r.getAllColumns(), r._getOrderColumnsFn()], (
|
|
5707
|
-
let
|
|
5708
|
-
return
|
|
5704
|
+
getAllFlatColumns: G(() => [r.getAllColumns()], (d) => d.flatMap((g) => g.getFlatColumns()), Z(e, "debugColumns", "getAllFlatColumns")),
|
|
5705
|
+
_getAllFlatColumnsById: G(() => [r.getAllFlatColumns()], (d) => d.reduce((g, x) => (g[x.id] = x, g), {}), Z(e, "debugColumns", "getAllFlatColumnsById")),
|
|
5706
|
+
getAllLeafColumns: G(() => [r.getAllColumns(), r._getOrderColumnsFn()], (d, g) => {
|
|
5707
|
+
let x = d.flatMap((f) => f.getLeafColumns());
|
|
5708
|
+
return g(x);
|
|
5709
5709
|
}, Z(e, "debugColumns", "getAllLeafColumns")),
|
|
5710
|
-
getColumn: (
|
|
5711
|
-
const
|
|
5712
|
-
return process.env.NODE_ENV !== "production" && !
|
|
5710
|
+
getColumn: (d) => {
|
|
5711
|
+
const g = r._getAllFlatColumnsById()[d];
|
|
5712
|
+
return process.env.NODE_ENV !== "production" && !g && console.error(`[Table] Column with id '${d}' does not exist.`), g;
|
|
5713
5713
|
}
|
|
5714
5714
|
};
|
|
5715
|
-
Object.assign(r,
|
|
5716
|
-
for (let
|
|
5717
|
-
const
|
|
5718
|
-
|
|
5715
|
+
Object.assign(r, v);
|
|
5716
|
+
for (let d = 0; d < r._features.length; d++) {
|
|
5717
|
+
const g = r._features[d];
|
|
5718
|
+
g == null || g.createTable == null || g.createTable(r);
|
|
5719
5719
|
}
|
|
5720
5720
|
return r;
|
|
5721
5721
|
}
|
|
@@ -5889,10 +5889,10 @@ const li = {
|
|
|
5889
5889
|
className: c = "",
|
|
5890
5890
|
paginationClassName: p = "",
|
|
5891
5891
|
tdClassName: u = "",
|
|
5892
|
-
thClassName:
|
|
5893
|
-
responsive:
|
|
5892
|
+
thClassName: v = "",
|
|
5893
|
+
responsive: d = !1
|
|
5894
5894
|
}) => {
|
|
5895
|
-
const
|
|
5895
|
+
const g = ai({
|
|
5896
5896
|
data: e,
|
|
5897
5897
|
columns: n,
|
|
5898
5898
|
getCoreRowModel: ii(),
|
|
@@ -5907,33 +5907,33 @@ const li = {
|
|
|
5907
5907
|
{
|
|
5908
5908
|
className: `relative overflow-y-auto flex flex-col ${c} `,
|
|
5909
5909
|
children: [
|
|
5910
|
-
/* @__PURE__ */ a.jsx("div", { className: `${
|
|
5911
|
-
/* @__PURE__ */ a.jsx("thead", { className: "sticky top-0 left-0 rounded-xl bg-color-[#FAFBFB] z-10 h-10", children:
|
|
5910
|
+
/* @__PURE__ */ a.jsx("div", { className: `${d ? "overflow-x-auto" : ""}`, children: /* @__PURE__ */ a.jsxs("table", { className: "w-full relative border-collapse", children: [
|
|
5911
|
+
/* @__PURE__ */ a.jsx("thead", { className: "sticky top-0 left-0 rounded-xl bg-color-[#FAFBFB] z-10 h-10", children: g.getHeaderGroups().map((x) => /* @__PURE__ */ a.jsx("tr", { children: x.headers.map((f) => /* @__PURE__ */ a.jsx(
|
|
5912
5912
|
"th",
|
|
5913
5913
|
{
|
|
5914
|
-
className: `bg-color-[#FAFBFB] p-2 text-left text-xs font-semibold text-color-gray-500 border-b border-color-gray-200 ${
|
|
5915
|
-
children:
|
|
5916
|
-
|
|
5917
|
-
) :
|
|
5914
|
+
className: `bg-color-[#FAFBFB] p-2 text-left text-xs font-semibold text-color-gray-500 border-b border-color-gray-200 ${v}`,
|
|
5915
|
+
children: f.isPlaceholder ? null : f.column.columnDef.header instanceof Function ? f.column.columnDef.header(
|
|
5916
|
+
f.getContext()
|
|
5917
|
+
) : f.column.columnDef.header
|
|
5918
5918
|
},
|
|
5919
|
-
|
|
5920
|
-
)) },
|
|
5921
|
-
/* @__PURE__ */ a.jsx("tbody", { className: "", children:
|
|
5919
|
+
f.id
|
|
5920
|
+
)) }, x.id)) }),
|
|
5921
|
+
/* @__PURE__ */ a.jsx("tbody", { className: "", children: g.getRowModel().rows.map((x) => /* @__PURE__ */ a.jsx(
|
|
5922
5922
|
"tr",
|
|
5923
5923
|
{
|
|
5924
5924
|
className: "border-b border-color-gray-200",
|
|
5925
|
-
children:
|
|
5925
|
+
children: x.getVisibleCells().map((f) => /* @__PURE__ */ a.jsx(
|
|
5926
5926
|
"td",
|
|
5927
5927
|
{
|
|
5928
5928
|
className: `px-2 py-4 font-normal text-sm text-color-gray-800 ${u}`,
|
|
5929
|
-
children:
|
|
5930
|
-
|
|
5931
|
-
) :
|
|
5929
|
+
children: f.column.columnDef.cell instanceof Function ? f.column.columnDef.cell(
|
|
5930
|
+
f.getContext()
|
|
5931
|
+
) : f.getValue()
|
|
5932
5932
|
},
|
|
5933
|
-
|
|
5933
|
+
f.id
|
|
5934
5934
|
))
|
|
5935
5935
|
},
|
|
5936
|
-
|
|
5936
|
+
x.id
|
|
5937
5937
|
)) })
|
|
5938
5938
|
] }) }),
|
|
5939
5939
|
/* @__PURE__ */ a.jsxs(
|
|
@@ -5949,8 +5949,8 @@ const li = {
|
|
|
5949
5949
|
options: l,
|
|
5950
5950
|
selectedValue: t,
|
|
5951
5951
|
placementTop: !0,
|
|
5952
|
-
onChange: (
|
|
5953
|
-
r(
|
|
5952
|
+
onChange: (x) => {
|
|
5953
|
+
r(x), i(0);
|
|
5954
5954
|
}
|
|
5955
5955
|
}
|
|
5956
5956
|
)
|
|
@@ -5961,7 +5961,7 @@ const li = {
|
|
|
5961
5961
|
total: s,
|
|
5962
5962
|
pageSize: t,
|
|
5963
5963
|
currentPage: o + 1,
|
|
5964
|
-
onPageChange: (
|
|
5964
|
+
onPageChange: (x) => i(x - 1)
|
|
5965
5965
|
}
|
|
5966
5966
|
)
|
|
5967
5967
|
]
|
|
@@ -6038,15 +6038,15 @@ const li = {
|
|
|
6038
6038
|
defaultHeight: 100
|
|
6039
6039
|
};
|
|
6040
6040
|
}
|
|
6041
|
-
}, { classes: c, defaultWidth: p, defaultHeight: u } = s(),
|
|
6042
|
-
|
|
6043
|
-
const
|
|
6041
|
+
}, { classes: c, defaultWidth: p, defaultHeight: u } = s(), v = t ?? p, d = o ?? u, g = {};
|
|
6042
|
+
v !== void 0 && (g.width = `${v}px`), d !== void 0 && (g.height = `${d}px`), n === "text" && t === void 0 && (g.width = "100%");
|
|
6043
|
+
const x = [
|
|
6044
6044
|
i,
|
|
6045
6045
|
c,
|
|
6046
6046
|
l[e],
|
|
6047
6047
|
r
|
|
6048
6048
|
].filter(Boolean).join(" ");
|
|
6049
|
-
return /* @__PURE__ */ a.jsx("div", { className:
|
|
6049
|
+
return /* @__PURE__ */ a.jsx("div", { className: x, style: g, children: e === "wave" && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
6050
6050
|
/* @__PURE__ */ a.jsx(
|
|
6051
6051
|
"div",
|
|
6052
6052
|
{
|
|
@@ -6141,14 +6141,14 @@ const Vi = no(function({
|
|
|
6141
6141
|
color: c = "blue",
|
|
6142
6142
|
size: p = "medium",
|
|
6143
6143
|
disabled: u = !1,
|
|
6144
|
-
className:
|
|
6145
|
-
showValue:
|
|
6146
|
-
showMarks:
|
|
6147
|
-
marks:
|
|
6148
|
-
range:
|
|
6144
|
+
className: v = "",
|
|
6145
|
+
showValue: d = !0,
|
|
6146
|
+
showMarks: g = !1,
|
|
6147
|
+
marks: x = [],
|
|
6148
|
+
range: f = !1,
|
|
6149
6149
|
minDistance: h = 0
|
|
6150
6150
|
}) {
|
|
6151
|
-
const C = n !== void 0, [
|
|
6151
|
+
const C = n !== void 0, [M, w] = W(() => t !== void 0 ? t : f ? [i, l] : i), L = C ? n : M, b = Array.isArray(L) ? L[0] : L, [I, T] = Array.isArray(L) ? L : [L, L], H = St[c] || St.blue, N = vn[p] ?? vn.medium, ee = oe(
|
|
6152
6152
|
(k) => (k - i) / (l - i) * 100,
|
|
6153
6153
|
[i, l]
|
|
6154
6154
|
), ie = ee(b), ce = ee(I), U = ee(T), O = oe((k) => Math.max(i, Math.min(l, k)), [i, l]), Y = oe((k) => Math.round(k / s) * s, [s]), D = gi(o), Q = oe(
|
|
@@ -6161,24 +6161,24 @@ const Vi = no(function({
|
|
|
6161
6161
|
k != null && (D.flush(k), r == null || r(k));
|
|
6162
6162
|
}, [D, r]), K = oe(
|
|
6163
6163
|
(k, X) => {
|
|
6164
|
-
if (
|
|
6164
|
+
if (f && Array.isArray(k)) {
|
|
6165
6165
|
let [J, ue] = k, de = Y(O(J)), ve = Y(O(ue));
|
|
6166
6166
|
return ve - de < h && (X === "min" ? ve = O(de + h) : X === "max" && (de = O(ve - h))), de > ve && (X === "min" ? de = ve : ve = de), [de, ve];
|
|
6167
|
-
} else if (!
|
|
6167
|
+
} else if (!f && typeof k == "number")
|
|
6168
6168
|
return Y(O(k));
|
|
6169
6169
|
return k;
|
|
6170
6170
|
},
|
|
6171
|
-
[
|
|
6171
|
+
[f, O, Y, h]
|
|
6172
6172
|
), m = le(null), y = oe(
|
|
6173
6173
|
(k) => {
|
|
6174
6174
|
var ue;
|
|
6175
6175
|
const X = (ue = m.current) == null ? void 0 : ue.getBoundingClientRect();
|
|
6176
|
-
if (!X) return
|
|
6176
|
+
if (!X) return f ? i : b;
|
|
6177
6177
|
const J = Math.max(0, Math.min(1, (k - X.left) / X.width));
|
|
6178
6178
|
return i + J * (l - i);
|
|
6179
6179
|
},
|
|
6180
|
-
[i, l,
|
|
6181
|
-
),
|
|
6180
|
+
[i, l, f, b]
|
|
6181
|
+
), E = oe(
|
|
6182
6182
|
(k) => {
|
|
6183
6183
|
const X = Math.abs(k - I), J = Math.abs(k - T);
|
|
6184
6184
|
return X <= J ? "min" : "max";
|
|
@@ -6190,17 +6190,17 @@ const Vi = no(function({
|
|
|
6190
6190
|
if (u) return;
|
|
6191
6191
|
k.preventDefault(), (de = (ue = k.currentTarget).setPointerCapture) == null || de.call(ue, k.pointerId), $(k.pointerId);
|
|
6192
6192
|
const J = y(k.clientX);
|
|
6193
|
-
if (
|
|
6194
|
-
const ve = X ||
|
|
6193
|
+
if (f) {
|
|
6194
|
+
const ve = X || E(J);
|
|
6195
6195
|
F(ve), Q(ve === "min" ? K([J, T], "min") : K([I, J], "max"));
|
|
6196
6196
|
} else
|
|
6197
6197
|
F("single"), Q(K(J, "single"));
|
|
6198
6198
|
},
|
|
6199
6199
|
[
|
|
6200
6200
|
u,
|
|
6201
|
-
|
|
6201
|
+
f,
|
|
6202
6202
|
y,
|
|
6203
|
-
|
|
6203
|
+
E,
|
|
6204
6204
|
K,
|
|
6205
6205
|
I,
|
|
6206
6206
|
T,
|
|
@@ -6210,13 +6210,13 @@ const Vi = no(function({
|
|
|
6210
6210
|
(k) => {
|
|
6211
6211
|
if (u || R == null || _ == null) return;
|
|
6212
6212
|
const X = y(k.clientX);
|
|
6213
|
-
|
|
6213
|
+
f ? _ === "min" ? Q(K([X, T], "min")) : _ === "max" && Q(K([I, X], "max")) : Q(K(X, "single"));
|
|
6214
6214
|
},
|
|
6215
6215
|
[
|
|
6216
6216
|
u,
|
|
6217
6217
|
R,
|
|
6218
6218
|
_,
|
|
6219
|
-
|
|
6219
|
+
f,
|
|
6220
6220
|
y,
|
|
6221
6221
|
K,
|
|
6222
6222
|
I,
|
|
@@ -6228,7 +6228,7 @@ const Vi = no(function({
|
|
|
6228
6228
|
}, [_, pe]), S = oe(
|
|
6229
6229
|
(k, X) => {
|
|
6230
6230
|
if (u) return;
|
|
6231
|
-
const J =
|
|
6231
|
+
const J = f ? X === "min" ? I : T : b;
|
|
6232
6232
|
let ue = J;
|
|
6233
6233
|
const de = (l - i) / 10;
|
|
6234
6234
|
switch (k.key) {
|
|
@@ -6255,11 +6255,11 @@ const Vi = no(function({
|
|
|
6255
6255
|
default:
|
|
6256
6256
|
return;
|
|
6257
6257
|
}
|
|
6258
|
-
k.preventDefault(), Q(
|
|
6258
|
+
k.preventDefault(), Q(f ? X === "min" ? K([ue, T], "min") : K([I, ue], "max") : K(ue, "single"), !1), r == null || r(C ? n : L);
|
|
6259
6259
|
},
|
|
6260
6260
|
[
|
|
6261
6261
|
u,
|
|
6262
|
-
|
|
6262
|
+
f,
|
|
6263
6263
|
b,
|
|
6264
6264
|
I,
|
|
6265
6265
|
T,
|
|
@@ -6280,8 +6280,8 @@ const Vi = no(function({
|
|
|
6280
6280
|
return document.body.style.userSelect = "none", () => {
|
|
6281
6281
|
document.body.style.userSelect = k;
|
|
6282
6282
|
};
|
|
6283
|
-
}, [_]), /* @__PURE__ */ a.jsx("div", { className: `w-full ${
|
|
6284
|
-
|
|
6283
|
+
}, [_]), /* @__PURE__ */ a.jsx("div", { className: `w-full ${v}`, children: /* @__PURE__ */ a.jsxs("div", { className: "relative flex items-center", children: [
|
|
6284
|
+
f && /* @__PURE__ */ a.jsx("div", { className: "mr-3 text-sm font-medium text-color-gray-700 dark:text-color-gray-200 min-w-[2rem]", children: /* @__PURE__ */ a.jsx("div", { className: "range-min", children: /* @__PURE__ */ a.jsx("div", { children: I }) }) }),
|
|
6285
6285
|
/* @__PURE__ */ a.jsxs("div", { className: "w-full", children: [
|
|
6286
6286
|
/* @__PURE__ */ a.jsxs(
|
|
6287
6287
|
"div",
|
|
@@ -6296,7 +6296,7 @@ const Vi = no(function({
|
|
|
6296
6296
|
onPointerUp: j,
|
|
6297
6297
|
onPointerCancel: j,
|
|
6298
6298
|
children: [
|
|
6299
|
-
|
|
6299
|
+
f ? /* @__PURE__ */ a.jsx(
|
|
6300
6300
|
"div",
|
|
6301
6301
|
{
|
|
6302
6302
|
className: `absolute top-0 ${N.track} ${H.progress} rounded-full ${_ ? "" : "transition-all duration-150"}`,
|
|
@@ -6309,7 +6309,7 @@ const Vi = no(function({
|
|
|
6309
6309
|
style: { width: `${ie}%` }
|
|
6310
6310
|
}
|
|
6311
6311
|
),
|
|
6312
|
-
|
|
6312
|
+
g && x.map((k, X) => {
|
|
6313
6313
|
const J = ee(k.value);
|
|
6314
6314
|
return /* @__PURE__ */ a.jsx(
|
|
6315
6315
|
"div",
|
|
@@ -6320,7 +6320,7 @@ const Vi = no(function({
|
|
|
6320
6320
|
X
|
|
6321
6321
|
);
|
|
6322
6322
|
}),
|
|
6323
|
-
!
|
|
6323
|
+
!f && /* @__PURE__ */ a.jsx(
|
|
6324
6324
|
"div",
|
|
6325
6325
|
{
|
|
6326
6326
|
className: `
|
|
@@ -6345,7 +6345,7 @@ const Vi = no(function({
|
|
|
6345
6345
|
onPointerDown: (k) => V(k, "single")
|
|
6346
6346
|
}
|
|
6347
6347
|
),
|
|
6348
|
-
|
|
6348
|
+
f && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
6349
6349
|
/* @__PURE__ */ a.jsx(
|
|
6350
6350
|
"div",
|
|
6351
6351
|
{
|
|
@@ -6402,11 +6402,11 @@ const Vi = no(function({
|
|
|
6402
6402
|
]
|
|
6403
6403
|
}
|
|
6404
6404
|
),
|
|
6405
|
-
|
|
6405
|
+
g && x.length > 0 && /* @__PURE__ */ a.jsx(
|
|
6406
6406
|
"div",
|
|
6407
6407
|
{
|
|
6408
6408
|
className: "relative mt-2 text-xs text-color-gray-500 dark:text-color-gray-200",
|
|
6409
|
-
children:
|
|
6409
|
+
children: x.map((k, X) => {
|
|
6410
6410
|
const J = ee(k.value);
|
|
6411
6411
|
return /* @__PURE__ */ a.jsx(
|
|
6412
6412
|
"div",
|
|
@@ -6421,7 +6421,7 @@ const Vi = no(function({
|
|
|
6421
6421
|
}
|
|
6422
6422
|
)
|
|
6423
6423
|
] }),
|
|
6424
|
-
|
|
6424
|
+
d && /* @__PURE__ */ a.jsx("div", { className: "ml-3 text-sm font-medium text-color-gray-700 dark:text-color-gray-200 min-w-[2rem] text-right", children: f ? /* @__PURE__ */ a.jsx("div", { className: "range-max", children: /* @__PURE__ */ a.jsx("div", { children: T }) }) : /* @__PURE__ */ a.jsx("span", { children: b }) })
|
|
6425
6425
|
] }) });
|
|
6426
6426
|
}), Hi = ({
|
|
6427
6427
|
open: e = !1,
|
|
@@ -6433,41 +6433,41 @@ const Vi = no(function({
|
|
|
6433
6433
|
action: l,
|
|
6434
6434
|
className: s = ""
|
|
6435
6435
|
}) => {
|
|
6436
|
-
var
|
|
6436
|
+
var v;
|
|
6437
6437
|
se(() => {
|
|
6438
6438
|
if (e && t > 0 && i) {
|
|
6439
|
-
const
|
|
6439
|
+
const d = setTimeout(() => {
|
|
6440
6440
|
i();
|
|
6441
6441
|
}, t);
|
|
6442
|
-
return () => clearTimeout(
|
|
6442
|
+
return () => clearTimeout(d);
|
|
6443
6443
|
}
|
|
6444
6444
|
}, [e, t, i]), se(() => {
|
|
6445
|
-
const
|
|
6446
|
-
|
|
6445
|
+
const d = (g) => {
|
|
6446
|
+
g.key === "Escape" && e && i && i();
|
|
6447
6447
|
};
|
|
6448
6448
|
if (e)
|
|
6449
|
-
return document.addEventListener("keydown",
|
|
6449
|
+
return document.addEventListener("keydown", d), () => document.removeEventListener("keydown", d);
|
|
6450
6450
|
}, [e, i]);
|
|
6451
6451
|
const c = oe(() => {
|
|
6452
6452
|
i && i();
|
|
6453
|
-
}, [i]), p = (
|
|
6454
|
-
const
|
|
6455
|
-
switch (
|
|
6453
|
+
}, [i]), p = (d) => {
|
|
6454
|
+
const g = "fixed z-50 transform transition-all duration-300 ease-in-out";
|
|
6455
|
+
switch (d) {
|
|
6456
6456
|
case "top-center":
|
|
6457
|
-
return `${
|
|
6457
|
+
return `${g} top-4 left-1/2 -translate-x-1/2 ${e ? "translate-y-0 opacity-100" : "-translate-y-full opacity-0"}`;
|
|
6458
6458
|
case "top-left":
|
|
6459
|
-
return `${
|
|
6459
|
+
return `${g} top-4 left-4 ${e ? "translate-y-0 opacity-100" : "-translate-y-full opacity-0"}`;
|
|
6460
6460
|
case "top-right":
|
|
6461
|
-
return `${
|
|
6461
|
+
return `${g} top-4 right-4 ${e ? "translate-y-0 opacity-100" : "-translate-y-full opacity-0"}`;
|
|
6462
6462
|
case "bottom-left":
|
|
6463
|
-
return `${
|
|
6463
|
+
return `${g} bottom-4 left-4 ${e ? "translate-y-0 opacity-100" : "translate-y-full opacity-0"}`;
|
|
6464
6464
|
case "bottom-right":
|
|
6465
|
-
return `${
|
|
6465
|
+
return `${g} bottom-4 right-4 ${e ? "translate-y-0 opacity-100" : "translate-y-full opacity-0"}`;
|
|
6466
6466
|
case "bottom-center":
|
|
6467
6467
|
default:
|
|
6468
|
-
return `${
|
|
6468
|
+
return `${g} bottom-4 left-1/2 -translate-x-1/2 ${e ? "translate-y-0 opacity-100" : "translate-y-full opacity-0"}`;
|
|
6469
6469
|
}
|
|
6470
|
-
}, u = (
|
|
6470
|
+
}, u = (v = me[r]) == null ? void 0 : v.filled;
|
|
6471
6471
|
return e ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
6472
6472
|
e && /* @__PURE__ */ a.jsx(
|
|
6473
6473
|
"div",
|
|
@@ -6513,87 +6513,79 @@ const Vi = no(function({
|
|
|
6513
6513
|
className: r = "",
|
|
6514
6514
|
...i
|
|
6515
6515
|
}) => {
|
|
6516
|
-
var
|
|
6517
|
-
const l =
|
|
6516
|
+
var u, v;
|
|
6517
|
+
const l = (u = me[t]) == null ? void 0 : u.outline, s = (v = me[t]) == null ? void 0 : v.filled, c = Math.min(Math.max(n, 0), 100);
|
|
6518
6518
|
if (e === "circular") {
|
|
6519
|
-
const { size: d = 40, thickness:
|
|
6520
|
-
return /* @__PURE__ */ a.
|
|
6519
|
+
const { size: d = 40, thickness: g = 4 } = i, x = o ? c / 100 * 360 : 270;
|
|
6520
|
+
return /* @__PURE__ */ a.jsxs(
|
|
6521
6521
|
"div",
|
|
6522
6522
|
{
|
|
6523
|
-
className:
|
|
6523
|
+
className: `relative inline-block ${r}`,
|
|
6524
6524
|
style: { width: d, height: d },
|
|
6525
6525
|
role: "progressbar",
|
|
6526
|
-
"aria-valuenow": o ?
|
|
6526
|
+
"aria-valuenow": o ? c : void 0,
|
|
6527
6527
|
"aria-valuemin": 0,
|
|
6528
6528
|
"aria-valuemax": 100,
|
|
6529
|
-
children:
|
|
6530
|
-
|
|
6531
|
-
|
|
6532
|
-
|
|
6533
|
-
|
|
6534
|
-
|
|
6535
|
-
|
|
6536
|
-
|
|
6537
|
-
|
|
6538
|
-
"
|
|
6539
|
-
|
|
6540
|
-
|
|
6541
|
-
|
|
6542
|
-
|
|
6543
|
-
|
|
6544
|
-
|
|
6545
|
-
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
"
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
|
|
6562
|
-
strokeDashoffset: o ? E : h * 0.75,
|
|
6563
|
-
transformOrigin: "center"
|
|
6564
|
-
}
|
|
6565
|
-
}
|
|
6566
|
-
)
|
|
6567
|
-
]
|
|
6568
|
-
}
|
|
6569
|
-
)
|
|
6529
|
+
children: [
|
|
6530
|
+
/* @__PURE__ */ a.jsx(
|
|
6531
|
+
"div",
|
|
6532
|
+
{
|
|
6533
|
+
className: "absolute inset-0 rounded-full border-4 border-color-gray-200 dark:border-color-gray-700",
|
|
6534
|
+
style: {
|
|
6535
|
+
borderWidth: g,
|
|
6536
|
+
width: d,
|
|
6537
|
+
height: d,
|
|
6538
|
+
boxSizing: "border-box"
|
|
6539
|
+
}
|
|
6540
|
+
}
|
|
6541
|
+
),
|
|
6542
|
+
/* @__PURE__ */ a.jsx(
|
|
6543
|
+
"div",
|
|
6544
|
+
{
|
|
6545
|
+
className: `absolute inset-0 rounded-full ${l} ${o ? "" : "animate-circular-indeterminate"}`,
|
|
6546
|
+
style: {
|
|
6547
|
+
width: d,
|
|
6548
|
+
height: d,
|
|
6549
|
+
borderWidth: g,
|
|
6550
|
+
borderStyle: "solid",
|
|
6551
|
+
transform: "rotate(-90deg)",
|
|
6552
|
+
borderRadius: "50%",
|
|
6553
|
+
boxSizing: "border-box",
|
|
6554
|
+
transition: "all 0.3s",
|
|
6555
|
+
background: "transparent",
|
|
6556
|
+
maskImage: `conic-gradient(black 0deg, black ${x}deg, transparent ${x}deg 360deg)`,
|
|
6557
|
+
WebkitMaskImage: `conic-gradient(black 0deg, black ${x}deg, transparent ${x}deg 360deg)`
|
|
6558
|
+
}
|
|
6559
|
+
}
|
|
6560
|
+
)
|
|
6561
|
+
]
|
|
6570
6562
|
}
|
|
6571
6563
|
);
|
|
6572
6564
|
}
|
|
6573
|
-
const { thickness:
|
|
6565
|
+
const { thickness: p = 4 } = i;
|
|
6574
6566
|
return /* @__PURE__ */ a.jsx(
|
|
6575
6567
|
"div",
|
|
6576
6568
|
{
|
|
6577
|
-
className:
|
|
6569
|
+
className: `inline-block w-full ${r}`,
|
|
6578
6570
|
role: "progressbar",
|
|
6579
|
-
"aria-valuenow": o ?
|
|
6571
|
+
"aria-valuenow": o ? c : void 0,
|
|
6580
6572
|
"aria-valuemin": 0,
|
|
6581
6573
|
"aria-valuemax": 100,
|
|
6582
6574
|
children: /* @__PURE__ */ a.jsx(
|
|
6583
6575
|
"div",
|
|
6584
6576
|
{
|
|
6585
6577
|
className: "w-full bg-color-gray-200 dark:bg-color-gray-700 rounded-full overflow-hidden relative",
|
|
6586
|
-
style: { height: `${
|
|
6578
|
+
style: { height: `${p}px` },
|
|
6587
6579
|
children: o ? /* @__PURE__ */ a.jsx(
|
|
6588
6580
|
"div",
|
|
6589
6581
|
{
|
|
6590
|
-
className: `h-full ${
|
|
6591
|
-
style: { width: `${
|
|
6582
|
+
className: `h-full ${s} transition-all duration-300 ease-out`,
|
|
6583
|
+
style: { width: `${c}%` }
|
|
6592
6584
|
}
|
|
6593
6585
|
) : /* @__PURE__ */ a.jsx(
|
|
6594
6586
|
"div",
|
|
6595
6587
|
{
|
|
6596
|
-
className: `absolute left-0 top-0 h-full ${
|
|
6588
|
+
className: `absolute left-0 top-0 h-full ${s} animate-progress-indeterminate-gpu`,
|
|
6597
6589
|
style: { width: "40%" }
|
|
6598
6590
|
}
|
|
6599
6591
|
)
|
|
@@ -6617,11 +6609,11 @@ const Vi = no(function({
|
|
|
6617
6609
|
emptyIcon: c,
|
|
6618
6610
|
className: p = "",
|
|
6619
6611
|
showHoverValue: u = !1,
|
|
6620
|
-
showValue:
|
|
6621
|
-
labels:
|
|
6612
|
+
showValue: v = !1,
|
|
6613
|
+
labels: d = {}
|
|
6622
6614
|
// <-- Add this
|
|
6623
6615
|
}) => {
|
|
6624
|
-
const [
|
|
6616
|
+
const [g, x] = Ce.useState(null), f = (w, L) => {
|
|
6625
6617
|
if (t || o || !n) return;
|
|
6626
6618
|
const { left: b, width: I } = w.target.getBoundingClientRect(), T = (w.clientX - b) / I;
|
|
6627
6619
|
let H = L - 1 + Math.ceil(T / r) * r;
|
|
@@ -6630,12 +6622,12 @@ const Vi = no(function({
|
|
|
6630
6622
|
if (t || o) return;
|
|
6631
6623
|
const { left: b, width: I } = w.target.getBoundingClientRect(), T = (w.clientX - b) / I;
|
|
6632
6624
|
let H = L - 1 + Math.ceil(T / r) * r;
|
|
6633
|
-
H = Math.min(i, Math.max(r, Math.round(H / r) * r)),
|
|
6634
|
-
}, C = () =>
|
|
6625
|
+
H = Math.min(i, Math.max(r, Math.round(H / r) * r)), x(H);
|
|
6626
|
+
}, C = () => x(null), M = [];
|
|
6635
6627
|
for (let w = 1; w <= i; w++) {
|
|
6636
|
-
let L = (
|
|
6628
|
+
let L = (g !== null ? g : e) >= w, b = !L && (g !== null ? g : e) > w - 1, I = L ? s || Ce.cloneElement(hn, { className: `fill-color-yellow-500 ${Xe[l]}` }) : c || Ce.cloneElement(bn, { className: `stroke-color-gray-300 ${Xe[l]}` });
|
|
6637
6629
|
if (b) {
|
|
6638
|
-
const T = ((
|
|
6630
|
+
const T = ((g !== null ? g : e) - (w - 1)) * 100;
|
|
6639
6631
|
I = /* @__PURE__ */ a.jsxs("span", { className: "relative block", children: [
|
|
6640
6632
|
/* @__PURE__ */ a.jsx(
|
|
6641
6633
|
"span",
|
|
@@ -6652,12 +6644,12 @@ const Vi = no(function({
|
|
|
6652
6644
|
})
|
|
6653
6645
|
] });
|
|
6654
6646
|
}
|
|
6655
|
-
|
|
6647
|
+
M.push(
|
|
6656
6648
|
/* @__PURE__ */ a.jsx(
|
|
6657
6649
|
"span",
|
|
6658
6650
|
{
|
|
6659
6651
|
className: `inline-block ${o ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}`,
|
|
6660
|
-
onClick: (T) =>
|
|
6652
|
+
onClick: (T) => f(T, w),
|
|
6661
6653
|
onMouseMove: (T) => h(T, w),
|
|
6662
6654
|
onMouseLeave: C,
|
|
6663
6655
|
tabIndex: t || o ? -1 : 0,
|
|
@@ -6671,8 +6663,8 @@ const Vi = no(function({
|
|
|
6671
6663
|
);
|
|
6672
6664
|
}
|
|
6673
6665
|
return /* @__PURE__ */ a.jsxs("div", { className: `flex items-center gap-1 ${p}`, role: "radiogroup", "aria-disabled": o, children: [
|
|
6674
|
-
|
|
6675
|
-
u &&
|
|
6666
|
+
M,
|
|
6667
|
+
u && g !== null ? /* @__PURE__ */ a.jsx("span", { className: "ml-2 text-xs text-gray-500", children: d[g] || g }) : v ? /* @__PURE__ */ a.jsx("span", { className: "ml-2 text-xs text-gray-500", children: d[e] || e }) : null
|
|
6676
6668
|
] });
|
|
6677
6669
|
}, Gi = ({
|
|
6678
6670
|
children: e,
|
|
@@ -6686,14 +6678,14 @@ const Vi = no(function({
|
|
|
6686
6678
|
perview: c = 1,
|
|
6687
6679
|
gap: p = 0,
|
|
6688
6680
|
onClickItem: u,
|
|
6689
|
-
showThumbs:
|
|
6690
|
-
pauseOnHover:
|
|
6691
|
-
swipeable:
|
|
6692
|
-
thumbWidth:
|
|
6693
|
-
orientation:
|
|
6681
|
+
showThumbs: v = !1,
|
|
6682
|
+
pauseOnHover: d = !1,
|
|
6683
|
+
swipeable: g = !0,
|
|
6684
|
+
thumbWidth: x = 60,
|
|
6685
|
+
orientation: f = "horizontal",
|
|
6694
6686
|
nextIcon: h,
|
|
6695
6687
|
prevIcon: C,
|
|
6696
|
-
className:
|
|
6688
|
+
className: M
|
|
6697
6689
|
}) => {
|
|
6698
6690
|
const w = e.length, L = Math.min(Math.max(c, 0.1), w), [b, I] = W(0), [T, H] = W(!1), [N, ee] = W(!1), [ie, ce] = W(0), U = le(null), O = le(0), Y = le(0), D = L >= w ? 0 : Math.max(0, w - L), Q = (R) => Math.max(0, Math.min(R, D)), pe = (R) => I(
|
|
6699
6691
|
s && D > 0 ? (R % (D + 1) + (D + 1)) % (D + 1) : Q(R)
|
|
@@ -6703,7 +6695,7 @@ const Vi = no(function({
|
|
|
6703
6695
|
s && D > 0 ? I(b >= D ? 0 : b + 1) : pe(b + 1);
|
|
6704
6696
|
};
|
|
6705
6697
|
se(() => {
|
|
6706
|
-
if (!i ||
|
|
6698
|
+
if (!i || d && T || N || D === 0)
|
|
6707
6699
|
return;
|
|
6708
6700
|
const R = setInterval(() => {
|
|
6709
6701
|
I(($) => {
|
|
@@ -6716,23 +6708,23 @@ const Vi = no(function({
|
|
|
6716
6708
|
i,
|
|
6717
6709
|
l,
|
|
6718
6710
|
T,
|
|
6719
|
-
|
|
6711
|
+
d,
|
|
6720
6712
|
N,
|
|
6721
6713
|
D,
|
|
6722
6714
|
s
|
|
6723
6715
|
]);
|
|
6724
6716
|
const y = (R, $) => {
|
|
6725
|
-
!
|
|
6726
|
-
},
|
|
6727
|
-
N && (Y.current =
|
|
6717
|
+
!g || D === 0 || (ee(!0), O.current = f === "horizontal" ? R : $, Y.current = O.current);
|
|
6718
|
+
}, E = (R, $) => {
|
|
6719
|
+
N && (Y.current = f === "horizontal" ? R : $, ce(Y.current - O.current));
|
|
6728
6720
|
}, _ = () => {
|
|
6729
6721
|
if (!N) return;
|
|
6730
6722
|
Math.abs(Y.current - O.current) > 50 && (Y.current < O.current ? m() : K()), ee(!1), ce(0);
|
|
6731
6723
|
}, F = () => {
|
|
6732
|
-
const R =
|
|
6724
|
+
const R = f === "horizontal" ? "X" : "Y";
|
|
6733
6725
|
let $ = 0;
|
|
6734
6726
|
if (N && U.current && D > 0) {
|
|
6735
|
-
const X =
|
|
6727
|
+
const X = f === "horizontal" ? U.current.offsetWidth : U.current.offsetHeight;
|
|
6736
6728
|
$ = ie / X * 100 * (L / w);
|
|
6737
6729
|
}
|
|
6738
6730
|
const q = Math.min(b, D) * (100 / w) - $, j = b >= D, k = b <= 0 ? 0 : j ? p / (c / 2) : p / c;
|
|
@@ -6741,36 +6733,36 @@ const Vi = no(function({
|
|
|
6741
6733
|
return /* @__PURE__ */ a.jsxs(
|
|
6742
6734
|
"div",
|
|
6743
6735
|
{
|
|
6744
|
-
className: `relative flex flex-col items-center select-none ${
|
|
6736
|
+
className: `relative flex flex-col items-center select-none ${M}`,
|
|
6745
6737
|
style: { width: n, height: t },
|
|
6746
|
-
onMouseEnter: () =>
|
|
6747
|
-
onMouseLeave: () =>
|
|
6738
|
+
onMouseEnter: () => d && H(!0),
|
|
6739
|
+
onMouseLeave: () => d && H(!1),
|
|
6748
6740
|
children: [
|
|
6749
6741
|
/* @__PURE__ */ a.jsxs(
|
|
6750
6742
|
"div",
|
|
6751
6743
|
{
|
|
6752
6744
|
ref: U,
|
|
6753
|
-
className: `w-full overflow-hidden relative ${
|
|
6745
|
+
className: `w-full overflow-hidden relative ${g && D > 0 ? N ? "cursor-grabbing" : "cursor-grab" : "cursor-default"}`,
|
|
6754
6746
|
style: {
|
|
6755
|
-
height:
|
|
6747
|
+
height: v ? `calc(${t} - ${x + 20}px)` : t
|
|
6756
6748
|
},
|
|
6757
6749
|
onMouseDown: (R) => {
|
|
6758
6750
|
R.preventDefault(), y(R.clientX, R.clientY);
|
|
6759
6751
|
},
|
|
6760
|
-
onMouseMove: (R) =>
|
|
6752
|
+
onMouseMove: (R) => E(R.clientX, R.clientY),
|
|
6761
6753
|
onMouseUp: _,
|
|
6762
6754
|
onMouseLeave: _,
|
|
6763
6755
|
onTouchStart: (R) => y(R.touches[0].clientX, R.touches[0].clientY),
|
|
6764
|
-
onTouchMove: (R) =>
|
|
6756
|
+
onTouchMove: (R) => E(R.touches[0].clientX, R.touches[0].clientY),
|
|
6765
6757
|
onTouchEnd: _,
|
|
6766
6758
|
children: [
|
|
6767
6759
|
/* @__PURE__ */ a.jsx(
|
|
6768
6760
|
"div",
|
|
6769
6761
|
{
|
|
6770
|
-
className: `flex ${
|
|
6762
|
+
className: `flex ${f === "horizontal" ? "flex-row" : "flex-col"} transition-transform duration-300 ease-in-out`,
|
|
6771
6763
|
style: {
|
|
6772
|
-
width:
|
|
6773
|
-
height:
|
|
6764
|
+
width: f === "horizontal" ? `${w * 100 / L}%` : "100%",
|
|
6765
|
+
height: f === "vertical" ? `${w * 100 / L}%` : "100%",
|
|
6774
6766
|
transform: F(),
|
|
6775
6767
|
gap: `${p}px`,
|
|
6776
6768
|
transitionProperty: N ? "none" : "transform"
|
|
@@ -6780,8 +6772,8 @@ const Vi = no(function({
|
|
|
6780
6772
|
{
|
|
6781
6773
|
className: "shrink-0 flex items-center justify-center",
|
|
6782
6774
|
style: {
|
|
6783
|
-
width:
|
|
6784
|
-
height:
|
|
6775
|
+
width: f === "horizontal" ? `calc(${100 / w}% - ${p / c}px)` : "100%",
|
|
6776
|
+
height: f === "vertical" ? `calc(${100 / w}% - ${p * (w - 1) / w}px)` : "100%"
|
|
6785
6777
|
},
|
|
6786
6778
|
onClick: () => !N && (u == null ? void 0 : u($)),
|
|
6787
6779
|
children: R
|
|
@@ -6797,8 +6789,8 @@ const Vi = no(function({
|
|
|
6797
6789
|
"aria-label": "prev",
|
|
6798
6790
|
onClick: K,
|
|
6799
6791
|
className: `absolute z-20 bg-color-white/80 border border-color-gray-300 rounded-full w-10 h-10 flex items-center justify-center text-lg font-bold text-color-gray-800 hover:bg-color-white transition-color cursor-pointer
|
|
6800
|
-
${
|
|
6801
|
-
children: C || (
|
|
6792
|
+
${f === "horizontal" ? "left-2 top-1/2 -translate-y-1/2" : "left-1/2 top-2 -translate-x-1/2"}`,
|
|
6793
|
+
children: C || (f === "horizontal" ? "‹" : "↑")
|
|
6802
6794
|
}
|
|
6803
6795
|
),
|
|
6804
6796
|
/* @__PURE__ */ a.jsx(
|
|
@@ -6807,15 +6799,15 @@ const Vi = no(function({
|
|
|
6807
6799
|
"aria-label": "next",
|
|
6808
6800
|
onClick: m,
|
|
6809
6801
|
className: `absolute z-20 bg-color-white/80 border border-color-gray-300 rounded-full w-10 h-10 flex items-center justify-center text-lg font-bold text-color-gray-800 hover:bg-color-white transition-colo cursor-pointer
|
|
6810
|
-
${
|
|
6811
|
-
children: h || (
|
|
6802
|
+
${f === "horizontal" ? "right-2 top-1/2 -translate-y-1/2" : "left-1/2 bottom-2 -translate-x-1/2"}`,
|
|
6803
|
+
children: h || (f === "horizontal" ? "›" : "↓")
|
|
6812
6804
|
}
|
|
6813
6805
|
)
|
|
6814
6806
|
] }),
|
|
6815
6807
|
o && z() > 1 && /* @__PURE__ */ a.jsx(
|
|
6816
6808
|
"div",
|
|
6817
6809
|
{
|
|
6818
|
-
className: `flex gap-1 mt-3 justify-center absolute bg-color-white/90 py-1 px-[5px] rounded-full ${
|
|
6810
|
+
className: `flex gap-1 mt-3 justify-center absolute bg-color-white/90 py-1 px-[5px] rounded-full ${f === "horizontal" ? "bottom-3 left-1/2 -translate-x-1/2" : "top-1/2 right-3 -translate-y-1/2 rotate-90"} z-10`,
|
|
6819
6811
|
children: Array.from({ length: z() }).map(
|
|
6820
6812
|
(R, $) => /* @__PURE__ */ a.jsx(
|
|
6821
6813
|
"button",
|
|
@@ -6835,7 +6827,7 @@ const Vi = no(function({
|
|
|
6835
6827
|
]
|
|
6836
6828
|
}
|
|
6837
6829
|
),
|
|
6838
|
-
|
|
6830
|
+
v && /* @__PURE__ */ a.jsx("div", { className: "flex gap-2 mt-3 justify-center flex-wrap", children: e.map((R, $) => {
|
|
6839
6831
|
const V = $ === Math.round(b);
|
|
6840
6832
|
return /* @__PURE__ */ a.jsx(
|
|
6841
6833
|
"div",
|
|
@@ -6852,8 +6844,8 @@ const Vi = no(function({
|
|
|
6852
6844
|
},
|
|
6853
6845
|
className: `overflow-hidden rounded-md cursor-pointer transition-all hover:opacity-100 ${V ? "border-2 border-color-gray-800 opacity-100 scale-105" : "border-2 border-color-gray-300 opacity-70"}`,
|
|
6854
6846
|
style: {
|
|
6855
|
-
width:
|
|
6856
|
-
height:
|
|
6847
|
+
width: x,
|
|
6848
|
+
height: x
|
|
6857
6849
|
},
|
|
6858
6850
|
children: R
|
|
6859
6851
|
},
|
|
@@ -6905,15 +6897,15 @@ const Vi = no(function({
|
|
|
6905
6897
|
variant: i = "ios"
|
|
6906
6898
|
// <-- default to ios
|
|
6907
6899
|
}) => {
|
|
6908
|
-
var
|
|
6900
|
+
var v, d, g;
|
|
6909
6901
|
const [l, s] = W(e), [c, p] = W(!1), u = async () => {
|
|
6910
6902
|
if (!(t || c))
|
|
6911
6903
|
if (n) {
|
|
6912
6904
|
p(!0);
|
|
6913
6905
|
try {
|
|
6914
6906
|
await n(!l), s(!l);
|
|
6915
|
-
} catch (
|
|
6916
|
-
console.error("Toggle failed",
|
|
6907
|
+
} catch (x) {
|
|
6908
|
+
console.error("Toggle failed", x);
|
|
6917
6909
|
} finally {
|
|
6918
6910
|
p(!1);
|
|
6919
6911
|
}
|
|
@@ -6929,11 +6921,11 @@ const Vi = no(function({
|
|
|
6929
6921
|
className: `relative w-10 h-3 flex items-center transition-color duration-300
|
|
6930
6922
|
} ${t ? "bg-color-gray-200 opacity-50 cursor-not-allowed" : "cursor-pointer"}`,
|
|
6931
6923
|
children: [
|
|
6932
|
-
/* @__PURE__ */ a.jsx("span", { className: `absolute rounded-full inset-0 opacity-50 ${l ? `${(
|
|
6924
|
+
/* @__PURE__ */ a.jsx("span", { className: `absolute rounded-full inset-0 opacity-50 ${l ? `${(v = me[r]) == null ? void 0 : v.filled}` : "bg-color-gray-400"}` }),
|
|
6933
6925
|
/* @__PURE__ */ a.jsx(
|
|
6934
6926
|
"div",
|
|
6935
6927
|
{
|
|
6936
|
-
className: `flex justify-center items-center absolute shadow-md top-0.5 left-0.5 size-5 rounded-full shadow transition-all duration-300 ${l ? `translate-x-5 ${(
|
|
6928
|
+
className: `flex justify-center items-center absolute shadow-md top-0.5 left-0.5 size-5 rounded-full shadow transition-all duration-300 ${l ? `translate-x-5 ${(d = me[r]) == null ? void 0 : d.filled}` : "translate-x-0 bg-color-white"}`,
|
|
6937
6929
|
children: c ? /* @__PURE__ */ a.jsx("svg", { className: "animate-spin text-color-gray-500 size-3", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M11.9995 2C12.5518 2 12.9995 2.44772 12.9995 3V6C12.9995 6.55228 12.5518 7 11.9995 7C11.4472 7 10.9995 6.55228 10.9995 6V3C10.9995 2.44772 11.4472 2 11.9995 2ZM11.9995 17C12.5518 17 12.9995 17.4477 12.9995 18V21C12.9995 21.5523 12.5518 22 11.9995 22C11.4472 22 10.9995 21.5523 10.9995 21V18C10.9995 17.4477 11.4472 17 11.9995 17ZM20.6597 7C20.9359 7.47829 20.772 8.08988 20.2937 8.36602L17.6956 9.86602C17.2173 10.1422 16.6057 9.97829 16.3296 9.5C16.0535 9.02171 16.2173 8.41012 16.6956 8.13398L19.2937 6.63397C19.772 6.35783 20.3836 6.52171 20.6597 7ZM7.66935 14.5C7.94549 14.9783 7.78161 15.5899 7.30332 15.866L4.70525 17.366C4.22695 17.6422 3.61536 17.4783 3.33922 17C3.06308 16.5217 3.22695 15.9101 3.70525 15.634L6.30332 14.134C6.78161 13.8578 7.3932 14.0217 7.66935 14.5ZM20.6597 17C20.3836 17.4783 19.772 17.6422 19.2937 17.366L16.6956 15.866C16.2173 15.5899 16.0535 14.9783 16.3296 14.5C16.6057 14.0217 17.2173 13.8578 17.6956 14.134L20.2937 15.634C20.772 15.9101 20.9359 16.5217 20.6597 17ZM7.66935 9.5C7.3932 9.97829 6.78161 10.1422 6.30332 9.86602L3.70525 8.36602C3.22695 8.08988 3.06308 7.47829 3.33922 7C3.61536 6.52171 4.22695 6.35783 4.70525 6.63397L7.30332 8.13398C7.78161 8.41012 7.94549 9.02171 7.66935 9.5Z" }) }) : null
|
|
6938
6930
|
}
|
|
6939
6931
|
)
|
|
@@ -6945,7 +6937,7 @@ const Vi = no(function({
|
|
|
6945
6937
|
onClick: u,
|
|
6946
6938
|
type: o,
|
|
6947
6939
|
disabled: t,
|
|
6948
|
-
className: `relative w-11 h-6 flex items-center rounded-full transition-color duration-300 ${l ? (
|
|
6940
|
+
className: `relative w-11 h-6 flex items-center rounded-full transition-color duration-300 ${l ? (g = me[r]) == null ? void 0 : g.filled : "bg-color-gray-300"} ${t ? "bg-color-gray-300 opacity-50 cursor-not-allowed" : "cursor-pointer"}`,
|
|
6949
6941
|
children: /* @__PURE__ */ a.jsx(
|
|
6950
6942
|
"div",
|
|
6951
6943
|
{
|
|
@@ -6971,13 +6963,13 @@ const Vi = no(function({
|
|
|
6971
6963
|
buttonClass: c = "",
|
|
6972
6964
|
disabled: p = !1
|
|
6973
6965
|
}) => {
|
|
6974
|
-
const u = (
|
|
6966
|
+
const u = (d) => Array.isArray(e) ? e.includes(d) : e === d, v = (d) => {
|
|
6975
6967
|
if (!p)
|
|
6976
6968
|
if (o) {
|
|
6977
6969
|
if (!Array.isArray(e)) return;
|
|
6978
|
-
e.includes(
|
|
6970
|
+
e.includes(d) ? n(e.filter((g) => g !== d)) : n([...e, d]);
|
|
6979
6971
|
} else
|
|
6980
|
-
n(
|
|
6972
|
+
n(d);
|
|
6981
6973
|
};
|
|
6982
6974
|
return /* @__PURE__ */ a.jsx(
|
|
6983
6975
|
"div",
|
|
@@ -6985,28 +6977,28 @@ const Vi = no(function({
|
|
|
6985
6977
|
className: `inline-flex ${l === "vertical" ? "flex-col" : "flex-row"} rounded-md overflow-hidden border border-color-gray-200 bg-color-white ${s}`,
|
|
6986
6978
|
role: "group",
|
|
6987
6979
|
"aria-disabled": p,
|
|
6988
|
-
children: t.map((
|
|
6989
|
-
var
|
|
6980
|
+
children: t.map((d, g) => {
|
|
6981
|
+
var x;
|
|
6990
6982
|
return /* @__PURE__ */ a.jsxs(
|
|
6991
6983
|
"button",
|
|
6992
6984
|
{
|
|
6993
6985
|
type: "button",
|
|
6994
|
-
disabled: p ||
|
|
6986
|
+
disabled: p || d.disabled,
|
|
6995
6987
|
className: `
|
|
6996
6988
|
flex items-center justify-center gap-2 border-0 ${l === "vertical" ? "not-last:border-b-1" : "not-last:border-r-1"} border-color-gray-200
|
|
6997
6989
|
${fi[r]}
|
|
6998
|
-
${u(
|
|
6999
|
-
${p ||
|
|
6990
|
+
${u(d.value) ? ((x = me[i]) == null ? void 0 : x.filled) || i : "bg-color-transparent text-color-gray-700"}
|
|
6991
|
+
${p || d.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
|
|
7000
6992
|
${c}
|
|
7001
6993
|
`,
|
|
7002
|
-
"aria-pressed": u(
|
|
7003
|
-
onClick: () => !(p ||
|
|
6994
|
+
"aria-pressed": u(d.value),
|
|
6995
|
+
onClick: () => !(p || d.disabled) && v(d.value),
|
|
7004
6996
|
children: [
|
|
7005
|
-
|
|
7006
|
-
|
|
6997
|
+
d.icon,
|
|
6998
|
+
d.label
|
|
7007
6999
|
]
|
|
7008
7000
|
},
|
|
7009
|
-
|
|
7001
|
+
d.value
|
|
7010
7002
|
);
|
|
7011
7003
|
})
|
|
7012
7004
|
}
|
|
@@ -7037,11 +7029,11 @@ const Vi = no(function({
|
|
|
7037
7029
|
children: c,
|
|
7038
7030
|
className: p = "",
|
|
7039
7031
|
hoverable: u = !1,
|
|
7040
|
-
bordered:
|
|
7041
|
-
onClick:
|
|
7042
|
-
loaderJsx:
|
|
7032
|
+
bordered: v = !1,
|
|
7033
|
+
onClick: d,
|
|
7034
|
+
loaderJsx: g = !1
|
|
7043
7035
|
}) => {
|
|
7044
|
-
const
|
|
7036
|
+
const x = [
|
|
7045
7037
|
"relative",
|
|
7046
7038
|
"bg-white",
|
|
7047
7039
|
"overflow-hidden",
|
|
@@ -7050,10 +7042,10 @@ const Vi = no(function({
|
|
|
7050
7042
|
yn[o] || yn.small,
|
|
7051
7043
|
Cn[r] || Cn.medium,
|
|
7052
7044
|
u ? "hover:shadow-xl transition-shadow duration-300 cursor-pointer" : "",
|
|
7053
|
-
|
|
7045
|
+
v ? "border border-color-gray-200" : "",
|
|
7054
7046
|
p
|
|
7055
7047
|
].join(" ").trim();
|
|
7056
|
-
return /* @__PURE__ */ a.jsxs("div", { className:
|
|
7048
|
+
return /* @__PURE__ */ a.jsxs("div", { className: x, onClick: d, children: [
|
|
7057
7049
|
i && /* @__PURE__ */ a.jsx("img", { src: i, alt: "Card", className: "w-full h-auto mb-4 rounded" }),
|
|
7058
7050
|
(e || n) && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
7059
7051
|
/* @__PURE__ */ a.jsxs("div", { className: "flex justify-between items-start mb-2", children: [
|
|
@@ -7066,7 +7058,7 @@ const Vi = no(function({
|
|
|
7066
7058
|
s && /* @__PURE__ */ a.jsx("hr", { className: "h-px my-5 bg-color-gray-200 border-0" })
|
|
7067
7059
|
] }),
|
|
7068
7060
|
/* @__PURE__ */ a.jsx("div", { children: c }),
|
|
7069
|
-
|
|
7061
|
+
g && /* @__PURE__ */ a.jsx("div", { className: "absolute w-full h-full top-0 left-0 flex items-center justify-center bg-color-white bg-opacity-50", children: /* @__PURE__ */ a.jsx(ui, { animation: "wave", className: "!w-full !h-full" }) })
|
|
7070
7062
|
] });
|
|
7071
7063
|
}, Ui = ({
|
|
7072
7064
|
orientation: e = "horizontal",
|
|
@@ -7115,13 +7107,13 @@ const Vi = no(function({
|
|
|
7115
7107
|
color: l = "blue",
|
|
7116
7108
|
className: s = "",
|
|
7117
7109
|
radioClass: c
|
|
7118
|
-
}) => /* @__PURE__ */ a.jsx("div", { className: `flex ${r === "row" ? "flex-row gap-6" : "flex-col gap-3"} ${s}`, children: n.map(({ label: p, value: u, disabled:
|
|
7119
|
-
var
|
|
7120
|
-
const
|
|
7110
|
+
}) => /* @__PURE__ */ a.jsx("div", { className: `flex ${r === "row" ? "flex-row gap-6" : "flex-col gap-3"} ${s}`, children: n.map(({ label: p, value: u, disabled: v }) => {
|
|
7111
|
+
var g, x;
|
|
7112
|
+
const d = i || v;
|
|
7121
7113
|
return /* @__PURE__ */ a.jsxs(
|
|
7122
7114
|
"label",
|
|
7123
7115
|
{
|
|
7124
|
-
className: `relative flex items-center cursor-pointer select-none transition ${
|
|
7116
|
+
className: `relative flex items-center cursor-pointer select-none transition ${d ? "opacity-50 cursor-not-allowed" : "hover:opacity-90"}`,
|
|
7125
7117
|
children: [
|
|
7126
7118
|
/* @__PURE__ */ a.jsx(
|
|
7127
7119
|
"input",
|
|
@@ -7129,19 +7121,19 @@ const Vi = no(function({
|
|
|
7129
7121
|
type: "radio",
|
|
7130
7122
|
name: e,
|
|
7131
7123
|
value: u,
|
|
7132
|
-
disabled:
|
|
7124
|
+
disabled: d,
|
|
7133
7125
|
checked: t === u,
|
|
7134
|
-
onChange: () => !
|
|
7126
|
+
onChange: () => !d && (o == null ? void 0 : o(u)),
|
|
7135
7127
|
className: "sr-only peer"
|
|
7136
7128
|
}
|
|
7137
7129
|
),
|
|
7138
7130
|
/* @__PURE__ */ a.jsx(
|
|
7139
7131
|
"div",
|
|
7140
7132
|
{
|
|
7141
|
-
className: `w-5 h-5 rounded-full border-2 border-color-gray-400 peer-checked:border-[7px] transition-all duration-150 ${(
|
|
7133
|
+
className: `w-5 h-5 rounded-full border-2 border-color-gray-400 peer-checked:border-[7px] transition-all duration-150 ${(g = me[l]) == null ? void 0 : g.peer} ${c}`
|
|
7142
7134
|
}
|
|
7143
7135
|
),
|
|
7144
|
-
/* @__PURE__ */ a.jsx("span", { className: `ml-2 text-sm text-color-gray-800 ${(
|
|
7136
|
+
/* @__PURE__ */ a.jsx("span", { className: `ml-2 text-sm text-color-gray-800 ${(x = me[l]) == null ? void 0 : x.peer}`, children: p })
|
|
7145
7137
|
]
|
|
7146
7138
|
},
|
|
7147
7139
|
u
|
|
@@ -7159,15 +7151,15 @@ const Vi = no(function({
|
|
|
7159
7151
|
rounded: p = "medium",
|
|
7160
7152
|
shadow: u = !1
|
|
7161
7153
|
}) => {
|
|
7162
|
-
const
|
|
7154
|
+
const v = {
|
|
7163
7155
|
small: "p-2",
|
|
7164
7156
|
medium: "p-3",
|
|
7165
7157
|
large: "p-4"
|
|
7166
|
-
},
|
|
7158
|
+
}, d = {
|
|
7167
7159
|
small: "rounded-md",
|
|
7168
7160
|
medium: "rounded-lg",
|
|
7169
7161
|
full: "rounded-full"
|
|
7170
|
-
},
|
|
7162
|
+
}, g = {
|
|
7171
7163
|
filled: "bg-color-gray-100 border-color-gray-200",
|
|
7172
7164
|
outlined: "border-color-gray-300 bg-color-transparent"
|
|
7173
7165
|
};
|
|
@@ -7179,9 +7171,9 @@ const Vi = no(function({
|
|
|
7179
7171
|
{
|
|
7180
7172
|
disabled: l,
|
|
7181
7173
|
value: n,
|
|
7182
|
-
onChange: (
|
|
7183
|
-
className: `appearance-none focus:ring-1 text-color-gray-800 w-full border outline-none transition-all ${
|
|
7184
|
-
children: o.map((
|
|
7174
|
+
onChange: (x) => t(x.target.value),
|
|
7175
|
+
className: `appearance-none focus:ring-1 text-color-gray-800 w-full border outline-none transition-all ${d[p]} ${v[s]} ${g[c]} ${l ? "!bg-color-gray-50 opacity-60 cursor-not-allowed" : ""} ${u ? "shadow-md shadow-color-zinc-100" : ""}`,
|
|
7176
|
+
children: o.map((x) => /* @__PURE__ */ a.jsx("option", { value: x.value, className: "text-color-gray-900", children: x.label }, x.value))
|
|
7185
7177
|
}
|
|
7186
7178
|
),
|
|
7187
7179
|
/* @__PURE__ */ a.jsx("span", { className: `absolute right-3 text-sm top-1/2 -translate-y-1/2 ${l ? "opacity-60" : ""}`, children: /* @__PURE__ */ a.jsx("svg", { className: "size-4", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z" }) }) })
|
|
@@ -7196,22 +7188,22 @@ const Vi = no(function({
|
|
|
7196
7188
|
return se(() => {
|
|
7197
7189
|
if (o && s.current && c.current) {
|
|
7198
7190
|
const p = s.current.getBoundingClientRect(), u = c.current.getBoundingClientRect();
|
|
7199
|
-
let
|
|
7191
|
+
let v = 0, d = 0;
|
|
7200
7192
|
switch (t) {
|
|
7201
7193
|
case "top":
|
|
7202
|
-
|
|
7194
|
+
v = p.top - u.height - 8, d = p.left + p.width / 2 - u.width / 2;
|
|
7203
7195
|
break;
|
|
7204
7196
|
case "bottom":
|
|
7205
|
-
|
|
7197
|
+
v = p.bottom + 8, d = p.left + p.width / 2 - u.width / 2;
|
|
7206
7198
|
break;
|
|
7207
7199
|
case "left":
|
|
7208
|
-
|
|
7200
|
+
v = p.top + p.height / 2 - u.height / 2, d = p.left - u.width - 8;
|
|
7209
7201
|
break;
|
|
7210
7202
|
case "right":
|
|
7211
|
-
|
|
7203
|
+
v = p.top + p.height / 2 - u.height / 2, d = p.right + 8;
|
|
7212
7204
|
break;
|
|
7213
7205
|
}
|
|
7214
|
-
l({ top:
|
|
7206
|
+
l({ top: v, left: d });
|
|
7215
7207
|
}
|
|
7216
7208
|
}, [o, t]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
7217
7209
|
/* @__PURE__ */ a.jsx(
|
|
@@ -7262,35 +7254,35 @@ const vi = {
|
|
|
7262
7254
|
fullWidth: c = !1,
|
|
7263
7255
|
maxWidth: p
|
|
7264
7256
|
}, u) => {
|
|
7265
|
-
const [
|
|
7257
|
+
const [v, d] = W(e || !1), [g, x] = W(!1), [f, h] = W(!1);
|
|
7266
7258
|
se(() => {
|
|
7267
|
-
e !== void 0 &&
|
|
7259
|
+
e !== void 0 && d(e);
|
|
7268
7260
|
}, [e]), Sn(u, () => ({
|
|
7269
|
-
open: () =>
|
|
7261
|
+
open: () => d(!0),
|
|
7270
7262
|
close: () => {
|
|
7271
|
-
h(!1), setTimeout(() =>
|
|
7263
|
+
h(!1), setTimeout(() => d(!1), 300);
|
|
7272
7264
|
}
|
|
7273
7265
|
})), se(() => {
|
|
7274
|
-
let
|
|
7275
|
-
return
|
|
7276
|
-
}, [
|
|
7266
|
+
let M;
|
|
7267
|
+
return v ? (x(!0), M = setTimeout(() => h(!0), 10)) : h(!1), () => clearTimeout(M);
|
|
7268
|
+
}, [v]);
|
|
7277
7269
|
const C = () => {
|
|
7278
|
-
|
|
7270
|
+
v || x(!1);
|
|
7279
7271
|
};
|
|
7280
7272
|
return se(() => {
|
|
7281
|
-
const
|
|
7273
|
+
const M = (w) => {
|
|
7282
7274
|
w.key === "Escape" && (n == null || n());
|
|
7283
7275
|
};
|
|
7284
|
-
return
|
|
7285
|
-
}, [
|
|
7276
|
+
return v && document.addEventListener("keydown", M), () => document.removeEventListener("keydown", M);
|
|
7277
|
+
}, [v, n]), se(() => (v ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
7286
7278
|
document.body.style.overflow = "";
|
|
7287
|
-
}), [
|
|
7279
|
+
}), [v]), g ? Oe(
|
|
7288
7280
|
/* @__PURE__ */ a.jsxs(
|
|
7289
7281
|
"div",
|
|
7290
7282
|
{
|
|
7291
7283
|
className: xi(
|
|
7292
7284
|
"fixed inset-0 z-50 flex items-center justify-center transition-opacity duration-300",
|
|
7293
|
-
|
|
7285
|
+
f ? "opacity-100" : "opacity-0 pointer-events-none"
|
|
7294
7286
|
),
|
|
7295
7287
|
children: [
|
|
7296
7288
|
/* @__PURE__ */ a.jsx(
|
|
@@ -7298,14 +7290,14 @@ const vi = {
|
|
|
7298
7290
|
{
|
|
7299
7291
|
className: "fixed inset-0 bg-color-black/50",
|
|
7300
7292
|
onClick: () => {
|
|
7301
|
-
n == null || n(),
|
|
7293
|
+
n == null || n(), d(!1);
|
|
7302
7294
|
}
|
|
7303
7295
|
}
|
|
7304
7296
|
),
|
|
7305
7297
|
/* @__PURE__ */ a.jsxs(
|
|
7306
7298
|
"div",
|
|
7307
7299
|
{
|
|
7308
|
-
className: `relative flex flex-col z-50 bg-color-white rounded-xl shadow-lg transition-all duration-300 transform p-6 ${
|
|
7300
|
+
className: `relative flex flex-col z-50 bg-color-white rounded-xl shadow-lg transition-all duration-300 transform p-6 ${f ? "opacity-100 scale-100" : "opacity-0 scale-95"} ${s ? "w-full h-[calc(100%_-_40px)] m-5" : `${c ? "w-full" : "w-auto"} ${p ? vi[p] : ""} mx-5`} ${t}`,
|
|
7309
7301
|
onTransitionEnd: C,
|
|
7310
7302
|
children: [
|
|
7311
7303
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-between mb-4", children: [
|
|
@@ -7318,7 +7310,7 @@ const vi = {
|
|
|
7318
7310
|
size: "small",
|
|
7319
7311
|
roundedFull: !0,
|
|
7320
7312
|
onClick: () => {
|
|
7321
|
-
n == null || n(),
|
|
7313
|
+
n == null || n(), d(!1);
|
|
7322
7314
|
},
|
|
7323
7315
|
variant: "transparent"
|
|
7324
7316
|
}
|
|
@@ -7337,56 +7329,56 @@ const vi = {
|
|
|
7337
7329
|
}
|
|
7338
7330
|
);
|
|
7339
7331
|
function Qi({ items: e, trigger: n, className: t, dropdownItemClass: o }) {
|
|
7340
|
-
const [r, i] = W(!1), [l, s] = W({ top: 0, left: 0 }), [c, p] = W(!1), u = le(null),
|
|
7341
|
-
|
|
7332
|
+
const [r, i] = W(!1), [l, s] = W({ top: 0, left: 0 }), [c, p] = W(!1), u = le(null), v = le(null), d = (x) => {
|
|
7333
|
+
x.stopPropagation(), i((f) => !f), p(!1);
|
|
7342
7334
|
};
|
|
7343
7335
|
oo(() => {
|
|
7344
|
-
if (r && u.current &&
|
|
7345
|
-
const
|
|
7346
|
-
let
|
|
7347
|
-
|
|
7336
|
+
if (r && u.current && v.current) {
|
|
7337
|
+
const x = u.current.getBoundingClientRect(), f = v.current.getBoundingClientRect(), h = window.innerWidth, C = window.innerHeight;
|
|
7338
|
+
let M = x.left + window.scrollX, w = x.bottom + window.scrollY;
|
|
7339
|
+
x.right + f.width > h && (M = x.right + window.scrollX - f.width), M + f.width > h && (M = h - f.width - 12), w + f.height > C && (w = x.top + window.scrollY - f.height), s({ top: w, left: M }), setTimeout(() => {
|
|
7348
7340
|
p(!0);
|
|
7349
7341
|
}, 150);
|
|
7350
7342
|
}
|
|
7351
7343
|
}, [r]), se(() => {
|
|
7352
|
-
const
|
|
7344
|
+
const x = (f) => {
|
|
7353
7345
|
var h;
|
|
7354
|
-
|
|
7346
|
+
v.current && !v.current.contains(f.target) && !((h = u.current) != null && h.contains(f.target)) && i(!1);
|
|
7355
7347
|
};
|
|
7356
|
-
return r && document.addEventListener("mousedown",
|
|
7357
|
-
document.removeEventListener("mousedown",
|
|
7348
|
+
return r && document.addEventListener("mousedown", x), () => {
|
|
7349
|
+
document.removeEventListener("mousedown", x);
|
|
7358
7350
|
};
|
|
7359
7351
|
}, [r]);
|
|
7360
|
-
const
|
|
7352
|
+
const g = /* @__PURE__ */ a.jsx(
|
|
7361
7353
|
"div",
|
|
7362
7354
|
{
|
|
7363
|
-
ref:
|
|
7355
|
+
ref: v,
|
|
7364
7356
|
className: `absolute mt-2 z-50 rounded-xl bg-color-white shadow-xl p-2 min-w-[160px] transition-all duration-200 transform ${c ? "opacity-100 scale-100" : "opacity-0 scale-95"} ${t}`,
|
|
7365
7357
|
style: {
|
|
7366
7358
|
top: l.top,
|
|
7367
7359
|
left: l.left
|
|
7368
7360
|
},
|
|
7369
|
-
children: e.map((
|
|
7361
|
+
children: e.map((x, f) => /* @__PURE__ */ a.jsxs(
|
|
7370
7362
|
"button",
|
|
7371
7363
|
{
|
|
7372
|
-
disabled:
|
|
7364
|
+
disabled: x.disabled,
|
|
7373
7365
|
onClick: () => {
|
|
7374
7366
|
var h;
|
|
7375
|
-
(h =
|
|
7367
|
+
(h = x.onClick) == null || h.call(x), i(!1);
|
|
7376
7368
|
},
|
|
7377
|
-
className: `flex items-center gap-3 w-full text-left px-3 py-2 bg-color-transparent hover:bg-color-gray-100 transition-all cursor-pointer rounded-md text-md text-color-gray-700 ${
|
|
7369
|
+
className: `flex items-center gap-3 w-full text-left px-3 py-2 bg-color-transparent hover:bg-color-gray-100 transition-all cursor-pointer rounded-md text-md text-color-gray-700 ${x.disabled ? "opacity-50 hover:bg-color-transparent !cursor-not-allowed" : ""} ${o} ${x.itemClass}`,
|
|
7378
7370
|
children: [
|
|
7379
|
-
|
|
7380
|
-
/* @__PURE__ */ a.jsx("span", { children:
|
|
7371
|
+
x.icon && /* @__PURE__ */ a.jsx("span", { children: x.icon }),
|
|
7372
|
+
/* @__PURE__ */ a.jsx("span", { children: x.label })
|
|
7381
7373
|
]
|
|
7382
7374
|
},
|
|
7383
|
-
|
|
7375
|
+
f
|
|
7384
7376
|
))
|
|
7385
7377
|
}
|
|
7386
7378
|
);
|
|
7387
7379
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
7388
|
-
/* @__PURE__ */ a.jsx("div", { ref: u, onClick:
|
|
7389
|
-
r && Oe(
|
|
7380
|
+
/* @__PURE__ */ a.jsx("div", { ref: u, onClick: d, className: "cursor-pointer", children: n }),
|
|
7381
|
+
r && Oe(g, document.body)
|
|
7390
7382
|
] });
|
|
7391
7383
|
}
|
|
7392
7384
|
function bi(...e) {
|
|
@@ -7403,14 +7395,14 @@ const wi = ({
|
|
|
7403
7395
|
showCloseIcon: s = !0,
|
|
7404
7396
|
anchor: c = "left"
|
|
7405
7397
|
}) => {
|
|
7406
|
-
const [p, u] = W(!1), [
|
|
7398
|
+
const [p, u] = W(!1), [v, d] = W(!1);
|
|
7407
7399
|
se(() => {
|
|
7408
7400
|
let h;
|
|
7409
7401
|
return e ? (u(!0), h = setTimeout(() => {
|
|
7410
|
-
|
|
7411
|
-
}, 10)) :
|
|
7402
|
+
d(!0);
|
|
7403
|
+
}, 10)) : d(!1), () => clearTimeout(h);
|
|
7412
7404
|
}, [e]);
|
|
7413
|
-
const
|
|
7405
|
+
const g = () => {
|
|
7414
7406
|
e || u(!1);
|
|
7415
7407
|
};
|
|
7416
7408
|
if (se(() => {
|
|
@@ -7421,16 +7413,16 @@ const wi = ({
|
|
|
7421
7413
|
}, [e, n]), se(() => (e ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
7422
7414
|
document.body.style.overflow = "";
|
|
7423
7415
|
}), [e]), !p) return null;
|
|
7424
|
-
const
|
|
7416
|
+
const x = {
|
|
7425
7417
|
left: "left-0 top-0 h-full min-w-96 transition-all duration-300",
|
|
7426
7418
|
right: "right-0 top-0 h-full min-w-96 transition-all duration-300",
|
|
7427
7419
|
top: "top-0 left-0 w-full min-h-40 transition-all duration-300",
|
|
7428
7420
|
bottom: "bottom-0 left-0 w-full min-h-40 transition-all duration-300"
|
|
7429
|
-
},
|
|
7430
|
-
left:
|
|
7431
|
-
right:
|
|
7432
|
-
top:
|
|
7433
|
-
bottom:
|
|
7421
|
+
}, f = {
|
|
7422
|
+
left: v ? "translate-x-0" : "-translate-x-full",
|
|
7423
|
+
right: v ? "translate-x-0" : "translate-x-full",
|
|
7424
|
+
top: v ? "translate-y-0" : "-translate-y-full",
|
|
7425
|
+
bottom: v ? "translate-y-0" : "translate-y-full"
|
|
7434
7426
|
};
|
|
7435
7427
|
return Oe(
|
|
7436
7428
|
/* @__PURE__ */ a.jsxs(
|
|
@@ -7438,7 +7430,7 @@ const wi = ({
|
|
|
7438
7430
|
{
|
|
7439
7431
|
className: bi(
|
|
7440
7432
|
"fixed inset-0 z-50 transition-opacity duration-300",
|
|
7441
|
-
|
|
7433
|
+
v ? "opacity-100" : "opacity-0 pointer-events-none"
|
|
7442
7434
|
),
|
|
7443
7435
|
children: [
|
|
7444
7436
|
/* @__PURE__ */ a.jsx("div", { className: "fixed inset-0 bg-color-black/50", onClick: n }),
|
|
@@ -7447,11 +7439,11 @@ const wi = ({
|
|
|
7447
7439
|
{
|
|
7448
7440
|
className: `
|
|
7449
7441
|
fixed bg-color-white shadow-lg z-50 p-6 flex flex-col
|
|
7450
|
-
${
|
|
7451
|
-
${
|
|
7442
|
+
${x[c]}
|
|
7443
|
+
${f[c]}
|
|
7452
7444
|
${t}
|
|
7453
7445
|
`,
|
|
7454
|
-
onTransitionEnd:
|
|
7446
|
+
onTransitionEnd: g,
|
|
7455
7447
|
children: [
|
|
7456
7448
|
s && /* @__PURE__ */ a.jsx(
|
|
7457
7449
|
je,
|
|
@@ -7488,17 +7480,17 @@ const wi = ({
|
|
|
7488
7480
|
titleClass: c = "",
|
|
7489
7481
|
contentClass: p = ""
|
|
7490
7482
|
}) => {
|
|
7491
|
-
const [u,
|
|
7492
|
-
const
|
|
7493
|
-
|
|
7483
|
+
const [u, v] = W(i), d = r !== void 0, g = d ? r : u, x = () => {
|
|
7484
|
+
const f = !g;
|
|
7485
|
+
d || v(f), l == null || l(f);
|
|
7494
7486
|
};
|
|
7495
7487
|
return se(() => {
|
|
7496
|
-
|
|
7488
|
+
d && v(r);
|
|
7497
7489
|
}, [r]), /* @__PURE__ */ a.jsxs("div", { className: `overflow-hidden w-full border border-color-gray-100 ${s}`, children: [
|
|
7498
7490
|
/* @__PURE__ */ a.jsxs(
|
|
7499
7491
|
"button",
|
|
7500
7492
|
{
|
|
7501
|
-
onClick:
|
|
7493
|
+
onClick: x,
|
|
7502
7494
|
className: `flex justify-between items-center w-full p-4 bg-color-gray-50 hover:bg-color-gray-200 transition ${c}`,
|
|
7503
7495
|
children: [
|
|
7504
7496
|
/* @__PURE__ */ a.jsx("div", { className: "text-left text-sm font-medium", children: e }),
|
|
@@ -7506,13 +7498,13 @@ const wi = ({
|
|
|
7506
7498
|
"div",
|
|
7507
7499
|
{
|
|
7508
7500
|
className: "transition-transform duration-300",
|
|
7509
|
-
children:
|
|
7501
|
+
children: g ? t : o
|
|
7510
7502
|
}
|
|
7511
7503
|
)
|
|
7512
7504
|
]
|
|
7513
7505
|
}
|
|
7514
7506
|
),
|
|
7515
|
-
/* @__PURE__ */ a.jsx("div", { className: `grid overflow-hidden transition-all duration-300 ease-in-out grid-rows-[0fr] ${
|
|
7507
|
+
/* @__PURE__ */ a.jsx("div", { className: `grid overflow-hidden transition-all duration-300 ease-in-out grid-rows-[0fr] ${g ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"}`, children: /* @__PURE__ */ a.jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ a.jsx("div", { className: `p-4 text-sm text-color-gray-700 ${p}`, children: n }) }) })
|
|
7516
7508
|
] });
|
|
7517
7509
|
}, yi = {
|
|
7518
7510
|
info: "bg-color-blue-50 border-color-blue-300 text-color-blue-800",
|
|
@@ -7672,26 +7664,26 @@ const wi = ({
|
|
|
7672
7664
|
disableAfter: p,
|
|
7673
7665
|
selectedDate: u
|
|
7674
7666
|
}) => {
|
|
7675
|
-
const [
|
|
7667
|
+
const [v, d] = W(!1), [g, x] = W(null), [f, h] = W(/* @__PURE__ */ new Date()), [C, M] = W(
|
|
7676
7668
|
u ? new Date(u) : null
|
|
7677
7669
|
), [w, L] = W(null), [b, I] = W(null), [T, H] = W(null), [N, ee] = W({ hour: 12, minute: 0, ampm: "AM" }), ie = le(null), [ce, U] = W(
|
|
7678
7670
|
u ? new Date(u) : null
|
|
7679
7671
|
), [O, Y] = W(null), [D, Q] = W(null);
|
|
7680
7672
|
se(() => {
|
|
7681
|
-
|
|
7673
|
+
M(u ? new Date(u) : null), U(u ? new Date(u) : null);
|
|
7682
7674
|
}, [u]);
|
|
7683
7675
|
const pe = (j) => {
|
|
7684
|
-
j.stopPropagation(),
|
|
7676
|
+
j.stopPropagation(), x(j.currentTarget), d(!0);
|
|
7685
7677
|
}, K = () => {
|
|
7686
|
-
|
|
7678
|
+
d(!1);
|
|
7687
7679
|
}, m = (j) => !!(c && j.getTime() < c || p && j.getTime() > p), y = (j) => {
|
|
7688
|
-
n === "inline" && ie.current && !ie.current.contains(j.target) && (e === "single" ? C ||
|
|
7680
|
+
n === "inline" && ie.current && !ie.current.contains(j.target) && (e === "single" ? C || M(null) : e === "range" && (!w || !b) && (L(null), I(null)), d(!1));
|
|
7689
7681
|
};
|
|
7690
|
-
se(() => (
|
|
7682
|
+
se(() => (v ? document.addEventListener("mousedown", y) : document.removeEventListener("mousedown", y), () => {
|
|
7691
7683
|
document.removeEventListener("mousedown", y);
|
|
7692
|
-
}), [
|
|
7693
|
-
const
|
|
7694
|
-
!j || m(j) || (e === "single" ?
|
|
7684
|
+
}), [v]);
|
|
7685
|
+
const E = (j) => {
|
|
7686
|
+
!j || m(j) || (e === "single" ? M(j) : e === "range" && (!w || w && b ? (L(j), I(null)) : j >= w ? I(j) : L(j)));
|
|
7695
7687
|
}, _ = (j) => {
|
|
7696
7688
|
if (!j || m(j)) {
|
|
7697
7689
|
H(null);
|
|
@@ -7701,7 +7693,7 @@ const wi = ({
|
|
|
7701
7693
|
}, F = () => {
|
|
7702
7694
|
H(null);
|
|
7703
7695
|
}, z = () => {
|
|
7704
|
-
if (
|
|
7696
|
+
if (d(!1), e === "single") {
|
|
7705
7697
|
const j = o ? /* @__PURE__ */ new Date() : C, S = j ? new Date(
|
|
7706
7698
|
j.getFullYear(),
|
|
7707
7699
|
j.getMonth(),
|
|
@@ -7715,11 +7707,11 @@ const wi = ({
|
|
|
7715
7707
|
endDate: b ? b.getTime() : null
|
|
7716
7708
|
}));
|
|
7717
7709
|
}, A = () => {
|
|
7718
|
-
const j = new Date(
|
|
7710
|
+
const j = new Date(f.getFullYear(), f.getMonth(), 1), S = new Date(f.getFullYear(), f.getMonth() + 1, 0), k = [], X = j.getDay();
|
|
7719
7711
|
for (let J = 0; J < X; J++)
|
|
7720
7712
|
k.push(null);
|
|
7721
7713
|
for (let J = 1; J <= S.getDate(); J++)
|
|
7722
|
-
k.push(new Date(
|
|
7714
|
+
k.push(new Date(f.getFullYear(), f.getMonth(), J));
|
|
7723
7715
|
return k;
|
|
7724
7716
|
}, R = (j) => {
|
|
7725
7717
|
if (!j) return !1;
|
|
@@ -7778,8 +7770,8 @@ const wi = ({
|
|
|
7778
7770
|
className: `${n === "dialog" ? "relative w-full" : "absolute z-50 mt-2 w-72 rounded-lg border border-color-gray-200 bg-color-white shadow-xl p-4"}`,
|
|
7779
7771
|
style: n === "dialog" ? void 0 : {
|
|
7780
7772
|
position: "absolute",
|
|
7781
|
-
left:
|
|
7782
|
-
top:
|
|
7773
|
+
left: g == null ? void 0 : g.getBoundingClientRect().left,
|
|
7774
|
+
top: g ? g.getBoundingClientRect().bottom + window.scrollY : 0
|
|
7783
7775
|
},
|
|
7784
7776
|
children: [
|
|
7785
7777
|
!o && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
@@ -7791,7 +7783,7 @@ const wi = ({
|
|
|
7791
7783
|
size: "small",
|
|
7792
7784
|
color: "gray",
|
|
7793
7785
|
roundedFull: !0,
|
|
7794
|
-
onClick: () => h(new Date(
|
|
7786
|
+
onClick: () => h(new Date(f.getFullYear(), f.getMonth() - 1, 1)),
|
|
7795
7787
|
icon: /* @__PURE__ */ a.jsx("svg", { className: "size-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M10.8284 12.0007L15.7782 16.9504L14.364 18.3646L8 12.0007L14.364 5.63672L15.7782 7.05093L10.8284 12.0007Z" }) })
|
|
7796
7788
|
}
|
|
7797
7789
|
),
|
|
@@ -7800,8 +7792,8 @@ const wi = ({
|
|
|
7800
7792
|
"select",
|
|
7801
7793
|
{
|
|
7802
7794
|
className: "text-sm outline-none",
|
|
7803
|
-
value:
|
|
7804
|
-
onChange: (j) => h(new Date(
|
|
7795
|
+
value: f.getMonth(),
|
|
7796
|
+
onChange: (j) => h(new Date(f.getFullYear(), parseInt(j.target.value), 1)),
|
|
7805
7797
|
children: jn.map((j, S) => /* @__PURE__ */ a.jsx("option", { value: S, children: j }, j))
|
|
7806
7798
|
}
|
|
7807
7799
|
),
|
|
@@ -7809,8 +7801,8 @@ const wi = ({
|
|
|
7809
7801
|
"select",
|
|
7810
7802
|
{
|
|
7811
7803
|
className: "text-sm outline-none",
|
|
7812
|
-
value:
|
|
7813
|
-
onChange: (j) => h(new Date(parseInt(j.target.value),
|
|
7804
|
+
value: f.getFullYear(),
|
|
7805
|
+
onChange: (j) => h(new Date(parseInt(j.target.value), f.getMonth(), 1)),
|
|
7814
7806
|
children: Array.from({ length: 150 }, (j, S) => (/* @__PURE__ */ new Date()).getFullYear() - 100 + S).map((j) => /* @__PURE__ */ a.jsx("option", { value: j, children: j }, j))
|
|
7815
7807
|
}
|
|
7816
7808
|
)
|
|
@@ -7822,7 +7814,7 @@ const wi = ({
|
|
|
7822
7814
|
size: "small",
|
|
7823
7815
|
color: "gray",
|
|
7824
7816
|
roundedFull: !0,
|
|
7825
|
-
onClick: () => h(new Date(
|
|
7817
|
+
onClick: () => h(new Date(f.getFullYear(), f.getMonth() + 1, 1)),
|
|
7826
7818
|
icon: /* @__PURE__ */ a.jsx("svg", { className: "size-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z" }) })
|
|
7827
7819
|
}
|
|
7828
7820
|
)
|
|
@@ -7836,7 +7828,7 @@ const wi = ({
|
|
|
7836
7828
|
${j ? "hover:bg-color-blue-100 cursor-pointer" : ""}
|
|
7837
7829
|
${j && R(j) ? "bg-color-blue-500 hover:bg-color-blue-500 text-color-white" : ""}
|
|
7838
7830
|
${j && m(j) ? "bg-color-gray-100 text-color-gray-400 !cursor-not-allowed hover:bg-color-gray-100" : ""}`,
|
|
7839
|
-
onClick: () => j &&
|
|
7831
|
+
onClick: () => j && E(j),
|
|
7840
7832
|
onMouseEnter: () => j && _(j),
|
|
7841
7833
|
onMouseLeave: F,
|
|
7842
7834
|
children: j ? j.getDate() : ""
|
|
@@ -7882,7 +7874,7 @@ const wi = ({
|
|
|
7882
7874
|
]
|
|
7883
7875
|
}
|
|
7884
7876
|
),
|
|
7885
|
-
n === "inline" ? /* @__PURE__ */ a.jsx(a.Fragment, { children:
|
|
7877
|
+
n === "inline" ? /* @__PURE__ */ a.jsx(a.Fragment, { children: v && Oe(q, document.body) }) : /* @__PURE__ */ a.jsx(hi, { open: v, title: o ? "Select Time" : l, onClose: K, children: /* @__PURE__ */ a.jsx("div", { className: "w-72", children: q }) })
|
|
7886
7878
|
] });
|
|
7887
7879
|
}, aa = ({
|
|
7888
7880
|
tabs: e,
|
|
@@ -7905,21 +7897,21 @@ const wi = ({
|
|
|
7905
7897
|
{
|
|
7906
7898
|
className: `${p ? "flex flex-col min-w-[160px] border-r border-color-gray-200" : "flex space-x-6 border-b border-color-gray-200"} ${r}`,
|
|
7907
7899
|
children: e.map((u) => {
|
|
7908
|
-
const
|
|
7900
|
+
const v = n === u.key;
|
|
7909
7901
|
return /* @__PURE__ */ a.jsxs(
|
|
7910
7902
|
"button",
|
|
7911
7903
|
{
|
|
7912
7904
|
onClick: () => t(u.key),
|
|
7913
7905
|
className: `relative flex ${p ? "flex-row items-center px-4 py-3" : "flex-col items-center py-4"}
|
|
7914
7906
|
text-sm font-medium transition-color duration-200 bg-color-transparent
|
|
7915
|
-
${
|
|
7907
|
+
${v ? "text-color-blue-500" : "text-color-gray-600 hover:text-color-blue-500 cursor-pointer"}
|
|
7916
7908
|
${i}`,
|
|
7917
7909
|
children: [
|
|
7918
7910
|
/* @__PURE__ */ a.jsxs("div", { className: `flex items-center ${p ? "space-x-3" : "space-x-2"}`, children: [
|
|
7919
7911
|
u.icon && /* @__PURE__ */ a.jsx("span", { children: u.icon }),
|
|
7920
7912
|
/* @__PURE__ */ a.jsx("span", { children: u.label })
|
|
7921
7913
|
] }),
|
|
7922
|
-
|
|
7914
|
+
v && (p ? /* @__PURE__ */ a.jsx("div", { className: "absolute right-0 top-3 bottom-3 w-1 bg-color-blue-500 rounded-full" }) : /* @__PURE__ */ a.jsx("div", { className: "absolute bottom-0 left-0 right-0 h-1 bg-color-blue-500 rounded-full" }))
|
|
7923
7915
|
]
|
|
7924
7916
|
},
|
|
7925
7917
|
u.key
|