@nxgt/material 2.4.1 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -19
- package/dist/{_Uint8Array-DEXn42kj.js → _Uint8Array-DuTT6911.js} +1 -1
- package/dist/_overRest-93z6TD9V.js +81 -0
- package/dist/{abnfDiagram-O67JEVCF-C7NxOWqd.js → abnfDiagram-O67JEVCF-Cl4ukf6a.js} +4 -4
- package/dist/{architectureDiagram-NJMV4G6O-BIvwyzEh.js → architectureDiagram-NJMV4G6O-WmFlBQF5.js} +7 -7
- package/dist/{client-only.utils-DhcBUmau.js → async-slice-B8Xv2BLH.js} +164 -93
- package/dist/{blockDiagram-BEXU5L5S-CD5PW_mQ.js → blockDiagram-BEXU5L5S-C8UXdLfB.js} +11 -11
- package/dist/{c4Diagram-YGBWAQC7-WgqlRIL5.js → c4Diagram-YGBWAQC7-D9xSt2QO.js} +8 -8
- package/dist/{channel-Ba8pEAWx.js → channel-Dg92Hoym.js} +1 -1
- package/dist/{chunk-3FUC2YCW-CNBUvTSg.js → chunk-3FUC2YCW-4gCRt6fO.js} +8 -8
- package/dist/{chunk-5DYCD2WN-Bqi3iL5i.js → chunk-5DYCD2WN-Cja1INgd.js} +3 -3
- package/dist/{chunk-6AEJRKK7-DDXoGWDs.js → chunk-6AEJRKK7-3YWRP4aV.js} +2 -2
- package/dist/{chunk-742MDFTN-nG_ROTnT.js → chunk-742MDFTN-Cs1qGiTK.js} +2 -2
- package/dist/{chunk-7INBJB4K-Dg64CbhT.js → chunk-7INBJB4K-BY5n77ka.js} +6 -6
- package/dist/{chunk-7M6MHVWA-DEh1Crrc.js → chunk-7M6MHVWA-DnPXbiTM.js} +9 -9
- package/dist/{chunk-7PRAP22T-DIiYRAce.js → chunk-7PRAP22T-_Av9vcXz.js} +1 -1
- package/dist/{chunk-GNY47TPC-vOPvRE_8.js → chunk-GNY47TPC-DLqgU2SJ.js} +11 -11
- package/dist/{chunk-GTNCS2PH-CzDYTYNy.js → chunk-GTNCS2PH-BZ9WMD1v.js} +3 -3
- package/dist/{chunk-GWA4HPMP-CmsxMX3A.js → chunk-GWA4HPMP-Co-A6dtV.js} +3 -3
- package/dist/{chunk-MBY4JIJT-IA2XBafa.js → chunk-MBY4JIJT-C3RQP_Nk.js} +4 -4
- package/dist/{chunk-NETBCI7D-CQV8lo68.js → chunk-NETBCI7D-CBowDvwz.js} +1 -1
- package/dist/{chunk-O7XYJQB3-C87zK8E5.js → chunk-O7XYJQB3-A66QSOPA.js} +1 -1
- package/dist/{chunk-UA2S7LBM-B0LGFGu3.js → chunk-UA2S7LBM-BNeHeMx9.js} +6 -6
- package/dist/{chunk-WEXAMYUT-C-QP0DFq.js → chunk-WEXAMYUT-CucJfehv.js} +2 -2
- package/dist/{chunk-XXDRQBXY-Bq4sFnO2.js → chunk-XXDRQBXY-FgXU14Bh.js} +1 -1
- package/dist/{chunk-Z7XXMR3K-DcqSgI9Q.js → chunk-Z7XXMR3K-dRJc1Z30.js} +8 -8
- package/dist/{chunk-ZIGJFQKS-HDJ6e6OJ.js → chunk-ZIGJFQKS-C3xUAXJq.js} +3 -3
- package/dist/{classDiagram-v2-NBCMYWYE-tU42Be-2.js → classDiagram-v2-NBCMYWYE-CQmePeL4.js} +14 -14
- package/dist/{components-NLbPtyeB.js → components-CUkJhBwK.js} +26367 -25835
- package/dist/components.js +6 -6
- package/dist/{cose-bilkent-JH36ORCC-11-T1rfk.js → cose-bilkent-JH36ORCC-DRUT3qBb.js} +2 -2
- package/dist/{cynefinDiagram-VND7K2PF-1kHi2rGa.js → cynefinDiagram-VND7K2PF-B9HrdQW8.js} +4 -4
- package/dist/{dagre-6A5THRUB-CXwkkHFr.js → dagre-6A5THRUB-BhyJENrD.js} +574 -615
- package/dist/{diagram-22UHCM2B-BswK7SlD.js → diagram-22UHCM2B-CJc0JoTV.js} +15 -15
- package/dist/{diagram-3UASUU5V-5p5ra9Yi.js → diagram-3UASUU5V-0P3Cnq5H.js} +7 -7
- package/dist/{diagram-ATOU4E4O-Clju_0RY.js → diagram-ATOU4E4O-CNY-8kl0.js} +3 -3
- package/dist/{diagram-CDSNMT55-w7kkJ6MU.js → diagram-CDSNMT55-C8Mk1smi.js} +5 -5
- package/dist/{diagram-MLGK6HIB-mUOtRVmm.js → diagram-MLGK6HIB-CpfeILwW.js} +4 -4
- package/dist/{diagram-MPIPVDR6-DEUw58dq.js → diagram-MPIPVDR6-Do7bUnTd.js} +4 -4
- package/dist/{dist-gYpAi-su.js → dist-C3YK_ean.js} +1 -1
- package/dist/{dist-CeHNxLJG.js → dist-CRbPtqwD.js} +1 -1
- package/dist/dnd.js +1 -1
- package/dist/{ebnfDiagram-ZINNZB2B-BYfatie5.js → ebnfDiagram-ZINNZB2B-1GewX9Zq.js} +4 -4
- package/dist/{elk-276RUBZZ-CuGpDp18.js → elk-276RUBZZ-CvgDuHoY.js} +13 -13
- package/dist/{erDiagram-OPXOYQCR-vpNBbFgR.js → erDiagram-OPXOYQCR-BFgRy8E9.js} +14 -14
- package/dist/{field-blur-EUOqpHbF.js → field-blur-D1eQk-49.js} +1109 -1083
- package/dist/flowDiagram-KWPJA3E3-DGaa9iT2.js +17 -0
- package/dist/{ganttDiagram-FUAMR5RP-DC1sfzgs.js → ganttDiagram-FUAMR5RP-CDGrtGHY.js} +6 -6
- package/dist/{gitGraphDiagram-X574FWY7-DcGaPSwy.js → gitGraphDiagram-X574FWY7-80yOq8dE.js} +3 -3
- package/dist/{graphlib-DvOFXJbI.js → graphlib-Dt-isUVV.js} +103 -139
- package/dist/hooks.js +2 -2
- package/dist/{i18n-provider-XTTU9ArK.js → i18n-provider-Drsc2YXX.js} +1 -1
- package/dist/i18n.js +6 -6
- package/dist/{icon-button-Dl9PDYCE.js → icon-button-BxySFfrr.js} +581 -581
- package/dist/{infoDiagram-VRGFBTTK-Cvj167dl.js → infoDiagram-VRGFBTTK-Cboh-B9n.js} +3 -3
- package/dist/isArrayLikeObject-BhWbq65y.js +28 -0
- package/dist/isEmpty-DdlzV8Ue.js +53 -0
- package/dist/{ishikawaDiagram-OU5B5YK6-ChBwjCfr.js → ishikawaDiagram-OU5B5YK6-DwTd1YxL.js} +4 -4
- package/dist/{journeyDiagram-ZHPQQLJL-C6djNSgq.js → journeyDiagram-ZHPQQLJL-BuLKqWS3.js} +4 -4
- package/dist/{kanban-definition-PNTS6WVX-BRoa-Yp5.js → kanban-definition-PNTS6WVX-S8plI4wn.js} +10 -10
- package/dist/lib/components/ui/actions/button/button.compound-variants.d.ts +114 -0
- package/dist/lib/components/ui/actions/button/button.d.ts +4 -7
- package/dist/lib/components/ui/actions/button/button.variants.d.ts +7 -0
- package/dist/lib/components/ui/actions/button/has-text-content.d.ts +10 -0
- package/dist/lib/components/ui/actions/icon-button/icon-button.variants.d.ts +1 -1
- package/dist/lib/components/ui/collections/data-table/data-table-context.d.ts +4 -0
- package/dist/lib/components/ui/collections/data-table/data-table-pagination.d.ts +3 -1
- package/dist/lib/components/ui/collections/data-table/data-table.d.ts +12 -2
- package/dist/lib/components/ui/collections/data-table/hooks.d.ts +13 -13
- package/dist/lib/components/ui/collections/data-table/partials/data-table-body.d.ts +9 -5
- package/dist/lib/components/ui/collections/data-table/partials/data-table-empty-row.d.ts +14 -0
- package/dist/lib/components/ui/collections/data-table/partials/data-table-skeleton-rows.d.ts +7 -0
- package/dist/lib/components/ui/collections/filter/filter-field-number-range.d.ts +15 -0
- package/dist/lib/components/ui/collections/pagination/index.d.ts +1 -1
- package/dist/lib/components/ui/collections/pagination/pagination.d.ts +9 -1
- package/dist/lib/components/ui/display/chip/chip.d.ts +1 -1
- package/dist/lib/components/ui/feedback/toast/toast.d.ts +9 -4
- package/dist/lib/components/ui/fields/otp-field/index.d.ts +1 -0
- package/dist/lib/components/ui/fields/otp-field/input-otp.d.ts +1 -1
- package/dist/lib/components/ui/fields/slider/slider-header.d.ts +15 -0
- package/dist/lib/components/ui/fields/slider/slider.d.ts +7 -0
- package/dist/lib/components/ui/fields/switch/switch.d.ts +7 -0
- package/dist/lib/components/ui/layout/stepper/stepper-step.d.ts +17 -0
- package/dist/lib/components/ui/media/camera/camera-content.d.ts +1 -2
- package/dist/lib/components/ui/media/camera/camera-context.d.ts +4 -0
- package/dist/lib/components/ui/media/camera/camera-provider.d.ts +2 -0
- package/dist/lib/components/ui/media/camera/camera.d.ts +6 -3
- package/dist/lib/components/ui/media/camera/capture-photo.d.ts +13 -0
- package/dist/lib/components/ui/media/camera/index.d.ts +9 -1
- package/dist/lib/components/ui/media/camera/state/camera.reducers.d.ts +1 -1
- package/dist/lib/components/ui/media/camera/state/camera.slice.d.ts +4 -9
- package/dist/lib/components/ui/media/camera/state/camera.store.d.ts +11 -5
- package/dist/lib/components/ui/media/camera/state/camera.thunks.d.ts +4 -4
- package/dist/lib/components/ui/media/camera/types.d.ts +19 -9
- package/dist/lib/components/ui/media/camera/use-camera.d.ts +5 -11
- package/dist/lib/components/ui/media/camera/utils/camera.utils.d.ts +0 -1
- package/dist/lib/components/ui/media/index.d.ts +1 -0
- package/dist/lib/components/ui/overlays/dialog/dialog-outside.d.ts +5 -0
- package/dist/lib/components/ui/overlays/dialog/dialog-scroll-content.d.ts +9 -0
- package/dist/lib/components/ui/overlays/dialog/index.d.ts +1 -0
- package/dist/lib/components/ui/primitives/icon/icon-context.d.ts +1 -1
- package/dist/lib/components/ui/primitives/table/table.d.ts +6 -1
- package/dist/lib/components/ui/selection/index.d.ts +1 -0
- package/dist/lib/components/ui/selection/native-select/index.d.ts +1 -0
- package/dist/lib/components/ui/selection/native-select/native-select.d.ts +11 -0
- package/dist/lib/components/ui/selection/radio-group/radio-group.d.ts +8 -1
- package/dist/lib/i18n/resources/en/en.d.ts +7 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +8 -1
- package/dist/lib/i18n/resources/fr/fr.d.ts +7 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +8 -1
- package/dist/lib/i18n/resources/resources.d.ts +14 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib/lib/redux/status-slice.d.ts +1 -1
- package/dist/lib.js +295 -4
- package/dist/main.js +16 -16
- package/dist/map.js +5 -5
- package/dist/material.css +1 -1
- package/dist/merge-a7J0YkZX.js +156 -0
- package/dist/{mermaid.core-CEDjsxgL.js → mermaid.core-CE34byhz.js} +49 -49
- package/dist/{mindmap-definition-NLK3R4M7-BYtcw4Io.js → mindmap-definition-NLK3R4M7-emoij-nW.js} +13 -13
- package/dist/{pegDiagram-GJSIUBJH-Dcm3LCQX.js → pegDiagram-GJSIUBJH-CAO6aYvj.js} +4 -4
- package/dist/{pieDiagram-5QR66LMP-8ETWucra.js → pieDiagram-5QR66LMP-BdG1tWLn.js} +5 -5
- package/dist/print.js +2 -2
- package/dist/{quadrantDiagram-O4NWA36T-X05JG-jZ.js → quadrantDiagram-O4NWA36T-BCd-NwsO.js} +3 -3
- package/dist/{railroadDiagram-XR7U4H2S-CzOJlTUA.js → railroadDiagram-XR7U4H2S-DmKDXg8V.js} +4 -4
- package/dist/{requirementDiagram-PLB6GJNP-BwWSE7Fn.js → requirementDiagram-PLB6GJNP-CCcH5uSr.js} +13 -13
- package/dist/{sankeyDiagram-IPEJSGJF-B6YxyZMn.js → sankeyDiagram-IPEJSGJF-78cK-bfe.js} +3 -3
- package/dist/{sequenceDiagram-PO4LG4MO-DMLeIQ03.js → sequenceDiagram-PO4LG4MO-B2qb55A5.js} +5 -5
- package/dist/{sortable-provider-DuRzFvwe.js → sortable-provider-VCxPasNp.js} +17 -17
- package/dist/{src-CJ8DNrI1.js → src-C9kQSo6K.js} +1 -1
- package/dist/{stateDiagram-v2-GCMORJYK-CAqcgA-x.js → stateDiagram-v2-GCMORJYK-B4ghJrhD.js} +14 -14
- package/dist/{stored-language-BP90Ydtg.js → stored-language-CeD7kHui.js} +20 -2
- package/dist/{swimlanes-2SLR337P-DRQ2gho_.js → swimlanes-2SLR337P-DmHm2yJS.js} +12 -12
- package/dist/swimlanesDiagram-TC7HE7FX-Dq3gGsPj.js +28 -0
- package/dist/{timeline-definition-EJHVYXUP-BtvpCePa.js → timeline-definition-EJHVYXUP-EqJV_QKn.js} +5 -5
- package/dist/{translate-material-Ctzt0Y2N.js → translate-material-DgRdhz5d.js} +2 -2
- package/dist/{translator-Cfug7hC5.js → translator-B4zUVm7j.js} +1 -1
- package/dist/{use-heading-spy-DtVo2HBk.js → use-heading-spy-1BHMXjIn.js} +2 -2
- package/dist/{use-material-translation-CJswHOmK.js → use-material-translation-UbARR81K.js} +2 -2
- package/dist/{usecaseDiagram-POWQR4AR-DsYqBvQ-.js → usecaseDiagram-POWQR4AR-CvCl0p5N.js} +13 -13
- package/dist/{vennDiagram-UO4OBE2U-Aql8mhcy.js → vennDiagram-UO4OBE2U-CO0yFCI8.js} +4 -4
- package/dist/{wardleyDiagram-VNRHLVJA-tknlhG_t.js → wardleyDiagram-VNRHLVJA-QkwghAYo.js} +4 -4
- package/dist/{xychartDiagram-PMCCYNJV-CEf5bvG1.js → xychartDiagram-PMCCYNJV-BphsHFKA.js} +7 -7
- package/docs/components/buttons-and-actions.md +8 -3
- package/docs/components/data-display.md +1 -1
- package/docs/components/data-table-filter-and-lists.md +95 -6
- package/docs/components/feedback-and-status.md +3 -2
- package/docs/components/form-fields.md +48 -4
- package/docs/components/media-and-files.md +46 -7
- package/docs/components/navigation-and-layout.md +6 -1
- package/docs/components/overlays-and-menus.md +27 -2
- package/docs/components/primitives.md +33 -2
- package/docs/components/rich-widgets.md +1 -1
- package/docs/components/selection-and-choice.md +32 -6
- package/docs/guides/i18n.md +14 -8
- package/docs/guides/ssr.md +3 -1
- package/docs/previews/buttons-actions-actioncard.webp +0 -0
- package/docs/previews/media-files-camera.webp +0 -0
- package/docs/previews/navigation-layout-stepper.webp +0 -0
- package/docs/roadmap.md +37 -3
- package/docs/troubleshooting.md +109 -0
- package/package.json +1 -1
- package/dist/flowDiagram-KWPJA3E3-PC80XOp8.js +0 -17
- package/dist/isArrayLikeObject-CCJDO2RL.js +0 -86
- package/dist/lib/components/ui/media/camera/camera.provider.d.ts +0 -6
- package/dist/lib/components/ui/media/camera/state/index.d.ts +0 -2
- package/dist/lib/components/ui/media/camera/utils/index.d.ts +0 -1
- package/dist/lib-DIj5dvbb.js +0 -367
- package/dist/merge-Dm-kHFxo.js +0 -172
- package/dist/swimlanesDiagram-TC7HE7FX-DaXG362E.js +0 -28
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { $ as e, Q as t,
|
|
2
|
-
import { t as
|
|
3
|
-
import { t as
|
|
4
|
-
import { X as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import * as
|
|
7
|
-
import
|
|
8
|
-
import { layerOf as
|
|
1
|
+
import { $ as e, Q as t, _t as n, at as r, d as i, dt as a, et as o, f as s, ft as c, ht as l, i as u, it as d, l as f, lt as p, m, n as h, nt as g, ot as _, p as v, pt as y, r as b, rt as x, st as S, t as C, tt as w } from "./icon-button-BxySFfrr.js";
|
|
2
|
+
import { t as T } from "./utils-UBn-46YY.js";
|
|
3
|
+
import { t as E } from "./use-material-translation-UbARR81K.js";
|
|
4
|
+
import { X as ee } from "lucide-react";
|
|
5
|
+
import { Fragment as te, jsx as D, jsxs as ne } from "react/jsx-runtime";
|
|
6
|
+
import * as O from "react";
|
|
7
|
+
import k, { Activity as re, createContext as ie, isValidElement as ae, use as A, useCallback as oe, useContext as se, useEffect as ce, useId as le, useMemo as ue, useRef as de, useState as fe } from "react";
|
|
8
|
+
import { layerOf as pe, openerOf as me } from "@nxgt/material-core/field-blur-layers";
|
|
9
9
|
//#region ../../node_modules/@radix-ui/react-focus-scope/dist/index.mjs
|
|
10
|
-
var
|
|
10
|
+
var he = Object.defineProperty, j = (e, t) => he(e, "name", {
|
|
11
11
|
value: t,
|
|
12
12
|
configurable: !0
|
|
13
|
-
}),
|
|
13
|
+
}), ge = "focusScope.autoFocusOnMount", _e = "focusScope.autoFocusOnUnmount", ve = {
|
|
14
14
|
bubbles: !1,
|
|
15
15
|
cancelable: !0
|
|
16
|
-
},
|
|
17
|
-
let { loop: n = !1, trapped: r = !1, onMountAutoFocus: i, onUnmountAutoFocus:
|
|
16
|
+
}, ye = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ j(function(e, t) {
|
|
17
|
+
let { loop: n = !1, trapped: r = !1, onMountAutoFocus: i, onUnmountAutoFocus: a, ...o } = e, [s, c] = O.useState(null), u = w(i), d = w(a), f = O.useRef(null), m = l(t, c), h = O.useRef({
|
|
18
18
|
paused: !1,
|
|
19
19
|
pause() {
|
|
20
20
|
this.paused = !0;
|
|
@@ -23,22 +23,22 @@ var de = Object.defineProperty, M = (e, t) => de(e, "name", {
|
|
|
23
23
|
this.paused = !1;
|
|
24
24
|
}
|
|
25
25
|
}).current;
|
|
26
|
-
|
|
26
|
+
O.useEffect(() => {
|
|
27
27
|
if (r) {
|
|
28
28
|
let e = function(e) {
|
|
29
|
-
if (
|
|
29
|
+
if (h.paused || !s) return;
|
|
30
30
|
let t = e.target;
|
|
31
|
-
|
|
31
|
+
s.contains(t) ? f.current = t : M(f.current, { select: !0 });
|
|
32
32
|
}, t = function(e) {
|
|
33
|
-
if (
|
|
33
|
+
if (h.paused || !s) return;
|
|
34
34
|
let t = e.relatedTarget;
|
|
35
|
-
t !== null && (
|
|
35
|
+
t !== null && (s.contains(t) || M(f.current, { select: !0 }));
|
|
36
36
|
}, n = function(e) {
|
|
37
|
-
if (document.activeElement === document.body) for (let t of e) t.removedNodes.length > 0 &&
|
|
37
|
+
if (document.activeElement === document.body) for (let t of e) t.removedNodes.length > 0 && M(s);
|
|
38
38
|
};
|
|
39
|
-
|
|
39
|
+
j(e, "handleFocusIn"), j(t, "handleFocusOut"), j(n, "handleMutations"), document.addEventListener("focusin", e), document.addEventListener("focusout", t);
|
|
40
40
|
let r = new MutationObserver(n);
|
|
41
|
-
return
|
|
41
|
+
return s && r.observe(s, {
|
|
42
42
|
childList: !0,
|
|
43
43
|
subtree: !0
|
|
44
44
|
}), () => {
|
|
@@ -47,73 +47,73 @@ var de = Object.defineProperty, M = (e, t) => de(e, "name", {
|
|
|
47
47
|
}
|
|
48
48
|
}, [
|
|
49
49
|
r,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
]),
|
|
53
|
-
if (
|
|
54
|
-
|
|
50
|
+
s,
|
|
51
|
+
h.paused
|
|
52
|
+
]), O.useEffect(() => {
|
|
53
|
+
if (s) {
|
|
54
|
+
Ee.add(h);
|
|
55
55
|
let e = document.activeElement;
|
|
56
|
-
if (!
|
|
57
|
-
let t = new CustomEvent(
|
|
58
|
-
|
|
56
|
+
if (!s.contains(e)) {
|
|
57
|
+
let t = new CustomEvent(ge, ve);
|
|
58
|
+
s.addEventListener(ge, u), s.dispatchEvent(t), t.defaultPrevented || (be(ke(Se(s)), { select: !0 }), document.activeElement === e && M(s));
|
|
59
59
|
}
|
|
60
60
|
return () => {
|
|
61
|
-
|
|
62
|
-
let t = new CustomEvent(
|
|
63
|
-
|
|
61
|
+
s.removeEventListener(ge, u), setTimeout(() => {
|
|
62
|
+
let t = new CustomEvent(_e, ve);
|
|
63
|
+
s.addEventListener(_e, d), s.dispatchEvent(t), t.defaultPrevented || M(e ?? document.body, { select: !0 }), s.removeEventListener(_e, d), Ee.remove(h);
|
|
64
64
|
}, 0);
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
}, [
|
|
68
|
-
|
|
68
|
+
s,
|
|
69
|
+
u,
|
|
69
70
|
d,
|
|
70
|
-
|
|
71
|
-
g
|
|
71
|
+
h
|
|
72
72
|
]);
|
|
73
|
-
let
|
|
74
|
-
if (!n && !r ||
|
|
73
|
+
let g = O.useCallback((e) => {
|
|
74
|
+
if (!n && !r || h.paused) return;
|
|
75
75
|
let t = e.key === "Tab" && !e.altKey && !e.ctrlKey && !e.metaKey, i = document.activeElement;
|
|
76
76
|
if (t && i) {
|
|
77
|
-
let t = e.currentTarget, [r, a] =
|
|
78
|
-
r && a ? !e.shiftKey && i === a ? (e.preventDefault(), n &&
|
|
77
|
+
let t = e.currentTarget, [r, a] = xe(t);
|
|
78
|
+
r && a ? !e.shiftKey && i === a ? (e.preventDefault(), n && M(r, { select: !0 })) : e.shiftKey && i === r && (e.preventDefault(), n && M(a, { select: !0 })) : i === t && e.preventDefault();
|
|
79
79
|
}
|
|
80
80
|
}, [
|
|
81
81
|
n,
|
|
82
82
|
r,
|
|
83
|
-
|
|
83
|
+
h.paused
|
|
84
84
|
]);
|
|
85
|
-
return /* @__PURE__ */ D(
|
|
85
|
+
return /* @__PURE__ */ D(p.div, {
|
|
86
86
|
tabIndex: -1,
|
|
87
|
-
...
|
|
88
|
-
ref:
|
|
89
|
-
onKeyDown:
|
|
87
|
+
...o,
|
|
88
|
+
ref: m,
|
|
89
|
+
onKeyDown: g
|
|
90
90
|
});
|
|
91
91
|
}, "FocusScope"));
|
|
92
|
-
function
|
|
92
|
+
function be(e, { select: t = !1 } = {}) {
|
|
93
93
|
let n = document.activeElement;
|
|
94
|
-
for (let r of e) if (
|
|
94
|
+
for (let r of e) if (M(r, { select: t }), document.activeElement !== n) return;
|
|
95
95
|
}
|
|
96
|
-
|
|
97
|
-
function
|
|
98
|
-
let t =
|
|
99
|
-
return [
|
|
96
|
+
j(be, "focusFirst");
|
|
97
|
+
function xe(e) {
|
|
98
|
+
let t = Se(e);
|
|
99
|
+
return [Ce(t, e), Ce(t.reverse(), e)];
|
|
100
100
|
}
|
|
101
|
-
|
|
102
|
-
function
|
|
103
|
-
let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: /* @__PURE__ */
|
|
101
|
+
j(xe, "getTabbableEdges");
|
|
102
|
+
function Se(e) {
|
|
103
|
+
let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: /* @__PURE__ */ j((e) => {
|
|
104
104
|
let t = e.tagName === "INPUT" && e.type === "hidden";
|
|
105
105
|
return e.disabled || e.hidden || t ? NodeFilter.FILTER_SKIP : e.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
106
106
|
}, "acceptNode") });
|
|
107
107
|
for (; n.nextNode();) t.push(n.currentNode);
|
|
108
108
|
return t;
|
|
109
109
|
}
|
|
110
|
-
|
|
111
|
-
function
|
|
110
|
+
j(Se, "getTabbableCandidates");
|
|
111
|
+
function Ce(e, t) {
|
|
112
112
|
let n = typeof t.checkVisibility == "function" && t.checkVisibility({ checkVisibilityCSS: !0 });
|
|
113
|
-
for (let r of e) if (!(n ? !r.checkVisibility({ checkVisibilityCSS: !0 }) :
|
|
113
|
+
for (let r of e) if (!(n ? !r.checkVisibility({ checkVisibilityCSS: !0 }) : we(r, { upTo: t }))) return r;
|
|
114
114
|
}
|
|
115
|
-
|
|
116
|
-
function
|
|
115
|
+
j(Ce, "findVisible");
|
|
116
|
+
function we(e, { upTo: t }) {
|
|
117
117
|
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
118
118
|
for (; e;) {
|
|
119
119
|
if (t !== void 0 && e === t) return !1;
|
|
@@ -122,102 +122,102 @@ function be(e, { upTo: t }) {
|
|
|
122
122
|
}
|
|
123
123
|
return !1;
|
|
124
124
|
}
|
|
125
|
-
|
|
126
|
-
function
|
|
125
|
+
j(we, "isHidden");
|
|
126
|
+
function Te(e) {
|
|
127
127
|
return e instanceof HTMLInputElement && "select" in e;
|
|
128
128
|
}
|
|
129
|
-
|
|
130
|
-
function
|
|
129
|
+
j(Te, "isSelectableInput");
|
|
130
|
+
function M(e, { select: t = !1 } = {}) {
|
|
131
131
|
if (e && e.focus) {
|
|
132
132
|
let n = document.activeElement;
|
|
133
|
-
e.focus({ preventScroll: !0 }), e !== n &&
|
|
133
|
+
e.focus({ preventScroll: !0 }), e !== n && Te(e) && t && e.select();
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
M
|
|
137
|
-
var
|
|
138
|
-
function
|
|
136
|
+
j(M, "focus");
|
|
137
|
+
var Ee = De();
|
|
138
|
+
function De() {
|
|
139
139
|
let e = [];
|
|
140
140
|
return {
|
|
141
141
|
add(t) {
|
|
142
142
|
let n = e[0];
|
|
143
|
-
t !== n && n?.pause(), e =
|
|
143
|
+
t !== n && n?.pause(), e = Oe(e, t), e.unshift(t);
|
|
144
144
|
},
|
|
145
145
|
remove(t) {
|
|
146
|
-
e =
|
|
146
|
+
e = Oe(e, t), e[0]?.resume();
|
|
147
147
|
}
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
|
-
|
|
151
|
-
function
|
|
150
|
+
j(De, "createFocusScopesStack");
|
|
151
|
+
function Oe(e, t) {
|
|
152
152
|
let n = [...e], r = n.indexOf(t);
|
|
153
153
|
return r !== -1 && n.splice(r, 1), n;
|
|
154
154
|
}
|
|
155
|
-
|
|
156
|
-
function
|
|
155
|
+
j(Oe, "arrayRemove");
|
|
156
|
+
function ke(e) {
|
|
157
157
|
return e.filter((e) => e.tagName !== "A");
|
|
158
158
|
}
|
|
159
|
-
|
|
159
|
+
j(ke, "removeLinks");
|
|
160
160
|
//#endregion
|
|
161
161
|
//#region ../../node_modules/@radix-ui/react-focus-guards/dist/index.mjs
|
|
162
|
-
var
|
|
162
|
+
var Ae = Object.defineProperty, je = (e, t) => Ae(e, "name", {
|
|
163
163
|
value: t,
|
|
164
164
|
configurable: !0
|
|
165
|
-
}),
|
|
166
|
-
function
|
|
167
|
-
return
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
function
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
start:
|
|
174
|
-
end:
|
|
165
|
+
}), Me = 0, Ne = null;
|
|
166
|
+
function Pe(e) {
|
|
167
|
+
return Fe(), e.children;
|
|
168
|
+
}
|
|
169
|
+
je(Pe, "FocusGuards");
|
|
170
|
+
function Fe() {
|
|
171
|
+
O.useEffect(() => {
|
|
172
|
+
Ne ||= {
|
|
173
|
+
start: Ie(),
|
|
174
|
+
end: Ie()
|
|
175
175
|
};
|
|
176
|
-
let { start: e, end: t } =
|
|
177
|
-
return document.body.firstElementChild !== e && document.body.insertAdjacentElement("afterbegin", e), document.body.lastElementChild !== t && document.body.insertAdjacentElement("beforeend", t),
|
|
178
|
-
|
|
176
|
+
let { start: e, end: t } = Ne;
|
|
177
|
+
return document.body.firstElementChild !== e && document.body.insertAdjacentElement("afterbegin", e), document.body.lastElementChild !== t && document.body.insertAdjacentElement("beforeend", t), Me++, () => {
|
|
178
|
+
Me === 1 && (Ne?.start.remove(), Ne?.end.remove(), Ne = null), Me = Math.max(0, Me - 1);
|
|
179
179
|
};
|
|
180
180
|
}, []);
|
|
181
181
|
}
|
|
182
|
-
|
|
183
|
-
function
|
|
182
|
+
je(Fe, "useFocusGuards");
|
|
183
|
+
function Ie() {
|
|
184
184
|
let e = document.createElement("span");
|
|
185
185
|
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
186
186
|
}
|
|
187
|
-
|
|
187
|
+
je(Ie, "createFocusGuard");
|
|
188
188
|
//#endregion
|
|
189
189
|
//#region ../../node_modules/tslib/tslib.es6.mjs
|
|
190
|
-
function
|
|
190
|
+
function Le(e, t) {
|
|
191
191
|
var n = {};
|
|
192
192
|
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
193
193
|
if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, r = Object.getOwnPropertySymbols(e); i < r.length; i++) t.indexOf(r[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[i]) && (n[r[i]] = e[r[i]]);
|
|
194
194
|
return n;
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function Re(e, t, n) {
|
|
197
197
|
if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
|
|
198
198
|
return e.concat(a || Array.prototype.slice.call(t));
|
|
199
199
|
}
|
|
200
|
-
var
|
|
201
|
-
|
|
202
|
-
return
|
|
200
|
+
var N, ze = n((() => {
|
|
201
|
+
N = function() {
|
|
202
|
+
return N = Object.assign || function(e) {
|
|
203
203
|
for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
|
|
204
204
|
return e;
|
|
205
|
-
},
|
|
205
|
+
}, N.apply(this, arguments);
|
|
206
206
|
};
|
|
207
207
|
}));
|
|
208
208
|
//#endregion
|
|
209
209
|
//#region ../../node_modules/react-remove-scroll-bar/dist/es2015/constants.js
|
|
210
|
-
|
|
211
|
-
var
|
|
210
|
+
ze();
|
|
211
|
+
var Be = "right-scroll-bar-position", Ve = "width-before-scroll-bar", He = "with-scroll-bars-hidden", Ue = "--removed-body-scroll-bar-size";
|
|
212
212
|
//#endregion
|
|
213
213
|
//#region ../../node_modules/use-callback-ref/dist/es2015/assignRef.js
|
|
214
|
-
function
|
|
214
|
+
function We(e, t) {
|
|
215
215
|
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
216
216
|
}
|
|
217
217
|
//#endregion
|
|
218
218
|
//#region ../../node_modules/use-callback-ref/dist/es2015/useRef.js
|
|
219
|
-
function
|
|
220
|
-
var n =
|
|
219
|
+
function Ge(e, t) {
|
|
220
|
+
var n = fe(function() {
|
|
221
221
|
return {
|
|
222
222
|
value: e,
|
|
223
223
|
callback: t,
|
|
@@ -236,33 +236,33 @@ function Ve(e, t) {
|
|
|
236
236
|
}
|
|
237
237
|
//#endregion
|
|
238
238
|
//#region ../../node_modules/use-callback-ref/dist/es2015/useMergeRef.js
|
|
239
|
-
var
|
|
240
|
-
function
|
|
241
|
-
var n =
|
|
239
|
+
var Ke = typeof window < "u" ? O.useLayoutEffect : O.useEffect, qe = /* @__PURE__ */ new WeakMap();
|
|
240
|
+
function Je(e, t) {
|
|
241
|
+
var n = Ge(t || null, function(t) {
|
|
242
242
|
return e.forEach(function(e) {
|
|
243
|
-
return
|
|
243
|
+
return We(e, t);
|
|
244
244
|
});
|
|
245
245
|
});
|
|
246
|
-
return
|
|
247
|
-
var t =
|
|
246
|
+
return Ke(function() {
|
|
247
|
+
var t = qe.get(n);
|
|
248
248
|
if (t) {
|
|
249
249
|
var r = new Set(t), i = new Set(e), a = n.current;
|
|
250
250
|
r.forEach(function(e) {
|
|
251
|
-
i.has(e) ||
|
|
251
|
+
i.has(e) || We(e, null);
|
|
252
252
|
}), i.forEach(function(e) {
|
|
253
|
-
r.has(e) ||
|
|
253
|
+
r.has(e) || We(e, a);
|
|
254
254
|
});
|
|
255
255
|
}
|
|
256
|
-
|
|
256
|
+
qe.set(n, e);
|
|
257
257
|
}, [e]), n;
|
|
258
258
|
}
|
|
259
259
|
//#endregion
|
|
260
260
|
//#region ../../node_modules/use-sidecar/dist/es2015/medium.js
|
|
261
|
-
function
|
|
261
|
+
function Ye(e) {
|
|
262
262
|
return e;
|
|
263
263
|
}
|
|
264
|
-
function
|
|
265
|
-
t === void 0 && (t =
|
|
264
|
+
function Xe(e, t) {
|
|
265
|
+
t === void 0 && (t = Ye);
|
|
266
266
|
var n = [], r = !1;
|
|
267
267
|
return {
|
|
268
268
|
read: function() {
|
|
@@ -315,40 +315,40 @@ function Ke(e, t) {
|
|
|
315
315
|
}
|
|
316
316
|
};
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function Ze(e) {
|
|
319
319
|
e === void 0 && (e = {});
|
|
320
|
-
var t =
|
|
321
|
-
return t.options =
|
|
320
|
+
var t = Xe(null);
|
|
321
|
+
return t.options = N({
|
|
322
322
|
async: !0,
|
|
323
323
|
ssr: !1
|
|
324
324
|
}, e), t;
|
|
325
325
|
}
|
|
326
326
|
//#endregion
|
|
327
327
|
//#region ../../node_modules/use-sidecar/dist/es2015/exports.js
|
|
328
|
-
|
|
329
|
-
var
|
|
330
|
-
var t = e.sideCar, n =
|
|
328
|
+
ze();
|
|
329
|
+
var Qe = function(e) {
|
|
330
|
+
var t = e.sideCar, n = Le(e, ["sideCar"]);
|
|
331
331
|
if (!t) throw Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
332
332
|
var r = t.read();
|
|
333
333
|
if (!r) throw Error("Sidecar medium not found");
|
|
334
|
-
return
|
|
334
|
+
return O.createElement(r, N({}, n));
|
|
335
335
|
};
|
|
336
|
-
|
|
337
|
-
function
|
|
338
|
-
return e.useMedium(t),
|
|
336
|
+
Qe.isSideCarExport = !0;
|
|
337
|
+
function $e(e, t) {
|
|
338
|
+
return e.useMedium(t), Qe;
|
|
339
339
|
}
|
|
340
340
|
//#endregion
|
|
341
341
|
//#region ../../node_modules/react-remove-scroll/dist/es2015/medium.js
|
|
342
|
-
var
|
|
342
|
+
var et = Ze();
|
|
343
343
|
//#endregion
|
|
344
344
|
//#region ../../node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
345
|
-
|
|
346
|
-
var
|
|
347
|
-
var n =
|
|
348
|
-
onScrollCapture:
|
|
349
|
-
onWheelCapture:
|
|
350
|
-
onTouchMoveCapture:
|
|
351
|
-
}), i = r[0], a = r[1], o = e.forwardProps, s = e.children, c = e.className, l = e.removeScrollBar, u = e.enabled, d = e.shards, f = e.sideCar, p = e.noRelative, m = e.noIsolation, h = e.inert, g = e.allowPinchZoom, _ = e.as, v = _ === void 0 ? "div" : _, y = e.gapMode, b =
|
|
345
|
+
ze();
|
|
346
|
+
var tt = function() {}, nt = O.forwardRef(function(e, t) {
|
|
347
|
+
var n = O.useRef(null), r = O.useState({
|
|
348
|
+
onScrollCapture: tt,
|
|
349
|
+
onWheelCapture: tt,
|
|
350
|
+
onTouchMoveCapture: tt
|
|
351
|
+
}), i = r[0], a = r[1], o = e.forwardProps, s = e.children, c = e.className, l = e.removeScrollBar, u = e.enabled, d = e.shards, f = e.sideCar, p = e.noRelative, m = e.noIsolation, h = e.inert, g = e.allowPinchZoom, _ = e.as, v = _ === void 0 ? "div" : _, y = e.gapMode, b = Le(e, [
|
|
352
352
|
"forwardProps",
|
|
353
353
|
"children",
|
|
354
354
|
"className",
|
|
@@ -362,9 +362,9 @@ var Ze = function() {}, Qe = k.forwardRef(function(e, t) {
|
|
|
362
362
|
"allowPinchZoom",
|
|
363
363
|
"as",
|
|
364
364
|
"gapMode"
|
|
365
|
-
]), x = f, S =
|
|
366
|
-
return
|
|
367
|
-
sideCar:
|
|
365
|
+
]), x = f, S = Je([n, t]), C = N(N({}, b), i);
|
|
366
|
+
return O.createElement(O.Fragment, null, u && O.createElement(x, {
|
|
367
|
+
sideCar: et,
|
|
368
368
|
removeScrollBar: l,
|
|
369
369
|
shards: d,
|
|
370
370
|
noRelative: p,
|
|
@@ -374,96 +374,96 @@ var Ze = function() {}, Qe = k.forwardRef(function(e, t) {
|
|
|
374
374
|
allowPinchZoom: !!g,
|
|
375
375
|
lockRef: n,
|
|
376
376
|
gapMode: y
|
|
377
|
-
}), o ?
|
|
377
|
+
}), o ? O.cloneElement(O.Children.only(s), N(N({}, C), { ref: S })) : O.createElement(v, N({}, C, {
|
|
378
378
|
className: c,
|
|
379
379
|
ref: S
|
|
380
380
|
}), s));
|
|
381
381
|
});
|
|
382
|
-
|
|
382
|
+
nt.defaultProps = {
|
|
383
383
|
enabled: !0,
|
|
384
384
|
removeScrollBar: !0,
|
|
385
385
|
inert: !1
|
|
386
|
-
},
|
|
387
|
-
fullWidth:
|
|
388
|
-
zeroRight:
|
|
386
|
+
}, nt.classNames = {
|
|
387
|
+
fullWidth: Ve,
|
|
388
|
+
zeroRight: Be
|
|
389
389
|
};
|
|
390
390
|
//#endregion
|
|
391
391
|
//#region ../../node_modules/get-nonce/dist/es2015/index.js
|
|
392
|
-
var
|
|
393
|
-
if (
|
|
392
|
+
var rt, it = function() {
|
|
393
|
+
if (rt) return rt;
|
|
394
394
|
if (typeof __webpack_nonce__ < "u") return __webpack_nonce__;
|
|
395
395
|
};
|
|
396
396
|
//#endregion
|
|
397
397
|
//#region ../../node_modules/react-style-singleton/dist/es2015/singleton.js
|
|
398
|
-
function
|
|
398
|
+
function at() {
|
|
399
399
|
if (!document) return null;
|
|
400
400
|
var e = document.createElement("style");
|
|
401
401
|
e.type = "text/css";
|
|
402
|
-
var t =
|
|
402
|
+
var t = it();
|
|
403
403
|
return t && e.setAttribute("nonce", t), e;
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function ot(e, t) {
|
|
406
406
|
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
407
407
|
}
|
|
408
|
-
function
|
|
408
|
+
function st(e) {
|
|
409
409
|
(document.head || document.getElementsByTagName("head")[0]).appendChild(e);
|
|
410
410
|
}
|
|
411
|
-
var
|
|
411
|
+
var ct = function() {
|
|
412
412
|
var e = 0, t = null;
|
|
413
413
|
return {
|
|
414
414
|
add: function(n) {
|
|
415
|
-
e == 0 && (t =
|
|
415
|
+
e == 0 && (t = at()) && (ot(t, n), st(t)), e++;
|
|
416
416
|
},
|
|
417
417
|
remove: function() {
|
|
418
418
|
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
419
419
|
}
|
|
420
420
|
};
|
|
421
|
-
},
|
|
422
|
-
var e =
|
|
421
|
+
}, lt = function() {
|
|
422
|
+
var e = ct();
|
|
423
423
|
return function(t, n) {
|
|
424
|
-
|
|
424
|
+
O.useEffect(function() {
|
|
425
425
|
return e.add(t), function() {
|
|
426
426
|
e.remove();
|
|
427
427
|
};
|
|
428
428
|
}, [t && n]);
|
|
429
429
|
};
|
|
430
|
-
},
|
|
431
|
-
var e =
|
|
430
|
+
}, ut = function() {
|
|
431
|
+
var e = lt();
|
|
432
432
|
return function(t) {
|
|
433
433
|
var n = t.styles, r = t.dynamic;
|
|
434
434
|
return e(n, r), null;
|
|
435
435
|
};
|
|
436
|
-
},
|
|
436
|
+
}, dt = {
|
|
437
437
|
left: 0,
|
|
438
438
|
top: 0,
|
|
439
439
|
right: 0,
|
|
440
440
|
gap: 0
|
|
441
|
-
},
|
|
441
|
+
}, ft = function(e) {
|
|
442
442
|
return parseInt(e || "", 10) || 0;
|
|
443
|
-
},
|
|
443
|
+
}, pt = function(e) {
|
|
444
444
|
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], i = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
445
445
|
return [
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
446
|
+
ft(n),
|
|
447
|
+
ft(r),
|
|
448
|
+
ft(i)
|
|
449
449
|
];
|
|
450
|
-
},
|
|
451
|
-
if (e === void 0 && (e = "margin"), typeof window > "u") return
|
|
452
|
-
var t =
|
|
450
|
+
}, mt = function(e) {
|
|
451
|
+
if (e === void 0 && (e = "margin"), typeof window > "u") return dt;
|
|
452
|
+
var t = pt(e), n = document.documentElement.clientWidth, r = window.innerWidth;
|
|
453
453
|
return {
|
|
454
454
|
left: t[0],
|
|
455
455
|
top: t[1],
|
|
456
456
|
right: t[2],
|
|
457
457
|
gap: Math.max(0, r - n + t[2] - t[0])
|
|
458
458
|
};
|
|
459
|
-
},
|
|
459
|
+
}, ht = ut(), gt = "data-scroll-locked", _t = function(e, t, n, r) {
|
|
460
460
|
var i = e.left, a = e.top, o = e.right, s = e.gap;
|
|
461
461
|
return n === void 0 && (n = "margin"), `
|
|
462
|
-
.${
|
|
462
|
+
.${He} {
|
|
463
463
|
overflow: hidden ${r};
|
|
464
464
|
padding-right: ${s}px ${r};
|
|
465
465
|
}
|
|
466
|
-
body[${
|
|
466
|
+
body[${gt}] {
|
|
467
467
|
overflow: hidden ${r};
|
|
468
468
|
overscroll-behavior: contain;
|
|
469
469
|
${[
|
|
@@ -480,96 +480,96 @@ var it = function() {
|
|
|
480
480
|
].filter(Boolean).join("")}
|
|
481
481
|
}
|
|
482
482
|
|
|
483
|
-
.${
|
|
483
|
+
.${Be} {
|
|
484
484
|
right: ${s}px ${r};
|
|
485
485
|
}
|
|
486
486
|
|
|
487
|
-
.${
|
|
487
|
+
.${Ve} {
|
|
488
488
|
margin-right: ${s}px ${r};
|
|
489
489
|
}
|
|
490
490
|
|
|
491
|
-
.${
|
|
491
|
+
.${Be} .${Be} {
|
|
492
492
|
right: 0 ${r};
|
|
493
493
|
}
|
|
494
494
|
|
|
495
|
-
.${
|
|
495
|
+
.${Ve} .${Ve} {
|
|
496
496
|
margin-right: 0 ${r};
|
|
497
497
|
}
|
|
498
498
|
|
|
499
|
-
body[${
|
|
500
|
-
${
|
|
499
|
+
body[${gt}] {
|
|
500
|
+
${Ue}: ${s}px;
|
|
501
501
|
}
|
|
502
502
|
`;
|
|
503
|
-
},
|
|
503
|
+
}, vt = function() {
|
|
504
504
|
var e = parseInt(document.body.getAttribute("data-scroll-locked") || "0", 10);
|
|
505
505
|
return isFinite(e) ? e : 0;
|
|
506
|
-
},
|
|
507
|
-
|
|
508
|
-
return document.body.setAttribute(
|
|
509
|
-
var e =
|
|
510
|
-
e <= 0 ? document.body.removeAttribute(
|
|
506
|
+
}, yt = function() {
|
|
507
|
+
O.useEffect(function() {
|
|
508
|
+
return document.body.setAttribute(gt, (vt() + 1).toString()), function() {
|
|
509
|
+
var e = vt() - 1;
|
|
510
|
+
e <= 0 ? document.body.removeAttribute(gt) : document.body.setAttribute(gt, e.toString());
|
|
511
511
|
};
|
|
512
512
|
}, []);
|
|
513
|
-
},
|
|
513
|
+
}, bt = function(e) {
|
|
514
514
|
var t = e.noRelative, n = e.noImportant, r = e.gapMode, i = r === void 0 ? "margin" : r;
|
|
515
|
-
|
|
516
|
-
var a =
|
|
517
|
-
return
|
|
515
|
+
yt();
|
|
516
|
+
var a = O.useMemo(function() {
|
|
517
|
+
return mt(i);
|
|
518
518
|
}, [i]);
|
|
519
|
-
return
|
|
520
|
-
},
|
|
519
|
+
return O.createElement(ht, { styles: _t(a, !t, i, n ? "" : "!important") });
|
|
520
|
+
}, xt = !1;
|
|
521
521
|
if (typeof window < "u") try {
|
|
522
|
-
var
|
|
523
|
-
return
|
|
522
|
+
var St = Object.defineProperty({}, "passive", { get: function() {
|
|
523
|
+
return xt = !0, !0;
|
|
524
524
|
} });
|
|
525
|
-
window.addEventListener("test",
|
|
525
|
+
window.addEventListener("test", St, St), window.removeEventListener("test", St, St);
|
|
526
526
|
} catch {
|
|
527
|
-
|
|
527
|
+
xt = !1;
|
|
528
528
|
}
|
|
529
|
-
var
|
|
529
|
+
var Ct = xt ? { passive: !1 } : !1, wt = function(e) {
|
|
530
530
|
return e.tagName === "TEXTAREA";
|
|
531
|
-
},
|
|
531
|
+
}, Tt = function(e, t) {
|
|
532
532
|
if (!(e instanceof Element)) return !1;
|
|
533
533
|
var n = window.getComputedStyle(e);
|
|
534
|
-
return n[t] !== "hidden" && !(n.overflowY === n.overflowX && !
|
|
535
|
-
},
|
|
536
|
-
return
|
|
537
|
-
},
|
|
538
|
-
return
|
|
539
|
-
},
|
|
534
|
+
return n[t] !== "hidden" && !(n.overflowY === n.overflowX && !wt(e) && n[t] === "visible");
|
|
535
|
+
}, Et = function(e) {
|
|
536
|
+
return Tt(e, "overflowY");
|
|
537
|
+
}, Dt = function(e) {
|
|
538
|
+
return Tt(e, "overflowX");
|
|
539
|
+
}, Ot = function(e, t) {
|
|
540
540
|
var n = t.ownerDocument, r = t;
|
|
541
541
|
do {
|
|
542
|
-
if (typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host),
|
|
543
|
-
var i =
|
|
542
|
+
if (typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host), jt(e, r)) {
|
|
543
|
+
var i = Mt(e, r);
|
|
544
544
|
if (i[1] > i[2]) return !0;
|
|
545
545
|
}
|
|
546
546
|
r = r.parentNode;
|
|
547
547
|
} while (r && r !== n.body);
|
|
548
548
|
return !1;
|
|
549
|
-
},
|
|
549
|
+
}, kt = function(e) {
|
|
550
550
|
return [
|
|
551
551
|
e.scrollTop,
|
|
552
552
|
e.scrollHeight,
|
|
553
553
|
e.clientHeight
|
|
554
554
|
];
|
|
555
|
-
},
|
|
555
|
+
}, At = function(e) {
|
|
556
556
|
return [
|
|
557
557
|
e.scrollLeft,
|
|
558
558
|
e.scrollWidth,
|
|
559
559
|
e.clientWidth
|
|
560
560
|
];
|
|
561
|
-
},
|
|
562
|
-
return e === "v" ?
|
|
563
|
-
},
|
|
564
|
-
return e === "v" ?
|
|
565
|
-
},
|
|
561
|
+
}, jt = function(e, t) {
|
|
562
|
+
return e === "v" ? Et(t) : Dt(t);
|
|
563
|
+
}, Mt = function(e, t) {
|
|
564
|
+
return e === "v" ? kt(t) : At(t);
|
|
565
|
+
}, Nt = function(e, t) {
|
|
566
566
|
return e === "h" && t === "rtl" ? -1 : 1;
|
|
567
|
-
},
|
|
568
|
-
var a =
|
|
567
|
+
}, Pt = function(e, t, n, r, i) {
|
|
568
|
+
var a = Nt(e, window.getComputedStyle(t).direction), o = a * r, s = n.target, c = t.contains(s), l = !1, u = o > 0, d = 0, f = 0;
|
|
569
569
|
do {
|
|
570
570
|
if (!s) break;
|
|
571
|
-
var p =
|
|
572
|
-
(m || h) &&
|
|
571
|
+
var p = Mt(e, s), m = p[0], h = p[1] - p[2] - a * m;
|
|
572
|
+
(m || h) && jt(e, s) && (d += h, f += m);
|
|
573
573
|
var g = s.parentNode;
|
|
574
574
|
s = g && g.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? g.host : g;
|
|
575
575
|
} while (!c && s !== document.body || c && (t.contains(s) || t === s));
|
|
@@ -577,29 +577,29 @@ var yt = _t ? { passive: !1 } : !1, bt = function(e) {
|
|
|
577
577
|
};
|
|
578
578
|
//#endregion
|
|
579
579
|
//#region ../../node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
580
|
-
|
|
581
|
-
var
|
|
580
|
+
ze();
|
|
581
|
+
var Ft = function(e) {
|
|
582
582
|
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
583
|
-
},
|
|
583
|
+
}, It = function(e) {
|
|
584
584
|
return [e.deltaX, e.deltaY];
|
|
585
|
-
},
|
|
585
|
+
}, Lt = function(e) {
|
|
586
586
|
return e && "current" in e ? e.current : e;
|
|
587
|
-
},
|
|
587
|
+
}, Rt = function(e, t) {
|
|
588
588
|
return e[0] === t[0] && e[1] === t[1];
|
|
589
|
-
},
|
|
589
|
+
}, zt = function(e) {
|
|
590
590
|
return `
|
|
591
591
|
.block-interactivity-${e} {pointer-events: none;}
|
|
592
592
|
.allow-interactivity-${e} {pointer-events: all;}
|
|
593
593
|
`;
|
|
594
|
-
},
|
|
595
|
-
function
|
|
596
|
-
var t =
|
|
597
|
-
|
|
594
|
+
}, Bt = 0, Vt = [];
|
|
595
|
+
function Ht(e) {
|
|
596
|
+
var t = O.useRef([]), n = O.useRef([0, 0]), r = O.useRef(), i = O.useState(Bt++)[0], a = O.useState(ut)[0], o = O.useRef(e);
|
|
597
|
+
O.useEffect(function() {
|
|
598
598
|
o.current = e;
|
|
599
|
-
}, [e]),
|
|
599
|
+
}, [e]), O.useEffect(function() {
|
|
600
600
|
if (e.inert) {
|
|
601
601
|
document.body.classList.add(`block-interactivity-${i}`);
|
|
602
|
-
var t =
|
|
602
|
+
var t = Re([e.lockRef.current], (e.shards || []).map(Lt), !0).filter(Boolean);
|
|
603
603
|
return t.forEach(function(e) {
|
|
604
604
|
return e.classList.add(`allow-interactivity-${i}`);
|
|
605
605
|
}), function() {
|
|
@@ -613,107 +613,107 @@ function Rt(e) {
|
|
|
613
613
|
e.lockRef.current,
|
|
614
614
|
e.shards
|
|
615
615
|
]);
|
|
616
|
-
var s =
|
|
616
|
+
var s = O.useCallback(function(e, t) {
|
|
617
617
|
if ("touches" in e && e.touches.length === 2 || e.type === "wheel" && e.ctrlKey) return !o.current.allowPinchZoom;
|
|
618
|
-
var i =
|
|
618
|
+
var i = Ft(e), a = n.current, s = "deltaX" in e ? e.deltaX : a[0] - i[0], c = "deltaY" in e ? e.deltaY : a[1] - i[1], l, u = e.target, d = Math.abs(s) > Math.abs(c) ? "h" : "v";
|
|
619
619
|
if ("touches" in e && d === "h" && u.type === "range") return !1;
|
|
620
620
|
var f = window.getSelection(), p = f && f.anchorNode;
|
|
621
621
|
if (p && (p === u || p.contains(u))) return !1;
|
|
622
|
-
var m =
|
|
622
|
+
var m = Ot(d, u);
|
|
623
623
|
if (!m) return !0;
|
|
624
|
-
if (m ? l = d : (l = d === "v" ? "h" : "v", m =
|
|
624
|
+
if (m ? l = d : (l = d === "v" ? "h" : "v", m = Ot(d, u)), !m) return !1;
|
|
625
625
|
if (!r.current && "changedTouches" in e && (s || c) && (r.current = l), !l) return !0;
|
|
626
626
|
var h = r.current || l;
|
|
627
|
-
return
|
|
628
|
-
}, []), c =
|
|
627
|
+
return Pt(h, t, e, h === "h" ? s : c, !0);
|
|
628
|
+
}, []), c = O.useCallback(function(e) {
|
|
629
629
|
var n = e;
|
|
630
|
-
if (!(!
|
|
631
|
-
var r = "deltaY" in n ?
|
|
632
|
-
return e.name === n.type && (e.target === n.target || n.target === e.shadowParent) &&
|
|
630
|
+
if (!(!Vt.length || Vt[Vt.length - 1] !== a)) {
|
|
631
|
+
var r = "deltaY" in n ? It(n) : Ft(n), i = t.current.filter(function(e) {
|
|
632
|
+
return e.name === n.type && (e.target === n.target || n.target === e.shadowParent) && Rt(e.delta, r);
|
|
633
633
|
})[0];
|
|
634
634
|
if (i && i.should) {
|
|
635
635
|
n.cancelable && n.preventDefault();
|
|
636
636
|
return;
|
|
637
637
|
}
|
|
638
638
|
if (!i) {
|
|
639
|
-
var c = (o.current.shards || []).map(
|
|
639
|
+
var c = (o.current.shards || []).map(Lt).filter(Boolean).filter(function(e) {
|
|
640
640
|
return e.contains(n.target);
|
|
641
641
|
});
|
|
642
642
|
(c.length > 0 ? s(n, c[0]) : !o.current.noIsolation) && n.cancelable && n.preventDefault();
|
|
643
643
|
}
|
|
644
644
|
}
|
|
645
|
-
}, []), l =
|
|
645
|
+
}, []), l = O.useCallback(function(e, n, r, i) {
|
|
646
646
|
var a = {
|
|
647
647
|
name: e,
|
|
648
648
|
delta: n,
|
|
649
649
|
target: r,
|
|
650
650
|
should: i,
|
|
651
|
-
shadowParent:
|
|
651
|
+
shadowParent: Ut(r)
|
|
652
652
|
};
|
|
653
653
|
t.current.push(a), setTimeout(function() {
|
|
654
654
|
t.current = t.current.filter(function(e) {
|
|
655
655
|
return e !== a;
|
|
656
656
|
});
|
|
657
657
|
}, 1);
|
|
658
|
-
}, []), u =
|
|
659
|
-
n.current =
|
|
660
|
-
}, []), d =
|
|
661
|
-
l(t.type,
|
|
662
|
-
}, []), f =
|
|
663
|
-
l(t.type,
|
|
658
|
+
}, []), u = O.useCallback(function(e) {
|
|
659
|
+
n.current = Ft(e), r.current = void 0;
|
|
660
|
+
}, []), d = O.useCallback(function(t) {
|
|
661
|
+
l(t.type, It(t), t.target, s(t, e.lockRef.current));
|
|
662
|
+
}, []), f = O.useCallback(function(t) {
|
|
663
|
+
l(t.type, Ft(t), t.target, s(t, e.lockRef.current));
|
|
664
664
|
}, []);
|
|
665
|
-
|
|
666
|
-
return
|
|
665
|
+
O.useEffect(function() {
|
|
666
|
+
return Vt.push(a), e.setCallbacks({
|
|
667
667
|
onScrollCapture: d,
|
|
668
668
|
onWheelCapture: d,
|
|
669
669
|
onTouchMoveCapture: f
|
|
670
|
-
}), document.addEventListener("wheel", c,
|
|
671
|
-
|
|
670
|
+
}), document.addEventListener("wheel", c, Ct), document.addEventListener("touchmove", c, Ct), document.addEventListener("touchstart", u, Ct), function() {
|
|
671
|
+
Vt = Vt.filter(function(e) {
|
|
672
672
|
return e !== a;
|
|
673
|
-
}), document.removeEventListener("wheel", c,
|
|
673
|
+
}), document.removeEventListener("wheel", c, Ct), document.removeEventListener("touchmove", c, Ct), document.removeEventListener("touchstart", u, Ct);
|
|
674
674
|
};
|
|
675
675
|
}, []);
|
|
676
676
|
var p = e.removeScrollBar, m = e.inert;
|
|
677
|
-
return
|
|
677
|
+
return O.createElement(O.Fragment, null, m ? O.createElement(a, { styles: zt(i) }) : null, p ? O.createElement(bt, {
|
|
678
678
|
noRelative: e.noRelative,
|
|
679
679
|
gapMode: e.gapMode
|
|
680
680
|
}) : null);
|
|
681
681
|
}
|
|
682
|
-
function
|
|
682
|
+
function Ut(e) {
|
|
683
683
|
for (var t = null; e !== null;) e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
684
684
|
return t;
|
|
685
685
|
}
|
|
686
686
|
//#endregion
|
|
687
687
|
//#region ../../node_modules/react-remove-scroll/dist/es2015/sidecar.js
|
|
688
|
-
var
|
|
688
|
+
var Wt = $e(et, Ht);
|
|
689
689
|
//#endregion
|
|
690
690
|
//#region ../../node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
691
|
-
|
|
692
|
-
var
|
|
693
|
-
return
|
|
691
|
+
ze();
|
|
692
|
+
var Gt = O.forwardRef(function(e, t) {
|
|
693
|
+
return O.createElement(nt, N({}, e, {
|
|
694
694
|
ref: t,
|
|
695
|
-
sideCar:
|
|
695
|
+
sideCar: Wt
|
|
696
696
|
}));
|
|
697
697
|
});
|
|
698
|
-
|
|
698
|
+
Gt.classNames = nt.classNames;
|
|
699
699
|
//#endregion
|
|
700
700
|
//#region ../../node_modules/aria-hidden/dist/es2015/index.js
|
|
701
|
-
var
|
|
701
|
+
var Kt = function(e) {
|
|
702
702
|
return typeof document > "u" ? null : (Array.isArray(e) ? e[0] : e).ownerDocument.body;
|
|
703
|
-
},
|
|
704
|
-
return e && (e.host ||
|
|
705
|
-
},
|
|
703
|
+
}, qt = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new WeakMap(), Yt = {}, Xt = 0, Zt = function(e) {
|
|
704
|
+
return e && (e.host || Zt(e.parentNode));
|
|
705
|
+
}, Qt = function(e, t) {
|
|
706
706
|
return t.map(function(t) {
|
|
707
707
|
if (e.contains(t)) return t;
|
|
708
|
-
var n =
|
|
708
|
+
var n = Zt(t);
|
|
709
709
|
return n && e.contains(n) ? n : (console.error("aria-hidden", t, "in not contained inside", e, ". Doing nothing"), null);
|
|
710
710
|
}).filter(function(e) {
|
|
711
711
|
return !!e;
|
|
712
712
|
});
|
|
713
|
-
},
|
|
714
|
-
var i =
|
|
715
|
-
|
|
716
|
-
var a =
|
|
713
|
+
}, $t = function(e, t, n, r) {
|
|
714
|
+
var i = Qt(t, Array.isArray(e) ? e : [e]);
|
|
715
|
+
Yt[n] || (Yt[n] = /* @__PURE__ */ new WeakMap());
|
|
716
|
+
var a = Yt[n], o = [], s = /* @__PURE__ */ new Set(), c = new Set(i), l = function(e) {
|
|
717
717
|
!e || s.has(e) || (s.add(e), l(e.parentNode));
|
|
718
718
|
};
|
|
719
719
|
i.forEach(l);
|
|
@@ -721,137 +721,137 @@ var Ht = function(e) {
|
|
|
721
721
|
!e || c.has(e) || Array.prototype.forEach.call(e.children, function(e) {
|
|
722
722
|
if (s.has(e)) u(e);
|
|
723
723
|
else try {
|
|
724
|
-
var t = e.getAttribute(r), i = t !== null && t !== "false", c = (
|
|
725
|
-
|
|
724
|
+
var t = e.getAttribute(r), i = t !== null && t !== "false", c = (qt.get(e) || 0) + 1, l = (a.get(e) || 0) + 1;
|
|
725
|
+
qt.set(e, c), a.set(e, l), o.push(e), c === 1 && i && Jt.set(e, !0), l === 1 && e.setAttribute(n, "true"), i || e.setAttribute(r, "true");
|
|
726
726
|
} catch (t) {
|
|
727
727
|
console.error("aria-hidden: cannot operate on ", e, t);
|
|
728
728
|
}
|
|
729
729
|
});
|
|
730
730
|
};
|
|
731
|
-
return u(t), s.clear(),
|
|
731
|
+
return u(t), s.clear(), Xt++, function() {
|
|
732
732
|
o.forEach(function(e) {
|
|
733
|
-
var t =
|
|
734
|
-
|
|
735
|
-
}),
|
|
733
|
+
var t = qt.get(e) - 1, i = a.get(e) - 1;
|
|
734
|
+
qt.set(e, t), a.set(e, i), t || (Jt.has(e) || e.removeAttribute(r), Jt.delete(e)), i || e.removeAttribute(n);
|
|
735
|
+
}), Xt--, Xt || (qt = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new WeakMap(), Yt = {});
|
|
736
736
|
};
|
|
737
|
-
},
|
|
737
|
+
}, en = function(e, t, n) {
|
|
738
738
|
n === void 0 && (n = "data-aria-hidden");
|
|
739
|
-
var r = Array.from(Array.isArray(e) ? e : [e]), i = t ||
|
|
740
|
-
return i ? (r.push.apply(r, Array.from(i.querySelectorAll("[aria-live], script"))),
|
|
739
|
+
var r = Array.from(Array.isArray(e) ? e : [e]), i = t || Kt(e);
|
|
740
|
+
return i ? (r.push.apply(r, Array.from(i.querySelectorAll("[aria-live], script"))), $t(r, i, n, "aria-hidden")) : function() {
|
|
741
741
|
return null;
|
|
742
742
|
};
|
|
743
|
-
},
|
|
743
|
+
}, tn = Object.defineProperty, P = (e, t) => tn(e, "name", {
|
|
744
744
|
value: t,
|
|
745
745
|
configurable: !0
|
|
746
|
-
}),
|
|
747
|
-
let { __scopeDialog: t, children: n, open: r, defaultOpen: i, onOpenChange: a, modal: o = !0 } = e, s =
|
|
746
|
+
}), nn = "Dialog", [rn, an] = S(nn), [on, F] = rn(nn), sn = /* @__PURE__ */ P((e) => {
|
|
747
|
+
let { __scopeDialog: t, children: n, open: r, defaultOpen: i, onOpenChange: a, modal: o = !0 } = e, s = O.useRef(null), c = O.useRef(null), [l, u] = d({
|
|
748
748
|
prop: r,
|
|
749
749
|
defaultProp: i ?? !1,
|
|
750
750
|
onChange: a,
|
|
751
|
-
caller:
|
|
752
|
-
}), [
|
|
753
|
-
return /* @__PURE__ */ D(
|
|
751
|
+
caller: nn
|
|
752
|
+
}), [f, p] = O.useState(0), [m, h] = O.useState(0);
|
|
753
|
+
return /* @__PURE__ */ D(on, {
|
|
754
754
|
scope: t,
|
|
755
755
|
triggerRef: s,
|
|
756
756
|
contentRef: c,
|
|
757
|
-
contentId:
|
|
758
|
-
titleId:
|
|
759
|
-
descriptionId:
|
|
760
|
-
titlePresent:
|
|
761
|
-
descriptionPresent:
|
|
762
|
-
setTitleCount:
|
|
763
|
-
setDescriptionCount:
|
|
757
|
+
contentId: g(),
|
|
758
|
+
titleId: g(),
|
|
759
|
+
descriptionId: g(),
|
|
760
|
+
titlePresent: f > 0,
|
|
761
|
+
descriptionPresent: m > 0,
|
|
762
|
+
setTitleCount: p,
|
|
763
|
+
setDescriptionCount: h,
|
|
764
764
|
open: l,
|
|
765
765
|
onOpenChange: u,
|
|
766
|
-
onOpenToggle:
|
|
766
|
+
onOpenToggle: O.useCallback(() => u((e) => !e), [u]),
|
|
767
767
|
modal: o,
|
|
768
768
|
children: n
|
|
769
769
|
});
|
|
770
|
-
}, "Dialog"),
|
|
771
|
-
let { __scopeDialog: n, ...r } = e,
|
|
772
|
-
return /* @__PURE__ */ D(
|
|
770
|
+
}, "Dialog"), cn = "DialogTrigger", ln = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
771
|
+
let { __scopeDialog: n, ...r } = e, i = F(cn, n), a = l(t, i.triggerRef);
|
|
772
|
+
return /* @__PURE__ */ D(p.button, {
|
|
773
773
|
type: "button",
|
|
774
774
|
"aria-haspopup": "dialog",
|
|
775
|
-
"aria-expanded":
|
|
776
|
-
"aria-controls":
|
|
777
|
-
"data-state":
|
|
775
|
+
"aria-expanded": i.open,
|
|
776
|
+
"aria-controls": i.open ? i.contentId : void 0,
|
|
777
|
+
"data-state": kn(i.open),
|
|
778
778
|
...r,
|
|
779
|
-
ref:
|
|
780
|
-
onClick:
|
|
779
|
+
ref: a,
|
|
780
|
+
onClick: _(e.onClick, i.onOpenToggle)
|
|
781
781
|
});
|
|
782
|
-
}, "DialogTrigger")),
|
|
783
|
-
let { __scopeDialog:
|
|
784
|
-
return /* @__PURE__ */ D(
|
|
785
|
-
scope:
|
|
782
|
+
}, "DialogTrigger")), un = "DialogPortal", [dn, fn] = rn(un, { forceMount: void 0 }), pn = /* @__PURE__ */ P((e) => {
|
|
783
|
+
let { __scopeDialog: n, forceMount: r, children: i, container: a } = e, o = F(un, n);
|
|
784
|
+
return /* @__PURE__ */ D(dn, {
|
|
785
|
+
scope: n,
|
|
786
786
|
forceMount: r,
|
|
787
|
-
children:
|
|
787
|
+
children: O.Children.map(i, (e) => /* @__PURE__ */ D(x, {
|
|
788
788
|
present: r || o.open,
|
|
789
|
-
children: /* @__PURE__ */ D(
|
|
789
|
+
children: /* @__PURE__ */ D(t, {
|
|
790
790
|
asChild: !0,
|
|
791
791
|
container: a,
|
|
792
792
|
children: e
|
|
793
793
|
})
|
|
794
794
|
}))
|
|
795
795
|
});
|
|
796
|
-
}, "DialogPortal"),
|
|
797
|
-
let n =
|
|
798
|
-
return a.modal ? /* @__PURE__ */ D(
|
|
796
|
+
}, "DialogPortal"), mn = "DialogOverlay", hn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
797
|
+
let n = fn(mn, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, a = F(mn, e.__scopeDialog);
|
|
798
|
+
return a.modal ? /* @__PURE__ */ D(x, {
|
|
799
799
|
present: r || a.open,
|
|
800
|
-
children: /* @__PURE__ */ D(
|
|
800
|
+
children: /* @__PURE__ */ D(_n, {
|
|
801
801
|
...i,
|
|
802
802
|
ref: t
|
|
803
803
|
})
|
|
804
804
|
}) : null;
|
|
805
|
-
}, "DialogOverlay")),
|
|
806
|
-
let { __scopeDialog:
|
|
807
|
-
return /* @__PURE__ */ D(
|
|
808
|
-
as:
|
|
805
|
+
}, "DialogOverlay")), gn = y("DialogOverlay.RemoveScroll"), _n = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
806
|
+
let { __scopeDialog: n, ...r } = e, i = F(mn, n), a = l(t, o());
|
|
807
|
+
return /* @__PURE__ */ D(Gt, {
|
|
808
|
+
as: gn,
|
|
809
809
|
allowPinchZoom: !0,
|
|
810
|
-
shards: [
|
|
811
|
-
children: /* @__PURE__ */ D(
|
|
812
|
-
"data-state":
|
|
813
|
-
...
|
|
814
|
-
ref:
|
|
810
|
+
shards: [i.contentRef],
|
|
811
|
+
children: /* @__PURE__ */ D(p.div, {
|
|
812
|
+
"data-state": kn(i.open),
|
|
813
|
+
...r,
|
|
814
|
+
ref: a,
|
|
815
815
|
style: {
|
|
816
816
|
pointerEvents: "auto",
|
|
817
|
-
...
|
|
817
|
+
...r.style
|
|
818
818
|
}
|
|
819
819
|
})
|
|
820
820
|
});
|
|
821
|
-
}, "DialogOverlayImpl")),
|
|
822
|
-
let n =
|
|
823
|
-
return /* @__PURE__ */ D(
|
|
821
|
+
}, "DialogOverlayImpl")), vn = "DialogContent", yn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
822
|
+
let n = fn(vn, e.__scopeDialog), { forceMount: r = n.forceMount, ...i } = e, a = F(vn, e.__scopeDialog);
|
|
823
|
+
return /* @__PURE__ */ D(x, {
|
|
824
824
|
present: r || a.open,
|
|
825
|
-
children: a.modal ? /* @__PURE__ */ D(
|
|
825
|
+
children: a.modal ? /* @__PURE__ */ D(bn, {
|
|
826
826
|
...i,
|
|
827
827
|
ref: t
|
|
828
|
-
}) : /* @__PURE__ */ D(
|
|
828
|
+
}) : /* @__PURE__ */ D(xn, {
|
|
829
829
|
...i,
|
|
830
830
|
ref: t
|
|
831
831
|
})
|
|
832
832
|
});
|
|
833
|
-
}, "DialogContent")),
|
|
834
|
-
let n =
|
|
835
|
-
return
|
|
833
|
+
}, "DialogContent")), bn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
834
|
+
let n = F(vn, e.__scopeDialog), r = O.useRef(null), i = l(t, n.contentRef, r);
|
|
835
|
+
return O.useEffect(() => {
|
|
836
836
|
let e = r.current;
|
|
837
|
-
if (e) return
|
|
838
|
-
}, []), /* @__PURE__ */ D(
|
|
837
|
+
if (e) return en(e);
|
|
838
|
+
}, []), /* @__PURE__ */ D(Sn, {
|
|
839
839
|
...e,
|
|
840
|
-
ref:
|
|
840
|
+
ref: i,
|
|
841
841
|
trapFocus: n.open,
|
|
842
842
|
disableOutsidePointerEvents: n.open,
|
|
843
|
-
onCloseAutoFocus:
|
|
843
|
+
onCloseAutoFocus: _(e.onCloseAutoFocus, (e) => {
|
|
844
844
|
e.preventDefault(), n.triggerRef.current?.focus();
|
|
845
845
|
}),
|
|
846
|
-
onPointerDownOutside:
|
|
846
|
+
onPointerDownOutside: _(e.onPointerDownOutside, (e) => {
|
|
847
847
|
let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0;
|
|
848
848
|
(t.button === 2 || n) && e.preventDefault();
|
|
849
849
|
}),
|
|
850
|
-
onFocusOutside:
|
|
850
|
+
onFocusOutside: _(e.onFocusOutside, (e) => e.preventDefault())
|
|
851
851
|
});
|
|
852
|
-
}, "DialogContentModal")),
|
|
853
|
-
let n =
|
|
854
|
-
return /* @__PURE__ */ D(
|
|
852
|
+
}, "DialogContentModal")), xn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
853
|
+
let n = F(vn, e.__scopeDialog), r = O.useRef(!1), i = O.useRef(!1);
|
|
854
|
+
return /* @__PURE__ */ D(Sn, {
|
|
855
855
|
...e,
|
|
856
856
|
ref: t,
|
|
857
857
|
trapFocus: !1,
|
|
@@ -865,151 +865,151 @@ var Ht = function(e) {
|
|
|
865
865
|
n.triggerRef.current?.contains(a) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && i.current && t.preventDefault();
|
|
866
866
|
}
|
|
867
867
|
});
|
|
868
|
-
}, "DialogContentNonModal")),
|
|
869
|
-
let { __scopeDialog: r, trapFocus: i, onOpenAutoFocus: a, onCloseAutoFocus: o, ...s } =
|
|
870
|
-
return
|
|
868
|
+
}, "DialogContentNonModal")), Sn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ P(function(t, n) {
|
|
869
|
+
let { __scopeDialog: r, trapFocus: i, onOpenAutoFocus: a, onCloseAutoFocus: o, ...s } = t, c = F(vn, r);
|
|
870
|
+
return Fe(), /* @__PURE__ */ D(te, { children: /* @__PURE__ */ D(ye, {
|
|
871
871
|
asChild: !0,
|
|
872
872
|
loop: !0,
|
|
873
873
|
trapped: i,
|
|
874
874
|
onMountAutoFocus: a,
|
|
875
875
|
onUnmountAutoFocus: o,
|
|
876
|
-
children: /* @__PURE__ */ D(
|
|
876
|
+
children: /* @__PURE__ */ D(e, {
|
|
877
877
|
role: "dialog",
|
|
878
878
|
id: c.contentId,
|
|
879
879
|
"aria-describedby": c.descriptionPresent ? c.descriptionId : void 0,
|
|
880
880
|
"aria-labelledby": c.titlePresent ? c.titleId : void 0,
|
|
881
|
-
"data-state":
|
|
881
|
+
"data-state": kn(c.open),
|
|
882
882
|
...s,
|
|
883
883
|
ref: n,
|
|
884
884
|
deferPointerDownOutside: !0,
|
|
885
885
|
onDismiss: () => c.onOpenChange(!1)
|
|
886
886
|
})
|
|
887
887
|
}) });
|
|
888
|
-
}, "DialogContentImpl")),
|
|
889
|
-
let { __scopeDialog: n, ...
|
|
890
|
-
return
|
|
891
|
-
id:
|
|
892
|
-
...
|
|
888
|
+
}, "DialogContentImpl")), Cn = "DialogTitle", wn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
889
|
+
let { __scopeDialog: n, ...i } = e, a = F(Cn, n), { setTitleCount: o } = a;
|
|
890
|
+
return r(() => (o((e) => e + 1), () => o((e) => e - 1)), [o]), /* @__PURE__ */ D(p.h2, {
|
|
891
|
+
id: a.titleId,
|
|
892
|
+
...i,
|
|
893
893
|
ref: t
|
|
894
894
|
});
|
|
895
|
-
}, "DialogTitle")),
|
|
896
|
-
let { __scopeDialog: n, ...
|
|
897
|
-
return
|
|
898
|
-
id:
|
|
899
|
-
...
|
|
895
|
+
}, "DialogTitle")), Tn = "DialogDescription", En = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
896
|
+
let { __scopeDialog: n, ...i } = e, a = F(Tn, n), { setDescriptionCount: o } = a;
|
|
897
|
+
return r(() => (o((e) => e + 1), () => o((e) => e - 1)), [o]), /* @__PURE__ */ D(p.p, {
|
|
898
|
+
id: a.descriptionId,
|
|
899
|
+
...i,
|
|
900
900
|
ref: t
|
|
901
901
|
});
|
|
902
|
-
}, "DialogDescription")),
|
|
903
|
-
let { __scopeDialog: n, ...r } = e,
|
|
904
|
-
return /* @__PURE__ */ D(
|
|
902
|
+
}, "DialogDescription")), Dn = "DialogClose", On = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
903
|
+
let { __scopeDialog: n, ...r } = e, i = F(Dn, n);
|
|
904
|
+
return /* @__PURE__ */ D(p.button, {
|
|
905
905
|
type: "button",
|
|
906
906
|
...r,
|
|
907
907
|
ref: t,
|
|
908
|
-
onClick:
|
|
908
|
+
onClick: _(e.onClick, () => i.onOpenChange(!1))
|
|
909
909
|
});
|
|
910
910
|
}, "DialogClose"));
|
|
911
|
-
function
|
|
911
|
+
function kn(e) {
|
|
912
912
|
return e ? "open" : "closed";
|
|
913
913
|
}
|
|
914
|
-
|
|
914
|
+
P(kn, "getState");
|
|
915
915
|
//#endregion
|
|
916
916
|
//#region ../../node_modules/@radix-ui/react-label/dist/index.mjs
|
|
917
|
-
var
|
|
917
|
+
var An = Object.defineProperty, jn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ ((e, t) => An(e, "name", {
|
|
918
918
|
value: t,
|
|
919
919
|
configurable: !0
|
|
920
920
|
}))(function(e, t) {
|
|
921
|
-
return /* @__PURE__ */ D(
|
|
921
|
+
return /* @__PURE__ */ D(p.label, {
|
|
922
922
|
...e,
|
|
923
923
|
ref: t,
|
|
924
924
|
onMouseDown: (t) => {
|
|
925
925
|
t.target.closest("button, input, select, textarea") || (e.onMouseDown?.(t), !t.defaultPrevented && t.detail > 1 && t.preventDefault());
|
|
926
926
|
}
|
|
927
927
|
});
|
|
928
|
-
}, "Label")),
|
|
928
|
+
}, "Label")), Mn = Object.defineProperty, I = (e, t) => Mn(e, "name", {
|
|
929
929
|
value: t,
|
|
930
930
|
configurable: !0
|
|
931
|
-
}),
|
|
932
|
-
let { __scopeHoverCard: t, children: n, open: r, defaultOpen: i, onOpenChange: a, openDelay: o = 700, closeDelay: s = 300 } = e, c =
|
|
931
|
+
}), Nn, Pn = "HoverCard", [Fn, In] = S(Pn, [m]), Ln = m(), [Rn, zn] = Fn(Pn), Bn = /* @__PURE__ */ I((e) => {
|
|
932
|
+
let { __scopeHoverCard: t, children: n, open: r, defaultOpen: i, onOpenChange: a, openDelay: o = 700, closeDelay: s = 300 } = e, c = Ln(t), l = O.useRef(0), u = O.useRef(0), f = O.useRef(!1), p = O.useRef(!1), [m, h] = d({
|
|
933
933
|
prop: r,
|
|
934
934
|
defaultProp: i ?? !1,
|
|
935
935
|
onChange: a,
|
|
936
|
-
caller:
|
|
937
|
-
}), g =
|
|
938
|
-
clearTimeout(
|
|
939
|
-
}, [o, h]), _ =
|
|
940
|
-
clearTimeout(
|
|
941
|
-
}, [s, h]),
|
|
942
|
-
return
|
|
943
|
-
clearTimeout(
|
|
944
|
-
}, []), /* @__PURE__ */ D(
|
|
936
|
+
caller: Pn
|
|
937
|
+
}), g = O.useCallback(() => {
|
|
938
|
+
clearTimeout(u.current), l.current = window.setTimeout(() => h(!0), o);
|
|
939
|
+
}, [o, h]), _ = O.useCallback(() => {
|
|
940
|
+
clearTimeout(l.current), !f.current && !p.current && (u.current = window.setTimeout(() => h(!1), s));
|
|
941
|
+
}, [s, h]), y = O.useCallback(() => h(!1), [h]);
|
|
942
|
+
return O.useEffect(() => () => {
|
|
943
|
+
clearTimeout(l.current), clearTimeout(u.current);
|
|
944
|
+
}, []), /* @__PURE__ */ D(Rn, {
|
|
945
945
|
scope: t,
|
|
946
946
|
open: m,
|
|
947
947
|
onOpenChange: h,
|
|
948
948
|
onOpen: g,
|
|
949
949
|
onClose: _,
|
|
950
|
-
onDismiss:
|
|
950
|
+
onDismiss: y,
|
|
951
951
|
hasSelectionRef: f,
|
|
952
952
|
isPointerDownOnContentRef: p,
|
|
953
|
-
children: /* @__PURE__ */ D(
|
|
953
|
+
children: /* @__PURE__ */ D(v, {
|
|
954
954
|
...c,
|
|
955
955
|
children: n
|
|
956
956
|
})
|
|
957
957
|
});
|
|
958
|
-
}, "HoverCard"),
|
|
959
|
-
let { __scopeHoverCard: n, ...r } = e,
|
|
960
|
-
return /* @__PURE__ */ D(
|
|
958
|
+
}, "HoverCard"), Vn = "HoverCardTrigger", Hn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ I(function(e, t) {
|
|
959
|
+
let { __scopeHoverCard: n, ...r } = e, a = zn(Vn, n);
|
|
960
|
+
return /* @__PURE__ */ D(i, {
|
|
961
961
|
asChild: !0,
|
|
962
|
-
...
|
|
963
|
-
children: /* @__PURE__ */ D(
|
|
964
|
-
"data-state":
|
|
962
|
+
...Ln(n),
|
|
963
|
+
children: /* @__PURE__ */ D(p.a, {
|
|
964
|
+
"data-state": a.open ? "open" : "closed",
|
|
965
965
|
...r,
|
|
966
966
|
ref: t,
|
|
967
|
-
onPointerEnter:
|
|
968
|
-
onPointerLeave:
|
|
969
|
-
onFocus:
|
|
970
|
-
onBlur:
|
|
971
|
-
onTouchStart:
|
|
967
|
+
onPointerEnter: _(e.onPointerEnter, Xn(a.onOpen)),
|
|
968
|
+
onPointerLeave: _(e.onPointerLeave, Xn(a.onClose)),
|
|
969
|
+
onFocus: _(e.onFocus, a.onOpen),
|
|
970
|
+
onBlur: _(e.onBlur, a.onClose),
|
|
971
|
+
onTouchStart: _(e.onTouchStart, (e) => e.preventDefault())
|
|
972
972
|
})
|
|
973
973
|
});
|
|
974
|
-
}, "HoverCardTrigger")),
|
|
975
|
-
let { __scopeHoverCard:
|
|
976
|
-
return /* @__PURE__ */ D(
|
|
977
|
-
scope:
|
|
974
|
+
}, "HoverCardTrigger")), Un = "HoverCardPortal", [Wn, Gn] = Fn(Un, { forceMount: void 0 }), Kn = /* @__PURE__ */ I((e) => {
|
|
975
|
+
let { __scopeHoverCard: n, forceMount: r, children: i, container: a } = e, o = zn(Un, n);
|
|
976
|
+
return /* @__PURE__ */ D(Wn, {
|
|
977
|
+
scope: n,
|
|
978
978
|
forceMount: r,
|
|
979
|
-
children: /* @__PURE__ */ D(
|
|
979
|
+
children: /* @__PURE__ */ D(x, {
|
|
980
980
|
present: r || o.open,
|
|
981
|
-
children: /* @__PURE__ */ D(
|
|
981
|
+
children: /* @__PURE__ */ D(t, {
|
|
982
982
|
asChild: !0,
|
|
983
983
|
container: a,
|
|
984
984
|
children: i
|
|
985
985
|
})
|
|
986
986
|
})
|
|
987
987
|
});
|
|
988
|
-
}, "HoverCardPortal"),
|
|
989
|
-
let n =
|
|
990
|
-
return /* @__PURE__ */ D(
|
|
991
|
-
present: r ||
|
|
992
|
-
children: /* @__PURE__ */ D(
|
|
993
|
-
"data-state":
|
|
994
|
-
...
|
|
995
|
-
onPointerEnter:
|
|
996
|
-
onPointerLeave:
|
|
988
|
+
}, "HoverCardPortal"), qn = "HoverCardContent", Jn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ I(function(e, t) {
|
|
989
|
+
let n = Gn(qn, e.__scopeHoverCard), { forceMount: r = n.forceMount, ...i } = e, a = zn(qn, e.__scopeHoverCard);
|
|
990
|
+
return /* @__PURE__ */ D(x, {
|
|
991
|
+
present: r || a.open,
|
|
992
|
+
children: /* @__PURE__ */ D(Yn, {
|
|
993
|
+
"data-state": a.open ? "open" : "closed",
|
|
994
|
+
...i,
|
|
995
|
+
onPointerEnter: _(e.onPointerEnter, Xn(a.onOpen)),
|
|
996
|
+
onPointerLeave: _(e.onPointerLeave, Xn(a.onClose)),
|
|
997
997
|
ref: t
|
|
998
998
|
})
|
|
999
999
|
});
|
|
1000
|
-
}, "HoverCardContent")),
|
|
1001
|
-
let { __scopeHoverCard: r, onEscapeKeyDown:
|
|
1002
|
-
return
|
|
1003
|
-
if (
|
|
1000
|
+
}, "HoverCardContent")), Yn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ I(function(t, n) {
|
|
1001
|
+
let { __scopeHoverCard: r, onEscapeKeyDown: i, onPointerDownOutside: a, onFocusOutside: o, onInteractOutside: c, ...u } = t, d = zn(qn, r), f = Ln(r), p = O.useRef(null), m = l(n, p), [h, g] = O.useState(!1);
|
|
1002
|
+
return O.useEffect(() => {
|
|
1003
|
+
if (h) {
|
|
1004
1004
|
let e = document.body;
|
|
1005
|
-
return
|
|
1006
|
-
e.style.userSelect =
|
|
1005
|
+
return Nn = e.style.userSelect || e.style.webkitUserSelect, e.style.userSelect = "none", e.style.webkitUserSelect = "none", () => {
|
|
1006
|
+
e.style.userSelect = Nn, e.style.webkitUserSelect = Nn;
|
|
1007
1007
|
};
|
|
1008
1008
|
}
|
|
1009
|
-
}, [
|
|
1009
|
+
}, [h]), O.useEffect(() => {
|
|
1010
1010
|
if (p.current) {
|
|
1011
|
-
let e = /* @__PURE__ */
|
|
1012
|
-
|
|
1011
|
+
let e = /* @__PURE__ */ I(() => {
|
|
1012
|
+
g(!1), d.isPointerDownOnContentRef.current = !1, setTimeout(() => {
|
|
1013
1013
|
document.getSelection()?.toString() !== "" && (d.hasSelectionRef.current = !0);
|
|
1014
1014
|
});
|
|
1015
1015
|
}, "handlePointerUp");
|
|
@@ -1017,29 +1017,29 @@ var En = Object.defineProperty, Dn = /* @__PURE__ */ k.forwardRef(/* @__PURE__ *
|
|
|
1017
1017
|
document.removeEventListener("pointerup", e), d.hasSelectionRef.current = !1, d.isPointerDownOnContentRef.current = !1;
|
|
1018
1018
|
};
|
|
1019
1019
|
}
|
|
1020
|
-
}, [d.isPointerDownOnContentRef, d.hasSelectionRef]),
|
|
1021
|
-
p.current &&
|
|
1022
|
-
}), /* @__PURE__ */ D(
|
|
1020
|
+
}, [d.isPointerDownOnContentRef, d.hasSelectionRef]), O.useEffect(() => {
|
|
1021
|
+
p.current && Zn(p.current).forEach((e) => e.setAttribute("tabindex", "-1"));
|
|
1022
|
+
}), /* @__PURE__ */ D(e, {
|
|
1023
1023
|
asChild: !0,
|
|
1024
1024
|
disableOutsidePointerEvents: !1,
|
|
1025
|
-
onInteractOutside:
|
|
1026
|
-
onEscapeKeyDown:
|
|
1027
|
-
onPointerDownOutside:
|
|
1028
|
-
onFocusOutside:
|
|
1025
|
+
onInteractOutside: c,
|
|
1026
|
+
onEscapeKeyDown: i,
|
|
1027
|
+
onPointerDownOutside: a,
|
|
1028
|
+
onFocusOutside: _(o, (e) => {
|
|
1029
1029
|
e.preventDefault();
|
|
1030
1030
|
}),
|
|
1031
1031
|
onDismiss: d.onDismiss,
|
|
1032
|
-
children: /* @__PURE__ */ D(
|
|
1032
|
+
children: /* @__PURE__ */ D(s, {
|
|
1033
1033
|
...f,
|
|
1034
1034
|
...u,
|
|
1035
|
-
onPointerDown:
|
|
1036
|
-
e.currentTarget.contains(e.target) &&
|
|
1035
|
+
onPointerDown: _(u.onPointerDown, (e) => {
|
|
1036
|
+
e.currentTarget.contains(e.target) && g(!0), d.hasSelectionRef.current = !1, d.isPointerDownOnContentRef.current = !0;
|
|
1037
1037
|
}),
|
|
1038
|
-
ref:
|
|
1038
|
+
ref: m,
|
|
1039
1039
|
style: {
|
|
1040
1040
|
...u.style,
|
|
1041
|
-
userSelect:
|
|
1042
|
-
WebkitUserSelect:
|
|
1041
|
+
userSelect: h ? "text" : void 0,
|
|
1042
|
+
WebkitUserSelect: h ? "text" : void 0,
|
|
1043
1043
|
"--radix-hover-card-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
1044
1044
|
"--radix-hover-card-content-available-width": "var(--radix-popper-available-width)",
|
|
1045
1045
|
"--radix-hover-card-content-available-height": "var(--radix-popper-available-height)",
|
|
@@ -1049,17 +1049,17 @@ var En = Object.defineProperty, Dn = /* @__PURE__ */ k.forwardRef(/* @__PURE__ *
|
|
|
1049
1049
|
})
|
|
1050
1050
|
});
|
|
1051
1051
|
}, "HoverCardContentImpl"));
|
|
1052
|
-
function
|
|
1052
|
+
function Xn(e) {
|
|
1053
1053
|
return (t) => t.pointerType === "touch" ? void 0 : e();
|
|
1054
1054
|
}
|
|
1055
|
-
|
|
1056
|
-
function
|
|
1057
|
-
let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: /* @__PURE__ */
|
|
1055
|
+
I(Xn, "excludeTouch");
|
|
1056
|
+
function Zn(e) {
|
|
1057
|
+
let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, { acceptNode: /* @__PURE__ */ I((e) => e.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP, "acceptNode") });
|
|
1058
1058
|
for (; n.nextNode();) t.push(n.currentNode);
|
|
1059
1059
|
return t;
|
|
1060
1060
|
}
|
|
1061
|
-
|
|
1062
|
-
var
|
|
1061
|
+
I(Zn, "getTabbableNodes");
|
|
1062
|
+
var Qn = Bn, $n = Hn, er = Kn, tr = Jn, nr = f("transition-all duration-500", {
|
|
1063
1063
|
variants: {
|
|
1064
1064
|
variant: {
|
|
1065
1065
|
1: "",
|
|
@@ -1120,7 +1120,7 @@ var Jn = In, Yn = Rn, Xn = Hn, Zn = Wn, Qn = d("transition-all duration-500", {
|
|
|
1120
1120
|
},
|
|
1121
1121
|
{
|
|
1122
1122
|
variant: "1",
|
|
1123
|
-
color: "
|
|
1123
|
+
color: "light",
|
|
1124
1124
|
className: "border-white/10 border-t-white"
|
|
1125
1125
|
},
|
|
1126
1126
|
{
|
|
@@ -1245,19 +1245,19 @@ var Jn = In, Yn = Rn, Xn = Hn, Zn = Wn, Qn = d("transition-all duration-500", {
|
|
|
1245
1245
|
}
|
|
1246
1246
|
]
|
|
1247
1247
|
});
|
|
1248
|
-
function
|
|
1249
|
-
let { t: i } =
|
|
1250
|
-
return e === "4" ? /* @__PURE__ */
|
|
1248
|
+
function rr({ variant: e = "1", color: t, className: n, ...r }) {
|
|
1249
|
+
let { t: i } = E();
|
|
1250
|
+
return e === "4" ? /* @__PURE__ */ ne(te, { children: [/* @__PURE__ */ D("style", { children: "@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n }\n \n @keyframes spin2 {\n 0% {\n stroke-dasharray: 1, 800;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 400, 400;\n stroke-dashoffset: -200px;\n }\n 100% {\n stroke-dasharray: 800, 1;\n stroke-dashoffset: -800px;\n }\n }\n \n .spin2 {\n transform-origin: center;\n animation: spin2 1.5s ease-in-out infinite,\n spin 2s linear infinite;\n animation-direction: alternate;\n }" }), /* @__PURE__ */ D("svg", {
|
|
1251
1251
|
viewBox: "0 0 800 800",
|
|
1252
1252
|
"data-slot": "spinner",
|
|
1253
1253
|
"data-variant": e,
|
|
1254
1254
|
"data-color": t,
|
|
1255
|
-
className:
|
|
1255
|
+
className: T("size-14", n),
|
|
1256
1256
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1257
1257
|
role: "img",
|
|
1258
1258
|
"aria-label": r["aria-label"] ?? i("material.spinner.loading", "Loading..."),
|
|
1259
1259
|
children: /* @__PURE__ */ D("circle", {
|
|
1260
|
-
className:
|
|
1260
|
+
className: T("spin2", nr({
|
|
1261
1261
|
variant: e,
|
|
1262
1262
|
color: t
|
|
1263
1263
|
})),
|
|
@@ -1273,7 +1273,7 @@ function $n({ variant: e = "1", color: t, className: n, ...r }) {
|
|
|
1273
1273
|
"data-slot": "spinner",
|
|
1274
1274
|
"data-variant": e,
|
|
1275
1275
|
"data-color": t,
|
|
1276
|
-
className:
|
|
1276
|
+
className: T("size-12 border-[2px] rounded-full animate-spin", nr({
|
|
1277
1277
|
variant: e,
|
|
1278
1278
|
color: t,
|
|
1279
1279
|
className: n
|
|
@@ -1282,8 +1282,8 @@ function $n({ variant: e = "1", color: t, className: n, ...r }) {
|
|
|
1282
1282
|
});
|
|
1283
1283
|
}
|
|
1284
1284
|
//#endregion
|
|
1285
|
-
//#region lib/components/ui/actions/button/button.
|
|
1286
|
-
var
|
|
1285
|
+
//#region lib/components/ui/actions/button/button.variants.ts
|
|
1286
|
+
var ir = f("inline-flex center truncate **:truncate gap-2 h-min cursor-pointer whitespace-nowrap rounded-full text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-error/20 dark:aria-invalid:ring-error/40 aria-invalid:border-error px-4 py-2 has-[>svg]:px-3", {
|
|
1287
1287
|
variants: {
|
|
1288
1288
|
variant: {
|
|
1289
1289
|
filled: "shadow-xs",
|
|
@@ -1300,6 +1300,16 @@ var er = d("inline-flex center truncate **:truncate gap-2 h-min cursor-pointer w
|
|
|
1300
1300
|
default: null,
|
|
1301
1301
|
error: null,
|
|
1302
1302
|
success: null
|
|
1303
|
+
},
|
|
1304
|
+
size: {
|
|
1305
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
1306
|
+
xs: "h-6 gap-1 rounded-full px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
1307
|
+
sm: "h-8 rounded-full gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
1308
|
+
lg: "h-10 rounded-full px-6 has-[>svg]:px-4",
|
|
1309
|
+
icon: "size-9 px-0 py-0 has-[>svg]:px-0",
|
|
1310
|
+
"icon-xs": "size-6 rounded-full px-0 py-0 has-[>svg]:px-0 [&_svg:not([class*='size-'])]:size-3",
|
|
1311
|
+
"icon-sm": "size-8 px-0 py-0 has-[>svg]:px-0",
|
|
1312
|
+
"icon-lg": "size-10 px-0 py-0 has-[>svg]:px-0"
|
|
1303
1313
|
}
|
|
1304
1314
|
},
|
|
1305
1315
|
defaultVariants: {
|
|
@@ -1449,53 +1459,68 @@ var er = d("inline-flex center truncate **:truncate gap-2 h-min cursor-pointer w
|
|
|
1449
1459
|
}
|
|
1450
1460
|
]
|
|
1451
1461
|
});
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
variant:
|
|
1469
|
-
color
|
|
1470
|
-
className:
|
|
1471
|
-
|
|
1462
|
+
//#endregion
|
|
1463
|
+
//#region lib/components/ui/actions/button/has-text-content.ts
|
|
1464
|
+
function ar(e) {
|
|
1465
|
+
return e == null || typeof e == "boolean" ? !1 : typeof e == "string" || typeof e == "number" || typeof e == "bigint" ? String(e).trim() !== "" : Array.isArray(e) ? e.some(ar) : ae(e) ? !or(e.props["aria-hidden"]) && ar(e.props.children) : !1;
|
|
1466
|
+
}
|
|
1467
|
+
function or(e) {
|
|
1468
|
+
return !!e && e !== "false";
|
|
1469
|
+
}
|
|
1470
|
+
//#endregion
|
|
1471
|
+
//#region lib/components/ui/actions/button/button.tsx
|
|
1472
|
+
function sr({ className: e, variant: t = "filled", asChild: n = !1, children: r, color: i, size: o, loading: s, spinnerVariant: l = "2", disabled: u, onClick: d, type: f = "button", ...p }) {
|
|
1473
|
+
let m = n ? a : "button";
|
|
1474
|
+
return /* @__PURE__ */ D(b, {
|
|
1475
|
+
value: se(b) || !!(p["aria-label"] || p["aria-labelledby"]) || ar(r),
|
|
1476
|
+
children: /* @__PURE__ */ ne(m, {
|
|
1477
|
+
"data-slot": "button",
|
|
1478
|
+
"data-variant": t,
|
|
1479
|
+
"data-color": i,
|
|
1480
|
+
className: T("w-max truncate justify-center line-clamp-1 text-ellipsis duration-500", ir({
|
|
1481
|
+
variant: t,
|
|
1482
|
+
color: i,
|
|
1483
|
+
size: o
|
|
1484
|
+
}), e),
|
|
1485
|
+
type: n ? void 0 : f,
|
|
1486
|
+
disabled: u,
|
|
1487
|
+
onClick: s ? (e) => {
|
|
1488
|
+
e.preventDefault();
|
|
1489
|
+
} : d,
|
|
1490
|
+
...p,
|
|
1491
|
+
children: [s && /* @__PURE__ */ D(rr, {
|
|
1492
|
+
variant: l,
|
|
1493
|
+
color: t === "filled" ? "light" : i,
|
|
1494
|
+
className: T("starting:scale-0 duration-500", l === "4" ? "size-7.5" : "size-4.5")
|
|
1495
|
+
}), /* @__PURE__ */ D(c, { children: r })]
|
|
1496
|
+
})
|
|
1472
1497
|
});
|
|
1473
1498
|
}
|
|
1474
|
-
function
|
|
1475
|
-
return e ? /* @__PURE__ */ D(
|
|
1499
|
+
function cr({ tooltip: e, ...t }) {
|
|
1500
|
+
return e ? /* @__PURE__ */ D(u, {
|
|
1476
1501
|
content: e,
|
|
1477
|
-
children: /* @__PURE__ */ D(
|
|
1478
|
-
}) : /* @__PURE__ */ D(
|
|
1502
|
+
children: /* @__PURE__ */ D(sr, { ...t })
|
|
1503
|
+
}) : /* @__PURE__ */ D(sr, { ...t });
|
|
1479
1504
|
}
|
|
1480
1505
|
//#endregion
|
|
1481
1506
|
//#region ../../node_modules/react-use/esm/misc/util.js
|
|
1482
|
-
var
|
|
1483
|
-
function
|
|
1507
|
+
var lr = function() {};
|
|
1508
|
+
function ur(e) {
|
|
1484
1509
|
var t = [...arguments].slice(1);
|
|
1485
1510
|
e && e.addEventListener && e.addEventListener.apply(e, t);
|
|
1486
1511
|
}
|
|
1487
|
-
function
|
|
1512
|
+
function dr(e) {
|
|
1488
1513
|
var t = [...arguments].slice(1);
|
|
1489
1514
|
e && e.removeEventListener && e.removeEventListener.apply(e, t);
|
|
1490
1515
|
}
|
|
1491
|
-
var
|
|
1516
|
+
var fr = typeof window < "u", pr = fr ? window : null, mr = function(e) {
|
|
1492
1517
|
return !!e.addEventListener;
|
|
1493
|
-
},
|
|
1518
|
+
}, hr = function(e) {
|
|
1494
1519
|
return !!e.on;
|
|
1495
|
-
},
|
|
1496
|
-
n === void 0 && (n =
|
|
1497
|
-
if (t && n) return
|
|
1498
|
-
|
|
1520
|
+
}, gr = function(e, t, n, r) {
|
|
1521
|
+
n === void 0 && (n = pr), ce(function() {
|
|
1522
|
+
if (t && n) return mr(n) ? ur(n, e, t, r) : hr(n) && n.on(e, t, r), function() {
|
|
1523
|
+
mr(n) ? dr(n, e, t, r) : hr(n) && n.off(e, t, r);
|
|
1499
1524
|
};
|
|
1500
1525
|
}, [
|
|
1501
1526
|
e,
|
|
@@ -1503,10 +1528,10 @@ var or = typeof window < "u", sr = or ? window : null, cr = function(e) {
|
|
|
1503
1528
|
n,
|
|
1504
1529
|
JSON.stringify(r)
|
|
1505
1530
|
]);
|
|
1506
|
-
},
|
|
1507
|
-
var t =
|
|
1531
|
+
}, _r = function(e) {
|
|
1532
|
+
var t = de(e);
|
|
1508
1533
|
return t.current = e, t;
|
|
1509
|
-
},
|
|
1534
|
+
}, vr = f("overflow-auto in-[[data-state=selected]]:text-primary-foreground", {
|
|
1510
1535
|
variants: { variant: {
|
|
1511
1536
|
normal: "text-sm",
|
|
1512
1537
|
"huge-larger": "text-8xl font-semibold",
|
|
@@ -1526,10 +1551,10 @@ var or = typeof window < "u", sr = or ? window : null, cr = function(e) {
|
|
|
1526
1551
|
} },
|
|
1527
1552
|
defaultVariants: { variant: "normal" }
|
|
1528
1553
|
});
|
|
1529
|
-
function
|
|
1554
|
+
function yr({ className: e, variant: t, ...n }) {
|
|
1530
1555
|
return /* @__PURE__ */ D("div", {
|
|
1531
1556
|
"data-test": "typogaphy",
|
|
1532
|
-
className:
|
|
1557
|
+
className: T(vr({
|
|
1533
1558
|
variant: t,
|
|
1534
1559
|
className: e
|
|
1535
1560
|
})),
|
|
@@ -1538,36 +1563,36 @@ function pr({ className: e, variant: t, ...n }) {
|
|
|
1538
1563
|
}
|
|
1539
1564
|
//#endregion
|
|
1540
1565
|
//#region lib/components/ui/forms/field-blur-context.ts
|
|
1541
|
-
var
|
|
1542
|
-
function
|
|
1543
|
-
return
|
|
1566
|
+
var br = ie(null);
|
|
1567
|
+
function xr(e, t) {
|
|
1568
|
+
return ue(() => e ? t ? (n) => {
|
|
1544
1569
|
let r = e(n), i = typeof t == "function" ? t(n) : void 0;
|
|
1545
1570
|
return typeof t != "function" && (t.current = n), () => {
|
|
1546
1571
|
r?.(), typeof i == "function" ? i() : typeof t == "function" ? t(null) : t.current = null;
|
|
1547
1572
|
};
|
|
1548
1573
|
} : e : t, [e, t]);
|
|
1549
1574
|
}
|
|
1550
|
-
function
|
|
1551
|
-
return
|
|
1575
|
+
function Sr(e) {
|
|
1576
|
+
return xr(A(br), e);
|
|
1552
1577
|
}
|
|
1553
1578
|
//#endregion
|
|
1554
1579
|
//#region lib/components/ui/primitives/helper-text/helper-text.tsx
|
|
1555
|
-
function
|
|
1556
|
-
return /* @__PURE__ */ D(
|
|
1580
|
+
function Cr({ error: e, className: t, ...n }) {
|
|
1581
|
+
return /* @__PURE__ */ D(yr, {
|
|
1557
1582
|
"data-slot": "helper-text",
|
|
1558
1583
|
variant: "caption",
|
|
1559
|
-
className:
|
|
1584
|
+
className: T("flex pl-0.5 truncate text-wrap", { "text-error": e }, t),
|
|
1560
1585
|
...n
|
|
1561
1586
|
});
|
|
1562
1587
|
}
|
|
1563
1588
|
//#endregion
|
|
1564
1589
|
//#region lib/components/ui/primitives/label/label.tsx
|
|
1565
|
-
function
|
|
1566
|
-
return /* @__PURE__ */ D(
|
|
1590
|
+
function wr({ className: e, withAsterisk: t, ...n }) {
|
|
1591
|
+
return /* @__PURE__ */ D(jn, {
|
|
1567
1592
|
"data-slot": "label",
|
|
1568
|
-
className:
|
|
1593
|
+
className: T("flex items-center pl-0.5 gap-2 text-sm leading-none font-semibold select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", e),
|
|
1569
1594
|
...n,
|
|
1570
|
-
children: t ? /* @__PURE__ */
|
|
1595
|
+
children: t ? /* @__PURE__ */ ne("div", {
|
|
1571
1596
|
className: "inline-flex",
|
|
1572
1597
|
children: [n.children, /* @__PURE__ */ D("span", {
|
|
1573
1598
|
"aria-hidden": "true",
|
|
@@ -1579,19 +1604,19 @@ function vr({ className: e, withAsterisk: t, ...n }) {
|
|
|
1579
1604
|
}
|
|
1580
1605
|
//#endregion
|
|
1581
1606
|
//#region lib/components/ui/overlays/dialog/use-return-focus.ts
|
|
1582
|
-
var
|
|
1583
|
-
function
|
|
1584
|
-
([...e.querySelectorAll(
|
|
1607
|
+
var Tr = "button:not([disabled]), input:not([disabled]):not([type=\"hidden\"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"]), [contenteditable=\"true\"]";
|
|
1608
|
+
function Er(e) {
|
|
1609
|
+
([...e.querySelectorAll(Tr)].find((e) => e.tabIndex >= 0 && e.getClientRects().length > 0) ?? e).focus({ preventScroll: !0 });
|
|
1585
1610
|
}
|
|
1586
|
-
function
|
|
1587
|
-
let n =
|
|
1611
|
+
function Dr(e, { focusFallback: t = !1 } = {}) {
|
|
1612
|
+
let n = de(null);
|
|
1588
1613
|
return {
|
|
1589
1614
|
onOpenAutoFocus(r) {
|
|
1590
1615
|
let i = document.activeElement;
|
|
1591
1616
|
n.current = i instanceof HTMLElement && i !== document.body ? i : null, e.onOpenAutoFocus?.(r);
|
|
1592
1617
|
let a = r.target;
|
|
1593
1618
|
!t || r.defaultPrevented || !(a instanceof HTMLElement) || queueMicrotask(() => {
|
|
1594
|
-
a.isConnected && !a.contains(document.activeElement) &&
|
|
1619
|
+
a.isConnected && !a.contains(document.activeElement) && Er(a);
|
|
1595
1620
|
});
|
|
1596
1621
|
},
|
|
1597
1622
|
onCloseAutoFocus(t) {
|
|
@@ -1605,7 +1630,7 @@ function xr(e, { focusFallback: t = !1 } = {}) {
|
|
|
1605
1630
|
}
|
|
1606
1631
|
//#endregion
|
|
1607
1632
|
//#region lib/components/ui/primitives/input/input-box.ts
|
|
1608
|
-
var
|
|
1633
|
+
var Or = [
|
|
1609
1634
|
"inline-flex gap-2 items-center h-11 max-h-full w-full bg-muted/5 disabled:bg-transparent",
|
|
1610
1635
|
"file:text-muted-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border-input",
|
|
1611
1636
|
"rounded border px-2 py-1 text-base shadow-xs transition-all outline-none file:inline-flex",
|
|
@@ -1613,46 +1638,46 @@ var Sr = [
|
|
|
1613
1638
|
"disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
1614
1639
|
"focus-visible:border-primary focus-visible:ring-primary/30 focus-visible:ring-[2px]",
|
|
1615
1640
|
"aria-invalid:ring-error/20 dark:aria-invalid:ring-error/40 aria-invalid:border-error"
|
|
1616
|
-
],
|
|
1617
|
-
function
|
|
1641
|
+
], kr = [...Or, "not-placeholder-shown:bg-primary/10"];
|
|
1642
|
+
function Ar({ className: e, type: t = "text", ...n }) {
|
|
1618
1643
|
return /* @__PURE__ */ D("input", {
|
|
1619
1644
|
type: t,
|
|
1620
1645
|
"data-slot": "input",
|
|
1621
|
-
className:
|
|
1646
|
+
className: T(kr, e),
|
|
1622
1647
|
"data-pw": n.name ?? "input",
|
|
1623
1648
|
...n
|
|
1624
1649
|
});
|
|
1625
1650
|
}
|
|
1626
1651
|
//#endregion
|
|
1627
1652
|
//#region lib/components/ui/fields/text-field/text-field.tsx
|
|
1628
|
-
function
|
|
1629
|
-
let s =
|
|
1630
|
-
className:
|
|
1653
|
+
function jr({ error: e, helperText: t, label: n, className: r, leading: i, trailing: a, ...o }) {
|
|
1654
|
+
let s = Sr(), c = le(), l = /* @__PURE__ */ ne("div", {
|
|
1655
|
+
className: T("relative", {
|
|
1631
1656
|
"*:first:size-8 *:first:absolute *:first:top-[calc(50%-16px)] *:first:left-1.5 [&_input]:pl-10 *:first:bg-muted/80 *:first:text-muted-foreground": !!i,
|
|
1632
1657
|
"*:last:size-8 *:last:absolute *:last:top-[calc(50%-16px)] *:last:right-1.5 [&_input]:pr-.5 *:last:bg-muted/80 *:last:text-muted-foreground": !!a
|
|
1633
1658
|
}),
|
|
1634
1659
|
children: [
|
|
1635
1660
|
i && i,
|
|
1636
|
-
/* @__PURE__ */ D(
|
|
1661
|
+
/* @__PURE__ */ D(Ar, {
|
|
1637
1662
|
"aria-invalid": e,
|
|
1638
1663
|
...o,
|
|
1639
1664
|
id: o.id ?? c,
|
|
1640
|
-
className:
|
|
1665
|
+
className: T("transition-all hover:border-primary hover:ring-[2px] hover:ring-primary/25")
|
|
1641
1666
|
}),
|
|
1642
1667
|
a && a
|
|
1643
1668
|
]
|
|
1644
1669
|
});
|
|
1645
|
-
return /* @__PURE__ */
|
|
1670
|
+
return /* @__PURE__ */ ne("div", {
|
|
1646
1671
|
ref: s,
|
|
1647
1672
|
"data-slot": "text-field",
|
|
1648
|
-
className:
|
|
1649
|
-
children: [/* @__PURE__ */ D(
|
|
1673
|
+
className: T("grid w-full gap-1.5", r),
|
|
1674
|
+
children: [/* @__PURE__ */ D(wr, {
|
|
1650
1675
|
withAsterisk: o.required,
|
|
1651
1676
|
htmlFor: o.id ?? c,
|
|
1652
1677
|
children: n
|
|
1653
|
-
}), t ? /* @__PURE__ */
|
|
1678
|
+
}), t ? /* @__PURE__ */ ne("div", {
|
|
1654
1679
|
className: "flex flex-col gap-0.5",
|
|
1655
|
-
children: [l, /* @__PURE__ */ D(
|
|
1680
|
+
children: [l, /* @__PURE__ */ D(Cr, {
|
|
1656
1681
|
error: e,
|
|
1657
1682
|
children: t
|
|
1658
1683
|
})]
|
|
@@ -1660,184 +1685,185 @@ function Tr({ error: e, helperText: t, label: n, className: r, leading: i, trail
|
|
|
1660
1685
|
});
|
|
1661
1686
|
}
|
|
1662
1687
|
//#endregion
|
|
1688
|
+
//#region lib/components/ui/overlays/dialog/dialog-outside.ts
|
|
1689
|
+
function Mr(e) {
|
|
1690
|
+
let t = e.target;
|
|
1691
|
+
t instanceof Element && t.closest("[data-slot=\"combobox-content\"]") && e.preventDefault();
|
|
1692
|
+
}
|
|
1693
|
+
//#endregion
|
|
1663
1694
|
//#region lib/components/ui/overlays/dialog/dialog.tsx
|
|
1664
|
-
function
|
|
1665
|
-
return /* @__PURE__ */ D(
|
|
1695
|
+
function Nr({ ...e }) {
|
|
1696
|
+
return /* @__PURE__ */ D(sn, {
|
|
1666
1697
|
"data-slot": "dialog",
|
|
1667
1698
|
...e
|
|
1668
1699
|
});
|
|
1669
1700
|
}
|
|
1670
|
-
function
|
|
1671
|
-
return /* @__PURE__ */ D(
|
|
1701
|
+
function Pr({ asChild: e = !0, ...t }) {
|
|
1702
|
+
return /* @__PURE__ */ D(ln, {
|
|
1672
1703
|
"data-slot": "dialog-trigger",
|
|
1673
1704
|
...t,
|
|
1674
1705
|
asChild: e
|
|
1675
1706
|
});
|
|
1676
1707
|
}
|
|
1677
|
-
function
|
|
1678
|
-
return /* @__PURE__ */ D(
|
|
1708
|
+
function Fr({ ...e }) {
|
|
1709
|
+
return /* @__PURE__ */ D(pn, {
|
|
1679
1710
|
"data-slot": "dialog-portal",
|
|
1680
1711
|
...e
|
|
1681
1712
|
});
|
|
1682
1713
|
}
|
|
1683
|
-
function
|
|
1684
|
-
let { t: o } =
|
|
1685
|
-
return /* @__PURE__ */ D(
|
|
1714
|
+
function Ir({ className: e, color: t, children: n, type: r = "button", variant: i = "ghost", ...a }) {
|
|
1715
|
+
let { t: o } = E();
|
|
1716
|
+
return /* @__PURE__ */ D(On, {
|
|
1686
1717
|
"aria-label": n ? void 0 : o("material.buttons.close", "Close"),
|
|
1687
1718
|
...a,
|
|
1688
1719
|
type: r,
|
|
1689
|
-
className:
|
|
1720
|
+
className: T("absolute top-4 right-4", h({
|
|
1690
1721
|
variant: i,
|
|
1691
1722
|
color: t,
|
|
1692
1723
|
className: e
|
|
1693
1724
|
})),
|
|
1694
1725
|
"data-slot": "dialog-close",
|
|
1695
|
-
children: n || /* @__PURE__ */ D(
|
|
1726
|
+
children: n || /* @__PURE__ */ D(ee, { className: "size-4" })
|
|
1696
1727
|
});
|
|
1697
1728
|
}
|
|
1698
|
-
function
|
|
1699
|
-
return /* @__PURE__ */ D(
|
|
1729
|
+
function Lr({ className: e, ...t }) {
|
|
1730
|
+
return /* @__PURE__ */ D(hn, {
|
|
1700
1731
|
"data-slot": "dialog-overlay",
|
|
1701
|
-
className:
|
|
1732
|
+
className: T("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50", e),
|
|
1702
1733
|
...t
|
|
1703
1734
|
});
|
|
1704
1735
|
}
|
|
1705
|
-
function
|
|
1706
|
-
|
|
1707
|
-
}
|
|
1708
|
-
function Mr({ className: e, children: t, onInteractOutside: n, onPointerDownOutside: r, onFocusOutside: i, onOpenAutoFocus: a, onCloseAutoFocus: o, ...s }) {
|
|
1709
|
-
let c = xr({
|
|
1736
|
+
function Rr({ className: e, children: t, onInteractOutside: n, onPointerDownOutside: r, onFocusOutside: i, onOpenAutoFocus: a, onCloseAutoFocus: o, ...s }) {
|
|
1737
|
+
let c = Dr({
|
|
1710
1738
|
onOpenAutoFocus: a,
|
|
1711
1739
|
onCloseAutoFocus: o
|
|
1712
|
-
})
|
|
1713
|
-
|
|
1714
|
-
};
|
|
1715
|
-
return /* @__PURE__ */ O(Or, {
|
|
1740
|
+
});
|
|
1741
|
+
return /* @__PURE__ */ ne(Fr, {
|
|
1716
1742
|
"data-slot": "dialog-portal",
|
|
1717
|
-
children: [/* @__PURE__ */ D(
|
|
1743
|
+
children: [/* @__PURE__ */ D(Lr, {}), /* @__PURE__ */ D(yn, {
|
|
1718
1744
|
"data-slot": "dialog-content",
|
|
1719
|
-
className:
|
|
1745
|
+
className: T("bg-background rounded-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg", e),
|
|
1720
1746
|
onOpenAutoFocus: c.onOpenAutoFocus,
|
|
1721
1747
|
onCloseAutoFocus: c.onCloseAutoFocus,
|
|
1722
1748
|
onInteractOutside: (e) => {
|
|
1723
|
-
|
|
1749
|
+
Mr(e), n?.(e);
|
|
1724
1750
|
},
|
|
1725
1751
|
onPointerDownOutside: (e) => {
|
|
1726
|
-
|
|
1752
|
+
Mr(e), r?.(e);
|
|
1727
1753
|
},
|
|
1728
1754
|
onFocusOutside: (e) => {
|
|
1729
|
-
|
|
1755
|
+
Mr(e), i?.(e);
|
|
1730
1756
|
},
|
|
1731
1757
|
...s,
|
|
1732
1758
|
children: t
|
|
1733
1759
|
})]
|
|
1734
1760
|
});
|
|
1735
1761
|
}
|
|
1736
|
-
function
|
|
1762
|
+
function zr({ className: e, ...t }) {
|
|
1737
1763
|
return /* @__PURE__ */ D("div", {
|
|
1738
1764
|
"data-slot": "dialog-header",
|
|
1739
|
-
className:
|
|
1765
|
+
className: T("flex flex-col gap-2 text-center sm:text-left", e),
|
|
1740
1766
|
...t
|
|
1741
1767
|
});
|
|
1742
1768
|
}
|
|
1743
|
-
function
|
|
1769
|
+
function Br({ className: e, ...t }) {
|
|
1744
1770
|
return /* @__PURE__ */ D("div", {
|
|
1745
1771
|
"data-slot": "dialog-footer",
|
|
1746
|
-
className:
|
|
1772
|
+
className: T("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e),
|
|
1747
1773
|
...t
|
|
1748
1774
|
});
|
|
1749
1775
|
}
|
|
1750
|
-
function
|
|
1751
|
-
return /* @__PURE__ */ D(
|
|
1776
|
+
function Vr({ className: e, ...t }) {
|
|
1777
|
+
return /* @__PURE__ */ D(wn, {
|
|
1752
1778
|
"data-slot": "dialog-title",
|
|
1753
|
-
className:
|
|
1779
|
+
className: T("text-xl leading-none font-semibold", e),
|
|
1754
1780
|
...t
|
|
1755
1781
|
});
|
|
1756
1782
|
}
|
|
1757
|
-
function
|
|
1758
|
-
return /* @__PURE__ */ D(
|
|
1783
|
+
function Hr({ className: e, ...t }) {
|
|
1784
|
+
return /* @__PURE__ */ D(En, {
|
|
1759
1785
|
"data-slot": "dialog-description",
|
|
1760
|
-
className:
|
|
1786
|
+
className: T("text-muted-foreground text-sm", e),
|
|
1761
1787
|
...t
|
|
1762
1788
|
});
|
|
1763
1789
|
}
|
|
1764
1790
|
//#endregion
|
|
1765
1791
|
//#region lib/components/ui/actions/icon-button/icon-badge.tsx
|
|
1766
|
-
function
|
|
1792
|
+
function Ur({ children: e, className: t, ...n }) {
|
|
1767
1793
|
let r = !!(n["aria-label"] || n["aria-labelledby"]);
|
|
1768
|
-
return /* @__PURE__ */ D(
|
|
1794
|
+
return /* @__PURE__ */ D(C, {
|
|
1769
1795
|
"aria-hidden": r ? void 0 : "true",
|
|
1770
1796
|
role: r ? "img" : void 0,
|
|
1771
1797
|
...n,
|
|
1772
1798
|
asChild: !0,
|
|
1773
|
-
className:
|
|
1799
|
+
className: T("cursor-default", t),
|
|
1774
1800
|
children: /* @__PURE__ */ D("span", { children: e })
|
|
1775
1801
|
});
|
|
1776
1802
|
}
|
|
1777
1803
|
//#endregion
|
|
1778
1804
|
//#region lib/components/ui/primitives/activity/activity.tsx
|
|
1779
|
-
function
|
|
1780
|
-
return /* @__PURE__ */ D(
|
|
1805
|
+
function Wr({ visible: e = !1, ...t }) {
|
|
1806
|
+
return /* @__PURE__ */ D(re, {
|
|
1781
1807
|
...t,
|
|
1782
1808
|
mode: e ? "visible" : "hidden"
|
|
1783
1809
|
});
|
|
1784
1810
|
}
|
|
1785
1811
|
//#endregion
|
|
1786
1812
|
//#region lib/components/ui/overlays/hover-card/hover-card.tsx
|
|
1787
|
-
function
|
|
1788
|
-
return /* @__PURE__ */ D(
|
|
1813
|
+
function Gr({ ...e }) {
|
|
1814
|
+
return /* @__PURE__ */ D(Qn, {
|
|
1789
1815
|
"data-slot": "hover-card",
|
|
1790
1816
|
...e
|
|
1791
1817
|
});
|
|
1792
1818
|
}
|
|
1793
|
-
function
|
|
1794
|
-
return /* @__PURE__ */ D(
|
|
1819
|
+
function Kr({ ...e }) {
|
|
1820
|
+
return /* @__PURE__ */ D($n, {
|
|
1795
1821
|
"data-slot": "hover-card-trigger",
|
|
1796
1822
|
...e
|
|
1797
1823
|
});
|
|
1798
1824
|
}
|
|
1799
|
-
function
|
|
1800
|
-
return /* @__PURE__ */ D(
|
|
1825
|
+
function qr({ className: e, align: t = "center", sideOffset: n = 4, ...r }) {
|
|
1826
|
+
return /* @__PURE__ */ D(er, {
|
|
1801
1827
|
"data-slot": "hover-card-portal",
|
|
1802
|
-
children: /* @__PURE__ */ D(
|
|
1828
|
+
children: /* @__PURE__ */ D(tr, {
|
|
1803
1829
|
"data-slot": "hover-card-content",
|
|
1804
1830
|
align: t,
|
|
1805
1831
|
sideOffset: n,
|
|
1806
|
-
className:
|
|
1832
|
+
className: T("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden", e),
|
|
1807
1833
|
...r
|
|
1808
1834
|
})
|
|
1809
1835
|
});
|
|
1810
1836
|
}
|
|
1811
1837
|
//#endregion
|
|
1812
1838
|
//#region ../../node_modules/react-hook-form/dist/index.esm.mjs
|
|
1813
|
-
var
|
|
1839
|
+
var Jr = (e) => e.type === "checkbox", Yr = (e) => e.type === "file", L = (e) => e instanceof Date, R = (e) => e == null, Xr = (e) => typeof e == "object", z = (e) => !R(e) && !Array.isArray(e) && Xr(e) && !L(e), Zr = (e) => z(e) && e.target ? Jr(e.target) ? e.target.checked : Yr(e.target) ? e.target.files : e.target.value : e, Qr = (e, t) => t.split(".").some((t, n, r) => !isNaN(Number(t)) && e.has(r.slice(0, n).join("."))), $r = (e) => {
|
|
1814
1840
|
let t = e.constructor && e.constructor.prototype;
|
|
1815
|
-
return
|
|
1816
|
-
},
|
|
1817
|
-
function
|
|
1841
|
+
return z(t) && t.hasOwnProperty("isPrototypeOf");
|
|
1842
|
+
}, ei = typeof window < "u" && window.HTMLElement !== void 0 && typeof document < "u";
|
|
1843
|
+
function B(e) {
|
|
1818
1844
|
if (e instanceof Date) return new Date(e);
|
|
1819
1845
|
let t = typeof FileList < "u" && e instanceof FileList;
|
|
1820
|
-
if (
|
|
1846
|
+
if (ei && (e instanceof Blob || t)) return e;
|
|
1821
1847
|
let n = Array.isArray(e);
|
|
1822
|
-
if (!n && !(
|
|
1848
|
+
if (!n && !(z(e) && $r(e))) return e;
|
|
1823
1849
|
let r = n ? [] : Object.create(Object.getPrototypeOf(e));
|
|
1824
|
-
for (let t in e) Object.prototype.hasOwnProperty.call(e, t) && (r[t] =
|
|
1850
|
+
for (let t in e) Object.prototype.hasOwnProperty.call(e, t) && (r[t] = B(e[t]));
|
|
1825
1851
|
return r;
|
|
1826
1852
|
}
|
|
1827
|
-
var
|
|
1853
|
+
var ti = {
|
|
1828
1854
|
BLUR: "blur",
|
|
1829
1855
|
FOCUS_OUT: "focusout",
|
|
1830
1856
|
CHANGE: "change",
|
|
1831
1857
|
SUBMIT: "submit",
|
|
1832
1858
|
TRIGGER: "trigger",
|
|
1833
1859
|
VALID: "valid"
|
|
1834
|
-
},
|
|
1860
|
+
}, V = {
|
|
1835
1861
|
onBlur: "onBlur",
|
|
1836
1862
|
onChange: "onChange",
|
|
1837
1863
|
onSubmit: "onSubmit",
|
|
1838
1864
|
onTouched: "onTouched",
|
|
1839
1865
|
all: "all"
|
|
1840
|
-
},
|
|
1866
|
+
}, H = {
|
|
1841
1867
|
max: "max",
|
|
1842
1868
|
min: "min",
|
|
1843
1869
|
maxLength: "maxLength",
|
|
@@ -1845,44 +1871,44 @@ var Yr = {
|
|
|
1845
1871
|
pattern: "pattern",
|
|
1846
1872
|
required: "required",
|
|
1847
1873
|
validate: "validate"
|
|
1848
|
-
},
|
|
1874
|
+
}, ni = "root", ri = [
|
|
1849
1875
|
"__proto__",
|
|
1850
1876
|
"constructor",
|
|
1851
1877
|
"prototype"
|
|
1852
|
-
],
|
|
1853
|
-
if (!t || !
|
|
1854
|
-
let r =
|
|
1855
|
-
if (r.some((e) =>
|
|
1856
|
-
let i = r.reduce((e, t) =>
|
|
1857
|
-
return
|
|
1858
|
-
},
|
|
1859
|
-
let r = -1, i =
|
|
1878
|
+
], ii = /^\w*$/, ai = (e) => ii.test(e), U = (e) => e === void 0, oi = /[.[\]'"]/, si = (e) => e.split(oi).filter(Boolean), W = (e, t, n) => {
|
|
1879
|
+
if (!t || !z(e)) return n;
|
|
1880
|
+
let r = ai(t) ? [t] : si(t);
|
|
1881
|
+
if (r.some((e) => ri.includes(e))) return n;
|
|
1882
|
+
let i = r.reduce((e, t) => R(e) ? void 0 : e[t], e);
|
|
1883
|
+
return U(i) || i === e ? U(e[t]) ? n : e[t] : i;
|
|
1884
|
+
}, G = (e) => typeof e == "boolean", K = (e) => typeof e == "function", q = (e, t, n) => {
|
|
1885
|
+
let r = -1, i = ai(t) ? [t] : si(t), a = i.length, o = a - 1;
|
|
1860
1886
|
for (; ++r < a;) {
|
|
1861
1887
|
let t = i[r], a = n;
|
|
1862
1888
|
if (r !== o) {
|
|
1863
1889
|
let n = e[t];
|
|
1864
|
-
a =
|
|
1890
|
+
a = z(n) || Array.isArray(n) ? n : isNaN(+i[r + 1]) ? {} : [];
|
|
1865
1891
|
}
|
|
1866
|
-
if (
|
|
1892
|
+
if (ri.includes(t)) return;
|
|
1867
1893
|
e[t] = a, e = e[t];
|
|
1868
1894
|
}
|
|
1869
|
-
},
|
|
1870
|
-
|
|
1871
|
-
var
|
|
1895
|
+
}, ci = k.createContext(null);
|
|
1896
|
+
ci.displayName = "HookFormControlContext";
|
|
1897
|
+
var li = () => k.useContext(ci), ui = (e, t, n, r = !0) => {
|
|
1872
1898
|
let i = {};
|
|
1873
1899
|
for (let a in e) Object.defineProperty(i, a, { get: () => {
|
|
1874
1900
|
let i = a;
|
|
1875
|
-
return t._proxyFormState[i] !==
|
|
1901
|
+
return t._proxyFormState[i] !== V.all && (t._proxyFormState[i] = !r || V.all), n && (n[i] = !0), e[i];
|
|
1876
1902
|
} });
|
|
1877
1903
|
return i;
|
|
1878
|
-
},
|
|
1879
|
-
function
|
|
1904
|
+
}, di = ei ? k.useLayoutEffect : k.useEffect, fi = (e) => R(e) || !Xr(e), pi = (e, t) => t.length === 0 && !Array.isArray(e) && !$r(e);
|
|
1905
|
+
function J(e, t, n = /* @__PURE__ */ new WeakMap()) {
|
|
1880
1906
|
if (e === t) return !0;
|
|
1881
|
-
if (
|
|
1882
|
-
if (
|
|
1907
|
+
if (fi(e) || fi(t)) return Object.is(e, t);
|
|
1908
|
+
if (L(e) && L(t)) return Object.is(e.getTime(), t.getTime());
|
|
1883
1909
|
let r = Object.keys(e), i = Object.keys(t);
|
|
1884
1910
|
if (r.length !== i.length) return !1;
|
|
1885
|
-
if (
|
|
1911
|
+
if (pi(e, r) || pi(t, i)) return Object.is(e, t);
|
|
1886
1912
|
if (!r.length && Array.isArray(e) !== Array.isArray(t)) return !1;
|
|
1887
1913
|
let a = n.get(e);
|
|
1888
1914
|
if (a && a.has(t)) return !0;
|
|
@@ -1896,31 +1922,31 @@ function Y(e, t, n = /* @__PURE__ */ new WeakMap()) {
|
|
|
1896
1922
|
if (!(i in t)) return !1;
|
|
1897
1923
|
if (i !== "ref") {
|
|
1898
1924
|
let e = t[i];
|
|
1899
|
-
if (
|
|
1925
|
+
if (L(r) && L(e) || (z(r) || Array.isArray(r)) && (z(e) || Array.isArray(e)) ? !J(r, e, n) : !Object.is(r, e)) return !1;
|
|
1900
1926
|
}
|
|
1901
1927
|
}
|
|
1902
1928
|
return !0;
|
|
1903
1929
|
}
|
|
1904
|
-
function
|
|
1905
|
-
let e =
|
|
1930
|
+
function mi() {
|
|
1931
|
+
let e = k.useRef(!1), t = k.useRef(void 0);
|
|
1906
1932
|
return {
|
|
1907
|
-
resyncIfNeeded:
|
|
1933
|
+
resyncIfNeeded: k.useCallback((n, r, i) => {
|
|
1908
1934
|
if (n && e.current) {
|
|
1909
1935
|
let e = r();
|
|
1910
|
-
|
|
1936
|
+
J(t.current, e) || i(e);
|
|
1911
1937
|
}
|
|
1912
1938
|
e.current = !0;
|
|
1913
1939
|
}, []),
|
|
1914
|
-
snapshot:
|
|
1915
|
-
e && (t.current =
|
|
1940
|
+
snapshot: k.useCallback((e, n) => {
|
|
1941
|
+
e && (t.current = B(n()));
|
|
1916
1942
|
}, [])
|
|
1917
1943
|
};
|
|
1918
1944
|
}
|
|
1919
|
-
function
|
|
1920
|
-
let t =
|
|
1945
|
+
function hi(e) {
|
|
1946
|
+
let t = li(), { control: n = t, disabled: r, name: i, exact: a } = e || {}, [o, s] = k.useState(() => ({
|
|
1921
1947
|
...n._formState,
|
|
1922
1948
|
defaultValues: n._defaultValues
|
|
1923
|
-
})), c =
|
|
1949
|
+
})), c = k.useRef({
|
|
1924
1950
|
isDirty: !1,
|
|
1925
1951
|
isLoading: !1,
|
|
1926
1952
|
dirtyFields: !1,
|
|
@@ -1929,8 +1955,8 @@ function li(e) {
|
|
|
1929
1955
|
isValidating: !1,
|
|
1930
1956
|
isValid: !1,
|
|
1931
1957
|
errors: !1
|
|
1932
|
-
}), { resyncIfNeeded: l, snapshot: u } =
|
|
1933
|
-
return
|
|
1958
|
+
}), { resyncIfNeeded: l, snapshot: u } = mi();
|
|
1959
|
+
return di(() => {
|
|
1934
1960
|
let e = () => ({
|
|
1935
1961
|
...n._formState,
|
|
1936
1962
|
defaultValues: n._defaultValues
|
|
@@ -1957,30 +1983,30 @@ function li(e) {
|
|
|
1957
1983
|
a,
|
|
1958
1984
|
l,
|
|
1959
1985
|
u
|
|
1960
|
-
]),
|
|
1986
|
+
]), k.useEffect(() => {
|
|
1961
1987
|
c.current.isValid && n._setValid(!0);
|
|
1962
|
-
}, [n]),
|
|
1988
|
+
}, [n]), k.useMemo(() => ui(o, n, c.current, !1), [o, n]);
|
|
1963
1989
|
}
|
|
1964
|
-
var
|
|
1965
|
-
function
|
|
1966
|
-
let t =
|
|
1990
|
+
var Y = (e) => typeof e == "string", gi = (e, t, n, r, i) => Y(e) ? (r && t.watch.add(e), W(n, e, i)) : Array.isArray(e) ? e.map((e) => (r && t.watch.add(e), W(n, e))) : (r && (t.watchAll = !0), n);
|
|
1991
|
+
function _i(e) {
|
|
1992
|
+
let t = li(), { control: n = t, name: r, defaultValue: i, disabled: a, exact: o, compute: s } = e || {}, c = k.useRef(i), l = k.useRef(s), u = k.useRef(void 0), d = k.useRef(n), f = k.useRef(r);
|
|
1967
1993
|
l.current = s;
|
|
1968
|
-
let [p, m] =
|
|
1994
|
+
let [p, m] = k.useState(() => {
|
|
1969
1995
|
let e = n._getWatch(r, c.current);
|
|
1970
1996
|
return l.current ? l.current(e) : e;
|
|
1971
|
-
}), h =
|
|
1972
|
-
let t =
|
|
1997
|
+
}), h = k.useCallback((e) => {
|
|
1998
|
+
let t = gi(r, n._names, e || n._formValues, !1, c.current);
|
|
1973
1999
|
return l.current ? l.current(t) : t;
|
|
1974
2000
|
}, [
|
|
1975
2001
|
n._formValues,
|
|
1976
2002
|
n._names,
|
|
1977
2003
|
r
|
|
1978
|
-
]), g =
|
|
2004
|
+
]), g = k.useCallback((e) => {
|
|
1979
2005
|
if (!a) {
|
|
1980
|
-
let t =
|
|
2006
|
+
let t = gi(r, n._names, e || n._formValues, !1, c.current);
|
|
1981
2007
|
if (l.current) {
|
|
1982
2008
|
let e = l.current(t);
|
|
1983
|
-
|
|
2009
|
+
J(e, u.current) || (m(e), u.current = e);
|
|
1984
2010
|
} else m(t);
|
|
1985
2011
|
}
|
|
1986
2012
|
}, [
|
|
@@ -1988,11 +2014,11 @@ function di(e) {
|
|
|
1988
2014
|
n._names,
|
|
1989
2015
|
a,
|
|
1990
2016
|
r
|
|
1991
|
-
]), { resyncIfNeeded: _, snapshot: v } =
|
|
2017
|
+
]), { resyncIfNeeded: _, snapshot: v } = mi(), y = k.useRef(g);
|
|
1992
2018
|
y.current = g;
|
|
1993
|
-
let b =
|
|
1994
|
-
b.current = h,
|
|
1995
|
-
d.current !== n || !
|
|
2019
|
+
let b = k.useRef(h);
|
|
2020
|
+
b.current = h, di(() => {
|
|
2021
|
+
d.current !== n || !J(f.current, r) ? (d.current = n, f.current = r, y.current()) : _(!a, () => b.current(), (e) => {
|
|
1996
2022
|
m(e), u.current = e;
|
|
1997
2023
|
});
|
|
1998
2024
|
let e = n._subscribe({
|
|
@@ -2013,10 +2039,10 @@ function di(e) {
|
|
|
2013
2039
|
a,
|
|
2014
2040
|
_,
|
|
2015
2041
|
v
|
|
2016
|
-
]),
|
|
2017
|
-
let x = d.current !== n, S = f.current, C =
|
|
2042
|
+
]), k.useEffect(() => n._removeUnmounted());
|
|
2043
|
+
let x = d.current !== n, S = f.current, C = k.useMemo(() => {
|
|
2018
2044
|
if (a) return null;
|
|
2019
|
-
let e = !x && !
|
|
2045
|
+
let e = !x && !J(S, r);
|
|
2020
2046
|
return x || e ? h() : null;
|
|
2021
2047
|
}, [
|
|
2022
2048
|
a,
|
|
@@ -2027,78 +2053,78 @@ function di(e) {
|
|
|
2027
2053
|
]);
|
|
2028
2054
|
return C === null ? p : C;
|
|
2029
2055
|
}
|
|
2030
|
-
function
|
|
2031
|
-
let t =
|
|
2056
|
+
function vi(e) {
|
|
2057
|
+
let t = li(), { name: n, disabled: r, control: i = t, shouldUnregister: a, defaultValue: o, exact: s = !0 } = e, c = Qr(i._names.array, n), l = _i({
|
|
2032
2058
|
control: i,
|
|
2033
2059
|
name: n,
|
|
2034
|
-
defaultValue:
|
|
2060
|
+
defaultValue: k.useMemo(() => W(i._formValues, n, W(i._defaultValues, n, o)), [
|
|
2035
2061
|
i,
|
|
2036
2062
|
n,
|
|
2037
2063
|
o
|
|
2038
2064
|
]),
|
|
2039
2065
|
exact: s
|
|
2040
|
-
}), u =
|
|
2066
|
+
}), u = hi({
|
|
2041
2067
|
control: i,
|
|
2042
2068
|
name: n,
|
|
2043
2069
|
exact: s
|
|
2044
|
-
}), d =
|
|
2070
|
+
}), d = k.useRef(e), f = k.useRef(null), p = k.useRef(i.register(n, {
|
|
2045
2071
|
...e.rules,
|
|
2046
2072
|
value: l,
|
|
2047
|
-
...
|
|
2073
|
+
...G(e.disabled) ? { disabled: e.disabled } : {}
|
|
2048
2074
|
}));
|
|
2049
2075
|
d.current = e;
|
|
2050
|
-
let m =
|
|
2076
|
+
let m = k.useMemo(() => Object.defineProperties({}, {
|
|
2051
2077
|
invalid: {
|
|
2052
2078
|
enumerable: !0,
|
|
2053
|
-
get: () => !!
|
|
2079
|
+
get: () => !!W(u.errors, n)
|
|
2054
2080
|
},
|
|
2055
2081
|
isDirty: {
|
|
2056
2082
|
enumerable: !0,
|
|
2057
|
-
get: () => !!
|
|
2083
|
+
get: () => !!W(u.dirtyFields, n)
|
|
2058
2084
|
},
|
|
2059
2085
|
isTouched: {
|
|
2060
2086
|
enumerable: !0,
|
|
2061
|
-
get: () => !!
|
|
2087
|
+
get: () => !!W(u.touchedFields, n)
|
|
2062
2088
|
},
|
|
2063
2089
|
isValidating: {
|
|
2064
2090
|
enumerable: !0,
|
|
2065
|
-
get: () => !!
|
|
2091
|
+
get: () => !!W(u.validatingFields, n)
|
|
2066
2092
|
},
|
|
2067
2093
|
error: {
|
|
2068
2094
|
enumerable: !0,
|
|
2069
|
-
get: () =>
|
|
2095
|
+
get: () => W(u.errors, n)
|
|
2070
2096
|
}
|
|
2071
|
-
}), [u, n]), h =
|
|
2072
|
-
let t =
|
|
2073
|
-
return
|
|
2097
|
+
}), [u, n]), h = k.useCallback((e) => {
|
|
2098
|
+
let t = Zr(e);
|
|
2099
|
+
return W(i._fields, n) || (p.current = i.register(n, {
|
|
2074
2100
|
...d.current.rules,
|
|
2075
2101
|
value: t
|
|
2076
2102
|
})), p.current.onChange({
|
|
2077
2103
|
target: {
|
|
2078
|
-
value:
|
|
2104
|
+
value: Zr(e),
|
|
2079
2105
|
name: n
|
|
2080
2106
|
},
|
|
2081
|
-
type:
|
|
2107
|
+
type: ti.CHANGE
|
|
2082
2108
|
});
|
|
2083
|
-
}, [n, i]), g =
|
|
2109
|
+
}, [n, i]), g = k.useCallback(() => p.current.onBlur({
|
|
2084
2110
|
target: {
|
|
2085
|
-
value:
|
|
2111
|
+
value: W(i._formValues, n),
|
|
2086
2112
|
name: n
|
|
2087
2113
|
},
|
|
2088
|
-
type:
|
|
2089
|
-
}), [n, i._formValues]), _ =
|
|
2114
|
+
type: ti.BLUR
|
|
2115
|
+
}), [n, i._formValues]), _ = k.useCallback((e) => {
|
|
2090
2116
|
e && (f.current = {
|
|
2091
|
-
focus: () =>
|
|
2092
|
-
select: () =>
|
|
2093
|
-
setCustomValidity: (t) =>
|
|
2094
|
-
reportValidity: () =>
|
|
2117
|
+
focus: () => K(e.focus) && e.focus(),
|
|
2118
|
+
select: () => K(e.select) && e.select(),
|
|
2119
|
+
setCustomValidity: (t) => K(e.setCustomValidity) && e.setCustomValidity(t),
|
|
2120
|
+
reportValidity: () => K(e.reportValidity) && e.reportValidity()
|
|
2095
2121
|
});
|
|
2096
|
-
let t =
|
|
2122
|
+
let t = W(i._fields, n);
|
|
2097
2123
|
t && t._f && e && (t._f.ref = f.current);
|
|
2098
|
-
}, [i._fields, n]), v =
|
|
2124
|
+
}, [i._fields, n]), v = k.useMemo(() => ({
|
|
2099
2125
|
name: n,
|
|
2100
2126
|
value: l,
|
|
2101
|
-
...
|
|
2127
|
+
...G(r) || u.disabled ? { disabled: u.disabled || r } : {},
|
|
2102
2128
|
onChange: h,
|
|
2103
2129
|
onBlur: g,
|
|
2104
2130
|
ref: _
|
|
@@ -2111,22 +2137,22 @@ function fi(e) {
|
|
|
2111
2137
|
_,
|
|
2112
2138
|
l
|
|
2113
2139
|
]);
|
|
2114
|
-
return
|
|
2140
|
+
return k.useEffect(() => {
|
|
2115
2141
|
let e = i._options.shouldUnregister || a;
|
|
2116
2142
|
p.current = i.register(n, {
|
|
2117
2143
|
...d.current.rules,
|
|
2118
|
-
...
|
|
2144
|
+
...G(d.current.disabled) ? { disabled: d.current.disabled } : {}
|
|
2119
2145
|
});
|
|
2120
2146
|
let t = (e, t) => {
|
|
2121
|
-
let n =
|
|
2147
|
+
let n = W(i._fields, e);
|
|
2122
2148
|
n && n._f && (n._f.mount = t);
|
|
2123
2149
|
};
|
|
2124
2150
|
if (t(n, !0), e) {
|
|
2125
|
-
let e =
|
|
2126
|
-
|
|
2151
|
+
let e = B(W(a ? i._defaultValues : i._options.values || i._defaultValues, n, W(i._options.defaultValues, n, d.current.defaultValue)));
|
|
2152
|
+
q(i._defaultValues, n, e), U(W(i._formValues, n)) && q(i._formValues, n, e);
|
|
2127
2153
|
}
|
|
2128
2154
|
if (!c && i.register(n), f.current) {
|
|
2129
|
-
let e =
|
|
2155
|
+
let e = W(i._fields, n);
|
|
2130
2156
|
e && e._f && (e._f.ref = f.current);
|
|
2131
2157
|
}
|
|
2132
2158
|
return () => {
|
|
@@ -2137,7 +2163,7 @@ function fi(e) {
|
|
|
2137
2163
|
i,
|
|
2138
2164
|
c,
|
|
2139
2165
|
a
|
|
2140
|
-
]),
|
|
2166
|
+
]), k.useEffect(() => {
|
|
2141
2167
|
i._setDisabledField({
|
|
2142
2168
|
disabled: r,
|
|
2143
2169
|
name: n
|
|
@@ -2146,7 +2172,7 @@ function fi(e) {
|
|
|
2146
2172
|
r,
|
|
2147
2173
|
n,
|
|
2148
2174
|
i
|
|
2149
|
-
]),
|
|
2175
|
+
]), k.useMemo(() => ({
|
|
2150
2176
|
field: v,
|
|
2151
2177
|
formState: u,
|
|
2152
2178
|
fieldState: m
|
|
@@ -2156,56 +2182,56 @@ function fi(e) {
|
|
|
2156
2182
|
m
|
|
2157
2183
|
]);
|
|
2158
2184
|
}
|
|
2159
|
-
var
|
|
2185
|
+
var yi = (e) => e.render(vi(e)), bi = () => {
|
|
2160
2186
|
if (typeof crypto < "u" && crypto.randomUUID) return crypto.randomUUID();
|
|
2161
2187
|
let e = typeof performance > "u" ? Date.now() : performance.now() * 1e3;
|
|
2162
2188
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (t) => {
|
|
2163
2189
|
let n = (Math.random() * 16 + e) % 16 | 0;
|
|
2164
2190
|
return (t == "x" ? n : n & 3 | 8).toString(16);
|
|
2165
2191
|
});
|
|
2166
|
-
},
|
|
2167
|
-
isOnSubmit: !e || e ===
|
|
2168
|
-
isOnBlur: e ===
|
|
2169
|
-
isOnChange: e ===
|
|
2170
|
-
isOnAll: e ===
|
|
2171
|
-
isOnTouch: e ===
|
|
2172
|
-
}),
|
|
2192
|
+
}, xi = (e, t, n = {}) => n.shouldFocus || U(n.shouldFocus) ? n.focusName || `${e}.${U(n.focusIndex) ? t : n.focusIndex}.` : "", X = (e) => ({
|
|
2193
|
+
isOnSubmit: !e || e === V.onSubmit,
|
|
2194
|
+
isOnBlur: e === V.onBlur,
|
|
2195
|
+
isOnChange: e === V.onChange,
|
|
2196
|
+
isOnAll: e === V.all,
|
|
2197
|
+
isOnTouch: e === V.onTouched
|
|
2198
|
+
}), Si = (e, t, n) => {
|
|
2173
2199
|
if (n) return !1;
|
|
2174
2200
|
if (t.watchAll || t.watch.has(e)) return !0;
|
|
2175
2201
|
for (let n of t.watch) if (e.startsWith(n) && e.charAt(n.length) === ".") return !0;
|
|
2176
2202
|
return !1;
|
|
2177
|
-
},
|
|
2203
|
+
}, Ci = (e, t, n, r) => {
|
|
2178
2204
|
for (let i of n || Object.keys(e)) {
|
|
2179
2205
|
if (i === "_f") continue;
|
|
2180
|
-
let a = n ?
|
|
2206
|
+
let a = n ? W(e, i) : e[i];
|
|
2181
2207
|
if (a) {
|
|
2182
2208
|
let { _f: e } = a;
|
|
2183
2209
|
if (e) {
|
|
2184
2210
|
if (e.refs && e.refs[0] && t(e.refs[0], i) && !r || e.ref && t(e.ref, e.name) && !r) return !0;
|
|
2185
|
-
if (
|
|
2186
|
-
} else if ((
|
|
2211
|
+
if (Ci(a, t)) break;
|
|
2212
|
+
} else if ((z(a) || Array.isArray(a)) && Ci(a, t)) break;
|
|
2187
2213
|
}
|
|
2188
2214
|
}
|
|
2189
|
-
},
|
|
2190
|
-
let r =
|
|
2191
|
-
return
|
|
2192
|
-
}, Z = (e) =>
|
|
2193
|
-
if (!
|
|
2215
|
+
}, wi = (e, t, n) => {
|
|
2216
|
+
let r = W(e, n), i = Array.isArray(r) ? r : [];
|
|
2217
|
+
return q(i, ni, t[n]), q(e, n, i), e;
|
|
2218
|
+
}, Z = (e) => z(e) && !Object.keys(e).length, Ti = (e) => {
|
|
2219
|
+
if (!ei) return !1;
|
|
2194
2220
|
let t = e ? e.ownerDocument : 0;
|
|
2195
2221
|
return e instanceof (t && t.defaultView ? t.defaultView.HTMLElement : HTMLElement);
|
|
2196
|
-
},
|
|
2222
|
+
}, Ei = (e) => e.type === "radio", Di = (e) => e instanceof RegExp, Oi = (e, t, n, r, i) => t ? {
|
|
2197
2223
|
...n[e],
|
|
2198
2224
|
types: {
|
|
2199
2225
|
...n[e] && n[e].types ? n[e].types : {},
|
|
2200
2226
|
[r]: i || !0
|
|
2201
2227
|
}
|
|
2202
|
-
} : {},
|
|
2228
|
+
} : {}, ki = {
|
|
2203
2229
|
value: !1,
|
|
2204
2230
|
isValid: !1
|
|
2205
|
-
},
|
|
2231
|
+
}, Ai = {
|
|
2206
2232
|
value: !0,
|
|
2207
2233
|
isValid: !0
|
|
2208
|
-
},
|
|
2234
|
+
}, ji = (e) => {
|
|
2209
2235
|
if (Array.isArray(e)) {
|
|
2210
2236
|
if (e.length > 1) {
|
|
2211
2237
|
let t = e.filter((e) => e && e.checked && !e.disabled).map((e) => e.value);
|
|
@@ -2214,38 +2240,38 @@ var pi = (e) => e.render(fi(e)), mi = () => {
|
|
|
2214
2240
|
isValid: !!t.length
|
|
2215
2241
|
};
|
|
2216
2242
|
}
|
|
2217
|
-
return e[0].checked && !e[0].disabled ? e[0].attributes && !
|
|
2243
|
+
return e[0].checked && !e[0].disabled ? e[0].attributes && !U(e[0].attributes.value) ? U(e[0].value) || e[0].value === "" ? Ai : {
|
|
2218
2244
|
value: e[0].value,
|
|
2219
2245
|
isValid: !0
|
|
2220
|
-
} :
|
|
2246
|
+
} : Ai : ki;
|
|
2221
2247
|
}
|
|
2222
|
-
return
|
|
2223
|
-
},
|
|
2248
|
+
return ki;
|
|
2249
|
+
}, Mi = {
|
|
2224
2250
|
isValid: !1,
|
|
2225
2251
|
value: null
|
|
2226
|
-
},
|
|
2252
|
+
}, Ni = (e) => Array.isArray(e) ? e.reduce((e, t) => t && t.checked && !t.disabled ? {
|
|
2227
2253
|
isValid: !0,
|
|
2228
2254
|
value: t.value
|
|
2229
|
-
} : e,
|
|
2230
|
-
function
|
|
2231
|
-
if (
|
|
2255
|
+
} : e, Mi) : Mi;
|
|
2256
|
+
function Pi(e, t, n = "validate") {
|
|
2257
|
+
if (Y(e) || Array.isArray(e) && e.every(Y) || G(e) && !e) return {
|
|
2232
2258
|
type: n,
|
|
2233
|
-
message:
|
|
2259
|
+
message: Y(e) ? e : "",
|
|
2234
2260
|
ref: t
|
|
2235
2261
|
};
|
|
2236
2262
|
}
|
|
2237
|
-
var
|
|
2263
|
+
var Fi = (e) => z(e) && !Di(e) ? e : {
|
|
2238
2264
|
value: e,
|
|
2239
2265
|
message: ""
|
|
2240
|
-
},
|
|
2241
|
-
let { ref: o, refs: s, required: c, maxLength: l, minLength: u, min: d, max: f, pattern: p, validate: m, name: h, valueAsNumber: g, mount: _ } = e._f, v =
|
|
2266
|
+
}, Ii = async (e, t, n, r, i, a) => {
|
|
2267
|
+
let { ref: o, refs: s, required: c, maxLength: l, minLength: u, min: d, max: f, pattern: p, validate: m, name: h, valueAsNumber: g, mount: _ } = e._f, v = W(n, h);
|
|
2242
2268
|
if (!_ || t.has(h)) return {};
|
|
2243
2269
|
let y = s ? s[0] : o, b = (e) => {
|
|
2244
2270
|
if (i && y.reportValidity) {
|
|
2245
|
-
let t =
|
|
2271
|
+
let t = G(e) ? "" : e || "";
|
|
2246
2272
|
s ? s.forEach((e) => e.setCustomValidity(t)) : y.setCustomValidity(t), y.reportValidity();
|
|
2247
2273
|
}
|
|
2248
|
-
}, x = {}, S =
|
|
2274
|
+
}, x = {}, S = Ei(o), C = Jr(o), w = S || C, T = (g || Yr(o)) && U(o.value) && U(v) || Ti(o) && o.value === "" || v === "" || Array.isArray(v) && !v.length, E = Oi.bind(null, h, r, x), ee = (e, t, n, r = H.maxLength, i = H.minLength) => {
|
|
2249
2275
|
let a = e ? t : n;
|
|
2250
2276
|
x[h] = {
|
|
2251
2277
|
type: e ? r : i,
|
|
@@ -2254,54 +2280,54 @@ var Ai = (e) => B(e) && !Si(e) ? e : {
|
|
|
2254
2280
|
...E(e ? r : i, a)
|
|
2255
2281
|
};
|
|
2256
2282
|
};
|
|
2257
|
-
if (a ? !Array.isArray(v) || !v.length : c && (!w && (T ||
|
|
2258
|
-
let { value: e, message: t } =
|
|
2283
|
+
if (a ? !Array.isArray(v) || !v.length : c && (!w && (T || R(v)) || G(v) && !v || C && !ji(s).isValid || S && !Ni(s).isValid)) {
|
|
2284
|
+
let { value: e, message: t } = Y(c) ? {
|
|
2259
2285
|
value: !!c,
|
|
2260
2286
|
message: c
|
|
2261
|
-
} :
|
|
2287
|
+
} : Fi(c);
|
|
2262
2288
|
if (e && (x[h] = {
|
|
2263
|
-
type:
|
|
2289
|
+
type: H.required,
|
|
2264
2290
|
message: t,
|
|
2265
2291
|
ref: y,
|
|
2266
|
-
...E(
|
|
2292
|
+
...E(H.required, t)
|
|
2267
2293
|
}, !r)) return b(t), x;
|
|
2268
2294
|
}
|
|
2269
|
-
if (!T && (!
|
|
2270
|
-
let e, t, n =
|
|
2271
|
-
if (!
|
|
2295
|
+
if (!T && (!R(d) || !R(f))) {
|
|
2296
|
+
let e, t, n = Fi(f), i = Fi(d);
|
|
2297
|
+
if (!R(v) && !L(v) && !isNaN(v)) {
|
|
2272
2298
|
let r = o.valueAsNumber || v && +v;
|
|
2273
|
-
|
|
2299
|
+
R(n.value) || (e = r > n.value), R(i.value) || (t = r < i.value);
|
|
2274
2300
|
} else {
|
|
2275
2301
|
let r = o.valueAsDate || new Date(v), a = (e) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + e), s = o.type == "time", c = o.type == "week";
|
|
2276
|
-
|
|
2302
|
+
Y(n.value) && v && (e = s ? a(v) > a(n.value) : c ? v > n.value : r > new Date(n.value)), Y(i.value) && v && (t = s ? a(v) < a(i.value) : c ? v < i.value : r < new Date(i.value));
|
|
2277
2303
|
}
|
|
2278
|
-
if ((e || t) && (ee(!!e, n.message, i.message,
|
|
2304
|
+
if ((e || t) && (ee(!!e, n.message, i.message, H.max, H.min), !r)) return b(x[h].message), x;
|
|
2279
2305
|
}
|
|
2280
|
-
if ((l || u) && !T && (
|
|
2281
|
-
let e =
|
|
2306
|
+
if ((l || u) && !T && (Y(v) || a && Array.isArray(v))) {
|
|
2307
|
+
let e = Fi(l), t = Fi(u), n = !R(e.value) && v.length > +e.value, i = !R(t.value) && v.length < +t.value;
|
|
2282
2308
|
if ((n || i) && (ee(n, e.message, t.message), !r)) return b(x[h].message), x;
|
|
2283
2309
|
}
|
|
2284
|
-
if (p && !T &&
|
|
2285
|
-
let { value: e, message: t } =
|
|
2286
|
-
if (
|
|
2287
|
-
type:
|
|
2310
|
+
if (p && !T && Y(v)) {
|
|
2311
|
+
let { value: e, message: t } = Fi(p);
|
|
2312
|
+
if (Di(e) && !v.match(e) && (x[h] = {
|
|
2313
|
+
type: H.pattern,
|
|
2288
2314
|
message: t,
|
|
2289
2315
|
ref: o,
|
|
2290
|
-
...E(
|
|
2316
|
+
...E(H.pattern, t)
|
|
2291
2317
|
}, !r)) return b(t), x;
|
|
2292
2318
|
}
|
|
2293
2319
|
if (m) {
|
|
2294
|
-
if (
|
|
2295
|
-
let e =
|
|
2320
|
+
if (K(m)) {
|
|
2321
|
+
let e = Pi(await m(v, n), y);
|
|
2296
2322
|
if (e && (x[h] = {
|
|
2297
2323
|
...e,
|
|
2298
|
-
...E(
|
|
2324
|
+
...E(H.validate, e.message)
|
|
2299
2325
|
}, !r)) return b(e.message), x;
|
|
2300
|
-
} else if (
|
|
2326
|
+
} else if (z(m)) {
|
|
2301
2327
|
let e = {};
|
|
2302
2328
|
for (let t in m) {
|
|
2303
2329
|
if (!Z(e) && !r) break;
|
|
2304
|
-
let i =
|
|
2330
|
+
let i = Pi(await m[t](v, n), y, t);
|
|
2305
2331
|
i && (e = {
|
|
2306
2332
|
...i,
|
|
2307
2333
|
...E(t, i.message)
|
|
@@ -2314,27 +2340,27 @@ var Ai = (e) => B(e) && !Si(e) ? e : {
|
|
|
2314
2340
|
}
|
|
2315
2341
|
}
|
|
2316
2342
|
return b(!0), x;
|
|
2317
|
-
}, Q = (e) => Array.isArray(e) ? e : [e],
|
|
2318
|
-
function
|
|
2343
|
+
}, Q = (e) => Array.isArray(e) ? e : [e], Li = (e, t) => [...e, ...Q(t)], Ri = (e) => Array.isArray(e) ? e.map(() => void 0) : void 0;
|
|
2344
|
+
function zi(e, t, n) {
|
|
2319
2345
|
return [
|
|
2320
2346
|
...e.slice(0, t),
|
|
2321
2347
|
...Q(n),
|
|
2322
2348
|
...e.slice(t)
|
|
2323
2349
|
];
|
|
2324
2350
|
}
|
|
2325
|
-
var
|
|
2326
|
-
function
|
|
2351
|
+
var Bi = (e, t, n) => Array.isArray(e) ? (U(e[n]) && (e[n] = void 0), e.splice(n, 0, e.splice(t, 1)[0]), e) : [], Vi = (e, t) => [...Q(t), ...Q(e)], Hi = (e) => Array.isArray(e) ? e.filter(Boolean) : [];
|
|
2352
|
+
function Ui(e, t) {
|
|
2327
2353
|
let n = 0, r = [...e];
|
|
2328
2354
|
for (let e of t) r.splice(e - n, 1), n++;
|
|
2329
|
-
return
|
|
2355
|
+
return Hi(r).length ? r : [];
|
|
2330
2356
|
}
|
|
2331
|
-
var
|
|
2357
|
+
var Wi = (e, t) => U(t) ? [] : Ui(e, Q(t).sort((e, t) => e - t)), Gi = (e, t, n) => {
|
|
2332
2358
|
[e[t], e[n]] = [e[n], e[t]];
|
|
2333
2359
|
};
|
|
2334
|
-
function
|
|
2360
|
+
function Ki(e, t) {
|
|
2335
2361
|
let n = t.length - 1, r = 0;
|
|
2336
2362
|
for (; r < n;) {
|
|
2337
|
-
if (
|
|
2363
|
+
if (R(e)) {
|
|
2338
2364
|
e = void 0;
|
|
2339
2365
|
break;
|
|
2340
2366
|
}
|
|
@@ -2342,31 +2368,31 @@ function Vi(e, t) {
|
|
|
2342
2368
|
}
|
|
2343
2369
|
return e;
|
|
2344
2370
|
}
|
|
2345
|
-
function
|
|
2346
|
-
for (let t in e) if (e.hasOwnProperty(t) && !
|
|
2371
|
+
function qi(e) {
|
|
2372
|
+
for (let t in e) if (e.hasOwnProperty(t) && !U(e[t])) return !1;
|
|
2347
2373
|
return !0;
|
|
2348
2374
|
}
|
|
2349
2375
|
function $(e, t) {
|
|
2350
|
-
if (
|
|
2351
|
-
let n = Array.isArray(t) ? t :
|
|
2352
|
-
if (n.some((e) =>
|
|
2353
|
-
let r = n.length === 1 ? e :
|
|
2354
|
-
return r && delete r[a], i !== 0 && (
|
|
2355
|
-
}
|
|
2356
|
-
var
|
|
2357
|
-
function
|
|
2358
|
-
let t =
|
|
2359
|
-
a || n._names.array.add(r),
|
|
2376
|
+
if (Y(t) && Object.prototype.hasOwnProperty.call(e, t)) return delete e[t], e;
|
|
2377
|
+
let n = Array.isArray(t) ? t : ai(t) ? [t] : si(t);
|
|
2378
|
+
if (n.some((e) => ri.includes(String(e)))) return e;
|
|
2379
|
+
let r = n.length === 1 ? e : Ki(e, n), i = n.length - 1, a = n[i];
|
|
2380
|
+
return r && delete r[a], i !== 0 && (z(r) && Z(r) || Array.isArray(r) && qi(r)) && $(e, n.slice(0, -1)), e;
|
|
2381
|
+
}
|
|
2382
|
+
var Ji = (e, t, n) => (e[t] = n, e);
|
|
2383
|
+
function Yi(e) {
|
|
2384
|
+
let t = li(), { control: n = t, name: r, keyName: i = "id", disabled: a, shouldUnregister: o, rules: s } = e, [c, l] = k.useState(n._getFieldArray(r)), u = k.useRef(n._getFieldArray(r).map(bi)), d = k.useRef(!1);
|
|
2385
|
+
a || n._names.array.add(r), k.useMemo(() => !a && s && c.length >= 0 && n.register(r, s), [
|
|
2360
2386
|
n,
|
|
2361
2387
|
r,
|
|
2362
2388
|
c.length,
|
|
2363
2389
|
s,
|
|
2364
2390
|
a
|
|
2365
|
-
]),
|
|
2391
|
+
]), di(() => {
|
|
2366
2392
|
if (!a) return n._subjects.array.subscribe({ next: ({ values: e, name: t }) => {
|
|
2367
2393
|
if (t === r || !t) {
|
|
2368
|
-
let n =
|
|
2369
|
-
Array.isArray(n) ? (l(n), u.current = n.map(
|
|
2394
|
+
let n = W(e, r);
|
|
2395
|
+
Array.isArray(n) ? (l(n), u.current = n.map(bi)) : t || (l([]), u.current = []);
|
|
2370
2396
|
}
|
|
2371
2397
|
} }).unsubscribe;
|
|
2372
2398
|
}, [
|
|
@@ -2374,29 +2400,29 @@ function Wi(e) {
|
|
|
2374
2400
|
r,
|
|
2375
2401
|
a
|
|
2376
2402
|
]);
|
|
2377
|
-
let f =
|
|
2403
|
+
let f = k.useCallback((e) => {
|
|
2378
2404
|
d.current = !0, n._setFieldArray(r, e);
|
|
2379
2405
|
}, [n, r]);
|
|
2380
|
-
return
|
|
2406
|
+
return k.useEffect(() => {
|
|
2381
2407
|
if (a) {
|
|
2382
2408
|
n._state.actionArrayLengths.delete(r);
|
|
2383
2409
|
return;
|
|
2384
2410
|
}
|
|
2385
|
-
n._state.action = !1, n._state.actionArrayLengths.delete(r),
|
|
2386
|
-
let e =
|
|
2387
|
-
if (d.current && (!e.isOnSubmit || n._formState.isSubmitted) && !
|
|
2411
|
+
n._state.action = !1, n._state.actionArrayLengths.delete(r), Si(r, n._names) && n._subjects.state.next({ ...n._formState });
|
|
2412
|
+
let e = X(n._options.mode);
|
|
2413
|
+
if (d.current && (!e.isOnSubmit || n._formState.isSubmitted) && !X(n._options.reValidateMode).isOnSubmit && !e.isOnBlur) if (n._options.resolver) n._runSchema([r]).then((e) => {
|
|
2388
2414
|
n._updateIsValidating([r]);
|
|
2389
|
-
let t =
|
|
2390
|
-
(i ? !t && a || t && (a !== t.type || o !== t.message) : t && t.type) && (t ?
|
|
2415
|
+
let t = W(e.errors, r), i = W(n._formState.errors, r), a = i && (i.type || i.root?.type), o = i && (i.message || i.root?.message);
|
|
2416
|
+
(i ? !t && a || t && (a !== t.type || o !== t.message) : t && t.type) && (t ? z(t) && !Object.keys(t).some((e) => !Number.isNaN(+e)) ? wi(n._formState.errors, { [r]: t }, r) : q(n._formState.errors, r, t) : $(n._formState.errors, r), n._subjects.state.next({ errors: n._formState.errors }));
|
|
2391
2417
|
});
|
|
2392
2418
|
else {
|
|
2393
|
-
let e =
|
|
2394
|
-
e && e._f && !(
|
|
2419
|
+
let e = W(n._fields, r);
|
|
2420
|
+
e && e._f && !(X(n._options.reValidateMode).isOnSubmit && X(n._options.mode).isOnSubmit) && Ii(e, n._names.disabled, n._formValues, n._options.criteriaMode === V.all, n._options.shouldUseNativeValidation, !0).then((e) => !Z(e) && n._subjects.state.next({ errors: wi(n._formState.errors, e, r) }));
|
|
2395
2421
|
}
|
|
2396
2422
|
d.current && n._subjects.state.next({
|
|
2397
2423
|
name: r,
|
|
2398
|
-
values:
|
|
2399
|
-
}), n._names.focus &&
|
|
2424
|
+
values: B(n._formValues)
|
|
2425
|
+
}), n._names.focus && Ci(n._fields, (e, t) => {
|
|
2400
2426
|
if (n._names.focus && t.startsWith(n._names.focus) && e.focus) return e.focus(), 1;
|
|
2401
2427
|
}), n._names.focus = "", n._setValid(), d.current = !1;
|
|
2402
2428
|
}, [
|
|
@@ -2404,14 +2430,14 @@ function Wi(e) {
|
|
|
2404
2430
|
r,
|
|
2405
2431
|
n,
|
|
2406
2432
|
a
|
|
2407
|
-
]),
|
|
2433
|
+
]), k.useEffect(() => (a || !W(n._formValues, r) && n._setFieldArray(r), () => {
|
|
2408
2434
|
if (n._state.actionArrayLengths.delete(r), a) return;
|
|
2409
2435
|
let e = !(n._options.shouldUnregister || o);
|
|
2410
2436
|
d.current && e && n._subjects.state.next({
|
|
2411
2437
|
name: r,
|
|
2412
|
-
values:
|
|
2438
|
+
values: B(n._formValues)
|
|
2413
2439
|
}), e ? ((e, t) => {
|
|
2414
|
-
let r =
|
|
2440
|
+
let r = W(n._fields, e);
|
|
2415
2441
|
r && r._f && (r._f.mount = t);
|
|
2416
2442
|
})(r, !1) : n.unregister(r);
|
|
2417
2443
|
}), [
|
|
@@ -2421,10 +2447,10 @@ function Wi(e) {
|
|
|
2421
2447
|
o,
|
|
2422
2448
|
a
|
|
2423
2449
|
]), {
|
|
2424
|
-
swap:
|
|
2450
|
+
swap: k.useCallback((e, t) => {
|
|
2425
2451
|
if (a) return;
|
|
2426
2452
|
let i = n._getFieldArray(r);
|
|
2427
|
-
|
|
2453
|
+
Gi(i, e, t), Gi(u.current, e, t), f(i), l(i), n._setFieldArray(r, i, Gi, {
|
|
2428
2454
|
argA: e,
|
|
2429
2455
|
argB: t
|
|
2430
2456
|
}, !1);
|
|
@@ -2434,10 +2460,10 @@ function Wi(e) {
|
|
|
2434
2460
|
n,
|
|
2435
2461
|
a
|
|
2436
2462
|
]),
|
|
2437
|
-
move:
|
|
2463
|
+
move: k.useCallback((e, t) => {
|
|
2438
2464
|
if (a) return;
|
|
2439
2465
|
let i = n._getFieldArray(r);
|
|
2440
|
-
|
|
2466
|
+
Bi(i, e, t), Bi(u.current, e, t), f(i), l(i), n._setFieldArray(r, i, Bi, {
|
|
2441
2467
|
argA: e,
|
|
2442
2468
|
argB: t
|
|
2443
2469
|
}, !1);
|
|
@@ -2447,42 +2473,42 @@ function Wi(e) {
|
|
|
2447
2473
|
n,
|
|
2448
2474
|
a
|
|
2449
2475
|
]),
|
|
2450
|
-
prepend:
|
|
2476
|
+
prepend: k.useCallback((e, t) => {
|
|
2451
2477
|
if (a) return;
|
|
2452
|
-
let i = Q(
|
|
2453
|
-
n._names.focus =
|
|
2478
|
+
let i = Q(B(e)), o = Vi(n._getFieldArray(r), i);
|
|
2479
|
+
n._names.focus = xi(r, 0, t), u.current = Vi(u.current, i.map(bi)), f(o), l(o), n._setFieldArray(r, o, Vi, { argA: Ri(e) });
|
|
2454
2480
|
}, [
|
|
2455
2481
|
f,
|
|
2456
2482
|
r,
|
|
2457
2483
|
n,
|
|
2458
2484
|
a
|
|
2459
2485
|
]),
|
|
2460
|
-
append:
|
|
2486
|
+
append: k.useCallback((e, t) => {
|
|
2461
2487
|
if (a) return;
|
|
2462
|
-
let i = Q(
|
|
2463
|
-
n._names.focus =
|
|
2488
|
+
let i = Q(B(e)), o = Li(n._getFieldArray(r), i);
|
|
2489
|
+
n._names.focus = xi(r, o.length - 1, t), u.current = Li(u.current, i.map(bi)), f(o), l(o), n._setFieldArray(r, o, Li, { argA: Ri(e) });
|
|
2464
2490
|
}, [
|
|
2465
2491
|
f,
|
|
2466
2492
|
r,
|
|
2467
2493
|
n,
|
|
2468
2494
|
a
|
|
2469
2495
|
]),
|
|
2470
|
-
remove:
|
|
2496
|
+
remove: k.useCallback((e) => {
|
|
2471
2497
|
if (a) return;
|
|
2472
|
-
let t =
|
|
2473
|
-
u.current =
|
|
2498
|
+
let t = Wi(n._getFieldArray(r), e);
|
|
2499
|
+
u.current = Wi(u.current, e), f(t), l(t), !Array.isArray(W(n._fields, r)) && q(n._fields, r, void 0), n._setFieldArray(r, t, Wi, { argA: e });
|
|
2474
2500
|
}, [
|
|
2475
2501
|
f,
|
|
2476
2502
|
r,
|
|
2477
2503
|
n,
|
|
2478
2504
|
a
|
|
2479
2505
|
]),
|
|
2480
|
-
insert:
|
|
2506
|
+
insert: k.useCallback((e, t, i) => {
|
|
2481
2507
|
if (a) return;
|
|
2482
|
-
let o = Q(
|
|
2483
|
-
n._names.focus =
|
|
2508
|
+
let o = Q(B(t)), s = zi(n._getFieldArray(r), e, o);
|
|
2509
|
+
n._names.focus = xi(r, e, i), u.current = zi(u.current, e, o.map(bi)), f(s), l(s), n._setFieldArray(r, s, zi, {
|
|
2484
2510
|
argA: e,
|
|
2485
|
-
argB:
|
|
2511
|
+
argB: Ri(t)
|
|
2486
2512
|
});
|
|
2487
2513
|
}, [
|
|
2488
2514
|
f,
|
|
@@ -2490,10 +2516,10 @@ function Wi(e) {
|
|
|
2490
2516
|
n,
|
|
2491
2517
|
a
|
|
2492
2518
|
]),
|
|
2493
|
-
update:
|
|
2519
|
+
update: k.useCallback((e, t) => {
|
|
2494
2520
|
if (a) return;
|
|
2495
|
-
let i =
|
|
2496
|
-
u.current = [...o].map((t, n) => !t || n === e ?
|
|
2521
|
+
let i = B(t), o = Ji(n._getFieldArray(r), e, i);
|
|
2522
|
+
u.current = [...o].map((t, n) => !t || n === e ? bi() : u.current[n]), f(o), l([...o]), n._setFieldArray(r, o, Ji, {
|
|
2497
2523
|
argA: e,
|
|
2498
2524
|
argB: i
|
|
2499
2525
|
}, !0, !1);
|
|
@@ -2503,20 +2529,20 @@ function Wi(e) {
|
|
|
2503
2529
|
n,
|
|
2504
2530
|
a
|
|
2505
2531
|
]),
|
|
2506
|
-
replace:
|
|
2532
|
+
replace: k.useCallback((e) => {
|
|
2507
2533
|
if (a) return;
|
|
2508
|
-
let t = Q(
|
|
2509
|
-
u.current = t.map(
|
|
2534
|
+
let t = Q(B(e));
|
|
2535
|
+
u.current = t.map(bi), f([...t]), l([...t]), n._setFieldArray(r, [...t], (e) => e, {}, !0, !1);
|
|
2510
2536
|
}, [
|
|
2511
2537
|
f,
|
|
2512
2538
|
r,
|
|
2513
2539
|
n,
|
|
2514
2540
|
a
|
|
2515
2541
|
]),
|
|
2516
|
-
fields:
|
|
2542
|
+
fields: k.useMemo(() => c.map((e, t) => ({
|
|
2517
2543
|
...e,
|
|
2518
|
-
...
|
|
2519
|
-
[i]: u.current[t] ||
|
|
2544
|
+
...G(a) ? { disabled: a } : {},
|
|
2545
|
+
[i]: u.current[t] || bi()
|
|
2520
2546
|
})), [
|
|
2521
2547
|
c,
|
|
2522
2548
|
i,
|
|
@@ -2524,16 +2550,16 @@ function Wi(e) {
|
|
|
2524
2550
|
])
|
|
2525
2551
|
};
|
|
2526
2552
|
}
|
|
2527
|
-
var
|
|
2553
|
+
var Xi = (e) => {
|
|
2528
2554
|
let t = {};
|
|
2529
|
-
for (let n of Object.keys(e)) if (
|
|
2530
|
-
let r =
|
|
2555
|
+
for (let n of Object.keys(e)) if (Xr(e[n]) && e[n] !== null && !L(e[n])) {
|
|
2556
|
+
let r = Xi(e[n]);
|
|
2531
2557
|
for (let e of Object.keys(r)) t[`${n}.${e}`] = r[e];
|
|
2532
2558
|
} else t[n] = e[n];
|
|
2533
2559
|
return t;
|
|
2534
|
-
},
|
|
2535
|
-
|
|
2536
|
-
var
|
|
2560
|
+
}, Zi = k.createContext(null);
|
|
2561
|
+
Zi.displayName = "HookFormContext";
|
|
2562
|
+
var Qi = () => {
|
|
2537
2563
|
let e = [];
|
|
2538
2564
|
return {
|
|
2539
2565
|
get observers() {
|
|
@@ -2550,69 +2576,69 @@ var qi = () => {
|
|
|
2550
2576
|
}
|
|
2551
2577
|
};
|
|
2552
2578
|
};
|
|
2553
|
-
function
|
|
2579
|
+
function $i(e, t) {
|
|
2554
2580
|
let n = {};
|
|
2555
2581
|
for (let r in e) if (e.hasOwnProperty(r)) {
|
|
2556
2582
|
let i = e[r], a = t[r];
|
|
2557
|
-
if (i &&
|
|
2558
|
-
let e =
|
|
2559
|
-
|
|
2583
|
+
if (i && z(i) && a) {
|
|
2584
|
+
let e = $i(i, a);
|
|
2585
|
+
z(e) && (n[r] = e);
|
|
2560
2586
|
} else e[r] && (n[r] = a);
|
|
2561
2587
|
}
|
|
2562
2588
|
return n;
|
|
2563
2589
|
}
|
|
2564
|
-
var
|
|
2565
|
-
function
|
|
2566
|
-
return Array.isArray(e) ||
|
|
2590
|
+
var ea = (e) => e.type === "select-multiple", ta = (e) => Ei(e) || Jr(e), na = (e) => Ti(e) && e.isConnected;
|
|
2591
|
+
function ra(e) {
|
|
2592
|
+
return Array.isArray(e) || z(e);
|
|
2567
2593
|
}
|
|
2568
|
-
function
|
|
2594
|
+
function ia(e, t, n = "", r = []) {
|
|
2569
2595
|
for (let i in e) {
|
|
2570
2596
|
let a = n ? `${n}.${i}` : i, o = e[i];
|
|
2571
|
-
|
|
2597
|
+
ra(o) && ra(W(t, a)) ? ia(o, t, a, r) : r.push(a);
|
|
2572
2598
|
}
|
|
2573
2599
|
return r;
|
|
2574
2600
|
}
|
|
2575
|
-
var
|
|
2576
|
-
for (let t in e) if (
|
|
2601
|
+
var aa = (e) => {
|
|
2602
|
+
for (let t in e) if (K(e[t])) return !0;
|
|
2577
2603
|
return !1;
|
|
2578
2604
|
};
|
|
2579
|
-
function
|
|
2580
|
-
return Array.isArray(e) ||
|
|
2605
|
+
function oa(e) {
|
|
2606
|
+
return Array.isArray(e) || z(e) && !aa(e);
|
|
2581
2607
|
}
|
|
2582
|
-
function
|
|
2608
|
+
function sa(e) {
|
|
2583
2609
|
return !!(e && "_f" in e);
|
|
2584
2610
|
}
|
|
2585
|
-
function
|
|
2586
|
-
return Array.isArray(e) ? !e.some((e) => !
|
|
2611
|
+
function ca(e) {
|
|
2612
|
+
return Array.isArray(e) ? !e.some((e) => !U(e)) : !Object.keys(e).length;
|
|
2587
2613
|
}
|
|
2588
|
-
function
|
|
2614
|
+
function la(e, t) {
|
|
2589
2615
|
Array.isArray(e) ? e[t] = void 0 : delete e[t];
|
|
2590
2616
|
}
|
|
2591
|
-
function
|
|
2617
|
+
function ua(e, t = {}, n) {
|
|
2592
2618
|
for (let r in e) {
|
|
2593
2619
|
let i = e[r], a = n && n[r];
|
|
2594
|
-
|
|
2620
|
+
oa(i) && (!Array.isArray(i) || !sa(a)) ? (t[r] = Array.isArray(i) ? [] : {}, ua(i, t[r], a), ca(t[r]) && la(t, r)) : U(i) || (t[r] = !0);
|
|
2595
2621
|
}
|
|
2596
2622
|
return t;
|
|
2597
2623
|
}
|
|
2598
|
-
function
|
|
2599
|
-
n ||=
|
|
2624
|
+
function da(e, t, n, r) {
|
|
2625
|
+
n ||= ua(t, {}, r);
|
|
2600
2626
|
for (let i in e) {
|
|
2601
2627
|
let a = e[i], o = r && r[i];
|
|
2602
|
-
|
|
2628
|
+
oa(a) && (!Array.isArray(a) || !sa(o)) ? (U(t) || fi(n[i]) ? n[i] = ua(a, Array.isArray(a) ? [] : {}, o) : da(a, R(t) ? {} : t[i], n[i], o), ca(n[i]) && la(n, i)) : J(a, t[i]) ? la(n, i) : n[i] = !0;
|
|
2603
2629
|
}
|
|
2604
2630
|
return n;
|
|
2605
2631
|
}
|
|
2606
|
-
var
|
|
2607
|
-
function
|
|
2632
|
+
var fa = (e, { valueAsNumber: t, valueAsDate: n, setValueAs: r }) => U(e) ? e : t ? e === "" ? NaN : e && +e : n && Y(e) ? new Date(e) : r ? r(e) : e;
|
|
2633
|
+
function pa(e) {
|
|
2608
2634
|
let t = e.ref;
|
|
2609
|
-
return
|
|
2635
|
+
return Yr(t) ? t.files : Ei(t) ? Ni(e.refs).value : ea(t) ? [...t.selectedOptions].map(({ value: e }) => e) : Jr(t) ? ji(e.refs).value : fa(t.value, e);
|
|
2610
2636
|
}
|
|
2611
|
-
var
|
|
2637
|
+
var ma = (e, t, n, r) => {
|
|
2612
2638
|
let i = {};
|
|
2613
2639
|
for (let n of e) {
|
|
2614
|
-
let e =
|
|
2615
|
-
e &&
|
|
2640
|
+
let e = W(t, n);
|
|
2641
|
+
e && q(i, n, e._f);
|
|
2616
2642
|
}
|
|
2617
2643
|
return {
|
|
2618
2644
|
criteriaMode: n,
|
|
@@ -2620,23 +2646,23 @@ var la = (e, t, n, r) => {
|
|
|
2620
2646
|
fields: i,
|
|
2621
2647
|
shouldUseNativeValidation: r
|
|
2622
2648
|
};
|
|
2623
|
-
},
|
|
2649
|
+
}, ha = (e) => U(e) ? e : Di(e) ? e.source : z(e) ? Di(e.value) ? e.value.source : e.value : e, ga = "AsyncFunction", _a = (e) => {
|
|
2624
2650
|
if (!e || !e.validate) return !1;
|
|
2625
|
-
if (
|
|
2626
|
-
if (
|
|
2627
|
-
for (let t in e.validate) if (e.validate[t].constructor.name ===
|
|
2651
|
+
if (K(e.validate)) return e.validate.constructor.name === ga;
|
|
2652
|
+
if (z(e.validate)) {
|
|
2653
|
+
for (let t in e.validate) if (e.validate[t].constructor.name === ga) return !0;
|
|
2628
2654
|
}
|
|
2629
2655
|
return !1;
|
|
2630
|
-
},
|
|
2631
|
-
function
|
|
2632
|
-
let r =
|
|
2633
|
-
if (r ||
|
|
2656
|
+
}, va = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate);
|
|
2657
|
+
function ya(e, t, n) {
|
|
2658
|
+
let r = W(e, n);
|
|
2659
|
+
if (r || ai(n)) return {
|
|
2634
2660
|
error: r,
|
|
2635
2661
|
name: n
|
|
2636
2662
|
};
|
|
2637
2663
|
let i = n.split(".");
|
|
2638
2664
|
for (; i.length;) {
|
|
2639
|
-
let r = i.join("."), a =
|
|
2665
|
+
let r = i.join("."), a = W(t, r), o = W(e, r);
|
|
2640
2666
|
if (a && !Array.isArray(a) && n !== r) return { name: n };
|
|
2641
2667
|
if (o && o.type) return {
|
|
2642
2668
|
name: r,
|
|
@@ -2650,21 +2676,21 @@ function ma(e, t, n) {
|
|
|
2650
2676
|
}
|
|
2651
2677
|
return { name: n };
|
|
2652
2678
|
}
|
|
2653
|
-
var
|
|
2679
|
+
var ba = (e, t, n, r) => {
|
|
2654
2680
|
n(e);
|
|
2655
2681
|
let i = Object.keys(e).filter((e) => e !== "name");
|
|
2656
|
-
return !i.length || r && i.length >= Object.keys(t).length || i.find((e) => t[e] === (!r ||
|
|
2657
|
-
},
|
|
2658
|
-
let n =
|
|
2659
|
-
!
|
|
2660
|
-
},
|
|
2661
|
-
mode:
|
|
2662
|
-
reValidateMode:
|
|
2682
|
+
return !i.length || r && i.length >= Object.keys(t).length || i.find((e) => t[e] === (!r || V.all));
|
|
2683
|
+
}, xa = (e, t, n) => !e || !t || e === t || Q(e).some((e) => e && (n ? e === t || e.startsWith(t + ".") : e.startsWith(t) || t.startsWith(e))), Sa = (e, t, n, r, i) => i.isOnAll ? !1 : !n && i.isOnTouch ? !(t || e) : (n ? r.isOnBlur : i.isOnBlur) ? !e : (n ? r.isOnChange : i.isOnChange) ? e : !0, Ca = (e, t) => {
|
|
2684
|
+
let n = W(e, t);
|
|
2685
|
+
!Hi(n).length && !n?.root && $(e, t);
|
|
2686
|
+
}, wa = {
|
|
2687
|
+
mode: V.onSubmit,
|
|
2688
|
+
reValidateMode: V.onChange,
|
|
2663
2689
|
shouldFocusError: !0
|
|
2664
|
-
},
|
|
2690
|
+
}, Ta = "form", Ea = (e, t) => {
|
|
2665
2691
|
for (let n in e) n in t || delete e[n];
|
|
2666
2692
|
Object.assign(e, t);
|
|
2667
|
-
},
|
|
2693
|
+
}, Da = {
|
|
2668
2694
|
submitCount: 0,
|
|
2669
2695
|
isDirty: !1,
|
|
2670
2696
|
isReady: !1,
|
|
@@ -2677,16 +2703,16 @@ var ha = (e, t, n, r) => {
|
|
|
2677
2703
|
dirtyFields: {},
|
|
2678
2704
|
validatingFields: {}
|
|
2679
2705
|
};
|
|
2680
|
-
function
|
|
2706
|
+
function Oa(e = {}) {
|
|
2681
2707
|
let t = {
|
|
2682
|
-
...
|
|
2708
|
+
...wa,
|
|
2683
2709
|
...e
|
|
2684
2710
|
}, n = {
|
|
2685
|
-
...
|
|
2686
|
-
isLoading:
|
|
2711
|
+
...B(Da),
|
|
2712
|
+
isLoading: K(t.defaultValues),
|
|
2687
2713
|
errors: t.errors || {},
|
|
2688
2714
|
disabled: t.disabled || !1
|
|
2689
|
-
}, r = {}, i = (
|
|
2715
|
+
}, r = {}, i = (z(t.defaultValues) || z(t.values)) && B(t.defaultValues || t.values) || {}, a = t.shouldUnregister ? {} : B(i), o = {
|
|
2690
2716
|
action: !1,
|
|
2691
2717
|
actionArrayLengths: /* @__PURE__ */ new Map(),
|
|
2692
2718
|
mount: !1,
|
|
@@ -2699,7 +2725,7 @@ function Ca(e = {}) {
|
|
|
2699
2725
|
array: /* @__PURE__ */ new Set(),
|
|
2700
2726
|
watch: /* @__PURE__ */ new Set(),
|
|
2701
2727
|
registerName: /* @__PURE__ */ new Set()
|
|
2702
|
-
}, c = {}, l = {}, u = 0, d =
|
|
2728
|
+
}, c = {}, l = {}, u = 0, d = X(t.mode), f = X(t.reValidateMode), p = {
|
|
2703
2729
|
isDirty: !1,
|
|
2704
2730
|
dirtyFields: !1,
|
|
2705
2731
|
validatingFields: !1,
|
|
@@ -2708,105 +2734,105 @@ function Ca(e = {}) {
|
|
|
2708
2734
|
isValid: !1,
|
|
2709
2735
|
errors: !1
|
|
2710
2736
|
}, m = { ...p }, h = { ...m }, g = {
|
|
2711
|
-
array:
|
|
2712
|
-
state:
|
|
2713
|
-
}, _ = 0, v = t.criteriaMode ===
|
|
2737
|
+
array: Qi(),
|
|
2738
|
+
state: Qi()
|
|
2739
|
+
}, _ = 0, v = t.criteriaMode === V.all, y = (e, t) => (n) => {
|
|
2714
2740
|
clearTimeout(l[e]), l[e] = setTimeout(t, n);
|
|
2715
2741
|
}, b = async (e) => {
|
|
2716
2742
|
if (!o.keepIsValid && !t.disabled && (m.isValid || h.isValid || e)) {
|
|
2717
2743
|
let e = ++_, i;
|
|
2718
|
-
t.resolver ? (i = Z((await
|
|
2744
|
+
t.resolver ? (i = Z((await O()).errors), e === _ && x()) : i = await ie({
|
|
2719
2745
|
fields: r,
|
|
2720
2746
|
onlyCheckValid: !0,
|
|
2721
|
-
eventType:
|
|
2747
|
+
eventType: ti.VALID
|
|
2722
2748
|
}), e === _ && i !== n.isValid && g.state.next({ isValid: i });
|
|
2723
2749
|
}
|
|
2724
2750
|
}, x = (e, r) => {
|
|
2725
2751
|
!t.disabled && (m.isValidating || m.validatingFields || h.isValidating || h.validatingFields) && ((e || Array.from(s.mount)).forEach((e) => {
|
|
2726
|
-
e && (r ?
|
|
2752
|
+
e && (r ? q(n.validatingFields, e, r) : $(n.validatingFields, e));
|
|
2727
2753
|
}), g.state.next({
|
|
2728
2754
|
validatingFields: n.validatingFields,
|
|
2729
2755
|
isValidating: !Z(n.validatingFields)
|
|
2730
2756
|
}));
|
|
2731
2757
|
}, S = () => {
|
|
2732
|
-
n.dirtyFields =
|
|
2758
|
+
n.dirtyFields = da(i, a, void 0, r);
|
|
2733
2759
|
}, C = (e, i = [], s, c, l = !0, u = !0) => {
|
|
2734
2760
|
if (c && s && !t.disabled) {
|
|
2735
2761
|
if (o.action = !0, !o.actionArrayLengths.has(e)) {
|
|
2736
|
-
let t =
|
|
2762
|
+
let t = W(r, e);
|
|
2737
2763
|
o.actionArrayLengths.set(e, Array.isArray(t) ? t.length : 0);
|
|
2738
2764
|
}
|
|
2739
|
-
if (u && Array.isArray(
|
|
2740
|
-
let t = s(
|
|
2741
|
-
l &&
|
|
2765
|
+
if (u && Array.isArray(W(r, e))) {
|
|
2766
|
+
let t = s(W(r, e), c.argA, c.argB);
|
|
2767
|
+
l && q(r, e, t);
|
|
2742
2768
|
}
|
|
2743
|
-
if (u && Array.isArray(
|
|
2744
|
-
let t =
|
|
2745
|
-
r && (i.root = r), l &&
|
|
2769
|
+
if (u && Array.isArray(W(n.errors, e))) {
|
|
2770
|
+
let t = W(n.errors, e), r = t.root, i = s(t, c.argA, c.argB) || t;
|
|
2771
|
+
r && (i.root = r), l && q(n.errors, e, i), Ca(n.errors, e);
|
|
2746
2772
|
}
|
|
2747
|
-
if ((m.touchedFields || h.touchedFields) && u && Array.isArray(
|
|
2748
|
-
let t = s(
|
|
2749
|
-
l &&
|
|
2773
|
+
if ((m.touchedFields || h.touchedFields) && u && Array.isArray(W(n.touchedFields, e))) {
|
|
2774
|
+
let t = s(W(n.touchedFields, e), c.argA, c.argB);
|
|
2775
|
+
l && q(n.touchedFields, e, t);
|
|
2750
2776
|
}
|
|
2751
2777
|
(m.dirtyFields || h.dirtyFields) && S(), g.state.next({
|
|
2752
2778
|
name: e,
|
|
2753
|
-
isDirty:
|
|
2779
|
+
isDirty: A(e, i),
|
|
2754
2780
|
dirtyFields: n.dirtyFields,
|
|
2755
2781
|
errors: n.errors,
|
|
2756
2782
|
isValid: n.isValid
|
|
2757
2783
|
});
|
|
2758
|
-
} else
|
|
2784
|
+
} else q(a, e, i);
|
|
2759
2785
|
}, w = (e, t) => {
|
|
2760
|
-
|
|
2786
|
+
q(n.errors, e, t), n.errors = { ...n.errors }, g.state.next({ errors: n.errors });
|
|
2761
2787
|
}, T = (e) => {
|
|
2762
2788
|
n.errors = e, g.state.next({
|
|
2763
2789
|
errors: n.errors,
|
|
2764
2790
|
isValid: !1
|
|
2765
2791
|
});
|
|
2766
2792
|
}, E = (e) => {
|
|
2767
|
-
let t =
|
|
2793
|
+
let t = ai(e) ? [e] : si(e), n = a, r = i;
|
|
2768
2794
|
for (let e = 0; e < t.length - 1; e++) {
|
|
2769
2795
|
let i = t[e];
|
|
2770
|
-
if (n =
|
|
2796
|
+
if (n = R(n) ? n : n[i], r = R(r) ? r : r[i], n === null && r !== null) return !0;
|
|
2771
2797
|
}
|
|
2772
2798
|
return !1;
|
|
2773
2799
|
}, ee = (e) => {
|
|
2774
2800
|
if (!o.actionArrayLengths.size) return !1;
|
|
2775
|
-
let t =
|
|
2801
|
+
let t = ai(e) ? [e] : si(e), n = a, r = "", i = -1, s = 0;
|
|
2776
2802
|
for (let e = 0; e < t.length; e++) {
|
|
2777
|
-
if (
|
|
2803
|
+
if (R(n)) return !1;
|
|
2778
2804
|
let a = t[e];
|
|
2779
2805
|
if (r = r ? `${r}.${a}` : a, Array.isArray(n) && +a >= n.length) return i === -1 ? !1 : e !== i || +a < s;
|
|
2780
2806
|
o.actionArrayLengths.has(r) && (i = e + 1, s = o.actionArrayLengths.get(r)), n = n[a];
|
|
2781
2807
|
}
|
|
2782
2808
|
return !1;
|
|
2783
|
-
},
|
|
2784
|
-
let d =
|
|
2809
|
+
}, te = (t, c, l, u) => {
|
|
2810
|
+
let d = W(r, t);
|
|
2785
2811
|
if (d) {
|
|
2786
2812
|
if (E(t) || ee(t)) return;
|
|
2787
|
-
let r = W(
|
|
2788
|
-
|
|
2813
|
+
let r = U(W(a, t)), f = W(a, t, U(l) ? W(i, t) : l);
|
|
2814
|
+
U(f) || u && u.defaultChecked || c ? q(a, t, c ? f : pa(d._f)) : ce(t, f), o.mount && !o.action && (b(), r && n.isDirty && (m.isDirty || h.isDirty) && (A() || (n.isDirty = !1, g.state.next({ ...n }))), e.shouldUnregister && r && !U(W(a, t)) && Si(t, s) && (o.watch = !0));
|
|
2789
2815
|
}
|
|
2790
|
-
},
|
|
2816
|
+
}, D = (e, o, s, c, l) => {
|
|
2791
2817
|
let u = !1, d = !1, f = { name: e };
|
|
2792
2818
|
if (!t.disabled || c === !0) {
|
|
2793
2819
|
if (!s || c) {
|
|
2794
|
-
let t =
|
|
2795
|
-
(m.isDirty || h.isDirty) && (d = n.isDirty, n.isDirty = f.isDirty = !t ||
|
|
2820
|
+
let t = J(W(i, e), o);
|
|
2821
|
+
(m.isDirty || h.isDirty) && (d = n.isDirty, n.isDirty = f.isDirty = !t || A(), u = d !== f.isDirty), d = !!W(n.dirtyFields, e), t === n.isDirty ? t ? $(n.dirtyFields, e) : q(n.dirtyFields, e, !0) : Ea(n.dirtyFields, da(i, a, void 0, r)), f.dirtyFields = n.dirtyFields, u ||= (m.dirtyFields || h.dirtyFields) && d !== !t;
|
|
2796
2822
|
}
|
|
2797
2823
|
if (s) {
|
|
2798
|
-
let t =
|
|
2799
|
-
t || (
|
|
2824
|
+
let t = W(n.touchedFields, e);
|
|
2825
|
+
t || (q(n.touchedFields, e, s), f.touchedFields = n.touchedFields, u ||= (m.touchedFields || h.touchedFields) && t !== s);
|
|
2800
2826
|
}
|
|
2801
2827
|
u && l && g.state.next(f);
|
|
2802
2828
|
}
|
|
2803
2829
|
return u ? f : {};
|
|
2804
|
-
},
|
|
2805
|
-
let o =
|
|
2806
|
-
if (t.delayError && i ? (c[e] = y(e, () => w(e, i)), c[e](t.delayError)) : (clearTimeout(l[e]), delete c[e], i ?
|
|
2830
|
+
}, ne = (e, r, i, a) => {
|
|
2831
|
+
let o = W(n.errors, e), s = (m.isValid || h.isValid) && G(r) && n.isValid !== r;
|
|
2832
|
+
if (t.delayError && i ? (c[e] = y(e, () => w(e, i)), c[e](t.delayError)) : (clearTimeout(l[e]), delete c[e], i ? q(n.errors, e, i) : $(n.errors, e), n.errors = { ...n.errors }), (i ? !J(o, i) : o) || !Z(a) || s) {
|
|
2807
2833
|
let t = {
|
|
2808
2834
|
...a,
|
|
2809
|
-
...s &&
|
|
2835
|
+
...s && G(r) ? { isValid: r } : {},
|
|
2810
2836
|
errors: n.errors,
|
|
2811
2837
|
name: e
|
|
2812
2838
|
};
|
|
@@ -2815,17 +2841,17 @@ function Ca(e = {}) {
|
|
|
2815
2841
|
...t
|
|
2816
2842
|
}, g.state.next(t);
|
|
2817
2843
|
}
|
|
2818
|
-
},
|
|
2819
|
-
let { errors: t } = await
|
|
2844
|
+
}, O = async (e) => (x(e, !0), await t.resolver(a, t.context, ma(e || s.mount, r, t.criteriaMode, t.shouldUseNativeValidation))), k = async (e) => {
|
|
2845
|
+
let { errors: t } = await O(e);
|
|
2820
2846
|
if (x(e), e) {
|
|
2821
2847
|
for (let r of e) {
|
|
2822
|
-
let e =
|
|
2823
|
-
e ? s.array.has(r) &&
|
|
2848
|
+
let e = W(t, r);
|
|
2849
|
+
e ? s.array.has(r) && z(e) && !Object.keys(e).some((e) => !Number.isNaN(Number(e))) ? wi(n.errors, { [r]: e }, r) : q(n.errors, r, e) : $(n.errors, r);
|
|
2824
2850
|
}
|
|
2825
2851
|
n.errors = { ...n.errors };
|
|
2826
2852
|
} else n.errors = t;
|
|
2827
2853
|
return t;
|
|
2828
|
-
},
|
|
2854
|
+
}, re = async ({ name: t, eventType: r }) => {
|
|
2829
2855
|
if (e.validate) {
|
|
2830
2856
|
let i = await e.validate({
|
|
2831
2857
|
formValues: a,
|
|
@@ -2833,25 +2859,25 @@ function Ca(e = {}) {
|
|
|
2833
2859
|
name: t,
|
|
2834
2860
|
eventType: r
|
|
2835
2861
|
});
|
|
2836
|
-
if (
|
|
2862
|
+
if (z(i)) for (let e in i) {
|
|
2837
2863
|
let t = i[e];
|
|
2838
|
-
t &&
|
|
2839
|
-
message:
|
|
2840
|
-
type: t.type ||
|
|
2864
|
+
t && ve(`${Ta}.${e}`, {
|
|
2865
|
+
message: Y(t.message) ? t.message : "",
|
|
2866
|
+
type: t.type || H.validate
|
|
2841
2867
|
});
|
|
2842
2868
|
}
|
|
2843
|
-
else
|
|
2869
|
+
else Y(i) || !i ? ve(Ta, {
|
|
2844
2870
|
message: i || "",
|
|
2845
|
-
type:
|
|
2846
|
-
}) :
|
|
2871
|
+
type: H.validate
|
|
2872
|
+
}) : _e(Ta);
|
|
2847
2873
|
return i;
|
|
2848
2874
|
}
|
|
2849
2875
|
return !0;
|
|
2850
|
-
},
|
|
2876
|
+
}, ie = async ({ fields: r, onlyCheckValid: i, name: o, eventType: c, context: l = {
|
|
2851
2877
|
valid: !0,
|
|
2852
2878
|
runRootValidation: !1
|
|
2853
2879
|
} }) => {
|
|
2854
|
-
if (e.validate && (l.runRootValidation = !0, !await
|
|
2880
|
+
if (e.validate && (l.runRootValidation = !0, !await re({
|
|
2855
2881
|
name: o,
|
|
2856
2882
|
eventType: c
|
|
2857
2883
|
}) && (l.valid = !1, i))) return l.valid;
|
|
@@ -2860,12 +2886,12 @@ function Ca(e = {}) {
|
|
|
2860
2886
|
if (u) {
|
|
2861
2887
|
let { _f: r, ...d } = u;
|
|
2862
2888
|
if (r) {
|
|
2863
|
-
let o = s.array.has(r.name), c = u._f &&
|
|
2889
|
+
let o = s.array.has(r.name), c = u._f && _a(u._f), d = m.validatingFields || m.isValidating || h.validatingFields || h.isValidating;
|
|
2864
2890
|
c && d && x([r.name], !0);
|
|
2865
|
-
let f = await
|
|
2866
|
-
if (c && d && x([r.name]), f[r.name] && (l.valid = !1, i) || (!i && (
|
|
2891
|
+
let f = await Ii(u, s.disabled, a, v, t.shouldUseNativeValidation && !i, o);
|
|
2892
|
+
if (c && d && x([r.name]), f[r.name] && (l.valid = !1, i) || (!i && (W(f, r.name) ? o ? wi(n.errors, f, r.name) : q(n.errors, r.name, f[r.name]) : $(n.errors, r.name)), e.shouldUseNativeValidation && f[r.name])) break;
|
|
2867
2893
|
}
|
|
2868
|
-
!Z(d) && await
|
|
2894
|
+
!Z(d) && await ie({
|
|
2869
2895
|
context: l,
|
|
2870
2896
|
onlyCheckValid: i,
|
|
2871
2897
|
fields: d,
|
|
@@ -2875,65 +2901,65 @@ function Ca(e = {}) {
|
|
|
2875
2901
|
}
|
|
2876
2902
|
}
|
|
2877
2903
|
return l.valid;
|
|
2878
|
-
},
|
|
2904
|
+
}, ae = () => {
|
|
2879
2905
|
for (let e of s.unMount) {
|
|
2880
|
-
let t =
|
|
2881
|
-
t && (t._f.refs ? t._f.refs.every((e) => !
|
|
2906
|
+
let t = W(r, e);
|
|
2907
|
+
t && (t._f.refs ? t._f.refs.every((e) => !na(e)) : !na(t._f.ref)) && Se(e);
|
|
2882
2908
|
}
|
|
2883
2909
|
s.unMount = /* @__PURE__ */ new Set();
|
|
2884
|
-
},
|
|
2885
|
-
let c =
|
|
2910
|
+
}, A = (e, t) => (e && t && q(a, e, t), !J(o.mount ? a : i, i)), oe = (e, t, n) => gi(e, s, { ...o.mount ? a : U(t) || Y(e) ? i : t }, n, t), se = (e) => Hi(W(o.mount ? a : i, e, t.shouldUnregister ? W(i, e, []) : [])), ce = (e, t, n = {}, i = !1, o = !1, s = !1) => {
|
|
2911
|
+
let c = W(r, e), l = t;
|
|
2886
2912
|
if (c) {
|
|
2887
2913
|
let n = c._f;
|
|
2888
|
-
n && (!n.disabled &&
|
|
2914
|
+
n && (!n.disabled && q(a, e, fa(t, n)), l = Ti(n.ref) && R(t) ? "" : t, ea(n.ref) ? [...n.ref.options].forEach((e) => e.selected = l.includes(e.value)) : n.refs ? Jr(n.ref) ? n.refs.forEach((e) => {
|
|
2889
2915
|
(!e.defaultChecked || !e.disabled) && (Array.isArray(l) ? e.checked = !!l.find((t) => t === e.value) : e.checked = l === e.value || !!l);
|
|
2890
|
-
}) : n.refs.forEach((e) => e.checked = e.value === l) :
|
|
2916
|
+
}) : n.refs.forEach((e) => e.checked = e.value === l) : Yr(n.ref) ? n.ref.value = "" : (n.ref.value = l, !n.ref.type && !o && !s && g.state.next({
|
|
2891
2917
|
name: e,
|
|
2892
|
-
values: i ? a :
|
|
2918
|
+
values: i ? a : B(a)
|
|
2893
2919
|
})));
|
|
2894
2920
|
}
|
|
2895
|
-
(n.shouldDirty || n.shouldTouch) &&
|
|
2896
|
-
},
|
|
2921
|
+
(n.shouldDirty || n.shouldTouch) && D(e, l, n.shouldTouch, n.shouldDirty, !o), n.shouldValidate && he(e, { delayError: n.delayError });
|
|
2922
|
+
}, le = (e, t, n, i = !1, o = !1, c = !1) => {
|
|
2897
2923
|
s.array.has(e) && g.array.next({
|
|
2898
2924
|
name: e,
|
|
2899
|
-
values: i ? a :
|
|
2925
|
+
values: i ? a : B(a)
|
|
2900
2926
|
});
|
|
2901
2927
|
for (let a in t) {
|
|
2902
2928
|
if (!t.hasOwnProperty(a)) return;
|
|
2903
|
-
let l = t[a], u = e + "." + a, d =
|
|
2904
|
-
(s.array.has(e) ||
|
|
2929
|
+
let l = t[a], u = e + "." + a, d = W(r, u);
|
|
2930
|
+
(s.array.has(e) || z(l) || d && !d._f) && !L(l) ? le(u, l, n, i, o, c) : ce(u, l, n, i, o, c);
|
|
2905
2931
|
}
|
|
2906
|
-
},
|
|
2907
|
-
let u =
|
|
2908
|
-
if (p ||
|
|
2932
|
+
}, ue = (e, t, i, c, l = !1) => {
|
|
2933
|
+
let u = W(r, e), d = s.array.has(e), f = c ? t : B(t), p = J(W(a, e), f);
|
|
2934
|
+
if (p || q(a, e, f), d) g.array.next({
|
|
2909
2935
|
name: e,
|
|
2910
|
-
values: c ? a :
|
|
2936
|
+
values: c ? a : B(a)
|
|
2911
2937
|
}), (m.isDirty || m.dirtyFields || h.isDirty || h.dirtyFields) && i.shouldDirty && (S(), l || g.state.next({
|
|
2912
2938
|
name: e,
|
|
2913
2939
|
dirtyFields: n.dirtyFields,
|
|
2914
|
-
isDirty:
|
|
2940
|
+
isDirty: A(e, f)
|
|
2915
2941
|
}));
|
|
2916
2942
|
else {
|
|
2917
2943
|
let t = Array.isArray(f) && !f.length || Z(f), n = !p && !l;
|
|
2918
|
-
!u || u._f ||
|
|
2944
|
+
!u || u._f || R(f) || t ? ce(e, f, i, c, l, n) : le(e, f, i, c, l, n);
|
|
2919
2945
|
}
|
|
2920
2946
|
if (!p && !l) {
|
|
2921
|
-
let t =
|
|
2947
|
+
let t = Si(e, s), r = c ? a : B(a);
|
|
2922
2948
|
g.state.next({
|
|
2923
2949
|
...t && n,
|
|
2924
2950
|
name: o.mount || t ? e : void 0,
|
|
2925
2951
|
values: r
|
|
2926
2952
|
});
|
|
2927
2953
|
}
|
|
2928
|
-
},
|
|
2929
|
-
let r =
|
|
2930
|
-
if (!
|
|
2954
|
+
}, de = (e, t, n = {}) => ue(e, t, n, !1), fe = (e, t = {}) => {
|
|
2955
|
+
let r = K(e) ? e(a) : e;
|
|
2956
|
+
if (!J(a, r)) {
|
|
2931
2957
|
a = {
|
|
2932
2958
|
...a,
|
|
2933
2959
|
...r
|
|
2934
2960
|
};
|
|
2935
|
-
let e =
|
|
2936
|
-
for (let n of s.mount) n in e &&
|
|
2961
|
+
let e = Xi(r);
|
|
2962
|
+
for (let n of s.mount) n in e && ue(n, e[n], t, !0, !0);
|
|
2937
2963
|
g.state.next({
|
|
2938
2964
|
...n,
|
|
2939
2965
|
name: void 0,
|
|
@@ -2941,85 +2967,85 @@ function Ca(e = {}) {
|
|
|
2941
2967
|
...u ? { values: a } : {}
|
|
2942
2968
|
}), t.shouldValidate && b();
|
|
2943
2969
|
}
|
|
2944
|
-
},
|
|
2970
|
+
}, pe = async (i) => {
|
|
2945
2971
|
o.mount = !0;
|
|
2946
|
-
let l = i.target, p = l.name, _ = !0, y =
|
|
2947
|
-
_ = Number.isNaN(e) ||
|
|
2972
|
+
let l = i.target, p = l.name, _ = !0, y = W(r, p), S = (e) => {
|
|
2973
|
+
_ = Number.isNaN(e) || L(e) && isNaN(e.getTime()) || J(e, W(a, p, e));
|
|
2948
2974
|
};
|
|
2949
2975
|
if (y) {
|
|
2950
|
-
let o, C, w = l.type ?
|
|
2951
|
-
if (
|
|
2976
|
+
let o, C, w = l.type ? pa(y._f) : Zr(i), T = i.type === ti.BLUR || i.type === ti.FOCUS_OUT, E = !va(y._f) && !e.validate && !t.resolver && !W(n.errors, p) && !y._f.deps, ee = E || Sa(T, W(n.touchedFields, p), n.isSubmitted, f, d), te = Si(p, s, T);
|
|
2977
|
+
if (q(a, p, w), T) {
|
|
2952
2978
|
if (!l || !l.readOnly) {
|
|
2953
2979
|
y._f.onBlur && y._f.onBlur(i);
|
|
2954
2980
|
let e = c[p];
|
|
2955
2981
|
e && e(0);
|
|
2956
2982
|
}
|
|
2957
2983
|
} else y._f.onChange && y._f.onChange(i);
|
|
2958
|
-
let
|
|
2984
|
+
let k = D(p, w, T), ae = !Z(k) || te;
|
|
2959
2985
|
if (!T && g.state.next({
|
|
2960
2986
|
name: p,
|
|
2961
2987
|
type: i.type,
|
|
2962
|
-
...u ? { values:
|
|
2963
|
-
}), ee) return (!E || !n.isValid) && (m.isValid || h.isValid) && (t.mode === "onBlur" ? T && b() : T || b()),
|
|
2988
|
+
...u ? { values: B(a) } : {}
|
|
2989
|
+
}), ee) return (!E || !n.isValid) && (m.isValid || h.isValid) && (t.mode === "onBlur" ? T && b() : T || b()), ae && g.state.next({
|
|
2964
2990
|
name: p,
|
|
2965
|
-
...
|
|
2991
|
+
...te ? {} : k
|
|
2966
2992
|
});
|
|
2967
|
-
if (!t.resolver && e.validate && await
|
|
2993
|
+
if (!t.resolver && e.validate && await re({
|
|
2968
2994
|
name: p,
|
|
2969
2995
|
eventType: i.type
|
|
2970
|
-
}), !T &&
|
|
2971
|
-
let { errors: e } = await
|
|
2996
|
+
}), !T && te && g.state.next({ ...n }), t.resolver) {
|
|
2997
|
+
let { errors: e } = await O([p]);
|
|
2972
2998
|
if (x([p]), S(w), !_) {
|
|
2973
|
-
!Z(
|
|
2999
|
+
!Z(k) && g.state.next(k);
|
|
2974
3000
|
return;
|
|
2975
3001
|
}
|
|
2976
|
-
let t =
|
|
3002
|
+
let t = ya(n.errors, r, p), i = ya(e, r, t.name || p);
|
|
2977
3003
|
o = i.error, p = i.name, C = Z(e);
|
|
2978
|
-
} else x([p], !0), o = (await
|
|
3004
|
+
} else x([p], !0), o = (await Ii(y, s.disabled, a, v, t.shouldUseNativeValidation))[p], x([p]), S(w), _ && (o ? C = !1 : (m.isValid || h.isValid) && (C = await ie({
|
|
2979
3005
|
fields: r,
|
|
2980
3006
|
onlyCheckValid: !0,
|
|
2981
3007
|
name: p,
|
|
2982
3008
|
eventType: i.type
|
|
2983
3009
|
})));
|
|
2984
|
-
_ && (y._f.deps && (!Array.isArray(y._f.deps) || y._f.deps.length > 0) &&
|
|
3010
|
+
_ && (y._f.deps && (!Array.isArray(y._f.deps) || y._f.deps.length > 0) && he(y._f.deps), ne(p, C, o, k));
|
|
2985
3011
|
}
|
|
2986
|
-
},
|
|
2987
|
-
if (
|
|
2988
|
-
},
|
|
3012
|
+
}, me = (e, t) => {
|
|
3013
|
+
if (W(n.errors, t) && e.focus) return e.focus(), 1;
|
|
3014
|
+
}, he = async (e, i = {}) => {
|
|
2989
3015
|
let a, o, u = Q(e);
|
|
2990
3016
|
if (t.resolver) {
|
|
2991
|
-
let t = await
|
|
2992
|
-
a = Z(t), o = e ? !u.some((e) =>
|
|
3017
|
+
let t = await k(U(e) ? e : u);
|
|
3018
|
+
a = Z(t), o = e ? !u.some((e) => W(t, e)) : a;
|
|
2993
3019
|
} else e ? (o = (await Promise.all(u.map(async (e) => {
|
|
2994
|
-
let t =
|
|
2995
|
-
return await
|
|
3020
|
+
let t = W(r, e);
|
|
3021
|
+
return await ie({
|
|
2996
3022
|
fields: t && t._f ? { [e]: t } : t,
|
|
2997
|
-
eventType:
|
|
3023
|
+
eventType: ti.TRIGGER
|
|
2998
3024
|
});
|
|
2999
|
-
}))).every(Boolean), !(!o && !n.isValid) && b()) : o = a = await
|
|
3025
|
+
}))).every(Boolean), !(!o && !n.isValid) && b()) : o = a = await ie({
|
|
3000
3026
|
fields: r,
|
|
3001
3027
|
name: e,
|
|
3002
|
-
eventType:
|
|
3028
|
+
eventType: ti.TRIGGER
|
|
3003
3029
|
});
|
|
3004
|
-
if (i.delayError && t.delayError &&
|
|
3005
|
-
let r =
|
|
3030
|
+
if (i.delayError && t.delayError && Y(e)) {
|
|
3031
|
+
let r = W(n.errors, e);
|
|
3006
3032
|
r ? ($(n.errors, e), c[e] = y(e, () => w(e, r)), c[e](t.delayError)) : (clearTimeout(l[e]), delete c[e]);
|
|
3007
3033
|
}
|
|
3008
3034
|
return g.state.next({
|
|
3009
|
-
...!
|
|
3035
|
+
...!Y(e) || (m.isValid || h.isValid) && a !== n.isValid ? {} : { name: e },
|
|
3010
3036
|
...t.resolver || !e ? { isValid: a } : {},
|
|
3011
3037
|
errors: n.errors
|
|
3012
|
-
}), i.shouldFocus && !o &&
|
|
3013
|
-
},
|
|
3038
|
+
}), i.shouldFocus && !o && Ci(r, me, e ? u : s.mount), o;
|
|
3039
|
+
}, j = (e, t) => {
|
|
3014
3040
|
let r = { ...o.mount ? a : i };
|
|
3015
|
-
return t && (r =
|
|
3016
|
-
},
|
|
3017
|
-
invalid: !!
|
|
3018
|
-
isDirty: !!
|
|
3019
|
-
error:
|
|
3020
|
-
isValidating: !!
|
|
3021
|
-
isTouched: !!
|
|
3022
|
-
}),
|
|
3041
|
+
return t && (r = $i(t.dirtyFields ? n.dirtyFields : n.touchedFields, r)), U(e) ? r : Y(e) ? W(r, e) : e.map((e) => W(r, e));
|
|
3042
|
+
}, ge = (e, t) => ({
|
|
3043
|
+
invalid: !!W((t || n).errors, e),
|
|
3044
|
+
isDirty: !!W((t || n).dirtyFields, e),
|
|
3045
|
+
error: W((t || n).errors, e),
|
|
3046
|
+
isValidating: !!W(n.validatingFields, e),
|
|
3047
|
+
isTouched: !!W((t || n).touchedFields, e)
|
|
3048
|
+
}), _e = (e) => {
|
|
3023
3049
|
let t = e ? Q(e) : void 0;
|
|
3024
3050
|
t?.forEach((e) => $(n.errors, e)), t ? t.forEach((e) => {
|
|
3025
3051
|
g.state.next({
|
|
@@ -3027,9 +3053,9 @@ function Ca(e = {}) {
|
|
|
3027
3053
|
errors: n.errors
|
|
3028
3054
|
});
|
|
3029
3055
|
}) : (n.errors = {}, g.state.next({ errors: n.errors }));
|
|
3030
|
-
},
|
|
3031
|
-
let a = (
|
|
3032
|
-
|
|
3056
|
+
}, ve = (e, t, i) => {
|
|
3057
|
+
let a = (W(r, e, { _f: {} })._f || {}).ref, { ref: o, message: s, type: c, ...l } = W(n.errors, e) || {};
|
|
3058
|
+
q(n.errors, e, {
|
|
3033
3059
|
...l,
|
|
3034
3060
|
...t,
|
|
3035
3061
|
ref: a
|
|
@@ -3038,20 +3064,20 @@ function Ca(e = {}) {
|
|
|
3038
3064
|
errors: n.errors,
|
|
3039
3065
|
isValid: !1
|
|
3040
3066
|
}), i && i.shouldFocus && a && a.focus && a.focus();
|
|
3041
|
-
},
|
|
3042
|
-
if (
|
|
3067
|
+
}, ye = (e, t) => {
|
|
3068
|
+
if (K(e)) {
|
|
3043
3069
|
u++;
|
|
3044
|
-
let { unsubscribe: n } = g.state.subscribe({ next: (n) => "values" in n && e(n.values ||
|
|
3070
|
+
let { unsubscribe: n } = g.state.subscribe({ next: (n) => "values" in n && e(n.values || oe(void 0, t), n) }), r = !1;
|
|
3045
3071
|
return { unsubscribe: () => {
|
|
3046
3072
|
r || (r = !0, u--, n());
|
|
3047
3073
|
} };
|
|
3048
3074
|
}
|
|
3049
|
-
return
|
|
3050
|
-
},
|
|
3075
|
+
return oe(e, t, !0);
|
|
3076
|
+
}, be = (e) => {
|
|
3051
3077
|
let t = !!e.formState?.values;
|
|
3052
3078
|
t && u++;
|
|
3053
3079
|
let { unsubscribe: r } = g.state.subscribe({ next: (t) => {
|
|
3054
|
-
if (
|
|
3080
|
+
if (xa(e.name, t.name, e.exact) && ba(t, e.formState || m, je, e.reRenderRoot)) {
|
|
3055
3081
|
let r = { ...a };
|
|
3056
3082
|
e.callback({
|
|
3057
3083
|
values: r,
|
|
@@ -3066,29 +3092,29 @@ function Ca(e = {}) {
|
|
|
3066
3092
|
return () => {
|
|
3067
3093
|
o || (o = !0, u--, r());
|
|
3068
3094
|
};
|
|
3069
|
-
},
|
|
3095
|
+
}, xe = (e) => (o.mount = !0, h = {
|
|
3070
3096
|
...h,
|
|
3071
3097
|
...e.formState
|
|
3072
|
-
},
|
|
3098
|
+
}, be({
|
|
3073
3099
|
...e,
|
|
3074
3100
|
formState: {
|
|
3075
3101
|
...p,
|
|
3076
3102
|
...e.formState
|
|
3077
3103
|
}
|
|
3078
|
-
})),
|
|
3104
|
+
})), Se = (e, o = {}) => {
|
|
3079
3105
|
for (let c of e ? Q(e) : s.mount) s.mount.delete(c), s.array.delete(c), o.keepValue || ($(r, c), $(a, c)), !o.keepError && $(n.errors, c), !o.keepDirty && $(n.dirtyFields, c), !o.keepTouched && $(n.touchedFields, c), !o.keepIsValidating && $(n.validatingFields, c), !t.shouldUnregister && !o.keepDefaultValue && $(i, c);
|
|
3080
|
-
g.state.next({ values:
|
|
3106
|
+
g.state.next({ values: B(a) }), g.state.next({
|
|
3081
3107
|
...n,
|
|
3082
|
-
...o.keepDirty ? { isDirty:
|
|
3108
|
+
...o.keepDirty ? { isDirty: A() } : {}
|
|
3083
3109
|
}), !o.keepIsValid && b();
|
|
3084
|
-
},
|
|
3085
|
-
if (
|
|
3110
|
+
}, Ce = ({ disabled: e, name: t }) => {
|
|
3111
|
+
if (G(e) && o.mount || e || s.disabled.has(t)) {
|
|
3086
3112
|
let n = s.disabled.has(t) !== !!e;
|
|
3087
3113
|
e ? s.disabled.add(t) : s.disabled.delete(t), n && o.mount && !o.action && b();
|
|
3088
3114
|
}
|
|
3089
|
-
},
|
|
3090
|
-
let a =
|
|
3091
|
-
return
|
|
3115
|
+
}, we = (e, n = {}) => {
|
|
3116
|
+
let a = W(r, e), c = G(n.disabled) || G(t.disabled), l = !s.registerName.has(e) && a && a._f && !a._f.mount;
|
|
3117
|
+
return q(r, e, {
|
|
3092
3118
|
...a || {},
|
|
3093
3119
|
_f: {
|
|
3094
3120
|
...a && a._f ? a._f : { ref: { name: e } },
|
|
@@ -3096,66 +3122,66 @@ function Ca(e = {}) {
|
|
|
3096
3122
|
mount: !0,
|
|
3097
3123
|
...n
|
|
3098
3124
|
}
|
|
3099
|
-
}), s.mount.add(e), a && !l ?
|
|
3100
|
-
disabled:
|
|
3125
|
+
}), s.mount.add(e), a && !l ? Ce({
|
|
3126
|
+
disabled: G(n.disabled) ? n.disabled : t.disabled,
|
|
3101
3127
|
name: e
|
|
3102
|
-
}) :
|
|
3128
|
+
}) : te(e, !0, n.value), {
|
|
3103
3129
|
...c ? { disabled: n.disabled || t.disabled } : {},
|
|
3104
3130
|
...t.progressive ? {
|
|
3105
3131
|
required: !!n.required,
|
|
3106
|
-
min:
|
|
3107
|
-
max:
|
|
3108
|
-
minLength:
|
|
3109
|
-
maxLength:
|
|
3110
|
-
pattern:
|
|
3132
|
+
min: ha(n.min),
|
|
3133
|
+
max: ha(n.max),
|
|
3134
|
+
minLength: ha(n.minLength),
|
|
3135
|
+
maxLength: ha(n.maxLength),
|
|
3136
|
+
pattern: ha(n.pattern)
|
|
3111
3137
|
} : {},
|
|
3112
3138
|
name: e,
|
|
3113
|
-
onChange:
|
|
3114
|
-
onBlur:
|
|
3139
|
+
onChange: pe,
|
|
3140
|
+
onBlur: pe,
|
|
3115
3141
|
ref: (c) => {
|
|
3116
3142
|
if (c) {
|
|
3117
|
-
s.registerName.add(e),
|
|
3118
|
-
let t =
|
|
3143
|
+
s.registerName.add(e), we(e, n), s.registerName.delete(e), a = W(r, e);
|
|
3144
|
+
let t = U(c.value) && c.querySelectorAll && c.querySelectorAll("input,select,textarea")[0] || c, o = ta(t), l = a._f.refs || [];
|
|
3119
3145
|
if (o ? l.find((e) => e === t) : t === a._f.ref) return;
|
|
3120
3146
|
let u = { ...a._f };
|
|
3121
3147
|
o ? (u.refs = [
|
|
3122
|
-
...l.filter(
|
|
3148
|
+
...l.filter(na),
|
|
3123
3149
|
t,
|
|
3124
|
-
...Array.isArray(
|
|
3150
|
+
...Array.isArray(W(i, e)) ? [{}] : []
|
|
3125
3151
|
], u.ref = {
|
|
3126
3152
|
type: t.type,
|
|
3127
3153
|
name: e
|
|
3128
|
-
}) : (u.ref = t, delete u.refs),
|
|
3129
|
-
} else a =
|
|
3154
|
+
}) : (u.ref = t, delete u.refs), q(r, e, { _f: u }), te(e, !1, void 0, t);
|
|
3155
|
+
} else a = W(r, e, {}), a._f && (a._f.mount = !1), (t.shouldUnregister || n.shouldUnregister) && !(Qr(s.array, e) && o.action) && s.unMount.add(e);
|
|
3130
3156
|
}
|
|
3131
3157
|
};
|
|
3132
|
-
},
|
|
3133
|
-
|
|
3134
|
-
let i =
|
|
3158
|
+
}, Te = () => t.shouldFocusError && !t.shouldUseNativeValidation && Ci(r, me, s.mount), M = (e) => {
|
|
3159
|
+
G(e) && (g.state.next({ disabled: e }), Ci(r, (t, n) => {
|
|
3160
|
+
let i = W(r, n);
|
|
3135
3161
|
i && (t.disabled = i._f.disabled || e, Array.isArray(i._f.refs) && i._f.refs.forEach((t) => {
|
|
3136
3162
|
t.disabled = i._f.disabled || e;
|
|
3137
3163
|
}));
|
|
3138
3164
|
}, 0, !1));
|
|
3139
|
-
},
|
|
3165
|
+
}, Ee = (e, i) => async (o) => {
|
|
3140
3166
|
let c, l;
|
|
3141
3167
|
o && (o.preventDefault && o.preventDefault(), o.persist && o.persist());
|
|
3142
|
-
let u =
|
|
3168
|
+
let u = B(a);
|
|
3143
3169
|
if (g.state.next({ isSubmitting: !0 }), t.resolver) {
|
|
3144
|
-
let { errors: e, values: t } = await
|
|
3145
|
-
x(), n.errors = e, u =
|
|
3146
|
-
} else await
|
|
3170
|
+
let { errors: e, values: t } = await O();
|
|
3171
|
+
x(), n.errors = e, u = B(t);
|
|
3172
|
+
} else await ie({
|
|
3147
3173
|
fields: r,
|
|
3148
|
-
eventType:
|
|
3174
|
+
eventType: ti.SUBMIT
|
|
3149
3175
|
});
|
|
3150
3176
|
if (s.disabled.size) for (let e of s.disabled) $(u, e);
|
|
3151
|
-
if ($(n.errors,
|
|
3177
|
+
if ($(n.errors, ni), Z(n.errors)) {
|
|
3152
3178
|
g.state.next({ errors: {} });
|
|
3153
3179
|
try {
|
|
3154
3180
|
c = await e(u, o);
|
|
3155
3181
|
} catch (e) {
|
|
3156
3182
|
l = e;
|
|
3157
3183
|
}
|
|
3158
|
-
} else i && await i({ ...n.errors }, o),
|
|
3184
|
+
} else i && await i({ ...n.errors }, o), Te(), setTimeout(Te);
|
|
3159
3185
|
if (g.state.next({
|
|
3160
3186
|
isSubmitted: !0,
|
|
3161
3187
|
isSubmitting: !1,
|
|
@@ -3164,23 +3190,23 @@ function Ca(e = {}) {
|
|
|
3164
3190
|
errors: n.errors
|
|
3165
3191
|
}), l) throw l;
|
|
3166
3192
|
return c;
|
|
3167
|
-
},
|
|
3168
|
-
|
|
3169
|
-
},
|
|
3170
|
-
let l = e ?
|
|
3193
|
+
}, De = (e, t = {}) => {
|
|
3194
|
+
W(r, e) && (U(t.defaultValue) ? de(e, B(W(i, e))) : (de(e, t.defaultValue), q(i, e, B(t.defaultValue))), t.keepTouched || $(n.touchedFields, e), t.keepDirty || ($(n.dirtyFields, e), n.isDirty = t.defaultValue ? A(e, B(W(i, e))) : A()), t.keepError || ($(n.errors, e), m.isValid && b()), g.state.next({ ...n }));
|
|
3195
|
+
}, Oe = (e, c = {}) => {
|
|
3196
|
+
let l = e ? B(e) : i, u = B(l), d = Z(e), f = u, p = r;
|
|
3171
3197
|
if (c.keepDefaultValues || (i = l), !c.keepValues) {
|
|
3172
3198
|
if (c.keepDirtyValues) {
|
|
3173
|
-
let e = /* @__PURE__ */ new Set([...s.mount,
|
|
3199
|
+
let e = /* @__PURE__ */ new Set([...s.mount, ...ia(da(i, a, void 0, p), n.dirtyFields)]);
|
|
3174
3200
|
for (let t of Array.from(e)) {
|
|
3175
|
-
let e =
|
|
3176
|
-
e && !
|
|
3201
|
+
let e = W(n.dirtyFields, t), r = W(a, t), i = W(f, t);
|
|
3202
|
+
e && !U(r) ? q(f, t, r) : !e && !U(i) && de(t, i);
|
|
3177
3203
|
}
|
|
3178
3204
|
} else {
|
|
3179
|
-
if (
|
|
3180
|
-
let t =
|
|
3205
|
+
if (ei && U(e)) for (let e of s.mount) {
|
|
3206
|
+
let t = W(r, e);
|
|
3181
3207
|
if (t && t._f) {
|
|
3182
3208
|
let e = Array.isArray(t._f.refs) ? t._f.refs[0] : t._f.ref;
|
|
3183
|
-
if (
|
|
3209
|
+
if (Ti(e)) {
|
|
3184
3210
|
let t = e.closest("form");
|
|
3185
3211
|
if (t) {
|
|
3186
3212
|
t.reset();
|
|
@@ -3189,12 +3215,12 @@ function Ca(e = {}) {
|
|
|
3189
3215
|
}
|
|
3190
3216
|
}
|
|
3191
3217
|
}
|
|
3192
|
-
if (c.keepFieldsRef) for (let e of s.mount)
|
|
3218
|
+
if (c.keepFieldsRef) for (let e of s.mount) de(e, W(f, e));
|
|
3193
3219
|
else r = {};
|
|
3194
3220
|
}
|
|
3195
3221
|
if (t.shouldUnregister) {
|
|
3196
|
-
if (a = c.keepDefaultValues ?
|
|
3197
|
-
} else a =
|
|
3222
|
+
if (a = c.keepDefaultValues ? B(i) : {}, c.keepFieldsRef) for (let e of s.mount) q(a, e, W(f, e));
|
|
3223
|
+
} else a = B(f);
|
|
3198
3224
|
g.array.next({ values: { ...f } }), g.state.next({
|
|
3199
3225
|
name: void 0,
|
|
3200
3226
|
type: void 0,
|
|
@@ -3212,58 +3238,58 @@ function Ca(e = {}) {
|
|
|
3212
3238
|
focus: ""
|
|
3213
3239
|
}, o.mount = !m.isValid || !!c.keepIsValid || !!c.keepDirtyValues || !t.shouldUnregister && !Z(f), o.watch = !!t.shouldUnregister, o.keepIsValid = !!c.keepIsValid, o.action = !1, o.actionArrayLengths.clear(), c.keepErrors || (n.errors = {}), g.state.next({
|
|
3214
3240
|
submitCount: c.keepSubmitCount ? n.submitCount : 0,
|
|
3215
|
-
isDirty: d ? !1 : c.keepDirty ? n.isDirty : c.keepValues ?
|
|
3241
|
+
isDirty: d ? !1 : c.keepDirty ? n.isDirty : c.keepValues ? A() : !!(c.keepDefaultValues && !J(e, i)),
|
|
3216
3242
|
isSubmitted: c.keepIsSubmitted ? n.isSubmitted : !1,
|
|
3217
|
-
dirtyFields: d ? {} : c.keepDirtyValues ? c.keepDefaultValues && a ?
|
|
3243
|
+
dirtyFields: d ? {} : c.keepDirtyValues ? c.keepDefaultValues && a ? da(i, a, void 0, p) : n.dirtyFields : c.keepDefaultValues && e ? da(i, e, void 0, p) : c.keepDirty ? n.dirtyFields : {},
|
|
3218
3244
|
touchedFields: c.keepTouched ? n.touchedFields : {},
|
|
3219
3245
|
errors: c.keepErrors ? n.errors : {},
|
|
3220
3246
|
isSubmitSuccessful: c.keepIsSubmitSuccessful ? n.isSubmitSuccessful : !1,
|
|
3221
3247
|
isSubmitting: !1,
|
|
3222
3248
|
defaultValues: i
|
|
3223
3249
|
});
|
|
3224
|
-
},
|
|
3250
|
+
}, ke = (e, n) => Oe(K(e) ? e(a) : e, {
|
|
3225
3251
|
...t.resetOptions,
|
|
3226
3252
|
...n
|
|
3227
|
-
}),
|
|
3228
|
-
let n =
|
|
3253
|
+
}), Ae = (e, t = {}) => {
|
|
3254
|
+
let n = W(r, e), i = n && n._f;
|
|
3229
3255
|
if (i) {
|
|
3230
3256
|
let e = i.refs ? i.refs[0] : i.ref;
|
|
3231
3257
|
e.focus && setTimeout(() => {
|
|
3232
|
-
e.focus(), t.shouldSelect &&
|
|
3258
|
+
e.focus(), t.shouldSelect && K(e.select) && e.select();
|
|
3233
3259
|
});
|
|
3234
3260
|
}
|
|
3235
|
-
},
|
|
3261
|
+
}, je = (e) => {
|
|
3236
3262
|
let { name: t, type: r, values: i, ...a } = e;
|
|
3237
3263
|
n = {
|
|
3238
3264
|
...n,
|
|
3239
3265
|
...a
|
|
3240
3266
|
};
|
|
3241
3267
|
};
|
|
3242
|
-
g.state.subscribe({ next:
|
|
3243
|
-
let
|
|
3268
|
+
g.state.subscribe({ next: je });
|
|
3269
|
+
let Me = {
|
|
3244
3270
|
control: {
|
|
3245
|
-
register:
|
|
3246
|
-
unregister:
|
|
3247
|
-
getFieldState:
|
|
3248
|
-
handleSubmit:
|
|
3249
|
-
setError:
|
|
3250
|
-
_subscribe:
|
|
3251
|
-
_runSchema:
|
|
3271
|
+
register: we,
|
|
3272
|
+
unregister: Se,
|
|
3273
|
+
getFieldState: ge,
|
|
3274
|
+
handleSubmit: Ee,
|
|
3275
|
+
setError: ve,
|
|
3276
|
+
_subscribe: be,
|
|
3277
|
+
_runSchema: O,
|
|
3252
3278
|
_updateIsValidating: x,
|
|
3253
|
-
_focusError:
|
|
3254
|
-
_getWatch:
|
|
3255
|
-
_getDirty:
|
|
3279
|
+
_focusError: Te,
|
|
3280
|
+
_getWatch: oe,
|
|
3281
|
+
_getDirty: A,
|
|
3256
3282
|
_setValid: b,
|
|
3257
3283
|
_setFieldArray: C,
|
|
3258
|
-
_setDisabledField:
|
|
3284
|
+
_setDisabledField: Ce,
|
|
3259
3285
|
_setErrors: T,
|
|
3260
|
-
_getFieldArray:
|
|
3261
|
-
_reset:
|
|
3262
|
-
_resetDefaultValues: () =>
|
|
3263
|
-
|
|
3286
|
+
_getFieldArray: se,
|
|
3287
|
+
_reset: Oe,
|
|
3288
|
+
_resetDefaultValues: () => K(t.defaultValues) && t.defaultValues().then((e) => {
|
|
3289
|
+
ke(e, t.resetOptions), g.state.next({ isLoading: !1 });
|
|
3264
3290
|
}),
|
|
3265
|
-
_removeUnmounted:
|
|
3266
|
-
_disableForm:
|
|
3291
|
+
_removeUnmounted: ae,
|
|
3292
|
+
_disableForm: M,
|
|
3267
3293
|
_subjects: g,
|
|
3268
3294
|
_proxyFormState: m,
|
|
3269
3295
|
get _fields() {
|
|
@@ -3297,22 +3323,22 @@ function Ca(e = {}) {
|
|
|
3297
3323
|
t = {
|
|
3298
3324
|
...t,
|
|
3299
3325
|
...e
|
|
3300
|
-
}, d =
|
|
3326
|
+
}, d = X(t.mode), f = X(t.reValidateMode);
|
|
3301
3327
|
}
|
|
3302
3328
|
},
|
|
3303
|
-
subscribe:
|
|
3304
|
-
trigger:
|
|
3305
|
-
register:
|
|
3306
|
-
handleSubmit:
|
|
3307
|
-
watch:
|
|
3308
|
-
setValue:
|
|
3309
|
-
setValues:
|
|
3310
|
-
getValues:
|
|
3311
|
-
reset:
|
|
3312
|
-
resetField:
|
|
3329
|
+
subscribe: xe,
|
|
3330
|
+
trigger: he,
|
|
3331
|
+
register: we,
|
|
3332
|
+
handleSubmit: Ee,
|
|
3333
|
+
watch: ye,
|
|
3334
|
+
setValue: de,
|
|
3335
|
+
setValues: fe,
|
|
3336
|
+
getValues: j,
|
|
3337
|
+
reset: ke,
|
|
3338
|
+
resetField: De,
|
|
3313
3339
|
resetDefaultValues: (e, t = {}) => {
|
|
3314
|
-
if (i =
|
|
3315
|
-
let e =
|
|
3340
|
+
if (i = B(e), !t.keepDirty) {
|
|
3341
|
+
let e = da(i, a, void 0, r);
|
|
3316
3342
|
n.dirtyFields = e, n.isDirty = !Z(e);
|
|
3317
3343
|
}
|
|
3318
3344
|
t.keepIsValid || b(), g.state.next({
|
|
@@ -3320,31 +3346,31 @@ function Ca(e = {}) {
|
|
|
3320
3346
|
defaultValues: i
|
|
3321
3347
|
});
|
|
3322
3348
|
},
|
|
3323
|
-
clearErrors:
|
|
3324
|
-
unregister:
|
|
3325
|
-
setError:
|
|
3326
|
-
setFocus:
|
|
3327
|
-
getFieldState:
|
|
3349
|
+
clearErrors: _e,
|
|
3350
|
+
unregister: Se,
|
|
3351
|
+
setError: ve,
|
|
3352
|
+
setFocus: Ae,
|
|
3353
|
+
getFieldState: ge
|
|
3328
3354
|
};
|
|
3329
3355
|
return {
|
|
3330
|
-
...
|
|
3331
|
-
formControl:
|
|
3356
|
+
...Me,
|
|
3357
|
+
formControl: Me
|
|
3332
3358
|
};
|
|
3333
3359
|
}
|
|
3334
|
-
function
|
|
3335
|
-
let t =
|
|
3336
|
-
...
|
|
3337
|
-
isLoading:
|
|
3360
|
+
function ka(e = {}) {
|
|
3361
|
+
let t = k.useRef(void 0), n = k.useRef(void 0), r = k.useRef(e.formControl), [i, a] = k.useState(() => ({
|
|
3362
|
+
...B(Da),
|
|
3363
|
+
isLoading: K(e.defaultValues),
|
|
3338
3364
|
errors: e.errors || {},
|
|
3339
3365
|
disabled: e.disabled || !1,
|
|
3340
|
-
defaultValues:
|
|
3366
|
+
defaultValues: K(e.defaultValues) ? void 0 : e.defaultValues
|
|
3341
3367
|
}));
|
|
3342
3368
|
if (!t.current || e.formControl && r.current !== e.formControl) if (r.current = e.formControl, e.formControl) t.current = {
|
|
3343
3369
|
...e.formControl,
|
|
3344
3370
|
formState: i
|
|
3345
|
-
}, e.defaultValues && !
|
|
3371
|
+
}, e.defaultValues && !K(e.defaultValues) && e.formControl.reset(e.defaultValues, e.resetOptions);
|
|
3346
3372
|
else {
|
|
3347
|
-
let { formControl: n, ...r } =
|
|
3373
|
+
let { formControl: n, ...r } = Oa(e);
|
|
3348
3374
|
t.current = {
|
|
3349
3375
|
...r,
|
|
3350
3376
|
formState: i
|
|
@@ -3352,8 +3378,8 @@ function wa(e = {}) {
|
|
|
3352
3378
|
}
|
|
3353
3379
|
let o = t.current.control;
|
|
3354
3380
|
o._options = e;
|
|
3355
|
-
let { resyncIfNeeded: s, snapshot: c } =
|
|
3356
|
-
return
|
|
3381
|
+
let { resyncIfNeeded: s, snapshot: c } = mi();
|
|
3382
|
+
return di(() => {
|
|
3357
3383
|
let e = () => ({
|
|
3358
3384
|
...o._formState,
|
|
3359
3385
|
defaultValues: o._defaultValues
|
|
@@ -3377,81 +3403,81 @@ function wa(e = {}) {
|
|
|
3377
3403
|
o,
|
|
3378
3404
|
s,
|
|
3379
3405
|
c
|
|
3380
|
-
]),
|
|
3406
|
+
]), k.useEffect(() => o._disableForm(e.disabled), [o, e.disabled]), k.useEffect(() => {
|
|
3381
3407
|
e.mode && (o._options.mode = e.mode), e.reValidateMode && (o._options.reValidateMode = e.reValidateMode);
|
|
3382
3408
|
}, [
|
|
3383
3409
|
o,
|
|
3384
3410
|
e.mode,
|
|
3385
3411
|
e.reValidateMode
|
|
3386
|
-
]),
|
|
3412
|
+
]), k.useEffect(() => {
|
|
3387
3413
|
e.errors && (o._setErrors(e.errors), o._focusError());
|
|
3388
|
-
}, [o, e.errors]),
|
|
3414
|
+
}, [o, e.errors]), k.useEffect(() => {
|
|
3389
3415
|
e.shouldUnregister && o._subjects.state.next({ values: o._getWatch() });
|
|
3390
|
-
}, [o, e.shouldUnregister]),
|
|
3416
|
+
}, [o, e.shouldUnregister]), k.useEffect(() => {
|
|
3391
3417
|
if (o._proxyFormState.isDirty) {
|
|
3392
3418
|
let e = o._getDirty();
|
|
3393
3419
|
e !== i.isDirty && o._subjects.state.next({ isDirty: e });
|
|
3394
3420
|
}
|
|
3395
|
-
}, [o, i.isDirty]),
|
|
3396
|
-
e.values && !
|
|
3421
|
+
}, [o, i.isDirty]), k.useEffect(() => {
|
|
3422
|
+
e.values && !J(e.values, n.current) ? (o._reset(e.values, {
|
|
3397
3423
|
keepFieldsRef: !0,
|
|
3398
3424
|
...o._options.resetOptions
|
|
3399
3425
|
}), o._options.resetOptions?.keepIsValid || o._setValid(), n.current = e.values, a((e) => ({ ...e }))) : o._resetDefaultValues();
|
|
3400
|
-
}, [o, e.values]),
|
|
3426
|
+
}, [o, e.values]), k.useEffect(() => {
|
|
3401
3427
|
o._state.mount || (o._setValid(), o._state.mount = !0), o._state.watch && (o._state.watch = !1, o._subjects.state.next({ ...o._formState })), o._removeUnmounted();
|
|
3402
|
-
}), t.current.formState =
|
|
3428
|
+
}), t.current.formState = k.useMemo(() => ui(i, o), [o, i]), t.current;
|
|
3403
3429
|
}
|
|
3404
3430
|
//#endregion
|
|
3405
3431
|
//#region lib/components/ui/forms/use-field-blur.ts
|
|
3406
|
-
var
|
|
3432
|
+
var Aa = typeof document > "u" ? null : document, ja = {
|
|
3407
3433
|
capture: !0,
|
|
3408
3434
|
passive: !0
|
|
3409
3435
|
};
|
|
3410
|
-
function
|
|
3436
|
+
function Ma(e, t) {
|
|
3411
3437
|
for (let t of e.roots) t.isConnected || e.roots.delete(t);
|
|
3412
3438
|
let n = [...e.roots];
|
|
3413
3439
|
if (!n.length) return !1;
|
|
3414
|
-
if (n.some((e) => e.contains(t))) return e.inside || (e.before = new Set(t.ownerDocument?.body.childNodes ?? []), e.home = new Set(n.map(
|
|
3440
|
+
if (n.some((e) => e.contains(t))) return e.inside || (e.before = new Set(t.ownerDocument?.body.childNodes ?? []), e.home = new Set(n.map(pe)), e.opened = /* @__PURE__ */ new Set()), e.inside = !0, !1;
|
|
3415
3441
|
if (!e.inside) return !1;
|
|
3416
|
-
let r =
|
|
3442
|
+
let r = pe(t);
|
|
3417
3443
|
if (e.home.has(r)) return !0;
|
|
3418
3444
|
if (!r || e.opened.has(r)) return !1;
|
|
3419
|
-
let i =
|
|
3445
|
+
let i = me(n, e, r);
|
|
3420
3446
|
return i === "theirs" || !i && e.before.has(r) ? !0 : (e.opened.add(r), !1);
|
|
3421
3447
|
}
|
|
3422
|
-
function
|
|
3423
|
-
let t =
|
|
3448
|
+
function Na(e) {
|
|
3449
|
+
let t = _r(e), n = de({
|
|
3424
3450
|
roots: /* @__PURE__ */ new Set(),
|
|
3425
3451
|
inside: !1,
|
|
3426
3452
|
before: /* @__PURE__ */ new Set(),
|
|
3427
3453
|
home: /* @__PURE__ */ new Set(),
|
|
3428
3454
|
opened: /* @__PURE__ */ new Set()
|
|
3429
|
-
}).current, r =
|
|
3455
|
+
}).current, r = oe((e) => {
|
|
3430
3456
|
if (e) return n.roots.add(e), () => {
|
|
3431
3457
|
n.roots.delete(e);
|
|
3432
3458
|
};
|
|
3433
|
-
}, [n]), i =
|
|
3459
|
+
}, [n]), i = oe(() => {
|
|
3434
3460
|
n.inside = !1, t.current();
|
|
3435
|
-
}, [n, t]), a =
|
|
3461
|
+
}, [n, t]), a = oe((e) => {
|
|
3436
3462
|
let t = e.target;
|
|
3437
|
-
t instanceof Node && (clearTimeout(n.settle),
|
|
3438
|
-
}, [n, i]), o =
|
|
3463
|
+
t instanceof Node && (clearTimeout(n.settle), Ma(n, t) && i());
|
|
3464
|
+
}, [n, i]), o = oe((e) => {
|
|
3439
3465
|
!n.inside || e.relatedTarget || (clearTimeout(n.settle), n.settle = setTimeout(() => {
|
|
3440
3466
|
n.settle = setTimeout(() => {
|
|
3441
|
-
let e =
|
|
3442
|
-
n.inside && (!e || e ===
|
|
3467
|
+
let e = Aa?.activeElement;
|
|
3468
|
+
n.inside && (!e || e === Aa?.body) && i();
|
|
3443
3469
|
});
|
|
3444
3470
|
}));
|
|
3445
3471
|
}, [n, i]);
|
|
3446
|
-
return
|
|
3472
|
+
return gr("focusin", a, Aa, ja), gr("focusout", o, Aa, ja), ce(() => () => clearTimeout(n.settle), [n]), r;
|
|
3447
3473
|
}
|
|
3448
3474
|
//#endregion
|
|
3449
3475
|
//#region lib/components/ui/forms/field-blur.tsx
|
|
3450
|
-
function
|
|
3451
|
-
return /* @__PURE__ */ D(
|
|
3452
|
-
value:
|
|
3476
|
+
function Pa({ onBlur: e, children: t }) {
|
|
3477
|
+
return /* @__PURE__ */ D(br, {
|
|
3478
|
+
value: Na(e),
|
|
3453
3479
|
children: t
|
|
3454
3480
|
});
|
|
3455
3481
|
}
|
|
3456
3482
|
//#endregion
|
|
3457
|
-
export {
|
|
3483
|
+
export { ln as $, Or as A, lr as B, Fr as C, jr as D, Mr as E, xr as F, rr as G, ur as H, yr as I, yn as J, sn as K, vr as L, wr as M, Cr as N, Ar as O, Sr as P, wn as Q, gr as R, Lr as S, Pr as T, cr as U, dr as V, ir as W, hn as X, En as Y, pn as Z, Ir as _, q as a, Br as b, ka as c, Gr as d, an as et, qr as f, Nr as g, Ur as h, W as i, ye as it, Dr as j, kr as k, hi as l, Wr as m, Na as n, Gt as nt, vi as o, Kr as p, On as q, yi as r, Fe as rt, Yi as s, Pa as t, en as tt, _i as u, Rr as v, Vr as w, zr as x, Hr as y, fr as z };
|