@vetc-miniapp/ui-react 0.0.33 → 0.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ export interface BadgeProps {
3
+ /** Dot variant — 8×8px indicator, no content */
4
+ dot?: boolean;
5
+ /** Number variant — capped at overflowCount (default 99), shows "99+" */
6
+ count?: number;
7
+ /** Label variant — short text label */
8
+ label?: string;
9
+ /** Max count before showing "+", default 99 */
10
+ overflowCount?: number;
11
+ /** 2px white ring outline — use for contrast against dark/image backgrounds */
12
+ outline?: boolean;
13
+ /** Wrap a child element; badge is positioned at its top-right corner */
14
+ children?: React.ReactNode;
15
+ className?: string;
16
+ style?: React.CSSProperties;
17
+ }
18
+ export declare function Badge({ dot, count, label, overflowCount, outline, children, className, style, }: BadgeProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Badge } from './Badge';
2
+ export type { BadgeProps } from './Badge';
@@ -1,19 +1,27 @@
1
1
  /**
2
- * VETC BottomSheet — tokenized
3
- * Figma: Sheet page — 16px top radius, handle bar, slide-up animation
2
+ * VETC BottomSheet
3
+ * Figma: oB8J103JLuYGnobbr8oGMe node 8486:79118
4
+ * — Floats 8px from screen edges, 16px radius all corners
5
+ * — Header 48px: hidden-spacer | title centered | X button
6
+ * — Body scrolls, header + footer fixed
7
+ * — Optional footer slot (fixed button bar with top border)
4
8
  */
5
9
  import React from 'react';
6
10
  export interface BottomSheetProps {
7
11
  open: boolean;
8
12
  title?: React.ReactNode;
9
13
  children?: React.ReactNode;
14
+ /** Fixed button bar slot at the bottom, rendered outside the scroll area */
15
+ footer?: React.ReactNode;
10
16
  maskClosable?: boolean;
17
+ /** Drag handle pill at top — off by default (not in Figma spec) */
11
18
  showHandle?: boolean;
19
+ swipeToClose?: boolean;
12
20
  maxHeight?: string;
13
21
  onClose?: () => void;
14
22
  className?: string;
15
23
  style?: React.CSSProperties;
16
24
  id?: string;
17
25
  }
18
- export declare function BottomSheet({ open, title, children, maskClosable, showHandle, maxHeight, onClose, className, style, id, }: BottomSheetProps): import("react/jsx-runtime").JSX.Element;
26
+ export declare function BottomSheet({ open, title, children, footer, maskClosable, showHandle, swipeToClose, maxHeight, onClose, className, style, id, }: BottomSheetProps): import("react/jsx-runtime").JSX.Element;
19
27
  export default BottomSheet;
@@ -3,16 +3,16 @@
3
3
  * Figma: filled/outlined/elevated/ghost styles
4
4
  * Large: h=48px, radius=12px, font=16px/600
5
5
  * Small: h=32px, radius=8px, font=14px/600
6
- * style: filled | outlined | elevated | ghost | danger | danger-outlined
6
+ * type: filled | outlined | elevated | ghost | danger | danger-outlined
7
7
  * variant: brand (green) | neutral (gray-90)
8
8
  */
9
9
  import React from 'react';
10
- export type ButtonStyle = 'filled' | 'outlined' | 'elevated' | 'ghost' | 'danger' | 'danger-outlined';
10
+ export type ButtonType = 'filled' | 'outlined' | 'elevated' | 'ghost' | 'danger' | 'danger-outlined';
11
11
  export type ButtonVariant = 'brand' | 'neutral';
12
12
  export type ButtonSize = 'lg' | 'sm';
13
13
  export type ButtonShape = 'rounded' | 'pill';
