@ceed/ads 0.0.176 → 0.0.177-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,77 +1,6 @@
1
- import React, { ComponentProps, ReactNode } from "react";
2
- import { Table } from "../Table";
3
- export type ColumnDef<T extends Record<string, V>, V = unknown> = {
4
- type?: "number" | "string" | "date";
5
- field: keyof T;
6
- headerName?: string;
7
- width?: string;
8
- minWidth?: string;
9
- maxWidth?: string;
10
- resizable?: boolean;
11
- renderCell?: (params: {
12
- row: T;
13
- value?: V;
14
- id: string;
15
- }) => ReactNode;
16
- required?: boolean;
17
- };
18
- export type DataTableProps<T extends Record<string, unknown>> = {
19
- rows: T[];
20
- checkboxSelection?: boolean;
21
- columns: ColumnDef<T>[];
22
- /**
23
- * 체크박스가 있는 경우, 체크박스를 클릭했을 때 선택된 row의 index를 지정한다.
24
- */
25
- selectionModel?: string[];
26
- onSelectionModelChange?: (newSelectionModel: string[],
27
- /**
28
- * Total Select를 클릭한 경우에만 값이 true/false로 들어온다.
29
- * MUI에는 없는 인터페이스지만 Total Select 기능이 추가되었기 때문에 추가해야했다.
30
- */
31
- isTotalSelected?: boolean) => void;
32
- pagination?: boolean;
33
- paginationMode?: "client" | "server";
34
- paginationModel?: {
35
- page: number;
36
- pageSize: number;
37
- };
38
- onPaginationModelChange?: (model: {
39
- page: number;
40
- pageSize: number;
41
- }) => void;
42
- /**
43
- * Rows의 총 갯수를 직접 지정 할 수 있다.
44
- * 기본적으로는 rows.length를 사용하지만, 이 값을 지정하면 rows.length를 사용하지 않는다.
45
- * server mode를 사용할 때 유용하다.
46
- */
47
- rowCount?: number;
48
- loading?: boolean;
49
- getId?: (row: T) => string;
50
- /**
51
- * 기본적으로 Uncontrolled로 작동하지만, Controlled로 작동하게 하고 싶을 때 사용한다.
52
- * 이 값이 true이면, 현재 페이지 이외에도 존재하는 모든 데이터가 선택된것으로 간주하고 동작한다.
53
- */
54
- isTotalSelected?: boolean;
55
- slots?: {
56
- checkbox?: React.ElementType;
57
- toolbar?: React.ElementType;
58
- footer?: React.ElementType;
59
- loadingOverlay?: React.ElementType;
60
- };
61
- slotProps?: {
62
- checkbox?: Partial<{
63
- checked: boolean;
64
- [key: string]: any;
65
- }>;
66
- toolbar?: Partial<{
67
- [key: string]: any;
68
- }>;
69
- background?: Partial<{
70
- [key: string]: any;
71
- }>;
72
- };
73
- } & ComponentProps<typeof Table>;
74
- declare function DataTable<T extends Record<string, unknown>>(props: DataTableProps<T>): React.JSX.Element;
1
+ import React from "react";
2
+ import { ClassOrRecord, DataTableProps } from "./type";
3
+ declare function DataTable<T extends ClassOrRecord>(props: DataTableProps<T>): React.JSX.Element;
75
4
  declare namespace DataTable {
76
5
  var displayName: string;
77
6
  }
