Initial commit
This commit is contained in:
21
components.json
Normal file
21
components.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"$schema": "https://ui.shadcn.com/schema.json",
|
||||
"style": "new-york",
|
||||
"rsc": false,
|
||||
"tsx": true,
|
||||
"tailwind": {
|
||||
"config": "tailwind.config.js",
|
||||
"css": "src/index.css",
|
||||
"baseColor": "neutral",
|
||||
"cssVariables": true,
|
||||
"prefix": ""
|
||||
},
|
||||
"aliases": {
|
||||
"components": "@/components",
|
||||
"utils": "@/lib/utils",
|
||||
"ui": "@/components/ui",
|
||||
"lib": "@/lib",
|
||||
"hooks": "@/hooks"
|
||||
},
|
||||
"iconLibrary": "lucide"
|
||||
}
|
||||
12
index.html
Normal file
12
index.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Your App</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
1
node_modules/.bin/autoprefixer
generated
vendored
Symbolic link
1
node_modules/.bin/autoprefixer
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../autoprefixer/bin/autoprefixer
|
||||
1
node_modules/.bin/browserslist
generated
vendored
Symbolic link
1
node_modules/.bin/browserslist
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../browserslist/cli.js
|
||||
1
node_modules/.bin/cssesc
generated
vendored
Symbolic link
1
node_modules/.bin/cssesc
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../cssesc/bin/cssesc
|
||||
1
node_modules/.bin/esbuild
generated
vendored
Symbolic link
1
node_modules/.bin/esbuild
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../esbuild/bin/esbuild
|
||||
1
node_modules/.bin/glob
generated
vendored
Symbolic link
1
node_modules/.bin/glob
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../glob/dist/esm/bin.mjs
|
||||
1
node_modules/.bin/jiti
generated
vendored
Symbolic link
1
node_modules/.bin/jiti
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../jiti/bin/jiti.js
|
||||
1
node_modules/.bin/jsesc
generated
vendored
Symbolic link
1
node_modules/.bin/jsesc
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../jsesc/bin/jsesc
|
||||
1
node_modules/.bin/json5
generated
vendored
Symbolic link
1
node_modules/.bin/json5
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../json5/lib/cli.js
|
||||
1
node_modules/.bin/loose-envify
generated
vendored
Symbolic link
1
node_modules/.bin/loose-envify
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../loose-envify/cli.js
|
||||
1
node_modules/.bin/nanoid
generated
vendored
Symbolic link
1
node_modules/.bin/nanoid
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../nanoid/bin/nanoid.cjs
|
||||
1
node_modules/.bin/node-which
generated
vendored
Symbolic link
1
node_modules/.bin/node-which
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../which/bin/node-which
|
||||
1
node_modules/.bin/parser
generated
vendored
Symbolic link
1
node_modules/.bin/parser
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../@babel/parser/bin/babel-parser.js
|
||||
1
node_modules/.bin/resolve
generated
vendored
Symbolic link
1
node_modules/.bin/resolve
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../resolve/bin/resolve
|
||||
1
node_modules/.bin/rollup
generated
vendored
Symbolic link
1
node_modules/.bin/rollup
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../rollup/dist/bin/rollup
|
||||
1
node_modules/.bin/semver
generated
vendored
Symbolic link
1
node_modules/.bin/semver
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../semver/bin/semver.js
|
||||
1
node_modules/.bin/sucrase
generated
vendored
Symbolic link
1
node_modules/.bin/sucrase
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../sucrase/bin/sucrase
|
||||
1
node_modules/.bin/sucrase-node
generated
vendored
Symbolic link
1
node_modules/.bin/sucrase-node
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../sucrase/bin/sucrase-node
|
||||
1
node_modules/.bin/tailwind
generated
vendored
Symbolic link
1
node_modules/.bin/tailwind
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../tailwindcss/lib/cli.js
|
||||
1
node_modules/.bin/tailwindcss
generated
vendored
Symbolic link
1
node_modules/.bin/tailwindcss
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../tailwindcss/lib/cli.js
|
||||
1
node_modules/.bin/tsc
generated
vendored
Symbolic link
1
node_modules/.bin/tsc
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../typescript/bin/tsc
|
||||
1
node_modules/.bin/tsserver
generated
vendored
Symbolic link
1
node_modules/.bin/tsserver
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../typescript/bin/tsserver
|
||||
1
node_modules/.bin/ui
generated
vendored
Symbolic link
1
node_modules/.bin/ui
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../@shadcn/ui/dist/index.js
|
||||
1
node_modules/.bin/update-browserslist-db
generated
vendored
Symbolic link
1
node_modules/.bin/update-browserslist-db
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../update-browserslist-db/cli.js
|
||||
1
node_modules/.bin/vite
generated
vendored
Symbolic link
1
node_modules/.bin/vite
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../vite/bin/vite.js
|
||||
1
node_modules/.bin/yaml
generated
vendored
Symbolic link
1
node_modules/.bin/yaml
generated
vendored
Symbolic link
@@ -0,0 +1 @@
|
||||
../yaml/bin.mjs
|
||||
3656
node_modules/.package-lock.json
generated
vendored
Normal file
3656
node_modules/.package-lock.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
116
node_modules/.vite/deps/@radix-ui_react-avatar.js
generated
vendored
Normal file
116
node_modules/.vite/deps/@radix-ui_react-avatar.js
generated
vendored
Normal file
@@ -0,0 +1,116 @@
|
||||
"use client";
|
||||
import {
|
||||
Primitive,
|
||||
createContextScope,
|
||||
useCallbackRef,
|
||||
useLayoutEffect2
|
||||
} from "./chunk-LMM3RUZD.js";
|
||||
import "./chunk-PJEEZAML.js";
|
||||
import "./chunk-7CEJWY55.js";
|
||||
import {
|
||||
require_jsx_runtime
|
||||
} from "./chunk-6PXSGDAH.js";
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-DRWLMN53.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk-G3PMV62Z.js";
|
||||
|
||||
// node_modules/@radix-ui/react-avatar/dist/index.mjs
|
||||
var React = __toESM(require_react(), 1);
|
||||
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
||||
var AVATAR_NAME = "Avatar";
|
||||
var [createAvatarContext, createAvatarScope] = createContextScope(AVATAR_NAME);
|
||||
var [AvatarProvider, useAvatarContext] = createAvatarContext(AVATAR_NAME);
|
||||
var Avatar = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAvatar, ...avatarProps } = props;
|
||||
const [imageLoadingStatus, setImageLoadingStatus] = React.useState("idle");
|
||||
return (0, import_jsx_runtime.jsx)(
|
||||
AvatarProvider,
|
||||
{
|
||||
scope: __scopeAvatar,
|
||||
imageLoadingStatus,
|
||||
onImageLoadingStatusChange: setImageLoadingStatus,
|
||||
children: (0, import_jsx_runtime.jsx)(Primitive.span, { ...avatarProps, ref: forwardedRef })
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
Avatar.displayName = AVATAR_NAME;
|
||||
var IMAGE_NAME = "AvatarImage";
|
||||
var AvatarImage = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAvatar, src, onLoadingStatusChange = () => {
|
||||
}, ...imageProps } = props;
|
||||
const context = useAvatarContext(IMAGE_NAME, __scopeAvatar);
|
||||
const imageLoadingStatus = useImageLoadingStatus(src, imageProps.referrerPolicy);
|
||||
const handleLoadingStatusChange = useCallbackRef((status) => {
|
||||
onLoadingStatusChange(status);
|
||||
context.onImageLoadingStatusChange(status);
|
||||
});
|
||||
useLayoutEffect2(() => {
|
||||
if (imageLoadingStatus !== "idle") {
|
||||
handleLoadingStatusChange(imageLoadingStatus);
|
||||
}
|
||||
}, [imageLoadingStatus, handleLoadingStatusChange]);
|
||||
return imageLoadingStatus === "loaded" ? (0, import_jsx_runtime.jsx)(Primitive.img, { ...imageProps, ref: forwardedRef, src }) : null;
|
||||
}
|
||||
);
|
||||
AvatarImage.displayName = IMAGE_NAME;
|
||||
var FALLBACK_NAME = "AvatarFallback";
|
||||
var AvatarFallback = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeAvatar, delayMs, ...fallbackProps } = props;
|
||||
const context = useAvatarContext(FALLBACK_NAME, __scopeAvatar);
|
||||
const [canRender, setCanRender] = React.useState(delayMs === void 0);
|
||||
React.useEffect(() => {
|
||||
if (delayMs !== void 0) {
|
||||
const timerId = window.setTimeout(() => setCanRender(true), delayMs);
|
||||
return () => window.clearTimeout(timerId);
|
||||
}
|
||||
}, [delayMs]);
|
||||
return canRender && context.imageLoadingStatus !== "loaded" ? (0, import_jsx_runtime.jsx)(Primitive.span, { ...fallbackProps, ref: forwardedRef }) : null;
|
||||
}
|
||||
);
|
||||
AvatarFallback.displayName = FALLBACK_NAME;
|
||||
function useImageLoadingStatus(src, referrerPolicy) {
|
||||
const [loadingStatus, setLoadingStatus] = React.useState("idle");
|
||||
useLayoutEffect2(() => {
|
||||
if (!src) {
|
||||
setLoadingStatus("error");
|
||||
return;
|
||||
}
|
||||
let isMounted = true;
|
||||
const image = new window.Image();
|
||||
const updateStatus = (status) => () => {
|
||||
if (!isMounted) return;
|
||||
setLoadingStatus(status);
|
||||
};
|
||||
setLoadingStatus("loading");
|
||||
image.onload = updateStatus("loaded");
|
||||
image.onerror = updateStatus("error");
|
||||
image.src = src;
|
||||
if (referrerPolicy) {
|
||||
image.referrerPolicy = referrerPolicy;
|
||||
}
|
||||
return () => {
|
||||
isMounted = false;
|
||||
};
|
||||
}, [src, referrerPolicy]);
|
||||
return loadingStatus;
|
||||
}
|
||||
var Root = Avatar;
|
||||
var Image = AvatarImage;
|
||||
var Fallback = AvatarFallback;
|
||||
export {
|
||||
Avatar,
|
||||
AvatarFallback,
|
||||
AvatarImage,
|
||||
Fallback,
|
||||
Image,
|
||||
Root,
|
||||
createAvatarScope
|
||||
};
|
||||
//# sourceMappingURL=@radix-ui_react-avatar.js.map
|
||||
7
node_modules/.vite/deps/@radix-ui_react-avatar.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/@radix-ui_react-avatar.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
365
node_modules/.vite/deps/@radix-ui_react-dialog.js
generated
vendored
Normal file
365
node_modules/.vite/deps/@radix-ui_react-dialog.js
generated
vendored
Normal file
@@ -0,0 +1,365 @@
|
||||
"use client";
|
||||
import {
|
||||
Combination_default,
|
||||
FocusScope,
|
||||
hideOthers,
|
||||
useFocusGuards
|
||||
} from "./chunk-KCU5VMPK.js";
|
||||
import {
|
||||
DismissableLayer,
|
||||
Portal,
|
||||
useControllableState,
|
||||
useId
|
||||
} from "./chunk-NQHNXVMS.js";
|
||||
import {
|
||||
Presence,
|
||||
composeEventHandlers
|
||||
} from "./chunk-KWKVM5C6.js";
|
||||
import {
|
||||
Primitive,
|
||||
createContext2,
|
||||
createContextScope
|
||||
} from "./chunk-LMM3RUZD.js";
|
||||
import "./chunk-PJEEZAML.js";
|
||||
import {
|
||||
Slot,
|
||||
useComposedRefs
|
||||
} from "./chunk-7CEJWY55.js";
|
||||
import {
|
||||
require_jsx_runtime
|
||||
} from "./chunk-6PXSGDAH.js";
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-DRWLMN53.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk-G3PMV62Z.js";
|
||||
|
||||
// node_modules/@radix-ui/react-dialog/dist/index.mjs
|
||||
var React = __toESM(require_react(), 1);
|
||||
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
||||
var DIALOG_NAME = "Dialog";
|
||||
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
||||
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
||||
var Dialog = (props) => {
|
||||
const {
|
||||
__scopeDialog,
|
||||
children,
|
||||
open: openProp,
|
||||
defaultOpen,
|
||||
onOpenChange,
|
||||
modal = true
|
||||
} = props;
|
||||
const triggerRef = React.useRef(null);
|
||||
const contentRef = React.useRef(null);
|
||||
const [open = false, setOpen] = useControllableState({
|
||||
prop: openProp,
|
||||
defaultProp: defaultOpen,
|
||||
onChange: onOpenChange
|
||||
});
|
||||
return (0, import_jsx_runtime.jsx)(
|
||||
DialogProvider,
|
||||
{
|
||||
scope: __scopeDialog,
|
||||
triggerRef,
|
||||
contentRef,
|
||||
contentId: useId(),
|
||||
titleId: useId(),
|
||||
descriptionId: useId(),
|
||||
open,
|
||||
onOpenChange: setOpen,
|
||||
onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
||||
modal,
|
||||
children
|
||||
}
|
||||
);
|
||||
};
|
||||
Dialog.displayName = DIALOG_NAME;
|
||||
var TRIGGER_NAME = "DialogTrigger";
|
||||
var DialogTrigger = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeDialog, ...triggerProps } = props;
|
||||
const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
|
||||
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
||||
return (0, import_jsx_runtime.jsx)(
|
||||
Primitive.button,
|
||||
{
|
||||
type: "button",
|
||||
"aria-haspopup": "dialog",
|
||||
"aria-expanded": context.open,
|
||||
"aria-controls": context.contentId,
|
||||
"data-state": getState(context.open),
|
||||
...triggerProps,
|
||||
ref: composedTriggerRef,
|
||||
onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
DialogTrigger.displayName = TRIGGER_NAME;
|
||||
var PORTAL_NAME = "DialogPortal";
|
||||
var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {
|
||||
forceMount: void 0
|
||||
});
|
||||
var DialogPortal = (props) => {
|
||||
const { __scopeDialog, forceMount, children, container } = props;
|
||||
const context = useDialogContext(PORTAL_NAME, __scopeDialog);
|
||||
return (0, import_jsx_runtime.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => (0, import_jsx_runtime.jsx)(Presence, { present: forceMount || context.open, children: (0, import_jsx_runtime.jsx)(Portal, { asChild: true, container, children: child }) })) });
|
||||
};
|
||||
DialogPortal.displayName = PORTAL_NAME;
|
||||
var OVERLAY_NAME = "DialogOverlay";
|
||||
var DialogOverlay = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
|
||||
const { forceMount = portalContext.forceMount, ...overlayProps } = props;
|
||||
const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
|
||||
return context.modal ? (0, import_jsx_runtime.jsx)(Presence, { present: forceMount || context.open, children: (0, import_jsx_runtime.jsx)(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
|
||||
}
|
||||
);
|
||||
DialogOverlay.displayName = OVERLAY_NAME;
|
||||
var DialogOverlayImpl = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeDialog, ...overlayProps } = props;
|
||||
const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
|
||||
return (
|
||||
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
||||
// ie. when `Overlay` and `Content` are siblings
|
||||
(0, import_jsx_runtime.jsx)(Combination_default, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: (0, import_jsx_runtime.jsx)(
|
||||
Primitive.div,
|
||||
{
|
||||
"data-state": getState(context.open),
|
||||
...overlayProps,
|
||||
ref: forwardedRef,
|
||||
style: { pointerEvents: "auto", ...overlayProps.style }
|
||||
}
|
||||
) })
|
||||
);
|
||||
}
|
||||
);
|
||||
var CONTENT_NAME = "DialogContent";
|
||||
var DialogContent = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
|
||||
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
||||
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
||||
return (0, import_jsx_runtime.jsx)(Presence, { present: forceMount || context.open, children: context.modal ? (0, import_jsx_runtime.jsx)(DialogContentModal, { ...contentProps, ref: forwardedRef }) : (0, import_jsx_runtime.jsx)(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
||||
}
|
||||
);
|
||||
DialogContent.displayName = CONTENT_NAME;
|
||||
var DialogContentModal = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
||||
const contentRef = React.useRef(null);
|
||||
const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
|
||||
React.useEffect(() => {
|
||||
const content = contentRef.current;
|
||||
if (content) return hideOthers(content);
|
||||
}, []);
|
||||
return (0, import_jsx_runtime.jsx)(
|
||||
DialogContentImpl,
|
||||
{
|
||||
...props,
|
||||
ref: composedRefs,
|
||||
trapFocus: context.open,
|
||||
disableOutsidePointerEvents: true,
|
||||
onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
|
||||
var _a;
|
||||
event.preventDefault();
|
||||
(_a = context.triggerRef.current) == null ? void 0 : _a.focus();
|
||||
}),
|
||||
onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
|
||||
const originalEvent = event.detail.originalEvent;
|
||||
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
||||
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
||||
if (isRightClick) event.preventDefault();
|
||||
}),
|
||||
onFocusOutside: composeEventHandlers(
|
||||
props.onFocusOutside,
|
||||
(event) => event.preventDefault()
|
||||
)
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
var DialogContentNonModal = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
||||
const hasInteractedOutsideRef = React.useRef(false);
|
||||
const hasPointerDownOutsideRef = React.useRef(false);
|
||||
return (0, import_jsx_runtime.jsx)(
|
||||
DialogContentImpl,
|
||||
{
|
||||
...props,
|
||||
ref: forwardedRef,
|
||||
trapFocus: false,
|
||||
disableOutsidePointerEvents: false,
|
||||
onCloseAutoFocus: (event) => {
|
||||
var _a, _b;
|
||||
(_a = props.onCloseAutoFocus) == null ? void 0 : _a.call(props, event);
|
||||
if (!event.defaultPrevented) {
|
||||
if (!hasInteractedOutsideRef.current) (_b = context.triggerRef.current) == null ? void 0 : _b.focus();
|
||||
event.preventDefault();
|
||||
}
|
||||
hasInteractedOutsideRef.current = false;
|
||||
hasPointerDownOutsideRef.current = false;
|
||||
},
|
||||
onInteractOutside: (event) => {
|
||||
var _a, _b;
|
||||
(_a = props.onInteractOutside) == null ? void 0 : _a.call(props, event);
|
||||
if (!event.defaultPrevented) {
|
||||
hasInteractedOutsideRef.current = true;
|
||||
if (event.detail.originalEvent.type === "pointerdown") {
|
||||
hasPointerDownOutsideRef.current = true;
|
||||
}
|
||||
}
|
||||
const target = event.target;
|
||||
const targetIsTrigger = (_b = context.triggerRef.current) == null ? void 0 : _b.contains(target);
|
||||
if (targetIsTrigger) event.preventDefault();
|
||||
if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
var DialogContentImpl = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
|
||||
const context = useDialogContext(CONTENT_NAME, __scopeDialog);
|
||||
const contentRef = React.useRef(null);
|
||||
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
||||
useFocusGuards();
|
||||
return (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
||||
(0, import_jsx_runtime.jsx)(
|
||||
FocusScope,
|
||||
{
|
||||
asChild: true,
|
||||
loop: true,
|
||||
trapped: trapFocus,
|
||||
onMountAutoFocus: onOpenAutoFocus,
|
||||
onUnmountAutoFocus: onCloseAutoFocus,
|
||||
children: (0, import_jsx_runtime.jsx)(
|
||||
DismissableLayer,
|
||||
{
|
||||
role: "dialog",
|
||||
id: context.contentId,
|
||||
"aria-describedby": context.descriptionId,
|
||||
"aria-labelledby": context.titleId,
|
||||
"data-state": getState(context.open),
|
||||
...contentProps,
|
||||
ref: composedRefs,
|
||||
onDismiss: () => context.onOpenChange(false)
|
||||
}
|
||||
)
|
||||
}
|
||||
),
|
||||
(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
||||
(0, import_jsx_runtime.jsx)(TitleWarning, { titleId: context.titleId }),
|
||||
(0, import_jsx_runtime.jsx)(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
||||
] })
|
||||
] });
|
||||
}
|
||||
);
|
||||
var TITLE_NAME = "DialogTitle";
|
||||
var DialogTitle = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeDialog, ...titleProps } = props;
|
||||
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
||||
return (0, import_jsx_runtime.jsx)(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
||||
}
|
||||
);
|
||||
DialogTitle.displayName = TITLE_NAME;
|
||||
var DESCRIPTION_NAME = "DialogDescription";
|
||||
var DialogDescription = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeDialog, ...descriptionProps } = props;
|
||||
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
||||
return (0, import_jsx_runtime.jsx)(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
||||
}
|
||||
);
|
||||
DialogDescription.displayName = DESCRIPTION_NAME;
|
||||
var CLOSE_NAME = "DialogClose";
|
||||
var DialogClose = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeDialog, ...closeProps } = props;
|
||||
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
||||
return (0, import_jsx_runtime.jsx)(
|
||||
Primitive.button,
|
||||
{
|
||||
type: "button",
|
||||
...closeProps,
|
||||
ref: forwardedRef,
|
||||
onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
DialogClose.displayName = CLOSE_NAME;
|
||||
function getState(open) {
|
||||
return open ? "open" : "closed";
|
||||
}
|
||||
var TITLE_WARNING_NAME = "DialogTitleWarning";
|
||||
var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
|
||||
contentName: CONTENT_NAME,
|
||||
titleName: TITLE_NAME,
|
||||
docsSlug: "dialog"
|
||||
});
|
||||
var TitleWarning = ({ titleId }) => {
|
||||
const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
|
||||
const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
|
||||
|
||||
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
|
||||
|
||||
For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
|
||||
React.useEffect(() => {
|
||||
if (titleId) {
|
||||
const hasTitle = document.getElementById(titleId);
|
||||
if (!hasTitle) console.error(MESSAGE);
|
||||
}
|
||||
}, [MESSAGE, titleId]);
|
||||
return null;
|
||||
};
|
||||
var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
|
||||
var DescriptionWarning = ({ contentRef, descriptionId }) => {
|
||||
const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
|
||||
const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
|
||||
React.useEffect(() => {
|
||||
var _a;
|
||||
const describedById = (_a = contentRef.current) == null ? void 0 : _a.getAttribute("aria-describedby");
|
||||
if (descriptionId && describedById) {
|
||||
const hasDescription = document.getElementById(descriptionId);
|
||||
if (!hasDescription) console.warn(MESSAGE);
|
||||
}
|
||||
}, [MESSAGE, contentRef, descriptionId]);
|
||||
return null;
|
||||
};
|
||||
var Root = Dialog;
|
||||
var Trigger = DialogTrigger;
|
||||
var Portal2 = DialogPortal;
|
||||
var Overlay = DialogOverlay;
|
||||
var Content = DialogContent;
|
||||
var Title = DialogTitle;
|
||||
var Description = DialogDescription;
|
||||
var Close = DialogClose;
|
||||
export {
|
||||
Close,
|
||||
Content,
|
||||
Description,
|
||||
Dialog,
|
||||
DialogClose,
|
||||
DialogContent,
|
||||
DialogDescription,
|
||||
DialogOverlay,
|
||||
DialogPortal,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
Overlay,
|
||||
Portal2 as Portal,
|
||||
Root,
|
||||
Title,
|
||||
Trigger,
|
||||
WarningProvider,
|
||||
createDialogScope
|
||||
};
|
||||
//# sourceMappingURL=@radix-ui_react-dialog.js.map
|
||||
7
node_modules/.vite/deps/@radix-ui_react-dialog.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/@radix-ui_react-dialog.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1447
node_modules/.vite/deps/@radix-ui_react-dropdown-menu.js
generated
vendored
Normal file
1447
node_modules/.vite/deps/@radix-ui_react-dropdown-menu.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
node_modules/.vite/deps/@radix-ui_react-dropdown-menu.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/@radix-ui_react-dropdown-menu.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
761
node_modules/.vite/deps/@radix-ui_react-scroll-area.js
generated
vendored
Normal file
761
node_modules/.vite/deps/@radix-ui_react-scroll-area.js
generated
vendored
Normal file
@@ -0,0 +1,761 @@
|
||||
"use client";
|
||||
import {
|
||||
useDirection
|
||||
} from "./chunk-5HDB4YN4.js";
|
||||
import {
|
||||
Presence,
|
||||
composeEventHandlers
|
||||
} from "./chunk-KWKVM5C6.js";
|
||||
import {
|
||||
Primitive,
|
||||
createContextScope,
|
||||
useCallbackRef,
|
||||
useLayoutEffect2
|
||||
} from "./chunk-LMM3RUZD.js";
|
||||
import "./chunk-PJEEZAML.js";
|
||||
import {
|
||||
useComposedRefs
|
||||
} from "./chunk-7CEJWY55.js";
|
||||
import {
|
||||
require_jsx_runtime
|
||||
} from "./chunk-6PXSGDAH.js";
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-DRWLMN53.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk-G3PMV62Z.js";
|
||||
|
||||
// node_modules/@radix-ui/react-scroll-area/dist/index.mjs
|
||||
var React2 = __toESM(require_react(), 1);
|
||||
|
||||
// node_modules/@radix-ui/number/dist/index.mjs
|
||||
function clamp(value, [min, max]) {
|
||||
return Math.min(max, Math.max(min, value));
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-scroll-area/dist/index.mjs
|
||||
var React = __toESM(require_react(), 1);
|
||||
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
||||
function useStateMachine(initialState, machine) {
|
||||
return React.useReducer((state, event) => {
|
||||
const nextState = machine[state][event];
|
||||
return nextState ?? state;
|
||||
}, initialState);
|
||||
}
|
||||
var SCROLL_AREA_NAME = "ScrollArea";
|
||||
var [createScrollAreaContext, createScrollAreaScope] = createContextScope(SCROLL_AREA_NAME);
|
||||
var [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME);
|
||||
var ScrollArea = React2.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const {
|
||||
__scopeScrollArea,
|
||||
type = "hover",
|
||||
dir,
|
||||
scrollHideDelay = 600,
|
||||
...scrollAreaProps
|
||||
} = props;
|
||||
const [scrollArea, setScrollArea] = React2.useState(null);
|
||||
const [viewport, setViewport] = React2.useState(null);
|
||||
const [content, setContent] = React2.useState(null);
|
||||
const [scrollbarX, setScrollbarX] = React2.useState(null);
|
||||
const [scrollbarY, setScrollbarY] = React2.useState(null);
|
||||
const [cornerWidth, setCornerWidth] = React2.useState(0);
|
||||
const [cornerHeight, setCornerHeight] = React2.useState(0);
|
||||
const [scrollbarXEnabled, setScrollbarXEnabled] = React2.useState(false);
|
||||
const [scrollbarYEnabled, setScrollbarYEnabled] = React2.useState(false);
|
||||
const composedRefs = useComposedRefs(forwardedRef, (node) => setScrollArea(node));
|
||||
const direction = useDirection(dir);
|
||||
return (0, import_jsx_runtime.jsx)(
|
||||
ScrollAreaProvider,
|
||||
{
|
||||
scope: __scopeScrollArea,
|
||||
type,
|
||||
dir: direction,
|
||||
scrollHideDelay,
|
||||
scrollArea,
|
||||
viewport,
|
||||
onViewportChange: setViewport,
|
||||
content,
|
||||
onContentChange: setContent,
|
||||
scrollbarX,
|
||||
onScrollbarXChange: setScrollbarX,
|
||||
scrollbarXEnabled,
|
||||
onScrollbarXEnabledChange: setScrollbarXEnabled,
|
||||
scrollbarY,
|
||||
onScrollbarYChange: setScrollbarY,
|
||||
scrollbarYEnabled,
|
||||
onScrollbarYEnabledChange: setScrollbarYEnabled,
|
||||
onCornerWidthChange: setCornerWidth,
|
||||
onCornerHeightChange: setCornerHeight,
|
||||
children: (0, import_jsx_runtime.jsx)(
|
||||
Primitive.div,
|
||||
{
|
||||
dir: direction,
|
||||
...scrollAreaProps,
|
||||
ref: composedRefs,
|
||||
style: {
|
||||
position: "relative",
|
||||
// Pass corner sizes as CSS vars to reduce re-renders of context consumers
|
||||
["--radix-scroll-area-corner-width"]: cornerWidth + "px",
|
||||
["--radix-scroll-area-corner-height"]: cornerHeight + "px",
|
||||
...props.style
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
ScrollArea.displayName = SCROLL_AREA_NAME;
|
||||
var VIEWPORT_NAME = "ScrollAreaViewport";
|
||||
var ScrollAreaViewport = React2.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeScrollArea, children, nonce, ...viewportProps } = props;
|
||||
const context = useScrollAreaContext(VIEWPORT_NAME, __scopeScrollArea);
|
||||
const ref = React2.useRef(null);
|
||||
const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);
|
||||
return (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
||||
(0, import_jsx_runtime.jsx)(
|
||||
"style",
|
||||
{
|
||||
dangerouslySetInnerHTML: {
|
||||
__html: `[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`
|
||||
},
|
||||
nonce
|
||||
}
|
||||
),
|
||||
(0, import_jsx_runtime.jsx)(
|
||||
Primitive.div,
|
||||
{
|
||||
"data-radix-scroll-area-viewport": "",
|
||||
...viewportProps,
|
||||
ref: composedRefs,
|
||||
style: {
|
||||
/**
|
||||
* We don't support `visible` because the intention is to have at least one scrollbar
|
||||
* if this component is used and `visible` will behave like `auto` in that case
|
||||
* https://developer.mozilla.org/en-US/docs/Web/CSS/overflow#description
|
||||
*
|
||||
* We don't handle `auto` because the intention is for the native implementation
|
||||
* to be hidden if using this component. We just want to ensure the node is scrollable
|
||||
* so could have used either `scroll` or `auto` here. We picked `scroll` to prevent
|
||||
* the browser from having to work out whether to render native scrollbars or not,
|
||||
* we tell it to with the intention of hiding them in CSS.
|
||||
*/
|
||||
overflowX: context.scrollbarXEnabled ? "scroll" : "hidden",
|
||||
overflowY: context.scrollbarYEnabled ? "scroll" : "hidden",
|
||||
...props.style
|
||||
},
|
||||
children: (0, import_jsx_runtime.jsx)("div", { ref: context.onContentChange, style: { minWidth: "100%", display: "table" }, children })
|
||||
}
|
||||
)
|
||||
] });
|
||||
}
|
||||
);
|
||||
ScrollAreaViewport.displayName = VIEWPORT_NAME;
|
||||
var SCROLLBAR_NAME = "ScrollAreaScrollbar";
|
||||
var ScrollAreaScrollbar = React2.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { forceMount, ...scrollbarProps } = props;
|
||||
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
||||
const { onScrollbarXEnabledChange, onScrollbarYEnabledChange } = context;
|
||||
const isHorizontal = props.orientation === "horizontal";
|
||||
React2.useEffect(() => {
|
||||
isHorizontal ? onScrollbarXEnabledChange(true) : onScrollbarYEnabledChange(true);
|
||||
return () => {
|
||||
isHorizontal ? onScrollbarXEnabledChange(false) : onScrollbarYEnabledChange(false);
|
||||
};
|
||||
}, [isHorizontal, onScrollbarXEnabledChange, onScrollbarYEnabledChange]);
|
||||
return context.type === "hover" ? (0, import_jsx_runtime.jsx)(ScrollAreaScrollbarHover, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === "scroll" ? (0, import_jsx_runtime.jsx)(ScrollAreaScrollbarScroll, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === "auto" ? (0, import_jsx_runtime.jsx)(ScrollAreaScrollbarAuto, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === "always" ? (0, import_jsx_runtime.jsx)(ScrollAreaScrollbarVisible, { ...scrollbarProps, ref: forwardedRef }) : null;
|
||||
}
|
||||
);
|
||||
ScrollAreaScrollbar.displayName = SCROLLBAR_NAME;
|
||||
var ScrollAreaScrollbarHover = React2.forwardRef((props, forwardedRef) => {
|
||||
const { forceMount, ...scrollbarProps } = props;
|
||||
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
||||
const [visible, setVisible] = React2.useState(false);
|
||||
React2.useEffect(() => {
|
||||
const scrollArea = context.scrollArea;
|
||||
let hideTimer = 0;
|
||||
if (scrollArea) {
|
||||
const handlePointerEnter = () => {
|
||||
window.clearTimeout(hideTimer);
|
||||
setVisible(true);
|
||||
};
|
||||
const handlePointerLeave = () => {
|
||||
hideTimer = window.setTimeout(() => setVisible(false), context.scrollHideDelay);
|
||||
};
|
||||
scrollArea.addEventListener("pointerenter", handlePointerEnter);
|
||||
scrollArea.addEventListener("pointerleave", handlePointerLeave);
|
||||
return () => {
|
||||
window.clearTimeout(hideTimer);
|
||||
scrollArea.removeEventListener("pointerenter", handlePointerEnter);
|
||||
scrollArea.removeEventListener("pointerleave", handlePointerLeave);
|
||||
};
|
||||
}
|
||||
}, [context.scrollArea, context.scrollHideDelay]);
|
||||
return (0, import_jsx_runtime.jsx)(Presence, { present: forceMount || visible, children: (0, import_jsx_runtime.jsx)(
|
||||
ScrollAreaScrollbarAuto,
|
||||
{
|
||||
"data-state": visible ? "visible" : "hidden",
|
||||
...scrollbarProps,
|
||||
ref: forwardedRef
|
||||
}
|
||||
) });
|
||||
});
|
||||
var ScrollAreaScrollbarScroll = React2.forwardRef((props, forwardedRef) => {
|
||||
const { forceMount, ...scrollbarProps } = props;
|
||||
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
||||
const isHorizontal = props.orientation === "horizontal";
|
||||
const debounceScrollEnd = useDebounceCallback(() => send("SCROLL_END"), 100);
|
||||
const [state, send] = useStateMachine("hidden", {
|
||||
hidden: {
|
||||
SCROLL: "scrolling"
|
||||
},
|
||||
scrolling: {
|
||||
SCROLL_END: "idle",
|
||||
POINTER_ENTER: "interacting"
|
||||
},
|
||||
interacting: {
|
||||
SCROLL: "interacting",
|
||||
POINTER_LEAVE: "idle"
|
||||
},
|
||||
idle: {
|
||||
HIDE: "hidden",
|
||||
SCROLL: "scrolling",
|
||||
POINTER_ENTER: "interacting"
|
||||
}
|
||||
});
|
||||
React2.useEffect(() => {
|
||||
if (state === "idle") {
|
||||
const hideTimer = window.setTimeout(() => send("HIDE"), context.scrollHideDelay);
|
||||
return () => window.clearTimeout(hideTimer);
|
||||
}
|
||||
}, [state, context.scrollHideDelay, send]);
|
||||
React2.useEffect(() => {
|
||||
const viewport = context.viewport;
|
||||
const scrollDirection = isHorizontal ? "scrollLeft" : "scrollTop";
|
||||
if (viewport) {
|
||||
let prevScrollPos = viewport[scrollDirection];
|
||||
const handleScroll = () => {
|
||||
const scrollPos = viewport[scrollDirection];
|
||||
const hasScrollInDirectionChanged = prevScrollPos !== scrollPos;
|
||||
if (hasScrollInDirectionChanged) {
|
||||
send("SCROLL");
|
||||
debounceScrollEnd();
|
||||
}
|
||||
prevScrollPos = scrollPos;
|
||||
};
|
||||
viewport.addEventListener("scroll", handleScroll);
|
||||
return () => viewport.removeEventListener("scroll", handleScroll);
|
||||
}
|
||||
}, [context.viewport, isHorizontal, send, debounceScrollEnd]);
|
||||
return (0, import_jsx_runtime.jsx)(Presence, { present: forceMount || state !== "hidden", children: (0, import_jsx_runtime.jsx)(
|
||||
ScrollAreaScrollbarVisible,
|
||||
{
|
||||
"data-state": state === "hidden" ? "hidden" : "visible",
|
||||
...scrollbarProps,
|
||||
ref: forwardedRef,
|
||||
onPointerEnter: composeEventHandlers(props.onPointerEnter, () => send("POINTER_ENTER")),
|
||||
onPointerLeave: composeEventHandlers(props.onPointerLeave, () => send("POINTER_LEAVE"))
|
||||
}
|
||||
) });
|
||||
});
|
||||
var ScrollAreaScrollbarAuto = React2.forwardRef((props, forwardedRef) => {
|
||||
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
||||
const { forceMount, ...scrollbarProps } = props;
|
||||
const [visible, setVisible] = React2.useState(false);
|
||||
const isHorizontal = props.orientation === "horizontal";
|
||||
const handleResize = useDebounceCallback(() => {
|
||||
if (context.viewport) {
|
||||
const isOverflowX = context.viewport.offsetWidth < context.viewport.scrollWidth;
|
||||
const isOverflowY = context.viewport.offsetHeight < context.viewport.scrollHeight;
|
||||
setVisible(isHorizontal ? isOverflowX : isOverflowY);
|
||||
}
|
||||
}, 10);
|
||||
useResizeObserver(context.viewport, handleResize);
|
||||
useResizeObserver(context.content, handleResize);
|
||||
return (0, import_jsx_runtime.jsx)(Presence, { present: forceMount || visible, children: (0, import_jsx_runtime.jsx)(
|
||||
ScrollAreaScrollbarVisible,
|
||||
{
|
||||
"data-state": visible ? "visible" : "hidden",
|
||||
...scrollbarProps,
|
||||
ref: forwardedRef
|
||||
}
|
||||
) });
|
||||
});
|
||||
var ScrollAreaScrollbarVisible = React2.forwardRef((props, forwardedRef) => {
|
||||
const { orientation = "vertical", ...scrollbarProps } = props;
|
||||
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
||||
const thumbRef = React2.useRef(null);
|
||||
const pointerOffsetRef = React2.useRef(0);
|
||||
const [sizes, setSizes] = React2.useState({
|
||||
content: 0,
|
||||
viewport: 0,
|
||||
scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
|
||||
});
|
||||
const thumbRatio = getThumbRatio(sizes.viewport, sizes.content);
|
||||
const commonProps = {
|
||||
...scrollbarProps,
|
||||
sizes,
|
||||
onSizesChange: setSizes,
|
||||
hasThumb: Boolean(thumbRatio > 0 && thumbRatio < 1),
|
||||
onThumbChange: (thumb) => thumbRef.current = thumb,
|
||||
onThumbPointerUp: () => pointerOffsetRef.current = 0,
|
||||
onThumbPointerDown: (pointerPos) => pointerOffsetRef.current = pointerPos
|
||||
};
|
||||
function getScrollPosition(pointerPos, dir) {
|
||||
return getScrollPositionFromPointer(pointerPos, pointerOffsetRef.current, sizes, dir);
|
||||
}
|
||||
if (orientation === "horizontal") {
|
||||
return (0, import_jsx_runtime.jsx)(
|
||||
ScrollAreaScrollbarX,
|
||||
{
|
||||
...commonProps,
|
||||
ref: forwardedRef,
|
||||
onThumbPositionChange: () => {
|
||||
if (context.viewport && thumbRef.current) {
|
||||
const scrollPos = context.viewport.scrollLeft;
|
||||
const offset = getThumbOffsetFromScroll(scrollPos, sizes, context.dir);
|
||||
thumbRef.current.style.transform = `translate3d(${offset}px, 0, 0)`;
|
||||
}
|
||||
},
|
||||
onWheelScroll: (scrollPos) => {
|
||||
if (context.viewport) context.viewport.scrollLeft = scrollPos;
|
||||
},
|
||||
onDragScroll: (pointerPos) => {
|
||||
if (context.viewport) {
|
||||
context.viewport.scrollLeft = getScrollPosition(pointerPos, context.dir);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
if (orientation === "vertical") {
|
||||
return (0, import_jsx_runtime.jsx)(
|
||||
ScrollAreaScrollbarY,
|
||||
{
|
||||
...commonProps,
|
||||
ref: forwardedRef,
|
||||
onThumbPositionChange: () => {
|
||||
if (context.viewport && thumbRef.current) {
|
||||
const scrollPos = context.viewport.scrollTop;
|
||||
const offset = getThumbOffsetFromScroll(scrollPos, sizes);
|
||||
thumbRef.current.style.transform = `translate3d(0, ${offset}px, 0)`;
|
||||
}
|
||||
},
|
||||
onWheelScroll: (scrollPos) => {
|
||||
if (context.viewport) context.viewport.scrollTop = scrollPos;
|
||||
},
|
||||
onDragScroll: (pointerPos) => {
|
||||
if (context.viewport) context.viewport.scrollTop = getScrollPosition(pointerPos);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
return null;
|
||||
});
|
||||
var ScrollAreaScrollbarX = React2.forwardRef((props, forwardedRef) => {
|
||||
const { sizes, onSizesChange, ...scrollbarProps } = props;
|
||||
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
||||
const [computedStyle, setComputedStyle] = React2.useState();
|
||||
const ref = React2.useRef(null);
|
||||
const composeRefs = useComposedRefs(forwardedRef, ref, context.onScrollbarXChange);
|
||||
React2.useEffect(() => {
|
||||
if (ref.current) setComputedStyle(getComputedStyle(ref.current));
|
||||
}, [ref]);
|
||||
return (0, import_jsx_runtime.jsx)(
|
||||
ScrollAreaScrollbarImpl,
|
||||
{
|
||||
"data-orientation": "horizontal",
|
||||
...scrollbarProps,
|
||||
ref: composeRefs,
|
||||
sizes,
|
||||
style: {
|
||||
bottom: 0,
|
||||
left: context.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
|
||||
right: context.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
|
||||
["--radix-scroll-area-thumb-width"]: getThumbSize(sizes) + "px",
|
||||
...props.style
|
||||
},
|
||||
onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.x),
|
||||
onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.x),
|
||||
onWheelScroll: (event, maxScrollPos) => {
|
||||
if (context.viewport) {
|
||||
const scrollPos = context.viewport.scrollLeft + event.deltaX;
|
||||
props.onWheelScroll(scrollPos);
|
||||
if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
},
|
||||
onResize: () => {
|
||||
if (ref.current && context.viewport && computedStyle) {
|
||||
onSizesChange({
|
||||
content: context.viewport.scrollWidth,
|
||||
viewport: context.viewport.offsetWidth,
|
||||
scrollbar: {
|
||||
size: ref.current.clientWidth,
|
||||
paddingStart: toInt(computedStyle.paddingLeft),
|
||||
paddingEnd: toInt(computedStyle.paddingRight)
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
var ScrollAreaScrollbarY = React2.forwardRef((props, forwardedRef) => {
|
||||
const { sizes, onSizesChange, ...scrollbarProps } = props;
|
||||
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
||||
const [computedStyle, setComputedStyle] = React2.useState();
|
||||
const ref = React2.useRef(null);
|
||||
const composeRefs = useComposedRefs(forwardedRef, ref, context.onScrollbarYChange);
|
||||
React2.useEffect(() => {
|
||||
if (ref.current) setComputedStyle(getComputedStyle(ref.current));
|
||||
}, [ref]);
|
||||
return (0, import_jsx_runtime.jsx)(
|
||||
ScrollAreaScrollbarImpl,
|
||||
{
|
||||
"data-orientation": "vertical",
|
||||
...scrollbarProps,
|
||||
ref: composeRefs,
|
||||
sizes,
|
||||
style: {
|
||||
top: 0,
|
||||
right: context.dir === "ltr" ? 0 : void 0,
|
||||
left: context.dir === "rtl" ? 0 : void 0,
|
||||
bottom: "var(--radix-scroll-area-corner-height)",
|
||||
["--radix-scroll-area-thumb-height"]: getThumbSize(sizes) + "px",
|
||||
...props.style
|
||||
},
|
||||
onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.y),
|
||||
onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.y),
|
||||
onWheelScroll: (event, maxScrollPos) => {
|
||||
if (context.viewport) {
|
||||
const scrollPos = context.viewport.scrollTop + event.deltaY;
|
||||
props.onWheelScroll(scrollPos);
|
||||
if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
},
|
||||
onResize: () => {
|
||||
if (ref.current && context.viewport && computedStyle) {
|
||||
onSizesChange({
|
||||
content: context.viewport.scrollHeight,
|
||||
viewport: context.viewport.offsetHeight,
|
||||
scrollbar: {
|
||||
size: ref.current.clientHeight,
|
||||
paddingStart: toInt(computedStyle.paddingTop),
|
||||
paddingEnd: toInt(computedStyle.paddingBottom)
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
var [ScrollbarProvider, useScrollbarContext] = createScrollAreaContext(SCROLLBAR_NAME);
|
||||
var ScrollAreaScrollbarImpl = React2.forwardRef((props, forwardedRef) => {
|
||||
const {
|
||||
__scopeScrollArea,
|
||||
sizes,
|
||||
hasThumb,
|
||||
onThumbChange,
|
||||
onThumbPointerUp,
|
||||
onThumbPointerDown,
|
||||
onThumbPositionChange,
|
||||
onDragScroll,
|
||||
onWheelScroll,
|
||||
onResize,
|
||||
...scrollbarProps
|
||||
} = props;
|
||||
const context = useScrollAreaContext(SCROLLBAR_NAME, __scopeScrollArea);
|
||||
const [scrollbar, setScrollbar] = React2.useState(null);
|
||||
const composeRefs = useComposedRefs(forwardedRef, (node) => setScrollbar(node));
|
||||
const rectRef = React2.useRef(null);
|
||||
const prevWebkitUserSelectRef = React2.useRef("");
|
||||
const viewport = context.viewport;
|
||||
const maxScrollPos = sizes.content - sizes.viewport;
|
||||
const handleWheelScroll = useCallbackRef(onWheelScroll);
|
||||
const handleThumbPositionChange = useCallbackRef(onThumbPositionChange);
|
||||
const handleResize = useDebounceCallback(onResize, 10);
|
||||
function handleDragScroll(event) {
|
||||
if (rectRef.current) {
|
||||
const x = event.clientX - rectRef.current.left;
|
||||
const y = event.clientY - rectRef.current.top;
|
||||
onDragScroll({ x, y });
|
||||
}
|
||||
}
|
||||
React2.useEffect(() => {
|
||||
const handleWheel = (event) => {
|
||||
const element = event.target;
|
||||
const isScrollbarWheel = scrollbar == null ? void 0 : scrollbar.contains(element);
|
||||
if (isScrollbarWheel) handleWheelScroll(event, maxScrollPos);
|
||||
};
|
||||
document.addEventListener("wheel", handleWheel, { passive: false });
|
||||
return () => document.removeEventListener("wheel", handleWheel, { passive: false });
|
||||
}, [viewport, scrollbar, maxScrollPos, handleWheelScroll]);
|
||||
React2.useEffect(handleThumbPositionChange, [sizes, handleThumbPositionChange]);
|
||||
useResizeObserver(scrollbar, handleResize);
|
||||
useResizeObserver(context.content, handleResize);
|
||||
return (0, import_jsx_runtime.jsx)(
|
||||
ScrollbarProvider,
|
||||
{
|
||||
scope: __scopeScrollArea,
|
||||
scrollbar,
|
||||
hasThumb,
|
||||
onThumbChange: useCallbackRef(onThumbChange),
|
||||
onThumbPointerUp: useCallbackRef(onThumbPointerUp),
|
||||
onThumbPositionChange: handleThumbPositionChange,
|
||||
onThumbPointerDown: useCallbackRef(onThumbPointerDown),
|
||||
children: (0, import_jsx_runtime.jsx)(
|
||||
Primitive.div,
|
||||
{
|
||||
...scrollbarProps,
|
||||
ref: composeRefs,
|
||||
style: { position: "absolute", ...scrollbarProps.style },
|
||||
onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {
|
||||
const mainPointer = 0;
|
||||
if (event.button === mainPointer) {
|
||||
const element = event.target;
|
||||
element.setPointerCapture(event.pointerId);
|
||||
rectRef.current = scrollbar.getBoundingClientRect();
|
||||
prevWebkitUserSelectRef.current = document.body.style.webkitUserSelect;
|
||||
document.body.style.webkitUserSelect = "none";
|
||||
if (context.viewport) context.viewport.style.scrollBehavior = "auto";
|
||||
handleDragScroll(event);
|
||||
}
|
||||
}),
|
||||
onPointerMove: composeEventHandlers(props.onPointerMove, handleDragScroll),
|
||||
onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {
|
||||
const element = event.target;
|
||||
if (element.hasPointerCapture(event.pointerId)) {
|
||||
element.releasePointerCapture(event.pointerId);
|
||||
}
|
||||
document.body.style.webkitUserSelect = prevWebkitUserSelectRef.current;
|
||||
if (context.viewport) context.viewport.style.scrollBehavior = "";
|
||||
rectRef.current = null;
|
||||
})
|
||||
}
|
||||
)
|
||||
}
|
||||
);
|
||||
});
|
||||
var THUMB_NAME = "ScrollAreaThumb";
|
||||
var ScrollAreaThumb = React2.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { forceMount, ...thumbProps } = props;
|
||||
const scrollbarContext = useScrollbarContext(THUMB_NAME, props.__scopeScrollArea);
|
||||
return (0, import_jsx_runtime.jsx)(Presence, { present: forceMount || scrollbarContext.hasThumb, children: (0, import_jsx_runtime.jsx)(ScrollAreaThumbImpl, { ref: forwardedRef, ...thumbProps }) });
|
||||
}
|
||||
);
|
||||
var ScrollAreaThumbImpl = React2.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeScrollArea, style, ...thumbProps } = props;
|
||||
const scrollAreaContext = useScrollAreaContext(THUMB_NAME, __scopeScrollArea);
|
||||
const scrollbarContext = useScrollbarContext(THUMB_NAME, __scopeScrollArea);
|
||||
const { onThumbPositionChange } = scrollbarContext;
|
||||
const composedRef = useComposedRefs(
|
||||
forwardedRef,
|
||||
(node) => scrollbarContext.onThumbChange(node)
|
||||
);
|
||||
const removeUnlinkedScrollListenerRef = React2.useRef(void 0);
|
||||
const debounceScrollEnd = useDebounceCallback(() => {
|
||||
if (removeUnlinkedScrollListenerRef.current) {
|
||||
removeUnlinkedScrollListenerRef.current();
|
||||
removeUnlinkedScrollListenerRef.current = void 0;
|
||||
}
|
||||
}, 100);
|
||||
React2.useEffect(() => {
|
||||
const viewport = scrollAreaContext.viewport;
|
||||
if (viewport) {
|
||||
const handleScroll = () => {
|
||||
debounceScrollEnd();
|
||||
if (!removeUnlinkedScrollListenerRef.current) {
|
||||
const listener = addUnlinkedScrollListener(viewport, onThumbPositionChange);
|
||||
removeUnlinkedScrollListenerRef.current = listener;
|
||||
onThumbPositionChange();
|
||||
}
|
||||
};
|
||||
onThumbPositionChange();
|
||||
viewport.addEventListener("scroll", handleScroll);
|
||||
return () => viewport.removeEventListener("scroll", handleScroll);
|
||||
}
|
||||
}, [scrollAreaContext.viewport, debounceScrollEnd, onThumbPositionChange]);
|
||||
return (0, import_jsx_runtime.jsx)(
|
||||
Primitive.div,
|
||||
{
|
||||
"data-state": scrollbarContext.hasThumb ? "visible" : "hidden",
|
||||
...thumbProps,
|
||||
ref: composedRef,
|
||||
style: {
|
||||
width: "var(--radix-scroll-area-thumb-width)",
|
||||
height: "var(--radix-scroll-area-thumb-height)",
|
||||
...style
|
||||
},
|
||||
onPointerDownCapture: composeEventHandlers(props.onPointerDownCapture, (event) => {
|
||||
const thumb = event.target;
|
||||
const thumbRect = thumb.getBoundingClientRect();
|
||||
const x = event.clientX - thumbRect.left;
|
||||
const y = event.clientY - thumbRect.top;
|
||||
scrollbarContext.onThumbPointerDown({ x, y });
|
||||
}),
|
||||
onPointerUp: composeEventHandlers(props.onPointerUp, scrollbarContext.onThumbPointerUp)
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
ScrollAreaThumb.displayName = THUMB_NAME;
|
||||
var CORNER_NAME = "ScrollAreaCorner";
|
||||
var ScrollAreaCorner = React2.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const context = useScrollAreaContext(CORNER_NAME, props.__scopeScrollArea);
|
||||
const hasBothScrollbarsVisible = Boolean(context.scrollbarX && context.scrollbarY);
|
||||
const hasCorner = context.type !== "scroll" && hasBothScrollbarsVisible;
|
||||
return hasCorner ? (0, import_jsx_runtime.jsx)(ScrollAreaCornerImpl, { ...props, ref: forwardedRef }) : null;
|
||||
}
|
||||
);
|
||||
ScrollAreaCorner.displayName = CORNER_NAME;
|
||||
var ScrollAreaCornerImpl = React2.forwardRef((props, forwardedRef) => {
|
||||
const { __scopeScrollArea, ...cornerProps } = props;
|
||||
const context = useScrollAreaContext(CORNER_NAME, __scopeScrollArea);
|
||||
const [width, setWidth] = React2.useState(0);
|
||||
const [height, setHeight] = React2.useState(0);
|
||||
const hasSize = Boolean(width && height);
|
||||
useResizeObserver(context.scrollbarX, () => {
|
||||
var _a;
|
||||
const height2 = ((_a = context.scrollbarX) == null ? void 0 : _a.offsetHeight) || 0;
|
||||
context.onCornerHeightChange(height2);
|
||||
setHeight(height2);
|
||||
});
|
||||
useResizeObserver(context.scrollbarY, () => {
|
||||
var _a;
|
||||
const width2 = ((_a = context.scrollbarY) == null ? void 0 : _a.offsetWidth) || 0;
|
||||
context.onCornerWidthChange(width2);
|
||||
setWidth(width2);
|
||||
});
|
||||
return hasSize ? (0, import_jsx_runtime.jsx)(
|
||||
Primitive.div,
|
||||
{
|
||||
...cornerProps,
|
||||
ref: forwardedRef,
|
||||
style: {
|
||||
width,
|
||||
height,
|
||||
position: "absolute",
|
||||
right: context.dir === "ltr" ? 0 : void 0,
|
||||
left: context.dir === "rtl" ? 0 : void 0,
|
||||
bottom: 0,
|
||||
...props.style
|
||||
}
|
||||
}
|
||||
) : null;
|
||||
});
|
||||
function toInt(value) {
|
||||
return value ? parseInt(value, 10) : 0;
|
||||
}
|
||||
function getThumbRatio(viewportSize, contentSize) {
|
||||
const ratio = viewportSize / contentSize;
|
||||
return isNaN(ratio) ? 0 : ratio;
|
||||
}
|
||||
function getThumbSize(sizes) {
|
||||
const ratio = getThumbRatio(sizes.viewport, sizes.content);
|
||||
const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;
|
||||
const thumbSize = (sizes.scrollbar.size - scrollbarPadding) * ratio;
|
||||
return Math.max(thumbSize, 18);
|
||||
}
|
||||
function getScrollPositionFromPointer(pointerPos, pointerOffset, sizes, dir = "ltr") {
|
||||
const thumbSizePx = getThumbSize(sizes);
|
||||
const thumbCenter = thumbSizePx / 2;
|
||||
const offset = pointerOffset || thumbCenter;
|
||||
const thumbOffsetFromEnd = thumbSizePx - offset;
|
||||
const minPointerPos = sizes.scrollbar.paddingStart + offset;
|
||||
const maxPointerPos = sizes.scrollbar.size - sizes.scrollbar.paddingEnd - thumbOffsetFromEnd;
|
||||
const maxScrollPos = sizes.content - sizes.viewport;
|
||||
const scrollRange = dir === "ltr" ? [0, maxScrollPos] : [maxScrollPos * -1, 0];
|
||||
const interpolate = linearScale([minPointerPos, maxPointerPos], scrollRange);
|
||||
return interpolate(pointerPos);
|
||||
}
|
||||
function getThumbOffsetFromScroll(scrollPos, sizes, dir = "ltr") {
|
||||
const thumbSizePx = getThumbSize(sizes);
|
||||
const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;
|
||||
const scrollbar = sizes.scrollbar.size - scrollbarPadding;
|
||||
const maxScrollPos = sizes.content - sizes.viewport;
|
||||
const maxThumbPos = scrollbar - thumbSizePx;
|
||||
const scrollClampRange = dir === "ltr" ? [0, maxScrollPos] : [maxScrollPos * -1, 0];
|
||||
const scrollWithoutMomentum = clamp(scrollPos, scrollClampRange);
|
||||
const interpolate = linearScale([0, maxScrollPos], [0, maxThumbPos]);
|
||||
return interpolate(scrollWithoutMomentum);
|
||||
}
|
||||
function linearScale(input, output) {
|
||||
return (value) => {
|
||||
if (input[0] === input[1] || output[0] === output[1]) return output[0];
|
||||
const ratio = (output[1] - output[0]) / (input[1] - input[0]);
|
||||
return output[0] + ratio * (value - input[0]);
|
||||
};
|
||||
}
|
||||
function isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos) {
|
||||
return scrollPos > 0 && scrollPos < maxScrollPos;
|
||||
}
|
||||
var addUnlinkedScrollListener = (node, handler = () => {
|
||||
}) => {
|
||||
let prevPosition = { left: node.scrollLeft, top: node.scrollTop };
|
||||
let rAF = 0;
|
||||
(function loop() {
|
||||
const position = { left: node.scrollLeft, top: node.scrollTop };
|
||||
const isHorizontalScroll = prevPosition.left !== position.left;
|
||||
const isVerticalScroll = prevPosition.top !== position.top;
|
||||
if (isHorizontalScroll || isVerticalScroll) handler();
|
||||
prevPosition = position;
|
||||
rAF = window.requestAnimationFrame(loop);
|
||||
})();
|
||||
return () => window.cancelAnimationFrame(rAF);
|
||||
};
|
||||
function useDebounceCallback(callback, delay) {
|
||||
const handleCallback = useCallbackRef(callback);
|
||||
const debounceTimerRef = React2.useRef(0);
|
||||
React2.useEffect(() => () => window.clearTimeout(debounceTimerRef.current), []);
|
||||
return React2.useCallback(() => {
|
||||
window.clearTimeout(debounceTimerRef.current);
|
||||
debounceTimerRef.current = window.setTimeout(handleCallback, delay);
|
||||
}, [handleCallback, delay]);
|
||||
}
|
||||
function useResizeObserver(element, onResize) {
|
||||
const handleResize = useCallbackRef(onResize);
|
||||
useLayoutEffect2(() => {
|
||||
let rAF = 0;
|
||||
if (element) {
|
||||
const resizeObserver = new ResizeObserver(() => {
|
||||
cancelAnimationFrame(rAF);
|
||||
rAF = window.requestAnimationFrame(handleResize);
|
||||
});
|
||||
resizeObserver.observe(element);
|
||||
return () => {
|
||||
window.cancelAnimationFrame(rAF);
|
||||
resizeObserver.unobserve(element);
|
||||
};
|
||||
}
|
||||
}, [element, handleResize]);
|
||||
}
|
||||
var Root = ScrollArea;
|
||||
var Viewport = ScrollAreaViewport;
|
||||
var Scrollbar = ScrollAreaScrollbar;
|
||||
var Thumb = ScrollAreaThumb;
|
||||
var Corner = ScrollAreaCorner;
|
||||
export {
|
||||
Corner,
|
||||
Root,
|
||||
ScrollArea,
|
||||
ScrollAreaCorner,
|
||||
ScrollAreaScrollbar,
|
||||
ScrollAreaThumb,
|
||||
ScrollAreaViewport,
|
||||
Scrollbar,
|
||||
Thumb,
|
||||
Viewport,
|
||||
createScrollAreaScope
|
||||
};
|
||||
//# sourceMappingURL=@radix-ui_react-scroll-area.js.map
|
||||
7
node_modules/.vite/deps/@radix-ui_react-scroll-area.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/@radix-ui_react-scroll-area.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
14
node_modules/.vite/deps/@radix-ui_react-slot.js
generated
vendored
Normal file
14
node_modules/.vite/deps/@radix-ui_react-slot.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import {
|
||||
Root,
|
||||
Slot,
|
||||
Slottable
|
||||
} from "./chunk-7CEJWY55.js";
|
||||
import "./chunk-6PXSGDAH.js";
|
||||
import "./chunk-DRWLMN53.js";
|
||||
import "./chunk-G3PMV62Z.js";
|
||||
export {
|
||||
Root,
|
||||
Slot,
|
||||
Slottable
|
||||
};
|
||||
//# sourceMappingURL=@radix-ui_react-slot.js.map
|
||||
7
node_modules/.vite/deps/@radix-ui_react-slot.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/@radix-ui_react-slot.js.map
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sourcesContent": [],
|
||||
"mappings": "",
|
||||
"names": []
|
||||
}
|
||||
557
node_modules/.vite/deps/@radix-ui_react-tooltip.js
generated
vendored
Normal file
557
node_modules/.vite/deps/@radix-ui_react-tooltip.js
generated
vendored
Normal file
@@ -0,0 +1,557 @@
|
||||
"use client";
|
||||
import {
|
||||
Anchor,
|
||||
Arrow,
|
||||
Content,
|
||||
Root2,
|
||||
createPopperScope
|
||||
} from "./chunk-ZPHTTZ5Y.js";
|
||||
import {
|
||||
DismissableLayer,
|
||||
Portal,
|
||||
useControllableState,
|
||||
useId
|
||||
} from "./chunk-NQHNXVMS.js";
|
||||
import {
|
||||
Presence,
|
||||
composeEventHandlers
|
||||
} from "./chunk-KWKVM5C6.js";
|
||||
import {
|
||||
Primitive,
|
||||
createContextScope
|
||||
} from "./chunk-LMM3RUZD.js";
|
||||
import "./chunk-PJEEZAML.js";
|
||||
import {
|
||||
Slottable,
|
||||
useComposedRefs
|
||||
} from "./chunk-7CEJWY55.js";
|
||||
import {
|
||||
require_jsx_runtime
|
||||
} from "./chunk-6PXSGDAH.js";
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-DRWLMN53.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk-G3PMV62Z.js";
|
||||
|
||||
// node_modules/@radix-ui/react-tooltip/dist/index.mjs
|
||||
var React2 = __toESM(require_react(), 1);
|
||||
|
||||
// node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
||||
var React = __toESM(require_react(), 1);
|
||||
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
||||
var NAME = "VisuallyHidden";
|
||||
var VisuallyHidden = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
return (0, import_jsx_runtime.jsx)(
|
||||
Primitive.span,
|
||||
{
|
||||
...props,
|
||||
ref: forwardedRef,
|
||||
style: {
|
||||
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
||||
position: "absolute",
|
||||
border: 0,
|
||||
width: 1,
|
||||
height: 1,
|
||||
padding: 0,
|
||||
margin: -1,
|
||||
overflow: "hidden",
|
||||
clip: "rect(0, 0, 0, 0)",
|
||||
whiteSpace: "nowrap",
|
||||
wordWrap: "normal",
|
||||
...props.style
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
VisuallyHidden.displayName = NAME;
|
||||
var Root = VisuallyHidden;
|
||||
|
||||
// node_modules/@radix-ui/react-tooltip/dist/index.mjs
|
||||
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
|
||||
var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
|
||||
createPopperScope
|
||||
]);
|
||||
var usePopperScope = createPopperScope();
|
||||
var PROVIDER_NAME = "TooltipProvider";
|
||||
var DEFAULT_DELAY_DURATION = 700;
|
||||
var TOOLTIP_OPEN = "tooltip.open";
|
||||
var [TooltipProviderContextProvider, useTooltipProviderContext] = createTooltipContext(PROVIDER_NAME);
|
||||
var TooltipProvider = (props) => {
|
||||
const {
|
||||
__scopeTooltip,
|
||||
delayDuration = DEFAULT_DELAY_DURATION,
|
||||
skipDelayDuration = 300,
|
||||
disableHoverableContent = false,
|
||||
children
|
||||
} = props;
|
||||
const [isOpenDelayed, setIsOpenDelayed] = React2.useState(true);
|
||||
const isPointerInTransitRef = React2.useRef(false);
|
||||
const skipDelayTimerRef = React2.useRef(0);
|
||||
React2.useEffect(() => {
|
||||
const skipDelayTimer = skipDelayTimerRef.current;
|
||||
return () => window.clearTimeout(skipDelayTimer);
|
||||
}, []);
|
||||
return (0, import_jsx_runtime2.jsx)(
|
||||
TooltipProviderContextProvider,
|
||||
{
|
||||
scope: __scopeTooltip,
|
||||
isOpenDelayed,
|
||||
delayDuration,
|
||||
onOpen: React2.useCallback(() => {
|
||||
window.clearTimeout(skipDelayTimerRef.current);
|
||||
setIsOpenDelayed(false);
|
||||
}, []),
|
||||
onClose: React2.useCallback(() => {
|
||||
window.clearTimeout(skipDelayTimerRef.current);
|
||||
skipDelayTimerRef.current = window.setTimeout(
|
||||
() => setIsOpenDelayed(true),
|
||||
skipDelayDuration
|
||||
);
|
||||
}, [skipDelayDuration]),
|
||||
isPointerInTransitRef,
|
||||
onPointerInTransitChange: React2.useCallback((inTransit) => {
|
||||
isPointerInTransitRef.current = inTransit;
|
||||
}, []),
|
||||
disableHoverableContent,
|
||||
children
|
||||
}
|
||||
);
|
||||
};
|
||||
TooltipProvider.displayName = PROVIDER_NAME;
|
||||
var TOOLTIP_NAME = "Tooltip";
|
||||
var [TooltipContextProvider, useTooltipContext] = createTooltipContext(TOOLTIP_NAME);
|
||||
var Tooltip = (props) => {
|
||||
const {
|
||||
__scopeTooltip,
|
||||
children,
|
||||
open: openProp,
|
||||
defaultOpen = false,
|
||||
onOpenChange,
|
||||
disableHoverableContent: disableHoverableContentProp,
|
||||
delayDuration: delayDurationProp
|
||||
} = props;
|
||||
const providerContext = useTooltipProviderContext(TOOLTIP_NAME, props.__scopeTooltip);
|
||||
const popperScope = usePopperScope(__scopeTooltip);
|
||||
const [trigger, setTrigger] = React2.useState(null);
|
||||
const contentId = useId();
|
||||
const openTimerRef = React2.useRef(0);
|
||||
const disableHoverableContent = disableHoverableContentProp ?? providerContext.disableHoverableContent;
|
||||
const delayDuration = delayDurationProp ?? providerContext.delayDuration;
|
||||
const wasOpenDelayedRef = React2.useRef(false);
|
||||
const [open = false, setOpen] = useControllableState({
|
||||
prop: openProp,
|
||||
defaultProp: defaultOpen,
|
||||
onChange: (open2) => {
|
||||
if (open2) {
|
||||
providerContext.onOpen();
|
||||
document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN));
|
||||
} else {
|
||||
providerContext.onClose();
|
||||
}
|
||||
onOpenChange == null ? void 0 : onOpenChange(open2);
|
||||
}
|
||||
});
|
||||
const stateAttribute = React2.useMemo(() => {
|
||||
return open ? wasOpenDelayedRef.current ? "delayed-open" : "instant-open" : "closed";
|
||||
}, [open]);
|
||||
const handleOpen = React2.useCallback(() => {
|
||||
window.clearTimeout(openTimerRef.current);
|
||||
openTimerRef.current = 0;
|
||||
wasOpenDelayedRef.current = false;
|
||||
setOpen(true);
|
||||
}, [setOpen]);
|
||||
const handleClose = React2.useCallback(() => {
|
||||
window.clearTimeout(openTimerRef.current);
|
||||
openTimerRef.current = 0;
|
||||
setOpen(false);
|
||||
}, [setOpen]);
|
||||
const handleDelayedOpen = React2.useCallback(() => {
|
||||
window.clearTimeout(openTimerRef.current);
|
||||
openTimerRef.current = window.setTimeout(() => {
|
||||
wasOpenDelayedRef.current = true;
|
||||
setOpen(true);
|
||||
openTimerRef.current = 0;
|
||||
}, delayDuration);
|
||||
}, [delayDuration, setOpen]);
|
||||
React2.useEffect(() => {
|
||||
return () => {
|
||||
if (openTimerRef.current) {
|
||||
window.clearTimeout(openTimerRef.current);
|
||||
openTimerRef.current = 0;
|
||||
}
|
||||
};
|
||||
}, []);
|
||||
return (0, import_jsx_runtime2.jsx)(Root2, { ...popperScope, children: (0, import_jsx_runtime2.jsx)(
|
||||
TooltipContextProvider,
|
||||
{
|
||||
scope: __scopeTooltip,
|
||||
contentId,
|
||||
open,
|
||||
stateAttribute,
|
||||
trigger,
|
||||
onTriggerChange: setTrigger,
|
||||
onTriggerEnter: React2.useCallback(() => {
|
||||
if (providerContext.isOpenDelayed) handleDelayedOpen();
|
||||
else handleOpen();
|
||||
}, [providerContext.isOpenDelayed, handleDelayedOpen, handleOpen]),
|
||||
onTriggerLeave: React2.useCallback(() => {
|
||||
if (disableHoverableContent) {
|
||||
handleClose();
|
||||
} else {
|
||||
window.clearTimeout(openTimerRef.current);
|
||||
openTimerRef.current = 0;
|
||||
}
|
||||
}, [handleClose, disableHoverableContent]),
|
||||
onOpen: handleOpen,
|
||||
onClose: handleClose,
|
||||
disableHoverableContent,
|
||||
children
|
||||
}
|
||||
) });
|
||||
};
|
||||
Tooltip.displayName = TOOLTIP_NAME;
|
||||
var TRIGGER_NAME = "TooltipTrigger";
|
||||
var TooltipTrigger = React2.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeTooltip, ...triggerProps } = props;
|
||||
const context = useTooltipContext(TRIGGER_NAME, __scopeTooltip);
|
||||
const providerContext = useTooltipProviderContext(TRIGGER_NAME, __scopeTooltip);
|
||||
const popperScope = usePopperScope(__scopeTooltip);
|
||||
const ref = React2.useRef(null);
|
||||
const composedRefs = useComposedRefs(forwardedRef, ref, context.onTriggerChange);
|
||||
const isPointerDownRef = React2.useRef(false);
|
||||
const hasPointerMoveOpenedRef = React2.useRef(false);
|
||||
const handlePointerUp = React2.useCallback(() => isPointerDownRef.current = false, []);
|
||||
React2.useEffect(() => {
|
||||
return () => document.removeEventListener("pointerup", handlePointerUp);
|
||||
}, [handlePointerUp]);
|
||||
return (0, import_jsx_runtime2.jsx)(Anchor, { asChild: true, ...popperScope, children: (0, import_jsx_runtime2.jsx)(
|
||||
Primitive.button,
|
||||
{
|
||||
"aria-describedby": context.open ? context.contentId : void 0,
|
||||
"data-state": context.stateAttribute,
|
||||
...triggerProps,
|
||||
ref: composedRefs,
|
||||
onPointerMove: composeEventHandlers(props.onPointerMove, (event) => {
|
||||
if (event.pointerType === "touch") return;
|
||||
if (!hasPointerMoveOpenedRef.current && !providerContext.isPointerInTransitRef.current) {
|
||||
context.onTriggerEnter();
|
||||
hasPointerMoveOpenedRef.current = true;
|
||||
}
|
||||
}),
|
||||
onPointerLeave: composeEventHandlers(props.onPointerLeave, () => {
|
||||
context.onTriggerLeave();
|
||||
hasPointerMoveOpenedRef.current = false;
|
||||
}),
|
||||
onPointerDown: composeEventHandlers(props.onPointerDown, () => {
|
||||
isPointerDownRef.current = true;
|
||||
document.addEventListener("pointerup", handlePointerUp, { once: true });
|
||||
}),
|
||||
onFocus: composeEventHandlers(props.onFocus, () => {
|
||||
if (!isPointerDownRef.current) context.onOpen();
|
||||
}),
|
||||
onBlur: composeEventHandlers(props.onBlur, context.onClose),
|
||||
onClick: composeEventHandlers(props.onClick, context.onClose)
|
||||
}
|
||||
) });
|
||||
}
|
||||
);
|
||||
TooltipTrigger.displayName = TRIGGER_NAME;
|
||||
var PORTAL_NAME = "TooltipPortal";
|
||||
var [PortalProvider, usePortalContext] = createTooltipContext(PORTAL_NAME, {
|
||||
forceMount: void 0
|
||||
});
|
||||
var TooltipPortal = (props) => {
|
||||
const { __scopeTooltip, forceMount, children, container } = props;
|
||||
const context = useTooltipContext(PORTAL_NAME, __scopeTooltip);
|
||||
return (0, import_jsx_runtime2.jsx)(PortalProvider, { scope: __scopeTooltip, forceMount, children: (0, import_jsx_runtime2.jsx)(Presence, { present: forceMount || context.open, children: (0, import_jsx_runtime2.jsx)(Portal, { asChild: true, container, children }) }) });
|
||||
};
|
||||
TooltipPortal.displayName = PORTAL_NAME;
|
||||
var CONTENT_NAME = "TooltipContent";
|
||||
var TooltipContent = React2.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeTooltip);
|
||||
const { forceMount = portalContext.forceMount, side = "top", ...contentProps } = props;
|
||||
const context = useTooltipContext(CONTENT_NAME, props.__scopeTooltip);
|
||||
return (0, import_jsx_runtime2.jsx)(Presence, { present: forceMount || context.open, children: context.disableHoverableContent ? (0, import_jsx_runtime2.jsx)(TooltipContentImpl, { side, ...contentProps, ref: forwardedRef }) : (0, import_jsx_runtime2.jsx)(TooltipContentHoverable, { side, ...contentProps, ref: forwardedRef }) });
|
||||
}
|
||||
);
|
||||
var TooltipContentHoverable = React2.forwardRef((props, forwardedRef) => {
|
||||
const context = useTooltipContext(CONTENT_NAME, props.__scopeTooltip);
|
||||
const providerContext = useTooltipProviderContext(CONTENT_NAME, props.__scopeTooltip);
|
||||
const ref = React2.useRef(null);
|
||||
const composedRefs = useComposedRefs(forwardedRef, ref);
|
||||
const [pointerGraceArea, setPointerGraceArea] = React2.useState(null);
|
||||
const { trigger, onClose } = context;
|
||||
const content = ref.current;
|
||||
const { onPointerInTransitChange } = providerContext;
|
||||
const handleRemoveGraceArea = React2.useCallback(() => {
|
||||
setPointerGraceArea(null);
|
||||
onPointerInTransitChange(false);
|
||||
}, [onPointerInTransitChange]);
|
||||
const handleCreateGraceArea = React2.useCallback(
|
||||
(event, hoverTarget) => {
|
||||
const currentTarget = event.currentTarget;
|
||||
const exitPoint = { x: event.clientX, y: event.clientY };
|
||||
const exitSide = getExitSideFromRect(exitPoint, currentTarget.getBoundingClientRect());
|
||||
const paddedExitPoints = getPaddedExitPoints(exitPoint, exitSide);
|
||||
const hoverTargetPoints = getPointsFromRect(hoverTarget.getBoundingClientRect());
|
||||
const graceArea = getHull([...paddedExitPoints, ...hoverTargetPoints]);
|
||||
setPointerGraceArea(graceArea);
|
||||
onPointerInTransitChange(true);
|
||||
},
|
||||
[onPointerInTransitChange]
|
||||
);
|
||||
React2.useEffect(() => {
|
||||
return () => handleRemoveGraceArea();
|
||||
}, [handleRemoveGraceArea]);
|
||||
React2.useEffect(() => {
|
||||
if (trigger && content) {
|
||||
const handleTriggerLeave = (event) => handleCreateGraceArea(event, content);
|
||||
const handleContentLeave = (event) => handleCreateGraceArea(event, trigger);
|
||||
trigger.addEventListener("pointerleave", handleTriggerLeave);
|
||||
content.addEventListener("pointerleave", handleContentLeave);
|
||||
return () => {
|
||||
trigger.removeEventListener("pointerleave", handleTriggerLeave);
|
||||
content.removeEventListener("pointerleave", handleContentLeave);
|
||||
};
|
||||
}
|
||||
}, [trigger, content, handleCreateGraceArea, handleRemoveGraceArea]);
|
||||
React2.useEffect(() => {
|
||||
if (pointerGraceArea) {
|
||||
const handleTrackPointerGrace = (event) => {
|
||||
const target = event.target;
|
||||
const pointerPosition = { x: event.clientX, y: event.clientY };
|
||||
const hasEnteredTarget = (trigger == null ? void 0 : trigger.contains(target)) || (content == null ? void 0 : content.contains(target));
|
||||
const isPointerOutsideGraceArea = !isPointInPolygon(pointerPosition, pointerGraceArea);
|
||||
if (hasEnteredTarget) {
|
||||
handleRemoveGraceArea();
|
||||
} else if (isPointerOutsideGraceArea) {
|
||||
handleRemoveGraceArea();
|
||||
onClose();
|
||||
}
|
||||
};
|
||||
document.addEventListener("pointermove", handleTrackPointerGrace);
|
||||
return () => document.removeEventListener("pointermove", handleTrackPointerGrace);
|
||||
}
|
||||
}, [trigger, content, pointerGraceArea, onClose, handleRemoveGraceArea]);
|
||||
return (0, import_jsx_runtime2.jsx)(TooltipContentImpl, { ...props, ref: composedRefs });
|
||||
});
|
||||
var [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, { isInside: false });
|
||||
var TooltipContentImpl = React2.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const {
|
||||
__scopeTooltip,
|
||||
children,
|
||||
"aria-label": ariaLabel,
|
||||
onEscapeKeyDown,
|
||||
onPointerDownOutside,
|
||||
...contentProps
|
||||
} = props;
|
||||
const context = useTooltipContext(CONTENT_NAME, __scopeTooltip);
|
||||
const popperScope = usePopperScope(__scopeTooltip);
|
||||
const { onClose } = context;
|
||||
React2.useEffect(() => {
|
||||
document.addEventListener(TOOLTIP_OPEN, onClose);
|
||||
return () => document.removeEventListener(TOOLTIP_OPEN, onClose);
|
||||
}, [onClose]);
|
||||
React2.useEffect(() => {
|
||||
if (context.trigger) {
|
||||
const handleScroll = (event) => {
|
||||
const target = event.target;
|
||||
if (target == null ? void 0 : target.contains(context.trigger)) onClose();
|
||||
};
|
||||
window.addEventListener("scroll", handleScroll, { capture: true });
|
||||
return () => window.removeEventListener("scroll", handleScroll, { capture: true });
|
||||
}
|
||||
}, [context.trigger, onClose]);
|
||||
return (0, import_jsx_runtime2.jsx)(
|
||||
DismissableLayer,
|
||||
{
|
||||
asChild: true,
|
||||
disableOutsidePointerEvents: false,
|
||||
onEscapeKeyDown,
|
||||
onPointerDownOutside,
|
||||
onFocusOutside: (event) => event.preventDefault(),
|
||||
onDismiss: onClose,
|
||||
children: (0, import_jsx_runtime2.jsxs)(
|
||||
Content,
|
||||
{
|
||||
"data-state": context.stateAttribute,
|
||||
...popperScope,
|
||||
...contentProps,
|
||||
ref: forwardedRef,
|
||||
style: {
|
||||
...contentProps.style,
|
||||
// re-namespace exposed content custom properties
|
||||
...{
|
||||
"--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
|
||||
"--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
|
||||
"--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
|
||||
"--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
|
||||
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
||||
}
|
||||
},
|
||||
children: [
|
||||
(0, import_jsx_runtime2.jsx)(Slottable, { children }),
|
||||
(0, import_jsx_runtime2.jsx)(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: (0, import_jsx_runtime2.jsx)(Root, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
|
||||
]
|
||||
}
|
||||
)
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
TooltipContent.displayName = CONTENT_NAME;
|
||||
var ARROW_NAME = "TooltipArrow";
|
||||
var TooltipArrow = React2.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeTooltip, ...arrowProps } = props;
|
||||
const popperScope = usePopperScope(__scopeTooltip);
|
||||
const visuallyHiddenContentContext = useVisuallyHiddenContentContext(
|
||||
ARROW_NAME,
|
||||
__scopeTooltip
|
||||
);
|
||||
return visuallyHiddenContentContext.isInside ? null : (0, import_jsx_runtime2.jsx)(Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });
|
||||
}
|
||||
);
|
||||
TooltipArrow.displayName = ARROW_NAME;
|
||||
function getExitSideFromRect(point, rect) {
|
||||
const top = Math.abs(rect.top - point.y);
|
||||
const bottom = Math.abs(rect.bottom - point.y);
|
||||
const right = Math.abs(rect.right - point.x);
|
||||
const left = Math.abs(rect.left - point.x);
|
||||
switch (Math.min(top, bottom, right, left)) {
|
||||
case left:
|
||||
return "left";
|
||||
case right:
|
||||
return "right";
|
||||
case top:
|
||||
return "top";
|
||||
case bottom:
|
||||
return "bottom";
|
||||
default:
|
||||
throw new Error("unreachable");
|
||||
}
|
||||
}
|
||||
function getPaddedExitPoints(exitPoint, exitSide, padding = 5) {
|
||||
const paddedExitPoints = [];
|
||||
switch (exitSide) {
|
||||
case "top":
|
||||
paddedExitPoints.push(
|
||||
{ x: exitPoint.x - padding, y: exitPoint.y + padding },
|
||||
{ x: exitPoint.x + padding, y: exitPoint.y + padding }
|
||||
);
|
||||
break;
|
||||
case "bottom":
|
||||
paddedExitPoints.push(
|
||||
{ x: exitPoint.x - padding, y: exitPoint.y - padding },
|
||||
{ x: exitPoint.x + padding, y: exitPoint.y - padding }
|
||||
);
|
||||
break;
|
||||
case "left":
|
||||
paddedExitPoints.push(
|
||||
{ x: exitPoint.x + padding, y: exitPoint.y - padding },
|
||||
{ x: exitPoint.x + padding, y: exitPoint.y + padding }
|
||||
);
|
||||
break;
|
||||
case "right":
|
||||
paddedExitPoints.push(
|
||||
{ x: exitPoint.x - padding, y: exitPoint.y - padding },
|
||||
{ x: exitPoint.x - padding, y: exitPoint.y + padding }
|
||||
);
|
||||
break;
|
||||
}
|
||||
return paddedExitPoints;
|
||||
}
|
||||
function getPointsFromRect(rect) {
|
||||
const { top, right, bottom, left } = rect;
|
||||
return [
|
||||
{ x: left, y: top },
|
||||
{ x: right, y: top },
|
||||
{ x: right, y: bottom },
|
||||
{ x: left, y: bottom }
|
||||
];
|
||||
}
|
||||
function isPointInPolygon(point, polygon) {
|
||||
const { x, y } = point;
|
||||
let inside = false;
|
||||
for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
|
||||
const xi = polygon[i].x;
|
||||
const yi = polygon[i].y;
|
||||
const xj = polygon[j].x;
|
||||
const yj = polygon[j].y;
|
||||
const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;
|
||||
if (intersect) inside = !inside;
|
||||
}
|
||||
return inside;
|
||||
}
|
||||
function getHull(points) {
|
||||
const newPoints = points.slice();
|
||||
newPoints.sort((a, b) => {
|
||||
if (a.x < b.x) return -1;
|
||||
else if (a.x > b.x) return 1;
|
||||
else if (a.y < b.y) return -1;
|
||||
else if (a.y > b.y) return 1;
|
||||
else return 0;
|
||||
});
|
||||
return getHullPresorted(newPoints);
|
||||
}
|
||||
function getHullPresorted(points) {
|
||||
if (points.length <= 1) return points.slice();
|
||||
const upperHull = [];
|
||||
for (let i = 0; i < points.length; i++) {
|
||||
const p = points[i];
|
||||
while (upperHull.length >= 2) {
|
||||
const q = upperHull[upperHull.length - 1];
|
||||
const r = upperHull[upperHull.length - 2];
|
||||
if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) upperHull.pop();
|
||||
else break;
|
||||
}
|
||||
upperHull.push(p);
|
||||
}
|
||||
upperHull.pop();
|
||||
const lowerHull = [];
|
||||
for (let i = points.length - 1; i >= 0; i--) {
|
||||
const p = points[i];
|
||||
while (lowerHull.length >= 2) {
|
||||
const q = lowerHull[lowerHull.length - 1];
|
||||
const r = lowerHull[lowerHull.length - 2];
|
||||
if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) lowerHull.pop();
|
||||
else break;
|
||||
}
|
||||
lowerHull.push(p);
|
||||
}
|
||||
lowerHull.pop();
|
||||
if (upperHull.length === 1 && lowerHull.length === 1 && upperHull[0].x === lowerHull[0].x && upperHull[0].y === lowerHull[0].y) {
|
||||
return upperHull;
|
||||
} else {
|
||||
return upperHull.concat(lowerHull);
|
||||
}
|
||||
}
|
||||
var Provider = TooltipProvider;
|
||||
var Root3 = Tooltip;
|
||||
var Trigger = TooltipTrigger;
|
||||
var Portal2 = TooltipPortal;
|
||||
var Content2 = TooltipContent;
|
||||
var Arrow2 = TooltipArrow;
|
||||
export {
|
||||
Arrow2 as Arrow,
|
||||
Content2 as Content,
|
||||
Portal2 as Portal,
|
||||
Provider,
|
||||
Root3 as Root,
|
||||
Tooltip,
|
||||
TooltipArrow,
|
||||
TooltipContent,
|
||||
TooltipPortal,
|
||||
TooltipProvider,
|
||||
TooltipTrigger,
|
||||
Trigger,
|
||||
createTooltipScope
|
||||
};
|
||||
//# sourceMappingURL=@radix-ui_react-tooltip.js.map
|
||||
7
node_modules/.vite/deps/@radix-ui_react-tooltip.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/@radix-ui_react-tooltip.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
136
node_modules/.vite/deps/_metadata.json
generated
vendored
Normal file
136
node_modules/.vite/deps/_metadata.json
generated
vendored
Normal file
@@ -0,0 +1,136 @@
|
||||
{
|
||||
"hash": "45a1773f",
|
||||
"configHash": "b6788864",
|
||||
"lockfileHash": "391cad34",
|
||||
"browserHash": "3c466691",
|
||||
"optimized": {
|
||||
"react": {
|
||||
"src": "../../react/index.js",
|
||||
"file": "react.js",
|
||||
"fileHash": "c37022d3",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react-dom": {
|
||||
"src": "../../react-dom/index.js",
|
||||
"file": "react-dom.js",
|
||||
"fileHash": "a62df7d4",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react/jsx-dev-runtime": {
|
||||
"src": "../../react/jsx-dev-runtime.js",
|
||||
"file": "react_jsx-dev-runtime.js",
|
||||
"fileHash": "9a1d7e8c",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react/jsx-runtime": {
|
||||
"src": "../../react/jsx-runtime.js",
|
||||
"file": "react_jsx-runtime.js",
|
||||
"fileHash": "ba67bc92",
|
||||
"needsInterop": true
|
||||
},
|
||||
"react-dom/client": {
|
||||
"src": "../../react-dom/client.js",
|
||||
"file": "react-dom_client.js",
|
||||
"fileHash": "34708d90",
|
||||
"needsInterop": true
|
||||
},
|
||||
"lucide-react": {
|
||||
"src": "../../lucide-react/dist/esm/lucide-react.mjs",
|
||||
"file": "lucide-react.js",
|
||||
"fileHash": "2e2da479",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-slot": {
|
||||
"src": "../../@radix-ui/react-slot/dist/index.mjs",
|
||||
"file": "@radix-ui_react-slot.js",
|
||||
"fileHash": "3c427c5f",
|
||||
"needsInterop": false
|
||||
},
|
||||
"class-variance-authority": {
|
||||
"src": "../../class-variance-authority/dist/index.mjs",
|
||||
"file": "class-variance-authority.js",
|
||||
"fileHash": "60b3aabd",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-scroll-area": {
|
||||
"src": "../../@radix-ui/react-scroll-area/dist/index.mjs",
|
||||
"file": "@radix-ui_react-scroll-area.js",
|
||||
"fileHash": "2ff89062",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-tooltip": {
|
||||
"src": "../../@radix-ui/react-tooltip/dist/index.mjs",
|
||||
"file": "@radix-ui_react-tooltip.js",
|
||||
"fileHash": "8921e779",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-avatar": {
|
||||
"src": "../../@radix-ui/react-avatar/dist/index.mjs",
|
||||
"file": "@radix-ui_react-avatar.js",
|
||||
"fileHash": "8a9b38a7",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-dropdown-menu": {
|
||||
"src": "../../@radix-ui/react-dropdown-menu/dist/index.mjs",
|
||||
"file": "@radix-ui_react-dropdown-menu.js",
|
||||
"fileHash": "c342fa67",
|
||||
"needsInterop": false
|
||||
},
|
||||
"@radix-ui/react-dialog": {
|
||||
"src": "../../@radix-ui/react-dialog/dist/index.mjs",
|
||||
"file": "@radix-ui_react-dialog.js",
|
||||
"fileHash": "45d54223",
|
||||
"needsInterop": false
|
||||
},
|
||||
"clsx": {
|
||||
"src": "../../clsx/dist/clsx.mjs",
|
||||
"file": "clsx.js",
|
||||
"fileHash": "161833e9",
|
||||
"needsInterop": false
|
||||
},
|
||||
"tailwind-merge": {
|
||||
"src": "../../tailwind-merge/dist/bundle-mjs.mjs",
|
||||
"file": "tailwind-merge.js",
|
||||
"fileHash": "37ef2bcc",
|
||||
"needsInterop": false
|
||||
}
|
||||
},
|
||||
"chunks": {
|
||||
"chunk-U7P2NEEE": {
|
||||
"file": "chunk-U7P2NEEE.js"
|
||||
},
|
||||
"chunk-KCU5VMPK": {
|
||||
"file": "chunk-KCU5VMPK.js"
|
||||
},
|
||||
"chunk-5HDB4YN4": {
|
||||
"file": "chunk-5HDB4YN4.js"
|
||||
},
|
||||
"chunk-ZPHTTZ5Y": {
|
||||
"file": "chunk-ZPHTTZ5Y.js"
|
||||
},
|
||||
"chunk-NQHNXVMS": {
|
||||
"file": "chunk-NQHNXVMS.js"
|
||||
},
|
||||
"chunk-KWKVM5C6": {
|
||||
"file": "chunk-KWKVM5C6.js"
|
||||
},
|
||||
"chunk-LMM3RUZD": {
|
||||
"file": "chunk-LMM3RUZD.js"
|
||||
},
|
||||
"chunk-PJEEZAML": {
|
||||
"file": "chunk-PJEEZAML.js"
|
||||
},
|
||||
"chunk-7CEJWY55": {
|
||||
"file": "chunk-7CEJWY55.js"
|
||||
},
|
||||
"chunk-6PXSGDAH": {
|
||||
"file": "chunk-6PXSGDAH.js"
|
||||
},
|
||||
"chunk-DRWLMN53": {
|
||||
"file": "chunk-DRWLMN53.js"
|
||||
},
|
||||
"chunk-G3PMV62Z": {
|
||||
"file": "chunk-G3PMV62Z.js"
|
||||
}
|
||||
}
|
||||
}
|
||||
23
node_modules/.vite/deps/chunk-5HDB4YN4.js
generated
vendored
Normal file
23
node_modules/.vite/deps/chunk-5HDB4YN4.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import {
|
||||
require_jsx_runtime
|
||||
} from "./chunk-6PXSGDAH.js";
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-DRWLMN53.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk-G3PMV62Z.js";
|
||||
|
||||
// node_modules/@radix-ui/react-direction/dist/index.mjs
|
||||
var React = __toESM(require_react(), 1);
|
||||
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
||||
var DirectionContext = React.createContext(void 0);
|
||||
function useDirection(localDir) {
|
||||
const globalDir = React.useContext(DirectionContext);
|
||||
return localDir || globalDir || "ltr";
|
||||
}
|
||||
|
||||
export {
|
||||
useDirection
|
||||
};
|
||||
//# sourceMappingURL=chunk-5HDB4YN4.js.map
|
||||
7
node_modules/.vite/deps/chunk-5HDB4YN4.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-5HDB4YN4.js.map
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../@radix-ui/react-direction/src/Direction.tsx"],
|
||||
"sourcesContent": ["import * as React from 'react';\n\ntype Direction = 'ltr' | 'rtl';\nconst DirectionContext = React.createContext<Direction | undefined>(undefined);\n\n/* -------------------------------------------------------------------------------------------------\n * Direction\n * -----------------------------------------------------------------------------------------------*/\n\ninterface DirectionProviderProps {\n children?: React.ReactNode;\n dir: Direction;\n}\nconst DirectionProvider: React.FC<DirectionProviderProps> = (props) => {\n const { dir, children } = props;\n return <DirectionContext.Provider value={dir}>{children}</DirectionContext.Provider>;\n};\n\n/* -----------------------------------------------------------------------------------------------*/\n\nfunction useDirection(localDir?: Direction) {\n const globalDir = React.useContext(DirectionContext);\n return localDir || globalDir || 'ltr';\n}\n\nconst Provider = DirectionProvider;\n\nexport {\n useDirection,\n //\n Provider,\n //\n DirectionProvider,\n};\n"],
|
||||
"mappings": ";;;;;;;;;;;AAAA,YAAuB;AAed,yBAAA;AAZT,IAAM,mBAAyB,oBAAqC,MAAS;AAiB7E,SAAS,aAAa,UAAsB;AAC1C,QAAM,YAAkB,iBAAW,gBAAgB;AACnD,SAAO,YAAY,aAAa;AAClC;",
|
||||
"names": []
|
||||
}
|
||||
928
node_modules/.vite/deps/chunk-6PXSGDAH.js
generated
vendored
Normal file
928
node_modules/.vite/deps/chunk-6PXSGDAH.js
generated
vendored
Normal file
@@ -0,0 +1,928 @@
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-DRWLMN53.js";
|
||||
import {
|
||||
__commonJS
|
||||
} from "./chunk-G3PMV62Z.js";
|
||||
|
||||
// node_modules/react/cjs/react-jsx-runtime.development.js
|
||||
var require_react_jsx_runtime_development = __commonJS({
|
||||
"node_modules/react/cjs/react-jsx-runtime.development.js"(exports) {
|
||||
"use strict";
|
||||
if (true) {
|
||||
(function() {
|
||||
"use strict";
|
||||
var React = require_react();
|
||||
var REACT_ELEMENT_TYPE = Symbol.for("react.element");
|
||||
var REACT_PORTAL_TYPE = Symbol.for("react.portal");
|
||||
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
||||
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
||||
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
||||
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
||||
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
||||
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
||||
var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
|
||||
var REACT_MEMO_TYPE = Symbol.for("react.memo");
|
||||
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
||||
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
|
||||
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
||||
var FAUX_ITERATOR_SYMBOL = "@@iterator";
|
||||
function getIteratorFn(maybeIterable) {
|
||||
if (maybeIterable === null || typeof maybeIterable !== "object") {
|
||||
return null;
|
||||
}
|
||||
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
||||
if (typeof maybeIterator === "function") {
|
||||
return maybeIterator;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
function error(format) {
|
||||
{
|
||||
{
|
||||
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
||||
args[_key2 - 1] = arguments[_key2];
|
||||
}
|
||||
printWarning("error", format, args);
|
||||
}
|
||||
}
|
||||
}
|
||||
function printWarning(level, format, args) {
|
||||
{
|
||||
var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
|
||||
var stack = ReactDebugCurrentFrame2.getStackAddendum();
|
||||
if (stack !== "") {
|
||||
format += "%s";
|
||||
args = args.concat([stack]);
|
||||
}
|
||||
var argsWithFormat = args.map(function(item) {
|
||||
return String(item);
|
||||
});
|
||||
argsWithFormat.unshift("Warning: " + format);
|
||||
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
||||
}
|
||||
}
|
||||
var enableScopeAPI = false;
|
||||
var enableCacheElement = false;
|
||||
var enableTransitionTracing = false;
|
||||
var enableLegacyHidden = false;
|
||||
var enableDebugTracing = false;
|
||||
var REACT_MODULE_REFERENCE;
|
||||
{
|
||||
REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
|
||||
}
|
||||
function isValidElementType(type) {
|
||||
if (typeof type === "string" || typeof type === "function") {
|
||||
return true;
|
||||
}
|
||||
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
|
||||
return true;
|
||||
}
|
||||
if (typeof type === "object" && type !== null) {
|
||||
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
||||
// types supported by any Flight configuration anywhere since
|
||||
// we don't know which Flight build this will end up being used
|
||||
// with.
|
||||
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function getWrappedName(outerType, innerType, wrapperName) {
|
||||
var displayName = outerType.displayName;
|
||||
if (displayName) {
|
||||
return displayName;
|
||||
}
|
||||
var functionName = innerType.displayName || innerType.name || "";
|
||||
return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
|
||||
}
|
||||
function getContextName(type) {
|
||||
return type.displayName || "Context";
|
||||
}
|
||||
function getComponentNameFromType(type) {
|
||||
if (type == null) {
|
||||
return null;
|
||||
}
|
||||
{
|
||||
if (typeof type.tag === "number") {
|
||||
error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
|
||||
}
|
||||
}
|
||||
if (typeof type === "function") {
|
||||
return type.displayName || type.name || null;
|
||||
}
|
||||
if (typeof type === "string") {
|
||||
return type;
|
||||
}
|
||||
switch (type) {
|
||||
case REACT_FRAGMENT_TYPE:
|
||||
return "Fragment";
|
||||
case REACT_PORTAL_TYPE:
|
||||
return "Portal";
|
||||
case REACT_PROFILER_TYPE:
|
||||
return "Profiler";
|
||||
case REACT_STRICT_MODE_TYPE:
|
||||
return "StrictMode";
|
||||
case REACT_SUSPENSE_TYPE:
|
||||
return "Suspense";
|
||||
case REACT_SUSPENSE_LIST_TYPE:
|
||||
return "SuspenseList";
|
||||
}
|
||||
if (typeof type === "object") {
|
||||
switch (type.$$typeof) {
|
||||
case REACT_CONTEXT_TYPE:
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
case REACT_PROVIDER_TYPE:
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return getWrappedName(type, type.render, "ForwardRef");
|
||||
case REACT_MEMO_TYPE:
|
||||
var outerName = type.displayName || null;
|
||||
if (outerName !== null) {
|
||||
return outerName;
|
||||
}
|
||||
return getComponentNameFromType(type.type) || "Memo";
|
||||
case REACT_LAZY_TYPE: {
|
||||
var lazyComponent = type;
|
||||
var payload = lazyComponent._payload;
|
||||
var init = lazyComponent._init;
|
||||
try {
|
||||
return getComponentNameFromType(init(payload));
|
||||
} catch (x) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
var assign = Object.assign;
|
||||
var disabledDepth = 0;
|
||||
var prevLog;
|
||||
var prevInfo;
|
||||
var prevWarn;
|
||||
var prevError;
|
||||
var prevGroup;
|
||||
var prevGroupCollapsed;
|
||||
var prevGroupEnd;
|
||||
function disabledLog() {
|
||||
}
|
||||
disabledLog.__reactDisabledLog = true;
|
||||
function disableLogs() {
|
||||
{
|
||||
if (disabledDepth === 0) {
|
||||
prevLog = console.log;
|
||||
prevInfo = console.info;
|
||||
prevWarn = console.warn;
|
||||
prevError = console.error;
|
||||
prevGroup = console.group;
|
||||
prevGroupCollapsed = console.groupCollapsed;
|
||||
prevGroupEnd = console.groupEnd;
|
||||
var props = {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
value: disabledLog,
|
||||
writable: true
|
||||
};
|
||||
Object.defineProperties(console, {
|
||||
info: props,
|
||||
log: props,
|
||||
warn: props,
|
||||
error: props,
|
||||
group: props,
|
||||
groupCollapsed: props,
|
||||
groupEnd: props
|
||||
});
|
||||
}
|
||||
disabledDepth++;
|
||||
}
|
||||
}
|
||||
function reenableLogs() {
|
||||
{
|
||||
disabledDepth--;
|
||||
if (disabledDepth === 0) {
|
||||
var props = {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
writable: true
|
||||
};
|
||||
Object.defineProperties(console, {
|
||||
log: assign({}, props, {
|
||||
value: prevLog
|
||||
}),
|
||||
info: assign({}, props, {
|
||||
value: prevInfo
|
||||
}),
|
||||
warn: assign({}, props, {
|
||||
value: prevWarn
|
||||
}),
|
||||
error: assign({}, props, {
|
||||
value: prevError
|
||||
}),
|
||||
group: assign({}, props, {
|
||||
value: prevGroup
|
||||
}),
|
||||
groupCollapsed: assign({}, props, {
|
||||
value: prevGroupCollapsed
|
||||
}),
|
||||
groupEnd: assign({}, props, {
|
||||
value: prevGroupEnd
|
||||
})
|
||||
});
|
||||
}
|
||||
if (disabledDepth < 0) {
|
||||
error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
||||
}
|
||||
}
|
||||
}
|
||||
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
|
||||
var prefix;
|
||||
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
||||
{
|
||||
if (prefix === void 0) {
|
||||
try {
|
||||
throw Error();
|
||||
} catch (x) {
|
||||
var match = x.stack.trim().match(/\n( *(at )?)/);
|
||||
prefix = match && match[1] || "";
|
||||
}
|
||||
}
|
||||
return "\n" + prefix + name;
|
||||
}
|
||||
}
|
||||
var reentry = false;
|
||||
var componentFrameCache;
|
||||
{
|
||||
var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
|
||||
componentFrameCache = new PossiblyWeakMap();
|
||||
}
|
||||
function describeNativeComponentFrame(fn, construct) {
|
||||
if (!fn || reentry) {
|
||||
return "";
|
||||
}
|
||||
{
|
||||
var frame = componentFrameCache.get(fn);
|
||||
if (frame !== void 0) {
|
||||
return frame;
|
||||
}
|
||||
}
|
||||
var control;
|
||||
reentry = true;
|
||||
var previousPrepareStackTrace = Error.prepareStackTrace;
|
||||
Error.prepareStackTrace = void 0;
|
||||
var previousDispatcher;
|
||||
{
|
||||
previousDispatcher = ReactCurrentDispatcher.current;
|
||||
ReactCurrentDispatcher.current = null;
|
||||
disableLogs();
|
||||
}
|
||||
try {
|
||||
if (construct) {
|
||||
var Fake = function() {
|
||||
throw Error();
|
||||
};
|
||||
Object.defineProperty(Fake.prototype, "props", {
|
||||
set: function() {
|
||||
throw Error();
|
||||
}
|
||||
});
|
||||
if (typeof Reflect === "object" && Reflect.construct) {
|
||||
try {
|
||||
Reflect.construct(Fake, []);
|
||||
} catch (x) {
|
||||
control = x;
|
||||
}
|
||||
Reflect.construct(fn, [], Fake);
|
||||
} else {
|
||||
try {
|
||||
Fake.call();
|
||||
} catch (x) {
|
||||
control = x;
|
||||
}
|
||||
fn.call(Fake.prototype);
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
throw Error();
|
||||
} catch (x) {
|
||||
control = x;
|
||||
}
|
||||
fn();
|
||||
}
|
||||
} catch (sample) {
|
||||
if (sample && control && typeof sample.stack === "string") {
|
||||
var sampleLines = sample.stack.split("\n");
|
||||
var controlLines = control.stack.split("\n");
|
||||
var s = sampleLines.length - 1;
|
||||
var c = controlLines.length - 1;
|
||||
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
|
||||
c--;
|
||||
}
|
||||
for (; s >= 1 && c >= 0; s--, c--) {
|
||||
if (sampleLines[s] !== controlLines[c]) {
|
||||
if (s !== 1 || c !== 1) {
|
||||
do {
|
||||
s--;
|
||||
c--;
|
||||
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
||||
var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
|
||||
if (fn.displayName && _frame.includes("<anonymous>")) {
|
||||
_frame = _frame.replace("<anonymous>", fn.displayName);
|
||||
}
|
||||
{
|
||||
if (typeof fn === "function") {
|
||||
componentFrameCache.set(fn, _frame);
|
||||
}
|
||||
}
|
||||
return _frame;
|
||||
}
|
||||
} while (s >= 1 && c >= 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
reentry = false;
|
||||
{
|
||||
ReactCurrentDispatcher.current = previousDispatcher;
|
||||
reenableLogs();
|
||||
}
|
||||
Error.prepareStackTrace = previousPrepareStackTrace;
|
||||
}
|
||||
var name = fn ? fn.displayName || fn.name : "";
|
||||
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
|
||||
{
|
||||
if (typeof fn === "function") {
|
||||
componentFrameCache.set(fn, syntheticFrame);
|
||||
}
|
||||
}
|
||||
return syntheticFrame;
|
||||
}
|
||||
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
||||
{
|
||||
return describeNativeComponentFrame(fn, false);
|
||||
}
|
||||
}
|
||||
function shouldConstruct(Component) {
|
||||
var prototype = Component.prototype;
|
||||
return !!(prototype && prototype.isReactComponent);
|
||||
}
|
||||
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
||||
if (type == null) {
|
||||
return "";
|
||||
}
|
||||
if (typeof type === "function") {
|
||||
{
|
||||
return describeNativeComponentFrame(type, shouldConstruct(type));
|
||||
}
|
||||
}
|
||||
if (typeof type === "string") {
|
||||
return describeBuiltInComponentFrame(type);
|
||||
}
|
||||
switch (type) {
|
||||
case REACT_SUSPENSE_TYPE:
|
||||
return describeBuiltInComponentFrame("Suspense");
|
||||
case REACT_SUSPENSE_LIST_TYPE:
|
||||
return describeBuiltInComponentFrame("SuspenseList");
|
||||
}
|
||||
if (typeof type === "object") {
|
||||
switch (type.$$typeof) {
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return describeFunctionComponentFrame(type.render);
|
||||
case REACT_MEMO_TYPE:
|
||||
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
||||
case REACT_LAZY_TYPE: {
|
||||
var lazyComponent = type;
|
||||
var payload = lazyComponent._payload;
|
||||
var init = lazyComponent._init;
|
||||
try {
|
||||
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
||||
} catch (x) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
var loggedTypeFailures = {};
|
||||
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
||||
function setCurrentlyValidatingElement(element) {
|
||||
{
|
||||
if (element) {
|
||||
var owner = element._owner;
|
||||
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
||||
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
||||
} else {
|
||||
ReactDebugCurrentFrame.setExtraStackFrame(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
||||
{
|
||||
var has = Function.call.bind(hasOwnProperty);
|
||||
for (var typeSpecName in typeSpecs) {
|
||||
if (has(typeSpecs, typeSpecName)) {
|
||||
var error$1 = void 0;
|
||||
try {
|
||||
if (typeof typeSpecs[typeSpecName] !== "function") {
|
||||
var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
||||
err.name = "Invariant Violation";
|
||||
throw err;
|
||||
}
|
||||
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
||||
} catch (ex) {
|
||||
error$1 = ex;
|
||||
}
|
||||
if (error$1 && !(error$1 instanceof Error)) {
|
||||
setCurrentlyValidatingElement(element);
|
||||
error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
|
||||
setCurrentlyValidatingElement(null);
|
||||
}
|
||||
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
||||
loggedTypeFailures[error$1.message] = true;
|
||||
setCurrentlyValidatingElement(element);
|
||||
error("Failed %s type: %s", location, error$1.message);
|
||||
setCurrentlyValidatingElement(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var isArrayImpl = Array.isArray;
|
||||
function isArray(a) {
|
||||
return isArrayImpl(a);
|
||||
}
|
||||
function typeName(value) {
|
||||
{
|
||||
var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
|
||||
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
||||
return type;
|
||||
}
|
||||
}
|
||||
function willCoercionThrow(value) {
|
||||
{
|
||||
try {
|
||||
testStringCoercion(value);
|
||||
return false;
|
||||
} catch (e) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
function testStringCoercion(value) {
|
||||
return "" + value;
|
||||
}
|
||||
function checkKeyStringCoercion(value) {
|
||||
{
|
||||
if (willCoercionThrow(value)) {
|
||||
error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
|
||||
return testStringCoercion(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
||||
var RESERVED_PROPS = {
|
||||
key: true,
|
||||
ref: true,
|
||||
__self: true,
|
||||
__source: true
|
||||
};
|
||||
var specialPropKeyWarningShown;
|
||||
var specialPropRefWarningShown;
|
||||
var didWarnAboutStringRefs;
|
||||
{
|
||||
didWarnAboutStringRefs = {};
|
||||
}
|
||||
function hasValidRef(config) {
|
||||
{
|
||||
if (hasOwnProperty.call(config, "ref")) {
|
||||
var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
|
||||
if (getter && getter.isReactWarning) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return config.ref !== void 0;
|
||||
}
|
||||
function hasValidKey(config) {
|
||||
{
|
||||
if (hasOwnProperty.call(config, "key")) {
|
||||
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
||||
if (getter && getter.isReactWarning) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return config.key !== void 0;
|
||||
}
|
||||
function warnIfStringRefCannotBeAutoConverted(config, self) {
|
||||
{
|
||||
if (typeof config.ref === "string" && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
|
||||
var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
|
||||
if (!didWarnAboutStringRefs[componentName]) {
|
||||
error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
|
||||
didWarnAboutStringRefs[componentName] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function defineKeyPropWarningGetter(props, displayName) {
|
||||
{
|
||||
var warnAboutAccessingKey = function() {
|
||||
if (!specialPropKeyWarningShown) {
|
||||
specialPropKeyWarningShown = true;
|
||||
error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
|
||||
}
|
||||
};
|
||||
warnAboutAccessingKey.isReactWarning = true;
|
||||
Object.defineProperty(props, "key", {
|
||||
get: warnAboutAccessingKey,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
}
|
||||
function defineRefPropWarningGetter(props, displayName) {
|
||||
{
|
||||
var warnAboutAccessingRef = function() {
|
||||
if (!specialPropRefWarningShown) {
|
||||
specialPropRefWarningShown = true;
|
||||
error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
|
||||
}
|
||||
};
|
||||
warnAboutAccessingRef.isReactWarning = true;
|
||||
Object.defineProperty(props, "ref", {
|
||||
get: warnAboutAccessingRef,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
}
|
||||
var ReactElement = function(type, key, ref, self, source, owner, props) {
|
||||
var element = {
|
||||
// This tag allows us to uniquely identify this as a React Element
|
||||
$$typeof: REACT_ELEMENT_TYPE,
|
||||
// Built-in properties that belong on the element
|
||||
type,
|
||||
key,
|
||||
ref,
|
||||
props,
|
||||
// Record the component responsible for creating this element.
|
||||
_owner: owner
|
||||
};
|
||||
{
|
||||
element._store = {};
|
||||
Object.defineProperty(element._store, "validated", {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
value: false
|
||||
});
|
||||
Object.defineProperty(element, "_self", {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
writable: false,
|
||||
value: self
|
||||
});
|
||||
Object.defineProperty(element, "_source", {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
writable: false,
|
||||
value: source
|
||||
});
|
||||
if (Object.freeze) {
|
||||
Object.freeze(element.props);
|
||||
Object.freeze(element);
|
||||
}
|
||||
}
|
||||
return element;
|
||||
};
|
||||
function jsxDEV(type, config, maybeKey, source, self) {
|
||||
{
|
||||
var propName;
|
||||
var props = {};
|
||||
var key = null;
|
||||
var ref = null;
|
||||
if (maybeKey !== void 0) {
|
||||
{
|
||||
checkKeyStringCoercion(maybeKey);
|
||||
}
|
||||
key = "" + maybeKey;
|
||||
}
|
||||
if (hasValidKey(config)) {
|
||||
{
|
||||
checkKeyStringCoercion(config.key);
|
||||
}
|
||||
key = "" + config.key;
|
||||
}
|
||||
if (hasValidRef(config)) {
|
||||
ref = config.ref;
|
||||
warnIfStringRefCannotBeAutoConverted(config, self);
|
||||
}
|
||||
for (propName in config) {
|
||||
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
||||
props[propName] = config[propName];
|
||||
}
|
||||
}
|
||||
if (type && type.defaultProps) {
|
||||
var defaultProps = type.defaultProps;
|
||||
for (propName in defaultProps) {
|
||||
if (props[propName] === void 0) {
|
||||
props[propName] = defaultProps[propName];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (key || ref) {
|
||||
var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
|
||||
if (key) {
|
||||
defineKeyPropWarningGetter(props, displayName);
|
||||
}
|
||||
if (ref) {
|
||||
defineRefPropWarningGetter(props, displayName);
|
||||
}
|
||||
}
|
||||
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
||||
}
|
||||
}
|
||||
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
||||
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
||||
function setCurrentlyValidatingElement$1(element) {
|
||||
{
|
||||
if (element) {
|
||||
var owner = element._owner;
|
||||
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
||||
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
||||
} else {
|
||||
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
var propTypesMisspellWarningShown;
|
||||
{
|
||||
propTypesMisspellWarningShown = false;
|
||||
}
|
||||
function isValidElement(object) {
|
||||
{
|
||||
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
||||
}
|
||||
}
|
||||
function getDeclarationErrorAddendum() {
|
||||
{
|
||||
if (ReactCurrentOwner$1.current) {
|
||||
var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
|
||||
if (name) {
|
||||
return "\n\nCheck the render method of `" + name + "`.";
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
function getSourceInfoErrorAddendum(source) {
|
||||
{
|
||||
if (source !== void 0) {
|
||||
var fileName = source.fileName.replace(/^.*[\\\/]/, "");
|
||||
var lineNumber = source.lineNumber;
|
||||
return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
var ownerHasKeyUseWarning = {};
|
||||
function getCurrentComponentErrorInfo(parentType) {
|
||||
{
|
||||
var info = getDeclarationErrorAddendum();
|
||||
if (!info) {
|
||||
var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
|
||||
if (parentName) {
|
||||
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
|
||||
}
|
||||
}
|
||||
return info;
|
||||
}
|
||||
}
|
||||
function validateExplicitKey(element, parentType) {
|
||||
{
|
||||
if (!element._store || element._store.validated || element.key != null) {
|
||||
return;
|
||||
}
|
||||
element._store.validated = true;
|
||||
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
||||
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
||||
return;
|
||||
}
|
||||
ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
|
||||
var childOwner = "";
|
||||
if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
|
||||
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
|
||||
}
|
||||
setCurrentlyValidatingElement$1(element);
|
||||
error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
|
||||
setCurrentlyValidatingElement$1(null);
|
||||
}
|
||||
}
|
||||
function validateChildKeys(node, parentType) {
|
||||
{
|
||||
if (typeof node !== "object") {
|
||||
return;
|
||||
}
|
||||
if (isArray(node)) {
|
||||
for (var i = 0; i < node.length; i++) {
|
||||
var child = node[i];
|
||||
if (isValidElement(child)) {
|
||||
validateExplicitKey(child, parentType);
|
||||
}
|
||||
}
|
||||
} else if (isValidElement(node)) {
|
||||
if (node._store) {
|
||||
node._store.validated = true;
|
||||
}
|
||||
} else if (node) {
|
||||
var iteratorFn = getIteratorFn(node);
|
||||
if (typeof iteratorFn === "function") {
|
||||
if (iteratorFn !== node.entries) {
|
||||
var iterator = iteratorFn.call(node);
|
||||
var step;
|
||||
while (!(step = iterator.next()).done) {
|
||||
if (isValidElement(step.value)) {
|
||||
validateExplicitKey(step.value, parentType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function validatePropTypes(element) {
|
||||
{
|
||||
var type = element.type;
|
||||
if (type === null || type === void 0 || typeof type === "string") {
|
||||
return;
|
||||
}
|
||||
var propTypes;
|
||||
if (typeof type === "function") {
|
||||
propTypes = type.propTypes;
|
||||
} else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
||||
// Inner props are checked in the reconciler.
|
||||
type.$$typeof === REACT_MEMO_TYPE)) {
|
||||
propTypes = type.propTypes;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
if (propTypes) {
|
||||
var name = getComponentNameFromType(type);
|
||||
checkPropTypes(propTypes, element.props, "prop", name, element);
|
||||
} else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
|
||||
propTypesMisspellWarningShown = true;
|
||||
var _name = getComponentNameFromType(type);
|
||||
error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
|
||||
}
|
||||
if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
|
||||
error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
||||
}
|
||||
}
|
||||
}
|
||||
function validateFragmentProps(fragment) {
|
||||
{
|
||||
var keys = Object.keys(fragment.props);
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
var key = keys[i];
|
||||
if (key !== "children" && key !== "key") {
|
||||
setCurrentlyValidatingElement$1(fragment);
|
||||
error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
|
||||
setCurrentlyValidatingElement$1(null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (fragment.ref !== null) {
|
||||
setCurrentlyValidatingElement$1(fragment);
|
||||
error("Invalid attribute `ref` supplied to `React.Fragment`.");
|
||||
setCurrentlyValidatingElement$1(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
var didWarnAboutKeySpread = {};
|
||||
function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
|
||||
{
|
||||
var validType = isValidElementType(type);
|
||||
if (!validType) {
|
||||
var info = "";
|
||||
if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
|
||||
info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
|
||||
}
|
||||
var sourceInfo = getSourceInfoErrorAddendum(source);
|
||||
if (sourceInfo) {
|
||||
info += sourceInfo;
|
||||
} else {
|
||||
info += getDeclarationErrorAddendum();
|
||||
}
|
||||
var typeString;
|
||||
if (type === null) {
|
||||
typeString = "null";
|
||||
} else if (isArray(type)) {
|
||||
typeString = "array";
|
||||
} else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
|
||||
typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
|
||||
info = " Did you accidentally export a JSX literal instead of a component?";
|
||||
} else {
|
||||
typeString = typeof type;
|
||||
}
|
||||
error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
|
||||
}
|
||||
var element = jsxDEV(type, props, key, source, self);
|
||||
if (element == null) {
|
||||
return element;
|
||||
}
|
||||
if (validType) {
|
||||
var children = props.children;
|
||||
if (children !== void 0) {
|
||||
if (isStaticChildren) {
|
||||
if (isArray(children)) {
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
validateChildKeys(children[i], type);
|
||||
}
|
||||
if (Object.freeze) {
|
||||
Object.freeze(children);
|
||||
}
|
||||
} else {
|
||||
error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
||||
}
|
||||
} else {
|
||||
validateChildKeys(children, type);
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
if (hasOwnProperty.call(props, "key")) {
|
||||
var componentName = getComponentNameFromType(type);
|
||||
var keys = Object.keys(props).filter(function(k) {
|
||||
return k !== "key";
|
||||
});
|
||||
var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
|
||||
if (!didWarnAboutKeySpread[componentName + beforeExample]) {
|
||||
var afterExample = keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}";
|
||||
error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
|
||||
didWarnAboutKeySpread[componentName + beforeExample] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (type === REACT_FRAGMENT_TYPE) {
|
||||
validateFragmentProps(element);
|
||||
} else {
|
||||
validatePropTypes(element);
|
||||
}
|
||||
return element;
|
||||
}
|
||||
}
|
||||
function jsxWithValidationStatic(type, props, key) {
|
||||
{
|
||||
return jsxWithValidation(type, props, key, true);
|
||||
}
|
||||
}
|
||||
function jsxWithValidationDynamic(type, props, key) {
|
||||
{
|
||||
return jsxWithValidation(type, props, key, false);
|
||||
}
|
||||
}
|
||||
var jsx = jsxWithValidationDynamic;
|
||||
var jsxs = jsxWithValidationStatic;
|
||||
exports.Fragment = REACT_FRAGMENT_TYPE;
|
||||
exports.jsx = jsx;
|
||||
exports.jsxs = jsxs;
|
||||
})();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/react/jsx-runtime.js
|
||||
var require_jsx_runtime = __commonJS({
|
||||
"node_modules/react/jsx-runtime.js"(exports, module) {
|
||||
if (false) {
|
||||
module.exports = null;
|
||||
} else {
|
||||
module.exports = require_react_jsx_runtime_development();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export {
|
||||
require_jsx_runtime
|
||||
};
|
||||
/*! Bundled license information:
|
||||
|
||||
react/cjs/react-jsx-runtime.development.js:
|
||||
(**
|
||||
* @license React
|
||||
* react-jsx-runtime.development.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*)
|
||||
*/
|
||||
//# sourceMappingURL=chunk-6PXSGDAH.js.map
|
||||
7
node_modules/.vite/deps/chunk-6PXSGDAH.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-6PXSGDAH.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
137
node_modules/.vite/deps/chunk-7CEJWY55.js
generated
vendored
Normal file
137
node_modules/.vite/deps/chunk-7CEJWY55.js
generated
vendored
Normal file
@@ -0,0 +1,137 @@
|
||||
import {
|
||||
require_jsx_runtime
|
||||
} from "./chunk-6PXSGDAH.js";
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-DRWLMN53.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk-G3PMV62Z.js";
|
||||
|
||||
// node_modules/@radix-ui/react-slot/dist/index.mjs
|
||||
var React2 = __toESM(require_react(), 1);
|
||||
|
||||
// node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
||||
var React = __toESM(require_react(), 1);
|
||||
function setRef(ref, value) {
|
||||
if (typeof ref === "function") {
|
||||
return ref(value);
|
||||
} else if (ref !== null && ref !== void 0) {
|
||||
ref.current = value;
|
||||
}
|
||||
}
|
||||
function composeRefs(...refs) {
|
||||
return (node) => {
|
||||
let hasCleanup = false;
|
||||
const cleanups = refs.map((ref) => {
|
||||
const cleanup = setRef(ref, node);
|
||||
if (!hasCleanup && typeof cleanup == "function") {
|
||||
hasCleanup = true;
|
||||
}
|
||||
return cleanup;
|
||||
});
|
||||
if (hasCleanup) {
|
||||
return () => {
|
||||
for (let i = 0; i < cleanups.length; i++) {
|
||||
const cleanup = cleanups[i];
|
||||
if (typeof cleanup == "function") {
|
||||
cleanup();
|
||||
} else {
|
||||
setRef(refs[i], null);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
function useComposedRefs(...refs) {
|
||||
return React.useCallback(composeRefs(...refs), refs);
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-slot/dist/index.mjs
|
||||
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
||||
var Slot = React2.forwardRef((props, forwardedRef) => {
|
||||
const { children, ...slotProps } = props;
|
||||
const childrenArray = React2.Children.toArray(children);
|
||||
const slottable = childrenArray.find(isSlottable);
|
||||
if (slottable) {
|
||||
const newElement = slottable.props.children;
|
||||
const newChildren = childrenArray.map((child) => {
|
||||
if (child === slottable) {
|
||||
if (React2.Children.count(newElement) > 1) return React2.Children.only(null);
|
||||
return React2.isValidElement(newElement) ? newElement.props.children : null;
|
||||
} else {
|
||||
return child;
|
||||
}
|
||||
});
|
||||
return (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React2.isValidElement(newElement) ? React2.cloneElement(newElement, void 0, newChildren) : null });
|
||||
}
|
||||
return (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
||||
});
|
||||
Slot.displayName = "Slot";
|
||||
var SlotClone = React2.forwardRef((props, forwardedRef) => {
|
||||
const { children, ...slotProps } = props;
|
||||
if (React2.isValidElement(children)) {
|
||||
const childrenRef = getElementRef(children);
|
||||
const props2 = mergeProps(slotProps, children.props);
|
||||
if (children.type !== React2.Fragment) {
|
||||
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
||||
}
|
||||
return React2.cloneElement(children, props2);
|
||||
}
|
||||
return React2.Children.count(children) > 1 ? React2.Children.only(null) : null;
|
||||
});
|
||||
SlotClone.displayName = "SlotClone";
|
||||
var Slottable = ({ children }) => {
|
||||
return (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
|
||||
};
|
||||
function isSlottable(child) {
|
||||
return React2.isValidElement(child) && child.type === Slottable;
|
||||
}
|
||||
function mergeProps(slotProps, childProps) {
|
||||
const overrideProps = { ...childProps };
|
||||
for (const propName in childProps) {
|
||||
const slotPropValue = slotProps[propName];
|
||||
const childPropValue = childProps[propName];
|
||||
const isHandler = /^on[A-Z]/.test(propName);
|
||||
if (isHandler) {
|
||||
if (slotPropValue && childPropValue) {
|
||||
overrideProps[propName] = (...args) => {
|
||||
childPropValue(...args);
|
||||
slotPropValue(...args);
|
||||
};
|
||||
} else if (slotPropValue) {
|
||||
overrideProps[propName] = slotPropValue;
|
||||
}
|
||||
} else if (propName === "style") {
|
||||
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
||||
} else if (propName === "className") {
|
||||
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
||||
}
|
||||
}
|
||||
return { ...slotProps, ...overrideProps };
|
||||
}
|
||||
function getElementRef(element) {
|
||||
var _a, _b;
|
||||
let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
|
||||
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||||
if (mayWarn) {
|
||||
return element.ref;
|
||||
}
|
||||
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
||||
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||||
if (mayWarn) {
|
||||
return element.props.ref;
|
||||
}
|
||||
return element.props.ref || element.ref;
|
||||
}
|
||||
var Root = Slot;
|
||||
|
||||
export {
|
||||
composeRefs,
|
||||
useComposedRefs,
|
||||
Slot,
|
||||
Slottable,
|
||||
Root
|
||||
};
|
||||
//# sourceMappingURL=chunk-7CEJWY55.js.map
|
||||
7
node_modules/.vite/deps/chunk-7CEJWY55.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-7CEJWY55.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1906
node_modules/.vite/deps/chunk-DRWLMN53.js
generated
vendored
Normal file
1906
node_modules/.vite/deps/chunk-DRWLMN53.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
node_modules/.vite/deps/chunk-DRWLMN53.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-DRWLMN53.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
36
node_modules/.vite/deps/chunk-G3PMV62Z.js
generated
vendored
Normal file
36
node_modules/.vite/deps/chunk-G3PMV62Z.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __commonJS = (cb, mod) => function __require() {
|
||||
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||||
};
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
|
||||
export {
|
||||
__commonJS,
|
||||
__export,
|
||||
__toESM
|
||||
};
|
||||
//# sourceMappingURL=chunk-G3PMV62Z.js.map
|
||||
7
node_modules/.vite/deps/chunk-G3PMV62Z.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-G3PMV62Z.js.map
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sourcesContent": [],
|
||||
"mappings": "",
|
||||
"names": []
|
||||
}
|
||||
1102
node_modules/.vite/deps/chunk-KCU5VMPK.js
generated
vendored
Normal file
1102
node_modules/.vite/deps/chunk-KCU5VMPK.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
node_modules/.vite/deps/chunk-KCU5VMPK.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-KCU5VMPK.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
155
node_modules/.vite/deps/chunk-KWKVM5C6.js
generated
vendored
Normal file
155
node_modules/.vite/deps/chunk-KWKVM5C6.js
generated
vendored
Normal file
@@ -0,0 +1,155 @@
|
||||
import {
|
||||
useLayoutEffect2
|
||||
} from "./chunk-LMM3RUZD.js";
|
||||
import {
|
||||
useComposedRefs
|
||||
} from "./chunk-7CEJWY55.js";
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-DRWLMN53.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk-G3PMV62Z.js";
|
||||
|
||||
// node_modules/@radix-ui/react-presence/dist/index.mjs
|
||||
var React2 = __toESM(require_react(), 1);
|
||||
var React = __toESM(require_react(), 1);
|
||||
function useStateMachine(initialState, machine) {
|
||||
return React.useReducer((state, event) => {
|
||||
const nextState = machine[state][event];
|
||||
return nextState ?? state;
|
||||
}, initialState);
|
||||
}
|
||||
var Presence = (props) => {
|
||||
const { present, children } = props;
|
||||
const presence = usePresence(present);
|
||||
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React2.Children.only(children);
|
||||
const ref = useComposedRefs(presence.ref, getElementRef(child));
|
||||
const forceMount = typeof children === "function";
|
||||
return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;
|
||||
};
|
||||
Presence.displayName = "Presence";
|
||||
function usePresence(present) {
|
||||
const [node, setNode] = React2.useState();
|
||||
const stylesRef = React2.useRef({});
|
||||
const prevPresentRef = React2.useRef(present);
|
||||
const prevAnimationNameRef = React2.useRef("none");
|
||||
const initialState = present ? "mounted" : "unmounted";
|
||||
const [state, send] = useStateMachine(initialState, {
|
||||
mounted: {
|
||||
UNMOUNT: "unmounted",
|
||||
ANIMATION_OUT: "unmountSuspended"
|
||||
},
|
||||
unmountSuspended: {
|
||||
MOUNT: "mounted",
|
||||
ANIMATION_END: "unmounted"
|
||||
},
|
||||
unmounted: {
|
||||
MOUNT: "mounted"
|
||||
}
|
||||
});
|
||||
React2.useEffect(() => {
|
||||
const currentAnimationName = getAnimationName(stylesRef.current);
|
||||
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
||||
}, [state]);
|
||||
useLayoutEffect2(() => {
|
||||
const styles = stylesRef.current;
|
||||
const wasPresent = prevPresentRef.current;
|
||||
const hasPresentChanged = wasPresent !== present;
|
||||
if (hasPresentChanged) {
|
||||
const prevAnimationName = prevAnimationNameRef.current;
|
||||
const currentAnimationName = getAnimationName(styles);
|
||||
if (present) {
|
||||
send("MOUNT");
|
||||
} else if (currentAnimationName === "none" || (styles == null ? void 0 : styles.display) === "none") {
|
||||
send("UNMOUNT");
|
||||
} else {
|
||||
const isAnimating = prevAnimationName !== currentAnimationName;
|
||||
if (wasPresent && isAnimating) {
|
||||
send("ANIMATION_OUT");
|
||||
} else {
|
||||
send("UNMOUNT");
|
||||
}
|
||||
}
|
||||
prevPresentRef.current = present;
|
||||
}
|
||||
}, [present, send]);
|
||||
useLayoutEffect2(() => {
|
||||
if (node) {
|
||||
let timeoutId;
|
||||
const ownerWindow = node.ownerDocument.defaultView ?? window;
|
||||
const handleAnimationEnd = (event) => {
|
||||
const currentAnimationName = getAnimationName(stylesRef.current);
|
||||
const isCurrentAnimation = currentAnimationName.includes(event.animationName);
|
||||
if (event.target === node && isCurrentAnimation) {
|
||||
send("ANIMATION_END");
|
||||
if (!prevPresentRef.current) {
|
||||
const currentFillMode = node.style.animationFillMode;
|
||||
node.style.animationFillMode = "forwards";
|
||||
timeoutId = ownerWindow.setTimeout(() => {
|
||||
if (node.style.animationFillMode === "forwards") {
|
||||
node.style.animationFillMode = currentFillMode;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
const handleAnimationStart = (event) => {
|
||||
if (event.target === node) {
|
||||
prevAnimationNameRef.current = getAnimationName(stylesRef.current);
|
||||
}
|
||||
};
|
||||
node.addEventListener("animationstart", handleAnimationStart);
|
||||
node.addEventListener("animationcancel", handleAnimationEnd);
|
||||
node.addEventListener("animationend", handleAnimationEnd);
|
||||
return () => {
|
||||
ownerWindow.clearTimeout(timeoutId);
|
||||
node.removeEventListener("animationstart", handleAnimationStart);
|
||||
node.removeEventListener("animationcancel", handleAnimationEnd);
|
||||
node.removeEventListener("animationend", handleAnimationEnd);
|
||||
};
|
||||
} else {
|
||||
send("ANIMATION_END");
|
||||
}
|
||||
}, [node, send]);
|
||||
return {
|
||||
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
||||
ref: React2.useCallback((node2) => {
|
||||
if (node2) stylesRef.current = getComputedStyle(node2);
|
||||
setNode(node2);
|
||||
}, [])
|
||||
};
|
||||
}
|
||||
function getAnimationName(styles) {
|
||||
return (styles == null ? void 0 : styles.animationName) || "none";
|
||||
}
|
||||
function getElementRef(element) {
|
||||
var _a, _b;
|
||||
let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
|
||||
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||||
if (mayWarn) {
|
||||
return element.ref;
|
||||
}
|
||||
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
||||
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
||||
if (mayWarn) {
|
||||
return element.props.ref;
|
||||
}
|
||||
return element.props.ref || element.ref;
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/primitive/dist/index.mjs
|
||||
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
||||
return function handleEvent(event) {
|
||||
originalEventHandler == null ? void 0 : originalEventHandler(event);
|
||||
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
||||
return ourEventHandler == null ? void 0 : ourEventHandler(event);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export {
|
||||
Presence,
|
||||
composeEventHandlers
|
||||
};
|
||||
//# sourceMappingURL=chunk-KWKVM5C6.js.map
|
||||
7
node_modules/.vite/deps/chunk-KWKVM5C6.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-KWKVM5C6.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
160
node_modules/.vite/deps/chunk-LMM3RUZD.js
generated
vendored
Normal file
160
node_modules/.vite/deps/chunk-LMM3RUZD.js
generated
vendored
Normal file
@@ -0,0 +1,160 @@
|
||||
import {
|
||||
require_react_dom
|
||||
} from "./chunk-PJEEZAML.js";
|
||||
import {
|
||||
Slot
|
||||
} from "./chunk-7CEJWY55.js";
|
||||
import {
|
||||
require_jsx_runtime
|
||||
} from "./chunk-6PXSGDAH.js";
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-DRWLMN53.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk-G3PMV62Z.js";
|
||||
|
||||
// node_modules/@radix-ui/react-primitive/dist/index.mjs
|
||||
var React = __toESM(require_react(), 1);
|
||||
var ReactDOM = __toESM(require_react_dom(), 1);
|
||||
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
||||
var NODES = [
|
||||
"a",
|
||||
"button",
|
||||
"div",
|
||||
"form",
|
||||
"h2",
|
||||
"h3",
|
||||
"img",
|
||||
"input",
|
||||
"label",
|
||||
"li",
|
||||
"nav",
|
||||
"ol",
|
||||
"p",
|
||||
"span",
|
||||
"svg",
|
||||
"ul"
|
||||
];
|
||||
var Primitive = NODES.reduce((primitive, node) => {
|
||||
const Node = React.forwardRef((props, forwardedRef) => {
|
||||
const { asChild, ...primitiveProps } = props;
|
||||
const Comp = asChild ? Slot : node;
|
||||
if (typeof window !== "undefined") {
|
||||
window[Symbol.for("radix-ui")] = true;
|
||||
}
|
||||
return (0, import_jsx_runtime.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
|
||||
});
|
||||
Node.displayName = `Primitive.${node}`;
|
||||
return { ...primitive, [node]: Node };
|
||||
}, {});
|
||||
function dispatchDiscreteCustomEvent(target, event) {
|
||||
if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
||||
var React2 = __toESM(require_react(), 1);
|
||||
var useLayoutEffect2 = Boolean(globalThis == null ? void 0 : globalThis.document) ? React2.useLayoutEffect : () => {
|
||||
};
|
||||
|
||||
// node_modules/@radix-ui/react-context/dist/index.mjs
|
||||
var React3 = __toESM(require_react(), 1);
|
||||
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
|
||||
function createContext2(rootComponentName, defaultContext) {
|
||||
const Context = React3.createContext(defaultContext);
|
||||
const Provider = (props) => {
|
||||
const { children, ...context } = props;
|
||||
const value = React3.useMemo(() => context, Object.values(context));
|
||||
return (0, import_jsx_runtime2.jsx)(Context.Provider, { value, children });
|
||||
};
|
||||
Provider.displayName = rootComponentName + "Provider";
|
||||
function useContext2(consumerName) {
|
||||
const context = React3.useContext(Context);
|
||||
if (context) return context;
|
||||
if (defaultContext !== void 0) return defaultContext;
|
||||
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
||||
}
|
||||
return [Provider, useContext2];
|
||||
}
|
||||
function createContextScope(scopeName, createContextScopeDeps = []) {
|
||||
let defaultContexts = [];
|
||||
function createContext3(rootComponentName, defaultContext) {
|
||||
const BaseContext = React3.createContext(defaultContext);
|
||||
const index = defaultContexts.length;
|
||||
defaultContexts = [...defaultContexts, defaultContext];
|
||||
const Provider = (props) => {
|
||||
var _a;
|
||||
const { scope, children, ...context } = props;
|
||||
const Context = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index]) || BaseContext;
|
||||
const value = React3.useMemo(() => context, Object.values(context));
|
||||
return (0, import_jsx_runtime2.jsx)(Context.Provider, { value, children });
|
||||
};
|
||||
Provider.displayName = rootComponentName + "Provider";
|
||||
function useContext2(consumerName, scope) {
|
||||
var _a;
|
||||
const Context = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index]) || BaseContext;
|
||||
const context = React3.useContext(Context);
|
||||
if (context) return context;
|
||||
if (defaultContext !== void 0) return defaultContext;
|
||||
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
||||
}
|
||||
return [Provider, useContext2];
|
||||
}
|
||||
const createScope = () => {
|
||||
const scopeContexts = defaultContexts.map((defaultContext) => {
|
||||
return React3.createContext(defaultContext);
|
||||
});
|
||||
return function useScope(scope) {
|
||||
const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
|
||||
return React3.useMemo(
|
||||
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
||||
[scope, contexts]
|
||||
);
|
||||
};
|
||||
};
|
||||
createScope.scopeName = scopeName;
|
||||
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
|
||||
}
|
||||
function composeContextScopes(...scopes) {
|
||||
const baseScope = scopes[0];
|
||||
if (scopes.length === 1) return baseScope;
|
||||
const createScope = () => {
|
||||
const scopeHooks = scopes.map((createScope2) => ({
|
||||
useScope: createScope2(),
|
||||
scopeName: createScope2.scopeName
|
||||
}));
|
||||
return function useComposedScopes(overrideScopes) {
|
||||
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
||||
const scopeProps = useScope(overrideScopes);
|
||||
const currentScope = scopeProps[`__scope${scopeName}`];
|
||||
return { ...nextScopes2, ...currentScope };
|
||||
}, {});
|
||||
return React3.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
||||
};
|
||||
};
|
||||
createScope.scopeName = baseScope.scopeName;
|
||||
return createScope;
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
||||
var React4 = __toESM(require_react(), 1);
|
||||
function useCallbackRef(callback) {
|
||||
const callbackRef = React4.useRef(callback);
|
||||
React4.useEffect(() => {
|
||||
callbackRef.current = callback;
|
||||
});
|
||||
return React4.useMemo(() => (...args) => {
|
||||
var _a;
|
||||
return (_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef, ...args);
|
||||
}, []);
|
||||
}
|
||||
|
||||
export {
|
||||
Primitive,
|
||||
dispatchDiscreteCustomEvent,
|
||||
useLayoutEffect2,
|
||||
createContext2,
|
||||
createContextScope,
|
||||
useCallbackRef
|
||||
};
|
||||
//# sourceMappingURL=chunk-LMM3RUZD.js.map
|
||||
7
node_modules/.vite/deps/chunk-LMM3RUZD.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-LMM3RUZD.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
325
node_modules/.vite/deps/chunk-NQHNXVMS.js
generated
vendored
Normal file
325
node_modules/.vite/deps/chunk-NQHNXVMS.js
generated
vendored
Normal file
@@ -0,0 +1,325 @@
|
||||
import {
|
||||
composeEventHandlers
|
||||
} from "./chunk-KWKVM5C6.js";
|
||||
import {
|
||||
Primitive,
|
||||
dispatchDiscreteCustomEvent,
|
||||
useCallbackRef,
|
||||
useLayoutEffect2
|
||||
} from "./chunk-LMM3RUZD.js";
|
||||
import {
|
||||
require_react_dom
|
||||
} from "./chunk-PJEEZAML.js";
|
||||
import {
|
||||
useComposedRefs
|
||||
} from "./chunk-7CEJWY55.js";
|
||||
import {
|
||||
require_jsx_runtime
|
||||
} from "./chunk-6PXSGDAH.js";
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-DRWLMN53.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk-G3PMV62Z.js";
|
||||
|
||||
// node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
||||
var React2 = __toESM(require_react(), 1);
|
||||
|
||||
// node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
|
||||
var React = __toESM(require_react(), 1);
|
||||
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
||||
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
||||
React.useEffect(() => {
|
||||
const handleKeyDown = (event) => {
|
||||
if (event.key === "Escape") {
|
||||
onEscapeKeyDown(event);
|
||||
}
|
||||
};
|
||||
ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true });
|
||||
return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true });
|
||||
}, [onEscapeKeyDown, ownerDocument]);
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
||||
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
||||
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
||||
var CONTEXT_UPDATE = "dismissableLayer.update";
|
||||
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
||||
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
||||
var originalBodyPointerEvents;
|
||||
var DismissableLayerContext = React2.createContext({
|
||||
layers: /* @__PURE__ */ new Set(),
|
||||
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
||||
branches: /* @__PURE__ */ new Set()
|
||||
});
|
||||
var DismissableLayer = React2.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const {
|
||||
disableOutsidePointerEvents = false,
|
||||
onEscapeKeyDown,
|
||||
onPointerDownOutside,
|
||||
onFocusOutside,
|
||||
onInteractOutside,
|
||||
onDismiss,
|
||||
...layerProps
|
||||
} = props;
|
||||
const context = React2.useContext(DismissableLayerContext);
|
||||
const [node, setNode] = React2.useState(null);
|
||||
const ownerDocument = (node == null ? void 0 : node.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document);
|
||||
const [, force] = React2.useState({});
|
||||
const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
|
||||
const layers = Array.from(context.layers);
|
||||
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
||||
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
||||
const index = node ? layers.indexOf(node) : -1;
|
||||
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
||||
const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
||||
const pointerDownOutside = usePointerDownOutside((event) => {
|
||||
const target = event.target;
|
||||
const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
|
||||
if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
|
||||
onPointerDownOutside == null ? void 0 : onPointerDownOutside(event);
|
||||
onInteractOutside == null ? void 0 : onInteractOutside(event);
|
||||
if (!event.defaultPrevented) onDismiss == null ? void 0 : onDismiss();
|
||||
}, ownerDocument);
|
||||
const focusOutside = useFocusOutside((event) => {
|
||||
const target = event.target;
|
||||
const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));
|
||||
if (isFocusInBranch) return;
|
||||
onFocusOutside == null ? void 0 : onFocusOutside(event);
|
||||
onInteractOutside == null ? void 0 : onInteractOutside(event);
|
||||
if (!event.defaultPrevented) onDismiss == null ? void 0 : onDismiss();
|
||||
}, ownerDocument);
|
||||
useEscapeKeydown((event) => {
|
||||
const isHighestLayer = index === context.layers.size - 1;
|
||||
if (!isHighestLayer) return;
|
||||
onEscapeKeyDown == null ? void 0 : onEscapeKeyDown(event);
|
||||
if (!event.defaultPrevented && onDismiss) {
|
||||
event.preventDefault();
|
||||
onDismiss();
|
||||
}
|
||||
}, ownerDocument);
|
||||
React2.useEffect(() => {
|
||||
if (!node) return;
|
||||
if (disableOutsidePointerEvents) {
|
||||
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
||||
originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
|
||||
ownerDocument.body.style.pointerEvents = "none";
|
||||
}
|
||||
context.layersWithOutsidePointerEventsDisabled.add(node);
|
||||
}
|
||||
context.layers.add(node);
|
||||
dispatchUpdate();
|
||||
return () => {
|
||||
if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {
|
||||
ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
|
||||
}
|
||||
};
|
||||
}, [node, ownerDocument, disableOutsidePointerEvents, context]);
|
||||
React2.useEffect(() => {
|
||||
return () => {
|
||||
if (!node) return;
|
||||
context.layers.delete(node);
|
||||
context.layersWithOutsidePointerEventsDisabled.delete(node);
|
||||
dispatchUpdate();
|
||||
};
|
||||
}, [node, context]);
|
||||
React2.useEffect(() => {
|
||||
const handleUpdate = () => force({});
|
||||
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
||||
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
||||
}, []);
|
||||
return (0, import_jsx_runtime.jsx)(
|
||||
Primitive.div,
|
||||
{
|
||||
...layerProps,
|
||||
ref: composedRefs,
|
||||
style: {
|
||||
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
||||
...props.style
|
||||
},
|
||||
onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
|
||||
onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
|
||||
onPointerDownCapture: composeEventHandlers(
|
||||
props.onPointerDownCapture,
|
||||
pointerDownOutside.onPointerDownCapture
|
||||
)
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
|
||||
var BRANCH_NAME = "DismissableLayerBranch";
|
||||
var DismissableLayerBranch = React2.forwardRef((props, forwardedRef) => {
|
||||
const context = React2.useContext(DismissableLayerContext);
|
||||
const ref = React2.useRef(null);
|
||||
const composedRefs = useComposedRefs(forwardedRef, ref);
|
||||
React2.useEffect(() => {
|
||||
const node = ref.current;
|
||||
if (node) {
|
||||
context.branches.add(node);
|
||||
return () => {
|
||||
context.branches.delete(node);
|
||||
};
|
||||
}
|
||||
}, [context.branches]);
|
||||
return (0, import_jsx_runtime.jsx)(Primitive.div, { ...props, ref: composedRefs });
|
||||
});
|
||||
DismissableLayerBranch.displayName = BRANCH_NAME;
|
||||
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
||||
const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
|
||||
const isPointerInsideReactTreeRef = React2.useRef(false);
|
||||
const handleClickRef = React2.useRef(() => {
|
||||
});
|
||||
React2.useEffect(() => {
|
||||
const handlePointerDown = (event) => {
|
||||
if (event.target && !isPointerInsideReactTreeRef.current) {
|
||||
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
||||
handleAndDispatchCustomEvent(
|
||||
POINTER_DOWN_OUTSIDE,
|
||||
handlePointerDownOutside,
|
||||
eventDetail,
|
||||
{ discrete: true }
|
||||
);
|
||||
};
|
||||
var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;
|
||||
const eventDetail = { originalEvent: event };
|
||||
if (event.pointerType === "touch") {
|
||||
ownerDocument.removeEventListener("click", handleClickRef.current);
|
||||
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
|
||||
ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
|
||||
} else {
|
||||
handleAndDispatchPointerDownOutsideEvent2();
|
||||
}
|
||||
} else {
|
||||
ownerDocument.removeEventListener("click", handleClickRef.current);
|
||||
}
|
||||
isPointerInsideReactTreeRef.current = false;
|
||||
};
|
||||
const timerId = window.setTimeout(() => {
|
||||
ownerDocument.addEventListener("pointerdown", handlePointerDown);
|
||||
}, 0);
|
||||
return () => {
|
||||
window.clearTimeout(timerId);
|
||||
ownerDocument.removeEventListener("pointerdown", handlePointerDown);
|
||||
ownerDocument.removeEventListener("click", handleClickRef.current);
|
||||
};
|
||||
}, [ownerDocument, handlePointerDownOutside]);
|
||||
return {
|
||||
// ensures we check React component tree (not just DOM tree)
|
||||
onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
|
||||
};
|
||||
}
|
||||
function useFocusOutside(onFocusOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
||||
const handleFocusOutside = useCallbackRef(onFocusOutside);
|
||||
const isFocusInsideReactTreeRef = React2.useRef(false);
|
||||
React2.useEffect(() => {
|
||||
const handleFocus = (event) => {
|
||||
if (event.target && !isFocusInsideReactTreeRef.current) {
|
||||
const eventDetail = { originalEvent: event };
|
||||
handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
|
||||
discrete: false
|
||||
});
|
||||
}
|
||||
};
|
||||
ownerDocument.addEventListener("focusin", handleFocus);
|
||||
return () => ownerDocument.removeEventListener("focusin", handleFocus);
|
||||
}, [ownerDocument, handleFocusOutside]);
|
||||
return {
|
||||
onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
|
||||
onBlurCapture: () => isFocusInsideReactTreeRef.current = false
|
||||
};
|
||||
}
|
||||
function dispatchUpdate() {
|
||||
const event = new CustomEvent(CONTEXT_UPDATE);
|
||||
document.dispatchEvent(event);
|
||||
}
|
||||
function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
||||
const target = detail.originalEvent.target;
|
||||
const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });
|
||||
if (handler) target.addEventListener(name, handler, { once: true });
|
||||
if (discrete) {
|
||||
dispatchDiscreteCustomEvent(target, event);
|
||||
} else {
|
||||
target.dispatchEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-id/dist/index.mjs
|
||||
var React3 = __toESM(require_react(), 1);
|
||||
var useReactId = React3["useId".toString()] || (() => void 0);
|
||||
var count = 0;
|
||||
function useId(deterministicId) {
|
||||
const [id, setId] = React3.useState(useReactId());
|
||||
useLayoutEffect2(() => {
|
||||
if (!deterministicId) setId((reactId) => reactId ?? String(count++));
|
||||
}, [deterministicId]);
|
||||
return deterministicId || (id ? `radix-${id}` : "");
|
||||
}
|
||||
|
||||
// node_modules/@radix-ui/react-portal/dist/index.mjs
|
||||
var React4 = __toESM(require_react(), 1);
|
||||
var import_react_dom = __toESM(require_react_dom(), 1);
|
||||
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
|
||||
var PORTAL_NAME = "Portal";
|
||||
var Portal = React4.forwardRef((props, forwardedRef) => {
|
||||
var _a;
|
||||
const { container: containerProp, ...portalProps } = props;
|
||||
const [mounted, setMounted] = React4.useState(false);
|
||||
useLayoutEffect2(() => setMounted(true), []);
|
||||
const container = containerProp || mounted && ((_a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : _a.body);
|
||||
return container ? import_react_dom.default.createPortal((0, import_jsx_runtime2.jsx)(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
||||
});
|
||||
Portal.displayName = PORTAL_NAME;
|
||||
|
||||
// node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
||||
var React5 = __toESM(require_react(), 1);
|
||||
function useControllableState({
|
||||
prop,
|
||||
defaultProp,
|
||||
onChange = () => {
|
||||
}
|
||||
}) {
|
||||
const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });
|
||||
const isControlled = prop !== void 0;
|
||||
const value = isControlled ? prop : uncontrolledProp;
|
||||
const handleChange = useCallbackRef(onChange);
|
||||
const setValue = React5.useCallback(
|
||||
(nextValue) => {
|
||||
if (isControlled) {
|
||||
const setter = nextValue;
|
||||
const value2 = typeof nextValue === "function" ? setter(prop) : nextValue;
|
||||
if (value2 !== prop) handleChange(value2);
|
||||
} else {
|
||||
setUncontrolledProp(nextValue);
|
||||
}
|
||||
},
|
||||
[isControlled, prop, setUncontrolledProp, handleChange]
|
||||
);
|
||||
return [value, setValue];
|
||||
}
|
||||
function useUncontrolledState({
|
||||
defaultProp,
|
||||
onChange
|
||||
}) {
|
||||
const uncontrolledState = React5.useState(defaultProp);
|
||||
const [value] = uncontrolledState;
|
||||
const prevValueRef = React5.useRef(value);
|
||||
const handleChange = useCallbackRef(onChange);
|
||||
React5.useEffect(() => {
|
||||
if (prevValueRef.current !== value) {
|
||||
handleChange(value);
|
||||
prevValueRef.current = value;
|
||||
}
|
||||
}, [value, prevValueRef, handleChange]);
|
||||
return uncontrolledState;
|
||||
}
|
||||
|
||||
export {
|
||||
DismissableLayer,
|
||||
useId,
|
||||
Portal,
|
||||
useControllableState
|
||||
};
|
||||
//# sourceMappingURL=chunk-NQHNXVMS.js.map
|
||||
7
node_modules/.vite/deps/chunk-NQHNXVMS.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-NQHNXVMS.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
21628
node_modules/.vite/deps/chunk-PJEEZAML.js
generated
vendored
Normal file
21628
node_modules/.vite/deps/chunk-PJEEZAML.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
node_modules/.vite/deps/chunk-PJEEZAML.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-PJEEZAML.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
21
node_modules/.vite/deps/chunk-U7P2NEEE.js
generated
vendored
Normal file
21
node_modules/.vite/deps/chunk-U7P2NEEE.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
// node_modules/clsx/dist/clsx.mjs
|
||||
function r(e) {
|
||||
var t, f, n = "";
|
||||
if ("string" == typeof e || "number" == typeof e) n += e;
|
||||
else if ("object" == typeof e) if (Array.isArray(e)) {
|
||||
var o = e.length;
|
||||
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
||||
} else for (f in e) e[f] && (n && (n += " "), n += f);
|
||||
return n;
|
||||
}
|
||||
function clsx() {
|
||||
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
||||
return n;
|
||||
}
|
||||
var clsx_default = clsx;
|
||||
|
||||
export {
|
||||
clsx,
|
||||
clsx_default
|
||||
};
|
||||
//# sourceMappingURL=chunk-U7P2NEEE.js.map
|
||||
7
node_modules/.vite/deps/chunk-U7P2NEEE.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-U7P2NEEE.js.map
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../clsx/dist/clsx.mjs"],
|
||||
"sourcesContent": ["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;"],
|
||||
"mappings": ";AAAA,SAAS,EAAE,GAAE;AAAC,MAAI,GAAE,GAAE,IAAE;AAAG,MAAG,YAAU,OAAO,KAAG,YAAU,OAAO,EAAE,MAAG;AAAA,WAAU,YAAU,OAAO,EAAE,KAAG,MAAM,QAAQ,CAAC,GAAE;AAAC,QAAI,IAAE,EAAE;AAAO,SAAI,IAAE,GAAE,IAAE,GAAE,IAAI,GAAE,CAAC,MAAI,IAAE,EAAE,EAAE,CAAC,CAAC,OAAK,MAAI,KAAG,MAAK,KAAG;AAAA,EAAE,MAAM,MAAI,KAAK,EAAE,GAAE,CAAC,MAAI,MAAI,KAAG,MAAK,KAAG;AAAG,SAAO;AAAC;AAAQ,SAAS,OAAM;AAAC,WAAQ,GAAE,GAAE,IAAE,GAAE,IAAE,IAAG,IAAE,UAAU,QAAO,IAAE,GAAE,IAAI,EAAC,IAAE,UAAU,CAAC,OAAK,IAAE,EAAE,CAAC,OAAK,MAAI,KAAG,MAAK,KAAG;AAAG,SAAO;AAAC;AAAC,IAAO,eAAQ;",
|
||||
"names": []
|
||||
}
|
||||
2221
node_modules/.vite/deps/chunk-ZPHTTZ5Y.js
generated
vendored
Normal file
2221
node_modules/.vite/deps/chunk-ZPHTTZ5Y.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
node_modules/.vite/deps/chunk-ZPHTTZ5Y.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/chunk-ZPHTTZ5Y.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
51
node_modules/.vite/deps/class-variance-authority.js
generated
vendored
Normal file
51
node_modules/.vite/deps/class-variance-authority.js
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
import {
|
||||
clsx
|
||||
} from "./chunk-U7P2NEEE.js";
|
||||
import "./chunk-G3PMV62Z.js";
|
||||
|
||||
// node_modules/class-variance-authority/dist/index.mjs
|
||||
var falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
|
||||
var cx = clsx;
|
||||
var cva = (base, config) => (props) => {
|
||||
var _config_compoundVariants;
|
||||
if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
||||
const { variants, defaultVariants } = config;
|
||||
const getVariantClassNames = Object.keys(variants).map((variant) => {
|
||||
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
|
||||
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
|
||||
if (variantProp === null) return null;
|
||||
const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
|
||||
return variants[variant][variantKey];
|
||||
});
|
||||
const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param) => {
|
||||
let [key, value] = param;
|
||||
if (value === void 0) {
|
||||
return acc;
|
||||
}
|
||||
acc[key] = value;
|
||||
return acc;
|
||||
}, {});
|
||||
const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param) => {
|
||||
let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
|
||||
return Object.entries(compoundVariantOptions).every((param2) => {
|
||||
let [key, value] = param2;
|
||||
return Array.isArray(value) ? value.includes({
|
||||
...defaultVariants,
|
||||
...propsWithoutUndefined
|
||||
}[key]) : {
|
||||
...defaultVariants,
|
||||
...propsWithoutUndefined
|
||||
}[key] === value;
|
||||
}) ? [
|
||||
...acc,
|
||||
cvClass,
|
||||
cvClassName
|
||||
] : acc;
|
||||
}, []);
|
||||
return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
||||
};
|
||||
export {
|
||||
cva,
|
||||
cx
|
||||
};
|
||||
//# sourceMappingURL=class-variance-authority.js.map
|
||||
7
node_modules/.vite/deps/class-variance-authority.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/class-variance-authority.js.map
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../class-variance-authority/dist/index.mjs"],
|
||||
"sourcesContent": ["/**\n * Copyright 2022 Joe Bell. All rights reserved.\n *\n * This file is licensed to you under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with the\n * License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR REPRESENTATIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n */ import { clsx } from \"clsx\";\nconst falsyToString = (value)=>typeof value === \"boolean\" ? `${value}` : value === 0 ? \"0\" : value;\nexport const cx = clsx;\nexport const cva = (base, config)=>(props)=>{\n var _config_compoundVariants;\n if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n const { variants, defaultVariants } = config;\n const getVariantClassNames = Object.keys(variants).map((variant)=>{\n const variantProp = props === null || props === void 0 ? void 0 : props[variant];\n const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];\n if (variantProp === null) return null;\n const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);\n return variants[variant][variantKey];\n });\n const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{\n let [key, value] = param;\n if (value === undefined) {\n return acc;\n }\n acc[key] = value;\n return acc;\n }, {});\n const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{\n let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;\n return Object.entries(compoundVariantOptions).every((param)=>{\n let [key, value] = param;\n return Array.isArray(value) ? value.includes({\n ...defaultVariants,\n ...propsWithoutUndefined\n }[key]) : ({\n ...defaultVariants,\n ...propsWithoutUndefined\n })[key] === value;\n }) ? [\n ...acc,\n cvClass,\n cvClassName\n ] : acc;\n }, []);\n return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);\n };\n\n"],
|
||||
"mappings": ";;;;;;AAeA,IAAM,gBAAgB,CAAC,UAAQ,OAAO,UAAU,YAAY,GAAG,KAAK,KAAK,UAAU,IAAI,MAAM;AACtF,IAAM,KAAK;AACX,IAAM,MAAM,CAAC,MAAM,WAAS,CAAC,UAAQ;AACpC,MAAI;AACJ,OAAK,WAAW,QAAQ,WAAW,SAAS,SAAS,OAAO,aAAa,KAAM,QAAO,GAAG,MAAM,UAAU,QAAQ,UAAU,SAAS,SAAS,MAAM,OAAO,UAAU,QAAQ,UAAU,SAAS,SAAS,MAAM,SAAS;AACvN,QAAM,EAAE,UAAU,gBAAgB,IAAI;AACtC,QAAM,uBAAuB,OAAO,KAAK,QAAQ,EAAE,IAAI,CAAC,YAAU;AAC9D,UAAM,cAAc,UAAU,QAAQ,UAAU,SAAS,SAAS,MAAM,OAAO;AAC/E,UAAM,qBAAqB,oBAAoB,QAAQ,oBAAoB,SAAS,SAAS,gBAAgB,OAAO;AACpH,QAAI,gBAAgB,KAAM,QAAO;AACjC,UAAM,aAAa,cAAc,WAAW,KAAK,cAAc,kBAAkB;AACjF,WAAO,SAAS,OAAO,EAAE,UAAU;AAAA,EACvC,CAAC;AACD,QAAM,wBAAwB,SAAS,OAAO,QAAQ,KAAK,EAAE,OAAO,CAAC,KAAK,UAAQ;AAC9E,QAAI,CAAC,KAAK,KAAK,IAAI;AACnB,QAAI,UAAU,QAAW;AACrB,aAAO;AAAA,IACX;AACA,QAAI,GAAG,IAAI;AACX,WAAO;AAAA,EACX,GAAG,CAAC,CAAC;AACL,QAAM,+BAA+B,WAAW,QAAQ,WAAW,SAAS,UAAU,2BAA2B,OAAO,sBAAsB,QAAQ,6BAA6B,SAAS,SAAS,yBAAyB,OAAO,CAAC,KAAK,UAAQ;AAC/O,QAAI,EAAE,OAAO,SAAS,WAAW,aAAa,GAAG,uBAAuB,IAAI;AAC5E,WAAO,OAAO,QAAQ,sBAAsB,EAAE,MAAM,CAACA,WAAQ;AACzD,UAAI,CAAC,KAAK,KAAK,IAAIA;AACnB,aAAO,MAAM,QAAQ,KAAK,IAAI,MAAM,SAAS;AAAA,QACzC,GAAG;AAAA,QACH,GAAG;AAAA,MACP,EAAE,GAAG,CAAC,IAAK;AAAA,QACP,GAAG;AAAA,QACH,GAAG;AAAA,MACP,EAAG,GAAG,MAAM;AAAA,IAChB,CAAC,IAAI;AAAA,MACD,GAAG;AAAA,MACH;AAAA,MACA;AAAA,IACJ,IAAI;AAAA,EACR,GAAG,CAAC,CAAC;AACL,SAAO,GAAG,MAAM,sBAAsB,8BAA8B,UAAU,QAAQ,UAAU,SAAS,SAAS,MAAM,OAAO,UAAU,QAAQ,UAAU,SAAS,SAAS,MAAM,SAAS;AAChM;",
|
||||
"names": ["param"]
|
||||
}
|
||||
10
node_modules/.vite/deps/clsx.js
generated
vendored
Normal file
10
node_modules/.vite/deps/clsx.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import {
|
||||
clsx,
|
||||
clsx_default
|
||||
} from "./chunk-U7P2NEEE.js";
|
||||
import "./chunk-G3PMV62Z.js";
|
||||
export {
|
||||
clsx,
|
||||
clsx_default as default
|
||||
};
|
||||
//# sourceMappingURL=clsx.js.map
|
||||
7
node_modules/.vite/deps/clsx.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/clsx.js.map
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sourcesContent": [],
|
||||
"mappings": "",
|
||||
"names": []
|
||||
}
|
||||
19543
node_modules/.vite/deps/lucide-react.js
generated
vendored
Normal file
19543
node_modules/.vite/deps/lucide-react.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
node_modules/.vite/deps/lucide-react.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/lucide-react.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3
node_modules/.vite/deps/package.json
generated
vendored
Normal file
3
node_modules/.vite/deps/package.json
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
7
node_modules/.vite/deps/react-dom.js
generated
vendored
Normal file
7
node_modules/.vite/deps/react-dom.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import {
|
||||
require_react_dom
|
||||
} from "./chunk-PJEEZAML.js";
|
||||
import "./chunk-DRWLMN53.js";
|
||||
import "./chunk-G3PMV62Z.js";
|
||||
export default require_react_dom();
|
||||
//# sourceMappingURL=react-dom.js.map
|
||||
7
node_modules/.vite/deps/react-dom.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/react-dom.js.map
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sourcesContent": [],
|
||||
"mappings": "",
|
||||
"names": []
|
||||
}
|
||||
39
node_modules/.vite/deps/react-dom_client.js
generated
vendored
Normal file
39
node_modules/.vite/deps/react-dom_client.js
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
import {
|
||||
require_react_dom
|
||||
} from "./chunk-PJEEZAML.js";
|
||||
import "./chunk-DRWLMN53.js";
|
||||
import {
|
||||
__commonJS
|
||||
} from "./chunk-G3PMV62Z.js";
|
||||
|
||||
// node_modules/react-dom/client.js
|
||||
var require_client = __commonJS({
|
||||
"node_modules/react-dom/client.js"(exports) {
|
||||
var m = require_react_dom();
|
||||
if (false) {
|
||||
exports.createRoot = m.createRoot;
|
||||
exports.hydrateRoot = m.hydrateRoot;
|
||||
} else {
|
||||
i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
exports.createRoot = function(c, o) {
|
||||
i.usingClientEntryPoint = true;
|
||||
try {
|
||||
return m.createRoot(c, o);
|
||||
} finally {
|
||||
i.usingClientEntryPoint = false;
|
||||
}
|
||||
};
|
||||
exports.hydrateRoot = function(c, h, o) {
|
||||
i.usingClientEntryPoint = true;
|
||||
try {
|
||||
return m.hydrateRoot(c, h, o);
|
||||
} finally {
|
||||
i.usingClientEntryPoint = false;
|
||||
}
|
||||
};
|
||||
}
|
||||
var i;
|
||||
}
|
||||
});
|
||||
export default require_client();
|
||||
//# sourceMappingURL=react-dom_client.js.map
|
||||
7
node_modules/.vite/deps/react-dom_client.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/react-dom_client.js.map
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../react-dom/client.js"],
|
||||
"sourcesContent": ["'use strict';\n\nvar m = require('react-dom');\nif (process.env.NODE_ENV === 'production') {\n exports.createRoot = m.createRoot;\n exports.hydrateRoot = m.hydrateRoot;\n} else {\n var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n exports.createRoot = function(c, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.createRoot(c, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n exports.hydrateRoot = function(c, h, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.hydrateRoot(c, h, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n}\n"],
|
||||
"mappings": ";;;;;;;;;AAAA;AAAA;AAEA,QAAI,IAAI;AACR,QAAI,OAAuC;AACzC,cAAQ,aAAa,EAAE;AACvB,cAAQ,cAAc,EAAE;AAAA,IAC1B,OAAO;AACD,UAAI,EAAE;AACV,cAAQ,aAAa,SAAS,GAAG,GAAG;AAClC,UAAE,wBAAwB;AAC1B,YAAI;AACF,iBAAO,EAAE,WAAW,GAAG,CAAC;AAAA,QAC1B,UAAE;AACA,YAAE,wBAAwB;AAAA,QAC5B;AAAA,MACF;AACA,cAAQ,cAAc,SAAS,GAAG,GAAG,GAAG;AACtC,UAAE,wBAAwB;AAC1B,YAAI;AACF,iBAAO,EAAE,YAAY,GAAG,GAAG,CAAC;AAAA,QAC9B,UAAE;AACA,YAAE,wBAAwB;AAAA,QAC5B;AAAA,MACF;AAAA,IACF;AAjBM;AAAA;AAAA;",
|
||||
"names": []
|
||||
}
|
||||
6
node_modules/.vite/deps/react.js
generated
vendored
Normal file
6
node_modules/.vite/deps/react.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-DRWLMN53.js";
|
||||
import "./chunk-G3PMV62Z.js";
|
||||
export default require_react();
|
||||
//# sourceMappingURL=react.js.map
|
||||
7
node_modules/.vite/deps/react.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/react.js.map
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sourcesContent": [],
|
||||
"mappings": "",
|
||||
"names": []
|
||||
}
|
||||
913
node_modules/.vite/deps/react_jsx-dev-runtime.js
generated
vendored
Normal file
913
node_modules/.vite/deps/react_jsx-dev-runtime.js
generated
vendored
Normal file
@@ -0,0 +1,913 @@
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-DRWLMN53.js";
|
||||
import {
|
||||
__commonJS
|
||||
} from "./chunk-G3PMV62Z.js";
|
||||
|
||||
// node_modules/react/cjs/react-jsx-dev-runtime.development.js
|
||||
var require_react_jsx_dev_runtime_development = __commonJS({
|
||||
"node_modules/react/cjs/react-jsx-dev-runtime.development.js"(exports) {
|
||||
"use strict";
|
||||
if (true) {
|
||||
(function() {
|
||||
"use strict";
|
||||
var React = require_react();
|
||||
var REACT_ELEMENT_TYPE = Symbol.for("react.element");
|
||||
var REACT_PORTAL_TYPE = Symbol.for("react.portal");
|
||||
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
||||
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
||||
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
||||
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
||||
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
||||
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
||||
var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
|
||||
var REACT_MEMO_TYPE = Symbol.for("react.memo");
|
||||
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
||||
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
|
||||
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
||||
var FAUX_ITERATOR_SYMBOL = "@@iterator";
|
||||
function getIteratorFn(maybeIterable) {
|
||||
if (maybeIterable === null || typeof maybeIterable !== "object") {
|
||||
return null;
|
||||
}
|
||||
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
||||
if (typeof maybeIterator === "function") {
|
||||
return maybeIterator;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
function error(format) {
|
||||
{
|
||||
{
|
||||
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
||||
args[_key2 - 1] = arguments[_key2];
|
||||
}
|
||||
printWarning("error", format, args);
|
||||
}
|
||||
}
|
||||
}
|
||||
function printWarning(level, format, args) {
|
||||
{
|
||||
var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
|
||||
var stack = ReactDebugCurrentFrame2.getStackAddendum();
|
||||
if (stack !== "") {
|
||||
format += "%s";
|
||||
args = args.concat([stack]);
|
||||
}
|
||||
var argsWithFormat = args.map(function(item) {
|
||||
return String(item);
|
||||
});
|
||||
argsWithFormat.unshift("Warning: " + format);
|
||||
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
||||
}
|
||||
}
|
||||
var enableScopeAPI = false;
|
||||
var enableCacheElement = false;
|
||||
var enableTransitionTracing = false;
|
||||
var enableLegacyHidden = false;
|
||||
var enableDebugTracing = false;
|
||||
var REACT_MODULE_REFERENCE;
|
||||
{
|
||||
REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
|
||||
}
|
||||
function isValidElementType(type) {
|
||||
if (typeof type === "string" || typeof type === "function") {
|
||||
return true;
|
||||
}
|
||||
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
|
||||
return true;
|
||||
}
|
||||
if (typeof type === "object" && type !== null) {
|
||||
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
||||
// types supported by any Flight configuration anywhere since
|
||||
// we don't know which Flight build this will end up being used
|
||||
// with.
|
||||
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function getWrappedName(outerType, innerType, wrapperName) {
|
||||
var displayName = outerType.displayName;
|
||||
if (displayName) {
|
||||
return displayName;
|
||||
}
|
||||
var functionName = innerType.displayName || innerType.name || "";
|
||||
return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
|
||||
}
|
||||
function getContextName(type) {
|
||||
return type.displayName || "Context";
|
||||
}
|
||||
function getComponentNameFromType(type) {
|
||||
if (type == null) {
|
||||
return null;
|
||||
}
|
||||
{
|
||||
if (typeof type.tag === "number") {
|
||||
error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
|
||||
}
|
||||
}
|
||||
if (typeof type === "function") {
|
||||
return type.displayName || type.name || null;
|
||||
}
|
||||
if (typeof type === "string") {
|
||||
return type;
|
||||
}
|
||||
switch (type) {
|
||||
case REACT_FRAGMENT_TYPE:
|
||||
return "Fragment";
|
||||
case REACT_PORTAL_TYPE:
|
||||
return "Portal";
|
||||
case REACT_PROFILER_TYPE:
|
||||
return "Profiler";
|
||||
case REACT_STRICT_MODE_TYPE:
|
||||
return "StrictMode";
|
||||
case REACT_SUSPENSE_TYPE:
|
||||
return "Suspense";
|
||||
case REACT_SUSPENSE_LIST_TYPE:
|
||||
return "SuspenseList";
|
||||
}
|
||||
if (typeof type === "object") {
|
||||
switch (type.$$typeof) {
|
||||
case REACT_CONTEXT_TYPE:
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
case REACT_PROVIDER_TYPE:
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return getWrappedName(type, type.render, "ForwardRef");
|
||||
case REACT_MEMO_TYPE:
|
||||
var outerName = type.displayName || null;
|
||||
if (outerName !== null) {
|
||||
return outerName;
|
||||
}
|
||||
return getComponentNameFromType(type.type) || "Memo";
|
||||
case REACT_LAZY_TYPE: {
|
||||
var lazyComponent = type;
|
||||
var payload = lazyComponent._payload;
|
||||
var init = lazyComponent._init;
|
||||
try {
|
||||
return getComponentNameFromType(init(payload));
|
||||
} catch (x) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
var assign = Object.assign;
|
||||
var disabledDepth = 0;
|
||||
var prevLog;
|
||||
var prevInfo;
|
||||
var prevWarn;
|
||||
var prevError;
|
||||
var prevGroup;
|
||||
var prevGroupCollapsed;
|
||||
var prevGroupEnd;
|
||||
function disabledLog() {
|
||||
}
|
||||
disabledLog.__reactDisabledLog = true;
|
||||
function disableLogs() {
|
||||
{
|
||||
if (disabledDepth === 0) {
|
||||
prevLog = console.log;
|
||||
prevInfo = console.info;
|
||||
prevWarn = console.warn;
|
||||
prevError = console.error;
|
||||
prevGroup = console.group;
|
||||
prevGroupCollapsed = console.groupCollapsed;
|
||||
prevGroupEnd = console.groupEnd;
|
||||
var props = {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
value: disabledLog,
|
||||
writable: true
|
||||
};
|
||||
Object.defineProperties(console, {
|
||||
info: props,
|
||||
log: props,
|
||||
warn: props,
|
||||
error: props,
|
||||
group: props,
|
||||
groupCollapsed: props,
|
||||
groupEnd: props
|
||||
});
|
||||
}
|
||||
disabledDepth++;
|
||||
}
|
||||
}
|
||||
function reenableLogs() {
|
||||
{
|
||||
disabledDepth--;
|
||||
if (disabledDepth === 0) {
|
||||
var props = {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
writable: true
|
||||
};
|
||||
Object.defineProperties(console, {
|
||||
log: assign({}, props, {
|
||||
value: prevLog
|
||||
}),
|
||||
info: assign({}, props, {
|
||||
value: prevInfo
|
||||
}),
|
||||
warn: assign({}, props, {
|
||||
value: prevWarn
|
||||
}),
|
||||
error: assign({}, props, {
|
||||
value: prevError
|
||||
}),
|
||||
group: assign({}, props, {
|
||||
value: prevGroup
|
||||
}),
|
||||
groupCollapsed: assign({}, props, {
|
||||
value: prevGroupCollapsed
|
||||
}),
|
||||
groupEnd: assign({}, props, {
|
||||
value: prevGroupEnd
|
||||
})
|
||||
});
|
||||
}
|
||||
if (disabledDepth < 0) {
|
||||
error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
||||
}
|
||||
}
|
||||
}
|
||||
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
|
||||
var prefix;
|
||||
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
||||
{
|
||||
if (prefix === void 0) {
|
||||
try {
|
||||
throw Error();
|
||||
} catch (x) {
|
||||
var match = x.stack.trim().match(/\n( *(at )?)/);
|
||||
prefix = match && match[1] || "";
|
||||
}
|
||||
}
|
||||
return "\n" + prefix + name;
|
||||
}
|
||||
}
|
||||
var reentry = false;
|
||||
var componentFrameCache;
|
||||
{
|
||||
var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
|
||||
componentFrameCache = new PossiblyWeakMap();
|
||||
}
|
||||
function describeNativeComponentFrame(fn, construct) {
|
||||
if (!fn || reentry) {
|
||||
return "";
|
||||
}
|
||||
{
|
||||
var frame = componentFrameCache.get(fn);
|
||||
if (frame !== void 0) {
|
||||
return frame;
|
||||
}
|
||||
}
|
||||
var control;
|
||||
reentry = true;
|
||||
var previousPrepareStackTrace = Error.prepareStackTrace;
|
||||
Error.prepareStackTrace = void 0;
|
||||
var previousDispatcher;
|
||||
{
|
||||
previousDispatcher = ReactCurrentDispatcher.current;
|
||||
ReactCurrentDispatcher.current = null;
|
||||
disableLogs();
|
||||
}
|
||||
try {
|
||||
if (construct) {
|
||||
var Fake = function() {
|
||||
throw Error();
|
||||
};
|
||||
Object.defineProperty(Fake.prototype, "props", {
|
||||
set: function() {
|
||||
throw Error();
|
||||
}
|
||||
});
|
||||
if (typeof Reflect === "object" && Reflect.construct) {
|
||||
try {
|
||||
Reflect.construct(Fake, []);
|
||||
} catch (x) {
|
||||
control = x;
|
||||
}
|
||||
Reflect.construct(fn, [], Fake);
|
||||
} else {
|
||||
try {
|
||||
Fake.call();
|
||||
} catch (x) {
|
||||
control = x;
|
||||
}
|
||||
fn.call(Fake.prototype);
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
throw Error();
|
||||
} catch (x) {
|
||||
control = x;
|
||||
}
|
||||
fn();
|
||||
}
|
||||
} catch (sample) {
|
||||
if (sample && control && typeof sample.stack === "string") {
|
||||
var sampleLines = sample.stack.split("\n");
|
||||
var controlLines = control.stack.split("\n");
|
||||
var s = sampleLines.length - 1;
|
||||
var c = controlLines.length - 1;
|
||||
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
|
||||
c--;
|
||||
}
|
||||
for (; s >= 1 && c >= 0; s--, c--) {
|
||||
if (sampleLines[s] !== controlLines[c]) {
|
||||
if (s !== 1 || c !== 1) {
|
||||
do {
|
||||
s--;
|
||||
c--;
|
||||
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
||||
var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
|
||||
if (fn.displayName && _frame.includes("<anonymous>")) {
|
||||
_frame = _frame.replace("<anonymous>", fn.displayName);
|
||||
}
|
||||
{
|
||||
if (typeof fn === "function") {
|
||||
componentFrameCache.set(fn, _frame);
|
||||
}
|
||||
}
|
||||
return _frame;
|
||||
}
|
||||
} while (s >= 1 && c >= 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
reentry = false;
|
||||
{
|
||||
ReactCurrentDispatcher.current = previousDispatcher;
|
||||
reenableLogs();
|
||||
}
|
||||
Error.prepareStackTrace = previousPrepareStackTrace;
|
||||
}
|
||||
var name = fn ? fn.displayName || fn.name : "";
|
||||
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
|
||||
{
|
||||
if (typeof fn === "function") {
|
||||
componentFrameCache.set(fn, syntheticFrame);
|
||||
}
|
||||
}
|
||||
return syntheticFrame;
|
||||
}
|
||||
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
||||
{
|
||||
return describeNativeComponentFrame(fn, false);
|
||||
}
|
||||
}
|
||||
function shouldConstruct(Component) {
|
||||
var prototype = Component.prototype;
|
||||
return !!(prototype && prototype.isReactComponent);
|
||||
}
|
||||
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
||||
if (type == null) {
|
||||
return "";
|
||||
}
|
||||
if (typeof type === "function") {
|
||||
{
|
||||
return describeNativeComponentFrame(type, shouldConstruct(type));
|
||||
}
|
||||
}
|
||||
if (typeof type === "string") {
|
||||
return describeBuiltInComponentFrame(type);
|
||||
}
|
||||
switch (type) {
|
||||
case REACT_SUSPENSE_TYPE:
|
||||
return describeBuiltInComponentFrame("Suspense");
|
||||
case REACT_SUSPENSE_LIST_TYPE:
|
||||
return describeBuiltInComponentFrame("SuspenseList");
|
||||
}
|
||||
if (typeof type === "object") {
|
||||
switch (type.$$typeof) {
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return describeFunctionComponentFrame(type.render);
|
||||
case REACT_MEMO_TYPE:
|
||||
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
||||
case REACT_LAZY_TYPE: {
|
||||
var lazyComponent = type;
|
||||
var payload = lazyComponent._payload;
|
||||
var init = lazyComponent._init;
|
||||
try {
|
||||
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
||||
} catch (x) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
var loggedTypeFailures = {};
|
||||
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
||||
function setCurrentlyValidatingElement(element) {
|
||||
{
|
||||
if (element) {
|
||||
var owner = element._owner;
|
||||
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
||||
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
||||
} else {
|
||||
ReactDebugCurrentFrame.setExtraStackFrame(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
||||
{
|
||||
var has = Function.call.bind(hasOwnProperty);
|
||||
for (var typeSpecName in typeSpecs) {
|
||||
if (has(typeSpecs, typeSpecName)) {
|
||||
var error$1 = void 0;
|
||||
try {
|
||||
if (typeof typeSpecs[typeSpecName] !== "function") {
|
||||
var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
||||
err.name = "Invariant Violation";
|
||||
throw err;
|
||||
}
|
||||
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
||||
} catch (ex) {
|
||||
error$1 = ex;
|
||||
}
|
||||
if (error$1 && !(error$1 instanceof Error)) {
|
||||
setCurrentlyValidatingElement(element);
|
||||
error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
|
||||
setCurrentlyValidatingElement(null);
|
||||
}
|
||||
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
||||
loggedTypeFailures[error$1.message] = true;
|
||||
setCurrentlyValidatingElement(element);
|
||||
error("Failed %s type: %s", location, error$1.message);
|
||||
setCurrentlyValidatingElement(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var isArrayImpl = Array.isArray;
|
||||
function isArray(a) {
|
||||
return isArrayImpl(a);
|
||||
}
|
||||
function typeName(value) {
|
||||
{
|
||||
var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
|
||||
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
||||
return type;
|
||||
}
|
||||
}
|
||||
function willCoercionThrow(value) {
|
||||
{
|
||||
try {
|
||||
testStringCoercion(value);
|
||||
return false;
|
||||
} catch (e) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
function testStringCoercion(value) {
|
||||
return "" + value;
|
||||
}
|
||||
function checkKeyStringCoercion(value) {
|
||||
{
|
||||
if (willCoercionThrow(value)) {
|
||||
error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
|
||||
return testStringCoercion(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
||||
var RESERVED_PROPS = {
|
||||
key: true,
|
||||
ref: true,
|
||||
__self: true,
|
||||
__source: true
|
||||
};
|
||||
var specialPropKeyWarningShown;
|
||||
var specialPropRefWarningShown;
|
||||
var didWarnAboutStringRefs;
|
||||
{
|
||||
didWarnAboutStringRefs = {};
|
||||
}
|
||||
function hasValidRef(config) {
|
||||
{
|
||||
if (hasOwnProperty.call(config, "ref")) {
|
||||
var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
|
||||
if (getter && getter.isReactWarning) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return config.ref !== void 0;
|
||||
}
|
||||
function hasValidKey(config) {
|
||||
{
|
||||
if (hasOwnProperty.call(config, "key")) {
|
||||
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
||||
if (getter && getter.isReactWarning) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return config.key !== void 0;
|
||||
}
|
||||
function warnIfStringRefCannotBeAutoConverted(config, self) {
|
||||
{
|
||||
if (typeof config.ref === "string" && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
|
||||
var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
|
||||
if (!didWarnAboutStringRefs[componentName]) {
|
||||
error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
|
||||
didWarnAboutStringRefs[componentName] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function defineKeyPropWarningGetter(props, displayName) {
|
||||
{
|
||||
var warnAboutAccessingKey = function() {
|
||||
if (!specialPropKeyWarningShown) {
|
||||
specialPropKeyWarningShown = true;
|
||||
error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
|
||||
}
|
||||
};
|
||||
warnAboutAccessingKey.isReactWarning = true;
|
||||
Object.defineProperty(props, "key", {
|
||||
get: warnAboutAccessingKey,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
}
|
||||
function defineRefPropWarningGetter(props, displayName) {
|
||||
{
|
||||
var warnAboutAccessingRef = function() {
|
||||
if (!specialPropRefWarningShown) {
|
||||
specialPropRefWarningShown = true;
|
||||
error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
|
||||
}
|
||||
};
|
||||
warnAboutAccessingRef.isReactWarning = true;
|
||||
Object.defineProperty(props, "ref", {
|
||||
get: warnAboutAccessingRef,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
}
|
||||
var ReactElement = function(type, key, ref, self, source, owner, props) {
|
||||
var element = {
|
||||
// This tag allows us to uniquely identify this as a React Element
|
||||
$$typeof: REACT_ELEMENT_TYPE,
|
||||
// Built-in properties that belong on the element
|
||||
type,
|
||||
key,
|
||||
ref,
|
||||
props,
|
||||
// Record the component responsible for creating this element.
|
||||
_owner: owner
|
||||
};
|
||||
{
|
||||
element._store = {};
|
||||
Object.defineProperty(element._store, "validated", {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
value: false
|
||||
});
|
||||
Object.defineProperty(element, "_self", {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
writable: false,
|
||||
value: self
|
||||
});
|
||||
Object.defineProperty(element, "_source", {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
writable: false,
|
||||
value: source
|
||||
});
|
||||
if (Object.freeze) {
|
||||
Object.freeze(element.props);
|
||||
Object.freeze(element);
|
||||
}
|
||||
}
|
||||
return element;
|
||||
};
|
||||
function jsxDEV(type, config, maybeKey, source, self) {
|
||||
{
|
||||
var propName;
|
||||
var props = {};
|
||||
var key = null;
|
||||
var ref = null;
|
||||
if (maybeKey !== void 0) {
|
||||
{
|
||||
checkKeyStringCoercion(maybeKey);
|
||||
}
|
||||
key = "" + maybeKey;
|
||||
}
|
||||
if (hasValidKey(config)) {
|
||||
{
|
||||
checkKeyStringCoercion(config.key);
|
||||
}
|
||||
key = "" + config.key;
|
||||
}
|
||||
if (hasValidRef(config)) {
|
||||
ref = config.ref;
|
||||
warnIfStringRefCannotBeAutoConverted(config, self);
|
||||
}
|
||||
for (propName in config) {
|
||||
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
||||
props[propName] = config[propName];
|
||||
}
|
||||
}
|
||||
if (type && type.defaultProps) {
|
||||
var defaultProps = type.defaultProps;
|
||||
for (propName in defaultProps) {
|
||||
if (props[propName] === void 0) {
|
||||
props[propName] = defaultProps[propName];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (key || ref) {
|
||||
var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
|
||||
if (key) {
|
||||
defineKeyPropWarningGetter(props, displayName);
|
||||
}
|
||||
if (ref) {
|
||||
defineRefPropWarningGetter(props, displayName);
|
||||
}
|
||||
}
|
||||
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
||||
}
|
||||
}
|
||||
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
||||
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
||||
function setCurrentlyValidatingElement$1(element) {
|
||||
{
|
||||
if (element) {
|
||||
var owner = element._owner;
|
||||
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
||||
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
||||
} else {
|
||||
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
var propTypesMisspellWarningShown;
|
||||
{
|
||||
propTypesMisspellWarningShown = false;
|
||||
}
|
||||
function isValidElement(object) {
|
||||
{
|
||||
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
||||
}
|
||||
}
|
||||
function getDeclarationErrorAddendum() {
|
||||
{
|
||||
if (ReactCurrentOwner$1.current) {
|
||||
var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
|
||||
if (name) {
|
||||
return "\n\nCheck the render method of `" + name + "`.";
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
function getSourceInfoErrorAddendum(source) {
|
||||
{
|
||||
if (source !== void 0) {
|
||||
var fileName = source.fileName.replace(/^.*[\\\/]/, "");
|
||||
var lineNumber = source.lineNumber;
|
||||
return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
var ownerHasKeyUseWarning = {};
|
||||
function getCurrentComponentErrorInfo(parentType) {
|
||||
{
|
||||
var info = getDeclarationErrorAddendum();
|
||||
if (!info) {
|
||||
var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
|
||||
if (parentName) {
|
||||
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
|
||||
}
|
||||
}
|
||||
return info;
|
||||
}
|
||||
}
|
||||
function validateExplicitKey(element, parentType) {
|
||||
{
|
||||
if (!element._store || element._store.validated || element.key != null) {
|
||||
return;
|
||||
}
|
||||
element._store.validated = true;
|
||||
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
||||
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
||||
return;
|
||||
}
|
||||
ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
|
||||
var childOwner = "";
|
||||
if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
|
||||
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
|
||||
}
|
||||
setCurrentlyValidatingElement$1(element);
|
||||
error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
|
||||
setCurrentlyValidatingElement$1(null);
|
||||
}
|
||||
}
|
||||
function validateChildKeys(node, parentType) {
|
||||
{
|
||||
if (typeof node !== "object") {
|
||||
return;
|
||||
}
|
||||
if (isArray(node)) {
|
||||
for (var i = 0; i < node.length; i++) {
|
||||
var child = node[i];
|
||||
if (isValidElement(child)) {
|
||||
validateExplicitKey(child, parentType);
|
||||
}
|
||||
}
|
||||
} else if (isValidElement(node)) {
|
||||
if (node._store) {
|
||||
node._store.validated = true;
|
||||
}
|
||||
} else if (node) {
|
||||
var iteratorFn = getIteratorFn(node);
|
||||
if (typeof iteratorFn === "function") {
|
||||
if (iteratorFn !== node.entries) {
|
||||
var iterator = iteratorFn.call(node);
|
||||
var step;
|
||||
while (!(step = iterator.next()).done) {
|
||||
if (isValidElement(step.value)) {
|
||||
validateExplicitKey(step.value, parentType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function validatePropTypes(element) {
|
||||
{
|
||||
var type = element.type;
|
||||
if (type === null || type === void 0 || typeof type === "string") {
|
||||
return;
|
||||
}
|
||||
var propTypes;
|
||||
if (typeof type === "function") {
|
||||
propTypes = type.propTypes;
|
||||
} else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
||||
// Inner props are checked in the reconciler.
|
||||
type.$$typeof === REACT_MEMO_TYPE)) {
|
||||
propTypes = type.propTypes;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
if (propTypes) {
|
||||
var name = getComponentNameFromType(type);
|
||||
checkPropTypes(propTypes, element.props, "prop", name, element);
|
||||
} else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
|
||||
propTypesMisspellWarningShown = true;
|
||||
var _name = getComponentNameFromType(type);
|
||||
error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
|
||||
}
|
||||
if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
|
||||
error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
||||
}
|
||||
}
|
||||
}
|
||||
function validateFragmentProps(fragment) {
|
||||
{
|
||||
var keys = Object.keys(fragment.props);
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
var key = keys[i];
|
||||
if (key !== "children" && key !== "key") {
|
||||
setCurrentlyValidatingElement$1(fragment);
|
||||
error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
|
||||
setCurrentlyValidatingElement$1(null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (fragment.ref !== null) {
|
||||
setCurrentlyValidatingElement$1(fragment);
|
||||
error("Invalid attribute `ref` supplied to `React.Fragment`.");
|
||||
setCurrentlyValidatingElement$1(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
var didWarnAboutKeySpread = {};
|
||||
function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
|
||||
{
|
||||
var validType = isValidElementType(type);
|
||||
if (!validType) {
|
||||
var info = "";
|
||||
if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
|
||||
info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
|
||||
}
|
||||
var sourceInfo = getSourceInfoErrorAddendum(source);
|
||||
if (sourceInfo) {
|
||||
info += sourceInfo;
|
||||
} else {
|
||||
info += getDeclarationErrorAddendum();
|
||||
}
|
||||
var typeString;
|
||||
if (type === null) {
|
||||
typeString = "null";
|
||||
} else if (isArray(type)) {
|
||||
typeString = "array";
|
||||
} else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
|
||||
typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
|
||||
info = " Did you accidentally export a JSX literal instead of a component?";
|
||||
} else {
|
||||
typeString = typeof type;
|
||||
}
|
||||
error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
|
||||
}
|
||||
var element = jsxDEV(type, props, key, source, self);
|
||||
if (element == null) {
|
||||
return element;
|
||||
}
|
||||
if (validType) {
|
||||
var children = props.children;
|
||||
if (children !== void 0) {
|
||||
if (isStaticChildren) {
|
||||
if (isArray(children)) {
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
validateChildKeys(children[i], type);
|
||||
}
|
||||
if (Object.freeze) {
|
||||
Object.freeze(children);
|
||||
}
|
||||
} else {
|
||||
error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
||||
}
|
||||
} else {
|
||||
validateChildKeys(children, type);
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
if (hasOwnProperty.call(props, "key")) {
|
||||
var componentName = getComponentNameFromType(type);
|
||||
var keys = Object.keys(props).filter(function(k) {
|
||||
return k !== "key";
|
||||
});
|
||||
var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
|
||||
if (!didWarnAboutKeySpread[componentName + beforeExample]) {
|
||||
var afterExample = keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}";
|
||||
error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
|
||||
didWarnAboutKeySpread[componentName + beforeExample] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (type === REACT_FRAGMENT_TYPE) {
|
||||
validateFragmentProps(element);
|
||||
} else {
|
||||
validatePropTypes(element);
|
||||
}
|
||||
return element;
|
||||
}
|
||||
}
|
||||
var jsxDEV$1 = jsxWithValidation;
|
||||
exports.Fragment = REACT_FRAGMENT_TYPE;
|
||||
exports.jsxDEV = jsxDEV$1;
|
||||
})();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/react/jsx-dev-runtime.js
|
||||
var require_jsx_dev_runtime = __commonJS({
|
||||
"node_modules/react/jsx-dev-runtime.js"(exports, module) {
|
||||
if (false) {
|
||||
module.exports = null;
|
||||
} else {
|
||||
module.exports = require_react_jsx_dev_runtime_development();
|
||||
}
|
||||
}
|
||||
});
|
||||
export default require_jsx_dev_runtime();
|
||||
/*! Bundled license information:
|
||||
|
||||
react/cjs/react-jsx-dev-runtime.development.js:
|
||||
(**
|
||||
* @license React
|
||||
* react-jsx-dev-runtime.development.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*)
|
||||
*/
|
||||
//# sourceMappingURL=react_jsx-dev-runtime.js.map
|
||||
7
node_modules/.vite/deps/react_jsx-dev-runtime.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/react_jsx-dev-runtime.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
7
node_modules/.vite/deps/react_jsx-runtime.js
generated
vendored
Normal file
7
node_modules/.vite/deps/react_jsx-runtime.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import {
|
||||
require_jsx_runtime
|
||||
} from "./chunk-6PXSGDAH.js";
|
||||
import "./chunk-DRWLMN53.js";
|
||||
import "./chunk-G3PMV62Z.js";
|
||||
export default require_jsx_runtime();
|
||||
//# sourceMappingURL=react_jsx-runtime.js.map
|
||||
7
node_modules/.vite/deps/react_jsx-runtime.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/react_jsx-runtime.js.map
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sourcesContent": [],
|
||||
"mappings": "",
|
||||
"names": []
|
||||
}
|
||||
2534
node_modules/.vite/deps/tailwind-merge.js
generated
vendored
Normal file
2534
node_modules/.vite/deps/tailwind-merge.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
node_modules/.vite/deps/tailwind-merge.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps/tailwind-merge.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1935
node_modules/.vite/deps_temp_10096c58/chunk-2YIMICFJ.js
generated
vendored
Normal file
1935
node_modules/.vite/deps_temp_10096c58/chunk-2YIMICFJ.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
node_modules/.vite/deps_temp_10096c58/chunk-2YIMICFJ.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps_temp_10096c58/chunk-2YIMICFJ.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
21626
node_modules/.vite/deps_temp_10096c58/chunk-BCXODTBQ.js
generated
vendored
Normal file
21626
node_modules/.vite/deps_temp_10096c58/chunk-BCXODTBQ.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
node_modules/.vite/deps_temp_10096c58/chunk-BCXODTBQ.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps_temp_10096c58/chunk-BCXODTBQ.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
19541
node_modules/.vite/deps_temp_10096c58/lucide-react.js
generated
vendored
Normal file
19541
node_modules/.vite/deps_temp_10096c58/lucide-react.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
node_modules/.vite/deps_temp_10096c58/lucide-react.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps_temp_10096c58/lucide-react.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
3
node_modules/.vite/deps_temp_10096c58/package.json
generated
vendored
Normal file
3
node_modules/.vite/deps_temp_10096c58/package.json
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
6
node_modules/.vite/deps_temp_10096c58/react-dom.js
generated
vendored
Normal file
6
node_modules/.vite/deps_temp_10096c58/react-dom.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import {
|
||||
require_react_dom
|
||||
} from "./chunk-BCXODTBQ.js";
|
||||
import "./chunk-2YIMICFJ.js";
|
||||
export default require_react_dom();
|
||||
//# sourceMappingURL=react-dom.js.map
|
||||
7
node_modules/.vite/deps_temp_10096c58/react-dom.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps_temp_10096c58/react-dom.js.map
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sourcesContent": [],
|
||||
"mappings": "",
|
||||
"names": []
|
||||
}
|
||||
38
node_modules/.vite/deps_temp_10096c58/react-dom_client.js
generated
vendored
Normal file
38
node_modules/.vite/deps_temp_10096c58/react-dom_client.js
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
import {
|
||||
require_react_dom
|
||||
} from "./chunk-BCXODTBQ.js";
|
||||
import {
|
||||
__commonJS
|
||||
} from "./chunk-2YIMICFJ.js";
|
||||
|
||||
// node_modules/react-dom/client.js
|
||||
var require_client = __commonJS({
|
||||
"node_modules/react-dom/client.js"(exports) {
|
||||
var m = require_react_dom();
|
||||
if (false) {
|
||||
exports.createRoot = m.createRoot;
|
||||
exports.hydrateRoot = m.hydrateRoot;
|
||||
} else {
|
||||
i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
exports.createRoot = function(c, o) {
|
||||
i.usingClientEntryPoint = true;
|
||||
try {
|
||||
return m.createRoot(c, o);
|
||||
} finally {
|
||||
i.usingClientEntryPoint = false;
|
||||
}
|
||||
};
|
||||
exports.hydrateRoot = function(c, h, o) {
|
||||
i.usingClientEntryPoint = true;
|
||||
try {
|
||||
return m.hydrateRoot(c, h, o);
|
||||
} finally {
|
||||
i.usingClientEntryPoint = false;
|
||||
}
|
||||
};
|
||||
}
|
||||
var i;
|
||||
}
|
||||
});
|
||||
export default require_client();
|
||||
//# sourceMappingURL=react-dom_client.js.map
|
||||
7
node_modules/.vite/deps_temp_10096c58/react-dom_client.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps_temp_10096c58/react-dom_client.js.map
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": ["../../react-dom/client.js"],
|
||||
"sourcesContent": ["'use strict';\n\nvar m = require('react-dom');\nif (process.env.NODE_ENV === 'production') {\n exports.createRoot = m.createRoot;\n exports.hydrateRoot = m.hydrateRoot;\n} else {\n var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n exports.createRoot = function(c, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.createRoot(c, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n exports.hydrateRoot = function(c, h, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.hydrateRoot(c, h, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n}\n"],
|
||||
"mappings": ";;;;;;;;AAAA;AAAA;AAEA,QAAI,IAAI;AACR,QAAI,OAAuC;AACzC,cAAQ,aAAa,EAAE;AACvB,cAAQ,cAAc,EAAE;AAAA,IAC1B,OAAO;AACD,UAAI,EAAE;AACV,cAAQ,aAAa,SAAS,GAAG,GAAG;AAClC,UAAE,wBAAwB;AAC1B,YAAI;AACF,iBAAO,EAAE,WAAW,GAAG,CAAC;AAAA,QAC1B,UAAE;AACA,YAAE,wBAAwB;AAAA,QAC5B;AAAA,MACF;AACA,cAAQ,cAAc,SAAS,GAAG,GAAG,GAAG;AACtC,UAAE,wBAAwB;AAC1B,YAAI;AACF,iBAAO,EAAE,YAAY,GAAG,GAAG,CAAC;AAAA,QAC9B,UAAE;AACA,YAAE,wBAAwB;AAAA,QAC5B;AAAA,MACF;AAAA,IACF;AAjBM;AAAA;AAAA;",
|
||||
"names": []
|
||||
}
|
||||
5
node_modules/.vite/deps_temp_10096c58/react.js
generated
vendored
Normal file
5
node_modules/.vite/deps_temp_10096c58/react.js
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import {
|
||||
require_react
|
||||
} from "./chunk-2YIMICFJ.js";
|
||||
export default require_react();
|
||||
//# sourceMappingURL=react.js.map
|
||||
7
node_modules/.vite/deps_temp_10096c58/react.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps_temp_10096c58/react.js.map
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"version": 3,
|
||||
"sources": [],
|
||||
"sourcesContent": [],
|
||||
"mappings": "",
|
||||
"names": []
|
||||
}
|
||||
911
node_modules/.vite/deps_temp_10096c58/react_jsx-dev-runtime.js
generated
vendored
Normal file
911
node_modules/.vite/deps_temp_10096c58/react_jsx-dev-runtime.js
generated
vendored
Normal file
@@ -0,0 +1,911 @@
|
||||
import {
|
||||
__commonJS,
|
||||
require_react
|
||||
} from "./chunk-2YIMICFJ.js";
|
||||
|
||||
// node_modules/react/cjs/react-jsx-dev-runtime.development.js
|
||||
var require_react_jsx_dev_runtime_development = __commonJS({
|
||||
"node_modules/react/cjs/react-jsx-dev-runtime.development.js"(exports) {
|
||||
"use strict";
|
||||
if (true) {
|
||||
(function() {
|
||||
"use strict";
|
||||
var React = require_react();
|
||||
var REACT_ELEMENT_TYPE = Symbol.for("react.element");
|
||||
var REACT_PORTAL_TYPE = Symbol.for("react.portal");
|
||||
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
||||
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
||||
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
||||
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
||||
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
||||
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
||||
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
||||
var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
|
||||
var REACT_MEMO_TYPE = Symbol.for("react.memo");
|
||||
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
||||
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
|
||||
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
||||
var FAUX_ITERATOR_SYMBOL = "@@iterator";
|
||||
function getIteratorFn(maybeIterable) {
|
||||
if (maybeIterable === null || typeof maybeIterable !== "object") {
|
||||
return null;
|
||||
}
|
||||
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
||||
if (typeof maybeIterator === "function") {
|
||||
return maybeIterator;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
function error(format) {
|
||||
{
|
||||
{
|
||||
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
||||
args[_key2 - 1] = arguments[_key2];
|
||||
}
|
||||
printWarning("error", format, args);
|
||||
}
|
||||
}
|
||||
}
|
||||
function printWarning(level, format, args) {
|
||||
{
|
||||
var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
|
||||
var stack = ReactDebugCurrentFrame2.getStackAddendum();
|
||||
if (stack !== "") {
|
||||
format += "%s";
|
||||
args = args.concat([stack]);
|
||||
}
|
||||
var argsWithFormat = args.map(function(item) {
|
||||
return String(item);
|
||||
});
|
||||
argsWithFormat.unshift("Warning: " + format);
|
||||
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
||||
}
|
||||
}
|
||||
var enableScopeAPI = false;
|
||||
var enableCacheElement = false;
|
||||
var enableTransitionTracing = false;
|
||||
var enableLegacyHidden = false;
|
||||
var enableDebugTracing = false;
|
||||
var REACT_MODULE_REFERENCE;
|
||||
{
|
||||
REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
|
||||
}
|
||||
function isValidElementType(type) {
|
||||
if (typeof type === "string" || typeof type === "function") {
|
||||
return true;
|
||||
}
|
||||
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
|
||||
return true;
|
||||
}
|
||||
if (typeof type === "object" && type !== null) {
|
||||
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
||||
// types supported by any Flight configuration anywhere since
|
||||
// we don't know which Flight build this will end up being used
|
||||
// with.
|
||||
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function getWrappedName(outerType, innerType, wrapperName) {
|
||||
var displayName = outerType.displayName;
|
||||
if (displayName) {
|
||||
return displayName;
|
||||
}
|
||||
var functionName = innerType.displayName || innerType.name || "";
|
||||
return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
|
||||
}
|
||||
function getContextName(type) {
|
||||
return type.displayName || "Context";
|
||||
}
|
||||
function getComponentNameFromType(type) {
|
||||
if (type == null) {
|
||||
return null;
|
||||
}
|
||||
{
|
||||
if (typeof type.tag === "number") {
|
||||
error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
|
||||
}
|
||||
}
|
||||
if (typeof type === "function") {
|
||||
return type.displayName || type.name || null;
|
||||
}
|
||||
if (typeof type === "string") {
|
||||
return type;
|
||||
}
|
||||
switch (type) {
|
||||
case REACT_FRAGMENT_TYPE:
|
||||
return "Fragment";
|
||||
case REACT_PORTAL_TYPE:
|
||||
return "Portal";
|
||||
case REACT_PROFILER_TYPE:
|
||||
return "Profiler";
|
||||
case REACT_STRICT_MODE_TYPE:
|
||||
return "StrictMode";
|
||||
case REACT_SUSPENSE_TYPE:
|
||||
return "Suspense";
|
||||
case REACT_SUSPENSE_LIST_TYPE:
|
||||
return "SuspenseList";
|
||||
}
|
||||
if (typeof type === "object") {
|
||||
switch (type.$$typeof) {
|
||||
case REACT_CONTEXT_TYPE:
|
||||
var context = type;
|
||||
return getContextName(context) + ".Consumer";
|
||||
case REACT_PROVIDER_TYPE:
|
||||
var provider = type;
|
||||
return getContextName(provider._context) + ".Provider";
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return getWrappedName(type, type.render, "ForwardRef");
|
||||
case REACT_MEMO_TYPE:
|
||||
var outerName = type.displayName || null;
|
||||
if (outerName !== null) {
|
||||
return outerName;
|
||||
}
|
||||
return getComponentNameFromType(type.type) || "Memo";
|
||||
case REACT_LAZY_TYPE: {
|
||||
var lazyComponent = type;
|
||||
var payload = lazyComponent._payload;
|
||||
var init = lazyComponent._init;
|
||||
try {
|
||||
return getComponentNameFromType(init(payload));
|
||||
} catch (x) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
var assign = Object.assign;
|
||||
var disabledDepth = 0;
|
||||
var prevLog;
|
||||
var prevInfo;
|
||||
var prevWarn;
|
||||
var prevError;
|
||||
var prevGroup;
|
||||
var prevGroupCollapsed;
|
||||
var prevGroupEnd;
|
||||
function disabledLog() {
|
||||
}
|
||||
disabledLog.__reactDisabledLog = true;
|
||||
function disableLogs() {
|
||||
{
|
||||
if (disabledDepth === 0) {
|
||||
prevLog = console.log;
|
||||
prevInfo = console.info;
|
||||
prevWarn = console.warn;
|
||||
prevError = console.error;
|
||||
prevGroup = console.group;
|
||||
prevGroupCollapsed = console.groupCollapsed;
|
||||
prevGroupEnd = console.groupEnd;
|
||||
var props = {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
value: disabledLog,
|
||||
writable: true
|
||||
};
|
||||
Object.defineProperties(console, {
|
||||
info: props,
|
||||
log: props,
|
||||
warn: props,
|
||||
error: props,
|
||||
group: props,
|
||||
groupCollapsed: props,
|
||||
groupEnd: props
|
||||
});
|
||||
}
|
||||
disabledDepth++;
|
||||
}
|
||||
}
|
||||
function reenableLogs() {
|
||||
{
|
||||
disabledDepth--;
|
||||
if (disabledDepth === 0) {
|
||||
var props = {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
writable: true
|
||||
};
|
||||
Object.defineProperties(console, {
|
||||
log: assign({}, props, {
|
||||
value: prevLog
|
||||
}),
|
||||
info: assign({}, props, {
|
||||
value: prevInfo
|
||||
}),
|
||||
warn: assign({}, props, {
|
||||
value: prevWarn
|
||||
}),
|
||||
error: assign({}, props, {
|
||||
value: prevError
|
||||
}),
|
||||
group: assign({}, props, {
|
||||
value: prevGroup
|
||||
}),
|
||||
groupCollapsed: assign({}, props, {
|
||||
value: prevGroupCollapsed
|
||||
}),
|
||||
groupEnd: assign({}, props, {
|
||||
value: prevGroupEnd
|
||||
})
|
||||
});
|
||||
}
|
||||
if (disabledDepth < 0) {
|
||||
error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
||||
}
|
||||
}
|
||||
}
|
||||
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
|
||||
var prefix;
|
||||
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
||||
{
|
||||
if (prefix === void 0) {
|
||||
try {
|
||||
throw Error();
|
||||
} catch (x) {
|
||||
var match = x.stack.trim().match(/\n( *(at )?)/);
|
||||
prefix = match && match[1] || "";
|
||||
}
|
||||
}
|
||||
return "\n" + prefix + name;
|
||||
}
|
||||
}
|
||||
var reentry = false;
|
||||
var componentFrameCache;
|
||||
{
|
||||
var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
|
||||
componentFrameCache = new PossiblyWeakMap();
|
||||
}
|
||||
function describeNativeComponentFrame(fn, construct) {
|
||||
if (!fn || reentry) {
|
||||
return "";
|
||||
}
|
||||
{
|
||||
var frame = componentFrameCache.get(fn);
|
||||
if (frame !== void 0) {
|
||||
return frame;
|
||||
}
|
||||
}
|
||||
var control;
|
||||
reentry = true;
|
||||
var previousPrepareStackTrace = Error.prepareStackTrace;
|
||||
Error.prepareStackTrace = void 0;
|
||||
var previousDispatcher;
|
||||
{
|
||||
previousDispatcher = ReactCurrentDispatcher.current;
|
||||
ReactCurrentDispatcher.current = null;
|
||||
disableLogs();
|
||||
}
|
||||
try {
|
||||
if (construct) {
|
||||
var Fake = function() {
|
||||
throw Error();
|
||||
};
|
||||
Object.defineProperty(Fake.prototype, "props", {
|
||||
set: function() {
|
||||
throw Error();
|
||||
}
|
||||
});
|
||||
if (typeof Reflect === "object" && Reflect.construct) {
|
||||
try {
|
||||
Reflect.construct(Fake, []);
|
||||
} catch (x) {
|
||||
control = x;
|
||||
}
|
||||
Reflect.construct(fn, [], Fake);
|
||||
} else {
|
||||
try {
|
||||
Fake.call();
|
||||
} catch (x) {
|
||||
control = x;
|
||||
}
|
||||
fn.call(Fake.prototype);
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
throw Error();
|
||||
} catch (x) {
|
||||
control = x;
|
||||
}
|
||||
fn();
|
||||
}
|
||||
} catch (sample) {
|
||||
if (sample && control && typeof sample.stack === "string") {
|
||||
var sampleLines = sample.stack.split("\n");
|
||||
var controlLines = control.stack.split("\n");
|
||||
var s = sampleLines.length - 1;
|
||||
var c = controlLines.length - 1;
|
||||
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
|
||||
c--;
|
||||
}
|
||||
for (; s >= 1 && c >= 0; s--, c--) {
|
||||
if (sampleLines[s] !== controlLines[c]) {
|
||||
if (s !== 1 || c !== 1) {
|
||||
do {
|
||||
s--;
|
||||
c--;
|
||||
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
||||
var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
|
||||
if (fn.displayName && _frame.includes("<anonymous>")) {
|
||||
_frame = _frame.replace("<anonymous>", fn.displayName);
|
||||
}
|
||||
{
|
||||
if (typeof fn === "function") {
|
||||
componentFrameCache.set(fn, _frame);
|
||||
}
|
||||
}
|
||||
return _frame;
|
||||
}
|
||||
} while (s >= 1 && c >= 0);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
reentry = false;
|
||||
{
|
||||
ReactCurrentDispatcher.current = previousDispatcher;
|
||||
reenableLogs();
|
||||
}
|
||||
Error.prepareStackTrace = previousPrepareStackTrace;
|
||||
}
|
||||
var name = fn ? fn.displayName || fn.name : "";
|
||||
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
|
||||
{
|
||||
if (typeof fn === "function") {
|
||||
componentFrameCache.set(fn, syntheticFrame);
|
||||
}
|
||||
}
|
||||
return syntheticFrame;
|
||||
}
|
||||
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
||||
{
|
||||
return describeNativeComponentFrame(fn, false);
|
||||
}
|
||||
}
|
||||
function shouldConstruct(Component) {
|
||||
var prototype = Component.prototype;
|
||||
return !!(prototype && prototype.isReactComponent);
|
||||
}
|
||||
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
||||
if (type == null) {
|
||||
return "";
|
||||
}
|
||||
if (typeof type === "function") {
|
||||
{
|
||||
return describeNativeComponentFrame(type, shouldConstruct(type));
|
||||
}
|
||||
}
|
||||
if (typeof type === "string") {
|
||||
return describeBuiltInComponentFrame(type);
|
||||
}
|
||||
switch (type) {
|
||||
case REACT_SUSPENSE_TYPE:
|
||||
return describeBuiltInComponentFrame("Suspense");
|
||||
case REACT_SUSPENSE_LIST_TYPE:
|
||||
return describeBuiltInComponentFrame("SuspenseList");
|
||||
}
|
||||
if (typeof type === "object") {
|
||||
switch (type.$$typeof) {
|
||||
case REACT_FORWARD_REF_TYPE:
|
||||
return describeFunctionComponentFrame(type.render);
|
||||
case REACT_MEMO_TYPE:
|
||||
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
||||
case REACT_LAZY_TYPE: {
|
||||
var lazyComponent = type;
|
||||
var payload = lazyComponent._payload;
|
||||
var init = lazyComponent._init;
|
||||
try {
|
||||
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
||||
} catch (x) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
var loggedTypeFailures = {};
|
||||
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
||||
function setCurrentlyValidatingElement(element) {
|
||||
{
|
||||
if (element) {
|
||||
var owner = element._owner;
|
||||
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
||||
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
||||
} else {
|
||||
ReactDebugCurrentFrame.setExtraStackFrame(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
||||
{
|
||||
var has = Function.call.bind(hasOwnProperty);
|
||||
for (var typeSpecName in typeSpecs) {
|
||||
if (has(typeSpecs, typeSpecName)) {
|
||||
var error$1 = void 0;
|
||||
try {
|
||||
if (typeof typeSpecs[typeSpecName] !== "function") {
|
||||
var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
||||
err.name = "Invariant Violation";
|
||||
throw err;
|
||||
}
|
||||
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
||||
} catch (ex) {
|
||||
error$1 = ex;
|
||||
}
|
||||
if (error$1 && !(error$1 instanceof Error)) {
|
||||
setCurrentlyValidatingElement(element);
|
||||
error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
|
||||
setCurrentlyValidatingElement(null);
|
||||
}
|
||||
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
||||
loggedTypeFailures[error$1.message] = true;
|
||||
setCurrentlyValidatingElement(element);
|
||||
error("Failed %s type: %s", location, error$1.message);
|
||||
setCurrentlyValidatingElement(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var isArrayImpl = Array.isArray;
|
||||
function isArray(a) {
|
||||
return isArrayImpl(a);
|
||||
}
|
||||
function typeName(value) {
|
||||
{
|
||||
var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
|
||||
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
|
||||
return type;
|
||||
}
|
||||
}
|
||||
function willCoercionThrow(value) {
|
||||
{
|
||||
try {
|
||||
testStringCoercion(value);
|
||||
return false;
|
||||
} catch (e) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
function testStringCoercion(value) {
|
||||
return "" + value;
|
||||
}
|
||||
function checkKeyStringCoercion(value) {
|
||||
{
|
||||
if (willCoercionThrow(value)) {
|
||||
error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
|
||||
return testStringCoercion(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
||||
var RESERVED_PROPS = {
|
||||
key: true,
|
||||
ref: true,
|
||||
__self: true,
|
||||
__source: true
|
||||
};
|
||||
var specialPropKeyWarningShown;
|
||||
var specialPropRefWarningShown;
|
||||
var didWarnAboutStringRefs;
|
||||
{
|
||||
didWarnAboutStringRefs = {};
|
||||
}
|
||||
function hasValidRef(config) {
|
||||
{
|
||||
if (hasOwnProperty.call(config, "ref")) {
|
||||
var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
|
||||
if (getter && getter.isReactWarning) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return config.ref !== void 0;
|
||||
}
|
||||
function hasValidKey(config) {
|
||||
{
|
||||
if (hasOwnProperty.call(config, "key")) {
|
||||
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
||||
if (getter && getter.isReactWarning) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return config.key !== void 0;
|
||||
}
|
||||
function warnIfStringRefCannotBeAutoConverted(config, self) {
|
||||
{
|
||||
if (typeof config.ref === "string" && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
|
||||
var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
|
||||
if (!didWarnAboutStringRefs[componentName]) {
|
||||
error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
|
||||
didWarnAboutStringRefs[componentName] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function defineKeyPropWarningGetter(props, displayName) {
|
||||
{
|
||||
var warnAboutAccessingKey = function() {
|
||||
if (!specialPropKeyWarningShown) {
|
||||
specialPropKeyWarningShown = true;
|
||||
error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
|
||||
}
|
||||
};
|
||||
warnAboutAccessingKey.isReactWarning = true;
|
||||
Object.defineProperty(props, "key", {
|
||||
get: warnAboutAccessingKey,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
}
|
||||
function defineRefPropWarningGetter(props, displayName) {
|
||||
{
|
||||
var warnAboutAccessingRef = function() {
|
||||
if (!specialPropRefWarningShown) {
|
||||
specialPropRefWarningShown = true;
|
||||
error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
|
||||
}
|
||||
};
|
||||
warnAboutAccessingRef.isReactWarning = true;
|
||||
Object.defineProperty(props, "ref", {
|
||||
get: warnAboutAccessingRef,
|
||||
configurable: true
|
||||
});
|
||||
}
|
||||
}
|
||||
var ReactElement = function(type, key, ref, self, source, owner, props) {
|
||||
var element = {
|
||||
// This tag allows us to uniquely identify this as a React Element
|
||||
$$typeof: REACT_ELEMENT_TYPE,
|
||||
// Built-in properties that belong on the element
|
||||
type,
|
||||
key,
|
||||
ref,
|
||||
props,
|
||||
// Record the component responsible for creating this element.
|
||||
_owner: owner
|
||||
};
|
||||
{
|
||||
element._store = {};
|
||||
Object.defineProperty(element._store, "validated", {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
value: false
|
||||
});
|
||||
Object.defineProperty(element, "_self", {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
writable: false,
|
||||
value: self
|
||||
});
|
||||
Object.defineProperty(element, "_source", {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
writable: false,
|
||||
value: source
|
||||
});
|
||||
if (Object.freeze) {
|
||||
Object.freeze(element.props);
|
||||
Object.freeze(element);
|
||||
}
|
||||
}
|
||||
return element;
|
||||
};
|
||||
function jsxDEV(type, config, maybeKey, source, self) {
|
||||
{
|
||||
var propName;
|
||||
var props = {};
|
||||
var key = null;
|
||||
var ref = null;
|
||||
if (maybeKey !== void 0) {
|
||||
{
|
||||
checkKeyStringCoercion(maybeKey);
|
||||
}
|
||||
key = "" + maybeKey;
|
||||
}
|
||||
if (hasValidKey(config)) {
|
||||
{
|
||||
checkKeyStringCoercion(config.key);
|
||||
}
|
||||
key = "" + config.key;
|
||||
}
|
||||
if (hasValidRef(config)) {
|
||||
ref = config.ref;
|
||||
warnIfStringRefCannotBeAutoConverted(config, self);
|
||||
}
|
||||
for (propName in config) {
|
||||
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
||||
props[propName] = config[propName];
|
||||
}
|
||||
}
|
||||
if (type && type.defaultProps) {
|
||||
var defaultProps = type.defaultProps;
|
||||
for (propName in defaultProps) {
|
||||
if (props[propName] === void 0) {
|
||||
props[propName] = defaultProps[propName];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (key || ref) {
|
||||
var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
|
||||
if (key) {
|
||||
defineKeyPropWarningGetter(props, displayName);
|
||||
}
|
||||
if (ref) {
|
||||
defineRefPropWarningGetter(props, displayName);
|
||||
}
|
||||
}
|
||||
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
||||
}
|
||||
}
|
||||
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
||||
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
||||
function setCurrentlyValidatingElement$1(element) {
|
||||
{
|
||||
if (element) {
|
||||
var owner = element._owner;
|
||||
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
||||
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
||||
} else {
|
||||
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
var propTypesMisspellWarningShown;
|
||||
{
|
||||
propTypesMisspellWarningShown = false;
|
||||
}
|
||||
function isValidElement(object) {
|
||||
{
|
||||
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
||||
}
|
||||
}
|
||||
function getDeclarationErrorAddendum() {
|
||||
{
|
||||
if (ReactCurrentOwner$1.current) {
|
||||
var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
|
||||
if (name) {
|
||||
return "\n\nCheck the render method of `" + name + "`.";
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
function getSourceInfoErrorAddendum(source) {
|
||||
{
|
||||
if (source !== void 0) {
|
||||
var fileName = source.fileName.replace(/^.*[\\\/]/, "");
|
||||
var lineNumber = source.lineNumber;
|
||||
return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
var ownerHasKeyUseWarning = {};
|
||||
function getCurrentComponentErrorInfo(parentType) {
|
||||
{
|
||||
var info = getDeclarationErrorAddendum();
|
||||
if (!info) {
|
||||
var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
|
||||
if (parentName) {
|
||||
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
|
||||
}
|
||||
}
|
||||
return info;
|
||||
}
|
||||
}
|
||||
function validateExplicitKey(element, parentType) {
|
||||
{
|
||||
if (!element._store || element._store.validated || element.key != null) {
|
||||
return;
|
||||
}
|
||||
element._store.validated = true;
|
||||
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
||||
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
||||
return;
|
||||
}
|
||||
ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
|
||||
var childOwner = "";
|
||||
if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
|
||||
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
|
||||
}
|
||||
setCurrentlyValidatingElement$1(element);
|
||||
error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
|
||||
setCurrentlyValidatingElement$1(null);
|
||||
}
|
||||
}
|
||||
function validateChildKeys(node, parentType) {
|
||||
{
|
||||
if (typeof node !== "object") {
|
||||
return;
|
||||
}
|
||||
if (isArray(node)) {
|
||||
for (var i = 0; i < node.length; i++) {
|
||||
var child = node[i];
|
||||
if (isValidElement(child)) {
|
||||
validateExplicitKey(child, parentType);
|
||||
}
|
||||
}
|
||||
} else if (isValidElement(node)) {
|
||||
if (node._store) {
|
||||
node._store.validated = true;
|
||||
}
|
||||
} else if (node) {
|
||||
var iteratorFn = getIteratorFn(node);
|
||||
if (typeof iteratorFn === "function") {
|
||||
if (iteratorFn !== node.entries) {
|
||||
var iterator = iteratorFn.call(node);
|
||||
var step;
|
||||
while (!(step = iterator.next()).done) {
|
||||
if (isValidElement(step.value)) {
|
||||
validateExplicitKey(step.value, parentType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function validatePropTypes(element) {
|
||||
{
|
||||
var type = element.type;
|
||||
if (type === null || type === void 0 || typeof type === "string") {
|
||||
return;
|
||||
}
|
||||
var propTypes;
|
||||
if (typeof type === "function") {
|
||||
propTypes = type.propTypes;
|
||||
} else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
||||
// Inner props are checked in the reconciler.
|
||||
type.$$typeof === REACT_MEMO_TYPE)) {
|
||||
propTypes = type.propTypes;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
if (propTypes) {
|
||||
var name = getComponentNameFromType(type);
|
||||
checkPropTypes(propTypes, element.props, "prop", name, element);
|
||||
} else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
|
||||
propTypesMisspellWarningShown = true;
|
||||
var _name = getComponentNameFromType(type);
|
||||
error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
|
||||
}
|
||||
if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
|
||||
error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
||||
}
|
||||
}
|
||||
}
|
||||
function validateFragmentProps(fragment) {
|
||||
{
|
||||
var keys = Object.keys(fragment.props);
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
var key = keys[i];
|
||||
if (key !== "children" && key !== "key") {
|
||||
setCurrentlyValidatingElement$1(fragment);
|
||||
error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
|
||||
setCurrentlyValidatingElement$1(null);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (fragment.ref !== null) {
|
||||
setCurrentlyValidatingElement$1(fragment);
|
||||
error("Invalid attribute `ref` supplied to `React.Fragment`.");
|
||||
setCurrentlyValidatingElement$1(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
var didWarnAboutKeySpread = {};
|
||||
function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
|
||||
{
|
||||
var validType = isValidElementType(type);
|
||||
if (!validType) {
|
||||
var info = "";
|
||||
if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
|
||||
info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
|
||||
}
|
||||
var sourceInfo = getSourceInfoErrorAddendum(source);
|
||||
if (sourceInfo) {
|
||||
info += sourceInfo;
|
||||
} else {
|
||||
info += getDeclarationErrorAddendum();
|
||||
}
|
||||
var typeString;
|
||||
if (type === null) {
|
||||
typeString = "null";
|
||||
} else if (isArray(type)) {
|
||||
typeString = "array";
|
||||
} else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
|
||||
typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
|
||||
info = " Did you accidentally export a JSX literal instead of a component?";
|
||||
} else {
|
||||
typeString = typeof type;
|
||||
}
|
||||
error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
|
||||
}
|
||||
var element = jsxDEV(type, props, key, source, self);
|
||||
if (element == null) {
|
||||
return element;
|
||||
}
|
||||
if (validType) {
|
||||
var children = props.children;
|
||||
if (children !== void 0) {
|
||||
if (isStaticChildren) {
|
||||
if (isArray(children)) {
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
validateChildKeys(children[i], type);
|
||||
}
|
||||
if (Object.freeze) {
|
||||
Object.freeze(children);
|
||||
}
|
||||
} else {
|
||||
error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
||||
}
|
||||
} else {
|
||||
validateChildKeys(children, type);
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
if (hasOwnProperty.call(props, "key")) {
|
||||
var componentName = getComponentNameFromType(type);
|
||||
var keys = Object.keys(props).filter(function(k) {
|
||||
return k !== "key";
|
||||
});
|
||||
var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
|
||||
if (!didWarnAboutKeySpread[componentName + beforeExample]) {
|
||||
var afterExample = keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}";
|
||||
error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
|
||||
didWarnAboutKeySpread[componentName + beforeExample] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (type === REACT_FRAGMENT_TYPE) {
|
||||
validateFragmentProps(element);
|
||||
} else {
|
||||
validatePropTypes(element);
|
||||
}
|
||||
return element;
|
||||
}
|
||||
}
|
||||
var jsxDEV$1 = jsxWithValidation;
|
||||
exports.Fragment = REACT_FRAGMENT_TYPE;
|
||||
exports.jsxDEV = jsxDEV$1;
|
||||
})();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// node_modules/react/jsx-dev-runtime.js
|
||||
var require_jsx_dev_runtime = __commonJS({
|
||||
"node_modules/react/jsx-dev-runtime.js"(exports, module) {
|
||||
if (false) {
|
||||
module.exports = null;
|
||||
} else {
|
||||
module.exports = require_react_jsx_dev_runtime_development();
|
||||
}
|
||||
}
|
||||
});
|
||||
export default require_jsx_dev_runtime();
|
||||
/*! Bundled license information:
|
||||
|
||||
react/cjs/react-jsx-dev-runtime.development.js:
|
||||
(**
|
||||
* @license React
|
||||
* react-jsx-dev-runtime.development.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*)
|
||||
*/
|
||||
//# sourceMappingURL=react_jsx-dev-runtime.js.map
|
||||
7
node_modules/.vite/deps_temp_10096c58/react_jsx-dev-runtime.js.map
generated
vendored
Normal file
7
node_modules/.vite/deps_temp_10096c58/react_jsx-dev-runtime.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user