14
14
  export interface ButtonProps {
15
- style?: ButtonStyle;
15
+ type?: ButtonType;
16
16
  variant?: ButtonVariant;
17
17
  size?: ButtonSize;
18
18
  shape?: ButtonShape;
@@ -28,5 +28,5 @@ export interface ButtonProps {
28
28
  css?: React.CSSProperties;
29
29
  id?: string;
30
30
  }
31
- export declare function Button({ style, variant, size, shape, block, disabled, loading, icon, iconRight, onClick, children, htmlType, className, css, id, }: ButtonProps): import("react/jsx-runtime").JSX.Element;
31
+ export declare function Button({ type, variant, size, shape, block, disabled, loading, icon, iconRight, onClick, children, htmlType, className, css, id, }: ButtonProps): import("react/jsx-runtime").JSX.Element;
32
32
  export default Button;
@@ -1,2 +1,2 @@
1
1
  export { Button } from './Button';
2
- export type { ButtonProps, ButtonStyle, ButtonVariant, ButtonSize, ButtonShape } from './Button';
2
+ export type { ButtonProps, ButtonType, ButtonVariant, ButtonSize, ButtonShape } from './Button';
@@ -3,12 +3,14 @@
3
3
  * Figma: Chip page (7 types × 3 styles)
4
4
  */
5
5
  import React from 'react';
6
- export type ChipStyle = 'filled' | 'outlined' | 'tinted';
7
- export type ChipType = 'default' | 'brand' | 'positive' | 'negative' | 'warning' | 'info';
6
+ export type ChipType = 'filled' | 'outlined' | 'tinted';
7
+ export type ChipStatus = 'default' | 'positive' | 'negative' | 'warning' | 'info';
8
+ export type ChipVariant = 'brand' | 'neutral';
8
9
  export type ChipShape = 'pill' | 'rounded';
9
10
  export interface ChipProps {
10
- style?: ChipStyle;
11
11
  type?: ChipType;
12
+ status?: ChipStatus;
13
+ variant?: ChipVariant;
12
14
  shape?: ChipShape;
13
15
  size?: 'md' | 'sm';
14
16
  icon?: React.ReactNode;
@@ -20,5 +22,5 @@ export interface ChipProps {
20
22
  css?: React.CSSProperties;
21
23
  id?: string;
22
24
  }
23
- export declare function Chip({ style, type, shape, size, icon, closable, onClose, onClick, children, className, css, id, }: ChipProps): import("react/jsx-runtime").JSX.Element;
25
+ export declare function Chip({ type, status, variant, shape, size, icon, closable, onClose, onClick, children, className, css, id, }: ChipProps): import("react/jsx-runtime").JSX.Element;
24
26
  export default Chip;
@@ -1,2 +1,2 @@
1
1
  export { Chip } from './Chip';
2
- export type { ChipProps, ChipStyle, ChipType, ChipShape } from './Chip';
2
+ export type { ChipProps, ChipType, ChipStatus, ChipVariant, ChipShape } from './Chip';
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
2
  export interface DialogProps {
3
3
  open: boolean;
4
- /** Optional image URL shown at the top of the dialog */
4
+ /** Image-only variant 1:1 image fills the dialog, floating close button at top-right */
5
+ imageOnly?: boolean;
6
+ /** Image URL. Text dialog: 80×80 thumbnail centered at top. imageOnly: fills dialog */
5
7
  image?: string;
6
8
  title?: React.ReactNode;
7
9
  description?: React.ReactNode;
@@ -11,9 +13,9 @@ export interface DialogProps {
11
13
  okLoading?: boolean;
12
14
  okDanger?: boolean;
13
15
  onOk?: () => void;
16
+ /** Handles X close button, cancel button, and mask click */
14
17
  onCancel?: () => void;
15
- /** Close dialog when clicking outside (default: true) */
16
18
  maskClosable?: boolean;
17
19
  }
18
- export declare function Dialog({ open, image, title, description, okText, cancelText, okDisabled, okLoading, okDanger, onOk, onCancel, maskClosable, }: DialogProps): import("react/jsx-runtime").JSX.Element;
20
+ export declare function Dialog({ open, imageOnly, image, title, description, okText, cancelText, okDisabled, okLoading, okDanger, onOk, onCancel, maskClosable, }: DialogProps): import("react/jsx-runtime").JSX.Element;
19
21
  export default Dialog;
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ export interface DropdownOption {
3
+ label: string;
4
+ value: string | number;
5
+ disabled?: boolean;
6
+ }
7
+ export interface DropdownProps {
8
+ label?: string;
9
+ placeholder?: string;
10
+ value?: string | number | (string | number)[];
11
+ defaultValue?: string | number | (string | number)[];
12
+ options?: DropdownOption[];
13
+ helperText?: string;
14
+ error?: string;
15
+ disabled?: boolean;
16
+ /** Allow selecting multiple options */
17
+ multiple?: boolean;
18
+ /** Show search input inside options panel */
19
+ searchable?: boolean;
20
+ /** Show clear button when value is set */
21
+ allowClear?: boolean;
22
+ loading?: boolean;
23
+ onChange?: (value: any, option: any) => void;
24
+ onSearch?: (value: string) => void;
25
+ required?: boolean;
26
+ id?: string;
27
+ className?: string;
28
+ style?: React.CSSProperties;
29
+ popupMatchSelectWidth?: boolean;
30
+ }
31
+ export declare function Dropdown({ label, placeholder, value: valueProp, defaultValue, options, helperText, error, disabled, multiple, searchable, allowClear, loading: _loading, popupMatchSelectWidth: _pmw, onChange, onSearch, required, id, className, style, }: DropdownProps): import("react/jsx-runtime").JSX.Element;
32
+ export default Dropdown;
@@ -0,0 +1,2 @@
1
+ export { Dropdown } from './Dropdown';
2
+ export type { DropdownProps, DropdownOption } from './Dropdown';
@@ -28,6 +28,8 @@ export interface NavigationBarProps {
28
28
  backgroundColor?: string;
29
29
  divider?: boolean;
30
30
  transparent?: boolean;
31
+ /** Portal mode — true = portal to document.body; HTMLElement = portal to specific container. Auto-applies position:fixed top:0 */
32
+ portal?: boolean | HTMLElement;
31
33
  className?: string;
32
34
  style?: React.CSSProperties;
33
35
  id?: string;
@@ -40,5 +42,5 @@ export interface NavigationBarProps {
40
42
  left?: React.ReactNode;
41
43
  right?: React.ReactNode;
42
44
  }
43
- export declare function NavigationBar({ title, leading, leadingIcon, onLeadingPress, actions, leftSlot, rightSlot, backgroundColor, divider, transparent, className, style, id, showBack, backIcon, onBack, left, right, }: NavigationBarProps): import("react/jsx-runtime").JSX.Element;
45
+ export declare function NavigationBar({ title, leading, leadingIcon, onLeadingPress, actions, leftSlot, rightSlot, backgroundColor, divider, transparent, portal, className, style, id, showBack, backIcon, onBack, left, right, }: NavigationBarProps): import("react/jsx-runtime").JSX.Element;
44
46
  export default NavigationBar;
@@ -1,41 +1 @@
1
- /**
2
- * VETC Toast — tokenized
3
- * Figma: Toast page (7 variants)
4
- */
5
- import React from 'react';
6
- export type ToastType = 'default' | 'success' | 'error' | 'warning' | 'info';
7
- export interface ToastOptions {
8
- message: string;
9
- description?: string;
10
- type?: ToastType;
11
- placement?: 'top' | 'topLeft' | 'topRight' | 'bottom' | 'bottomLeft' | 'bottomRight';
12
- /** Duration in seconds (0 = persistent) */
13
- duration?: number;
14
- icon?: React.ReactNode;
15
- onClose?: () => void;
16
- }
17
- /**
18
- * Static programmatic toast API
19
- * Usage: toast.success('Message')
20
- */
21
- export declare const toast: {
22
- show(opts: ToastOptions): void;
23
- success: (msg: string, description?: string) => void;
24
- error: (msg: string, description?: string) => void;
25
- warning: (msg: string, description?: string) => void;
26
- info: (msg: string, description?: string) => void;
27
- };
28
- /**
29
- * Hook-based toast — requires VETCProvider (antd App wrapper)
30
- */
31
- export declare function useToast(): {
32
- contextHolder: React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
33
- toast: {
34
- show: (opts: ToastOptions) => void;
35
- success: (msg: string, description?: string) => void;
36
- error: (msg: string, description?: string) => void;
37
- warning: (msg: string, description?: string) => void;
38
- info: (msg: string, description?: string) => void;
39
- };
40
- };
41
- export default toast;
1
+ export * from './toastStore';
@@ -0,0 +1,13 @@
1
+ /**
2
+ * VETC ToastContainer — portal renderer
3
+ * Figma: oB8J103JLuYGnobbr8oGMe node 5785:21005
4
+ *
5
+ * Layout: [16px][icon 20px][8px][message flex-1] | [text-action][close 32px][8px]
6
+ * Height: 56px (min), grows for wrapped text
7
+ * Variants:
8
+ * Neutral (default/info/warning) — dark inverse bg, all-white content
9
+ * Positive (success) — green bg, all-white content
10
+ * Negative (error) — red bg, all-white content
11
+ */
12
+ import React from 'react';
13
+ export declare function ToastContainer(): React.ReactPortal;
@@ -1,2 +1,3 @@
1
- export { toast, useToast } from './Toast';
2
- export type { ToastOptions, ToastType } from './Toast';
1
+ export { toast, useToast } from './toastStore';
2
+ export type { ToastOptions, ToastType, ToastVariant, ToastItem } from './toastStore';
3
+ export { ToastContainer } from './ToastContainer';
@@ -0,0 +1,66 @@
1
+ /**
2
+ * VETC Toast — types, static API, shared push mechanism
3
+ * Figma: oB8J103JLuYGnobbr8oGMe node 5785:21005
4
+ * Portal component: ToastContainer.tsx
5
+ */
6
+ import type React from 'react';
7
+ /** Semantic intent — determines default icon */
8
+ export type ToastType = 'default' | 'success' | 'error' | 'warning' | 'info';
9
+ /** Visual variant — determines background color (Figma: Neutral / Positive / Negative) */
10
+ export type ToastVariant = 'neutral' | 'positive' | 'negative';
11
+ export interface ToastOptions {
12
+ message: string;
13
+ description?: string;
14
+ type?: ToastType;
15
+ /** Background variant. Defaults: success→positive, error→negative, others→neutral */
16
+ variant?: ToastVariant;
17
+ placement?: 'top' | 'bottom';
18
+ /** Duration in seconds — 0 = persistent */
19
+ duration?: number;
20
+ icon?: React.ReactNode;
21
+ /** Text action button on the right (e.g. "Hoàn tác", "Thử lại") */
22
+ action?: {
23
+ label: string;
24
+ onClick: () => void;
25
+ };
26
+ /** Show X close button — defaults true when duration=0 */
27
+ closable?: boolean;
28
+ onClose?: () => void;
29
+ }
30
+ export interface ToastItem {
31
+ id: number;
32
+ type: ToastType;
33
+ variant: ToastVariant;
34
+ placement: 'top' | 'bottom';
35
+ duration: number;
36
+ message: string;
37
+ description?: string;
38
+ icon?: React.ReactNode;
39
+ action?: {
40
+ label: string;
41
+ onClick: () => void;
42
+ };
43
+ closable: boolean;
44
+ onClose?: () => void;
45
+ exiting: boolean;
46
+ }
47
+ export declare function setPush(fn: (item: ToastItem) => void): void;
48
+ export declare function clearPush(): void;
49
+ export declare const toast: {
50
+ show: (opts: ToastOptions) => void;
51
+ success: (message: string, description?: string) => void;
52
+ error: (message: string, description?: string) => void;
53
+ warning: (message: string, description?: string) => void;
54
+ info: (message: string, description?: string) => void;
55
+ };
56
+ export declare function useToast(): {
57
+ contextHolder: React.ReactNode;
58
+ toast: {
59
+ show: (opts: ToastOptions) => void;
60
+ success: (message: string, description?: string) => void;
61
+ error: (message: string, description?: string) => void;
62
+ warning: (message: string, description?: string) => void;
63
+ info: (message: string, description?: string) => void;
64
+ };
65
+ };
66
+ export default toast;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ export type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
3
+ export type TooltipAlign = 'center' | 'start' | 'end';
4
+ export interface TooltipProps {
5
+ content: React.ReactNode;
6
+ placement?: TooltipPlacement;
7
+ align?: TooltipAlign;
8
+ closable?: boolean;
9
+ open?: boolean;
10
+ defaultOpen?: boolean;
11
+ onClose?: () => void;
12
+ children: React.ReactElement;
13
+ className?: string;
14
+ style?: React.CSSProperties;
15
+ }
16
+ export declare function Tooltip({ content, placement, align, closable, open: openProp, defaultOpen, onClose, children, style, className, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { Tooltip } from './Tooltip';
2
+ export type { TooltipProps, TooltipPlacement, TooltipAlign } from './Tooltip';
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ export { colorGlobal, colorAlias } from './tokens/colors';
4
4
  export { fontFamily, fontWeight, fontSize, lineHeight, letterSpacing, textStyle } from './tokens/typography';
5
5
  export { spacing, borderRadius, componentHeight, shadow } from './tokens/spacing';
6
6
  export { Button } from './components/button';
7
- export type { ButtonProps, ButtonStyle, ButtonVariant, ButtonSize, ButtonShape } from './components/button';
7
+ export type { ButtonProps, ButtonType, ButtonVariant, ButtonSize, ButtonShape } from './components/button';
8
8
  export { ButtonGroup } from './components/button-group';
9
9
  export type { ButtonGroupProps, ButtonGroupAction, ButtonGroupLayout, ButtonGroupVariant } from './components/button-group';
10
10
  export { Typography, Display, Headline, Title, Label, Body } from './components/typography';
@@ -13,8 +13,8 @@ export { Input, PasswordInput } from './components/input';
13
13
  export type { InputProps, PasswordInputProps, InputStatus } from './components/input';
14
14
  export { Textarea } from './components/textarea';
15
15
  export type { TextareaProps } from './components/textarea';
16
- export { Select } from './components/select';
17
- export type { SelectProps, SelectOption } from './components/select';
16
+ export { Dropdown } from './components/dropdown';
17
+ export type { DropdownProps, DropdownOption } from './components/dropdown';
18
18
  export { Checkbox, CheckboxGroup } from './components/checkbox';
19
19
  export type { CheckboxProps, CheckboxGroupProps, CheckboxOption, CheckboxVariant } from './components/checkbox';
20
20
  export { Radio, RadioGroup } from './components/radio';
@@ -22,7 +22,9 @@ export type { RadioProps, RadioGroupProps, RadioOption, RadioVariant } from './c
22
22
  export { Switch } from './components/switch';
23
23
  export type { SwitchProps, SwitchVariant } from './components/switch';
24
24
  export { Chip } from './components/chip';
25
- export type { ChipProps, ChipStyle, ChipType, ChipShape } from './components/chip';
25
+ export type { ChipProps, ChipType, ChipStatus, ChipVariant, ChipShape } from './components/chip';
26
+ export { Badge } from './components/badge';
27
+ export type { BadgeProps } from './components/badge';
26
28
  export { Avatar } from './components/avatar';
27
29
  export type { AvatarProps, AvatarSize, AvatarShape } from './components/avatar';
28
30
  export { Card } from './components/card';
@@ -33,12 +35,14 @@ export { Divider } from './components/divider';
33
35
  export type { DividerProps } from './components/divider';
34
36
  export { Spinner, SkeletonLoader } from './components/loading';
35
37
  export type { SpinnerProps, SkeletonProps, SpinnerSize } from './components/loading';
36
- export { toast, useToast } from './components/toast';
37
- export type { ToastOptions, ToastType } from './components/toast';
38
+ export { toast, useToast, ToastContainer } from './components/toast';
39
+ export type { ToastOptions, ToastType, ToastVariant } from './components/toast';
38
40
  export { Modal, useConfirm } from './components/modal';
39
41
  export type { ModalProps } from './components/modal';
40
42
  export { Dialog } from './components/dialog';
41
43
  export type { DialogProps } from './components/dialog';
44
+ export { Tooltip } from './components/tooltip';
45
+ export type { TooltipProps, TooltipPlacement, TooltipAlign } from './components/tooltip';
42
46
  export { BottomSheet } from './components/bottom-sheet';
43
47
  export type { BottomSheetProps } from './components/bottom-sheet';
44
48
  export { NavigationBar } from './components/navigation-bar';
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{ConfigProvider as a,theme as i,App as n,Input as o,Select as l,Tag as c,Avatar as d,Card as s,Divider as v,Skeleton as g,Spin as h,message as p,notification as f,Modal as b}from"antd";import u,{useState as y,useEffect as m,useRef as x}from"react";import{LoadingOutlined as w}from"@ant-design/icons";import{createPortal as k}from"react-dom";const S={white:"#ffffff",black:"#000000",blue02:"#f4fbff",blue05:"#e4f4ff",blue10:"#cae9ff",blue15:"#afddff",blue20:"#95d1ff",blue25:"#7ac4fb",blue30:"#60b6f4",blue35:"#45a8eb",blue40:"#2b99df",blue45:"#108ad1",blue50:"#007ac1",blue60:"#005c9e",blue70:"#004179",blue80:"#002853",blue90:"#00122a",green02:"#f2fef2",green05:"#dffbdf",green10:"#bff4bf",green15:"#9feca7",green20:"#82e194",green25:"#68d583",green30:"#50c775",green35:"#39b669",green40:"#25a45e",green45:"#23965b",green50:"#208758",green60:"#1b6b4d",green70:"#15503f",green80:"#0f342d",green90:"#081a18",gray02:"#f9fafa",gray05:"#f1f1f2",gray10:"#e3e4e6",gray15:"#d4d6d9",gray20:"#c6c8cc",gray25:"#b8babf",gray30:"#abacb2",gray35:"#9d9ea5",gray40:"#8f9098",gray45:"#82828a",gray50:"#74747d",gray60:"#5e5d64",gray70:"#47464b",gray80:"#2f2f32",gray90:"#181719",red02:"#fff6f9",red05:"#ffe7f0",red10:"#ffd0de",red15:"#ffb8cc",red20:"#ffa1b8",red25:"#ff89a3",red30:"#fb718d",red35:"#f55c78",red40:"#ee4b62",red45:"#e53b4d",red50:"#da2c39",red60:"#b4211f",red70:"#852419",red80:"#571f12",red90:"#2b130a",orange02:"#fffbf0",orange05:"#fff3da",orange10:"#ffe3b4",orange15:"#ffd08f",orange20:"#ffbb69",orange25:"#ffa447",orange30:"#ff8c2f",orange35:"#ef7720",orange40:"#dd6e1d",orange45:"#cb651b",orange50:"#b85c18",orange60:"#934913",orange70:"#6f370f",orange80:"#4a250a",orange90:"#251205",yellow02:"#fff8e7",yellow05:"#ffefbc",yellow10:"#ffe374",yellow15:"#ffd62b",yellow20:"#f9c600",yellow25:"#e9b900",yellow30:"#daaa00",yellow35:"#ca9b00",yellow40:"#bb8b00",yellow45:"#ab7b00",yellow50:"#9c6b00",yellow60:"#7c4b00",yellow70:"#5d2f00",yellow80:"#3e1800",yellow90:"#1f0700"},z={brand:S.green40,brandDark:S.green50,brandLight:S.green05,positive:S.green50,positiveVariant:S.green05,onPositive:S.white,onPositiveVariant:S.green60,negative:S.red50,onNegative:S.white,warning:S.orange30,onWarning:S.white,outline:S.gray50,outlineVariant:S.gray10,outlineInverse:S.gray40,theme:S.white,themeVariant:S.gray05,inverseTheme:S.gray90,primaryOnTheme:S.gray90,secondaryOnTheme:S.gray60,primaryOnInverseTheme:S.white,secondaryOnInverseTheme:S.gray20,disabledBackground:S.gray10,disabledContent:S.gray30,disabledOutline:S.gray20,overlay:"rgba(0, 0, 0, 0.4)",overlayVariant:"rgba(0, 0, 0, 0.16)",skeleton:"rgba(0, 0, 0, 0.1)"},C={token:{colorPrimary:z.brand,colorPrimaryHover:S.green35,colorPrimaryActive:z.brandDark,colorPrimaryBg:S.green02,colorPrimaryBgHover:S.green05,colorError:z.negative,colorErrorHover:S.red60,colorErrorBg:S.red02,colorWarning:z.warning,colorWarningBg:S.orange02,colorSuccess:z.positive,colorSuccessBg:S.green02,colorText:z.primaryOnTheme,colorTextSecondary:z.secondaryOnTheme,colorTextDisabled:z.disabledContent,colorTextPlaceholder:S.gray50,colorBgContainer:z.theme,colorBgLayout:z.themeVariant,colorBgSpotlight:z.inverseTheme,colorBorder:S.gray20,colorBorderSecondary:S.gray10,colorSplit:S.gray10,colorFill:S.gray05,colorFillSecondary:S.gray10,colorFillTertiary:S.gray15,fontFamily:'"Roboto", system-ui, -apple-system, sans-serif',fontSize:16,fontSizeSM:13,fontSizeLG:18,fontSizeXL:19,fontSizeHeading1:32,fontSizeHeading2:28,fontSizeHeading3:24,fontSizeHeading4:19,fontSizeHeading5:16,fontWeightStrong:600,lineHeight:1.5,borderRadius:8,borderRadiusSM:6,borderRadiusLG:12,borderRadiusXS:4,controlHeight:48,controlHeightSM:32,controlHeightLG:56,paddingXS:8,paddingSM:12,padding:16,paddingMD:16,paddingLG:24,motionDurationFast:"150ms",motionDurationMid:"250ms"},components:{Button:{primaryColor:"#ffffff",defaultBorderColor:S.gray20,defaultColor:z.primaryOnTheme,borderRadius:12,borderRadiusSM:8,borderRadiusLG:12,controlHeight:48,controlHeightSM:32,paddingInline:16,paddingInlineSM:12,fontWeight:600},Input:{borderRadius:8,controlHeight:48,paddingInline:12,colorBorder:S.gray20,hoverBorderColor:z.outline,activeBorderColor:z.brand,colorBgContainer:z.theme,hoverBg:z.theme,activeBg:z.theme},Select:{borderRadius:8,controlHeight:48},Checkbox:{borderRadius:4,controlInteractiveSize:20},Radio:{radioSize:20,dotSize:8},Switch:{trackHeight:32,trackMinWidth:52,handleSize:28,colorPrimary:z.brand},Modal:{borderRadiusLG:16,paddingContentHorizontalLG:16,paddingMD:16},Card:{borderRadius:16,paddingLG:16}}};function H({children:t}){return e(a,{theme:{...C,algorithm:i.defaultAlgorithm},children:e(n,{children:t})})}const W={primary:'"Roboto", system-ui, -apple-system, sans-serif'},B={regular:400,medium:500,semibold:600,bold:700,black:900},L={"2xs":"10px",xs:"12px",sm:"14px",base:"16px",lg:"20px",xl:"24px","2xl":"28px","3xl":"32px","4xl":"36px"},F={tight:"120%",normal:"140%",relaxed:"150%"},N={none:"0",sm:"0.1px",md:"0.25px",lg:"0.5px"},M={display4xl:{fontSize:L["4xl"],fontWeight:B.bold,lineHeight:F.tight},display3xl:{fontSize:L["3xl"],fontWeight:B.bold,lineHeight:F.tight},display2xl:{fontSize:L["2xl"],fontWeight:B.bold,lineHeight:F.tight},headlineXl:{fontSize:L.xl,fontWeight:B.bold,lineHeight:F.normal},headlineLg:{fontSize:L.lg,fontWeight:B.semibold,lineHeight:F.normal},titleBase:{fontSize:L.base,fontWeight:B.semibold,lineHeight:F.relaxed,letterSpacing:N.sm},titleSm:{fontSize:L.sm,fontWeight:B.semibold,lineHeight:F.relaxed,letterSpacing:N.sm},labelBase:{fontSize:L.base,fontWeight:B.semibold,lineHeight:F.relaxed},labelSm:{fontSize:L.sm,fontWeight:B.semibold,lineHeight:F.relaxed,letterSpacing:N.lg},labelXs:{fontSize:L.xs,fontWeight:B.semibold,lineHeight:F.relaxed,letterSpacing:N.lg},bodyBase:{fontSize:L.base,fontWeight:B.regular,lineHeight:F.relaxed,letterSpacing:N.sm},bodySm:{fontSize:L.sm,fontWeight:B.regular,lineHeight:F.relaxed,letterSpacing:N.md},bodyXs:{fontSize:L.xs,fontWeight:B.regular,lineHeight:F.relaxed,letterSpacing:N.lg},body2xs:{fontSize:L["2xs"],fontWeight:B.regular,lineHeight:F.relaxed,letterSpacing:N.lg}},I={0:"0px",1:"1px",2:"2px",4:"4px",6:"6px",8:"8px",10:"10px",12:"12px",14:"14px",16:"16px",20:"20px",24:"24px",32:"32px",40:"40px",48:"48px",56:"56px",64:"64px",72:"72px",80:"80px"},T={none:"0px",xs:"4px",sm:"6px",md:"8px",lg:"12px",xl:"16px","2xl":"24px",pill:"1000px"},A={buttonLg:"48px",buttonSm:"32px",input:"48px",navBar:"56px",bottomNav:"56px",tabBar:"56px",listItem:"56px",chip:"32px",chipSm:"24px",iconStd:"24px",iconSm:"20px"},R={none:"none",sm:"0 1px 4px rgba(0, 0, 0, 0.08)",md:"0 2px 8px rgba(0, 0, 0, 0.12)",lg:"0 4px 16px rgba(0, 0, 0, 0.16)"},$={filled:{bg:"var(--vetc-color-brand)",bgHover:"var(--vetc-color-brand-hover)",bgActive:"var(--vetc-color-brand-active)",text:"var(--vetc-white)",border:"transparent",shadow:"none"},outlined:{bg:"transparent",bgHover:"var(--vetc-green-02)",bgActive:"var(--vetc-green-05)",text:"var(--vetc-color-brand)",border:"var(--vetc-color-brand)",shadow:"none"},elevated:{bg:"var(--vetc-color-bg)",bgHover:"var(--vetc-color-bg-hover)",bgActive:"var(--vetc-color-bg-pressed)",text:"var(--vetc-color-brand)",border:"transparent",shadow:"var(--vetc-shadow-md)"},ghost:{bg:"transparent",bgHover:"var(--vetc-color-bg-hover)",bgActive:"var(--vetc-color-bg-pressed)",text:"var(--vetc-color-brand)",border:"transparent",shadow:"none"},danger:{bg:"var(--vetc-color-negative)",bgHover:"var(--vetc-red-60)",bgActive:"var(--vetc-red-60)",text:"var(--vetc-white)",border:"transparent",shadow:"none"},"danger-outlined":{bg:"transparent",bgHover:"var(--vetc-red-02)",bgActive:"var(--vetc-red-05)",text:"var(--vetc-color-negative)",border:"var(--vetc-color-negative)",shadow:"none"}},D={filled:{bg:"var(--vetc-gray-90)",bgHover:"var(--vetc-gray-80)",bgActive:"var(--vetc-gray-70)",text:"var(--vetc-white)",border:"transparent",shadow:"none"},outlined:{bg:"transparent",bgHover:"var(--vetc-gray-05)",bgActive:"var(--vetc-gray-10)",text:"var(--vetc-gray-90)",border:"var(--vetc-gray-90)",shadow:"none"},elevated:{bg:"var(--vetc-color-bg)",bgHover:"var(--vetc-color-bg-hover)",bgActive:"var(--vetc-color-bg-pressed)",text:"var(--vetc-color-text-primary)",border:"transparent",shadow:"var(--vetc-shadow-md)"},ghost:{bg:"transparent",bgHover:"var(--vetc-color-bg-hover)",bgActive:"var(--vetc-color-bg-pressed)",text:"var(--vetc-color-text-primary)",border:"transparent",shadow:"none"},danger:{bg:"var(--vetc-color-negative)",bgHover:"var(--vetc-red-60)",bgActive:"var(--vetc-red-60)",text:"var(--vetc-white)",border:"transparent",shadow:"none"},"danger-outlined":{bg:"transparent",bgHover:"var(--vetc-red-02)",bgActive:"var(--vetc-red-05)",text:"var(--vetc-color-negative)",border:"var(--vetc-color-negative)",shadow:"none"}},O=({color:r})=>t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",style:{animation:"vetc-btn-spin 0.6s linear infinite",flexShrink:0},"aria-hidden":"true",children:[e("circle",{cx:"8",cy:"8",r:"6",stroke:r,strokeOpacity:"0.25",strokeWidth:"2"}),e("path",{d:"M8 2a6 6 0 016 6",stroke:r,strokeWidth:"2",strokeLinecap:"round"})]});function P({style:a="filled",variant:i="brand",size:n="lg",shape:o="rounded",block:l=!1,disabled:c=!1,loading:d=!1,icon:s,iconRight:v,onClick:g,children:h,htmlType:p="button",className:f="",css:b,id:u}){const[m,x]=y(!1),[w,k]=y(!1),S=("neutral"===i?D:$)[a],z=c||d,C="lg"===n?"var(--vetc-btn-height-lg)":"var(--vetc-btn-height-sm)",H="lg"===n?"var(--vetc-btn-font-size-lg)":"var(--vetc-btn-font-size-sm)",W="lg"===n?"var(--vetc-btn-padding-x-lg)":"var(--vetc-btn-padding-x-sm)",B="pill"===o?"var(--vetc-btn-radius-pill)":"lg"===n?"var(--vetc-btn-radius-lg)":"var(--vetc-btn-radius-sm)";let L=S.bg,F=S.border,N=S.shadow;z?(L="var(--vetc-btn-disabled-bg)",F="var(--vetc-btn-disabled-border)",N="none"):m?L=S.bgActive:w&&(L=S.bgHover);const M=z?"var(--vetc-btn-disabled-text)":S.text,I=z?"var(--vetc-gray-30)":S.text;return t(r,{children:[t("button",{id:u,type:p,disabled:z,onClick:g,onMouseEnter:()=>k(!0),onMouseLeave:()=>{k(!1),x(!1)},onMouseDown:()=>x(!0),onMouseUp:()=>x(!1),className:`vetc-btn vetc-btn--${a} vetc-btn--${i} vetc-btn--${n} ${f}`,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"var(--vetc-space-8)",height:C,width:l?"100%":void 0,paddingInline:W,borderRadius:B,border:`1px solid ${F}`,backgroundColor:L,boxShadow:N,color:M,fontSize:H,fontWeight:"var(--vetc-btn-font-weight)",fontFamily:"var(--vetc-font-family)",lineHeight:"var(--vetc-line-height-relaxed)",cursor:z?"not-allowed":"pointer",transition:"background-color var(--vetc-transition-fast), box-shadow var(--vetc-transition-fast)",userSelect:"none",outline:"none",whiteSpace:"nowrap",WebkitTapHighlightColor:"transparent",...b},children:[d?e(O,{color:I}):s&&e("span",{style:{display:"inline-flex",flexShrink:0},children:s}),h&&e("span",{children:h}),v&&!d&&e("span",{style:{display:"inline-flex",flexShrink:0},children:v})]}),e("style",{children:"@keyframes vetc-btn-spin { to { transform: rotate(360deg); } }"})]})}function j({primary:a,secondary:i=[],content:n,layout:o="inline",variant:l="none"}){const c="inline"===o,d="bounding"===l?{backgroundColor:"var(--vetc-btn-group-bg)",borderTop:"1px solid var(--vetc-btn-group-border-color)",padding:"var(--vetc-btn-group-padding)",fontFamily:"var(--vetc-font-family)"}:{fontFamily:"var(--vetc-font-family)"},s=c?{display:"flex",gap:"var(--vetc-btn-group-gap)",alignItems:"stretch"}:{display:"flex",flexDirection:"column",gap:"var(--vetc-btn-group-gap)"},v=i.map((t,r)=>e(P,{style:"outlined",variant:"neutral",block:!c,loading:t.loading,disabled:t.disabled,onClick:t.onClick,css:c?{flex:1}:void 0,children:t.label},r)),g=e(P,{style:a.danger?"danger":"filled",variant:a.variant??"brand",block:!c,loading:a.loading,disabled:a.disabled,onClick:a.onClick,css:c?{flex:1}:void 0,children:a.label});return t("div",{style:d,children:[n&&e("div",{style:{marginBottom:"var(--vetc-btn-group-padding)"},children:n}),e("div",{style:s,children:t(r,c?{children:[v,g]}:{children:[g,v]})})]})}const X={display4xl:{fontSize:"var(--vetc-font-size-4xl)",fontWeight:"var(--vetc-font-weight-bold)",lineHeight:"var(--vetc-line-height-tight)"},display3xl:{fontSize:"var(--vetc-font-size-3xl)",fontWeight:"var(--vetc-font-weight-bold)",lineHeight:"var(--vetc-line-height-tight)"},display2xl:{fontSize:"var(--vetc-font-size-2xl)",fontWeight:"var(--vetc-font-weight-bold)",lineHeight:"var(--vetc-line-height-tight)"},headlineXl:{fontSize:"var(--vetc-font-size-xl)",fontWeight:"var(--vetc-font-weight-bold)",lineHeight:"var(--vetc-line-height-normal)"},headlineLg:{fontSize:"var(--vetc-font-size-lg)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-normal)"},titleBase:{fontSize:"var(--vetc-font-size-base)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-sm)"},titleSm:{fontSize:"var(--vetc-font-size-sm)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-sm)"},labelBase:{fontSize:"var(--vetc-font-size-base)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-relaxed)"},labelSm:{fontSize:"var(--vetc-font-size-sm)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-lg)"},labelXs:{fontSize:"var(--vetc-font-size-xs)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-lg)"},labelXxs:{fontSize:"var(--vetc-font-size-2xs)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-lg)"},bodyBase:{fontSize:"var(--vetc-font-size-base)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-sm)"},bodySm:{fontSize:"var(--vetc-font-size-sm)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-md)"},bodyXs:{fontSize:"var(--vetc-font-size-xs)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-lg)"},body2xs:{fontSize:"var(--vetc-font-size-2xs)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-lg)"}},E={primary:"var(--vetc-color-text-primary)",secondary:"var(--vetc-color-text-secondary)",tertiary:"var(--vetc-color-text-tertiary)",disabled:"var(--vetc-color-text-disabled)",brand:"var(--vetc-color-brand)",error:"var(--vetc-color-text-error)",warning:"var(--vetc-color-warning)",success:"var(--vetc-color-positive)",inherit:"inherit"};function V({variant:t="bodyBase",color:r="primary",strikethrough:a=!1,underline:i=!1,truncate:n=!1,lines:o,as:l="span",children:c,className:d="",style:s,id:v}){const g={fontFamily:"var(--vetc-font-family)",margin:0,padding:0,...X[t]??X.bodyBase,color:E[r],textDecoration:a?"line-through":i?"underline":"none",...n&&!o?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:{},...o?{display:"-webkit-box",WebkitLineClamp:o,WebkitBoxOrient:"vertical",overflow:"hidden"}:{},...s};return e(l,{id:v,className:`vetc-text vetc-text--${t} ${d}`,style:g,children:c})}function _({level:t="2xl",...r}){return e(V,{...r,variant:`display${t}`,as:r.as??"h1"})}function q({level:t="xl",...r}){return e(V,{...r,variant:"xl"===t?"headlineXl":"headlineLg",as:r.as??"h2"})}function G({size:t="base",...r}){return e(V,{...r,variant:"base"===t?"titleBase":"titleSm",as:r.as??"h3"})}function Q({size:t="base",...r}){return e(V,{...r,variant:{base:"labelBase",sm:"labelSm",xs:"labelXs",xxs:"labelXxs"}[t],as:r.as??"span"})}function Y({size:t="base",...r}){return e(V,{...r,variant:{base:"bodyBase",sm:"bodySm",xs:"bodyXs","2xs":"body2xs"}[t],as:r.as??"p"})}function K({htmlFor:r,required:a,disabled:i,children:n}){return t("label",{htmlFor:r,style:{fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-input-label-font-size)",fontWeight:"var(--vetc-input-label-font-weight)",lineHeight:"var(--vetc-line-height-relaxed)",color:i?"var(--vetc-color-text-disabled)":"var(--vetc-input-label-color)",display:"block"},children:[n,a&&e("span",{style:{color:"var(--vetc-color-negative)",marginLeft:"var(--vetc-space-2)"},children:"*"})]})}function U({color:t,children:r}){return e("span",{style:{fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-input-helper-font-size)",lineHeight:"var(--vetc-line-height-relaxed)",color:t},children:r})}const J={height:"var(--vetc-input-height)",borderRadius:"var(--vetc-input-radius)",paddingInline:"var(--vetc-input-padding-x)",fontSize:"var(--vetc-input-font-size)",fontFamily:"var(--vetc-font-family)",backgroundColor:"var(--vetc-input-bg)",transition:"border-color 150ms ease, box-shadow 150ms ease",WebkitTapHighlightColor:"transparent"};function Z({label:r,placeholder:a,value:i,defaultValue:n,helperText:l,status:c="default",error:d,disabled:s=!1,readOnly:v=!1,maxLength:g,showCount:h=!1,prefix:p,suffix:f,allowClear:b=!1,onChange:u,onFocus:y,onBlur:m,onPressEnter:x,type:w="text",id:k,name:S,className:z="",style:C,required:H=!1}){const W=!!d?"error":c,B="error"===W?"error":void 0,L=d??l,F="error"===W?"var(--vetc-input-helper-color-error)":"var(--vetc-input-helper-color)";return t("div",{className:`vetc-input-wrapper ${z}`,style:{display:"flex",flexDirection:"column",gap:"var(--vetc-input-gap)",...C},children:[r&&e(K,{htmlFor:k,required:H,disabled:s,children:r}),e(o,{id:k,name:S,type:w,value:i,defaultValue:n,placeholder:a,disabled:s,readOnly:v,maxLength:g,showCount:h,prefix:p,suffix:f,allowClear:b,status:B,onChange:e=>u?.(e.target.value,e),onFocus:y,onBlur:m,onPressEnter:x,style:J}),L&&e(U,{color:F,children:L})]})}function ee({label:r,placeholder:a,value:i,defaultValue:n,helperText:l,status:c="default",error:d,disabled:s=!1,readOnly:v=!1,maxLength:g,onChange:h,onFocus:p,onBlur:f,id:b,name:u,className:y="",style:m,required:x=!1}){const w=!!d,k="error"===(w?"error":c)?"error":void 0,S=d??l,z=w?"var(--vetc-input-helper-color-error)":"var(--vetc-input-helper-color)";return t("div",{className:`vetc-input-wrapper ${y??""}`,style:{display:"flex",flexDirection:"column",gap:"var(--vetc-input-gap)",...m},children:[r&&e(K,{htmlFor:b,required:x,disabled:s,children:r}),e(o.Password,{id:b,name:u,value:i,defaultValue:n,placeholder:a,disabled:s,readOnly:v,maxLength:g,status:k,onChange:e=>h?.(e.target.value,e),onFocus:p,onBlur:f,style:J}),S&&e(U,{color:z,children:S})]})}const{TextArea:te}=o;function re({htmlFor:r,required:a,disabled:i,children:n}){return t("label",{htmlFor:r,style:{fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-input-label-font-size)",fontWeight:"var(--vetc-input-label-font-weight)",lineHeight:"var(--vetc-line-height-relaxed)",color:i?"var(--vetc-color-text-disabled)":"var(--vetc-input-label-color)",display:"block"},children:[n,a&&e("span",{style:{color:"var(--vetc-color-negative)",marginLeft:"var(--vetc-space-2)"},children:"*"})]})}function ae({label:r,placeholder:a,value:i,defaultValue:n,helperText:o,error:l,disabled:c=!1,readOnly:d=!1,maxLength:s,showCount:v=!1,rows:g=4,autoSize:h,onChange:p,onFocus:f,onBlur:b,id:u,name:y,className:m="",style:x,required:w=!1}){const k=!!l,S=l??o,z=k?"var(--vetc-input-helper-color-error)":"var(--vetc-input-helper-color)";return t("div",{className:`vetc-textarea-wrapper ${m}`,style:{display:"flex",flexDirection:"column",gap:"var(--vetc-input-gap)",...x},children:[r&&e(re,{htmlFor:u,required:w,disabled:c,children:r}),e(te,{id:u,name:y,value:i,defaultValue:n,placeholder:a,disabled:c,readOnly:d,maxLength:s,showCount:v,rows:g,autoSize:h,status:k?"error":void 0,onChange:e=>p?.(e.target.value),onFocus:f,onBlur:b,style:{borderRadius:"var(--vetc-input-radius)",padding:"var(--vetc-input-padding-x)",fontSize:"var(--vetc-input-font-size)",fontFamily:"var(--vetc-font-family)",resize:"vertical"}}),S&&e("span",{style:{fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-input-helper-font-size)",lineHeight:"var(--vetc-line-height-relaxed)",color:z},children:S})]})}function ie({label:r,placeholder:a,value:i,defaultValue:n,options:o=[],helperText:c,error:d,disabled:s=!1,multiple:v=!1,searchable:g=!1,allowClear:h=!1,loading:p=!1,onChange:f,onSearch:b,id:u,className:y="",style:m,required:x=!1,popupMatchSelectWidth:w=!0}){const k=!!d,S=d??c,z=k?"var(--vetc-input-helper-color-error)":"var(--vetc-input-helper-color)";return t("div",{className:`vetc-select-wrapper ${y}`,style:{display:"flex",flexDirection:"column",gap:"var(--vetc-input-gap)",...m},children:[r&&t("label",{htmlFor:u,style:{fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-input-label-font-size)",fontWeight:"var(--vetc-input-label-font-weight)",lineHeight:"var(--vetc-line-height-relaxed)",color:s?"var(--vetc-color-text-disabled)":"var(--vetc-input-label-color)",display:"block"},children:[r,x&&e("span",{style:{color:"var(--vetc-color-negative)",marginLeft:"var(--vetc-space-2)"},children:"*"})]}),e(l,{id:u,value:i,defaultValue:n,placeholder:a,options:o,disabled:s,mode:v?"multiple":void 0,showSearch:g,allowClear:h,loading:p,status:k?"error":void 0,onChange:f,onSearch:b,popupMatchSelectWidth:w,style:{height:"var(--vetc-input-height)",width:"100%",fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-input-font-size)"}}),S&&e("span",{style:{fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-input-helper-font-size)",lineHeight:"var(--vetc-line-height-relaxed)",color:z},children:S})]})}const ne=()=>e("svg",{width:"12",height:"9",viewBox:"0 0 12 9",fill:"none","aria-hidden":"true",children:e("path",{d:"M1 4L4.5 7.5L11 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),oe=()=>e("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none","aria-hidden":"true",children:e("path",{d:"M1 1H9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})});function le({label:r,description:a,checked:i,defaultChecked:n=!1,indeterminate:o=!1,disabled:l=!1,variant:c="brand",onChange:d,value:s,id:v,className:g="",style:h}){const[p,f]=y(n),[b,u]=y(!1),m=void 0!==i,x=m?i:p,w="brand"===c?"var(--vetc-color-brand)":"var(--vetc-gray-90)";let k="transparent",S=l?"var(--vetc-color-border-disabled)":b?w:"var(--vetc-color-border)",z="var(--vetc-white)";return(x||o)&&(k=l?"var(--vetc-color-bg-disabled)":w,S=l?"var(--vetc-color-border-disabled)":b?"brand"===c?"var(--vetc-color-brand-hover)":"var(--vetc-gray-70)":w,z=l?"var(--vetc-color-text-disabled)":"var(--vetc-white)",l&&(k="var(--vetc-color-bg-disabled)")),t("label",{htmlFor:v,className:`vetc-checkbox ${g}`,onMouseEnter:()=>!l&&u(!0),onMouseLeave:()=>u(!1),style:{display:"inline-flex",alignItems:a?"flex-start":"center",gap:"var(--vetc-space-12)",cursor:l?"not-allowed":"pointer",userSelect:"none",fontFamily:"var(--vetc-font-family)",WebkitTapHighlightColor:"transparent",...h},children:[e("input",{id:v,type:"checkbox",checked:x,disabled:l,value:s,onChange:()=>{if(l)return;const e=!x;m||f(e),d?.(e)},style:{position:"absolute",opacity:0,width:0,height:0,pointerEvents:"none"},"aria-checked":o?"mixed":x}),t("span",{"aria-hidden":"true",style:{width:"20px",height:"20px",flexShrink:0,borderRadius:"var(--vetc-radius-xs)",border:`1.5px solid ${S}`,backgroundColor:k,display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color var(--vetc-transition-fast), border-color var(--vetc-transition-fast)",color:z,marginTop:a?"2px":0},children:[x&&!o&&e(ne,{}),o&&e(oe,{})]}),(r||a)&&t("span",{style:{display:"flex",flexDirection:"column",gap:"var(--vetc-space-2)"},children:[r&&e("span",{style:{fontSize:"var(--vetc-font-size-base)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",color:l?"var(--vetc-color-text-disabled)":"var(--vetc-color-text-primary)"},children:r}),a&&e("span",{style:{fontSize:"var(--vetc-font-size-sm)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",color:l?"var(--vetc-color-text-disabled)":"var(--vetc-color-text-secondary)"},children:a})]})]})}function ce({options:t,value:r,defaultValue:a=[],direction:i="vertical",disabled:n=!1,variant:o="brand",onChange:l,className:c="",style:d}){const[s,v]=y(a),g=void 0!==r,h=g?r:s;return e("div",{className:`vetc-checkbox-group ${c}`,style:{display:"flex",flexDirection:"vertical"===i?"column":"row",flexWrap:"horizontal"===i?"wrap":void 0,gap:"vertical"===i?"var(--vetc-space-12)":"var(--vetc-space-16)",fontFamily:"var(--vetc-font-family)",...d},children:t.map(t=>e(le,{label:t.label,description:t.description,checked:h.includes(t.value),disabled:t.disabled??n,variant:o,value:t.value,onChange:e=>((e,t)=>{const r=t?[...h,e]:h.filter(t=>t!==e);g||v(r),l?.(r)})(t.value,e)},String(t.value)))})}function de({label:r,description:a,checked:i,defaultChecked:n=!1,disabled:o=!1,variant:l="brand",onChange:c,value:d,id:s,className:v="",style:g}){const[h,p]=y(n),[f,b]=y(!1),u=void 0!==i,m=u?i:h,x="brand"===l?"var(--vetc-color-brand)":"var(--vetc-gray-90)",w=o?"var(--vetc-color-border-disabled)":m?f?"brand"===l?"var(--vetc-color-brand-hover)":"var(--vetc-gray-70)":x:f?x:"var(--vetc-color-border)",k=o?"var(--vetc-color-text-disabled)":x;return t("label",{htmlFor:s,className:`vetc-radio ${v}`,onMouseEnter:()=>!o&&b(!0),onMouseLeave:()=>b(!1),style:{display:"inline-flex",alignItems:a?"flex-start":"center",gap:"var(--vetc-space-12)",cursor:o?"not-allowed":"pointer",userSelect:"none",fontFamily:"var(--vetc-font-family)",WebkitTapHighlightColor:"transparent",...g},children:[e("input",{id:s,type:"radio",checked:m,disabled:o,value:d,onChange:()=>{o||m||(u||p(!0),c?.(!0))},style:{position:"absolute",opacity:0,width:0,height:0,pointerEvents:"none"}}),e("span",{"aria-hidden":"true",style:{width:"20px",height:"20px",flexShrink:0,borderRadius:"50%",border:`1.5px solid ${w}`,backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",transition:"border-color var(--vetc-transition-fast)",marginTop:a?"2px":0},children:m&&e("span",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:k,flexShrink:0}})}),(r||a)&&t("span",{style:{display:"flex",flexDirection:"column",gap:"var(--vetc-space-2)"},children:[r&&e("span",{style:{fontSize:"var(--vetc-font-size-base)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",color:o?"var(--vetc-color-text-disabled)":"var(--vetc-color-text-primary)"},children:r}),a&&e("span",{style:{fontSize:"var(--vetc-font-size-sm)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",color:o?"var(--vetc-color-text-disabled)":"var(--vetc-color-text-secondary)"},children:a})]})]})}function se({options:t,value:r,defaultValue:a,direction:i="vertical",disabled:n=!1,variant:o="brand",onChange:l,className:c="",style:d}){const[s,v]=y(a),g=void 0!==r,h=g?r:s;return e("div",{role:"radiogroup",className:`vetc-radio-group ${c}`,style:{display:"flex",flexDirection:"vertical"===i?"column":"row",flexWrap:"horizontal"===i?"wrap":void 0,gap:"vertical"===i?"var(--vetc-space-12)":"var(--vetc-space-16)",fontFamily:"var(--vetc-font-family)",...d},children:t.map(t=>e(de,{label:t.label,description:t.description,checked:h===t.value,disabled:t.disabled??n,variant:o,value:t.value,onChange:()=>{return e=t.value,g||v(e),void l?.(e);var e}},String(t.value)))})}function ve({label:a,description:i,labelPosition:n="right",checked:o,defaultChecked:l=!1,disabled:c=!1,loading:d=!1,variant:s="brand",onChange:v,id:g,className:h="",style:p}){const[f,b]=y(l),u=void 0!==o,m=u?o:f,x=c||d,w=()=>{if(x)return;const e=!m;u||b(e),v?.(e)},k=t("button",{id:g,type:"button",role:"switch","aria-checked":m,disabled:x,onClick:w,className:`vetc-switch ${h}`,style:{position:"relative",display:"inline-flex",alignItems:"center",width:"var(--vetc-switch-width)",height:"var(--vetc-switch-height)",borderRadius:"var(--vetc-radius-pill)",backgroundColor:x?"var(--vetc-color-bg-disabled)":m?"brand"===s?"var(--vetc-switch-on-bg)":"var(--vetc-gray-90)":"var(--vetc-switch-off-bg)",border:"none",cursor:x?"not-allowed":"pointer",padding:0,flexShrink:0,transition:"background-color var(--vetc-transition-fast)",outline:"none",WebkitTapHighlightColor:"transparent",...a||i?{}:p},children:[e("span",{style:{position:"absolute",left:m?"calc(100% - 30px)":"2px",width:"var(--vetc-switch-thumb-size)",height:"var(--vetc-switch-thumb-size)",borderRadius:"50%",backgroundColor:x?"var(--vetc-gray-20)":"var(--vetc-white)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",transition:"left var(--vetc-transition-fast)",display:"flex",alignItems:"center",justifyContent:"center"},children:d&&t("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",style:{animation:"vetc-btn-spin 0.6s linear infinite"},"aria-hidden":"true",children:[e("circle",{cx:"6",cy:"6",r:"4",stroke:"var(--vetc-gray-30)",strokeWidth:"1.5"}),e("path",{d:"M6 2a4 4 0 014 4",stroke:"var(--vetc-color-brand)",strokeWidth:"1.5",strokeLinecap:"round"})]})}),e("style",{children:"@keyframes vetc-btn-spin { to { transform: rotate(360deg); } }"})]});if(!a&&!i)return k;const S=t("span",{style:{display:"flex",flexDirection:"column",gap:"var(--vetc-space-2)",flex:1},children:[a&&e("span",{style:{fontSize:"var(--vetc-font-size-base)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",color:x?"var(--vetc-color-text-disabled)":"var(--vetc-color-text-primary)"},children:a}),i&&e("span",{style:{fontSize:"var(--vetc-font-size-sm)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",color:x?"var(--vetc-color-text-disabled)":"var(--vetc-color-text-secondary)"},children:i})]});return e("div",{style:{display:"flex",alignItems:"center",gap:"var(--vetc-space-12)",flexDirection:"left"===n?"row-reverse":"row",fontFamily:"var(--vetc-font-family)",cursor:x?"not-allowed":"pointer",WebkitTapHighlightColor:"transparent",...p},onClick:w,children:t(r,"right"===n?{children:[k,S]}:{children:[S,k]})})}const ge={default:{bg:"var(--vetc-chip-default-bg)",border:"var(--vetc-chip-default-border)",text:"var(--vetc-chip-default-text)",filledBg:"var(--vetc-chip-default-filled-bg)"},brand:{bg:"var(--vetc-chip-brand-bg)",border:"var(--vetc-chip-brand-border)",text:"var(--vetc-chip-brand-text)",filledBg:"var(--vetc-chip-brand-filled-bg)"},positive:{bg:"var(--vetc-chip-positive-bg)",border:"var(--vetc-chip-positive-border)",text:"var(--vetc-chip-positive-text)",filledBg:"var(--vetc-chip-positive-filled-bg)"},negative:{bg:"var(--vetc-chip-negative-bg)",border:"var(--vetc-chip-negative-border)",text:"var(--vetc-chip-negative-text)",filledBg:"var(--vetc-chip-negative-filled-bg)"},warning:{bg:"var(--vetc-chip-warning-bg)",border:"var(--vetc-chip-warning-border)",text:"var(--vetc-chip-warning-text)",filledBg:"var(--vetc-chip-warning-filled-bg)"},info:{bg:"var(--vetc-chip-info-bg)",border:"var(--vetc-chip-info-border)",text:"var(--vetc-chip-info-text)",filledBg:"var(--vetc-chip-info-filled-bg)"}};function he({style:t="tinted",type:r="default",shape:a="pill",size:i="md",icon:n,closable:o=!1,onClose:l,onClick:d,children:s,className:v="",css:g,id:h}){const p=ge[r],f="md"===i?"var(--vetc-chip-height-md)":"var(--vetc-chip-height-sm)",b="md"===i?"var(--vetc-chip-padding-x-md)":"var(--vetc-chip-padding-x-sm)",u="md"===i?"var(--vetc-chip-font-size-md)":"var(--vetc-chip-font-size-sm)",y="pill"===a?"var(--vetc-chip-radius-pill)":"var(--vetc-chip-radius-rounded)";let m=p.bg,x=`1px solid ${p.border}`,w=p.text;return"filled"===t?(m=p.filledBg,x="none",w="var(--vetc-white)"):"outlined"===t&&(m="transparent",x=`1px solid ${p.border}`,w=p.text),e(c,{id:h,closable:o,onClose:e=>{e.preventDefault(),l?.()},onClick:d,icon:n,className:`vetc-chip vetc-chip--${t} vetc-chip--${r} ${v}`,style:{display:"inline-flex",alignItems:"center",height:f,padding:`0 ${b}`,borderRadius:y,background:m,border:x,color:w,fontSize:u,fontWeight:"var(--vetc-chip-font-weight)",fontFamily:"var(--vetc-font-family)",cursor:d?"pointer":"default",userSelect:"none",lineHeight:1,gap:"var(--vetc-space-4)",transition:"var(--vetc-transition-fast)",...g},children:s})}const pe={xl:"var(--vetc-avatar-size-xl)",lg:"var(--vetc-avatar-size-lg)",md:"var(--vetc-avatar-size-md)",sm:"var(--vetc-avatar-size-sm)",xs:"var(--vetc-avatar-size-xs)"},fe={xl:56,lg:48,md:40,sm:32,xs:24},be={xl:"var(--vetc-font-size-2xl)",lg:"var(--vetc-font-size-xl)",md:"var(--vetc-font-size-base)",sm:"var(--vetc-font-size-sm)",xs:"var(--vetc-font-size-2xs)"};function ue({src:t,alt:r,initials:a,icon:i,size:n="md",shape:o="circle",color:l,className:c="",style:s,onClick:v,id:g}){return e("span",{id:g,style:{display:"inline-flex",flexShrink:0,width:pe[n],height:pe[n]},children:e(d,{src:t,alt:r,icon:t||a?void 0:i,size:fe[n],shape:o,onClick:v,className:`vetc-avatar vetc-avatar--${n} ${c}`,style:{backgroundColor:t?void 0:l??"var(--vetc-avatar-bg-default)",fontSize:be[n],fontWeight:"var(--vetc-font-weight-bold)",fontFamily:"var(--vetc-font-family)",color:"var(--vetc-avatar-text-color)",cursor:v?"pointer":"default",flexShrink:0,...s},children:!t&&a?a.slice(0,2).toUpperCase():void 0})})}function ye({elevation:t="outlined",title:r,extra:a,children:i,onClick:n,className:o="",style:l,bodyStyle:c,id:d}){return e(s,{id:d,title:r,extra:a,onClick:n,className:`vetc-card vetc-card--${t} ${o}`,styles:{body:{padding:"var(--vetc-card-padding)",fontFamily:"var(--vetc-font-family)",...c},header:r?{borderBottom:"1px solid var(--vetc-card-border)",padding:"var(--vetc-space-12) var(--vetc-card-padding)"}:void 0},style:{borderRadius:"var(--vetc-card-radius)",border:{flat:"none",raised:"none",outlined:"1px solid var(--vetc-card-border)"}[t],boxShadow:{flat:"var(--vetc-shadow-none)",raised:"var(--vetc-card-shadow-raised)",outlined:"var(--vetc-shadow-none)"}[t],cursor:n?"pointer":"default",overflow:"hidden",backgroundColor:"var(--vetc-card-bg)",fontFamily:"var(--vetc-font-family)",transition:"box-shadow var(--vetc-transition-fast)",...l},children:i})}function me({disabled:t}){return e("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:e("path",{d:"M7.5 5L12.5 10L7.5 15",stroke:t?"var(--vetc-color-icon-disabled)":"var(--vetc-color-icon-muted)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function xe({leading:r,title:a,description:i,trailing:n,arrow:o=!1,divider:l=!0,onClick:c,disabled:d=!1,className:s="",style:v,id:g}){const h=!!c&&!d;return t("div",{id:g,role:h?"button":void 0,tabIndex:h?0:void 0,className:`vetc-list-item ${s}`,onClick:d?void 0:c,onKeyDown:h?e=>{"Enter"!==e.key&&" "!==e.key||c?.()}:void 0,style:{display:"flex",alignItems:"center",minHeight:"var(--vetc-list-item-height)",padding:"0 var(--vetc-list-item-padding-x)",gap:"var(--vetc-list-item-gap)",cursor:h?"pointer":"default",borderBottom:l?"1px solid var(--vetc-list-item-border)":"none",backgroundColor:"var(--vetc-list-item-bg)",opacity:d?.5:1,fontFamily:"var(--vetc-font-family)",transition:"background-color var(--vetc-transition-fast)",outline:"none",...v},onMouseEnter:e=>{h&&(e.currentTarget.style.backgroundColor="var(--vetc-list-item-bg-hover)")},onMouseLeave:e=>{h&&(e.currentTarget.style.backgroundColor="var(--vetc-list-item-bg)")},children:[r&&e("div",{style:{flexShrink:0,display:"flex",alignItems:"center",color:"var(--vetc-list-item-icon-color)"},children:r}),t("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:"var(--vetc-space-2)"},children:[e("span",{style:{fontSize:"var(--vetc-list-item-title-size)",fontWeight:"var(--vetc-list-item-title-weight)",color:d?"var(--vetc-color-text-disabled)":"var(--vetc-list-item-title-color)",lineHeight:"var(--vetc-line-height-relaxed)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:a}),i&&e("span",{style:{fontSize:"var(--vetc-list-item-desc-size)",fontWeight:"var(--vetc-font-weight-regular)",color:d?"var(--vetc-color-text-disabled)":"var(--vetc-list-item-desc-color)",lineHeight:"var(--vetc-line-height-relaxed)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i})]}),(n||o)&&t("div",{style:{flexShrink:0,display:"flex",alignItems:"center",gap:"var(--vetc-space-8)",color:"var(--vetc-list-item-icon-color)"},children:[n,o&&e(me,{disabled:d})]})]})}function we({items:t,renderItem:r,bordered:a=!1,className:i="",style:n,id:o}){return e("div",{id:o,className:`vetc-list ${i}`,style:{border:a?"1px solid var(--vetc-color-border-variant)":"none",borderRadius:a?"var(--vetc-card-radius)":0,overflow:"hidden",backgroundColor:"var(--vetc-color-bg)",...n},children:t.map((t,a)=>e(u.Fragment,{children:r(t,a)},a))})}function ke({orientation:t="horizontal",label:r,labelAlign:a="center",thickness:i=1,color:n,margin:o,className:l="",style:c}){const d="vertical"===t;return e(v,{type:d?"vertical":"horizontal",orientationMargin:"center"!==a?0:void 0,orientation:"center"!==a?a:void 0,className:`vetc-divider ${l}`,style:{borderColor:n??"var(--vetc-divider-color)",borderTopWidth:d?void 0:i,borderLeftWidth:d?i:void 0,margin:o??(d?"0 var(--vetc-divider-margin-v)":"var(--vetc-divider-margin-h) 0"),fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-divider-label-size)",color:"var(--vetc-divider-label-color)",...c},children:r})}const Se={sm:16,md:24,lg:40};function ze({size:t="md",color:r,fullscreen:a=!1,tip:i,children:n,spinning:o=!0,className:l="",style:c}){const d=e(w,{style:{fontSize:Se[t],color:r??"var(--vetc-spinner-color)"},spin:!0});return n?e(h,{spinning:o,indicator:d,tip:i,className:`vetc-spinner ${l}`,style:c,children:n}):e("div",a?{className:`vetc-spinner-overlay ${l}`,style:{position:"fixed",inset:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--vetc-color-overlay)",zIndex:9999,...c},children:e(h,{spinning:o,indicator:d,tip:i})}:{className:`vetc-spinner ${l}`,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",...c},children:e(h,{spinning:o,indicator:d,tip:i})})}function Ce({rows:t=3,avatar:r=!1,avatarSize:a=40,title:i=!0,loading:n=!0,className:o="",style:l,children:c}){return e(g,{active:!0,loading:n,avatar:!!r&&{size:a,shape:"circle"},title:i,paragraph:{rows:t},className:`vetc-skeleton ${o}`,style:l,children:c})}const He={borderRadius:"var(--vetc-toast-radius)",fontFamily:"var(--vetc-font-family)"},We={show(e){const{type:t="default",message:r,description:a,duration:i=3,placement:n="top",icon:o,onClose:l}=e;"default"!==t?f[t]({message:r,description:a,duration:i,placement:n,icon:o,onClose:l,style:He}):p.open({type:"info",content:r,duration:i,onClose:l})},success:(e,t)=>We.show({message:e,description:t,type:"success"}),error:(e,t)=>We.show({message:e,description:t,type:"error"}),warning:(e,t)=>We.show({message:e,description:t,type:"warning"}),info:(e,t)=>We.show({message:e,description:t,type:"info"})};function Be(){const[e,t]=f.useNotification(),r=t=>{const{type:r="info",message:a,description:i,duration:n=3,placement:o="top",icon:l,onClose:c}=t;e["default"===r?"info":r]({message:a,description:i,duration:n,placement:o,icon:l,onClose:c,style:He})};return{contextHolder:t,toast:{show:r,success:(e,t)=>r({message:e,description:t,type:"success"}),error:(e,t)=>r({message:e,description:t,type:"error"}),warning:(e,t)=>r({message:e,description:t,type:"warning"}),info:(e,t)=>r({message:e,description:t,type:"info"})}}}const Le={height:"var(--vetc-btn-height-lg)",borderRadius:"var(--vetc-btn-radius-lg)",fontWeight:"var(--vetc-btn-font-weight)",fontSize:"var(--vetc-btn-font-size-lg)",fontFamily:"var(--vetc-font-family)"};function Fe({open:t,title:r,children:a,footer:i,okText:n="Xác nhận",cancelText:o="Hủy",okDisabled:l=!1,okLoading:c=!1,okDanger:d=!1,onOk:s,onCancel:v,maskClosable:g=!0,closable:h=!0,width:p,className:f="",style:u,id:y}){return e(b,{open:t,title:r,okText:n,cancelText:o,okButtonProps:{disabled:l,loading:c,danger:d,style:Le},cancelButtonProps:{style:Le},footer:null===i?null:i,onOk:s,onCancel:v,maskClosable:g,closable:h,width:p??"var(--vetc-modal-width)",centered:!0,className:`vetc-modal ${f}`,style:{fontFamily:"var(--vetc-font-family)",...u},styles:{header:{padding:"var(--vetc-modal-padding) var(--vetc-modal-padding) 0",borderBottom:"none"},body:{padding:"var(--vetc-space-8) var(--vetc-modal-padding) var(--vetc-modal-padding)"},footer:{padding:"0 var(--vetc-modal-padding) var(--vetc-modal-padding)",borderTop:"none"},mask:{backgroundColor:"var(--vetc-modal-overlay)"}},children:a})}function Ne(){return{confirm:e=>{b.confirm({title:e.title,content:e.content,okText:e.okText??"Xác nhận",cancelText:e.cancelText??"Hủy",okButtonProps:{danger:e.okDanger,style:{...Le,height:40}},cancelButtonProps:{style:{...Le,height:40}},centered:!0,onOk:e.onOk,onCancel:e.onCancel,styles:{mask:{backgroundColor:"var(--vetc-modal-overlay)"}}})}}}function Me({open:a,image:i,title:n,description:o,okText:l="Xác nhận",cancelText:c="Hủy",okDisabled:d=!1,okLoading:s=!1,okDanger:v=!1,onOk:g,onCancel:h,maskClosable:p=!0}){if(m(()=>(document.body.style.overflow=a?"hidden":"",()=>{document.body.style.overflow=""}),[a]),!a)return null;const f=n||o;return e(r,{children:k(e("div",{style:{position:"fixed",inset:0,backgroundColor:"var(--vetc-dialog-overlay)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,padding:"0 var(--vetc-space-24)"},onClick:p?h:void 0,children:t("div",{style:{width:"100%",maxWidth:"var(--vetc-dialog-width)",backgroundColor:"var(--vetc-dialog-bg)",borderRadius:"var(--vetc-dialog-radius)",overflow:"hidden",boxShadow:"var(--vetc-shadow-lg)",fontFamily:"var(--vetc-font-family)"},onClick:e=>e.stopPropagation(),children:[i&&e("div",{style:{width:"100%",height:"var(--vetc-dialog-image-height)",overflow:"hidden",flexShrink:0},children:e("img",{src:i,alt:"",style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}})}),f&&t("div",{style:{padding:"var(--vetc-dialog-padding)"},children:[n&&e("div",{style:{fontSize:"var(--vetc-dialog-title-size)",fontWeight:"var(--vetc-dialog-title-weight)",color:"var(--vetc-color-text-primary)",lineHeight:"var(--vetc-line-height-relaxed)",marginBottom:o?"var(--vetc-space-8)":0},children:n}),o&&e("div",{style:{fontSize:"var(--vetc-dialog-desc-size)",color:"var(--vetc-dialog-desc-color)",lineHeight:"var(--vetc-line-height-relaxed)"},children:o})]}),t("div",{style:{display:"flex",gap:"var(--vetc-dialog-btn-gap)",padding:f?"0 var(--vetc-dialog-padding) var(--vetc-dialog-padding)":"var(--vetc-dialog-padding)"},children:[h&&e(P,{block:!0,style:"outlined",variant:"neutral",onClick:h,children:c}),e(P,{block:!0,style:v?"danger":"filled",loading:s,disabled:d,onClick:g,children:l})]})]})}),document.body)})}function Ie({open:a,title:i,children:n,maskClosable:o=!0,showHandle:l=!0,maxHeight:c="90vh",onClose:d,className:s="",style:v,id:g}){return m(()=>(document.body.style.overflow=a?"hidden":"",()=>{document.body.style.overflow=""}),[a]),a?t(r,{children:[e("div",{className:"vetc-bottom-sheet-overlay","aria-hidden":"true",onClick:()=>o&&d?.(),style:{position:"fixed",inset:0,backgroundColor:"var(--vetc-sheet-overlay)",zIndex:1e3,animation:"vetc-fade-in var(--vetc-transition-base)"}}),t("div",{id:g,role:"dialog","aria-modal":"true",className:`vetc-bottom-sheet ${s}`,style:{position:"fixed",bottom:0,left:0,right:0,backgroundColor:"var(--vetc-sheet-bg)",borderRadius:"var(--vetc-sheet-radius) var(--vetc-sheet-radius) 0 0",maxHeight:c,overflowY:"auto",zIndex:1001,fontFamily:"var(--vetc-font-family)",animation:"vetc-slide-up var(--vetc-transition-slow) cubic-bezier(0.32, 0.72, 0, 1)",...v},children:[l&&e("div",{style:{display:"flex",justifyContent:"center",paddingTop:"var(--vetc-space-8)",paddingBottom:"var(--vetc-space-4)"},children:e("div",{style:{width:"var(--vetc-sheet-handle-width)",height:"var(--vetc-sheet-handle-height)",borderRadius:"var(--vetc-radius-pill)",backgroundColor:"var(--vetc-sheet-handle-color)"}})}),i&&t("div",{style:{padding:"var(--vetc-space-12) var(--vetc-sheet-padding)",borderBottom:"1px solid var(--vetc-sheet-border)",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[e("span",{style:{fontSize:"var(--vetc-sheet-title-size)",fontWeight:"var(--vetc-sheet-title-weight)",color:"var(--vetc-sheet-title-color)",lineHeight:"var(--vetc-line-height-relaxed)"},children:i}),d&&e("button",{onClick:d,"aria-label":"Đóng",style:{background:"none",border:"none",cursor:"pointer",padding:"var(--vetc-space-4)",display:"flex",color:"var(--vetc-color-icon-muted)",borderRadius:"var(--vetc-radius-pill)",transition:"background-color var(--vetc-transition-fast)"},children:e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:e("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})})]}),e("div",{style:{padding:"var(--vetc-sheet-padding)"},children:n})]}),e("style",{children:"\n @keyframes vetc-fade-in {\n from { opacity: 0 }\n to { opacity: 1 }\n }\n @keyframes vetc-slide-up {\n from { transform: translateY(100%) }\n to { transform: translateY(0) }\n }\n "})]}):null}function Te(){return e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:e("path",{d:"M15 19L8 12L15 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function Ae(){return e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:e("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}const Re={background:"none",border:"none",cursor:"pointer",width:"var(--vetc-nav-icon-btn-size)",height:"var(--vetc-nav-icon-btn-size)",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"var(--vetc-radius-pill)",color:"var(--vetc-nav-icon-color)",flexShrink:0,padding:0,transition:"background-color var(--vetc-transition-fast)"};function $e({title:r,leading:a="none",leadingIcon:i,onLeadingPress:n,actions:o=[],leftSlot:l,rightSlot:c,backgroundColor:d,divider:s=!0,transparent:v=!1,className:g="",style:h,id:p,showBack:f,backIcon:b,onBack:u,left:y,right:m}){const x=f?"back":a,w=i??b,k=n??u;return t("header",{id:p,className:`vetc-nav-bar ${g}`,style:{display:"flex",alignItems:"center",height:"var(--vetc-nav-height)",padding:"0 var(--vetc-nav-padding-x)",backgroundColor:v?"transparent":d??"var(--vetc-nav-bg)",borderBottom:s&&!v?"1px solid var(--vetc-nav-border)":"none",fontFamily:"var(--vetc-font-family)",position:"relative",...h},children:[e("div",{style:{display:"flex",alignItems:"center",minWidth:"var(--vetc-nav-icon-btn-size)",zIndex:1},children:(()=>{if(void 0!==l||void 0!==y)return l??y;if("none"===x)return null;const t=w??e("close"===x?Ae:Te,{});return e("button",{onClick:k,style:Re,"aria-label":"close"===x?"Đóng":"Quay lại",children:t})})()}),r&&e("div",{style:{position:"absolute",left:0,right:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"},children:e("span",{style:{fontSize:"var(--vetc-nav-title-size)",fontWeight:"var(--vetc-nav-title-weight)",color:"var(--vetc-nav-title-color)",lineHeight:"var(--vetc-line-height-normal)",maxWidth:"60%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r})}),e("div",{style:{display:"flex",alignItems:"center",gap:"var(--vetc-space-4)",marginLeft:"auto",zIndex:1},children:void 0!==c||void 0!==m?c??m:o.slice(0,2).map((t,r)=>e("button",{id:t.id,onClick:t.onClick,disabled:t.disabled,"aria-label":t.label,style:{...Re,opacity:t.disabled?.4:1},children:t.icon},r))})]})}function De({items:r,activeKey:a,onChange:i,variant:n="brand",backgroundColor:o,divider:l=!0,className:c="",style:d,id:s}){const v="brand"===n?"var(--vetc-tab-color-active)":"var(--vetc-color-text-primary)";return e("nav",{id:s,className:`vetc-tab-bar ${c}`,style:{display:"flex",alignItems:"stretch",height:"var(--vetc-tab-height)",backgroundColor:o??"var(--vetc-tab-bg)",borderTop:l?"1px solid var(--vetc-tab-border)":"none",fontFamily:"var(--vetc-font-family)",...d},children:r.map(r=>{const n=r.key===a,o=r.disabled?"var(--vetc-tab-color-disabled)":n?v:"var(--vetc-tab-color-inactive)";return t("button",{disabled:r.disabled,onClick:()=>!r.disabled&&i?.(r.key),"aria-current":n?"page":void 0,"aria-label":r.label,className:"vetc-tab-bar__item"+(n?" vetc-tab-bar__item--active":""),style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"var(--vetc-space-2)",background:"none",border:"none",cursor:r.disabled?"not-allowed":"pointer",padding:"var(--vetc-space-6) 0",position:"relative",opacity:r.disabled?.5:1,transition:"color var(--vetc-transition-fast)",color:o},children:[t("div",{style:{position:"relative",display:"inline-flex"},children:[e("span",{style:{color:o,display:"flex",fontSize:"24px",lineHeight:1},children:n&&r.activeIcon?r.activeIcon:r.icon}),void 0!==r.badge&&e("span",{style:{position:"absolute",top:"calc(-1 * var(--vetc-space-4))",right:"calc(-1 * var(--vetc-space-8))",minWidth:"var(--vetc-tab-badge-size)",height:"var(--vetc-tab-badge-size)",backgroundColor:"var(--vetc-tab-badge-bg)",borderRadius:"var(--vetc-radius-pill)",fontSize:"var(--vetc-tab-badge-font-size)",fontWeight:"var(--vetc-font-weight-semibold)",color:"var(--vetc-tab-badge-text)",display:"flex",alignItems:"center",justifyContent:"center",padding:"0 var(--vetc-space-4)",lineHeight:1},children:r.badge})]}),e("span",{style:{fontSize:"var(--vetc-tab-label-size)",fontWeight:"var(--vetc-tab-label-weight)",color:o,lineHeight:"var(--vetc-line-height-relaxed)"},children:r.label})]},r.key)})})}const Oe="undefined"!=typeof window,Pe=(e,t={})=>{const r=Oe&&window.flutter_inappwebview&&window.flutter_inappwebview.callHandler&&"function"==typeof window.flutter_inappwebview.callHandler?window.flutter_inappwebview:null;return r?r.callHandler("MiniAppBridge",{action:e,payload:t}):Promise.resolve({ok:!1,error:"BRIDGE_CALL_FAILED"})};let je=new Map,Xe="/";function Ee(){return je.get(Xe)}function Ve(e){Xe=e}function _e({config:t}){const[r,a]=y(null);if(m(()=>{!function(e){je=new Map(e.pages.map(e=>[e.path,e]))}(t);Ve((window.location.pathname||"/").replace("/miniapp","")||"/");let e=Ee()??null;if(!e){if(0===t.pages.length)return void console.error("[App] config.pages is empty — no pages to render.");Ve(t.pages[0].path),e=Ee()??null}a(e),Pe("registerAppConfig",{config:t}).catch(e=>{console.error("[App] registerAppConfigError:",e)})},[t]),!r)return e("div",{});const i=r.Component;return e(i,{})}function qe(e){const t=x(e);m(()=>{t.current=e},[e]),m(()=>{if("undefined"==typeof window||!window.MiniApp)return;const e=window.MiniApp,r=()=>{try{t.current?.()}catch(e){console.error("[useAppResume error]",e)}};return e.on("appResume",r),()=>e.off("appResume",r)},[])}function Ge(e){const t=x(e);m(()=>{t.current=e},[e]),m(()=>{if("undefined"==typeof window||!window.MiniApp)return;const e=window.MiniApp,r=()=>{try{t.current?.()}catch(e){console.error("[useAppPause error]",e)}};return e.on("appPause",r),()=>e.off("appPause",r)},[])}function Qe(e,t){const r=x(t);m(()=>{r.current=t},[t]),m(()=>{if("undefined"==typeof window||!window.MiniApp)return;const t=window.MiniApp,a=t=>{t?.route===e&&r.current?.(t)};return t.on("didShow",a),()=>t.off("didShow",a)},[e])}function Ye(e,t){const r=x(t);m(()=>{r.current=t},[t]),m(()=>{if("undefined"==typeof window||!window.MiniApp)return;const t=window.MiniApp,a=t=>{t?.route===e&&r.current?.(t)};return t.on("didHide",a),()=>t.off("didHide",a)},[e])}function Ke(e,t){const r=x(t);m(()=>{r.current=t},[t]),m(()=>{if("undefined"==typeof window||!window.MiniApp)return;const t=window.MiniApp,a=t=>{t?.route===e&&r.current?.(t)};return t.on("onTapAppBar",a),()=>t.off("onTapAppBar",a)},[e])}function Ue(){return(e,t={},r={})=>{"number"!=typeof e?Pe("navigate",{type:"native",action:"push",route:e,params:t,options:r}).catch(console.error):Pe("navigate",{type:"native",action:"pop",delta:Math.abs(e)})}}function Je(e){const t=x(e);m(()=>{t.current=e},[e]),m(()=>{if("undefined"==typeof window||!window.MiniApp)return;const e=window.MiniApp,r=e=>{try{t.current?.(e)}catch(e){console.error("[useListenerScanQr error]",e)}};return e.on("scanQrResult",r),()=>e.off("scanQrResult",r)},[])}export{_e as App,ue as Avatar,Y as Body,Ie as BottomSheet,P as Button,j as ButtonGroup,ye as Card,le as Checkbox,ce as CheckboxGroup,he as Chip,Me as Dialog,_ as Display,ke as Divider,q as Headline,Z as Input,Q as Label,we as List,xe as ListItem,Fe as Modal,$e as NavigationBar,ee as PasswordInput,de as Radio,se as RadioGroup,ie as Select,Ce as SkeletonLoader,ze as Spinner,ve as Switch,De as TabBar,ae as Textarea,G as Title,V as Typography,H as VETCProvider,T as borderRadius,z as colorAlias,S as colorGlobal,A as componentHeight,W as fontFamily,L as fontSize,B as fontWeight,N as letterSpacing,F as lineHeight,R as shadow,I as spacing,M as textStyle,We as toast,Ge as useAppPause,qe as useAppResume,Ne as useConfirm,Ye as useDidHide,Qe as useDidShow,Je as useListenerScanQr,Ue as useNavigate,Ke as useTapAppBar,Be as useToast,C as vetcAntdTheme};
1
+ import{jsx as e,jsxs as t,Fragment as r}from"react/jsx-runtime";import{ConfigProvider as i,theme as n,App as o,Input as a,Tag as l,Avatar as c,Card as d,Divider as s,Skeleton as v,Spin as g,Modal as h}from"antd";import p,{useState as f,useRef as u,useCallback as b,useEffect as m,useMemo as y}from"react";import{createPortal as x}from"react-dom";import{LoadingOutlined as w}from"@ant-design/icons";function k(e,t){return t||("success"===e?"positive":"error"===e?"negative":"neutral")}let S=0,C=()=>{};function z(e){const t=e.duration??3,r=e.type??"default";C({type:r,variant:k(r,e.variant),placement:e.placement??"bottom",duration:t,message:e.message,description:e.description,icon:e.icon,action:e.action,closable:e.closable??0===t,onClose:e.onClose,id:++S,exiting:!1})}const H={show:e=>z(e),success:(e,t)=>z({message:e,description:t,type:"success"}),error:(e,t)=>z({message:e,description:t,type:"error"}),warning:(e,t)=>z({message:e,description:t,type:"warning"}),info:(e,t)=>z({message:e,description:t,type:"info"})};function W(){return{contextHolder:null,toast:H}}const L={neutral:"var(--vetc-toast-bg)",positive:"var(--vetc-toast-positive-bg)",negative:"var(--vetc-toast-negative-bg)"};function B(){return t("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:[e("circle",{cx:"10",cy:"10",r:"9",stroke:"currentColor",strokeWidth:"1.5"}),e("path",{d:"M10 9v5M10 6.5v.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}function I(){return e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:e("path",{d:"M12 4L4 12M4 4l8 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}const M={default:e(B,{}),success:e(function(){return t("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:[e("circle",{cx:"10",cy:"10",r:"9",stroke:"currentColor",strokeWidth:"1.5"}),e("path",{d:"M6 10l3 3 5-5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})},{}),error:e(function(){return t("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:[e("circle",{cx:"10",cy:"10",r:"9",stroke:"currentColor",strokeWidth:"1.5"}),e("path",{d:"M13 7L7 13M7 7l6 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})},{}),warning:e(function(){return t("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:[e("path",{d:"M10 3L2 17h16L10 3z",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"}),e("path",{d:"M10 9v3M10 14v.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})},{}),info:e(B,{})};function T({item:r,onDismiss:i}){const n=r.icon??M[r.type],o=Boolean(r.action)||r.closable;return t("div",{role:"alert","aria-live":"polite",style:{display:"flex",alignItems:"stretch",minHeight:40,borderRadius:"var(--vetc-toast-radius)",backgroundColor:L[r.variant],boxShadow:"var(--vetc-toast-shadow)",overflow:"hidden",fontFamily:"var(--vetc-font-family)",willChange:"opacity, transform",animation:r.exiting?"vetc-toast-out 200ms ease forwards":"vetc-toast-in 250ms ease"},children:[t("div",{style:{flex:1,display:"flex",alignItems:"center",gap:n?8:0,paddingTop:8,paddingBottom:8,paddingLeft:16,paddingRight:o?12:16,minWidth:0},children:[n&&e("span",{style:{flexShrink:0,display:"flex",width:20,height:20,color:"rgba(255,255,255,1)"},children:n}),t("div",{style:{flex:1,minWidth:0},children:[e("div",{style:{fontSize:"var(--vetc-font-size-sm)",fontWeight:400,color:"var(--vetc-toast-text)",lineHeight:"20px",wordBreak:"break-word"},children:r.message}),r.description&&e("div",{style:{fontSize:"var(--vetc-font-size-xs)",color:"rgba(255,255,255,0.7)",lineHeight:"18px",marginTop:2},children:r.description})]})]}),o&&e("div",{style:{width:1,flexShrink:0,alignSelf:"stretch",margin:"8px 0",backgroundColor:"var(--vetc-toast-divider)"}}),r.action&&e("button",{onClick:()=>{r.action.onClick(),i(r.id)},style:{flexShrink:0,background:"none",border:"none",cursor:"pointer",minWidth:64,height:32,borderRadius:"var(--vetc-radius-md)",padding:r.closable?"0 8px 0 12px":"0 16px 0 12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"var(--vetc-font-size-sm)",lineHeight:"20px",fontWeight:600,color:"var(--vetc-toast-text)",fontFamily:"var(--vetc-font-family)",whiteSpace:"nowrap",margin:"0 0 0 0",alignSelf:"center"},children:r.action.label}),r.closable&&e("button",{onClick:()=>{r.onClose?.(),i(r.id)},"aria-label":"Đóng",style:{flexShrink:0,background:"none",border:"none",cursor:"pointer",width:32,height:32,margin:"0 8px 0 4px",padding:0,display:"flex",alignItems:"center",justifyContent:"center",color:"var(--vetc-toast-text)",borderRadius:"var(--vetc-radius-md)",alignSelf:"center"},children:e(I,{})})]})}function F(){const[i,n]=f([]),o=u(new Map),a=b(e=>{n(t=>t.map(t=>t.id===e?{...t,exiting:!0}:t));const t=setTimeout(()=>{n(t=>t.filter(t=>t.id!==e)),o.current.delete(e)},200);o.current.set(e,t)},[]);if(m(()=>(C=e=>{if(n(t=>[...t.slice(-2),e]),e.duration>0){const t=setTimeout(()=>a(e.id),1e3*e.duration);o.current.set(e.id,t)}},()=>{C=()=>{},o.current.forEach(clearTimeout)}),[a]),!i.length)return null;const l=i.filter(e=>"top"!==e.placement),c=i.filter(e=>"top"===e.placement),d=(t,r)=>e("div",{style:{position:"fixed",..."bottom"===r?{bottom:"calc(16px + var(--safe-area-inset-bottom, 0px))"}:{top:"calc(16px + var(--safe-area-inset-top, 0px))"},left:16,right:16,zIndex:1e4,display:"flex",flexDirection:"bottom"===r?"column-reverse":"column",gap:8,pointerEvents:"none"},children:t.map(t=>e("div",{style:{pointerEvents:"auto"},children:e(T,{item:t,onDismiss:a})},t.id))});return x(t(r,{children:[l.length>0&&d(l,"bottom"),c.length>0&&d(c,"top"),e("style",{children:"\n @keyframes vetc-toast-in {\n from { opacity: 0; transform: translateY(8px); }\n to { opacity: 1; transform: translateY(0); }\n }\n @keyframes vetc-toast-out {\n from { opacity: 1; transform: translateY(0); }\n to { opacity: 0; transform: translateY(4px); }\n }\n "})]}),document.body)}const R={white:"#ffffff",black:"#000000",blue02:"#f4fbff",blue05:"#e4f4ff",blue10:"#cae9ff",blue15:"#afddff",blue20:"#95d1ff",blue25:"#7ac4fb",blue30:"#60b6f4",blue35:"#45a8eb",blue40:"#2b99df",blue45:"#108ad1",blue50:"#007ac1",blue60:"#005c9e",blue70:"#004179",blue80:"#002853",blue90:"#00122a",green02:"#f2fef2",green05:"#dffbdf",green10:"#bff4bf",green15:"#9feca7",green20:"#82e194",green25:"#68d583",green30:"#50c775",green35:"#39b669",green40:"#25a45e",green45:"#23965b",green50:"#208758",green60:"#1b6b4d",green70:"#15503f",green80:"#0f342d",green90:"#081a18",gray02:"#f9fafa",gray05:"#f1f1f2",gray10:"#e3e4e6",gray15:"#d4d6d9",gray20:"#c6c8cc",gray25:"#b8babf",gray30:"#abacb2",gray35:"#9d9ea5",gray40:"#8f9098",gray45:"#82828a",gray50:"#74747d",gray60:"#5e5d64",gray70:"#47464b",gray80:"#2f2f32",gray90:"#181719",red02:"#fff6f9",red05:"#ffe7f0",red10:"#ffd0de",red15:"#ffb8cc",red20:"#ffa1b8",red25:"#ff89a3",red30:"#fb718d",red35:"#f55c78",red40:"#ee4b62",red45:"#e53b4d",red50:"#da2c39",red60:"#b4211f",red70:"#852419",red80:"#571f12",red90:"#2b130a",orange02:"#fffbf0",orange05:"#fff3da",orange10:"#ffe3b4",orange15:"#ffd08f",orange20:"#ffbb69",orange25:"#ffa447",orange30:"#ff8c2f",orange35:"#ef7720",orange40:"#dd6e1d",orange45:"#cb651b",orange50:"#b85c18",orange60:"#934913",orange70:"#6f370f",orange80:"#4a250a",orange90:"#251205",yellow02:"#fff8e7",yellow05:"#ffefbc",yellow10:"#ffe374",yellow15:"#ffd62b",yellow20:"#f9c600",yellow25:"#e9b900",yellow30:"#daaa00",yellow35:"#ca9b00",yellow40:"#bb8b00",yellow45:"#ab7b00",yellow50:"#9c6b00",yellow60:"#7c4b00",yellow70:"#5d2f00",yellow80:"#3e1800",yellow90:"#1f0700"},N={brand:R.green40,brandDark:R.green50,brandLight:R.green05,positive:R.green50,positiveVariant:R.green05,onPositive:R.white,onPositiveVariant:R.green60,negative:R.red50,onNegative:R.white,warning:R.orange30,onWarning:R.white,outline:R.gray50,outlineVariant:R.gray10,outlineInverse:R.gray40,theme:R.white,themeVariant:R.gray05,inverseTheme:R.gray90,primaryOnTheme:R.gray90,secondaryOnTheme:R.gray60,primaryOnInverseTheme:R.white,secondaryOnInverseTheme:R.gray20,disabledBackground:R.gray10,disabledContent:R.gray30,disabledOutline:R.gray20,overlay:"rgba(0, 0, 0, 0.4)",overlayVariant:"rgba(0, 0, 0, 0.16)",skeleton:"rgba(0, 0, 0, 0.1)"},A={token:{colorPrimary:N.brand,colorPrimaryHover:R.green35,colorPrimaryActive:N.brandDark,colorPrimaryBg:R.green02,colorPrimaryBgHover:R.green05,colorError:N.negative,colorErrorHover:R.red60,colorErrorBg:R.red02,colorWarning:N.warning,colorWarningBg:R.orange02,colorSuccess:N.positive,colorSuccessBg:R.green02,colorText:N.primaryOnTheme,colorTextSecondary:N.secondaryOnTheme,colorTextDisabled:N.disabledContent,colorTextPlaceholder:R.gray50,colorBgContainer:N.theme,colorBgLayout:N.themeVariant,colorBgSpotlight:N.inverseTheme,colorBorder:R.gray20,colorBorderSecondary:R.gray10,colorSplit:R.gray10,colorFill:R.gray05,colorFillSecondary:R.gray10,colorFillTertiary:R.gray15,fontFamily:'"Roboto", system-ui, -apple-system, sans-serif',fontSize:16,fontSizeSM:13,fontSizeLG:18,fontSizeXL:19,fontSizeHeading1:32,fontSizeHeading2:28,fontSizeHeading3:24,fontSizeHeading4:19,fontSizeHeading5:16,fontWeightStrong:600,lineHeight:1.5,borderRadius:8,borderRadiusSM:6,borderRadiusLG:12,borderRadiusXS:4,controlHeight:48,controlHeightSM:32,controlHeightLG:56,paddingXS:8,paddingSM:12,padding:16,paddingMD:16,paddingLG:24,motionDurationFast:"150ms",motionDurationMid:"250ms"},components:{Button:{primaryColor:"#ffffff",defaultBorderColor:R.gray20,defaultColor:N.primaryOnTheme,borderRadius:12,borderRadiusSM:8,borderRadiusLG:12,controlHeight:48,controlHeightSM:32,paddingInline:16,paddingInlineSM:12,fontWeight:600},Input:{borderRadius:8,controlHeight:48,paddingInline:12,colorBorder:R.gray20,hoverBorderColor:N.outline,activeBorderColor:N.brand,colorBgContainer:N.theme,hoverBg:N.theme,activeBg:N.theme},Select:{borderRadius:8,controlHeight:48},Checkbox:{borderRadius:4,controlInteractiveSize:20},Radio:{radioSize:20,dotSize:8},Switch:{trackHeight:32,trackMinWidth:52,handleSize:28,colorPrimary:N.brand},Modal:{borderRadiusLG:16,paddingContentHorizontalLG:16,paddingMD:16},Card:{borderRadius:16,paddingLG:16}}};function $({children:r}){return e(i,{theme:{...A,algorithm:n.defaultAlgorithm},children:t(o,{children:[r,e(F,{})]})})}const D={primary:'"Roboto", system-ui, -apple-system, sans-serif'},j={regular:400,medium:500,semibold:600,bold:700,black:900},O={"2xs":"10px",xs:"12px",sm:"14px",base:"16px",lg:"20px",xl:"24px","2xl":"28px","3xl":"32px","4xl":"36px"},E={tight:"120%",normal:"140%",relaxed:"150%"},P={none:"0",sm:"0.1px",md:"0.25px",lg:"0.5px"},X={display4xl:{fontSize:O["4xl"],fontWeight:j.bold,lineHeight:E.tight},display3xl:{fontSize:O["3xl"],fontWeight:j.bold,lineHeight:E.tight},display2xl:{fontSize:O["2xl"],fontWeight:j.bold,lineHeight:E.tight},headlineXl:{fontSize:O.xl,fontWeight:j.bold,lineHeight:E.normal},headlineLg:{fontSize:O.lg,fontWeight:j.semibold,lineHeight:E.normal},titleBase:{fontSize:O.base,fontWeight:j.semibold,lineHeight:E.relaxed,letterSpacing:P.sm},titleSm:{fontSize:O.sm,fontWeight:j.semibold,lineHeight:E.relaxed,letterSpacing:P.sm},labelBase:{fontSize:O.base,fontWeight:j.semibold,lineHeight:E.relaxed},labelSm:{fontSize:O.sm,fontWeight:j.semibold,lineHeight:E.relaxed,letterSpacing:P.lg},labelXs:{fontSize:O.xs,fontWeight:j.semibold,lineHeight:E.relaxed,letterSpacing:P.lg},bodyBase:{fontSize:O.base,fontWeight:j.regular,lineHeight:E.relaxed,letterSpacing:P.sm},bodySm:{fontSize:O.sm,fontWeight:j.regular,lineHeight:E.relaxed,letterSpacing:P.md},bodyXs:{fontSize:O.xs,fontWeight:j.regular,lineHeight:E.relaxed,letterSpacing:P.lg},body2xs:{fontSize:O["2xs"],fontWeight:j.regular,lineHeight:E.relaxed,letterSpacing:P.lg}},V={0:"0px",1:"1px",2:"2px",4:"4px",6:"6px",8:"8px",10:"10px",12:"12px",14:"14px",16:"16px",20:"20px",24:"24px",32:"32px",40:"40px",48:"48px",56:"56px",64:"64px",72:"72px",80:"80px"},Y={none:"0px",xs:"4px",sm:"6px",md:"8px",lg:"12px",xl:"16px","2xl":"24px",pill:"1000px"},q={buttonLg:"48px",buttonSm:"32px",input:"48px",navBar:"56px",bottomNav:"56px",tabBar:"56px",listItem:"56px",chip:"32px",chipSm:"24px",iconStd:"24px",iconSm:"20px"},_={none:"none",sm:"0 1px 4px rgba(0, 0, 0, 0.08)",md:"0 2px 8px rgba(0, 0, 0, 0.12)",lg:"0 4px 16px rgba(0, 0, 0, 0.16)"},G={filled:{bg:"var(--vetc-color-brand)",bgHover:"var(--vetc-color-brand-hover)",bgActive:"var(--vetc-color-brand-active)",text:"var(--vetc-white)",border:"transparent",shadow:"none"},outlined:{bg:"transparent",bgHover:"var(--vetc-green-02)",bgActive:"var(--vetc-green-05)",text:"var(--vetc-color-brand)",border:"var(--vetc-color-brand)",shadow:"none"},elevated:{bg:"var(--vetc-color-bg)",bgHover:"var(--vetc-color-bg-hover)",bgActive:"var(--vetc-color-bg-pressed)",text:"var(--vetc-color-brand)",border:"transparent",shadow:"var(--vetc-shadow-md)"},ghost:{bg:"transparent",bgHover:"var(--vetc-color-bg-hover)",bgActive:"var(--vetc-color-bg-pressed)",text:"var(--vetc-color-brand)",border:"transparent",shadow:"none"},danger:{bg:"var(--vetc-color-negative)",bgHover:"var(--vetc-red-60)",bgActive:"var(--vetc-red-60)",text:"var(--vetc-white)",border:"transparent",shadow:"none"},"danger-outlined":{bg:"transparent",bgHover:"var(--vetc-red-02)",bgActive:"var(--vetc-red-05)",text:"var(--vetc-color-negative)",border:"var(--vetc-color-negative)",shadow:"none"}},Q={filled:{bg:"var(--vetc-gray-90)",bgHover:"var(--vetc-gray-80)",bgActive:"var(--vetc-gray-70)",text:"var(--vetc-white)",border:"transparent",shadow:"none"},outlined:{bg:"transparent",bgHover:"var(--vetc-gray-05)",bgActive:"var(--vetc-gray-10)",text:"var(--vetc-gray-90)",border:"var(--vetc-gray-90)",shadow:"none"},elevated:{bg:"var(--vetc-color-bg)",bgHover:"var(--vetc-color-bg-hover)",bgActive:"var(--vetc-color-bg-pressed)",text:"var(--vetc-color-text-primary)",border:"transparent",shadow:"var(--vetc-shadow-md)"},ghost:{bg:"transparent",bgHover:"var(--vetc-color-bg-hover)",bgActive:"var(--vetc-color-bg-pressed)",text:"var(--vetc-color-text-primary)",border:"transparent",shadow:"none"},danger:{bg:"var(--vetc-color-negative)",bgHover:"var(--vetc-red-60)",bgActive:"var(--vetc-red-60)",text:"var(--vetc-white)",border:"transparent",shadow:"none"},"danger-outlined":{bg:"transparent",bgHover:"var(--vetc-red-02)",bgActive:"var(--vetc-red-05)",text:"var(--vetc-color-negative)",border:"var(--vetc-color-negative)",shadow:"none"}},K=({color:r})=>t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",style:{animation:"vetc-btn-spin 0.6s linear infinite",flexShrink:0},"aria-hidden":"true",children:[e("circle",{cx:"8",cy:"8",r:"6",stroke:r,strokeOpacity:"0.25",strokeWidth:"2"}),e("path",{d:"M8 2a6 6 0 016 6",stroke:r,strokeWidth:"2",strokeLinecap:"round"})]});function U({type:i="filled",variant:n="brand",size:o="lg",shape:a="rounded",block:l=!1,disabled:c=!1,loading:d=!1,icon:s,iconRight:v,onClick:g,children:h,htmlType:p="button",className:u="",css:b,id:m}){const[y,x]=f(!1),[w,k]=f(!1),S=("neutral"===n?Q:G)[i],C=c||d,z="lg"===o?"var(--vetc-btn-height-lg)":"var(--vetc-btn-height-sm)",H="lg"===o?"var(--vetc-btn-font-size-lg)":"var(--vetc-btn-font-size-sm)",W="lg"===o?"var(--vetc-btn-padding-x-lg)":"var(--vetc-btn-padding-x-sm)",L="pill"===a?"var(--vetc-btn-radius-pill)":"lg"===o?"var(--vetc-btn-radius-lg)":"var(--vetc-btn-radius-sm)";let B=S.bg,I=S.border,M=S.shadow;C?(B="var(--vetc-btn-disabled-bg)",I="var(--vetc-btn-disabled-border)",M="none"):y?B=S.bgActive:w&&(B=S.bgHover);const T=C?"var(--vetc-btn-disabled-text)":S.text,F=C?"var(--vetc-gray-30)":S.text;return t(r,{children:[t("button",{id:m,type:p,disabled:C,onClick:g,onMouseEnter:()=>k(!0),onMouseLeave:()=>{k(!1),x(!1)},onMouseDown:()=>x(!0),onMouseUp:()=>x(!1),className:`vetc-btn vetc-btn--${i} vetc-btn--${n} vetc-btn--${o} ${u}`,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"var(--vetc-space-8)",height:z,width:l?"100%":void 0,paddingInline:W,borderRadius:L,border:`1px solid ${I}`,backgroundColor:B,boxShadow:M,color:T,fontSize:H,fontWeight:"var(--vetc-btn-font-weight)",fontFamily:"var(--vetc-font-family)",lineHeight:"var(--vetc-line-height-relaxed)",cursor:C?"not-allowed":"pointer",transition:"background-color var(--vetc-transition-fast), box-shadow var(--vetc-transition-fast)",userSelect:"none",outline:"none",whiteSpace:"nowrap",WebkitTapHighlightColor:"transparent",...b},children:[d?e(K,{color:F}):s&&e("span",{style:{display:"inline-flex",flexShrink:0},children:s}),h&&e("span",{children:h}),v&&!d&&e("span",{style:{display:"inline-flex",flexShrink:0},children:v})]}),e("style",{children:"@keyframes vetc-btn-spin { to { transform: rotate(360deg); } }"})]})}function J({primary:i,secondary:n=[],content:o,layout:a="inline",variant:l="none"}){const c="inline"===a,d="bounding"===l?{backgroundColor:"var(--vetc-btn-group-bg)",borderTop:"1px solid var(--vetc-btn-group-border-color)",padding:"var(--vetc-btn-group-padding)",fontFamily:"var(--vetc-font-family)"}:{fontFamily:"var(--vetc-font-family)"},s=c?{display:"flex",gap:"var(--vetc-btn-group-gap)",alignItems:"stretch"}:{display:"flex",flexDirection:"column",gap:"var(--vetc-btn-group-gap)"},v=n.map((t,r)=>e(U,{type:"outlined",variant:"neutral",block:!c,loading:t.loading,disabled:t.disabled,onClick:t.onClick,css:c?{flex:1}:void 0,children:t.label},r)),g=e(U,{type:i.danger?"danger":"filled",variant:i.variant??"brand",block:!c,loading:i.loading,disabled:i.disabled,onClick:i.onClick,css:c?{flex:1}:void 0,children:i.label});return t("div",{style:d,children:[o&&e("div",{style:{marginBottom:"var(--vetc-btn-group-padding)"},children:o}),e("div",{style:s,children:t(r,c?{children:[v,g]}:{children:[g,v]})})]})}const Z={display4xl:{fontSize:"var(--vetc-font-size-4xl)",fontWeight:"var(--vetc-font-weight-bold)",lineHeight:"var(--vetc-line-height-tight)"},display3xl:{fontSize:"var(--vetc-font-size-3xl)",fontWeight:"var(--vetc-font-weight-bold)",lineHeight:"var(--vetc-line-height-tight)"},display2xl:{fontSize:"var(--vetc-font-size-2xl)",fontWeight:"var(--vetc-font-weight-bold)",lineHeight:"var(--vetc-line-height-tight)"},headlineXl:{fontSize:"var(--vetc-font-size-xl)",fontWeight:"var(--vetc-font-weight-bold)",lineHeight:"var(--vetc-line-height-normal)"},headlineLg:{fontSize:"var(--vetc-font-size-lg)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-normal)"},titleBase:{fontSize:"var(--vetc-font-size-base)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-sm)"},titleSm:{fontSize:"var(--vetc-font-size-sm)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-sm)"},labelBase:{fontSize:"var(--vetc-font-size-base)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-relaxed)"},labelSm:{fontSize:"var(--vetc-font-size-sm)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-lg)"},labelXs:{fontSize:"var(--vetc-font-size-xs)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-lg)"},labelXxs:{fontSize:"var(--vetc-font-size-2xs)",fontWeight:"var(--vetc-font-weight-semibold)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-lg)"},bodyBase:{fontSize:"var(--vetc-font-size-base)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-sm)"},bodySm:{fontSize:"var(--vetc-font-size-sm)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-md)"},bodyXs:{fontSize:"var(--vetc-font-size-xs)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-lg)"},body2xs:{fontSize:"var(--vetc-font-size-2xs)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",letterSpacing:"var(--vetc-letter-spacing-lg)"}},ee={primary:"var(--vetc-color-text-primary)",secondary:"var(--vetc-color-text-secondary)",tertiary:"var(--vetc-color-text-tertiary)",disabled:"var(--vetc-color-text-disabled)",brand:"var(--vetc-color-brand)",error:"var(--vetc-color-text-error)",warning:"var(--vetc-color-warning)",success:"var(--vetc-color-positive)",inherit:"inherit"};function te({variant:t="bodyBase",color:r="primary",strikethrough:i=!1,underline:n=!1,truncate:o=!1,lines:a,as:l="span",children:c,className:d="",style:s,id:v}){const g={fontFamily:"var(--vetc-font-family)",margin:0,padding:0,...Z[t]??Z.bodyBase,color:ee[r],textDecoration:i?"line-through":n?"underline":"none",...o&&!a?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:{},...a?{display:"-webkit-box",WebkitLineClamp:a,WebkitBoxOrient:"vertical",overflow:"hidden"}:{},...s};return e(l,{id:v,className:`vetc-text vetc-text--${t} ${d}`,style:g,children:c})}function re({level:t="2xl",...r}){return e(te,{...r,variant:`display${t}`,as:r.as??"h1"})}function ie({level:t="xl",...r}){return e(te,{...r,variant:"xl"===t?"headlineXl":"headlineLg",as:r.as??"h2"})}function ne({size:t="base",...r}){return e(te,{...r,variant:"base"===t?"titleBase":"titleSm",as:r.as??"h3"})}function oe({size:t="base",...r}){return e(te,{...r,variant:{base:"labelBase",sm:"labelSm",xs:"labelXs",xxs:"labelXxs"}[t],as:r.as??"span"})}function ae({size:t="base",...r}){return e(te,{...r,variant:{base:"bodyBase",sm:"bodySm",xs:"bodyXs","2xs":"body2xs"}[t],as:r.as??"p"})}function le({htmlFor:r,required:i,disabled:n,children:o}){return t("label",{htmlFor:r,style:{fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-input-label-font-size)",fontWeight:"var(--vetc-input-label-font-weight)",lineHeight:"var(--vetc-line-height-relaxed)",color:n?"var(--vetc-color-text-disabled)":"var(--vetc-input-label-color)",display:"block"},children:[o,i&&e("span",{style:{color:"var(--vetc-color-negative)",marginLeft:"var(--vetc-space-2)"},children:"*"})]})}function ce({color:t,children:r}){return e("span",{style:{fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-input-helper-font-size)",lineHeight:"var(--vetc-line-height-relaxed)",color:t},children:r})}const de={height:"var(--vetc-input-height)",borderRadius:"var(--vetc-input-radius)",paddingInline:"var(--vetc-input-padding-x)",fontSize:"var(--vetc-input-font-size)",fontFamily:"var(--vetc-font-family)",backgroundColor:"var(--vetc-input-bg)",transition:"border-color 150ms ease, box-shadow 150ms ease",WebkitTapHighlightColor:"transparent"};function se({label:r,placeholder:i,value:n,defaultValue:o,helperText:l,status:c="default",error:d,disabled:s=!1,readOnly:v=!1,maxLength:g,showCount:h=!1,prefix:p,suffix:f,allowClear:u=!1,onChange:b,onFocus:m,onBlur:y,onPressEnter:x,type:w="text",id:k,name:S,className:C="",style:z,required:H=!1}){const W=!!d?"error":c,L="error"===W?"error":void 0,B=d??l,I="error"===W?"var(--vetc-input-helper-color-error)":"var(--vetc-input-helper-color)";return t("div",{className:`vetc-input-wrapper ${C}`,style:{display:"flex",flexDirection:"column",gap:"var(--vetc-input-gap)",...z},children:[r&&e(le,{htmlFor:k,required:H,disabled:s,children:r}),e(a,{id:k,name:S,type:w,value:n,defaultValue:o,placeholder:i,disabled:s,readOnly:v,maxLength:g,showCount:h,prefix:p,suffix:f,allowClear:u,status:L,onChange:e=>b?.(e.target.value,e),onFocus:m,onBlur:y,onPressEnter:x,style:de}),B&&e(ce,{color:I,children:B})]})}function ve({label:r,placeholder:i,value:n,defaultValue:o,helperText:l,status:c="default",error:d,disabled:s=!1,readOnly:v=!1,maxLength:g,onChange:h,onFocus:p,onBlur:f,id:u,name:b,className:m="",style:y,required:x=!1}){const w=!!d,k="error"===(w?"error":c)?"error":void 0,S=d??l,C=w?"var(--vetc-input-helper-color-error)":"var(--vetc-input-helper-color)";return t("div",{className:`vetc-input-wrapper ${m??""}`,style:{display:"flex",flexDirection:"column",gap:"var(--vetc-input-gap)",...y},children:[r&&e(le,{htmlFor:u,required:x,disabled:s,children:r}),e(a.Password,{id:u,name:b,value:n,defaultValue:o,placeholder:i,disabled:s,readOnly:v,maxLength:g,status:k,onChange:e=>h?.(e.target.value,e),onFocus:p,onBlur:f,style:de}),S&&e(ce,{color:C,children:S})]})}const{TextArea:ge}=a;function he({htmlFor:r,required:i,disabled:n,children:o}){return t("label",{htmlFor:r,style:{fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-input-label-font-size)",fontWeight:"var(--vetc-input-label-font-weight)",lineHeight:"var(--vetc-line-height-relaxed)",color:n?"var(--vetc-color-text-disabled)":"var(--vetc-input-label-color)",display:"block"},children:[o,i&&e("span",{style:{color:"var(--vetc-color-negative)",marginLeft:"var(--vetc-space-2)"},children:"*"})]})}function pe({label:r,placeholder:i,value:n,defaultValue:o,helperText:a,error:l,disabled:c=!1,readOnly:d=!1,maxLength:s,showCount:v=!1,rows:g=4,autoSize:h,onChange:p,onFocus:f,onBlur:u,id:b,name:m,className:y="",style:x,required:w=!1}){const k=!!l,S=l??a,C=k?"var(--vetc-input-helper-color-error)":"var(--vetc-input-helper-color)";return t("div",{className:`vetc-textarea-wrapper ${y}`,style:{display:"flex",flexDirection:"column",gap:"var(--vetc-input-gap)",...x},children:[r&&e(he,{htmlFor:b,required:w,disabled:c,children:r}),e(ge,{id:b,name:m,value:n,defaultValue:o,placeholder:i,disabled:c,readOnly:d,maxLength:s,showCount:v,rows:g,autoSize:h,status:k?"error":void 0,onChange:e=>p?.(e.target.value),onFocus:f,onBlur:u,style:{borderRadius:"var(--vetc-input-radius)",padding:"var(--vetc-input-padding-x)",fontSize:"var(--vetc-input-font-size)",fontFamily:"var(--vetc-font-family)",resize:"vertical"}}),S&&e("span",{style:{fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-input-helper-font-size)",lineHeight:"var(--vetc-line-height-relaxed)",color:C},children:S})]})}function fe({open:i,title:n,children:o,footer:a,maskClosable:l=!0,showHandle:c=!1,swipeToClose:d=!0,maxHeight:s="90vh",onClose:v,className:g="",style:h,id:p}){const y=u(null),x=u(null),w=u(null),k=u(0),[S,C]=f(0),[z,H]=f(!1);m(()=>(document.body.style.overflow=i?"hidden":"",()=>{document.body.style.overflow=""}),[i]),m(()=>{i||(C(0),H(!1))},[i]);const W=b(()=>{H(!0),setTimeout(()=>{C(0),v?.()},300)},[v]);if(!i&&!z)return null;const L=S>0&&!z,B=z?"translateY(calc(100% + 8px))":L?`translateY(${S}px)`:"translateY(0)",I=z?"transform 300ms cubic-bezier(0.32, 0.72, 0, 1)":L?"none":"transform 0.28s cubic-bezier(0.32, 0.72, 0, 1)",M=L||z?"none":"vetc-slide-up var(--vetc-transition-slow) cubic-bezier(0.32, 0.72, 0, 1)",T=z?0:L?Math.max(0,1-S/240):1;return t(r,{children:[e("div",{className:"vetc-bottom-sheet-overlay","aria-hidden":"true",onClick:()=>l&&!z&&v?.(),style:{position:"fixed",inset:0,backgroundColor:"var(--vetc-sheet-overlay)",zIndex:1e3,opacity:T,transition:z?"opacity 300ms":L?"none":void 0,animation:L||z?"none":"vetc-fade-in var(--vetc-transition-base)"}}),t("div",{ref:y,id:p,role:"dialog","aria-modal":"true",className:`vetc-bottom-sheet ${g}`,onTouchStart:e=>{d&&(x.current&&x.current.scrollTop>0||(w.current=e.touches[0].clientY,k.current=0))},onTouchMove:e=>{if(!d||null===w.current)return;const t=e.touches[0].clientY-w.current;t<0?w.current=null:(k.current=t,C(t))},onTouchEnd:()=>{d&&null!==w.current&&(w.current=null,k.current>=120?W():C(0))},style:{position:"fixed",left:8,right:8,backgroundColor:"var(--vetc-sheet-bg)",borderRadius:"var(--vetc-sheet-radius)",maxHeight:s,display:"flex",flexDirection:"column",overflow:"hidden",zIndex:1001,fontFamily:"var(--vetc-font-family)",transform:B,transition:I,animation:M,willChange:"transform",...h},children:[c&&e("div",{style:{display:"flex",justifyContent:"center",paddingTop:"var(--vetc-space-8)",paddingBottom:"var(--vetc-space-4)",cursor:d?"grab":void 0,flexShrink:0},children:e("div",{style:{width:"var(--vetc-sheet-handle-width)",height:"var(--vetc-sheet-handle-height)",borderRadius:"var(--vetc-radius-pill)",backgroundColor:"var(--vetc-sheet-handle-color)"}})}),n&&t("div",{style:{display:"flex",alignItems:"center",padding:8,flexShrink:0},children:[e("div",{style:{width:32,height:32,flexShrink:0}}),e("div",{style:{flex:1,textAlign:"center",padding:"4px 8px"},children:e("span",{style:{fontSize:"var(--vetc-font-size-base)",fontWeight:600,color:"var(--vetc-color-text-primary)",lineHeight:"var(--vetc-line-height-relaxed)",display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n})}),v?e("button",{onClick:v,"aria-label":"Đóng",style:{width:32,height:32,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",background:"none",border:"none",cursor:"pointer",color:"var(--vetc-color-icon-muted)",borderRadius:"var(--vetc-radius-sm)",transition:"background-color var(--vetc-transition-fast)"},children:e("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:e("path",{d:"M15 5L5 15M5 5L15 15",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}):e("div",{style:{width:32,height:32,flexShrink:0}})]}),e("div",{ref:x,style:{flex:1,overflowY:"auto",minHeight:0,padding:"0 var(--vetc-sheet-padding) var(--vetc-sheet-padding)"},children:o}),a&&e("div",{style:{flexShrink:0,borderTop:"1px solid var(--vetc-sheet-border)",padding:"var(--vetc-sheet-padding)"},children:a})]}),e("style",{children:"\n @keyframes vetc-fade-in {\n from { opacity: 0 }\n to { opacity: 1 }\n }\n @keyframes vetc-slide-up {\n from { transform: translateY(calc(100% + 8px)) }\n to { transform: translateY(0) }\n }\n "})]})}const ue=()=>e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:e("path",{d:"M4 6l4 4 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),be=()=>t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[e("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),e("path",{d:"M5 8l2 2 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),me=()=>e("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:e("path",{d:"M9 3L3 9M3 3l6 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),ye=()=>t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:[e("circle",{cx:"7",cy:"7",r:"4.5",stroke:"currentColor",strokeWidth:"1.5"}),e("path",{d:"M11 11l2.5 2.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]});function xe({label:r,selected:i,disabled:n,showDivider:o,onClick:a}){const[l,c]=f(!1);return t("div",{role:"option","aria-selected":i,onClick:n?void 0:a,onMouseDown:()=>!n&&c(!0),onMouseUp:()=>c(!1),onMouseLeave:()=>c(!1),onTouchStart:()=>!n&&c(!0),onTouchEnd:()=>c(!1),style:{display:"flex",alignItems:"center",padding:"var(--vetc-space-12) var(--vetc-space-16)",borderBottom:o?"1px solid var(--vetc-color-border-variant)":"none",cursor:n?"not-allowed":"pointer",backgroundColor:l?"var(--vetc-color-bg-pressed)":"transparent",transition:"background-color 0.15s",userSelect:"none",WebkitTapHighlightColor:"transparent"},children:[e("span",{style:{flex:1,fontSize:"var(--vetc-font-size-sm)",lineHeight:"20px",fontWeight:i?600:400,color:n?"var(--vetc-color-text-disabled)":"var(--vetc-color-text-primary)",fontFamily:"var(--vetc-font-family)"},children:r}),i&&e("span",{style:{color:"var(--vetc-color-brand)",lineHeight:0,flexShrink:0,marginLeft:"var(--vetc-space-8)"},children:e(be,{})})]})}function we(e){return null==e?[]:Array.isArray(e)?e:[e]}function ke({label:r,placeholder:i="Chọn...",value:n,defaultValue:o,options:a=[],helperText:l,error:c,disabled:d=!1,multiple:s=!1,searchable:v=!1,allowClear:g=!1,loading:h,popupMatchSelectWidth:p,onChange:u,onSearch:b,required:x=!1,id:w,className:k="",style:S}){const[C,z]=f(!1),[H,W]=f(""),[L,B]=f(()=>we(void 0!==n?n:o));m(()=>{void 0!==n&&B(we(n))},[n]);const I=y(()=>void 0!==n?we(n):L,[n,L]),M=y(()=>v&&H?a.filter(e=>String(e.label).toLowerCase().includes(H.toLowerCase())):a,[a,H,v]),T=y(()=>a.filter(e=>I.includes(e.value)),[a,I]),F=T.length>0?T.map(e=>e.label).join(", "):void 0,R=!!c,N=c??l,A=R?"var(--vetc-input-border-error)":d?"var(--vetc-input-border-disabled)":"var(--vetc-input-border)";return t("div",{className:`vetc-select-wrapper ${k}`,style:{display:"flex",flexDirection:"column",gap:"var(--vetc-input-gap)",fontFamily:"var(--vetc-font-family)",...S},children:[r&&t("label",{htmlFor:w,style:{fontSize:"var(--vetc-input-label-font-size)",fontWeight:"var(--vetc-input-label-font-weight)",lineHeight:"var(--vetc-line-height-relaxed)",color:d?"var(--vetc-color-text-disabled)":"var(--vetc-input-label-color)",display:"block"},children:[r,x&&e("span",{style:{color:"var(--vetc-color-negative)",marginLeft:"var(--vetc-space-2)"},children:"*"})]}),t("button",{id:w,type:"button",disabled:d,"aria-haspopup":"listbox","aria-expanded":C,onClick:()=>z(!0),style:{height:"var(--vetc-input-height)",width:"100%",display:"flex",alignItems:"center",gap:"var(--vetc-space-8)",paddingInline:"var(--vetc-input-padding-x)",borderRadius:"var(--vetc-input-radius)",border:`1px solid ${A}`,backgroundColor:d?"var(--vetc-input-bg-disabled)":"var(--vetc-input-bg)",cursor:d?"not-allowed":"pointer",textAlign:"left",fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-input-font-size)",transition:"border-color 0.15s",WebkitTapHighlightColor:"transparent"},children:[e("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:F?d?"var(--vetc-input-text-disabled)":"var(--vetc-input-text)":"var(--vetc-input-text-placeholder)"},children:F??i}),g&&I.length>0&&!d&&e("span",{role:"button","aria-label":"Xóa",onClick:e=>{e.stopPropagation(),void 0===n&&B([]),u?.(s?[]:void 0,s?[]:void 0)},style:{display:"flex",alignItems:"center",color:"var(--vetc-color-text-secondary)",flexShrink:0,lineHeight:0},children:e(me,{})}),e("span",{style:{display:"flex",alignItems:"center",color:d?"var(--vetc-color-text-disabled)":"var(--vetc-color-text-secondary)",flexShrink:0,lineHeight:0,transform:C?"rotate(180deg)":"none",transition:"transform 0.2s ease"},children:e(ue,{})})]}),N&&e("span",{style:{fontSize:"var(--vetc-input-helper-font-size)",lineHeight:"var(--vetc-line-height-relaxed)",color:R?"var(--vetc-input-helper-color-error)":"var(--vetc-input-helper-color)"},children:N}),t(fe,{open:C,title:r,onClose:()=>{z(!1),W("")},children:[v&&e("div",{style:{position:"sticky",top:0,zIndex:1,backgroundColor:"var(--vetc-color-bg)",paddingBottom:"var(--vetc-space-8)",marginInline:"calc(-1 * var(--vetc-sheet-padding))",paddingInline:"var(--vetc-sheet-padding)"},children:t("div",{style:{display:"flex",alignItems:"center",gap:"var(--vetc-space-8)",height:40,paddingInline:"var(--vetc-input-padding-x)",borderRadius:"var(--vetc-input-radius)",border:"1px solid var(--vetc-input-border)",backgroundColor:"var(--vetc-input-bg)"},children:[e("span",{style:{color:"var(--vetc-color-text-secondary)",lineHeight:0,flexShrink:0},children:e(ye,{})}),e("input",{type:"text",placeholder:"Tìm kiếm...",value:H,onChange:e=>{return t=e.target.value,W(t),void b?.(t);var t},style:{flex:1,border:"none",outline:"none",background:"transparent",fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-font-size-sm)",color:"var(--vetc-color-text-primary)",lineHeight:"20px"}})]})}),e("div",{style:{marginInline:"calc(-1 * var(--vetc-sheet-padding))"},children:0===M.length?e("div",{style:{padding:"var(--vetc-space-24) var(--vetc-space-16)",textAlign:"center",color:"var(--vetc-color-text-secondary)",fontSize:"var(--vetc-font-size-sm)",fontFamily:"var(--vetc-font-family)"},children:"Không tìm thấy kết quả"}):M.map((t,r)=>e(xe,{label:String(t.label),selected:I.includes(t.value),disabled:t.disabled,showDivider:r<M.length-1,onClick:()=>(e=>{let t;s?t=I.includes(e)?I.filter(t=>t!==e):[...I,e]:(t=[e],z(!1),W("")),void 0===n&&B(t);const r=a.filter(e=>t.includes(e.value));u?.(s?t:t[0],s?r:r[0])})(t.value)},String(t.value)))})]})]})}const Se=()=>e("svg",{width:"12",height:"9",viewBox:"0 0 12 9",fill:"none","aria-hidden":"true",children:e("path",{d:"M1 4L4.5 7.5L11 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Ce=()=>e("svg",{width:"10",height:"2",viewBox:"0 0 10 2",fill:"none","aria-hidden":"true",children:e("path",{d:"M1 1H9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})});function ze({label:r,description:i,checked:n,defaultChecked:o=!1,indeterminate:a=!1,disabled:l=!1,variant:c="brand",onChange:d,value:s,id:v,className:g="",style:h}){const[p,u]=f(o),[b,m]=f(!1),y=void 0!==n,x=y?n:p,w="brand"===c?"var(--vetc-color-brand)":"var(--vetc-gray-90)";let k="transparent",S=l?"var(--vetc-color-border-disabled)":b?w:"var(--vetc-color-border)",C="var(--vetc-white)";return(x||a)&&(k=l?"var(--vetc-color-bg-disabled)":w,S=l?"var(--vetc-color-border-disabled)":b?"brand"===c?"var(--vetc-color-brand-hover)":"var(--vetc-gray-70)":w,C=l?"var(--vetc-color-text-disabled)":"var(--vetc-white)",l&&(k="var(--vetc-color-bg-disabled)")),t("label",{htmlFor:v,className:`vetc-checkbox ${g}`,onMouseEnter:()=>!l&&m(!0),onMouseLeave:()=>m(!1),style:{display:"inline-flex",alignItems:i?"flex-start":"center",gap:"var(--vetc-space-12)",cursor:l?"not-allowed":"pointer",userSelect:"none",fontFamily:"var(--vetc-font-family)",WebkitTapHighlightColor:"transparent",...h},children:[e("input",{id:v,type:"checkbox",checked:x,disabled:l,value:s,onChange:()=>{if(l)return;const e=!x;y||u(e),d?.(e)},style:{position:"absolute",opacity:0,width:0,height:0,pointerEvents:"none"},"aria-checked":a?"mixed":x}),t("span",{"aria-hidden":"true",style:{width:"20px",height:"20px",flexShrink:0,borderRadius:"var(--vetc-radius-xs)",border:`1.5px solid ${S}`,backgroundColor:k,display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color var(--vetc-transition-fast), border-color var(--vetc-transition-fast)",color:C,marginTop:i?"2px":0},children:[x&&!a&&e(Se,{}),a&&e(Ce,{})]}),(r||i)&&t("span",{style:{display:"flex",flexDirection:"column",gap:"var(--vetc-space-2)"},children:[r&&e("span",{style:{fontSize:"var(--vetc-font-size-base)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",color:l?"var(--vetc-color-text-disabled)":"var(--vetc-color-text-primary)"},children:r}),i&&e("span",{style:{fontSize:"var(--vetc-font-size-sm)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",color:l?"var(--vetc-color-text-disabled)":"var(--vetc-color-text-secondary)"},children:i})]})]})}function He({options:t,value:r,defaultValue:i=[],direction:n="vertical",disabled:o=!1,variant:a="brand",onChange:l,className:c="",style:d}){const[s,v]=f(i),g=void 0!==r,h=g?r:s;return e("div",{className:`vetc-checkbox-group ${c}`,style:{display:"flex",flexDirection:"vertical"===n?"column":"row",flexWrap:"horizontal"===n?"wrap":void 0,gap:"vertical"===n?"var(--vetc-space-12)":"var(--vetc-space-16)",fontFamily:"var(--vetc-font-family)",...d},children:t.map(t=>e(ze,{label:t.label,description:t.description,checked:h.includes(t.value),disabled:t.disabled??o,variant:a,value:t.value,onChange:e=>((e,t)=>{const r=t?[...h,e]:h.filter(t=>t!==e);g||v(r),l?.(r)})(t.value,e)},String(t.value)))})}function We({label:r,description:i,checked:n,defaultChecked:o=!1,disabled:a=!1,variant:l="brand",onChange:c,value:d,id:s,className:v="",style:g}){const[h,p]=f(o),[u,b]=f(!1),m=void 0!==n,y=m?n:h,x="brand"===l?"var(--vetc-color-brand)":"var(--vetc-gray-90)",w=a?"var(--vetc-color-border-disabled)":y?u?"brand"===l?"var(--vetc-color-brand-hover)":"var(--vetc-gray-70)":x:u?x:"var(--vetc-color-border)",k=a?"var(--vetc-color-text-disabled)":x;return t("label",{htmlFor:s,className:`vetc-radio ${v}`,onMouseEnter:()=>!a&&b(!0),onMouseLeave:()=>b(!1),style:{display:"inline-flex",alignItems:i?"flex-start":"center",gap:"var(--vetc-space-12)",cursor:a?"not-allowed":"pointer",userSelect:"none",fontFamily:"var(--vetc-font-family)",WebkitTapHighlightColor:"transparent",...g},children:[e("input",{id:s,type:"radio",checked:y,disabled:a,value:d,onChange:()=>{a||y||(m||p(!0),c?.(!0))},style:{position:"absolute",opacity:0,width:0,height:0,pointerEvents:"none"}}),e("span",{"aria-hidden":"true",style:{width:"20px",height:"20px",flexShrink:0,borderRadius:"50%",border:`1.5px solid ${w}`,backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",transition:"border-color var(--vetc-transition-fast)",marginTop:i?"2px":0},children:y&&e("span",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:k,flexShrink:0}})}),(r||i)&&t("span",{style:{display:"flex",flexDirection:"column",gap:"var(--vetc-space-2)"},children:[r&&e("span",{style:{fontSize:"var(--vetc-font-size-base)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",color:a?"var(--vetc-color-text-disabled)":"var(--vetc-color-text-primary)"},children:r}),i&&e("span",{style:{fontSize:"var(--vetc-font-size-sm)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",color:a?"var(--vetc-color-text-disabled)":"var(--vetc-color-text-secondary)"},children:i})]})]})}function Le({options:t,value:r,defaultValue:i,direction:n="vertical",disabled:o=!1,variant:a="brand",onChange:l,className:c="",style:d}){const[s,v]=f(i),g=void 0!==r,h=g?r:s;return e("div",{role:"radiogroup",className:`vetc-radio-group ${c}`,style:{display:"flex",flexDirection:"vertical"===n?"column":"row",flexWrap:"horizontal"===n?"wrap":void 0,gap:"vertical"===n?"var(--vetc-space-12)":"var(--vetc-space-16)",fontFamily:"var(--vetc-font-family)",...d},children:t.map(t=>e(We,{label:t.label,description:t.description,checked:h===t.value,disabled:t.disabled??o,variant:a,value:t.value,onChange:()=>{return e=t.value,g||v(e),void l?.(e);var e}},String(t.value)))})}function Be({label:i,description:n,labelPosition:o="right",checked:a,defaultChecked:l=!1,disabled:c=!1,loading:d=!1,variant:s="brand",onChange:v,id:g,className:h="",style:p}){const[u,b]=f(l),m=void 0!==a,y=m?a:u,x=c||d,w=()=>{if(x)return;const e=!y;m||b(e),v?.(e)},k=t("button",{id:g,type:"button",role:"switch","aria-checked":y,disabled:x,onClick:w,className:`vetc-switch ${h}`,style:{position:"relative",display:"inline-flex",alignItems:"center",width:"var(--vetc-switch-width)",height:"var(--vetc-switch-height)",borderRadius:"var(--vetc-radius-pill)",backgroundColor:x?"var(--vetc-color-bg-disabled)":y?"brand"===s?"var(--vetc-switch-on-bg)":"var(--vetc-gray-90)":"var(--vetc-switch-off-bg)",border:"none",cursor:x?"not-allowed":"pointer",padding:0,flexShrink:0,transition:"background-color var(--vetc-transition-fast)",outline:"none",WebkitTapHighlightColor:"transparent",...i||n?{}:p},children:[e("span",{style:{position:"absolute",left:y?"calc(100% - 30px)":"2px",width:"var(--vetc-switch-thumb-size)",height:"var(--vetc-switch-thumb-size)",borderRadius:"50%",backgroundColor:x?"var(--vetc-gray-20)":"var(--vetc-white)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",transition:"left var(--vetc-transition-fast)",display:"flex",alignItems:"center",justifyContent:"center"},children:d&&t("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",style:{animation:"vetc-btn-spin 0.6s linear infinite"},"aria-hidden":"true",children:[e("circle",{cx:"6",cy:"6",r:"4",stroke:"var(--vetc-gray-30)",strokeWidth:"1.5"}),e("path",{d:"M6 2a4 4 0 014 4",stroke:"var(--vetc-color-brand)",strokeWidth:"1.5",strokeLinecap:"round"})]})}),e("style",{children:"@keyframes vetc-btn-spin { to { transform: rotate(360deg); } }"})]});if(!i&&!n)return k;const S=t("span",{style:{display:"flex",flexDirection:"column",gap:"var(--vetc-space-2)",flex:1},children:[i&&e("span",{style:{fontSize:"var(--vetc-font-size-base)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",color:x?"var(--vetc-color-text-disabled)":"var(--vetc-color-text-primary)"},children:i}),n&&e("span",{style:{fontSize:"var(--vetc-font-size-sm)",fontWeight:"var(--vetc-font-weight-regular)",lineHeight:"var(--vetc-line-height-relaxed)",color:x?"var(--vetc-color-text-disabled)":"var(--vetc-color-text-secondary)"},children:n})]});return e("div",{style:{display:"flex",alignItems:"center",gap:"var(--vetc-space-12)",flexDirection:"left"===o?"row-reverse":"row",fontFamily:"var(--vetc-font-family)",cursor:x?"not-allowed":"pointer",WebkitTapHighlightColor:"transparent",...p},onClick:w,children:t(r,"right"===o?{children:[k,S]}:{children:[S,k]})})}const Ie={default:{bg:"var(--vetc-chip-default-bg)",border:"var(--vetc-chip-default-border)",text:"var(--vetc-chip-default-text)",filledBg:"var(--vetc-chip-default-filled-bg)"},positive:{bg:"var(--vetc-chip-positive-bg)",border:"var(--vetc-chip-positive-border)",text:"var(--vetc-chip-positive-text)",filledBg:"var(--vetc-chip-positive-filled-bg)"},negative:{bg:"var(--vetc-chip-negative-bg)",border:"var(--vetc-chip-negative-border)",text:"var(--vetc-chip-negative-text)",filledBg:"var(--vetc-chip-negative-filled-bg)"},warning:{bg:"var(--vetc-chip-warning-bg)",border:"var(--vetc-chip-warning-border)",text:"var(--vetc-chip-warning-text)",filledBg:"var(--vetc-chip-warning-filled-bg)"},info:{bg:"var(--vetc-chip-info-bg)",border:"var(--vetc-chip-info-border)",text:"var(--vetc-chip-info-text)",filledBg:"var(--vetc-chip-info-filled-bg)"}},Me={brand:{bg:"var(--vetc-chip-brand-bg)",border:"var(--vetc-chip-brand-border)",text:"var(--vetc-chip-brand-text)",filledBg:"var(--vetc-chip-brand-filled-bg)"},neutral:{bg:"var(--vetc-chip-neutral-bg)",border:"var(--vetc-chip-neutral-border)",text:"var(--vetc-chip-neutral-text)",filledBg:"var(--vetc-chip-neutral-filled-bg)"}};function Te({type:t="tinted",status:r="default",variant:i,shape:n="pill",size:o="md",icon:a,closable:c=!1,onClose:d,onClick:s,children:v,className:g="",css:h,id:p}){const f=i?Me[i]:Ie[r],u="md"===o?"var(--vetc-chip-height-md)":"var(--vetc-chip-height-sm)",b="md"===o?"var(--vetc-chip-padding-x-md)":"var(--vetc-chip-padding-x-sm)",m="md"===o?"var(--vetc-chip-font-size-md)":"var(--vetc-chip-font-size-sm)",y="pill"===n?"var(--vetc-chip-radius-pill)":"var(--vetc-chip-radius-rounded)";let x=f.bg,w=`1px solid ${f.border}`,k=f.text;return"filled"===t?(x=f.filledBg,w="none",k="var(--vetc-white)"):"outlined"===t&&(x="transparent",w=`1px solid ${f.border}`,k=f.text),e(l,{id:p,closable:c,onClose:e=>{e.preventDefault(),d?.()},onClick:s,icon:a,className:`vetc-chip vetc-chip--${t} vetc-chip--${r} ${g}`,style:{display:"inline-flex",alignItems:"center",height:u,padding:`0 ${b}`,borderRadius:y,background:x,border:w,color:k,fontSize:m,fontWeight:"var(--vetc-chip-font-weight)",fontFamily:"var(--vetc-font-family)",cursor:s?"pointer":"default",userSelect:"none",lineHeight:1,gap:"var(--vetc-space-4)",transition:"var(--vetc-transition-fast)",...h},children:v})}const Fe={display:"inline-block",width:"var(--vetc-badge-dot-size)",height:"var(--vetc-badge-dot-size)",borderRadius:"var(--vetc-badge-radius)",background:"var(--vetc-badge-bg)",flexShrink:0},Re={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:"var(--vetc-badge-size)",height:"var(--vetc-badge-size)",padding:"0 5px",borderRadius:"var(--vetc-badge-radius)",background:"var(--vetc-badge-bg)",color:"var(--vetc-badge-text)",fontSize:"var(--vetc-badge-font-size)",fontWeight:"var(--vetc-badge-font-weight)",lineHeight:"16px",whiteSpace:"nowrap",fontFamily:"var(--vetc-font-family)"};function Ne({dot:r=!1,count:i,label:n,overflowCount:o=99,outline:a=!1,children:l,className:c,style:d}){const s=r||void 0===i&&void 0===n;let v=null;s||(void 0!==i?v=i>o?`${o}+`:String(i):void 0!==n&&(v=n));const g=e("span",{className:c,style:{...s?Fe:Re,...a?{boxShadow:"0 0 0 var(--vetc-badge-outline-width) var(--vetc-badge-outline-color)"}:{},...d},children:v});return l?t("span",{style:{position:"relative",display:"inline-flex"},children:[l,e("span",{style:{position:"absolute",top:0,right:0,transform:"translate(50%, -50%)",zIndex:1},children:g})]}):g}const Ae={xl:"var(--vetc-avatar-size-xl)",lg:"var(--vetc-avatar-size-lg)",md:"var(--vetc-avatar-size-md)",sm:"var(--vetc-avatar-size-sm)",xs:"var(--vetc-avatar-size-xs)"},$e={xl:56,lg:48,md:40,sm:32,xs:24},De={xl:"var(--vetc-font-size-2xl)",lg:"var(--vetc-font-size-xl)",md:"var(--vetc-font-size-base)",sm:"var(--vetc-font-size-sm)",xs:"var(--vetc-font-size-2xs)"};function je({src:t,alt:r,initials:i,icon:n,size:o="md",shape:a="circle",color:l,className:d="",style:s,onClick:v,id:g}){return e("span",{id:g,style:{display:"inline-flex",flexShrink:0,width:Ae[o],height:Ae[o]},children:e(c,{src:t,alt:r,icon:t||i?void 0:n,size:$e[o],shape:a,onClick:v,className:`vetc-avatar vetc-avatar--${o} ${d}`,style:{backgroundColor:t?void 0:l??"var(--vetc-avatar-bg-default)",fontSize:De[o],fontWeight:"var(--vetc-font-weight-bold)",fontFamily:"var(--vetc-font-family)",color:"var(--vetc-avatar-text-color)",cursor:v?"pointer":"default",flexShrink:0,...s},children:!t&&i?i.slice(0,2).toUpperCase():void 0})})}function Oe({elevation:t="outlined",title:r,extra:i,children:n,onClick:o,className:a="",style:l,bodyStyle:c,id:s}){return e(d,{id:s,title:r,extra:i,onClick:o,className:`vetc-card vetc-card--${t} ${a}`,styles:{body:{padding:"var(--vetc-card-padding)",fontFamily:"var(--vetc-font-family)",...c},header:r?{borderBottom:"1px solid var(--vetc-card-border)",padding:"var(--vetc-space-12) var(--vetc-card-padding)"}:void 0},style:{borderRadius:"var(--vetc-card-radius)",border:{flat:"none",raised:"none",outlined:"1px solid var(--vetc-card-border)"}[t],boxShadow:{flat:"var(--vetc-shadow-none)",raised:"var(--vetc-card-shadow-raised)",outlined:"var(--vetc-shadow-none)"}[t],cursor:o?"pointer":"default",overflow:"hidden",backgroundColor:"var(--vetc-card-bg)",fontFamily:"var(--vetc-font-family)",transition:"box-shadow var(--vetc-transition-fast)",...l},children:n})}function Ee({disabled:t}){return e("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":"true",children:e("path",{d:"M7.5 5L12.5 10L7.5 15",stroke:t?"var(--vetc-color-icon-disabled)":"var(--vetc-color-icon-muted)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function Pe({leading:r,title:i,description:n,trailing:o,arrow:a=!1,divider:l=!0,onClick:c,disabled:d=!1,className:s="",style:v,id:g}){const h=!!c&&!d;return t("div",{id:g,role:h?"button":void 0,tabIndex:h?0:void 0,className:`vetc-list-item ${s}`,onClick:d?void 0:c,onKeyDown:h?e=>{"Enter"!==e.key&&" "!==e.key||c?.()}:void 0,style:{display:"flex",alignItems:"center",minHeight:"var(--vetc-list-item-height)",padding:"0 var(--vetc-list-item-padding-x)",gap:"var(--vetc-list-item-gap)",cursor:h?"pointer":"default",borderBottom:l?"1px solid var(--vetc-list-item-border)":"none",backgroundColor:"var(--vetc-list-item-bg)",opacity:d?.5:1,fontFamily:"var(--vetc-font-family)",transition:"background-color var(--vetc-transition-fast)",outline:"none",...v},onMouseEnter:e=>{h&&(e.currentTarget.style.backgroundColor="var(--vetc-list-item-bg-hover)")},onMouseLeave:e=>{h&&(e.currentTarget.style.backgroundColor="var(--vetc-list-item-bg)")},children:[r&&e("div",{style:{flexShrink:0,display:"flex",alignItems:"center",color:"var(--vetc-list-item-icon-color)"},children:r}),t("div",{style:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:"var(--vetc-space-2)"},children:[e("span",{style:{fontSize:"var(--vetc-list-item-title-size)",fontWeight:"var(--vetc-list-item-title-weight)",color:d?"var(--vetc-color-text-disabled)":"var(--vetc-list-item-title-color)",lineHeight:"var(--vetc-line-height-relaxed)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i}),n&&e("span",{style:{fontSize:"var(--vetc-list-item-desc-size)",fontWeight:"var(--vetc-font-weight-regular)",color:d?"var(--vetc-color-text-disabled)":"var(--vetc-list-item-desc-color)",lineHeight:"var(--vetc-line-height-relaxed)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n})]}),(o||a)&&t("div",{style:{flexShrink:0,display:"flex",alignItems:"center",gap:"var(--vetc-space-8)",color:"var(--vetc-list-item-icon-color)"},children:[o,a&&e(Ee,{disabled:d})]})]})}function Xe({items:t,renderItem:r,bordered:i=!1,className:n="",style:o,id:a}){return e("div",{id:a,className:`vetc-list ${n}`,style:{border:i?"1px solid var(--vetc-color-border-variant)":"none",borderRadius:i?"var(--vetc-card-radius)":0,overflow:"hidden",backgroundColor:"var(--vetc-color-bg)",...o},children:t.map((t,i)=>e(p.Fragment,{children:r(t,i)},i))})}function Ve({orientation:t="horizontal",label:r,labelAlign:i="center",thickness:n=1,color:o,margin:a,className:l="",style:c}){const d="vertical"===t;return e(s,{type:d?"vertical":"horizontal",orientationMargin:"center"!==i?0:void 0,orientation:"center"!==i?i:void 0,className:`vetc-divider ${l}`,style:{borderColor:o??"var(--vetc-divider-color)",borderTopWidth:d?void 0:n,borderLeftWidth:d?n:void 0,margin:a??(d?"0 var(--vetc-divider-margin-v)":"var(--vetc-divider-margin-h) 0"),fontFamily:"var(--vetc-font-family)",fontSize:"var(--vetc-divider-label-size)",color:"var(--vetc-divider-label-color)",...c},children:r})}const Ye={sm:16,md:24,lg:40};function qe({size:t="md",color:r,fullscreen:i=!1,tip:n,children:o,spinning:a=!0,className:l="",style:c}){const d=e(w,{style:{fontSize:Ye[t],color:r??"var(--vetc-spinner-color)"},spin:!0});return o?e(g,{spinning:a,indicator:d,tip:n,className:`vetc-spinner ${l}`,style:c,children:o}):e("div",i?{className:`vetc-spinner-overlay ${l}`,style:{position:"fixed",inset:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"var(--vetc-color-overlay)",zIndex:9999,...c},children:e(g,{spinning:a,indicator:d,tip:n})}:{className:`vetc-spinner ${l}`,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",...c},children:e(g,{spinning:a,indicator:d,tip:n})})}function _e({rows:t=3,avatar:r=!1,avatarSize:i=40,title:n=!0,loading:o=!0,className:a="",style:l,children:c}){return e(v,{active:!0,loading:o,avatar:!!r&&{size:i,shape:"circle"},title:n,paragraph:{rows:t},className:`vetc-skeleton ${a}`,style:l,children:c})}const Ge={height:"var(--vetc-btn-height-lg)",borderRadius:"var(--vetc-btn-radius-lg)",fontWeight:"var(--vetc-btn-font-weight)",fontSize:"var(--vetc-btn-font-size-lg)",fontFamily:"var(--vetc-font-family)"};function Qe({open:t,title:r,children:i,footer:n,okText:o="Xác nhận",cancelText:a="Hủy",okDisabled:l=!1,okLoading:c=!1,okDanger:d=!1,onOk:s,onCancel:v,maskClosable:g=!0,closable:p=!0,width:f,className:u="",style:b,id:m}){return e(h,{open:t,title:r,okText:o,cancelText:a,okButtonProps:{disabled:l,loading:c,danger:d,style:Ge},cancelButtonProps:{style:Ge},footer:null===n?null:n,onOk:s,onCancel:v,maskClosable:g,closable:p,width:f??"var(--vetc-modal-width)",centered:!0,className:`vetc-modal ${u}`,style:{fontFamily:"var(--vetc-font-family)",...b},styles:{header:{padding:"var(--vetc-modal-padding) var(--vetc-modal-padding) 0",borderBottom:"none"},body:{padding:"var(--vetc-space-8) var(--vetc-modal-padding) var(--vetc-modal-padding)"},footer:{padding:"0 var(--vetc-modal-padding) var(--vetc-modal-padding)",borderTop:"none"},mask:{backgroundColor:"var(--vetc-modal-overlay)"}},children:i})}function Ke(){return{confirm:e=>{h.confirm({title:e.title,content:e.content,okText:e.okText??"Xác nhận",cancelText:e.cancelText??"Hủy",okButtonProps:{danger:e.okDanger,style:{...Ge,height:40}},cancelButtonProps:{style:{...Ge,height:40}},centered:!0,onOk:e.onOk,onCancel:e.onCancel,styles:{mask:{backgroundColor:"var(--vetc-modal-overlay)"}}})}}}const Ue=()=>e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:e("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});function Je({open:i,imageOnly:n=!1,image:o,title:a,description:l,okText:c="Xác nhận",cancelText:d="Hủy",okDisabled:s=!1,okLoading:v=!1,okDanger:g=!1,onOk:h,onCancel:p,maskClosable:f=!0}){if(m(()=>(document.body.style.overflow=i?"hidden":"",()=>{document.body.style.overflow=""}),[i]),!i)return null;const u=!!(a||l||o);return e(r,{children:x(e("div",{style:{position:"fixed",inset:0,backgroundColor:"var(--vetc-color-overlay)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,padding:"0 var(--vetc-space-24)"},onClick:f?p:void 0,children:t("div",n?{style:{position:"relative",width:"100%",maxWidth:"var(--vetc-dialog-width)",borderRadius:"var(--vetc-dialog-radius)",overflow:"hidden"},onClick:e=>e.stopPropagation(),children:[o&&e("img",{src:o,alt:"",style:{width:"100%",display:"block",aspectRatio:"1",objectFit:"cover"}}),p&&e("button",{"aria-label":"Đóng",onClick:p,style:{position:"absolute",top:12,right:12,width:40,height:40,border:"none",borderRadius:"50%",backgroundColor:"var(--vetc-color-bg)",boxShadow:"var(--vetc-shadow-md)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:"var(--vetc-color-text-primary)",padding:0},children:e(Ue,{})})]}:{style:{width:"100%",maxWidth:"var(--vetc-dialog-width)",backgroundColor:"var(--vetc-dialog-bg)",borderRadius:"var(--vetc-dialog-radius)",overflow:"hidden",boxShadow:"var(--vetc-shadow-lg)",fontFamily:"var(--vetc-font-family)"},onClick:e=>e.stopPropagation(),children:[p&&e("div",{style:{display:"flex",justifyContent:"flex-end",padding:"8px 8px 0"},children:e("button",{"aria-label":"Đóng",onClick:p,style:{width:32,height:32,border:"none",background:"transparent",borderRadius:"var(--vetc-radius-md)",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:"var(--vetc-color-text-secondary)",padding:0},children:e(Ue,{})})}),u&&t("div",{style:{padding:(p?"var(--vetc-space-8)":"var(--vetc-space-20)")+" var(--vetc-space-16) 0",textAlign:o?"center":"left"},children:[o&&e("div",{style:{display:"flex",justifyContent:"center",marginBottom:"var(--vetc-space-12)"},children:e("img",{src:o,alt:"",style:{width:"var(--vetc-dialog-image-size)",height:"var(--vetc-dialog-image-size)",borderRadius:"var(--vetc-dialog-radius)",objectFit:"cover",display:"block"}})}),a&&e("div",{style:{fontSize:"var(--vetc-dialog-title-size)",fontWeight:"var(--vetc-dialog-title-weight)",lineHeight:"var(--vetc-dialog-title-line-height)",color:"var(--vetc-color-text-primary)",marginBottom:l?"var(--vetc-space-8)":0},children:a}),l&&e("div",{style:{fontSize:"var(--vetc-dialog-desc-size)",lineHeight:"var(--vetc-dialog-desc-line-height)",color:"var(--vetc-dialog-desc-color)"},children:l})]}),t("div",{style:{display:"flex",gap:"var(--vetc-dialog-btn-gap)",padding:"var(--vetc-space-12) var(--vetc-space-16) var(--vetc-space-16)"},children:[p&&e(U,{block:!0,type:"outlined",variant:"neutral",onClick:p,children:d}),e(U,{block:!0,type:g?"danger":"filled",loading:v,disabled:s,onClick:h,children:c})]})]})}),document.body)})}const Ze=()=>e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:e("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})});function et(e,t){const r="var(--vetc-tooltip-bg)",i={position:"absolute",width:0,height:0};return"top"===e?(i.bottom=-6,i.borderLeft="6px solid transparent",i.borderRight="6px solid transparent",i.borderTop=`6px solid ${r}`):"bottom"===e?(i.top=-6,i.borderLeft="6px solid transparent",i.borderRight="6px solid transparent",i.borderBottom=`6px solid ${r}`):"left"===e?(i.right=-6,i.borderTop="6px solid transparent",i.borderBottom="6px solid transparent",i.borderLeft=`6px solid ${r}`):(i.left=-6,i.borderTop="6px solid transparent",i.borderBottom="6px solid transparent",i.borderRight=`6px solid ${r}`),"top"===e||"bottom"===e?"center"===t?(i.left="50%",i.transform="translateX(-50%)"):"start"===t?i.left=12:i.right=12:"center"===t?(i.top="50%",i.transform="translateY(-50%)"):"start"===t?i.top=12:i.bottom=12,i}function tt({content:i,placement:n="top",align:o="center",closable:a=!1,open:l,defaultOpen:c=!1,onClose:d,children:s,style:v,className:g}){const h=u(null),p=u(null),[y,w]=f(c),[k,S]=f({top:-9999,left:-9999}),C=void 0!==l,z=C?l:y,H=b(()=>{if(!h.current||!p.current)return;const e=h.current.getBoundingClientRect(),t=p.current.getBoundingClientRect();S(function(e,t,r,i,n){let o=0,a=0;switch(t){case"top":o=e.top-n-8;break;case"bottom":o=e.bottom+8;break;case"left":a=e.left-i-8;break;case"right":a=e.right+8}return"top"===t||"bottom"===t?a="center"===r?e.left+e.width/2-i/2:"start"===r?e.left:e.right-i:o="center"===r?e.top+e.height/2-n/2:"start"===r?e.top:e.bottom-n,{top:o,left:a}}(e,n,o,t.width,t.height))},[n,o]);m(()=>{z?requestAnimationFrame(H):S({top:-9999,left:-9999})},[z,H]);const W=b(()=>{C||w(!1),d?.()},[C,d]);m(()=>{if(!z)return;const e=e=>{const t=e.target;h.current?.contains(t)||p.current?.contains(t)||W()};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}},[z,W]);return t(r,{children:[e("span",{ref:h,style:{display:"inline-block"},onClick:e=>{s.props.onClick?.(e),C||w(e=>!e)},children:s}),z&&x(t("div",{ref:p,role:"tooltip",className:g,style:{position:"fixed",top:k.top,left:k.left,zIndex:9999,background:"var(--vetc-tooltip-bg)",color:"var(--vetc-tooltip-text)",borderRadius:"var(--vetc-tooltip-radius)",boxShadow:"var(--vetc-tooltip-shadow)",minWidth:"var(--vetc-tooltip-min-width)",minHeight:"var(--vetc-tooltip-min-height)",fontSize:"var(--vetc-tooltip-font-size)",lineHeight:"var(--vetc-tooltip-line-height)",WebkitTapHighlightColor:"transparent",overflow:"hidden",...v},children:[e("div",{style:et(n,o)}),a?t("div",{style:{display:"flex",alignItems:"center"},children:[e("div",{style:{flex:1,padding:"5px 8px 5px 12px"},children:i}),e("div",{style:{width:1,alignSelf:"stretch",background:"var(--vetc-tooltip-divider)",flexShrink:0}}),e("button",{onClick:W,"aria-label":"Đóng",style:{width:"var(--vetc-tooltip-close-size)",height:"var(--vetc-tooltip-close-size)",borderRadius:"var(--vetc-tooltip-radius)",background:"none",border:"none",cursor:"pointer",color:"var(--vetc-tooltip-text)",display:"flex",alignItems:"center",justifyContent:"center",padding:0,flexShrink:0},children:e(Ze,{})})]}):e("div",{style:{padding:"5px 12px"},children:i})]}),document.body)]})}function rt(){return e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:e("path",{d:"M15 19L8 12L15 5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function it(){return e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:e("path",{d:"M18 6L6 18M6 6L18 18",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}const nt={background:"none",border:"none",cursor:"pointer",width:"var(--vetc-nav-icon-btn-size)",height:"var(--vetc-nav-icon-btn-size)",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"var(--vetc-radius-pill)",color:"var(--vetc-nav-icon-color)",flexShrink:0,padding:0,transition:"background-color var(--vetc-transition-fast)"};function ot({title:r,leading:i="none",leadingIcon:n,onLeadingPress:o,actions:a=[],leftSlot:l,rightSlot:c,backgroundColor:d,divider:s=!0,transparent:v=!1,portal:g,className:h="",style:p,id:f,showBack:u,backIcon:b,onBack:m,left:y,right:w}){const k=u?"back":i,S=n??b,C=o??m,z=!0===g?"undefined"!=typeof document?document.body:null:g||null,H=t("header",{id:f,className:`vetc-nav-bar ${h}`,style:{display:"flex",alignItems:"center",height:"var(--vetc-nav-height)",padding:"0 var(--vetc-nav-padding-x)",backgroundColor:v?"transparent":d??"var(--vetc-nav-bg)",borderBottom:s&&!v?"1px solid var(--vetc-nav-border)":"none",fontFamily:"var(--vetc-font-family)",position:g?"fixed":"relative",...g?{top:0,left:0,right:0,zIndex:999}:{},...p},children:[e("div",{style:{display:"flex",alignItems:"center",minWidth:"var(--vetc-nav-icon-btn-size)",zIndex:1},children:(()=>{if(void 0!==l||void 0!==y)return l??y;if("none"===k)return null;const t=S??e("close"===k?it:rt,{});return e("button",{onClick:C,style:nt,"aria-label":"close"===k?"Đóng":"Quay lại",children:t})})()}),r&&e("div",{style:{position:"absolute",left:0,right:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"},children:e("span",{style:{fontSize:"var(--vetc-nav-title-size)",fontWeight:"var(--vetc-nav-title-weight)",color:"var(--vetc-nav-title-color)",lineHeight:"var(--vetc-line-height-normal)",maxWidth:"60%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r})}),e("div",{style:{display:"flex",alignItems:"center",gap:"var(--vetc-space-4)",marginLeft:"auto",zIndex:1},children:void 0!==c||void 0!==w?c??w:a.slice(0,2).map((t,r)=>e("button",{id:t.id,onClick:t.onClick,disabled:t.disabled,"aria-label":t.label,style:{...nt,opacity:t.disabled?.4:1},children:t.icon},r))})]});return z?x(H,z):H}function at({items:r,activeKey:i,onChange:n,variant:o="brand",backgroundColor:a,divider:l=!0,className:c="",style:d,id:s}){const v="brand"===o?"var(--vetc-tab-color-active)":"var(--vetc-color-text-primary)";return e("nav",{id:s,className:`vetc-tab-bar ${c}`,style:{display:"flex",alignItems:"stretch",height:"var(--vetc-tab-height)",backgroundColor:a??"var(--vetc-tab-bg)",borderTop:l?"1px solid var(--vetc-tab-border)":"none",fontFamily:"var(--vetc-font-family)",...d},children:r.map(r=>{const o=r.key===i,a=r.disabled?"var(--vetc-tab-color-disabled)":o?v:"var(--vetc-tab-color-inactive)";return t("button",{disabled:r.disabled,onClick:()=>!r.disabled&&n?.(r.key),"aria-current":o?"page":void 0,"aria-label":r.label,className:"vetc-tab-bar__item"+(o?" vetc-tab-bar__item--active":""),style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"var(--vetc-space-2)",background:"none",border:"none",cursor:r.disabled?"not-allowed":"pointer",padding:"var(--vetc-space-6) 0",position:"relative",opacity:r.disabled?.5:1,transition:"color var(--vetc-transition-fast)",color:a},children:[t("div",{style:{position:"relative",display:"inline-flex"},children:[e("span",{style:{color:a,display:"flex",fontSize:"24px",lineHeight:1},children:o&&r.activeIcon?r.activeIcon:r.icon}),void 0!==r.badge&&e("span",{style:{position:"absolute",top:"calc(-1 * var(--vetc-space-4))",right:"calc(-1 * var(--vetc-space-8))",minWidth:"var(--vetc-tab-badge-size)",height:"var(--vetc-tab-badge-size)",backgroundColor:"var(--vetc-tab-badge-bg)",borderRadius:"var(--vetc-radius-pill)",fontSize:"var(--vetc-tab-badge-font-size)",fontWeight:"var(--vetc-font-weight-semibold)",color:"var(--vetc-tab-badge-text)",display:"flex",alignItems:"center",justifyContent:"center",padding:"0 var(--vetc-space-4)",lineHeight:1},children:r.badge})]}),e("span",{style:{fontSize:"var(--vetc-tab-label-size)",fontWeight:"var(--vetc-tab-label-weight)",color:a,lineHeight:"var(--vetc-line-height-relaxed)"},children:r.label})]},r.key)})})}const lt="undefined"!=typeof window,ct=(e,t={})=>{const r=lt&&window.flutter_inappwebview&&window.flutter_inappwebview.callHandler&&"function"==typeof window.flutter_inappwebview.callHandler?window.flutter_inappwebview:null;return r?r.callHandler("MiniAppBridge",{action:e,payload:t}):Promise.resolve({ok:!1,error:"BRIDGE_CALL_FAILED"})};let dt=new Map,st="/";function vt(){return dt.get(st)}function gt(e){st=e}function ht({config:t}){const[r,i]=f(null);if(m(()=>{!function(e){dt=new Map(e.pages.map(e=>[e.path,e]))}(t);gt((window.location.pathname||"/").replace("/miniapp","")||"/");let e=vt()??null;if(!e){if(0===t.pages.length)return void console.error("[App] config.pages is empty — no pages to render.");gt(t.pages[0].path),e=vt()??null}i(e),ct("registerAppConfig",{config:t}).catch(e=>{console.error("[App] registerAppConfigError:",e)})},[t]),!r)return e("div",{});const n=r.Component;return e(n,{})}function pt(e){const t=u(e);m(()=>{t.current=e},[e]),m(()=>{if("undefined"==typeof window||!window.MiniApp)return;const e=window.MiniApp,r=()=>{try{t.current?.()}catch(e){console.error("[useAppResume error]",e)}};return e.on("appResume",r),()=>e.off("appResume",r)},[])}function ft(e){const t=u(e);m(()=>{t.current=e},[e]),m(()=>{if("undefined"==typeof window||!window.MiniApp)return;const e=window.MiniApp,r=()=>{try{t.current?.()}catch(e){console.error("[useAppPause error]",e)}};return e.on("appPause",r),()=>e.off("appPause",r)},[])}function ut(e,t){const r=u(t);m(()=>{r.current=t},[t]),m(()=>{if("undefined"==typeof window||!window.MiniApp)return;const t=window.MiniApp,i=t=>{t?.route===e&&r.current?.(t)};return t.on("didShow",i),()=>t.off("didShow",i)},[e])}function bt(e,t){const r=u(t);m(()=>{r.current=t},[t]),m(()=>{if("undefined"==typeof window||!window.MiniApp)return;const t=window.MiniApp,i=t=>{t?.route===e&&r.current?.(t)};return t.on("didHide",i),()=>t.off("didHide",i)},[e])}function mt(e,t){const r=u(t);m(()=>{r.current=t},[t]),m(()=>{if("undefined"==typeof window||!window.MiniApp)return;const t=window.MiniApp,i=t=>{t?.route===e&&r.current?.(t)};return t.on("onTapAppBar",i),()=>t.off("onTapAppBar",i)},[e])}function yt(){return(e,t={},r={})=>{"number"!=typeof e?ct("navigate",{type:"native",action:"push",route:e,params:t,options:r}).catch(console.error):ct("navigate",{type:"native",action:"pop",delta:Math.abs(e)})}}function xt(e){const t=u(e);m(()=>{t.current=e},[e]),m(()=>{if("undefined"==typeof window||!window.MiniApp)return;const e=window.MiniApp,r=e=>{try{t.current?.(e)}catch(e){console.error("[useListenerScanQr error]",e)}};return e.on("scanQrResult",r),()=>e.off("scanQrResult",r)},[])}export{ht as App,je as Avatar,Ne as Badge,ae as Body,fe as BottomSheet,U as Button,J as ButtonGroup,Oe as Card,ze as Checkbox,He as CheckboxGroup,Te as Chip,Je as Dialog,re as Display,Ve as Divider,ke as Dropdown,ie as Headline,se as Input,oe as Label,Xe as List,Pe as ListItem,Qe as Modal,ot as NavigationBar,ve as PasswordInput,We as Radio,Le as RadioGroup,_e as SkeletonLoader,qe as Spinner,Be as Switch,at as TabBar,pe as Textarea,ne as Title,F as ToastContainer,tt as Tooltip,te as Typography,$ as VETCProvider,Y as borderRadius,N as colorAlias,R as colorGlobal,q as componentHeight,D as fontFamily,O as fontSize,j as fontWeight,P as letterSpacing,E as lineHeight,_ as shadow,V as spacing,X as textStyle,H as toast,ft as useAppPause,pt as useAppResume,Ke as useConfirm,bt as useDidHide,ut as useDidShow,xt as useListenerScanQr,yt as useNavigate,mt as useTapAppBar,W as useToast,A as vetcAntdTheme};
@@ -296,6 +296,11 @@
296
296
  --vetc-chip-info-border: var(--vetc-blue-50);
297
297
  --vetc-chip-info-text: var(--vetc-blue-70);
298
298
  --vetc-chip-info-filled-bg: var(--vetc-blue-50);
299
+ /* Neutral */
300
+ --vetc-chip-neutral-bg: var(--vetc-gray-05);
301
+ --vetc-chip-neutral-border: var(--vetc-gray-90);
302
+ --vetc-chip-neutral-text: var(--vetc-gray-90);
303
+ --vetc-chip-neutral-filled-bg: var(--vetc-gray-90);
299
304
 
300
305
  /* ── Card ───────────────────────────────── */
301
306
  --vetc-card-radius: var(--vetc-radius-xl);
@@ -343,6 +348,17 @@
343
348
  --vetc-tab-badge-size: 16px;
344
349
  --vetc-tab-badge-font-size: var(--vetc-font-size-2xs);
345
350
 
351
+ /* ── Badge ──────────────────────────────── */
352
+ --vetc-badge-dot-size: 8px;
353
+ --vetc-badge-size: 18px;
354
+ --vetc-badge-bg: var(--vetc-color-negative);
355
+ --vetc-badge-text: var(--vetc-white);
356
+ --vetc-badge-font-size: 12px;
357
+ --vetc-badge-font-weight: 700;
358
+ --vetc-badge-outline-width: 2px;
359
+ --vetc-badge-outline-color: var(--vetc-color-bg);
360
+ --vetc-badge-radius: var(--vetc-radius-pill);
361
+
346
362
  /* ── Bottom Sheet ───────────────────────── */
347
363
  --vetc-sheet-bg: var(--vetc-color-bg);
348
364
  --vetc-sheet-radius: var(--vetc-radius-xl);
@@ -369,17 +385,19 @@
369
385
  --vetc-btn-group-border-color: var(--vetc-color-border-variant);
370
386
  --vetc-btn-group-bg: var(--vetc-color-bg);
371
387
 
372
- --vetc-dialog-width: 344px;
388
+ --vetc-dialog-width: 480px;
373
389
  --vetc-dialog-radius: var(--vetc-radius-xl);
374
390
  --vetc-dialog-padding: var(--vetc-space-16);
375
391
  --vetc-dialog-overlay: var(--vetc-color-overlay);
376
392
  --vetc-dialog-bg: var(--vetc-color-bg);
377
- --vetc-dialog-image-height: 160px;
393
+ --vetc-dialog-image-size: 80px;
378
394
  --vetc-dialog-btn-gap: var(--vetc-space-8);
379
- --vetc-dialog-title-size: var(--vetc-font-size-base);
395
+ --vetc-dialog-title-size: var(--vetc-font-size-lg);
380
396
  --vetc-dialog-title-weight: var(--vetc-font-weight-semibold);
397
+ --vetc-dialog-title-line-height: 32px;
381
398
  --vetc-dialog-desc-size: var(--vetc-font-size-sm);
382
- --vetc-dialog-desc-color: var(--vetc-color-text-secondary);
399
+ --vetc-dialog-desc-line-height: 20px;
400
+ --vetc-dialog-desc-color: var(--vetc-color-text-primary);
383
401
 
384
402
  /* ── Divider ────────────────────────────── */
385
403
  --vetc-divider-color: var(--vetc-color-border-variant);
@@ -411,7 +429,26 @@
411
429
  --vetc-spinner-size-lg: 40px;
412
430
 
413
431
  /* ── Toast ──────────────────────────────── */
414
- --vetc-toast-radius: var(--vetc-radius-md);
432
+ --vetc-toast-radius: var(--vetc-radius-lg);
433
+ --vetc-toast-shadow: var(--vetc-shadow-md);
434
+ --vetc-toast-bg: var(--vetc-color-bg-inverse);
435
+ --vetc-toast-positive-bg: var(--vetc-color-positive);
436
+ --vetc-toast-negative-bg: var(--vetc-color-negative);
437
+ --vetc-toast-text: var(--vetc-color-text-on-inverse);
438
+ --vetc-toast-divider: rgba(255, 255, 255, 0.2);
439
+
440
+ /* ── Tooltip ────────────────────────────── */
441
+ --vetc-tooltip-bg: var(--vetc-color-bg-inverse);
442
+ --vetc-tooltip-text: var(--vetc-color-text-on-inverse);
443
+ --vetc-tooltip-radius: var(--vetc-radius-xs);
444
+ --vetc-tooltip-shadow: var(--vetc-shadow-md);
445
+ --vetc-tooltip-font-size: var(--vetc-font-size-xs);
446
+ --vetc-tooltip-line-height: 16px;
447
+ --vetc-tooltip-min-height: 26px;
448
+ --vetc-tooltip-min-width: 160px;
449
+ --vetc-tooltip-close-size: 32px;
450
+ --vetc-tooltip-divider: rgba(255, 255, 255, 0.2);
451
+ --vetc-tooltip-arrow-size: 6px;
415
452
 
416
453
  /* ── Transitions ────────────────────────── */
417
454
  --vetc-transition-fast: 150ms ease;
@@ -440,6 +477,15 @@
440
477
  .safe-left { padding-left: var(--safe-area-inset-left, 0px); }
441
478
  .safe-right { padding-right: var(--safe-area-inset-right, 0px); }
442
479
 
480
+ /* ════════════════════════════════════════════════════════════
481
+ COMPONENT SAFE AREA OVERRIDES
482
+ ════════════════════════════════════════════════════════════ */
483
+
484
+ /* Bottom sheet floats 8px above screen edge + OS home indicator */
485
+ .vetc-bottom-sheet {
486
+ bottom: calc(8px + var(--safe-area-inset-bottom, 0px));
487
+ }
488
+
443
489
  /* ════════════════════════════════════════════════════════════
444
490
  9. BASE RESET
445
491
  ════════════════════════════════════════════════════════════ */
@@ -468,11 +514,6 @@
468
514
  background-color: var(--vetc-input-bg) !important;
469
515
  }
470
516
 
471
- /* Select — remove mobile tap highlight */
472
- .ant-select-selector {
473
- -webkit-tap-highlight-color: transparent !important;
474
- }
475
-
476
517
  /* Fix browser autofill background (Chrome/Safari) */
477
518
  .ant-input:-webkit-autofill,
478
519
  .ant-input:-webkit-autofill:hover,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vetc-miniapp/ui-react",
3
- "version": "0.0.33",
3
+ "version": "0.0.35",
4
4
  "description": "MiniApp Platform UI React",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -1,29 +0,0 @@
1
- /**
2
- * VETC Select — tokenized
3
- */
4
- import React from 'react';
5
- import type { DefaultOptionType } from 'antd/es/select';
6
- export type SelectOption = DefaultOptionType;
7
- export interface SelectProps {
8
- label?: string;
9
- placeholder?: string;
10
- value?: string | string[] | number | number[];
11
- defaultValue?: string | string[] | number | number[];
12
- options?: SelectOption[];
13
- helperText?: string;
14
- error?: string;
15
- disabled?: boolean;
16
- multiple?: boolean;
17
- searchable?: boolean;
18
- allowClear?: boolean;
19
- loading?: boolean;
20
- onChange?: (value: any, option: any) => void;
21
- onSearch?: (value: string) => void;
22
- id?: string;
23
- className?: string;
24
- style?: React.CSSProperties;
25
- required?: boolean;
26
- popupMatchSelectWidth?: boolean;
27
- }
28
- export declare function Select({ label, placeholder, value, defaultValue, options, helperText, error, disabled, multiple, searchable, allowClear, loading, onChange, onSearch, id, className, style, required, popupMatchSelectWidth, }: SelectProps): import("react/jsx-runtime").JSX.Element;
29
- export default Select;
@@ -1,2 +0,0 @@
1
- export { Select } from './Select';
2
- export type { SelectProps, SelectOption } from './Select';