@copilotkit/react-textarea 1.51.4-next.7 → 1.51.4
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/CHANGELOG.md +22 -0
- package/README.md +18 -12
- package/dist/{chunk-D47EKHIF.mjs → chunk-2X3CZVEP.mjs} +9 -3
- package/dist/chunk-2X3CZVEP.mjs.map +1 -0
- package/dist/{chunk-GU5LTWGL.mjs → chunk-3WLGLZTY.mjs} +19 -13
- package/dist/chunk-3WLGLZTY.mjs.map +1 -0
- package/dist/{chunk-DRV2FOHZ.mjs → chunk-7GZWOXE4.mjs} +2 -2
- package/dist/chunk-7GZWOXE4.mjs.map +1 -0
- package/dist/{chunk-NAFNY4FL.mjs → chunk-7V4ORVQX.mjs} +1 -1
- package/dist/chunk-7V4ORVQX.mjs.map +1 -0
- package/dist/{chunk-ECR45NSD.mjs → chunk-A6YGJFQI.mjs} +9 -2
- package/dist/chunk-A6YGJFQI.mjs.map +1 -0
- package/dist/{chunk-WGWQRALG.mjs → chunk-AHNPJMBR.mjs} +10 -3
- package/dist/chunk-AHNPJMBR.mjs.map +1 -0
- package/dist/{chunk-VSVQZUPW.mjs → chunk-ARLBRSB7.mjs} +23 -7
- package/dist/chunk-ARLBRSB7.mjs.map +1 -0
- package/dist/{chunk-72GJNLCO.mjs → chunk-AZ7RF6ED.mjs} +5 -5
- package/dist/chunk-AZ7RF6ED.mjs.map +1 -0
- package/dist/{chunk-I72DKFHD.mjs → chunk-CFCMZVQ2.mjs} +29 -7
- package/dist/chunk-CFCMZVQ2.mjs.map +1 -0
- package/dist/{chunk-T6MTDQZ7.mjs → chunk-CMKGYQFX.mjs} +1 -1
- package/dist/chunk-CMKGYQFX.mjs.map +1 -0
- package/dist/{chunk-DFTV4TST.mjs → chunk-DZMQBOPG.mjs} +1 -1
- package/dist/chunk-DZMQBOPG.mjs.map +1 -0
- package/dist/{chunk-CLGAJCZ5.mjs → chunk-E7C63KQP.mjs} +10 -6
- package/dist/chunk-E7C63KQP.mjs.map +1 -0
- package/dist/{chunk-GQN2HYFJ.mjs → chunk-EGBZSVLK.mjs} +5 -2
- package/dist/{chunk-GQN2HYFJ.mjs.map → chunk-EGBZSVLK.mjs.map} +1 -1
- package/dist/{chunk-3QJOFG3V.mjs → chunk-FTG7P3NP.mjs} +1 -1
- package/dist/chunk-FTG7P3NP.mjs.map +1 -0
- package/dist/{chunk-KMVGEY7Q.mjs → chunk-IBZTDP72.mjs} +9 -4
- package/dist/chunk-IBZTDP72.mjs.map +1 -0
- package/dist/{chunk-4PDYALMP.mjs → chunk-LYNGBKJR.mjs} +9 -3
- package/dist/chunk-LYNGBKJR.mjs.map +1 -0
- package/dist/{chunk-DL3JWL2E.mjs → chunk-M7GTVHFB.mjs} +26 -8
- package/dist/chunk-M7GTVHFB.mjs.map +1 -0
- package/dist/chunk-MQBPYOOZ.mjs +97 -0
- package/dist/chunk-MQBPYOOZ.mjs.map +1 -0
- package/dist/{chunk-6SGWO63I.mjs → chunk-MQXYWOE2.mjs} +3 -3
- package/dist/chunk-MQXYWOE2.mjs.map +1 -0
- package/dist/{chunk-F2ULK22F.mjs → chunk-NFMCLTJU.mjs} +1 -1
- package/dist/chunk-NFMCLTJU.mjs.map +1 -0
- package/dist/{chunk-F6RLSVG3.mjs → chunk-O4WCM57A.mjs} +1 -1
- package/dist/chunk-O4WCM57A.mjs.map +1 -0
- package/dist/{chunk-4NHVQZ67.mjs → chunk-PDFIUPCS.mjs} +1 -1
- package/dist/chunk-PDFIUPCS.mjs.map +1 -0
- package/dist/{chunk-7NOLZ5T3.mjs → chunk-SWX3MRZ4.mjs} +31 -22
- package/dist/chunk-SWX3MRZ4.mjs.map +1 -0
- package/dist/{chunk-QJNFNPWH.mjs → chunk-TGN3YVSO.mjs} +2 -2
- package/dist/chunk-TGN3YVSO.mjs.map +1 -0
- package/dist/{chunk-LYB4B6MK.mjs → chunk-UB4Y22EF.mjs} +4 -2
- package/dist/chunk-UB4Y22EF.mjs.map +1 -0
- package/dist/{chunk-ZQSEYPNN.mjs → chunk-UIBUYQPG.mjs} +7 -2
- package/dist/chunk-UIBUYQPG.mjs.map +1 -0
- package/dist/{chunk-AJ5OMEXM.mjs → chunk-VBPZTMXB.mjs} +2 -2
- package/dist/{chunk-EJGGLWWR.mjs → chunk-VH7INUR5.mjs} +1 -1
- package/dist/{chunk-EJGGLWWR.mjs.map → chunk-VH7INUR5.mjs.map} +1 -1
- package/dist/{chunk-7LSRNPNI.mjs → chunk-VVRGAA43.mjs} +1 -1
- package/dist/chunk-VVRGAA43.mjs.map +1 -0
- package/dist/{chunk-YLFAIYRY.mjs → chunk-VYLLLBUP.mjs} +1 -1
- package/dist/chunk-VYLLLBUP.mjs.map +1 -0
- package/dist/{chunk-2QDCE7PD.mjs → chunk-WXKPRNNO.mjs} +1 -1
- package/dist/chunk-WXKPRNNO.mjs.map +1 -0
- package/dist/{chunk-JLOABKLH.mjs → chunk-YINY56BI.mjs} +2 -2
- package/dist/{chunk-23Q6A46J.mjs → chunk-ZBP4SABT.mjs} +22 -8
- package/dist/chunk-ZBP4SABT.mjs.map +1 -0
- package/dist/{chunk-H5ZNEKUR.mjs → chunk-ZWI5KPQ5.mjs} +2 -2
- package/dist/components/base-copilot-textarea/base-copilot-textarea.js +154 -86
- package/dist/components/base-copilot-textarea/base-copilot-textarea.js.map +1 -1
- package/dist/components/base-copilot-textarea/base-copilot-textarea.mjs +29 -29
- package/dist/components/base-copilot-textarea/render-element.js.map +1 -1
- package/dist/components/base-copilot-textarea/render-element.mjs +1 -1
- package/dist/components/base-copilot-textarea/render-placeholder.js.map +1 -1
- package/dist/components/base-copilot-textarea/render-placeholder.mjs +1 -1
- package/dist/components/base-copilot-textarea/track-cursor-moved-since-last-text-change.js.map +1 -1
- package/dist/components/base-copilot-textarea/track-cursor-moved-since-last-text-change.mjs +2 -2
- package/dist/components/base-copilot-textarea/use-add-branding-css.js.map +1 -1
- package/dist/components/base-copilot-textarea/use-add-branding-css.mjs +1 -1
- package/dist/components/copilot-textarea/copilot-textarea.js +190 -95
- package/dist/components/copilot-textarea/copilot-textarea.js.map +1 -1
- package/dist/components/copilot-textarea/copilot-textarea.mjs +34 -34
- package/dist/components/hovering-toolbar/hovering-editor-provider.d.ts +1 -1
- package/dist/components/hovering-toolbar/hovering-editor-provider.js +3 -1
- package/dist/components/hovering-toolbar/hovering-editor-provider.js.map +1 -1
- package/dist/components/hovering-toolbar/hovering-editor-provider.mjs +1 -1
- package/dist/components/hovering-toolbar/hovering-toolbar-components.js +57 -63
- package/dist/components/hovering-toolbar/hovering-toolbar-components.js.map +1 -1
- package/dist/components/hovering-toolbar/hovering-toolbar-components.mjs +1 -1
- package/dist/components/hovering-toolbar/hovering-toolbar.js +117 -77
- package/dist/components/hovering-toolbar/hovering-toolbar.js.map +1 -1
- package/dist/components/hovering-toolbar/hovering-toolbar.mjs +15 -15
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.js +60 -14
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.js.map +1 -1
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.mjs +11 -11
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.js +60 -14
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.js.map +1 -1
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box.mjs +12 -12
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.d.ts +1 -1
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.js +14 -3
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.js.map +1 -1
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.mjs +3 -3
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.js +60 -14
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.js.map +1 -1
- package/dist/components/hovering-toolbar/text-insertion-prompt-box/index.mjs +12 -12
- package/dist/components/index.js +190 -95
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +34 -34
- package/dist/components/manual-ui/chip-with-icon.d.ts +1 -1
- package/dist/components/manual-ui/chip-with-icon.js +13 -2
- package/dist/components/manual-ui/chip-with-icon.js.map +1 -1
- package/dist/components/manual-ui/chip-with-icon.mjs +13 -2
- package/dist/components/manual-ui/chip-with-icon.mjs.map +1 -1
- package/dist/components/source-search-box/source-search-box.js +28 -5
- package/dist/components/source-search-box/source-search-box.js.map +1 -1
- package/dist/components/source-search-box/source-search-box.mjs +4 -4
- package/dist/components/ui/button.js +7 -1
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/button.mjs +2 -2
- package/dist/components/ui/command.js +47 -9
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/command.mjs +3 -3
- package/dist/components/ui/dialog.js +27 -5
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/dialog.mjs +2 -2
- package/dist/components/ui/label.js +7 -1
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/label.mjs +2 -2
- package/dist/hooks/base-copilot-textarea-implementation/use-autosuggestions.js +18 -4
- package/dist/hooks/base-copilot-textarea-implementation/use-autosuggestions.js.map +1 -1
- package/dist/hooks/base-copilot-textarea-implementation/use-autosuggestions.mjs +4 -4
- package/dist/hooks/base-copilot-textarea-implementation/use-copilot-textarea-editor.js.map +1 -1
- package/dist/hooks/base-copilot-textarea-implementation/use-copilot-textarea-editor.mjs +2 -2
- package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.js.map +1 -1
- package/dist/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.mjs +2 -2
- package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.js +6 -1
- package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.js.map +1 -1
- package/dist/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.mjs +1 -1
- package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.js +25 -7
- package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.js.map +1 -1
- package/dist/hooks/make-autosuggestions-function/use-make-standard-insertion-function.mjs +1 -1
- package/dist/hooks/misc/use-autosize-textarea.js.map +1 -1
- package/dist/hooks/misc/use-autosize-textarea.mjs +1 -1
- package/dist/index.js +190 -95
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +35 -35
- package/dist/index.umd.js +16 -16
- package/dist/index.umd.js.map +1 -1
- package/dist/lib/debouncer.js.map +1 -1
- package/dist/lib/debouncer.mjs +1 -1
- package/dist/lib/editor-to-text.js.map +1 -1
- package/dist/lib/editor-to-text.mjs +1 -1
- package/dist/lib/get-text-around-cursor.js.map +1 -1
- package/dist/lib/get-text-around-cursor.mjs +1 -1
- package/dist/lib/slatejs-edits/clear-autocompletions.js +4 -1
- package/dist/lib/slatejs-edits/clear-autocompletions.js.map +1 -1
- package/dist/lib/slatejs-edits/clear-autocompletions.mjs +1 -1
- package/dist/lib/slatejs-edits/with-partial-history.js.map +1 -1
- package/dist/lib/slatejs-edits/with-partial-history.mjs +1 -1
- package/dist/lib/stream-promise-flatten.js.map +1 -1
- package/dist/lib/stream-promise-flatten.mjs +1 -1
- package/dist/lib/utils.js.map +1 -1
- package/dist/lib/utils.mjs +1 -1
- package/dist/types/autosuggestions-config/autosuggestions-config-user-specified.js.map +1 -1
- package/dist/types/autosuggestions-config/autosuggestions-config.js.map +1 -1
- package/dist/types/autosuggestions-config/autosuggestions-config.mjs +3 -3
- package/dist/types/autosuggestions-config/editing-api-config.js.map +1 -1
- package/dist/types/autosuggestions-config/editing-api-config.mjs +1 -1
- package/dist/types/autosuggestions-config/index.js.map +1 -1
- package/dist/types/autosuggestions-config/index.mjs +3 -3
- package/dist/types/autosuggestions-config/subtypes/make-system-prompt.js.map +1 -1
- package/dist/types/base/base-autosuggestions-config.js.map +1 -1
- package/dist/types/base/base-autosuggestions-config.mjs +1 -1
- package/dist/types/base/base-copilot-textarea-props.js.map +1 -1
- package/dist/types/base/editor-autocomplete-state.js.map +1 -1
- package/dist/types/base/editor-autocomplete-state.mjs +2 -2
- package/dist/types/base/index.js.map +1 -1
- package/dist/types/base/index.mjs +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/index.mjs +3 -3
- package/package.json +8 -8
- package/src/components/base-copilot-textarea/base-copilot-textarea.tsx +30 -10
- package/src/components/base-copilot-textarea/render-element.tsx +6 -2
- package/src/components/base-copilot-textarea/render-placeholder.tsx +3 -1
- package/src/components/base-copilot-textarea/use-add-branding-css.tsx +3 -1
- package/src/components/copilot-textarea/copilot-textarea.tsx +15 -9
- package/src/components/hovering-toolbar/hovering-editor-provider.tsx +3 -1
- package/src/components/hovering-toolbar/hovering-toolbar-components.tsx +63 -52
- package/src/components/hovering-toolbar/hovering-toolbar.tsx +21 -5
- package/src/components/hovering-toolbar/text-insertion-prompt-box/hovering-insertion-prompt-box-core.tsx +13 -7
- package/src/components/hovering-toolbar/text-insertion-prompt-box/included-files-preview.tsx +7 -2
- package/src/components/manual-ui/chip-with-icon.tsx +12 -3
- package/src/components/source-search-box/source-search-box.tsx +12 -2
- package/src/components/ui/button.tsx +13 -5
- package/src/components/ui/command.tsx +17 -4
- package/src/components/ui/dialog.tsx +23 -5
- package/src/components/ui/label.tsx +7 -2
- package/src/hooks/base-copilot-textarea-implementation/use-autosuggestions.ts +35 -9
- package/src/hooks/base-copilot-textarea-implementation/use-copilot-textarea-editor.tsx +5 -1
- package/src/hooks/base-copilot-textarea-implementation/use-populate-copilot-textarea-ref.ts +5 -1
- package/src/hooks/make-autosuggestions-function/use-make-standard-autosuggestions-function.tsx +9 -2
- package/src/hooks/make-autosuggestions-function/use-make-standard-insertion-function.tsx +24 -6
- package/src/hooks/misc/use-autosize-textarea.tsx +4 -1
- package/src/lib/debouncer.ts +3 -1
- package/src/lib/editor-to-text.ts +5 -2
- package/src/lib/get-text-around-cursor.ts +14 -2
- package/src/lib/slatejs-edits/clear-autocompletions.ts +4 -1
- package/src/lib/slatejs-edits/with-partial-history.ts +10 -3
- package/src/lib/stream-promise-flatten.ts +3 -1
- package/src/lib/utils.ts +6 -2
- package/src/types/autosuggestions-config/autosuggestions-config-user-specified.tsx +3 -2
- package/src/types/autosuggestions-config/autosuggestions-config.tsx +20 -5
- package/src/types/autosuggestions-config/editing-api-config.tsx +2 -1
- package/src/types/autosuggestions-config/subtypes/make-system-prompt.ts +4 -1
- package/src/types/base/base-autosuggestions-config.tsx +10 -4
- package/src/types/base/base-copilot-textarea-props.tsx +4 -2
- package/tsconfig.json +1 -1
- package/tsup.config.ts +5 -1
- package/dist/chunk-23Q6A46J.mjs.map +0 -1
- package/dist/chunk-2IWVZ4PP.mjs +0 -103
- package/dist/chunk-2IWVZ4PP.mjs.map +0 -1
- package/dist/chunk-2QDCE7PD.mjs.map +0 -1
- package/dist/chunk-3QJOFG3V.mjs.map +0 -1
- package/dist/chunk-4NHVQZ67.mjs.map +0 -1
- package/dist/chunk-4PDYALMP.mjs.map +0 -1
- package/dist/chunk-6SGWO63I.mjs.map +0 -1
- package/dist/chunk-72GJNLCO.mjs.map +0 -1
- package/dist/chunk-7LSRNPNI.mjs.map +0 -1
- package/dist/chunk-7NOLZ5T3.mjs.map +0 -1
- package/dist/chunk-CLGAJCZ5.mjs.map +0 -1
- package/dist/chunk-D47EKHIF.mjs.map +0 -1
- package/dist/chunk-DFTV4TST.mjs.map +0 -1
- package/dist/chunk-DL3JWL2E.mjs.map +0 -1
- package/dist/chunk-DRV2FOHZ.mjs.map +0 -1
- package/dist/chunk-ECR45NSD.mjs.map +0 -1
- package/dist/chunk-F2ULK22F.mjs.map +0 -1
- package/dist/chunk-F6RLSVG3.mjs.map +0 -1
- package/dist/chunk-GU5LTWGL.mjs.map +0 -1
- package/dist/chunk-I72DKFHD.mjs.map +0 -1
- package/dist/chunk-KMVGEY7Q.mjs.map +0 -1
- package/dist/chunk-LYB4B6MK.mjs.map +0 -1
- package/dist/chunk-NAFNY4FL.mjs.map +0 -1
- package/dist/chunk-QJNFNPWH.mjs.map +0 -1
- package/dist/chunk-T6MTDQZ7.mjs.map +0 -1
- package/dist/chunk-VSVQZUPW.mjs.map +0 -1
- package/dist/chunk-WGWQRALG.mjs.map +0 -1
- package/dist/chunk-YLFAIYRY.mjs.map +0 -1
- package/dist/chunk-ZQSEYPNN.mjs.map +0 -1
- /package/dist/{chunk-AJ5OMEXM.mjs.map → chunk-VBPZTMXB.mjs.map} +0 -0
- /package/dist/{chunk-JLOABKLH.mjs.map → chunk-YINY56BI.mjs.map} +0 -0
- /package/dist/{chunk-H5ZNEKUR.mjs.map → chunk-ZWI5KPQ5.mjs.map} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import "./chunk-H4VKQGVU.mjs";
|
|
3
2
|
import "./chunk-DE5K76I2.mjs";
|
|
4
3
|
import "./chunk-WADHCMPK.mjs";
|
|
5
4
|
import "./chunk-MMVDU6DF.mjs";
|
|
6
5
|
import {
|
|
7
6
|
CopilotTextarea
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-E7C63KQP.mjs";
|
|
8
|
+
import "./chunk-UIBUYQPG.mjs";
|
|
9
|
+
import "./chunk-M7GTVHFB.mjs";
|
|
11
10
|
import "./chunk-RUV6NBIF.mjs";
|
|
12
11
|
import {
|
|
13
12
|
defaultAutosuggestionsConfig
|
|
14
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-MQXYWOE2.mjs";
|
|
15
14
|
import "./chunk-MCNXIA4Q.mjs";
|
|
16
15
|
import "./chunk-QFXR6DOA.mjs";
|
|
17
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-VH7INUR5.mjs";
|
|
18
17
|
import {
|
|
19
18
|
BaseCopilotTextarea
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-DRV2FOHZ.mjs";
|
|
22
|
-
import "./chunk-QJNFNPWH.mjs";
|
|
19
|
+
} from "./chunk-SWX3MRZ4.mjs";
|
|
23
20
|
import "./chunk-2C7O2EVM.mjs";
|
|
24
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-EGBZSVLK.mjs";
|
|
22
|
+
import "./chunk-ZBP4SABT.mjs";
|
|
23
|
+
import "./chunk-VBPZTMXB.mjs";
|
|
24
|
+
import "./chunk-7GZWOXE4.mjs";
|
|
25
|
+
import "./chunk-PDFIUPCS.mjs";
|
|
26
|
+
import "./chunk-TGN3YVSO.mjs";
|
|
25
27
|
import "./chunk-5UNJXFUO.mjs";
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-AJ5OMEXM.mjs";
|
|
29
|
-
import "./chunk-7LSRNPNI.mjs";
|
|
30
|
-
import "./chunk-72GJNLCO.mjs";
|
|
28
|
+
import "./chunk-VVRGAA43.mjs";
|
|
29
|
+
import "./chunk-AZ7RF6ED.mjs";
|
|
31
30
|
import "./chunk-L7VVZH4Q.mjs";
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
43
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-ZWI5KPQ5.mjs";
|
|
32
|
+
import "./chunk-3WLGLZTY.mjs";
|
|
33
|
+
import "./chunk-IBZTDP72.mjs";
|
|
34
|
+
import "./chunk-7V4ORVQX.mjs";
|
|
35
|
+
import "./chunk-2X3CZVEP.mjs";
|
|
36
|
+
import "./chunk-UB4Y22EF.mjs";
|
|
37
|
+
import "./chunk-MQBPYOOZ.mjs";
|
|
38
|
+
import "./chunk-AHNPJMBR.mjs";
|
|
39
|
+
import "./chunk-ARLBRSB7.mjs";
|
|
40
|
+
import "./chunk-CFCMZVQ2.mjs";
|
|
41
|
+
import "./chunk-LYNGBKJR.mjs";
|
|
42
|
+
import "./chunk-WXKPRNNO.mjs";
|
|
43
|
+
import "./chunk-VYLLLBUP.mjs";
|
|
44
44
|
import "./chunk-WJHSY5T6.mjs";
|
|
45
45
|
import {
|
|
46
46
|
defaultBaseAutosuggestionsConfig
|
|
47
|
-
} from "./chunk-
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
47
|
+
} from "./chunk-O4WCM57A.mjs";
|
|
48
|
+
import "./chunk-NFMCLTJU.mjs";
|
|
49
|
+
import "./chunk-FTG7P3NP.mjs";
|
|
50
|
+
import "./chunk-YINY56BI.mjs";
|
|
51
51
|
import "./chunk-IU3WTXLQ.mjs";
|
|
52
|
-
import "./chunk-
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import "./chunk-
|
|
52
|
+
import "./chunk-H4VKQGVU.mjs";
|
|
53
|
+
import "./chunk-DZMQBOPG.mjs";
|
|
54
|
+
import "./chunk-CMKGYQFX.mjs";
|
|
55
|
+
import "./chunk-A6YGJFQI.mjs";
|
|
55
56
|
import "./chunk-KNQIEOFP.mjs";
|
|
56
|
-
import "./chunk-2QDCE7PD.mjs";
|
|
57
57
|
import "./chunk-MRXNTQOX.mjs";
|
|
58
58
|
export {
|
|
59
59
|
BaseCopilotTextarea,
|
package/dist/index.umd.js
CHANGED
|
@@ -17,23 +17,23 @@
|
|
|
17
17
|
cursor: pointer;
|
|
18
18
|
color: ${o?n?"white":"#aaa":n?"black":"#ccc"};
|
|
19
19
|
`)}))}),t.forwardRef((e,t)=>{var{className:r}=e,n=d(e,["className"]);return x.jsx("span",Object.assign({},n,{ref:t,className:nl("material-icons",r,ol`
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
font-size: 18px;
|
|
21
|
+
vertical-align: text-bottom;
|
|
22
|
+
`)}))});const al=t.forwardRef((e,t)=>{var{className:r}=e,n=d(e,["className"]);return x.jsx("div",Object.assign({},n,{"data-testid":"menu",ref:t,className:nl(r,ol`
|
|
23
|
+
& > * {
|
|
24
|
+
display: inline-block;
|
|
25
|
+
}
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
`)}))});const sl=(e,r)=>{t.useEffect(()=>{if(null!==e.current){e.current.style.height="0px";const t=e.current.scrollHeight;e.current.style.height=t+"px"}},[e,r])};var ul=.999,ll=/[\\\/_+.#"@\[\(\{&]/,cl=/[\\\/_+.#"@\[\(\{&]/g,dl=/[\s-]/,fl=/[\s-]/g;function pl(e,t,r,n,o,a,i){if(a===t.length)return o===e.length?1:.99;var s=`${o},${a}`;if(void 0!==i[s])return i[s];for(var u,l,c,d,f=n.charAt(a),p=r.indexOf(f,o),h=0;p>=0;)(u=pl(e,t,r,n,p+1,a+1,i))>h&&(p===o?u*=1:ll.test(e.charAt(p-1))?(u*=.8,(c=e.slice(o,p-1).match(cl))&&o>0&&(u*=Math.pow(ul,c.length))):dl.test(e.charAt(p-1))?(u*=.9,(d=e.slice(o,p-1).match(fl))&&o>0&&(u*=Math.pow(ul,d.length))):(u*=.17,o>0&&(u*=Math.pow(ul,p-o))),e.charAt(p)!==t.charAt(a)&&(u*=.9999)),(u<.1&&r.charAt(p-1)===n.charAt(a+1)||n.charAt(a+1)===n.charAt(a)&&r.charAt(p-1)!==n.charAt(a))&&(.1*(l=pl(e,t,r,n,p+1,a+2,i))>u&&(u=.1*l)),u>h&&(h=u),p=r.indexOf(f,p+1);return i[s]=h,h}function hl(e){return e.toLowerCase().replace(fl," ")}function vl(e,t){return pl(e,t,hl(e),hl(t),0,0,{})}function ml(){return ml=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ml.apply(null,arguments)}function gl(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(null==e||e(n),!1===r||!n.defaultPrevented)return null==t?void 0:t(n)}}function yl(...e){return t=>e.forEach(e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t))}function bl(...e){return t.useCallback(yl(...e),e)}function Dl(...e){const r=e[0];if(1===e.length)return r;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const o=n.reduce((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]}),{});return t.useMemo(()=>({[`__scope${r.scopeName}`]:o}),[o])}};return n.scopeName=r.scopeName,n}const Cl=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?t.useLayoutEffect:()=>{},wl=s["useId".toString()]||(()=>{});let xl=0;function El(e){const[t,r]=s.useState(wl());return Cl(()=>{r(e=>null!=e?e:String(xl++))},[e]),e||(t?`radix-${t}`:"")}function Al(e){const r=t.useRef(e);return t.useEffect(()=>{r.current=e}),t.useMemo(()=>(...e)=>{var t;return null===(t=r.current)||void 0===t?void 0:t.call(r,...e)},[])}function Bl({prop:e,defaultProp:r,onChange:n=()=>{}}){const[o,a]=function({defaultProp:e,onChange:r}){const n=t.useState(e),[o]=n,a=t.useRef(o),i=Al(r);return t.useEffect(()=>{a.current!==o&&(i(o),a.current=o)},[o,a,i]),n}({defaultProp:r,onChange:n}),i=void 0!==e,s=i?e:o,u=Al(n);return[s,t.useCallback(t=>{if(i){const r="function"==typeof t?t(e):t;r!==e&&u(r)}else a(t)},[i,e,a,u])]}const kl=t.forwardRef((e,r)=>{const{children:n,...o}=e,a=t.Children.toArray(n),i=a.find(Sl);if(i){const e=i.props.children,n=a.map(r=>r===i?t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null:r);return t.createElement(Ol,ml({},o,{ref:r}),t.isValidElement(e)?t.cloneElement(e,void 0,n):null)}return t.createElement(Ol,ml({},o,{ref:r}),n)});kl.displayName="Slot";const Ol=t.forwardRef((e,r)=>{const{children:n,...o}=e;return t.isValidElement(n)?t.cloneElement(n,{...Tl(o,n.props),ref:yl(r,n.ref)}):t.Children.count(n)>1?t.Children.only(null):null});Ol.displayName="SlotClone";const Fl=({children:e})=>t.createElement(t.Fragment,null,e);function Sl(e){return t.isValidElement(e)&&e.type===Fl}function Tl(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?r[n]=(...e)=>{null==a||a(...e),null==o||o(...e)}:"style"===n?r[n]={...o,...a}:"className"===n&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}const Pl=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"].reduce((e,r)=>{const n=t.forwardRef((e,n)=>{const{asChild:o,...a}=e,i=o?kl:r;return t.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),t.createElement(i,ml({},a,{ref:n}))});return n.displayName=`Primitive.${r}`,{...e,[r]:n}},{});const jl="dismissableLayer.update",Nl="dismissableLayer.pointerDownOutside",Rl="dismissableLayer.focusOutside";let _l;const Ml=t.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Il=t.forwardRef((e,r)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:s,onDismiss:u,...l}=e,c=t.useContext(Ml),[d,f]=t.useState(null),[,p]=t.useState({}),h=bl(r,e=>f(e)),v=Array.from(c.layers),[m]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),g=v.indexOf(m),y=d?v.indexOf(d):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,D=y>=g,C=function(e){const r=Al(e),n=t.useRef(!1),o=t.useRef(()=>{});return t.useEffect(()=>{const e=e=>{if(e.target&&!n.current){const t={originalEvent:e};function a(){Ll(Nl,r,t,{discrete:!0})}"touch"===e.pointerType?(document.removeEventListener("click",o.current),o.current=a,document.addEventListener("click",o.current,{once:!0})):a()}n.current=!1},t=window.setTimeout(()=>{document.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(t),document.removeEventListener("pointerdown",e),document.removeEventListener("click",o.current)}},[r]),{onPointerDownCapture:()=>n.current=!0}}(e=>{const t=e.target,r=[...c.branches].some(e=>e.contains(t));D&&!r&&(null==a||a(e),null==s||s(e),e.defaultPrevented||null==u||u())}),w=function(e){const r=Al(e),n=t.useRef(!1);return t.useEffect(()=>{const e=e=>{if(e.target&&!n.current){Ll(Rl,r,{originalEvent:e},{discrete:!1})}};return document.addEventListener("focusin",e),()=>document.removeEventListener("focusin",e)},[r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}(e=>{const t=e.target;[...c.branches].some(e=>e.contains(t))||(null==i||i(e),null==s||s(e),e.defaultPrevented||null==u||u())});return function(e){const r=Al(e);t.useEffect(()=>{const e=e=>{"Escape"===e.key&&r(e)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[r])}(e=>{y===c.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))}),t.useEffect(()=>{if(d)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(_l=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),$l(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(document.body.style.pointerEvents=_l)}},[d,n,c]),t.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),$l())},[d,c]),t.useEffect(()=>{const e=()=>p({});return document.addEventListener(jl,e),()=>document.removeEventListener(jl,e)},[]),t.createElement(Pl.div,ml({},l,{ref:h,style:{pointerEvents:b?D?"auto":"none":void 0,...e.style},onFocusCapture:gl(e.onFocusCapture,w.onFocusCapture),onBlurCapture:gl(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:gl(e.onPointerDownCapture,C.onPointerDownCapture)}))});function $l(){const e=new CustomEvent(jl);document.dispatchEvent(e)}function Ll(e,t,n,{discrete:o}){const a=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),o?function(e,t){e&&r.flushSync(()=>e.dispatchEvent(t))}(a,i):a.dispatchEvent(i)}const zl="focusScope.autoFocusOnMount",Wl="focusScope.autoFocusOnUnmount",Vl={bubbles:!1,cancelable:!0},Ul=t.forwardRef((e,r)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...s}=e,[u,l]=t.useState(null),c=Al(a),d=Al(i),f=t.useRef(null),p=bl(r,e=>l(e)),h=t.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;t.useEffect(()=>{if(o){function e(e){if(h.paused||!u)return;const t=e.target;u.contains(t)?f.current=t:Yl(f.current,{select:!0})}function t(e){!h.paused&&u&&(u.contains(e.relatedTarget)||Yl(f.current,{select:!0}))}return document.addEventListener("focusin",e),document.addEventListener("focusout",t),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t)}}},[o,u,h.paused]),t.useEffect(()=>{if(u){Gl.add(h);const t=document.activeElement;if(!u.contains(t)){const r=new CustomEvent(zl,Vl);u.addEventListener(zl,c),u.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Yl(n,{select:t}),document.activeElement!==r)return}((e=ql(u),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&Yl(u))}return()=>{u.removeEventListener(zl,c),setTimeout(()=>{const e=new CustomEvent(Wl,Vl);u.addEventListener(Wl,d),u.dispatchEvent(e),e.defaultPrevented||Yl(null!=t?t:document.body,{select:!0}),u.removeEventListener(Wl,d),Gl.remove(h)},0)}}var e},[u,c,d,h]);const v=t.useCallback(e=>{if(!n&&!o)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){const t=e.currentTarget,[o,a]=function(e){const t=ql(e),r=Kl(t,e),n=Kl(t.reverse(),e);return[r,n]}(t);o&&a?e.shiftKey||r!==a?e.shiftKey&&r===o&&(e.preventDefault(),n&&Yl(a,{select:!0})):(e.preventDefault(),n&&Yl(o,{select:!0})):r===t&&e.preventDefault()}},[n,o,h.paused]);return t.createElement(Pl.div,ml({tabIndex:-1},s,{ref:p,onKeyDown:v}))});function ql(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Kl(e,t){for(const r of e)if(!Hl(r,{upTo:t}))return r}function Hl(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Yl(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const Gl=function(){let e=[];return{add(t){const r=e[0];t!==r&&(null==r||r.pause()),e=Xl(e,t),e.unshift(t)},remove(t){var r;e=Xl(e,t),null===(r=e[0])||void 0===r||r.resume()}}}();function Xl(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}const Zl=t.forwardRef((e,n)=>{var o;const{container:a=(null===globalThis||void 0===globalThis||null===(o=globalThis.document)||void 0===o?void 0:o.body),...i}=e;return a?r.createPortal(t.createElement(Pl.div,ml({},i,{ref:n})),a):null});const Jl=e=>{const{present:n,children:o}=e,a=function(e){const[n,o]=t.useState(),a=t.useRef({}),i=t.useRef(e),s=t.useRef("none"),u=e?"mounted":"unmounted",[l,c]=function(e,r){return t.useReducer((e,t)=>{const n=r[e][t];return null!=n?n:e},e)}(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return t.useEffect(()=>{const e=Ql(a.current);s.current="mounted"===l?e:"none"},[l]),Cl(()=>{const t=a.current,r=i.current;if(r!==e){const n=s.current,o=Ql(t);if(e)c("MOUNT");else if("none"===o||"none"===(null==t?void 0:t.display))c("UNMOUNT");else{c(r&&n!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=e}},[e,c]),Cl(()=>{if(n){const e=e=>{const t=Ql(a.current).includes(e.animationName);e.target===n&&t&&r.flushSync(()=>c("ANIMATION_END"))},t=e=>{e.target===n&&(s.current=Ql(a.current))};return n.addEventListener("animationstart",t),n.addEventListener("animationcancel",e),n.addEventListener("animationend",e),()=>{n.removeEventListener("animationstart",t),n.removeEventListener("animationcancel",e),n.removeEventListener("animationend",e)}}c("ANIMATION_END")},[n,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:t.useCallback(e=>{e&&(a.current=getComputedStyle(e)),o(e)},[])}}(n),i="function"==typeof o?o({present:a.isPresent}):t.Children.only(o),s=bl(a.ref,i.ref);return"function"==typeof o||a.isPresent?t.cloneElement(i,{ref:s}):null};function Ql(e){return(null==e?void 0:e.animationName)||"none"}Jl.displayName="Presence";let ec=0;function tc(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var rc="right-scroll-bar-position",nc="width-before-scroll-bar";function oc(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var ac="undefined"!=typeof window?s.useLayoutEffect:s.useEffect,ic=new WeakMap;function sc(e,r){var n,o,a,i=(n=null,o=function(t){return e.forEach(function(e){return oc(e,t)})},a=t.useState(function(){return{value:n,callback:o,facade:{get current(){return a.value},set current(e){var t=a.value;t!==e&&(a.value=e,a.callback(e,t))}}}})[0],a.callback=o,a.facade);return ac(function(){var t=ic.get(i);if(t){var r=new Set(t),n=new Set(e),o=i.current;r.forEach(function(e){n.has(e)||oc(e,null)}),n.forEach(function(e){r.has(e)||oc(e,o)})}ic.set(i,e)},[e]),i}function uc(e){return e}function lc(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=uc);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(e){var o=t(e,n);return r.push(o),function(){r=r.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var o=r;r=[],o.forEach(e),t=r}var a=function(){var r=t;t=[],r.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),r={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),r}}}};return o}(null);return t.options=c({async:!0,ssr:!1},e),t}var cc=function(e){var t=e.sideCar,r=d(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return s.createElement(n,c({},r))};function dc(e,t){return e.useMedium(t),cc}cc.isSideCarExport=!0;var fc=lc(),pc=function(){},hc=s.forwardRef(function(e,t){var r=s.useRef(null),n=s.useState({onScrollCapture:pc,onWheelCapture:pc,onTouchMoveCapture:pc}),o=n[0],a=n[1],i=e.forwardProps,u=e.children,l=e.className,f=e.removeScrollBar,p=e.enabled,h=e.shards,v=e.sideCar,m=e.noIsolation,g=e.inert,y=e.allowPinchZoom,b=e.as,D=void 0===b?"div":b,C=d(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=v,x=sc([r,t]),E=c(c({},C),o);return s.createElement(s.Fragment,null,p&&s.createElement(w,{sideCar:fc,removeScrollBar:f,shards:h,noIsolation:m,inert:g,setCallbacks:a,allowPinchZoom:!!y,lockRef:r}),i?s.cloneElement(s.Children.only(u),c(c({},E),{ref:x})):s.createElement(D,c({},E,{className:l,ref:x}),u))});hc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},hc.classNames={fullWidth:nc,zeroRight:rc};function vc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var mc=function(){var e=0,t=null;return{add:function(r){var n;0==e&&(t=vc())&&(!function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}(t,r),n=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(n)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},gc=function(){var e,t=(e=mc(),function(t,r){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])});return function(e){var r=e.styles,n=e.dynamic;return t(r,n),null}},yc={left:0,top:0,right:0,gap:0},bc=function(e){return parseInt(e||"",10)||0},Dc=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return yc;var t=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[bc(r),bc(n),bc(o)]}(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Cc=gc(),wc="data-scroll-locked",xc=function(e,t,r,n){var o=e.left,a=e.top,i=e.right,s=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(s,"px ").concat(n,";\n }\n body[").concat(wc,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(rc," {\n right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(nc," {\n margin-right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(rc," .").concat(rc," {\n right: 0 ").concat(n,";\n }\n \n .").concat(nc," .").concat(nc," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(wc,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},Ec=function(){var e=parseInt(document.body.getAttribute(wc)||"0",10);return isFinite(e)?e:0},Ac=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=void 0===n?"margin":n;s.useEffect(function(){return document.body.setAttribute(wc,(Ec()+1).toString()),function(){var e=Ec()-1;e<=0?document.body.removeAttribute(wc):document.body.setAttribute(wc,e.toString())}},[]);var a=s.useMemo(function(){return Dc(o)},[o]);return s.createElement(Cc,{styles:xc(a,!t,o,r?"":"!important")})},Bc=!1;if("undefined"!=typeof window)try{var kc=Object.defineProperty({},"passive",{get:function(){return Bc=!0,!0}});window.addEventListener("test",kc,kc),window.removeEventListener("test",kc,kc)}catch(e){Bc=!1}var Oc=!!Bc&&{passive:!1},Fc=function(e,t){var r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),Sc(e,r)){var n=Tc(e,r);if(n[1]>n[2])return!0}r=r.parentNode}while(r&&r!==document.body);return!1},Sc=function(e,t){return"v"===e?function(e){var t=window.getComputedStyle(e);return"hidden"!==t.overflowY&&!(t.overflowY===t.overflowX&&"visible"===t.overflowY)}(t):function(e){var t=window.getComputedStyle(e);return"hidden"!==t.overflowX&&!(t.overflowY===t.overflowX&&"visible"===t.overflowX)}(t)},Tc=function(e,t){return"v"===e?[(r=t).scrollTop,r.scrollHeight,r.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var r},Pc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jc=function(e){return[e.deltaX,e.deltaY]},Nc=function(e){return e&&"current"in e?e.current:e},Rc=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},_c=0,Mc=[];var Ic=dc(fc,function(e){var t=s.useRef([]),r=s.useRef([0,0]),n=s.useRef(),o=s.useState(_c++)[0],a=s.useState(function(){return gc()})[0],i=s.useRef(e);s.useEffect(function(){i.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=f([e.lockRef.current],(e.shards||[]).map(Nc),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=s.useCallback(function(e,t){if("touches"in e&&2===e.touches.length)return!i.current.allowPinchZoom;var o,a=Pc(e),s=r.current,u="deltaX"in e?e.deltaX:s[0]-a[0],l="deltaY"in e?e.deltaY:s[1]-a[1],c=e.target,d=Math.abs(u)>Math.abs(l)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=Fc(d,c);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=Fc(d,c)),!f)return!1;if(!n.current&&"changedTouches"in e&&(u||l)&&(n.current=o),!o)return!0;var p=n.current||o;return function(e,t,r,n){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=o*n,i=r.target,s=t.contains(i),u=!1,l=a>0,c=0,d=0;do{var f=Tc(e,i),p=f[0],h=f[1]-f[2]-o*p;(p||h)&&Sc(e,i)&&(c+=h,d+=p),i=i.parentNode}while(!s&&i!==document.body||s&&(t.contains(i)||t===i));return l&&0===c?u=!0:l||0!==d||(u=!0),u}(p,t,e,"h"===p?u:l)},[]),l=s.useCallback(function(e){var r=e;if(Mc.length&&Mc[Mc.length-1]===a){var n="deltaY"in r?jc(r):Pc(r),o=t.current.filter(function(e){return e.name===r.type&&e.target===r.target&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,n)})[0];if(o&&o.should)r.preventDefault();else if(!o){var s=(i.current.shards||[]).map(Nc).filter(Boolean).filter(function(e){return e.contains(r.target)});(s.length>0?u(r,s[0]):!i.current.noIsolation)&&r.preventDefault()}}},[]),c=s.useCallback(function(e,r,n,o){var a={name:e,delta:r,target:n,should:o};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=s.useCallback(function(e){r.current=Pc(e),n.current=void 0},[]),p=s.useCallback(function(t){c(t.type,jc(t),t.target,u(t,e.lockRef.current))},[]),h=s.useCallback(function(t){c(t.type,Pc(t),t.target,u(t,e.lockRef.current))},[]);s.useEffect(function(){return Mc.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Oc),document.addEventListener("touchmove",l,Oc),document.addEventListener("touchstart",d,Oc),function(){Mc=Mc.filter(function(e){return e!==a}),document.removeEventListener("wheel",l,Oc),document.removeEventListener("touchmove",l,Oc),document.removeEventListener("touchstart",d,Oc)}},[]);var v=e.removeScrollBar,m=e.inert;return s.createElement(s.Fragment,null,m?s.createElement(a,{styles:Rc(o)}):null,v?s.createElement(Ac,{gapMode:"margin"}):null)}),$c=s.forwardRef(function(e,t){return s.createElement(hc,c({},e,{ref:t,sideCar:Ic}))});$c.classNames=hc.classNames;var Lc=new WeakMap,zc=new WeakMap,Wc={},Vc=0,Uc=function(e){return e&&(e.host||Uc(e.parentNode))},qc=function(e,t,r,n){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var r=Uc(t);return r&&e.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);Wc[r]||(Wc[r]=new WeakMap);var a=Wc[r],i=[],s=new Set,u=new Set(o),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};o.forEach(l);var c=function(e){e&&!u.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))c(e);else try{var t=e.getAttribute(n),o=null!==t&&"false"!==t,u=(Lc.get(e)||0)+1,l=(a.get(e)||0)+1;Lc.set(e,u),a.set(e,l),i.push(e),1===u&&o&&zc.set(e,!0),1===l&&e.setAttribute(r,"true"),o||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return c(t),s.clear(),Vc++,function(){i.forEach(function(e){var t=Lc.get(e)-1,o=a.get(e)-1;Lc.set(e,t),a.set(e,o),t||(zc.has(e)||e.removeAttribute(n),zc.delete(e)),o||e.removeAttribute(r)}),--Vc||(Lc=new WeakMap,Lc=new WeakMap,zc=new WeakMap,Wc={})}},Kc=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),qc(n,o,r,"aria-hidden")):function(){return null}};const Hc="Dialog",[Yc]=function(e,r=[]){let n=[];const o=()=>{const r=n.map(e=>t.createContext(e));return function(n){const o=(null==n?void 0:n[e])||r;return t.useMemo(()=>({[`__scope${e}`]:{...n,[e]:o}}),[n,o])}};return o.scopeName=e,[function(r,o){const a=t.createContext(o),i=n.length;function s(r){const{scope:n,children:o,...s}=r,u=(null==n?void 0:n[e][i])||a,l=t.useMemo(()=>s,Object.values(s));return t.createElement(u.Provider,{value:l},o)}return n=[...n,o],s.displayName=r+"Provider",[s,function(n,s){const u=(null==s?void 0:s[e][i])||a,l=t.useContext(u);if(l)return l;if(void 0!==o)return o;throw new Error(`\`${n}\` must be used within \`${r}\``)}]},Dl(o,...r)]}(Hc),[Gc,Xc]=Yc(Hc),Zc="DialogPortal",[Jc,Qc]=Yc(Zc,{forceMount:void 0}),ed="DialogOverlay",td=t.forwardRef((e,r)=>{const n=Qc(ed,e.__scopeDialog),{forceMount:o=n.forceMount,...a}=e,i=Xc(ed,e.__scopeDialog);return i.modal?t.createElement(Jl,{present:o||i.open},t.createElement(rd,ml({},a,{ref:r}))):null}),rd=t.forwardRef((e,r)=>{const{__scopeDialog:n,...o}=e,a=Xc(ed,n);return t.createElement($c,{as:kl,allowPinchZoom:!0,shards:[a.contentRef]},t.createElement(Pl.div,ml({"data-state":ld(a.open)},o,{ref:r,style:{pointerEvents:"auto",...o.style}})))}),nd="DialogContent",od=t.forwardRef((e,r)=>{const n=Qc(nd,e.__scopeDialog),{forceMount:o=n.forceMount,...a}=e,i=Xc(nd,e.__scopeDialog);return t.createElement(Jl,{present:o||i.open},i.modal?t.createElement(ad,ml({},a,{ref:r})):t.createElement(id,ml({},a,{ref:r})))}),ad=t.forwardRef((e,r)=>{const n=Xc(nd,e.__scopeDialog),o=t.useRef(null),a=bl(r,n.contentRef,o);return t.useEffect(()=>{const e=o.current;if(e)return Kc(e)},[]),t.createElement(sd,ml({},e,{ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:gl(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),null===(t=n.triggerRef.current)||void 0===t||t.focus()}),onPointerDownOutside:gl(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:gl(e.onFocusOutside,e=>e.preventDefault())}))}),id=t.forwardRef((e,r)=>{const n=Xc(nd,e.__scopeDialog),o=t.useRef(!1);return t.createElement(sd,ml({},e,{ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var r,a;(null===(r=e.onCloseAutoFocus)||void 0===r||r.call(e,t),t.defaultPrevented)||(o.current||null===(a=n.triggerRef.current)||void 0===a||a.focus(),t.preventDefault());o.current=!1},onInteractOutside:t=>{var r,a;null===(r=e.onInteractOutside)||void 0===r||r.call(e,t),t.defaultPrevented||(o.current=!0);const i=t.target;(null===(a=n.triggerRef.current)||void 0===a?void 0:a.contains(i))&&t.preventDefault()}}))}),sd=t.forwardRef((e,r)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,...s}=e,u=Xc(nd,n),l=bl(r,t.useRef(null));return t.useEffect(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=r[0])&&void 0!==e?e:tc()),document.body.insertAdjacentElement("beforeend",null!==(t=r[1])&&void 0!==t?t:tc()),ec++,()=>{1===ec&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),ec--}},[]),t.createElement(t.Fragment,null,t.createElement(Ul,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:i},t.createElement(Il,ml({role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":ld(u.open)},s,{ref:l,onDismiss:()=>u.onOpenChange(!1)}))),!1)}),ud="DialogTitle";function ld(e){return e?"open":"closed"}!function(e,r){const n=t.createContext(r);function o(e){const{children:r,...o}=e,a=t.useMemo(()=>o,Object.values(o));return t.createElement(n.Provider,{value:a},r)}o.displayName=e+"Provider"}("DialogTitleWarning",{contentName:nd,titleName:ud,docsSlug:"dialog"});const cd=e=>{const{__scopeDialog:r,children:n,open:o,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,u=t.useRef(null),l=t.useRef(null),[c=!1,d]=Bl({prop:o,defaultProp:a,onChange:i});return t.createElement(Gc,{scope:r,triggerRef:u,contentRef:l,contentId:El(),titleId:El(),descriptionId:El(),open:c,onOpenChange:d,onOpenToggle:t.useCallback(()=>d(e=>!e),[d]),modal:s},n)},dd=e=>{const{__scopeDialog:r,forceMount:n,children:o,container:a}=e,i=Xc(Zc,r);return t.createElement(Jc,{scope:r,forceMount:n},t.Children.map(o,e=>t.createElement(Jl,{present:n||i.open},t.createElement(Zl,{asChild:!0,container:a},e))))},fd=td,pd=od;var hd='[cmdk-group=""]',vd='[cmdk-group-items=""]',md='[cmdk-item=""]',gd=`${md}:not([aria-disabled="true"])`,yd="cmdk-item-select",bd="data-value",Dd=(e,t)=>vl(e,t),Cd=s.createContext(void 0),wd=()=>s.useContext(Cd),xd=s.createContext(void 0),Ed=()=>s.useContext(xd),Ad=s.createContext(void 0),Bd=s.forwardRef((e,t)=>{let r=s.useRef(null),n=Ld(()=>{var t,r,n;return{search:"",value:null!=(n=null!=(r=e.value)?r:null==(t=e.defaultValue)?void 0:t.toLowerCase())?n:"",filtered:{count:0,items:new Map,groups:new Set}}}),o=Ld(()=>new Set),a=Ld(()=>new Map),i=Ld(()=>new Map),u=Ld(()=>new Set),l=Id(e),{label:c,children:d,value:f,onValueChange:p,filter:h,shouldFilter:v,vimBindings:m=!0,...g}=e,y=s.useId(),b=s.useId(),D=s.useId(),C=Ud();$d(()=>{if(void 0!==f){let e=f.trim().toLowerCase();n.current.value=e,C(6,O),w.emit()}},[f]);let w=s.useMemo(()=>({subscribe:e=>(u.current.add(e),()=>u.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var o,a,i;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)k(),A(),C(1,B);else if("value"===e){if(void 0!==(null==(o=l.current)?void 0:o.value)){let e=null!=t?t:"";return void(null==(i=(a=l.current).onValueChange)||i.call(a,e))}r||C(5,O)}w.emit()}},emit:()=>{u.current.forEach(e=>e())}}),[]),x=s.useMemo(()=>({value:(e,t)=>{t!==i.current.get(e)&&(i.current.set(e,t),n.current.filtered.items.set(e,E(t)),C(2,()=>{A(),w.emit()}))},item:(e,t)=>(o.current.add(e),t&&(a.current.has(t)?a.current.get(t).add(e):a.current.set(t,new Set([e]))),C(3,()=>{k(),A(),n.current.value||B(),w.emit()}),()=>{i.current.delete(e),o.current.delete(e),n.current.filtered.items.delete(e);let t=F();C(4,()=>{k(),(null==t?void 0:t.getAttribute("id"))===e&&B(),w.emit()})}),group:e=>(a.current.has(e)||a.current.set(e,new Set),()=>{i.current.delete(e),a.current.delete(e)}),filter:()=>l.current.shouldFilter,label:c||e["aria-label"],commandRef:r,listId:y,inputId:D,labelId:b}),[]);function E(e){var t,r;let o=null!=(r=null==(t=l.current)?void 0:t.filter)?r:Dd;return e?o(e,n.current.search):0}function A(){if(!r.current||!n.current.search||!1===l.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(r=>{let n=a.current.get(r),o=0;n.forEach(t=>{let r=e.get(t);o=Math.max(r,o)}),t.push([r,o])});let o=r.current.querySelector('[cmdk-list-sizer=""]');S().sort((t,r)=>{var n,o;let a=t.getAttribute(bd),i=r.getAttribute(bd);return(null!=(n=e.get(i))?n:0)-(null!=(o=e.get(a))?o:0)}).forEach(e=>{let t=e.closest(vd);t?t.appendChild(e.parentElement===t?e:e.closest(`${vd} > *`)):o.appendChild(e.parentElement===o?e:e.closest(`${vd} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=r.current.querySelector(`${hd}[${bd}="${e[0]}"]`);null==t||t.parentElement.appendChild(t)})}function B(){let e=S().find(e=>!e.ariaDisabled),t=null==e?void 0:e.getAttribute(bd);w.setState("value",t||void 0)}function k(){if(!n.current.search||!1===l.current.shouldFilter)return void(n.current.filtered.count=o.current.size);n.current.filtered.groups=new Set;let e=0;for(let t of o.current){let r=E(i.current.get(t));n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of a.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function O(){var e,t,r;let n=F();n&&((null==(e=n.parentElement)?void 0:e.firstChild)===n&&(null==(r=null==(t=n.closest(hd))?void 0:t.querySelector('[cmdk-group-heading=""]'))||r.scrollIntoView({block:"nearest"})),n.scrollIntoView({block:"nearest"}))}function F(){var e;return null==(e=r.current)?void 0:e.querySelector(`${md}[aria-selected="true"]`)}function S(){return Array.from(r.current.querySelectorAll(gd))}function T(e){let t=S()[e];t&&w.setState("value",t.getAttribute(bd))}function P(e){var t;let r=F(),n=S(),o=n.findIndex(e=>e===r),a=n[o+e];null!=(t=l.current)&&t.loop&&(a=o+e<0?n[n.length-1]:o+e===n.length?n[0]:n[o+e]),a&&w.setState("value",a.getAttribute(bd))}function j(e){let t,r=F(),n=null==r?void 0:r.closest(hd);for(;n&&!t;)n=e>0?_d(n,hd):Md(n,hd),t=null==n?void 0:n.querySelector(gd);t?w.setState("value",t.getAttribute(bd)):P(e)}let N=()=>T(S().length-1),R=e=>{e.preventDefault(),e.metaKey?N():e.altKey?j(1):P(1)},_=e=>{e.preventDefault(),e.metaKey?T(0):e.altKey?j(-1):P(-1)};return s.createElement("div",{ref:zd([r,t]),...g,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=g.onKeyDown)||t.call(g,e),!e.defaultPrevented)switch(e.key){case"n":case"j":m&&e.ctrlKey&&R(e);break;case"ArrowDown":R(e);break;case"p":case"k":m&&e.ctrlKey&&_(e);break;case"ArrowUp":_(e);break;case"Home":e.preventDefault(),T(0);break;case"End":e.preventDefault(),N();break;case"Enter":if(!e.nativeEvent.isComposing){e.preventDefault();let t=F();if(t){let e=new Event(yd);t.dispatchEvent(e)}}}}},s.createElement("label",{"cmdk-label":"",htmlFor:x.inputId,id:x.labelId,style:qd},c),s.createElement(xd.Provider,{value:w},s.createElement(Cd.Provider,{value:x},d)))}),kd=s.forwardRef((e,t)=>{var r,n;let o=s.useId(),a=s.useRef(null),i=s.useContext(Ad),u=wd(),l=Id(e),c=null!=(n=null==(r=l.current)?void 0:r.forceMount)?n:null==i?void 0:i.forceMount;$d(()=>u.item(o,null==i?void 0:i.id),[]);let d=Vd(o,a,[e.value,e.children,a]),f=Ed(),p=Wd(e=>e.value&&e.value===d.current),h=Wd(e=>!(!c&&!1!==u.filter())||(!e.search||e.filtered.items.get(o)>0));function v(){var e,t;m(),null==(t=(e=l.current).onSelect)||t.call(e,d.current)}function m(){f.setState("value",d.current,!0)}if(s.useEffect(()=>{let t=a.current;if(t&&!e.disabled)return t.addEventListener(yd,v),()=>t.removeEventListener(yd,v)},[h,e.onSelect,e.disabled]),!h)return null;let{disabled:g,value:y,onSelect:b,forceMount:D,...C}=e;return s.createElement("div",{ref:zd([a,t]),...C,id:o,"cmdk-item":"",role:"option","aria-disabled":g||void 0,"aria-selected":p||void 0,"data-disabled":g||void 0,"data-selected":p||void 0,onPointerMove:g?void 0:m,onClick:g?void 0:v},e.children)}),Od=s.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:o,...a}=e,i=s.useId(),u=s.useRef(null),l=s.useRef(null),c=s.useId(),d=wd(),f=Wd(e=>!(!o&&!1!==d.filter())||(!e.search||e.filtered.groups.has(i)));$d(()=>d.group(i),[]),Vd(i,u,[e.value,e.heading,l]);let p=s.useMemo(()=>({id:i,forceMount:o}),[o]),h=s.createElement(Ad.Provider,{value:p},n);return s.createElement("div",{ref:zd([u,t]),...a,"cmdk-group":"",role:"presentation",hidden:!f||void 0},r&&s.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:c},r),s.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?c:void 0},h))}),Fd=s.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,o=s.useRef(null),a=Wd(e=>!e.search);return r||a?s.createElement("div",{ref:zd([o,t]),...n,"cmdk-separator":"",role:"separator"}):null}),Sd=s.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,o=null!=e.value,a=Ed(),i=Wd(e=>e.search),u=Wd(e=>e.value),l=wd(),c=s.useMemo(()=>{var e;let t=null==(e=l.commandRef.current)?void 0:e.querySelector(`${md}[${bd}="${u}"]`);return null==t?void 0:t.getAttribute("id")},[u,l.commandRef]);return s.useEffect(()=>{null!=e.value&&a.setState("search",e.value)},[e.value]),s.createElement("input",{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":c,id:l.inputId,type:"text",value:o?e.value:i,onChange:e=>{o||a.setState("search",e.target.value),null==r||r(e.target.value)}})}),Td=s.forwardRef((e,t)=>{let{children:r,...n}=e,o=s.useRef(null),a=s.useRef(null),i=wd();return s.useEffect(()=>{if(a.current&&o.current){let e,t=a.current,r=o.current,n=new ResizeObserver(()=>{e=requestAnimationFrame(()=>{let e=t.offsetHeight;r.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")})});return n.observe(t),()=>{cancelAnimationFrame(e),n.unobserve(t)}}},[]),s.createElement("div",{ref:zd([o,t]),...n,"cmdk-list":"",role:"listbox","aria-label":"Suggestions",id:i.listId,"aria-labelledby":i.inputId},s.createElement("div",{ref:a,"cmdk-list-sizer":""},r))}),Pd=s.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:o,contentClassName:a,container:i,...u}=e;return s.createElement(cd,{open:r,onOpenChange:n},s.createElement(dd,{container:i},s.createElement(fd,{"cmdk-overlay":"",className:o}),s.createElement(pd,{"aria-label":e.label,"cmdk-dialog":"",className:a},s.createElement(Bd,{ref:t,...u}))))}),jd=s.forwardRef((e,t)=>{let r=s.useRef(!0),n=Wd(e=>0===e.filtered.count);return s.useEffect(()=>{r.current=!1},[]),r.current||!n?null:s.createElement("div",{ref:t,...e,"cmdk-empty":"",role:"presentation"})}),Nd=s.forwardRef((e,t)=>{let{progress:r,children:n,...o}=e;return s.createElement("div",{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Loading..."},s.createElement("div",{"aria-hidden":!0},n))}),Rd=Object.assign(Bd,{List:Td,Item:kd,Input:Sd,Group:Od,Separator:Fd,Dialog:Pd,Empty:jd,Loading:Nd});function _d(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function Md(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function Id(e){let t=s.useRef(e);return $d(()=>{t.current=e}),t}var $d="undefined"==typeof window?s.useEffect:s.useLayoutEffect;function Ld(e){let t=s.useRef();return void 0===t.current&&(t.current=e()),t}function zd(e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}function Wd(e){let t=Ed(),r=()=>e(t.snapshot());return s.useSyncExternalStore(t.subscribe,r,r)}function Vd(e,t,r){let n=s.useRef(),o=wd();return $d(()=>{var a;let i=(()=>{var e;for(let t of r){if("string"==typeof t)return t.trim().toLowerCase();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim().toLowerCase():n.current}})();o.value(e,i),null==(a=t.current)||a.setAttribute(bd,i),n.current=i}),n}var Ud=()=>{let[e,t]=s.useState(),r=Ld(()=>new Map);return $d(()=>{r.current.forEach(e=>e()),r.current=new Map},[e]),(e,n)=>{r.current.set(e,n),t({})}},qd={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Kd(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function Hd(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Yd(...e){return t=>{let r=!1;const n=e.map(e=>{const n=Hd(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){const r=n[t];"function"==typeof r?r():Hd(e[t],null)}}}}function Gd(...e){return s.useCallback(Yd(...e),e)}function Xd(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const n=r.reduce((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]}),{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}var Zd=globalThis?.document?s.useLayoutEffect:()=>{};function Jd(e){const t=Qd(e),r=s.forwardRef((e,r)=>{const{children:n,...o}=e,a=s.Children.toArray(n),i=a.find(tf);if(i){const e=i.props.children,n=a.map(t=>t===i?s.Children.count(e)>1?s.Children.only(null):s.isValidElement(e)?e.props.children:null:t);return x.jsx(t,{...o,ref:r,children:s.isValidElement(e)?s.cloneElement(e,void 0,n):null})}return x.jsx(t,{...o,ref:r,children:n})});return r.displayName=`${e}.Slot`,r}function Qd(e){const t=s.forwardRef((e,t)=>{const{children:r,...n}=e;if(s.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r),o=function(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...a}:"className"===n&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==s.Fragment&&(o.ref=t?Yd(t,e):e),s.cloneElement(r,o)}return s.Children.count(r)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ef=Symbol("radix.slottable");function tf(e){return s.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===ef}var rf=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const r=Jd(`Primitive.${t}`),n=s.forwardRef((e,n)=>{const{asChild:o,...a}=e,i=o?r:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),x.jsx(i,{...a,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function nf(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...e)=>t.current?.(...e),[])}var of,af="dismissableLayer.update",sf="dismissableLayer.pointerDownOutside",uf="dismissableLayer.focusOutside",lf=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),cf=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:u,...l}=e,c=s.useContext(lf),[d,f]=s.useState(null),p=d?.ownerDocument??globalThis?.document,[,h]=s.useState({}),v=Gd(t,e=>f(e)),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=d?m.indexOf(d):-1,D=c.layersWithOutsidePointerEventsDisabled.size>0,C=b>=y,w=function(e,t=globalThis?.document){const r=nf(e),n=s.useRef(!1),o=s.useRef(()=>{});return s.useEffect(()=>{const e=e=>{if(e.target&&!n.current){let n=function(){pf(sf,r,a,{discrete:!0})};const a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=n,t.addEventListener("click",o.current,{once:!0})):n()}else t.removeEventListener("click",o.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}(e=>{const t=e.target,r=[...c.branches].some(e=>e.contains(t));C&&!r&&(o?.(e),i?.(e),e.defaultPrevented||u?.())},p),E=function(e,t=globalThis?.document){const r=nf(e),n=s.useRef(!1);return s.useEffect(()=>{const e=e=>{if(e.target&&!n.current){pf(uf,r,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}(e=>{const t=e.target;[...c.branches].some(e=>e.contains(t))||(a?.(e),i?.(e),e.defaultPrevented||u?.())},p);return function(e,t=globalThis?.document){const r=nf(e);s.useEffect(()=>{const e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}(e=>{b===c.layers.size-1&&(n?.(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))},p),s.useEffect(()=>{if(d)return r&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(of=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),ff(),()=>{r&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=of)}},[d,p,r,c]),s.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),ff())},[d,c]),s.useEffect(()=>{const e=()=>h({});return document.addEventListener(af,e),()=>document.removeEventListener(af,e)},[]),x.jsx(rf.div,{...l,ref:v,style:{pointerEvents:D?C?"auto":"none":void 0,...e.style},onFocusCapture:Kd(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Kd(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Kd(e.onPointerDownCapture,w.onPointerDownCapture)})});cf.displayName="DismissableLayer";var df=s.forwardRef((e,t)=>{const r=s.useContext(lf),n=s.useRef(null),o=Gd(t,n);return s.useEffect(()=>{const e=n.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),x.jsx(rf.div,{...e,ref:o})});function ff(){const e=new CustomEvent(af);document.dispatchEvent(e)}function pf(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?function(e,t){e&&u.flushSync(()=>e.dispatchEvent(t))}(o,a):o.dispatchEvent(a)}df.displayName="DismissableLayerBranch";var hf="focusScope.autoFocusOnMount",vf="focusScope.autoFocusOnUnmount",mf={bubbles:!1,cancelable:!0},gf=s.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[u,l]=s.useState(null),c=nf(o),d=nf(a),f=s.useRef(null),p=Gd(t,e=>l(e)),h=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(n){let e=function(e){if(h.paused||!u)return;const t=e.target;u.contains(t)?f.current=t:Cf(f.current,{select:!0})},t=function(e){if(h.paused||!u)return;const t=e.relatedTarget;null!==t&&(u.contains(t)||Cf(f.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Cf(u)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const n=new MutationObserver(r);return u&&n.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[n,u,h.paused]),s.useEffect(()=>{if(u){wf.add(h);const t=document.activeElement;if(!u.contains(t)){const r=new CustomEvent(hf,mf);u.addEventListener(hf,c),u.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Cf(n,{select:t}),document.activeElement!==r)return}((e=yf(u),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&Cf(u))}return()=>{u.removeEventListener(hf,c),setTimeout(()=>{const e=new CustomEvent(vf,mf);u.addEventListener(vf,d),u.dispatchEvent(e),e.defaultPrevented||Cf(t??document.body,{select:!0}),u.removeEventListener(vf,d),wf.remove(h)},0)}}var e},[u,c,d,h]);const v=s.useCallback(e=>{if(!r&&!n)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[n,a]=function(e){const t=yf(e),r=bf(t,e),n=bf(t.reverse(),e);return[r,n]}(t);n&&a?e.shiftKey||o!==a?e.shiftKey&&o===n&&(e.preventDefault(),r&&Cf(a,{select:!0})):(e.preventDefault(),r&&Cf(n,{select:!0})):o===t&&e.preventDefault()}},[r,n,h.paused]);return x.jsx(rf.div,{tabIndex:-1,...i,ref:p,onKeyDown:v})});function yf(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function bf(e,t){for(const r of e)if(!Df(r,{upTo:t}))return r}function Df(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Cf(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}gf.displayName="FocusScope";var wf=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=xf(e,t),e.unshift(t)},remove(t){e=xf(e,t),e[0]?.resume()}}}();function xf(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}var Ef=s.forwardRef((e,t)=>{const{container:n,...o}=e,[a,i]=s.useState(!1);Zd(()=>i(!0),[]);const u=n||a&&globalThis?.document?.body;return u?r.createPortal(x.jsx(rf.div,{...o,ref:t}),u):null});Ef.displayName="Portal";var Af=e=>{const{present:t,children:r}=e,n=function(e){const[t,r]=s.useState(),n=s.useRef(null),o=s.useRef(e),a=s.useRef("none"),i=e?"mounted":"unmounted",[u,l]=function(e,t){return s.useReducer((e,r)=>t[e][r]??e,e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const e=Bf(n.current);a.current="mounted"===u?e:"none"},[u]),Zd(()=>{const t=n.current,r=o.current;if(r!==e){const n=a.current,i=Bf(t);if(e)l("MOUNT");else if("none"===i||"none"===t?.display)l("UNMOUNT");else{l(r&&n!==i?"ANIMATION_OUT":"UNMOUNT")}o.current=e}},[e,l]),Zd(()=>{if(t){let e;const r=t.ownerDocument.defaultView??window,i=a=>{const i=Bf(n.current).includes(CSS.escape(a.animationName));if(a.target===t&&i&&(l("ANIMATION_END"),!o.current)){const n=t.style.animationFillMode;t.style.animationFillMode="forwards",e=r.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=n)})}},s=e=>{e.target===t&&(a.current=Bf(n.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{r.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:s.useCallback(e=>{n.current=e?getComputedStyle(e):null,r(e)},[])}}(t),o="function"==typeof r?r({present:n.isPresent}):s.Children.only(r),a=Gd(n.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(o));return"function"==typeof r||n.isPresent?s.cloneElement(o,{ref:a}):null};function Bf(e){return e?.animationName||"none"}Af.displayName="Presence";var kf=0;function Of(){const e=document.createElement("span");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}var Ff=lc(),Sf=function(){},Tf=s.forwardRef(function(e,t){var r=s.useRef(null),n=s.useState({onScrollCapture:Sf,onWheelCapture:Sf,onTouchMoveCapture:Sf}),o=n[0],a=n[1],i=e.forwardProps,u=e.children,l=e.className,f=e.removeScrollBar,p=e.enabled,h=e.shards,v=e.sideCar,m=e.noRelative,g=e.noIsolation,y=e.inert,b=e.allowPinchZoom,D=e.as,C=void 0===D?"div":D,w=e.gapMode,x=d(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=v,A=sc([r,t]),B=c(c({},x),o);return s.createElement(s.Fragment,null,p&&s.createElement(E,{sideCar:Ff,removeScrollBar:f,shards:h,noRelative:m,noIsolation:g,inert:y,setCallbacks:a,allowPinchZoom:!!b,lockRef:r,gapMode:w}),i?s.cloneElement(s.Children.only(u),c(c({},B),{ref:A})):s.createElement(C,c({},B,{className:l,ref:A}),u))});Tf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Tf.classNames={fullWidth:nc,zeroRight:rc};var Pf=!1;if("undefined"!=typeof window)try{var jf=Object.defineProperty({},"passive",{get:function(){return Pf=!0,!0}});window.addEventListener("test",jf,jf),window.removeEventListener("test",jf,jf)}catch(e){Pf=!1}var Nf=!!Pf&&{passive:!1},Rf=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===r[t])},_f=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),Mf(e,n)){var o=If(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Mf=function(e,t){return"v"===e?function(e){return Rf(e,"overflowY")}(t):function(e){return Rf(e,"overflowX")}(t)},If=function(e,t){return"v"===e?[(r=t).scrollTop,r.scrollHeight,r.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var r},$f=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Lf=function(e){return[e.deltaX,e.deltaY]},zf=function(e){return e&&"current"in e?e.current:e},Wf=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Vf=0,Uf=[];function qf(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Kf=dc(Ff,function(e){var t=s.useRef([]),r=s.useRef([0,0]),n=s.useRef(),o=s.useState(Vf++)[0],a=s.useState(gc)[0],i=s.useRef(e);s.useEffect(function(){i.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=f([e.lockRef.current],(e.shards||[]).map(zf),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=s.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=$f(e),s=r.current,u="deltaX"in e?e.deltaX:s[0]-a[0],l="deltaY"in e?e.deltaY:s[1]-a[1],c=e.target,d=Math.abs(u)>Math.abs(l)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(!!p&&(p===c||p.contains(c)))return!1;var h=_f(d,c);if(!h)return!0;if(h?o=d:(o="v"===d?"h":"v",h=_f(d,c)),!h)return!1;if(!n.current&&"changedTouches"in e&&(u||l)&&(n.current=o),!o)return!0;var v=n.current||o;return function(e,t,r,n){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=o*n,i=r.target,s=t.contains(i),u=!1,l=a>0,c=0,d=0;do{if(!i)break;var f=If(e,i),p=f[0],h=f[1]-f[2]-o*p;(p||h)&&Mf(e,i)&&(c+=h,d+=p);var v=i.parentNode;i=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!s&&i!==document.body||s&&(t.contains(i)||t===i));return(l&&Math.abs(c)<1||!l&&Math.abs(d)<1)&&(u=!0),u}(v,t,e,"h"===v?u:l)},[]),l=s.useCallback(function(e){var r=e;if(Uf.length&&Uf[Uf.length-1]===a){var n="deltaY"in r?Lf(r):$f(r),o=t.current.filter(function(e){return e.name===r.type&&(e.target===r.target||r.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,n)})[0];if(o&&o.should)r.cancelable&&r.preventDefault();else if(!o){var s=(i.current.shards||[]).map(zf).filter(Boolean).filter(function(e){return e.contains(r.target)});(s.length>0?u(r,s[0]):!i.current.noIsolation)&&r.cancelable&&r.preventDefault()}}},[]),c=s.useCallback(function(e,r,n,o){var a={name:e,delta:r,target:n,should:o,shadowParent:qf(n)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=s.useCallback(function(e){r.current=$f(e),n.current=void 0},[]),p=s.useCallback(function(t){c(t.type,Lf(t),t.target,u(t,e.lockRef.current))},[]),h=s.useCallback(function(t){c(t.type,$f(t),t.target,u(t,e.lockRef.current))},[]);s.useEffect(function(){return Uf.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Nf),document.addEventListener("touchmove",l,Nf),document.addEventListener("touchstart",d,Nf),function(){Uf=Uf.filter(function(e){return e!==a}),document.removeEventListener("wheel",l,Nf),document.removeEventListener("touchmove",l,Nf),document.removeEventListener("touchstart",d,Nf)}},[]);var v=e.removeScrollBar,m=e.inert;return s.createElement(s.Fragment,null,m?s.createElement(a,{styles:Wf(o)}):null,v?s.createElement(Ac,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}),Hf=s.forwardRef(function(e,t){return s.createElement(Tf,c({},e,{ref:t,sideCar:Kf}))});Hf.classNames=Tf.classNames;var Yf="Dialog",[Gf]=function(e,t=[]){let r=[];const n=()=>{const t=r.map(e=>s.createContext(e));return function(r){const n=r?.[e]||t;return s.useMemo(()=>({[`__scope${e}`]:{...r,[e]:n}}),[r,n])}};return n.scopeName=e,[function(t,n){const o=s.createContext(n),a=r.length;r=[...r,n];const i=t=>{const{scope:r,children:n,...i}=t,u=r?.[e]?.[a]||o,l=s.useMemo(()=>i,Object.values(i));return x.jsx(u.Provider,{value:l,children:n})};return i.displayName=t+"Provider",[i,function(r,i){const u=i?.[e]?.[a]||o,l=s.useContext(u);if(l)return l;if(void 0!==n)return n;throw new Error(`\`${r}\` must be used within \`${t}\``)}]},Xd(n,...t)]}(Yf),[Xf,Zf]=Gf(Yf),Jf="DialogTrigger";s.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Zf(Jf,r),a=Gd(t,o.triggerRef);return x.jsx(rf.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":yp(o.open),...n,ref:a,onClick:Kd(e.onClick,o.onOpenToggle)})}).displayName=Jf;var Qf="DialogPortal",[ep,tp]=Gf(Qf,{forceMount:void 0}),rp=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,a=Zf(Qf,t);return x.jsx(ep,{scope:t,forceMount:r,children:s.Children.map(n,e=>x.jsx(Af,{present:r||a.open,children:x.jsx(Ef,{asChild:!0,container:o,children:e})}))})};rp.displayName=Qf;var np="DialogOverlay",op=s.forwardRef((e,t)=>{const r=tp(np,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=Zf(np,e.__scopeDialog);return a.modal?x.jsx(Af,{present:n||a.open,children:x.jsx(ip,{...o,ref:t})}):null});op.displayName=np;var ap=Jd("DialogOverlay.RemoveScroll"),ip=s.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Zf(np,r);return x.jsx(Hf,{as:ap,allowPinchZoom:!0,shards:[o.contentRef],children:x.jsx(rf.div,{"data-state":yp(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),sp="DialogContent",up=s.forwardRef((e,t)=>{const r=tp(sp,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=Zf(sp,e.__scopeDialog);return x.jsx(Af,{present:n||a.open,children:a.modal?x.jsx(lp,{...o,ref:t}):x.jsx(cp,{...o,ref:t})})});up.displayName=sp;var lp=s.forwardRef((e,t)=>{const r=Zf(sp,e.__scopeDialog),n=s.useRef(null),o=Gd(t,r.contentRef,n);return s.useEffect(()=>{const e=n.current;if(e)return Kc(e)},[]),x.jsx(dp,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Kd(e.onCloseAutoFocus,e=>{e.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:Kd(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:Kd(e.onFocusOutside,e=>e.preventDefault())})}),cp=s.forwardRef((e,t)=>{const r=Zf(sp,e.__scopeDialog),n=s.useRef(!1),o=s.useRef(!1);return x.jsx(dp,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||r.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const a=t.target,i=r.triggerRef.current?.contains(a);i&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),dp=s.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,u=Zf(sp,r),l=s.useRef(null),c=Gd(t,l);return s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Of()),document.body.insertAdjacentElement("beforeend",e[1]??Of()),kf++,()=>{1===kf&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),kf--}},[]),x.jsxs(x.Fragment,{children:[x.jsx(gf,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:x.jsx(cf,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":yp(u.open),...i,ref:c,onDismiss:()=>u.onOpenChange(!1)})}),x.jsxs(x.Fragment,{children:[x.jsx(wp,{titleId:u.titleId}),x.jsx(xp,{contentRef:l,descriptionId:u.descriptionId})]})]})}),fp="DialogTitle",pp=s.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Zf(fp,r);return x.jsx(rf.h2,{id:o.titleId,...n,ref:t})});pp.displayName=fp;var hp="DialogDescription",vp=s.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Zf(hp,r);return x.jsx(rf.p,{id:o.descriptionId,...n,ref:t})});vp.displayName=hp;var mp="DialogClose",gp=s.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Zf(mp,r);return x.jsx(rf.button,{type:"button",...n,ref:t,onClick:Kd(e.onClick,()=>o.onOpenChange(!1))})});function yp(e){return e?"open":"closed"}gp.displayName=mp;var bp="DialogTitleWarning",[Dp,Cp]=function(e,t){const r=s.createContext(t),n=e=>{const{children:t,...n}=e,o=s.useMemo(()=>n,Object.values(n));return x.jsx(r.Provider,{value:o,children:t})};return n.displayName=e+"Provider",[n,function(n){const o=s.useContext(r);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${n}\` must be used within \`${e}\``)}]}(bp,{contentName:sp,titleName:fp,docsSlug:"dialog"}),wp=({titleId:e})=>{const t=Cp(bp),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{if(e){document.getElementById(e)||console.error(r)}},[r,e]),null},xp=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Cp("DialogDescriptionWarning").contentName}}.`;return s.useEffect(()=>{const n=e.current?.getAttribute("aria-describedby");if(t&&n){document.getElementById(t)||console.warn(r)}},[r,e,t]),null},Ep=rp,Ap=op,Bp=up,kp=pp,Op=vp,Fp=gp,Sp={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Tp=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Pp=((e,r)=>{const n=t.forwardRef(({color:n="currentColor",size:o=24,strokeWidth:a=2,absoluteStrokeWidth:i,children:s,...u},l)=>t.createElement("svg",{ref:l,...Sp,width:o,height:o,stroke:n,strokeWidth:i?24*Number(a)/Number(o):a,className:`lucide lucide-${Tp(e)}`,...u},[...r.map(([e,r])=>t.createElement(e,r)),...(Array.isArray(s)?s:[s])||[]]));return n.displayName=`${e}`,n})("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),jp=e=>{var{className:t,children:r}=e,n=d(e,["className","children"]);return x.jsx(Ep,Object.assign({},n,{children:x.jsx("div",{className:ys(t),children:r})}))};jp.displayName=Ep.displayName;const Np=s.forwardRef((e,t)=>{var{className:r}=e,n=d(e,["className"]);return x.jsx(Ap,Object.assign({ref:t,className:ys("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",r)},n))});Np.displayName=Ap.displayName;s.forwardRef((e,t)=>{var{className:r,children:n}=e,o=d(e,["className","children"]);return x.jsxs(jp,{children:[x.jsx(Np,{}),x.jsxs(Bp,Object.assign({ref:t,className:ys("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",r)},o,{children:[n,x.jsxs(Fp,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[x.jsx(Pp,{className:"h-4 w-4"}),x.jsx("span",{className:"sr-only",children:"Close"})]})]}))]})}).displayName=Bp.displayName;s.forwardRef((e,t)=>{var{className:r}=e,n=d(e,["className"]);return x.jsx(kp,Object.assign({ref:t,className:ys("text-lg font-semibold leading-none tracking-tight",r)},n))}).displayName=kp.displayName;s.forwardRef((e,t)=>{var{className:r}=e,n=d(e,["className"]);return x.jsx(Op,Object.assign({ref:t,className:ys("text-sm text-muted-foreground",r)},n))}).displayName=Op.displayName;const Rp=s.forwardRef((e,t)=>{var{className:r}=e,n=d(e,["className"]);return x.jsx(Rd,Object.assign({ref:t,className:ys("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",r)},n))});Rp.displayName=Rd.displayName;const _p=s.forwardRef((e,t)=>{var{className:r}=e,n=d(e,["className"]);return x.jsx("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:x.jsx(Rd.Input,Object.assign({ref:t,className:ys("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",r)},n))})});_p.displayName=Rd.Input.displayName;const Mp=s.forwardRef((e,t)=>{var{className:r}=e,n=d(e,["className"]);return x.jsx(Rd.List,Object.assign({ref:t,className:ys("max-h-[300px] overflow-y-auto overflow-x-hidden pb-2",r)},n))});Mp.displayName=Rd.List.displayName;const Ip=s.forwardRef((e,t)=>x.jsx(Rd.Empty,Object.assign({ref:t,className:"py-6 text-center text-sm"},e)));Ip.displayName=Rd.Empty.displayName;const $p=s.forwardRef((e,t)=>{var{className:r}=e,n=d(e,["className"]);return x.jsx(Rd.Group,Object.assign({ref:t,className:ys("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",r)},n))});$p.displayName=Rd.Group.displayName;const Lp=s.forwardRef((e,t)=>{var{className:r}=e,n=d(e,["className"]);return x.jsx(Rd.Separator,Object.assign({ref:t,className:ys("-mx-1 h-px bg-border",r)},n))});Lp.displayName=Rd.Separator.displayName;const zp=s.forwardRef((e,t)=>{var{className:r}=e,n=d(e,["className"]);return x.jsx(Rd.Item,Object.assign({ref:t,className:ys("relative flex cursor-default select-none items-center rounded-sm text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r)},n))});function Wp(e){const[r,n]=t.useState("");return x.jsxs(Rp,{className:"rounded-lg border shadow-md",value:r,onValueChange:e=>{n(e)},filter:(t,r)=>""===e.searchTerm||t.startsWith(e.searchTerm)?1:0,children:[x.jsx(_p,{value:e.searchTerm,className:"rounded-t-lg hidden",placeholder:"Search for a command..."}),x.jsxs(Mp,{children:[x.jsx(Ip,{children:"No results found."}),x.jsx($p,{heading:"Available resources",children:e.suggestedFiles.map(t=>x.jsx(zp,{value:t.name,onSelect:r=>{e.onSelectedFile(t)},children:x.jsxs("div",{className:" px-3 flex flex-row gap-1 items-center",children:[x.jsx(Vp,{width:"20px",height:"20px",children:x.jsx("img",{src:t.iconImageUri,alt:t.sourceApplication,className:"w-full h-full"})}),t.name]})},`word-${t.sourceApplication}.${t.name}`))}),x.jsx(Lp,{})]})]})}function Vp({children:e,width:t,height:r}){return x.jsx("div",{className:"flex items-center justify-center",style:{width:t,height:r},children:e})}zp.displayName=Rd.Item.displayName;var Up=Symbol.for("react.lazy"),qp=s[" use ".trim().toString()];function Kp(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===Up&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function Hp(e){const t=Gp(e),r=s.forwardRef((e,r)=>{let{children:n,...o}=e;Kp(n)&&"function"==typeof qp&&(n=qp(n._payload));const a=s.Children.toArray(n),i=a.find(Zp);if(i){const e=i.props.children,n=a.map(t=>t===i?s.Children.count(e)>1?s.Children.only(null):s.isValidElement(e)?e.props.children:null:t);return x.jsx(t,{...o,ref:r,children:s.isValidElement(e)?s.cloneElement(e,void 0,n):null})}return x.jsx(t,{...o,ref:r,children:n})});return r.displayName=`${e}.Slot`,r}var Yp=Hp("Slot");function Gp(e){const t=s.forwardRef((e,t)=>{let{children:r,...n}=e;if(Kp(r)&&"function"==typeof qp&&(r=qp(r._payload)),s.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r),o=function(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...a}:"className"===n&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==s.Fragment&&(o.ref=t?Yd(t,e):e),s.cloneElement(r,o)}return s.Children.count(r)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Xp=Symbol("radix.slottable");function Zp(e){return s.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Xp}const Jp=e=>"boolean"==typeof e?"".concat(e):0===e?"0":e,Qp=gs,eh=(e,t)=>r=>{var n;if(null==(null==t?void 0:t.variants))return Qp(e,null==r?void 0:r.class,null==r?void 0:r.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(e=>{const t=null==r?void 0:r[e],n=null==a?void 0:a[e];if(null===t)return null;const i=Jp(t)||Jp(n);return o[e][i]}),s=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{}),u=null==t||null===(n=t.compoundVariants)||void 0===n?void 0:n.reduce((e,t)=>{let{class:r,className:n,...o}=t;return Object.entries(o).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...a,...s}[t]):{...a,...s}[t]===r})?[...e,r,n]:e},[]);return Qp(e,i,u,null==r?void 0:r.class,null==r?void 0:r.className)},th=eh("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),rh=s.forwardRef((e,t)=>{var{className:r,variant:n,size:o,asChild:a=!1}=e,i=d(e,["className","variant","size","asChild"]);const s=a?Yp:"button";return x.jsx(s,Object.assign({className:ys(th({variant:n,size:o,className:r})),ref:t},i))});rh.displayName="Button";var nh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const r=Hp(`Primitive.${t}`),n=s.forwardRef((e,n)=>{const{asChild:o,...a}=e,i=o?r:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),x.jsx(i,{...a,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),oh=s.forwardRef((e,t)=>x.jsx(nh.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));oh.displayName="Label";var ah=oh;const ih=eh("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),sh=s.forwardRef((e,t)=>{var{className:r}=e,n=d(e,["className"]);return x.jsx(ah,Object.assign({ref:t,className:ys(ih(),r)},n))});function uh(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}sh.displayName=ah.displayName;var lh,ch={exports:{}},dh={exports:{}},fh={};var ph,hh,vh,mh,gh,yh,bh,Dh,Ch,wh,xh,Eh,Ah,Bh,kh,Oh={};
|
|
27
|
+
& > * + * {
|
|
28
|
+
margin-left: 15px;
|
|
29
|
+
}
|
|
30
|
+
`)}))}),il=({children:e})=>"object"==typeof document?r.createPortal(e,document.body):null;t.forwardRef((e,t)=>{var{className:r}=e,n=d(e,["className"]);return x.jsx(al,Object.assign({},n,{ref:t,className:nl(r,ol`
|
|
31
|
+
position: relative;
|
|
32
|
+
padding: 1px 18px 17px;
|
|
33
|
+
margin: 0 -20px;
|
|
34
|
+
border-bottom: 2px solid #eee;
|
|
35
|
+
margin-bottom: 20px;
|
|
36
|
+
`)}))});const sl=(e,r)=>{t.useEffect(()=>{if(null!==e.current){e.current.style.height="0px";const t=e.current.scrollHeight;e.current.style.height=t+"px"}},[e,r])};var ul=.999,ll=/[\\\/_+.#"@\[\(\{&]/,cl=/[\\\/_+.#"@\[\(\{&]/g,dl=/[\s-]/,fl=/[\s-]/g;function pl(e,t,r,n,o,a,i){if(a===t.length)return o===e.length?1:.99;var s=`${o},${a}`;if(void 0!==i[s])return i[s];for(var u,l,c,d,f=n.charAt(a),p=r.indexOf(f,o),h=0;p>=0;)(u=pl(e,t,r,n,p+1,a+1,i))>h&&(p===o?u*=1:ll.test(e.charAt(p-1))?(u*=.8,(c=e.slice(o,p-1).match(cl))&&o>0&&(u*=Math.pow(ul,c.length))):dl.test(e.charAt(p-1))?(u*=.9,(d=e.slice(o,p-1).match(fl))&&o>0&&(u*=Math.pow(ul,d.length))):(u*=.17,o>0&&(u*=Math.pow(ul,p-o))),e.charAt(p)!==t.charAt(a)&&(u*=.9999)),(u<.1&&r.charAt(p-1)===n.charAt(a+1)||n.charAt(a+1)===n.charAt(a)&&r.charAt(p-1)!==n.charAt(a))&&(.1*(l=pl(e,t,r,n,p+1,a+2,i))>u&&(u=.1*l)),u>h&&(h=u),p=r.indexOf(f,p+1);return i[s]=h,h}function hl(e){return e.toLowerCase().replace(fl," ")}function vl(e,t){return pl(e,t,hl(e),hl(t),0,0,{})}function ml(){return ml=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ml.apply(null,arguments)}function gl(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(null==e||e(n),!1===r||!n.defaultPrevented)return null==t?void 0:t(n)}}function yl(...e){return t=>e.forEach(e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t))}function bl(...e){return t.useCallback(yl(...e),e)}function Dl(...e){const r=e[0];if(1===e.length)return r;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const o=n.reduce((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]}),{});return t.useMemo(()=>({[`__scope${r.scopeName}`]:o}),[o])}};return n.scopeName=r.scopeName,n}const Cl=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?t.useLayoutEffect:()=>{},wl=s["useId".toString()]||(()=>{});let xl=0;function El(e){const[t,r]=s.useState(wl());return Cl(()=>{r(e=>null!=e?e:String(xl++))},[e]),e||(t?`radix-${t}`:"")}function Al(e){const r=t.useRef(e);return t.useEffect(()=>{r.current=e}),t.useMemo(()=>(...e)=>{var t;return null===(t=r.current)||void 0===t?void 0:t.call(r,...e)},[])}function Bl({prop:e,defaultProp:r,onChange:n=()=>{}}){const[o,a]=function({defaultProp:e,onChange:r}){const n=t.useState(e),[o]=n,a=t.useRef(o),i=Al(r);return t.useEffect(()=>{a.current!==o&&(i(o),a.current=o)},[o,a,i]),n}({defaultProp:r,onChange:n}),i=void 0!==e,s=i?e:o,u=Al(n);return[s,t.useCallback(t=>{if(i){const r="function"==typeof t?t(e):t;r!==e&&u(r)}else a(t)},[i,e,a,u])]}const kl=t.forwardRef((e,r)=>{const{children:n,...o}=e,a=t.Children.toArray(n),i=a.find(Sl);if(i){const e=i.props.children,n=a.map(r=>r===i?t.Children.count(e)>1?t.Children.only(null):t.isValidElement(e)?e.props.children:null:r);return t.createElement(Ol,ml({},o,{ref:r}),t.isValidElement(e)?t.cloneElement(e,void 0,n):null)}return t.createElement(Ol,ml({},o,{ref:r}),n)});kl.displayName="Slot";const Ol=t.forwardRef((e,r)=>{const{children:n,...o}=e;return t.isValidElement(n)?t.cloneElement(n,{...Tl(o,n.props),ref:yl(r,n.ref)}):t.Children.count(n)>1?t.Children.only(null):null});Ol.displayName="SlotClone";const Fl=({children:e})=>t.createElement(t.Fragment,null,e);function Sl(e){return t.isValidElement(e)&&e.type===Fl}function Tl(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?r[n]=(...e)=>{null==a||a(...e),null==o||o(...e)}:"style"===n?r[n]={...o,...a}:"className"===n&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}const Pl=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"].reduce((e,r)=>{const n=t.forwardRef((e,n)=>{const{asChild:o,...a}=e,i=o?kl:r;return t.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),t.createElement(i,ml({},a,{ref:n}))});return n.displayName=`Primitive.${r}`,{...e,[r]:n}},{});const jl="dismissableLayer.update",Nl="dismissableLayer.pointerDownOutside",Rl="dismissableLayer.focusOutside";let _l;const Ml=t.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Il=t.forwardRef((e,r)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:s,onDismiss:u,...l}=e,c=t.useContext(Ml),[d,f]=t.useState(null),[,p]=t.useState({}),h=bl(r,e=>f(e)),v=Array.from(c.layers),[m]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),g=v.indexOf(m),y=d?v.indexOf(d):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,D=y>=g,C=function(e){const r=Al(e),n=t.useRef(!1),o=t.useRef(()=>{});return t.useEffect(()=>{const e=e=>{if(e.target&&!n.current){const t={originalEvent:e};function a(){Ll(Nl,r,t,{discrete:!0})}"touch"===e.pointerType?(document.removeEventListener("click",o.current),o.current=a,document.addEventListener("click",o.current,{once:!0})):a()}n.current=!1},t=window.setTimeout(()=>{document.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(t),document.removeEventListener("pointerdown",e),document.removeEventListener("click",o.current)}},[r]),{onPointerDownCapture:()=>n.current=!0}}(e=>{const t=e.target,r=[...c.branches].some(e=>e.contains(t));D&&!r&&(null==a||a(e),null==s||s(e),e.defaultPrevented||null==u||u())}),w=function(e){const r=Al(e),n=t.useRef(!1);return t.useEffect(()=>{const e=e=>{if(e.target&&!n.current){Ll(Rl,r,{originalEvent:e},{discrete:!1})}};return document.addEventListener("focusin",e),()=>document.removeEventListener("focusin",e)},[r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}(e=>{const t=e.target;[...c.branches].some(e=>e.contains(t))||(null==i||i(e),null==s||s(e),e.defaultPrevented||null==u||u())});return function(e){const r=Al(e);t.useEffect(()=>{const e=e=>{"Escape"===e.key&&r(e)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[r])}(e=>{y===c.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))}),t.useEffect(()=>{if(d)return n&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(_l=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),$l(),()=>{n&&1===c.layersWithOutsidePointerEventsDisabled.size&&(document.body.style.pointerEvents=_l)}},[d,n,c]),t.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),$l())},[d,c]),t.useEffect(()=>{const e=()=>p({});return document.addEventListener(jl,e),()=>document.removeEventListener(jl,e)},[]),t.createElement(Pl.div,ml({},l,{ref:h,style:{pointerEvents:b?D?"auto":"none":void 0,...e.style},onFocusCapture:gl(e.onFocusCapture,w.onFocusCapture),onBlurCapture:gl(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:gl(e.onPointerDownCapture,C.onPointerDownCapture)}))});function $l(){const e=new CustomEvent(jl);document.dispatchEvent(e)}function Ll(e,t,n,{discrete:o}){const a=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),o?function(e,t){e&&r.flushSync(()=>e.dispatchEvent(t))}(a,i):a.dispatchEvent(i)}const zl="focusScope.autoFocusOnMount",Wl="focusScope.autoFocusOnUnmount",Vl={bubbles:!1,cancelable:!0},Ul=t.forwardRef((e,r)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...s}=e,[u,l]=t.useState(null),c=Al(a),d=Al(i),f=t.useRef(null),p=bl(r,e=>l(e)),h=t.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;t.useEffect(()=>{if(o){function e(e){if(h.paused||!u)return;const t=e.target;u.contains(t)?f.current=t:Yl(f.current,{select:!0})}function t(e){!h.paused&&u&&(u.contains(e.relatedTarget)||Yl(f.current,{select:!0}))}return document.addEventListener("focusin",e),document.addEventListener("focusout",t),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t)}}},[o,u,h.paused]),t.useEffect(()=>{if(u){Gl.add(h);const t=document.activeElement;if(!u.contains(t)){const r=new CustomEvent(zl,Vl);u.addEventListener(zl,c),u.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Yl(n,{select:t}),document.activeElement!==r)return}((e=ql(u),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&Yl(u))}return()=>{u.removeEventListener(zl,c),setTimeout(()=>{const e=new CustomEvent(Wl,Vl);u.addEventListener(Wl,d),u.dispatchEvent(e),e.defaultPrevented||Yl(null!=t?t:document.body,{select:!0}),u.removeEventListener(Wl,d),Gl.remove(h)},0)}}var e},[u,c,d,h]);const v=t.useCallback(e=>{if(!n&&!o)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){const t=e.currentTarget,[o,a]=function(e){const t=ql(e),r=Kl(t,e),n=Kl(t.reverse(),e);return[r,n]}(t);o&&a?e.shiftKey||r!==a?e.shiftKey&&r===o&&(e.preventDefault(),n&&Yl(a,{select:!0})):(e.preventDefault(),n&&Yl(o,{select:!0})):r===t&&e.preventDefault()}},[n,o,h.paused]);return t.createElement(Pl.div,ml({tabIndex:-1},s,{ref:p,onKeyDown:v}))});function ql(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Kl(e,t){for(const r of e)if(!Hl(r,{upTo:t}))return r}function Hl(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Yl(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const Gl=function(){let e=[];return{add(t){const r=e[0];t!==r&&(null==r||r.pause()),e=Xl(e,t),e.unshift(t)},remove(t){var r;e=Xl(e,t),null===(r=e[0])||void 0===r||r.resume()}}}();function Xl(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}const Zl=t.forwardRef((e,n)=>{var o;const{container:a=(null===globalThis||void 0===globalThis||null===(o=globalThis.document)||void 0===o?void 0:o.body),...i}=e;return a?r.createPortal(t.createElement(Pl.div,ml({},i,{ref:n})),a):null});const Jl=e=>{const{present:n,children:o}=e,a=function(e){const[n,o]=t.useState(),a=t.useRef({}),i=t.useRef(e),s=t.useRef("none"),u=e?"mounted":"unmounted",[l,c]=function(e,r){return t.useReducer((e,t)=>{const n=r[e][t];return null!=n?n:e},e)}(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return t.useEffect(()=>{const e=Ql(a.current);s.current="mounted"===l?e:"none"},[l]),Cl(()=>{const t=a.current,r=i.current;if(r!==e){const n=s.current,o=Ql(t);if(e)c("MOUNT");else if("none"===o||"none"===(null==t?void 0:t.display))c("UNMOUNT");else{c(r&&n!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=e}},[e,c]),Cl(()=>{if(n){const e=e=>{const t=Ql(a.current).includes(e.animationName);e.target===n&&t&&r.flushSync(()=>c("ANIMATION_END"))},t=e=>{e.target===n&&(s.current=Ql(a.current))};return n.addEventListener("animationstart",t),n.addEventListener("animationcancel",e),n.addEventListener("animationend",e),()=>{n.removeEventListener("animationstart",t),n.removeEventListener("animationcancel",e),n.removeEventListener("animationend",e)}}c("ANIMATION_END")},[n,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:t.useCallback(e=>{e&&(a.current=getComputedStyle(e)),o(e)},[])}}(n),i="function"==typeof o?o({present:a.isPresent}):t.Children.only(o),s=bl(a.ref,i.ref);return"function"==typeof o||a.isPresent?t.cloneElement(i,{ref:s}):null};function Ql(e){return(null==e?void 0:e.animationName)||"none"}Jl.displayName="Presence";let ec=0;function tc(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var rc="right-scroll-bar-position",nc="width-before-scroll-bar";function oc(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var ac="undefined"!=typeof window?s.useLayoutEffect:s.useEffect,ic=new WeakMap;function sc(e,r){var n,o,a,i=(n=null,o=function(t){return e.forEach(function(e){return oc(e,t)})},a=t.useState(function(){return{value:n,callback:o,facade:{get current(){return a.value},set current(e){var t=a.value;t!==e&&(a.value=e,a.callback(e,t))}}}})[0],a.callback=o,a.facade);return ac(function(){var t=ic.get(i);if(t){var r=new Set(t),n=new Set(e),o=i.current;r.forEach(function(e){n.has(e)||oc(e,null)}),n.forEach(function(e){r.has(e)||oc(e,o)})}ic.set(i,e)},[e]),i}function uc(e){return e}function lc(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=uc);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(e){var o=t(e,n);return r.push(o),function(){r=r.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(n=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){n=!0;var t=[];if(r.length){var o=r;r=[],o.forEach(e),t=r}var a=function(){var r=t;t=[],r.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),r={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),r}}}};return o}(null);return t.options=c({async:!0,ssr:!1},e),t}var cc=function(e){var t=e.sideCar,r=d(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return s.createElement(n,c({},r))};function dc(e,t){return e.useMedium(t),cc}cc.isSideCarExport=!0;var fc=lc(),pc=function(){},hc=s.forwardRef(function(e,t){var r=s.useRef(null),n=s.useState({onScrollCapture:pc,onWheelCapture:pc,onTouchMoveCapture:pc}),o=n[0],a=n[1],i=e.forwardProps,u=e.children,l=e.className,f=e.removeScrollBar,p=e.enabled,h=e.shards,v=e.sideCar,m=e.noIsolation,g=e.inert,y=e.allowPinchZoom,b=e.as,D=void 0===b?"div":b,C=d(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=v,x=sc([r,t]),E=c(c({},C),o);return s.createElement(s.Fragment,null,p&&s.createElement(w,{sideCar:fc,removeScrollBar:f,shards:h,noIsolation:m,inert:g,setCallbacks:a,allowPinchZoom:!!y,lockRef:r}),i?s.cloneElement(s.Children.only(u),c(c({},E),{ref:x})):s.createElement(D,c({},E,{className:l,ref:x}),u))});hc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},hc.classNames={fullWidth:nc,zeroRight:rc};function vc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var mc=function(){var e=0,t=null;return{add:function(r){var n;0==e&&(t=vc())&&(!function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}(t,r),n=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(n)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},gc=function(){var e,t=(e=mc(),function(t,r){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])});return function(e){var r=e.styles,n=e.dynamic;return t(r,n),null}},yc={left:0,top:0,right:0,gap:0},bc=function(e){return parseInt(e||"",10)||0},Dc=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return yc;var t=function(e){var t=window.getComputedStyle(document.body),r=t["padding"===e?"paddingLeft":"marginLeft"],n=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[bc(r),bc(n),bc(o)]}(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Cc=gc(),wc="data-scroll-locked",xc=function(e,t,r,n){var o=e.left,a=e.top,i=e.right,s=e.gap;return void 0===r&&(r="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(n,";\n padding-right: ").concat(s,"px ").concat(n,";\n }\n body[").concat(wc,"] {\n overflow: hidden ").concat(n,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(n,";"),"margin"===r&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(n,";\n "),"padding"===r&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),"\n }\n \n .").concat(rc," {\n right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(nc," {\n margin-right: ").concat(s,"px ").concat(n,";\n }\n \n .").concat(rc," .").concat(rc," {\n right: 0 ").concat(n,";\n }\n \n .").concat(nc," .").concat(nc," {\n margin-right: 0 ").concat(n,";\n }\n \n body[").concat(wc,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},Ec=function(){var e=parseInt(document.body.getAttribute(wc)||"0",10);return isFinite(e)?e:0},Ac=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=void 0===n?"margin":n;s.useEffect(function(){return document.body.setAttribute(wc,(Ec()+1).toString()),function(){var e=Ec()-1;e<=0?document.body.removeAttribute(wc):document.body.setAttribute(wc,e.toString())}},[]);var a=s.useMemo(function(){return Dc(o)},[o]);return s.createElement(Cc,{styles:xc(a,!t,o,r?"":"!important")})},Bc=!1;if("undefined"!=typeof window)try{var kc=Object.defineProperty({},"passive",{get:function(){return Bc=!0,!0}});window.addEventListener("test",kc,kc),window.removeEventListener("test",kc,kc)}catch(e){Bc=!1}var Oc=!!Bc&&{passive:!1},Fc=function(e,t){var r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),Sc(e,r)){var n=Tc(e,r);if(n[1]>n[2])return!0}r=r.parentNode}while(r&&r!==document.body);return!1},Sc=function(e,t){return"v"===e?function(e){var t=window.getComputedStyle(e);return"hidden"!==t.overflowY&&!(t.overflowY===t.overflowX&&"visible"===t.overflowY)}(t):function(e){var t=window.getComputedStyle(e);return"hidden"!==t.overflowX&&!(t.overflowY===t.overflowX&&"visible"===t.overflowX)}(t)},Tc=function(e,t){return"v"===e?[(r=t).scrollTop,r.scrollHeight,r.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var r},Pc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jc=function(e){return[e.deltaX,e.deltaY]},Nc=function(e){return e&&"current"in e?e.current:e},Rc=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},_c=0,Mc=[];var Ic=dc(fc,function(e){var t=s.useRef([]),r=s.useRef([0,0]),n=s.useRef(),o=s.useState(_c++)[0],a=s.useState(function(){return gc()})[0],i=s.useRef(e);s.useEffect(function(){i.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=f([e.lockRef.current],(e.shards||[]).map(Nc),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=s.useCallback(function(e,t){if("touches"in e&&2===e.touches.length)return!i.current.allowPinchZoom;var o,a=Pc(e),s=r.current,u="deltaX"in e?e.deltaX:s[0]-a[0],l="deltaY"in e?e.deltaY:s[1]-a[1],c=e.target,d=Math.abs(u)>Math.abs(l)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=Fc(d,c);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=Fc(d,c)),!f)return!1;if(!n.current&&"changedTouches"in e&&(u||l)&&(n.current=o),!o)return!0;var p=n.current||o;return function(e,t,r,n){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=o*n,i=r.target,s=t.contains(i),u=!1,l=a>0,c=0,d=0;do{var f=Tc(e,i),p=f[0],h=f[1]-f[2]-o*p;(p||h)&&Sc(e,i)&&(c+=h,d+=p),i=i.parentNode}while(!s&&i!==document.body||s&&(t.contains(i)||t===i));return l&&0===c?u=!0:l||0!==d||(u=!0),u}(p,t,e,"h"===p?u:l)},[]),l=s.useCallback(function(e){var r=e;if(Mc.length&&Mc[Mc.length-1]===a){var n="deltaY"in r?jc(r):Pc(r),o=t.current.filter(function(e){return e.name===r.type&&e.target===r.target&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,n)})[0];if(o&&o.should)r.preventDefault();else if(!o){var s=(i.current.shards||[]).map(Nc).filter(Boolean).filter(function(e){return e.contains(r.target)});(s.length>0?u(r,s[0]):!i.current.noIsolation)&&r.preventDefault()}}},[]),c=s.useCallback(function(e,r,n,o){var a={name:e,delta:r,target:n,should:o};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=s.useCallback(function(e){r.current=Pc(e),n.current=void 0},[]),p=s.useCallback(function(t){c(t.type,jc(t),t.target,u(t,e.lockRef.current))},[]),h=s.useCallback(function(t){c(t.type,Pc(t),t.target,u(t,e.lockRef.current))},[]);s.useEffect(function(){return Mc.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Oc),document.addEventListener("touchmove",l,Oc),document.addEventListener("touchstart",d,Oc),function(){Mc=Mc.filter(function(e){return e!==a}),document.removeEventListener("wheel",l,Oc),document.removeEventListener("touchmove",l,Oc),document.removeEventListener("touchstart",d,Oc)}},[]);var v=e.removeScrollBar,m=e.inert;return s.createElement(s.Fragment,null,m?s.createElement(a,{styles:Rc(o)}):null,v?s.createElement(Ac,{gapMode:"margin"}):null)}),$c=s.forwardRef(function(e,t){return s.createElement(hc,c({},e,{ref:t,sideCar:Ic}))});$c.classNames=hc.classNames;var Lc=new WeakMap,zc=new WeakMap,Wc={},Vc=0,Uc=function(e){return e&&(e.host||Uc(e.parentNode))},qc=function(e,t,r,n){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var r=Uc(t);return r&&e.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);Wc[r]||(Wc[r]=new WeakMap);var a=Wc[r],i=[],s=new Set,u=new Set(o),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};o.forEach(l);var c=function(e){e&&!u.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))c(e);else try{var t=e.getAttribute(n),o=null!==t&&"false"!==t,u=(Lc.get(e)||0)+1,l=(a.get(e)||0)+1;Lc.set(e,u),a.set(e,l),i.push(e),1===u&&o&&zc.set(e,!0),1===l&&e.setAttribute(r,"true"),o||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return c(t),s.clear(),Vc++,function(){i.forEach(function(e){var t=Lc.get(e)-1,o=a.get(e)-1;Lc.set(e,t),a.set(e,o),t||(zc.has(e)||e.removeAttribute(n),zc.delete(e)),o||e.removeAttribute(r)}),--Vc||(Lc=new WeakMap,Lc=new WeakMap,zc=new WeakMap,Wc={})}},Kc=function(e,t,r){void 0===r&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),qc(n,o,r,"aria-hidden")):function(){return null}};const Hc="Dialog",[Yc]=function(e,r=[]){let n=[];const o=()=>{const r=n.map(e=>t.createContext(e));return function(n){const o=(null==n?void 0:n[e])||r;return t.useMemo(()=>({[`__scope${e}`]:{...n,[e]:o}}),[n,o])}};return o.scopeName=e,[function(r,o){const a=t.createContext(o),i=n.length;function s(r){const{scope:n,children:o,...s}=r,u=(null==n?void 0:n[e][i])||a,l=t.useMemo(()=>s,Object.values(s));return t.createElement(u.Provider,{value:l},o)}return n=[...n,o],s.displayName=r+"Provider",[s,function(n,s){const u=(null==s?void 0:s[e][i])||a,l=t.useContext(u);if(l)return l;if(void 0!==o)return o;throw new Error(`\`${n}\` must be used within \`${r}\``)}]},Dl(o,...r)]}(Hc),[Gc,Xc]=Yc(Hc),Zc="DialogPortal",[Jc,Qc]=Yc(Zc,{forceMount:void 0}),ed="DialogOverlay",td=t.forwardRef((e,r)=>{const n=Qc(ed,e.__scopeDialog),{forceMount:o=n.forceMount,...a}=e,i=Xc(ed,e.__scopeDialog);return i.modal?t.createElement(Jl,{present:o||i.open},t.createElement(rd,ml({},a,{ref:r}))):null}),rd=t.forwardRef((e,r)=>{const{__scopeDialog:n,...o}=e,a=Xc(ed,n);return t.createElement($c,{as:kl,allowPinchZoom:!0,shards:[a.contentRef]},t.createElement(Pl.div,ml({"data-state":ld(a.open)},o,{ref:r,style:{pointerEvents:"auto",...o.style}})))}),nd="DialogContent",od=t.forwardRef((e,r)=>{const n=Qc(nd,e.__scopeDialog),{forceMount:o=n.forceMount,...a}=e,i=Xc(nd,e.__scopeDialog);return t.createElement(Jl,{present:o||i.open},i.modal?t.createElement(ad,ml({},a,{ref:r})):t.createElement(id,ml({},a,{ref:r})))}),ad=t.forwardRef((e,r)=>{const n=Xc(nd,e.__scopeDialog),o=t.useRef(null),a=bl(r,n.contentRef,o);return t.useEffect(()=>{const e=o.current;if(e)return Kc(e)},[]),t.createElement(sd,ml({},e,{ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:gl(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),null===(t=n.triggerRef.current)||void 0===t||t.focus()}),onPointerDownOutside:gl(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:gl(e.onFocusOutside,e=>e.preventDefault())}))}),id=t.forwardRef((e,r)=>{const n=Xc(nd,e.__scopeDialog),o=t.useRef(!1);return t.createElement(sd,ml({},e,{ref:r,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var r,a;(null===(r=e.onCloseAutoFocus)||void 0===r||r.call(e,t),t.defaultPrevented)||(o.current||null===(a=n.triggerRef.current)||void 0===a||a.focus(),t.preventDefault());o.current=!1},onInteractOutside:t=>{var r,a;null===(r=e.onInteractOutside)||void 0===r||r.call(e,t),t.defaultPrevented||(o.current=!0);const i=t.target;(null===(a=n.triggerRef.current)||void 0===a?void 0:a.contains(i))&&t.preventDefault()}}))}),sd=t.forwardRef((e,r)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,...s}=e,u=Xc(nd,n),l=bl(r,t.useRef(null));return t.useEffect(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=r[0])&&void 0!==e?e:tc()),document.body.insertAdjacentElement("beforeend",null!==(t=r[1])&&void 0!==t?t:tc()),ec++,()=>{1===ec&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),ec--}},[]),t.createElement(t.Fragment,null,t.createElement(Ul,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:a,onUnmountAutoFocus:i},t.createElement(Il,ml({role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":ld(u.open)},s,{ref:l,onDismiss:()=>u.onOpenChange(!1)}))),!1)}),ud="DialogTitle";function ld(e){return e?"open":"closed"}!function(e,r){const n=t.createContext(r);function o(e){const{children:r,...o}=e,a=t.useMemo(()=>o,Object.values(o));return t.createElement(n.Provider,{value:a},r)}o.displayName=e+"Provider"}("DialogTitleWarning",{contentName:nd,titleName:ud,docsSlug:"dialog"});const cd=e=>{const{__scopeDialog:r,children:n,open:o,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,u=t.useRef(null),l=t.useRef(null),[c=!1,d]=Bl({prop:o,defaultProp:a,onChange:i});return t.createElement(Gc,{scope:r,triggerRef:u,contentRef:l,contentId:El(),titleId:El(),descriptionId:El(),open:c,onOpenChange:d,onOpenToggle:t.useCallback(()=>d(e=>!e),[d]),modal:s},n)},dd=e=>{const{__scopeDialog:r,forceMount:n,children:o,container:a}=e,i=Xc(Zc,r);return t.createElement(Jc,{scope:r,forceMount:n},t.Children.map(o,e=>t.createElement(Jl,{present:n||i.open},t.createElement(Zl,{asChild:!0,container:a},e))))},fd=td,pd=od;var hd='[cmdk-group=""]',vd='[cmdk-group-items=""]',md='[cmdk-item=""]',gd=`${md}:not([aria-disabled="true"])`,yd="cmdk-item-select",bd="data-value",Dd=(e,t)=>vl(e,t),Cd=s.createContext(void 0),wd=()=>s.useContext(Cd),xd=s.createContext(void 0),Ed=()=>s.useContext(xd),Ad=s.createContext(void 0),Bd=s.forwardRef((e,t)=>{let r=s.useRef(null),n=Ld(()=>{var t,r,n;return{search:"",value:null!=(n=null!=(r=e.value)?r:null==(t=e.defaultValue)?void 0:t.toLowerCase())?n:"",filtered:{count:0,items:new Map,groups:new Set}}}),o=Ld(()=>new Set),a=Ld(()=>new Map),i=Ld(()=>new Map),u=Ld(()=>new Set),l=Id(e),{label:c,children:d,value:f,onValueChange:p,filter:h,shouldFilter:v,vimBindings:m=!0,...g}=e,y=s.useId(),b=s.useId(),D=s.useId(),C=Ud();$d(()=>{if(void 0!==f){let e=f.trim().toLowerCase();n.current.value=e,C(6,O),w.emit()}},[f]);let w=s.useMemo(()=>({subscribe:e=>(u.current.add(e),()=>u.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var o,a,i;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)k(),A(),C(1,B);else if("value"===e){if(void 0!==(null==(o=l.current)?void 0:o.value)){let e=null!=t?t:"";return void(null==(i=(a=l.current).onValueChange)||i.call(a,e))}r||C(5,O)}w.emit()}},emit:()=>{u.current.forEach(e=>e())}}),[]),x=s.useMemo(()=>({value:(e,t)=>{t!==i.current.get(e)&&(i.current.set(e,t),n.current.filtered.items.set(e,E(t)),C(2,()=>{A(),w.emit()}))},item:(e,t)=>(o.current.add(e),t&&(a.current.has(t)?a.current.get(t).add(e):a.current.set(t,new Set([e]))),C(3,()=>{k(),A(),n.current.value||B(),w.emit()}),()=>{i.current.delete(e),o.current.delete(e),n.current.filtered.items.delete(e);let t=F();C(4,()=>{k(),(null==t?void 0:t.getAttribute("id"))===e&&B(),w.emit()})}),group:e=>(a.current.has(e)||a.current.set(e,new Set),()=>{i.current.delete(e),a.current.delete(e)}),filter:()=>l.current.shouldFilter,label:c||e["aria-label"],commandRef:r,listId:y,inputId:D,labelId:b}),[]);function E(e){var t,r;let o=null!=(r=null==(t=l.current)?void 0:t.filter)?r:Dd;return e?o(e,n.current.search):0}function A(){if(!r.current||!n.current.search||!1===l.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(r=>{let n=a.current.get(r),o=0;n.forEach(t=>{let r=e.get(t);o=Math.max(r,o)}),t.push([r,o])});let o=r.current.querySelector('[cmdk-list-sizer=""]');S().sort((t,r)=>{var n,o;let a=t.getAttribute(bd),i=r.getAttribute(bd);return(null!=(n=e.get(i))?n:0)-(null!=(o=e.get(a))?o:0)}).forEach(e=>{let t=e.closest(vd);t?t.appendChild(e.parentElement===t?e:e.closest(`${vd} > *`)):o.appendChild(e.parentElement===o?e:e.closest(`${vd} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=r.current.querySelector(`${hd}[${bd}="${e[0]}"]`);null==t||t.parentElement.appendChild(t)})}function B(){let e=S().find(e=>!e.ariaDisabled),t=null==e?void 0:e.getAttribute(bd);w.setState("value",t||void 0)}function k(){if(!n.current.search||!1===l.current.shouldFilter)return void(n.current.filtered.count=o.current.size);n.current.filtered.groups=new Set;let e=0;for(let t of o.current){let r=E(i.current.get(t));n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of a.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function O(){var e,t,r;let n=F();n&&((null==(e=n.parentElement)?void 0:e.firstChild)===n&&(null==(r=null==(t=n.closest(hd))?void 0:t.querySelector('[cmdk-group-heading=""]'))||r.scrollIntoView({block:"nearest"})),n.scrollIntoView({block:"nearest"}))}function F(){var e;return null==(e=r.current)?void 0:e.querySelector(`${md}[aria-selected="true"]`)}function S(){return Array.from(r.current.querySelectorAll(gd))}function T(e){let t=S()[e];t&&w.setState("value",t.getAttribute(bd))}function P(e){var t;let r=F(),n=S(),o=n.findIndex(e=>e===r),a=n[o+e];null!=(t=l.current)&&t.loop&&(a=o+e<0?n[n.length-1]:o+e===n.length?n[0]:n[o+e]),a&&w.setState("value",a.getAttribute(bd))}function j(e){let t,r=F(),n=null==r?void 0:r.closest(hd);for(;n&&!t;)n=e>0?_d(n,hd):Md(n,hd),t=null==n?void 0:n.querySelector(gd);t?w.setState("value",t.getAttribute(bd)):P(e)}let N=()=>T(S().length-1),R=e=>{e.preventDefault(),e.metaKey?N():e.altKey?j(1):P(1)},_=e=>{e.preventDefault(),e.metaKey?T(0):e.altKey?j(-1):P(-1)};return s.createElement("div",{ref:zd([r,t]),...g,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=g.onKeyDown)||t.call(g,e),!e.defaultPrevented)switch(e.key){case"n":case"j":m&&e.ctrlKey&&R(e);break;case"ArrowDown":R(e);break;case"p":case"k":m&&e.ctrlKey&&_(e);break;case"ArrowUp":_(e);break;case"Home":e.preventDefault(),T(0);break;case"End":e.preventDefault(),N();break;case"Enter":if(!e.nativeEvent.isComposing){e.preventDefault();let t=F();if(t){let e=new Event(yd);t.dispatchEvent(e)}}}}},s.createElement("label",{"cmdk-label":"",htmlFor:x.inputId,id:x.labelId,style:qd},c),s.createElement(xd.Provider,{value:w},s.createElement(Cd.Provider,{value:x},d)))}),kd=s.forwardRef((e,t)=>{var r,n;let o=s.useId(),a=s.useRef(null),i=s.useContext(Ad),u=wd(),l=Id(e),c=null!=(n=null==(r=l.current)?void 0:r.forceMount)?n:null==i?void 0:i.forceMount;$d(()=>u.item(o,null==i?void 0:i.id),[]);let d=Vd(o,a,[e.value,e.children,a]),f=Ed(),p=Wd(e=>e.value&&e.value===d.current),h=Wd(e=>!(!c&&!1!==u.filter())||(!e.search||e.filtered.items.get(o)>0));function v(){var e,t;m(),null==(t=(e=l.current).onSelect)||t.call(e,d.current)}function m(){f.setState("value",d.current,!0)}if(s.useEffect(()=>{let t=a.current;if(t&&!e.disabled)return t.addEventListener(yd,v),()=>t.removeEventListener(yd,v)},[h,e.onSelect,e.disabled]),!h)return null;let{disabled:g,value:y,onSelect:b,forceMount:D,...C}=e;return s.createElement("div",{ref:zd([a,t]),...C,id:o,"cmdk-item":"",role:"option","aria-disabled":g||void 0,"aria-selected":p||void 0,"data-disabled":g||void 0,"data-selected":p||void 0,onPointerMove:g?void 0:m,onClick:g?void 0:v},e.children)}),Od=s.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:o,...a}=e,i=s.useId(),u=s.useRef(null),l=s.useRef(null),c=s.useId(),d=wd(),f=Wd(e=>!(!o&&!1!==d.filter())||(!e.search||e.filtered.groups.has(i)));$d(()=>d.group(i),[]),Vd(i,u,[e.value,e.heading,l]);let p=s.useMemo(()=>({id:i,forceMount:o}),[o]),h=s.createElement(Ad.Provider,{value:p},n);return s.createElement("div",{ref:zd([u,t]),...a,"cmdk-group":"",role:"presentation",hidden:!f||void 0},r&&s.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:c},r),s.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?c:void 0},h))}),Fd=s.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,o=s.useRef(null),a=Wd(e=>!e.search);return r||a?s.createElement("div",{ref:zd([o,t]),...n,"cmdk-separator":"",role:"separator"}):null}),Sd=s.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,o=null!=e.value,a=Ed(),i=Wd(e=>e.search),u=Wd(e=>e.value),l=wd(),c=s.useMemo(()=>{var e;let t=null==(e=l.commandRef.current)?void 0:e.querySelector(`${md}[${bd}="${u}"]`);return null==t?void 0:t.getAttribute("id")},[u,l.commandRef]);return s.useEffect(()=>{null!=e.value&&a.setState("search",e.value)},[e.value]),s.createElement("input",{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":c,id:l.inputId,type:"text",value:o?e.value:i,onChange:e=>{o||a.setState("search",e.target.value),null==r||r(e.target.value)}})}),Td=s.forwardRef((e,t)=>{let{children:r,...n}=e,o=s.useRef(null),a=s.useRef(null),i=wd();return s.useEffect(()=>{if(a.current&&o.current){let e,t=a.current,r=o.current,n=new ResizeObserver(()=>{e=requestAnimationFrame(()=>{let e=t.offsetHeight;r.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")})});return n.observe(t),()=>{cancelAnimationFrame(e),n.unobserve(t)}}},[]),s.createElement("div",{ref:zd([o,t]),...n,"cmdk-list":"",role:"listbox","aria-label":"Suggestions",id:i.listId,"aria-labelledby":i.inputId},s.createElement("div",{ref:a,"cmdk-list-sizer":""},r))}),Pd=s.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:o,contentClassName:a,container:i,...u}=e;return s.createElement(cd,{open:r,onOpenChange:n},s.createElement(dd,{container:i},s.createElement(fd,{"cmdk-overlay":"",className:o}),s.createElement(pd,{"aria-label":e.label,"cmdk-dialog":"",className:a},s.createElement(Bd,{ref:t,...u}))))}),jd=s.forwardRef((e,t)=>{let r=s.useRef(!0),n=Wd(e=>0===e.filtered.count);return s.useEffect(()=>{r.current=!1},[]),r.current||!n?null:s.createElement("div",{ref:t,...e,"cmdk-empty":"",role:"presentation"})}),Nd=s.forwardRef((e,t)=>{let{progress:r,children:n,...o}=e;return s.createElement("div",{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Loading..."},s.createElement("div",{"aria-hidden":!0},n))}),Rd=Object.assign(Bd,{List:Td,Item:kd,Input:Sd,Group:Od,Separator:Fd,Dialog:Pd,Empty:jd,Loading:Nd});function _d(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function Md(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function Id(e){let t=s.useRef(e);return $d(()=>{t.current=e}),t}var $d="undefined"==typeof window?s.useEffect:s.useLayoutEffect;function Ld(e){let t=s.useRef();return void 0===t.current&&(t.current=e()),t}function zd(e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}function Wd(e){let t=Ed(),r=()=>e(t.snapshot());return s.useSyncExternalStore(t.subscribe,r,r)}function Vd(e,t,r){let n=s.useRef(),o=wd();return $d(()=>{var a;let i=(()=>{var e;for(let t of r){if("string"==typeof t)return t.trim().toLowerCase();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim().toLowerCase():n.current}})();o.value(e,i),null==(a=t.current)||a.setAttribute(bd,i),n.current=i}),n}var Ud=()=>{let[e,t]=s.useState(),r=Ld(()=>new Map);return $d(()=>{r.current.forEach(e=>e()),r.current=new Map},[e]),(e,n)=>{r.current.set(e,n),t({})}},qd={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Kd(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function Hd(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Yd(...e){return t=>{let r=!1;const n=e.map(e=>{const n=Hd(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){const r=n[t];"function"==typeof r?r():Hd(e[t],null)}}}}function Gd(...e){return s.useCallback(Yd(...e),e)}function Xd(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const n=r.reduce((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]}),{});return s.useMemo(()=>({[`__scope${t.scopeName}`]:n}),[n])}};return r.scopeName=t.scopeName,r}var Zd=globalThis?.document?s.useLayoutEffect:()=>{};function Jd(e){const t=Qd(e),r=s.forwardRef((e,r)=>{const{children:n,...o}=e,a=s.Children.toArray(n),i=a.find(tf);if(i){const e=i.props.children,n=a.map(t=>t===i?s.Children.count(e)>1?s.Children.only(null):s.isValidElement(e)?e.props.children:null:t);return x.jsx(t,{...o,ref:r,children:s.isValidElement(e)?s.cloneElement(e,void 0,n):null})}return x.jsx(t,{...o,ref:r,children:n})});return r.displayName=`${e}.Slot`,r}function Qd(e){const t=s.forwardRef((e,t)=>{const{children:r,...n}=e;if(s.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r),o=function(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...a}:"className"===n&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==s.Fragment&&(o.ref=t?Yd(t,e):e),s.cloneElement(r,o)}return s.Children.count(r)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ef=Symbol("radix.slottable");function tf(e){return s.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===ef}var rf=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const r=Jd(`Primitive.${t}`),n=s.forwardRef((e,n)=>{const{asChild:o,...a}=e,i=o?r:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),x.jsx(i,{...a,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function nf(e){const t=s.useRef(e);return s.useEffect(()=>{t.current=e}),s.useMemo(()=>(...e)=>t.current?.(...e),[])}var of,af="dismissableLayer.update",sf="dismissableLayer.pointerDownOutside",uf="dismissableLayer.focusOutside",lf=s.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),cf=s.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:u,...l}=e,c=s.useContext(lf),[d,f]=s.useState(null),p=d?.ownerDocument??globalThis?.document,[,h]=s.useState({}),v=Gd(t,e=>f(e)),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),b=d?m.indexOf(d):-1,D=c.layersWithOutsidePointerEventsDisabled.size>0,C=b>=y,w=function(e,t=globalThis?.document){const r=nf(e),n=s.useRef(!1),o=s.useRef(()=>{});return s.useEffect(()=>{const e=e=>{if(e.target&&!n.current){let n=function(){pf(sf,r,a,{discrete:!0})};const a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=n,t.addEventListener("click",o.current,{once:!0})):n()}else t.removeEventListener("click",o.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}(e=>{const t=e.target,r=[...c.branches].some(e=>e.contains(t));C&&!r&&(o?.(e),i?.(e),e.defaultPrevented||u?.())},p),E=function(e,t=globalThis?.document){const r=nf(e),n=s.useRef(!1);return s.useEffect(()=>{const e=e=>{if(e.target&&!n.current){pf(uf,r,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}(e=>{const t=e.target;[...c.branches].some(e=>e.contains(t))||(a?.(e),i?.(e),e.defaultPrevented||u?.())},p);return function(e,t=globalThis?.document){const r=nf(e);s.useEffect(()=>{const e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[r,t])}(e=>{b===c.layers.size-1&&(n?.(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))},p),s.useEffect(()=>{if(d)return r&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(of=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),ff(),()=>{r&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=of)}},[d,p,r,c]),s.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),ff())},[d,c]),s.useEffect(()=>{const e=()=>h({});return document.addEventListener(af,e),()=>document.removeEventListener(af,e)},[]),x.jsx(rf.div,{...l,ref:v,style:{pointerEvents:D?C?"auto":"none":void 0,...e.style},onFocusCapture:Kd(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Kd(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Kd(e.onPointerDownCapture,w.onPointerDownCapture)})});cf.displayName="DismissableLayer";var df=s.forwardRef((e,t)=>{const r=s.useContext(lf),n=s.useRef(null),o=Gd(t,n);return s.useEffect(()=>{const e=n.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),x.jsx(rf.div,{...e,ref:o})});function ff(){const e=new CustomEvent(af);document.dispatchEvent(e)}function pf(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?function(e,t){e&&u.flushSync(()=>e.dispatchEvent(t))}(o,a):o.dispatchEvent(a)}df.displayName="DismissableLayerBranch";var hf="focusScope.autoFocusOnMount",vf="focusScope.autoFocusOnUnmount",mf={bubbles:!1,cancelable:!0},gf=s.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[u,l]=s.useState(null),c=nf(o),d=nf(a),f=s.useRef(null),p=Gd(t,e=>l(e)),h=s.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;s.useEffect(()=>{if(n){let e=function(e){if(h.paused||!u)return;const t=e.target;u.contains(t)?f.current=t:Cf(f.current,{select:!0})},t=function(e){if(h.paused||!u)return;const t=e.relatedTarget;null!==t&&(u.contains(t)||Cf(f.current,{select:!0}))},r=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Cf(u)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const n=new MutationObserver(r);return u&&n.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[n,u,h.paused]),s.useEffect(()=>{if(u){wf.add(h);const t=document.activeElement;if(!u.contains(t)){const r=new CustomEvent(hf,mf);u.addEventListener(hf,c),u.dispatchEvent(r),r.defaultPrevented||(!function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Cf(n,{select:t}),document.activeElement!==r)return}((e=yf(u),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&Cf(u))}return()=>{u.removeEventListener(hf,c),setTimeout(()=>{const e=new CustomEvent(vf,mf);u.addEventListener(vf,d),u.dispatchEvent(e),e.defaultPrevented||Cf(t??document.body,{select:!0}),u.removeEventListener(vf,d),wf.remove(h)},0)}}var e},[u,c,d,h]);const v=s.useCallback(e=>{if(!r&&!n)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[n,a]=function(e){const t=yf(e),r=bf(t,e),n=bf(t.reverse(),e);return[r,n]}(t);n&&a?e.shiftKey||o!==a?e.shiftKey&&o===n&&(e.preventDefault(),r&&Cf(a,{select:!0})):(e.preventDefault(),r&&Cf(n,{select:!0})):o===t&&e.preventDefault()}},[r,n,h.paused]);return x.jsx(rf.div,{tabIndex:-1,...i,ref:p,onKeyDown:v})});function yf(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function bf(e,t){for(const r of e)if(!Df(r,{upTo:t}))return r}function Df(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Cf(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}gf.displayName="FocusScope";var wf=function(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=xf(e,t),e.unshift(t)},remove(t){e=xf(e,t),e[0]?.resume()}}}();function xf(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}var Ef=s.forwardRef((e,t)=>{const{container:n,...o}=e,[a,i]=s.useState(!1);Zd(()=>i(!0),[]);const u=n||a&&globalThis?.document?.body;return u?r.createPortal(x.jsx(rf.div,{...o,ref:t}),u):null});Ef.displayName="Portal";var Af=e=>{const{present:t,children:r}=e,n=function(e){const[t,r]=s.useState(),n=s.useRef(null),o=s.useRef(e),a=s.useRef("none"),i=e?"mounted":"unmounted",[u,l]=function(e,t){return s.useReducer((e,r)=>t[e][r]??e,e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return s.useEffect(()=>{const e=Bf(n.current);a.current="mounted"===u?e:"none"},[u]),Zd(()=>{const t=n.current,r=o.current;if(r!==e){const n=a.current,i=Bf(t);if(e)l("MOUNT");else if("none"===i||"none"===t?.display)l("UNMOUNT");else{l(r&&n!==i?"ANIMATION_OUT":"UNMOUNT")}o.current=e}},[e,l]),Zd(()=>{if(t){let e;const r=t.ownerDocument.defaultView??window,i=a=>{const i=Bf(n.current).includes(CSS.escape(a.animationName));if(a.target===t&&i&&(l("ANIMATION_END"),!o.current)){const n=t.style.animationFillMode;t.style.animationFillMode="forwards",e=r.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=n)})}},s=e=>{e.target===t&&(a.current=Bf(n.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{r.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:s.useCallback(e=>{n.current=e?getComputedStyle(e):null,r(e)},[])}}(t),o="function"==typeof r?r({present:n.isPresent}):s.Children.only(r),a=Gd(n.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(o));return"function"==typeof r||n.isPresent?s.cloneElement(o,{ref:a}):null};function Bf(e){return e?.animationName||"none"}Af.displayName="Presence";var kf=0;function Of(){const e=document.createElement("span");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}var Ff=lc(),Sf=function(){},Tf=s.forwardRef(function(e,t){var r=s.useRef(null),n=s.useState({onScrollCapture:Sf,onWheelCapture:Sf,onTouchMoveCapture:Sf}),o=n[0],a=n[1],i=e.forwardProps,u=e.children,l=e.className,f=e.removeScrollBar,p=e.enabled,h=e.shards,v=e.sideCar,m=e.noRelative,g=e.noIsolation,y=e.inert,b=e.allowPinchZoom,D=e.as,C=void 0===D?"div":D,w=e.gapMode,x=d(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=v,A=sc([r,t]),B=c(c({},x),o);return s.createElement(s.Fragment,null,p&&s.createElement(E,{sideCar:Ff,removeScrollBar:f,shards:h,noRelative:m,noIsolation:g,inert:y,setCallbacks:a,allowPinchZoom:!!b,lockRef:r,gapMode:w}),i?s.cloneElement(s.Children.only(u),c(c({},B),{ref:A})):s.createElement(C,c({},B,{className:l,ref:A}),u))});Tf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Tf.classNames={fullWidth:nc,zeroRight:rc};var Pf=!1;if("undefined"!=typeof window)try{var jf=Object.defineProperty({},"passive",{get:function(){return Pf=!0,!0}});window.addEventListener("test",jf,jf),window.removeEventListener("test",jf,jf)}catch(e){Pf=!1}var Nf=!!Pf&&{passive:!1},Rf=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return"hidden"!==r[t]&&!(r.overflowY===r.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===r[t])},_f=function(e,t){var r=t.ownerDocument,n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),Mf(e,n)){var o=If(e,n);if(o[1]>o[2])return!0}n=n.parentNode}while(n&&n!==r.body);return!1},Mf=function(e,t){return"v"===e?function(e){return Rf(e,"overflowY")}(t):function(e){return Rf(e,"overflowX")}(t)},If=function(e,t){return"v"===e?[(r=t).scrollTop,r.scrollHeight,r.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var r},$f=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Lf=function(e){return[e.deltaX,e.deltaY]},zf=function(e){return e&&"current"in e?e.current:e},Wf=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Vf=0,Uf=[];function qf(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Kf=dc(Ff,function(e){var t=s.useRef([]),r=s.useRef([0,0]),n=s.useRef(),o=s.useState(Vf++)[0],a=s.useState(gc)[0],i=s.useRef(e);s.useEffect(function(){i.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=f([e.lockRef.current],(e.shards||[]).map(zf),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=s.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=$f(e),s=r.current,u="deltaX"in e?e.deltaX:s[0]-a[0],l="deltaY"in e?e.deltaY:s[1]-a[1],c=e.target,d=Math.abs(u)>Math.abs(l)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(!!p&&(p===c||p.contains(c)))return!1;var h=_f(d,c);if(!h)return!0;if(h?o=d:(o="v"===d?"h":"v",h=_f(d,c)),!h)return!1;if(!n.current&&"changedTouches"in e&&(u||l)&&(n.current=o),!o)return!0;var v=n.current||o;return function(e,t,r,n){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=o*n,i=r.target,s=t.contains(i),u=!1,l=a>0,c=0,d=0;do{if(!i)break;var f=If(e,i),p=f[0],h=f[1]-f[2]-o*p;(p||h)&&Mf(e,i)&&(c+=h,d+=p);var v=i.parentNode;i=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!s&&i!==document.body||s&&(t.contains(i)||t===i));return(l&&Math.abs(c)<1||!l&&Math.abs(d)<1)&&(u=!0),u}(v,t,e,"h"===v?u:l)},[]),l=s.useCallback(function(e){var r=e;if(Uf.length&&Uf[Uf.length-1]===a){var n="deltaY"in r?Lf(r):$f(r),o=t.current.filter(function(e){return e.name===r.type&&(e.target===r.target||r.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,n)})[0];if(o&&o.should)r.cancelable&&r.preventDefault();else if(!o){var s=(i.current.shards||[]).map(zf).filter(Boolean).filter(function(e){return e.contains(r.target)});(s.length>0?u(r,s[0]):!i.current.noIsolation)&&r.cancelable&&r.preventDefault()}}},[]),c=s.useCallback(function(e,r,n,o){var a={name:e,delta:r,target:n,should:o,shadowParent:qf(n)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=s.useCallback(function(e){r.current=$f(e),n.current=void 0},[]),p=s.useCallback(function(t){c(t.type,Lf(t),t.target,u(t,e.lockRef.current))},[]),h=s.useCallback(function(t){c(t.type,$f(t),t.target,u(t,e.lockRef.current))},[]);s.useEffect(function(){return Uf.push(a),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Nf),document.addEventListener("touchmove",l,Nf),document.addEventListener("touchstart",d,Nf),function(){Uf=Uf.filter(function(e){return e!==a}),document.removeEventListener("wheel",l,Nf),document.removeEventListener("touchmove",l,Nf),document.removeEventListener("touchstart",d,Nf)}},[]);var v=e.removeScrollBar,m=e.inert;return s.createElement(s.Fragment,null,m?s.createElement(a,{styles:Wf(o)}):null,v?s.createElement(Ac,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}),Hf=s.forwardRef(function(e,t){return s.createElement(Tf,c({},e,{ref:t,sideCar:Kf}))});Hf.classNames=Tf.classNames;var Yf="Dialog",[Gf]=function(e,t=[]){let r=[];const n=()=>{const t=r.map(e=>s.createContext(e));return function(r){const n=r?.[e]||t;return s.useMemo(()=>({[`__scope${e}`]:{...r,[e]:n}}),[r,n])}};return n.scopeName=e,[function(t,n){const o=s.createContext(n),a=r.length;r=[...r,n];const i=t=>{const{scope:r,children:n,...i}=t,u=r?.[e]?.[a]||o,l=s.useMemo(()=>i,Object.values(i));return x.jsx(u.Provider,{value:l,children:n})};return i.displayName=t+"Provider",[i,function(r,i){const u=i?.[e]?.[a]||o,l=s.useContext(u);if(l)return l;if(void 0!==n)return n;throw new Error(`\`${r}\` must be used within \`${t}\``)}]},Xd(n,...t)]}(Yf),[Xf,Zf]=Gf(Yf),Jf="DialogTrigger";s.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Zf(Jf,r),a=Gd(t,o.triggerRef);return x.jsx(rf.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":yp(o.open),...n,ref:a,onClick:Kd(e.onClick,o.onOpenToggle)})}).displayName=Jf;var Qf="DialogPortal",[ep,tp]=Gf(Qf,{forceMount:void 0}),rp=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,a=Zf(Qf,t);return x.jsx(ep,{scope:t,forceMount:r,children:s.Children.map(n,e=>x.jsx(Af,{present:r||a.open,children:x.jsx(Ef,{asChild:!0,container:o,children:e})}))})};rp.displayName=Qf;var np="DialogOverlay",op=s.forwardRef((e,t)=>{const r=tp(np,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=Zf(np,e.__scopeDialog);return a.modal?x.jsx(Af,{present:n||a.open,children:x.jsx(ip,{...o,ref:t})}):null});op.displayName=np;var ap=Jd("DialogOverlay.RemoveScroll"),ip=s.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Zf(np,r);return x.jsx(Hf,{as:ap,allowPinchZoom:!0,shards:[o.contentRef],children:x.jsx(rf.div,{"data-state":yp(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),sp="DialogContent",up=s.forwardRef((e,t)=>{const r=tp(sp,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,a=Zf(sp,e.__scopeDialog);return x.jsx(Af,{present:n||a.open,children:a.modal?x.jsx(lp,{...o,ref:t}):x.jsx(cp,{...o,ref:t})})});up.displayName=sp;var lp=s.forwardRef((e,t)=>{const r=Zf(sp,e.__scopeDialog),n=s.useRef(null),o=Gd(t,r.contentRef,n);return s.useEffect(()=>{const e=n.current;if(e)return Kc(e)},[]),x.jsx(dp,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Kd(e.onCloseAutoFocus,e=>{e.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:Kd(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:Kd(e.onFocusOutside,e=>e.preventDefault())})}),cp=s.forwardRef((e,t)=>{const r=Zf(sp,e.__scopeDialog),n=s.useRef(!1),o=s.useRef(!1);return x.jsx(dp,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(n.current||r.triggerRef.current?.focus(),t.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(n.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const a=t.target,i=r.triggerRef.current?.contains(a);i&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),dp=s.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,u=Zf(sp,r),l=s.useRef(null),c=Gd(t,l);return s.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Of()),document.body.insertAdjacentElement("beforeend",e[1]??Of()),kf++,()=>{1===kf&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),kf--}},[]),x.jsxs(x.Fragment,{children:[x.jsx(gf,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:x.jsx(cf,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":yp(u.open),...i,ref:c,onDismiss:()=>u.onOpenChange(!1)})}),x.jsxs(x.Fragment,{children:[x.jsx(wp,{titleId:u.titleId}),x.jsx(xp,{contentRef:l,descriptionId:u.descriptionId})]})]})}),fp="DialogTitle",pp=s.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Zf(fp,r);return x.jsx(rf.h2,{id:o.titleId,...n,ref:t})});pp.displayName=fp;var hp="DialogDescription",vp=s.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Zf(hp,r);return x.jsx(rf.p,{id:o.descriptionId,...n,ref:t})});vp.displayName=hp;var mp="DialogClose",gp=s.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Zf(mp,r);return x.jsx(rf.button,{type:"button",...n,ref:t,onClick:Kd(e.onClick,()=>o.onOpenChange(!1))})});function yp(e){return e?"open":"closed"}gp.displayName=mp;var bp="DialogTitleWarning",[Dp,Cp]=function(e,t){const r=s.createContext(t),n=e=>{const{children:t,...n}=e,o=s.useMemo(()=>n,Object.values(n));return x.jsx(r.Provider,{value:o,children:t})};return n.displayName=e+"Provider",[n,function(n){const o=s.useContext(r);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${n}\` must be used within \`${e}\``)}]}(bp,{contentName:sp,titleName:fp,docsSlug:"dialog"}),wp=({titleId:e})=>{const t=Cp(bp),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{if(e){document.getElementById(e)||console.error(r)}},[r,e]),null},xp=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Cp("DialogDescriptionWarning").contentName}}.`;return s.useEffect(()=>{const n=e.current?.getAttribute("aria-describedby");if(t&&n){document.getElementById(t)||console.warn(r)}},[r,e,t]),null},Ep=rp,Ap=op,Bp=up,kp=pp,Op=vp,Fp=gp,Sp={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Tp=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Pp=((e,r)=>{const n=t.forwardRef(({color:n="currentColor",size:o=24,strokeWidth:a=2,absoluteStrokeWidth:i,children:s,...u},l)=>t.createElement("svg",{ref:l,...Sp,width:o,height:o,stroke:n,strokeWidth:i?24*Number(a)/Number(o):a,className:`lucide lucide-${Tp(e)}`,...u},[...r.map(([e,r])=>t.createElement(e,r)),...(Array.isArray(s)?s:[s])||[]]));return n.displayName=`${e}`,n})("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),jp=e=>{var{className:t,children:r}=e,n=d(e,["className","children"]);return x.jsx(Ep,Object.assign({},n,{children:x.jsx("div",{className:ys(t),children:r})}))};jp.displayName=Ep.displayName;const Np=s.forwardRef((e,t)=>{var{className:r}=e,n=d(e,["className"]);return x.jsx(Ap,Object.assign({ref:t,className:ys("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",r)},n))});Np.displayName=Ap.displayName;s.forwardRef((e,t)=>{var{className:r,children:n}=e,o=d(e,["className","children"]);return x.jsxs(jp,{children:[x.jsx(Np,{}),x.jsxs(Bp,Object.assign({ref:t,className:ys("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg md:w-full",r)},o,{children:[n,x.jsxs(Fp,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[x.jsx(Pp,{className:"h-4 w-4"}),x.jsx("span",{className:"sr-only",children:"Close"})]})]}))]})}).displayName=Bp.displayName;s.forwardRef((e,t)=>{var{className:r}=e,n=d(e,["className"]);return x.jsx(kp,Object.assign({ref:t,className:ys("text-lg font-semibold leading-none tracking-tight",r)},n))}).displayName=kp.displayName;s.forwardRef((e,t)=>{var{className:r}=e,n=d(e,["className"]);return x.jsx(Op,Object.assign({ref:t,className:ys("text-sm text-muted-foreground",r)},n))}).displayName=Op.displayName;const Rp=s.forwardRef((e,t)=>{var{className:r}=e,n=d(e,["className"]);return x.jsx(Rd,Object.assign({ref:t,className:ys("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",r)},n))});Rp.displayName=Rd.displayName;const _p=s.forwardRef((e,t)=>{var{className:r}=e,n=d(e,["className"]);return x.jsx("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:x.jsx(Rd.Input,Object.assign({ref:t,className:ys("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",r)},n))})});_p.displayName=Rd.Input.displayName;const Mp=s.forwardRef((e,t)=>{var{className:r}=e,n=d(e,["className"]);return x.jsx(Rd.List,Object.assign({ref:t,className:ys("max-h-[300px] overflow-y-auto overflow-x-hidden pb-2",r)},n))});Mp.displayName=Rd.List.displayName;const Ip=s.forwardRef((e,t)=>x.jsx(Rd.Empty,Object.assign({ref:t,className:"py-6 text-center text-sm"},e)));Ip.displayName=Rd.Empty.displayName;const $p=s.forwardRef((e,t)=>{var{className:r}=e,n=d(e,["className"]);return x.jsx(Rd.Group,Object.assign({ref:t,className:ys("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",r)},n))});$p.displayName=Rd.Group.displayName;const Lp=s.forwardRef((e,t)=>{var{className:r}=e,n=d(e,["className"]);return x.jsx(Rd.Separator,Object.assign({ref:t,className:ys("-mx-1 h-px bg-border",r)},n))});Lp.displayName=Rd.Separator.displayName;const zp=s.forwardRef((e,t)=>{var{className:r}=e,n=d(e,["className"]);return x.jsx(Rd.Item,Object.assign({ref:t,className:ys("relative flex cursor-default select-none items-center rounded-sm text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r)},n))});function Wp(e){const[r,n]=t.useState("");return x.jsxs(Rp,{className:"rounded-lg border shadow-md",value:r,onValueChange:e=>{n(e)},filter:(t,r)=>""===e.searchTerm||t.startsWith(e.searchTerm)?1:0,children:[x.jsx(_p,{value:e.searchTerm,className:"rounded-t-lg hidden",placeholder:"Search for a command..."}),x.jsxs(Mp,{children:[x.jsx(Ip,{children:"No results found."}),x.jsx($p,{heading:"Available resources",children:e.suggestedFiles.map(t=>x.jsx(zp,{value:t.name,onSelect:r=>{e.onSelectedFile(t)},children:x.jsxs("div",{className:" px-3 flex flex-row gap-1 items-center",children:[x.jsx(Vp,{width:"20px",height:"20px",children:x.jsx("img",{src:t.iconImageUri,alt:t.sourceApplication,className:"w-full h-full"})}),t.name]})},`word-${t.sourceApplication}.${t.name}`))}),x.jsx(Lp,{})]})]})}function Vp({children:e,width:t,height:r}){return x.jsx("div",{className:"flex items-center justify-center",style:{width:t,height:r},children:e})}zp.displayName=Rd.Item.displayName;var Up=Symbol.for("react.lazy"),qp=s[" use ".trim().toString()];function Kp(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===Up&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function Hp(e){const t=Gp(e),r=s.forwardRef((e,r)=>{let{children:n,...o}=e;Kp(n)&&"function"==typeof qp&&(n=qp(n._payload));const a=s.Children.toArray(n),i=a.find(Zp);if(i){const e=i.props.children,n=a.map(t=>t===i?s.Children.count(e)>1?s.Children.only(null):s.isValidElement(e)?e.props.children:null:t);return x.jsx(t,{...o,ref:r,children:s.isValidElement(e)?s.cloneElement(e,void 0,n):null})}return x.jsx(t,{...o,ref:r,children:n})});return r.displayName=`${e}.Slot`,r}var Yp=Hp("Slot");function Gp(e){const t=s.forwardRef((e,t)=>{let{children:r,...n}=e;if(Kp(r)&&"function"==typeof qp&&(r=qp(r._payload)),s.isValidElement(r)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(r),o=function(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...a}:"className"===n&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}(n,r.props);return r.type!==s.Fragment&&(o.ref=t?Yd(t,e):e),s.cloneElement(r,o)}return s.Children.count(r)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Xp=Symbol("radix.slottable");function Zp(e){return s.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Xp}const Jp=e=>"boolean"==typeof e?"".concat(e):0===e?"0":e,Qp=gs,eh=(e,t)=>r=>{var n;if(null==(null==t?void 0:t.variants))return Qp(e,null==r?void 0:r.class,null==r?void 0:r.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(e=>{const t=null==r?void 0:r[e],n=null==a?void 0:a[e];if(null===t)return null;const i=Jp(t)||Jp(n);return o[e][i]}),s=r&&Object.entries(r).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{}),u=null==t||null===(n=t.compoundVariants)||void 0===n?void 0:n.reduce((e,t)=>{let{class:r,className:n,...o}=t;return Object.entries(o).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...a,...s}[t]):{...a,...s}[t]===r})?[...e,r,n]:e},[]);return Qp(e,i,u,null==r?void 0:r.class,null==r?void 0:r.className)},th=eh("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),rh=s.forwardRef((e,t)=>{var{className:r,variant:n,size:o,asChild:a=!1}=e,i=d(e,["className","variant","size","asChild"]);const s=a?Yp:"button";return x.jsx(s,Object.assign({className:ys(th({variant:n,size:o,className:r})),ref:t},i))});rh.displayName="Button";var nh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const r=Hp(`Primitive.${t}`),n=s.forwardRef((e,n)=>{const{asChild:o,...a}=e,i=o?r:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),x.jsx(i,{...a,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),oh=s.forwardRef((e,t)=>x.jsx(nh.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));oh.displayName="Label";var ah=oh;const ih=eh("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),sh=s.forwardRef((e,t)=>{var{className:r}=e,n=d(e,["className"]);return x.jsx(ah,Object.assign({ref:t,className:ys(ih(),r)},n))});function uh(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}sh.displayName=ah.displayName;var lh,ch={exports:{}},dh={exports:{}},fh={};var ph,hh,vh,mh,gh,yh,bh,Dh,Ch,wh,xh,Eh,Ah,Bh,kh,Oh={};
|
|
37
37
|
/** @license React v16.13.1
|
|
38
38
|
* react-is.development.js
|
|
39
39
|
*
|