@@ -0,0 +1,171 @@
1
+ import { ReactNode, ComponentProps } from "react";
2
+ import { Link } from "@mui/joy";
3
+ import { Table } from "../Table";
4
+ import CurrencyInput from "../CurrencyInput";
5
+ import DatePicker from "../DatePicker";
6
+ import Input from "../Input";
7
+ import Textarea from "../Textarea";
8
+ import Autocomplete from "../Autocomplete";
9
+ import Select from "../Select";
10
+ type IndexType = keyof any;
11
+ export type ClassOrRecord<V = any> = Record<IndexType, V> | {
12
+ [key: IndexType]: V;
13
+ };
14
+ export type RenderCellHandler<T extends ClassOrRecord, V = any> = (params: {
15
+ row: T;
16
+ value?: V;
17
+ id: IndexType;
18
+ }) => ReactNode;
19
+ export type CellEditStartEvent<T extends ClassOrRecord, V = any> = (params: {
20
+ originalRow: T;
21
+ row: T;
22
+ value?: V;
23
+ id: IndexType;
24
+ }) => void;
25
+ export type CellEditStopEvent<T extends ClassOrRecord, V = any> = (params: {
26
+ originalRow: T;
27
+ row: T;
28
+ value?: V;
29
+ id: IndexType;
30
+ }) => void;
31
+ export type BaseColumnDef<T extends Record<IndexType, V>, V> = {
32
+ field: keyof T;
33
+ headerName?: string;
34
+ width?: string;
35
+ minWidth?: string;
36
+ maxWidth?: string;
37
+ resizable?: boolean;
38
+ renderCell?: RenderCellHandler<T, V>;
39
+ isCellEditable?: ((params: {
40
+ row: T;
41
+ value?: V;
42
+ id: IndexType;
43
+ }) => boolean) | boolean;
44
+ required?: boolean;
45
+ onCellEditStart?: CellEditStartEvent<T, V>;
46
+ onCellEditStop?: CellEditStopEvent<T, V>;
47
+ };
48
+ export type AutocompleteColumnDef<T extends Record<IndexType, string>> = BaseColumnDef<T, string> & {
49
+ type: "autocomplete";
50
+ componentProps?: ComponentProps<typeof Autocomplete> | ((params: {
51
+ row: T;
52
+ value?: string;
53
+ id: string;
54
+ }) => ComponentProps<typeof Autocomplete>);
55
+ };
56
+ export type CurrencyColumnDef<T extends Record<IndexType, number>> = BaseColumnDef<T, number> & {
57
+ type: "currency";
58
+ componentProps?: ComponentProps<typeof CurrencyInput> | ((params: {
59
+ row: T;
60
+ value?: number;
61
+ id: string;
62
+ }) => ComponentProps<typeof CurrencyInput>);
63
+ };
64
+ export type DateColumnDef<T extends Record<IndexType, string>> = BaseColumnDef<T, string> & {
65
+ type: "date";
66
+ componentProps?: ComponentProps<typeof DatePicker> | ((params: {
67
+ row: T;
68
+ value?: string;
69
+ id: string;
70
+ }) => ComponentProps<typeof DatePicker>);
71
+ };
72
+ export type NumberColumnDef<T extends Record<IndexType, number>> = BaseColumnDef<T, number> & {
73
+ type: "number";
74
+ componentProps?: ComponentProps<typeof Input> | ((params: {
75
+ row: T;
76
+ value?: number;
77
+ id: string;
78
+ }) => ComponentProps<typeof Input>);
79
+ };
80
+ export type TextColumnDef<T extends Record<IndexType, string>> = BaseColumnDef<T, string> & {
81
+ type?: "text";
82
+ componentProps?: ComponentProps<typeof Input> | ((params: {
83
+ row: T;
84
+ value?: string;
85
+ id: string;
86
+ }) => ComponentProps<typeof Input>);
87
+ };
88
+ export type LongTextColumnDef<T extends Record<IndexType, string>> = BaseColumnDef<T, string> & {
89
+ type: "longText";
90
+ componentProps?: ComponentProps<typeof Textarea> | ((params: {
91
+ row: T;
92
+ value?: string;
93
+ id: string;
94
+ }) => ComponentProps<typeof Textarea>);
95
+ };
96
+ export type SelectColumnDef<T extends Record<IndexType, string>> = BaseColumnDef<T, string> & {
97
+ type: "select";
98
+ componentProps?: ComponentProps<typeof Select<string, false>> | ((params: {
99
+ row: T;
100
+ value?: string;
101
+ id: string;
102
+ }) => ComponentProps<typeof Select<string, false>>);
103
+ };
104
+ export type LinkColumnDef<T extends Record<IndexType, string>, C extends React.ElementType = typeof Link> = BaseColumnDef<T, string> & {
105
+ type: "link";
106
+ component?: C;
107
+ componentProps?: ComponentProps<C> | ((params: {
108
+ row: T;
109
+ value?: string;
110
+ id: string;
111
+ }) => ComponentProps<C>);
112
+ };
113
+ export type ColumnDef<T extends Record<IndexType, any>> = AutocompleteColumnDef<T> | CurrencyColumnDef<T> | DateColumnDef<T> | NumberColumnDef<T> | TextColumnDef<T> | LongTextColumnDef<T> | LinkColumnDef<T> | SelectColumnDef<T>;
114
+ export type DataTableProps<T extends Record<IndexType, any>> = {
115
+ rows: T[];
116
+ checkboxSelection?: boolean;
117
+ columns: ColumnDef<T>[];
118
+ editMode?: boolean;
119
+ /**
120
+ * 체크박스가 있는 경우, 체크박스를 클릭했을 때 선택된 row의 index를 지정한다.
121
+ */
122
+ selectionModel?: string[];
123
+ onSelectionModelChange?: (newSelectionModel: string[],
124
+ /**
125
+ * Total Select를 클릭한 경우에만 값이 true/false로 들어온다.
126
+ * MUI에는 없는 인터페이스지만 Total Select 기능이 추가되었기 때문에 추가해야했다.
127
+ */
128
+ isTotalSelected?: boolean) => void;
129
+ pagination?: boolean;
130
+ paginationMode?: "client" | "server";
131
+ paginationModel?: {
132
+ page: number;
133
+ pageSize: number;
134
+ };
135
+ onPaginationModelChange?: (model: {
136
+ page: number;
137
+ pageSize: number;
138
+ }) => void;
139
+ /**
140
+ * Rows의 총 갯수를 직접 지정 할 수 있다.
141
+ * 기본적으로는 rows.length를 사용하지만, 이 값을 지정하면 rows.length를 사용하지 않는다.
142
+ * server mode를 사용할 때 유용하다.
143
+ */
144
+ rowCount?: number;
145
+ loading?: boolean;
146
+ getId?: (row: T) => string;
147
+ /**
148
+ * 기본적으로 Uncontrolled로 작동하지만, Controlled로 작동하게 하고 싶을 때 사용한다.
149
+ * 이 값이 true이면, 현재 페이지 이외에도 존재하는 모든 데이터가 선택된것으로 간주하고 동작한다.
150
+ */
151
+ isTotalSelected?: boolean;
152
+ slots?: {
153
+ checkbox?: React.ElementType;
154
+ toolbar?: React.ElementType;
155
+ footer?: React.ElementType;
156
+ loadingOverlay?: React.ElementType;
157
+ };
158
+ slotProps?: {
159
+ checkbox?: Partial<{
160
+ checked: boolean;
161
+ [key: string]: any;
162
+ }>;
163
+ toolbar?: Partial<{
164
+ [key: string]: any;
165
+ }>;
166
+ background?: Partial<{
167
+ [key: string]: any;
168
+ }>;
169
+ };
170
+ } & ComponentProps<typeof Table>;
171
+ export {};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{useTheme as ph,useColorScheme as dh,useThemeProps as ch,alertClasses as uh,boxClasses as gh,buttonClasses as fh,checkboxClasses as hh,dividerClasses as Ch,iconButtonClasses as bh,inputClasses as yh,menuClasses as xh,menuButtonClasses as vh,menuItemClasses as Dh,optionClasses as Mh,radioClasses as kh,radioGroupClasses as Ph,selectClasses as Th,switchClasses as wh,tableClasses as Ah,textareaClasses as Ih,typographyClasses as Fh,formControlClasses as Bh,formLabelClasses as Nh,formHelperTextClasses as Lh,gridClasses as Sh,stackClasses as Eh,sheetClasses as Hh,modalClasses as Oh,modalCloseClasses as zh,modalDialogClasses as Vh,modalOverflowClasses as Yh,dialogTitleClasses as Jh,dialogContentClasses as Uh,dialogActionsClasses as Rh,tooltipClasses as $h,tabsClasses as Gh,tabListClasses as Wh,tabPanelClasses as qh,accordionClasses as _h,accordionDetailsClasses as Kh,accordionGroupClasses as jh,accordionSummaryClasses as Zh,AutocompleteListbox as Xh,AutocompleteOption as Qh,autocompleteClasses as eC,autocompleteListboxClasses as oC,autocompleteOptionClasses as tC,Avatar as rC,avatarClasses as nC,AvatarGroup as aC,avatarGroupClasses as iC,AspectRatio as lC,aspectRatioClasses as sC,Badge as mC,badgeClasses as pC,breadcrumbsClasses as dC,cardClasses as cC,cardActionsClasses as uC,cardContentClasses as gC,cardCoverClasses as fC,cardOverflowClasses as hC,chipClasses as CC,CircularProgress as bC,circularProgressClasses as yC,Drawer as xC,drawerClasses as vC,LinearProgress as DC,linearProgressClasses as MC,List as kC,listClasses as PC,ListDivider as TC,listDividerClasses as wC,ListItem as AC,listItemClasses as IC,ListItemButton as FC,listItemButtonClasses as BC,ListItemContent as NC,listItemContentClasses as LC,ListItemDecorator as SC,listItemDecoratorClasses as EC,ListSubheader as HC,listSubheaderClasses as OC,Link as zC,linkClasses as VC,Slider as YC,sliderClasses as JC,Step as UC,stepClasses as RC,StepButton as $C,stepButtonClasses as GC,StepIndicator as WC,Stepper as qC,stepperClasses as _C,Skeleton as KC,skeletonClasses as jC}from"@mui/joy";import ge from"react";import{AccordionGroup as gr,Accordion as fr,AccordionSummary as hr,AccordionDetails as Cr}from"@mui/joy";import{motion as We}from"framer-motion";var br=We(hr),qe=br;qe.displayName="AccordionSummary";var yr=We(Cr),_e=yr;_e.displayName="AccordionDetails";var xr=We(fr);function Ke(e){let{summary:o,details:t,variant:n,color:i,...a}=e,r=n==="solid"?"solid":void 0;return ge.createElement(xr,{variant:r,color:i,...a},ge.createElement(qe,{variant:r,color:i},o),ge.createElement(_e,{variant:r,color:i},t))}Ke.displayName="Accordion";var vr=We(gr);function fo(e){let{variant:o,color:t,items:n,...i}=e;return ge.createElement(vr,{variant:o,color:t,...i},n.map((a,r)=>ge.createElement(Ke,{key:r,summary:a.summary,details:a.details,index:r,variant:o,color:t})))}fo.displayName="Accordions";import je from"react";import{Alert as Ir,styled as Fr}from"@mui/joy";import{motion as Br}from"framer-motion";import Dr from"react";import{Typography as Mr}from"@mui/joy";import{motion as kr}from"framer-motion";var Pr=kr(Mr),$=e=>Dr.createElement(Pr,{...e});$.displayName="Typography";var U=$;import{Stack as Tr}from"@mui/joy";import{motion as wr}from"framer-motion";var Ar=wr(Tr),fe=Ar;fe.displayName="Stack";var V=fe;var Nr=Fr(Br(Ir))({alignItems:"flex-start",fontWeight:"unset"});function ho(e){let{title:o,content:t,actions:n,color:i="primary",...a}=e,r=e.invertedColors||e.variant==="solid";return je.createElement(Nr,{...a,color:i,endDecorator:n,invertedColors:r},je.createElement(V,null,o&&je.createElement(U,{level:"title-sm",color:i},o),je.createElement(U,{level:"body-sm",color:i},t)))}ho.displayName="Alert";import A,{useCallback as jr,useEffect as Zr,useMemo as ve,useRef as Xr,useState as Qr}from"react";import{Autocomplete as en,AutocompleteOption as on,ListSubheader as tn,AutocompleteListbox as rn,ListItemDecorator as ct,CircularProgress as nn,styled as ut}from"@mui/joy";import an from"@mui/icons-material/esm/Close.js";import{useVirtualizer as ln}from"@tanstack/react-virtual";import{Popper as sn}from"@mui/base";import{FormControl as Lr,styled as Sr}from"@mui/joy";import{motion as Er}from"framer-motion";var Hr=Sr(Er(Lr))({width:"100%"}),he=Hr;he.displayName="FormControl";var F=he;import{FormLabel as Or}from"@mui/joy";import{motion as zr}from"framer-motion";var Vr=zr(Or),Ce=Vr;Ce.displayName="FormLabel";var B=Ce;import{FormHelperText as Yr}from"@mui/joy";import{motion as Jr}from"framer-motion";var Ur=Jr(Yr),be=Ur;be.displayName="FormHelperText";var w=be;import{Chip as Rr}from"@mui/joy";import{motion as $r}from"framer-motion";var Gr=$r(Rr),ye=Gr;ye.displayName="Chip";var dt=ye;import Wr from"react";import{IconButton as qr}from"@mui/joy";import{motion as _r}from"framer-motion";var Kr=_r(qr),xe=e=>Wr.createElement(Kr,{...e});xe.displayName="IconButton";var L=xe;var mn=ut(sn,{name:"Autocomplete",slot:"Popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),pn=A.forwardRef((e,o)=>{let{anchorEl:t,open:n,modifiers:i,children:a,ownerState:{loading:r,size:l="md"},...s}=e,f=Xr(null),c=a[0].every(C=>C.hasOwnProperty("group")),d=r?[a[1]]:a[0].length===0?[a[2]]:c?a[0].flatMap(C=>[A.createElement(tn,{key:C.key,component:"li"},C.group),...C.children]):a[0],b=ln({count:d.length,estimateSize:()=>36,getScrollElement:()=>f.current,overscan:5}),m=b.getVirtualItems();return Zr(()=>{n&&b.measure()},[n]),A.createElement(mn,{ref:o,anchorEl:t,open:n,modifiers:i},A.createElement(rn,{...s},A.createElement("div",{ref:f,style:{overflow:"auto"}},A.createElement("div",{style:{height:`${b.getTotalSize()}px`,position:"relative"}},m.map(({index:C,size:u,start:p,key:x})=>A.cloneElement(d[C],{key:x,style:{position:"absolute",top:0,left:0,width:"100%",fontSize:`var(--ceed-fontSize-${l})`,height:`${u}px`,transform:`translateY(${p}px)`,overflow:"visible"},children:A.createElement("div",{style:{textOverflow:"ellipsis",textWrap:"nowrap",overflow:"hidden",width:"100%"}},d[C].props.children)}))))))}),Ze={sm:"20px",md:"24px",lg:"28px"},dn=ut(L,{name:"Autocomplete",slot:"tagDelete"})(({theme:e,size:o="md"})=>({width:Ze[o],height:Ze[o],minWidth:Ze[o],minHeight:Ze[o],borderRadius:"50%"}));function gt(e){let{label:o,error:t,helperText:n,color:i,size:a,disabled:r,required:l,onChange:s,onChangeComplete:f,...c}=e,[d,b]=Qr(e.value||e.defaultValue),m=ve(()=>e.options.map(g=>typeof g!="object"?{value:g,label:g}:g),[e.options]),C=ve(()=>{let g=new Map;return m.forEach(h=>{g.set(h.value,h)}),g},[e.options]),u=ve(()=>{if(e.loading)return{value:"",label:"",startDecorator:A.createElement(nn,{size:"sm",color:"neutral",variant:"plain",thickness:3})};if(d==null)return null;let g=h=>typeof h!="object"?C.get(h)??h:C.get(h.value);return Array.isArray(d)?d.map(g):g(d)},[d,e.options,e.loading]),p=jr(g=>A.isValidElement(g)&&!e.loading?A.cloneElement(g,{size:a}):g,[a,e.loading]),x=ve(()=>p(u?.startDecorator||e.startDecorator),[u,p]),M=ve(()=>p(u?.endDecorator||e.endDecorator),[u,p]),P=A.createElement(en,{...c,required:l,onChange:(g,h)=>{b(h);let k=h,D=Array.isArray(k)?k.map(z=>z.value):k?.value;s?.({...g,target:{...g.target,value:D}}),(Array.isArray(k)&&k.map(z=>C.get(z.value))||C.get(k?.value))&&f?.({...g,target:{...g.target,value:D}})},color:t?"danger":i,value:u,options:m,size:a,disabled:r,startDecorator:x,endDecorator:M,getOptionLabel:g=>`${g.value??""}`,renderTags:(g,h)=>g.map((k,D)=>{let{onClick:z,...q}=h({index:D});return p(A.createElement(dt,{color:"primary",...q},A.createElement(V,{direction:"row",alignItems:"center",gap:2,py:.5},k.value,p(A.createElement(dn,{color:"primary",variant:"soft",onClick:z},A.createElement(an,null))))))}),slots:{listbox:pn},renderOption:(g,h)=>A.createElement(on,{...g},h.startDecorator&&A.createElement(ct,{sx:k=>({marginInlineEnd:`var(--Input-gap, ${k.spacing(1)})`})},p(h.startDecorator)),p(h.label),h.endDecorator&&A.createElement(ct,{sx:k=>({marginInlineStart:`var(--Input-gap, ${k.spacing(1)})`})},p(h.endDecorator))),renderGroup:g=>g});return o?A.createElement(F,{required:l,color:i,size:a,error:t,disabled:r},A.createElement(B,null,o),P,n&&A.createElement(w,null,n)):P}import{Box as cn}from"@mui/joy";import{motion as un}from"framer-motion";var gn=un(cn),De=gn;De.displayName="Box";var Xe=De;import G from"react";import{Breadcrumbs as Ct,Link as kn}from"@mui/joy";import Co from"react";import{Menu as fn,MenuButton as hn,MenuItem as Cn}from"@mui/joy";import{motion as bo}from"framer-motion";var bn=bo(fn),Me=e=>Co.createElement(bn,{...e});Me.displayName="Menu";var yn=bo(hn),ke=e=>Co.createElement(yn,{...e});ke.displayName="MenuButton";var xn=bo(Cn),Pe=e=>Co.createElement(xn,{...e});Pe.displayName="MenuItem";var ft=Me;import{Dropdown as vn}from"@mui/joy";import{motion as Dn}from"framer-motion";var Mn=Dn(vn),Te=Mn;Te.displayName="Dropdown";var ht=Te;function yo(e){let{crumbs:o,size:t,startCrumbCount:n=1,endCrumbCount:i=3,slots:{link:a,...r}={link:kn},slotProps:{link:l,...s}={link:{color:"neutral"}},collapsed:f=!0,...c}=e,d=p=>p.type==="link"&&a?G.createElement(a,{to:p.linkHref,href:p.linkHref,...l},p.label):G.createElement(U,null,p.label);if(!f)return G.createElement(Ct,{size:t,slots:r,slotProps:s,...c},o.map(p=>G.createElement(d,{...p})));let b=Math.max(1,i),m=o.slice(0,n).map(p=>G.createElement(d,{...p})),C=(n+b>o.length?o.slice(n):o.slice(-b)).map(p=>G.createElement(d,{...p})),u=o.slice(n,-b).map(p=>G.createElement(Pe,null,G.createElement(d,{...p})));return G.createElement(Ct,{size:t,slots:r,slotProps:s,...c},m,u.length&&G.createElement(ht,null,G.createElement(ke,{size:t,variant:"plain"},"..."),G.createElement(ft,{size:t},u)),C)}yo.displayName="Breadcrumbs";import Pn,{forwardRef as Tn}from"react";import{Button as wn}from"@mui/joy";import{motion as An}from"framer-motion";var In=An(wn),we=Tn((e,o)=>Pn.createElement(In,{ref:o,...e}));we.displayName="Button";var I=we;import v,{Fragment as de,forwardRef as Sn,useMemo as Pt}from"react";import{styled as _}from"@mui/joy";import En from"@mui/icons-material/esm/ChevronLeft.js";import Hn from"@mui/icons-material/esm/ChevronRight.js";import{AnimatePresence as Tt,motion as On}from"framer-motion";var bt=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 f=1;f<=7;f++)l===i&&f<t.getDay()+1||r>n.getDate()?s.push(void 0):(s.push(r),r++);o.push(s)}return o},yt=(e,o)=>e.toLocaleString(o,{year:"numeric"}),xo=(e,o)=>e.toLocaleString(o,{year:"numeric",month:"long"}),xt=(e,o)=>new Date(0,e).toLocaleString(o,{month:"short"}),vt=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})},Dt=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()},vo=(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()},ee=(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},Qe=(e,o)=>e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth();import{useCallback as Fn,useMemo as Bn,useState as eo}from"react";import{useThemeProps as Nn}from"@mui/joy";var Ln=(e,o)=>o.includes(e)?e:o[0],Mt=e=>{let[o,t]=eo(()=>Ln(e.view||"day",e.views||["day","month"])),[n,i]=eo(e.defaultValue),[a,r]=eo(()=>{let u=new Date;return u.setDate(1),u.setHours(0,0,0,0),e.value?.[0]||e.defaultValue?.[0]||u}),[[l,s],f]=eo([0,0]),c=e.view??o,d=u=>{f([l+u,u])},b=Fn(u=>{r(u),c==="month"?a.getFullYear()!==u.getFullYear()&&d(u>a?1:-1):d(u>a?1:-1),e.onMonthChange?.(u)},[e.onMonthChange,a,c]),m=Nn({props:{locale:"default",views:["day","month"],view:c,value:e.value??n,...e,onChange:e.value?e.onChange:u=>{i(u),e.onChange?.(u)},onMonthChange:b,onViewChange:()=>{let u=c==="month"?"day":"month";!(!e.views||e.views.includes(u))||e.view===u||(e.onViewChange?e.onViewChange(u):t(u))}},name:"Calendar"}),C=Bn(()=>({...m,viewMonth:a,direction:s}),[m,a,s]);return[m,C]};import{useCallback as pe,useState as kt}from"react";var oo=e=>{let[o,t]=kt(null),[n,i]=kt(null);return{calendarTitle:e.view==="month"?yt(e.viewMonth,e.locale||"default"):xo(e.viewMonth,e.locale||"default"),onPrev:pe(()=>{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:pe(()=>{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:pe(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&&ee(e.value[0],o,r)||e.value[1]&&ee(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:pe(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(f=>f==="day")&&e.rangeSelection&&e.value&&e.value[0]&&(n&&ee(e.value[0],n,r)||e.value[1]&&ee(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:pe(a=>{let r=new Date(e.viewMonth||new Date);r.setHours(0,0,0,0),r.setDate(a);let l=!!e.value&&(vo(r,e.value[0])||e.value[1]&&vo(r,e.value[1])),s=e.rangeSelection&&e.value&&e.value[0]&&(o&&ee(e.value[0],o,r)||e.value[1]&&ee(e.value[0],e.value[1],r)),f=()=>{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:Dt(r),isSelected:l,onClick:f,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 c=new Date;return c.setHours(0,0,0,0),c})(),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:pe(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,f=!!e.value&&(Qe(r,e.value[0])||e.value[1]&&Qe(r,e.value[1])),c=s&&e.value&&e.value[0]&&(n&&ee(e.value[0],n,r)||e.value[1]&&ee(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:f,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&&!Qe(r,new Date),onClick:d,tabIndex:-1,"aria-label":xo(r,e.locale||"default"),"aria-selected":f?"true":void 0,"aria-current":c?"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 zn=_("div",{name:"Calendar",slot:"root"})({maxWidth:"264px"}),Vn=_("div",{name:"Calendar",slot:"calendarHeader"})(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:e.spacing(2)})),wt=_("div",{name:"Calendar",slot:"viewContainer",shouldForwardProp:e=>e!=="calendarType"})(({theme:e,calendarType:o})=>({paddingLeft:e.spacing(2),paddingRight:e.spacing(2),position:"relative",overflow:"hidden",minHeight:o==="datePicker"?"250px":"unset"})),At=_(On.table,{name:"Calendar",slot:"viewTable"})(({theme:e})=>({borderSpacing:0,"& td, & th":{padding:0},"& th":{paddingTop:e.spacing(2),paddingBottom:e.spacing(2)}})),Yn=_("thead",{name:"Calendar",slot:"weekHeaderContainer"})({}),Jn=_("tbody",{name:"Calendar",slot:"dayPickerContainer"})({}),Un=_(I,{name:"Calendar",slot:"switchViewButton"})(({ownerState:e})=>[e.view==="month"&&{pointerEvents:"none"}]),Rn=_("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}}})),$n=_("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}}})),Gn=_(I,{name:"Calendar",slot:"month",shouldForwardProp:e=>e!=="isSelected"})(({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}]),Wn=_(I,{name:"Calendar",slot:"day",shouldForwardProp:e=>!["isToday","isSelected"].includes(e)})(({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}]),It={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})},to=1e4,Ft=(e,o)=>Math.abs(e)*o,qn=e=>{let{ownerState:o}=e,{getPickerDayProps:t,getDayCellProps:n}=oo(o),i=Pt(()=>bt(o.viewMonth),[o.viewMonth]),a=Pt(()=>vt(o.locale||"default"),[o.locale]);return v.createElement(wt,{calendarType:"datePicker"},v.createElement(Tt,{initial:!1,custom:o.direction},v.createElement(At,{key:`${o.viewMonth.toString()}_${o.direction}`,custom:o.direction,variants:It,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 f=Ft(l.x,s.x);if(f<-to){let c=new Date(o.viewMonth||new Date);c.setMonth(c.getMonth()+1),o.onMonthChange?.(c)}else if(f>to){let c=new Date(o.viewMonth||new Date);c.setMonth(c.getMonth()-1),o.onMonthChange?.(c)}}},v.createElement(Yn,null,v.createElement("tr",null,a.map((r,l)=>v.createElement(de,{key:`${o.viewMonth}_${r}_${l}`},v.createElement("th",null,v.createElement(U,{level:"body-xs",textAlign:"center"},r)),l<6&&v.createElement("th",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"}))))),v.createElement(Jn,null,i.map((r,l)=>v.createElement(de,{key:`${o.viewMonth}_${l}`},v.createElement("tr",null,r.map((s,f)=>s?v.createElement(de,{key:f},v.createElement(Rn,{...n(s)},v.createElement(Wn,{size:"sm",variant:"plain",color:"neutral",...t(s)},s)),f<6&&v.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})):v.createElement(de,{key:f},v.createElement("td",null),f<6&&v.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&v.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},v.createElement("td",{colSpan:13,style:{height:4}}))))))))},_n=e=>{let{ownerState:o}=e,{getPickerMonthProps:t,getMonthCellProps:n}=oo(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 v.createElement(wt,{calendarType:a?"monthPicker":"datePicker"},v.createElement(Tt,{initial:!1,custom:o.direction},v.createElement(At,{key:`${o.viewMonth.getFullYear()}_${o.direction}`,custom:o.direction,variants:It,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 f=Ft(l.x,s.x);if(f<-to){let c=new Date(o.viewMonth||new Date);c.setMonth(c.getMonth()+1),o.onMonthChange?.(c)}else if(f>to){let c=new Date(o.viewMonth||new Date);c.setMonth(c.getMonth()-1),o.onMonthChange?.(c)}}},v.createElement("tbody",null,i.map((r,l)=>v.createElement(de,{key:l},v.createElement("tr",null,r.map((s,f)=>v.createElement(de,{key:s},v.createElement($n,{...n(s)},v.createElement(Gn,{size:"sm",variant:"plain",color:"neutral",...t(s)},xt(s,o.locale))),f<3&&v.createElement("td",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&v.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},v.createElement("td",{colSpan:7,style:{height:4}}))))))))},Ae=Sn((e,o)=>{let[t,n]=Mt(e),{value:i,defaultValue:a,onChange:r,locale:l,onViewChange:s,onMonthChange:f,view:c,views:d,rangeSelection:b,minDate:m,maxDate:C,disableFuture:u,disablePast:p,...x}=t,{calendarTitle:M,onPrev:T,onNext:P}=oo(n);return v.createElement(zn,{ref:o,...x},v.createElement(Vn,null,v.createElement(L,{size:"sm",onClick:T},v.createElement(En,null)),v.createElement(Un,{ownerState:n,variant:"plain",color:"neutral",onClick:s},M),v.createElement(L,{size:"sm",onClick:P},v.createElement(Hn,null))),c==="day"&&v.createElement(qn,{ownerState:n}),c==="month"&&v.createElement(_n,{ownerState:n}))});Ae.displayName="Calendar";var re=Ae;import{Card as Kn,CardContent as jn,CardCover as Zn,CardActions as Xn,CardOverflow as Qn}from"@mui/joy";import{motion as Ie}from"framer-motion";var ea=Ie(Kn),Fe=ea;Fe.displayName="Card";var oa=Ie(jn),Do=oa;Do.displayName="CardContent";var ta=Ie(Zn),Mo=ta;Mo.displayName="CardCover";var ra=Ie(Xn),ko=ra;ko.displayName="CardActions";var na=Ie(Qn),Po=na;Po.displayName="CardOverflow";import aa from"react";import{Checkbox as ia}from"@mui/joy";import{motion as la}from"framer-motion";var sa=la(ia),Be=e=>aa.createElement(sa,{...e});Be.displayName="Checkbox";var Ne=Be;import{styled as ma}from"@mui/joy";import pa,{forwardRef as da}from"react";var ca=ma("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(4),paddingRight:e.spacing(4),...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}}})),To=da(function(o,t){return pa.createElement(ca,{ref:t,...o})});To.displayName="Container";import ne,{useCallback as ba,useMemo as ya,useState as Nt}from"react";import{IntlMessageFormat as xa}from"intl-messageformat";import{NumericFormat as va}from"react-number-format";import Le from"react";import{Input as ua}from"@mui/joy";import{motion as ga}from"framer-motion";var fa=ga(ua),Se=Le.forwardRef((e,o)=>{let{label:t,helperText:n,error:i,style:a,size:r,color:l,disabled:s,required:f,...c}=e,d=Le.createElement(fa,{required:f,color:i?"danger":l,size:r,disabled:s,slotProps:{input:{ref:o,...c.slotProps?.input},...c.slotProps},...c});return t?Le.createElement(F,{required:f,color:l,size:r,error:i,disabled:s},Le.createElement(B,null,t),d,n&&Le.createElement(w,null,n)):d});Se.displayName="Input";var Z=Se;import ha from"intl-messageformat";var Ca={AED:2,ALL:2,AMD:2,ANG:2,AOA:2,ARS:2,AUD:2,AWG:2,AZN:2,BAM:2,BBD:2,BDT:2,BGN:2,BHD:3,BMD:2,BND:2,BOB:2,BRL:2,BSD:2,BWP:2,BYN:2,BZD:2,CAD:2,CHF:2,CLP:2,CNH:2,CNY:2,COP:2,CRC:2,CUP:2,CVE:0,CZK:2,DJF:0,DKK:2,DOP:2,DZD:2,EGP:2,ETB:2,EUR:2,FJD:2,FKP:2,GBP:2,GEL:2,GHS:2,GIP:2,GMD:2,GNF:0,GTQ:2,GYD:2,HKD:2,HNL:2,HTG:2,HUF:2,IDR:0,ILS:2,INR:2,IQD:3,ISK:2,JMD:2,JOD:3,JPY:0,KES:2,KGS:2,KHR:2,KMF:0,KRW:0,KWD:3,KYD:2,KZT:2,LAK:2,LBP:2,LKR:2,LYD:3,MAD:2,MDL:2,MKD:2,MMK:2,MNT:2,MOP:2,MRU:2,MUR:2,MVR:2,MWK:2,MXN:2,MYR:2,MZN:2,NAD:2,NGN:2,NIO:2,NOK:2,NPR:2,NZD:2,OMR:3,PAB:2,PEN:2,PGK:2,PHP:2,PKR:2,PLN:2,PYG:0,QAR:2,RON:2,RSD:2,RUB:2,RWF:0,SAR:2,SBD:2,SCR:2,SEK:2,SGD:2,SHP:2,SLE:2,SOS:2,SRD:2,STN:2,SVC:2,SZL:2,THB:2,TND:3,TOP:2,TRY:2,TTD:2,TWD:2,TZS:2,UAH:2,UGX:0,USD:2,UYU:2,UZS:2,VEF:2,VND:0,VUV:0,WST:2,XAF:0,XCD:2,XOF:0,XPF:0,YER:2,ZAR:2,ZMW:2},Bt=(e="USD")=>{let[o,t,n,...i]=new ha(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split(""),a=Ca[e];return{symbol:`${o} `,thousandSeparator:t,decimalSeparator:n,placeholder:n?`${o} 0${n}${Array.from(Array(a)).map(()=>0).join("")}`:`${o} 0`,fixedDecimalScale:!!n,decimalScale:a}};var Da=ne.forwardRef(function(o,t){let{onChange:n,...i}=o;return ne.createElement(va,{...i,onValueChange:({value:a})=>{n?.({target:{name:o.name,value:a}})},valueIsNumericString:!0,getInputRef:t,allowNegative:!1})}),Lt=ne.forwardRef(function(o,t){let{currency:n="USD",max:i,name:a,onChange:r,label:l,error:s,helperText:f,required:c,disabled:d,useMinorUnit:b,...m}=o,{symbol:C,thousandSeparator:u,decimalSeparator:p,placeholder:x,fixedDecimalScale:M,decimalScale:T}=Bt(n),[P,g]=Nt(o.value),h=ya(()=>P&&b?P/Math.pow(10,T):P,[P,b]),[k,D]=Nt(!!i&&!!h&&h>i),z=ba(Q=>{i&&Number(Q.target.value)>i?D(!0):D(!1);let ie=Number(b?Q.target.value?.replace(p,""):Q.target.value);g(ie),r?.({...Q,target:{name:a,value:ie}})},[]),q=ne.createElement(Z,{...m,size:"sm",ref:t,value:h,placeholder:x,onChange:z,disabled:d,required:c,color:s||k?"danger":o.color,slotProps:{input:{component:Da,decimalSeparator:p,thousandSeparator:u,prefix:C,fixedDecimalScale:M,decimalScale:T}},sx:{fontFamily:"monospace"}});return l?ne.createElement(F,{size:"sm",disabled:d,required:c,error:s||k},ne.createElement(B,null,l),q,k?ne.createElement(w,null,new xa(`limit: {amount, number, ::currency/${n} unit-width-narrow}`).format({amount:i})):f&&ne.createElement(w,null,f)):q});import y,{useCallback as ce,useEffect as Io,useMemo as ue,useRef as wa,useState as Aa}from"react";import{styled as Et,LinearProgress as Ia}from"@mui/joy";import Fa from"@mui/icons-material/esm/ChevronLeft.js";import Ba from"@mui/icons-material/esm/ChevronRight.js";import{Sheet as Ma}from"@mui/joy";import{motion as ka}from"framer-motion";var Pa=ka(Ma),Ee=Pa;Ee.displayName="Sheet";var W=Ee;import K from"react";import{Table as Ta}from"@mui/joy";var He=e=>{let{children:o,...t}=e;return K.createElement(Ta,{...t},o)};He.displayName="Table";function wo(e){let{headCells:o,showCheckbox:t,onCheckboxChange:n,slots:{checkbox:i=Ne}={},slotProps:{checkbox:a={}}={}}=e;return K.createElement("thead",null,K.createElement("tr",null,t&&K.createElement("th",{style:{width:"40px",textAlign:"center"}},K.createElement(i,{onChange:n,...a})),o.map(r=>K.createElement("th",{key:r.label,style:{width:r.width,minWidth:r.minWidth,maxWidth:r.maxWidth,textAlign:r.numeric?"right":"left"}},r.label))))}wo.displayName="TableHead";function Ao(e){let{rows:o,cellOrder:t,rowOptions:n,showCheckbox:i,onCheckboxChange:a,slots:{checkbox:r=Ne}={},slotProps:{checkbox:l={}}={}}=e;return K.createElement("tbody",null,o.map((s,f)=>K.createElement("tr",{key:f},i&&K.createElement("td",{style:{textAlign:"center"}},K.createElement(r,{onChange:c=>a?.(c,f),...l})),t.map(c=>K.createElement("td",{key:c,style:{textAlign:n?.[c]?.numeric?"right":"left"}},s[c])))))}Ao.displayName="TableBody";var St=Et("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"}}),ro=e=>"Intl"in window?new Intl.NumberFormat().format(e):e;function Na(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),f=r>1&&o<r-3,c=r>1&&o>4;return y.createElement(V,{direction:"row",spacing:1,sx:{pt:1,pb:1},justifyContent:"end",alignItems:"center"},y.createElement(V,{direction:"row",spacing:.5,alignItems:"center"},y.createElement(L,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-1),disabled:o===a,"aria-label":"Previous page"},y.createElement(Fa,null)),o!==a&&y.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(a)},a),c&&y.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-3)},"..."),l.map(d=>y.createElement(I,{key:d,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(d)},d)),y.createElement(I,{variant:"soft",size:"sm"},o),s.map(d=>y.createElement(I,{key:d,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(d)},d)),f&&y.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+3)},"..."),o!==r&&y.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(r)},r),y.createElement(L,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+1),disabled:o===r,"aria-label":"Next page"},y.createElement(Ba,null))))}var La=e=>y.createElement(Xe,{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)}}),Sa=Et("span",{name:"DataTable",slot:"headCellAsterisk"})(({theme:e})=>({color:"var(--ceed-palette-danger-500)",marginLeft:e.spacing(.5)})),Ea=e=>{let o=wa(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?La(o):null;return y.createElement("th",{ref:o,key:e.field,style:t},e.headerName??e.field,e.required&&y.createElement(Sa,null,"*"),n)};function Ha({rows:e,columns:o,rowCount:t,pagination:n,paginationMode:i,paginationModel:a,onPaginationModelChange:r,selectionModel:l=[],onSelectionModelChange:s,getId:f,isTotalSelected:c}){let[d,b]=Aa(a?.page||1),m=a?.pageSize||20,C=ce((g,h)=>f?.(g)??g?.id??`${(h||0)+(d-1)*m}`,[f??d,m]),u=ue(()=>new Set(l),[l]),p=ue(()=>!n||i==="server"?e:e.slice((d-1)*m,(d-1)*m+m),[e,d,m,i,n]),x=ue(()=>p.length>0&&p.every((g,h)=>u.has(C(g,h))),[p,u,d,m,C]),M=t||e.length,T=ue(()=>c??(M>0&&l.length===M),[c,l,M]),P=ce(g=>{b(g),r?.({page:g,pageSize:m})},[r]);return Io(()=>{P(1)},[M]),Io(()=>{let g=Math.max(1,Math.ceil(M/m));d>g&&P(g)},[d,M,m]),Io(()=>{s?.([])},[d]),{rowCount:M,page:d,pageSize:m,onPaginationModelChange:P,getId:C,HeadCell:Ea,dataInPage:p,isAllSelected:x,isTotalSelected:T,isSelectedRow:ce(g=>u.has(g),[u]),onAllCheckboxChange:ce(()=>{s?.(x?[]:p.map(C))},[x,p,s]),onCheckboxChange:ce((g,h)=>{if(u.has(h)){let k=l.filter(D=>D!==h);s?.(k)}else{let k=[...l,h];s?.(k)}},[l,s]),columns:ue(()=>o||Object.keys(e[0]||{}).map(g=>({field:g})),[e,o]),onTotalSelect:ce(()=>{s?.(T?[]:e.map(C),!T)},[T,e,s])}}function Fo(e){let{rows:o,checkboxSelection:t,selectionModel:n,onSelectionModelChange:i,rowCount:a,columns:r,onPaginationModelChange:l,pagination:s,paginationMode:f,paginationModel:c,loading:d,slots:{checkbox:b=Ne,toolbar:m,footer:C,loadingOverlay:u=()=>y.createElement(Ia,{value:8,variant:"plain"})}={},slotProps:{checkbox:p={},toolbar:x,background:M={}}={},...T}=e,{columns:P,isAllSelected:g,isSelectedRow:h,onAllCheckboxChange:k,onCheckboxChange:D,getId:z,rowCount:q,page:Q,pageSize:ie,onPaginationModelChange:Y,dataInPage:J,isTotalSelected:R,onTotalSelect:se,HeadCell:te}=Ha(e),cr=ue(()=>({page:Q,pageSize:ie}),[Q,ie]);return y.createElement(Xe,null,y.createElement(V,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center"},!!t&&y.createElement(V,{direction:"row",spacing:1},!g&&y.createElement(U,{level:"body-xs"},ro(n?.length||0)," items selected"),g&&!R&&y.createElement(V,{direction:"row",spacing:1,alignItems:"center"},y.createElement(U,{level:"body-xs"},"All ",ro(n?.length||0)," items on this page are selected."),y.createElement(I,{size:"sm",variant:"plain",onClick:se},"Select all ",ro(q??o.length)," items")),R&&y.createElement(V,{direction:"row",spacing:1,alignItems:"center"},y.createElement(U,{level:"body-xs"},"All ",ro(q??o.length)," items are selected."),y.createElement(I,{size:"sm",variant:"plain",color:"danger",onClick:se},"Cancel"))),m&&y.createElement(m,{...x||{}})),y.createElement(W,{variant:"outlined",sx:{overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"},...M},y.createElement(He,{...T},y.createElement("thead",null,y.createElement("tr",null,t&&y.createElement("th",{style:{width:"40px",textAlign:"center"}},y.createElement(b,{onChange:k,checked:g,indeterminate:(n||[]).length>0&&!g,...p})),P.map(le=>y.createElement(te,{key:le.field,stickyHeader:e.stickyHeader,...le})))),y.createElement("tbody",null,y.createElement(St,null,!!d&&y.createElement("td",null,y.createElement(Xe,{sx:{position:"absolute",top:0,left:0,right:0}},y.createElement(u,null)))),y.createElement(St,null),J.map((le,ur)=>{let me=z(le,ur);return y.createElement("tr",{key:me,role:t?"checkbox":void 0,tabIndex:t?-1:void 0,onClick:t?j=>D(j,me):void 0,"aria-checked":t?h(me):void 0},t&&y.createElement("th",{scope:"row",style:{textAlign:"center"}},y.createElement(b,{onChange:j=>D(j,me),checked:h(me),...p})),P.map(j=>y.createElement("td",{key:j.field,style:{textAlign:j.type&&["number","date"].includes(j.type)?"end":"start"}},j.renderCell?.({row:le,value:le[j.field],id:me})??le[j.field])))})),C&&y.createElement(C,null))),ie<q&&s&&y.createElement(Na,{paginationModel:cr,rowCount:q,onPageChange:Y}))}Fo.displayName="DataTable";import S,{forwardRef as Ua,useCallback as Ht,useEffect as Ot,useImperativeHandle as Ra,useRef as $a,useState as zt}from"react";import{IMaskInput as Ga,IMask as Bo}from"react-imask";import Wa from"@mui/icons-material/esm/CalendarToday.js";import{styled as No}from"@mui/joy";import{FocusTrap as qa,ClickAwayListener as _a,Popper as Ka}from"@mui/base";import{DialogActions as Oa,styled as za}from"@mui/joy";import{motion as Va}from"framer-motion";var Ya=Va(Oa),Ja=za(Ya)(({theme:e})=>({padding:e.spacing(2),gap:e.spacing(2),flexDirection:"row",justifyContent:"flex-end"})),Oe=Ja;Oe.displayName="DialogActions";var X=Oe;var ja=No(Ka,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Za=No(W,{name:"DatePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),Xa=No("div",{name:"DatePicker",slot:"container"})({width:"100%"}),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("/")},Qa=S.forwardRef(function(o,t){let{onChange:n,...i}=o;return S.createElement(Ga,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"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:Vt,parse:a=>{let r=a.split("/");return new Date(Number(r[0]),Number(r[1])-1,Number(r[2]))},autofix:"pad",overwrite:!0})}),Yt=Ua((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:s,disableFuture:f,disablePast:c,required:d,...b}=e,m=$a(null),[C,u]=zt(e.value||""),[p,x]=zt(null),M=!!p;Ot(()=>{u(e.value||"")},[e.value]),Ot(()=>{p||m.current?.blur()},[p,m]),Ra(o,()=>m.current,[m.current]);let T=Ht(h=>{u(h.target.value),t?.(h)},[]),P=Ht(h=>{x(p?null:h.currentTarget),setTimeout(()=>{m.current?.focus()},0)},[p,x,m]),g=S.createElement(Xa,null,S.createElement(qa,{open:!0},S.createElement(S.Fragment,null,S.createElement(Z,{...b,color:a?"danger":b.color,ref:m,size:"sm",value:C,onChange:T,placeholder:"YYYY/MM/DD",disabled:n,required:d,slotProps:{input:{component:Qa,ref:m}},sx:{fontFamily:"monospace"},endDecorator:S.createElement(L,{variant:"plain",onClick:P},S.createElement(Wa,null))}),M&&S.createElement(_a,{onClickAway:()=>x(null)},S.createElement(ja,{id:"date-picker-popper",open:!0,anchorEl:p,placement:"bottom-end",onMouseDown:h=>h.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},S.createElement(Za,{tabIndex:-1,role:"presentation"},S.createElement(re,{value:Number.isNaN(new Date(C).getTime())?void 0:[new Date(C),void 0],onChange:([h])=>{T({target:{name:e.name,value:Vt(h)}}),x(null)},minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:f,disablePast:c}),S.createElement(X,{sx:{p:1}},S.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{T({target:{name:e.name,value:""}}),x(null)}},"Clear"))))))));return i?S.createElement(F,{required:d,disabled:n,error:a,size:"sm"},S.createElement(B,null,i),g,r&&S.createElement(w,null,r)):g});import E,{forwardRef as ei,useCallback as Lo,useEffect as Jt,useImperativeHandle as oi,useMemo as ti,useRef as ri,useState as Ut}from"react";import{IMaskInput as ni,IMask as So}from"react-imask";import ai from"@mui/icons-material/esm/CalendarToday.js";import{styled as Eo}from"@mui/joy";import{FocusTrap as ii,ClickAwayListener as li,Popper as si}from"@mui/base";var mi=Eo(si,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),pi=Eo(W,{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})),di=Eo("div",{name:"DateRangePicker",slot:"container"})({width:"100%"}),Rt=([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(" - ")},$t=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]))]},ci=E.forwardRef(function(o,t){let{onChange:n,...i}=o;return E.createElement(ni,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/`m/`d - Y/`m/`d",blocks:{d:{mask:So.MaskedRange,from:1,to:31,maxLength:2},m:{mask:So.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:So.MaskedRange,from:1900,to:9999}},format:Rt,parse:$t,autofix:"pad",overwrite:!0})}),Ho=ei((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:s,disableFuture:f,disablePast:c,required:d,...b}=e,m=ri(null),[C,u]=Ut(e.value||""),[p,x]=Ut(null),M=!!p,T=ti(()=>C?$t(C):void 0,[C]);Jt(()=>{u(e.value||"")},[e.value]),Jt(()=>{p||m.current?.blur()},[p,m]),oi(o,()=>m.current,[m.current]);let P=Lo(D=>{u(D.target.value),t?.(D)},[t]),g=Lo(D=>{x(p?null:D.currentTarget),m.current?.focus()},[p,x,m]),h=Lo(([D,z])=>{!D||!z||(u(Rt([D,z])),x(null))},[u,x,m]),k=E.createElement(di,null,E.createElement(ii,{open:!0},E.createElement(E.Fragment,null,E.createElement(Z,{...b,color:a?"danger":b.color,ref:o,size:"sm",value:C,onChange:P,disabled:n,required:d,placeholder:"YYYY/MM/DD - YYYY/MM/DD",slotProps:{input:{component:ci,ref:m}},sx:{fontFamily:"monospace"},endDecorator:E.createElement(L,{variant:"plain",onClick:g},E.createElement(ai,null))}),M&&E.createElement(li,{onClickAway:()=>x(null)},E.createElement(mi,{id:"date-range-picker-popper",open:!0,anchorEl:p,placement:"bottom-end",onMouseDown:D=>D.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},E.createElement(pi,{tabIndex:-1,role:"presentation"},E.createElement(re,{rangeSelection:!0,defaultValue:T,onChange:h,minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:f,disablePast:c}),E.createElement(X,{sx:{p:1}},E.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{u(""),x(null)}},"Clear"))))))));return i?E.createElement(F,{required:d,disabled:n,error:a,size:"sm"},E.createElement(B,null,i),k,r&&E.createElement(w,null,r)):k});Ho.displayName="DateRangePicker";import{DialogContent as ui,styled as gi}from"@mui/joy";import{motion as fi}from"framer-motion";var hi=fi(ui),Ci=gi(hi)(({theme:e})=>({padding:e.spacing(0,6,5)})),ze=Ci;ze.displayName="DialogContent";var no=ze;import{DialogTitle as bi,styled as yi}from"@mui/joy";import{motion as xi}from"framer-motion";var vi=xi(bi),Di=yi(vi)(({theme:e})=>({padding:e.spacing(4,6)})),Ve=Di;Ve.displayName="DialogTitle";var ao=Ve;import Je from"react";import io from"react";import{Modal as Mi,ModalDialog as ki,ModalClose as Pi,ModalOverflow as Ti,styled as Gt}from"@mui/joy";import{motion as Oo}from"framer-motion";var wi=Oo(Mi),zo=wi;zo.displayName="Modal";var Wt=Gt(ki)({padding:0}),Ye=Wt;Ye.displayName="ModalDialog";var Ai=Gt(Oo(Pi))(({theme:e})=>({top:e.spacing(3),right:e.spacing(6)})),lo=Ai;lo.displayName="ModalClose";var Ii=Oo(Ti),Vo=Ii;Vo.displayName="ModalOverflow";function Yo(e){let{title:o,children:t,...n}=e;return io.createElement(Wt,{...n},io.createElement(lo,null),io.createElement(ao,null,o),io.createElement(no,null,t))}Yo.displayName="ModalFrame";import{styled as Fi}from"@mui/joy";var Bi=Fi(Ye,{name:"Dialog",slot:"Root"})({padding:0}),Jo=Je.forwardRef((e,o)=>{let{title:t,children:n,actions:i,fullscreen:a,...r}=e;return Je.createElement(Bi,{layout:a?"fullscreen":"center",ref:o,...r},Je.createElement(ao,null,t),Je.createElement(no,null,n),Je.createElement(X,null,i))});Jo.displayName="DialogFrame";import Ni from"react";import{Divider as Li}from"@mui/joy";import{motion as Si}from"framer-motion";var Ei=Si(Li),Ue=e=>Ni.createElement(Ei,{...e});Ue.displayName="Divider";import Hi from"react";import{Drawer as Oi}from"@mui/joy";import{motion as zi}from"framer-motion";var Vi=zi(Oi),Uo=e=>{let{children:o,...t}=e;return Hi.createElement(Vi,{...t,slotProps:{...t.slotProps,content:{...t.slotProps?.content,sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}}}},o)};Uo.displayName="InsetDrawer";import N,{useCallback as so,useEffect as Yi,useMemo as qt,useRef as _t,useState as mo}from"react";import{styled as ae}from"@mui/joy";import Ji from"@mui/icons-material/esm/CloudUploadRounded.js";import Ui from"@mui/icons-material/esm/UploadFileRounded.js";import Ri from"@mui/icons-material/esm/ClearRounded.js";import{combine as $i}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/combine.js";import{dropTargetForExternal as Gi,monitorForExternal as Wi}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/adapter.js";import{containsFiles as Kt,getFiles as qi}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/file.js";import{preventUnhandled as jt}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/prevent-unhandled.js";var _i=ae("input")({width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",position:"absolute"}),Ki=ae(V,{name:"Uploader",slot:"PreviewRoot"})({}),ji=ae(Fe,{name:"Uploader",slot:"UploadCard"})(({theme:e})=>({padding:e.spacing(2.5),border:`1px solid ${e.palette.neutral.outlinedBorder}`})),Zi=ae(Ui,{name:"Uploader",slot:"UploadFileIcon"})(({theme:e})=>({color:e.palette.neutral[400],width:"32px",height:"32px"})),Xi=ae(Ri,{name:"Uploader",slot:"ClearIcon"})(({theme:e})=>({color:e.palette.neutral.plainColor,width:"18px",height:"18px"})),Qi=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"],Zt=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)},el=e=>{let{files:o,uploaded:t,onDelete:n}=e;return N.createElement(Ki,{gap:1},[...t,...o].map(i=>N.createElement(ji,{key:i.name,size:"sm",color:"neutral"},N.createElement(V,{direction:"row",alignItems:"center",gap:2},N.createElement(Zi,null),N.createElement(V,{flex:"1"},N.createElement(U,{level:"body-sm",textColor:"common.black"},i.name),!!i.size&&N.createElement(U,{level:"body-xs",fontWeight:"300",lineHeight:"1.33",textColor:"text.tertiary"},Zt(i.size))),N.createElement(L,{onClick:()=>n?.(i)},N.createElement(Xi,null))))))},ol=ae(V,{name:"Uploader",slot:"root"})(({theme:e})=>({gap:e.spacing(2)})),tl=ae(W,{name:"Uploader",slot:"dropZone",shouldForwardProp:e=>e!=="error"})(({theme:e,state:o,error:t})=>({width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:e.spacing(5),gap:e.spacing(4),cursor:"pointer",backgroundColor:e.palette.background.surface,border:t?`1px solid ${e.palette.danger.outlinedBorder}`:o==="idle"?`1px solid ${e.palette.neutral.outlinedBorder}`:`1px solid ${e.palette.primary.outlinedBorder}`})),rl=ae(Ji,{name:"Uploader",slot:"iconContainer",shouldForwardProp:e=>e!=="error"})(({theme:e,state:o,error:t})=>({color:t?`rgba(${e.vars.palette.danger.mainChannel} / 0.6)`:o==="over"?`rgba(${e.palette.primary.mainChannel} / 0.6)`:e.palette.neutral.softActiveBg,width:"32px",height:"32px"})),Ro=N.memo(e=>{let{accept:o,maxCount:t,name:n,size:i,maxSize:a,onChange:r,label:l,helperText:s,disabled:f,required:c,onDelete:d}=e,b=_t(null),m=_t(null),[C,u]=mo(),[p,x]=mo([]),[M,T]=mo(e.uploaded||[]),[P,g]=mo("idle"),h=qt(()=>!!C||e.error,[e.error,C]),k=qt(()=>!t||t&&[...M,...p].length!==t,[p,t,M]),D=so(Y=>{try{let J=o?.split(",").map(te=>te.trim().replace(".","").replace("*",".*"))||[],R=new RegExp(`(${J.join("|")})`);Y.forEach(te=>{if(R.test(te.type)===!1)throw new Error(`File type is not allowed: ${te.name}`)}),a&&Y.forEach(te=>{if(te.size>a)throw new Error(`File size exceeds the limit: ${Zt(a)}`)});let se=[...p,...Y];if(t&&[...M,...se].length>t)throw new Error(`File count exceeds the limit: ${t}`);r?.({target:{name:n,value:se}}),x(se),u(void 0)}catch(J){u(J.message)}},[p,M]);Yi(()=>{let Y=b.current;if(Y)return $i(Gi({element:Y,canDrop:Kt,onDragEnter:()=>g("over"),onDragLeave:()=>g("potential"),onDrop:async({source:J})=>{let R=await qi({source:J});D(R)}}),Wi({canMonitor:Kt,onDragStart:()=>{g("potential"),jt.start()},onDrop:()=>{g("idle"),jt.stop()}}))});let z=so(Y=>{let J=Array.from(Y.target.files||[]);D(J)},[D]),q=so(Y=>{Y instanceof File?x(J=>(r?.({target:{name:n,value:J.filter(R=>R!==Y)}}),J.filter(R=>R!==Y))):(T(J=>J.filter(R=>R.id!==Y.id)),d?.(Y)),u(void 0)},[]),Q=so(()=>{m.current?.click()},[]);return N.createElement(ol,null,k&&N.createElement(F,{size:i,error:!!(h||C),disabled:f,required:c},l&&N.createElement(B,null,l),N.createElement(tl,{state:P,error:!!(h||C),ref:b,onClick:Q},N.createElement(V,{alignItems:"center",gap:1},N.createElement(rl,{state:P,error:!!(h||C)})),N.createElement(_i,{type:"file",onChange:z,multiple:!0,accept:o,disabled:f,required:c,ref:m})),C?N.createElement(w,null,C):s&&N.createElement(w,null,s)),[...M,...p].length>0&&N.createElement(el,{files:p,uploaded:M,onDelete:q}))});Ro.displayName="Uploader";import{Grid as nl}from"@mui/joy";import{motion as al}from"framer-motion";var il=al(nl),$o=il;$o.displayName="Grid";import oe from"react";import ll from"react-markdown";import{Link as sl}from"@mui/joy";var Go=e=>{let{children:o,color:t,textColor:n,defaultLevel:i="body-md",markdownOptions:a,...r}=e;return oe.createElement($,{color:t,textColor:n,...r},oe.createElement(ll,{...a,children:o,components:{h1:({children:l})=>oe.createElement($,{color:t,textColor:n,level:"h1"},l),h2:({children:l})=>oe.createElement($,{color:t,textColor:n,level:"h2"},l),h3:({children:l})=>oe.createElement($,{color:t,textColor:n,level:"h3"},l),h4:({children:l})=>oe.createElement($,{color:t,textColor:n,level:"h4"},l),p:({children:l})=>oe.createElement($,{color:t,textColor:n,level:i},l),a:({children:l,href:s})=>oe.createElement(sl,{href:s},l),hr:()=>oe.createElement(Ue,null),...a?.components}}))};Go.displayName="Markdown";import H,{forwardRef as ml,useCallback as Xt,useEffect as Qt,useImperativeHandle as pl,useRef as dl,useState as er}from"react";import{IMaskInput as cl,IMask as or}from"react-imask";import ul from"@mui/icons-material/esm/CalendarToday.js";import{styled as qo}from"@mui/joy";import{FocusTrap as gl,ClickAwayListener as fl,Popper as hl}from"@mui/base";var Cl=qo(hl,{name:"MonthPicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),bl=qo(W,{name:"MonthPicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),yl=qo("div",{name:"MonthPicker",slot:"container"})({width:"100%"}),tr=e=>{let o=`${e.getMonth()+1}`,t=e.getFullYear();return Number(o)<10&&(o="0"+o),[t,o].join("/")},Wo=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 tr(i)})(e),rr=e=>e.split(" - ")[0]||"",xl=H.forwardRef(function(o,t){let{onChange:n,...i}=o;return H.createElement(cl,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/m",blocks:{m:{mask:or.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:or.MaskedRange,from:1900,to:9999}},format:Wo,parse:rr})}),nr=ml((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:s,disableFuture:f,disablePast:c,required:d,...b}=e,m=dl(null),[C,u]=er(e.value||""),[p,x]=er(null),M=!!p;Qt(()=>{u(e.value?Wo(rr(e.value)):"")},[e.value]),Qt(()=>{p||m.current?.blur()},[p,m]),pl(o,()=>m.current,[m.current]);let T=Xt(h=>{u(h.target.value),t?.(h)},[]),P=Xt(h=>{x(p?null:h.currentTarget),m.current?.focus()},[p,x,m]),g=H.createElement(yl,null,H.createElement(gl,{open:!0},H.createElement(H.Fragment,null,H.createElement(Z,{...b,color:a?"danger":b.color,ref:m,size:"sm",value:C,onChange:T,placeholder:"YYYY/MM",disabled:n,required:d,slotProps:{input:{component:xl,ref:m}},sx:{fontFamily:"monospace"},endDecorator:H.createElement(L,{variant:"plain",onClick:P},H.createElement(ul,null))}),M&&H.createElement(fl,{onClickAway:()=>x(null)},H.createElement(Cl,{id:"date-picker-popper",open:!0,anchorEl:p,placement:"bottom-end",onMouseDown:h=>h.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},H.createElement(bl,{tabIndex:-1,role:"presentation"},H.createElement(re,{view:"month",views:["month"],value:Number.isNaN(new Date(C).getTime())?void 0:[new Date(C),void 0],onChange:([h])=>{T({target:{name:e.name,value:Wo(tr(h))}}),x(null)},minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:f,disablePast:c}),H.createElement(X,{sx:{p:1}},H.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{T({target:{name:e.name,value:""}}),x(null)}},"Clear"))))))));return i?H.createElement(F,{required:d,disabled:n,error:a,size:"sm"},H.createElement(B,null,i),g,r&&H.createElement(w,null,r)):g});import O,{forwardRef as vl,useCallback as _o,useEffect as ar,useImperativeHandle as Dl,useMemo as Ml,useRef as kl,useState as ir}from"react";import{IMaskInput as Pl,IMask as lr}from"react-imask";import Tl from"@mui/icons-material/esm/CalendarToday.js";import{styled as Xo}from"@mui/joy";import{FocusTrap as wl,ClickAwayListener as Al,Popper as Il}from"@mui/base";var Fl=Xo(Il,{name:"MonthRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Bl=Xo(W,{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})),Nl=Xo("div",{name:"MonthRangePicker",slot:"container"})({width:"100%"}),Ko=e=>{let o=`${e.getMonth()+1}`,t=e.getFullYear();return Number(o)<10&&(o="0"+o),[t,o].join("/")},jo=([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 Ko(a)};return[t(e),t(o)].join(" - ")},Zo=e=>{let o=e.split(" - ")[0]||"",t=e.split(" - ")[1]||"";return[o,t]},Ll=O.forwardRef(function(o,t){let{onChange:n,...i}=o;return O.createElement(Pl,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/m - Y/m",blocks:{m:{mask:lr.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:lr.MaskedRange,from:1900,to:9999}},format:jo,parse:Zo})}),Qo=vl((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:s,disableFuture:f,disablePast:c,required:d,...b}=e,m=kl(null),[C,u]=ir(""),[p,x]=ir(null),M=!!p,T=Ml(()=>C?Zo(C).map(D=>new Date(D)):void 0,[C]);ar(()=>{u(e.value?jo(Zo(e.value)):"")},[e.value]),ar(()=>{p||m.current?.blur()},[p,m]),Dl(o,()=>m.current,[m.current]);let P=_o(D=>{u(D.target.value),t?.(D)},[t]),g=_o(D=>{x(p?null:D.currentTarget),m.current?.focus()},[p,x,m]),h=_o(([D,z])=>{!D||!z||(u(jo([Ko(D),Ko(z)])),x(null))},[u,x,m]),k=O.createElement(Nl,null,O.createElement(wl,{open:!0},O.createElement(O.Fragment,null,O.createElement(Z,{...b,color:a?"danger":b.color,ref:o,size:"sm",value:C,onChange:P,disabled:n,required:d,placeholder:"YYYY/MM - YYYY/MM",slotProps:{input:{component:Ll,ref:m}},sx:{fontFamily:"monospace"},endDecorator:O.createElement(L,{variant:"plain",onClick:g},O.createElement(Tl,null))}),M&&O.createElement(Al,{onClickAway:()=>x(null)},O.createElement(Fl,{id:"date-range-picker-popper",open:!0,anchorEl:p,placement:"bottom-end",onMouseDown:D=>D.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},O.createElement(Bl,{tabIndex:-1,role:"presentation"},O.createElement(re,{view:"month",views:["month"],rangeSelection:!0,defaultValue:T,onChange:h,minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:f,disablePast:c}),O.createElement(X,{sx:{p:1}},O.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{u(""),x(null)}},"Clear"))))))));return i?O.createElement(F,{required:d,disabled:n,error:a,size:"sm"},O.createElement(B,null,i),k,r&&O.createElement(w,null,r)):k});Qo.displayName="MonthRangePicker";import{Radio as Sl,RadioGroup as El}from"@mui/joy";import{motion as sr}from"framer-motion";var Hl=sr(Sl),Re=Hl;Re.displayName="Radio";var Ol=sr(El),$e=Ol;$e.displayName="RadioGroup";import mr from"react";function et(e){let{items:o,...t}=e;return mr.createElement($e,{...t},o.map(n=>mr.createElement(Re,{key:`${n.value}`,value:n.value,label:n.label})))}et.displayName="RadioList";import Ge,{useMemo as zl}from"react";import{Select as Vl,Option as Yl}from"@mui/joy";import{motion as Jl}from"framer-motion";var Ul=Jl(Yl),po=Ul;po.displayName="Option";function ot(e){let{label:o,helperText:t,error:n,size:i,color:a,disabled:r,required:l,onChange:s,...f}=e,c=zl(()=>e.options.map(m=>typeof m!="object"?{value:m,label:m}:m),[e.options]),b=Ge.createElement(Vl,{...f,required:l,disabled:r,size:i,color:n?"danger":a,onChange:(m,C)=>{let u=m||{target:{}},p={...u,target:{name:u.target?.name||e.name,value:C||void 0}};s?.(p)}},c.map(m=>Ge.createElement(po,{key:m.value,value:m.value},m.label)));return o?Ge.createElement(F,{required:l,disabled:r,size:i,color:a,error:n},Ge.createElement(B,null,o),b,t&&Ge.createElement(w,null,t)):b}ot.displayName="Select";import pr from"react";import{Switch as Rl,styled as $l,switchClasses as Gl}from"@mui/joy";import{motion as dr}from"framer-motion";var Wl=dr(Rl),ql=$l(dr.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)",[`&.${Gl.checked}`]:{left:"unset",right:"var(--Switch-thumbOffset)"}}),_l=e=>pr.createElement(ql,{...e,layout:!0,transition:Kl}),Kl={type:"spring",stiffness:700,damping:30},tt=e=>pr.createElement(Wl,{...e,slots:{thumb:_l,...e.slots}});tt.displayName="Switch";import{Tabs as jl,Tab as Zl,TabList as Xl,TabPanel as Ql,styled as es,tabClasses as os}from"@mui/joy";import{motion as co}from"framer-motion";var ts=co(jl),rt=ts;rt.displayName="Tabs";var rs=es(co(Zl))(({theme:e})=>({[`&:not(.${os.selected})`]:{color:e.palette.neutral[700]}})),nt=rs;nt.displayName="Tab";var ns=co(Xl),at=ns;at.displayName="TabList";var as=co(Ql),it=as;it.displayName="TabPanel";import uo from"react";import{Textarea as is}from"@mui/joy";import{motion as ls}from"framer-motion";var ss=ls(is),lt=e=>{let{label:o,error:t,helperText:n,color:i,size:a,disabled:r,required:l,minRows:s=2,maxRows:f=4,...c}=e,d=uo.createElement(ss,{required:l,disabled:r,color:t?"danger":i,size:a,minRows:s,maxRows:f,...c});return o?uo.createElement(F,{required:l,disabled:r,color:i,size:a,error:t},uo.createElement(B,null,o),d,n&&uo.createElement(w,null,n)):d};lt.displayName="Textarea";import go from"react";import{CssBaseline as st,CssVarsProvider as ms,checkboxClasses as ps,extendTheme as ds}from"@mui/joy";var cs=ds({cssVarPrefix:"ceed",spacing:4,zIndex:{popup:1500},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)"},[`& .${ps.root}`]:{verticalAlign:"middle"}})}},JoyTooltip:{defaultProps:{size:"sm",placement:"top"}}}});function mt(e){return go.createElement(go.Fragment,null,go.createElement(ms,{theme:cs},go.createElement(st,null),e.children))}mt.displayName="ThemeProvider";import us from"react";import{Tooltip as gs}from"@mui/joy";import{motion as fs}from"framer-motion";var hs=fs(gs),pt=e=>us.createElement(hs,{...e});pt.displayName="Tooltip";export{Ke as Accordion,_e as AccordionDetails,qe as AccordionSummary,fo as Accordions,ho as Alert,lC as AspectRatio,gt as Autocomplete,Xh as AutocompleteListbox,Qh as AutocompleteOption,rC as Avatar,aC as AvatarGroup,mC as Badge,De as Box,yo as Breadcrumbs,we as Button,Ae as Calendar,Fe as Card,ko as CardActions,Do as CardContent,Mo as CardCover,Po as CardOverflow,Be as Checkbox,ye as Chip,bC as CircularProgress,To as Container,st as CssBaseline,Lt as CurrencyInput,Fo as DataTable,Yt as DatePicker,Ho as DateRangePicker,Oe as DialogActions,ze as DialogContent,Jo as DialogFrame,Ve as DialogTitle,Ue as Divider,xC as Drawer,Te as Dropdown,he as FormControl,be as FormHelperText,Ce as FormLabel,$o as Grid,xe as IconButton,Se as Input,Uo as InsetDrawer,DC as LinearProgress,zC as Link,kC as List,TC as ListDivider,AC as ListItem,FC as ListItemButton,NC as ListItemContent,SC as ListItemDecorator,HC as ListSubheader,Go as Markdown,Me as Menu,ke as MenuButton,Pe as MenuItem,zo as Modal,lo as ModalClose,Ye as ModalDialog,Yo as ModalFrame,Vo as ModalOverflow,nr as MonthPicker,Qo as MonthRangePicker,po as Option,Re as Radio,$e as RadioGroup,et as RadioList,ot as Select,Ee as Sheet,KC as Skeleton,YC as Slider,fe as Stack,UC as Step,$C as StepButton,WC as StepIndicator,qC as Stepper,tt as Switch,nt as Tab,at as TabList,it as TabPanel,He as Table,Ao as TableBody,wo as TableHead,rt as Tabs,lt as Textarea,mt as ThemeProvider,pt as Tooltip,$ as Typography,Ro as Uploader,_h as accordionClasses,Kh as accordionDetailsClasses,Zh as accordionSummaryClasses,jh as accordionsClasses,uh as alertClasses,sC as aspectRatioClasses,eC as autocompleteClasses,oC as autocompleteListboxClasses,tC as autocompleteOptionClasses,nC as avatarClasses,iC as avatarGroupClasses,pC as badgeClasses,gh as boxClasses,dC as breadcrumbsClasses,fh as buttonClasses,uC as cardActionsClasses,cC as cardClasses,gC as cardContentClasses,fC as cardCoverClasses,hC as cardOverflowClasses,hh as checkboxClasses,CC as chipClasses,yC as circularProgressClasses,Rh as dialogActionsClasses,Uh as dialogContentClasses,Jh as dialogTitleClasses,Ch as dividerClasses,vC as drawerClasses,Bh as formControlClasses,Lh as formHelperTextClasses,Nh as formLabelClasses,Sh as gridClasses,bh as iconButtonClasses,yh as inputClasses,MC as linearProgressClasses,VC as linkClasses,PC as listClasses,wC as listDividerClasses,BC as listItemButtonClasses,IC as listItemClasses,LC as listItemContentClasses,EC as listItemDecoratorClasses,OC as listSubheaderClasses,vh as menuButtonClasses,xh as menuClasses,Dh as menuItemClasses,Oh as modalClasses,zh as modalCloseClasses,Vh as modalDialogClasses,Yh as modalOverflowClasses,Mh as optionClasses,kh as radioClasses,Ph as radioGroupClasses,Th as selectClasses,Hh as sheetClasses,jC as skeletonClasses,JC as sliderClasses,Eh as stackClasses,GC as stepButtonClasses,RC as stepClasses,_C as stepperClasses,wh as switchClasses,Wh as tabListClasses,qh as tabPanelClasses,Ah as tableClasses,Gh as tabsClasses,Ih as textareaClasses,$h as tooltipClasses,Fh as typographyClasses,dh as useColorScheme,ph as useTheme,ch as useThemeProps};
1
+ import{useTheme as Gh,useColorScheme as qh,useThemeProps as _h,alertClasses as Kh,boxClasses as jh,buttonClasses as Zh,checkboxClasses as Xh,dividerClasses as Qh,iconButtonClasses as eC,inputClasses as oC,menuClasses as tC,menuButtonClasses as rC,menuItemClasses as nC,optionClasses as aC,radioClasses as iC,radioGroupClasses as lC,selectClasses as sC,switchClasses as mC,tableClasses as pC,textareaClasses as dC,typographyClasses as cC,formControlClasses as uC,formLabelClasses as gC,formHelperTextClasses as fC,gridClasses as hC,stackClasses as CC,sheetClasses as bC,modalClasses as yC,modalCloseClasses as xC,modalDialogClasses as vC,modalOverflowClasses as DC,dialogTitleClasses as MC,dialogContentClasses as kC,dialogActionsClasses as PC,tooltipClasses as TC,tabsClasses as wC,tabListClasses as AC,tabPanelClasses as IC,accordionClasses as FC,accordionDetailsClasses as BC,accordionGroupClasses as NC,accordionSummaryClasses as LC,AutocompleteListbox as SC,AutocompleteOption as EC,autocompleteClasses as HC,autocompleteListboxClasses as OC,autocompleteOptionClasses as zC,Avatar as VC,avatarClasses as YC,AvatarGroup as JC,avatarGroupClasses as UC,AspectRatio as RC,aspectRatioClasses as $C,Badge as WC,badgeClasses as GC,breadcrumbsClasses as qC,cardClasses as _C,cardActionsClasses as KC,cardContentClasses as jC,cardCoverClasses as ZC,cardOverflowClasses as XC,chipClasses as QC,CircularProgress as eb,circularProgressClasses as ob,Drawer as tb,drawerClasses as rb,LinearProgress as nb,linearProgressClasses as ab,List as ib,listClasses as lb,ListDivider as sb,listDividerClasses as mb,ListItem as pb,listItemClasses as db,ListItemButton as cb,listItemButtonClasses as ub,ListItemContent as gb,listItemContentClasses as fb,ListItemDecorator as hb,listItemDecoratorClasses as Cb,ListSubheader as bb,listSubheaderClasses as yb,Link as xb,linkClasses as vb,Slider as Db,sliderClasses as Mb,Step as kb,stepClasses as Pb,StepButton as Tb,stepButtonClasses as wb,StepIndicator as Ab,Stepper as Ib,stepperClasses as Fb,Skeleton as Bb,skeletonClasses as Nb}from"@mui/joy";import ue from"react";import{AccordionGroup as Pr,Accordion as Tr,AccordionSummary as wr,AccordionDetails as Ar}from"@mui/joy";import{motion as Ke}from"framer-motion";var Ir=Ke(wr),je=Ir;je.displayName="AccordionSummary";var Fr=Ke(Ar),Ze=Fr;Ze.displayName="AccordionDetails";var Br=Ke(Tr);function Xe(e){let{summary:o,details:t,variant:n,color:i,...a}=e,r=n==="solid"?"solid":void 0;return ue.createElement(Br,{variant:r,color:i,...a},ue.createElement(je,{variant:r,color:i},o),ue.createElement(Ze,{variant:r,color:i},t))}Xe.displayName="Accordion";var Nr=Ke(Pr);function ko(e){let{variant:o,color:t,items:n,...i}=e;return ue.createElement(Nr,{variant:o,color:t,...i},n.map((a,r)=>ue.createElement(Xe,{key:r,summary:a.summary,details:a.details,index:r,variant:o,color:t})))}ko.displayName="Accordions";import Qe from"react";import{Alert as Yr,styled as Jr}from"@mui/joy";import{motion as Ur}from"framer-motion";import Lr from"react";import{Typography as Sr}from"@mui/joy";import{motion as Er}from"framer-motion";var Hr=Er(Sr),G=e=>Lr.createElement(Hr,{...e});G.displayName="Typography";var U=G;import{Stack as Or}from"@mui/joy";import{motion as zr}from"framer-motion";var Vr=zr(Or),ge=Vr;ge.displayName="Stack";var Y=ge;var Rr=Jr(Ur(Yr))({alignItems:"flex-start",fontWeight:"unset"});function Po(e){let{title:o,content:t,actions:n,color:i="primary",...a}=e,r=e.invertedColors||e.variant==="solid";return Qe.createElement(Rr,{...a,color:i,endDecorator:n,invertedColors:r},Qe.createElement(Y,null,o&&Qe.createElement(U,{level:"title-sm",color:i},o),Qe.createElement(U,{level:"body-sm",color:i},t)))}Po.displayName="Alert";import A,{useCallback as sn,useEffect as mn,useMemo as xe,useRef as pn,useState as dn}from"react";import{Autocomplete as cn,AutocompleteOption as un,ListSubheader as gn,AutocompleteListbox as fn,ListItemDecorator as Ct,CircularProgress as hn,styled as bt}from"@mui/joy";import Cn from"@mui/icons-material/esm/Close.js";import{useVirtualizer as bn}from"@tanstack/react-virtual";import{Popper as yn}from"@mui/base";import{FormControl as $r,styled as Wr}from"@mui/joy";import{motion as Gr}from"framer-motion";var qr=Wr(Gr($r))({width:"100%"}),fe=qr;fe.displayName="FormControl";var F=fe;import{FormLabel as _r}from"@mui/joy";import{motion as Kr}from"framer-motion";var jr=Kr(_r),he=jr;he.displayName="FormLabel";var B=he;import{FormHelperText as Zr}from"@mui/joy";import{motion as Xr}from"framer-motion";var Qr=Xr(Zr),Ce=Qr;Ce.displayName="FormHelperText";var w=Ce;import{Chip as en}from"@mui/joy";import{motion as on}from"framer-motion";var tn=on(en),be=tn;be.displayName="Chip";var ht=be;import rn from"react";import{IconButton as nn}from"@mui/joy";import{motion as an}from"framer-motion";var ln=an(nn),ye=e=>rn.createElement(ln,{...e});ye.displayName="IconButton";var E=ye;var xn=bt(yn,{name:"Autocomplete",slot:"Popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),vn=A.forwardRef((e,o)=>{let{anchorEl:t,open:n,modifiers:i,children:a,ownerState:{loading:r,size:l="md"},...s}=e,g=pn(null),u=a[0].every(f=>f.hasOwnProperty("group")),c=r?[a[1]]:a[0].length===0?[a[2]]:u?a[0].flatMap(f=>[A.createElement(gn,{key:f.key,component:"li"},f.group),...f.children]):a[0],C=bn({count:c.length,estimateSize:()=>36,getScrollElement:()=>g.current,overscan:5}),m=C.getVirtualItems();return mn(()=>{n&&C.measure()},[n]),A.createElement(xn,{ref:o,anchorEl:t,open:n,modifiers:i},A.createElement(fn,{...s},A.createElement("div",{ref:g,style:{overflow:"auto"}},A.createElement("div",{style:{height:`${C.getTotalSize()}px`,position:"relative"}},m.map(({index:f,size:d,start:p,key:x})=>A.cloneElement(c[f],{key:x,style:{position:"absolute",top:0,left:0,width:"100%",fontSize:`var(--ceed-fontSize-${l})`,height:`${d}px`,transform:`translateY(${p}px)`,overflow:"visible"},children:A.createElement("div",{style:{textOverflow:"ellipsis",textWrap:"nowrap",overflow:"hidden",width:"100%"}},c[f].props.children)}))))))}),eo={sm:"20px",md:"24px",lg:"28px"},Dn=bt(E,{name:"Autocomplete",slot:"tagDelete"})(({theme:e,size:o="md"})=>({width:eo[o],height:eo[o],minWidth:eo[o],minHeight:eo[o],borderRadius:"50%"}));function oo(e){let{label:o,error:t,helperText:n,color:i,size:a,disabled:r,required:l,onChange:s,onChangeComplete:g,...u}=e,[c,C]=dn(e.value||e.defaultValue),m=xe(()=>e.options.map(h=>typeof h!="object"?{value:h,label:h}:h),[e.options]),f=xe(()=>{let h=new Map;return m.forEach(b=>{h.set(b.value,b)}),h},[e.options]),d=xe(()=>{if(e.loading)return{value:"",label:"",startDecorator:A.createElement(hn,{size:"sm",color:"neutral",variant:"plain",thickness:3})};if(c==null)return null;let h=b=>typeof b!="object"?f.get(b)??b:f.get(b.value);return Array.isArray(c)?c.map(h):h(c)},[c,e.options,e.loading]),p=sn(h=>A.isValidElement(h)&&!e.loading?A.cloneElement(h,{size:a}):h,[a,e.loading]),x=xe(()=>p(d?.startDecorator||e.startDecorator),[d,p]),k=xe(()=>p(d?.endDecorator||e.endDecorator),[d,p]),T=A.createElement(cn,{...u,required:l,onChange:(h,b)=>{C(b);let P=b,M=Array.isArray(P)?P.map(L=>L.value):P?.value;s?.({...h,target:{...h.target,value:M}}),(Array.isArray(P)&&P.map(L=>f.get(L.value))||f.get(P?.value))&&g?.({...h,target:{...h.target,value:M}})},color:t?"danger":i,value:d,options:m,size:a,disabled:r,startDecorator:x,endDecorator:k,getOptionLabel:h=>`${h.value??""}`,renderTags:(h,b)=>h.map((P,M)=>{let{onClick:L,...te}=b({index:M});return p(A.createElement(ht,{color:"primary",...te},A.createElement(Y,{direction:"row",alignItems:"center",gap:2,py:.5},P.value,p(A.createElement(Dn,{color:"primary",variant:"soft",onClick:L},A.createElement(Cn,null))))))}),slots:{listbox:vn},renderOption:(h,b)=>A.createElement(un,{...h},b.startDecorator&&A.createElement(Ct,{sx:P=>({marginInlineEnd:`var(--Input-gap, ${P.spacing(1)})`})},p(b.startDecorator)),p(b.label),b.endDecorator&&A.createElement(Ct,{sx:P=>({marginInlineStart:`var(--Input-gap, ${P.spacing(1)})`})},p(b.endDecorator))),renderGroup:h=>h});return o?A.createElement(F,{required:l,color:i,size:a,error:t,disabled:r},A.createElement(B,null,o),T,n&&A.createElement(w,null,n)):T}var yt=oo;import{Box as Mn}from"@mui/joy";import{motion as kn}from"framer-motion";var Pn=kn(Mn),ve=Pn;ve.displayName="Box";var to=ve;import q from"react";import{Breadcrumbs as Dt,Link as En}from"@mui/joy";import To from"react";import{Menu as Tn,MenuButton as wn,MenuItem as An}from"@mui/joy";import{motion as wo}from"framer-motion";var In=wo(Tn),De=e=>To.createElement(In,{...e});De.displayName="Menu";var Fn=wo(wn),Me=e=>To.createElement(Fn,{...e});Me.displayName="MenuButton";var Bn=wo(An),ke=e=>To.createElement(Bn,{...e});ke.displayName="MenuItem";var xt=De;import{Dropdown as Nn}from"@mui/joy";import{motion as Ln}from"framer-motion";var Sn=Ln(Nn),Pe=Sn;Pe.displayName="Dropdown";var vt=Pe;function Ao(e){let{crumbs:o,size:t,startCrumbCount:n=1,endCrumbCount:i=3,slots:{link:a,...r}={link:En},slotProps:{link:l,...s}={link:{color:"neutral"}},collapsed:g=!0,...u}=e,c=p=>p.type==="link"&&a?q.createElement(a,{to:p.linkHref,href:p.linkHref,...l},p.label):q.createElement(U,null,p.label);if(!g)return q.createElement(Dt,{size:t,slots:r,slotProps:s,...u},o.map(p=>q.createElement(c,{...p})));let C=Math.max(1,i),m=o.slice(0,n).map(p=>q.createElement(c,{...p})),f=(n+C>o.length?o.slice(n):o.slice(-C)).map(p=>q.createElement(c,{...p})),d=o.slice(n,-C).map(p=>q.createElement(ke,null,q.createElement(c,{...p})));return q.createElement(Dt,{size:t,slots:r,slotProps:s,...u},m,d.length&&q.createElement(vt,null,q.createElement(Me,{size:t,variant:"plain"},"..."),q.createElement(xt,{size:t},d)),f)}Ao.displayName="Breadcrumbs";import Hn,{forwardRef as On}from"react";import{Button as zn}from"@mui/joy";import{motion as Vn}from"framer-motion";var Yn=Vn(zn),Te=On((e,o)=>Hn.createElement(Yn,{ref:o,...e}));Te.displayName="Button";var I=Te;import D,{Fragment as ce,forwardRef as Wn,useMemo as Ft}from"react";import{styled as j}from"@mui/joy";import Gn from"@mui/icons-material/esm/ChevronLeft.js";import qn from"@mui/icons-material/esm/ChevronRight.js";import{AnimatePresence as Bt,motion as _n}from"framer-motion";var Mt=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 g=1;g<=7;g++)l===i&&g<t.getDay()+1||r>n.getDate()?s.push(void 0):(s.push(r),r++);o.push(s)}return o},kt=(e,o)=>e.toLocaleString(o,{year:"numeric"}),Io=(e,o)=>e.toLocaleString(o,{year:"numeric",month:"long"}),Pt=(e,o)=>new Date(0,e).toLocaleString(o,{month:"short"}),Tt=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})},wt=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()},Fo=(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()},ee=(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},ro=(e,o)=>e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth();import{useCallback as Jn,useMemo as Un,useState as no}from"react";import{useThemeProps as Rn}from"@mui/joy";var $n=(e,o)=>o.includes(e)?e:o[0],At=e=>{let[o,t]=no(()=>$n(e.view||"day",e.views||["day","month"])),[n,i]=no(e.defaultValue),[a,r]=no(()=>{let d=new Date;return d.setDate(1),d.setHours(0,0,0,0),e.value?.[0]||e.defaultValue?.[0]||d}),[[l,s],g]=no([0,0]),u=e.view??o,c=d=>{g([l+d,d])},C=Jn(d=>{r(d),u==="month"?a.getFullYear()!==d.getFullYear()&&c(d>a?1:-1):c(d>a?1:-1),e.onMonthChange?.(d)},[e.onMonthChange,a,u]),m=Rn({props:{locale:"default",views:["day","month"],view:u,value:e.value??n,...e,onChange:e.value?e.onChange:d=>{i(d),e.onChange?.(d)},onMonthChange:C,onViewChange:()=>{let d=u==="month"?"day":"month";!(!e.views||e.views.includes(d))||e.view===d||(e.onViewChange?e.onViewChange(d):t(d))}},name:"Calendar"}),f=Un(()=>({...m,viewMonth:a,direction:s}),[m,a,s]);return[m,f]};import{useCallback as de,useState as It}from"react";var ao=e=>{let[o,t]=It(null),[n,i]=It(null);return{calendarTitle:e.view==="month"?kt(e.viewMonth,e.locale||"default"):Io(e.viewMonth,e.locale||"default"),onPrev:de(()=>{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:de(()=>{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:de(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&&ee(e.value[0],o,r)||e.value[1]&&ee(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:de(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(g=>g==="day")&&e.rangeSelection&&e.value&&e.value[0]&&(n&&ee(e.value[0],n,r)||e.value[1]&&ee(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:de(a=>{let r=new Date(e.viewMonth||new Date);r.setHours(0,0,0,0),r.setDate(a);let l=!!e.value&&(Fo(r,e.value[0])||e.value[1]&&Fo(r,e.value[1])),s=e.rangeSelection&&e.value&&e.value[0]&&(o&&ee(e.value[0],o,r)||e.value[1]&&ee(e.value[0],e.value[1],r)),g=()=>{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:wt(r),isSelected:l,onClick:g,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":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:de(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(C=>C==="day"),s=l&&e.rangeSelection,g=!!e.value&&(ro(r,e.value[0])||e.value[1]&&ro(r,e.value[1])),u=s&&e.value&&e.value[0]&&(n&&ee(e.value[0],n,r)||e.value[1]&&ee(e.value[0],e.value[1],r)),c=()=>{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:g,onMouseEnter:s&&e.value?.[0]&&!e.value?.[1]?()=>i(r):void 0,disabled:e.minDate&&(()=>{let C=new Date(r);return C.setMonth(C.getMonth()+1),C.setDate(0),C<e.minDate})()||e.maxDate&&(()=>{let C=new Date(r);return C.setDate(0),C>e.maxDate})()||e.disableFuture&&r>new Date||e.disablePast&&r<new Date&&!ro(r,new Date),onClick:c,tabIndex:-1,"aria-label":Io(r,e.locale||"default"),"aria-selected":g?"true":void 0,"aria-current":u?"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 Kn=j("div",{name:"Calendar",slot:"root"})({maxWidth:"264px"}),jn=j("div",{name:"Calendar",slot:"calendarHeader"})(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:e.spacing(2)})),Nt=j("div",{name:"Calendar",slot:"viewContainer",shouldForwardProp:e=>e!=="calendarType"})(({theme:e,calendarType:o})=>({paddingLeft:e.spacing(2),paddingRight:e.spacing(2),position:"relative",overflow:"hidden",minHeight:o==="datePicker"?"250px":"unset"})),Lt=j(_n.table,{name:"Calendar",slot:"viewTable"})(({theme:e})=>({borderSpacing:0,"& td, & th":{padding:0},"& th":{paddingTop:e.spacing(2),paddingBottom:e.spacing(2)}})),Zn=j("thead",{name:"Calendar",slot:"weekHeaderContainer"})({}),Xn=j("tbody",{name:"Calendar",slot:"dayPickerContainer"})({}),Qn=j(I,{name:"Calendar",slot:"switchViewButton"})(({ownerState:e})=>[e.view==="month"&&{pointerEvents:"none"}]),ea=j("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}}})),oa=j("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}}})),ta=j(I,{name:"Calendar",slot:"month",shouldForwardProp:e=>e!=="isSelected"})(({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}]),ra=j(I,{name:"Calendar",slot:"day",shouldForwardProp:e=>!["isToday","isSelected"].includes(e)})(({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}]),St={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})},io=1e4,Et=(e,o)=>Math.abs(e)*o,na=e=>{let{ownerState:o}=e,{getPickerDayProps:t,getDayCellProps:n}=ao(o),i=Ft(()=>Mt(o.viewMonth),[o.viewMonth]),a=Ft(()=>Tt(o.locale||"default"),[o.locale]);return D.createElement(Nt,{calendarType:"datePicker"},D.createElement(Bt,{initial:!1,custom:o.direction},D.createElement(Lt,{key:`${o.viewMonth.toString()}_${o.direction}`,custom:o.direction,variants:St,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 g=Et(l.x,s.x);if(g<-io){let u=new Date(o.viewMonth||new Date);u.setMonth(u.getMonth()+1),o.onMonthChange?.(u)}else if(g>io){let u=new Date(o.viewMonth||new Date);u.setMonth(u.getMonth()-1),o.onMonthChange?.(u)}}},D.createElement(Zn,null,D.createElement("tr",null,a.map((r,l)=>D.createElement(ce,{key:`${o.viewMonth}_${r}_${l}`},D.createElement("th",null,D.createElement(U,{level:"body-xs",textAlign:"center"},r)),l<6&&D.createElement("th",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"}))))),D.createElement(Xn,null,i.map((r,l)=>D.createElement(ce,{key:`${o.viewMonth}_${l}`},D.createElement("tr",null,r.map((s,g)=>s?D.createElement(ce,{key:g},D.createElement(ea,{...n(s)},D.createElement(ra,{size:"sm",variant:"plain",color:"neutral",...t(s)},s)),g<6&&D.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})):D.createElement(ce,{key:g},D.createElement("td",null),g<6&&D.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&D.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},D.createElement("td",{colSpan:13,style:{height:4}}))))))))},aa=e=>{let{ownerState:o}=e,{getPickerMonthProps:t,getMonthCellProps:n}=ao(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 D.createElement(Nt,{calendarType:a?"monthPicker":"datePicker"},D.createElement(Bt,{initial:!1,custom:o.direction},D.createElement(Lt,{key:`${o.viewMonth.getFullYear()}_${o.direction}`,custom:o.direction,variants:St,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 g=Et(l.x,s.x);if(g<-io){let u=new Date(o.viewMonth||new Date);u.setMonth(u.getMonth()+1),o.onMonthChange?.(u)}else if(g>io){let u=new Date(o.viewMonth||new Date);u.setMonth(u.getMonth()-1),o.onMonthChange?.(u)}}},D.createElement("tbody",null,i.map((r,l)=>D.createElement(ce,{key:l},D.createElement("tr",null,r.map((s,g)=>D.createElement(ce,{key:s},D.createElement(oa,{...n(s)},D.createElement(ta,{size:"sm",variant:"plain",color:"neutral",...t(s)},Pt(s,o.locale))),g<3&&D.createElement("td",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"})))),l<i.length-1&&D.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},D.createElement("td",{colSpan:7,style:{height:4}}))))))))},we=Wn((e,o)=>{let[t,n]=At(e),{value:i,defaultValue:a,onChange:r,locale:l,onViewChange:s,onMonthChange:g,view:u,views:c,rangeSelection:C,minDate:m,maxDate:f,disableFuture:d,disablePast:p,...x}=t,{calendarTitle:k,onPrev:v,onNext:T}=ao(n);return D.createElement(Kn,{ref:o,...x},D.createElement(jn,null,D.createElement(E,{size:"sm",onClick:v},D.createElement(Gn,null)),D.createElement(Qn,{ownerState:n,variant:"plain",color:"neutral",onClick:s},k),D.createElement(E,{size:"sm",onClick:T},D.createElement(qn,null))),u==="day"&&D.createElement(na,{ownerState:n}),u==="month"&&D.createElement(aa,{ownerState:n}))});we.displayName="Calendar";var re=we;import{Card as ia,CardContent as la,CardCover as sa,CardActions as ma,CardOverflow as pa}from"@mui/joy";import{motion as Ae}from"framer-motion";var da=Ae(ia),Ie=da;Ie.displayName="Card";var ca=Ae(la),Bo=ca;Bo.displayName="CardContent";var ua=Ae(sa),No=ua;No.displayName="CardCover";var ga=Ae(ma),Lo=ga;Lo.displayName="CardActions";var fa=Ae(pa),So=fa;So.displayName="CardOverflow";import ha from"react";import{Checkbox as Ca}from"@mui/joy";import{motion as ba}from"framer-motion";var ya=ba(Ca),Fe=e=>ha.createElement(ya,{...e});Fe.displayName="Checkbox";var Be=Fe;import{styled as xa}from"@mui/joy";import va,{forwardRef as Da}from"react";var Ma=xa("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(4),paddingRight:e.spacing(4),...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}}})),Eo=Da(function(o,t){return va.createElement(Ma,{ref:t,...o})});Eo.displayName="Container";import ne,{useCallback as Ia,useMemo as Fa,useState as Ot}from"react";import{IntlMessageFormat as Ba}from"intl-messageformat";import{NumericFormat as Na}from"react-number-format";import Ne from"react";import{Input as ka}from"@mui/joy";import{motion as Pa}from"framer-motion";var Ta=Pa(ka),Le=Ne.forwardRef((e,o)=>{let{label:t,helperText:n,error:i,style:a,size:r,color:l,disabled:s,required:g,...u}=e,c=Ne.createElement(Ta,{required:g,color:i?"danger":l,size:r,disabled:s,slotProps:{input:{ref:o,...u.slotProps?.input},...u.slotProps},...u});return t?Ne.createElement(F,{required:g,color:l,size:r,error:i,disabled:s},Ne.createElement(B,null,t),c,n&&Ne.createElement(w,null,n)):c});Le.displayName="Input";var R=Le;import wa from"intl-messageformat";var Aa={AED:2,ALL:2,AMD:2,ANG:2,AOA:2,ARS:2,AUD:2,AWG:2,AZN:2,BAM:2,BBD:2,BDT:2,BGN:2,BHD:3,BMD:2,BND:2,BOB:2,BRL:2,BSD:2,BWP:2,BYN:2,BZD:2,CAD:2,CHF:2,CLP:2,CNH:2,CNY:2,COP:2,CRC:2,CUP:2,CVE:0,CZK:2,DJF:0,DKK:2,DOP:2,DZD:2,EGP:2,ETB:2,EUR:2,FJD:2,FKP:2,GBP:2,GEL:2,GHS:2,GIP:2,GMD:2,GNF:0,GTQ:2,GYD:2,HKD:2,HNL:2,HTG:2,HUF:2,IDR:0,ILS:2,INR:2,IQD:3,ISK:2,JMD:2,JOD:3,JPY:0,KES:2,KGS:2,KHR:2,KMF:0,KRW:0,KWD:3,KYD:2,KZT:2,LAK:2,LBP:2,LKR:2,LYD:3,MAD:2,MDL:2,MKD:2,MMK:2,MNT:2,MOP:2,MRU:2,MUR:2,MVR:2,MWK:2,MXN:2,MYR:2,MZN:2,NAD:2,NGN:2,NIO:2,NOK:2,NPR:2,NZD:2,OMR:3,PAB:2,PEN:2,PGK:2,PHP:2,PKR:2,PLN:2,PYG:0,QAR:2,RON:2,RSD:2,RUB:2,RWF:0,SAR:2,SBD:2,SCR:2,SEK:2,SGD:2,SHP:2,SLE:2,SOS:2,SRD:2,STN:2,SVC:2,SZL:2,THB:2,TND:3,TOP:2,TRY:2,TTD:2,TWD:2,TZS:2,UAH:2,UGX:0,USD:2,UYU:2,UZS:2,VEF:2,VND:0,VUV:0,WST:2,XAF:0,XCD:2,XOF:0,XPF:0,YER:2,ZAR:2,ZMW:2},Ht=(e="USD")=>{let[o,t,n,...i]=new wa(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split(""),a=Aa[e];return{symbol:`${o} `,thousandSeparator:t,decimalSeparator:n,placeholder:n?`${o} 0${n}${Array.from(Array(a)).map(()=>0).join("")}`:`${o} 0`,fixedDecimalScale:!!n,decimalScale:a}};var La=ne.forwardRef(function(o,t){let{onChange:n,...i}=o;return ne.createElement(Na,{...i,onValueChange:({value:a})=>{n?.({target:{name:o.name,value:a}})},valueIsNumericString:!0,getInputRef:t,allowNegative:!1})}),lo=ne.forwardRef(function(o,t){let{currency:n="USD",max:i,name:a,onChange:r,label:l,error:s,helperText:g,required:u,disabled:c,useMinorUnit:C,...m}=o,{symbol:f,thousandSeparator:d,decimalSeparator:p,placeholder:x,fixedDecimalScale:k,decimalScale:v}=Ht(n),[T,h]=Ot(o.value),b=Fa(()=>T&&C?T/Math.pow(10,v):T,[T,C]),[P,M]=Ot(!!i&&!!b&&b>i),L=Ia(K=>{i&&Number(K.target.value)>i?M(!0):M(!1);let le=Number(C?K.target.value?.replace(p,""):K.target.value);h(le),r?.({...K,target:{name:a,value:le}})},[]),te=ne.createElement(R,{...m,size:"sm",ref:t,value:b,placeholder:x,onChange:L,disabled:c,required:u,color:s||P?"danger":o.color,slotProps:{input:{component:La,decimalSeparator:p,thousandSeparator:d,prefix:f,fixedDecimalScale:k,decimalScale:v}},sx:{fontFamily:"monospace"}});return l?ne.createElement(F,{size:"sm",disabled:c,required:u,error:s||P},ne.createElement(B,null,l),te,P?ne.createElement(w,null,new Ba(`limit: {amount, number, ::currency/${n} unit-width-narrow}`).format({amount:i})):g&&ne.createElement(w,null,g)):te});var zt=lo;import y,{useCallback as ie,useEffect as Je,useMemo as $,useRef as _t,useState as uo}from"react";import{styled as Kt,LinearProgress as ui,Link as gi}from"@mui/joy";import fi from"@mui/icons-material/esm/ChevronLeft.js";import hi from"@mui/icons-material/esm/ChevronRight.js";import{Sheet as Sa}from"@mui/joy";import{motion as Ea}from"framer-motion";var Ha=Ea(Sa),Se=Ha;Se.displayName="Sheet";var _=Se;import Z from"react";import{Table as Oa}from"@mui/joy";var Ee=e=>{let{children:o,...t}=e;return Z.createElement(Oa,{...t},o)};Ee.displayName="Table";function Ho(e){let{headCells:o,showCheckbox:t,onCheckboxChange:n,slots:{checkbox:i=Be}={},slotProps:{checkbox:a={}}={}}=e;return Z.createElement("thead",null,Z.createElement("tr",null,t&&Z.createElement("th",{style:{width:"40px",textAlign:"center"}},Z.createElement(i,{onChange:n,...a})),o.map(r=>Z.createElement("th",{key:r.label,style:{width:r.width,minWidth:r.minWidth,maxWidth:r.maxWidth,textAlign:r.numeric?"right":"left"}},r.label))))}Ho.displayName="TableHead";function Oo(e){let{rows:o,cellOrder:t,rowOptions:n,showCheckbox:i,onCheckboxChange:a,slots:{checkbox:r=Be}={},slotProps:{checkbox:l={}}={}}=e;return Z.createElement("tbody",null,o.map((s,g)=>Z.createElement("tr",{key:g},i&&Z.createElement("td",{style:{textAlign:"center"}},Z.createElement(r,{onChange:u=>a?.(u,g),...l})),t.map(u=>Z.createElement("td",{key:u,style:{textAlign:n?.[u]?.numeric?"right":"left"}},s[u])))))}Oo.displayName="TableBody";import H,{forwardRef as Ra,useCallback as Vt,useEffect as Yt,useImperativeHandle as $a,useRef as Wa,useState as Jt}from"react";import{IMaskInput as Ga,IMask as zo}from"react-imask";import qa from"@mui/icons-material/esm/CalendarToday.js";import{styled as Vo}from"@mui/joy";import{FocusTrap as _a,ClickAwayListener as Ka,Popper as ja}from"@mui/base";import{DialogActions as za,styled as Va}from"@mui/joy";import{motion as Ya}from"framer-motion";var Ja=Ya(za),Ua=Va(Ja)(({theme:e})=>({padding:e.spacing(2),gap:e.spacing(2),flexDirection:"row",justifyContent:"flex-end"})),He=Ua;He.displayName="DialogActions";var X=He;var Za=Vo(ja,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Xa=Vo(_,{name:"DatePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),Qa=Vo("div",{name:"DatePicker",slot:"container"})({width:"100%"}),Ut=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("/")},ei=H.forwardRef(function(o,t){let{onChange:n,...i}=o;return H.createElement(Ga,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/`m/`d",blocks:{d:{mask:zo.MaskedRange,from:1,to:31,maxLength:2},m:{mask:zo.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:zo.MaskedRange,from:1900,to:9999}},format:Ut,parse:a=>{let r=a.split("/");return new Date(Number(r[0]),Number(r[1])-1,Number(r[2]))},autofix:"pad",overwrite:!0})}),so=Ra((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:s,disableFuture:g,disablePast:u,required:c,...C}=e,m=Wa(null),[f,d]=Jt(e.value||""),[p,x]=Jt(null),k=!!p;Yt(()=>{d(e.value||"")},[e.value]),Yt(()=>{p||m.current?.blur()},[p,m]),$a(o,()=>m.current,[m.current]);let v=Vt(b=>{d(b.target.value),t?.(b)},[]),T=Vt(b=>{x(p?null:b.currentTarget),setTimeout(()=>{m.current?.focus()},0)},[p,x,m]),h=H.createElement(Qa,null,H.createElement(_a,{open:!0},H.createElement(H.Fragment,null,H.createElement(R,{...C,color:a?"danger":C.color,ref:m,size:"sm",value:f,onChange:v,placeholder:"YYYY/MM/DD",disabled:n,required:c,slotProps:{input:{component:ei,ref:m}},sx:{fontFamily:"monospace"},endDecorator:H.createElement(E,{variant:"plain",onClick:T},H.createElement(qa,null))}),k&&H.createElement(Ka,{onClickAway:()=>x(null)},H.createElement(Za,{id:"date-picker-popper",open:!0,anchorEl:p,placement:"bottom-end",onMouseDown:b=>b.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},H.createElement(Xa,{tabIndex:-1,role:"presentation"},H.createElement(re,{value:Number.isNaN(new Date(f).getTime())?void 0:[new Date(f),void 0],onChange:([b])=>{v({target:{name:e.name,value:Ut(b)}}),x(null)},minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:g,disablePast:u}),H.createElement(X,{sx:{p:1}},H.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{v({target:{name:e.name,value:""}}),x(null)}},"Clear"))))))));return i?H.createElement(F,{required:c,disabled:n,error:a,size:"sm"},H.createElement(B,null,i),h,r&&H.createElement(w,null,r)):h});var Rt=so;import mo from"react";import{Textarea as oi}from"@mui/joy";import{motion as ti}from"framer-motion";var ri=ti(oi),Oe=e=>{let{label:o,error:t,helperText:n,color:i,size:a,disabled:r,required:l,minRows:s=2,maxRows:g=4,...u}=e,c=mo.createElement(ri,{required:l,disabled:r,color:t?"danger":i,size:a,minRows:s,maxRows:g,...u});return o?mo.createElement(F,{required:l,disabled:r,color:i,size:a,error:t},mo.createElement(B,null,o),c,n&&mo.createElement(w,null,n)):c};Oe.displayName="Textarea";var $t=Oe;import ze,{useMemo as ni}from"react";import{Select as ai,Option as ii}from"@mui/joy";import{motion as li}from"framer-motion";var si=li(ii),po=si;po.displayName="Option";function Ve(e){let{label:o,helperText:t,error:n,size:i,color:a,disabled:r,required:l,onChange:s,...g}=e,u=ni(()=>e.options.map(m=>typeof m!="object"?{value:m,label:m}:m),[e.options]),C=ze.createElement(ai,{...g,required:l,disabled:r,size:i,color:n?"danger":a,onChange:(m,f)=>{let d=m||{target:{}},p={...d,target:{name:d.target?.name||e.name,value:f||void 0}};s?.(p)}},u.map(m=>ze.createElement(po,{key:m.value,value:m.value},m.label)));return o?ze.createElement(F,{required:l,disabled:r,size:i,color:a,error:n},ze.createElement(B,null,o),C,t&&ze.createElement(w,null,t)):C}Ve.displayName="Select";var Wt=Ve;import mi from"react";import{Tooltip as pi}from"@mui/joy";import{motion as di}from"framer-motion";var ci=di(pi),Ye=e=>mi.createElement(ci,{...e});Ye.displayName="Tooltip";var Gt=Ye;function jt(e){return!e.editMode&&["number","date","currency"].includes(e.type||"")?"end":"start"}var qt=Kt("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"}}),co=e=>"Intl"in window?new Intl.NumberFormat().format(e):e;function Ci(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(c=>c>1),s=[o+1,o+2].filter(c=>c<=r-1),g=r>1&&o<r-3,u=r>1&&o>4;return y.createElement(Y,{direction:"row",spacing:1,sx:{pt:1,pb:1},justifyContent:"end",alignItems:"center"},y.createElement(Y,{direction:"row",spacing:.5,alignItems:"center"},y.createElement(E,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-1),disabled:o===a,"aria-label":"Previous page"},y.createElement(fi,null)),o!==a&&y.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(a)},a),u&&y.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-3)},"..."),l.map(c=>y.createElement(I,{key:c,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(c)},c)),y.createElement(I,{variant:"soft",size:"sm"},o),s.map(c=>y.createElement(I,{key:c,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(c)},c)),g&&y.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+3)},"..."),o!==r&&y.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(r)},r),y.createElement(E,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+1),disabled:o===r,"aria-label":"Next page"},y.createElement(hi,null))))}var bi=e=>y.createElement(to,{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)}}),yi=Kt("span",{name:"DataTable",slot:"headCellAsterisk"})(({theme:e})=>({color:"var(--ceed-palette-danger-500)",marginLeft:e.spacing(.5)})),xi=e=>{let o=_t(null),t={width:e.width,minWidth:e.minWidth??"50px",maxWidth:e.maxWidth,textAlign:jt(e),position:e.stickyHeader?void 0:"relative"},n=e.resizable??!0?bi(o):null;return y.createElement("th",{ref:o,key:e.field,style:t},e.headerName??e.field,e.editMode&&e.required&&y.createElement(yi,null,"*"),n)},vi=e=>{let{field:o,type:t,renderCell:n,isCellEditable:i,row:a,rowId:r}=e,[l,s]=uo(a[o]),[g,u]=uo(!1),c=_t(null),C=$(()=>({row:a,value:l,id:r}),[a,o,r,l]),m=$(()=>!!(e.editMode&&(typeof i=="function"?i(C):i??!0)),[e.editMode,i,a]),f=$(()=>({...typeof e.componentProps=="function"?e.componentProps(C):e.componentProps||{},size:"sm"}),[l,e.componentProps,C]),d=$(()=>({...f,onChange:v=>{f.onChange?.(v),s(v.target.value),t==="select"&&e.onCellEditStop?.({...C,originalRow:a,row:{...C.row,[o]:v.target.value},value:v.target.value})},onFocus:v=>{f.onFocus?.(v),e.onCellEditStart?.({...C,originalRow:a,row:{...C.row,value:l},value:l})},onBlur:v=>{f.onBlur?.(v),t&&["number","text","longText","currency","date"].includes(t)&&e.onCellEditStop?.({...C,originalRow:a,row:{...C.row,[o]:l},value:l})},...t==="autocomplete"&&{onChangeComplete:v=>{f.onChangeComplete?.(v),s(v.target.value),e.onCellEditStop?.({...C,originalRow:a,row:{...C.row,[o]:v.target.value},value:v.target.value})}}}),[l,f]),p=$(()=>({date:y.createElement(Rt,{value:l,...d}),currency:y.createElement(zt,{value:l,...d}),number:y.createElement(R,{value:l,type:"number",...d}),text:y.createElement(R,{value:l,type:"text",...d}),longText:y.createElement($t,{value:l,...d}),autocomplete:y.createElement(yt,{value:l,options:d.options||[l],...d}),select:y.createElement(Wt,{value:l,options:d.options||[l],...d})})[t||"text"],[l,f]),x=$(()=>{if(n)return n(C);let v=l;return{link:y.createElement(e.component||gi,{children:v,...f})}[t||"text"]||v},[l,n,a]),k=$(()=>m&&p?p:x,[m,p,x]);return Je(()=>{s(a[o])},[a]),Je(()=>{c.current&&c.current.scrollWidth>c.current.offsetWidth?u(!0):u(!1)},[c,m]),y.createElement("td",{ref:c,key:o,style:{textAlign:jt({type:t}),verticalAlign:m?"top":"middle",overflow:g?"auto":"hidden",textOverflow:"ellipsis"}},g?y.createElement(Gt,{title:l,placement:"bottom",style:{maxWidth:"100%"}},y.createElement("div",{style:{overflow:"hidden",textOverflow:"ellipsis"}},k)):k)},Di=e=>{let{columns:o,rowId:t,editMode:n}=e,[i,a]=uo(e.row),r=ie(({row:l})=>{a(l)},[]);return y.createElement(y.Fragment,null,o.map((l,s)=>y.createElement(vi,{...l,key:`${t}_${l.field.toString()}_${s}`,row:i,rowId:t,editMode:n,onCellEditStop:g=>{l.onCellEditStop?.(g),r(g)}})))};function Mi({rows:e,columns:o,rowCount:t,pagination:n,paginationMode:i,paginationModel:a,onPaginationModelChange:r,selectionModel:l=[],onSelectionModelChange:s,getId:g,isTotalSelected:u}){let[c,C]=uo(a?.page||1),m=a?.pageSize||20,f=ie((h,b)=>g?.(h)??h?.id??`${(b||0)+(c-1)*m}`,[g??c,m]),d=$(()=>new Set(l),[l]),p=$(()=>!n||i==="server"?e:e.slice((c-1)*m,(c-1)*m+m),[e,c,m,i,n]),x=$(()=>p.length>0&&p.every((h,b)=>d.has(f(h,b))),[p,d,c,m,f]),k=t||e.length,v=$(()=>u??(k>0&&l.length===k),[u,l,k]),T=ie(h=>{C(h),r?.({page:h,pageSize:m})},[r]);return Je(()=>{T(1)},[k]),Je(()=>{let h=Math.max(1,Math.ceil(k/m));c>h&&T(h)},[c,k,m]),Je(()=>{s?.([])},[c]),{rowCount:k,page:c,pageSize:m,onPaginationModelChange:T,getId:f,HeadCell:xi,BodyRow:Di,dataInPage:p,isAllSelected:x,isTotalSelected:v,isSelectedRow:ie(h=>d.has(h),[d]),onAllCheckboxChange:ie(()=>{s?.(x?[]:p.map(f))},[x,p,s]),onCheckboxChange:ie((h,b)=>{if(d.has(b)){let P=l.filter(M=>M!==b);s?.(P)}else{let P=[...l,b];s?.(P)}},[l,s]),columns:$(()=>o||Object.keys(e[0]||{}).map(h=>({field:h})),[e,o]),onTotalSelect:ie(()=>{s?.(v?[]:e.map(f),!v)},[v,e,s])}}function Yo(e){let{rows:o,checkboxSelection:t,editMode:n,selectionModel:i,onSelectionModelChange:a,rowCount:r,columns:l,onPaginationModelChange:s,pagination:g,paginationMode:u,paginationModel:c,loading:C,slots:{checkbox:m=Be,toolbar:f,footer:d,loadingOverlay:p=()=>y.createElement(ui,{value:8,variant:"plain"})}={},slotProps:{checkbox:x={},toolbar:k,background:v={}}={},...T}=e,{columns:h,isAllSelected:b,isSelectedRow:P,onAllCheckboxChange:M,onCheckboxChange:L,getId:te,rowCount:K,page:le,pageSize:S,onPaginationModelChange:J,dataInPage:W,isTotalSelected:se,onTotalSelect:Q,HeadCell:Dr,BodyRow:Mr}=Mi(e),kr=$(()=>({page:le,pageSize:S}),[le,S]);return y.createElement(to,null,!!t||!!f&&y.createElement(Y,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center"},!!t&&y.createElement(Y,{direction:"row",spacing:1},!b&&y.createElement(U,{level:"body-xs"},co(i?.length||0)," items selected"),b&&!se&&y.createElement(Y,{direction:"row",spacing:1,alignItems:"center"},y.createElement(U,{level:"body-xs"},"All ",co(i?.length||0)," items on this page are selected."),y.createElement(I,{size:"sm",variant:"plain",onClick:Q},"Select all ",co(K??o.length)," ","items")),se&&y.createElement(Y,{direction:"row",spacing:1,alignItems:"center"},y.createElement(U,{level:"body-xs"},"All ",co(K??o.length)," items are selected."),y.createElement(I,{size:"sm",variant:"plain",color:"danger",onClick:Q},"Cancel"))),f&&y.createElement(f,{...k||{}})),y.createElement(_,{variant:"outlined",sx:{overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"},...v},y.createElement(Ee,{...T},y.createElement("thead",null,y.createElement("tr",null,t&&y.createElement("th",{style:{width:"40px",textAlign:"center"}},y.createElement(m,{onChange:M,checked:b,indeterminate:(i||[]).length>0&&!b,...x})),h.map((me,Do)=>y.createElement(Dr,{key:`${me.field.toString()}_${Do}`,stickyHeader:e.stickyHeader,editMode:!!(n&&(me.isCellEditable??!0)),...me})))),y.createElement("tbody",null,y.createElement(qt,null,!!C&&y.createElement("td",null,y.createElement(to,{sx:{position:"absolute",top:0,left:0,right:0}},y.createElement(p,null)))),y.createElement(qt,null),W.map((me,Do)=>{let pe=te(me,Do);return y.createElement("tr",{key:pe,role:t?"checkbox":void 0,tabIndex:t?-1:void 0,onClick:t?Mo=>L(Mo,pe):void 0,"aria-checked":t?P(pe):void 0},t&&y.createElement("th",{scope:"row",style:{textAlign:"center"}},y.createElement(m,{onChange:Mo=>L(Mo,pe),checked:P(pe),...x})),y.createElement(Mr,{columns:h,row:me,rowId:pe,editMode:n}))})),d&&y.createElement(d,null))),S<K&&g&&y.createElement(Ci,{paginationModel:kr,rowCount:K,onPageChange:J}))}Yo.displayName="DataTable";import O,{forwardRef as ki,useCallback as Jo,useEffect as Zt,useImperativeHandle as Pi,useMemo as Ti,useRef as wi,useState as Xt}from"react";import{IMaskInput as Ai,IMask as Uo}from"react-imask";import Ii from"@mui/icons-material/esm/CalendarToday.js";import{styled as Ro}from"@mui/joy";import{FocusTrap as Fi,ClickAwayListener as Bi,Popper as Ni}from"@mui/base";var Li=Ro(Ni,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Si=Ro(_,{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})),Ei=Ro("div",{name:"DateRangePicker",slot:"container"})({width:"100%"}),Qt=([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(" - ")},er=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]))]},Hi=O.forwardRef(function(o,t){let{onChange:n,...i}=o;return O.createElement(Ai,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/`m/`d - Y/`m/`d",blocks:{d:{mask:Uo.MaskedRange,from:1,to:31,maxLength:2},m:{mask:Uo.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Uo.MaskedRange,from:1900,to:9999}},format:Qt,parse:er,autofix:"pad",overwrite:!0})}),$o=ki((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:s,disableFuture:g,disablePast:u,required:c,...C}=e,m=wi(null),[f,d]=Xt(e.value||""),[p,x]=Xt(null),k=!!p,v=Ti(()=>f?er(f):void 0,[f]);Zt(()=>{d(e.value||"")},[e.value]),Zt(()=>{p||m.current?.blur()},[p,m]),Pi(o,()=>m.current,[m.current]);let T=Jo(M=>{d(M.target.value),t?.(M)},[t]),h=Jo(M=>{x(p?null:M.currentTarget),m.current?.focus()},[p,x,m]),b=Jo(([M,L])=>{!M||!L||(d(Qt([M,L])),x(null))},[d,x,m]),P=O.createElement(Ei,null,O.createElement(Fi,{open:!0},O.createElement(O.Fragment,null,O.createElement(R,{...C,color:a?"danger":C.color,ref:o,size:"sm",value:f,onChange:T,disabled:n,required:c,placeholder:"YYYY/MM/DD - YYYY/MM/DD",slotProps:{input:{component:Hi,ref:m}},sx:{fontFamily:"monospace"},endDecorator:O.createElement(E,{variant:"plain",onClick:h},O.createElement(Ii,null))}),k&&O.createElement(Bi,{onClickAway:()=>x(null)},O.createElement(Li,{id:"date-range-picker-popper",open:!0,anchorEl:p,placement:"bottom-end",onMouseDown:M=>M.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},O.createElement(Si,{tabIndex:-1,role:"presentation"},O.createElement(re,{rangeSelection:!0,defaultValue:v,onChange:b,minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:g,disablePast:u}),O.createElement(X,{sx:{p:1}},O.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{d(""),x(null)}},"Clear"))))))));return i?O.createElement(F,{required:c,disabled:n,error:a,size:"sm"},O.createElement(B,null,i),P,r&&O.createElement(w,null,r)):P});$o.displayName="DateRangePicker";import{DialogContent as Oi,styled as zi}from"@mui/joy";import{motion as Vi}from"framer-motion";var Yi=Vi(Oi),Ji=zi(Yi)(({theme:e})=>({padding:e.spacing(0,6,5)})),Ue=Ji;Ue.displayName="DialogContent";var go=Ue;import{DialogTitle as Ui,styled as Ri}from"@mui/joy";import{motion as $i}from"framer-motion";var Wi=$i(Ui),Gi=Ri(Wi)(({theme:e})=>({padding:e.spacing(4,6)})),Re=Gi;Re.displayName="DialogTitle";var fo=Re;import We from"react";import ho from"react";import{Modal as qi,ModalDialog as _i,ModalClose as Ki,ModalOverflow as ji,styled as or}from"@mui/joy";import{motion as Wo}from"framer-motion";var Zi=Wo(qi),Go=Zi;Go.displayName="Modal";var tr=or(_i)({padding:0}),$e=tr;$e.displayName="ModalDialog";var Xi=or(Wo(Ki))(({theme:e})=>({top:e.spacing(3),right:e.spacing(6)})),Co=Xi;Co.displayName="ModalClose";var Qi=Wo(ji),qo=Qi;qo.displayName="ModalOverflow";function _o(e){let{title:o,children:t,...n}=e;return ho.createElement(tr,{...n},ho.createElement(Co,null),ho.createElement(fo,null,o),ho.createElement(go,null,t))}_o.displayName="ModalFrame";import{styled as el}from"@mui/joy";var ol=el($e,{name:"Dialog",slot:"Root"})({padding:0}),Ko=We.forwardRef((e,o)=>{let{title:t,children:n,actions:i,fullscreen:a,...r}=e;return We.createElement(ol,{layout:a?"fullscreen":"center",ref:o,...r},We.createElement(fo,null,t),We.createElement(go,null,n),We.createElement(X,null,i))});Ko.displayName="DialogFrame";import tl from"react";import{Divider as rl}from"@mui/joy";import{motion as nl}from"framer-motion";var al=nl(rl),Ge=e=>tl.createElement(al,{...e});Ge.displayName="Divider";import il from"react";import{Drawer as ll}from"@mui/joy";import{motion as sl}from"framer-motion";var ml=sl(ll),jo=e=>{let{children:o,...t}=e;return il.createElement(ml,{...t,slotProps:{...t.slotProps,content:{...t.slotProps?.content,sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}}}},o)};jo.displayName="InsetDrawer";import N,{useCallback as bo,useEffect as pl,useMemo as rr,useRef as nr,useState as yo}from"react";import{styled as ae}from"@mui/joy";import dl from"@mui/icons-material/esm/CloudUploadRounded.js";import cl from"@mui/icons-material/esm/UploadFileRounded.js";import ul from"@mui/icons-material/esm/ClearRounded.js";import{combine as gl}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/combine.js";import{dropTargetForExternal as fl,monitorForExternal as hl}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/adapter.js";import{containsFiles as ar,getFiles as Cl}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/file.js";import{preventUnhandled as ir}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/prevent-unhandled.js";var bl=ae("input")({width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",position:"absolute"}),yl=ae(Y,{name:"Uploader",slot:"PreviewRoot"})({}),xl=ae(Ie,{name:"Uploader",slot:"UploadCard"})(({theme:e})=>({padding:e.spacing(2.5),border:`1px solid ${e.palette.neutral.outlinedBorder}`})),vl=ae(cl,{name:"Uploader",slot:"UploadFileIcon"})(({theme:e})=>({color:e.palette.neutral[400],width:"32px",height:"32px"})),Dl=ae(ul,{name:"Uploader",slot:"ClearIcon"})(({theme:e})=>({color:e.palette.neutral.plainColor,width:"18px",height:"18px"})),Ml=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"],lr=e=>{let o=e==0?0:Math.floor(Math.log(e)/Math.log(1024)),t=e/Math.pow(1024,o),n=Ml[o];return Intl.NumberFormat("en-us",{style:"unit",unit:n,unitDisplay:"narrow"}).format(t)},kl=e=>{let{files:o,uploaded:t,onDelete:n}=e;return N.createElement(yl,{gap:1},[...t,...o].map(i=>N.createElement(xl,{key:i.name,size:"sm",color:"neutral"},N.createElement(Y,{direction:"row",alignItems:"center",gap:2},N.createElement(vl,null),N.createElement(Y,{flex:"1"},N.createElement(U,{level:"body-sm",textColor:"common.black"},i.name),!!i.size&&N.createElement(U,{level:"body-xs",fontWeight:"300",lineHeight:"1.33",textColor:"text.tertiary"},lr(i.size))),N.createElement(E,{onClick:()=>n?.(i)},N.createElement(Dl,null))))))},Pl=ae(Y,{name:"Uploader",slot:"root"})(({theme:e})=>({gap:e.spacing(2)})),Tl=ae(_,{name:"Uploader",slot:"dropZone",shouldForwardProp:e=>e!=="error"})(({theme:e,state:o,error:t})=>({width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:e.spacing(5),gap:e.spacing(4),cursor:"pointer",backgroundColor:e.palette.background.surface,border:t?`1px solid ${e.palette.danger.outlinedBorder}`:o==="idle"?`1px solid ${e.palette.neutral.outlinedBorder}`:`1px solid ${e.palette.primary.outlinedBorder}`})),wl=ae(dl,{name:"Uploader",slot:"iconContainer",shouldForwardProp:e=>e!=="error"})(({theme:e,state:o,error:t})=>({color:t?`rgba(${e.vars.palette.danger.mainChannel} / 0.6)`:o==="over"?`rgba(${e.palette.primary.mainChannel} / 0.6)`:e.palette.neutral.softActiveBg,width:"32px",height:"32px"})),Zo=N.memo(e=>{let{accept:o,maxCount:t,name:n,size:i,maxSize:a,onChange:r,label:l,helperText:s,disabled:g,required:u,onDelete:c}=e,C=nr(null),m=nr(null),[f,d]=yo(),[p,x]=yo([]),[k,v]=yo(e.uploaded||[]),[T,h]=yo("idle"),b=rr(()=>!!f||e.error,[e.error,f]),P=rr(()=>!t||t&&[...k,...p].length!==t,[p,t,k]),M=bo(S=>{try{let J=o?.split(",").map(Q=>Q.trim().replace(".","").replace("*",".*"))||[],W=new RegExp(`(${J.join("|")})`);S.forEach(Q=>{if(W.test(Q.type)===!1)throw new Error(`File type is not allowed: ${Q.name}`)}),a&&S.forEach(Q=>{if(Q.size>a)throw new Error(`File size exceeds the limit: ${lr(a)}`)});let se=[...p,...S];if(t&&[...k,...se].length>t)throw new Error(`File count exceeds the limit: ${t}`);r?.({target:{name:n,value:se}}),x(se),d(void 0)}catch(J){d(J.message)}},[p,k]);pl(()=>{let S=C.current;if(S)return gl(fl({element:S,canDrop:ar,onDragEnter:()=>h("over"),onDragLeave:()=>h("potential"),onDrop:async({source:J})=>{let W=await Cl({source:J});M(W)}}),hl({canMonitor:ar,onDragStart:()=>{h("potential"),ir.start()},onDrop:()=>{h("idle"),ir.stop()}}))});let L=bo(S=>{let J=Array.from(S.target.files||[]);M(J)},[M]),te=bo(S=>{S instanceof File?x(J=>(r?.({target:{name:n,value:J.filter(W=>W!==S)}}),J.filter(W=>W!==S))):(v(J=>J.filter(W=>W.id!==S.id)),c?.(S)),d(void 0)},[]),K=bo(()=>{m.current?.click()},[]);return N.createElement(Pl,null,P&&N.createElement(F,{size:i,error:!!(b||f),disabled:g,required:u},l&&N.createElement(B,null,l),N.createElement(Tl,{state:T,error:!!(b||f),ref:C,onClick:K},N.createElement(Y,{alignItems:"center",gap:1},N.createElement(wl,{state:T,error:!!(b||f)})),N.createElement(bl,{type:"file",onChange:L,multiple:!0,accept:o,disabled:g,required:u,ref:m})),f?N.createElement(w,null,f):s&&N.createElement(w,null,s)),[...k,...p].length>0&&N.createElement(kl,{files:p,uploaded:k,onDelete:te}))});Zo.displayName="Uploader";import{Grid as Al}from"@mui/joy";import{motion as Il}from"framer-motion";var Fl=Il(Al),Xo=Fl;Xo.displayName="Grid";import oe from"react";import Bl from"react-markdown";import{Link as Nl}from"@mui/joy";var Qo=e=>{let{children:o,color:t,textColor:n,defaultLevel:i="body-md",markdownOptions:a,...r}=e;return oe.createElement(G,{color:t,textColor:n,...r},oe.createElement(Bl,{...a,children:o,components:{h1:({children:l})=>oe.createElement(G,{color:t,textColor:n,level:"h1"},l),h2:({children:l})=>oe.createElement(G,{color:t,textColor:n,level:"h2"},l),h3:({children:l})=>oe.createElement(G,{color:t,textColor:n,level:"h3"},l),h4:({children:l})=>oe.createElement(G,{color:t,textColor:n,level:"h4"},l),p:({children:l})=>oe.createElement(G,{color:t,textColor:n,level:i},l),a:({children:l,href:s})=>oe.createElement(Nl,{href:s},l),hr:()=>oe.createElement(Ge,null),...a?.components}}))};Qo.displayName="Markdown";import z,{forwardRef as Ll,useCallback as sr,useEffect as mr,useImperativeHandle as Sl,useRef as El,useState as pr}from"react";import{IMaskInput as Hl,IMask as dr}from"react-imask";import Ol from"@mui/icons-material/esm/CalendarToday.js";import{styled as ot}from"@mui/joy";import{FocusTrap as zl,ClickAwayListener as Vl,Popper as Yl}from"@mui/base";var Jl=ot(Yl,{name:"MonthPicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Ul=ot(_,{name:"MonthPicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),Rl=ot("div",{name:"MonthPicker",slot:"container"})({width:"100%"}),cr=e=>{let o=`${e.getMonth()+1}`,t=e.getFullYear();return Number(o)<10&&(o="0"+o),[t,o].join("/")},et=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 cr(i)})(e),ur=e=>e.split(" - ")[0]||"",$l=z.forwardRef(function(o,t){let{onChange:n,...i}=o;return z.createElement(Hl,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/m",blocks:{m:{mask:dr.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:dr.MaskedRange,from:1900,to:9999}},format:et,parse:ur})}),gr=Ll((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:s,disableFuture:g,disablePast:u,required:c,...C}=e,m=El(null),[f,d]=pr(e.value||""),[p,x]=pr(null),k=!!p;mr(()=>{d(e.value?et(ur(e.value)):"")},[e.value]),mr(()=>{p||m.current?.blur()},[p,m]),Sl(o,()=>m.current,[m.current]);let v=sr(b=>{d(b.target.value),t?.(b)},[]),T=sr(b=>{x(p?null:b.currentTarget),m.current?.focus()},[p,x,m]),h=z.createElement(Rl,null,z.createElement(zl,{open:!0},z.createElement(z.Fragment,null,z.createElement(R,{...C,color:a?"danger":C.color,ref:m,size:"sm",value:f,onChange:v,placeholder:"YYYY/MM",disabled:n,required:c,slotProps:{input:{component:$l,ref:m}},sx:{fontFamily:"monospace"},endDecorator:z.createElement(E,{variant:"plain",onClick:T},z.createElement(Ol,null))}),k&&z.createElement(Vl,{onClickAway:()=>x(null)},z.createElement(Jl,{id:"date-picker-popper",open:!0,anchorEl:p,placement:"bottom-end",onMouseDown:b=>b.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},z.createElement(Ul,{tabIndex:-1,role:"presentation"},z.createElement(re,{view:"month",views:["month"],value:Number.isNaN(new Date(f).getTime())?void 0:[new Date(f),void 0],onChange:([b])=>{v({target:{name:e.name,value:et(cr(b))}}),x(null)},minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:g,disablePast:u}),z.createElement(X,{sx:{p:1}},z.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{v({target:{name:e.name,value:""}}),x(null)}},"Clear"))))))));return i?z.createElement(F,{required:c,disabled:n,error:a,size:"sm"},z.createElement(B,null,i),h,r&&z.createElement(w,null,r)):h});import V,{forwardRef as Wl,useCallback as tt,useEffect as fr,useImperativeHandle as Gl,useMemo as ql,useRef as _l,useState as hr}from"react";import{IMaskInput as Kl,IMask as Cr}from"react-imask";import jl from"@mui/icons-material/esm/CalendarToday.js";import{styled as it}from"@mui/joy";import{FocusTrap as Zl,ClickAwayListener as Xl,Popper as Ql}from"@mui/base";var es=it(Ql,{name:"MonthRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),os=it(_,{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})),ts=it("div",{name:"MonthRangePicker",slot:"container"})({width:"100%"}),rt=e=>{let o=`${e.getMonth()+1}`,t=e.getFullYear();return Number(o)<10&&(o="0"+o),[t,o].join("/")},nt=([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 rt(a)};return[t(e),t(o)].join(" - ")},at=e=>{let o=e.split(" - ")[0]||"",t=e.split(" - ")[1]||"";return[o,t]},rs=V.forwardRef(function(o,t){let{onChange:n,...i}=o;return V.createElement(Kl,{...i,inputRef:t,onAccept:a=>n({target:{name:o.name,value:a}}),mask:Date,pattern:"Y/m - Y/m",blocks:{m:{mask:Cr.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Cr.MaskedRange,from:1900,to:9999}},format:nt,parse:at})}),lt=Wl((e,o)=>{let{onChange:t,disabled:n,label:i,error:a,helperText:r,minDate:l,maxDate:s,disableFuture:g,disablePast:u,required:c,...C}=e,m=_l(null),[f,d]=hr(""),[p,x]=hr(null),k=!!p,v=ql(()=>f?at(f).map(M=>new Date(M)):void 0,[f]);fr(()=>{d(e.value?nt(at(e.value)):"")},[e.value]),fr(()=>{p||m.current?.blur()},[p,m]),Gl(o,()=>m.current,[m.current]);let T=tt(M=>{d(M.target.value),t?.(M)},[t]),h=tt(M=>{x(p?null:M.currentTarget),m.current?.focus()},[p,x,m]),b=tt(([M,L])=>{!M||!L||(d(nt([rt(M),rt(L)])),x(null))},[d,x,m]),P=V.createElement(ts,null,V.createElement(Zl,{open:!0},V.createElement(V.Fragment,null,V.createElement(R,{...C,color:a?"danger":C.color,ref:o,size:"sm",value:f,onChange:T,disabled:n,required:c,placeholder:"YYYY/MM - YYYY/MM",slotProps:{input:{component:rs,ref:m}},sx:{fontFamily:"monospace"},endDecorator:V.createElement(E,{variant:"plain",onClick:h},V.createElement(jl,null))}),k&&V.createElement(Xl,{onClickAway:()=>x(null)},V.createElement(es,{id:"date-range-picker-popper",open:!0,anchorEl:p,placement:"bottom-end",onMouseDown:M=>M.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}]},V.createElement(os,{tabIndex:-1,role:"presentation"},V.createElement(re,{view:"month",views:["month"],rangeSelection:!0,defaultValue:v,onChange:b,minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:g,disablePast:u}),V.createElement(X,{sx:{p:1}},V.createElement(I,{size:"sm",variant:"plain",color:"neutral",onClick:()=>{d(""),x(null)}},"Clear"))))))));return i?V.createElement(F,{required:c,disabled:n,error:a,size:"sm"},V.createElement(B,null,i),P,r&&V.createElement(w,null,r)):P});lt.displayName="MonthRangePicker";import{Radio as ns,RadioGroup as as}from"@mui/joy";import{motion as br}from"framer-motion";var is=br(ns),qe=is;qe.displayName="Radio";var ls=br(as),_e=ls;_e.displayName="RadioGroup";import yr from"react";function st(e){let{items:o,...t}=e;return yr.createElement(_e,{...t},o.map(n=>yr.createElement(qe,{key:`${n.value}`,value:n.value,label:n.label})))}st.displayName="RadioList";import xr from"react";import{Switch as ss,styled as ms,switchClasses as ps}from"@mui/joy";import{motion as vr}from"framer-motion";var ds=vr(ss),cs=ms(vr.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)",[`&.${ps.checked}`]:{left:"unset",right:"var(--Switch-thumbOffset)"}}),us=e=>xr.createElement(cs,{...e,layout:!0,transition:gs}),gs={type:"spring",stiffness:700,damping:30},mt=e=>xr.createElement(ds,{...e,slots:{thumb:us,...e.slots}});mt.displayName="Switch";import{Tabs as fs,Tab as hs,TabList as Cs,TabPanel as bs,styled as ys,tabClasses as xs}from"@mui/joy";import{motion as xo}from"framer-motion";var vs=xo(fs),pt=vs;pt.displayName="Tabs";var Ds=ys(xo(hs))(({theme:e})=>({[`&:not(.${xs.selected})`]:{color:e.palette.neutral[700]}})),dt=Ds;dt.displayName="Tab";var Ms=xo(Cs),ct=Ms;ct.displayName="TabList";var ks=xo(bs),ut=ks;ut.displayName="TabPanel";import vo from"react";import{CssBaseline as gt,CssVarsProvider as Ps,checkboxClasses as Ts,extendTheme as ws}from"@mui/joy";var As=ws({cssVarPrefix:"ceed",spacing:4,zIndex:{popup:1500},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)"},[`& .${Ts.root}`]:{verticalAlign:"middle"}})}},JoyTooltip:{defaultProps:{size:"sm",placement:"top"}}}});function ft(e){return vo.createElement(vo.Fragment,null,vo.createElement(Ps,{theme:As},vo.createElement(gt,null),e.children))}ft.displayName="ThemeProvider";export{Xe as Accordion,Ze as AccordionDetails,je as AccordionSummary,ko as Accordions,Po as Alert,RC as AspectRatio,oo as Autocomplete,SC as AutocompleteListbox,EC as AutocompleteOption,VC as Avatar,JC as AvatarGroup,WC as Badge,ve as Box,Ao as Breadcrumbs,Te as Button,we as Calendar,Ie as Card,Lo as CardActions,Bo as CardContent,No as CardCover,So as CardOverflow,Fe as Checkbox,be as Chip,eb as CircularProgress,Eo as Container,gt as CssBaseline,lo as CurrencyInput,Yo as DataTable,so as DatePicker,$o as DateRangePicker,He as DialogActions,Ue as DialogContent,Ko as DialogFrame,Re as DialogTitle,Ge as Divider,tb as Drawer,Pe as Dropdown,fe as FormControl,Ce as FormHelperText,he as FormLabel,Xo as Grid,ye as IconButton,Le as Input,jo as InsetDrawer,nb as LinearProgress,xb as Link,ib as List,sb as ListDivider,pb as ListItem,cb as ListItemButton,gb as ListItemContent,hb as ListItemDecorator,bb as ListSubheader,Qo as Markdown,De as Menu,Me as MenuButton,ke as MenuItem,Go as Modal,Co as ModalClose,$e as ModalDialog,_o as ModalFrame,qo as ModalOverflow,gr as MonthPicker,lt as MonthRangePicker,po as Option,qe as Radio,_e as RadioGroup,st as RadioList,Ve as Select,Se as Sheet,Bb as Skeleton,Db as Slider,ge as Stack,kb as Step,Tb as StepButton,Ab as StepIndicator,Ib as Stepper,mt as Switch,dt as Tab,ct as TabList,ut as TabPanel,Ee as Table,Oo as TableBody,Ho as TableHead,pt as Tabs,Oe as Textarea,ft as ThemeProvider,Ye as Tooltip,G as Typography,Zo as Uploader,FC as accordionClasses,BC as accordionDetailsClasses,LC as accordionSummaryClasses,NC as accordionsClasses,Kh as alertClasses,$C as aspectRatioClasses,HC as autocompleteClasses,OC as autocompleteListboxClasses,zC as autocompleteOptionClasses,YC as avatarClasses,UC as avatarGroupClasses,GC as badgeClasses,jh as boxClasses,qC as breadcrumbsClasses,Zh as buttonClasses,KC as cardActionsClasses,_C as cardClasses,jC as cardContentClasses,ZC as cardCoverClasses,XC as cardOverflowClasses,Xh as checkboxClasses,QC as chipClasses,ob as circularProgressClasses,PC as dialogActionsClasses,kC as dialogContentClasses,MC as dialogTitleClasses,Qh as dividerClasses,rb as drawerClasses,uC as formControlClasses,fC as formHelperTextClasses,gC as formLabelClasses,hC as gridClasses,eC as iconButtonClasses,oC as inputClasses,ab as linearProgressClasses,vb as linkClasses,lb as listClasses,mb as listDividerClasses,ub as listItemButtonClasses,db as listItemClasses,fb as listItemContentClasses,Cb as listItemDecoratorClasses,yb as listSubheaderClasses,rC as menuButtonClasses,tC as menuClasses,nC as menuItemClasses,yC as modalClasses,xC as modalCloseClasses,vC as modalDialogClasses,DC as modalOverflowClasses,aC as optionClasses,iC as radioClasses,lC as radioGroupClasses,sC as selectClasses,bC as sheetClasses,Nb as skeletonClasses,Mb as sliderClasses,CC as stackClasses,wb as stepButtonClasses,Pb as stepClasses,Fb as stepperClasses,mC as switchClasses,AC as tabListClasses,IC as tabPanelClasses,pC as tableClasses,wC as tabsClasses,dC as textareaClasses,TC as tooltipClasses,cC as typographyClasses,qh as useColorScheme,Gh as useTheme,_h as useThemeProps};