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