@kaushalparajuli/react-crud-ui 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +10 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +365 -365
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as d, jsxs as M, Fragment as Te } from "react/jsx-runtime";
|
|
2
2
|
import * as l from "react";
|
|
3
3
|
import ve, { forwardRef as Ri, createElement as eo, useLayoutEffect as Wd, useState as Bd } from "react";
|
|
4
|
-
import * as
|
|
4
|
+
import * as mr from "react-dom";
|
|
5
5
|
import Hd from "react-dom";
|
|
6
6
|
import { useNavigate as Ud } from "react-router-dom";
|
|
7
7
|
function As(e, t) {
|
|
@@ -344,7 +344,7 @@ function df(e, ...t) {
|
|
|
344
344
|
const me = (e) => {
|
|
345
345
|
const t = (r) => r[e] || [];
|
|
346
346
|
return t.isThemeGetter = !0, t;
|
|
347
|
-
}, Di = /^\[(?:([a-z-]+):)?(.+)\]$/i, ff = /^\d+\/\d+$/, pf = /* @__PURE__ */ new Set(["px", "full", "screen"]), mf = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, hf = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, gf = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, vf = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, yf = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, ut = (e) =>
|
|
347
|
+
}, Di = /^\[(?:([a-z-]+):)?(.+)\]$/i, ff = /^\d+\/\d+$/, pf = /* @__PURE__ */ new Set(["px", "full", "screen"]), mf = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, hf = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, gf = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, vf = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, yf = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, ut = (e) => Bt(e) || pf.has(e) || ff.test(e), mt = (e) => Yt(e, "length", Rf), Bt = (e) => !!e && !Number.isNaN(Number(e)), Vn = (e) => Yt(e, "number", Bt), er = (e) => !!e && Number.isInteger(Number(e)), bf = (e) => e.endsWith("%") && Bt(e.slice(0, -1)), oe = (e) => Di.test(e), ht = (e) => mf.test(e), wf = /* @__PURE__ */ new Set(["length", "size", "percentage"]), xf = (e) => Yt(e, wf, Oi), Sf = (e) => Yt(e, "position", Oi), Cf = /* @__PURE__ */ new Set(["image", "url"]), Ef = (e) => Yt(e, Cf, Pf), Nf = (e) => Yt(e, "", _f), tr = () => !0, Yt = (e, t, r) => {
|
|
348
348
|
const n = Di.exec(e);
|
|
349
349
|
return n ? n[1] ? typeof t == "string" ? n[1] === t : t.has(n[1]) : r(n[2]) : !1;
|
|
350
350
|
}, Rf = (e) => (
|
|
@@ -353,12 +353,12 @@ const me = (e) => {
|
|
|
353
353
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
354
354
|
hf.test(e) && !gf.test(e)
|
|
355
355
|
), Oi = () => !1, _f = (e) => vf.test(e), Pf = (e) => yf.test(e), Af = () => {
|
|
356
|
-
const e = me("colors"), t = me("spacing"), r = me("blur"), n = me("brightness"), o = me("borderColor"), s = me("borderRadius"), i = me("borderSpacing"), a = me("borderWidth"), c = me("contrast"), u = me("grayscale"), p = me("hueRotate"), f = me("invert"), m = me("gap"), g = me("gradientColorStops"), v = me("gradientColorStopPositions"), h = me("inset"), y = me("margin"), b = me("opacity"), w = me("padding"), x = me("saturate"), S = me("scale"), E = me("sepia"), A = me("skew"), _ = me("space"), O = me("translate"), D = () => ["auto", "contain", "none"], L = () => ["auto", "hidden", "clip", "visible", "scroll"], T = () => ["auto", oe, t], R = () => [oe, t], H = () => ["", ut, mt], U = () => ["auto",
|
|
356
|
+
const e = me("colors"), t = me("spacing"), r = me("blur"), n = me("brightness"), o = me("borderColor"), s = me("borderRadius"), i = me("borderSpacing"), a = me("borderWidth"), c = me("contrast"), u = me("grayscale"), p = me("hueRotate"), f = me("invert"), m = me("gap"), g = me("gradientColorStops"), v = me("gradientColorStopPositions"), h = me("inset"), y = me("margin"), b = me("opacity"), w = me("padding"), x = me("saturate"), S = me("scale"), E = me("sepia"), A = me("skew"), _ = me("space"), O = me("translate"), D = () => ["auto", "contain", "none"], L = () => ["auto", "hidden", "clip", "visible", "scroll"], T = () => ["auto", oe, t], R = () => [oe, t], H = () => ["", ut, mt], U = () => ["auto", Bt, oe], X = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], j = () => ["solid", "dashed", "dotted", "double", "none"], z = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], F = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], $ = () => ["", "0", oe], te = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], W = () => [Bt, oe];
|
|
357
357
|
return {
|
|
358
358
|
cacheSize: 500,
|
|
359
359
|
separator: ":",
|
|
360
360
|
theme: {
|
|
361
|
-
colors: [
|
|
361
|
+
colors: [tr],
|
|
362
362
|
spacing: [ut, mt],
|
|
363
363
|
blur: ["none", "", ht, oe],
|
|
364
364
|
brightness: W(),
|
|
@@ -598,7 +598,7 @@ const me = (e) => {
|
|
|
598
598
|
* @see https://tailwindcss.com/docs/z-index
|
|
599
599
|
*/
|
|
600
600
|
z: [{
|
|
601
|
-
z: ["auto",
|
|
601
|
+
z: ["auto", er, oe]
|
|
602
602
|
}],
|
|
603
603
|
// Flexbox and Grid
|
|
604
604
|
/**
|
|
@@ -648,14 +648,14 @@ const me = (e) => {
|
|
|
648
648
|
* @see https://tailwindcss.com/docs/order
|
|
649
649
|
*/
|
|
650
650
|
order: [{
|
|
651
|
-
order: ["first", "last", "none",
|
|
651
|
+
order: ["first", "last", "none", er, oe]
|
|
652
652
|
}],
|
|
653
653
|
/**
|
|
654
654
|
* Grid Template Columns
|
|
655
655
|
* @see https://tailwindcss.com/docs/grid-template-columns
|
|
656
656
|
*/
|
|
657
657
|
"grid-cols": [{
|
|
658
|
-
"grid-cols": [
|
|
658
|
+
"grid-cols": [tr]
|
|
659
659
|
}],
|
|
660
660
|
/**
|
|
661
661
|
* Grid Column Start / End
|
|
@@ -663,7 +663,7 @@ const me = (e) => {
|
|
|
663
663
|
*/
|
|
664
664
|
"col-start-end": [{
|
|
665
665
|
col: ["auto", {
|
|
666
|
-
span: ["full",
|
|
666
|
+
span: ["full", er, oe]
|
|
667
667
|
}, oe]
|
|
668
668
|
}],
|
|
669
669
|
/**
|
|
@@ -685,7 +685,7 @@ const me = (e) => {
|
|
|
685
685
|
* @see https://tailwindcss.com/docs/grid-template-rows
|
|
686
686
|
*/
|
|
687
687
|
"grid-rows": [{
|
|
688
|
-
"grid-rows": [
|
|
688
|
+
"grid-rows": [tr]
|
|
689
689
|
}],
|
|
690
690
|
/**
|
|
691
691
|
* Grid Row Start / End
|
|
@@ -693,7 +693,7 @@ const me = (e) => {
|
|
|
693
693
|
*/
|
|
694
694
|
"row-start-end": [{
|
|
695
695
|
row: ["auto", {
|
|
696
|
-
span: [
|
|
696
|
+
span: [er, oe]
|
|
697
697
|
}, oe]
|
|
698
698
|
}],
|
|
699
699
|
/**
|
|
@@ -1048,7 +1048,7 @@ const me = (e) => {
|
|
|
1048
1048
|
* @see https://tailwindcss.com/docs/font-family
|
|
1049
1049
|
*/
|
|
1050
1050
|
"font-family": [{
|
|
1051
|
-
font: [
|
|
1051
|
+
font: [tr]
|
|
1052
1052
|
}],
|
|
1053
1053
|
/**
|
|
1054
1054
|
* Font Variant Numeric
|
|
@@ -1092,7 +1092,7 @@ const me = (e) => {
|
|
|
1092
1092
|
* @see https://tailwindcss.com/docs/line-clamp
|
|
1093
1093
|
*/
|
|
1094
1094
|
"line-clamp": [{
|
|
1095
|
-
"line-clamp": ["none",
|
|
1095
|
+
"line-clamp": ["none", Bt, Vn]
|
|
1096
1096
|
}],
|
|
1097
1097
|
/**
|
|
1098
1098
|
* Line Height
|
|
@@ -1733,7 +1733,7 @@ const me = (e) => {
|
|
|
1733
1733
|
* @see https://tailwindcss.com/docs/box-shadow-color
|
|
1734
1734
|
*/
|
|
1735
1735
|
"shadow-color": [{
|
|
1736
|
-
shadow: [
|
|
1736
|
+
shadow: [tr]
|
|
1737
1737
|
}],
|
|
1738
1738
|
/**
|
|
1739
1739
|
* Opacity
|
|
@@ -2012,7 +2012,7 @@ const me = (e) => {
|
|
|
2012
2012
|
* @see https://tailwindcss.com/docs/rotate
|
|
2013
2013
|
*/
|
|
2014
2014
|
rotate: [{
|
|
2015
|
-
rotate: [
|
|
2015
|
+
rotate: [er, oe]
|
|
2016
2016
|
}],
|
|
2017
2017
|
/**
|
|
2018
2018
|
* Translate X
|
|
@@ -2580,7 +2580,7 @@ const Ds = le("Calendar", [
|
|
|
2580
2580
|
* This source code is licensed under the ISC license.
|
|
2581
2581
|
* See the LICENSE file in the root directory of this source tree.
|
|
2582
2582
|
*/
|
|
2583
|
-
const
|
|
2583
|
+
const lr = le("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]);
|
|
2584
2584
|
/**
|
|
2585
2585
|
* @license lucide-react v0.460.0 - ISC
|
|
2586
2586
|
*
|
|
@@ -2765,7 +2765,7 @@ const $s = le("Info", [
|
|
|
2765
2765
|
* This source code is licensed under the ISC license.
|
|
2766
2766
|
* See the LICENSE file in the root directory of this source tree.
|
|
2767
2767
|
*/
|
|
2768
|
-
const
|
|
2768
|
+
const jt = le("LoaderCircle", [
|
|
2769
2769
|
["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]
|
|
2770
2770
|
]);
|
|
2771
2771
|
/**
|
|
@@ -2888,14 +2888,14 @@ const rn = le("X", [
|
|
|
2888
2888
|
disabled: i || o,
|
|
2889
2889
|
...a,
|
|
2890
2890
|
children: [
|
|
2891
|
-
o && /* @__PURE__ */ d(
|
|
2891
|
+
o && /* @__PURE__ */ d(jt, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
2892
2892
|
s
|
|
2893
2893
|
]
|
|
2894
2894
|
}
|
|
2895
2895
|
)
|
|
2896
2896
|
);
|
|
2897
2897
|
fe.displayName = "Button";
|
|
2898
|
-
const
|
|
2898
|
+
const Nt = l.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d(
|
|
2899
2899
|
"div",
|
|
2900
2900
|
{
|
|
2901
2901
|
ref: r,
|
|
@@ -2906,7 +2906,7 @@ const Et = l.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d(
|
|
|
2906
2906
|
...t
|
|
2907
2907
|
}
|
|
2908
2908
|
));
|
|
2909
|
-
|
|
2909
|
+
Nt.displayName = "Card";
|
|
2910
2910
|
const nn = l.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d(
|
|
2911
2911
|
"div",
|
|
2912
2912
|
{
|
|
@@ -2937,8 +2937,8 @@ const sn = l.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d(
|
|
|
2937
2937
|
}
|
|
2938
2938
|
));
|
|
2939
2939
|
sn.displayName = "CardDescription";
|
|
2940
|
-
const
|
|
2941
|
-
|
|
2940
|
+
const Rt = l.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d("div", { ref: r, className: k("p-6 pt-0", e), ...t }));
|
|
2941
|
+
Rt.displayName = "CardContent";
|
|
2942
2942
|
const Jf = l.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d(
|
|
2943
2943
|
"div",
|
|
2944
2944
|
{
|
|
@@ -3001,14 +3001,14 @@ var tp = [
|
|
|
3001
3001
|
"span",
|
|
3002
3002
|
"svg",
|
|
3003
3003
|
"ul"
|
|
3004
|
-
],
|
|
3004
|
+
], hr = tp.reduce((e, t) => {
|
|
3005
3005
|
const r = /* @__PURE__ */ Pi(`Primitive.${t}`), n = l.forwardRef((o, s) => {
|
|
3006
3006
|
const { asChild: i, ...a } = o, c = i ? r : t;
|
|
3007
3007
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ d(c, { ...a, ref: s });
|
|
3008
3008
|
});
|
|
3009
3009
|
return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
|
|
3010
3010
|
}, {}), rp = "Label", Ui = l.forwardRef((e, t) => /* @__PURE__ */ d(
|
|
3011
|
-
|
|
3011
|
+
hr.label,
|
|
3012
3012
|
{
|
|
3013
3013
|
...e,
|
|
3014
3014
|
ref: t,
|
|
@@ -3099,8 +3099,8 @@ function G(e, t, { checkForDefaultPrevented: r = !0 } = {}) {
|
|
|
3099
3099
|
return t == null ? void 0 : t(o);
|
|
3100
3100
|
};
|
|
3101
3101
|
}
|
|
3102
|
-
var
|
|
3103
|
-
}, ip = l[" useInsertionEffect ".trim().toString()] ||
|
|
3102
|
+
var Se = globalThis != null && globalThis.document ? l.useLayoutEffect : () => {
|
|
3103
|
+
}, ip = l[" useInsertionEffect ".trim().toString()] || Se;
|
|
3104
3104
|
function nt({
|
|
3105
3105
|
prop: e,
|
|
3106
3106
|
defaultProp: t,
|
|
@@ -3155,7 +3155,7 @@ function Ro(e) {
|
|
|
3155
3155
|
}
|
|
3156
3156
|
function _o(e) {
|
|
3157
3157
|
const [t, r] = l.useState(void 0);
|
|
3158
|
-
return
|
|
3158
|
+
return Se(() => {
|
|
3159
3159
|
if (e) {
|
|
3160
3160
|
r({ width: e.offsetWidth, height: e.offsetHeight });
|
|
3161
3161
|
const n = new ResizeObserver((o) => {
|
|
@@ -3200,13 +3200,13 @@ function up(e) {
|
|
|
3200
3200
|
return l.useEffect(() => {
|
|
3201
3201
|
const u = Tr(n.current);
|
|
3202
3202
|
s.current = a === "mounted" ? u : "none";
|
|
3203
|
-
}, [a]),
|
|
3203
|
+
}, [a]), Se(() => {
|
|
3204
3204
|
const u = n.current, p = o.current;
|
|
3205
3205
|
if (p !== e) {
|
|
3206
3206
|
const m = s.current, g = Tr(u);
|
|
3207
3207
|
e ? c("MOUNT") : g === "none" || (u == null ? void 0 : u.display) === "none" ? c("UNMOUNT") : c(p && m !== g ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
|
|
3208
3208
|
}
|
|
3209
|
-
}, [e, c]),
|
|
3209
|
+
}, [e, c]), Se(() => {
|
|
3210
3210
|
if (t) {
|
|
3211
3211
|
let u;
|
|
3212
3212
|
const p = t.ownerDocument.defaultView ?? window, f = (g) => {
|
|
@@ -3550,7 +3550,7 @@ const Hr = l.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d(
|
|
|
3550
3550
|
qi,
|
|
3551
3551
|
{
|
|
3552
3552
|
className: k("flex items-center justify-center text-current"),
|
|
3553
|
-
children: /* @__PURE__ */ d(
|
|
3553
|
+
children: /* @__PURE__ */ d(lr, { className: "h-4 w-4" })
|
|
3554
3554
|
}
|
|
3555
3555
|
)
|
|
3556
3556
|
}
|
|
@@ -3826,7 +3826,7 @@ function GS({
|
|
|
3826
3826
|
var Lp = "Separator", Ls = "horizontal", Fp = ["horizontal", "vertical"], aa = l.forwardRef((e, t) => {
|
|
3827
3827
|
const { decorative: r, orientation: n = Ls, ...o } = e, s = Vp(n) ? n : Ls, a = r ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
|
|
3828
3828
|
return /* @__PURE__ */ d(
|
|
3829
|
-
|
|
3829
|
+
hr.div,
|
|
3830
3830
|
{
|
|
3831
3831
|
"data-orientation": s,
|
|
3832
3832
|
...a,
|
|
@@ -4045,7 +4045,7 @@ function Yp(...e) {
|
|
|
4045
4045
|
return r.scopeName = t.scopeName, r;
|
|
4046
4046
|
}
|
|
4047
4047
|
var qp = l.createContext(void 0);
|
|
4048
|
-
function
|
|
4048
|
+
function gr(e) {
|
|
4049
4049
|
const t = l.useContext(qp);
|
|
4050
4050
|
return e || t || "ltr";
|
|
4051
4051
|
}
|
|
@@ -4119,7 +4119,7 @@ var rm = [
|
|
|
4119
4119
|
return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
|
|
4120
4120
|
}, {});
|
|
4121
4121
|
function nm(e, t) {
|
|
4122
|
-
e &&
|
|
4122
|
+
e && mr.flushSync(() => e.dispatchEvent(t));
|
|
4123
4123
|
}
|
|
4124
4124
|
function Ee(e) {
|
|
4125
4125
|
const t = l.useRef(e);
|
|
@@ -4143,7 +4143,7 @@ var sm = "DismissableLayer", no = "dismissableLayer.update", im = "dismissableLa
|
|
|
4143
4143
|
layers: /* @__PURE__ */ new Set(),
|
|
4144
4144
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
4145
4145
|
branches: /* @__PURE__ */ new Set()
|
|
4146
|
-
}),
|
|
4146
|
+
}), vr = l.forwardRef(
|
|
4147
4147
|
(e, t) => {
|
|
4148
4148
|
const {
|
|
4149
4149
|
disableOutsidePointerEvents: r = !1,
|
|
@@ -4191,7 +4191,7 @@ var sm = "DismissableLayer", no = "dismissableLayer.update", im = "dismissableLa
|
|
|
4191
4191
|
);
|
|
4192
4192
|
}
|
|
4193
4193
|
);
|
|
4194
|
-
|
|
4194
|
+
vr.displayName = sm;
|
|
4195
4195
|
var lm = "DismissableLayerBranch", cm = l.forwardRef((e, t) => {
|
|
4196
4196
|
const r = l.useContext(da), n = l.useRef(null), o = se(t, n);
|
|
4197
4197
|
return l.useEffect(() => {
|
|
@@ -4469,7 +4469,7 @@ var _m = l[" useId ".trim().toString()] || (() => {
|
|
|
4469
4469
|
}), Pm = 0;
|
|
4470
4470
|
function Fe(e) {
|
|
4471
4471
|
const [t, r] = l.useState(_m());
|
|
4472
|
-
return
|
|
4472
|
+
return Se(() => {
|
|
4473
4473
|
r((n) => n ?? String(Pm++));
|
|
4474
4474
|
}, [e]), e || (t ? `radix-${t}` : "");
|
|
4475
4475
|
}
|
|
@@ -4494,7 +4494,7 @@ function ft(e, t) {
|
|
|
4494
4494
|
function pt(e) {
|
|
4495
4495
|
return e.split("-")[0];
|
|
4496
4496
|
}
|
|
4497
|
-
function
|
|
4497
|
+
function qt(e) {
|
|
4498
4498
|
return e.split("-")[1];
|
|
4499
4499
|
}
|
|
4500
4500
|
function ko(e) {
|
|
@@ -4512,7 +4512,7 @@ function Oo(e) {
|
|
|
4512
4512
|
}
|
|
4513
4513
|
function km(e, t, r) {
|
|
4514
4514
|
r === void 0 && (r = !1);
|
|
4515
|
-
const n =
|
|
4515
|
+
const n = qt(e), o = Oo(e), s = Do(o);
|
|
4516
4516
|
let i = o === "x" ? n === (r ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
4517
4517
|
return t.reference[s] > t.floating[s] && (i = jr(i)), [i, jr(i)];
|
|
4518
4518
|
}
|
|
@@ -4537,7 +4537,7 @@ function Lm(e, t, r) {
|
|
|
4537
4537
|
}
|
|
4538
4538
|
}
|
|
4539
4539
|
function Fm(e, t, r, n) {
|
|
4540
|
-
const o =
|
|
4540
|
+
const o = qt(e);
|
|
4541
4541
|
let s = Lm(pt(e), r === "start", n);
|
|
4542
4542
|
return o && (s = s.map((i) => i + "-" + o), t && (s = s.concat(s.map(so)))), s;
|
|
4543
4543
|
}
|
|
@@ -4617,7 +4617,7 @@ function Ys(e, t, r) {
|
|
|
4617
4617
|
y: n.y
|
|
4618
4618
|
};
|
|
4619
4619
|
}
|
|
4620
|
-
switch (
|
|
4620
|
+
switch (qt(t)) {
|
|
4621
4621
|
case "start":
|
|
4622
4622
|
g[i] -= m * (r && u ? -1 : 1);
|
|
4623
4623
|
break;
|
|
@@ -4688,7 +4688,7 @@ const Wm = async (e, t, r) => {
|
|
|
4688
4688
|
middlewareData: g
|
|
4689
4689
|
};
|
|
4690
4690
|
};
|
|
4691
|
-
async function
|
|
4691
|
+
async function cr(e, t) {
|
|
4692
4692
|
var r;
|
|
4693
4693
|
t === void 0 && (t = {});
|
|
4694
4694
|
const {
|
|
@@ -4757,7 +4757,7 @@ const Bm = (e) => ({
|
|
|
4757
4757
|
}, g = Oo(o), v = Do(g), h = await i.getDimensions(u), y = g === "y", b = y ? "top" : "left", w = y ? "bottom" : "right", x = y ? "clientHeight" : "clientWidth", S = s.reference[v] + s.reference[g] - m[g] - s.floating[v], E = m[g] - s.reference[g], A = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u));
|
|
4758
4758
|
let _ = A ? A[x] : 0;
|
|
4759
4759
|
(!_ || !await (i.isElement == null ? void 0 : i.isElement(A))) && (_ = a.floating[x] || s.floating[v]);
|
|
4760
|
-
const O = S / 2 - E / 2, D = _ / 2 - h[v] / 2 - 1, L = bt(f[b], D), T = bt(f[w], D), R = L, H = _ - h[v] - T, U = _ / 2 - h[v] / 2 + O, X = oo(R, U, H), j = !c.arrow &&
|
|
4760
|
+
const O = S / 2 - E / 2, D = _ / 2 - h[v] / 2 - 1, L = bt(f[b], D), T = bt(f[w], D), R = L, H = _ - h[v] - T, U = _ / 2 - h[v] / 2 + O, X = oo(R, U, H), j = !c.arrow && qt(o) != null && U !== X && s.reference[v] / 2 - (U < R ? L : T) - h[v] / 2 < 0, z = j ? U < R ? U - R : U - H : 0;
|
|
4761
4761
|
return {
|
|
4762
4762
|
[g]: m[g] + z,
|
|
4763
4763
|
data: {
|
|
@@ -4796,7 +4796,7 @@ const Bm = (e) => ({
|
|
|
4796
4796
|
return {};
|
|
4797
4797
|
const b = pt(o), w = tt(a), x = pt(a) === a, S = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), E = m || (x || !h ? [jr(a)] : Dm(a)), A = v !== "none";
|
|
4798
4798
|
!m && A && E.push(...Fm(a, h, v, S));
|
|
4799
|
-
const _ = [a, ...E], O = await
|
|
4799
|
+
const _ = [a, ...E], O = await cr(t, y), D = [];
|
|
4800
4800
|
let L = ((n = s.flip) == null ? void 0 : n.overflows) || [];
|
|
4801
4801
|
if (p && D.push(O[b]), f) {
|
|
4802
4802
|
const U = km(o, i, S);
|
|
@@ -4876,7 +4876,7 @@ const Um = function(e) {
|
|
|
4876
4876
|
} = ft(e, t);
|
|
4877
4877
|
switch (n) {
|
|
4878
4878
|
case "referenceHidden": {
|
|
4879
|
-
const s = await
|
|
4879
|
+
const s = await cr(t, {
|
|
4880
4880
|
...o,
|
|
4881
4881
|
elementContext: "reference"
|
|
4882
4882
|
}), i = qs(s, r.reference);
|
|
@@ -4888,7 +4888,7 @@ const Um = function(e) {
|
|
|
4888
4888
|
};
|
|
4889
4889
|
}
|
|
4890
4890
|
case "escaped": {
|
|
4891
|
-
const s = await
|
|
4891
|
+
const s = await cr(t, {
|
|
4892
4892
|
...o,
|
|
4893
4893
|
altBoundary: !0
|
|
4894
4894
|
}), i = qs(s, r.floating);
|
|
@@ -4910,7 +4910,7 @@ async function jm(e, t) {
|
|
|
4910
4910
|
placement: r,
|
|
4911
4911
|
platform: n,
|
|
4912
4912
|
elements: o
|
|
4913
|
-
} = e, s = await (n.isRTL == null ? void 0 : n.isRTL(o.floating)), i = pt(r), a =
|
|
4913
|
+
} = e, s = await (n.isRTL == null ? void 0 : n.isRTL(o.floating)), i = pt(r), a = qt(r), c = tt(r) === "y", u = ha.has(i) ? -1 : 1, p = s && c ? -1 : 1, f = ft(t, e);
|
|
4914
4914
|
let {
|
|
4915
4915
|
mainAxis: m,
|
|
4916
4916
|
crossAxis: g,
|
|
@@ -4982,7 +4982,7 @@ const zm = function(e) {
|
|
|
4982
4982
|
} = ft(e, t), u = {
|
|
4983
4983
|
x: r,
|
|
4984
4984
|
y: n
|
|
4985
|
-
}, p = await
|
|
4985
|
+
}, p = await cr(t, c), f = tt(pt(o)), m = ko(f);
|
|
4986
4986
|
let g = u[m], v = u[f];
|
|
4987
4987
|
if (s) {
|
|
4988
4988
|
const y = m === "y" ? "top" : "left", b = m === "y" ? "bottom" : "right", w = g + p[y], x = g - p[b];
|
|
@@ -5067,7 +5067,7 @@ const zm = function(e) {
|
|
|
5067
5067
|
apply: c = () => {
|
|
5068
5068
|
},
|
|
5069
5069
|
...u
|
|
5070
|
-
} = ft(e, t), p = await
|
|
5070
|
+
} = ft(e, t), p = await cr(t, u), f = pt(o), m = qt(o), g = tt(o) === "y", {
|
|
5071
5071
|
width: v,
|
|
5072
5072
|
height: h
|
|
5073
5073
|
} = s.floating;
|
|
@@ -5096,7 +5096,7 @@ const zm = function(e) {
|
|
|
5096
5096
|
function dn() {
|
|
5097
5097
|
return typeof window < "u";
|
|
5098
5098
|
}
|
|
5099
|
-
function
|
|
5099
|
+
function Xt(e) {
|
|
5100
5100
|
return ga(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
5101
5101
|
}
|
|
5102
5102
|
function Ve(e) {
|
|
@@ -5120,7 +5120,7 @@ function Zs(e) {
|
|
|
5120
5120
|
return !dn() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof Ve(e).ShadowRoot;
|
|
5121
5121
|
}
|
|
5122
5122
|
const qm = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
5123
|
-
function
|
|
5123
|
+
function yr(e) {
|
|
5124
5124
|
const {
|
|
5125
5125
|
overflow: t,
|
|
5126
5126
|
overflowX: r,
|
|
@@ -5131,7 +5131,7 @@ function vr(e) {
|
|
|
5131
5131
|
}
|
|
5132
5132
|
const Xm = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
5133
5133
|
function Zm(e) {
|
|
5134
|
-
return Xm.has(
|
|
5134
|
+
return Xm.has(Xt(e));
|
|
5135
5135
|
}
|
|
5136
5136
|
const Qm = [":popover-open", ":modal"];
|
|
5137
5137
|
function fn(e) {
|
|
@@ -5150,7 +5150,7 @@ function $o(e) {
|
|
|
5150
5150
|
}
|
|
5151
5151
|
function rh(e) {
|
|
5152
5152
|
let t = wt(e);
|
|
5153
|
-
for (; ot(t) && !
|
|
5153
|
+
for (; ot(t) && !zt(t); ) {
|
|
5154
5154
|
if ($o(t))
|
|
5155
5155
|
return t;
|
|
5156
5156
|
if (fn(t))
|
|
@@ -5163,8 +5163,8 @@ function Lo() {
|
|
|
5163
5163
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
5164
5164
|
}
|
|
5165
5165
|
const nh = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
5166
|
-
function
|
|
5167
|
-
return nh.has(
|
|
5166
|
+
function zt(e) {
|
|
5167
|
+
return nh.has(Xt(e));
|
|
5168
5168
|
}
|
|
5169
5169
|
function qe(e) {
|
|
5170
5170
|
return Ve(e).getComputedStyle(e);
|
|
@@ -5179,7 +5179,7 @@ function pn(e) {
|
|
|
5179
5179
|
};
|
|
5180
5180
|
}
|
|
5181
5181
|
function wt(e) {
|
|
5182
|
-
if (
|
|
5182
|
+
if (Xt(e) === "html")
|
|
5183
5183
|
return e;
|
|
5184
5184
|
const t = (
|
|
5185
5185
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
@@ -5192,17 +5192,17 @@ function wt(e) {
|
|
|
5192
5192
|
}
|
|
5193
5193
|
function va(e) {
|
|
5194
5194
|
const t = wt(e);
|
|
5195
|
-
return
|
|
5195
|
+
return zt(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : ot(t) && yr(t) ? t : va(t);
|
|
5196
5196
|
}
|
|
5197
|
-
function
|
|
5197
|
+
function ur(e, t, r) {
|
|
5198
5198
|
var n;
|
|
5199
5199
|
t === void 0 && (t = []), r === void 0 && (r = !0);
|
|
5200
5200
|
const o = va(e), s = o === ((n = e.ownerDocument) == null ? void 0 : n.body), i = Ve(o);
|
|
5201
5201
|
if (s) {
|
|
5202
5202
|
const a = io(i);
|
|
5203
|
-
return t.concat(i, i.visualViewport || [],
|
|
5203
|
+
return t.concat(i, i.visualViewport || [], yr(o) ? o : [], a && r ? ur(a) : []);
|
|
5204
5204
|
}
|
|
5205
|
-
return t.concat(o,
|
|
5205
|
+
return t.concat(o, ur(o, [], r));
|
|
5206
5206
|
}
|
|
5207
5207
|
function io(e) {
|
|
5208
5208
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
@@ -5220,7 +5220,7 @@ function ya(e) {
|
|
|
5220
5220
|
function Fo(e) {
|
|
5221
5221
|
return Ye(e) ? e : e.contextElement;
|
|
5222
5222
|
}
|
|
5223
|
-
function
|
|
5223
|
+
function Ht(e) {
|
|
5224
5224
|
const t = Fo(e);
|
|
5225
5225
|
if (!ot(t))
|
|
5226
5226
|
return rt(1);
|
|
@@ -5246,18 +5246,18 @@ function ba(e) {
|
|
|
5246
5246
|
function sh(e, t, r) {
|
|
5247
5247
|
return t === void 0 && (t = !1), !r || t && r !== Ve(e) ? !1 : t;
|
|
5248
5248
|
}
|
|
5249
|
-
function
|
|
5249
|
+
function Pt(e, t, r, n) {
|
|
5250
5250
|
t === void 0 && (t = !1), r === void 0 && (r = !1);
|
|
5251
5251
|
const o = e.getBoundingClientRect(), s = Fo(e);
|
|
5252
5252
|
let i = rt(1);
|
|
5253
|
-
t && (n ? Ye(n) && (i =
|
|
5253
|
+
t && (n ? Ye(n) && (i = Ht(n)) : i = Ht(e));
|
|
5254
5254
|
const a = sh(s, r, n) ? ba(s) : rt(0);
|
|
5255
5255
|
let c = (o.left + a.x) / i.x, u = (o.top + a.y) / i.y, p = o.width / i.x, f = o.height / i.y;
|
|
5256
5256
|
if (s) {
|
|
5257
5257
|
const m = Ve(s), g = n && Ye(n) ? Ve(n) : n;
|
|
5258
5258
|
let v = m, h = io(v);
|
|
5259
5259
|
for (; h && n && g !== v; ) {
|
|
5260
|
-
const y =
|
|
5260
|
+
const y = Ht(h), b = h.getBoundingClientRect(), w = qe(h), x = b.left + (h.clientLeft + parseFloat(w.paddingLeft)) * y.x, S = b.top + (h.clientTop + parseFloat(w.paddingTop)) * y.y;
|
|
5261
5261
|
c *= y.x, u *= y.y, p *= y.x, f *= y.y, c += x, u += S, v = Ve(h), h = io(v);
|
|
5262
5262
|
}
|
|
5263
5263
|
}
|
|
@@ -5270,7 +5270,7 @@ function _t(e, t, r, n) {
|
|
|
5270
5270
|
}
|
|
5271
5271
|
function mn(e, t) {
|
|
5272
5272
|
const r = pn(e).scrollLeft;
|
|
5273
|
-
return t ? t.left + r :
|
|
5273
|
+
return t ? t.left + r : Pt(st(e)).left + r;
|
|
5274
5274
|
}
|
|
5275
5275
|
function wa(e, t) {
|
|
5276
5276
|
const r = e.getBoundingClientRect(), n = r.left + t.scrollLeft - mn(e, r), o = r.top + t.scrollTop;
|
|
@@ -5294,9 +5294,9 @@ function ih(e) {
|
|
|
5294
5294
|
scrollTop: 0
|
|
5295
5295
|
}, u = rt(1);
|
|
5296
5296
|
const p = rt(0), f = ot(n);
|
|
5297
|
-
if ((f || !f && !s) && ((
|
|
5298
|
-
const g =
|
|
5299
|
-
u =
|
|
5297
|
+
if ((f || !f && !s) && ((Xt(n) !== "body" || yr(i)) && (c = pn(n)), ot(n))) {
|
|
5298
|
+
const g = Pt(n);
|
|
5299
|
+
u = Ht(n), p.x = g.x + n.clientLeft, p.y = g.y + n.clientTop;
|
|
5300
5300
|
}
|
|
5301
5301
|
const m = i && !f && !s ? wa(i, c) : rt(0);
|
|
5302
5302
|
return {
|
|
@@ -5343,7 +5343,7 @@ function ch(e, t) {
|
|
|
5343
5343
|
}
|
|
5344
5344
|
const uh = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
5345
5345
|
function dh(e, t) {
|
|
5346
|
-
const r =
|
|
5346
|
+
const r = Pt(e, !0, t === "fixed"), n = r.top + e.clientTop, o = r.left + e.clientLeft, s = ot(e) ? Ht(e) : rt(1), i = e.clientWidth * s.x, a = e.clientHeight * s.y, c = o * s.x, u = n * s.y;
|
|
5347
5347
|
return {
|
|
5348
5348
|
width: i,
|
|
5349
5349
|
height: a,
|
|
@@ -5372,18 +5372,18 @@ function Js(e, t, r) {
|
|
|
5372
5372
|
}
|
|
5373
5373
|
function xa(e, t) {
|
|
5374
5374
|
const r = wt(e);
|
|
5375
|
-
return r === t || !Ye(r) ||
|
|
5375
|
+
return r === t || !Ye(r) || zt(r) ? !1 : qe(r).position === "fixed" || xa(r, t);
|
|
5376
5376
|
}
|
|
5377
5377
|
function fh(e, t) {
|
|
5378
5378
|
const r = t.get(e);
|
|
5379
5379
|
if (r)
|
|
5380
5380
|
return r;
|
|
5381
|
-
let n =
|
|
5381
|
+
let n = ur(e, [], !1).filter((a) => Ye(a) && Xt(a) !== "body"), o = null;
|
|
5382
5382
|
const s = qe(e).position === "fixed";
|
|
5383
5383
|
let i = s ? wt(e) : e;
|
|
5384
|
-
for (; Ye(i) && !
|
|
5384
|
+
for (; Ye(i) && !zt(i); ) {
|
|
5385
5385
|
const a = qe(i), c = $o(i);
|
|
5386
|
-
!c && a.position === "fixed" && (o = null), (s ? !c && !o : !c && a.position === "static" && !!o && uh.has(o.position) ||
|
|
5386
|
+
!c && a.position === "fixed" && (o = null), (s ? !c && !o : !c && a.position === "static" && !!o && uh.has(o.position) || yr(i) && !c && xa(e, i)) ? n = n.filter((p) => p !== i) : o = a, i = wt(i);
|
|
5387
5387
|
}
|
|
5388
5388
|
return t.set(e, n), n;
|
|
5389
5389
|
}
|
|
@@ -5416,7 +5416,7 @@ function mh(e) {
|
|
|
5416
5416
|
};
|
|
5417
5417
|
}
|
|
5418
5418
|
function hh(e, t, r) {
|
|
5419
|
-
const n = ot(t), o = st(t), s = r === "fixed", i =
|
|
5419
|
+
const n = ot(t), o = st(t), s = r === "fixed", i = Pt(e, !0, s, t);
|
|
5420
5420
|
let a = {
|
|
5421
5421
|
scrollLeft: 0,
|
|
5422
5422
|
scrollTop: 0
|
|
@@ -5426,8 +5426,8 @@ function hh(e, t, r) {
|
|
|
5426
5426
|
c.x = mn(o);
|
|
5427
5427
|
}
|
|
5428
5428
|
if (n || !n && !s)
|
|
5429
|
-
if ((
|
|
5430
|
-
const g =
|
|
5429
|
+
if ((Xt(t) !== "body" || yr(o)) && (a = pn(t)), n) {
|
|
5430
|
+
const g = Pt(t, !0, s, t);
|
|
5431
5431
|
c.x = g.x + t.clientLeft, c.y = g.y + t.clientTop;
|
|
5432
5432
|
} else o && u();
|
|
5433
5433
|
s && !n && o && u();
|
|
@@ -5456,7 +5456,7 @@ function Sa(e, t) {
|
|
|
5456
5456
|
return r;
|
|
5457
5457
|
if (!ot(e)) {
|
|
5458
5458
|
let o = wt(e);
|
|
5459
|
-
for (; o && !
|
|
5459
|
+
for (; o && !zt(o); ) {
|
|
5460
5460
|
if (Ye(o) && !jn(o))
|
|
5461
5461
|
return o;
|
|
5462
5462
|
o = wt(o);
|
|
@@ -5466,7 +5466,7 @@ function Sa(e, t) {
|
|
|
5466
5466
|
let n = ei(e, t);
|
|
5467
5467
|
for (; n && Zm(n) && jn(n); )
|
|
5468
5468
|
n = ei(n, t);
|
|
5469
|
-
return n &&
|
|
5469
|
+
return n && zt(n) && jn(n) && !$o(n) ? r : n || rh(e) || r;
|
|
5470
5470
|
}
|
|
5471
5471
|
const gh = async function(e) {
|
|
5472
5472
|
const t = this.getOffsetParent || Sa, r = this.getDimensions, n = await r(e.floating);
|
|
@@ -5491,7 +5491,7 @@ const yh = {
|
|
|
5491
5491
|
getElementRects: gh,
|
|
5492
5492
|
getClientRects: ah,
|
|
5493
5493
|
getDimensions: mh,
|
|
5494
|
-
getScale:
|
|
5494
|
+
getScale: Ht,
|
|
5495
5495
|
isElement: Ye,
|
|
5496
5496
|
isRTL: vh
|
|
5497
5497
|
};
|
|
@@ -5552,7 +5552,7 @@ function wh(e, t, r, n) {
|
|
|
5552
5552
|
elementResize: i = typeof ResizeObserver == "function",
|
|
5553
5553
|
layoutShift: a = typeof IntersectionObserver == "function",
|
|
5554
5554
|
animationFrame: c = !1
|
|
5555
|
-
} = n, u = Fo(e), p = o || s ? [...u ?
|
|
5555
|
+
} = n, u = Fo(e), p = o || s ? [...u ? ur(u) : [], ...ur(t)] : [];
|
|
5556
5556
|
p.forEach((b) => {
|
|
5557
5557
|
o && b.addEventListener("scroll", r, {
|
|
5558
5558
|
passive: !0
|
|
@@ -5567,10 +5567,10 @@ function wh(e, t, r, n) {
|
|
|
5567
5567
|
(x = g) == null || x.observe(t);
|
|
5568
5568
|
})), r();
|
|
5569
5569
|
}), u && !c && g.observe(u), g.observe(t));
|
|
5570
|
-
let v, h = c ?
|
|
5570
|
+
let v, h = c ? Pt(e) : null;
|
|
5571
5571
|
c && y();
|
|
5572
5572
|
function y() {
|
|
5573
|
-
const b =
|
|
5573
|
+
const b = Pt(e);
|
|
5574
5574
|
h && !Ca(h, b) && r(), h = b, v = requestAnimationFrame(y);
|
|
5575
5575
|
}
|
|
5576
5576
|
return r(), () => {
|
|
@@ -5682,7 +5682,7 @@ function Th(e) {
|
|
|
5682
5682
|
// setting it to `true` when `open === false` (must be specified).
|
|
5683
5683
|
isPositioned: R.current !== !1
|
|
5684
5684
|
};
|
|
5685
|
-
U.current && !Gr(O.current, te) && (O.current = te,
|
|
5685
|
+
U.current && !Gr(O.current, te) && (O.current = te, mr.flushSync(() => {
|
|
5686
5686
|
f(te);
|
|
5687
5687
|
}));
|
|
5688
5688
|
});
|
|
@@ -5986,7 +5986,7 @@ var ng = [
|
|
|
5986
5986
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ d(c, { ...a, ref: s });
|
|
5987
5987
|
});
|
|
5988
5988
|
return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
|
|
5989
|
-
}, {}), Vo = "Popper", [_a,
|
|
5989
|
+
}, {}), Vo = "Popper", [_a, Zt] = qh(Vo), [og, Pa] = _a(Vo), Aa = (e) => {
|
|
5990
5990
|
const { __scopePopper: t, children: r } = e, [n, o] = l.useState(null);
|
|
5991
5991
|
return /* @__PURE__ */ d(og, { scope: t, anchor: n, onAnchorChange: o, children: r });
|
|
5992
5992
|
};
|
|
@@ -6055,11 +6055,11 @@ var Wo = "PopperContent", [sg, ig] = _a(Wo), Ia = l.forwardRef(
|
|
|
6055
6055
|
m && Lh({ strategy: "referenceHidden", ...H })
|
|
6056
6056
|
]
|
|
6057
6057
|
}), [$, te] = Oa(j), W = Ee(v);
|
|
6058
|
-
|
|
6058
|
+
Se(() => {
|
|
6059
6059
|
z && (W == null || W());
|
|
6060
6060
|
}, [z, W]);
|
|
6061
6061
|
const ne = (I = F.arrow) == null ? void 0 : I.x, ce = (Q = F.arrow) == null ? void 0 : Q.y, pe = ((Y = F.arrow) == null ? void 0 : Y.centerOffset) !== 0, [he, ge] = l.useState();
|
|
6062
|
-
return
|
|
6062
|
+
return Se(() => {
|
|
6063
6063
|
b && ge(window.getComputedStyle(b).zIndex);
|
|
6064
6064
|
}, [b]), /* @__PURE__ */ d(
|
|
6065
6065
|
"div",
|
|
@@ -6256,7 +6256,7 @@ var gg = [
|
|
|
6256
6256
|
}, {}), yg = "Portal", gn = l.forwardRef((e, t) => {
|
|
6257
6257
|
var a;
|
|
6258
6258
|
const { container: r, ...n } = e, [o, s] = l.useState(!1);
|
|
6259
|
-
|
|
6259
|
+
Se(() => s(!0), []);
|
|
6260
6260
|
const i = r || o && ((a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : a.body);
|
|
6261
6261
|
return i ? Hd.createPortal(/* @__PURE__ */ d(vg.div, { ...n, ref: t }), i) : null;
|
|
6262
6262
|
});
|
|
@@ -6426,7 +6426,7 @@ var Dg = Fa, Og = function(e) {
|
|
|
6426
6426
|
return null;
|
|
6427
6427
|
var t = Array.isArray(e) ? e[0] : e;
|
|
6428
6428
|
return t.ownerDocument.body;
|
|
6429
|
-
},
|
|
6429
|
+
}, Ot = /* @__PURE__ */ new WeakMap(), Ir = /* @__PURE__ */ new WeakMap(), kr = {}, Gn = 0, Va = function(e) {
|
|
6430
6430
|
return e && (e.host || Va(e.parentNode));
|
|
6431
6431
|
}, $g = function(e, t) {
|
|
6432
6432
|
return t.map(function(r) {
|
|
@@ -6450,8 +6450,8 @@ var Dg = Fa, Og = function(e) {
|
|
|
6450
6450
|
p(m);
|
|
6451
6451
|
else
|
|
6452
6452
|
try {
|
|
6453
|
-
var g = m.getAttribute(n), v = g !== null && g !== "false", h = (
|
|
6454
|
-
|
|
6453
|
+
var g = m.getAttribute(n), v = g !== null && g !== "false", h = (Ot.get(m) || 0) + 1, y = (s.get(m) || 0) + 1;
|
|
6454
|
+
Ot.set(m, h), s.set(m, y), i.push(m), h === 1 && v && Ir.set(m, !0), y === 1 && m.setAttribute(r, "true"), v || m.setAttribute(n, "true");
|
|
6455
6455
|
} catch (b) {
|
|
6456
6456
|
console.error("aria-hidden: cannot operate on ", m, b);
|
|
6457
6457
|
}
|
|
@@ -6459,9 +6459,9 @@ var Dg = Fa, Og = function(e) {
|
|
|
6459
6459
|
};
|
|
6460
6460
|
return p(t), a.clear(), Gn++, function() {
|
|
6461
6461
|
i.forEach(function(f) {
|
|
6462
|
-
var m =
|
|
6463
|
-
|
|
6464
|
-
}), Gn--, Gn || (
|
|
6462
|
+
var m = Ot.get(f) - 1, g = s.get(f) - 1;
|
|
6463
|
+
Ot.set(f, m), s.set(f, g), m || (Ir.has(f) || f.removeAttribute(n), Ir.delete(f)), g || f.removeAttribute(r);
|
|
6464
|
+
}), Gn--, Gn || (Ot = /* @__PURE__ */ new WeakMap(), Ot = /* @__PURE__ */ new WeakMap(), Ir = /* @__PURE__ */ new WeakMap(), kr = {});
|
|
6465
6465
|
};
|
|
6466
6466
|
}, jo = function(e, t, r) {
|
|
6467
6467
|
r === void 0 && (r = "data-aria-hidden");
|
|
@@ -6699,14 +6699,14 @@ var Qg = function() {
|
|
|
6699
6699
|
right: t[2],
|
|
6700
6700
|
gap: Math.max(0, n - r + t[2] - t[0])
|
|
6701
6701
|
};
|
|
6702
|
-
}, nv = Ua(),
|
|
6702
|
+
}, nv = Ua(), Ut = "data-scroll-locked", ov = function(e, t, r, n) {
|
|
6703
6703
|
var o = e.left, s = e.top, i = e.right, a = e.gap;
|
|
6704
6704
|
return r === void 0 && (r = "margin"), `
|
|
6705
6705
|
.`.concat(Vg, ` {
|
|
6706
6706
|
overflow: hidden `).concat(n, `;
|
|
6707
6707
|
padding-right: `).concat(a, "px ").concat(n, `;
|
|
6708
6708
|
}
|
|
6709
|
-
body[`).concat(
|
|
6709
|
+
body[`).concat(Ut, `] {
|
|
6710
6710
|
overflow: hidden `).concat(n, `;
|
|
6711
6711
|
overscroll-behavior: contain;
|
|
6712
6712
|
`).concat([
|
|
@@ -6739,18 +6739,18 @@ var Qg = function() {
|
|
|
6739
6739
|
margin-right: 0 `).concat(n, `;
|
|
6740
6740
|
}
|
|
6741
6741
|
|
|
6742
|
-
body[`).concat(
|
|
6742
|
+
body[`).concat(Ut, `] {
|
|
6743
6743
|
`).concat(Wg, ": ").concat(a, `px;
|
|
6744
6744
|
}
|
|
6745
6745
|
`);
|
|
6746
6746
|
}, oi = function() {
|
|
6747
|
-
var e = parseInt(document.body.getAttribute(
|
|
6747
|
+
var e = parseInt(document.body.getAttribute(Ut) || "0", 10);
|
|
6748
6748
|
return isFinite(e) ? e : 0;
|
|
6749
6749
|
}, sv = function() {
|
|
6750
6750
|
l.useEffect(function() {
|
|
6751
|
-
return document.body.setAttribute(
|
|
6751
|
+
return document.body.setAttribute(Ut, (oi() + 1).toString()), function() {
|
|
6752
6752
|
var e = oi() - 1;
|
|
6753
|
-
e <= 0 ? document.body.removeAttribute(
|
|
6753
|
+
e <= 0 ? document.body.removeAttribute(Ut) : document.body.setAttribute(Ut, e.toString());
|
|
6754
6754
|
};
|
|
6755
6755
|
}, []);
|
|
6756
6756
|
}, iv = function(e) {
|
|
@@ -6772,7 +6772,7 @@ if (typeof window < "u")
|
|
|
6772
6772
|
} catch {
|
|
6773
6773
|
ao = !1;
|
|
6774
6774
|
}
|
|
6775
|
-
var
|
|
6775
|
+
var $t = ao ? { passive: !1 } : !1, av = function(e) {
|
|
6776
6776
|
return e.tagName === "TEXTAREA";
|
|
6777
6777
|
}, ja = function(e, t) {
|
|
6778
6778
|
if (!(e instanceof Element))
|
|
@@ -6848,7 +6848,7 @@ var Ot = ao ? { passive: !1 } : !1, av = function(e) {
|
|
|
6848
6848
|
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
6849
6849
|
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
6850
6850
|
`);
|
|
6851
|
-
}, gv = 0,
|
|
6851
|
+
}, gv = 0, Lt = [];
|
|
6852
6852
|
function vv(e) {
|
|
6853
6853
|
var t = l.useRef([]), r = l.useRef([0, 0]), n = l.useRef(), o = l.useState(gv++)[0], s = l.useState(Ua)[0], i = l.useRef(e);
|
|
6854
6854
|
l.useEffect(function() {
|
|
@@ -6886,7 +6886,7 @@ function vv(e) {
|
|
|
6886
6886
|
return pv(R, y, h, R === "h" ? x : S);
|
|
6887
6887
|
}, []), c = l.useCallback(function(h) {
|
|
6888
6888
|
var y = h;
|
|
6889
|
-
if (!(
|
|
6889
|
+
if (!(!Lt.length || Lt[Lt.length - 1] !== s)) {
|
|
6890
6890
|
var b = "deltaY" in y ? ii(y) : Or(y), w = t.current.filter(function(E) {
|
|
6891
6891
|
return E.name === y.type && (E.target === y.target || y.target === E.shadowParent) && mv(E.delta, b);
|
|
6892
6892
|
})[0];
|
|
@@ -6916,14 +6916,14 @@ function vv(e) {
|
|
|
6916
6916
|
u(h.type, Or(h), h.target, a(h, e.lockRef.current));
|
|
6917
6917
|
}, []);
|
|
6918
6918
|
l.useEffect(function() {
|
|
6919
|
-
return
|
|
6919
|
+
return Lt.push(s), e.setCallbacks({
|
|
6920
6920
|
onScrollCapture: f,
|
|
6921
6921
|
onWheelCapture: f,
|
|
6922
6922
|
onTouchMoveCapture: m
|
|
6923
|
-
}), document.addEventListener("wheel", c,
|
|
6924
|
-
|
|
6923
|
+
}), document.addEventListener("wheel", c, $t), document.addEventListener("touchmove", c, $t), document.addEventListener("touchstart", p, $t), function() {
|
|
6924
|
+
Lt = Lt.filter(function(h) {
|
|
6925
6925
|
return h !== s;
|
|
6926
|
-
}), document.removeEventListener("wheel", c,
|
|
6926
|
+
}), document.removeEventListener("wheel", c, $t), document.removeEventListener("touchmove", c, $t), document.removeEventListener("touchstart", p, $t);
|
|
6927
6927
|
};
|
|
6928
6928
|
}, []);
|
|
6929
6929
|
var g = e.removeScrollBar, v = e.inert;
|
|
@@ -6944,10 +6944,10 @@ var yn = l.forwardRef(function(e, t) {
|
|
|
6944
6944
|
return l.createElement(vn, et({}, e, { ref: t, sideCar: bv }));
|
|
6945
6945
|
});
|
|
6946
6946
|
yn.classNames = vn.classNames;
|
|
6947
|
-
var wv = [" ", "Enter", "ArrowUp", "ArrowDown"], xv = [" ", "Enter"],
|
|
6947
|
+
var wv = [" ", "Enter", "ArrowUp", "ArrowDown"], xv = [" ", "Enter"], At = "Select", [bn, wn, Sv] = Mo(At), [Qt] = Kp(At, [
|
|
6948
6948
|
Sv,
|
|
6949
|
-
|
|
6950
|
-
]), xn =
|
|
6949
|
+
Zt
|
|
6950
|
+
]), xn = Zt(), [Cv, xt] = Qt(At), [Ev, Nv] = Qt(At), Ka = (e) => {
|
|
6951
6951
|
const {
|
|
6952
6952
|
__scopeSelect: t,
|
|
6953
6953
|
children: r,
|
|
@@ -6963,16 +6963,16 @@ var wv = [" ", "Enter", "ArrowUp", "ArrowDown"], xv = [" ", "Enter"], Pt = "Sele
|
|
|
6963
6963
|
disabled: m,
|
|
6964
6964
|
required: g,
|
|
6965
6965
|
form: v
|
|
6966
|
-
} = e, h = xn(t), [y, b] = l.useState(null), [w, x] = l.useState(null), [S, E] = l.useState(!1), A =
|
|
6966
|
+
} = e, h = xn(t), [y, b] = l.useState(null), [w, x] = l.useState(null), [S, E] = l.useState(!1), A = gr(u), [_, O] = nt({
|
|
6967
6967
|
prop: n,
|
|
6968
6968
|
defaultProp: o ?? !1,
|
|
6969
6969
|
onChange: s,
|
|
6970
|
-
caller:
|
|
6970
|
+
caller: At
|
|
6971
6971
|
}), [D, L] = nt({
|
|
6972
6972
|
prop: i,
|
|
6973
6973
|
defaultProp: a,
|
|
6974
6974
|
onChange: c,
|
|
6975
|
-
caller:
|
|
6975
|
+
caller: At
|
|
6976
6976
|
}), T = l.useRef(null), R = y ? v || !!y.closest("form") : !0, [H, U] = l.useState(/* @__PURE__ */ new Set()), X = Array.from(H).map((j) => j.props.value).join(";");
|
|
6977
6977
|
return /* @__PURE__ */ d(hn, { ...h, children: /* @__PURE__ */ M(
|
|
6978
6978
|
Cv,
|
|
@@ -7033,7 +7033,7 @@ var wv = [" ", "Enter", "ArrowUp", "ArrowDown"], xv = [" ", "Enter"], Pt = "Sele
|
|
|
7033
7033
|
}
|
|
7034
7034
|
) });
|
|
7035
7035
|
};
|
|
7036
|
-
Ka.displayName =
|
|
7036
|
+
Ka.displayName = At;
|
|
7037
7037
|
var Ya = "SelectTrigger", qa = l.forwardRef(
|
|
7038
7038
|
(e, t) => {
|
|
7039
7039
|
const { __scopeSelect: r, disabled: n = !1, ...o } = e, s = xn(r), i = xt(Ya, r), a = i.disabled || n, c = se(t, i.onTriggerChange), u = wn(r), p = l.useRef("touch"), [f, m, g] = wl((h) => {
|
|
@@ -7081,7 +7081,7 @@ qa.displayName = Ya;
|
|
|
7081
7081
|
var Xa = "SelectValue", Za = l.forwardRef(
|
|
7082
7082
|
(e, t) => {
|
|
7083
7083
|
const { __scopeSelect: r, className: n, style: o, children: s, placeholder: i = "", ...a } = e, c = xt(Xa, r), { onValueNodeHasChildrenChange: u } = c, p = s !== void 0, f = se(t, c.onValueNodeChange);
|
|
7084
|
-
return
|
|
7084
|
+
return Se(() => {
|
|
7085
7085
|
u(p);
|
|
7086
7086
|
}, [u, p]), /* @__PURE__ */ d(
|
|
7087
7087
|
We.span,
|
|
@@ -7104,14 +7104,14 @@ var Rv = "SelectIcon", Qa = l.forwardRef(
|
|
|
7104
7104
|
Qa.displayName = Rv;
|
|
7105
7105
|
var _v = "SelectPortal", Ja = (e) => /* @__PURE__ */ d(gn, { asChild: !0, ...e });
|
|
7106
7106
|
Ja.displayName = _v;
|
|
7107
|
-
var
|
|
7107
|
+
var Tt = "SelectContent", el = l.forwardRef(
|
|
7108
7108
|
(e, t) => {
|
|
7109
|
-
const r = xt(
|
|
7110
|
-
if (
|
|
7109
|
+
const r = xt(Tt, e.__scopeSelect), [n, o] = l.useState();
|
|
7110
|
+
if (Se(() => {
|
|
7111
7111
|
o(new DocumentFragment());
|
|
7112
7112
|
}, []), !r.open) {
|
|
7113
7113
|
const s = n;
|
|
7114
|
-
return s ?
|
|
7114
|
+
return s ? mr.createPortal(
|
|
7115
7115
|
/* @__PURE__ */ d(tl, { scope: e.__scopeSelect, children: /* @__PURE__ */ d(bn.Slot, { scope: e.__scopeSelect, children: /* @__PURE__ */ d("div", { children: e.children }) }) }),
|
|
7116
7116
|
s
|
|
7117
7117
|
) : null;
|
|
@@ -7119,8 +7119,8 @@ var At = "SelectContent", el = l.forwardRef(
|
|
|
7119
7119
|
return /* @__PURE__ */ d(rl, { ...e, ref: t });
|
|
7120
7120
|
}
|
|
7121
7121
|
);
|
|
7122
|
-
el.displayName =
|
|
7123
|
-
var ze = 10, [tl, St] =
|
|
7122
|
+
el.displayName = Tt;
|
|
7123
|
+
var ze = 10, [tl, St] = Qt(Tt), Pv = "SelectContentImpl", Av = /* @__PURE__ */ $a("SelectContent.RemoveScroll"), rl = l.forwardRef(
|
|
7124
7124
|
(e, t) => {
|
|
7125
7125
|
const {
|
|
7126
7126
|
__scopeSelect: r,
|
|
@@ -7142,7 +7142,7 @@ var ze = 10, [tl, St] = Zt(At), Pv = "SelectContentImpl", Av = /* @__PURE__ */ $
|
|
|
7142
7142
|
avoidCollisions: y,
|
|
7143
7143
|
//
|
|
7144
7144
|
...b
|
|
7145
|
-
} = e, w = xt(
|
|
7145
|
+
} = e, w = xt(Tt, r), [x, S] = l.useState(null), [E, A] = l.useState(null), _ = se(t, (I) => S(I)), [O, D] = l.useState(null), [L, T] = l.useState(
|
|
7146
7146
|
null
|
|
7147
7147
|
), R = wn(r), [H, U] = l.useState(!1), X = l.useRef(!1);
|
|
7148
7148
|
l.useEffect(() => {
|
|
@@ -7241,7 +7241,7 @@ var ze = 10, [tl, St] = Zt(At), Pv = "SelectContentImpl", Av = /* @__PURE__ */ $
|
|
|
7241
7241
|
(Q = w.trigger) == null || Q.focus({ preventScroll: !0 }), I.preventDefault();
|
|
7242
7242
|
}),
|
|
7243
7243
|
children: /* @__PURE__ */ d(
|
|
7244
|
-
|
|
7244
|
+
vr,
|
|
7245
7245
|
{
|
|
7246
7246
|
asChild: !0,
|
|
7247
7247
|
disableOutsidePointerEvents: !0,
|
|
@@ -7292,7 +7292,7 @@ var ze = 10, [tl, St] = Zt(At), Pv = "SelectContentImpl", Av = /* @__PURE__ */ $
|
|
|
7292
7292
|
);
|
|
7293
7293
|
rl.displayName = Pv;
|
|
7294
7294
|
var Tv = "SelectItemAlignedPosition", nl = l.forwardRef((e, t) => {
|
|
7295
|
-
const { __scopeSelect: r, onPlaced: n, ...o } = e, s = xt(
|
|
7295
|
+
const { __scopeSelect: r, onPlaced: n, ...o } = e, s = xt(Tt, r), i = St(Tt, r), [a, c] = l.useState(null), [u, p] = l.useState(null), f = se(t, (_) => p(_)), m = wn(r), g = l.useRef(!1), v = l.useRef(!0), { viewport: h, selectedItem: y, selectedItemText: b, focusSelectedItem: w } = i, x = l.useCallback(() => {
|
|
7296
7296
|
if (s.trigger && s.valueNode && a && u && h && y && b) {
|
|
7297
7297
|
const _ = s.trigger.getBoundingClientRect(), O = u.getBoundingClientRect(), D = s.valueNode.getBoundingClientRect(), L = b.getBoundingClientRect();
|
|
7298
7298
|
if (s.dir !== "rtl") {
|
|
@@ -7347,9 +7347,9 @@ var Tv = "SelectItemAlignedPosition", nl = l.forwardRef((e, t) => {
|
|
|
7347
7347
|
s.dir,
|
|
7348
7348
|
n
|
|
7349
7349
|
]);
|
|
7350
|
-
|
|
7350
|
+
Se(() => x(), [x]);
|
|
7351
7351
|
const [S, E] = l.useState();
|
|
7352
|
-
|
|
7352
|
+
Se(() => {
|
|
7353
7353
|
u && E(window.getComputedStyle(u).zIndex);
|
|
7354
7354
|
}, [u]);
|
|
7355
7355
|
const A = l.useCallback(
|
|
@@ -7425,7 +7425,7 @@ var Mv = "SelectPopperPosition", lo = l.forwardRef((e, t) => {
|
|
|
7425
7425
|
);
|
|
7426
7426
|
});
|
|
7427
7427
|
lo.displayName = Mv;
|
|
7428
|
-
var [Iv, zo] =
|
|
7428
|
+
var [Iv, zo] = Qt(Tt, {}), co = "SelectViewport", ol = l.forwardRef(
|
|
7429
7429
|
(e, t) => {
|
|
7430
7430
|
const { __scopeSelect: r, nonce: n, ...o } = e, s = St(co, r), i = zo(co, r), a = se(t, s.onViewportChange), c = l.useRef(0);
|
|
7431
7431
|
return /* @__PURE__ */ M(Te, { children: [
|
|
@@ -7478,7 +7478,7 @@ var [Iv, zo] = Zt(At, {}), co = "SelectViewport", ol = l.forwardRef(
|
|
|
7478
7478
|
}
|
|
7479
7479
|
);
|
|
7480
7480
|
ol.displayName = co;
|
|
7481
|
-
var sl = "SelectGroup", [kv, Dv] =
|
|
7481
|
+
var sl = "SelectGroup", [kv, Dv] = Qt(sl), il = l.forwardRef(
|
|
7482
7482
|
(e, t) => {
|
|
7483
7483
|
const { __scopeSelect: r, ...n } = e, o = Fe();
|
|
7484
7484
|
return /* @__PURE__ */ d(kv, { scope: r, id: o, children: /* @__PURE__ */ d(We.div, { role: "group", "aria-labelledby": o, ...n, ref: t }) });
|
|
@@ -7492,7 +7492,7 @@ var al = "SelectLabel", ll = l.forwardRef(
|
|
|
7492
7492
|
}
|
|
7493
7493
|
);
|
|
7494
7494
|
ll.displayName = al;
|
|
7495
|
-
var Kr = "SelectItem", [Ov, cl] =
|
|
7495
|
+
var Kr = "SelectItem", [Ov, cl] = Qt(Kr), ul = l.forwardRef(
|
|
7496
7496
|
(e, t) => {
|
|
7497
7497
|
const {
|
|
7498
7498
|
__scopeSelect: r,
|
|
@@ -7576,9 +7576,9 @@ var Kr = "SelectItem", [Ov, cl] = Zt(Kr), ul = l.forwardRef(
|
|
|
7576
7576
|
}
|
|
7577
7577
|
);
|
|
7578
7578
|
ul.displayName = Kr;
|
|
7579
|
-
var
|
|
7579
|
+
var nr = "SelectItemText", dl = l.forwardRef(
|
|
7580
7580
|
(e, t) => {
|
|
7581
|
-
const { __scopeSelect: r, className: n, style: o, ...s } = e, i = xt(
|
|
7581
|
+
const { __scopeSelect: r, className: n, style: o, ...s } = e, i = xt(nr, r), a = St(nr, r), c = cl(nr, r), u = Nv(nr, r), [p, f] = l.useState(null), m = se(
|
|
7582
7582
|
t,
|
|
7583
7583
|
(b) => f(b),
|
|
7584
7584
|
c.onItemTextChange,
|
|
@@ -7590,13 +7590,13 @@ var rr = "SelectItemText", dl = l.forwardRef(
|
|
|
7590
7590
|
() => /* @__PURE__ */ d("option", { value: c.value, disabled: c.disabled, children: g }, c.value),
|
|
7591
7591
|
[c.disabled, c.value, g]
|
|
7592
7592
|
), { onNativeOptionAdd: h, onNativeOptionRemove: y } = u;
|
|
7593
|
-
return
|
|
7593
|
+
return Se(() => (h(v), () => y(v)), [h, y, v]), /* @__PURE__ */ M(Te, { children: [
|
|
7594
7594
|
/* @__PURE__ */ d(We.span, { id: c.textId, ...s, ref: m }),
|
|
7595
|
-
c.isSelected && i.valueNode && !i.valueNodeHasChildren ?
|
|
7595
|
+
c.isSelected && i.valueNode && !i.valueNodeHasChildren ? mr.createPortal(s.children, i.valueNode) : null
|
|
7596
7596
|
] });
|
|
7597
7597
|
}
|
|
7598
7598
|
);
|
|
7599
|
-
dl.displayName =
|
|
7599
|
+
dl.displayName = nr;
|
|
7600
7600
|
var fl = "SelectItemIndicator", pl = l.forwardRef(
|
|
7601
7601
|
(e, t) => {
|
|
7602
7602
|
const { __scopeSelect: r, ...n } = e;
|
|
@@ -7606,7 +7606,7 @@ var fl = "SelectItemIndicator", pl = l.forwardRef(
|
|
|
7606
7606
|
pl.displayName = fl;
|
|
7607
7607
|
var uo = "SelectScrollUpButton", ml = l.forwardRef((e, t) => {
|
|
7608
7608
|
const r = St(uo, e.__scopeSelect), n = zo(uo, e.__scopeSelect), [o, s] = l.useState(!1), i = se(t, n.onScrollButtonChange);
|
|
7609
|
-
return
|
|
7609
|
+
return Se(() => {
|
|
7610
7610
|
if (r.viewport && r.isPositioned) {
|
|
7611
7611
|
let a = function() {
|
|
7612
7612
|
const u = c.scrollTop > 0;
|
|
@@ -7630,7 +7630,7 @@ var uo = "SelectScrollUpButton", ml = l.forwardRef((e, t) => {
|
|
|
7630
7630
|
ml.displayName = uo;
|
|
7631
7631
|
var fo = "SelectScrollDownButton", hl = l.forwardRef((e, t) => {
|
|
7632
7632
|
const r = St(fo, e.__scopeSelect), n = zo(fo, e.__scopeSelect), [o, s] = l.useState(!1), i = se(t, n.onScrollButtonChange);
|
|
7633
|
-
return
|
|
7633
|
+
return Se(() => {
|
|
7634
7634
|
if (r.viewport && r.isPositioned) {
|
|
7635
7635
|
let a = function() {
|
|
7636
7636
|
const u = c.scrollHeight - c.clientHeight, p = Math.ceil(c.scrollTop) < u;
|
|
@@ -7656,7 +7656,7 @@ var gl = l.forwardRef((e, t) => {
|
|
|
7656
7656
|
const { __scopeSelect: r, onAutoScroll: n, ...o } = e, s = St("SelectScrollButton", r), i = l.useRef(null), a = wn(r), c = l.useCallback(() => {
|
|
7657
7657
|
i.current !== null && (window.clearInterval(i.current), i.current = null);
|
|
7658
7658
|
}, []);
|
|
7659
|
-
return l.useEffect(() => () => c(), [c]),
|
|
7659
|
+
return l.useEffect(() => () => c(), [c]), Se(() => {
|
|
7660
7660
|
var p;
|
|
7661
7661
|
const u = a().find((f) => f.ref.current === document.activeElement);
|
|
7662
7662
|
(p = u == null ? void 0 : u.ref.current) == null || p.scrollIntoView({ block: "nearest" });
|
|
@@ -7838,7 +7838,7 @@ const Yo = l.forwardRef(({ className: e, children: t, ...r }, n) => /* @__PURE__
|
|
|
7838
7838
|
),
|
|
7839
7839
|
...r,
|
|
7840
7840
|
children: [
|
|
7841
|
-
/* @__PURE__ */ d("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ d(Kv, { children: /* @__PURE__ */ d(
|
|
7841
|
+
/* @__PURE__ */ d("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ d(Kv, { children: /* @__PURE__ */ d(lr, { className: "h-4 w-4" }) }) }),
|
|
7842
7842
|
/* @__PURE__ */ d(Gv, { children: t })
|
|
7843
7843
|
]
|
|
7844
7844
|
}
|
|
@@ -7979,7 +7979,7 @@ var oy = [
|
|
|
7979
7979
|
"span",
|
|
7980
7980
|
"svg",
|
|
7981
7981
|
"ul"
|
|
7982
|
-
],
|
|
7982
|
+
], br = oy.reduce((e, t) => {
|
|
7983
7983
|
const r = /* @__PURE__ */ kl(`Primitive.${t}`), n = l.forwardRef((o, s) => {
|
|
7984
7984
|
const { asChild: i, ...a } = o, c = i ? r : t;
|
|
7985
7985
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ d(c, { ...a, ref: s });
|
|
@@ -8021,7 +8021,7 @@ var $l = "DialogTrigger", Ll = l.forwardRef(
|
|
|
8021
8021
|
(e, t) => {
|
|
8022
8022
|
const { __scopeDialog: r, ...n } = e, o = Xe($l, r), s = se(t, o.triggerRef);
|
|
8023
8023
|
return /* @__PURE__ */ d(
|
|
8024
|
-
|
|
8024
|
+
br.button,
|
|
8025
8025
|
{
|
|
8026
8026
|
type: "button",
|
|
8027
8027
|
"aria-haspopup": "dialog",
|
|
@@ -8057,7 +8057,7 @@ var ay = /* @__PURE__ */ kl("DialogOverlay.RemoveScroll"), ly = l.forwardRef(
|
|
|
8057
8057
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
8058
8058
|
// ie. when `Overlay` and `Content` are siblings
|
|
8059
8059
|
/* @__PURE__ */ d(yn, { as: ay, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ d(
|
|
8060
|
-
|
|
8060
|
+
br.div,
|
|
8061
8061
|
{
|
|
8062
8062
|
"data-state": Zo(o.open),
|
|
8063
8063
|
...n,
|
|
@@ -8067,16 +8067,16 @@ var ay = /* @__PURE__ */ kl("DialogOverlay.RemoveScroll"), ly = l.forwardRef(
|
|
|
8067
8067
|
) })
|
|
8068
8068
|
);
|
|
8069
8069
|
}
|
|
8070
|
-
),
|
|
8070
|
+
), Mt = "DialogContent", Bl = l.forwardRef(
|
|
8071
8071
|
(e, t) => {
|
|
8072
|
-
const r = Fl(
|
|
8072
|
+
const r = Fl(Mt, e.__scopeDialog), { forceMount: n = r.forceMount, ...o } = e, s = Xe(Mt, e.__scopeDialog);
|
|
8073
8073
|
return /* @__PURE__ */ d(ke, { present: n || s.open, children: s.modal ? /* @__PURE__ */ d(cy, { ...o, ref: t }) : /* @__PURE__ */ d(uy, { ...o, ref: t }) });
|
|
8074
8074
|
}
|
|
8075
8075
|
);
|
|
8076
|
-
Bl.displayName =
|
|
8076
|
+
Bl.displayName = Mt;
|
|
8077
8077
|
var cy = l.forwardRef(
|
|
8078
8078
|
(e, t) => {
|
|
8079
|
-
const r = Xe(
|
|
8079
|
+
const r = Xe(Mt, e.__scopeDialog), n = l.useRef(null), o = se(t, r.contentRef, n);
|
|
8080
8080
|
return l.useEffect(() => {
|
|
8081
8081
|
const s = n.current;
|
|
8082
8082
|
if (s) return jo(s);
|
|
@@ -8104,7 +8104,7 @@ var cy = l.forwardRef(
|
|
|
8104
8104
|
}
|
|
8105
8105
|
), uy = l.forwardRef(
|
|
8106
8106
|
(e, t) => {
|
|
8107
|
-
const r = Xe(
|
|
8107
|
+
const r = Xe(Mt, e.__scopeDialog), n = l.useRef(!1), o = l.useRef(!1);
|
|
8108
8108
|
return /* @__PURE__ */ d(
|
|
8109
8109
|
Hl,
|
|
8110
8110
|
{
|
|
@@ -8127,7 +8127,7 @@ var cy = l.forwardRef(
|
|
|
8127
8127
|
}
|
|
8128
8128
|
), Hl = l.forwardRef(
|
|
8129
8129
|
(e, t) => {
|
|
8130
|
-
const { __scopeDialog: r, trapFocus: n, onOpenAutoFocus: o, onCloseAutoFocus: s, ...i } = e, a = Xe(
|
|
8130
|
+
const { __scopeDialog: r, trapFocus: n, onOpenAutoFocus: o, onCloseAutoFocus: s, ...i } = e, a = Xe(Mt, r), c = l.useRef(null), u = se(t, c);
|
|
8131
8131
|
return Io(), /* @__PURE__ */ M(Te, { children: [
|
|
8132
8132
|
/* @__PURE__ */ d(
|
|
8133
8133
|
un,
|
|
@@ -8138,7 +8138,7 @@ var cy = l.forwardRef(
|
|
|
8138
8138
|
onMountAutoFocus: o,
|
|
8139
8139
|
onUnmountAutoFocus: s,
|
|
8140
8140
|
children: /* @__PURE__ */ d(
|
|
8141
|
-
|
|
8141
|
+
vr,
|
|
8142
8142
|
{
|
|
8143
8143
|
role: "dialog",
|
|
8144
8144
|
id: a.contentId,
|
|
@@ -8161,14 +8161,14 @@ var cy = l.forwardRef(
|
|
|
8161
8161
|
), Xo = "DialogTitle", Ul = l.forwardRef(
|
|
8162
8162
|
(e, t) => {
|
|
8163
8163
|
const { __scopeDialog: r, ...n } = e, o = Xe(Xo, r);
|
|
8164
|
-
return /* @__PURE__ */ d(
|
|
8164
|
+
return /* @__PURE__ */ d(br.h2, { id: o.titleId, ...n, ref: t });
|
|
8165
8165
|
}
|
|
8166
8166
|
);
|
|
8167
8167
|
Ul.displayName = Xo;
|
|
8168
8168
|
var jl = "DialogDescription", zl = l.forwardRef(
|
|
8169
8169
|
(e, t) => {
|
|
8170
8170
|
const { __scopeDialog: r, ...n } = e, o = Xe(jl, r);
|
|
8171
|
-
return /* @__PURE__ */ d(
|
|
8171
|
+
return /* @__PURE__ */ d(br.p, { id: o.descriptionId, ...n, ref: t });
|
|
8172
8172
|
}
|
|
8173
8173
|
);
|
|
8174
8174
|
zl.displayName = jl;
|
|
@@ -8176,7 +8176,7 @@ var Gl = "DialogClose", Kl = l.forwardRef(
|
|
|
8176
8176
|
(e, t) => {
|
|
8177
8177
|
const { __scopeDialog: r, ...n } = e, o = Xe(Gl, r);
|
|
8178
8178
|
return /* @__PURE__ */ d(
|
|
8179
|
-
|
|
8179
|
+
br.button,
|
|
8180
8180
|
{
|
|
8181
8181
|
type: "button",
|
|
8182
8182
|
...n,
|
|
@@ -8191,7 +8191,7 @@ function Zo(e) {
|
|
|
8191
8191
|
return e ? "open" : "closed";
|
|
8192
8192
|
}
|
|
8193
8193
|
var Yl = "DialogTitleWarning", [YS, ql] = Xv(Yl, {
|
|
8194
|
-
contentName:
|
|
8194
|
+
contentName: Mt,
|
|
8195
8195
|
titleName: Xo,
|
|
8196
8196
|
docsSlug: "dialog"
|
|
8197
8197
|
}), dy = ({ titleId: e }) => {
|
|
@@ -8462,13 +8462,13 @@ var Ay = [
|
|
|
8462
8462
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ d(c, { ...a, ref: s });
|
|
8463
8463
|
});
|
|
8464
8464
|
return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
|
|
8465
|
-
}, {}), Xn = "rovingFocusGroup.onEntryFocus", Ty = { bubbles: !1, cancelable: !0 },
|
|
8466
|
-
|
|
8465
|
+
}, {}), Xn = "rovingFocusGroup.onEntryFocus", Ty = { bubbles: !1, cancelable: !0 }, wr = "RovingFocusGroup", [mo, ac, My] = Mo(wr), [Iy, Cn] = xy(
|
|
8466
|
+
wr,
|
|
8467
8467
|
[My]
|
|
8468
|
-
), [ky, Dy] = Iy(
|
|
8468
|
+
), [ky, Dy] = Iy(wr), lc = l.forwardRef(
|
|
8469
8469
|
(e, t) => /* @__PURE__ */ d(mo.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d(mo.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d(Oy, { ...e, ref: t }) }) })
|
|
8470
8470
|
);
|
|
8471
|
-
lc.displayName =
|
|
8471
|
+
lc.displayName = wr;
|
|
8472
8472
|
var Oy = l.forwardRef((e, t) => {
|
|
8473
8473
|
const {
|
|
8474
8474
|
__scopeRovingFocusGroup: r,
|
|
@@ -8481,11 +8481,11 @@ var Oy = l.forwardRef((e, t) => {
|
|
|
8481
8481
|
onEntryFocus: u,
|
|
8482
8482
|
preventScrollOnEntryFocus: p = !1,
|
|
8483
8483
|
...f
|
|
8484
|
-
} = e, m = l.useRef(null), g = se(t, m), v =
|
|
8484
|
+
} = e, m = l.useRef(null), g = se(t, m), v = gr(s), [h, y] = nt({
|
|
8485
8485
|
prop: i,
|
|
8486
8486
|
defaultProp: a ?? null,
|
|
8487
8487
|
onChange: c,
|
|
8488
|
-
caller:
|
|
8488
|
+
caller: wr
|
|
8489
8489
|
}), [b, w] = l.useState(!1), x = Ee(u), S = ac(r), E = l.useRef(!1), [A, _] = l.useState(0);
|
|
8490
8490
|
return l.useEffect(() => {
|
|
8491
8491
|
const O = m.current;
|
|
@@ -8708,7 +8708,7 @@ var Gy = [
|
|
|
8708
8708
|
dir: a,
|
|
8709
8709
|
activationMode: c = "automatic",
|
|
8710
8710
|
...u
|
|
8711
|
-
} = e, p =
|
|
8711
|
+
} = e, p = gr(a), [f, m] = nt({
|
|
8712
8712
|
prop: n,
|
|
8713
8713
|
onChange: o,
|
|
8714
8714
|
defaultProp: s ?? "",
|
|
@@ -9131,7 +9131,7 @@ var es = "Avatar", [ab] = eb(es), [lb, _c] = ab(es), Pc = l.forwardRef(
|
|
|
9131
9131
|
scope: r,
|
|
9132
9132
|
imageLoadingStatus: o,
|
|
9133
9133
|
onImageLoadingStatusChange: s,
|
|
9134
|
-
children: /* @__PURE__ */ d(
|
|
9134
|
+
children: /* @__PURE__ */ d(hr.span, { ...n, ref: t })
|
|
9135
9135
|
}
|
|
9136
9136
|
);
|
|
9137
9137
|
}
|
|
@@ -9143,9 +9143,9 @@ var Ac = "AvatarImage", Tc = l.forwardRef(
|
|
|
9143
9143
|
}, ...s } = e, i = _c(Ac, r), a = cb(n, s), c = Ee((u) => {
|
|
9144
9144
|
o(u), i.onImageLoadingStatusChange(u);
|
|
9145
9145
|
});
|
|
9146
|
-
return
|
|
9146
|
+
return Se(() => {
|
|
9147
9147
|
a !== "idle" && c(a);
|
|
9148
|
-
}, [a, c]), a === "loaded" ? /* @__PURE__ */ d(
|
|
9148
|
+
}, [a, c]), a === "loaded" ? /* @__PURE__ */ d(hr.img, { ...s, ref: t, src: n }) : null;
|
|
9149
9149
|
}
|
|
9150
9150
|
);
|
|
9151
9151
|
Tc.displayName = Ac;
|
|
@@ -9157,7 +9157,7 @@ var Mc = "AvatarFallback", Ic = l.forwardRef(
|
|
|
9157
9157
|
const c = window.setTimeout(() => a(!0), n);
|
|
9158
9158
|
return () => window.clearTimeout(c);
|
|
9159
9159
|
}
|
|
9160
|
-
}, [n]), i && s.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ d(
|
|
9160
|
+
}, [n]), i && s.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ d(hr.span, { ...o, ref: t }) : null;
|
|
9161
9161
|
}
|
|
9162
9162
|
);
|
|
9163
9163
|
Ic.displayName = Mc;
|
|
@@ -9168,9 +9168,9 @@ function cb(e, { referrerPolicy: t, crossOrigin: r }) {
|
|
|
9168
9168
|
const n = sb(), o = l.useRef(null), s = n ? (o.current || (o.current = new window.Image()), o.current) : null, [i, a] = l.useState(
|
|
9169
9169
|
() => ui(s, e)
|
|
9170
9170
|
);
|
|
9171
|
-
return
|
|
9171
|
+
return Se(() => {
|
|
9172
9172
|
a(ui(s, e));
|
|
9173
|
-
}, [s, e]),
|
|
9173
|
+
}, [s, e]), Se(() => {
|
|
9174
9174
|
const c = (f) => () => {
|
|
9175
9175
|
a(f);
|
|
9176
9176
|
};
|
|
@@ -9339,8 +9339,8 @@ var xb = [
|
|
|
9339
9339
|
});
|
|
9340
9340
|
return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
|
|
9341
9341
|
}, {}), [Rn] = pb("Tooltip", [
|
|
9342
|
-
|
|
9343
|
-
]), _n =
|
|
9342
|
+
Zt
|
|
9343
|
+
]), _n = Zt(), Lc = "TooltipProvider", Cb = 700, go = "tooltip.open", [Eb, ts] = Rn(Lc), Fc = (e) => {
|
|
9344
9344
|
const {
|
|
9345
9345
|
__scopeTooltip: t,
|
|
9346
9346
|
delayDuration: r = Cb,
|
|
@@ -9376,7 +9376,7 @@ var xb = [
|
|
|
9376
9376
|
);
|
|
9377
9377
|
};
|
|
9378
9378
|
Fc.displayName = Lc;
|
|
9379
|
-
var
|
|
9379
|
+
var dr = "Tooltip", [Nb, Pn] = Rn(dr), Vc = (e) => {
|
|
9380
9380
|
const {
|
|
9381
9381
|
__scopeTooltip: t,
|
|
9382
9382
|
children: r,
|
|
@@ -9385,13 +9385,13 @@ var ur = "Tooltip", [Nb, Pn] = Rn(ur), Vc = (e) => {
|
|
|
9385
9385
|
onOpenChange: s,
|
|
9386
9386
|
disableHoverableContent: i,
|
|
9387
9387
|
delayDuration: a
|
|
9388
|
-
} = e, c = ts(
|
|
9388
|
+
} = e, c = ts(dr, e.__scopeTooltip), u = _n(t), [p, f] = l.useState(null), m = Fe(), g = l.useRef(0), v = i ?? c.disableHoverableContent, h = a ?? c.delayDuration, y = l.useRef(!1), [b, w] = nt({
|
|
9389
9389
|
prop: n,
|
|
9390
9390
|
defaultProp: o ?? !1,
|
|
9391
9391
|
onChange: (_) => {
|
|
9392
9392
|
_ ? (c.onOpen(), document.dispatchEvent(new CustomEvent(go))) : c.onClose(), s == null || s(_);
|
|
9393
9393
|
},
|
|
9394
|
-
caller:
|
|
9394
|
+
caller: dr
|
|
9395
9395
|
}), x = l.useMemo(() => b ? y.current ? "delayed-open" : "instant-open" : "closed", [b]), S = l.useCallback(() => {
|
|
9396
9396
|
window.clearTimeout(g.current), g.current = 0, y.current = !1, w(!0);
|
|
9397
9397
|
}, [w]), E = l.useCallback(() => {
|
|
@@ -9425,7 +9425,7 @@ var ur = "Tooltip", [Nb, Pn] = Rn(ur), Vc = (e) => {
|
|
|
9425
9425
|
}
|
|
9426
9426
|
) });
|
|
9427
9427
|
};
|
|
9428
|
-
Vc.displayName =
|
|
9428
|
+
Vc.displayName = dr;
|
|
9429
9429
|
var vo = "TooltipTrigger", Wc = l.forwardRef(
|
|
9430
9430
|
(e, t) => {
|
|
9431
9431
|
const { __scopeTooltip: r, ...n } = e, o = Pn(vo, r), s = ts(vo, r), i = _n(r), a = l.useRef(null), c = se(t, a, o.onTriggerChange), u = l.useRef(!1), p = l.useRef(!1), f = l.useCallback(() => u.current = !1, []);
|
|
@@ -9457,13 +9457,13 @@ var vo = "TooltipTrigger", Wc = l.forwardRef(
|
|
|
9457
9457
|
Wc.displayName = vo;
|
|
9458
9458
|
var Rb = "TooltipPortal", [QS, _b] = Rn(Rb, {
|
|
9459
9459
|
forceMount: void 0
|
|
9460
|
-
}),
|
|
9460
|
+
}), Gt = "TooltipContent", Bc = l.forwardRef(
|
|
9461
9461
|
(e, t) => {
|
|
9462
|
-
const r = _b(
|
|
9462
|
+
const r = _b(Gt, e.__scopeTooltip), { forceMount: n = r.forceMount, side: o = "top", ...s } = e, i = Pn(Gt, e.__scopeTooltip);
|
|
9463
9463
|
return /* @__PURE__ */ d(ke, { present: n || i.open, children: i.disableHoverableContent ? /* @__PURE__ */ d(Hc, { side: o, ...s, ref: t }) : /* @__PURE__ */ d(Pb, { side: o, ...s, ref: t }) });
|
|
9464
9464
|
}
|
|
9465
9465
|
), Pb = l.forwardRef((e, t) => {
|
|
9466
|
-
const r = Pn(
|
|
9466
|
+
const r = Pn(Gt, e.__scopeTooltip), n = ts(Gt, e.__scopeTooltip), o = l.useRef(null), s = se(t, o), [i, a] = l.useState(null), { trigger: c, onClose: u } = r, p = o.current, { onPointerInTransitChange: f } = n, m = l.useCallback(() => {
|
|
9467
9467
|
a(null), f(!1);
|
|
9468
9468
|
}, [f]), g = l.useCallback(
|
|
9469
9469
|
(v, h) => {
|
|
@@ -9488,7 +9488,7 @@ var Rb = "TooltipPortal", [QS, _b] = Rn(Rb, {
|
|
|
9488
9488
|
return document.addEventListener("pointermove", v), () => document.removeEventListener("pointermove", v);
|
|
9489
9489
|
}
|
|
9490
9490
|
}, [c, p, i, u, m]), /* @__PURE__ */ d(Hc, { ...e, ref: s });
|
|
9491
|
-
}), [Ab, Tb] = Rn(
|
|
9491
|
+
}), [Ab, Tb] = Rn(dr, { isInside: !1 }), Mb = /* @__PURE__ */ vb("TooltipContent"), Hc = l.forwardRef(
|
|
9492
9492
|
(e, t) => {
|
|
9493
9493
|
const {
|
|
9494
9494
|
__scopeTooltip: r,
|
|
@@ -9497,7 +9497,7 @@ var Rb = "TooltipPortal", [QS, _b] = Rn(Rb, {
|
|
|
9497
9497
|
onEscapeKeyDown: s,
|
|
9498
9498
|
onPointerDownOutside: i,
|
|
9499
9499
|
...a
|
|
9500
|
-
} = e, c = Pn(
|
|
9500
|
+
} = e, c = Pn(Gt, r), u = _n(r), { onClose: p } = c;
|
|
9501
9501
|
return l.useEffect(() => (document.addEventListener(go, p), () => document.removeEventListener(go, p)), [p]), l.useEffect(() => {
|
|
9502
9502
|
if (c.trigger) {
|
|
9503
9503
|
const f = (m) => {
|
|
@@ -9507,7 +9507,7 @@ var Rb = "TooltipPortal", [QS, _b] = Rn(Rb, {
|
|
|
9507
9507
|
return window.addEventListener("scroll", f, { capture: !0 }), () => window.removeEventListener("scroll", f, { capture: !0 });
|
|
9508
9508
|
}
|
|
9509
9509
|
}, [c.trigger, p]), /* @__PURE__ */ d(
|
|
9510
|
-
|
|
9510
|
+
vr,
|
|
9511
9511
|
{
|
|
9512
9512
|
asChild: !0,
|
|
9513
9513
|
disableOutsidePointerEvents: !1,
|
|
@@ -9540,7 +9540,7 @@ var Rb = "TooltipPortal", [QS, _b] = Rn(Rb, {
|
|
|
9540
9540
|
);
|
|
9541
9541
|
}
|
|
9542
9542
|
);
|
|
9543
|
-
Bc.displayName =
|
|
9543
|
+
Bc.displayName = Gt;
|
|
9544
9544
|
var Uc = "TooltipArrow", Ib = l.forwardRef(
|
|
9545
9545
|
(e, t) => {
|
|
9546
9546
|
const { __scopeTooltip: r, ...n } = e, o = _n(r);
|
|
@@ -9888,7 +9888,7 @@ var iw = [
|
|
|
9888
9888
|
"span",
|
|
9889
9889
|
"svg",
|
|
9890
9890
|
"ul"
|
|
9891
|
-
],
|
|
9891
|
+
], xr = iw.reduce((e, t) => {
|
|
9892
9892
|
const r = /* @__PURE__ */ zc(`Primitive.${t}`), n = l.forwardRef((o, s) => {
|
|
9893
9893
|
const { asChild: i, ...a } = o, c = i ? r : t;
|
|
9894
9894
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ d(c, { ...a, ref: s });
|
|
@@ -9896,7 +9896,7 @@ var iw = [
|
|
|
9896
9896
|
return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
|
|
9897
9897
|
}, {});
|
|
9898
9898
|
function aw(e, t) {
|
|
9899
|
-
e &&
|
|
9899
|
+
e && mr.flushSync(() => e.dispatchEvent(t));
|
|
9900
9900
|
}
|
|
9901
9901
|
var yo = ["Enter", " "], lw = ["ArrowDown", "PageUp", "Home"], Gc = ["ArrowUp", "PageDown", "End"], cw = [...lw, ...Gc], uw = {
|
|
9902
9902
|
ltr: [...yo, "ArrowRight"],
|
|
@@ -9904,12 +9904,12 @@ var yo = ["Enter", " "], lw = ["ArrowDown", "PageUp", "Home"], Gc = ["ArrowUp",
|
|
|
9904
9904
|
}, dw = {
|
|
9905
9905
|
ltr: ["ArrowLeft"],
|
|
9906
9906
|
rtl: ["ArrowRight"]
|
|
9907
|
-
},
|
|
9907
|
+
}, Sr = "Menu", [fr, fw, pw] = Mo(Sr), [It, Kc] = Jb(Sr, [
|
|
9908
9908
|
pw,
|
|
9909
|
-
|
|
9909
|
+
Zt,
|
|
9910
9910
|
Cn
|
|
9911
|
-
]),
|
|
9912
|
-
const { __scopeMenu: t, open: r = !1, children: n, dir: o, onOpenChange: s, modal: i = !0 } = e, a =
|
|
9911
|
+
]), Cr = Zt(), Yc = Cn(), [qc, Ct] = It(Sr), [mw, Er] = It(Sr), Xc = (e) => {
|
|
9912
|
+
const { __scopeMenu: t, open: r = !1, children: n, dir: o, onOpenChange: s, modal: i = !0 } = e, a = Cr(t), [c, u] = l.useState(null), p = l.useRef(!1), f = Ee(s), m = gr(o);
|
|
9913
9913
|
return l.useEffect(() => {
|
|
9914
9914
|
const g = () => {
|
|
9915
9915
|
p.current = !0, document.addEventListener("pointerdown", v, { capture: !0, once: !0 }), document.addEventListener("pointermove", v, { capture: !0, once: !0 });
|
|
@@ -9939,25 +9939,25 @@ var yo = ["Enter", " "], lw = ["ArrowDown", "PageUp", "Home"], Gc = ["ArrowUp",
|
|
|
9939
9939
|
}
|
|
9940
9940
|
) });
|
|
9941
9941
|
};
|
|
9942
|
-
Xc.displayName =
|
|
9942
|
+
Xc.displayName = Sr;
|
|
9943
9943
|
var hw = "MenuAnchor", rs = l.forwardRef(
|
|
9944
9944
|
(e, t) => {
|
|
9945
|
-
const { __scopeMenu: r, ...n } = e, o =
|
|
9945
|
+
const { __scopeMenu: r, ...n } = e, o = Cr(r);
|
|
9946
9946
|
return /* @__PURE__ */ d(Bo, { ...o, ...n, ref: t });
|
|
9947
9947
|
}
|
|
9948
9948
|
);
|
|
9949
9949
|
rs.displayName = hw;
|
|
9950
|
-
var ns = "MenuPortal", [gw, Zc] =
|
|
9950
|
+
var ns = "MenuPortal", [gw, Zc] = It(ns, {
|
|
9951
9951
|
forceMount: void 0
|
|
9952
9952
|
}), Qc = (e) => {
|
|
9953
9953
|
const { __scopeMenu: t, forceMount: r, children: n, container: o } = e, s = Ct(ns, t);
|
|
9954
9954
|
return /* @__PURE__ */ d(gw, { scope: t, forceMount: r, children: /* @__PURE__ */ d(ke, { present: r || s.open, children: /* @__PURE__ */ d(gn, { asChild: !0, container: o, children: n }) }) });
|
|
9955
9955
|
};
|
|
9956
9956
|
Qc.displayName = ns;
|
|
9957
|
-
var Be = "MenuContent", [vw, os] =
|
|
9957
|
+
var Be = "MenuContent", [vw, os] = It(Be), Jc = l.forwardRef(
|
|
9958
9958
|
(e, t) => {
|
|
9959
|
-
const r = Zc(Be, e.__scopeMenu), { forceMount: n = r.forceMount, ...o } = e, s = Ct(Be, e.__scopeMenu), i =
|
|
9960
|
-
return /* @__PURE__ */ d(
|
|
9959
|
+
const r = Zc(Be, e.__scopeMenu), { forceMount: n = r.forceMount, ...o } = e, s = Ct(Be, e.__scopeMenu), i = Er(Be, e.__scopeMenu);
|
|
9960
|
+
return /* @__PURE__ */ d(fr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ d(ke, { present: n || s.open, children: /* @__PURE__ */ d(fr.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ d(yw, { ...o, ref: t }) : /* @__PURE__ */ d(bw, { ...o, ref: t }) }) }) });
|
|
9961
9961
|
}
|
|
9962
9962
|
), yw = l.forwardRef(
|
|
9963
9963
|
(e, t) => {
|
|
@@ -10012,7 +10012,7 @@ var Be = "MenuContent", [vw, os] = Mt(Be), Jc = l.forwardRef(
|
|
|
10012
10012
|
onDismiss: g,
|
|
10013
10013
|
disableOutsideScroll: v,
|
|
10014
10014
|
...h
|
|
10015
|
-
} = e, y = Ct(Be, r), b =
|
|
10015
|
+
} = e, y = Ct(Be, r), b = Er(Be, r), w = Cr(r), x = Yc(r), S = fw(r), [E, A] = l.useState(null), _ = l.useRef(null), O = se(t, _, y.onContentChange), D = l.useRef(0), L = l.useRef(""), T = l.useRef(0), R = l.useRef(null), H = l.useRef("right"), U = l.useRef(0), X = v ? yn : l.Fragment, j = v ? { as: ww, allowPinchZoom: !0 } : void 0, z = ($) => {
|
|
10016
10016
|
var I, Q;
|
|
10017
10017
|
const te = L.current + $, W = S().filter((Y) => !Y.disabled), ne = document.activeElement, ce = (I = W.find((Y) => Y.ref.current === ne)) == null ? void 0 : I.textValue, pe = W.map((Y) => Y.textValue), he = Iw(pe, te, ce), ge = (Q = W.find((Y) => Y.textValue === he)) == null ? void 0 : Q.ref.current;
|
|
10018
10018
|
(function Y(J) {
|
|
@@ -10063,7 +10063,7 @@ var Be = "MenuContent", [vw, os] = Mt(Be), Jc = l.forwardRef(
|
|
|
10063
10063
|
}),
|
|
10064
10064
|
onUnmountAutoFocus: i,
|
|
10065
10065
|
children: /* @__PURE__ */ d(
|
|
10066
|
-
|
|
10066
|
+
vr,
|
|
10067
10067
|
{
|
|
10068
10068
|
asChild: !0,
|
|
10069
10069
|
disableOutsidePointerEvents: a,
|
|
@@ -10112,7 +10112,7 @@ var Be = "MenuContent", [vw, os] = Mt(Be), Jc = l.forwardRef(
|
|
|
10112
10112
|
}),
|
|
10113
10113
|
onPointerMove: G(
|
|
10114
10114
|
e.onPointerMove,
|
|
10115
|
-
|
|
10115
|
+
pr(($) => {
|
|
10116
10116
|
const te = $.target, W = U.current !== $.clientX;
|
|
10117
10117
|
if ($.currentTarget.contains(te) && W) {
|
|
10118
10118
|
const ne = $.clientX > U.current ? "right" : "left";
|
|
@@ -10136,20 +10136,20 @@ Jc.displayName = Be;
|
|
|
10136
10136
|
var xw = "MenuGroup", is = l.forwardRef(
|
|
10137
10137
|
(e, t) => {
|
|
10138
10138
|
const { __scopeMenu: r, ...n } = e;
|
|
10139
|
-
return /* @__PURE__ */ d(
|
|
10139
|
+
return /* @__PURE__ */ d(xr.div, { role: "group", ...n, ref: t });
|
|
10140
10140
|
}
|
|
10141
10141
|
);
|
|
10142
10142
|
is.displayName = xw;
|
|
10143
10143
|
var Sw = "MenuLabel", eu = l.forwardRef(
|
|
10144
10144
|
(e, t) => {
|
|
10145
10145
|
const { __scopeMenu: r, ...n } = e;
|
|
10146
|
-
return /* @__PURE__ */ d(
|
|
10146
|
+
return /* @__PURE__ */ d(xr.div, { ...n, ref: t });
|
|
10147
10147
|
}
|
|
10148
10148
|
);
|
|
10149
10149
|
eu.displayName = Sw;
|
|
10150
10150
|
var qr = "MenuItem", di = "menu.itemSelect", An = l.forwardRef(
|
|
10151
10151
|
(e, t) => {
|
|
10152
|
-
const { disabled: r = !1, onSelect: n, ...o } = e, s = l.useRef(null), i =
|
|
10152
|
+
const { disabled: r = !1, onSelect: n, ...o } = e, s = l.useRef(null), i = Er(qr, e.__scopeMenu), a = os(qr, e.__scopeMenu), c = se(t, s), u = l.useRef(!1), p = () => {
|
|
10153
10153
|
const f = s.current;
|
|
10154
10154
|
if (!r && f) {
|
|
10155
10155
|
const m = new CustomEvent(di, { bubbles: !0, cancelable: !0 });
|
|
@@ -10187,13 +10187,13 @@ var tu = l.forwardRef(
|
|
|
10187
10187
|
const v = c.current;
|
|
10188
10188
|
v && g((v.textContent ?? "").trim());
|
|
10189
10189
|
}, [s.children]), /* @__PURE__ */ d(
|
|
10190
|
-
|
|
10190
|
+
fr.ItemSlot,
|
|
10191
10191
|
{
|
|
10192
10192
|
scope: r,
|
|
10193
10193
|
disabled: n,
|
|
10194
10194
|
textValue: o ?? m,
|
|
10195
10195
|
children: /* @__PURE__ */ d(pc, { asChild: !0, ...a, focusable: !n, children: /* @__PURE__ */ d(
|
|
10196
|
-
|
|
10196
|
+
xr.div,
|
|
10197
10197
|
{
|
|
10198
10198
|
role: "menuitem",
|
|
10199
10199
|
"data-highlighted": p ? "" : void 0,
|
|
@@ -10203,13 +10203,13 @@ var tu = l.forwardRef(
|
|
|
10203
10203
|
ref: u,
|
|
10204
10204
|
onPointerMove: G(
|
|
10205
10205
|
e.onPointerMove,
|
|
10206
|
-
|
|
10206
|
+
pr((v) => {
|
|
10207
10207
|
n ? i.onItemLeave(v) : (i.onItemEnter(v), v.defaultPrevented || v.currentTarget.focus({ preventScroll: !0 }));
|
|
10208
10208
|
})
|
|
10209
10209
|
),
|
|
10210
10210
|
onPointerLeave: G(
|
|
10211
10211
|
e.onPointerLeave,
|
|
10212
|
-
|
|
10212
|
+
pr((v) => i.onItemLeave(v))
|
|
10213
10213
|
),
|
|
10214
10214
|
onFocus: G(e.onFocus, () => f(!0)),
|
|
10215
10215
|
onBlur: G(e.onBlur, () => f(!1))
|
|
@@ -10239,7 +10239,7 @@ var tu = l.forwardRef(
|
|
|
10239
10239
|
}
|
|
10240
10240
|
);
|
|
10241
10241
|
ru.displayName = Cw;
|
|
10242
|
-
var nu = "MenuRadioGroup", [Ew, Nw] =
|
|
10242
|
+
var nu = "MenuRadioGroup", [Ew, Nw] = It(
|
|
10243
10243
|
nu,
|
|
10244
10244
|
{ value: void 0, onValueChange: () => {
|
|
10245
10245
|
} }
|
|
@@ -10274,7 +10274,7 @@ var su = "MenuRadioItem", iu = l.forwardRef(
|
|
|
10274
10274
|
}
|
|
10275
10275
|
);
|
|
10276
10276
|
iu.displayName = su;
|
|
10277
|
-
var as = "MenuItemIndicator", [au, Rw] =
|
|
10277
|
+
var as = "MenuItemIndicator", [au, Rw] = It(
|
|
10278
10278
|
as,
|
|
10279
10279
|
{ checked: !1 }
|
|
10280
10280
|
), lu = l.forwardRef(
|
|
@@ -10285,7 +10285,7 @@ var as = "MenuItemIndicator", [au, Rw] = Mt(
|
|
|
10285
10285
|
{
|
|
10286
10286
|
present: n || Xr(s.checked) || s.checked === !0,
|
|
10287
10287
|
children: /* @__PURE__ */ d(
|
|
10288
|
-
|
|
10288
|
+
xr.span,
|
|
10289
10289
|
{
|
|
10290
10290
|
...o,
|
|
10291
10291
|
ref: t,
|
|
@@ -10301,7 +10301,7 @@ var _w = "MenuSeparator", cu = l.forwardRef(
|
|
|
10301
10301
|
(e, t) => {
|
|
10302
10302
|
const { __scopeMenu: r, ...n } = e;
|
|
10303
10303
|
return /* @__PURE__ */ d(
|
|
10304
|
-
|
|
10304
|
+
xr.div,
|
|
10305
10305
|
{
|
|
10306
10306
|
role: "separator",
|
|
10307
10307
|
"aria-orientation": "horizontal",
|
|
@@ -10314,13 +10314,13 @@ var _w = "MenuSeparator", cu = l.forwardRef(
|
|
|
10314
10314
|
cu.displayName = _w;
|
|
10315
10315
|
var Pw = "MenuArrow", uu = l.forwardRef(
|
|
10316
10316
|
(e, t) => {
|
|
10317
|
-
const { __scopeMenu: r, ...n } = e, o =
|
|
10317
|
+
const { __scopeMenu: r, ...n } = e, o = Cr(r);
|
|
10318
10318
|
return /* @__PURE__ */ d(Uo, { ...o, ...n, ref: t });
|
|
10319
10319
|
}
|
|
10320
10320
|
);
|
|
10321
10321
|
uu.displayName = Pw;
|
|
10322
|
-
var ls = "MenuSub", [Aw, du] =
|
|
10323
|
-
const { __scopeMenu: t, children: r, open: n = !1, onOpenChange: o } = e, s = Ct(ls, t), i =
|
|
10322
|
+
var ls = "MenuSub", [Aw, du] = It(ls), fu = (e) => {
|
|
10323
|
+
const { __scopeMenu: t, children: r, open: n = !1, onOpenChange: o } = e, s = Ct(ls, t), i = Cr(t), [a, c] = l.useState(null), [u, p] = l.useState(null), f = Ee(o);
|
|
10324
10324
|
return l.useEffect(() => (s.open === !1 && f(!1), () => f(!1)), [s.open, f]), /* @__PURE__ */ d(hn, { ...i, children: /* @__PURE__ */ d(
|
|
10325
10325
|
qc,
|
|
10326
10326
|
{
|
|
@@ -10344,9 +10344,9 @@ var ls = "MenuSub", [Aw, du] = Mt(ls), fu = (e) => {
|
|
|
10344
10344
|
) });
|
|
10345
10345
|
};
|
|
10346
10346
|
fu.displayName = ls;
|
|
10347
|
-
var
|
|
10347
|
+
var or = "MenuSubTrigger", pu = l.forwardRef(
|
|
10348
10348
|
(e, t) => {
|
|
10349
|
-
const r = Ct(
|
|
10349
|
+
const r = Ct(or, e.__scopeMenu), n = Er(or, e.__scopeMenu), o = du(or, e.__scopeMenu), s = os(or, e.__scopeMenu), i = l.useRef(null), { pointerGraceTimerRef: a, onPointerGraceIntentChange: c } = s, u = { __scopeMenu: e.__scopeMenu }, p = l.useCallback(() => {
|
|
10350
10350
|
i.current && window.clearTimeout(i.current), i.current = null;
|
|
10351
10351
|
}, []);
|
|
10352
10352
|
return l.useEffect(() => p, [p]), l.useEffect(() => {
|
|
@@ -10370,7 +10370,7 @@ var nr = "MenuSubTrigger", pu = l.forwardRef(
|
|
|
10370
10370
|
},
|
|
10371
10371
|
onPointerMove: G(
|
|
10372
10372
|
e.onPointerMove,
|
|
10373
|
-
|
|
10373
|
+
pr((f) => {
|
|
10374
10374
|
s.onItemEnter(f), !f.defaultPrevented && !e.disabled && !r.open && !i.current && (s.onPointerGraceIntentChange(null), i.current = window.setTimeout(() => {
|
|
10375
10375
|
r.onOpenChange(!0), p();
|
|
10376
10376
|
}, 100));
|
|
@@ -10378,7 +10378,7 @@ var nr = "MenuSubTrigger", pu = l.forwardRef(
|
|
|
10378
10378
|
),
|
|
10379
10379
|
onPointerLeave: G(
|
|
10380
10380
|
e.onPointerLeave,
|
|
10381
|
-
|
|
10381
|
+
pr((f) => {
|
|
10382
10382
|
var g, v;
|
|
10383
10383
|
p();
|
|
10384
10384
|
const m = (g = r.content) == null ? void 0 : g.getBoundingClientRect();
|
|
@@ -10414,11 +10414,11 @@ var nr = "MenuSubTrigger", pu = l.forwardRef(
|
|
|
10414
10414
|
) });
|
|
10415
10415
|
}
|
|
10416
10416
|
);
|
|
10417
|
-
pu.displayName =
|
|
10417
|
+
pu.displayName = or;
|
|
10418
10418
|
var mu = "MenuSubContent", hu = l.forwardRef(
|
|
10419
10419
|
(e, t) => {
|
|
10420
|
-
const r = Zc(Be, e.__scopeMenu), { forceMount: n = r.forceMount, ...o } = e, s = Ct(Be, e.__scopeMenu), i =
|
|
10421
|
-
return /* @__PURE__ */ d(
|
|
10420
|
+
const r = Zc(Be, e.__scopeMenu), { forceMount: n = r.forceMount, ...o } = e, s = Ct(Be, e.__scopeMenu), i = Er(Be, e.__scopeMenu), a = du(mu, e.__scopeMenu), c = l.useRef(null), u = se(t, c);
|
|
10421
|
+
return /* @__PURE__ */ d(fr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ d(ke, { present: n || s.open, children: /* @__PURE__ */ d(fr.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ d(
|
|
10422
10422
|
ss,
|
|
10423
10423
|
{
|
|
10424
10424
|
id: a.contentId,
|
|
@@ -10491,7 +10491,7 @@ function Dw(e, t) {
|
|
|
10491
10491
|
const r = { x: e.clientX, y: e.clientY };
|
|
10492
10492
|
return kw(r, t);
|
|
10493
10493
|
}
|
|
10494
|
-
function
|
|
10494
|
+
function pr(e) {
|
|
10495
10495
|
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
10496
10496
|
}
|
|
10497
10497
|
var Ow = Xc, $w = rs, Lw = Qc, Fw = Jc, Vw = is, Ww = eu, Bw = An, Hw = ru, Uw = ou, jw = iu, zw = lu, Gw = cu, Kw = uu, Yw = fu, qw = pu, Xw = hu, Tn = "DropdownMenu", [Zw] = Ub(
|
|
@@ -10745,7 +10745,7 @@ const Sx = l.forwardRef(({ className: e, children: t, checked: r, ...n }, o) =>
|
|
|
10745
10745
|
checked: r,
|
|
10746
10746
|
...n,
|
|
10747
10747
|
children: [
|
|
10748
|
-
/* @__PURE__ */ d("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ d(Wu, { children: /* @__PURE__ */ d(
|
|
10748
|
+
/* @__PURE__ */ d("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ d(Wu, { children: /* @__PURE__ */ d(lr, { className: "h-4 w-4" }) }) }),
|
|
10749
10749
|
t
|
|
10750
10750
|
]
|
|
10751
10751
|
}
|
|
@@ -10862,7 +10862,7 @@ var Mx = [
|
|
|
10862
10862
|
"span",
|
|
10863
10863
|
"svg",
|
|
10864
10864
|
"ul"
|
|
10865
|
-
],
|
|
10865
|
+
], Nr = Mx.reduce((e, t) => {
|
|
10866
10866
|
const r = /* @__PURE__ */ Nx(`Primitive.${t}`), n = l.forwardRef((o, s) => {
|
|
10867
10867
|
const { asChild: i, ...a } = o, c = i ? r : t;
|
|
10868
10868
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ d(c, { ...a, ref: s });
|
|
@@ -10930,7 +10930,7 @@ var us = "ScrollArea", [Yu] = Ix(us), [Ox, He] = Yu(us), qu = l.forwardRef(
|
|
|
10930
10930
|
dir: o,
|
|
10931
10931
|
scrollHideDelay: s = 600,
|
|
10932
10932
|
...i
|
|
10933
|
-
} = e, [a, c] = l.useState(null), [u, p] = l.useState(null), [f, m] = l.useState(null), [g, v] = l.useState(null), [h, y] = l.useState(null), [b, w] = l.useState(0), [x, S] = l.useState(0), [E, A] = l.useState(!1), [_, O] = l.useState(!1), D = se(t, (T) => c(T)), L =
|
|
10933
|
+
} = e, [a, c] = l.useState(null), [u, p] = l.useState(null), [f, m] = l.useState(null), [g, v] = l.useState(null), [h, y] = l.useState(null), [b, w] = l.useState(0), [x, S] = l.useState(0), [E, A] = l.useState(!1), [_, O] = l.useState(!1), D = se(t, (T) => c(T)), L = gr(o);
|
|
10934
10934
|
return /* @__PURE__ */ d(
|
|
10935
10935
|
Ox,
|
|
10936
10936
|
{
|
|
@@ -10954,7 +10954,7 @@ var us = "ScrollArea", [Yu] = Ix(us), [Ox, He] = Yu(us), qu = l.forwardRef(
|
|
|
10954
10954
|
onCornerWidthChange: w,
|
|
10955
10955
|
onCornerHeightChange: S,
|
|
10956
10956
|
children: /* @__PURE__ */ d(
|
|
10957
|
-
|
|
10957
|
+
Nr.div,
|
|
10958
10958
|
{
|
|
10959
10959
|
dir: L,
|
|
10960
10960
|
...i,
|
|
@@ -10987,7 +10987,7 @@ var Xu = "ScrollAreaViewport", Zu = l.forwardRef(
|
|
|
10987
10987
|
}
|
|
10988
10988
|
),
|
|
10989
10989
|
/* @__PURE__ */ d(
|
|
10990
|
-
|
|
10990
|
+
Nr.div,
|
|
10991
10991
|
{
|
|
10992
10992
|
"data-radix-scroll-area-viewport": "",
|
|
10993
10993
|
...s,
|
|
@@ -11098,7 +11098,7 @@ var $x = l.forwardRef((e, t) => {
|
|
|
11098
11098
|
i(a ? u : p);
|
|
11099
11099
|
}
|
|
11100
11100
|
}, 10);
|
|
11101
|
-
return
|
|
11101
|
+
return Kt(r.viewport, c), Kt(r.content, c), /* @__PURE__ */ d(ke, { present: n || s, children: /* @__PURE__ */ d(
|
|
11102
11102
|
fs,
|
|
11103
11103
|
{
|
|
11104
11104
|
"data-state": s ? "visible" : "hidden",
|
|
@@ -11265,7 +11265,7 @@ var $x = l.forwardRef((e, t) => {
|
|
|
11265
11265
|
(v == null ? void 0 : v.contains(T)) && E(L, S);
|
|
11266
11266
|
};
|
|
11267
11267
|
return document.addEventListener("wheel", D, { passive: !1 }), () => document.removeEventListener("wheel", D, { passive: !1 });
|
|
11268
|
-
}, [x, v, S, E]), l.useEffect(A, [n, A]),
|
|
11268
|
+
}, [x, v, S, E]), l.useEffect(A, [n, A]), Kt(v, _), Kt(g.content, _), /* @__PURE__ */ d(
|
|
11269
11269
|
Wx,
|
|
11270
11270
|
{
|
|
11271
11271
|
scope: r,
|
|
@@ -11276,7 +11276,7 @@ var $x = l.forwardRef((e, t) => {
|
|
|
11276
11276
|
onThumbPositionChange: A,
|
|
11277
11277
|
onThumbPointerDown: Ee(a),
|
|
11278
11278
|
children: /* @__PURE__ */ d(
|
|
11279
|
-
|
|
11279
|
+
Nr.div,
|
|
11280
11280
|
{
|
|
11281
11281
|
...m,
|
|
11282
11282
|
ref: y,
|
|
@@ -11318,7 +11318,7 @@ var $x = l.forwardRef((e, t) => {
|
|
|
11318
11318
|
return a(), f.addEventListener("scroll", m), () => f.removeEventListener("scroll", m);
|
|
11319
11319
|
}
|
|
11320
11320
|
}, [s.viewport, p, a]), /* @__PURE__ */ d(
|
|
11321
|
-
|
|
11321
|
+
Nr.div,
|
|
11322
11322
|
{
|
|
11323
11323
|
"data-state": i.hasThumb ? "visible" : "hidden",
|
|
11324
11324
|
...o,
|
|
@@ -11347,16 +11347,16 @@ var ps = "ScrollAreaCorner", rd = l.forwardRef(
|
|
|
11347
11347
|
rd.displayName = ps;
|
|
11348
11348
|
var Hx = l.forwardRef((e, t) => {
|
|
11349
11349
|
const { __scopeScrollArea: r, ...n } = e, o = He(ps, r), [s, i] = l.useState(0), [a, c] = l.useState(0), u = !!(s && a);
|
|
11350
|
-
return
|
|
11350
|
+
return Kt(o.scrollbarX, () => {
|
|
11351
11351
|
var f;
|
|
11352
11352
|
const p = ((f = o.scrollbarX) == null ? void 0 : f.offsetHeight) || 0;
|
|
11353
11353
|
o.onCornerHeightChange(p), c(p);
|
|
11354
|
-
}),
|
|
11354
|
+
}), Kt(o.scrollbarY, () => {
|
|
11355
11355
|
var f;
|
|
11356
11356
|
const p = ((f = o.scrollbarY) == null ? void 0 : f.offsetWidth) || 0;
|
|
11357
11357
|
o.onCornerWidthChange(p), i(p);
|
|
11358
11358
|
}), u ? /* @__PURE__ */ d(
|
|
11359
|
-
|
|
11359
|
+
Nr.div,
|
|
11360
11360
|
{
|
|
11361
11361
|
...n,
|
|
11362
11362
|
ref: t,
|
|
@@ -11415,9 +11415,9 @@ function In(e, t) {
|
|
|
11415
11415
|
window.clearTimeout(n.current), n.current = window.setTimeout(r, t);
|
|
11416
11416
|
}, [r, t]);
|
|
11417
11417
|
}
|
|
11418
|
-
function
|
|
11418
|
+
function Kt(e, t) {
|
|
11419
11419
|
const r = Ee(t);
|
|
11420
|
-
|
|
11420
|
+
Se(() => {
|
|
11421
11421
|
let n = 0;
|
|
11422
11422
|
if (e) {
|
|
11423
11423
|
const o = new ResizeObserver(() => {
|
|
@@ -11551,7 +11551,7 @@ const Xx = l.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d(
|
|
|
11551
11551
|
}
|
|
11552
11552
|
));
|
|
11553
11553
|
Xx.displayName = "TableFooter";
|
|
11554
|
-
const
|
|
11554
|
+
const sr = l.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d(
|
|
11555
11555
|
"tr",
|
|
11556
11556
|
{
|
|
11557
11557
|
ref: r,
|
|
@@ -11562,7 +11562,7 @@ const or = l.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d(
|
|
|
11562
11562
|
...t
|
|
11563
11563
|
}
|
|
11564
11564
|
));
|
|
11565
|
-
|
|
11565
|
+
sr.displayName = "TableRow";
|
|
11566
11566
|
const Wr = l.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d(
|
|
11567
11567
|
"th",
|
|
11568
11568
|
{
|
|
@@ -11575,7 +11575,7 @@ const Wr = l.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d(
|
|
|
11575
11575
|
}
|
|
11576
11576
|
));
|
|
11577
11577
|
Wr.displayName = "TableHead";
|
|
11578
|
-
const
|
|
11578
|
+
const Vt = l.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d(
|
|
11579
11579
|
"td",
|
|
11580
11580
|
{
|
|
11581
11581
|
ref: r,
|
|
@@ -11583,7 +11583,7 @@ const Ft = l.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d(
|
|
|
11583
11583
|
...t
|
|
11584
11584
|
}
|
|
11585
11585
|
));
|
|
11586
|
-
|
|
11586
|
+
Vt.displayName = "TableCell";
|
|
11587
11587
|
const Zx = l.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ d(
|
|
11588
11588
|
"caption",
|
|
11589
11589
|
{
|
|
@@ -11723,7 +11723,7 @@ const md = l.forwardRef(({
|
|
|
11723
11723
|
autoFocus: !0
|
|
11724
11724
|
}
|
|
11725
11725
|
),
|
|
11726
|
-
i && /* @__PURE__ */ d(
|
|
11726
|
+
i && /* @__PURE__ */ d(jt, { className: "h-4 w-4 animate-spin" })
|
|
11727
11727
|
] }),
|
|
11728
11728
|
/* @__PURE__ */ d("div", { className: "max-h-60 overflow-auto p-1", children: i && R.length === 0 ? /* @__PURE__ */ d("div", { className: "py-6 text-center text-sm text-muted-foreground", children: b }) : R.length === 0 ? /* @__PURE__ */ d("div", { className: "py-6 text-center text-sm text-muted-foreground", children: y }) : R.map((W, ne) => /* @__PURE__ */ M(
|
|
11729
11729
|
"div",
|
|
@@ -11741,9 +11741,9 @@ const md = l.forwardRef(({
|
|
|
11741
11741
|
c && /* @__PURE__ */ d("div", { className: k(
|
|
11742
11742
|
"mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",
|
|
11743
11743
|
F(W) && "bg-primary text-primary-foreground"
|
|
11744
|
-
), children: F(W) && /* @__PURE__ */ d(
|
|
11744
|
+
), children: F(W) && /* @__PURE__ */ d(lr, { className: "h-3 w-3" }) }),
|
|
11745
11745
|
f ? f(W) : /* @__PURE__ */ d("span", { className: "flex-1", children: g(W) }),
|
|
11746
|
-
!c && F(W) && /* @__PURE__ */ d(
|
|
11746
|
+
!c && F(W) && /* @__PURE__ */ d(lr, { className: "ml-auto h-4 w-4" })
|
|
11747
11747
|
]
|
|
11748
11748
|
},
|
|
11749
11749
|
v(W)
|
|
@@ -11754,7 +11754,7 @@ const md = l.forwardRef(({
|
|
|
11754
11754
|
);
|
|
11755
11755
|
});
|
|
11756
11756
|
md.displayName = "SearchSelect";
|
|
11757
|
-
const
|
|
11757
|
+
const Rr = l.forwardRef(({
|
|
11758
11758
|
className: e,
|
|
11759
11759
|
label: t,
|
|
11760
11760
|
description: r,
|
|
@@ -11774,7 +11774,7 @@ const Nr = l.forwardRef(({
|
|
|
11774
11774
|
n && /* @__PURE__ */ d("p", { className: "text-sm text-destructive", children: n })
|
|
11775
11775
|
] });
|
|
11776
11776
|
});
|
|
11777
|
-
|
|
11777
|
+
Rr.displayName = "FormField";
|
|
11778
11778
|
const bo = l.forwardRef(({
|
|
11779
11779
|
label: e,
|
|
11780
11780
|
description: t,
|
|
@@ -11784,7 +11784,7 @@ const bo = l.forwardRef(({
|
|
|
11784
11784
|
inputClassName: s,
|
|
11785
11785
|
...i
|
|
11786
11786
|
}, a) => /* @__PURE__ */ d(
|
|
11787
|
-
|
|
11787
|
+
Rr,
|
|
11788
11788
|
{
|
|
11789
11789
|
label: e,
|
|
11790
11790
|
description: t,
|
|
@@ -11811,7 +11811,7 @@ const hd = l.forwardRef(({
|
|
|
11811
11811
|
textareaClassName: s,
|
|
11812
11812
|
...i
|
|
11813
11813
|
}, a) => /* @__PURE__ */ d(
|
|
11814
|
-
|
|
11814
|
+
Rr,
|
|
11815
11815
|
{
|
|
11816
11816
|
label: e,
|
|
11817
11817
|
description: t,
|
|
@@ -11843,7 +11843,7 @@ const gd = l.forwardRef(({
|
|
|
11843
11843
|
getOptionValue: p = (g) => (g == null ? void 0 : g.value) || (g == null ? void 0 : g.id) || g,
|
|
11844
11844
|
...f
|
|
11845
11845
|
}, m) => /* @__PURE__ */ d(
|
|
11846
|
-
|
|
11846
|
+
Rr,
|
|
11847
11847
|
{
|
|
11848
11848
|
label: e,
|
|
11849
11849
|
description: t,
|
|
@@ -11872,7 +11872,7 @@ const vd = l.forwardRef(({
|
|
|
11872
11872
|
className: o,
|
|
11873
11873
|
...s
|
|
11874
11874
|
}, i) => /* @__PURE__ */ d(
|
|
11875
|
-
|
|
11875
|
+
Rr,
|
|
11876
11876
|
{
|
|
11877
11877
|
label: e,
|
|
11878
11878
|
description: t,
|
|
@@ -12111,7 +12111,7 @@ const kn = ({
|
|
|
12111
12111
|
switch (e) {
|
|
12112
12112
|
case "spinner":
|
|
12113
12113
|
return /* @__PURE__ */ d(
|
|
12114
|
-
|
|
12114
|
+
jt,
|
|
12115
12115
|
{
|
|
12116
12116
|
className: k(
|
|
12117
12117
|
"animate-spin text-primary",
|
|
@@ -12152,7 +12152,7 @@ const kn = ({
|
|
|
12152
12152
|
] });
|
|
12153
12153
|
default:
|
|
12154
12154
|
return /* @__PURE__ */ d(
|
|
12155
|
-
|
|
12155
|
+
jt,
|
|
12156
12156
|
{
|
|
12157
12157
|
className: k(
|
|
12158
12158
|
"animate-spin text-primary",
|
|
@@ -12186,13 +12186,13 @@ const eS = l.forwardRef(({
|
|
|
12186
12186
|
className: o,
|
|
12187
12187
|
...s,
|
|
12188
12188
|
children: e ? /* @__PURE__ */ M(Te, { children: [
|
|
12189
|
-
/* @__PURE__ */ d(
|
|
12189
|
+
/* @__PURE__ */ d(jt, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
12190
12190
|
t || "Loading..."
|
|
12191
12191
|
] }) : r
|
|
12192
12192
|
}
|
|
12193
12193
|
));
|
|
12194
12194
|
eS.displayName = "LoadingButton";
|
|
12195
|
-
const
|
|
12195
|
+
const _r = ({
|
|
12196
12196
|
icon: e = Os,
|
|
12197
12197
|
title: t = "No data found",
|
|
12198
12198
|
description: r = "There are no items to display.",
|
|
@@ -12242,13 +12242,13 @@ const Rr = ({
|
|
|
12242
12242
|
}
|
|
12243
12243
|
);
|
|
12244
12244
|
};
|
|
12245
|
-
|
|
12245
|
+
_r.displayName = "EmptyState";
|
|
12246
12246
|
const xd = ({
|
|
12247
12247
|
searchTerm: e,
|
|
12248
12248
|
onClear: t,
|
|
12249
12249
|
className: r
|
|
12250
12250
|
}) => /* @__PURE__ */ d(
|
|
12251
|
-
|
|
12251
|
+
_r,
|
|
12252
12252
|
{
|
|
12253
12253
|
variant: "search",
|
|
12254
12254
|
title: `No results for "${e}"`,
|
|
@@ -12263,7 +12263,7 @@ const tS = ({
|
|
|
12263
12263
|
onCreate: t,
|
|
12264
12264
|
className: r
|
|
12265
12265
|
}) => /* @__PURE__ */ d(
|
|
12266
|
-
|
|
12266
|
+
_r,
|
|
12267
12267
|
{
|
|
12268
12268
|
variant: "empty",
|
|
12269
12269
|
icon: Vi,
|
|
@@ -12280,7 +12280,7 @@ const rS = ({
|
|
|
12280
12280
|
onRetry: t,
|
|
12281
12281
|
className: r
|
|
12282
12282
|
}) => /* @__PURE__ */ d(
|
|
12283
|
-
|
|
12283
|
+
_r,
|
|
12284
12284
|
{
|
|
12285
12285
|
variant: "error",
|
|
12286
12286
|
title: "Error loading data",
|
|
@@ -12567,7 +12567,7 @@ const Cd = ({
|
|
|
12567
12567
|
] })
|
|
12568
12568
|
] }),
|
|
12569
12569
|
/* @__PURE__ */ d("div", { className: "rounded-md border", children: /* @__PURE__ */ M(dd, { children: [
|
|
12570
|
-
/* @__PURE__ */ d(fd, { children: /* @__PURE__ */ M(
|
|
12570
|
+
/* @__PURE__ */ d(fd, { children: /* @__PURE__ */ M(sr, { children: [
|
|
12571
12571
|
x && /* @__PURE__ */ d(Wr, { className: "w-12", children: /* @__PURE__ */ d(
|
|
12572
12572
|
Hr,
|
|
12573
12573
|
{
|
|
@@ -12594,15 +12594,15 @@ const Cd = ({
|
|
|
12594
12594
|
)),
|
|
12595
12595
|
A && A.length > 0 && /* @__PURE__ */ d(Wr, { className: "w-12", children: "Actions" })
|
|
12596
12596
|
] }) }),
|
|
12597
|
-
/* @__PURE__ */ d(pd, { children: r ? /* @__PURE__ */ d(
|
|
12598
|
-
|
|
12597
|
+
/* @__PURE__ */ d(pd, { children: r ? /* @__PURE__ */ d(sr, { children: /* @__PURE__ */ d(
|
|
12598
|
+
Vt,
|
|
12599
12599
|
{
|
|
12600
12600
|
colSpan: t.length + (x ? 1 : 0) + (A != null && A.length ? 1 : 0),
|
|
12601
12601
|
className: "h-48",
|
|
12602
12602
|
children: /* @__PURE__ */ d(kn, { text: "Loading data..." })
|
|
12603
12603
|
}
|
|
12604
|
-
) }) : e.length === 0 ? /* @__PURE__ */ d(
|
|
12605
|
-
|
|
12604
|
+
) }) : e.length === 0 ? /* @__PURE__ */ d(sr, { children: /* @__PURE__ */ d(
|
|
12605
|
+
Vt,
|
|
12606
12606
|
{
|
|
12607
12607
|
colSpan: t.length + (x ? 1 : 0) + (A != null && A.length ? 1 : 0),
|
|
12608
12608
|
className: "h-48",
|
|
@@ -12615,7 +12615,7 @@ const Cd = ({
|
|
|
12615
12615
|
}
|
|
12616
12616
|
}
|
|
12617
12617
|
) : /* @__PURE__ */ d(
|
|
12618
|
-
|
|
12618
|
+
_r,
|
|
12619
12619
|
{
|
|
12620
12620
|
title: R,
|
|
12621
12621
|
description: H,
|
|
@@ -12627,7 +12627,7 @@ const Cd = ({
|
|
|
12627
12627
|
) }) : e.map((I, Q) => {
|
|
12628
12628
|
const Y = j(I), J = S.includes(Y);
|
|
12629
12629
|
return /* @__PURE__ */ M(
|
|
12630
|
-
|
|
12630
|
+
sr,
|
|
12631
12631
|
{
|
|
12632
12632
|
"data-state": J ? "selected" : void 0,
|
|
12633
12633
|
className: k(
|
|
@@ -12637,7 +12637,7 @@ const Cd = ({
|
|
|
12637
12637
|
),
|
|
12638
12638
|
onClick: () => _ == null ? void 0 : _(I),
|
|
12639
12639
|
children: [
|
|
12640
|
-
x && /* @__PURE__ */ d(
|
|
12640
|
+
x && /* @__PURE__ */ d(Vt, { onClick: (ee) => ee.stopPropagation(), children: /* @__PURE__ */ d(
|
|
12641
12641
|
Hr,
|
|
12642
12642
|
{
|
|
12643
12643
|
checked: J,
|
|
@@ -12645,7 +12645,7 @@ const Cd = ({
|
|
|
12645
12645
|
}
|
|
12646
12646
|
) }),
|
|
12647
12647
|
t.map((ee, re) => /* @__PURE__ */ d(
|
|
12648
|
-
|
|
12648
|
+
Vt,
|
|
12649
12649
|
{
|
|
12650
12650
|
className: k(
|
|
12651
12651
|
L && "py-2",
|
|
@@ -12655,7 +12655,7 @@ const Cd = ({
|
|
|
12655
12655
|
},
|
|
12656
12656
|
ee.accessor || re
|
|
12657
12657
|
)),
|
|
12658
|
-
A && A.length > 0 && /* @__PURE__ */ d(
|
|
12658
|
+
A && A.length > 0 && /* @__PURE__ */ d(Vt, { onClick: (ee) => ee.stopPropagation(), children: ge(I) })
|
|
12659
12659
|
]
|
|
12660
12660
|
},
|
|
12661
12661
|
Y
|
|
@@ -12746,46 +12746,46 @@ const oS = ({
|
|
|
12746
12746
|
// Searchable
|
|
12747
12747
|
searchable: Pe = !0
|
|
12748
12748
|
}) => {
|
|
12749
|
-
const Ne = Ud(), [at, Ue] = l.useState(!1), [je, Ze] = l.useState(null), [C, N] = l.useState(!1), [P, K] = l.useState(""), B = l.useRef(!1), V = l.useRef(P), Z = l.useRef(null), ae = l.useRef(null), ue = (e == null ? void 0 : e.items) ?? t ?? [], Ae = (e == null ? void 0 : e.loading) ?? r,
|
|
12749
|
+
const Ne = Ud(), [at, Ue] = l.useState(!1), [je, Ze] = l.useState(null), [C, N] = l.useState(!1), [P, K] = l.useState(""), B = l.useRef(!1), V = l.useRef(P), Z = l.useRef(null), ae = l.useRef(null), ue = (e == null ? void 0 : e.items) ?? t ?? [], Ae = (e == null ? void 0 : e.loading) ?? r, kt = (e == null ? void 0 : e.error) ?? n, Oe = (e == null ? void 0 : e.pagination) ?? {
|
|
12750
12750
|
page: s,
|
|
12751
12751
|
pageSize: i,
|
|
12752
12752
|
total: a,
|
|
12753
12753
|
totalPages: c
|
|
12754
|
-
}, lt = Oe.page ?? s, ct = Oe.pageSize ?? i,
|
|
12755
|
-
l.useEffect(() =>
|
|
12756
|
-
B.current = !
|
|
12757
|
-
}
|
|
12758
|
-
if (!
|
|
12754
|
+
}, lt = Oe.page ?? s, ct = Oe.pageSize ?? i, Jt = Oe.total ?? a, On = Oe.totalPages ?? c, Ce = e == null ? void 0 : e.fetchList, Dt = e == null ? void 0 : e.delete, Qe = e == null ? void 0 : e.setPage, $n = e == null ? void 0 : e.setPageSize, Et = e == null ? void 0 : e.setFilters;
|
|
12755
|
+
l.useEffect(() => {
|
|
12756
|
+
Ce && !B.current && (B.current = !0, Z.current = lt, ae.current = ct, Ce());
|
|
12757
|
+
}, [Ce]), l.useEffect(() => {
|
|
12758
|
+
if (!Ce || !B.current) return;
|
|
12759
12759
|
const ie = Z.current !== lt, Fn = ae.current !== ct;
|
|
12760
|
-
(ie || Fn) && (Z.current = lt, ae.current = ct,
|
|
12761
|
-
}, [
|
|
12762
|
-
if (!
|
|
12760
|
+
(ie || Fn) && (Z.current = lt, ae.current = ct, Ce());
|
|
12761
|
+
}, [lt, ct, Ce]), l.useEffect(() => {
|
|
12762
|
+
if (!Ce || !B.current || V.current === P) return;
|
|
12763
12763
|
const ie = setTimeout(() => {
|
|
12764
|
-
Pe && (V.current = P,
|
|
12764
|
+
Pe && (V.current = P, Et == null || Et({ search: P }), lt !== 1 ? Qe == null || Qe(1) : Ce());
|
|
12765
12765
|
}, 300);
|
|
12766
12766
|
return () => clearTimeout(ie);
|
|
12767
|
-
}, [
|
|
12767
|
+
}, [P, Pe, lt, Et, Qe, Ce]);
|
|
12768
12768
|
const kd = l.useCallback((ie) => {
|
|
12769
12769
|
Qe ? Qe(ie) : u == null || u(ie);
|
|
12770
12770
|
}, [Qe, u]), Dd = l.useCallback((ie) => {
|
|
12771
12771
|
$n ? $n(ie) : p == null || p(ie);
|
|
12772
12772
|
}, [$n, p]), Od = l.useCallback((ie) => {
|
|
12773
|
-
|
|
12774
|
-
}, [
|
|
12773
|
+
Et ? K(ie) : h == null || h(ie);
|
|
12774
|
+
}, [Et, h]), xs = l.useCallback(() => {
|
|
12775
12775
|
L ? Ne(L) : S == null || S();
|
|
12776
12776
|
}, [L, Ne, S]), Ss = l.useCallback((ie) => {
|
|
12777
12777
|
T ? Ne(`${T}/${pe(ie)}`) : E == null || E(ie);
|
|
12778
12778
|
}, [T, Ne, pe, E]), Cs = l.useCallback((ie) => {
|
|
12779
12779
|
R ? Ne(`${R}/${pe(ie)}/edit`) : A == null || A(ie);
|
|
12780
12780
|
}, [R, Ne, pe, A]), $d = l.useCallback(() => {
|
|
12781
|
-
|
|
12782
|
-
}, [
|
|
12781
|
+
Ce ? Ce() : O == null || O();
|
|
12782
|
+
}, [Ce, O]), Es = l.useCallback((ie) => {
|
|
12783
12783
|
Ze(ie), Ue(!0);
|
|
12784
12784
|
}, []), Ld = async () => {
|
|
12785
12785
|
if (je) {
|
|
12786
12786
|
N(!0);
|
|
12787
12787
|
try {
|
|
12788
|
-
|
|
12788
|
+
Dt ? (await Dt(pe(je)), Ce == null || Ce()) : _ && await _(je), Ue(!1), Ze(null);
|
|
12789
12789
|
} catch (ie) {
|
|
12790
12790
|
console.error("Delete error:", ie);
|
|
12791
12791
|
} finally {
|
|
@@ -12802,13 +12802,13 @@ const oS = ({
|
|
|
12802
12802
|
label: W,
|
|
12803
12803
|
icon: Wi,
|
|
12804
12804
|
onClick: Cs
|
|
12805
|
-
}), (
|
|
12805
|
+
}), (Dt || _) && ie.push({
|
|
12806
12806
|
label: ne,
|
|
12807
12807
|
icon: Hi,
|
|
12808
12808
|
variant: "destructive",
|
|
12809
12809
|
onClick: Es
|
|
12810
12810
|
}), [...ie, ...H];
|
|
12811
|
-
}, [T, R, E, A,
|
|
12811
|
+
}, [T, R, E, A, Dt, _, te, W, ne, Ss, Cs, Es, H]), Ln = L || S, Vd = Ce || O, Ns = l.useMemo(() => je ? ee ? ee(je) : je.name || je.title || ce : ce, [je, ee, ce]), Rs = () => ge ? /* @__PURE__ */ M("div", { className: "flex items-center gap-2", children: [
|
|
12812
12812
|
_e,
|
|
12813
12813
|
b && w.length > 0 && U.length > 0 && /* @__PURE__ */ d(Te, { children: U.map((ie, Fn) => /* @__PURE__ */ M(
|
|
12814
12814
|
fe,
|
|
@@ -12856,10 +12856,10 @@ const oS = ({
|
|
|
12856
12856
|
data: ue,
|
|
12857
12857
|
columns: o,
|
|
12858
12858
|
loading: Ae,
|
|
12859
|
-
error:
|
|
12859
|
+
error: kt,
|
|
12860
12860
|
currentPage: lt,
|
|
12861
12861
|
pageSize: ct,
|
|
12862
|
-
totalItems:
|
|
12862
|
+
totalItems: Jt,
|
|
12863
12863
|
totalPages: On,
|
|
12864
12864
|
onPageChange: kd,
|
|
12865
12865
|
onPageSizeChange: Dd,
|
|
@@ -12867,7 +12867,7 @@ const oS = ({
|
|
|
12867
12867
|
sortDirection: m,
|
|
12868
12868
|
onSort: g,
|
|
12869
12869
|
searchable: Pe,
|
|
12870
|
-
searchValue:
|
|
12870
|
+
searchValue: Et ? P : v,
|
|
12871
12871
|
onSearchChange: Od,
|
|
12872
12872
|
searchPlaceholder: y,
|
|
12873
12873
|
selectable: b,
|
|
@@ -12895,7 +12895,7 @@ const oS = ({
|
|
|
12895
12895
|
}
|
|
12896
12896
|
)
|
|
12897
12897
|
] });
|
|
12898
|
-
return he && (X || j) ? /* @__PURE__ */ M(
|
|
12898
|
+
return he && (X || j) ? /* @__PURE__ */ M(Nt, { className: Q, children: [
|
|
12899
12899
|
/* @__PURE__ */ M(nn, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
12900
12900
|
/* @__PURE__ */ M("div", { children: [
|
|
12901
12901
|
X && /* @__PURE__ */ d(on, { children: X }),
|
|
@@ -12903,7 +12903,7 @@ const oS = ({
|
|
|
12903
12903
|
] }),
|
|
12904
12904
|
Rs()
|
|
12905
12905
|
] }),
|
|
12906
|
-
/* @__PURE__ */ d(
|
|
12906
|
+
/* @__PURE__ */ d(Rt, { children: _s })
|
|
12907
12907
|
] }) : /* @__PURE__ */ M("div", { className: Q, children: [
|
|
12908
12908
|
ge && /* @__PURE__ */ M("div", { className: "flex items-center justify-between mb-4", children: [
|
|
12909
12909
|
/* @__PURE__ */ d("div", {}),
|
|
@@ -12913,18 +12913,18 @@ const oS = ({
|
|
|
12913
12913
|
] });
|
|
12914
12914
|
};
|
|
12915
12915
|
oS.displayName = "CrudList";
|
|
12916
|
-
var
|
|
12916
|
+
var Pr = (e) => e.type === "checkbox", _t = (e) => e instanceof Date, De = (e) => e == null;
|
|
12917
12917
|
const Ed = (e) => typeof e == "object";
|
|
12918
|
-
var
|
|
12918
|
+
var xe = (e) => !De(e) && !Array.isArray(e) && Ed(e) && !_t(e), sS = (e) => xe(e) && e.target ? Pr(e.target) ? e.target.checked : e.target.value : e, iS = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, aS = (e, t) => e.has(iS(t)), lS = (e) => {
|
|
12919
12919
|
const t = e.constructor && e.constructor.prototype;
|
|
12920
|
-
return
|
|
12920
|
+
return xe(t) && t.hasOwnProperty("isPrototypeOf");
|
|
12921
12921
|
}, gs = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
|
|
12922
12922
|
function Re(e) {
|
|
12923
12923
|
let t;
|
|
12924
12924
|
const r = Array.isArray(e), n = typeof FileList < "u" ? e instanceof FileList : !1;
|
|
12925
12925
|
if (e instanceof Date)
|
|
12926
12926
|
t = new Date(e);
|
|
12927
|
-
else if (!(gs && (e instanceof Blob || n)) && (r ||
|
|
12927
|
+
else if (!(gs && (e instanceof Blob || n)) && (r || xe(e)))
|
|
12928
12928
|
if (t = r ? [] : Object.create(Object.getPrototypeOf(e)), !r && !lS(e))
|
|
12929
12929
|
t = e;
|
|
12930
12930
|
else
|
|
@@ -12935,7 +12935,7 @@ function Re(e) {
|
|
|
12935
12935
|
return t;
|
|
12936
12936
|
}
|
|
12937
12937
|
var Dn = (e) => /^\w*$/.test(e), ye = (e) => e === void 0, vs = (e) => Array.isArray(e) ? e.filter(Boolean) : [], ys = (e) => vs(e.replace(/["|']|\]/g, "").split(/\.|\[/)), q = (e, t, r) => {
|
|
12938
|
-
if (!t || !
|
|
12938
|
+
if (!t || !xe(e))
|
|
12939
12939
|
return r;
|
|
12940
12940
|
const n = (Dn(t) ? [t] : ys(t)).reduce((o, s) => De(o) ? o : o[s], e);
|
|
12941
12941
|
return ye(n) || n === e ? ye(e[t]) ? r : e[t] : n;
|
|
@@ -12947,7 +12947,7 @@ var Dn = (e) => /^\w*$/.test(e), ye = (e) => e === void 0, vs = (e) => Array.isA
|
|
|
12947
12947
|
let c = r;
|
|
12948
12948
|
if (n !== i) {
|
|
12949
12949
|
const u = e[a];
|
|
12950
|
-
c =
|
|
12950
|
+
c = xe(u) || Array.isArray(u) ? u : isNaN(+o[n + 1]) ? {} : [];
|
|
12951
12951
|
}
|
|
12952
12952
|
if (a === "__proto__" || a === "constructor" || a === "prototype")
|
|
12953
12953
|
return;
|
|
@@ -12991,7 +12991,7 @@ var Le = (e) => typeof e == "string", fS = (e, t, r, n, o) => Le(e) ? (n && t.wa
|
|
|
12991
12991
|
function vt(e, t, r = /* @__PURE__ */ new WeakSet()) {
|
|
12992
12992
|
if (wo(e) || wo(t))
|
|
12993
12993
|
return Object.is(e, t);
|
|
12994
|
-
if (
|
|
12994
|
+
if (_t(e) && _t(t))
|
|
12995
12995
|
return e.getTime() === t.getTime();
|
|
12996
12996
|
const n = Object.keys(e), o = Object.keys(t);
|
|
12997
12997
|
if (n.length !== o.length)
|
|
@@ -13005,7 +13005,7 @@ function vt(e, t, r = /* @__PURE__ */ new WeakSet()) {
|
|
|
13005
13005
|
return !1;
|
|
13006
13006
|
if (s !== "ref") {
|
|
13007
13007
|
const a = t[s];
|
|
13008
|
-
if (
|
|
13008
|
+
if (_t(i) && _t(a) || xe(i) && xe(a) || Array.isArray(i) && Array.isArray(a) ? !vt(i, a, r) : !Object.is(i, a))
|
|
13009
13009
|
return !1;
|
|
13010
13010
|
}
|
|
13011
13011
|
}
|
|
@@ -13017,7 +13017,7 @@ var Nd = (e, t, r, n, o) => t ? {
|
|
|
13017
13017
|
...r[e] && r[e].types ? r[e].types : {},
|
|
13018
13018
|
[n]: o || !0
|
|
13019
13019
|
}
|
|
13020
|
-
} : {},
|
|
13020
|
+
} : {}, ir = (e) => Array.isArray(e) ? e : [e], mi = () => {
|
|
13021
13021
|
let e = [];
|
|
13022
13022
|
return {
|
|
13023
13023
|
get observers() {
|
|
@@ -13042,19 +13042,19 @@ function Rd(e, t) {
|
|
|
13042
13042
|
for (const n in e)
|
|
13043
13043
|
if (e.hasOwnProperty(n)) {
|
|
13044
13044
|
const o = e[n], s = t[n];
|
|
13045
|
-
if (o &&
|
|
13045
|
+
if (o && xe(o) && s) {
|
|
13046
13046
|
const i = Rd(o, s);
|
|
13047
|
-
|
|
13047
|
+
xe(i) && (r[n] = i);
|
|
13048
13048
|
} else e[n] && (r[n] = s);
|
|
13049
13049
|
}
|
|
13050
13050
|
return r;
|
|
13051
13051
|
}
|
|
13052
|
-
var Ie = (e) =>
|
|
13052
|
+
var Ie = (e) => xe(e) && !Object.keys(e).length, bs = (e) => e.type === "file", Ke = (e) => typeof e == "function", Jr = (e) => {
|
|
13053
13053
|
if (!gs)
|
|
13054
13054
|
return !1;
|
|
13055
13055
|
const t = e ? e.ownerDocument : 0;
|
|
13056
13056
|
return e instanceof (t && t.defaultView ? t.defaultView.HTMLElement : HTMLElement);
|
|
13057
|
-
}, _d = (e) => e.type === "select-multiple", ws = (e) => e.type === "radio", pS = (e) => ws(e) ||
|
|
13057
|
+
}, _d = (e) => e.type === "select-multiple", ws = (e) => e.type === "radio", pS = (e) => ws(e) || Pr(e), Jn = (e) => Jr(e) && e.isConnected;
|
|
13058
13058
|
function mS(e, t) {
|
|
13059
13059
|
const r = t.slice(0, -1).length;
|
|
13060
13060
|
let n = 0;
|
|
@@ -13068,9 +13068,9 @@ function hS(e) {
|
|
|
13068
13068
|
return !1;
|
|
13069
13069
|
return !0;
|
|
13070
13070
|
}
|
|
13071
|
-
function
|
|
13071
|
+
function we(e, t) {
|
|
13072
13072
|
const r = Array.isArray(t) ? t : Dn(t) ? [t] : ys(t), n = r.length === 1 ? e : mS(e, r), o = r.length - 1, s = r[o];
|
|
13073
|
-
return n && delete n[s], o !== 0 && (
|
|
13073
|
+
return n && delete n[s], o !== 0 && (xe(n) && Ie(n) || Array.isArray(n) && hS(n)) && we(e, r.slice(0, -1)), e;
|
|
13074
13074
|
}
|
|
13075
13075
|
var gS = (e) => {
|
|
13076
13076
|
for (const t in e)
|
|
@@ -13079,7 +13079,7 @@ var gS = (e) => {
|
|
|
13079
13079
|
return !1;
|
|
13080
13080
|
};
|
|
13081
13081
|
function Pd(e) {
|
|
13082
|
-
return Array.isArray(e) ||
|
|
13082
|
+
return Array.isArray(e) || xe(e) && !gS(e);
|
|
13083
13083
|
}
|
|
13084
13084
|
function xo(e, t = {}) {
|
|
13085
13085
|
for (const r in e) {
|
|
@@ -13088,12 +13088,12 @@ function xo(e, t = {}) {
|
|
|
13088
13088
|
}
|
|
13089
13089
|
return t;
|
|
13090
13090
|
}
|
|
13091
|
-
function
|
|
13091
|
+
function Wt(e, t, r) {
|
|
13092
13092
|
r || (r = xo(t));
|
|
13093
13093
|
for (const n in e) {
|
|
13094
13094
|
const o = e[n];
|
|
13095
13095
|
if (Pd(o))
|
|
13096
|
-
ye(t) || wo(r[n]) ? r[n] = xo(o, Array.isArray(o) ? [] : {}) :
|
|
13096
|
+
ye(t) || wo(r[n]) ? r[n] = xo(o, Array.isArray(o) ? [] : {}) : Wt(o, De(t) ? {} : t[n], r[n]);
|
|
13097
13097
|
else {
|
|
13098
13098
|
const s = t[n];
|
|
13099
13099
|
r[n] = !vt(o, s);
|
|
@@ -13128,7 +13128,7 @@ var Md = (e) => Array.isArray(e) ? e.reduce((t, r) => r && r.checked && !r.disab
|
|
|
13128
13128
|
} : t, vi) : vi;
|
|
13129
13129
|
function yi(e) {
|
|
13130
13130
|
const t = e.ref;
|
|
13131
|
-
return bs(t) ? t.files : ws(t) ? Md(e.refs).value : _d(t) ? [...t.selectedOptions].map(({ value: r }) => r) :
|
|
13131
|
+
return bs(t) ? t.files : ws(t) ? Md(e.refs).value : _d(t) ? [...t.selectedOptions].map(({ value: r }) => r) : Pr(t) ? Ad(e.refs).value : Td(ye(t.value) ? e.ref.value : t.value, e);
|
|
13132
13132
|
}
|
|
13133
13133
|
var vS = (e, t, r, n) => {
|
|
13134
13134
|
const o = {};
|
|
@@ -13142,7 +13142,7 @@ var vS = (e, t, r, n) => {
|
|
|
13142
13142
|
fields: o,
|
|
13143
13143
|
shouldUseNativeValidation: n
|
|
13144
13144
|
};
|
|
13145
|
-
}, en = (e) => e instanceof RegExp,
|
|
13145
|
+
}, en = (e) => e instanceof RegExp, rr = (e) => ye(e) ? e : en(e) ? e.source : xe(e) ? en(e.value) ? e.value.source : e.value : e, bi = (e) => ({
|
|
13146
13146
|
isOnSubmit: !e || e === Ge.onSubmit,
|
|
13147
13147
|
isOnBlur: e === Ge.onBlur,
|
|
13148
13148
|
isOnChange: e === Ge.onChange,
|
|
@@ -13150,8 +13150,8 @@ var vS = (e, t, r, n) => {
|
|
|
13150
13150
|
isOnTouch: e === Ge.onTouched
|
|
13151
13151
|
});
|
|
13152
13152
|
const wi = "AsyncFunction";
|
|
13153
|
-
var yS = (e) => !!e && !!e.validate && !!(Ke(e.validate) && e.validate.constructor.name === wi ||
|
|
13154
|
-
const
|
|
13153
|
+
var yS = (e) => !!e && !!e.validate && !!(Ke(e.validate) && e.validate.constructor.name === wi || xe(e.validate) && Object.values(e.validate).find((t) => t.constructor.name === wi)), bS = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), xi = (e, t, r) => !r && (t.watchAll || t.watch.has(e) || [...t.watch].some((n) => e.startsWith(n) && /^\.\w+/.test(e.slice(n.length))));
|
|
13154
|
+
const ar = (e, t, r, n) => {
|
|
13155
13155
|
for (const o of r || Object.keys(e)) {
|
|
13156
13156
|
const s = q(e, o);
|
|
13157
13157
|
if (s) {
|
|
@@ -13161,9 +13161,9 @@ const ir = (e, t, r, n) => {
|
|
|
13161
13161
|
return !0;
|
|
13162
13162
|
if (i.ref && t(i.ref, i.name) && !n)
|
|
13163
13163
|
return !0;
|
|
13164
|
-
if (
|
|
13164
|
+
if (ar(a, t))
|
|
13165
13165
|
break;
|
|
13166
|
-
} else if (
|
|
13166
|
+
} else if (xe(a) && ar(a, t))
|
|
13167
13167
|
break;
|
|
13168
13168
|
}
|
|
13169
13169
|
}
|
|
@@ -13200,8 +13200,8 @@ var wS = (e, t, r, n) => {
|
|
|
13200
13200
|
r(e);
|
|
13201
13201
|
const { name: o, ...s } = e;
|
|
13202
13202
|
return Ie(s) || Object.keys(s).length >= Object.keys(t).length || Object.keys(s).find((i) => t[i] === (!n || Ge.all));
|
|
13203
|
-
}, xS = (e, t, r) => !e || !t || e === t ||
|
|
13204
|
-
const n =
|
|
13203
|
+
}, xS = (e, t, r) => !e || !t || e === t || ir(e).some((n) => n && (r ? n === t : n.startsWith(t) || t.startsWith(n))), SS = (e, t, r, n, o) => o.isOnAll ? !1 : !r && o.isOnTouch ? !(t || e) : (r ? n.isOnBlur : o.isOnBlur) ? !e : (r ? n.isOnChange : o.isOnChange) ? e : !0, CS = (e, t) => !vs(q(e, t)).length && we(e, t), ES = (e, t, r) => {
|
|
13204
|
+
const n = ir(q(e, r));
|
|
13205
13205
|
return de(n, "root", t[r]), de(e, r, n), e;
|
|
13206
13206
|
};
|
|
13207
13207
|
function Ci(e, t, r = "validate") {
|
|
@@ -13212,7 +13212,7 @@ function Ci(e, t, r = "validate") {
|
|
|
13212
13212
|
ref: t
|
|
13213
13213
|
};
|
|
13214
13214
|
}
|
|
13215
|
-
var
|
|
13215
|
+
var Ft = (e) => xe(e) && !en(e) ? e : {
|
|
13216
13216
|
value: e,
|
|
13217
13217
|
message: ""
|
|
13218
13218
|
}, Ei = async (e, t, r, n, o, s) => {
|
|
@@ -13221,7 +13221,7 @@ var Lt = (e) => Se(e) && !en(e) ? e : {
|
|
|
13221
13221
|
return {};
|
|
13222
13222
|
const x = a ? a[0] : i, S = (R) => {
|
|
13223
13223
|
o && x.reportValidity && (x.setCustomValidity(Je(R) ? "" : R || ""), x.reportValidity());
|
|
13224
|
-
}, E = {}, A = ws(i), _ =
|
|
13224
|
+
}, E = {}, A = ws(i), _ = Pr(i), O = A || _, D = (y || bs(i)) && ye(i.value) && ye(w) || Jr(i) && i.value === "" || w === "" || Array.isArray(w) && !w.length, L = Nd.bind(null, h, n, E), T = (R, H, U, X = dt.maxLength, j = dt.minLength) => {
|
|
13225
13225
|
const z = R ? H : U;
|
|
13226
13226
|
E[h] = {
|
|
13227
13227
|
type: R ? X : j,
|
|
@@ -13231,7 +13231,7 @@ var Lt = (e) => Se(e) && !en(e) ? e : {
|
|
|
13231
13231
|
};
|
|
13232
13232
|
};
|
|
13233
13233
|
if (s ? !Array.isArray(w) || !w.length : c && (!O && (D || De(w)) || Je(w) && !w || _ && !Ad(a).isValid || A && !Md(a).isValid)) {
|
|
13234
|
-
const { value: R, message: H } = Le(c) ? { value: !!c, message: c } :
|
|
13234
|
+
const { value: R, message: H } = Le(c) ? { value: !!c, message: c } : Ft(c);
|
|
13235
13235
|
if (R && (E[h] = {
|
|
13236
13236
|
type: dt.required,
|
|
13237
13237
|
message: H,
|
|
@@ -13242,7 +13242,7 @@ var Lt = (e) => Se(e) && !en(e) ? e : {
|
|
|
13242
13242
|
}
|
|
13243
13243
|
if (!D && (!De(f) || !De(m))) {
|
|
13244
13244
|
let R, H;
|
|
13245
|
-
const U =
|
|
13245
|
+
const U = Ft(m), X = Ft(f);
|
|
13246
13246
|
if (!De(w) && !isNaN(w)) {
|
|
13247
13247
|
const j = i.valueAsNumber || w && +w;
|
|
13248
13248
|
De(U.value) || (R = j > U.value), De(X.value) || (H = j < X.value);
|
|
@@ -13254,12 +13254,12 @@ var Lt = (e) => Se(e) && !en(e) ? e : {
|
|
|
13254
13254
|
return S(E[h].message), E;
|
|
13255
13255
|
}
|
|
13256
13256
|
if ((u || p) && !D && (Le(w) || s && Array.isArray(w))) {
|
|
13257
|
-
const R =
|
|
13257
|
+
const R = Ft(u), H = Ft(p), U = !De(R.value) && w.length > +R.value, X = !De(H.value) && w.length < +H.value;
|
|
13258
13258
|
if ((U || X) && (T(U, R.message, H.message), !n))
|
|
13259
13259
|
return S(E[h].message), E;
|
|
13260
13260
|
}
|
|
13261
13261
|
if (g && !D && Le(w)) {
|
|
13262
|
-
const { value: R, message: H } =
|
|
13262
|
+
const { value: R, message: H } = Ft(g);
|
|
13263
13263
|
if (en(R) && !w.match(R) && (E[h] = {
|
|
13264
13264
|
type: dt.pattern,
|
|
13265
13265
|
message: H,
|
|
@@ -13276,7 +13276,7 @@ var Lt = (e) => Se(e) && !en(e) ? e : {
|
|
|
13276
13276
|
...L(dt.validate, H.message)
|
|
13277
13277
|
}, !n))
|
|
13278
13278
|
return S(H.message), E;
|
|
13279
|
-
} else if (
|
|
13279
|
+
} else if (xe(v)) {
|
|
13280
13280
|
let R = {};
|
|
13281
13281
|
for (const H in v) {
|
|
13282
13282
|
if (!Ie(R) && !n)
|
|
@@ -13320,7 +13320,7 @@ function RS(e = {}) {
|
|
|
13320
13320
|
validatingFields: {},
|
|
13321
13321
|
errors: t.errors || {},
|
|
13322
13322
|
disabled: t.disabled || !1
|
|
13323
|
-
}, n = {}, o =
|
|
13323
|
+
}, n = {}, o = xe(t.defaultValues) || xe(t.values) ? Re(t.defaultValues || t.values) || {} : {}, s = t.shouldUnregister ? {} : Re(o), i = {
|
|
13324
13324
|
action: !1,
|
|
13325
13325
|
mount: !1,
|
|
13326
13326
|
watch: !1
|
|
@@ -13357,7 +13357,7 @@ function RS(e = {}) {
|
|
|
13357
13357
|
}
|
|
13358
13358
|
}, y = (C, N) => {
|
|
13359
13359
|
!t.disabled && (p.isValidating || p.validatingFields || f.isValidating || f.validatingFields) && ((C || Array.from(a.mount)).forEach((P) => {
|
|
13360
|
-
P && (N ? de(r.validatingFields, P, N) :
|
|
13360
|
+
P && (N ? de(r.validatingFields, P, N) : we(r.validatingFields, P));
|
|
13361
13361
|
}), m.state.next({
|
|
13362
13362
|
validatingFields: r.validatingFields,
|
|
13363
13363
|
isValidating: !Ie(r.validatingFields)
|
|
@@ -13376,7 +13376,7 @@ function RS(e = {}) {
|
|
|
13376
13376
|
const Z = P(q(r.touchedFields, C), K.argA, K.argB);
|
|
13377
13377
|
B && de(r.touchedFields, C, Z);
|
|
13378
13378
|
}
|
|
13379
|
-
(p.dirtyFields || f.dirtyFields) && (r.dirtyFields =
|
|
13379
|
+
(p.dirtyFields || f.dirtyFields) && (r.dirtyFields = Wt(o, s)), m.state.next({
|
|
13380
13380
|
name: C,
|
|
13381
13381
|
isDirty: T(C, N),
|
|
13382
13382
|
dirtyFields: r.dirtyFields,
|
|
@@ -13409,7 +13409,7 @@ function RS(e = {}) {
|
|
|
13409
13409
|
if (!P || K) {
|
|
13410
13410
|
(p.isDirty || f.isDirty) && (Z = r.isDirty, r.isDirty = ae.isDirty = T(), V = Z !== ae.isDirty);
|
|
13411
13411
|
const ue = vt(q(o, C), N);
|
|
13412
|
-
Z = !!q(r.dirtyFields, C), ue ?
|
|
13412
|
+
Z = !!q(r.dirtyFields, C), ue ? we(r.dirtyFields, C) : de(r.dirtyFields, C, !0), ae.dirtyFields = r.dirtyFields, V = V || (p.dirtyFields || f.dirtyFields) && Z !== !ue;
|
|
13413
13413
|
}
|
|
13414
13414
|
if (P) {
|
|
13415
13415
|
const ue = q(r.touchedFields, C);
|
|
@@ -13420,7 +13420,7 @@ function RS(e = {}) {
|
|
|
13420
13420
|
return V ? ae : {};
|
|
13421
13421
|
}, A = (C, N, P, K) => {
|
|
13422
13422
|
const B = q(r.errors, C), V = (p.isValid || f.isValid) && Je(N) && r.isValid !== N;
|
|
13423
|
-
if (t.delayError && P ? (c = v(() => w(C, P)), c(t.delayError)) : (clearTimeout(u), c = null, P ? de(r.errors, C, P) :
|
|
13423
|
+
if (t.delayError && P ? (c = v(() => w(C, P)), c(t.delayError)) : (clearTimeout(u), c = null, P ? de(r.errors, C, P) : we(r.errors, C)), (P ? !vt(B, P) : B) || !Ie(K) || V) {
|
|
13424
13424
|
const Z = {
|
|
13425
13425
|
...K,
|
|
13426
13426
|
...V && Je(N) ? { isValid: N } : {},
|
|
@@ -13441,7 +13441,7 @@ function RS(e = {}) {
|
|
|
13441
13441
|
if (C)
|
|
13442
13442
|
for (const P of C) {
|
|
13443
13443
|
const K = q(N, P);
|
|
13444
|
-
K ? de(r.errors, P, K) :
|
|
13444
|
+
K ? de(r.errors, P, K) : we(r.errors, P);
|
|
13445
13445
|
}
|
|
13446
13446
|
else
|
|
13447
13447
|
r.errors = N;
|
|
@@ -13459,7 +13459,7 @@ function RS(e = {}) {
|
|
|
13459
13459
|
const Ae = await Ei(B, a.disabled, s, g, t.shouldUseNativeValidation && !N, ae);
|
|
13460
13460
|
if (ue && p.validatingFields && y([V.name]), Ae[V.name] && (P.valid = !1, N))
|
|
13461
13461
|
break;
|
|
13462
|
-
!N && (q(Ae, V.name) ? ae ? ES(r.errors, Ae, V.name) : de(r.errors, V.name, Ae[V.name]) :
|
|
13462
|
+
!N && (q(Ae, V.name) ? ae ? ES(r.errors, Ae, V.name) : de(r.errors, V.name, Ae[V.name]) : we(r.errors, V.name));
|
|
13463
13463
|
}
|
|
13464
13464
|
!Ie(Z) && await D(Z, N, P);
|
|
13465
13465
|
}
|
|
@@ -13478,7 +13478,7 @@ function RS(e = {}) {
|
|
|
13478
13478
|
let B = N;
|
|
13479
13479
|
if (K) {
|
|
13480
13480
|
const V = K._f;
|
|
13481
|
-
V && (!V.disabled && de(s, C, Td(N, V)), B = Jr(V.ref) && De(N) ? "" : N, _d(V.ref) ? [...V.ref.options].forEach((Z) => Z.selected = B.includes(Z.value)) : V.refs ?
|
|
13481
|
+
V && (!V.disabled && de(s, C, Td(N, V)), B = Jr(V.ref) && De(N) ? "" : N, _d(V.ref) ? [...V.ref.options].forEach((Z) => Z.selected = B.includes(Z.value)) : V.refs ? Pr(V.ref) ? V.refs.forEach((Z) => {
|
|
13482
13482
|
(!Z.defaultChecked || !Z.disabled) && (Array.isArray(B) ? Z.checked = !!B.find((ae) => ae === Z.value) : Z.checked = B === Z.value || !!B);
|
|
13483
13483
|
}) : V.refs.forEach((Z) => Z.checked = Z.value === B) : bs(V.ref) ? V.ref.value = "" : (V.ref.value = B, V.ref.type || m.state.next({
|
|
13484
13484
|
name: C,
|
|
@@ -13491,7 +13491,7 @@ function RS(e = {}) {
|
|
|
13491
13491
|
if (!N.hasOwnProperty(K))
|
|
13492
13492
|
return;
|
|
13493
13493
|
const B = N[K], V = C + "." + K, Z = q(n, V);
|
|
13494
|
-
(a.array.has(C) ||
|
|
13494
|
+
(a.array.has(C) || xe(B) || Z && !Z._f) && !_t(B) ? X(V, B, P) : U(V, B, P);
|
|
13495
13495
|
}
|
|
13496
13496
|
}, j = (C, N, P = {}) => {
|
|
13497
13497
|
const K = q(n, C), B = a.array.has(C), V = Re(N);
|
|
@@ -13500,7 +13500,7 @@ function RS(e = {}) {
|
|
|
13500
13500
|
values: Re(s)
|
|
13501
13501
|
}), (p.isDirty || p.dirtyFields || f.isDirty || f.dirtyFields) && P.shouldDirty && m.state.next({
|
|
13502
13502
|
name: C,
|
|
13503
|
-
dirtyFields:
|
|
13503
|
+
dirtyFields: Wt(o, s),
|
|
13504
13504
|
isDirty: T(C, V)
|
|
13505
13505
|
})) : K && !K._f && !De(V) ? X(C, V, P) : U(C, V, P), xi(C, a) && m.state.next({ ...r, name: C }), m.state.next({
|
|
13506
13506
|
name: i.mount ? C : void 0,
|
|
@@ -13511,35 +13511,35 @@ function RS(e = {}) {
|
|
|
13511
13511
|
const N = C.target;
|
|
13512
13512
|
let P = N.name, K = !0;
|
|
13513
13513
|
const B = q(n, P), V = (ue) => {
|
|
13514
|
-
K = Number.isNaN(ue) ||
|
|
13514
|
+
K = Number.isNaN(ue) || _t(ue) && isNaN(ue.getTime()) || vt(ue, q(s, P, ue));
|
|
13515
13515
|
}, Z = bi(t.mode), ae = bi(t.reValidateMode);
|
|
13516
13516
|
if (B) {
|
|
13517
13517
|
let ue, Ae;
|
|
13518
|
-
const
|
|
13519
|
-
de(s, P,
|
|
13520
|
-
const
|
|
13518
|
+
const kt = N.type ? yi(B._f) : sS(C), Oe = C.type === pi.BLUR || C.type === pi.FOCUS_OUT, lt = !bS(B._f) && !t.resolver && !q(r.errors, P) && !B._f.deps || SS(Oe, q(r.touchedFields, P), r.isSubmitted, ae, Z), ct = xi(P, a, Oe);
|
|
13519
|
+
de(s, P, kt), Oe ? (!N || !N.readOnly) && (B._f.onBlur && B._f.onBlur(C), c && c(0)) : B._f.onChange && B._f.onChange(C);
|
|
13520
|
+
const Jt = E(P, kt, Oe), On = !Ie(Jt) || ct;
|
|
13521
13521
|
if (!Oe && m.state.next({
|
|
13522
13522
|
name: P,
|
|
13523
13523
|
type: C.type,
|
|
13524
13524
|
values: Re(s)
|
|
13525
13525
|
}), lt)
|
|
13526
|
-
return (p.isValid || f.isValid) && (t.mode === "onBlur" ? Oe && h() : Oe || h()), On && m.state.next({ name: P, ...ct ? {} :
|
|
13526
|
+
return (p.isValid || f.isValid) && (t.mode === "onBlur" ? Oe && h() : Oe || h()), On && m.state.next({ name: P, ...ct ? {} : Jt });
|
|
13527
13527
|
if (!Oe && ct && m.state.next({ ...r }), t.resolver) {
|
|
13528
|
-
const { errors:
|
|
13529
|
-
if (V(
|
|
13530
|
-
const
|
|
13531
|
-
ue = Qe.error, P = Qe.name, Ae = Ie(
|
|
13528
|
+
const { errors: Ce } = await _([P]);
|
|
13529
|
+
if (V(kt), K) {
|
|
13530
|
+
const Dt = Si(r.errors, n, P), Qe = Si(Ce, n, Dt.name || P);
|
|
13531
|
+
ue = Qe.error, P = Qe.name, Ae = Ie(Ce);
|
|
13532
13532
|
}
|
|
13533
13533
|
} else
|
|
13534
|
-
y([P], !0), ue = (await Ei(B, a.disabled, s, g, t.shouldUseNativeValidation))[P], y([P]), V(
|
|
13535
|
-
K && (B._f.deps && (!Array.isArray(B._f.deps) || B._f.deps.length > 0) && $(B._f.deps), A(P, Ae, ue,
|
|
13534
|
+
y([P], !0), ue = (await Ei(B, a.disabled, s, g, t.shouldUseNativeValidation))[P], y([P]), V(kt), K && (ue ? Ae = !1 : (p.isValid || f.isValid) && (Ae = await D(n, !0)));
|
|
13535
|
+
K && (B._f.deps && (!Array.isArray(B._f.deps) || B._f.deps.length > 0) && $(B._f.deps), A(P, Ae, ue, Jt));
|
|
13536
13536
|
}
|
|
13537
13537
|
}, F = (C, N) => {
|
|
13538
13538
|
if (q(r.errors, N) && C.focus)
|
|
13539
13539
|
return C.focus(), 1;
|
|
13540
13540
|
}, $ = async (C, N = {}) => {
|
|
13541
13541
|
let P, K;
|
|
13542
|
-
const B =
|
|
13542
|
+
const B = ir(C);
|
|
13543
13543
|
if (t.resolver) {
|
|
13544
13544
|
const V = await O(ye(C) ? C : B);
|
|
13545
13545
|
P = Ie(V), K = C ? !B.some((Z) => q(V, Z)) : P;
|
|
@@ -13551,7 +13551,7 @@ function RS(e = {}) {
|
|
|
13551
13551
|
...!Le(C) || (p.isValid || f.isValid) && P !== r.isValid ? {} : { name: C },
|
|
13552
13552
|
...t.resolver || !C ? { isValid: P } : {},
|
|
13553
13553
|
errors: r.errors
|
|
13554
|
-
}), N.shouldFocus && !K &&
|
|
13554
|
+
}), N.shouldFocus && !K && ar(n, F, C ? B : a.mount), K;
|
|
13555
13555
|
}, te = (C, N) => {
|
|
13556
13556
|
let P = {
|
|
13557
13557
|
...i.mount ? s : o
|
|
@@ -13564,7 +13564,7 @@ function RS(e = {}) {
|
|
|
13564
13564
|
isValidating: !!q(r.validatingFields, C),
|
|
13565
13565
|
isTouched: !!q((N || r).touchedFields, C)
|
|
13566
13566
|
}), ne = (C) => {
|
|
13567
|
-
C &&
|
|
13567
|
+
C && ir(C).forEach((N) => we(r.errors, N)), m.state.next({
|
|
13568
13568
|
errors: C ? r.errors : {}
|
|
13569
13569
|
});
|
|
13570
13570
|
}, ce = (C, N, P) => {
|
|
@@ -13596,8 +13596,8 @@ function RS(e = {}) {
|
|
|
13596
13596
|
...C,
|
|
13597
13597
|
formState: f
|
|
13598
13598
|
})), I = (C, N = {}) => {
|
|
13599
|
-
for (const P of C ?
|
|
13600
|
-
a.mount.delete(P), a.array.delete(P), N.keepValue || (
|
|
13599
|
+
for (const P of C ? ir(C) : a.mount)
|
|
13600
|
+
a.mount.delete(P), a.array.delete(P), N.keepValue || (we(n, P), we(s, P)), !N.keepError && we(r.errors, P), !N.keepDirty && we(r.dirtyFields, P), !N.keepTouched && we(r.touchedFields, P), !N.keepIsValidating && we(r.validatingFields, P), !t.shouldUnregister && !N.keepDefaultValue && we(o, P);
|
|
13601
13601
|
m.state.next({
|
|
13602
13602
|
values: Re(s)
|
|
13603
13603
|
}), m.state.next({
|
|
@@ -13624,11 +13624,11 @@ function RS(e = {}) {
|
|
|
13624
13624
|
...K ? { disabled: N.disabled || t.disabled } : {},
|
|
13625
13625
|
...t.progressive ? {
|
|
13626
13626
|
required: !!N.required,
|
|
13627
|
-
min:
|
|
13628
|
-
max:
|
|
13629
|
-
minLength:
|
|
13630
|
-
maxLength:
|
|
13631
|
-
pattern:
|
|
13627
|
+
min: rr(N.min),
|
|
13628
|
+
max: rr(N.max),
|
|
13629
|
+
minLength: rr(N.minLength),
|
|
13630
|
+
maxLength: rr(N.maxLength),
|
|
13631
|
+
pattern: rr(N.pattern)
|
|
13632
13632
|
} : {},
|
|
13633
13633
|
name: C,
|
|
13634
13634
|
onChange: z,
|
|
@@ -13656,8 +13656,8 @@ function RS(e = {}) {
|
|
|
13656
13656
|
P = q(n, C, {}), P._f && (P._f.mount = !1), (t.shouldUnregister || N.shouldUnregister) && !(aS(a.array, C) && i.action) && a.unMount.add(C);
|
|
13657
13657
|
}
|
|
13658
13658
|
};
|
|
13659
|
-
}, J = () => t.shouldFocusError &&
|
|
13660
|
-
Je(C) && (m.state.next({ disabled: C }),
|
|
13659
|
+
}, J = () => t.shouldFocusError && ar(n, F, a.mount), ee = (C) => {
|
|
13660
|
+
Je(C) && (m.state.next({ disabled: C }), ar(n, (N, P) => {
|
|
13661
13661
|
const K = q(n, P);
|
|
13662
13662
|
K && (N.disabled = K._f.disabled || C, Array.isArray(K._f.refs) && K._f.refs.forEach((B) => {
|
|
13663
13663
|
B.disabled = K._f.disabled || C;
|
|
@@ -13676,8 +13676,8 @@ function RS(e = {}) {
|
|
|
13676
13676
|
await D(n);
|
|
13677
13677
|
if (a.disabled.size)
|
|
13678
13678
|
for (const V of a.disabled)
|
|
13679
|
-
|
|
13680
|
-
if (
|
|
13679
|
+
we(B, V);
|
|
13680
|
+
if (we(r.errors, "root"), Ie(r.errors)) {
|
|
13681
13681
|
m.state.next({
|
|
13682
13682
|
errors: {}
|
|
13683
13683
|
});
|
|
@@ -13697,14 +13697,14 @@ function RS(e = {}) {
|
|
|
13697
13697
|
}), K)
|
|
13698
13698
|
throw K;
|
|
13699
13699
|
}, _e = (C, N = {}) => {
|
|
13700
|
-
q(n, C) && (ye(N.defaultValue) ? j(C, Re(q(o, C))) : (j(C, N.defaultValue), de(o, C, Re(N.defaultValue))), N.keepTouched ||
|
|
13700
|
+
q(n, C) && (ye(N.defaultValue) ? j(C, Re(q(o, C))) : (j(C, N.defaultValue), de(o, C, Re(N.defaultValue))), N.keepTouched || we(r.touchedFields, C), N.keepDirty || (we(r.dirtyFields, C), r.isDirty = N.defaultValue ? T(C, Re(q(o, C))) : T()), N.keepError || (we(r.errors, C), p.isValid && h()), m.state.next({ ...r }));
|
|
13701
13701
|
}, Pe = (C, N = {}) => {
|
|
13702
13702
|
const P = C ? Re(C) : o, K = Re(P), B = Ie(C), V = B ? o : K;
|
|
13703
13703
|
if (N.keepDefaultValues || (o = P), !N.keepValues) {
|
|
13704
13704
|
if (N.keepDirtyValues) {
|
|
13705
13705
|
const Z = /* @__PURE__ */ new Set([
|
|
13706
13706
|
...a.mount,
|
|
13707
|
-
...Object.keys(
|
|
13707
|
+
...Object.keys(Wt(o, s))
|
|
13708
13708
|
]);
|
|
13709
13709
|
for (const ae of Array.from(Z))
|
|
13710
13710
|
q(r.dirtyFields, ae) ? de(V, ae, q(s, ae)) : j(ae, q(V, ae));
|
|
@@ -13747,7 +13747,7 @@ function RS(e = {}) {
|
|
|
13747
13747
|
submitCount: N.keepSubmitCount ? r.submitCount : 0,
|
|
13748
13748
|
isDirty: B ? !1 : N.keepDirty ? r.isDirty : !!(N.keepDefaultValues && !vt(C, o)),
|
|
13749
13749
|
isSubmitted: N.keepIsSubmitted ? r.isSubmitted : !1,
|
|
13750
|
-
dirtyFields: B ? {} : N.keepDirtyValues ? N.keepDefaultValues && s ?
|
|
13750
|
+
dirtyFields: B ? {} : N.keepDirtyValues ? N.keepDefaultValues && s ? Wt(o, s) : r.dirtyFields : N.keepDefaultValues && C ? Wt(o, C) : N.keepDirty ? r.dirtyFields : {},
|
|
13751
13751
|
touchedFields: N.keepTouched ? r.touchedFields : {},
|
|
13752
13752
|
errors: N.keepErrors ? r.errors : {},
|
|
13753
13753
|
isSubmitSuccessful: N.keepIsSubmitSuccessful ? r.isSubmitSuccessful : !1,
|
|
@@ -14165,7 +14165,7 @@ const IS = ({
|
|
|
14165
14165
|
type: "submit",
|
|
14166
14166
|
disabled: c || a,
|
|
14167
14167
|
children: c ? /* @__PURE__ */ M(Te, { children: [
|
|
14168
|
-
/* @__PURE__ */ d(
|
|
14168
|
+
/* @__PURE__ */ d(jt, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
14169
14169
|
"Saving..."
|
|
14170
14170
|
] }) : /* @__PURE__ */ M(Te, { children: [
|
|
14171
14171
|
/* @__PURE__ */ d(Zf, { className: "mr-2 h-4 w-4" }),
|
|
@@ -14175,7 +14175,7 @@ const IS = ({
|
|
|
14175
14175
|
)
|
|
14176
14176
|
] })
|
|
14177
14177
|
] });
|
|
14178
|
-
return h && (u || p || b) ? /* @__PURE__ */ M(
|
|
14178
|
+
return h && (u || p || b) ? /* @__PURE__ */ M(Nt, { className: w, ...x, children: [
|
|
14179
14179
|
/* @__PURE__ */ d(nn, { children: /* @__PURE__ */ M("div", { className: "flex items-center gap-4", children: [
|
|
14180
14180
|
b && s && /* @__PURE__ */ d(fe, { variant: "ghost", size: "icon", onClick: s, children: /* @__PURE__ */ d($r, { className: "h-4 w-4" }) }),
|
|
14181
14181
|
/* @__PURE__ */ M("div", { children: [
|
|
@@ -14183,7 +14183,7 @@ const IS = ({
|
|
|
14183
14183
|
p && /* @__PURE__ */ d(sn, { children: p })
|
|
14184
14184
|
] })
|
|
14185
14185
|
] }) }),
|
|
14186
|
-
/* @__PURE__ */ d(
|
|
14186
|
+
/* @__PURE__ */ d(Rt, { children: j })
|
|
14187
14187
|
] }) : /* @__PURE__ */ d("div", { className: w, ...x, children: j });
|
|
14188
14188
|
};
|
|
14189
14189
|
IS.displayName = "CrudForm";
|
|
@@ -14296,9 +14296,9 @@ const kS = ({
|
|
|
14296
14296
|
h === 3 && "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
|
|
14297
14297
|
);
|
|
14298
14298
|
if (t)
|
|
14299
|
-
return /* @__PURE__ */ d(
|
|
14299
|
+
return /* @__PURE__ */ d(Nt, { className: y, children: /* @__PURE__ */ d(Rt, { className: "py-12", children: /* @__PURE__ */ d(kn, { text: `Loading ${m}...` }) }) });
|
|
14300
14300
|
if (r)
|
|
14301
|
-
return /* @__PURE__ */ d(
|
|
14301
|
+
return /* @__PURE__ */ d(Nt, { className: y, children: /* @__PURE__ */ M(Rt, { className: "py-12 text-center", children: [
|
|
14302
14302
|
/* @__PURE__ */ d("p", { className: "text-destructive", children: r.message || "An error occurred" }),
|
|
14303
14303
|
o && /* @__PURE__ */ M(fe, { variant: "outline", onClick: o, className: "mt-4", children: [
|
|
14304
14304
|
/* @__PURE__ */ d($r, { className: "mr-2 h-4 w-4" }),
|
|
@@ -14306,7 +14306,7 @@ const kS = ({
|
|
|
14306
14306
|
] })
|
|
14307
14307
|
] }) });
|
|
14308
14308
|
if (!e)
|
|
14309
|
-
return /* @__PURE__ */ d(
|
|
14309
|
+
return /* @__PURE__ */ d(Nt, { className: y, children: /* @__PURE__ */ M(Rt, { className: "py-12 text-center", children: [
|
|
14310
14310
|
/* @__PURE__ */ M("p", { className: "text-muted-foreground", children: [
|
|
14311
14311
|
"No ",
|
|
14312
14312
|
m,
|
|
@@ -14362,7 +14362,7 @@ const kS = ({
|
|
|
14362
14362
|
] })
|
|
14363
14363
|
] });
|
|
14364
14364
|
return /* @__PURE__ */ M(Te, { children: [
|
|
14365
|
-
/* @__PURE__ */ M(
|
|
14365
|
+
/* @__PURE__ */ M(Nt, { className: y, ...b, children: [
|
|
14366
14366
|
g && /* @__PURE__ */ M(nn, { className: "flex flex-row items-center justify-between space-y-0 pb-4", children: [
|
|
14367
14367
|
/* @__PURE__ */ M("div", { className: "flex items-center gap-4", children: [
|
|
14368
14368
|
o && /* @__PURE__ */ d(fe, { variant: "ghost", size: "icon", onClick: o, children: /* @__PURE__ */ d($r, { className: "h-4 w-4" }) }),
|
|
@@ -14389,7 +14389,7 @@ const kS = ({
|
|
|
14389
14389
|
)
|
|
14390
14390
|
] })
|
|
14391
14391
|
] }),
|
|
14392
|
-
/* @__PURE__ */ d(
|
|
14392
|
+
/* @__PURE__ */ d(Rt, { children: L })
|
|
14393
14393
|
] }),
|
|
14394
14394
|
/* @__PURE__ */ d(
|
|
14395
14395
|
hs,
|
|
@@ -14651,8 +14651,8 @@ export {
|
|
|
14651
14651
|
db as AvatarImage,
|
|
14652
14652
|
Ar as Badge,
|
|
14653
14653
|
fe as Button,
|
|
14654
|
-
|
|
14655
|
-
|
|
14654
|
+
Nt as Card,
|
|
14655
|
+
Rt as CardContent,
|
|
14656
14656
|
sn as CardDescription,
|
|
14657
14657
|
Jf as CardFooter,
|
|
14658
14658
|
nn as CardHeader,
|
|
@@ -14690,9 +14690,9 @@ export {
|
|
|
14690
14690
|
xx as DropdownMenuSubContent,
|
|
14691
14691
|
wx as DropdownMenuSubTrigger,
|
|
14692
14692
|
bx as DropdownMenuTrigger,
|
|
14693
|
-
|
|
14693
|
+
_r as EmptyState,
|
|
14694
14694
|
rS as ErrorState,
|
|
14695
|
-
|
|
14695
|
+
Rr as FormField,
|
|
14696
14696
|
nS as FormModal,
|
|
14697
14697
|
No as Input,
|
|
14698
14698
|
an as Label,
|
|
@@ -14729,11 +14729,11 @@ export {
|
|
|
14729
14729
|
dd as Table,
|
|
14730
14730
|
pd as TableBody,
|
|
14731
14731
|
Zx as TableCaption,
|
|
14732
|
-
|
|
14732
|
+
Vt as TableCell,
|
|
14733
14733
|
Xx as TableFooter,
|
|
14734
14734
|
Wr as TableHead,
|
|
14735
14735
|
fd as TableHeader,
|
|
14736
|
-
|
|
14736
|
+
sr as TableRow,
|
|
14737
14737
|
ZS as Tabs,
|
|
14738
14738
|
Qy as TabsContent,
|
|
14739
14739
|
Xy as TabsList,
|