@ceed/ads 0.0.155-3 → 0.0.155
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/CurrencyInput/CurrencyInput.d.ts +1 -0
- package/dist/components/DataTable/DataTable.d.ts +4 -118
- package/dist/components/MonthPicker/MonthPicker.d.ts +24 -0
- package/dist/components/MonthPicker/index.d.ts +3 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/framer/index.js +34 -34
- package/package.json +2 -3
|
@@ -16,6 +16,7 @@ interface CurrencyInputProps {
|
|
|
16
16
|
label?: React.ReactNode;
|
|
17
17
|
error?: boolean;
|
|
18
18
|
helperText?: React.ReactNode;
|
|
19
|
+
useMinorUnit?: boolean;
|
|
19
20
|
}
|
|
20
21
|
declare const CurrencyInput: React.ForwardRefExoticComponent<Omit<CurrencyInputProps & {
|
|
21
22
|
component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
@@ -1,137 +1,23 @@
|
|
|
1
1
|
import React, { ComponentProps, ReactNode } from "react";
|
|
2
|
-
import { Link } from "@mui/joy";
|
|
3
2
|
import { Table } from "../Table";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import Input from "../Input";
|
|
7
|
-
import Textarea from "../Textarea";
|
|
8
|
-
import Chip from "../Chip";
|
|
9
|
-
import Autocomplete from "../Autocomplete";
|
|
10
|
-
import Select from "../Select";
|
|
11
|
-
export type RenderCellHandler<T extends Record<string, V>, V = unknown> = (params: {
|
|
12
|
-
row: T;
|
|
13
|
-
value?: V;
|
|
14
|
-
id: string;
|
|
15
|
-
}) => ReactNode;
|
|
16
|
-
export type CellEditStartEvent<T extends Record<string, V>, V = unknown> = (params: {
|
|
17
|
-
originalRow: T;
|
|
18
|
-
row: T;
|
|
19
|
-
value?: V;
|
|
20
|
-
id: string;
|
|
21
|
-
}) => void;
|
|
22
|
-
export type CellEditStopEvent<T extends Record<string, V>, V = unknown> = (params: {
|
|
23
|
-
originalRow: T;
|
|
24
|
-
row: T;
|
|
25
|
-
value?: V;
|
|
26
|
-
id: string;
|
|
27
|
-
}) => void;
|
|
28
|
-
type BaseColumnDef<T extends Record<string, V>, V = unknown> = {
|
|
3
|
+
export type ColumnDef<T extends Record<string, V>, V = unknown> = {
|
|
4
|
+
type?: "number" | "string" | "date";
|
|
29
5
|
field: keyof T;
|
|
30
6
|
headerName?: string;
|
|
31
7
|
width?: string;
|
|
32
8
|
minWidth?: string;
|
|
33
9
|
maxWidth?: string;
|
|
34
10
|
resizable?: boolean;
|
|
35
|
-
renderCell?:
|
|
36
|
-
isCellEditable?: ((params: {
|
|
11
|
+
renderCell?: (params: {
|
|
37
12
|
row: T;
|
|
38
13
|
value?: V;
|
|
39
14
|
id: string;
|
|
40
|
-
}) =>
|
|
41
|
-
onCellEditStart?: CellEditStartEvent<T, V>;
|
|
42
|
-
onCellEditStop?: CellEditStopEvent<T, V>;
|
|
15
|
+
}) => ReactNode;
|
|
43
16
|
};
|
|
44
|
-
type AutocompleteColumnDef<T extends Record<string, V>, V = unknown> = BaseColumnDef<T, V> & {
|
|
45
|
-
type: "autocomplete";
|
|
46
|
-
componentProps?: ComponentProps<typeof Autocomplete> | ((params: {
|
|
47
|
-
row: T;
|
|
48
|
-
value?: V;
|
|
49
|
-
id: string;
|
|
50
|
-
}) => ComponentProps<typeof Autocomplete>);
|
|
51
|
-
};
|
|
52
|
-
type CurrencyColumnDef<T extends Record<string, V>, V = unknown> = BaseColumnDef<T, V> & {
|
|
53
|
-
type: "currency";
|
|
54
|
-
componentProps?: ComponentProps<typeof CurrencyInput> | ((params: {
|
|
55
|
-
row: T;
|
|
56
|
-
value?: V;
|
|
57
|
-
id: string;
|
|
58
|
-
}) => ComponentProps<typeof CurrencyInput>);
|
|
59
|
-
};
|
|
60
|
-
type DateColumnDef<T extends Record<string, V>, V = unknown> = BaseColumnDef<T, V> & {
|
|
61
|
-
type: "date";
|
|
62
|
-
componentProps?: ComponentProps<typeof DatePicker> | ((params: {
|
|
63
|
-
row: T;
|
|
64
|
-
value?: V;
|
|
65
|
-
id: string;
|
|
66
|
-
}) => ComponentProps<typeof DatePicker>);
|
|
67
|
-
};
|
|
68
|
-
type NumberColumnDef<T extends Record<string, V>, V = unknown> = BaseColumnDef<T, V> & {
|
|
69
|
-
type: "number";
|
|
70
|
-
componentProps?: ComponentProps<typeof Input> | ((params: {
|
|
71
|
-
row: T;
|
|
72
|
-
value?: V;
|
|
73
|
-
id: string;
|
|
74
|
-
}) => ComponentProps<typeof Input>);
|
|
75
|
-
};
|
|
76
|
-
type TextColumnDef<T extends Record<string, V>, V = unknown> = BaseColumnDef<T, V> & {
|
|
77
|
-
type: "text";
|
|
78
|
-
componentProps?: ComponentProps<typeof Input> | ((params: {
|
|
79
|
-
row: T;
|
|
80
|
-
value?: V;
|
|
81
|
-
id: string;
|
|
82
|
-
}) => ComponentProps<typeof Input>);
|
|
83
|
-
};
|
|
84
|
-
type LongTextColumnDef<T extends Record<string, V>, V = unknown> = BaseColumnDef<T, V> & {
|
|
85
|
-
type: "longText";
|
|
86
|
-
componentProps?: ComponentProps<typeof Textarea> | ((params: {
|
|
87
|
-
row: T;
|
|
88
|
-
value?: V;
|
|
89
|
-
id: string;
|
|
90
|
-
}) => ComponentProps<typeof Textarea>);
|
|
91
|
-
};
|
|
92
|
-
type SelectColumnDef<T extends Record<string, V>, V = unknown> = BaseColumnDef<T, V> & {
|
|
93
|
-
type: "select";
|
|
94
|
-
componentProps?: ComponentProps<typeof Select<string, false>> | ((params: {
|
|
95
|
-
row: T;
|
|
96
|
-
value?: V;
|
|
97
|
-
id: string;
|
|
98
|
-
}) => ComponentProps<typeof Select<string, false>>);
|
|
99
|
-
};
|
|
100
|
-
type MultiSelectColumnDef<T extends Record<string, V>, V = unknown> = BaseColumnDef<T, V> & {
|
|
101
|
-
type: "multiSelect";
|
|
102
|
-
componentProps?: ComponentProps<typeof Select<string, true>> | ((params: {
|
|
103
|
-
row: T;
|
|
104
|
-
value?: V;
|
|
105
|
-
id: string;
|
|
106
|
-
}) => ComponentProps<typeof Select<string, true>>);
|
|
107
|
-
};
|
|
108
|
-
type LinkColumnDef<T extends Record<string, V>, V = unknown, C extends React.ElementType = typeof Link> = BaseColumnDef<T, V> & {
|
|
109
|
-
type: "link";
|
|
110
|
-
component?: C;
|
|
111
|
-
componentProps?: ComponentProps<C> | ((params: {
|
|
112
|
-
row: T;
|
|
113
|
-
value?: V;
|
|
114
|
-
id: string;
|
|
115
|
-
}) => ComponentProps<C>);
|
|
116
|
-
};
|
|
117
|
-
type ChipColumnDef<T extends Record<string, V>, V = unknown> = BaseColumnDef<T, V> & {
|
|
118
|
-
type: "chip";
|
|
119
|
-
componentProps?: ComponentProps<typeof Chip> | ((params: {
|
|
120
|
-
row: T;
|
|
121
|
-
value?: V;
|
|
122
|
-
id: string;
|
|
123
|
-
}) => ComponentProps<typeof Chip>);
|
|
124
|
-
};
|
|
125
|
-
type OtherColumnDef<T extends Record<string, V>, V = unknown> = BaseColumnDef<T, V> & {
|
|
126
|
-
type?: "string";
|
|
127
|
-
componentProps?: {};
|
|
128
|
-
};
|
|
129
|
-
export type ColumnDef<T extends Record<string, V>, V = unknown> = AutocompleteColumnDef<T, V> | CurrencyColumnDef<T, V> | DateColumnDef<T, V> | NumberColumnDef<T, V> | TextColumnDef<T, V> | LongTextColumnDef<T, V> | LinkColumnDef<T, V> | ChipColumnDef<T, V> | SelectColumnDef<T, V> | MultiSelectColumnDef<T, V> | OtherColumnDef<T, V>;
|
|
130
17
|
export type DataTableProps<T extends Record<string, unknown>> = {
|
|
131
18
|
rows: T[];
|
|
132
19
|
checkboxSelection?: boolean;
|
|
133
20
|
columns: ColumnDef<T>[];
|
|
134
|
-
editMode?: boolean;
|
|
135
21
|
/**
|
|
136
22
|
* 체크박스가 있는 경우, 체크박스를 클릭했을 때 선택된 row의 index를 지정한다.
|
|
137
23
|
*/
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Input from "../Input";
|
|
3
|
+
interface BaseMonthPickerProps {
|
|
4
|
+
value?: string;
|
|
5
|
+
onChange?: (event: {
|
|
6
|
+
target: {
|
|
7
|
+
name?: string;
|
|
8
|
+
value: string;
|
|
9
|
+
};
|
|
10
|
+
}) => void;
|
|
11
|
+
name?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
label?: React.ReactNode;
|
|
15
|
+
error?: boolean;
|
|
16
|
+
helperText?: React.ReactNode;
|
|
17
|
+
minDate?: string;
|
|
18
|
+
maxDate?: string;
|
|
19
|
+
disableFuture?: boolean;
|
|
20
|
+
disablePast?: boolean;
|
|
21
|
+
}
|
|
22
|
+
type MonthPickerProps = BaseMonthPickerProps & Omit<React.ComponentProps<typeof Input>, "onChange">;
|
|
23
|
+
declare const MonthPicker: React.ForwardRefExoticComponent<Omit<MonthPickerProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
24
|
+
export { MonthPicker };
|
|
@@ -30,6 +30,7 @@ export { Input } from "./Input";
|
|
|
30
30
|
export { Markdown } from './Markdown';
|
|
31
31
|
export { Menu, MenuButton, MenuItem } from "./Menu";
|
|
32
32
|
export { Modal, ModalClose, ModalDialog, ModalOverflow, ModalFrame, } from "./Modal";
|
|
33
|
+
export { MonthPicker } from './MonthPicker';
|
|
33
34
|
export { MonthRangePicker } from "./MonthRangePicker";
|
|
34
35
|
export { Radio, RadioGroup } from "./Radio";
|
|
35
36
|
export { RadioList } from "./RadioList";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { useTheme, useColorScheme, useThemeProps, alertClasses, boxClasses, buttonClasses, checkboxClasses, dividerClasses, iconButtonClasses, inputClasses, menuClasses, menuButtonClasses, menuItemClasses, optionClasses, radioClasses, radioGroupClasses, selectClasses, switchClasses, tableClasses, textareaClasses, typographyClasses, formControlClasses, formLabelClasses, formHelperTextClasses, gridClasses, stackClasses, sheetClasses, modalClasses, modalCloseClasses, modalDialogClasses, modalOverflowClasses, dialogTitleClasses, dialogContentClasses, dialogActionsClasses, tooltipClasses, tabsClasses, tabListClasses, tabPanelClasses, accordionClasses, accordionDetailsClasses, accordionGroupClasses as accordionsClasses, accordionSummaryClasses, AutocompleteListbox, AutocompleteOption, autocompleteClasses, autocompleteListboxClasses, autocompleteOptionClasses, Avatar, avatarClasses, AvatarGroup, avatarGroupClasses, AspectRatio, aspectRatioClasses, Badge, badgeClasses, breadcrumbsClasses, cardClasses, cardActionsClasses, cardContentClasses, cardCoverClasses, cardOverflowClasses, chipClasses, CircularProgress, circularProgressClasses, Drawer, drawerClasses, LinearProgress, linearProgressClasses, List, listClasses, ListDivider, listDividerClasses, ListItem, listItemClasses, ListItemButton, listItemButtonClasses, ListItemContent, listItemContentClasses, ListItemDecorator, listItemDecoratorClasses, ListSubheader, listSubheaderClasses, Link, linkClasses, Slider, sliderClasses, Step, stepClasses, StepButton, stepButtonClasses, StepIndicator, Stepper, stepperClasses, Skeleton, skeletonClasses, } from "@mui/joy";
|
|
2
|
-
export { Accordion, Accordions, Alert, Autocomplete, AccordionDetails, AccordionSummary, Box, Breadcrumbs, Button, Calendar, Card, CardActions, CardContent, CardCover, CardOverflow, Checkbox, Chip, Container, CurrencyInput, DataTable, DatePicker, DateRangePicker, DialogActions, DialogContent, DialogTitle, DialogFrame, Divider, Dropdown, InsetDrawer, Uploader, FormControl, FormHelperText, FormLabel, Grid, IconButton, Input, Markdown, Menu, MenuButton, MenuItem, Modal, ModalClose, ModalDialog, ModalOverflow, ModalFrame, MonthRangePicker, Radio, RadioGroup, RadioList, Select, Option, Sheet, Stack, Switch, Table, TableHead, TableBody, Tabs, Tab, TabList, TabPanel, Textarea, ThemeProvider, Tooltip, Typography, } from "./components";
|
|
2
|
+
export { Accordion, Accordions, Alert, Autocomplete, AccordionDetails, AccordionSummary, Box, Breadcrumbs, Button, Calendar, Card, CardActions, CardContent, CardCover, CardOverflow, Checkbox, Chip, Container, CurrencyInput, DataTable, DatePicker, DateRangePicker, DialogActions, DialogContent, DialogTitle, DialogFrame, Divider, Dropdown, InsetDrawer, Uploader, FormControl, FormHelperText, FormLabel, Grid, IconButton, Input, Markdown, Menu, MenuButton, MenuItem, Modal, ModalClose, ModalDialog, ModalOverflow, ModalFrame, MonthPicker, MonthRangePicker, Radio, RadioGroup, RadioList, Select, Option, Sheet, Stack, Switch, Table, TableHead, TableBody, Tabs, Tab, TabList, TabPanel, Textarea, ThemeProvider, Tooltip, Typography, } from "./components";
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useTheme as Zf,useColorScheme as Xf,useThemeProps as Qf,alertClasses as Kf,boxClasses as eh,buttonClasses as oh,checkboxClasses as th,dividerClasses as rh,iconButtonClasses as nh,inputClasses as ah,menuClasses as ih,menuButtonClasses as lh,menuItemClasses as sh,optionClasses as ph,radioClasses as mh,radioGroupClasses as dh,selectClasses as ch,switchClasses as uh,tableClasses as gh,textareaClasses as fh,typographyClasses as hh,formControlClasses as Ch,formLabelClasses as yh,formHelperTextClasses as bh,gridClasses as xh,stackClasses as vh,sheetClasses as Dh,modalClasses as kh,modalCloseClasses as Mh,modalDialogClasses as Th,modalOverflowClasses as Ph,dialogTitleClasses as wh,dialogContentClasses as Ih,dialogActionsClasses as Ah,tooltipClasses as Fh,tabsClasses as Bh,tabListClasses as Vh,tabPanelClasses as Sh,accordionClasses as Nh,accordionDetailsClasses as Lh,accordionGroupClasses as Eh,accordionSummaryClasses as Hh,AutocompleteListbox as zh,AutocompleteOption as Oh,autocompleteClasses as Jh,autocompleteListboxClasses as Yh,autocompleteOptionClasses as Rh,Avatar as $h,avatarClasses as Wh,AvatarGroup as Uh,avatarGroupClasses as qh,AspectRatio as Gh,aspectRatioClasses as _h,Badge as jh,badgeClasses as Zh,breadcrumbsClasses as Xh,cardClasses as Qh,cardActionsClasses as Kh,cardContentClasses as eC,cardCoverClasses as oC,cardOverflowClasses as tC,chipClasses as rC,CircularProgress as nC,circularProgressClasses as aC,Drawer as iC,drawerClasses as lC,LinearProgress as sC,linearProgressClasses as pC,List as mC,listClasses as dC,ListDivider as cC,listDividerClasses as uC,ListItem as gC,listItemClasses as fC,ListItemButton as hC,listItemButtonClasses as CC,ListItemContent as yC,listItemContentClasses as bC,ListItemDecorator as xC,listItemDecoratorClasses as vC,ListSubheader as DC,listSubheaderClasses as kC,Link as MC,linkClasses as TC,Slider as PC,sliderClasses as wC,Step as IC,stepClasses as AC,StepButton as FC,stepButtonClasses as BC,StepIndicator as VC,Stepper as SC,stepperClasses as NC,Skeleton as LC,skeletonClasses as EC}from"@mui/joy";import re from"react";import{AccordionGroup as ar,Accordion as ir,AccordionSummary as lr,AccordionDetails as sr}from"@mui/joy";import{motion as ze}from"framer-motion";var pr=ze(lr),Oe=pr;Oe.displayName="AccordionSummary";var mr=ze(sr),Je=mr;Je.displayName="AccordionDetails";var dr=ze(ir);function Ye(e){let{summary:o,details:t,variant:n,color:l,...a}=e,r=n==="solid"?"solid":void 0;return re.createElement(dr,{variant:r,color:l,...a},re.createElement(Oe,{variant:r,color:l},o),re.createElement(Je,{variant:r,color:l},t))}Ye.displayName="Accordion";var cr=ze(ar);function co(e){let{variant:o,color:t,items:n,...l}=e;return re.createElement(cr,{variant:o,color:t,...l},n.map((a,r)=>re.createElement(Ye,{key:r,summary:a.summary,details:a.details,index:r,variant:o,color:t})))}co.displayName="Accordions";import Re from"react";import{Alert as xr,styled as vr}from"@mui/joy";import{motion as Dr}from"framer-motion";import ur from"react";import{Typography as gr}from"@mui/joy";import{motion as fr}from"framer-motion";var hr=fr(gr),J=e=>ur.createElement(hr,{...e});J.displayName="Typography";var V=J;import{Stack as Cr}from"@mui/joy";import{motion as yr}from"framer-motion";var br=yr(Cr),ne=br;ne.displayName="Stack";var E=ne;var kr=vr(Dr(xr))({alignItems:"flex-start",fontWeight:"unset"});function uo(e){let{title:o,content:t,actions:n,color:l="primary",...a}=e,r=e.invertedColors||e.variant==="solid";return Re.createElement(kr,{...a,color:l,endDecorator:n,invertedColors:r},Re.createElement(E,null,o&&Re.createElement(V,{level:"title-sm",color:l},o),Re.createElement(V,{level:"body-sm",color:l},t)))}uo.displayName="Alert";import B,{useCallback as Nr,useEffect as Lr,useMemo as se,useRef as Er,useState as Hr}from"react";import{Autocomplete as zr,AutocompleteOption as Or,ListSubheader as Jr,AutocompleteListbox as Yr,ListItemDecorator as it,CircularProgress as Rr,styled as $r}from"@mui/joy";import{useVirtualizer as Wr}from"@tanstack/react-virtual";import{Popper as Ur}from"@mui/base";import{FormControl as Mr,styled as Tr}from"@mui/joy";import{motion as Pr}from"framer-motion";var wr=Tr(Pr(Mr))({width:"100%"}),ae=wr;ae.displayName="FormControl";var F=ae;import{FormLabel as Ir}from"@mui/joy";import{motion as Ar}from"framer-motion";var Fr=Ar(Ir),ie=Fr;ie.displayName="FormLabel";var H=ie;import{FormHelperText as Br}from"@mui/joy";import{motion as Vr}from"framer-motion";var Sr=Vr(Br),le=Sr;le.displayName="FormHelperText";var A=le;var qr=$r(Ur,{name:"Autocomplete",slot:"Popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Gr=B.forwardRef((e,o)=>{let{anchorEl:t,open:n,modifiers:l,children:a,ownerState:{loading:r,size:i="md"},...s}=e,d=Er(null),u=a[0].every(C=>C.hasOwnProperty("group")),m=r?[a[1]]:a[0].length===0?[a[2]]:u?a[0].flatMap(C=>[B.createElement(Jr,{key:C.key,component:"li"},C.group),...C.children]):a[0],y=Wr({count:m.length,estimateSize:()=>36,getScrollElement:()=>d.current,overscan:5}),c=y.getVirtualItems();return Lr(()=>{n&&y.measure()},[n]),B.createElement(qr,{ref:o,anchorEl:t,open:n,modifiers:l},B.createElement(Yr,{...s},B.createElement("div",{ref:d,style:{overflow:"auto"}},B.createElement("div",{style:{height:`${y.getTotalSize()}px`,position:"relative"}},c.map(({index:C,size:p,start:h})=>B.cloneElement(m[C],{style:{position:"absolute",top:0,left:0,width:"100%",fontSize:`var(--ceed-fontSize-${i})`,height:`${p}px`,transform:`translateY(${h}px)`},children:B.createElement("div",{style:{textOverflow:"ellipsis",textWrap:"nowrap",overflow:"hidden"}},m[C].props.children)}))))))});function $e(e){let{label:o,error:t,helperText:n,color:l,size:a,disabled:r,required:i,onChange:s,onChangeComplete:d,...u}=e,[m,y]=Hr(e.value||e.defaultValue),c=se(()=>e.options.map(g=>typeof g!="object"?{value:g,label:g}:g),[e.options]),C=se(()=>new Set(c.map(g=>g.value)),[e.options]),p=se(()=>e.loading?{value:"",label:"",startDecorator:B.createElement(Rr,{size:"sm",color:"neutral",variant:"plain",thickness:3})}:typeof m=="string"?c.find(g=>g.value===m)??m:m,[m,e.options,e.loading]),h=Nr(g=>B.isValidElement(g)&&!e.loading?B.cloneElement(g,{size:a}):g,[a,e.loading]),v=se(()=>h(p?.startDecorator||e.startDecorator),[p,h]),P=se(()=>h(p?.endDecorator||e.endDecorator),[p,h]),k=B.createElement(zr,{...u,required:i,onChange:(g,x)=>{y(x);let I=x;s?.({...g,target:{...g.target,value:I?.value}}),C.has(I.value)&&d?.({...g,target:{...g.target,value:I?.value}})},color:l,value:p,options:c,size:a,disabled:r,startDecorator:v,endDecorator:P,getOptionLabel:g=>`${g.value??""}`,slots:{listbox:Gr},renderOption:(g,x)=>B.createElement(Or,{...g},x.startDecorator&&B.createElement(it,{sx:{marginInlineEnd:"var(--Input-gap)"}},h(x.startDecorator)),h(x.label),x.endDecorator&&B.createElement(it,{sx:{marginInlineStart:"var(--Input-gap)"}},h(x.endDecorator))),renderGroup:g=>g});return o?B.createElement(F,{required:i,color:l,size:a,error:t,disabled:r},B.createElement(H,null,o),k,n&&B.createElement(A,null,n)):k}var lt=$e;import{Box as _r}from"@mui/joy";import{motion as jr}from"framer-motion";var Zr=jr(_r),pe=Zr;pe.displayName="Box";var We=pe;import Y from"react";import{Breadcrumbs as mt,Link as ln}from"@mui/joy";import go from"react";import{Menu as Xr,MenuButton as Qr,MenuItem as Kr}from"@mui/joy";import{motion as fo}from"framer-motion";var en=fo(Xr),me=e=>go.createElement(en,{...e});me.displayName="Menu";var on=fo(Qr),de=e=>go.createElement(on,{...e});de.displayName="MenuButton";var tn=fo(Kr),ce=e=>go.createElement(tn,{...e});ce.displayName="MenuItem";var st=me;import{Dropdown as rn}from"@mui/joy";import{motion as nn}from"framer-motion";var an=nn(rn),ue=an;ue.displayName="Dropdown";var pt=ue;function ho(e){let{crumbs:o,size:t,startCrumbCount:n=1,endCrumbCount:l=3,slots:{link:a,...r}={link:ln},slotProps:{link:i,...s}={link:{color:"neutral"}},collapsed:d=!0,...u}=e,m=h=>h.type==="link"&&a?Y.createElement(a,{to:h.linkHref,href:h.linkHref,...i},h.label):Y.createElement(V,null,h.label);if(!d)return Y.createElement(mt,{size:t,slots:r,slotProps:s,...u},o.map(h=>Y.createElement(m,{...h})));let y=Math.max(1,l),c=o.slice(0,n).map(h=>Y.createElement(m,{...h})),C=(n+y>o.length?o.slice(n):o.slice(-y)).map(h=>Y.createElement(m,{...h})),p=o.slice(n,-y).map(h=>Y.createElement(ce,null,Y.createElement(m,{...h})));return Y.createElement(mt,{size:t,slots:r,slotProps:s,...u},c,p.length&&Y.createElement(pt,null,Y.createElement(de,{size:t,variant:"plain"},"..."),Y.createElement(st,{size:t},p)),C)}ho.displayName="Breadcrumbs";import sn,{forwardRef as pn}from"react";import{Button as mn}from"@mui/joy";import{motion as dn}from"framer-motion";var cn=dn(mn),ge=pn((e,o)=>sn.createElement(cn,{ref:o,...e}));ge.displayName="Button";var w=ge;import b,{Fragment as he,forwardRef as vn,useMemo as yt}from"react";import{styled as $}from"@mui/joy";import Dn from"@mui/icons-material/esm/ChevronLeft.js";import kn from"@mui/icons-material/esm/ChevronRight.js";import{AnimatePresence as bt,motion as Mn}from"framer-motion";var dt=e=>{let o=[],t=new Date(e.getFullYear(),e.getMonth(),1),n=new Date(e.getFullYear(),e.getMonth()+1,0),l=Math.ceil((t.getDay()+1)/7),a=Math.ceil((n.getDate()+t.getDay())/7),r=1;for(let i=1;i<=a;i++){let s=[];for(let d=1;d<=7;d++)i===l&&d<t.getDay()+1||r>n.getDate()?s.push(void 0):(s.push(r),r++);o.push(s)}return o},ct=(e,o)=>e.toLocaleString(o,{year:"numeric"}),Co=(e,o)=>e.toLocaleString(o,{year:"numeric",month:"long"}),ut=(e,o)=>new Date(0,e).toLocaleString(o,{month:"short"}),gt=e=>{let o=new Date().getDay(),t=new Date;return t.setDate(t.getDate()-o),Array.from({length:7}).map(()=>{let n=t.toLocaleString(e,{weekday:"short"});return t.setDate(t.getDate()+1),n})},ft=e=>{let o=new Date,t=new Date(e);return t.setHours(0,0,0,0),o.setHours(0,0,0,0),t.getTime()===o.getTime()},yo=(e,o)=>{let t=new Date(e),n=new Date(o);return t.setHours(0,0,0,0),n.setHours(0,0,0,0),t.getTime()===n.getTime()},G=(e,o,t)=>{let n=new Date(t);n.setHours(0,0,0,0);let l=new Date(Math.min(e.getTime(),o.getTime())),a=new Date(Math.max(e.getTime(),o.getTime()));return n>=l&&n<=a},Ue=(e,o)=>e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth();import un from"react";import{IconButton as gn}from"@mui/joy";import{motion as fn}from"framer-motion";var hn=fn(gn),fe=e=>un.createElement(hn,{...e});fe.displayName="IconButton";var z=fe;import{useCallback as Cn,useMemo as yn,useState as qe}from"react";import{useThemeProps as bn}from"@mui/joy";var xn=(e,o)=>o.includes(e)?e:o[0],ht=e=>{let[o,t]=qe(()=>xn(e.view||"day",e.views||["day","month"])),[n,l]=qe(e.defaultValue),[a,r]=qe(()=>{let p=new Date;return p.setDate(1),p.setHours(0,0,0,0),e.value?.[0]||e.defaultValue?.[0]||p}),[[i,s],d]=qe([0,0]),u=e.view??o,m=p=>{d([i+p,p])},y=Cn(p=>{r(p),u==="month"?a.getFullYear()!==p.getFullYear()&&m(p>a?1:-1):m(p>a?1:-1),e.onMonthChange?.(p)},[e.onMonthChange,a,u]),c=bn({props:{locale:"default",views:["day","month"],view:u,value:e.value??n,...e,onChange:e.value?e.onChange:p=>{l(p),e.onChange?.(p)},onMonthChange:y,onViewChange:()=>{let p=u==="month"?"day":"month";!(!e.views||e.views.includes(p))||e.view===p||(e.onViewChange?e.onViewChange(p):t(p))}},name:"Calendar"}),C=yn(()=>({...c,viewMonth:a,direction:s}),[c,a,s]);return[c,C]};import{useCallback as ee,useState as Ct}from"react";var Ge=e=>{let[o,t]=Ct(null),[n,l]=Ct(null);return{calendarTitle:e.view==="month"?ct(e.viewMonth,e.locale||"default"):Co(e.viewMonth,e.locale||"default"),onPrev:ee(()=>{if(e.view==="day"){let a=new Date(e.viewMonth||new Date);a.setMonth(a.getMonth()-1),e.onMonthChange?.(a)}else if(e.view==="month"){let a=new Date(e.viewMonth||new Date);a.setFullYear(a.getFullYear()-1),e.onMonthChange?.(a)}},[e.onMonthChange,e.viewMonth,e.view]),onNext:ee(()=>{if(e.view==="day"){let a=new Date(e.viewMonth||new Date);a.setMonth(a.getMonth()+1),e.onMonthChange?.(a)}else if(e.view==="month"){let a=new Date(e.viewMonth||new Date);a.setFullYear(a.getFullYear()+1),e.onMonthChange?.(a)}},[e.onMonthChange,e.viewMonth,e.view]),getDayCellProps:ee(a=>{let r=new Date(e.viewMonth||new Date);r.setHours(0,0,0,0),r.setDate(a);let i=e.rangeSelection&&e.value&&e.value[0]&&(o&&G(e.value[0],o,r)||e.value[1]&&G(e.value[0],e.value[1],r));return{"aria-label":r.toLocaleDateString(),"aria-current":i?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,o]),getMonthCellProps:ee(a=>{let r=new Date(e.viewMonth||new Date);r.setDate(1),r.setHours(0,0,0,0),r.setMonth(a);let s=!e.views?.find(d=>d==="day")&&e.rangeSelection&&e.value&&e.value[0]&&(n&&G(e.value[0],n,r)||e.value[1]&&G(e.value[0],e.value[1],r));return{"aria-label":r.toLocaleDateString(),"aria-current":s?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,n]),getPickerDayProps:ee(a=>{let r=new Date(e.viewMonth||new Date);r.setHours(0,0,0,0),r.setDate(a);let i=!!e.value&&(yo(r,e.value[0])||e.value[1]&&yo(r,e.value[1])),s=e.rangeSelection&&e.value&&e.value[0]&&(o&&G(e.value[0],o,r)||e.value[1]&&G(e.value[0],e.value[1],r)),d=()=>{e.rangeSelection?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),r.getTime())),new Date(Math.max(e.value[0].getTime(),r.getTime()))]):e.onChange?.([r,void 0]):e.onChange?.([r,void 0]):e.onChange?.([r,void 0]),t(null)};return{isToday:ft(r),isSelected:i,onClick:d,onMouseEnter:e.rangeSelection&&e.value?.[0]&&!e.value?.[1]?()=>t(r):void 0,disabled:e.minDate&&r<e.minDate||e.maxDate&&r>e.maxDate||e.disableFuture&&r>new Date||e.disablePast&&r<(()=>{let u=new Date;return u.setHours(0,0,0,0),u})(),tabIndex:-1,"aria-label":r.toLocaleDateString(),"aria-selected":i?"true":void 0,"aria-current":s?"date":void 0}},[e.onChange,e.value,e.viewMonth,e.rangeSelection,e.minDate,e.maxDate,e.disableFuture,e.disablePast,o]),getPickerMonthProps:ee(a=>{let r=new Date(e.viewMonth||new Date);r.setDate(1),r.setHours(0,0,0,0),r.setMonth(a);let i=!e.views?.find(m=>m==="day")&&e.rangeSelection,s=!!e.value&&(Ue(r,e.value[0])||e.value[1]&&Ue(r,e.value[1])),d=i&&e.value&&e.value[0]&&(n&&G(e.value[0],n,r)||e.value[1]&&G(e.value[0],e.value[1],r)),u=()=>{i?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),r.getTime())),new Date(Math.max(e.value[0].getTime(),r.getTime()))]):e.onChange?.([r,void 0]):e.onChange?.([r,void 0]):(e.onViewChange?.("day"),e.onMonthChange?.(r)),l(null)};return{isSelected:s,onMouseEnter:i&&e.value?.[0]&&!e.value?.[1]?()=>l(r):void 0,disabled:e.minDate&&(()=>{let m=new Date(r);return m.setMonth(m.getMonth()+1),m.setDate(0),m<e.minDate})()||e.maxDate&&(()=>{let m=new Date(r);return m.setDate(0),m>e.maxDate})()||e.disableFuture&&r>new Date||e.disablePast&&r<new Date&&!Ue(r,new Date),onClick:u,tabIndex:-1,"aria-label":Co(r,e.locale||"default"),"aria-selected":s?"true":void 0,"aria-current":d?"date":void 0}},[e.onMonthChange,e.onViewChange,e.onChange,e.viewMonth,e.locale,e.value,e.minDate,e.maxDate,e.disableFuture,e.disablePast,n])}};var Tn=$("div",{name:"Calendar",slot:"root"})({maxWidth:"264px"}),Pn=$("div",{name:"Calendar",slot:"calendarHeader"})(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:e.spacing(1)})),xt=$("div",{name:"Calendar",slot:"viewContainer"})(({theme:e,calendarType:o})=>({paddingLeft:e.spacing(1),paddingRight:e.spacing(1),position:"relative",overflow:"hidden",minHeight:o==="datePicker"?"250px":"unset"})),vt=$(Mn.table,{name:"Calendar",slot:"viewTable"})(({theme:e})=>({borderSpacing:0,"& td, & th":{padding:0},"& th":{paddingTop:e.spacing(1),paddingBottom:e.spacing(1)}})),wn=$("thead",{name:"Calendar",slot:"weekHeaderContainer"})({}),In=$("tbody",{name:"Calendar",slot:"dayPickerContainer"})({}),An=$(w,{name:"Calendar",slot:"switchViewButton"})(({ownerState:e})=>[e.view==="month"&&{pointerEvents:"none"}]),Fn=$("td",{name:"Calendar",slot:"dayCell"})(({theme:e})=>({"&[aria-current=date]":{position:"relative","& button[aria-current=date]:not([aria-selected=true]):not(:hover):not(:active)":{backgroundColor:`rgb(${e.palette.primary.lightChannel})`},'& + td[aria-hidden] + td[aria-current="date"]::before':{content:'""',position:"absolute",top:0,left:"-10px",bottom:0,width:"16px",backgroundColor:`rgb(${e.palette.primary.lightChannel})`,zIndex:-1}}})),Bn=$("td",{name:"Calendar",slot:"monthCell"})(({theme:e})=>({"&[aria-current=date]":{position:"relative","& button[aria-current=date]:not([aria-selected=true]):not(:hover):not(:active)":{backgroundColor:`rgb(${e.palette.primary.lightChannel})`},'& + td[aria-hidden] + td[aria-current="date"]::before':{content:'""',position:"absolute",top:0,left:"-10px",bottom:0,width:"16px",backgroundColor:`rgb(${e.palette.primary.lightChannel})`,zIndex:-1}}})),Vn=$(w,{name:"Calendar",slot:"month"})(({theme:e,isSelected:o,disabled:t})=>[{width:"59px",textAlign:"center","&:hover":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softHoverBg},"&:active":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softActiveBg}},o&&{backgroundColor:e.palette.primary.solidBg,color:e.palette.primary.solidColor,"&:hover":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidHoverBg},"&:active":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidActiveBg}},t&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),Sn=$(w,{name:"Calendar",slot:"day"})(({theme:e,isToday:o,isSelected:t,disabled:n})=>[{width:"32px",height:"32px",textAlign:"center","&:hover":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softHoverBg},"&:active":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softActiveBg}},o&&!t&&{"&:not([aria-current=date]):not(:hover)":{border:`1px solid ${e.palette.neutral.outlinedBorder}`}},t&&{backgroundColor:e.palette.primary.solidBg,color:e.palette.primary.solidColor,"&:hover":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidHoverBg},"&:active":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidActiveBg}},n&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),Dt={enter:e=>({x:e>0?300:-300,opacity:0}),center:{position:"relative",zIndex:1,x:0,opacity:1},exit:e=>({position:"absolute",zIndex:0,x:e<0?300:-300,opacity:0})},_e=1e4,kt=(e,o)=>Math.abs(e)*o,Nn=e=>{let{ownerState:o}=e,{getPickerDayProps:t,getDayCellProps:n}=Ge(o),l=yt(()=>dt(o.viewMonth),[o.viewMonth]),a=yt(()=>gt(o.locale||"default"),[o.locale]);return b.createElement(xt,{calendarType:"datePicker"},b.createElement(bt,{initial:!1,custom:o.direction},b.createElement(vt,{key:`${o.viewMonth.toString()}_${o.direction}`,custom:o.direction,variants:Dt,initial:"enter",animate:"center",exit:"exit",transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}},drag:"x",dragConstraints:{left:0,right:0},dragElastic:1,onDragEnd:(r,{offset:i,velocity:s})=>{let d=kt(i.x,s.x);if(d<-_e){let u=new Date(o.viewMonth||new Date);u.setMonth(u.getMonth()+1),o.onMonthChange?.(u)}else if(d>_e){let u=new Date(o.viewMonth||new Date);u.setMonth(u.getMonth()-1),o.onMonthChange?.(u)}}},b.createElement(wn,null,b.createElement("tr",null,a.map((r,i)=>b.createElement(b.Fragment,null,b.createElement("th",null,b.createElement(V,{level:"body-xs",textAlign:"center"},r)),i<6&&b.createElement("th",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"}))))),b.createElement(In,null,l.map((r,i)=>b.createElement(he,{key:`${o.viewMonth}_${i}`},b.createElement("tr",null,r.map((s,d)=>s?b.createElement(he,{key:d},b.createElement(Fn,{...n(s)},b.createElement(Sn,{size:"sm",variant:"plain",color:"neutral",...t(s)},s)),d<6&&b.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})):b.createElement(he,{key:d},b.createElement("td",null),d<6&&b.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})))),i<l.length-1&&b.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},b.createElement("td",{colSpan:13,style:{height:4}}))))))))},Ln=e=>{let{ownerState:o}=e,{getPickerMonthProps:t,getMonthCellProps:n}=Ge(o),l=Array.from({length:12},(r,i)=>i).reduce((r,i)=>(r[r.length-1].length===4&&r.push([]),r[r.length-1].push(i),r),[[]]),a=!o.views?.find(r=>r==="day")&&o.rangeSelection;return b.createElement(xt,{calendarType:a?"monthPicker":"datePicker"},b.createElement(bt,{initial:!1,custom:o.direction},b.createElement(vt,{key:`${o.viewMonth.getFullYear()}_${o.direction}`,custom:o.direction,variants:Dt,initial:"enter",animate:"center",exit:"exit",transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}},drag:"x",dragConstraints:{left:0,right:0},dragElastic:1,onDragEnd:(r,{offset:i,velocity:s})=>{let d=kt(i.x,s.x);if(d<-_e){let u=new Date(o.viewMonth||new Date);u.setMonth(u.getMonth()+1),o.onMonthChange?.(u)}else if(d>_e){let u=new Date(o.viewMonth||new Date);u.setMonth(u.getMonth()-1),o.onMonthChange?.(u)}}},b.createElement("tbody",null,l.map((r,i)=>b.createElement(he,{key:i},b.createElement("tr",null,r.map((s,d)=>b.createElement(he,{key:s},b.createElement(Bn,{...n(s)},b.createElement(Vn,{size:"sm",variant:"plain",color:"neutral",...t(s)},ut(s,o.locale))),d<3&&b.createElement("td",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"})))),i<l.length-1&&b.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},b.createElement("td",{colSpan:7,style:{height:4}}))))))))},Ce=vn((e,o)=>{let[t,n]=ht(e),{value:l,defaultValue:a,onChange:r,locale:i,onViewChange:s,onMonthChange:d,view:u,views:m,rangeSelection:y,...c}=t,{calendarTitle:C,onPrev:p,onNext:h}=Ge(n);return b.createElement(Tn,{ref:o,...c},b.createElement(Pn,null,b.createElement(z,{size:"sm",onClick:p},b.createElement(Dn,null)),b.createElement(An,{ownerState:n,variant:"plain",color:"neutral",onClick:s},C),b.createElement(z,{size:"sm",onClick:h},b.createElement(kn,null))),u==="day"&&b.createElement(Nn,{ownerState:n}),u==="month"&&b.createElement(Ln,{ownerState:n}))});Ce.displayName="Calendar";var oe=Ce;import{Card as En,CardContent as Hn,CardCover as zn,CardActions as On,CardOverflow as Jn}from"@mui/joy";import{motion as ye}from"framer-motion";var Yn=ye(En),be=Yn;be.displayName="Card";var Rn=ye(Hn),bo=Rn;bo.displayName="CardContent";var $n=ye(zn),xo=$n;xo.displayName="CardCover";var Wn=ye(On),vo=Wn;vo.displayName="CardActions";var Un=ye(Jn),Do=Un;Do.displayName="CardOverflow";import qn from"react";import{Checkbox as Gn}from"@mui/joy";import{motion as _n}from"framer-motion";var jn=_n(Gn),xe=e=>qn.createElement(jn,{...e});xe.displayName="Checkbox";var ve=xe;import{Chip as Zn}from"@mui/joy";import{motion as Xn}from"framer-motion";var Qn=Xn(Zn),De=Qn;De.displayName="Chip";var Mt=De;import{styled as Kn}from"@mui/joy";import ea,{forwardRef as oa}from"react";var ta=Kn("div",{name:"Container",slot:"root",shouldForwardProp:e=>e!=="maxWidth"})(({theme:e,maxWidth:o="lg"})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block",paddingLeft:e.spacing(2),paddingRight:e.spacing(2),...o==="sm"&&{[e.breakpoints.up("xs")]:{maxWidth:e.breakpoints.values.sm}},...o==="md"&&{[e.breakpoints.up("sm")]:{maxWidth:e.breakpoints.values.md}},...o==="lg"&&{[e.breakpoints.up("md")]:{maxWidth:e.breakpoints.values.lg}},...o==="xl"&&{[e.breakpoints.up("lg")]:{maxWidth:e.breakpoints.values.xl}}})),ko=oa(function(o,t){return ea.createElement(ta,{ref:t,...o})});ko.displayName="Container";import _,{useCallback as ia,useState as wt}from"react";import{IntlMessageFormat as la}from"intl-messageformat";import{NumericFormat as sa}from"react-number-format";import pa from"@mui/icons-material/esm/InfoOutlined.js";import ke from"react";import{Input as ra}from"@mui/joy";import{motion as na}from"framer-motion";var Tt=na(ra),Me=e=>{let{label:o,helperText:t,error:n,style:l,size:a,color:r,disabled:i,required:s,...d}=e;return o?ke.createElement(F,{required:s,color:r,size:a,error:n,disabled:i},ke.createElement(H,null,o),ke.createElement(Tt,{...d}),t&&ke.createElement(A,null,t)):ke.createElement(Tt,{required:s,color:r,size:a,disabled:i,...d})};Me.displayName="Input";var W=Me;import aa from"intl-messageformat";var Pt=(e="usd")=>{let[o,t,n]=new aa(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split("");return{symbol:`${o} `,thousandSeparator:t,decimalSeparator:n,placeholder:n?`${o} 0${n}00`:`${o} 0`,fixedDecimalScale:!!n}};var ma=_.forwardRef(function(o,t){let{onChange:n,...l}=o;return _.createElement(sa,{...l,onValueChange:({floatValue:a})=>{n?.({target:{name:o.name,value:a?.toString()}})},valueIsNumericString:!0,getInputRef:t,decimalScale:2})}),je=_.forwardRef(function(o,t){let{currency:n="usd",max:l=1e5,name:a,onChange:r,label:i,error:s,helperText:d,required:u,disabled:m,...y}=o,{symbol:c,thousandSeparator:C,decimalSeparator:p,placeholder:h,fixedDecimalScale:v}=Pt(n),[P,D]=wt(o.value),[k,g]=wt(!!l&&!!o.value&&o.value>l),x=ia(M=>{let O=Number(M.target.value);D(O),r?.({...M,target:{name:a,value:O}}),l&&O>l?g(!0):g(!1)},[]),I=_.createElement(W,{...y,size:"sm",ref:t,value:P,placeholder:h,onChange:x,disabled:m,required:u,slotProps:{input:{component:ma,decimalSeparator:p,thousandSeparator:C,prefix:c,fixedDecimalScale:v}},sx:{fontFamily:"monospace"}});return i?_.createElement(F,{size:"sm",disabled:m,required:u,error:s||k},_.createElement(H,null,i),I,k?_.createElement(A,null,_.createElement(pa,null),new la(`limit: {amount, number, ::currency/${n} unit-width-narrow}`).format({amount:l})):d&&_.createElement(A,null,d)):I});var It=je;import f,{useCallback as Q,useEffect as eo,useMemo as R,useRef as Ja,useState as Io}from"react";import{styled as Ya,LinearProgress as Ra,Link as $a}from"@mui/joy";import Wa from"@mui/icons-material/esm/ChevronLeft.js";import Ua from"@mui/icons-material/esm/ChevronRight.js";import{Sheet as da}from"@mui/joy";import{motion as ca}from"framer-motion";var ua=ca(da),Te=ua;Te.displayName="Sheet";var q=Te;import U from"react";import{Table as ga}from"@mui/joy";var Pe=e=>{let{children:o,...t}=e;return U.createElement(ga,{...t},o)};Pe.displayName="Table";function Mo(e){let{headCells:o,showCheckbox:t,onCheckboxChange:n,slots:{checkbox:l=ve}={},slotProps:{checkbox:a={}}={}}=e;return U.createElement("thead",null,U.createElement("tr",null,t&&U.createElement("th",{style:{width:"40px",textAlign:"center"}},U.createElement(l,{onChange:n,...a})),o.map(r=>U.createElement("th",{key:r.label,style:{width:r.width,minWidth:r.minWidth,maxWidth:r.maxWidth,textAlign:r.numeric?"right":"left"}},r.label))))}Mo.displayName="TableHead";function To(e){let{rows:o,cellOrder:t,rowOptions:n,showCheckbox:l,onCheckboxChange:a,slots:{checkbox:r=ve}={},slotProps:{checkbox:i={}}={}}=e;return U.createElement("tbody",null,o.map((s,d)=>U.createElement("tr",{key:d},l&&U.createElement("td",{style:{textAlign:"center"}},U.createElement(r,{onChange:u=>a?.(u,d),...i})),t.map(u=>U.createElement("td",{key:u,style:{textAlign:n?.[u]?.numeric?"right":"left"}},s[u])))))}To.displayName="TableBody";import S,{forwardRef as xa,useCallback as At,useEffect as va,useImperativeHandle as Da,useRef as ka,useState as Ft}from"react";import{IMaskInput as Ma,IMask as Po}from"react-imask";import Ta from"@mui/icons-material/esm/CalendarToday.js";import{styled as Bt}from"@mui/joy";import{FocusTrap as Pa,ClickAwayListener as wa,Popper as Ia}from"@mui/base";import{DialogActions as fa,styled as ha}from"@mui/joy";import{motion as Ca}from"framer-motion";var ya=Ca(fa),ba=ha(ya)(({theme:e})=>({padding:e.spacing(1),gap:e.spacing(1),flexDirection:"row",justifyContent:"flex-end"})),we=ba;we.displayName="DialogActions";var Z=we;var Aa=Bt(Ia,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Fa=Bt(q,{name:"DatePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),Vt=e=>{let o=`${e.getDate()}`,t=`${e.getMonth()+1}`,n=e.getFullYear();return Number(o)<10&&(o="0"+o),Number(t)<10&&(t="0"+t),[n,t,o].join("/")},Ba=S.forwardRef(function(o,t){let{onChange:n,...l}=o;return S.createElement(Ma,{...l,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/`m/`d",blocks:{d:{mask:Po.MaskedRange,from:1,to:31,maxLength:2},m:{mask:Po.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Po.MaskedRange,from:1900,to:9999}},format:Vt,parse:a=>{let r=a.split("/");return new Date(Number(r[0]),Number(r[1])-1,Number(r[2]))},autofix:"pad",overwrite:!0})}),Ze=xa((e,o)=>{let{onChange:t,disabled:n,label:l,error:a,helperText:r,minDate:i,maxDate:s,disableFuture:d,disablePast:u,required:m,...y}=e,c=ka(null),[C,p]=Ft(e.value||""),[h,v]=Ft(null),P=!!h;va(()=>{p(e.value||"")},[e.value]),Da(o,()=>c.current,[c.current]);let D=At(x=>{p(x.target.value),t?.(x)},[]),k=At(x=>{v(h?null:x.currentTarget),c.current?.focus()},[h,v,c]),g=S.createElement(Pa,{open:!0},S.createElement(S.Fragment,null,S.createElement(W,{...y,ref:c,size:"sm",value:C,onChange:D,placeholder:"YYYY/MM/DD",disabled:n,required:m,slotProps:{input:{component:Ba,ref:c}},sx:{fontFamily:"monospace"},endDecorator:S.createElement(z,{variant:"plain",onClick:k},S.createElement(Ta,null))}),P&&S.createElement(wa,{onClickAway:()=>v(null)},S.createElement(Aa,{id:"date-picker-popper",open:!0,anchorEl:h,placement:"bottom-end",onMouseDown:x=>x.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},S.createElement(Fa,{tabIndex:-1,role:"presentation"},S.createElement(oe,{value:Number.isNaN(new Date(C).getTime())?void 0:[new Date(C),void 0],onChange:([x])=>{D({target:{name:e.name,value:Vt(x)}}),v(null),c.current?.blur()},minDate:i?new Date(i):void 0,maxDate:s?new Date(s):void 0,disableFuture:d,disablePast:u}),S.createElement(Z,{sx:{p:1}},S.createElement(w,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{D({target:{name:e.name,value:""}}),v(null),c.current?.blur()}},"Clear")))))));return l?S.createElement(F,{required:m,disabled:n,error:a,size:"sm"},S.createElement(H,null,l),g,r&&S.createElement(A,null,r)):g});var St=Ze;import Xe from"react";import{Textarea as Va}from"@mui/joy";import{motion as Sa}from"framer-motion";var Na=Sa(Va),Ie=e=>{let{label:o,error:t,helperText:n,color:l,size:a,disabled:r,required:i,...s}=e,d=Xe.createElement(Na,{required:i,disabled:r,color:l,size:a,...s});return o?Xe.createElement(F,{required:i,disabled:r,color:l,size:a,error:t},Xe.createElement(H,null,o),d,n&&Xe.createElement(A,null,n)):d};Ie.displayName="Textarea";var Nt=Ie;import Ae,{useMemo as La}from"react";import{Select as Ea,Option as Ha}from"@mui/joy";import{motion as za}from"framer-motion";var Oa=za(Ha),Qe=Oa;Qe.displayName="Option";function Fe(e){let{label:o,helperText:t,error:n,size:l,color:a,disabled:r,required:i,onChange:s,...d}=e,u=La(()=>e.options.map(c=>typeof c!="object"?{value:c,label:c}:c),[e.options]),y=Ae.createElement(Ea,{...d,required:i,disabled:r,size:l,color:a,onChange:(c,C)=>{let p=c||{target:{}},h={...p,target:{name:p.target?.name||e.name,value:C||void 0}};s?.(h)}},u.map(c=>Ae.createElement(Qe,{key:c.value,value:c.value},c.label)));return o?Ae.createElement(F,{required:i,disabled:r,size:l,color:a,error:n},Ae.createElement(H,null,o),y,t&&Ae.createElement(A,null,t)):y}Fe.displayName="Select";var wo=Fe;var Lt=Ya("tr",{name:"DataTable",slot:"overlayWrapper"})({position:"sticky",top:"calc(var(--unstable_TableCell-height, 32px))",left:0,right:0,zIndex:1,"& > td":{height:0,padding:0,border:"none !important"}}),Ke=e=>"Intl"in window?new Intl.NumberFormat().format(e):e;function qa(e){let{paginationModel:{page:o,pageSize:t},rowCount:n,onPageChange:l}=e,a=1,r=Math.ceil(n/t),i=[o-2,o-1].filter(m=>m>1),s=[o+1,o+2].filter(m=>m<=r-1),d=r>1&&o<r-3,u=r>1&&o>4;return f.createElement(E,{direction:"row",spacing:1,sx:{pt:1,pb:1},justifyContent:"end",alignItems:"center"},f.createElement(E,{direction:"row",spacing:.5,alignItems:"center"},f.createElement(z,{size:"sm",variant:"plain",color:"neutral",onClick:()=>l(o-1),disabled:o===a,"aria-label":"Previous page"},f.createElement(Wa,null)),o!==a&&f.createElement(w,{size:"sm",variant:"plain",color:"neutral",onClick:()=>l(a)},a),u&&f.createElement(w,{size:"sm",variant:"plain",color:"neutral",onClick:()=>l(o-3)},"..."),i.map(m=>f.createElement(w,{key:m,size:"sm",variant:"plain",color:"neutral",onClick:()=>l(m)},m)),f.createElement(w,{variant:"soft",size:"sm"},o),s.map(m=>f.createElement(w,{key:m,size:"sm",variant:"plain",color:"neutral",onClick:()=>l(m)},m)),d&&f.createElement(w,{size:"sm",variant:"plain",color:"neutral",onClick:()=>l(o+3)},"..."),o!==r&&f.createElement(w,{size:"sm",variant:"plain",color:"neutral",onClick:()=>l(r)},r),f.createElement(z,{size:"sm",variant:"plain",color:"neutral",onClick:()=>l(o+1),disabled:o===r,"aria-label":"Next page"},f.createElement(Ua,null))))}var Ga=e=>f.createElement(We,{sx:{position:"absolute",top:0,right:0,bottom:0,width:"4px",cursor:"col-resize"},onMouseDown:o=>{let t=o.clientX,n=e.current?.getBoundingClientRect().width,l=r=>{n&&t&&(e.current.style.width=`${n+(r.clientX-t)}px`)},a=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",l),document.addEventListener("mouseup",a)}}),_a=e=>{let o=Ja(null),t={width:e.width,minWidth:e.minWidth??"50px",maxWidth:e.maxWidth,textAlign:e.type==="number"?"end":"start",position:e.stickyHeader?void 0:"relative"},n=e.resizable??!0?Ga(o):null;return f.createElement("th",{ref:o,key:e.field,style:t},e.headerName??e.field,n)},ja=e=>{let{field:o,type:t,renderCell:n,isCellEditable:l,row:a,rowId:r}=e,[i,s]=Io(a[o]),d=R(()=>({row:a,value:i,id:r}),[a,o,r,i]),u=R(()=>!!((typeof l=="function"&&l(d)||typeof l=="boolean"&&l)&&e.editMode),[e.editMode,l,a]),m=R(()=>({...typeof e.componentProps=="function"?e.componentProps(d):e.componentProps||{},size:"sm"}),[i,e.componentProps,d]),y=R(()=>({...m,onChange:p=>{m.onChange?.(p),s(p.target.value),t&&["select","multiSelect"].includes(t)&&e.onCellEditStop?.({...d,originalRow:a,row:{...d.row,[o]:p.target.value},value:p.target.value})},onFocus:p=>{m.onFocus?.(p),e.onCellEditStart?.({...d,originalRow:a,row:{...d.row,value:i},value:i})},onBlur:p=>{m.onBlur?.(p),t&&["number","text","longText","currency","date"].includes(t)&&e.onCellEditStop?.({...d,originalRow:a,row:{...d.row,[o]:i},value:i})},...t==="autocomplete"&&{onChangeComplete:p=>{m.onChangeComplete?.(p),s(p.target.value),e.onCellEditStop?.({...d,originalRow:a,row:{...d.row,[o]:p.target.value},value:p.target.value})}}}),[i,m]),c=R(()=>({date:f.createElement(St,{...y,value:i}),currency:f.createElement(It,{...y,value:i}),number:f.createElement(W,{...y,value:i,type:"number"}),text:f.createElement(W,{...y,value:i,type:"text"}),longText:f.createElement(Nt,{...y,value:i}),autocomplete:f.createElement(lt,{...y,value:i,options:y.options||[i]}),select:f.createElement(wo,{...y,value:i,options:y.options||[i]}),multiSelect:f.createElement(wo,{...y,value:Array.isArray(i)?i:[i],options:y.options||[i],multiple:!0})})[t||"text"],[i,m]),C=R(()=>{if(n)return n(d);let p=i;return{chip:f.createElement(Mt,{color:"primary",children:p,...m}),link:f.createElement(e.component||$a,{children:p,...m})}[t||"text"]||p},[i,n,a]);return eo(()=>{s(a[o])},[a]),f.createElement("td",{key:o,style:{textAlign:t&&["number","date","currency"].includes(t)?"end":"start"}},u&&c?c:C)},Za=e=>{let{columns:o,rowId:t,editMode:n}=e,[l,a]=Io(e.row),r=Q(({row:i})=>{a(i)},[]);return f.createElement(f.Fragment,null,o.map(i=>f.createElement(ja,{...i,row:l,rowId:t,editMode:n,onCellEditStop:s=>{i.onCellEditStop?.(s),r(s)}})))};function Xa({rows:e,columns:o,rowCount:t,pagination:n,paginationMode:l,paginationModel:a,onPaginationModelChange:r,selectionModel:i=[],onSelectionModelChange:s,getId:d,isTotalSelected:u}){let[m,y]=Io(a?.page||1),c=a?.pageSize||20,C=Q((g,x)=>d?.(g)??g?.id??`${(x||0)+(m-1)*c}`,[d??m,c]),p=R(()=>new Set(i),[i]),h=R(()=>!n||l==="server"?e:e.slice((m-1)*c,(m-1)*c+c),[e,m,c,l,n]),v=R(()=>h.length>0&&h.every((g,x)=>p.has(C(g,x))),[h,p,m,c,C]),P=t||e.length,D=R(()=>u??(P>0&&i.length===P),[u,i,P]),k=Q(g=>{y(g),r?.({page:g,pageSize:c})},[r]);return eo(()=>{k(1)},[P]),eo(()=>{let g=Math.max(1,Math.ceil(P/c));m>g&&k(g)},[m,P,c]),eo(()=>{s?.([])},[m]),{rowCount:P,page:m,pageSize:c,onPaginationModelChange:k,getId:C,HeadCell:_a,BodyRow:Za,dataInPage:h,isAllSelected:v,isTotalSelected:D,isSelectedRow:Q(g=>p.has(g),[p]),onAllCheckboxChange:Q(()=>{s?.(v?[]:h.map(C))},[v,h,s]),onCheckboxChange:Q((g,x)=>{if(p.has(x)){let I=i.filter(M=>M!==x);s?.(I)}else{let I=[...i,x];s?.(I)}},[i,s]),columns:R(()=>o||Object.keys(e[0]||{}).map(g=>({field:g})),[e,o]),onTotalSelect:Q(()=>{s?.(D?[]:e.map(C),!D)},[D,e,s])}}function Ao(e){let{rows:o,checkboxSelection:t,editMode:n,selectionModel:l,onSelectionModelChange:a,rowCount:r,columns:i,onPaginationModelChange:s,pagination:d,paginationMode:u,paginationModel:m,loading:y,slots:{checkbox:c=ve,toolbar:C,footer:p,loadingOverlay:h=()=>f.createElement(Ra,{value:8,variant:"plain"})}={},slotProps:{checkbox:v={},toolbar:P,background:D={}}={},...k}=e,{columns:g,isAllSelected:x,isSelectedRow:I,onAllCheckboxChange:M,onCheckboxChange:O,getId:Qt,rowCount:po,page:tt,pageSize:rt,onPaginationModelChange:Kt,dataInPage:er,isTotalSelected:nt,onTotalSelect:at,HeadCell:or,BodyRow:tr}=Xa(e),rr=R(()=>({page:tt,pageSize:rt}),[tt,rt]);return f.createElement(We,null,f.createElement(E,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center"},!!t&&f.createElement(E,{direction:"row",spacing:1},!x&&f.createElement(V,{level:"body-xs"},Ke(l?.length||0)," items selected"),x&&!nt&&f.createElement(E,{direction:"row",spacing:1,alignItems:"center"},f.createElement(V,{level:"body-xs"},"All ",Ke(l?.length||0)," items on this page are selected."),f.createElement(w,{size:"sm",variant:"plain",onClick:at},"Select all ",Ke(po??o.length)," items")),nt&&f.createElement(E,{direction:"row",spacing:1,alignItems:"center"},f.createElement(V,{level:"body-xs"},"All ",Ke(po??o.length)," items are selected."),f.createElement(w,{size:"sm",variant:"plain",color:"danger",onClick:at},"Cancel"))),C&&f.createElement(C,{...P||{}})),f.createElement(q,{variant:"outlined",sx:{overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"},...D},f.createElement(Pe,{...k},f.createElement("thead",null,f.createElement("tr",null,t&&f.createElement("th",{style:{width:"40px",textAlign:"center"}},f.createElement(c,{onChange:M,checked:x,indeterminate:(l||[]).length>0&&!x,...v})),g.map(te=>f.createElement(or,{key:te.field,stickyHeader:e.stickyHeader,...te})))),f.createElement("tbody",null,f.createElement(Lt,null,!!y&&f.createElement("td",null,f.createElement(We,{sx:{position:"absolute",top:0,left:0,right:0}},f.createElement(h,null)))),f.createElement(Lt,null),er.map((te,nr)=>{let K=Qt(te,nr);return f.createElement("tr",{key:K,role:t?"checkbox":void 0,tabIndex:t?-1:void 0,onClick:t?mo=>O(mo,K):void 0,"aria-checked":t?I(K):void 0},t&&f.createElement("th",{scope:"row",style:{textAlign:"center"}},f.createElement(c,{onChange:mo=>O(mo,K),checked:I(K),...v})),f.createElement(tr,{columns:g,row:te,rowId:K,editMode:n}))})),p&&f.createElement(p,null))),d&&f.createElement(qa,{paginationModel:rr,rowCount:po,onPageChange:Kt}))}Ao.displayName="DataTable";import N,{forwardRef as Qa,useCallback as Fo,useEffect as Ka,useImperativeHandle as ei,useMemo as oi,useRef as ti,useState as Et}from"react";import{IMaskInput as ri,IMask as Bo}from"react-imask";import ni from"@mui/icons-material/esm/CalendarToday.js";import{styled as Ht}from"@mui/joy";import{FocusTrap as ai,ClickAwayListener as ii,Popper as li}from"@mui/base";var si=Ht(li,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),pi=Ht(q,{name:"DateRangePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({zIndex:e.zIndex.tooltip,width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),zt=([e,o])=>{let t=n=>{let l=`${n.getDate()}`,a=`${n.getMonth()+1}`,r=n.getFullYear();return Number(l)<10&&(l="0"+l),Number(a)<10&&(a="0"+a),[r,a,l].join("/")};return[t(e),o?t(o):""].join(" - ")},Ot=e=>{let o=e.split(" - ")[0]||"",t=e.split(" - ")[1]||"",n=o.split("/"),l=t.split("/");return[new Date(Number(n[0]),Number(n[1])-1,Number(n[2])),new Date(Number(l[0]),Number(l[1])-1,Number(l[2]))]},mi=N.forwardRef(function(o,t){let{onChange:n,...l}=o;return N.createElement(ri,{...l,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/`m/`d - Y/`m/`d",blocks:{d:{mask:Bo.MaskedRange,from:1,to:31,maxLength:2},m:{mask:Bo.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Bo.MaskedRange,from:1900,to:9999}},format:zt,parse:Ot,autofix:"pad",overwrite:!0})}),Vo=Qa((e,o)=>{let{onChange:t,disabled:n,label:l,error:a,helperText:r,minDate:i,maxDate:s,disableFuture:d,disablePast:u,required:m,...y}=e,c=ti(null),[C,p]=Et(e.value||""),[h,v]=Et(null),P=!!h,D=oi(()=>C?Ot(C):void 0,[C]);Ka(()=>{p(e.value||"")},[e.value]),ei(o,()=>c.current,[c.current]);let k=Fo(M=>{p(M.target.value),t?.(M)},[t]),g=Fo(M=>{v(h?null:M.currentTarget),c.current?.focus()},[h,v,c]),x=Fo(([M,O])=>{!M||!O||(c.current?.blur(),p(zt([M,O])),v(null))},[p,v,c]),I=N.createElement(ai,{open:!0},N.createElement(N.Fragment,null,N.createElement(W,{...y,ref:o,size:"sm",value:C,onChange:k,disabled:n,required:m,placeholder:"YYYY/MM/DD - YYYY/MM/DD",slotProps:{input:{component:mi,ref:c}},sx:{fontFamily:"monospace"},endDecorator:N.createElement(z,{variant:"plain",onClick:g},N.createElement(ni,null))}),P&&N.createElement(ii,{onClickAway:()=>v(null)},N.createElement(si,{id:"date-range-picker-popper",open:!0,anchorEl:h,placement:"bottom-end",onMouseDown:M=>M.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},N.createElement(pi,{tabIndex:-1,role:"presentation"},N.createElement(oe,{rangeSelection:!0,defaultValue:D,onChange:x,minDate:i?new Date(i):void 0,maxDate:s?new Date(s):void 0,disableFuture:d,disablePast:u}),N.createElement(Z,{sx:{p:1}},N.createElement(w,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{p(""),v(null),c.current?.blur()}},"Clear")))))));return l?N.createElement(F,{required:m,disabled:n,error:a,size:"sm"},N.createElement(H,null,l),I,r&&N.createElement(A,null,r)):I});Vo.displayName="DateRangePicker";import{DialogContent as di,styled as ci}from"@mui/joy";import{motion as ui}from"framer-motion";var gi=ui(di),fi=ci(gi)(({theme:e})=>({padding:e.spacing(0,3,2.5)})),Be=fi;Be.displayName="DialogContent";var oo=Be;import{DialogTitle as hi,styled as Ci}from"@mui/joy";import{motion as yi}from"framer-motion";var bi=yi(hi),xi=Ci(bi)(({theme:e})=>({padding:e.spacing(2,3)})),Ve=xi;Ve.displayName="DialogTitle";var to=Ve;import Ne from"react";import ro from"react";import{Modal as vi,ModalDialog as Di,ModalClose as ki,ModalOverflow as Mi,styled as Jt}from"@mui/joy";import{motion as no}from"framer-motion";var Ti=no(vi),So=Ti;So.displayName="Modal";var Pi=no(Di),Yt=Jt(Pi)({padding:0}),Se=Yt;Se.displayName="ModalDialog";var wi=Jt(no(ki))(({theme:e})=>({top:e.spacing(1.5),right:e.spacing(3)})),ao=wi;ao.displayName="ModalClose";var Ii=no(Mi),No=Ii;No.displayName="ModalOverflow";function Lo(e){let{title:o,children:t,...n}=e;return ro.createElement(Yt,{...n},ro.createElement(ao,null),ro.createElement(to,null,o),ro.createElement(oo,null,t))}Lo.displayName="ModalFrame";import{styled as Ai}from"@mui/joy";var Fi=Ai(Se)(({theme:e})=>({padding:0})),Eo=Ne.forwardRef((e,o)=>{let{title:t,children:n,actions:l,...a}=e;return Ne.createElement(Fi,{ref:o,...a},Ne.createElement(to,null,t),Ne.createElement(oo,null,n),Ne.createElement(Z,null,l))});Eo.displayName="DialogFrame";import Bi from"react";import{Divider as Vi}from"@mui/joy";import{motion as Si}from"framer-motion";var Ni=Si(Vi),Le=e=>Bi.createElement(Ni,{...e});Le.displayName="Divider";import Li from"react";import{Drawer as Ei}from"@mui/joy";import{motion as Hi}from"framer-motion";var zi=Hi(Ei),Ho=e=>{let{children:o,...t}=e;return Li.createElement(zi,{...t,slotProps:{...t.slotProps,content:{...t.slotProps?.content,sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}}}},o)};Ho.displayName="InsetDrawer";import T,{useCallback as io,useEffect as Oi,useMemo as Ji,useRef as Rt,useState as zo}from"react";import{styled as X}from"@mui/joy";import Yi from"@mui/icons-material/esm/FileUploadRounded.js";import Ri from"@mui/icons-material/esm/UploadFileRounded.js";import $i from"@mui/icons-material/esm/ClearRounded.js";import{combine as Wi}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/combine.js";import{dropTargetForExternal as Ui,monitorForExternal as qi}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/adapter.js";import{containsFiles as $t,getFiles as Gi}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/file.js";import{preventUnhandled as Wt}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/prevent-unhandled.js";var _i=X("input")({width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",position:"absolute"}),ji=X(E,{name:"Uploader",slot:"PreviewRoot"})({}),Zi=X(be,{name:"Uploader",slot:"UploadCard"})(({theme:e})=>({padding:e.spacing(1.25),border:`1px solid ${e.palette.neutral.outlinedBorder}`})),Xi=X(Ri,{name:"Uploader",slot:"UploadFileIcon"})(({theme:e})=>({color:e.palette.neutral[400],width:"32px",height:"32px"})),Qi=X($i,{name:"Uploader",slot:"ClearIcon"})(({theme:e})=>({color:e.palette.neutral.plainColor,width:"18px",height:"18px"})),Ki=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"],Oo=e=>{let o=e==0?0:Math.floor(Math.log(e)/Math.log(1024)),t=e/Math.pow(1024,o),n=Ki[o];return Intl.NumberFormat("en-us",{style:"unit",unit:n,unitDisplay:"narrow"}).format(t)},el=e=>e.replace(/image\/\*/g,"any image file").replace(/video\/\*/g,"any video file").replace(/audio\/\*/g,"any audio file").replace(/\./,"").split(",").join(", "),ol=e=>{let{files:o,onDelete:t}=e;return T.createElement(ji,{gap:.5},o.map(n=>T.createElement(Zi,{key:n.name,size:"sm",color:"neutral"},T.createElement(E,{direction:"row",alignItems:"center",gap:1},T.createElement(Xi,null),T.createElement(E,{flex:"1"},T.createElement(V,{level:"body-sm",textColor:"common.black"},n.name),T.createElement(V,{level:"body-xs",fontWeight:"300",lineHeight:"1.33",textColor:"text.tertiary"},Oo(n.size))),T.createElement(z,{onClick:()=>t?.(n)},T.createElement(Qi,null))))))},tl=X(E,{name:"Uploader",slot:"root"})(({theme:e})=>({gap:e.spacing(1)})),rl=X(q,{name:"Uploader",slot:"dropZone"})(({theme:e,state:o})=>({width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:e.spacing(5,2.5),gap:e.spacing(2),cursor:"pointer",backgroundColor:["idle","potential"].includes(o)?e.palette.background.surface:e.palette.primary.outlinedHoverBg,border:o==="idle"?`1px solid ${e.palette.neutral.outlinedBorder}`:`1px solid ${e.palette.primary.outlinedBorder}`})),nl=X(Yi,{name:"Uploader",slot:"iconContainer"})(({theme:e})=>({color:e.palette.neutral.outlinedBorder,width:"32px",height:"32px"})),Jo=T.memo(e=>{let{accept:o,maxCount:t,name:n,maxSize:l,onChange:a}=e,r=Rt(null),i=Rt(null),[s,d]=zo([]),[u,m]=zo("idle"),[y,c]=zo(),C=Ji(()=>[o&&`accepted file format: ${el(o)}`,l&&`maximum size: ${Oo(l)}`,t&&`up to ${t} files`].filter(D=>!!D).join(", "),[o,l,t]),p=io(D=>{try{l&&D.forEach(g=>{if(g.size>l)throw new Error(`File size exceeds the limit: ${Oo(l)}`)});let k=[...s,...D];if(t&&k.length>t)throw new Error(`File count exceeds the limit: ${t}`);a?.({target:{name:n,value:k}}),c(void 0),d(k)}catch(k){c(k.message)}},[s]);Oi(()=>{let D=r.current;if(D)return Wi(Ui({element:D,canDrop:$t,onDragEnter:()=>m("over"),onDragLeave:()=>m("potential"),onDrop:async({source:k})=>{let g=await Gi({source:k});p(g)}}),qi({canMonitor:$t,onDragStart:()=>{m("potential"),Wt.start()},onDrop:()=>{m("idle"),Wt.stop()}}))});let h=io(D=>{let k=Array.from(D.target.files||[]);p(k)},[p]),v=io(D=>{d(k=>(a?.({target:{name:n,value:k.filter(g=>g!==D)}}),k.filter(g=>g!==D)))},[]),P=io(()=>{i.current?.click()},[]);return T.createElement(tl,null,(!t||t&&s.length!==t)&&T.createElement(F,{error:!!y},T.createElement(rl,{state:u,ref:r,onClick:P},T.createElement(E,{alignItems:"center",gap:.5},T.createElement(nl,null),T.createElement(E,{direction:"row",gap:.5},T.createElement(V,{level:"body-md",color:"primary"},"Click to Upload"),T.createElement(V,{level:"body-md",textColor:"text.primary"},"or drag file here")),C!==""&&T.createElement(V,{level:"body-xs",textColor:"text.secondary"},C.charAt(0).toUpperCase()+C.slice(1))),T.createElement(_i,{type:"file",onChange:h,multiple:!0,accept:o,ref:i}),y&&T.createElement(A,null,y))),s.length>0&&T.createElement(ol,{files:s,onDelete:v}))});Jo.displayName="Uploader";import{Grid as al}from"@mui/joy";import{motion as il}from"framer-motion";var ll=il(al),Yo=ll;Yo.displayName="Grid";import j from"react";import sl from"react-markdown";import{Link as pl}from"@mui/joy";var Ro=e=>{let{children:o,color:t,textColor:n,defaultLevel:l="body-md",markdownOptions:a,...r}=e;return j.createElement(J,{color:t,textColor:n,...r},j.createElement(sl,{...a,children:o,components:{h1:({children:i})=>j.createElement(J,{color:t,textColor:n,level:"h1"},i),h2:({children:i})=>j.createElement(J,{color:t,textColor:n,level:"h2"},i),h3:({children:i})=>j.createElement(J,{color:t,textColor:n,level:"h3"},i),h4:({children:i})=>j.createElement(J,{color:t,textColor:n,level:"h4"},i),p:({children:i})=>j.createElement(J,{color:t,textColor:n,level:l},i),a:({children:i,href:s})=>j.createElement(pl,{href:s},i),hr:()=>j.createElement(Le,null),...a?.components}}))};Ro.displayName="Markdown";import L,{forwardRef as ml,useCallback as $o,useEffect as dl,useImperativeHandle as cl,useMemo as ul,useRef as gl,useState as Ut}from"react";import{IMaskInput as fl,IMask as qt}from"react-imask";import hl from"@mui/icons-material/esm/CalendarToday.js";import{styled as Gt}from"@mui/joy";import{FocusTrap as Cl,ClickAwayListener as yl,Popper as bl}from"@mui/base";var xl=Gt(bl,{name:"MonthRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),vl=Gt(q,{name:"MonthRangePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({zIndex:e.zIndex.tooltip,width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),Wo=e=>{let o=`${e.getMonth()+1}`,t=e.getFullYear();return Number(o)<10&&(o="0"+o),[t,o].join("/")},Uo=([e,o])=>{let t=n=>{if(!/^\d\d\d\d\/(0[1-9]|1[012])(\/(0[1-9]|[23][0-9]))?$/.test(n))return n;let l=n.split("/"),a=new Date(Number(l[0]),Number(l[1])-1);return Wo(a)};return[t(e),t(o)].join(" - ")},qo=e=>{let o=e.split(" - ")[0]||"",t=e.split(" - ")[1]||"";return[o,t]},Dl=L.forwardRef(function(o,t){let{onChange:n,...l}=o;return L.createElement(fl,{...l,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/m - Y/m",blocks:{m:{mask:qt.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:qt.MaskedRange,from:1900,to:9999}},format:Uo,parse:qo})}),Go=ml((e,o)=>{let{onChange:t,disabled:n,label:l,error:a,helperText:r,minDate:i,maxDate:s,disableFuture:d,disablePast:u,required:m,...y}=e,c=gl(null),[C,p]=Ut(""),[h,v]=Ut(null),P=!!h,D=ul(()=>C?qo(C).map(M=>new Date(M)):void 0,[C]);dl(()=>{p(e.value?Uo(qo(e.value)):"")},[e.value]),cl(o,()=>c.current,[c.current]);let k=$o(M=>{p(M.target.value),t?.(M)},[t]),g=$o(M=>{v(h?null:M.currentTarget),c.current?.focus()},[h,v,c]),x=$o(([M,O])=>{!M||!O||(p(Uo([Wo(M),Wo(O)])),v(null),c.current?.blur())},[p,v,c]),I=L.createElement(Cl,{open:!0},L.createElement(L.Fragment,null,L.createElement(W,{...y,ref:o,size:"sm",value:C,onChange:k,disabled:n,required:m,placeholder:"YYYY/MM - YYYY/MM",slotProps:{input:{component:Dl,ref:c}},sx:{fontFamily:"monospace"},endDecorator:L.createElement(z,{variant:"plain",onClick:g},L.createElement(hl,null))}),P&&L.createElement(yl,{onClickAway:()=>v(null)},L.createElement(xl,{id:"date-range-picker-popper",open:!0,anchorEl:h,placement:"bottom-end",onMouseDown:M=>M.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},L.createElement(vl,{tabIndex:-1,role:"presentation"},L.createElement(oe,{view:"month",views:["month"],rangeSelection:!0,defaultValue:D,onChange:x,minDate:i?new Date(i):void 0,maxDate:s?new Date(s):void 0,disableFuture:d,disablePast:u}),L.createElement(Z,{sx:{p:1}},L.createElement(w,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{p(""),v(null),c.current?.blur()}},"Clear")))))));return l?L.createElement(F,{required:m,disabled:n,error:a,size:"sm"},L.createElement(H,null,l),I,r&&L.createElement(A,null,r)):I});Go.displayName="MonthRangePicker";import{Radio as kl,RadioGroup as Ml}from"@mui/joy";import{motion as _t}from"framer-motion";var Tl=_t(kl),Ee=Tl;Ee.displayName="Radio";var Pl=_t(Ml),He=Pl;He.displayName="RadioGroup";import jt from"react";function _o(e){let{items:o,...t}=e;return jt.createElement(He,{...t},o.map(n=>jt.createElement(Ee,{key:`${n.value}`,value:n.value,label:n.label})))}_o.displayName="RadioList";import Zt from"react";import{Switch as wl,styled as Il,switchClasses as Al}from"@mui/joy";import{motion as Xt}from"framer-motion";var Fl=Xt(wl),Bl=Il(Xt.div)({"--Icon-fontSize":"calc(var(--Switch-thumbSize) * 0.75)",display:"inline-flex",justifyContent:"center",alignItems:"center",position:"absolute",left:"var(--Switch-thumbOffset)",width:"var(--Switch-thumbWidth)",height:"var(--Switch-thumbSize)",borderRadius:"var(--Switch-thumbRadius)",boxShadow:"var(--Switch-thumbShadow)",color:"var(--Switch-thumbColor)",backgroundColor:"var(--Switch-thumbBackground)",[`&.${Al.checked}`]:{left:"unset",right:"var(--Switch-thumbOffset)"}}),Vl=e=>Zt.createElement(Bl,{...e,layout:!0,transition:Sl}),Sl={type:"spring",stiffness:700,damping:30},jo=e=>Zt.createElement(Fl,{...e,slots:{thumb:Vl,...e.slots}});jo.displayName="Switch";import{Tabs as Nl,Tab as Ll,TabList as El,TabPanel as Hl,styled as zl,tabClasses as Ol}from"@mui/joy";import{motion as lo}from"framer-motion";var Jl=lo(Nl),Zo=Jl;Zo.displayName="Tabs";var Yl=zl(lo(Ll))(({theme:e})=>({[`&:not(.${Ol.selected})`]:{color:e.palette.neutral[700]}})),Xo=Yl;Xo.displayName="Tab";var Rl=lo(El),Qo=Rl;Qo.displayName="TabList";var $l=lo(Hl),Ko=$l;Ko.displayName="TabPanel";import so from"react";import{CssBaseline as Wl,CssVarsProvider as Ul,checkboxClasses as ql,extendTheme as Gl}from"@mui/joy";var _l=Gl({cssVarPrefix:"ceed",components:{JoyTable:{defaultProps:{size:"sm",borderAxis:"bothBetween"},styleOverrides:{root:({theme:e})=>({"--TableRow-stripeBackground":e.palette.background.level1,"--TableCell-selectedBackground":e.palette.background.level2,"--TableRow-hoverBackground":e.palette.background.level3,"& tbody tr[aria-checked=false] th":{"--TableCell-headBackground":"transparent"},"& tbody tr[aria-checked=true]:hover th":{"--TableCell-headBackground":"var(--TableRow-hoverBackground)"},"& tbody tr[aria-checked=true]:not(:hover) th":{"--TableCell-headBackground":"var(--TableCell-selectedBackground)"},"& tbody tr[aria-checked=true]:not(:hover) td":{"--TableCell-dataBackground":"var(--TableCell-selectedBackground)"},[`& .${ql.root}`]:{verticalAlign:"middle"}})}},JoyTooltip:{defaultProps:{size:"sm",placement:"top"}}}});function et(e){return so.createElement(so.Fragment,null,so.createElement(Ul,{theme:_l},so.createElement(Wl,null),e.children))}et.displayName="ThemeProvider";import jl from"react";import{Tooltip as Zl}from"@mui/joy";import{motion as Xl}from"framer-motion";var Ql=Xl(Zl),ot=e=>jl.createElement(Ql,{...e});ot.displayName="Tooltip";export{Ye as Accordion,Je as AccordionDetails,Oe as AccordionSummary,co as Accordions,uo as Alert,Gh as AspectRatio,$e as Autocomplete,zh as AutocompleteListbox,Oh as AutocompleteOption,$h as Avatar,Uh as AvatarGroup,jh as Badge,pe as Box,ho as Breadcrumbs,ge as Button,Ce as Calendar,be as Card,vo as CardActions,bo as CardContent,xo as CardCover,Do as CardOverflow,xe as Checkbox,De as Chip,nC as CircularProgress,ko as Container,je as CurrencyInput,Ao as DataTable,Ze as DatePicker,Vo as DateRangePicker,we as DialogActions,Be as DialogContent,Eo as DialogFrame,Ve as DialogTitle,Le as Divider,iC as Drawer,ue as Dropdown,ae as FormControl,le as FormHelperText,ie as FormLabel,Yo as Grid,fe as IconButton,Me as Input,Ho as InsetDrawer,sC as LinearProgress,MC as Link,mC as List,cC as ListDivider,gC as ListItem,hC as ListItemButton,yC as ListItemContent,xC as ListItemDecorator,DC as ListSubheader,Ro as Markdown,me as Menu,de as MenuButton,ce as MenuItem,So as Modal,ao as ModalClose,Se as ModalDialog,Lo as ModalFrame,No as ModalOverflow,Go as MonthRangePicker,Qe as Option,Ee as Radio,He as RadioGroup,_o as RadioList,Fe as Select,Te as Sheet,LC as Skeleton,PC as Slider,ne as Stack,IC as Step,FC as StepButton,VC as StepIndicator,SC as Stepper,jo as Switch,Xo as Tab,Qo as TabList,Ko as TabPanel,Pe as Table,To as TableBody,Mo as TableHead,Zo as Tabs,Ie as Textarea,et as ThemeProvider,ot as Tooltip,J as Typography,Jo as Uploader,Nh as accordionClasses,Lh as accordionDetailsClasses,Hh as accordionSummaryClasses,Eh as accordionsClasses,Kf as alertClasses,_h as aspectRatioClasses,Jh as autocompleteClasses,Yh as autocompleteListboxClasses,Rh as autocompleteOptionClasses,Wh as avatarClasses,qh as avatarGroupClasses,Zh as badgeClasses,eh as boxClasses,Xh as breadcrumbsClasses,oh as buttonClasses,Kh as cardActionsClasses,Qh as cardClasses,eC as cardContentClasses,oC as cardCoverClasses,tC as cardOverflowClasses,th as checkboxClasses,rC as chipClasses,aC as circularProgressClasses,Ah as dialogActionsClasses,Ih as dialogContentClasses,wh as dialogTitleClasses,rh as dividerClasses,lC as drawerClasses,Ch as formControlClasses,bh as formHelperTextClasses,yh as formLabelClasses,xh as gridClasses,nh as iconButtonClasses,ah as inputClasses,pC as linearProgressClasses,TC as linkClasses,dC as listClasses,uC as listDividerClasses,CC as listItemButtonClasses,fC as listItemClasses,bC as listItemContentClasses,vC as listItemDecoratorClasses,kC as listSubheaderClasses,lh as menuButtonClasses,ih as menuClasses,sh as menuItemClasses,kh as modalClasses,Mh as modalCloseClasses,Th as modalDialogClasses,Ph as modalOverflowClasses,ph as optionClasses,mh as radioClasses,dh as radioGroupClasses,ch as selectClasses,Dh as sheetClasses,EC as skeletonClasses,wC as sliderClasses,vh as stackClasses,BC as stepButtonClasses,AC as stepClasses,NC as stepperClasses,uh as switchClasses,Vh as tabListClasses,Sh as tabPanelClasses,gh as tableClasses,Bh as tabsClasses,fh as textareaClasses,Fh as tooltipClasses,hh as typographyClasses,Xf as useColorScheme,Zf as useTheme,Qf as useThemeProps};
|
|
1
|
+
import{useTheme as Qf,useColorScheme as Kf,useThemeProps as eh,alertClasses as oh,boxClasses as th,buttonClasses as rh,checkboxClasses as nh,dividerClasses as ah,iconButtonClasses as ih,inputClasses as lh,menuClasses as sh,menuButtonClasses as mh,menuItemClasses as ph,optionClasses as dh,radioClasses as ch,radioGroupClasses as uh,selectClasses as gh,switchClasses as fh,tableClasses as hh,textareaClasses as bh,typographyClasses as Ch,formControlClasses as yh,formLabelClasses as xh,formHelperTextClasses as vh,gridClasses as Mh,stackClasses as kh,sheetClasses as Dh,modalClasses as Th,modalCloseClasses as Ph,modalDialogClasses as wh,modalOverflowClasses as Ih,dialogTitleClasses as Ah,dialogContentClasses as Fh,dialogActionsClasses as Bh,tooltipClasses as Nh,tabsClasses as Lh,tabListClasses as Sh,tabPanelClasses as Hh,accordionClasses as Eh,accordionDetailsClasses as zh,accordionGroupClasses as Oh,accordionSummaryClasses as Vh,AutocompleteListbox as Jh,AutocompleteOption as Yh,autocompleteClasses as $h,autocompleteListboxClasses as Uh,autocompleteOptionClasses as qh,Avatar as Wh,avatarClasses as Gh,AvatarGroup as _h,avatarGroupClasses as jh,AspectRatio as Rh,aspectRatioClasses as Zh,Badge as Xh,badgeClasses as Qh,breadcrumbsClasses as Kh,cardClasses as eb,cardActionsClasses as ob,cardContentClasses as tb,cardCoverClasses as rb,cardOverflowClasses as nb,chipClasses as ab,CircularProgress as ib,circularProgressClasses as lb,Drawer as sb,drawerClasses as mb,LinearProgress as pb,linearProgressClasses as db,List as cb,listClasses as ub,ListDivider as gb,listDividerClasses as fb,ListItem as hb,listItemClasses as bb,ListItemButton as Cb,listItemButtonClasses as yb,ListItemContent as xb,listItemContentClasses as vb,ListItemDecorator as Mb,listItemDecoratorClasses as kb,ListSubheader as Db,listSubheaderClasses as Tb,Link as Pb,linkClasses as wb,Slider as Ib,sliderClasses as Ab,Step as Fb,stepClasses as Bb,StepButton as Nb,stepButtonClasses as Lb,StepIndicator as Sb,Stepper as Hb,stepperClasses as Eb,Skeleton as zb,skeletonClasses as Ob}from"@mui/joy";import le from"react";import{AccordionGroup as ar,Accordion as ir,AccordionSummary as lr,AccordionDetails as sr}from"@mui/joy";import{motion as Ve}from"framer-motion";var mr=Ve(lr),Je=mr;Je.displayName="AccordionSummary";var pr=Ve(sr),Ye=pr;Ye.displayName="AccordionDetails";var dr=Ve(ir);function $e(e){let{summary:o,details:t,variant:n,color:i,...a}=e,r=n==="solid"?"solid":void 0;return le.createElement(dr,{variant:r,color:i,...a},le.createElement(Je,{variant:r,color:i},o),le.createElement(Ye,{variant:r,color:i},t))}$e.displayName="Accordion";var cr=Ve(ar);function io(e){let{variant:o,color:t,items:n,...i}=e;return le.createElement(cr,{variant:o,color:t,...i},n.map((a,r)=>le.createElement($e,{key:r,summary:a.summary,details:a.details,index:r,variant:o,color:t})))}io.displayName="Accordions";import Ue from"react";import{Alert as xr,styled as vr}from"@mui/joy";import{motion as Mr}from"framer-motion";import ur from"react";import{Typography as gr}from"@mui/joy";import{motion as fr}from"framer-motion";var hr=fr(gr),J=e=>ur.createElement(hr,{...e});J.displayName="Typography";var L=J;import{Stack as br}from"@mui/joy";import{motion as Cr}from"framer-motion";var yr=Cr(br),se=yr;se.displayName="Stack";var O=se;var kr=vr(Mr(xr))({alignItems:"flex-start",fontWeight:"unset"});function lo(e){let{title:o,content:t,actions:n,color:i="primary",...a}=e,r=e.invertedColors||e.variant==="solid";return Ue.createElement(kr,{...a,color:i,endDecorator:n,invertedColors:r},Ue.createElement(O,null,o&&Ue.createElement(L,{level:"title-sm",color:i},o),Ue.createElement(L,{level:"body-sm",color:i},t)))}lo.displayName="Alert";import B,{useCallback as Sr,useEffect as Hr,useMemo as ce,useRef as Er,useState as zr}from"react";import{Autocomplete as Or,AutocompleteOption as Vr,ListSubheader as Jr,AutocompleteListbox as Yr,ListItemDecorator as rt,CircularProgress as $r,styled as Ur}from"@mui/joy";import{useVirtualizer as qr}from"@tanstack/react-virtual";import{Popper as Wr}from"@mui/base";import{FormControl as Dr,styled as Tr}from"@mui/joy";import{motion as Pr}from"framer-motion";var wr=Tr(Pr(Dr))({width:"100%"}),me=wr;me.displayName="FormControl";var A=me;import{FormLabel as Ir}from"@mui/joy";import{motion as Ar}from"framer-motion";var Fr=Ar(Ir),pe=Fr;pe.displayName="FormLabel";var F=pe;import{FormHelperText as Br}from"@mui/joy";import{motion as Nr}from"framer-motion";var Lr=Nr(Br),de=Lr;de.displayName="FormHelperText";var I=de;var Gr=Ur(Wr,{name:"Autocomplete",slot:"Popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),_r=B.forwardRef((e,o)=>{let{anchorEl:t,open:n,modifiers:i,children:a,ownerState:{loading:r,size:l="md"},...s}=e,u=Er(null),f=a[0].every(h=>h.hasOwnProperty("group")),d=r?[a[1]]:a[0].length===0?[a[2]]:f?a[0].flatMap(h=>[B.createElement(Jr,{key:h.key,component:"li"},h.group),...h.children]):a[0],b=qr({count:d.length,estimateSize:()=>36,getScrollElement:()=>u.current,overscan:5}),m=b.getVirtualItems();return Hr(()=>{n&&b.measure()},[n]),B.createElement(Gr,{ref:o,anchorEl:t,open:n,modifiers:i},B.createElement(Yr,{...s},B.createElement("div",{ref:u,style:{overflow:"auto"}},B.createElement("div",{style:{height:`${b.getTotalSize()}px`,position:"relative"}},m.map(({index:h,size:p,start:g})=>B.cloneElement(d[h],{style:{position:"absolute",top:0,left:0,width:"100%",fontSize:`var(--ceed-fontSize-${l})`,height:`${p}px`,transform:`translateY(${g}px)`},children:B.createElement("div",{style:{textOverflow:"ellipsis",textWrap:"nowrap",overflow:"hidden"}},d[h].props.children)}))))))});function nt(e){let{label:o,error:t,helperText:n,color:i,size:a,disabled:r,required:l,onChange:s,onChangeComplete:u,...f}=e,[d,b]=zr(e.value||e.defaultValue),m=ce(()=>e.options.map(c=>typeof c!="object"?{value:c,label:c}:c),[e.options]),h=ce(()=>new Set(m.map(c=>c.value)),[e.options]),p=ce(()=>e.loading?{value:"",label:"",startDecorator:B.createElement($r,{size:"sm",color:"neutral",variant:"plain",thickness:3})}:typeof d=="string"?m.find(c=>c.value===d)??d:d,[d,e.options,e.loading]),g=Sr(c=>B.isValidElement(c)&&!e.loading?B.cloneElement(c,{size:a}):c,[a,e.loading]),v=ce(()=>g(p?.startDecorator||e.startDecorator),[p,g]),T=ce(()=>g(p?.endDecorator||e.endDecorator),[p,g]),k=B.createElement(Or,{...f,required:l,onChange:(c,y)=>{b(y);let N=y;s?.({...c,target:{...c.target,value:N?.value}}),h.has(N.value)&&u?.({...c,target:{...c.target,value:N?.value}})},color:i,value:p,options:m,size:a,disabled:r,startDecorator:v,endDecorator:T,getOptionLabel:c=>`${c.value??""}`,slots:{listbox:_r},renderOption:(c,y)=>B.createElement(Vr,{...c},y.startDecorator&&B.createElement(rt,{sx:{marginInlineEnd:"var(--Input-gap)"}},g(y.startDecorator)),g(y.label),y.endDecorator&&B.createElement(rt,{sx:{marginInlineStart:"var(--Input-gap)"}},g(y.endDecorator))),renderGroup:c=>c});return o?B.createElement(A,{required:l,color:i,size:a,error:t,disabled:r},B.createElement(F,null,o),k,n&&B.createElement(I,null,n)):k}import{Box as jr}from"@mui/joy";import{motion as Rr}from"framer-motion";var Zr=Rr(jr),ue=Zr;ue.displayName="Box";var qe=ue;import Y from"react";import{Breadcrumbs as lt,Link as ln}from"@mui/joy";import so from"react";import{Menu as Xr,MenuButton as Qr,MenuItem as Kr}from"@mui/joy";import{motion as mo}from"framer-motion";var en=mo(Xr),ge=e=>so.createElement(en,{...e});ge.displayName="Menu";var on=mo(Qr),fe=e=>so.createElement(on,{...e});fe.displayName="MenuButton";var tn=mo(Kr),he=e=>so.createElement(tn,{...e});he.displayName="MenuItem";var at=ge;import{Dropdown as rn}from"@mui/joy";import{motion as nn}from"framer-motion";var an=nn(rn),be=an;be.displayName="Dropdown";var it=be;function po(e){let{crumbs:o,size:t,startCrumbCount:n=1,endCrumbCount:i=3,slots:{link:a,...r}={link:ln},slotProps:{link:l,...s}={link:{color:"neutral"}},collapsed:u=!0,...f}=e,d=g=>g.type==="link"&&a?Y.createElement(a,{to:g.linkHref,href:g.linkHref,...l},g.label):Y.createElement(L,null,g.label);if(!u)return Y.createElement(lt,{size:t,slots:r,slotProps:s,...f},o.map(g=>Y.createElement(d,{...g})));let b=Math.max(1,i),m=o.slice(0,n).map(g=>Y.createElement(d,{...g})),h=(n+b>o.length?o.slice(n):o.slice(-b)).map(g=>Y.createElement(d,{...g})),p=o.slice(n,-b).map(g=>Y.createElement(he,null,Y.createElement(d,{...g})));return Y.createElement(lt,{size:t,slots:r,slotProps:s,...f},m,p.length&&Y.createElement(it,null,Y.createElement(fe,{size:t,variant:"plain"},"..."),Y.createElement(at,{size:t},p)),h)}po.displayName="Breadcrumbs";import sn,{forwardRef as mn}from"react";import{Button as pn}from"@mui/joy";import{motion as dn}from"framer-motion";var cn=dn(pn),Ce=mn((e,o)=>sn.createElement(cn,{ref:o,...e}));Ce.displayName="Button";var P=Ce;import x,{Fragment as xe,forwardRef as vn,useMemo as ft}from"react";import{styled as U}from"@mui/joy";import Mn from"@mui/icons-material/esm/ChevronLeft.js";import kn from"@mui/icons-material/esm/ChevronRight.js";import{AnimatePresence as ht,motion as Dn}from"framer-motion";var st=e=>{let o=[],t=new Date(e.getFullYear(),e.getMonth(),1),n=new Date(e.getFullYear(),e.getMonth()+1,0),i=Math.ceil((t.getDay()+1)/7),a=Math.ceil((n.getDate()+t.getDay())/7),r=1;for(let l=1;l<=a;l++){let s=[];for(let u=1;u<=7;u++)l===i&&u<t.getDay()+1||r>n.getDate()?s.push(void 0):(s.push(r),r++);o.push(s)}return o},mt=(e,o)=>e.toLocaleString(o,{year:"numeric"}),co=(e,o)=>e.toLocaleString(o,{year:"numeric",month:"long"}),pt=(e,o)=>new Date(0,e).toLocaleString(o,{month:"short"}),dt=e=>{let o=new Date().getDay(),t=new Date;return t.setDate(t.getDate()-o),Array.from({length:7}).map(()=>{let n=t.toLocaleString(e,{weekday:"short"});return t.setDate(t.getDate()+1),n})},ct=e=>{let o=new Date,t=new Date(e);return t.setHours(0,0,0,0),o.setHours(0,0,0,0),t.getTime()===o.getTime()},uo=(e,o)=>{let t=new Date(e),n=new Date(o);return t.setHours(0,0,0,0),n.setHours(0,0,0,0),t.getTime()===n.getTime()},R=(e,o,t)=>{let n=new Date(t);n.setHours(0,0,0,0);let i=new Date(Math.min(e.getTime(),o.getTime())),a=new Date(Math.max(e.getTime(),o.getTime()));return n>=i&&n<=a},We=(e,o)=>e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth();import un from"react";import{IconButton as gn}from"@mui/joy";import{motion as fn}from"framer-motion";var hn=fn(gn),ye=e=>un.createElement(hn,{...e});ye.displayName="IconButton";var V=ye;import{useCallback as bn,useMemo as Cn,useState as Ge}from"react";import{useThemeProps as yn}from"@mui/joy";var xn=(e,o)=>o.includes(e)?e:o[0],ut=e=>{let[o,t]=Ge(()=>xn(e.view||"day",e.views||["day","month"])),[n,i]=Ge(e.defaultValue),[a,r]=Ge(()=>{let p=new Date;return p.setDate(1),p.setHours(0,0,0,0),e.value?.[0]||e.defaultValue?.[0]||p}),[[l,s],u]=Ge([0,0]),f=e.view??o,d=p=>{u([l+p,p])},b=bn(p=>{r(p),f==="month"?a.getFullYear()!==p.getFullYear()&&d(p>a?1:-1):d(p>a?1:-1),e.onMonthChange?.(p)},[e.onMonthChange,a,f]),m=yn({props:{locale:"default",views:["day","month"],view:f,value:e.value??n,...e,onChange:e.value?e.onChange:p=>{i(p),e.onChange?.(p)},onMonthChange:b,onViewChange:()=>{let p=f==="month"?"day":"month";!(!e.views||e.views.includes(p))||e.view===p||(e.onViewChange?e.onViewChange(p):t(p))}},name:"Calendar"}),h=Cn(()=>({...m,viewMonth:a,direction:s}),[m,a,s]);return[m,h]};import{useCallback as ne,useState as gt}from"react";var _e=e=>{let[o,t]=gt(null),[n,i]=gt(null);return{calendarTitle:e.view==="month"?mt(e.viewMonth,e.locale||"default"):co(e.viewMonth,e.locale||"default"),onPrev:ne(()=>{if(e.view==="day"){let a=new Date(e.viewMonth||new Date);a.setMonth(a.getMonth()-1),e.onMonthChange?.(a)}else if(e.view==="month"){let a=new Date(e.viewMonth||new Date);a.setFullYear(a.getFullYear()-1),e.onMonthChange?.(a)}},[e.onMonthChange,e.viewMonth,e.view]),onNext:ne(()=>{if(e.view==="day"){let a=new Date(e.viewMonth||new Date);a.setMonth(a.getMonth()+1),e.onMonthChange?.(a)}else if(e.view==="month"){let a=new Date(e.viewMonth||new Date);a.setFullYear(a.getFullYear()+1),e.onMonthChange?.(a)}},[e.onMonthChange,e.viewMonth,e.view]),getDayCellProps:ne(a=>{let r=new Date(e.viewMonth||new Date);r.setHours(0,0,0,0),r.setDate(a);let l=e.rangeSelection&&e.value&&e.value[0]&&(o&&R(e.value[0],o,r)||e.value[1]&&R(e.value[0],e.value[1],r));return{"aria-label":r.toLocaleDateString(),"aria-current":l?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,o]),getMonthCellProps:ne(a=>{let r=new Date(e.viewMonth||new Date);r.setDate(1),r.setHours(0,0,0,0),r.setMonth(a);let s=!e.views?.find(u=>u==="day")&&e.rangeSelection&&e.value&&e.value[0]&&(n&&R(e.value[0],n,r)||e.value[1]&&R(e.value[0],e.value[1],r));return{"aria-label":r.toLocaleDateString(),"aria-current":s?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,n]),getPickerDayProps:ne(a=>{let r=new Date(e.viewMonth||new Date);r.setHours(0,0,0,0),r.setDate(a);let l=!!e.value&&(uo(r,e.value[0])||e.value[1]&&uo(r,e.value[1])),s=e.rangeSelection&&e.value&&e.value[0]&&(o&&R(e.value[0],o,r)||e.value[1]&&R(e.value[0],e.value[1],r)),u=()=>{e.rangeSelection?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),r.getTime())),new Date(Math.max(e.value[0].getTime(),r.getTime()))]):e.onChange?.([r,void 0]):e.onChange?.([r,void 0]):e.onChange?.([r,void 0]),t(null)};return{isToday:ct(r),isSelected:l,onClick:u,onMouseEnter:e.rangeSelection&&e.value?.[0]&&!e.value?.[1]?()=>t(r):void 0,disabled:e.minDate&&r<e.minDate||e.maxDate&&r>e.maxDate||e.disableFuture&&r>new Date||e.disablePast&&r<(()=>{let f=new Date;return f.setHours(0,0,0,0),f})(),tabIndex:-1,"aria-label":r.toLocaleDateString(),"aria-selected":l?"true":void 0,"aria-current":s?"date":void 0}},[e.onChange,e.value,e.viewMonth,e.rangeSelection,e.minDate,e.maxDate,e.disableFuture,e.disablePast,o]),getPickerMonthProps:ne(a=>{let r=new Date(e.viewMonth||new Date);r.setDate(1),r.setHours(0,0,0,0),r.setMonth(a);let l=!e.views?.find(b=>b==="day"),s=l&&e.rangeSelection,u=!!e.value&&(We(r,e.value[0])||e.value[1]&&We(r,e.value[1])),f=s&&e.value&&e.value[0]&&(n&&R(e.value[0],n,r)||e.value[1]&&R(e.value[0],e.value[1],r)),d=()=>{s?e.value?e.value[0]&&!e.value[1]?e.onChange?.([new Date(Math.min(e.value[0].getTime(),r.getTime())),new Date(Math.max(e.value[0].getTime(),r.getTime()))]):e.onChange?.([r,void 0]):e.onChange?.([r,void 0]):l?e.onChange?.([r,void 0]):(e.onViewChange?.("day"),e.onMonthChange?.(r)),i(null)};return{isSelected:u,onMouseEnter:s&&e.value?.[0]&&!e.value?.[1]?()=>i(r):void 0,disabled:e.minDate&&(()=>{let b=new Date(r);return b.setMonth(b.getMonth()+1),b.setDate(0),b<e.minDate})()||e.maxDate&&(()=>{let b=new Date(r);return b.setDate(0),b>e.maxDate})()||e.disableFuture&&r>new Date||e.disablePast&&r<new Date&&!We(r,new Date),onClick:d,tabIndex:-1,"aria-label":co(r,e.locale||"default"),"aria-selected":u?"true":void 0,"aria-current":f?"date":void 0}},[e.onMonthChange,e.onViewChange,e.onChange,e.viewMonth,e.locale,e.value,e.minDate,e.maxDate,e.disableFuture,e.disablePast,n])}};var Tn=U("div",{name:"Calendar",slot:"root"})({maxWidth:"264px"}),Pn=U("div",{name:"Calendar",slot:"calendarHeader"})(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:e.spacing(1)})),bt=U("div",{name:"Calendar",slot:"viewContainer"})(({theme:e,calendarType:o})=>({paddingLeft:e.spacing(1),paddingRight:e.spacing(1),position:"relative",overflow:"hidden",minHeight:o==="datePicker"?"250px":"unset"})),Ct=U(Dn.table,{name:"Calendar",slot:"viewTable"})(({theme:e})=>({borderSpacing:0,"& td, & th":{padding:0},"& th":{paddingTop:e.spacing(1),paddingBottom:e.spacing(1)}})),wn=U("thead",{name:"Calendar",slot:"weekHeaderContainer"})({}),In=U("tbody",{name:"Calendar",slot:"dayPickerContainer"})({}),An=U(P,{name:"Calendar",slot:"switchViewButton"})(({ownerState:e})=>[e.view==="month"&&{pointerEvents:"none"}]),Fn=U("td",{name:"Calendar",slot:"dayCell"})(({theme:e})=>({"&[aria-current=date]":{position:"relative","& button[aria-current=date]:not([aria-selected=true]):not(:hover):not(:active)":{backgroundColor:`rgb(${e.palette.primary.lightChannel})`},'& + td[aria-hidden] + td[aria-current="date"]::before':{content:'""',position:"absolute",top:0,left:"-10px",bottom:0,width:"16px",backgroundColor:`rgb(${e.palette.primary.lightChannel})`,zIndex:-1}}})),Bn=U("td",{name:"Calendar",slot:"monthCell"})(({theme:e})=>({"&[aria-current=date]":{position:"relative","& button[aria-current=date]:not([aria-selected=true]):not(:hover):not(:active)":{backgroundColor:`rgb(${e.palette.primary.lightChannel})`},'& + td[aria-hidden] + td[aria-current="date"]::before':{content:'""',position:"absolute",top:0,left:"-10px",bottom:0,width:"16px",backgroundColor:`rgb(${e.palette.primary.lightChannel})`,zIndex:-1}}})),Nn=U(P,{name:"Calendar",slot:"month"})(({theme:e,isSelected:o,disabled:t})=>[{width:"59px",textAlign:"center","&:hover":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softHoverBg},"&:active":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softActiveBg}},o&&{backgroundColor:e.palette.primary.solidBg,color:e.palette.primary.solidColor,"&:hover":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidHoverBg},"&:active":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidActiveBg}},t&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),Ln=U(P,{name:"Calendar",slot:"day"})(({theme:e,isToday:o,isSelected:t,disabled:n})=>[{width:"32px",height:"32px",textAlign:"center","&:hover":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softHoverBg},"&:active":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softActiveBg}},o&&!t&&{"&:not([aria-current=date]):not(:hover)":{border:`1px solid ${e.palette.neutral.outlinedBorder}`}},t&&{backgroundColor:e.palette.primary.solidBg,color:e.palette.primary.solidColor,"&:hover":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidHoverBg},"&:active":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidActiveBg}},n&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),yt={enter:e=>({x:e>0?300:-300,opacity:0}),center:{position:"relative",zIndex:1,x:0,opacity:1},exit:e=>({position:"absolute",zIndex:0,x:e<0?300:-300,opacity:0})},je=1e4,xt=(e,o)=>Math.abs(e)*o,Sn=e=>{let{ownerState:o}=e,{getPickerDayProps:t,getDayCellProps:n}=_e(o),i=ft(()=>st(o.viewMonth),[o.viewMonth]),a=ft(()=>dt(o.locale||"default"),[o.locale]);return x.createElement(bt,{calendarType:"datePicker"},x.createElement(ht,{initial:!1,custom:o.direction},x.createElement(Ct,{key:`${o.viewMonth.toString()}_${o.direction}`,custom:o.direction,variants:yt,initial:"enter",animate:"center",exit:"exit",transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}},drag:"x",dragConstraints:{left:0,right:0},dragElastic:1,onDragEnd:(r,{offset:l,velocity:s})=>{let u=xt(l.x,s.x);if(u<-je){let f=new Date(o.viewMonth||new Date);f.setMonth(f.getMonth()+1),o.onMonthChange?.(f)}else if(u>je){let f=new Date(o.viewMonth||new Date);f.setMonth(f.getMonth()-1),o.onMonthChange?.(f)}}},x.createElement(wn,null,x.createElement("tr",null,a.map((r,l)=>x.createElement(x.Fragment,null,x.createElement("th",null,x.createElement(L,{level:"body-xs",textAlign:"center"},r)),l<6&&x.createElement("th",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"}))))),x.createElement(In,null,i.map((r,l)=>x.createElement(xe,{key:`${o.viewMonth}_${l}`},x.createElement("tr",null,r.map((s,u)=>s?x.createElement(xe,{key:u},x.createElement(Fn,{...n(s)},x.createElement(Ln,{size:"sm",variant:"plain",color:"neutral",...t(s)},s)),u<6&&x.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})):x.createElement(xe,{key:u},x.createElement("td",null),u<6&&x.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&x.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},x.createElement("td",{colSpan:13,style:{height:4}}))))))))},Hn=e=>{let{ownerState:o}=e,{getPickerMonthProps:t,getMonthCellProps:n}=_e(o),i=Array.from({length:12},(r,l)=>l).reduce((r,l)=>(r[r.length-1].length===4&&r.push([]),r[r.length-1].push(l),r),[[]]),a=!o.views?.find(r=>r==="day");return x.createElement(bt,{calendarType:a?"monthPicker":"datePicker"},x.createElement(ht,{initial:!1,custom:o.direction},x.createElement(Ct,{key:`${o.viewMonth.getFullYear()}_${o.direction}`,custom:o.direction,variants:yt,initial:"enter",animate:"center",exit:"exit",transition:{x:{type:"spring",stiffness:300,damping:30},opacity:{duration:.2}},drag:"x",dragConstraints:{left:0,right:0},dragElastic:1,onDragEnd:(r,{offset:l,velocity:s})=>{let u=xt(l.x,s.x);if(u<-je){let f=new Date(o.viewMonth||new Date);f.setMonth(f.getMonth()+1),o.onMonthChange?.(f)}else if(u>je){let f=new Date(o.viewMonth||new Date);f.setMonth(f.getMonth()-1),o.onMonthChange?.(f)}}},x.createElement("tbody",null,i.map((r,l)=>x.createElement(xe,{key:l},x.createElement("tr",null,r.map((s,u)=>x.createElement(xe,{key:s},x.createElement(Bn,{...n(s)},x.createElement(Nn,{size:"sm",variant:"plain",color:"neutral",...t(s)},pt(s,o.locale))),u<3&&x.createElement("td",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&x.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},x.createElement("td",{colSpan:7,style:{height:4}}))))))))},ve=vn((e,o)=>{let[t,n]=ut(e),{value:i,defaultValue:a,onChange:r,locale:l,onViewChange:s,onMonthChange:u,view:f,views:d,rangeSelection:b,...m}=t,{calendarTitle:h,onPrev:p,onNext:g}=_e(n);return x.createElement(Tn,{ref:o,...m},x.createElement(Pn,null,x.createElement(V,{size:"sm",onClick:p},x.createElement(Mn,null)),x.createElement(An,{ownerState:n,variant:"plain",color:"neutral",onClick:s},h),x.createElement(V,{size:"sm",onClick:g},x.createElement(kn,null))),f==="day"&&x.createElement(Sn,{ownerState:n}),f==="month"&&x.createElement(Hn,{ownerState:n}))});ve.displayName="Calendar";var Q=ve;import{Card as En,CardContent as zn,CardCover as On,CardActions as Vn,CardOverflow as Jn}from"@mui/joy";import{motion as Me}from"framer-motion";var Yn=Me(En),ke=Yn;ke.displayName="Card";var $n=Me(zn),go=$n;go.displayName="CardContent";var Un=Me(On),fo=Un;fo.displayName="CardCover";var qn=Me(Vn),ho=qn;ho.displayName="CardActions";var Wn=Me(Jn),bo=Wn;bo.displayName="CardOverflow";import Gn from"react";import{Checkbox as _n}from"@mui/joy";import{motion as jn}from"framer-motion";var Rn=jn(_n),De=e=>Gn.createElement(Rn,{...e});De.displayName="Checkbox";var Te=De;import{Chip as Zn}from"@mui/joy";import{motion as Xn}from"framer-motion";var Qn=Xn(Zn),Co=Qn;Co.displayName="Chip";import{styled as Kn}from"@mui/joy";import ea,{forwardRef as oa}from"react";var ta=Kn("div",{name:"Container",slot:"root",shouldForwardProp:e=>e!=="maxWidth"})(({theme:e,maxWidth:o="lg"})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block",paddingLeft:e.spacing(2),paddingRight:e.spacing(2),...o==="sm"&&{[e.breakpoints.up("xs")]:{maxWidth:e.breakpoints.values.sm}},...o==="md"&&{[e.breakpoints.up("sm")]:{maxWidth:e.breakpoints.values.md}},...o==="lg"&&{[e.breakpoints.up("md")]:{maxWidth:e.breakpoints.values.lg}},...o==="xl"&&{[e.breakpoints.up("lg")]:{maxWidth:e.breakpoints.values.xl}}})),yo=oa(function(o,t){return ea.createElement(ta,{ref:t,...o})});yo.displayName="Container";import Z,{useCallback as ia,useMemo as la,useState as kt}from"react";import{IntlMessageFormat as sa}from"intl-messageformat";import{NumericFormat as ma}from"react-number-format";import pa from"@mui/icons-material/esm/InfoOutlined.js";import Pe from"react";import{Input as ra}from"@mui/joy";import{motion as na}from"framer-motion";var vt=na(ra),we=e=>{let{label:o,helperText:t,error:n,style:i,size:a,color:r,disabled:l,required:s,...u}=e;return o?Pe.createElement(A,{required:s,color:r,size:a,error:n,disabled:l},Pe.createElement(F,null,o),Pe.createElement(vt,{...u}),t&&Pe.createElement(I,null,t)):Pe.createElement(vt,{required:s,color:r,size:a,disabled:l,...u})};we.displayName="Input";var _=we;import aa from"intl-messageformat";var Mt=(e="usd")=>{let[o,t,n]=new aa(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split("");return{symbol:`${o} `,thousandSeparator:t,decimalSeparator:n,placeholder:n?`${o} 0${n}00`:`${o} 0`,fixedDecimalScale:!!n}};var da=Z.forwardRef(function(o,t){let{onChange:n,...i}=o;return Z.createElement(ma,{...i,onValueChange:({value:a})=>{n?.({target:{name:o.name,value:a}})},valueIsNumericString:!0,getInputRef:t,decimalScale:2})}),Dt=Z.forwardRef(function(o,t){let{currency:n="usd",max:i=1e5,name:a,onChange:r,label:l,error:s,helperText:u,required:f,disabled:d,useMinorUnit:b,...m}=o,{symbol:h,thousandSeparator:p,decimalSeparator:g,placeholder:v,fixedDecimalScale:T}=Mt(n),[M,k]=kt(o.value),[c,y]=kt(!!i&&!!o.value&&o.value>i),N=la(()=>M&&b?M/100:M,[M,b]),D=ia(ee=>{let te=Number(b?ee.target.value?.replace(g,""):ee.target.value);k(te),r?.({...ee,target:{name:a,value:te}}),i&&te>i?y(!0):y(!1)},[]),W=Z.createElement(_,{...m,size:"sm",ref:t,value:N,placeholder:v,onChange:D,disabled:d,required:f,slotProps:{input:{component:da,decimalSeparator:g,thousandSeparator:p,prefix:h,fixedDecimalScale:T}},sx:{fontFamily:"monospace"}});return l?Z.createElement(A,{size:"sm",disabled:d,required:f,error:s||c},Z.createElement(F,null,l),W,c?Z.createElement(I,null,Z.createElement(pa,null),new sa(`limit: {amount, number, ::currency/${n} unit-width-narrow}`).format({amount:i})):u&&Z.createElement(I,null,u)):W});import C,{useCallback as ae,useEffect as Mo,useMemo as ie,useRef as ha,useState as ba}from"react";import{styled as Ca,LinearProgress as ya}from"@mui/joy";import xa from"@mui/icons-material/esm/ChevronLeft.js";import va from"@mui/icons-material/esm/ChevronRight.js";import{Sheet as ca}from"@mui/joy";import{motion as ua}from"framer-motion";var ga=ua(ca),Ie=ga;Ie.displayName="Sheet";var $=Ie;import q from"react";import{Table as fa}from"@mui/joy";var Ae=e=>{let{children:o,...t}=e;return q.createElement(fa,{...t},o)};Ae.displayName="Table";function xo(e){let{headCells:o,showCheckbox:t,onCheckboxChange:n,slots:{checkbox:i=Te}={},slotProps:{checkbox:a={}}={}}=e;return q.createElement("thead",null,q.createElement("tr",null,t&&q.createElement("th",{style:{width:"40px",textAlign:"center"}},q.createElement(i,{onChange:n,...a})),o.map(r=>q.createElement("th",{key:r.label,style:{width:r.width,minWidth:r.minWidth,maxWidth:r.maxWidth,textAlign:r.numeric?"right":"left"}},r.label))))}xo.displayName="TableHead";function vo(e){let{rows:o,cellOrder:t,rowOptions:n,showCheckbox:i,onCheckboxChange:a,slots:{checkbox:r=Te}={},slotProps:{checkbox:l={}}={}}=e;return q.createElement("tbody",null,o.map((s,u)=>q.createElement("tr",{key:u},i&&q.createElement("td",{style:{textAlign:"center"}},q.createElement(r,{onChange:f=>a?.(f,u),...l})),t.map(f=>q.createElement("td",{key:f,style:{textAlign:n?.[f]?.numeric?"right":"left"}},s[f])))))}vo.displayName="TableBody";var Tt=Ca("tr",{name:"DataTable",slot:"overlayWrapper"})({position:"sticky",top:"calc(var(--unstable_TableCell-height, 32px))",left:0,right:0,zIndex:1,"& > td":{height:0,padding:0,border:"none !important"}}),Re=e=>"Intl"in window?new Intl.NumberFormat().format(e):e;function Ma(e){let{paginationModel:{page:o,pageSize:t},rowCount:n,onPageChange:i}=e,a=1,r=Math.ceil(n/t),l=[o-2,o-1].filter(d=>d>1),s=[o+1,o+2].filter(d=>d<=r-1),u=r>1&&o<r-3,f=r>1&&o>4;return C.createElement(O,{direction:"row",spacing:1,sx:{pt:1,pb:1},justifyContent:"end",alignItems:"center"},C.createElement(O,{direction:"row",spacing:.5,alignItems:"center"},C.createElement(V,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-1),disabled:o===a,"aria-label":"Previous page"},C.createElement(xa,null)),o!==a&&C.createElement(P,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(a)},a),f&&C.createElement(P,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-3)},"..."),l.map(d=>C.createElement(P,{key:d,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(d)},d)),C.createElement(P,{variant:"soft",size:"sm"},o),s.map(d=>C.createElement(P,{key:d,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(d)},d)),u&&C.createElement(P,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+3)},"..."),o!==r&&C.createElement(P,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(r)},r),C.createElement(V,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+1),disabled:o===r,"aria-label":"Next page"},C.createElement(va,null))))}var ka=e=>C.createElement(qe,{sx:{position:"absolute",top:0,right:0,bottom:0,width:"4px",cursor:"col-resize"},onMouseDown:o=>{let t=o.clientX,n=e.current?.getBoundingClientRect().width,i=r=>{n&&t&&(e.current.style.width=`${n+(r.clientX-t)}px`)},a=()=>{document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",a)};document.addEventListener("mousemove",i),document.addEventListener("mouseup",a)}}),Da=e=>{let o=ha(null),t={width:e.width,minWidth:e.minWidth??"50px",maxWidth:e.maxWidth,textAlign:e.type==="number"?"end":"start",position:e.stickyHeader?void 0:"relative"},n=e.resizable??!0?ka(o):null;return C.createElement("th",{ref:o,key:e.field,style:t},e.headerName??e.field,n)};function Ta({rows:e,columns:o,rowCount:t,pagination:n,paginationMode:i,paginationModel:a,onPaginationModelChange:r,selectionModel:l=[],onSelectionModelChange:s,getId:u,isTotalSelected:f}){let[d,b]=ba(a?.page||1),m=a?.pageSize||20,h=ae((c,y)=>u?.(c)??c?.id??`${(y||0)+(d-1)*m}`,[u??d,m]),p=ie(()=>new Set(l),[l]),g=ie(()=>!n||i==="server"?e:e.slice((d-1)*m,(d-1)*m+m),[e,d,m,i,n]),v=ie(()=>g.length>0&&g.every((c,y)=>p.has(h(c,y))),[g,p,d,m,h]),T=t||e.length,M=ie(()=>f??(T>0&&l.length===T),[f,l,T]),k=ae(c=>{b(c),r?.({page:c,pageSize:m})},[r]);return Mo(()=>{k(1)},[T]),Mo(()=>{let c=Math.max(1,Math.ceil(T/m));d>c&&k(c)},[d,T,m]),Mo(()=>{s?.([])},[d]),{rowCount:T,page:d,pageSize:m,onPaginationModelChange:k,getId:h,HeadCell:Da,dataInPage:g,isAllSelected:v,isTotalSelected:M,isSelectedRow:ae(c=>p.has(c),[p]),onAllCheckboxChange:ae(()=>{s?.(v?[]:g.map(h))},[v,g,s]),onCheckboxChange:ae((c,y)=>{if(p.has(y)){let N=l.filter(D=>D!==y);s?.(N)}else{let N=[...l,y];s?.(N)}},[l,s]),columns:ie(()=>o||Object.keys(e[0]||{}).map(c=>({field:c})),[e,o]),onTotalSelect:ae(()=>{s?.(M?[]:e.map(h),!M)},[M,e,s])}}function ko(e){let{rows:o,checkboxSelection:t,selectionModel:n,onSelectionModelChange:i,rowCount:a,columns:r,onPaginationModelChange:l,pagination:s,paginationMode:u,paginationModel:f,loading:d,slots:{checkbox:b=Te,toolbar:m,footer:h,loadingOverlay:p=()=>C.createElement(ya,{value:8,variant:"plain"})}={},slotProps:{checkbox:g={},toolbar:v,background:T={}}={},...M}=e,{columns:k,isAllSelected:c,isSelectedRow:y,onAllCheckboxChange:N,onCheckboxChange:D,getId:W,rowCount:ee,page:te,pageSize:et,onPaginationModelChange:er,dataInPage:or,isTotalSelected:ot,onTotalSelect:tt,HeadCell:tr}=Ta(e),rr=ie(()=>({page:te,pageSize:et}),[te,et]);return C.createElement(qe,null,C.createElement(O,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center"},!!t&&C.createElement(O,{direction:"row",spacing:1},!c&&C.createElement(L,{level:"body-xs"},Re(n?.length||0)," items selected"),c&&!ot&&C.createElement(O,{direction:"row",spacing:1,alignItems:"center"},C.createElement(L,{level:"body-xs"},"All ",Re(n?.length||0)," items on this page are selected."),C.createElement(P,{size:"sm",variant:"plain",onClick:tt},"Select all ",Re(ee??o.length)," items")),ot&&C.createElement(O,{direction:"row",spacing:1,alignItems:"center"},C.createElement(L,{level:"body-xs"},"All ",Re(ee??o.length)," items are selected."),C.createElement(P,{size:"sm",variant:"plain",color:"danger",onClick:tt},"Cancel"))),m&&C.createElement(m,{...v||{}})),C.createElement($,{variant:"outlined",sx:{overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"},...T},C.createElement(Ae,{...M},C.createElement("thead",null,C.createElement("tr",null,t&&C.createElement("th",{style:{width:"40px",textAlign:"center"}},C.createElement(b,{onChange:N,checked:c,indeterminate:(n||[]).length>0&&!c,...g})),k.map(oe=>C.createElement(tr,{key:oe.field,stickyHeader:e.stickyHeader,...oe})))),C.createElement("tbody",null,C.createElement(Tt,null,!!d&&C.createElement("td",null,C.createElement(qe,{sx:{position:"absolute",top:0,left:0,right:0}},C.createElement(p,null)))),C.createElement(Tt,null),or.map((oe,nr)=>{let re=W(oe,nr);return C.createElement("tr",{key:re,role:t?"checkbox":void 0,tabIndex:t?-1:void 0,onClick:t?G=>D(G,re):void 0,"aria-checked":t?y(re):void 0},t&&C.createElement("th",{scope:"row",style:{textAlign:"center"}},C.createElement(b,{onChange:G=>D(G,re),checked:y(re),...g})),k.map(G=>C.createElement("td",{key:G.field,style:{textAlign:G.type&&["number","date"].includes(G.type)?"end":"start"}},G.renderCell?.({row:oe,value:oe[G.field],id:re})??oe[G.field])))})),h&&C.createElement(h,null))),s&&C.createElement(Ma,{paginationModel:rr,rowCount:ee,onPageChange:er}))}ko.displayName="DataTable";import S,{forwardRef as Ba,useCallback as Pt,useEffect as Na,useImperativeHandle as La,useRef as Sa,useState as wt}from"react";import{IMaskInput as Ha,IMask as Do}from"react-imask";import Ea from"@mui/icons-material/esm/CalendarToday.js";import{styled as It}from"@mui/joy";import{FocusTrap as za,ClickAwayListener as Oa,Popper as Va}from"@mui/base";import{DialogActions as Pa,styled as wa}from"@mui/joy";import{motion as Ia}from"framer-motion";var Aa=Ia(Pa),Fa=wa(Aa)(({theme:e})=>({padding:e.spacing(1),gap:e.spacing(1),flexDirection:"row",justifyContent:"flex-end"})),Fe=Fa;Fe.displayName="DialogActions";var j=Fe;var Ja=It(Va,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Ya=It($,{name:"DatePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),At=e=>{let o=`${e.getDate()}`,t=`${e.getMonth()+1}`,n=e.getFullYear();return Number(o)<10&&(o="0"+o),Number(t)<10&&(t="0"+t),[n,t,o].join("/")},$a=S.forwardRef(function(o,t){let{onChange:n,...i}=o;return S.createElement(Ha,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/`m/`d",blocks:{d:{mask:Do.MaskedRange,from:1,to:31,maxLength:2},m:{mask:Do.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Do.MaskedRange,from:1900,to:9999}},format:At,parse:a=>{let r=a.split("/");return new Date(Number(r[0]),Number(r[1])-1,Number(r[2]))},autofix:"pad",overwrite:!0})}),Ft=Ba((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:s,disableFuture:u,disablePast:f,required:d,...b}=e,m=Sa(null),[h,p]=wt(e.value||""),[g,v]=wt(null),T=!!g;Na(()=>{p(e.value||"")},[e.value]),La(o,()=>m.current,[m.current]);let M=Pt(y=>{p(y.target.value),t?.(y)},[]),k=Pt(y=>{v(g?null:y.currentTarget),m.current?.focus()},[g,v,m]),c=S.createElement(za,{open:!0},S.createElement(S.Fragment,null,S.createElement(_,{...b,ref:m,size:"sm",value:h,onChange:M,placeholder:"YYYY/MM/DD",disabled:n,required:d,slotProps:{input:{component:$a,ref:m}},sx:{fontFamily:"monospace"},endDecorator:S.createElement(V,{variant:"plain",onClick:k},S.createElement(Ea,null))}),T&&S.createElement(Oa,{onClickAway:()=>v(null)},S.createElement(Ja,{id:"date-picker-popper",open:!0,anchorEl:g,placement:"bottom-end",onMouseDown:y=>y.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},S.createElement(Ya,{tabIndex:-1,role:"presentation"},S.createElement(Q,{value:Number.isNaN(new Date(h).getTime())?void 0:[new Date(h),void 0],onChange:([y])=>{M({target:{name:e.name,value:At(y)}}),v(null),m.current?.blur()},minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:u,disablePast:f}),S.createElement(j,{sx:{p:1}},S.createElement(P,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{M({target:{name:e.name,value:""}}),v(null),m.current?.blur()}},"Clear")))))));return i?S.createElement(A,{required:d,disabled:n,error:a,size:"sm"},S.createElement(F,null,i),c,r&&S.createElement(I,null,r)):c});import H,{forwardRef as Ua,useCallback as To,useEffect as qa,useImperativeHandle as Wa,useMemo as Ga,useRef as _a,useState as Bt}from"react";import{IMaskInput as ja,IMask as Po}from"react-imask";import Ra from"@mui/icons-material/esm/CalendarToday.js";import{styled as Nt}from"@mui/joy";import{FocusTrap as Za,ClickAwayListener as Xa,Popper as Qa}from"@mui/base";var Ka=Nt(Qa,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),ei=Nt($,{name:"DateRangePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({zIndex:e.zIndex.tooltip,width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),Lt=([e,o])=>{let t=n=>{let i=`${n.getDate()}`,a=`${n.getMonth()+1}`,r=n.getFullYear();return Number(i)<10&&(i="0"+i),Number(a)<10&&(a="0"+a),[r,a,i].join("/")};return[t(e),o?t(o):""].join(" - ")},St=e=>{let o=e.split(" - ")[0]||"",t=e.split(" - ")[1]||"",n=o.split("/"),i=t.split("/");return[new Date(Number(n[0]),Number(n[1])-1,Number(n[2])),new Date(Number(i[0]),Number(i[1])-1,Number(i[2]))]},oi=H.forwardRef(function(o,t){let{onChange:n,...i}=o;return H.createElement(ja,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/`m/`d - Y/`m/`d",blocks:{d:{mask:Po.MaskedRange,from:1,to:31,maxLength:2},m:{mask:Po.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Po.MaskedRange,from:1900,to:9999}},format:Lt,parse:St,autofix:"pad",overwrite:!0})}),wo=Ua((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:s,disableFuture:u,disablePast:f,required:d,...b}=e,m=_a(null),[h,p]=Bt(e.value||""),[g,v]=Bt(null),T=!!g,M=Ga(()=>h?St(h):void 0,[h]);qa(()=>{p(e.value||"")},[e.value]),Wa(o,()=>m.current,[m.current]);let k=To(D=>{p(D.target.value),t?.(D)},[t]),c=To(D=>{v(g?null:D.currentTarget),m.current?.focus()},[g,v,m]),y=To(([D,W])=>{!D||!W||(m.current?.blur(),p(Lt([D,W])),v(null))},[p,v,m]),N=H.createElement(Za,{open:!0},H.createElement(H.Fragment,null,H.createElement(_,{...b,ref:o,size:"sm",value:h,onChange:k,disabled:n,required:d,placeholder:"YYYY/MM/DD - YYYY/MM/DD",slotProps:{input:{component:oi,ref:m}},sx:{fontFamily:"monospace"},endDecorator:H.createElement(V,{variant:"plain",onClick:c},H.createElement(Ra,null))}),T&&H.createElement(Xa,{onClickAway:()=>v(null)},H.createElement(Ka,{id:"date-range-picker-popper",open:!0,anchorEl:g,placement:"bottom-end",onMouseDown:D=>D.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},H.createElement(ei,{tabIndex:-1,role:"presentation"},H.createElement(Q,{rangeSelection:!0,defaultValue:M,onChange:y,minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:u,disablePast:f}),H.createElement(j,{sx:{p:1}},H.createElement(P,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{p(""),v(null),m.current?.blur()}},"Clear")))))));return i?H.createElement(A,{required:d,disabled:n,error:a,size:"sm"},H.createElement(F,null,i),N,r&&H.createElement(I,null,r)):N});wo.displayName="DateRangePicker";import{DialogContent as ti,styled as ri}from"@mui/joy";import{motion as ni}from"framer-motion";var ai=ni(ti),ii=ri(ai)(({theme:e})=>({padding:e.spacing(0,3,2.5)})),Be=ii;Be.displayName="DialogContent";var Ze=Be;import{DialogTitle as li,styled as si}from"@mui/joy";import{motion as mi}from"framer-motion";var pi=mi(li),di=si(pi)(({theme:e})=>({padding:e.spacing(2,3)})),Ne=di;Ne.displayName="DialogTitle";var Xe=Ne;import Se from"react";import Qe from"react";import{Modal as ci,ModalDialog as ui,ModalClose as gi,ModalOverflow as fi,styled as Ht}from"@mui/joy";import{motion as Ke}from"framer-motion";var hi=Ke(ci),Io=hi;Io.displayName="Modal";var bi=Ke(ui),Et=Ht(bi)({padding:0}),Le=Et;Le.displayName="ModalDialog";var Ci=Ht(Ke(gi))(({theme:e})=>({top:e.spacing(1.5),right:e.spacing(3)})),eo=Ci;eo.displayName="ModalClose";var yi=Ke(fi),Ao=yi;Ao.displayName="ModalOverflow";function Fo(e){let{title:o,children:t,...n}=e;return Qe.createElement(Et,{...n},Qe.createElement(eo,null),Qe.createElement(Xe,null,o),Qe.createElement(Ze,null,t))}Fo.displayName="ModalFrame";import{styled as xi}from"@mui/joy";var vi=xi(Le)(({theme:e})=>({padding:0})),Bo=Se.forwardRef((e,o)=>{let{title:t,children:n,actions:i,...a}=e;return Se.createElement(vi,{ref:o,...a},Se.createElement(Xe,null,t),Se.createElement(Ze,null,n),Se.createElement(j,null,i))});Bo.displayName="DialogFrame";import Mi from"react";import{Divider as ki}from"@mui/joy";import{motion as Di}from"framer-motion";var Ti=Di(ki),He=e=>Mi.createElement(Ti,{...e});He.displayName="Divider";import Pi from"react";import{Drawer as wi}from"@mui/joy";import{motion as Ii}from"framer-motion";var Ai=Ii(wi),No=e=>{let{children:o,...t}=e;return Pi.createElement(Ai,{...t,slotProps:{...t.slotProps,content:{...t.slotProps?.content,sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}}}},o)};No.displayName="InsetDrawer";import w,{useCallback as oo,useEffect as Fi,useMemo as Bi,useRef as zt,useState as Lo}from"react";import{styled as K}from"@mui/joy";import Ni from"@mui/icons-material/esm/FileUploadRounded.js";import Li from"@mui/icons-material/esm/UploadFileRounded.js";import Si from"@mui/icons-material/esm/ClearRounded.js";import{combine as Hi}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/combine.js";import{dropTargetForExternal as Ei,monitorForExternal as zi}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/adapter.js";import{containsFiles as Ot,getFiles as Oi}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/file.js";import{preventUnhandled as Vt}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/prevent-unhandled.js";var Vi=K("input")({width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",position:"absolute"}),Ji=K(O,{name:"Uploader",slot:"PreviewRoot"})({}),Yi=K(ke,{name:"Uploader",slot:"UploadCard"})(({theme:e})=>({padding:e.spacing(1.25),border:`1px solid ${e.palette.neutral.outlinedBorder}`})),$i=K(Li,{name:"Uploader",slot:"UploadFileIcon"})(({theme:e})=>({color:e.palette.neutral[400],width:"32px",height:"32px"})),Ui=K(Si,{name:"Uploader",slot:"ClearIcon"})(({theme:e})=>({color:e.palette.neutral.plainColor,width:"18px",height:"18px"})),qi=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"],So=e=>{let o=e==0?0:Math.floor(Math.log(e)/Math.log(1024)),t=e/Math.pow(1024,o),n=qi[o];return Intl.NumberFormat("en-us",{style:"unit",unit:n,unitDisplay:"narrow"}).format(t)},Wi=e=>e.replace(/image\/\*/g,"any image file").replace(/video\/\*/g,"any video file").replace(/audio\/\*/g,"any audio file").replace(/\./,"").split(",").join(", "),Gi=e=>{let{files:o,onDelete:t}=e;return w.createElement(Ji,{gap:.5},o.map(n=>w.createElement(Yi,{key:n.name,size:"sm",color:"neutral"},w.createElement(O,{direction:"row",alignItems:"center",gap:1},w.createElement($i,null),w.createElement(O,{flex:"1"},w.createElement(L,{level:"body-sm",textColor:"common.black"},n.name),w.createElement(L,{level:"body-xs",fontWeight:"300",lineHeight:"1.33",textColor:"text.tertiary"},So(n.size))),w.createElement(V,{onClick:()=>t?.(n)},w.createElement(Ui,null))))))},_i=K(O,{name:"Uploader",slot:"root"})(({theme:e})=>({gap:e.spacing(1)})),ji=K($,{name:"Uploader",slot:"dropZone"})(({theme:e,state:o})=>({width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:e.spacing(5,2.5),gap:e.spacing(2),cursor:"pointer",backgroundColor:["idle","potential"].includes(o)?e.palette.background.surface:e.palette.primary.outlinedHoverBg,border:o==="idle"?`1px solid ${e.palette.neutral.outlinedBorder}`:`1px solid ${e.palette.primary.outlinedBorder}`})),Ri=K(Ni,{name:"Uploader",slot:"iconContainer"})(({theme:e})=>({color:e.palette.neutral.outlinedBorder,width:"32px",height:"32px"})),Ho=w.memo(e=>{let{accept:o,maxCount:t,name:n,maxSize:i,onChange:a}=e,r=zt(null),l=zt(null),[s,u]=Lo([]),[f,d]=Lo("idle"),[b,m]=Lo(),h=Bi(()=>[o&&`accepted file format: ${Wi(o)}`,i&&`maximum size: ${So(i)}`,t&&`up to ${t} files`].filter(M=>!!M).join(", "),[o,i,t]),p=oo(M=>{try{i&&M.forEach(c=>{if(c.size>i)throw new Error(`File size exceeds the limit: ${So(i)}`)});let k=[...s,...M];if(t&&k.length>t)throw new Error(`File count exceeds the limit: ${t}`);a?.({target:{name:n,value:k}}),m(void 0),u(k)}catch(k){m(k.message)}},[s]);Fi(()=>{let M=r.current;if(M)return Hi(Ei({element:M,canDrop:Ot,onDragEnter:()=>d("over"),onDragLeave:()=>d("potential"),onDrop:async({source:k})=>{let c=await Oi({source:k});p(c)}}),zi({canMonitor:Ot,onDragStart:()=>{d("potential"),Vt.start()},onDrop:()=>{d("idle"),Vt.stop()}}))});let g=oo(M=>{let k=Array.from(M.target.files||[]);p(k)},[p]),v=oo(M=>{u(k=>(a?.({target:{name:n,value:k.filter(c=>c!==M)}}),k.filter(c=>c!==M)))},[]),T=oo(()=>{l.current?.click()},[]);return w.createElement(_i,null,(!t||t&&s.length!==t)&&w.createElement(A,{error:!!b},w.createElement(ji,{state:f,ref:r,onClick:T},w.createElement(O,{alignItems:"center",gap:.5},w.createElement(Ri,null),w.createElement(O,{direction:"row",gap:.5},w.createElement(L,{level:"body-md",color:"primary"},"Click to Upload"),w.createElement(L,{level:"body-md",textColor:"text.primary"},"or drag file here")),h!==""&&w.createElement(L,{level:"body-xs",textColor:"text.secondary"},h.charAt(0).toUpperCase()+h.slice(1))),w.createElement(Vi,{type:"file",onChange:g,multiple:!0,accept:o,ref:l}),b&&w.createElement(I,null,b))),s.length>0&&w.createElement(Gi,{files:s,onDelete:v}))});Ho.displayName="Uploader";import{Grid as Zi}from"@mui/joy";import{motion as Xi}from"framer-motion";var Qi=Xi(Zi),Eo=Qi;Eo.displayName="Grid";import X from"react";import Ki from"react-markdown";import{Link as el}from"@mui/joy";var zo=e=>{let{children:o,color:t,textColor:n,defaultLevel:i="body-md",markdownOptions:a,...r}=e;return X.createElement(J,{color:t,textColor:n,...r},X.createElement(Ki,{...a,children:o,components:{h1:({children:l})=>X.createElement(J,{color:t,textColor:n,level:"h1"},l),h2:({children:l})=>X.createElement(J,{color:t,textColor:n,level:"h2"},l),h3:({children:l})=>X.createElement(J,{color:t,textColor:n,level:"h3"},l),h4:({children:l})=>X.createElement(J,{color:t,textColor:n,level:"h4"},l),p:({children:l})=>X.createElement(J,{color:t,textColor:n,level:i},l),a:({children:l,href:s})=>X.createElement(el,{href:s},l),hr:()=>X.createElement(He,null),...a?.components}}))};zo.displayName="Markdown";import E,{forwardRef as ol,useCallback as Jt,useEffect as tl,useImperativeHandle as rl,useRef as nl,useState as Yt}from"react";import{IMaskInput as al,IMask as $t}from"react-imask";import il from"@mui/icons-material/esm/CalendarToday.js";import{styled as Ut}from"@mui/joy";import{FocusTrap as ll,ClickAwayListener as sl,Popper as ml}from"@mui/base";var pl=Ut(ml,{name:"MonthPicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),dl=Ut($,{name:"MonthPicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),qt=e=>{let o=`${e.getMonth()+1}`,t=e.getFullYear();return Number(o)<10&&(o="0"+o),[t,o].join("/")},Oo=e=>(t=>{if(!/^\d\d\d\d\/(0[1-9]|1[012])(\/(0[1-9]|[23][0-9]))?$/.test(t))return t;let n=t.split("/"),i=new Date(Number(n[0]),Number(n[1])-1);return qt(i)})(e),Wt=e=>e.split(" - ")[0]||"",cl=E.forwardRef(function(o,t){let{onChange:n,...i}=o;return E.createElement(al,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/m",blocks:{m:{mask:$t.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:$t.MaskedRange,from:1900,to:9999}},format:Oo,parse:Wt})}),Gt=ol((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:s,disableFuture:u,disablePast:f,required:d,...b}=e,m=nl(null),[h,p]=Yt(e.value||""),[g,v]=Yt(null),T=!!g;tl(()=>{p(e.value?Oo(Wt(e.value)):"")},[e.value]),rl(o,()=>m.current,[m.current]);let M=Jt(y=>{console.log(y.target.value),p(y.target.value),t?.(y)},[]),k=Jt(y=>{v(g?null:y.currentTarget),m.current?.focus()},[g,v,m]),c=E.createElement(ll,{open:!0},E.createElement(E.Fragment,null,E.createElement(_,{...b,ref:m,size:"sm",value:h,onChange:M,placeholder:"YYYY/MM",disabled:n,required:d,slotProps:{input:{component:cl,ref:m}},sx:{fontFamily:"monospace"},endDecorator:E.createElement(V,{variant:"plain",onClick:k},E.createElement(il,null))}),T&&E.createElement(sl,{onClickAway:()=>v(null)},E.createElement(pl,{id:"date-picker-popper",open:!0,anchorEl:g,placement:"bottom-end",onMouseDown:y=>y.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},E.createElement(dl,{tabIndex:-1,role:"presentation"},E.createElement(Q,{view:"month",views:["month"],value:Number.isNaN(new Date(h).getTime())?void 0:[new Date(h),void 0],onChange:([y])=>{M({target:{name:e.name,value:Oo(qt(y))}}),v(null),m.current?.blur()},minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:u,disablePast:f}),E.createElement(j,{sx:{p:1}},E.createElement(P,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{M({target:{name:e.name,value:""}}),v(null),m.current?.blur()}},"Clear")))))));return i?E.createElement(A,{required:d,disabled:n,error:a,size:"sm"},E.createElement(F,null,i),c,r&&E.createElement(I,null,r)):c});import z,{forwardRef as ul,useCallback as Vo,useEffect as gl,useImperativeHandle as fl,useMemo as hl,useRef as bl,useState as _t}from"react";import{IMaskInput as Cl,IMask as jt}from"react-imask";import yl from"@mui/icons-material/esm/CalendarToday.js";import{styled as Rt}from"@mui/joy";import{FocusTrap as xl,ClickAwayListener as vl,Popper as Ml}from"@mui/base";var kl=Rt(Ml,{name:"MonthRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Dl=Rt($,{name:"MonthRangePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({zIndex:e.zIndex.tooltip,width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),Jo=e=>{let o=`${e.getMonth()+1}`,t=e.getFullYear();return Number(o)<10&&(o="0"+o),[t,o].join("/")},Yo=([e,o])=>{let t=n=>{if(!/^\d\d\d\d\/(0[1-9]|1[012])(\/(0[1-9]|[23][0-9]))?$/.test(n))return n;let i=n.split("/"),a=new Date(Number(i[0]),Number(i[1])-1);return Jo(a)};return[t(e),t(o)].join(" - ")},$o=e=>{let o=e.split(" - ")[0]||"",t=e.split(" - ")[1]||"";return[o,t]},Tl=z.forwardRef(function(o,t){let{onChange:n,...i}=o;return z.createElement(Cl,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/m - Y/m",blocks:{m:{mask:jt.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:jt.MaskedRange,from:1900,to:9999}},format:Yo,parse:$o})}),Uo=ul((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:s,disableFuture:u,disablePast:f,required:d,...b}=e,m=bl(null),[h,p]=_t(""),[g,v]=_t(null),T=!!g,M=hl(()=>h?$o(h).map(D=>new Date(D)):void 0,[h]);gl(()=>{p(e.value?Yo($o(e.value)):"")},[e.value]),fl(o,()=>m.current,[m.current]);let k=Vo(D=>{p(D.target.value),t?.(D)},[t]),c=Vo(D=>{v(g?null:D.currentTarget),m.current?.focus()},[g,v,m]),y=Vo(([D,W])=>{!D||!W||(p(Yo([Jo(D),Jo(W)])),v(null),m.current?.blur())},[p,v,m]),N=z.createElement(xl,{open:!0},z.createElement(z.Fragment,null,z.createElement(_,{...b,ref:o,size:"sm",value:h,onChange:k,disabled:n,required:d,placeholder:"YYYY/MM - YYYY/MM",slotProps:{input:{component:Tl,ref:m}},sx:{fontFamily:"monospace"},endDecorator:z.createElement(V,{variant:"plain",onClick:c},z.createElement(yl,null))}),T&&z.createElement(vl,{onClickAway:()=>v(null)},z.createElement(kl,{id:"date-range-picker-popper",open:!0,anchorEl:g,placement:"bottom-end",onMouseDown:D=>D.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},z.createElement(Dl,{tabIndex:-1,role:"presentation"},z.createElement(Q,{view:"month",views:["month"],rangeSelection:!0,defaultValue:M,onChange:y,minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:u,disablePast:f}),z.createElement(j,{sx:{p:1}},z.createElement(P,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{p(""),v(null),m.current?.blur()}},"Clear")))))));return i?z.createElement(A,{required:d,disabled:n,error:a,size:"sm"},z.createElement(F,null,i),N,r&&z.createElement(I,null,r)):N});Uo.displayName="MonthRangePicker";import{Radio as Pl,RadioGroup as wl}from"@mui/joy";import{motion as Zt}from"framer-motion";var Il=Zt(Pl),Ee=Il;Ee.displayName="Radio";var Al=Zt(wl),ze=Al;ze.displayName="RadioGroup";import Xt from"react";function qo(e){let{items:o,...t}=e;return Xt.createElement(ze,{...t},o.map(n=>Xt.createElement(Ee,{key:`${n.value}`,value:n.value,label:n.label})))}qo.displayName="RadioList";import Oe,{useMemo as Fl}from"react";import{Select as Bl,Option as Nl}from"@mui/joy";import{motion as Ll}from"framer-motion";var Sl=Ll(Nl),to=Sl;to.displayName="Option";function Wo(e){let{label:o,helperText:t,error:n,size:i,color:a,disabled:r,required:l,onChange:s,...u}=e,f=Fl(()=>e.options.map(m=>typeof m!="object"?{value:m,label:m}:m),[e.options]),b=Oe.createElement(Bl,{...u,required:l,disabled:r,size:i,color:a,onChange:(m,h)=>{let p=m||{target:{}},g={...p,target:{name:p.target?.name||e.name,value:h||void 0}};s?.(g)}},f.map(m=>Oe.createElement(to,{key:m.value,value:m.value},m.label)));return o?Oe.createElement(A,{required:l,disabled:r,size:i,color:a,error:n},Oe.createElement(F,null,o),b,t&&Oe.createElement(I,null,t)):b}Wo.displayName="Select";import Qt from"react";import{Switch as Hl,styled as El,switchClasses as zl}from"@mui/joy";import{motion as Kt}from"framer-motion";var Ol=Kt(Hl),Vl=El(Kt.div)({"--Icon-fontSize":"calc(var(--Switch-thumbSize) * 0.75)",display:"inline-flex",justifyContent:"center",alignItems:"center",position:"absolute",left:"var(--Switch-thumbOffset)",width:"var(--Switch-thumbWidth)",height:"var(--Switch-thumbSize)",borderRadius:"var(--Switch-thumbRadius)",boxShadow:"var(--Switch-thumbShadow)",color:"var(--Switch-thumbColor)",backgroundColor:"var(--Switch-thumbBackground)",[`&.${zl.checked}`]:{left:"unset",right:"var(--Switch-thumbOffset)"}}),Jl=e=>Qt.createElement(Vl,{...e,layout:!0,transition:Yl}),Yl={type:"spring",stiffness:700,damping:30},Go=e=>Qt.createElement(Ol,{...e,slots:{thumb:Jl,...e.slots}});Go.displayName="Switch";import{Tabs as $l,Tab as Ul,TabList as ql,TabPanel as Wl,styled as Gl,tabClasses as _l}from"@mui/joy";import{motion as ro}from"framer-motion";var jl=ro($l),_o=jl;_o.displayName="Tabs";var Rl=Gl(ro(Ul))(({theme:e})=>({[`&:not(.${_l.selected})`]:{color:e.palette.neutral[700]}})),jo=Rl;jo.displayName="Tab";var Zl=ro(ql),Ro=Zl;Ro.displayName="TabList";var Xl=ro(Wl),Zo=Xl;Zo.displayName="TabPanel";import no from"react";import{Textarea as Ql}from"@mui/joy";import{motion as Kl}from"framer-motion";var es=Kl(Ql),Xo=e=>{let{label:o,error:t,helperText:n,color:i,size:a,disabled:r,required:l,...s}=e,u=no.createElement(es,{required:l,disabled:r,color:i,size:a,...s});return o?no.createElement(A,{required:l,disabled:r,color:i,size:a,error:t},no.createElement(F,null,o),u,n&&no.createElement(I,null,n)):u};Xo.displayName="Textarea";import ao from"react";import{CssBaseline as os,CssVarsProvider as ts,checkboxClasses as rs,extendTheme as ns}from"@mui/joy";var as=ns({cssVarPrefix:"ceed",components:{JoyTable:{defaultProps:{size:"sm",borderAxis:"bothBetween"},styleOverrides:{root:({theme:e})=>({"--TableRow-stripeBackground":e.palette.background.level1,"--TableCell-selectedBackground":e.palette.background.level2,"--TableRow-hoverBackground":e.palette.background.level3,"& tbody tr[aria-checked=false] th":{"--TableCell-headBackground":"transparent"},"& tbody tr[aria-checked=true]:hover th":{"--TableCell-headBackground":"var(--TableRow-hoverBackground)"},"& tbody tr[aria-checked=true]:not(:hover) th":{"--TableCell-headBackground":"var(--TableCell-selectedBackground)"},"& tbody tr[aria-checked=true]:not(:hover) td":{"--TableCell-dataBackground":"var(--TableCell-selectedBackground)"},[`& .${rs.root}`]:{verticalAlign:"middle"}})}},JoyTooltip:{defaultProps:{size:"sm",placement:"top"}}}});function Qo(e){return ao.createElement(ao.Fragment,null,ao.createElement(ts,{theme:as},ao.createElement(os,null),e.children))}Qo.displayName="ThemeProvider";import is from"react";import{Tooltip as ls}from"@mui/joy";import{motion as ss}from"framer-motion";var ms=ss(ls),Ko=e=>is.createElement(ms,{...e});Ko.displayName="Tooltip";export{$e as Accordion,Ye as AccordionDetails,Je as AccordionSummary,io as Accordions,lo as Alert,Rh as AspectRatio,nt as Autocomplete,Jh as AutocompleteListbox,Yh as AutocompleteOption,Wh as Avatar,_h as AvatarGroup,Xh as Badge,ue as Box,po as Breadcrumbs,Ce as Button,ve as Calendar,ke as Card,ho as CardActions,go as CardContent,fo as CardCover,bo as CardOverflow,De as Checkbox,Co as Chip,ib as CircularProgress,yo as Container,Dt as CurrencyInput,ko as DataTable,Ft as DatePicker,wo as DateRangePicker,Fe as DialogActions,Be as DialogContent,Bo as DialogFrame,Ne as DialogTitle,He as Divider,sb as Drawer,be as Dropdown,me as FormControl,de as FormHelperText,pe as FormLabel,Eo as Grid,ye as IconButton,we as Input,No as InsetDrawer,pb as LinearProgress,Pb as Link,cb as List,gb as ListDivider,hb as ListItem,Cb as ListItemButton,xb as ListItemContent,Mb as ListItemDecorator,Db as ListSubheader,zo as Markdown,ge as Menu,fe as MenuButton,he as MenuItem,Io as Modal,eo as ModalClose,Le as ModalDialog,Fo as ModalFrame,Ao as ModalOverflow,Gt as MonthPicker,Uo as MonthRangePicker,to as Option,Ee as Radio,ze as RadioGroup,qo as RadioList,Wo as Select,Ie as Sheet,zb as Skeleton,Ib as Slider,se as Stack,Fb as Step,Nb as StepButton,Sb as StepIndicator,Hb as Stepper,Go as Switch,jo as Tab,Ro as TabList,Zo as TabPanel,Ae as Table,vo as TableBody,xo as TableHead,_o as Tabs,Xo as Textarea,Qo as ThemeProvider,Ko as Tooltip,J as Typography,Ho as Uploader,Eh as accordionClasses,zh as accordionDetailsClasses,Vh as accordionSummaryClasses,Oh as accordionsClasses,oh as alertClasses,Zh as aspectRatioClasses,$h as autocompleteClasses,Uh as autocompleteListboxClasses,qh as autocompleteOptionClasses,Gh as avatarClasses,jh as avatarGroupClasses,Qh as badgeClasses,th as boxClasses,Kh as breadcrumbsClasses,rh as buttonClasses,ob as cardActionsClasses,eb as cardClasses,tb as cardContentClasses,rb as cardCoverClasses,nb as cardOverflowClasses,nh as checkboxClasses,ab as chipClasses,lb as circularProgressClasses,Bh as dialogActionsClasses,Fh as dialogContentClasses,Ah as dialogTitleClasses,ah as dividerClasses,mb as drawerClasses,yh as formControlClasses,vh as formHelperTextClasses,xh as formLabelClasses,Mh as gridClasses,ih as iconButtonClasses,lh as inputClasses,db as linearProgressClasses,wb as linkClasses,ub as listClasses,fb as listDividerClasses,yb as listItemButtonClasses,bb as listItemClasses,vb as listItemContentClasses,kb as listItemDecoratorClasses,Tb as listSubheaderClasses,mh as menuButtonClasses,sh as menuClasses,ph as menuItemClasses,Th as modalClasses,Ph as modalCloseClasses,wh as modalDialogClasses,Ih as modalOverflowClasses,dh as optionClasses,ch as radioClasses,uh as radioGroupClasses,gh as selectClasses,Dh as sheetClasses,Ob as skeletonClasses,Ab as sliderClasses,kh as stackClasses,Lb as stepButtonClasses,Bb as stepClasses,Eb as stepperClasses,fh as switchClasses,Sh as tabListClasses,Hh as tabPanelClasses,hh as tableClasses,Lh as tabsClasses,bh as textareaClasses,Nh as tooltipClasses,Ch as typographyClasses,Kf as useColorScheme,Qf as useTheme,eh as useThemeProps};
|