@ceed/ads 0.1.51-2 → 0.1.52
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/Avatar/Avatar.d.ts +8 -0
- package/dist/components/Avatar/index.d.ts +3 -0
- package/dist/components/Switch/Switch.d.ts +1 -4
- package/dist/components/ThemeProvider/ThemeProvider.d.ts +5 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/framer/index.js +26 -26
- package/package.json +2 -3
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { SwitchProps } from "@mui/joy";
|
|
3
3
|
import { MotionProps } from "framer-motion";
|
|
4
|
-
type CustomSwitchProps = SwitchProps & {
|
|
5
|
-
name?: string;
|
|
6
|
-
};
|
|
7
4
|
declare const Switch: {
|
|
8
|
-
(props:
|
|
5
|
+
(props: SwitchProps & MotionProps): React.JSX.Element;
|
|
9
6
|
displayName: string;
|
|
10
7
|
};
|
|
11
8
|
export { Switch };
|
|
@@ -40,6 +40,11 @@ declare module "@mui/joy/styles" {
|
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
+
declare module "@mui/joy/Avatar" {
|
|
44
|
+
interface AvatarPropsSizeOverrides {
|
|
45
|
+
xs: true;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
43
48
|
declare const defaultTheme: Partial<Theme>;
|
|
44
49
|
export { CssBaseline, defaultTheme as theme, extendTheme };
|
|
45
50
|
declare function ThemeProvider(props: {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { Accordion, AccordionDetails, Accordions, AccordionSummary, } from "./Accordions";
|
|
2
2
|
export { Alert } from './Alert';
|
|
3
3
|
export { Autocomplete } from "./Autocomplete";
|
|
4
|
+
export { Avatar, AvatarGroup } from './Avatar';
|
|
4
5
|
export { Box } from "./Box";
|
|
5
6
|
export { Breadcrumbs } from "./Breadcrumbs";
|
|
6
7
|
export { Button } from "./Button";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { useTheme, useColorScheme, useThemeProps, ButtonGroup, alertClasses, boxClasses, buttonClasses, checkboxClasses, dividerClasses, iconButtonClasses, inputClasses, menuClasses, menuButtonClasses, menuItemClasses, optionClasses, radioClasses, radioGroupClasses, selectClasses, switchClasses, tableClasses, textareaClasses, typographyClasses, formControlClasses, formLabelClasses, formHelperTextClasses, gridClasses, stackClasses, sheetClasses, modalClasses, modalCloseClasses, modalDialogClasses, modalOverflowClasses, dialogTitleClasses, dialogContentClasses, dialogActionsClasses, tooltipClasses, tabsClasses, tabListClasses, tabPanelClasses, accordionClasses, accordionDetailsClasses, accordionGroupClasses as accordionsClasses, accordionSummaryClasses, AutocompleteListbox, AutocompleteOption, autocompleteClasses, autocompleteListboxClasses, autocompleteOptionClasses,
|
|
2
|
-
export { Accordion, Accordions, Alert, Autocomplete, AccordionDetails, AccordionSummary, Box, Breadcrumbs, Button, Calendar, Card, CardActions, CardContent, CardCover, CardOverflow, Checkbox, Chip, Container, CssBaseline, CurrencyInput, DataTable, DatePicker, DateRangePicker, DialogActions, DialogContent, DialogTitle, DialogFrame, Divider, Dropdown, extendTheme, InsetDrawer, Uploader, FormControl, FormHelperText, FormLabel, Grid, IconButton, Input, Markdown, Menu, MenuButton, MenuItem, Modal, ModalClose, ModalDialog, ModalOverflow, ModalFrame, MonthPicker, MonthRangePicker, PercentageInput, Radio, RadioGroup, RadioList, Select, Option, Sheet, Stack, Step, StepIndicator, Stepper, Switch, theme, Table, TableHead, TableBody, Tabs, Tab, TabList, TabPanel, Textarea, ThemeProvider, Tooltip, Typography, } from "./components";
|
|
1
|
+
export { useTheme, useColorScheme, useThemeProps, ButtonGroup, alertClasses, boxClasses, buttonClasses, checkboxClasses, dividerClasses, iconButtonClasses, inputClasses, menuClasses, menuButtonClasses, menuItemClasses, optionClasses, radioClasses, radioGroupClasses, selectClasses, switchClasses, tableClasses, textareaClasses, typographyClasses, formControlClasses, formLabelClasses, formHelperTextClasses, gridClasses, stackClasses, sheetClasses, modalClasses, modalCloseClasses, modalDialogClasses, modalOverflowClasses, dialogTitleClasses, dialogContentClasses, dialogActionsClasses, tooltipClasses, tabsClasses, tabListClasses, tabPanelClasses, accordionClasses, accordionDetailsClasses, accordionGroupClasses as accordionsClasses, accordionSummaryClasses, AutocompleteListbox, AutocompleteOption, autocompleteClasses, autocompleteListboxClasses, autocompleteOptionClasses, avatarClasses, avatarGroupClasses, AspectRatio, aspectRatioClasses, Badge, badgeClasses, breadcrumbsClasses, cardClasses, cardActionsClasses, cardContentClasses, cardCoverClasses, cardOverflowClasses, chipClasses, CircularProgress, circularProgressClasses, Drawer, drawerClasses, LinearProgress, linearProgressClasses, List, listClasses, ListDivider, listDividerClasses, ListItem, listItemClasses, ListItemButton, listItemButtonClasses, ListItemContent, listItemContentClasses, ListItemDecorator, listItemDecoratorClasses, ListSubheader, listSubheaderClasses, Link, linkClasses, Slider, sliderClasses, stepClasses, StepButton, stepButtonClasses, stepperClasses, Skeleton, skeletonClasses, } from "@mui/joy";
|
|
2
|
+
export { Accordion, Accordions, Alert, Autocomplete, AccordionDetails, AccordionSummary, Avatar, AvatarGroup, Box, Breadcrumbs, Button, Calendar, Card, CardActions, CardContent, CardCover, CardOverflow, Checkbox, Chip, Container, CssBaseline, CurrencyInput, DataTable, DatePicker, DateRangePicker, DialogActions, DialogContent, DialogTitle, DialogFrame, Divider, Dropdown, extendTheme, InsetDrawer, Uploader, FormControl, FormHelperText, FormLabel, Grid, IconButton, Input, Markdown, Menu, MenuButton, MenuItem, Modal, ModalClose, ModalDialog, ModalOverflow, ModalFrame, MonthPicker, MonthRangePicker, PercentageInput, Radio, RadioGroup, RadioList, Select, Option, Sheet, Stack, Step, StepIndicator, Stepper, Switch, theme, Table, TableHead, TableBody, Tabs, Tab, TabList, TabPanel, Textarea, ThemeProvider, Tooltip, Typography, } from "./components";
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useTheme as Hy,useColorScheme as zy,useThemeProps as Vy,ButtonGroup as Ry,alertClasses as Yy,boxClasses as $y,buttonClasses as Jy,checkboxClasses as Uy,dividerClasses as _y,iconButtonClasses as Gy,inputClasses as Wy,menuClasses as qy,menuButtonClasses as Ky,menuItemClasses as jy,optionClasses as Zy,radioClasses as Xy,radioGroupClasses as Qy,selectClasses as eb,switchClasses as ob,tableClasses as tb,textareaClasses as rb,typographyClasses as nb,formControlClasses as ab,formLabelClasses as ib,formHelperTextClasses as lb,gridClasses as sb,stackClasses as pb,sheetClasses as db,modalClasses as mb,modalCloseClasses as cb,modalDialogClasses as ub,modalOverflowClasses as fb,dialogTitleClasses as gb,dialogContentClasses as hb,dialogActionsClasses as Cb,tooltipClasses as yb,tabsClasses as bb,tabListClasses as xb,tabPanelClasses as vb,accordionClasses as Db,accordionDetailsClasses as Mb,accordionGroupClasses as Pb,accordionSummaryClasses as Tb,AutocompleteListbox as kb,AutocompleteOption as wb,autocompleteClasses as Ib,autocompleteListboxClasses as Sb,autocompleteOptionClasses as Ab,Avatar as Nb,avatarClasses as Bb,AvatarGroup as Fb,avatarGroupClasses as Eb,AspectRatio as Lb,aspectRatioClasses as Ob,Badge as Hb,badgeClasses as zb,breadcrumbsClasses as Vb,cardClasses as Rb,cardActionsClasses as Yb,cardContentClasses as $b,cardCoverClasses as Jb,cardOverflowClasses as Ub,chipClasses as _b,CircularProgress as Gb,circularProgressClasses as Wb,Drawer as qb,drawerClasses as Kb,LinearProgress as jb,linearProgressClasses as Zb,List as Xb,listClasses as Qb,ListDivider as ex,listDividerClasses as ox,ListItem as tx,listItemClasses as rx,ListItemButton as nx,listItemButtonClasses as ax,ListItemContent as ix,listItemContentClasses as lx,ListItemDecorator as sx,listItemDecoratorClasses as px,ListSubheader as dx,listSubheaderClasses as mx,Link as cx,linkClasses as ux,Slider as fx,sliderClasses as gx,stepClasses as hx,StepButton as Cx,stepButtonClasses as yx,stepperClasses as bx,Skeleton as xx,skeletonClasses as vx}from"@mui/joy";import ke from"react";import{AccordionGroup as jr,Accordion as Zr,AccordionSummary as Xr,AccordionDetails as Qr}from"@mui/joy";import{motion as mo}from"framer-motion";var en=mo(Xr),co=en;co.displayName="AccordionSummary";var on=mo(Qr),uo=on;uo.displayName="AccordionDetails";var tn=mo(Zr);function fo(e){let{summary:o,details:t,variant:n,color:i,...a}=e,r=n==="solid"?"solid":void 0;return ke.createElement(tn,{variant:r,color:i,...a},ke.createElement(co,{variant:r,color:i},o),ke.createElement(uo,{variant:r,color:i},t))}fo.displayName="Accordion";var rn=mo(jr);function Go(e){let{variant:o,color:t,items:n,...i}=e;return ke.createElement(rn,{variant:o,color:t,...i},n.map((a,r)=>ke.createElement(fo,{key:r,summary:a.summary,details:a.details,index:r,variant:o,color:t})))}Go.displayName="Accordions";import go from"react";import{Alert as cn,styled as un}from"@mui/joy";import{motion as fn}from"framer-motion";import nn from"react";import{Typography as an}from"@mui/joy";import{motion as ln}from"framer-motion";var sn=ln(an),ee=e=>nn.createElement(sn,{...e});ee.displayName="Typography";var G=ee;import{Stack as pn}from"@mui/joy";import{motion as dn}from"framer-motion";var mn=dn(pn),we=mn;we.displayName="Stack";var L=we;var gn=un(fn(cn))({alignItems:"flex-start",fontWeight:"unset"});function Wo(e){let{title:o,content:t,actions:n,color:i="primary",...a}=e,r=e.invertedColors||e.variant==="solid";return go.createElement(gn,{...a,color:i,endDecorator:n,invertedColors:r},go.createElement(L,null,o&&go.createElement(G,{level:"title-sm",color:i},o),go.createElement(G,{level:"body-sm",color:i},t)))}Wo.displayName="Alert";import O,{useCallback as qo,useEffect as zn,useMemo as Fe,useRef as Vn}from"react";import{Autocomplete as Rn,AutocompleteOption as Yn,ListSubheader as $n,AutocompleteListbox as Jn,ListItemDecorator as _t,CircularProgress as Un,styled as Gt}from"@mui/joy";import _n from"@mui/icons-material/Close";import{useVirtualizer as Gn}from"@tanstack/react-virtual";import{Popper as Wn}from"@mui/base";import{FormControl as hn,styled as Cn}from"@mui/joy";import{motion as yn}from"framer-motion";var bn=Cn(yn(hn))({width:"100%"}),Ie=bn;Ie.displayName="FormControl";var se=Ie;import{FormLabel as xn}from"@mui/joy";import{motion as vn}from"framer-motion";var Dn=vn(xn),Se=Dn;Se.displayName="FormLabel";var pe=Se;import{FormHelperText as Mn}from"@mui/joy";import{motion as Pn}from"framer-motion";var Tn=Pn(Mn),Ae=Tn;Ae.displayName="FormHelperText";var de=Ae;import{Chip as kn}from"@mui/joy";import{motion as wn}from"framer-motion";var In=wn(kn),Ne=In;Ne.displayName="Chip";var Ut=Ne;import Sn,{forwardRef as An}from"react";import{IconButton as Nn}from"@mui/joy";import{motion as Bn}from"framer-motion";var Fn=Bn(Nn),Be=An(({...e},o)=>Sn.createElement(Fn,{ref:o,...e}));Be.displayName="IconButton";var Y=Be;import{useState as En,useCallback as Ln,useEffect as On,useRef as Hn}from"react";function U(e,o,t,n){let{current:i}=Hn(e!==void 0),[a,r]=En(e??o);On(()=>{i&&r(e??o)},[e,o,i]);let d=Ln(l=>{let s=typeof l=="function"?l(a):l;(n?.disableStrict||!i)&&r(s),t?.(s)},[i,t,a,n]);return[a,d]}var qn=Gt(Wn,{name:"Autocomplete",slot:"Popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Kn=O.forwardRef((e,o)=>{let{anchorEl:t,open:n,modifiers:i,children:a,ownerState:{loading:r,size:d="md"},...l}=e,s=Vn(null),p=a[0].every(x=>x.hasOwnProperty("group")),c=r?[a[1]]:a[0].length===0?[a[2]]:p?a[0].flatMap(x=>[O.createElement($n,{key:x.key,component:"li"},x.group),...x.children]):a[0],y=Gn({count:c.length,estimateSize:()=>36,getScrollElement:()=>s.current,measureElement:x=>x.clientHeight,overscan:5}),h=y.getVirtualItems();return zn(()=>{n&&y.measure()},[n,y]),O.createElement(qn,{ref:o,anchorEl:t,open:n,modifiers:i},O.createElement(Jn,{...l},O.createElement("div",{ref:s,style:{overflow:"auto"}},O.createElement("div",{style:{height:`${y.getTotalSize()}px`,position:"relative"}},h.map(({index:x,size:m,start:g,key:D})=>O.cloneElement(c[x],{key:D,style:{position:"absolute",top:0,left:0,width:"100%",fontSize:`var(--ceed-fontSize-${d})`,height:`${m}px`,transform:`translateY(${g}px)`,overflow:"visible"},children:O.createElement("div",{style:{textOverflow:"ellipsis",textWrap:"nowrap",overflow:"hidden",width:"100%"}},c[x].props.children)}))))))}),ho={sm:"20px",md:"24px",lg:"28px"},jn=Gt(Y,{name:"Autocomplete",slot:"tagDelete"})(({theme:e,size:o="md"})=>({width:ho[o],height:ho[o],minWidth:ho[o],minHeight:ho[o],borderRadius:"50%"}));function Ee(e){let{label:o,error:t,helperText:n,color:i,size:a,disabled:r,required:d,onChange:l,onChangeComplete:s,sx:p,className:c,...y}=e,[h,x]=U(e.value,e.defaultValue||"",qo(C=>l?.({target:{value:C,name:e.name}}),[l,e.name])),m=Fe(()=>e.options.map(C=>typeof C!="object"?{value:C,label:C}:C),[e.options]),g=Fe(()=>{let C=new Map;return m.forEach(P=>{C.set(P.value,P)}),C},[m]),D=Fe(()=>e.loading?{value:"",label:"",startDecorator:O.createElement(Un,{size:"sm",color:"neutral",variant:"plain",thickness:3})}:Array.isArray(h)?h.map(C=>g.get(C||"")).filter(Boolean):g.get(h),[h,g,e.loading]),f=qo(C=>O.isValidElement(C)&&!e.loading?O.cloneElement(C,{size:a}):C,[a,e.loading]),v=Fe(()=>f(D?.startDecorator||e.startDecorator),[D,f,e.startDecorator]),k=Fe(()=>f(D?.endDecorator||e.endDecorator),[D,f,e.endDecorator]),u=qo((C,P)=>{let M=P,T=Array.isArray(M)?M.map(V=>V.value):M?.value;x(T),(Array.isArray(M)&&M.map(V=>g.get(V.value))||g.get(M?.value))&&s?.({...C,target:{...C.target,value:T}})},[s,x,g]),w=O.createElement(Rn,{...y,required:d,onChange:u,color:t?"danger":i,value:D||null,options:m,size:a,disabled:r,startDecorator:v,endDecorator:k,getOptionLabel:C=>`${C.label??""}`,renderTags:(C,P)=>C.map((M,T)=>{let{onClick:V,...A}=P({index:T});return f(O.createElement(Ut,{color:"primary",...A},O.createElement(L,{direction:"row",alignItems:"center",gap:2,py:.5},M.value,f(O.createElement(jn,{color:"primary",variant:"soft",onClick:V},O.createElement(_n,null))))))}),slots:{listbox:Kn},renderOption:(C,P)=>O.createElement(Yn,{...C},P.startDecorator&&O.createElement(_t,{sx:M=>({marginInlineEnd:`var(--Input-gap, ${M.spacing(1)})`})},f(P.startDecorator)),f(P.label),P.endDecorator&&O.createElement(_t,{sx:M=>({marginInlineStart:`var(--Input-gap, ${M.spacing(1)})`})},f(P.endDecorator))),renderGroup:C=>C});return O.createElement(se,{required:d,color:i,size:a,error:t,disabled:r,sx:p,className:c},o&&O.createElement(pe,null,o),w,n&&O.createElement(de,null,n))}Ee.displayName="Autocomplete";var Wt=Ee;import{Box as Zn}from"@mui/joy";import{motion as Xn}from"framer-motion";var Qn=Xn(Zn),Le=Qn;Le.displayName="Box";var Co=Le;import oe from"react";import{Breadcrumbs as jt,Link as pa}from"@mui/joy";import Ko from"react";import{Menu as ea,MenuButton as oa,MenuItem as ta}from"@mui/joy";import{motion as jo}from"framer-motion";var ra=jo(ea),Oe=e=>Ko.createElement(ra,{...e});Oe.displayName="Menu";var na=jo(oa),He=e=>Ko.createElement(na,{...e});He.displayName="MenuButton";var aa=jo(ta),ze=e=>Ko.createElement(aa,{...e});ze.displayName="MenuItem";var qt=Oe;import{Dropdown as ia}from"@mui/joy";import{motion as la}from"framer-motion";var sa=la(ia),Ve=sa;Ve.displayName="Dropdown";var Kt=Ve;function Zo(e){let{crumbs:o,size:t,startCrumbCount:n=1,endCrumbCount:i=3,slots:{link:a,...r}={link:pa},slotProps:{link:d,...l}={link:{color:"neutral"}},collapsed:s=!0,...p}=e,c=g=>g.type==="link"&&a?oe.createElement(a,{to:g.linkHref,href:g.linkHref,...d},g.label):oe.createElement(G,null,g.label);if(!s)return oe.createElement(jt,{size:t,slots:r,slotProps:l,...p},o.map(g=>oe.createElement(c,{...g})));let y=Math.max(1,i),h=o.slice(0,n).map(g=>oe.createElement(c,{...g})),x=(n+y>o.length?o.slice(n):o.slice(-y)).map(g=>oe.createElement(c,{...g})),m=o.slice(n,-y).map(g=>oe.createElement(ze,null,oe.createElement(c,{...g})));return oe.createElement(jt,{size:t,slots:r,slotProps:l,...p},h,m.length&&oe.createElement(Kt,null,oe.createElement(He,{size:t,variant:"plain"},"..."),oe.createElement(qt,{size:t},m)),x)}Zo.displayName="Breadcrumbs";import da,{forwardRef as ma}from"react";import{Button as ca}from"@mui/joy";import{motion as ua}from"framer-motion";var fa=ua(ca),Re=ma(({...e},o)=>da.createElement(fa,{ref:o,...e}));Re.displayName="Button";var H=Re;import I,{Fragment as Pe,forwardRef as ba,useMemo as nr}from"react";import{styled as ne}from"@mui/joy";import xa from"@mui/icons-material/ChevronLeft";import va from"@mui/icons-material/ChevronRight";import{AnimatePresence as ar,motion as Da}from"framer-motion";var Zt=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 d=1;d<=a;d++){let l=[];for(let s=1;s<=7;s++)d===i&&s<t.getDay()+1||r>n.getDate()?l.push(void 0):(l.push(r),r++);o.push(l)}return o},Xt=(e,o)=>e.toLocaleString(o,{year:"numeric"}),Xo=(e,o)=>e.toLocaleString(o,{year:"numeric",month:"long"}),Qt=(e,o)=>new Date(0,e).toLocaleString(o,{month:"short"}),er=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})},or=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()},Qo=(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()},ce=(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},yo=(e,o)=>e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth();import{useCallback as ga,useMemo as ha,useState as bo}from"react";import{useThemeProps as Ca}from"@mui/joy";var ya=(e,o)=>o.includes(e)?e:o[0],tr=e=>{let[o,t]=bo(()=>ya(e.view||"day",e.views||["day","month"])),[n,i]=bo(e.defaultValue),[a,r]=bo(()=>{let m=new Date;return m.setDate(1),m.setHours(0,0,0,0),e.value?.[0]||e.defaultValue?.[0]||m}),[[d,l],s]=bo([0,0]),p=e.view??o,c=m=>{s([d+m,m])},y=ga(m=>{r(m),p==="month"?a.getFullYear()!==m.getFullYear()&&c(m>a?1:-1):c(m>a?1:-1),e.onMonthChange?.(m)},[e.onMonthChange,a,p]),h=Ca({props:{locale:"default",views:["day","month"],view:p,value:e.value??n,...e,onChange:e.value?e.onChange:m=>{i(m),e.onChange?.(m)},onMonthChange:y,onViewChange:()=>{let m=p==="month"?"day":"month";!(!e.views||e.views.includes(m))||e.view===m||(e.onViewChange?e.onViewChange(m):t(m))}},name:"Calendar"}),x=ha(()=>({...h,viewMonth:a,direction:l}),[h,a,l]);return[h,x]};import{useCallback as Me,useState as rr}from"react";var xo=e=>{let[o,t]=rr(null),[n,i]=rr(null);return{calendarTitle:e.view==="month"?Xt(e.viewMonth,e.locale||"default"):Xo(e.viewMonth,e.locale||"default"),onPrev:Me(()=>{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:Me(()=>{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:Me(a=>{let r=new Date(e.viewMonth||new Date);r.setHours(0,0,0,0),r.setDate(a);let d=e.rangeSelection&&e.value&&e.value[0]&&(o&&ce(e.value[0],o,r)||e.value[1]&&ce(e.value[0],e.value[1],r));return{"aria-label":r.toLocaleDateString(),"aria-current":d?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,o]),getMonthCellProps:Me(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(s=>s==="day")&&e.rangeSelection&&e.value&&e.value[0]&&(n&&ce(e.value[0],n,r)||e.value[1]&&ce(e.value[0],e.value[1],r));return{"aria-label":r.toLocaleDateString(),"aria-current":l?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,n]),getPickerDayProps:Me(a=>{let r=new Date(e.viewMonth||new Date);r.setHours(0,0,0,0),r.setDate(a);let d=!!e.value&&(Qo(r,e.value[0])||e.value[1]&&Qo(r,e.value[1])),l=e.rangeSelection&&e.value&&e.value[0]&&(o&&ce(e.value[0],o,r)||e.value[1]&&ce(e.value[0],e.value[1],r)),s=()=>{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:or(r),isSelected:d,onClick:s,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 p=new Date;return p.setHours(0,0,0,0),p})(),tabIndex:-1,"aria-label":r.toLocaleDateString(),"aria-selected":d?"true":void 0,"aria-current":l?"date":void 0}},[e.onChange,e.value,e.viewMonth,e.rangeSelection,e.minDate,e.maxDate,e.disableFuture,e.disablePast,o]),getPickerMonthProps:Me(a=>{let r=new Date(e.viewMonth||new Date);r.setDate(1),r.setHours(0,0,0,0),r.setMonth(a);let d=!e.views?.find(y=>y==="day"),l=d&&e.rangeSelection,s=!!e.value&&(yo(r,e.value[0])||e.value[1]&&yo(r,e.value[1])),p=l&&e.value&&e.value[0]&&(n&&ce(e.value[0],n,r)||e.value[1]&&ce(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]):d?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 y=new Date(r);return y.setMonth(y.getMonth()+1),y.setDate(0),y<e.minDate})()||e.maxDate&&(()=>{let y=new Date(r);return y.setDate(0),y>e.maxDate})()||e.disableFuture&&r>new Date||e.disablePast&&r<new Date&&!yo(r,new Date),onClick:c,tabIndex:-1,"aria-label":Xo(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 Ma=ne("div",{name:"Calendar",slot:"root"})({maxWidth:"264px"}),Pa=ne("div",{name:"Calendar",slot:"calendarHeader"})(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:e.spacing(2)})),ir=ne("div",{name:"Calendar",slot:"viewContainer",shouldForwardProp:e=>e!=="calendarType"})(({theme:e,calendarType:o})=>({paddingLeft:e.spacing(2),paddingRight:e.spacing(2),position:"relative",overflow:"hidden",minHeight:o==="datePicker"?"250px":"unset"})),lr=ne(Da.table,{name:"Calendar",slot:"viewTable"})(({theme:e})=>({borderSpacing:0,"& td, & th":{padding:0},"& th":{paddingTop:e.spacing(2),paddingBottom:e.spacing(2)}})),Ta=ne("thead",{name:"Calendar",slot:"weekHeaderContainer"})({}),ka=ne("tbody",{name:"Calendar",slot:"dayPickerContainer"})({}),wa=ne(H,{name:"Calendar",slot:"switchViewButton"})(({ownerState:e})=>[e.view==="month"&&{pointerEvents:"none"}]),Ia=ne("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}}})),Sa=ne("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}}})),Aa=ne(H,{name:"Calendar",slot:"month",shouldForwardProp:e=>e!=="isSelected"})(({theme:e,isSelected:o,disabled:t})=>[{width:"59px",textAlign:"center","&:hover":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softHoverBg},"&:active":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softActiveBg}},o&&{backgroundColor:e.palette.primary.solidBg,color:e.palette.primary.solidColor,"&:hover":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidHoverBg},"&:active":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidActiveBg}},t&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),Na=ne(H,{name:"Calendar",slot:"day",shouldForwardProp:e=>!["isToday","isSelected"].includes(e)})(({theme:e,isToday:o,isSelected:t,disabled:n})=>[{width:"32px",height:"32px",textAlign:"center","&:hover":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softHoverBg},"&:active":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softActiveBg}},o&&!t&&{"&:not([aria-current=date]):not(:hover)":{border:`1px solid ${e.palette.neutral.outlinedBorder}`}},t&&{backgroundColor:e.palette.primary.solidBg,color:e.palette.primary.solidColor,"&:hover":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidHoverBg},"&:active":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidActiveBg}},n&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),sr={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})},vo=1e4,pr=(e,o)=>Math.abs(e)*o,Ba=e=>{let{ownerState:o}=e,{getPickerDayProps:t,getDayCellProps:n}=xo(o),i=nr(()=>Zt(o.viewMonth),[o.viewMonth]),a=nr(()=>er(o.locale||"default"),[o.locale]);return I.createElement(ir,{calendarType:"datePicker"},I.createElement(ar,{initial:!1,custom:o.direction},I.createElement(lr,{key:`${o.viewMonth.toString()}_${o.direction}`,custom:o.direction,variants:sr,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:d,velocity:l})=>{let s=pr(d.x,l.x);if(s<-vo){let p=new Date(o.viewMonth||new Date);p.setMonth(p.getMonth()+1),o.onMonthChange?.(p)}else if(s>vo){let p=new Date(o.viewMonth||new Date);p.setMonth(p.getMonth()-1),o.onMonthChange?.(p)}}},I.createElement(Ta,null,I.createElement("tr",null,a.map((r,d)=>I.createElement(Pe,{key:`${o.viewMonth}_${r}_${d}`},I.createElement("th",null,I.createElement(G,{level:"body-xs",textAlign:"center"},r)),d<6&&I.createElement("th",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"}))))),I.createElement(ka,null,i.map((r,d)=>I.createElement(Pe,{key:`${o.viewMonth}_${d}`},I.createElement("tr",null,r.map((l,s)=>l?I.createElement(Pe,{key:s},I.createElement(Ia,{...n(l)},I.createElement(Na,{size:"sm",variant:"plain",color:"neutral",...t(l)},l)),s<6&&I.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})):I.createElement(Pe,{key:s},I.createElement("td",null),s<6&&I.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})))),d<i.length-1&&I.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},I.createElement("td",{colSpan:13,style:{height:4}}))))))))},Fa=e=>{let{ownerState:o}=e,{getPickerMonthProps:t,getMonthCellProps:n}=xo(o),i=Array.from({length:12},(r,d)=>d).reduce((r,d)=>(r[r.length-1].length===4&&r.push([]),r[r.length-1].push(d),r),[[]]),a=!o.views?.find(r=>r==="day");return I.createElement(ir,{calendarType:a?"monthPicker":"datePicker"},I.createElement(ar,{initial:!1,custom:o.direction},I.createElement(lr,{key:`${o.viewMonth.getFullYear()}_${o.direction}`,custom:o.direction,variants:sr,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:d,velocity:l})=>{let s=pr(d.x,l.x);if(s<-vo){let p=new Date(o.viewMonth||new Date);p.setMonth(p.getMonth()+1),o.onMonthChange?.(p)}else if(s>vo){let p=new Date(o.viewMonth||new Date);p.setMonth(p.getMonth()-1),o.onMonthChange?.(p)}}},I.createElement("tbody",null,i.map((r,d)=>I.createElement(Pe,{key:d},I.createElement("tr",null,r.map((l,s)=>I.createElement(Pe,{key:l},I.createElement(Sa,{...n(l)},I.createElement(Aa,{size:"sm",variant:"plain",color:"neutral",...t(l)},Qt(l,o.locale))),s<3&&I.createElement("td",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"})))),d<i.length-1&&I.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},I.createElement("td",{colSpan:7,style:{height:4}}))))))))},Ye=ba((e,o)=>{let[t,n]=tr(e),{value:i,defaultValue:a,onChange:r,locale:d,onViewChange:l,onMonthChange:s,view:p,views:c,rangeSelection:y,minDate:h,maxDate:x,disableFuture:m,disablePast:g,...D}=t,{calendarTitle:f,onPrev:v,onNext:k}=xo(n);return I.createElement(Ma,{ref:o,...D},I.createElement(Pa,null,I.createElement(Y,{size:"sm",onClick:v,"aria-label":`Previous ${p==="day"?"Month":"Year"}`},I.createElement(xa,null)),I.createElement(wa,{ownerState:n,variant:"plain",color:"neutral",onClick:l,"aria-label":"Switch Calendar View"},f),I.createElement(Y,{size:"sm",onClick:k,"aria-label":`Next ${p==="day"?"Month":"Year"}`},I.createElement(va,null))),p==="day"&&I.createElement(Ba,{ownerState:n}),p==="month"&&I.createElement(Fa,{ownerState:n}))});Ye.displayName="Calendar";var ge=Ye;import{Card as Ea,CardContent as La,CardCover as Oa,CardActions as Ha,CardOverflow as za}from"@mui/joy";import{motion as $e}from"framer-motion";var Va=$e(Ea),Je=Va;Je.displayName="Card";var Ra=$e(La),et=Ra;et.displayName="CardContent";var Ya=$e(Oa),ot=Ya;ot.displayName="CardCover";var $a=$e(Ha),tt=$a;tt.displayName="CardActions";var Ja=$e(za),rt=Ja;rt.displayName="CardOverflow";import Ua from"react";import{Checkbox as _a}from"@mui/joy";import{motion as Ga}from"framer-motion";var Wa=Ga(_a),Ue=e=>Ua.createElement(Wa,{role:"checkbox",...e});Ue.displayName="Checkbox";var _e=Ue;import{styled as qa}from"@mui/joy";import Ka,{forwardRef as ja}from"react";var Za=qa("div",{name:"Container",slot:"root",shouldForwardProp:e=>e!=="maxWidth"})(({theme:e,maxWidth:o="lg"})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block",paddingLeft:e.spacing(4),paddingRight:e.spacing(4),...o==="sm"&&{[e.breakpoints.up("xs")]:{maxWidth:e.breakpoints.values.sm}},...o==="md"&&{[e.breakpoints.up("sm")]:{maxWidth:e.breakpoints.values.md}},...o==="lg"&&{[e.breakpoints.up("md")]:{maxWidth:e.breakpoints.values.lg}},...o==="xl"&&{[e.breakpoints.up("lg")]:{maxWidth:e.breakpoints.values.xl}}})),nt=ja(function(o,t){return Ka.createElement(Za,{ref:t,...o})});nt.displayName="Container";import Do,{useCallback as mr,useMemo as cr,useState as ai}from"react";import{IntlMessageFormat as ii}from"intl-messageformat";import{NumericFormat as li}from"react-number-format";import he,{useCallback as Xa}from"react";import{Input as Qa}from"@mui/joy";import{motion as ei}from"framer-motion";import oi from"@mui/icons-material/Close";var ti=ei(Qa),Ge=he.forwardRef((e,o)=>{let{label:t,helperText:n,error:i,style:a,size:r,color:d,disabled:l,required:s,onChange:p,name:c,sx:y,className:h,enableClearable:x,...m}=e,[g,D]=U(e.value,e.defaultValue,Xa(u=>{p?.({target:{value:u?.toString()||"",name:c||""}})},[p,c])),f=u=>{D(u.target.value)},v=()=>{D(e.defaultValue||"")},k=he.createElement(ti,{value:g,name:c,onChange:f,required:s,color:i?"danger":d,disabled:l,slotProps:{input:{ref:o,...m.slotProps?.input},...m.slotProps},...m,endDecorator:x?he.createElement(L,{gap:1,direction:"row"},m.endDecorator,g&&he.createElement(Y,{onMouseDown:u=>u.preventDefault(),onClick:v,"aria-label":"Clear"},he.createElement(oi,null))):m.endDecorator});return he.createElement(se,{required:s,color:d,size:r,error:i,disabled:l,sx:y,className:h},t&&he.createElement(pe,null,t),k,n&&he.createElement(de,null,n))});Ge.displayName="Input";var W=Ge;import{styled as si,useThemeProps as pi}from"@mui/joy";import ri from"intl-messageformat";var ni={AED:2,ALL:2,AMD:2,ANG:2,AOA:2,ARS:2,AUD:2,AWG:2,AZN:2,BAM:2,BBD:2,BDT:2,BGN:2,BHD:3,BMD:2,BND:2,BOB:2,BRL:2,BSD:2,BWP:2,BYN:2,BZD:2,CAD:2,CHF:2,CLP:2,CNH:2,CNY:2,COP:2,CRC:2,CUP:2,CVE:0,CZK:2,DJF:0,DKK:2,DOP:2,DZD:2,EGP:2,ETB:2,EUR:2,FJD:2,FKP:2,GBP:2,GEL:2,GHS:2,GIP:2,GMD:2,GNF:0,GTQ:2,GYD:2,HKD:2,HNL:2,HTG:2,HUF:2,IDR:0,ILS:2,INR:2,IQD:3,ISK:2,JMD:2,JOD:3,JPY:0,KES:2,KGS:2,KHR:2,KMF:0,KRW:0,KWD:3,KYD:2,KZT:2,LAK:2,LBP:2,LKR:2,LYD:3,MAD:2,MDL:2,MKD:2,MMK:2,MNT:2,MOP:2,MRU:2,MUR:2,MVR:2,MWK:2,MXN:2,MYR:2,MZN:2,NAD:2,NGN:2,NIO:2,NOK:2,NPR:2,NZD:2,OMR:3,PAB:2,PEN:2,PGK:2,PHP:2,PKR:2,PLN:2,PYG:0,QAR:2,RON:2,RSD:2,RUB:2,RWF:0,SAR:2,SBD:2,SCR:2,SEK:2,SGD:2,SHP:2,SLE:2,SOS:2,SRD:2,STN:2,SVC:2,SZL:2,THB:2,TND:3,TOP:2,TRY:2,TTD:2,TWD:2,TZS:2,UAH:2,UGX:0,USD:2,UYU:2,UZS:2,VEF:2,VND:0,VUV:0,WST:2,XAF:0,XCD:2,XOF:0,XPF:0,YER:2,ZAR:2,ZMW:2},dr=(e="USD")=>{let[o,t,n,...i]=new ri(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split(""),a=ni[e];return{symbol:`${o} `,thousandSeparator:t,decimalSeparator:n,placeholder:n?`${o} 0${n}${Array.from(Array(a)).map(()=>0).join("")}`:`${o} 0`,fixedDecimalScale:!!n,decimalScale:a}};var di=Do.forwardRef(function(o,t){let{onChange:n,...i}=o;return Do.createElement(li,{...i,onValueChange:({value:a})=>{n?.({target:{name:o.name,value:a}})},valueIsNumericString:!0,getInputRef:t,allowNegative:!1})}),mi=si(W,{name:"CurrencyInput",slot:"root",overridesResolver:(e,o)=>o.root})({}),Mo=Do.forwardRef(function(o,t){let n=pi({props:o,name:"CurrencyInput"}),{currency:i="USD",name:a,onChange:r,label:d,error:l,helperText:s,required:p,disabled:c,useMinorUnit:y,sx:h,className:x,...m}=n,{symbol:g,thousandSeparator:D,decimalSeparator:f,placeholder:v,fixedDecimalScale:k,decimalScale:u}=dr(i),[w,C]=U(n.value,n.defaultValue,mr(R=>r?.({target:{name:a,value:R}}),[r,a])),P=cr(()=>w&&y?w/Math.pow(10,u):w,[w,y,u]),M=cr(()=>n.max&&y?n.max/Math.pow(10,u):n.max,[n.max,y,u]),[T,V]=ai(!!M&&!!P&&P>M),A=mr(R=>{if(R.target.value===""){C(void 0);return}let F=Number(y?R.target.value?.replace(f,""):R.target.value);M&&Number(R.target.value)>M?V(!0):V(!1),C(F)},[f,M,y,C]);return Do.createElement(mi,{...m,ref:t,value:P,placeholder:v,onChange:A,error:l||T,disabled:c,required:p,color:l||T?"danger":n.color,label:d,helperText:T?new ii(`limit: {amount, number, ::currency/${i} unit-width-narrow}`).format({amount:M}):s,slotProps:{input:{component:di,decimalSeparator:f,thousandSeparator:D,prefix:g,fixedDecimalScale:k,decimalScale:u,"aria-label":m["aria-label"]}},sx:{...h},className:x})});var ur=Mo;import b,{useCallback as ue,useEffect as Io,useMemo as _,useRef as dt,useState as br,useId as ji}from"react";import{useVirtualizer as Zi}from"@tanstack/react-virtual";import{styled as So,LinearProgress as Xi,Link as Qi}from"@mui/joy";import el from"@mui/icons-material/ChevronLeft";import ol from"@mui/icons-material/ChevronRight";import tl from"@mui/icons-material/ArrowUpwardRounded";import{Sheet as ci}from"@mui/joy";import{motion as ui}from"framer-motion";var fi=ui(ci),We=fi;We.displayName="Sheet";var te=We;import ae from"react";import{Table as gi}from"@mui/joy";var qe=e=>{let{children:o,...t}=e;return ae.createElement(gi,{...t},o)};qe.displayName="Table";function at(e){let{headCells:o,showCheckbox:t,onCheckboxChange:n,slots:{checkbox:i=_e}={},slotProps:{checkbox:a={}}={}}=e;return ae.createElement("thead",null,ae.createElement("tr",null,t&&ae.createElement("th",{style:{width:"40px",textAlign:"center"}},ae.createElement(i,{onChange:n,...a})),o.map(r=>ae.createElement("th",{key:r.label,style:{width:r.width,minWidth:r.minWidth,maxWidth:r.maxWidth,textAlign:r.numeric?"right":"left"}},r.label))))}at.displayName="TableHead";function it(e){let{rows:o,cellOrder:t,rowOptions:n,showCheckbox:i,onCheckboxChange:a,slots:{checkbox:r=_e}={},slotProps:{checkbox:d={}}={}}=e;return ae.createElement("tbody",null,o.map((l,s)=>ae.createElement("tr",{key:s},i&&ae.createElement("td",{style:{textAlign:"center"}},ae.createElement(r,{onChange:p=>a?.(p,s),...d})),t.map(p=>ae.createElement("td",{key:p,style:{textAlign:n?.[p]?.numeric?"right":"left"}},l[p])))))}it.displayName="TableBody";import q,{forwardRef as vi,useCallback as lt,useEffect as Di,useImperativeHandle as Mi,useRef as Pi,useState as Ti}from"react";import{IMaskInput as ki,IMask as st}from"react-imask";import wi from"@mui/icons-material/CalendarToday";import{styled as pt,useThemeProps as Ii}from"@mui/joy";import{FocusTrap as Si,ClickAwayListener as Ai,Popper as Ni}from"@mui/base";import{DialogActions 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),gap:e.spacing(2),flexDirection:"row",justifyContent:"flex-end"})),Ke=xi;Ke.displayName="DialogActions";var me=Ke;var Bi=pt(Ni,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Fi=pt(te,{name:"DatePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),Ei=pt("div",{name:"DatePicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),fr=(e,o)=>{let t=`${e.getDate()}`,n=`${e.getMonth()+1}`,i=e.getFullYear();return Number(t)<10&&(t="0"+t),Number(n)<10&&(n="0"+n),o.replace(/YYYY/g,i.toString()).replace(/MM/g,n).replace(/DD/g,t)};function Li(e,o){let t=o.split(/[-./\s]/),n=e.split(/[-./\s]/);if(t.length!==n.length)throw new Error("Invalid date string or format");let i,a,r;for(let l=0;l<t.length;l++){let s=parseInt(n[l],10);switch(t[l]){case"DD":i=s;break;case"MM":a=s-1;break;case"YYYY":r=s;break}}return new Date(r,a,i)}var Oi=e=>e.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/DD/g,"D").replace(/[^YMD\s]/g,o=>`${o}\``),Hi=q.forwardRef(function(o,t){let{onChange:n,format:i,...a}=o;return q.createElement(ki,{...a,inputRef:t,onAccept:r=>n({target:{name:o.name,value:r}}),mask:Date,pattern:Oi(i),blocks:{D:{mask:st.MaskedRange,from:1,to:31,maxLength:2},M:{mask:st.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:st.MaskedRange,from:1900,to:9999,maxLength:4}},format:r=>fr(r,i),parse:r=>Li(r,i),autofix:"pad",overwrite:!0})}),Po=vi((e,o)=>{let t=Ii({props:e,name:"DatePicker"}),{onChange:n,disabled:i,label:a,error:r,helperText:d,minDate:l,maxDate:s,disableFuture:p,disablePast:c,required:y,sx:h,className:x,format:m="YYYY/MM/DD",size:g,...D}=t,f=Pi(null),[v,k]=U(t.value,t.defaultValue||"",lt(T=>n?.({target:{name:t.name,value:T}}),[t.name,n]),{disableStrict:!0}),[u,w]=Ti(null),C=!!u;Di(()=>{u||f.current?.blur()},[u,f]),Mi(o,()=>f.current,[f]);let P=lt(T=>{k(T.target.value)},[k]),M=lt(T=>{w(u?null:T.currentTarget),setTimeout(()=>{f.current?.focus()},0)},[u,w,f]);return q.createElement(Ei,null,q.createElement(Si,{open:!0},q.createElement(q.Fragment,null,q.createElement(W,{...D,color:r?"danger":D.color,ref:f,size:g,value:v,onChange:P,placeholder:m,disabled:i,required:y,error:r,slotProps:{input:{component:Hi,ref:f,format:m}},className:x,sx:h,endDecorator:q.createElement(Y,{variant:"plain",onClick:M,"aria-label":"Toggle Calendar","aria-controls":"date-picker-popper","aria-haspopup":"dialog","aria-expanded":C},q.createElement(wi,null)),label:a,helperText:d}),C&&q.createElement(Ai,{onClickAway:()=>w(null)},q.createElement(Bi,{id:"date-picker-popper",open:!0,anchorEl:u,placement:"bottom-end",onMouseDown:T=>T.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":C},q.createElement(Fi,{tabIndex:-1,role:"presentation"},q.createElement(ge,{value:Number.isNaN(new Date(v).getTime())?void 0:[new Date(v),void 0],onChange:([T])=>{P({target:{name:t.name,value:fr(T,m)}}),w(null)},minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:p,disablePast:c}),q.createElement(me,{sx:{p:1}},q.createElement(H,{size:g,variant:"plain",color:"neutral",onClick:()=>{P({target:{name:t.name,value:""}}),w(null)}},"Clear"))))))))});var gr=Po;import To from"react";import{Textarea as zi}from"@mui/joy";import{motion as Vi}from"framer-motion";var Ri=Vi(zi),je=e=>{let{label:o,error:t,helperText:n,color:i,size:a,disabled:r,required:d,minRows:l=2,maxRows:s=4,sx:p,className:c,...y}=e,h=To.createElement(Ri,{required:d,disabled:r,color:t?"danger":i,size:a,minRows:l,maxRows:s,...y});return To.createElement(se,{required:d,disabled:r,color:i,size:a,error:t,sx:p,className:c},o&&To.createElement(pe,null,o),h,n&&To.createElement(de,null,n))};je.displayName="Textarea";var hr=je;import Ze,{useMemo as Yi}from"react";import{Select as $i,Option as Ji}from"@mui/joy";import{motion as Ui}from"framer-motion";var _i=Ui(Ji),ko=_i;ko.displayName="Option";function Xe(e){let{label:o,helperText:t,error:n,size:i,color:a,disabled:r,required:d,onChange:l,sx:s,className:p,...c}=e,y=Yi(()=>e.options.map(m=>typeof m!="object"?{value:m,label:m}:m),[e.options]),x=Ze.createElement($i,{...c,required:d,disabled:r,size:i,color:n?"danger":a,onChange:(m,g)=>{let D=m||{target:{}},f={...D,target:{name:D.target?.name||e.name,value:g||void 0}};l?.(f)}},y.map(m=>Ze.createElement(ko,{key:m.value,value:m.value},m.label)));return Ze.createElement(se,{required:d,disabled:r,size:i,color:a,error:n,sx:s,className:p},o&&Ze.createElement(pe,null,o),x,t&&Ze.createElement(de,null,t))}Xe.displayName="Select";var Cr=Xe;import Gi from"react";import{Tooltip as Wi}from"@mui/joy";import{motion as qi}from"framer-motion";var Ki=qi(Wi),Qe=e=>Gi.createElement(Ki,{...e});Qe.displayName="Tooltip";var yr=Qe;import{motion as xr}from"framer-motion";function vr(e){return!e.editMode&&["number","date","currency"].includes(e.type||"")?"end":"start"}var rl=So("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"}}),wo=e=>"Intl"in window?new Intl.NumberFormat().format(e):e;function nl(e){let{paginationModel:{page:o,pageSize:t},rowCount:n,onPageChange:i}=e,a=1,r=Math.max(a,Math.ceil(n/t)),d=[o-2,o-1].filter(c=>c>1),l=[o+1,o+2].filter(c=>c<=r-1),s=r>1&&o<r-3,p=r>1&&o>4;return b.createElement(L,{direction:"row",spacing:1,sx:{pt:1,pb:1},justifyContent:"end",alignItems:"center"},b.createElement(L,{direction:"row",spacing:.5,alignItems:"center"},b.createElement(Y,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-1),disabled:o===a,"aria-label":"Previous page"},b.createElement(el,null)),o!==a&&b.createElement(H,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(a)},a),p&&b.createElement(H,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-3)},"..."),d.map(c=>b.createElement(H,{key:c,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(c)},c)),b.createElement(H,{variant:"soft",size:"sm"},o),l.map(c=>b.createElement(H,{key:c,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(c)},c)),s&&b.createElement(H,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+3)},"..."),o!==r&&b.createElement(H,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(r)},r),b.createElement(Y,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+1),disabled:o===r,"aria-label":"Next page"},b.createElement(ol,null))))}var al=e=>b.createElement(Co,{sx:{position:"absolute",top:0,right:0,bottom:0,width:"4px",cursor:"col-resize"},onClick:o=>o.stopPropagation(),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)}}),il=So("tbody",{name:"DataTable",slot:"tableBody"})({"&::after":{content:"''",display:"block",height:"0.01em"}}),ll=So("tr",{name:"DataTable",slot:"tableRow",shouldForwardProp:e=>e!=="striped"})(({striped:e})=>({...e&&{background:"var(--TableRow-stripeBackground, var(--ceed-palette-background-level2))",color:"var(--ceed-palette-text-primary)"},"&:hover":{background:"var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))"}})),sl=So("span",{name:"DataTable",slot:"headCellAsterisk"})(({theme:e})=>({color:"var(--ceed-palette-danger-500)",marginLeft:e.spacing(.5)})),pl=xr(tl),dl=e=>{let{width:o,maxWidth:t,minWidth:n,stickyHeader:i,resizable:a,field:r,tableId:d,headerName:l,required:s,editMode:p,sort:c,onSortChange:y,sortable:h=!0,sortOrder:x}=e,m=dt(null),g=_(()=>`${d}_header_${l??r}`.trim(),[d,l,r]),D=a??!0?al(m):null,f={width:o,minWidth:n??"50px",maxWidth:t,position:i?void 0:"relative",cursor:h?"pointer":"default",userSelect:"none"},v=vr(e),k=x[0],u=h&&b.createElement(pl,{style:{width:"16px",height:"16px"},role:"img","aria-labelledby":g,"aria-description":(c??k)==="desc"?"descending":"ascending","data-testid":void 0,variants:{hover:{opacity:1},initial:{opacity:0}},animate:{color:c?"var(--ceed-palette-text-secondary)":"var(--ceed-palette-primary-solidDisabledColor)",rotate:(c??k)==="desc"?180:0,opacity:c?1:0},transition:{duration:0,rotate:{duration:.2,ease:"easeOut"},color:{duration:.2,ease:"easeInOut"},opacity:{duration:.2,ease:"easeInOut"}}});return b.createElement(xr.th,{id:g,"aria-label":l??r,"aria-sort":c?{asc:"ascending",desc:"descending"}[c]:"none",ref:m,key:r,style:f,onClick:w=>h&&y?.({field:r,currentSort:c,multiple:w.shiftKey}),whileHover:"hover",initial:"initial"},b.createElement(L,{gap:1,direction:"row",justifyContent:v},v==="end"&&u,b.createElement("div",null,l??r,p&&s&&b.createElement(sl,null,"*")),v==="start"&&u),D)},ml=e=>{let{tableId:o,field:t,type:n,renderCell:i,renderEditCell:a,isCellEditable:r,noWrap:d,row:l,rowId:s}=e,[p,c]=br(l[t]),y=dt(null),h=_(()=>({row:l,value:p,id:s}),[l,s,p]),x=_(()=>!!(e.editMode&&(typeof r=="function"?r(h):r??!0)),[e.editMode,r,h]),m=_(()=>({...typeof e.componentProps=="function"?e.componentProps(h):e.componentProps||{},size:"sm"}),[e,h]),g=_(()=>({...m,onChange:u=>{m.onChange?.(u),c(u.target.value),n==="select"&&e.onCellEditStop?.({...h,originalRow:l,row:{...h.row,[t]:u.target.value},value:u.target.value})},onFocus:u=>{m.onFocus?.(u),e.onCellEditStart?.({...h,originalRow:l,row:{...h.row,value:p},value:p})},onBlur:u=>{m.onBlur?.(u),n&&["number","text","longText","currency","date"].includes(n)&&e.onCellEditStop?.({...h,originalRow:l,row:{...h.row,[t]:p},value:p})},...n==="autocomplete"&&{onChangeComplete:u=>{m.onChangeComplete?.(u),c(u.target.value),e.onCellEditStop?.({...h,originalRow:l,row:{...h.row,[t]:u.target.value},value:u.target.value})}}}),[h,l,t,p,m,n,e]),D=_(()=>a?a(h):{date:b.createElement(gr,{value:p,...g}),currency:b.createElement(ur,{value:p,...g}),number:b.createElement(W,{value:p,type:"number",...g}),text:b.createElement(W,{value:p,type:"text",...g}),longText:b.createElement(hr,{value:p,...g}),autocomplete:b.createElement(Wt,{value:p,options:g.options||[p],...g}),select:b.createElement(Cr,{value:p,options:g.options||[p],...g})}[n||"text"],[p,g,n]),f=_(()=>{if(i)return i(h);let u=p;return{link:b.createElement(e.component||Qi,{children:u,...m})}[n||"text"]||u},[p,i,h,n,m,e]),v=_(()=>x&&D?D:f,[x,D,f]),k=_(()=>d&&e.type==="longText",[d,e.type]);return Io(()=>{c(l[t])},[l,t]),b.createElement("td",{ref:y,key:t,headers:`${o}_header_${e.headerName??t}`,style:{textAlign:vr({type:n}),verticalAlign:x?"top":"middle"}},k?b.createElement(yr,{title:p,placement:"bottom",style:{maxWidth:"100%"},enterDelay:1500,enterNextDelay:1500},b.createElement("div",{style:{overflow:"hidden",textOverflow:"ellipsis"}},v)):v)},cl=e=>{let{tableId:o,columns:t,rowId:n,editMode:i,noWrap:a,row:r}=e;return b.createElement(b.Fragment,null,t.map((d,l)=>b.createElement(ml,{...d,tableId:o,key:`${n}_${d.field.toString()}_${l}`,row:r,rowId:n,editMode:i,noWrap:a})))};function ul({rows:e,columns:o,rowCount:t,pagination:n,paginationMode:i,paginationModel:a,onPaginationModelChange:r,sortModel:d,sortOrder:l=["asc","desc",null],selectionModel:s=[],onSortModelChange:p,onSelectionModelChange:c,editMode:y,getId:h,isTotalSelected:x}){let[m,g]=U(d,[],ue(B=>p?.(B),[p])),D=_(()=>o.reduce((B,S)=>({...B,[S.field]:S}),{}),[o]),f=ue((B,S)=>{for(let N of m){let{field:$,sort:ie}=N,X=B[$],re=S[$],ye=D[$],Q=0;if(ye.sortComparator?Q=ye.sortComparator({rowA:B,rowB:S}):typeof X=="string"&&typeof re=="string"?Q=X.localeCompare(re):typeof X=="number"&&typeof re=="number"?Q=X-re:X instanceof Date&&re instanceof Date&&(Q=X.getTime()-re.getTime()),Q!==0)return ie==="asc"?Q:-Q}return 0},[m,D]),v=_(()=>m.length?[...e].sort(f):e,[e,m,f]),k=_(()=>Array.from(new Set(l)),[l]),[u,w]=br(a?.page||1),C=a?.pageSize||20,P=ue((B,S)=>h?.(B)??B.id??`${(S||0)+(u-1)*C}`,[h,u,C]),M=_(()=>new Set(s),[s]),T=_(()=>!n||i==="server"?v:v.slice((u-1)*C,(u-1)*C+C),[v,u,C,i,n]),V=_(()=>T.length>0&&T.every((B,S)=>M.has(P(B,S))),[T,M,P]),A=t||v.length,R=_(()=>x??(A>0&&s.length===A),[x,s,A]),F=_(()=>(o||Object.keys(v[0]||{}).map(S=>({field:S}))).map(S=>({...S,isCellEditable:y&&(typeof S.isCellEditable=="function"?S.isCellEditable:S.isCellEditable??!0),sort:m.find(N=>N.field===S.field)?.sort,sortOrder:D[S.field]?.sortOrder||k})),[v,o,y,m,D,k]),E=ue(B=>{w(B),r?.({page:B,pageSize:C})},[r,C]),J=ue(B=>{let{field:S,currentSort:N,multiple:$}=B,X=D[S].sortOrder||k;if(N!==void 0){let ye=(X.indexOf(N)+1)%X.length,Q=X[ye];if(!Q){let ve=$?m.filter(Jo=>Jo.field!==S):[];g(ve);return}let so=$?m.map(ve=>ve.field===S?{field:S,sort:Q}:ve):[{field:S,sort:Q}];g(so)}else{let re=$?[...m,{field:S,sort:X[0]}]:[{field:S,sort:X[0]}];g(re)}},[k,D,m,g]);return Io(()=>{a||E(1)},[A,E,a]),Io(()=>{let B=Math.max(1,Math.ceil(A/C));u>B&&E(B)},[u,A,C,E]),Io(()=>{c?.([])},[u]),{rowCount:A,page:u,pageSize:C,onPaginationModelChange:E,getId:P,HeadCell:dl,BodyRow:cl,dataInPage:T,handleSortChange:J,isAllSelected:V,isTotalSelected:R,isSelectedRow:ue(B=>M.has(B),[M]),onAllCheckboxChange:ue(()=>{c?.(V?[]:T.map(P))},[V,T,c,P]),onCheckboxChange:ue((B,S)=>{if(M.has(S)){let N=s.filter($=>$!==S);c?.(N)}else{let N=[...s,S];c?.(N)}},[s,c,M]),columns:F,onTotalSelect:ue(()=>{c?.(R?[]:v.map(P),!R)},[R,v,c,P])}}function mt(e){let{rows:o,checkboxSelection:t,editMode:n,selectionModel:i,onSelectionModelChange:a,disableSelectionOnClick:r,onRowClick:d,rowCount:l,columns:s,onPaginationModelChange:p,pagination:c,paginationMode:y,paginationModel:h,sortModel:x,sortOrder:m,onSortModelChange:g,loading:D,slots:{checkbox:f=_e,toolbar:v,footer:k,loadingOverlay:u=()=>b.createElement(Xi,{value:8,variant:"plain"})}={},slotProps:{checkbox:w={},toolbar:C,background:P={}}={},stripe:M,...T}=e,V=ji(),A=dt(null),{columns:R,isAllSelected:F,isSelectedRow:E,onAllCheckboxChange:J,onCheckboxChange:B,getId:S,rowCount:N,page:$,pageSize:ie,onPaginationModelChange:X,handleSortChange:re,dataInPage:ye,isTotalSelected:Q,onTotalSelect:so,HeadCell:ve,BodyRow:Jo}=ul(e),Jt=Zi({count:ye.length,getScrollElement:()=>A.current,estimateSize:()=>32,measureElement:le=>le.clientHeight,overscan:20}),Gr=_(()=>({page:$,pageSize:ie}),[$,ie]),Wr=Jt.getTotalSize(),qr=Jt.getVirtualItems();return b.createElement(Co,{sx:{maxHeight:"100%",overflow:"auto",display:"flex",flexDirection:"column"}},(!!t||!!v)&&b.createElement(L,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center"},!!t&&b.createElement(L,{direction:"row",spacing:1},!F&&b.createElement(G,{level:"body-xs"},wo(i?.length||0)," items selected"),F&&!Q&&b.createElement(L,{direction:"row",spacing:1,alignItems:"center"},b.createElement(G,{level:"body-xs"},"All ",wo(i?.length||0)," items on this page are selected."),b.createElement(H,{size:"sm",variant:"plain",onClick:so},"Select all ",wo(N??o.length)," items")),Q&&b.createElement(L,{direction:"row",spacing:1,alignItems:"center"},b.createElement(G,{level:"body-xs"},"All ",wo(N??o.length)," items are selected."),b.createElement(H,{size:"sm",variant:"plain",color:"danger",onClick:so},"Cancel"))),v&&b.createElement(v,{...C||{}})),b.createElement(te,{variant:"outlined",sx:{height:"100%",overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"},ref:A,...P},b.createElement(qe,{...T},b.createElement("thead",null,b.createElement("tr",null,t&&b.createElement("th",{style:{width:"40px",textAlign:"center"}},b.createElement(f,{onChange:J,checked:F,indeterminate:(i||[]).length>0&&!F,...w})),R.map((le,Uo)=>b.createElement(ve,{tableId:V,key:`${le.field.toString()}_${Uo}`,stickyHeader:e.stickyHeader,editMode:!!le.isCellEditable,onSortChange:re,...le})))),b.createElement(il,{style:{height:`${Wr}px`}},!!D&&b.createElement(rl,null,b.createElement("td",null,b.createElement(Co,{sx:{position:"absolute",top:0,left:0,right:0}},b.createElement(u,null)))),qr.map((le,Uo)=>{let po=le.index,_o=ye[po],be=S(_o,po),Kr=M&&(M==="even"&&(po+1)%2===0||M==="odd"&&(po+1)%2===1);return b.createElement(ll,{key:be,role:t&&!r?"checkbox":void 0,tabIndex:t&&!r?-1:void 0,onClick:De=>{d?.({row:_o,rowId:be},De),t&&!r&&B(De,be)},"aria-checked":t&&!r?E(be):void 0,striped:Kr,style:{height:`${le.size}px`,transform:`translateY(${le.start-Uo*le.size}px)`}},t&&b.createElement("th",{scope:"row",style:{textAlign:"center"}},b.createElement(f,{onClick:De=>De.stopPropagation(),onChange:De=>B(De,be),checked:E(be),...w})),b.createElement(Jo,{tableId:V,columns:R,row:_o,rowId:be,editMode:n,noWrap:e.noWrap}))})),k&&b.createElement(k,null))),c&&b.createElement(nl,{paginationModel:Gr,rowCount:N,onPageChange:X}))}mt.displayName="DataTable";import K,{forwardRef as fl,useCallback as Ao,useEffect as gl,useImperativeHandle as hl,useMemo as Cl,useRef as yl,useState as bl}from"react";import{IMaskInput as xl,IMask as ct}from"react-imask";import vl from"@mui/icons-material/CalendarToday";import{styled as ut,useThemeProps as Dl}from"@mui/joy";import{FocusTrap as Ml,ClickAwayListener as Pl,Popper as Tl}from"@mui/base";var kl=ut(Tl,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),wl=ut(te,{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})),Il=ut("div",{name:"DateRangePicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),Mr=([e,o],t)=>{let n=i=>{let a=`${i.getDate()}`,r=`${i.getMonth()+1}`,d=i.getFullYear();return Number(a)<10&&(a="0"+a),Number(r)<10&&(r="0"+r),t.replace(/YYYY/g,d.toString()).replace(/MM/g,r).replace(/DD/g,a)};return[n(e),o?n(o):""].join(" - ")};function Dr(e,o){let t=o.split(/[-./\s]/),n=e.split(/[-./\s]/),i,a,r;for(let l=0;l<t.length;l++){let s=parseInt(n[l],10);switch(t[l]){case"DD":i=s;break;case"MM":a=s-1;break;case"YYYY":r=s;break}}return new Date(r,a,i)}var Pr=(e,o)=>{let t=e.split(" - ")[0]||"",n=e.split(" - ")[1]||"";return[Dr(t,o),Dr(n,o)]},Sl=e=>`${e} - ${e}`.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/DD/g,"D").replace(/[^YMD\s]/g,o=>`${o}\``),Al=K.forwardRef(function(o,t){let{onChange:n,format:i,...a}=o;return K.createElement(xl,{...a,inputRef:t,onAccept:r=>n({target:{name:o.name,value:r}}),mask:Date,pattern:Sl(i),blocks:{D:{mask:ct.MaskedRange,from:1,to:31,maxLength:2},M:{mask:ct.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:ct.MaskedRange,from:1900,to:9999}},format:r=>Mr(r,i),parse:r=>Pr(r,i),autofix:"pad",overwrite:!0})}),ft=fl((e,o)=>{let t=Dl({props:e,name:"DateRangePicker"}),{onChange:n,disabled:i,label:a,error:r,helperText:d,minDate:l,maxDate:s,disableFuture:p,disablePast:c,required:y,sx:h,className:x,format:m="YYYY/MM/DD",size:g,...D}=t,f=yl(null),[v,k]=U(t.value,t.defaultValue||"",Ao(A=>n?.({target:{name:t.name,value:A}}),[t.name,n]),{disableStrict:!0}),[u,w]=bl(null),C=!!u,P=Cl(()=>v?Pr(v,m):void 0,[v,m]);gl(()=>{u||f.current?.blur()},[u,f]),hl(o,()=>f.current,[f]);let M=Ao(A=>{k(A.target.value)},[k]),T=Ao(A=>{w(u?null:A.currentTarget),f.current?.focus()},[u,w,f]),V=Ao(([A,R])=>{!A||!R||(k(Mr([A,R],m)),w(null))},[k,w,m]);return K.createElement(Il,null,K.createElement(Ml,{open:!0},K.createElement(K.Fragment,null,K.createElement(W,{...D,color:r?"danger":D.color,ref:o,size:g,value:v,onChange:M,disabled:i,required:y,placeholder:`${m} - ${m}`,slotProps:{input:{component:Al,ref:f,format:m}},error:r,className:x,sx:h,endDecorator:K.createElement(Y,{variant:"plain",onClick:T,"aria-label":"Toggle Calendar","aria-controls":"date-range-picker-popper","aria-haspopup":"dialog","aria-expanded":C},K.createElement(vl,null)),label:a,helperText:d}),C&&K.createElement(Pl,{onClickAway:()=>w(null)},K.createElement(kl,{id:"date-range-picker-popper",open:!0,anchorEl:u,placement:"bottom-end",onMouseDown:A=>A.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":C},K.createElement(wl,{tabIndex:-1,role:"presentation"},K.createElement(ge,{rangeSelection:!0,defaultValue:P,onChange:V,minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:p,disablePast:c}),K.createElement(me,{sx:{p:1}},K.createElement(H,{size:g,variant:"plain",color:"neutral",onClick:()=>{k(""),w(null)}},"Clear"))))))))});ft.displayName="DateRangePicker";import{DialogContent as Nl,styled as Bl}from"@mui/joy";import{motion as Fl}from"framer-motion";var El=Fl(Nl),Ll=Bl(El)(({theme:e})=>({padding:e.spacing(0,6,5)})),eo=Ll;eo.displayName="DialogContent";var No=eo;import{DialogTitle as Ol,styled as Hl}from"@mui/joy";import{motion as zl}from"framer-motion";var Vl=zl(Ol),Rl=Hl(Vl)(({theme:e})=>({padding:e.spacing(4,6)})),oo=Rl;oo.displayName="DialogTitle";var Bo=oo;import ro from"react";import Fo from"react";import{Modal as Yl,ModalDialog as $l,ModalClose as Jl,ModalOverflow as Ul,styled as Tr}from"@mui/joy";import{motion as gt}from"framer-motion";var _l=gt(Yl),ht=_l;ht.displayName="Modal";var kr=Tr($l)({padding:0}),to=kr;to.displayName="ModalDialog";var Gl=Tr(gt(Jl))(({theme:e})=>({top:e.spacing(3),right:e.spacing(6)})),Eo=Gl;Eo.displayName="ModalClose";var Wl=gt(Ul),Ct=Wl;Ct.displayName="ModalOverflow";function yt(e){let{title:o,children:t,...n}=e;return Fo.createElement(kr,{...n},Fo.createElement(Eo,null),Fo.createElement(Bo,null,o),Fo.createElement(No,null,t))}yt.displayName="ModalFrame";import{styled as ql}from"@mui/joy";var Kl=ql(to,{name:"Dialog",slot:"Root"})({padding:0}),bt=ro.forwardRef((e,o)=>{let{title:t,children:n,actions:i,fullscreen:a,...r}=e;return ro.createElement(Kl,{layout:a?"fullscreen":"center",ref:o,...r},ro.createElement(Bo,null,t),ro.createElement(No,null,n),ro.createElement(me,null,i))});bt.displayName="DialogFrame";import jl from"react";import{Divider as Zl}from"@mui/joy";import{motion as Xl}from"framer-motion";var Ql=Xl(Zl),no=e=>jl.createElement(Ql,{...e});no.displayName="Divider";import es from"react";import{Drawer as os}from"@mui/joy";import{motion as ts}from"framer-motion";var rs=ts(os),xt=e=>{let{children:o,...t}=e;return es.createElement(rs,{...t,slotProps:{...t.slotProps,content:{...t.slotProps?.content,sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}}}},o)};xt.displayName="InsetDrawer";import z,{useCallback as Lo,useEffect as wr,useMemo as vt,useRef as Ir,useState as Oo}from"react";import{styled as Ce}from"@mui/joy";import ns from"@mui/icons-material/CloudUploadRounded";import as from"@mui/icons-material/UploadFileRounded";import is from"@mui/icons-material/ClearRounded";import{combine as ls}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/combine.js";import{dropTargetForExternal as ss,monitorForExternal as ps}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/adapter.js";import{containsFiles as Sr,getFiles as ds}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/file.js";import{preventUnhandled as Ar}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/prevent-unhandled.js";import{Input as ms}from"@mui/joy";var cs=Ce(ms)({width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",position:"absolute"}),us=Ce(L,{name:"Uploader",slot:"PreviewRoot"})({}),fs=Ce(Je,{name:"Uploader",slot:"UploadCard"})(({theme:e})=>({padding:e.spacing(2.5),border:`1px solid ${e.palette.neutral.outlinedBorder}`})),gs=Ce(as,{name:"Uploader",slot:"UploadFileIcon"})(({theme:e})=>({color:e.palette.neutral[400],width:"32px",height:"32px"})),hs=Ce(is,{name:"Uploader",slot:"ClearIcon"})(({theme:e})=>({color:e.palette.neutral.plainColor,width:"18px",height:"18px"})),Cs=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"],Dt=e=>{let o=e==0?0:Math.floor(Math.log(e)/Math.log(1024)),t=e/Math.pow(1024,o),n=Cs[o];return Intl.NumberFormat("en-us",{style:"unit",unit:n,unitDisplay:"narrow"}).format(t)},ys=e=>{let{files:o,uploaded:t,onDelete:n}=e;return z.createElement(us,{gap:1},[...t,...o].map(i=>z.createElement(fs,{key:i.name,size:"sm",color:"neutral"},z.createElement(L,{direction:"row",alignItems:"center",gap:2},z.createElement(gs,null),z.createElement(L,{flex:"1"},z.createElement(G,{level:"body-sm",textColor:"common.black"},i.name),!!i.size&&z.createElement(G,{level:"body-xs",fontWeight:"300",lineHeight:"1.33",textColor:"text.tertiary"},Dt(i.size))),z.createElement(Y,{onClick:()=>n?.(i)},z.createElement(hs,null))))))},bs=Ce(L,{name:"Uploader",slot:"root"})(({theme:e})=>({gap:e.spacing(2)})),xs=Ce(te,{name:"Uploader",slot:"dropZone",shouldForwardProp:e=>e!=="error"})(({theme:e,state:o,error:t})=>({width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:e.spacing(5),gap:e.spacing(4),cursor:"pointer",backgroundColor:e.palette.background.surface,border:t?`1px solid ${e.palette.danger.outlinedBorder}`:o==="idle"?`1px solid ${e.palette.neutral.outlinedBorder}`:`1px solid ${e.palette.primary.outlinedBorder}`})),vs=Ce(ns,{name:"Uploader",slot:"iconContainer",shouldForwardProp:e=>e!=="error"})(({theme:e,state:o,error:t})=>({color:t?`rgba(${e.vars.palette.danger.mainChannel} / 0.6)`:o==="over"?`rgba(${e.palette.primary.mainChannel} / 0.6)`:e.palette.neutral.softActiveBg,width:"32px",height:"32px"})),Nr=z.memo(e=>{let{accept:o,minCount:t,maxCount:n,name:i,size:a,maxFileSize:r,maxFileTotalSize:d,onChange:l,label:s,disabled:p,onDelete:c}=e,y=Ir(null),h=Ir(null),[x,m]=Oo(),[g,D]=Oo([]),[f,v]=Oo(e.uploaded||[]),[k,u]=Oo("idle"),w=vt(()=>{let F=o.split(",").map(N=>N.trim()),[E,J]=[F.filter(N=>["image/*","video/*","audio/*"].includes(N)).map(N=>{let[$]=N.split("/");return $.toLowerCase()}),F.filter(N=>!["image/*","video/*","audio/*"].includes(N)).map(N=>{let[$,ie]=N.split("/");return ie?ie.toUpperCase():$.toUpperCase().replace(".","")})],B=[];E.length>0&&B.push(`Any ${E.join(", ")} files`),J.length>0&&B.push(J.join(", "));let S=[B.join(", "),`Maximum ${Dt(d)}`];return n&&S.push(`Up to ${n} ${n===1?"file":"files"}`),S.join(", ")},[o,d,n]),C=vt(()=>!!x||e.error,[e.error,x]),P=vt(()=>!n||n&&[...f,...g].length!==n,[g,n,f]),M=Lo(F=>{try{let E=o.split(",").map(N=>N.trim().replace(".","").replace("*",".*"))||[],J=new RegExp(`\\b(${E.join("|")})\\b`);if(F.forEach(N=>{let[$,ie]=N.name.split(".");if(!J.test(N.type)&&!J.test(ie))throw new Error("Please upload acceptable file type.")}),r&&F.forEach(N=>{if(N.size>r)throw new Error(`One or more File size exceeded the maximum limit. Each file size must be ${Dt(r)} or less.`)}),[...g,...F].reduce((N,$)=>N+$.size,0)>d)throw new Error("Total File size exceeded the maximum limit.");let S=[...g,...F];if(n&&[...f,...S].length>n)throw new Error("Exceeded the maximum number of files.");l?.({target:{name:i,value:S}}),D(S),m(void 0)}catch(E){m(E.message)}},[g,f,n,o,r,d,i,l]);wr(()=>{let F=y.current;if(!(!F||p))return ls(ss({element:F,canDrop:Sr,onDragEnter:()=>u("over"),onDragLeave:()=>u("potential"),onDrop:async({source:E})=>{let J=await ds({source:E});M(J)}}),ps({canMonitor:Sr,onDragStart:()=>{u("potential"),Ar.start()},onDrop:()=>{u("idle"),Ar.stop()}}))}),wr(()=>{h.current&&t&&(g.length<t?h.current.setCustomValidity(`At least ${t} files are required.`):h.current.setCustomValidity(""))},[h,g,t]);let T=Lo(F=>{let E=Array.from(F.target.files||[]);M(E)},[M]),V=Lo(F=>{F instanceof File?D(E=>(l?.({target:{name:i,value:E.filter(J=>J!==F)}}),E.filter(J=>J!==F))):(v(E=>E.filter(J=>J.id!==F.id)),c?.(F)),m(void 0)},[i,l,c]),A=Lo(()=>{h.current?.click()},[]);return z.createElement(bs,null,P&&z.createElement(se,{size:a,error:!!(C||x),disabled:p,required:!!t},s&&z.createElement(pe,null,s),z.createElement(xs,{state:k,error:!!(C||x),ref:y,onClick:A},z.createElement(L,{alignItems:"center",gap:1},z.createElement(vs,{state:k,error:!!(C||x)})),z.createElement(cs,{disabled:p,required:!!t,onInvalid:F=>{t&&g.length<t&&m(`Please choose ${t} ${t===1?"file":"files"} to upload.`)},slotProps:{input:{multiple:!0,accept:o,type:"file",ref:h,role:"button",onChange:T}}})),z.createElement(de,null,z.createElement(L,null,x&&z.createElement("div",null,x),z.createElement("div",null,w)))),[...f,...g].length>0&&z.createElement(ys,{files:g,uploaded:f,onDelete:V}))});import{Grid as Ds}from"@mui/joy";import{motion as Ms}from"framer-motion";var Ps=Ms(Ds),Mt=Ps;Mt.displayName="Grid";import fe from"react";import ks from"react-markdown";import{Link as ws}from"@mui/joy";import{visit as Ts}from"unist-util-visit";function Br(e){let{accentColor:o}=e;return t=>{Ts(t,"text",(n,i,a)=>{let r=n.value,d=/\|\|.*?\|\|/g,l,s=0,p=[];for(;(l=d.exec(r))!==null;){l.index>s&&p.push({type:"text",value:r.slice(s,l.index)});let c=l[0].split("||")[1];p.push({type:"element",tagName:"p",properties:{textColor:o},children:[{type:"text",value:c}]}),s=l.index+l[0].length}s<r.length&&p.push({type:"text",value:r.slice(s)}),p.length&&a.children.splice(i,1,...p)})}}var Pt=e=>{let{color:o,textColor:t,defaultLevel:n="body-md",accentColor:i="danger.500",defaultLinkAction:a="_self",markdownOptions:r,content:d,...l}=e;return fe.createElement(ee,{component:"div",color:o,textColor:t,level:n,...l},fe.createElement(ks,{...r,children:d,rehypePlugins:[[Br,{accentColor:i}]],components:{h1:({children:s})=>fe.createElement(ee,{color:o,textColor:t,level:"h1"},s),h2:({children:s})=>fe.createElement(ee,{color:o,textColor:t,level:"h2"},s),h3:({children:s})=>fe.createElement(ee,{color:o,textColor:t,level:"h3"},s),h4:({children:s})=>fe.createElement(ee,{color:o,textColor:t,level:"h4"},s),p:({children:s,node:p})=>fe.createElement(ee,{color:o,textColor:t,level:n,...p?.properties},s),a:({children:s,href:p})=>fe.createElement(ws,{href:p,target:a},s),hr:()=>fe.createElement(no,null),...r?.components}}))};Pt.displayName="Markdown";import j,{forwardRef as Is,useCallback as Tt,useEffect as Ss,useImperativeHandle as As,useRef as Ns,useState as Bs}from"react";import{IMaskInput as Fs,IMask as Fr}from"react-imask";import Es from"@mui/icons-material/CalendarToday";import{styled as kt,useThemeProps as Ls}from"@mui/joy";import{FocusTrap as Os,ClickAwayListener as Hs,Popper as zs}from"@mui/base";var Vs=kt(zs,{name:"MonthPicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Rs=kt(te,{name:"MonthPicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),Ys=kt("div",{name:"MonthPicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),Er=(e,o)=>{let t=`${e.getMonth()+1}`,n=e.getFullYear();return Number(t)<10&&(t="0"+t),o.replace(/YYYY/g,n.toString()).replace(/MM/g,t)},$s=e=>e.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/[^YM\s]/g,o=>`${o}\``);function Js(e){let o,t,n=e.replace(/[^\d]/g,"");return e.match(/\d{1,2}.\d{4}/)?(o=n.slice(0,2),t=n.slice(2)):e.match(/\d{4}.\d{1,2}/)&&(t=n.slice(0,4),o=n.slice(4)),new Date(`${t}/${o}`)}var Us=j.forwardRef(function(o,t){let{onChange:n,format:i,...a}=o;return j.createElement(Fs,{...a,inputRef:t,onAccept:r=>n({target:{name:o.name,value:r}}),mask:Date,pattern:$s(i),blocks:{M:{mask:Fr.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Fr.MaskedRange,from:1900,to:9999}},format:r=>Er(r,i),parse:Js,autofix:"pad",overwrite:!0})}),Lr=Is((e,o)=>{let t=Ls({props:e,name:"MonthPicker"}),{onChange:n,disabled:i,label:a,error:r,helperText:d,minDate:l,maxDate:s,disableFuture:p,disablePast:c,required:y,sx:h,className:x,format:m="YYYY/MM",size:g,...D}=t,f=Ns(null),[v,k]=U(t.value,t.defaultValue||"",Tt(T=>n?.({target:{name:t.name,value:T}}),[t.name,n]),{disableStrict:!0}),[u,w]=Bs(null),C=!!u;Ss(()=>{u||f.current?.blur()},[u,f]),As(o,()=>f.current,[f]);let P=Tt(T=>{k(T.target.value)},[k]),M=Tt(T=>{w(u?null:T.currentTarget),f.current?.focus()},[u,w,f]);return j.createElement(Ys,null,j.createElement(Os,{open:!0},j.createElement(j.Fragment,null,j.createElement(W,{...D,color:r?"danger":D.color,ref:f,size:g,value:v,onChange:P,placeholder:m,disabled:i,required:y,slotProps:{input:{component:Us,ref:f,format:m}},error:r,className:x,sx:{...h,fontFamily:"monospace"},endDecorator:j.createElement(Y,{variant:"plain",onClick:M,"aria-label":"Toggle Calendar","aria-controls":"month-picker-popper","aria-haspopup":"dialog","aria-expanded":C},j.createElement(Es,null)),label:a,helperText:d}),C&&j.createElement(Hs,{onClickAway:()=>w(null)},j.createElement(Vs,{id:"month-picker-popper",open:!0,anchorEl:u,placement:"bottom-end",onMouseDown:T=>T.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":C},j.createElement(Rs,{tabIndex:-1,role:"presentation"},j.createElement(ge,{view:"month",views:["month"],value:Number.isNaN(new Date(v).getTime())?void 0:[new Date(v),void 0],onChange:([T])=>{P({target:{name:t.name,value:Er(T,m)}}),w(null)},minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:p,disablePast:c}),j.createElement(me,{sx:{p:1}},j.createElement(H,{size:g,variant:"plain",color:"neutral",onClick:()=>{P({target:{name:t.name,value:""}}),w(null)}},"Clear"))))))))});import Z,{forwardRef as _s,useCallback as Ho,useEffect as Gs,useImperativeHandle as Ws,useMemo as qs,useRef as Ks,useState as js}from"react";import{IMaskInput as Zs,IMask as Or}from"react-imask";import Xs from"@mui/icons-material/CalendarToday";import{styled as wt,useThemeProps as Qs}from"@mui/joy";import{FocusTrap as ep,ClickAwayListener as op,Popper as tp}from"@mui/base";var rp=wt(tp,{name:"MonthRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),np=wt(te,{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})),ap=wt("div",{name:"MonthRangePicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),zr=([e,o],t)=>{let n=i=>{let a=`${i.getMonth()+1}`,r=i.getFullYear();return Number(a)<10&&(a="0"+a),t.replace(/YYYY/g,r.toString()).replace(/MM/g,a)};return[n(e),o?n(o):""].join(" - ")};function Hr(e){let o,t,n=e.replace(/[^\d]/g,"");return e.match(/\d{1,2}.\d{4}/)?(o=n.slice(0,2),t=n.slice(2)):e.match(/\d{4}.\d{1,2}/)&&(t=n.slice(0,4),o=n.slice(4)),new Date(`${t}/${o}`)}var Vr=e=>{let o=e.split(" - ")[0]||"",t=e.split(" - ")[1]||"";return[Hr(o),Hr(t)]},ip=e=>`${e} - ${e}`.replace(/YYYY/g,"Y").replace(/MM/g,"m").replace(/[^YMm\s]/g,o=>`${o}\``),lp=Z.forwardRef(function(o,t){let{onChange:n,format:i,...a}=o;return Z.createElement(Zs,{...a,inputRef:t,onAccept:r=>n({target:{name:o.name,value:r}}),mask:Date,pattern:ip(i),blocks:{m:{mask:Or.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Or.MaskedRange,from:1900,to:9999}},format:r=>zr(r,i),parse:Vr,autofix:"pad",overwrite:!0})}),It=_s((e,o)=>{let t=Qs({props:e,name:"MonthRangePicker"}),{onChange:n,disabled:i,label:a,error:r,helperText:d,minDate:l,maxDate:s,disableFuture:p,disablePast:c,required:y,sx:h,className:x,format:m="YYYY/MM",size:g,...D}=t,f=Ks(null),[v,k]=U(t.value,t.defaultValue||"",Ho(A=>n?.({target:{name:t.name,value:A}}),[t.name,n]),{disableStrict:!0}),[u,w]=js(null),C=!!u,P=qs(()=>v?Vr(v):void 0,[v]);Gs(()=>{u||f.current?.blur()},[u,f]),Ws(o,()=>f.current,[f]);let M=Ho(A=>{k(A.target.value)},[k]),T=Ho(A=>{w(u?null:A.currentTarget),f.current?.focus()},[u,w,f]),V=Ho(([A,R])=>{!A||!R||(k(zr([A,R],m)),w(null))},[k,w,m]);return Z.createElement(ap,null,Z.createElement(ep,{open:!0},Z.createElement(Z.Fragment,null,Z.createElement(W,{...D,color:r?"danger":D.color,ref:o,size:g,value:v,onChange:M,disabled:i,required:y,placeholder:`${m} - ${m}`,slotProps:{input:{component:lp,ref:f,format:m}},error:r,className:x,sx:{...h,fontFamily:"monospace"},endDecorator:Z.createElement(Y,{variant:"plain",onClick:T,"aria-label":"Toggle Calendar","aria-controls":"month-range-picker-popper","aria-haspopup":"dialog","aria-expanded":C},Z.createElement(Xs,null)),label:a,helperText:d}),C&&Z.createElement(op,{onClickAway:()=>w(null)},Z.createElement(rp,{id:"month-range-picker-popper",open:!0,anchorEl:u,placement:"bottom-end",onMouseDown:A=>A.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":C},Z.createElement(np,{tabIndex:-1,role:"presentation"},Z.createElement(ge,{view:"month",views:["month"],rangeSelection:!0,defaultValue:P,onChange:V,minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:p,disablePast:c}),Z.createElement(me,{sx:{p:1}},Z.createElement(H,{size:g,variant:"plain",color:"neutral",onClick:()=>{k(""),w(null)}},"Clear"))))))))});It.displayName="MonthRangePicker";import zo,{useCallback as Rr,useMemo as sp,useState as pp}from"react";import{NumericFormat as dp}from"react-number-format";import{styled as mp,useThemeProps as cp}from"@mui/joy";var up=(e,o)=>{let[t,n=""]=`${e}`.split(".");return+`${t}${n.padEnd(o,"0")}`},fp=zo.forwardRef(function(o,t){let{onChange:n,min:i,max:a,...r}=o;return zo.createElement(dp,{...r,onValueChange:({value:d})=>{n?.({target:{name:o.name,value:d}})},valueIsNumericString:!0,thousandSeparator:!0,suffix:"%",getInputRef:t,allowNegative:!0})}),gp=mp(W,{name:"PercentageInput",slot:"Root",overridesResolver:(e,o)=>o.root})({}),St=zo.forwardRef(function(o,t){let n=cp({props:o,name:"PercentageInput"}),{name:i,onChange:a,label:r,error:d,helperText:l,required:s,disabled:p,useMinorUnit:c,maxDecimalScale:y=0,min:h,max:x,sx:m,className:g,...D}=n,[f,v]=U(n.value,n.defaultValue,Rr(P=>a?.({target:{name:i,value:P}}),[a,i])),[k,u]=pp(x&&f&&f>x||h&&f&&f<h),w=sp(()=>f&&c?f/Math.pow(10,y):f,[f,c,y]),C=Rr(P=>{if(P.target.value===""){v(void 0);return}let M=Number(P.target.value);h&&M<h||x&&M>x?u(!0):u(!1);let T=c?up(M,y):M;v(T)},[v,c,y,h,x]);return zo.createElement(gp,{...D,ref:t,value:w,onChange:C,error:k||d,disabled:p,required:s,color:k||d?"danger":n.color,label:r,helperText:l,slotProps:{input:{component:fp,"aria-label":D["aria-label"],decimalScale:y}},sx:{...m},className:g})});St.displayName="PercentageInput";import{Radio as hp,RadioGroup as Cp}from"@mui/joy";import{motion as Yr}from"framer-motion";var yp=Yr(hp),ao=yp;ao.displayName="Radio";var bp=Yr(Cp),io=bp;io.displayName="RadioGroup";import $r from"react";function At(e){let{items:o,...t}=e;return $r.createElement(io,{...t},o.map(n=>$r.createElement(ao,{key:`${n.value}`,value:n.value,label:n.label})))}At.displayName="RadioList";import xe from"react";import{Stepper as xp,Step as vp,StepIndicator as Dp,stepClasses as Nt,stepIndicatorClasses as lo,styled as Bt}from"@mui/joy";import Mp from"@mui/icons-material/Check";import{motion as Pp}from"framer-motion";var Vo=Bt(vp)({});Vo.displayName="Step";var Ro=Bt(Dp)({});Ro.displayName="StepIndicator";var Tp=Bt(xp)(({theme:e})=>({"--StepIndicator-size":"24px","--Step-gap":e.spacing(2),"--joy-palette-success-solidBg":"var(--joy-palette-success-400)",[`& .${lo.root}`]:{fontSize:"var(--ceed-fontSize-xs)"}})),kp=Pp(Tp);function Ft(e){let{steps:o,activeColor:t="primary.500",inactiveColor:n="neutral.400",activeLineColor:i="primary.500",inactiveLineColor:a="neutral.300",activeStep:r}=e;return xe.createElement(kp,{sx:d=>({"--StepIndicator-size":"24px","--Step-gap":d.spacing(2),[`& .${lo.root}`]:{fontSize:"var(--ceed-fontSize-xs)"},[`& .${Nt.completed}`]:{"&::after":{bgcolor:i},[`& .${lo.root}`]:{bgcolor:t}},[`& .${Nt.active}`]:{"&::after":{bgcolor:a},[`& .${lo.root}`]:{bgcolor:t}},[`& .${Nt.disabled}`]:{"&::after":{bgcolor:a},[`& .${lo.root}`]:{bgcolor:n}}})},o.map((d,l)=>{let s=r===l+1,p=r>l+1,c=r<l+1,y=d.label||d.extraContent;return xe.createElement(Vo,{indicator:xe.createElement(Ro,{variant:"solid",color:"primary"},p?xe.createElement(Mp,null):d.indicatorContent),active:s,completed:p,disabled:c},y&&xe.createElement(L,null,d.label&&xe.createElement(G,{level:"title-sm"},d.label),d.extraContent&&xe.createElement(G,{level:"body-xs"},d.extraContent)))}))}Ft.displayName="Stepper";import Jr from"react";import{Switch as wp,styled as Ip,switchClasses as Sp}from"@mui/joy";import{motion as Ur}from"framer-motion";var Ap=Ur(wp),Np=Ip(Ur.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)",[`&.${Sp.checked}`]:{left:"unset",right:"var(--Switch-thumbOffset)"}}),Bp=e=>Jr.createElement(Np,{...e,layout:!0,transition:Fp}),Fp={type:"spring",stiffness:700,damping:30},Et=e=>{let{name:o,...t}=e;return Jr.createElement(Ap,{...t,slots:{thumb:Bp,...t.slots},slotProps:{...t.slotProps,input:{...t.slotProps?.input,name:o}}})};Et.displayName="Switch";import{Tabs as Ep,Tab as Lp,TabList as Op,TabPanel as Hp,styled as zp,tabClasses as Vp}from"@mui/joy";import{motion as Yo}from"framer-motion";var Rp=Yo(Ep),Lt=Rp;Lt.displayName="Tabs";var Yp=zp(Yo(Lp))(({theme:e})=>({[`&:not(.${Vp.selected})`]:{color:e.palette.neutral[700]}})),Ot=Yp;Ot.displayName="Tab";var $p=Yo(Op),Ht=$p;Ht.displayName="TabList";var Jp=Yo(Hp),zt=Jp;zt.displayName="TabPanel";import $o from"react";import{CssBaseline as Vt,CssVarsProvider as Up,checkboxClasses as _p,extendTheme as Rt,inputClasses as Te}from"@mui/joy";var _r={palette:{danger:{50:"#FEF3F2",100:"#FDE6E5",200:"#FBC7C4",300:"#F89E99",400:"#F46E66",500:"#DC0D00",600:"#AB0F00",700:"#791000",800:"#430A0A",900:"#240505"},neutral:{50:"#FAFBFC",100:"#F3F5F7",200:"#EBECF0",300:"#D1D5DB",400:"#A2AAB8",500:"#5E6C83",600:"#505E79",700:"#253858",800:"#071B36",900:"#0B0D0E"},primary:{50:"#F2F7FE",100:"#E8F0FD",200:"#CCDFFC",300:"#9DC1F9",400:"#4D8EF3",500:"#015DEE",600:"#0154D6",700:"#0141A7",800:"#00255F",900:"#000F26"},warning:{50:"#FEF8F2",100:"#FEF1E5",200:"#FCE1C4",300:"#FABD7F",400:"#F57C00",500:"#AF5100",600:"#843600",700:"#672600",800:"#421400",900:"#1d1002"}}},Yt=Rt({cssVarPrefix:"ceed",spacing:4,zIndex:{popup:1500},colorSchemes:{light:_r,dark:_r},components:{CurrencyInput:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${Te.root}`]:{"font-family":"monospace"}}}},DatePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${Te.root}`]:{"font-family":"monospace"}}}},DateRangePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${Te.root}`]:{"font-family":"monospace"}}}},MonthPicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${Te.root}`]:{"font-family":"monospace"}}}},MonthRangePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${Te.root}`]:{"font-family":"monospace"}}}},PercentageInput:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${Te.root}`]:{"font-family":"monospace"}}}},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:has([type=checkbox]:not(:checked)) th":{"--TableCell-headBackground":"transparent"},"& tbody tr:has([type=checkbox]:checked):hover th":{"--TableCell-headBackground":"var(--TableRow-hoverBackground)"},"& tbody tr:has([type=checkbox]:checked):not(:hover) th":{"--TableCell-headBackground":"var(--TableCell-selectedBackground)"},"& tbody tr:has([type=checkbox]:checked):not(:hover) td":{"--TableCell-dataBackground":"var(--TableCell-selectedBackground)"},[`& .${_p.root}`]:{verticalAlign:"middle"}})}},JoyTooltip:{defaultProps:{size:"sm",placement:"top"}}}});function $t(e){let o=e.theme||Yt;return $o.createElement($o.Fragment,null,$o.createElement(Up,{theme:o},$o.createElement(Vt,null),e.children))}$t.displayName="ThemeProvider";export{fo as Accordion,uo as AccordionDetails,co as AccordionSummary,Go as Accordions,Wo as Alert,Lb as AspectRatio,Ee as Autocomplete,kb as AutocompleteListbox,wb as AutocompleteOption,Nb as Avatar,Fb as AvatarGroup,Hb as Badge,Le as Box,Zo as Breadcrumbs,Re as Button,Ry as ButtonGroup,Ye as Calendar,Je as Card,tt as CardActions,et as CardContent,ot as CardCover,rt as CardOverflow,Ue as Checkbox,Ne as Chip,Gb as CircularProgress,nt as Container,Vt as CssBaseline,Mo as CurrencyInput,mt as DataTable,Po as DatePicker,ft as DateRangePicker,Ke as DialogActions,eo as DialogContent,bt as DialogFrame,oo as DialogTitle,no as Divider,qb as Drawer,Ve as Dropdown,Ie as FormControl,Ae as FormHelperText,Se as FormLabel,Mt as Grid,Be as IconButton,Ge as Input,xt as InsetDrawer,jb as LinearProgress,cx as Link,Xb as List,ex as ListDivider,tx as ListItem,nx as ListItemButton,ix as ListItemContent,sx as ListItemDecorator,dx as ListSubheader,Pt as Markdown,Oe as Menu,He as MenuButton,ze as MenuItem,ht as Modal,Eo as ModalClose,to as ModalDialog,yt as ModalFrame,Ct as ModalOverflow,Lr as MonthPicker,It as MonthRangePicker,ko as Option,St as PercentageInput,ao as Radio,io as RadioGroup,At as RadioList,Xe as Select,We as Sheet,xx as Skeleton,fx as Slider,we as Stack,Vo as Step,Cx as StepButton,Ro as StepIndicator,Ft as Stepper,Et as Switch,Ot as Tab,Ht as TabList,zt as TabPanel,qe as Table,it as TableBody,at as TableHead,Lt as Tabs,je as Textarea,$t as ThemeProvider,Qe as Tooltip,ee as Typography,Nr as Uploader,Db as accordionClasses,Mb as accordionDetailsClasses,Tb as accordionSummaryClasses,Pb as accordionsClasses,Yy as alertClasses,Ob as aspectRatioClasses,Ib as autocompleteClasses,Sb as autocompleteListboxClasses,Ab as autocompleteOptionClasses,Bb as avatarClasses,Eb as avatarGroupClasses,zb as badgeClasses,$y as boxClasses,Vb as breadcrumbsClasses,Jy as buttonClasses,Yb as cardActionsClasses,Rb as cardClasses,$b as cardContentClasses,Jb as cardCoverClasses,Ub as cardOverflowClasses,Uy as checkboxClasses,_b as chipClasses,Wb as circularProgressClasses,Cb as dialogActionsClasses,hb as dialogContentClasses,gb as dialogTitleClasses,_y as dividerClasses,Kb as drawerClasses,Rt as extendTheme,ab as formControlClasses,lb as formHelperTextClasses,ib as formLabelClasses,sb as gridClasses,Gy as iconButtonClasses,Wy as inputClasses,Zb as linearProgressClasses,ux as linkClasses,Qb as listClasses,ox as listDividerClasses,ax as listItemButtonClasses,rx as listItemClasses,lx as listItemContentClasses,px as listItemDecoratorClasses,mx as listSubheaderClasses,Ky as menuButtonClasses,qy as menuClasses,jy as menuItemClasses,mb as modalClasses,cb as modalCloseClasses,ub as modalDialogClasses,fb as modalOverflowClasses,Zy as optionClasses,Xy as radioClasses,Qy as radioGroupClasses,eb as selectClasses,db as sheetClasses,vx as skeletonClasses,gx as sliderClasses,pb as stackClasses,yx as stepButtonClasses,hx as stepClasses,bx as stepperClasses,ob as switchClasses,xb as tabListClasses,vb as tabPanelClasses,tb as tableClasses,bb as tabsClasses,rb as textareaClasses,Yt as theme,yb as tooltipClasses,nb as typographyClasses,zy as useColorScheme,Hy as useTheme,Vy as useThemeProps};
|
|
1
|
+
import{useTheme as Ky,useColorScheme as Zy,useThemeProps as Xy,ButtonGroup as Qy,alertClasses as eb,boxClasses as ob,buttonClasses as tb,checkboxClasses as rb,dividerClasses as nb,iconButtonClasses as ab,inputClasses as ib,menuClasses as lb,menuButtonClasses as sb,menuItemClasses as pb,optionClasses as db,radioClasses as mb,radioGroupClasses as cb,selectClasses as ub,switchClasses as fb,tableClasses as gb,textareaClasses as hb,typographyClasses as Cb,formControlClasses as yb,formLabelClasses as bb,formHelperTextClasses as xb,gridClasses as vb,stackClasses as Db,sheetClasses as Mb,modalClasses as Pb,modalCloseClasses as Tb,modalDialogClasses as kb,modalOverflowClasses as wb,dialogTitleClasses as Ib,dialogContentClasses as Ab,dialogActionsClasses as Sb,tooltipClasses as Nb,tabsClasses as Bb,tabListClasses as Fb,tabPanelClasses as Eb,accordionClasses as Lb,accordionDetailsClasses as Ob,accordionGroupClasses as zb,accordionSummaryClasses as Hb,AutocompleteListbox as Rb,AutocompleteOption as Vb,autocompleteClasses as Yb,autocompleteListboxClasses as $b,autocompleteOptionClasses as Jb,avatarClasses as Ub,avatarGroupClasses as _b,AspectRatio as Gb,aspectRatioClasses as Wb,Badge as qb,badgeClasses as jb,breadcrumbsClasses as Kb,cardClasses as Zb,cardActionsClasses as Xb,cardContentClasses as Qb,cardCoverClasses as ex,cardOverflowClasses as ox,chipClasses as tx,CircularProgress as rx,circularProgressClasses as nx,Drawer as ax,drawerClasses as ix,LinearProgress as lx,linearProgressClasses as sx,List as px,listClasses as dx,ListDivider as mx,listDividerClasses as cx,ListItem as ux,listItemClasses as fx,ListItemButton as gx,listItemButtonClasses as hx,ListItemContent as Cx,listItemContentClasses as yx,ListItemDecorator as bx,listItemDecoratorClasses as xx,ListSubheader as vx,listSubheaderClasses as Dx,Link as Mx,linkClasses as Px,Slider as Tx,sliderClasses as kx,stepClasses as wx,StepButton as Ix,stepButtonClasses as Ax,stepperClasses as Sx,Skeleton as Nx,skeletonClasses as Bx}from"@mui/joy";import ke from"react";import{AccordionGroup as Xr,Accordion as Qr,AccordionSummary as en,AccordionDetails as on}from"@mui/joy";import{motion as co}from"framer-motion";var tn=co(en),uo=tn;uo.displayName="AccordionSummary";var rn=co(on),fo=rn;fo.displayName="AccordionDetails";var nn=co(Qr);function go(e){let{summary:o,details:t,variant:n,color:i,...a}=e,r=n==="solid"?"solid":void 0;return ke.createElement(nn,{variant:r,color:i,...a},ke.createElement(uo,{variant:r,color:i},o),ke.createElement(fo,{variant:r,color:i},t))}go.displayName="Accordion";var an=co(Xr);function Wo(e){let{variant:o,color:t,items:n,...i}=e;return ke.createElement(an,{variant:o,color:t,...i},n.map((a,r)=>ke.createElement(go,{key:r,summary:a.summary,details:a.details,index:r,variant:o,color:t})))}Wo.displayName="Accordions";import ho from"react";import{Alert as fn,styled as gn}from"@mui/joy";import{motion as hn}from"framer-motion";import ln from"react";import{Typography as sn}from"@mui/joy";import{motion as pn}from"framer-motion";var dn=pn(sn),Q=e=>ln.createElement(dn,{...e});Q.displayName="Typography";var _=Q;import{Stack as mn}from"@mui/joy";import{motion as cn}from"framer-motion";var un=cn(mn),we=un;we.displayName="Stack";var L=we;var Cn=gn(hn(fn))({alignItems:"flex-start",fontWeight:"unset"});function qo(e){let{title:o,content:t,actions:n,color:i="primary",...a}=e,r=e.invertedColors||e.variant==="solid";return ho.createElement(Cn,{...a,color:i,endDecorator:n,invertedColors:r},ho.createElement(L,null,o&&ho.createElement(_,{level:"title-sm",color:i},o),ho.createElement(_,{level:"body-sm",color:i},t)))}qo.displayName="Alert";import z,{useCallback as jo,useEffect as Vn,useMemo as Fe,useRef as Yn}from"react";import{Autocomplete as $n,AutocompleteOption as Jn,ListSubheader as Un,AutocompleteListbox as _n,ListItemDecorator as Gt,CircularProgress as Gn,styled as Wt}from"@mui/joy";import Wn from"@mui/icons-material/Close";import{useVirtualizer as qn}from"@tanstack/react-virtual";import{Popper as jn}from"@mui/base";import{FormControl as yn,styled as bn}from"@mui/joy";import{motion as xn}from"framer-motion";var vn=bn(xn(yn))({width:"100%"}),Ie=vn;Ie.displayName="FormControl";var se=Ie;import{FormLabel as Dn}from"@mui/joy";import{motion as Mn}from"framer-motion";var Pn=Mn(Dn),Ae=Pn;Ae.displayName="FormLabel";var pe=Ae;import{FormHelperText as Tn}from"@mui/joy";import{motion as kn}from"framer-motion";var wn=kn(Tn),Se=wn;Se.displayName="FormHelperText";var de=Se;import{Chip as In}from"@mui/joy";import{motion as An}from"framer-motion";var Sn=An(In),Ne=Sn;Ne.displayName="Chip";var _t=Ne;import Nn,{forwardRef as Bn}from"react";import{IconButton as Fn}from"@mui/joy";import{motion as En}from"framer-motion";var Ln=En(Fn),Be=Bn(({...e},o)=>Nn.createElement(Ln,{ref:o,...e}));Be.displayName="IconButton";var Y=Be;import{useState as On,useCallback as zn,useEffect as Hn,useRef as Rn}from"react";function J(e,o,t,n){let{current:i}=Rn(e!==void 0),[a,r]=On(e??o);Hn(()=>{i&&r(e??o)},[e,o,i]);let d=zn(l=>{let s=typeof l=="function"?l(a):l;(n?.disableStrict||!i)&&r(s),t?.(s)},[i,t,a,n]);return[a,d]}var Kn=Wt(jn,{name:"Autocomplete",slot:"Popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Zn=z.forwardRef((e,o)=>{let{anchorEl:t,open:n,modifiers:i,children:a,ownerState:{loading:r,size:d="md"},...l}=e,s=Yn(null),p=a[0].every(x=>x.hasOwnProperty("group")),c=r?[a[1]]:a[0].length===0?[a[2]]:p?a[0].flatMap(x=>[z.createElement(Un,{key:x.key,component:"li"},x.group),...x.children]):a[0],y=qn({count:c.length,estimateSize:()=>36,getScrollElement:()=>s.current,measureElement:x=>x.clientHeight,overscan:5}),C=y.getVirtualItems();return Vn(()=>{n&&y.measure()},[n,y]),z.createElement(Kn,{ref:o,anchorEl:t,open:n,modifiers:i},z.createElement(_n,{...l},z.createElement("div",{ref:s,style:{overflow:"auto"}},z.createElement("div",{style:{height:`${y.getTotalSize()}px`,position:"relative"}},C.map(({index:x,size:m,start:g,key:D})=>z.cloneElement(c[x],{key:D,style:{position:"absolute",top:0,left:0,width:"100%",fontSize:`var(--ceed-fontSize-${d})`,height:`${m}px`,transform:`translateY(${g}px)`,overflow:"visible"},children:z.createElement("div",{style:{textOverflow:"ellipsis",textWrap:"nowrap",overflow:"hidden",width:"100%"}},c[x].props.children)}))))))}),Co={sm:"20px",md:"24px",lg:"28px"},Xn=Wt(Y,{name:"Autocomplete",slot:"tagDelete"})(({theme:e,size:o="md"})=>({width:Co[o],height:Co[o],minWidth:Co[o],minHeight:Co[o],borderRadius:"50%"}));function Ee(e){let{label:o,error:t,helperText:n,color:i,size:a,disabled:r,required:d,onChange:l,onChangeComplete:s,sx:p,className:c,...y}=e,[C,x]=J(e.value,e.defaultValue||"",jo(h=>l?.({target:{value:h,name:e.name}}),[l,e.name])),m=Fe(()=>e.options.map(h=>typeof h!="object"?{value:h,label:h}:h),[e.options]),g=Fe(()=>{let h=new Map;return m.forEach(k=>{h.set(k.value,k)}),h},[m]),D=Fe(()=>e.loading?{value:"",label:"",startDecorator:z.createElement(Gn,{size:"sm",color:"neutral",variant:"plain",thickness:3})}:Array.isArray(C)?C.filter(h=>g.has(h)).map(h=>g.get(h||"")):g.get(C),[C,g,e.loading]),f=jo(h=>z.isValidElement(h)&&!e.loading?z.cloneElement(h,{size:a}):h,[a,e.loading]),v=Fe(()=>f(D?.startDecorator||e.startDecorator),[D,f,e.startDecorator]),I=Fe(()=>f(D?.endDecorator||e.endDecorator),[D,f,e.endDecorator]),u=jo((h,k)=>{let T=k,w=Array.isArray(T)?T.map(F=>F.value):T?.value;x(w),(Array.isArray(T)&&T.map(F=>g.get(F.value))||g.get(T?.value))&&s?.({...h,target:{...h.target,value:w}})},[s,x,g]),P=z.createElement($n,{...y,required:d,onChange:u,color:t?"danger":i,value:D||null,options:m,size:a,disabled:r,startDecorator:v,endDecorator:I,getOptionLabel:h=>`${h.label??""}`,renderTags:(h,k)=>h.map((T,w)=>{let{onClick:F,...N}=k({index:w});return f(z.createElement(_t,{color:"primary",...N},z.createElement(L,{direction:"row",alignItems:"center",gap:2,py:.5},T.value,f(z.createElement(Xn,{color:"primary",variant:"soft",onClick:F},z.createElement(Wn,null))))))}),slots:{listbox:Zn},renderOption:(h,k)=>z.createElement(Jn,{...h},k.startDecorator&&z.createElement(Gt,{sx:T=>({marginInlineEnd:`var(--Input-gap, ${T.spacing(1)})`})},f(k.startDecorator)),f(k.label),k.endDecorator&&z.createElement(Gt,{sx:T=>({marginInlineStart:`var(--Input-gap, ${T.spacing(1)})`})},f(k.endDecorator))),renderGroup:h=>h});return z.createElement(se,{required:d,color:i,size:a,error:t,disabled:r,sx:p,className:c},o&&z.createElement(pe,null,o),P,n&&z.createElement(de,null,n))}Ee.displayName="Autocomplete";var qt=Ee;import Qn from"react";import{Avatar as ea,AvatarGroup as jt,styled as oa,useThemeProps as ta}from"@mui/joy";var ra=oa(ea,{name:"Avatar",slot:"Root",overridesResolver:(e,o)=>o.root})({});function Ko(e){let o=ta({props:e,name:"Avatar"});return Qn.createElement(ra,{...o})}Ko.displayName="Avatar";import{Box as na}from"@mui/joy";import{motion as aa}from"framer-motion";var ia=aa(na),Le=ia;Le.displayName="Box";var yo=Le;import ee from"react";import{Breadcrumbs as Xt,Link as ha}from"@mui/joy";import Zo from"react";import{Menu as la,MenuButton as sa,MenuItem as pa}from"@mui/joy";import{motion as Xo}from"framer-motion";var da=Xo(la),Oe=e=>Zo.createElement(da,{...e});Oe.displayName="Menu";var ma=Xo(sa),ze=e=>Zo.createElement(ma,{...e});ze.displayName="MenuButton";var ca=Xo(pa),He=e=>Zo.createElement(ca,{...e});He.displayName="MenuItem";var Kt=Oe;import{Dropdown as ua}from"@mui/joy";import{motion as fa}from"framer-motion";var ga=fa(ua),Re=ga;Re.displayName="Dropdown";var Zt=Re;function Qo(e){let{crumbs:o,size:t,startCrumbCount:n=1,endCrumbCount:i=3,slots:{link:a,...r}={link:ha},slotProps:{link:d,...l}={link:{color:"neutral"}},collapsed:s=!0,...p}=e,c=g=>g.type==="link"&&a?ee.createElement(a,{to:g.linkHref,href:g.linkHref,...d},g.label):ee.createElement(_,null,g.label);if(!s)return ee.createElement(Xt,{size:t,slots:r,slotProps:l,...p},o.map(g=>ee.createElement(c,{...g})));let y=Math.max(1,i),C=o.slice(0,n).map(g=>ee.createElement(c,{...g})),x=(n+y>o.length?o.slice(n):o.slice(-y)).map(g=>ee.createElement(c,{...g})),m=o.slice(n,-y).map(g=>ee.createElement(He,null,ee.createElement(c,{...g})));return ee.createElement(Xt,{size:t,slots:r,slotProps:l,...p},C,m.length&&ee.createElement(Zt,null,ee.createElement(ze,{size:t,variant:"plain"},"..."),ee.createElement(Kt,{size:t},m)),x)}Qo.displayName="Breadcrumbs";import Ca,{forwardRef as ya}from"react";import{Button as ba}from"@mui/joy";import{motion as xa}from"framer-motion";var va=xa(ba),Ve=ya(({...e},o)=>Ca.createElement(va,{ref:o,...e}));Ve.displayName="Button";var H=Ve;import S,{Fragment as Pe,forwardRef as ka,useMemo as ir}from"react";import{styled as re}from"@mui/joy";import wa from"@mui/icons-material/ChevronLeft";import Ia from"@mui/icons-material/ChevronRight";import{AnimatePresence as lr,motion as Aa}from"framer-motion";var Qt=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 d=1;d<=a;d++){let l=[];for(let s=1;s<=7;s++)d===i&&s<t.getDay()+1||r>n.getDate()?l.push(void 0):(l.push(r),r++);o.push(l)}return o},er=(e,o)=>e.toLocaleString(o,{year:"numeric"}),et=(e,o)=>e.toLocaleString(o,{year:"numeric",month:"long"}),or=(e,o)=>new Date(0,e).toLocaleString(o,{month:"short"}),tr=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})},rr=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()},ot=(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()},ce=(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},bo=(e,o)=>e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth();import{useCallback as Da,useMemo as Ma,useState as xo}from"react";import{useThemeProps as Pa}from"@mui/joy";var Ta=(e,o)=>o.includes(e)?e:o[0],nr=e=>{let[o,t]=xo(()=>Ta(e.view||"day",e.views||["day","month"])),[n,i]=xo(e.defaultValue),[a,r]=xo(()=>{let m=new Date;return m.setDate(1),m.setHours(0,0,0,0),e.value?.[0]||e.defaultValue?.[0]||m}),[[d,l],s]=xo([0,0]),p=e.view??o,c=m=>{s([d+m,m])},y=Da(m=>{r(m),p==="month"?a.getFullYear()!==m.getFullYear()&&c(m>a?1:-1):c(m>a?1:-1),e.onMonthChange?.(m)},[e.onMonthChange,a,p]),C=Pa({props:{locale:"default",views:["day","month"],view:p,value:e.value??n,...e,onChange:e.value?e.onChange:m=>{i(m),e.onChange?.(m)},onMonthChange:y,onViewChange:()=>{let m=p==="month"?"day":"month";!(!e.views||e.views.includes(m))||e.view===m||(e.onViewChange?e.onViewChange(m):t(m))}},name:"Calendar"}),x=Ma(()=>({...C,viewMonth:a,direction:l}),[C,a,l]);return[C,x]};import{useCallback as Me,useState as ar}from"react";var vo=e=>{let[o,t]=ar(null),[n,i]=ar(null);return{calendarTitle:e.view==="month"?er(e.viewMonth,e.locale||"default"):et(e.viewMonth,e.locale||"default"),onPrev:Me(()=>{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:Me(()=>{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:Me(a=>{let r=new Date(e.viewMonth||new Date);r.setHours(0,0,0,0),r.setDate(a);let d=e.rangeSelection&&e.value&&e.value[0]&&(o&&ce(e.value[0],o,r)||e.value[1]&&ce(e.value[0],e.value[1],r));return{"aria-label":r.toLocaleDateString(),"aria-current":d?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,o]),getMonthCellProps:Me(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(s=>s==="day")&&e.rangeSelection&&e.value&&e.value[0]&&(n&&ce(e.value[0],n,r)||e.value[1]&&ce(e.value[0],e.value[1],r));return{"aria-label":r.toLocaleDateString(),"aria-current":l?"date":void 0}},[e.rangeSelection,e.value,e.viewMonth,n]),getPickerDayProps:Me(a=>{let r=new Date(e.viewMonth||new Date);r.setHours(0,0,0,0),r.setDate(a);let d=!!e.value&&(ot(r,e.value[0])||e.value[1]&&ot(r,e.value[1])),l=e.rangeSelection&&e.value&&e.value[0]&&(o&&ce(e.value[0],o,r)||e.value[1]&&ce(e.value[0],e.value[1],r)),s=()=>{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:rr(r),isSelected:d,onClick:s,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 p=new Date;return p.setHours(0,0,0,0),p})(),tabIndex:-1,"aria-label":r.toLocaleDateString(),"aria-selected":d?"true":void 0,"aria-current":l?"date":void 0}},[e.onChange,e.value,e.viewMonth,e.rangeSelection,e.minDate,e.maxDate,e.disableFuture,e.disablePast,o]),getPickerMonthProps:Me(a=>{let r=new Date(e.viewMonth||new Date);r.setDate(1),r.setHours(0,0,0,0),r.setMonth(a);let d=!e.views?.find(y=>y==="day"),l=d&&e.rangeSelection,s=!!e.value&&(bo(r,e.value[0])||e.value[1]&&bo(r,e.value[1])),p=l&&e.value&&e.value[0]&&(n&&ce(e.value[0],n,r)||e.value[1]&&ce(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]):d?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 y=new Date(r);return y.setMonth(y.getMonth()+1),y.setDate(0),y<e.minDate})()||e.maxDate&&(()=>{let y=new Date(r);return y.setDate(0),y>e.maxDate})()||e.disableFuture&&r>new Date||e.disablePast&&r<new Date&&!bo(r,new Date),onClick:c,tabIndex:-1,"aria-label":et(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 Sa=re("div",{name:"Calendar",slot:"root"})({maxWidth:"264px"}),Na=re("div",{name:"Calendar",slot:"calendarHeader"})(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",padding:e.spacing(2)})),sr=re("div",{name:"Calendar",slot:"viewContainer",shouldForwardProp:e=>e!=="calendarType"})(({theme:e,calendarType:o})=>({paddingLeft:e.spacing(2),paddingRight:e.spacing(2),position:"relative",overflow:"hidden",minHeight:o==="datePicker"?"250px":"unset"})),pr=re(Aa.table,{name:"Calendar",slot:"viewTable"})(({theme:e})=>({borderSpacing:0,"& td, & th":{padding:0},"& th":{paddingTop:e.spacing(2),paddingBottom:e.spacing(2)}})),Ba=re("thead",{name:"Calendar",slot:"weekHeaderContainer"})({}),Fa=re("tbody",{name:"Calendar",slot:"dayPickerContainer"})({}),Ea=re(H,{name:"Calendar",slot:"switchViewButton"})(({ownerState:e})=>[e.view==="month"&&{pointerEvents:"none"}]),La=re("td",{name:"Calendar",slot:"dayCell"})(({theme:e})=>({"&[aria-current=date]":{position:"relative","& button[aria-current=date]:not([aria-selected=true]):not(:hover):not(:active)":{backgroundColor:`rgb(${e.palette.primary.lightChannel})`},'& + td[aria-hidden] + td[aria-current="date"]::before':{content:'""',position:"absolute",top:0,left:"-10px",bottom:0,width:"16px",backgroundColor:`rgb(${e.palette.primary.lightChannel})`,zIndex:-1}}})),Oa=re("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}}})),za=re(H,{name:"Calendar",slot:"month",shouldForwardProp:e=>e!=="isSelected"})(({theme:e,isSelected:o,disabled:t})=>[{width:"59px",textAlign:"center","&:hover":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softHoverBg},"&:active":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softActiveBg}},o&&{backgroundColor:e.palette.primary.solidBg,color:e.palette.primary.solidColor,"&:hover":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidHoverBg},"&:active":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidActiveBg}},t&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),Ha=re(H,{name:"Calendar",slot:"day",shouldForwardProp:e=>!["isToday","isSelected"].includes(e)})(({theme:e,isToday:o,isSelected:t,disabled:n})=>[{width:"32px",height:"32px",textAlign:"center","&:hover":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softHoverBg},"&:active":{color:e.palette.primary.softColor,backgroundColor:e.palette.primary.softActiveBg}},o&&!t&&{"&:not([aria-current=date]):not(:hover)":{border:`1px solid ${e.palette.neutral.outlinedBorder}`}},t&&{backgroundColor:e.palette.primary.solidBg,color:e.palette.primary.solidColor,"&:hover":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidHoverBg},"&:active":{color:e.palette.primary.solidColor,backgroundColor:e.palette.primary.solidActiveBg}},n&&{color:e.palette.neutral.solidDisabledColor,backgroundColor:e.palette.neutral.solidDisabledBg}]),dr={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})},Do=1e4,mr=(e,o)=>Math.abs(e)*o,Ra=e=>{let{ownerState:o}=e,{getPickerDayProps:t,getDayCellProps:n}=vo(o),i=ir(()=>Qt(o.viewMonth),[o.viewMonth]),a=ir(()=>tr(o.locale||"default"),[o.locale]);return S.createElement(sr,{calendarType:"datePicker"},S.createElement(lr,{initial:!1,custom:o.direction},S.createElement(pr,{key:`${o.viewMonth.toString()}_${o.direction}`,custom:o.direction,variants:dr,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:d,velocity:l})=>{let s=mr(d.x,l.x);if(s<-Do){let p=new Date(o.viewMonth||new Date);p.setMonth(p.getMonth()+1),o.onMonthChange?.(p)}else if(s>Do){let p=new Date(o.viewMonth||new Date);p.setMonth(p.getMonth()-1),o.onMonthChange?.(p)}}},S.createElement(Ba,null,S.createElement("tr",null,a.map((r,d)=>S.createElement(Pe,{key:`${o.viewMonth}_${r}_${d}`},S.createElement("th",null,S.createElement(_,{level:"body-xs",textAlign:"center"},r)),d<6&&S.createElement("th",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"}))))),S.createElement(Fa,null,i.map((r,d)=>S.createElement(Pe,{key:`${o.viewMonth}_${d}`},S.createElement("tr",null,r.map((l,s)=>l?S.createElement(Pe,{key:s},S.createElement(La,{...n(l)},S.createElement(Ha,{size:"sm",variant:"plain",color:"neutral",...t(l)},l)),s<6&&S.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})):S.createElement(Pe,{key:s},S.createElement("td",null),s<6&&S.createElement("td",{"aria-hidden":"true","aria-description":"cell-gap"})))),d<i.length-1&&S.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},S.createElement("td",{colSpan:13,style:{height:4}}))))))))},Va=e=>{let{ownerState:o}=e,{getPickerMonthProps:t,getMonthCellProps:n}=vo(o),i=Array.from({length:12},(r,d)=>d).reduce((r,d)=>(r[r.length-1].length===4&&r.push([]),r[r.length-1].push(d),r),[[]]),a=!o.views?.find(r=>r==="day");return S.createElement(sr,{calendarType:a?"monthPicker":"datePicker"},S.createElement(lr,{initial:!1,custom:o.direction},S.createElement(pr,{key:`${o.viewMonth.getFullYear()}_${o.direction}`,custom:o.direction,variants:dr,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:d,velocity:l})=>{let s=mr(d.x,l.x);if(s<-Do){let p=new Date(o.viewMonth||new Date);p.setMonth(p.getMonth()+1),o.onMonthChange?.(p)}else if(s>Do){let p=new Date(o.viewMonth||new Date);p.setMonth(p.getMonth()-1),o.onMonthChange?.(p)}}},S.createElement("tbody",null,i.map((r,d)=>S.createElement(Pe,{key:d},S.createElement("tr",null,r.map((l,s)=>S.createElement(Pe,{key:l},S.createElement(Oa,{...n(l)},S.createElement(za,{size:"sm",variant:"plain",color:"neutral",...t(l)},or(l,o.locale))),s<3&&S.createElement("td",{style:{width:4},"aria-hidden":"true","aria-description":"cell-gap"})))),d<i.length-1&&S.createElement("tr",{"aria-hidden":"true","aria-description":"row-gap"},S.createElement("td",{colSpan:7,style:{height:4}}))))))))},Ye=ka((e,o)=>{let[t,n]=nr(e),{value:i,defaultValue:a,onChange:r,locale:d,onViewChange:l,onMonthChange:s,view:p,views:c,rangeSelection:y,minDate:C,maxDate:x,disableFuture:m,disablePast:g,...D}=t,{calendarTitle:f,onPrev:v,onNext:I}=vo(n);return S.createElement(Sa,{ref:o,...D},S.createElement(Na,null,S.createElement(Y,{size:"sm",onClick:v,"aria-label":`Previous ${p==="day"?"Month":"Year"}`},S.createElement(wa,null)),S.createElement(Ea,{ownerState:n,variant:"plain",color:"neutral",onClick:l,"aria-label":"Switch Calendar View"},f),S.createElement(Y,{size:"sm",onClick:I,"aria-label":`Next ${p==="day"?"Month":"Year"}`},S.createElement(Ia,null))),p==="day"&&S.createElement(Ra,{ownerState:n}),p==="month"&&S.createElement(Va,{ownerState:n}))});Ye.displayName="Calendar";var ge=Ye;import{Card as Ya,CardContent as $a,CardCover as Ja,CardActions as Ua,CardOverflow as _a}from"@mui/joy";import{motion as $e}from"framer-motion";var Ga=$e(Ya),Je=Ga;Je.displayName="Card";var Wa=$e($a),tt=Wa;tt.displayName="CardContent";var qa=$e(Ja),rt=qa;rt.displayName="CardCover";var ja=$e(Ua),nt=ja;nt.displayName="CardActions";var Ka=$e(_a),at=Ka;at.displayName="CardOverflow";import Za from"react";import{Checkbox as Xa}from"@mui/joy";import{motion as Qa}from"framer-motion";var ei=Qa(Xa),Ue=e=>Za.createElement(ei,{...e});Ue.displayName="Checkbox";var _e=Ue;import{styled as oi}from"@mui/joy";import ti,{forwardRef as ri}from"react";var ni=oi("div",{name:"Container",slot:"root",shouldForwardProp:e=>e!=="maxWidth"})(({theme:e,maxWidth:o="lg"})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block",paddingLeft:e.spacing(4),paddingRight:e.spacing(4),...o==="sm"&&{[e.breakpoints.up("xs")]:{maxWidth:e.breakpoints.values.sm}},...o==="md"&&{[e.breakpoints.up("sm")]:{maxWidth:e.breakpoints.values.md}},...o==="lg"&&{[e.breakpoints.up("md")]:{maxWidth:e.breakpoints.values.lg}},...o==="xl"&&{[e.breakpoints.up("lg")]:{maxWidth:e.breakpoints.values.xl}}})),it=ri(function(o,t){return ti.createElement(ni,{ref:t,...o})});it.displayName="Container";import Mo,{useCallback as ur,useMemo as fr,useState as ci}from"react";import{IntlMessageFormat as ui}from"intl-messageformat";import{NumericFormat as fi}from"react-number-format";import he,{useCallback as ai}from"react";import{Input as ii}from"@mui/joy";import{motion as li}from"framer-motion";import si from"@mui/icons-material/Close";var pi=li(ii),Ge=he.forwardRef((e,o)=>{let{label:t,helperText:n,error:i,style:a,size:r,color:d,disabled:l,required:s,onChange:p,name:c,sx:y,className:C,enableClearable:x,...m}=e,[g,D]=J(e.value,e.defaultValue,ai(u=>{p?.({target:{value:u?.toString()||"",name:c||""}})},[p,c])),f=u=>{D(u.target.value)},v=()=>{D(e.defaultValue||"")},I=he.createElement(pi,{value:g,name:c,onChange:f,required:s,color:i?"danger":d,disabled:l,slotProps:{input:{ref:o,...m.slotProps?.input},...m.slotProps},...m,endDecorator:x?he.createElement(L,{gap:1,direction:"row"},m.endDecorator,g&&he.createElement(Y,{onMouseDown:u=>u.preventDefault(),onClick:v,"aria-label":"Clear"},he.createElement(si,null))):m.endDecorator});return he.createElement(se,{required:s,color:d,size:r,error:i,disabled:l,sx:y,className:C},t&&he.createElement(pe,null,t),I,n&&he.createElement(de,null,n))});Ge.displayName="Input";var W=Ge;import{styled as gi,useThemeProps as hi}from"@mui/joy";import di from"intl-messageformat";var mi={AED:2,ALL:2,AMD:2,ANG:2,AOA:2,ARS:2,AUD:2,AWG:2,AZN:2,BAM:2,BBD:2,BDT:2,BGN:2,BHD:3,BMD:2,BND:2,BOB:2,BRL:2,BSD:2,BWP:2,BYN:2,BZD:2,CAD:2,CHF:2,CLP:2,CNH:2,CNY:2,COP:2,CRC:2,CUP:2,CVE:0,CZK:2,DJF:0,DKK:2,DOP:2,DZD:2,EGP:2,ETB:2,EUR:2,FJD:2,FKP:2,GBP:2,GEL:2,GHS:2,GIP:2,GMD:2,GNF:0,GTQ:2,GYD:2,HKD:2,HNL:2,HTG:2,HUF:2,IDR:0,ILS:2,INR:2,IQD:3,ISK:2,JMD:2,JOD:3,JPY:0,KES:2,KGS:2,KHR:2,KMF:0,KRW:0,KWD:3,KYD:2,KZT:2,LAK:2,LBP:2,LKR:2,LYD:3,MAD:2,MDL:2,MKD:2,MMK:2,MNT:2,MOP:2,MRU:2,MUR:2,MVR:2,MWK:2,MXN:2,MYR:2,MZN:2,NAD:2,NGN:2,NIO:2,NOK:2,NPR:2,NZD:2,OMR:3,PAB:2,PEN:2,PGK:2,PHP:2,PKR:2,PLN:2,PYG:0,QAR:2,RON:2,RSD:2,RUB:2,RWF:0,SAR:2,SBD:2,SCR:2,SEK:2,SGD:2,SHP:2,SLE:2,SOS:2,SRD:2,STN:2,SVC:2,SZL:2,THB:2,TND:3,TOP:2,TRY:2,TTD:2,TWD:2,TZS:2,UAH:2,UGX:0,USD:2,UYU:2,UZS:2,VEF:2,VND:0,VUV:0,WST:2,XAF:0,XCD:2,XOF:0,XPF:0,YER:2,ZAR:2,ZMW:2},cr=(e="USD")=>{let[o,t,n,...i]=new di(`{amount, number, ::currency/${e} unit-width-narrow}`).format({amount:1e3}).toString().replace(/\d/g,"").split(""),a=mi[e];return{symbol:`${o} `,thousandSeparator:t,decimalSeparator:n,placeholder:n?`${o} 0${n}${Array.from(Array(a)).map(()=>0).join("")}`:`${o} 0`,fixedDecimalScale:!!n,decimalScale:a}};var Ci=Mo.forwardRef(function(o,t){let{onChange:n,...i}=o;return Mo.createElement(fi,{...i,onValueChange:({value:a})=>{n?.({target:{name:o.name,value:a}})},valueIsNumericString:!0,getInputRef:t,allowNegative:!1})}),yi=gi(W,{name:"CurrencyInput",slot:"root",overridesResolver:(e,o)=>o.root})({}),Po=Mo.forwardRef(function(o,t){let n=hi({props:o,name:"CurrencyInput"}),{currency:i="USD",name:a,onChange:r,label:d,error:l,helperText:s,required:p,disabled:c,useMinorUnit:y,sx:C,className:x,...m}=n,{symbol:g,thousandSeparator:D,decimalSeparator:f,placeholder:v,fixedDecimalScale:I,decimalScale:u}=cr(i),[P,h]=J(n.value,n.defaultValue,ur(O=>r?.({target:{name:a,value:O}}),[r,a])),k=fr(()=>P&&y?P/Math.pow(10,u):P,[P,y,u]),T=fr(()=>n.max&&y?n.max/Math.pow(10,u):n.max,[n.max,y,u]),[w,F]=ci(!!T&&!!k&&k>T),N=ur(O=>{if(O.target.value===""){h(void 0);return}let ae=Number(y?O.target.value?.replace(f,""):O.target.value);T&&Number(O.target.value)>T?F(!0):F(!1),h(ae)},[f,T,y,h]);return Mo.createElement(yi,{...m,ref:t,value:k,placeholder:v,onChange:N,error:l||w,disabled:c,required:p,color:l||w?"danger":n.color,label:d,helperText:w?new ui(`limit: {amount, number, ::currency/${i} unit-width-narrow}`).format({amount:T}):s,slotProps:{input:{component:Ci,decimalSeparator:f,thousandSeparator:D,prefix:g,fixedDecimalScale:I,decimalScale:u,"aria-label":m["aria-label"]}},sx:{...C},className:x})});var gr=Po;import b,{useCallback as ue,useEffect as Ao,useMemo as U,useRef as ct,useState as vr,useId as rl}from"react";import{useVirtualizer as nl}from"@tanstack/react-virtual";import{styled as So,LinearProgress as al,Link as il}from"@mui/joy";import ll from"@mui/icons-material/ChevronLeft";import sl from"@mui/icons-material/ChevronRight";import pl from"@mui/icons-material/ArrowUpwardRounded";import{Sheet as bi}from"@mui/joy";import{motion as xi}from"framer-motion";var vi=xi(bi),We=vi;We.displayName="Sheet";var oe=We;import ne from"react";import{Table as Di}from"@mui/joy";var qe=e=>{let{children:o,...t}=e;return ne.createElement(Di,{...t},o)};qe.displayName="Table";function lt(e){let{headCells:o,showCheckbox:t,onCheckboxChange:n,slots:{checkbox:i=_e}={},slotProps:{checkbox:a={}}={}}=e;return ne.createElement("thead",null,ne.createElement("tr",null,t&&ne.createElement("th",{style:{width:"40px",textAlign:"center"}},ne.createElement(i,{onChange:n,...a})),o.map(r=>ne.createElement("th",{key:r.label,style:{width:r.width,minWidth:r.minWidth,maxWidth:r.maxWidth,textAlign:r.numeric?"right":"left"}},r.label))))}lt.displayName="TableHead";function st(e){let{rows:o,cellOrder:t,rowOptions:n,showCheckbox:i,onCheckboxChange:a,slots:{checkbox:r=_e}={},slotProps:{checkbox:d={}}={}}=e;return ne.createElement("tbody",null,o.map((l,s)=>ne.createElement("tr",{key:s},i&&ne.createElement("td",{style:{textAlign:"center"}},ne.createElement(r,{onChange:p=>a?.(p,s),...d})),t.map(p=>ne.createElement("td",{key:p,style:{textAlign:n?.[p]?.numeric?"right":"left"}},l[p])))))}st.displayName="TableBody";import q,{forwardRef as Ii,useCallback as pt,useEffect as Ai,useImperativeHandle as Si,useRef as Ni,useState as Bi}from"react";import{IMaskInput as Fi,IMask as dt}from"react-imask";import Ei from"@mui/icons-material/CalendarToday";import{styled as mt,useThemeProps as Li}from"@mui/joy";import{FocusTrap as Oi,ClickAwayListener as zi,Popper as Hi}from"@mui/base";import{DialogActions as Mi,styled as Pi}from"@mui/joy";import{motion as Ti}from"framer-motion";var ki=Ti(Mi),wi=Pi(ki)(({theme:e})=>({padding:e.spacing(2),gap:e.spacing(2),flexDirection:"row",justifyContent:"flex-end"})),je=wi;je.displayName="DialogActions";var me=je;var Ri=mt(Hi,{name:"DatePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),Vi=mt(oe,{name:"DatePicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),Yi=mt("div",{name:"DatePicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),hr=(e,o)=>{let t=`${e.getDate()}`,n=`${e.getMonth()+1}`,i=e.getFullYear();return Number(t)<10&&(t="0"+t),Number(n)<10&&(n="0"+n),o.replace(/YYYY/g,i.toString()).replace(/MM/g,n).replace(/DD/g,t)};function $i(e,o){let t=o.split(/[-./\s]/),n=e.split(/[-./\s]/);if(t.length!==n.length)throw new Error("Invalid date string or format");let i,a,r;for(let l=0;l<t.length;l++){let s=parseInt(n[l],10);switch(t[l]){case"DD":i=s;break;case"MM":a=s-1;break;case"YYYY":r=s;break}}return new Date(r,a,i)}var Ji=e=>e.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/DD/g,"D").replace(/[^YMD\s]/g,o=>`${o}\``),Ui=q.forwardRef(function(o,t){let{onChange:n,format:i,...a}=o;return q.createElement(Fi,{...a,inputRef:t,onAccept:r=>n({target:{name:o.name,value:r}}),mask:Date,pattern:Ji(i),blocks:{D:{mask:dt.MaskedRange,from:1,to:31,maxLength:2},M:{mask:dt.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:dt.MaskedRange,from:1900,to:9999,maxLength:4}},format:r=>hr(r,i),parse:r=>$i(r,i),autofix:"pad",overwrite:!0})}),To=Ii((e,o)=>{let t=Li({props:e,name:"DatePicker"}),{onChange:n,disabled:i,label:a,error:r,helperText:d,minDate:l,maxDate:s,disableFuture:p,disablePast:c,required:y,sx:C,className:x,format:m="YYYY/MM/DD",size:g,...D}=t,f=Ni(null),[v,I]=J(t.value,t.defaultValue||"",pt(w=>n?.({target:{name:t.name,value:w}}),[t.name,n]),{disableStrict:!0}),[u,P]=Bi(null),h=!!u;Ai(()=>{u||f.current?.blur()},[u,f]),Si(o,()=>f.current,[f]);let k=pt(w=>{I(w.target.value)},[I]),T=pt(w=>{P(u?null:w.currentTarget),setTimeout(()=>{f.current?.focus()},0)},[u,P,f]);return q.createElement(Yi,null,q.createElement(Oi,{open:!0},q.createElement(q.Fragment,null,q.createElement(W,{...D,color:r?"danger":D.color,ref:f,size:g,value:v,onChange:k,placeholder:m,disabled:i,required:y,error:r,slotProps:{input:{component:Ui,ref:f,format:m}},className:x,sx:C,endDecorator:q.createElement(Y,{variant:"plain",onClick:T,"aria-label":"Toggle Calendar","aria-controls":"date-picker-popper","aria-haspopup":"dialog","aria-expanded":h},q.createElement(Ei,null)),label:a,helperText:d}),h&&q.createElement(zi,{onClickAway:()=>P(null)},q.createElement(Ri,{id:"date-picker-popper",open:!0,anchorEl:u,placement:"bottom-end",onMouseDown:w=>w.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":h},q.createElement(Vi,{tabIndex:-1,role:"presentation"},q.createElement(ge,{value:Number.isNaN(new Date(v).getTime())?void 0:[new Date(v),void 0],onChange:([w])=>{k({target:{name:t.name,value:hr(w,m)}}),P(null)},minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:p,disablePast:c}),q.createElement(me,{sx:{p:1}},q.createElement(H,{size:g,variant:"plain",color:"neutral",onClick:()=>{k({target:{name:t.name,value:""}}),P(null)}},"Clear"))))))))});var Cr=To;import ko from"react";import{Textarea as _i}from"@mui/joy";import{motion as Gi}from"framer-motion";var Wi=Gi(_i),Ke=e=>{let{label:o,error:t,helperText:n,color:i,size:a,disabled:r,required:d,minRows:l=2,maxRows:s=4,sx:p,className:c,...y}=e,C=ko.createElement(Wi,{required:d,disabled:r,color:t?"danger":i,size:a,minRows:l,maxRows:s,...y});return ko.createElement(se,{required:d,disabled:r,color:i,size:a,error:t,sx:p,className:c},o&&ko.createElement(pe,null,o),C,n&&ko.createElement(de,null,n))};Ke.displayName="Textarea";var yr=Ke;import Ze,{useMemo as qi}from"react";import{Select as ji,Option as Ki}from"@mui/joy";import{motion as Zi}from"framer-motion";var Xi=Zi(Ki),wo=Xi;wo.displayName="Option";function Xe(e){let{label:o,helperText:t,error:n,size:i,color:a,disabled:r,required:d,onChange:l,sx:s,className:p,...c}=e,y=qi(()=>e.options.map(m=>typeof m!="object"?{value:m,label:m}:m),[e.options]),x=Ze.createElement(ji,{...c,required:d,disabled:r,size:i,color:n?"danger":a,onChange:(m,g)=>{let D=m||{target:{}},f={...D,target:{name:D.target?.name||e.name,value:g||void 0}};l?.(f)}},y.map(m=>Ze.createElement(wo,{key:m.value,value:m.value},m.label)));return Ze.createElement(se,{required:d,disabled:r,size:i,color:a,error:n,sx:s,className:p},o&&Ze.createElement(pe,null,o),x,t&&Ze.createElement(de,null,t))}Xe.displayName="Select";var br=Xe;import Qi from"react";import{Tooltip as el}from"@mui/joy";import{motion as ol}from"framer-motion";var tl=ol(el),Qe=e=>Qi.createElement(tl,{...e});Qe.displayName="Tooltip";var xr=Qe;import{motion as Dr}from"framer-motion";function Mr(e){return!e.editMode&&["number","date","currency"].includes(e.type||"")?"end":"start"}var dl=So("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"}}),Io=e=>"Intl"in window?new Intl.NumberFormat().format(e):e;function ml(e){let{paginationModel:{page:o,pageSize:t},rowCount:n,onPageChange:i}=e,a=1,r=Math.max(a,Math.ceil(n/t)),d=[o-2,o-1].filter(c=>c>1),l=[o+1,o+2].filter(c=>c<=r-1),s=r>1&&o<r-3,p=r>1&&o>4;return b.createElement(L,{direction:"row",spacing:1,sx:{pt:1,pb:1},justifyContent:"end",alignItems:"center"},b.createElement(L,{direction:"row",spacing:.5,alignItems:"center"},b.createElement(Y,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-1),disabled:o===a,"aria-label":"Previous page"},b.createElement(ll,null)),o!==a&&b.createElement(H,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(a)},a),p&&b.createElement(H,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o-3)},"..."),d.map(c=>b.createElement(H,{key:c,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(c)},c)),b.createElement(H,{variant:"soft",size:"sm"},o),l.map(c=>b.createElement(H,{key:c,size:"sm",variant:"plain",color:"neutral",onClick:()=>i(c)},c)),s&&b.createElement(H,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+3)},"..."),o!==r&&b.createElement(H,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(r)},r),b.createElement(Y,{size:"sm",variant:"plain",color:"neutral",onClick:()=>i(o+1),disabled:o===r,"aria-label":"Next page"},b.createElement(sl,null))))}var cl=e=>b.createElement(yo,{sx:{position:"absolute",top:0,right:0,bottom:0,width:"4px",cursor:"col-resize"},onClick:o=>o.stopPropagation(),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)}}),ul=So("tbody",{name:"DataTable",slot:"tableBody"})({"&::after":{content:"''",display:"block",height:"0.01em"}}),fl=So("tr",{name:"DataTable",slot:"tableRow",shouldForwardProp:e=>e!=="striped"})(({striped:e})=>({...e&&{background:"var(--TableRow-stripeBackground, var(--ceed-palette-background-level2))",color:"var(--ceed-palette-text-primary)"},"&:hover":{background:"var(--TableRow-hoverBackground, var(--ceed-palette-background-level3))"}})),gl=So("span",{name:"DataTable",slot:"headCellAsterisk"})(({theme:e})=>({color:"var(--ceed-palette-danger-500)",marginLeft:e.spacing(.5)})),hl=Dr(pl),Cl=e=>{let{width:o,maxWidth:t,minWidth:n,stickyHeader:i,resizable:a,field:r,tableId:d,headerName:l,required:s,editMode:p,sort:c,onSortChange:y,sortable:C=!0,sortOrder:x}=e,m=ct(null),g=U(()=>`${d}_header_${l??r}`.trim(),[d,l,r]),D=a??!0?cl(m):null,f={width:o,minWidth:n??"50px",maxWidth:t,position:i?void 0:"relative",cursor:C?"pointer":"default",userSelect:"none"},v=Mr(e),I=x[0],u=C&&b.createElement(hl,{style:{width:"16px",height:"16px"},role:"img","aria-labelledby":g,"aria-description":(c??I)==="desc"?"descending":"ascending","data-testid":void 0,variants:{hover:{opacity:1},initial:{opacity:0}},animate:{color:c?"var(--ceed-palette-text-secondary)":"var(--ceed-palette-primary-solidDisabledColor)",rotate:(c??I)==="desc"?180:0,opacity:c?1:0},transition:{duration:0,rotate:{duration:.2,ease:"easeOut"},color:{duration:.2,ease:"easeInOut"},opacity:{duration:.2,ease:"easeInOut"}}});return b.createElement(Dr.th,{id:g,"aria-label":l??r,"aria-sort":c?{asc:"ascending",desc:"descending"}[c]:"none",ref:m,key:r,style:f,onClick:P=>C&&y?.({field:r,currentSort:c,multiple:P.shiftKey}),whileHover:"hover",initial:"initial"},b.createElement(L,{gap:1,direction:"row",justifyContent:v},v==="end"&&u,b.createElement("div",null,l??r,p&&s&&b.createElement(gl,null,"*")),v==="start"&&u),D)},yl=e=>{let{tableId:o,field:t,type:n,renderCell:i,renderEditCell:a,isCellEditable:r,noWrap:d,row:l,rowId:s}=e,[p,c]=vr(l[t]),y=ct(null),C=U(()=>({row:l,value:p,id:s}),[l,s,p]),x=U(()=>!!(e.editMode&&(typeof r=="function"?r(C):r??!0)),[e.editMode,r,C]),m=U(()=>({...typeof e.componentProps=="function"?e.componentProps(C):e.componentProps||{},size:"sm"}),[e,C]),g=U(()=>({...m,onChange:u=>{m.onChange?.(u),c(u.target.value),n==="select"&&e.onCellEditStop?.({...C,originalRow:l,row:{...C.row,[t]:u.target.value},value:u.target.value})},onFocus:u=>{m.onFocus?.(u),e.onCellEditStart?.({...C,originalRow:l,row:{...C.row,value:p},value:p})},onBlur:u=>{m.onBlur?.(u),n&&["number","text","longText","currency","date"].includes(n)&&e.onCellEditStop?.({...C,originalRow:l,row:{...C.row,[t]:p},value:p})},...n==="autocomplete"&&{onChangeComplete:u=>{m.onChangeComplete?.(u),c(u.target.value),e.onCellEditStop?.({...C,originalRow:l,row:{...C.row,[t]:u.target.value},value:u.target.value})}}}),[C,l,t,p,m,n,e]),D=U(()=>a?a(C):{date:b.createElement(Cr,{value:p,...g}),currency:b.createElement(gr,{value:p,...g}),number:b.createElement(W,{value:p,type:"number",...g}),text:b.createElement(W,{value:p,type:"text",...g}),longText:b.createElement(yr,{value:p,...g}),autocomplete:b.createElement(qt,{value:p,options:g.options||[p],...g}),select:b.createElement(br,{value:p,options:g.options||[p],...g})}[n||"text"],[p,g,n]),f=U(()=>{if(i)return i(C);let u=p;return{link:b.createElement(e.component||il,{children:u,...m})}[n||"text"]||u},[p,i,C,n,m,e]),v=U(()=>x&&D?D:f,[x,D,f]),I=U(()=>d&&e.type==="longText",[d,e.type]);return Ao(()=>{c(l[t])},[l,t]),b.createElement("td",{ref:y,key:t,headers:`${o}_header_${e.headerName??t}`,style:{textAlign:Mr({type:n}),verticalAlign:x?"top":"middle"}},I?b.createElement(xr,{title:p,placement:"bottom",style:{maxWidth:"100%"},enterDelay:1500,enterNextDelay:1500},b.createElement("div",{style:{overflow:"hidden",textOverflow:"ellipsis"}},v)):v)},bl=e=>{let{tableId:o,columns:t,rowId:n,editMode:i,noWrap:a,row:r}=e;return b.createElement(b.Fragment,null,t.map((d,l)=>b.createElement(yl,{...d,tableId:o,key:`${n}_${d.field.toString()}_${l}`,row:r,rowId:n,editMode:i,noWrap:a})))};function xl({rows:e,columns:o,rowCount:t,pagination:n,paginationMode:i,paginationModel:a,onPaginationModelChange:r,sortModel:d,sortOrder:l=["asc","desc",null],selectionModel:s=[],onSortModelChange:p,onSelectionModelChange:c,editMode:y,getId:C,isTotalSelected:x}){let[m,g]=J(d,[],ue(A=>p?.(A),[p])),D=U(()=>o.reduce((A,M)=>({...A,[M.field]:M}),{}),[o]),f=ue((A,M)=>{for(let E of m){let{field:V,sort:G}=E,$=A[V],te=M[V],ye=D[V],X=0;if(ye.sortComparator?X=ye.sortComparator({rowA:A,rowB:M}):typeof $=="string"&&typeof te=="string"?X=$.localeCompare(te):typeof $=="number"&&typeof te=="number"?X=$-te:$ instanceof Date&&te instanceof Date&&(X=$.getTime()-te.getTime()),X!==0)return G==="asc"?X:-X}return 0},[m,D]),v=U(()=>m.length?[...e].sort(f):e,[e,m,f]),I=U(()=>Array.from(new Set(l)),[l]),[u,P]=vr(a?.page||1),h=a?.pageSize||20,k=ue((A,M)=>C?.(A)??A.id??`${(M||0)+(u-1)*h}`,[C,u,h]),T=U(()=>new Set(s),[s]),w=U(()=>!n||i==="server"?v:v.slice((u-1)*h,(u-1)*h+h),[v,u,h,i,n]),F=U(()=>w.length>0&&w.every((A,M)=>T.has(k(A,M))),[w,T,k]),N=t||v.length,O=U(()=>x??(N>0&&s.length===N),[x,s,N]),ae=U(()=>(o||Object.keys(v[0]||{}).map(M=>({field:M}))).map(M=>({...M,isCellEditable:y&&(typeof M.isCellEditable=="function"?M.isCellEditable:M.isCellEditable??!0),sort:m.find(E=>E.field===M.field)?.sort,sortOrder:D[M.field]?.sortOrder||I})),[v,o,y,m,D,I]),ie=ue(A=>{P(A),r?.({page:A,pageSize:h})},[r,h]),B=ue(A=>{let{field:M,currentSort:E,multiple:V}=A,$=D[M].sortOrder||I;if(E!==void 0){let ye=($.indexOf(E)+1)%$.length,X=$[ye];if(!X){let ve=V?m.filter(Uo=>Uo.field!==M):[];g(ve);return}let po=V?m.map(ve=>ve.field===M?{field:M,sort:X}:ve):[{field:M,sort:X}];g(po)}else{let te=V?[...m,{field:M,sort:$[0]}]:[{field:M,sort:$[0]}];g(te)}},[I,D,m,g]);return Ao(()=>{a||ie(1)},[N,ie,a]),Ao(()=>{let A=Math.max(1,Math.ceil(N/h));u>A&&ie(A)},[u,N,h,ie]),Ao(()=>{c?.([])},[u]),{rowCount:N,page:u,pageSize:h,onPaginationModelChange:ie,getId:k,HeadCell:Cl,BodyRow:bl,dataInPage:w,handleSortChange:B,isAllSelected:F,isTotalSelected:O,isSelectedRow:ue(A=>T.has(A),[T]),onAllCheckboxChange:ue(()=>{c?.(F?[]:w.map(k))},[F,w,c,k]),onCheckboxChange:ue((A,M)=>{if(T.has(M)){let E=s.filter(V=>V!==M);c?.(E)}else{let E=[...s,M];c?.(E)}},[s,c,T]),columns:ae,onTotalSelect:ue(()=>{c?.(O?[]:v.map(k),!O)},[O,v,c,k])}}function ut(e){let{rows:o,checkboxSelection:t,editMode:n,selectionModel:i,onSelectionModelChange:a,disableSelectionOnClick:r,onRowClick:d,rowCount:l,columns:s,onPaginationModelChange:p,pagination:c,paginationMode:y,paginationModel:C,sortModel:x,sortOrder:m,onSortModelChange:g,loading:D,slots:{checkbox:f=_e,toolbar:v,footer:I,loadingOverlay:u=()=>b.createElement(al,{value:8,variant:"plain"})}={},slotProps:{checkbox:P={},toolbar:h,background:k={}}={},stripe:T,...w}=e,F=rl(),N=ct(null),{columns:O,isAllSelected:ae,isSelectedRow:ie,onAllCheckboxChange:B,onCheckboxChange:A,getId:M,rowCount:E,page:V,pageSize:G,onPaginationModelChange:$,handleSortChange:te,dataInPage:ye,isTotalSelected:X,onTotalSelect:po,HeadCell:ve,BodyRow:Uo}=xl(e),Ut=nl({count:ye.length,getScrollElement:()=>N.current,estimateSize:()=>32,measureElement:le=>le.clientHeight,overscan:20}),qr=U(()=>({page:V,pageSize:G}),[V,G]),jr=Ut.getTotalSize(),Kr=Ut.getVirtualItems();return b.createElement(yo,{sx:{maxHeight:"100%",overflow:"auto",display:"flex",flexDirection:"column"}},(!!t||!!v)&&b.createElement(L,{direction:"row",sx:{pt:1,pb:1},justifyContent:"space-between",alignItems:"center"},!!t&&b.createElement(L,{direction:"row",spacing:1},!ae&&b.createElement(_,{level:"body-xs"},Io(i?.length||0)," items selected"),ae&&!X&&b.createElement(L,{direction:"row",spacing:1,alignItems:"center"},b.createElement(_,{level:"body-xs"},"All ",Io(i?.length||0)," items on this page are selected."),b.createElement(H,{size:"sm",variant:"plain",onClick:po},"Select all ",Io(E??o.length)," items")),X&&b.createElement(L,{direction:"row",spacing:1,alignItems:"center"},b.createElement(_,{level:"body-xs"},"All ",Io(E??o.length)," items are selected."),b.createElement(H,{size:"sm",variant:"plain",color:"danger",onClick:po},"Cancel"))),v&&b.createElement(v,{...h||{}})),b.createElement(oe,{variant:"outlined",sx:{height:"100%",overflow:"auto",width:"100%",boxShadow:"sm",borderRadius:"sm"},ref:N,...k},b.createElement(qe,{...w},b.createElement("thead",null,b.createElement("tr",null,t&&b.createElement("th",{style:{width:"40px",textAlign:"center"}},b.createElement(f,{onChange:B,checked:ae,indeterminate:(i||[]).length>0&&!ae,...P})),O.map((le,_o)=>b.createElement(ve,{tableId:F,key:`${le.field.toString()}_${_o}`,stickyHeader:e.stickyHeader,editMode:!!le.isCellEditable,onSortChange:te,...le})))),b.createElement(ul,{style:{height:`${jr}px`}},!!D&&b.createElement(dl,null,b.createElement("td",null,b.createElement(yo,{sx:{position:"absolute",top:0,left:0,right:0}},b.createElement(u,null)))),Kr.map((le,_o)=>{let mo=le.index,Go=ye[mo],be=M(Go,mo),Zr=T&&(T==="even"&&(mo+1)%2===0||T==="odd"&&(mo+1)%2===1);return b.createElement(fl,{key:be,role:t&&!r?"checkbox":void 0,tabIndex:t&&!r?-1:void 0,onClick:De=>{d?.({row:Go,rowId:be},De),t&&!r&&A(De,be)},"aria-checked":t&&!r?ie(be):void 0,striped:Zr,style:{height:`${le.size}px`,transform:`translateY(${le.start-_o*le.size}px)`}},t&&b.createElement("th",{scope:"row",style:{textAlign:"center"}},b.createElement(f,{onClick:De=>De.stopPropagation(),onChange:De=>A(De,be),checked:ie(be),...P})),b.createElement(Uo,{tableId:F,columns:O,row:Go,rowId:be,editMode:n,noWrap:e.noWrap}))})),I&&b.createElement(I,null))),c&&b.createElement(ml,{paginationModel:qr,rowCount:E,onPageChange:$}))}ut.displayName="DataTable";import j,{forwardRef as vl,useCallback as No,useEffect as Dl,useImperativeHandle as Ml,useMemo as Pl,useRef as Tl,useState as kl}from"react";import{IMaskInput as wl,IMask as ft}from"react-imask";import Il from"@mui/icons-material/CalendarToday";import{styled as gt,useThemeProps as Al}from"@mui/joy";import{FocusTrap as Sl,ClickAwayListener as Nl,Popper as Bl}from"@mui/base";var Fl=gt(Bl,{name:"DateRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),El=gt(oe,{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})),Ll=gt("div",{name:"DateRangePicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),Tr=([e,o],t)=>{let n=i=>{let a=`${i.getDate()}`,r=`${i.getMonth()+1}`,d=i.getFullYear();return Number(a)<10&&(a="0"+a),Number(r)<10&&(r="0"+r),t.replace(/YYYY/g,d.toString()).replace(/MM/g,r).replace(/DD/g,a)};return[n(e),o?n(o):""].join(" - ")};function Pr(e,o){let t=o.split(/[-./\s]/),n=e.split(/[-./\s]/),i,a,r;for(let l=0;l<t.length;l++){let s=parseInt(n[l],10);switch(t[l]){case"DD":i=s;break;case"MM":a=s-1;break;case"YYYY":r=s;break}}return new Date(r,a,i)}var kr=(e,o)=>{let t=e.split(" - ")[0]||"",n=e.split(" - ")[1]||"";return[Pr(t,o),Pr(n,o)]},Ol=e=>`${e} - ${e}`.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/DD/g,"D").replace(/[^YMD\s]/g,o=>`${o}\``),zl=j.forwardRef(function(o,t){let{onChange:n,format:i,...a}=o;return j.createElement(wl,{...a,inputRef:t,onAccept:r=>n({target:{name:o.name,value:r}}),mask:Date,pattern:Ol(i),blocks:{D:{mask:ft.MaskedRange,from:1,to:31,maxLength:2},M:{mask:ft.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:ft.MaskedRange,from:1900,to:9999}},format:r=>Tr(r,i),parse:r=>kr(r,i),autofix:"pad",overwrite:!0})}),ht=vl((e,o)=>{let t=Al({props:e,name:"DateRangePicker"}),{onChange:n,disabled:i,label:a,error:r,helperText:d,minDate:l,maxDate:s,disableFuture:p,disablePast:c,required:y,sx:C,className:x,format:m="YYYY/MM/DD",size:g,...D}=t,f=Tl(null),[v,I]=J(t.value,t.defaultValue||"",No(N=>n?.({target:{name:t.name,value:N}}),[t.name,n]),{disableStrict:!0}),[u,P]=kl(null),h=!!u,k=Pl(()=>v?kr(v,m):void 0,[v,m]);Dl(()=>{u||f.current?.blur()},[u,f]),Ml(o,()=>f.current,[f]);let T=No(N=>{I(N.target.value)},[I]),w=No(N=>{P(u?null:N.currentTarget),f.current?.focus()},[u,P,f]),F=No(([N,O])=>{!N||!O||(I(Tr([N,O],m)),P(null))},[I,P,m]);return j.createElement(Ll,null,j.createElement(Sl,{open:!0},j.createElement(j.Fragment,null,j.createElement(W,{...D,color:r?"danger":D.color,ref:o,size:g,value:v,onChange:T,disabled:i,required:y,placeholder:`${m} - ${m}`,slotProps:{input:{component:zl,ref:f,format:m}},error:r,className:x,sx:C,endDecorator:j.createElement(Y,{variant:"plain",onClick:w,"aria-label":"Toggle Calendar","aria-controls":"date-range-picker-popper","aria-haspopup":"dialog","aria-expanded":h},j.createElement(Il,null)),label:a,helperText:d}),h&&j.createElement(Nl,{onClickAway:()=>P(null)},j.createElement(Fl,{id:"date-range-picker-popper",open:!0,anchorEl:u,placement:"bottom-end",onMouseDown:N=>N.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":h},j.createElement(El,{tabIndex:-1,role:"presentation"},j.createElement(ge,{rangeSelection:!0,defaultValue:k,onChange:F,minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:p,disablePast:c}),j.createElement(me,{sx:{p:1}},j.createElement(H,{size:g,variant:"plain",color:"neutral",onClick:()=>{I(""),P(null)}},"Clear"))))))))});ht.displayName="DateRangePicker";import{DialogContent as Hl,styled as Rl}from"@mui/joy";import{motion as Vl}from"framer-motion";var Yl=Vl(Hl),$l=Rl(Yl)(({theme:e})=>({padding:e.spacing(0,6,5)})),eo=$l;eo.displayName="DialogContent";var Bo=eo;import{DialogTitle as Jl,styled as Ul}from"@mui/joy";import{motion as _l}from"framer-motion";var Gl=_l(Jl),Wl=Ul(Gl)(({theme:e})=>({padding:e.spacing(4,6)})),oo=Wl;oo.displayName="DialogTitle";var Fo=oo;import ro from"react";import Eo from"react";import{Modal as ql,ModalDialog as jl,ModalClose as Kl,ModalOverflow as Zl,styled as wr}from"@mui/joy";import{motion as Ct}from"framer-motion";var Xl=Ct(ql),yt=Xl;yt.displayName="Modal";var Ir=wr(jl)({padding:0}),to=Ir;to.displayName="ModalDialog";var Ql=wr(Ct(Kl))(({theme:e})=>({top:e.spacing(3),right:e.spacing(6)})),Lo=Ql;Lo.displayName="ModalClose";var es=Ct(Zl),bt=es;bt.displayName="ModalOverflow";function xt(e){let{title:o,children:t,...n}=e;return Eo.createElement(Ir,{...n},Eo.createElement(Lo,null),Eo.createElement(Fo,null,o),Eo.createElement(Bo,null,t))}xt.displayName="ModalFrame";import{styled as os}from"@mui/joy";var ts=os(to,{name:"Dialog",slot:"Root"})({padding:0}),vt=ro.forwardRef((e,o)=>{let{title:t,children:n,actions:i,fullscreen:a,...r}=e;return ro.createElement(ts,{layout:a?"fullscreen":"center",ref:o,...r},ro.createElement(Fo,null,t),ro.createElement(Bo,null,n),ro.createElement(me,null,i))});vt.displayName="DialogFrame";import rs from"react";import{Divider as ns}from"@mui/joy";import{motion as as}from"framer-motion";var is=as(ns),no=e=>rs.createElement(is,{...e});no.displayName="Divider";import ls from"react";import{Drawer as ss}from"@mui/joy";import{motion as ps}from"framer-motion";var ds=ps(ss),Dt=e=>{let{children:o,...t}=e;return ls.createElement(ds,{...t,slotProps:{...t.slotProps,content:{...t.slotProps?.content,sx:{bgcolor:"transparent",p:{md:3,sm:0},boxShadow:"none"}}}},o)};Dt.displayName="InsetDrawer";import R,{useCallback as Oo,useEffect as Ar,useMemo as ao,useRef as Sr,useState as zo}from"react";import{styled as Ce}from"@mui/joy";import ms from"@mui/icons-material/CloudUploadRounded";import cs from"@mui/icons-material/UploadFileRounded";import us from"@mui/icons-material/ClearRounded";import{combine as fs}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/combine.js";import{dropTargetForExternal as gs,monitorForExternal as hs}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/adapter.js";import{containsFiles as Nr,getFiles as Cs}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/external/file.js";import{preventUnhandled as Br}from"@atlaskit/pragmatic-drag-and-drop/dist/esm/entry-point/prevent-unhandled.js";import{Input as ys}from"@mui/joy";var bs=Ce(ys)({width:"1px",height:"1px",overflow:"hidden",whiteSpace:"nowrap",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",position:"absolute"}),xs=Ce(L,{name:"Uploader",slot:"PreviewRoot"})({}),vs=Ce(Je,{name:"Uploader",slot:"UploadCard"})(({theme:e})=>({padding:e.spacing(2.5),border:`1px solid ${e.palette.neutral.outlinedBorder}`})),Ds=Ce(cs,{name:"Uploader",slot:"UploadFileIcon"})(({theme:e})=>({color:e.palette.neutral[400],width:"32px",height:"32px"})),Ms=Ce(us,{name:"Uploader",slot:"ClearIcon"})(({theme:e})=>({color:e.palette.neutral.plainColor,width:"18px",height:"18px"})),Ps=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"],Ts={"image/*":[".jpeg",".jpg",".png",".gif",".bmp",".tiff",".svg",".webp",".heic",".ico"],"audio/*":[".mp3",".wav",".flac",".aac",".ogg",".m4a",".wma",".aiff",".alac",".midi",".mp4"],"video/*":[".mp4",".avi",".mkv",".mov",".wmv",".flv",".webm",".mpeg",".3gp",".m4v"]},Mt=e=>{let o=e==0?0:Math.floor(Math.log(e)/Math.log(1024)),t=e/Math.pow(1024,o),n=Ps[o];return Intl.NumberFormat("en-us",{style:"unit",unit:n,unitDisplay:"narrow"}).format(t)},ks=e=>{let{files:o,uploaded:t,onDelete:n}=e;return R.createElement(xs,{gap:1},[...t,...o].map(i=>R.createElement(vs,{key:i.name,size:"sm",color:"neutral"},R.createElement(L,{direction:"row",alignItems:"center",gap:2},R.createElement(Ds,null),R.createElement(L,{flex:"1"},R.createElement(_,{level:"body-sm",textColor:"common.black"},i.name),!!i.size&&R.createElement(_,{level:"body-xs",fontWeight:"300",lineHeight:"1.33",textColor:"text.tertiary"},Mt(i.size))),R.createElement(Y,{onClick:()=>n?.(i)},R.createElement(Ms,null))))))},ws=Ce(L,{name:"Uploader",slot:"root"})(({theme:e})=>({gap:e.spacing(2)})),Is=Ce(oe,{name:"Uploader",slot:"dropZone",shouldForwardProp:e=>e!=="error"})(({theme:e,state:o,error:t})=>({width:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:e.spacing(5),gap:e.spacing(4),cursor:"pointer",backgroundColor:e.palette.background.surface,border:t?`1px solid ${e.palette.danger.outlinedBorder}`:o==="idle"?`1px solid ${e.palette.neutral.outlinedBorder}`:`1px solid ${e.palette.primary.outlinedBorder}`})),As=Ce(ms,{name:"Uploader",slot:"iconContainer",shouldForwardProp:e=>e!=="error"})(({theme:e,state:o,error:t})=>({color:t?`rgba(${e.vars.palette.danger.mainChannel} / 0.6)`:o==="over"?`rgba(${e.palette.primary.mainChannel} / 0.6)`:e.palette.neutral.softActiveBg,width:"32px",height:"32px"})),Fr=R.memo(e=>{let{accept:o,minCount:t,maxCount:n,name:i,size:a,maxFileSize:r,maxFileTotalSize:d,onChange:l,label:s,disabled:p,onDelete:c}=e,y=Sr(null),C=Sr(null),[x,m]=zo(),[g,D]=zo([]),[f,v]=zo(e.uploaded||[]),[I,u]=zo("idle"),P=ao(()=>o.split(",").map(B=>B.trim()),[o]),h=ao(()=>P.flatMap(B=>["image/*","video/*","audio/*"].includes(B)?Ts[B]:B),[P]),k=ao(()=>{let[B,A]=[P.filter(E=>["image/*","video/*","audio/*"].includes(E)).map(E=>{let[V]=E.split("/");return V.toLowerCase()}),P.filter(E=>!["image/*","video/*","audio/*"].includes(E)).map(E=>{let[V,G]=E.split("/");return G?G.toUpperCase():V.toUpperCase().replace(".","")})],M=[];return B.length>0&&M.push(`Any ${B.join(", ")} file`),A.length>0&&M.push(A.join(", ")),M.push(`Maximum ${Mt(d)}`),n&&M.push(`Up to ${n} ${n===1?"file":"files"}`),M.join(", ")},[P,d,n]),T=ao(()=>!!x||e.error,[e.error,x]),w=ao(()=>!n||n&&[...f,...g].length!==n,[g,n,f]),F=Oo(B=>{try{let A=h.map(G=>G.replace(".",""))||[],M=new RegExp(`${A.join("|")}`);if(B.forEach(G=>{let $=G.name.split(".").pop()||"";if(!M.test($))throw new Error("Please upload acceptable file type.")}),r&&B.forEach(G=>{if(G.size>r)throw new Error(`One or more File size exceeded the maximum limit. Each file size must be ${Mt(r)} or less.`)}),[...g,...B].reduce((G,$)=>G+$.size,0)>d)throw new Error("Total File size exceeded the maximum limit.");let V=[...g,...B];if(n&&[...f,...V].length>n)throw new Error("Exceeded the maximum number of files.");l?.({target:{name:i,value:V}}),D(V),m(void 0)}catch(A){m(A.message)}},[g,f,n,h,r,d,i,l]);Ar(()=>{let B=y.current;if(!(!B||p))return fs(gs({element:B,canDrop:Nr,onDragEnter:()=>u("over"),onDragLeave:()=>u("potential"),onDrop:async({source:A})=>{let M=await Cs({source:A});F(M)}}),hs({canMonitor:Nr,onDragStart:()=>{u("potential"),Br.start()},onDrop:()=>{u("idle"),Br.stop()}}))}),Ar(()=>{C.current&&t&&(g.length<t?C.current.setCustomValidity(`At least ${t} files are required.`):C.current.setCustomValidity(""))},[C,g,t]);let N=Oo(B=>{let A=Array.from(B.target.files||[]);F(A)},[F]),O=Oo(B=>{B instanceof File?D(A=>(l?.({target:{name:i,value:A.filter(M=>M!==B)}}),A.filter(M=>M!==B))):(v(A=>A.filter(M=>M.id!==B.id)),c?.(B)),m(void 0)},[i,l,c]),ae=Oo(()=>{C.current?.click()},[]),ie=R.createElement(Is,{state:I,error:!!(T||x),ref:y,onClick:ae},R.createElement(L,{alignItems:"center",gap:1},R.createElement(As,{state:I,error:!!(T||x)})),R.createElement(bs,{disabled:p,required:!!t,onInvalid:B=>{t&&g.length<t&&m(`Please choose ${t} ${t===1?"file":"files"} to upload.`)},slotProps:{input:{multiple:!0,accept:h.join(","),type:"file",ref:C,role:"button",onChange:N}}}));return R.createElement(ws,null,w&&R.createElement(se,{size:a,error:!!(T||x),disabled:p,required:!!t},s&&R.createElement(pe,null,s),ie,R.createElement(de,null,R.createElement(L,null,x&&R.createElement("div",null,x),R.createElement("div",null,k)))),[...f,...g].length>0&&R.createElement(ks,{files:g,uploaded:f,onDelete:O}))});import{Grid as Ss}from"@mui/joy";import{motion as Ns}from"framer-motion";var Bs=Ns(Ss),Pt=Bs;Pt.displayName="Grid";import fe from"react";import Es from"react-markdown";import{Link as Ls}from"@mui/joy";import{visit as Fs}from"unist-util-visit";function Er(e){let{accentColor:o}=e;return t=>{Fs(t,"text",(n,i,a)=>{let r=n.value,d=/\|\|.*?\|\|/g,l,s=0,p=[];for(;(l=d.exec(r))!==null;){l.index>s&&p.push({type:"text",value:r.slice(s,l.index)});let c=l[0].split("||")[1];p.push({type:"element",tagName:"p",properties:{textColor:o},children:[{type:"text",value:c}]}),s=l.index+l[0].length}s<r.length&&p.push({type:"text",value:r.slice(s)}),p.length&&a.children.splice(i,1,...p)})}}var Tt=e=>{let{color:o,textColor:t,defaultLevel:n="body-md",accentColor:i="danger.500",defaultLinkAction:a="_self",markdownOptions:r,content:d,...l}=e;return fe.createElement(Q,{component:"div",color:o,textColor:t,level:n,...l},fe.createElement(Es,{...r,children:d,rehypePlugins:[[Er,{accentColor:i}]],components:{h1:({children:s})=>fe.createElement(Q,{color:o,textColor:t,level:"h1"},s),h2:({children:s})=>fe.createElement(Q,{color:o,textColor:t,level:"h2"},s),h3:({children:s})=>fe.createElement(Q,{color:o,textColor:t,level:"h3"},s),h4:({children:s})=>fe.createElement(Q,{color:o,textColor:t,level:"h4"},s),p:({children:s,node:p})=>fe.createElement(Q,{color:o,textColor:t,level:n,...p?.properties},s),a:({children:s,href:p})=>fe.createElement(Ls,{href:p,target:a},s),hr:()=>fe.createElement(no,null),...r?.components}}))};Tt.displayName="Markdown";import K,{forwardRef as Os,useCallback as kt,useEffect as zs,useImperativeHandle as Hs,useRef as Rs,useState as Vs}from"react";import{IMaskInput as Ys,IMask as Lr}from"react-imask";import $s from"@mui/icons-material/CalendarToday";import{styled as wt,useThemeProps as Js}from"@mui/joy";import{FocusTrap as Us,ClickAwayListener as _s,Popper as Gs}from"@mui/base";var Ws=wt(Gs,{name:"MonthPicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),qs=wt(oe,{name:"MonthPicker",slot:"sheet",overridesResolver:(e,o)=>o.root})(({theme:e})=>({width:"264px",boxShadow:e.shadow.md,borderRadius:e.radius.md})),js=wt("div",{name:"MonthPicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),Or=(e,o)=>{let t=`${e.getMonth()+1}`,n=e.getFullYear();return Number(t)<10&&(t="0"+t),o.replace(/YYYY/g,n.toString()).replace(/MM/g,t)},Ks=e=>e.replace(/YYYY/g,"Y").replace(/MM/g,"M").replace(/[^YM\s]/g,o=>`${o}\``);function Zs(e){let o,t,n=e.replace(/[^\d]/g,"");return e.match(/\d{1,2}.\d{4}/)?(o=n.slice(0,2),t=n.slice(2)):e.match(/\d{4}.\d{1,2}/)&&(t=n.slice(0,4),o=n.slice(4)),new Date(`${t}/${o}`)}var Xs=K.forwardRef(function(o,t){let{onChange:n,format:i,...a}=o;return K.createElement(Ys,{...a,inputRef:t,onAccept:r=>n({target:{name:o.name,value:r}}),mask:Date,pattern:Ks(i),blocks:{M:{mask:Lr.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Lr.MaskedRange,from:1900,to:9999}},format:r=>Or(r,i),parse:Zs,autofix:"pad",overwrite:!0})}),zr=Os((e,o)=>{let t=Js({props:e,name:"MonthPicker"}),{onChange:n,disabled:i,label:a,error:r,helperText:d,minDate:l,maxDate:s,disableFuture:p,disablePast:c,required:y,sx:C,className:x,format:m="YYYY/MM",size:g,...D}=t,f=Rs(null),[v,I]=J(t.value,t.defaultValue||"",kt(w=>n?.({target:{name:t.name,value:w}}),[t.name,n]),{disableStrict:!0}),[u,P]=Vs(null),h=!!u;zs(()=>{u||f.current?.blur()},[u,f]),Hs(o,()=>f.current,[f]);let k=kt(w=>{I(w.target.value)},[I]),T=kt(w=>{P(u?null:w.currentTarget),f.current?.focus()},[u,P,f]);return K.createElement(js,null,K.createElement(Us,{open:!0},K.createElement(K.Fragment,null,K.createElement(W,{...D,color:r?"danger":D.color,ref:f,size:g,value:v,onChange:k,placeholder:m,disabled:i,required:y,slotProps:{input:{component:Xs,ref:f,format:m}},error:r,className:x,sx:{...C,fontFamily:"monospace"},endDecorator:K.createElement(Y,{variant:"plain",onClick:T,"aria-label":"Toggle Calendar","aria-controls":"month-picker-popper","aria-haspopup":"dialog","aria-expanded":h},K.createElement($s,null)),label:a,helperText:d}),h&&K.createElement(_s,{onClickAway:()=>P(null)},K.createElement(Ws,{id:"month-picker-popper",open:!0,anchorEl:u,placement:"bottom-end",onMouseDown:w=>w.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":h},K.createElement(qs,{tabIndex:-1,role:"presentation"},K.createElement(ge,{view:"month",views:["month"],value:Number.isNaN(new Date(v).getTime())?void 0:[new Date(v),void 0],onChange:([w])=>{k({target:{name:t.name,value:Or(w,m)}}),P(null)},minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:p,disablePast:c}),K.createElement(me,{sx:{p:1}},K.createElement(H,{size:g,variant:"plain",color:"neutral",onClick:()=>{k({target:{name:t.name,value:""}}),P(null)}},"Clear"))))))))});import Z,{forwardRef as Qs,useCallback as Ho,useEffect as ep,useImperativeHandle as op,useMemo as tp,useRef as rp,useState as np}from"react";import{IMaskInput as ap,IMask as Hr}from"react-imask";import ip from"@mui/icons-material/CalendarToday";import{styled as It,useThemeProps as lp}from"@mui/joy";import{FocusTrap as sp,ClickAwayListener as pp,Popper as dp}from"@mui/base";var mp=It(dp,{name:"MonthRangePicker",slot:"popper"})(({theme:e})=>({zIndex:e.zIndex.tooltip})),cp=It(oe,{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})),up=It("div",{name:"MonthRangePicker",slot:"root",overridesResolver:(e,o)=>o.root})({width:"100%"}),Vr=([e,o],t)=>{let n=i=>{let a=`${i.getMonth()+1}`,r=i.getFullYear();return Number(a)<10&&(a="0"+a),t.replace(/YYYY/g,r.toString()).replace(/MM/g,a)};return[n(e),o?n(o):""].join(" - ")};function Rr(e){let o,t,n=e.replace(/[^\d]/g,"");return e.match(/\d{1,2}.\d{4}/)?(o=n.slice(0,2),t=n.slice(2)):e.match(/\d{4}.\d{1,2}/)&&(t=n.slice(0,4),o=n.slice(4)),new Date(`${t}/${o}`)}var Yr=e=>{let o=e.split(" - ")[0]||"",t=e.split(" - ")[1]||"";return[Rr(o),Rr(t)]},fp=e=>`${e} - ${e}`.replace(/YYYY/g,"Y").replace(/MM/g,"m").replace(/[^YMm\s]/g,o=>`${o}\``),gp=Z.forwardRef(function(o,t){let{onChange:n,format:i,...a}=o;return Z.createElement(ap,{...a,inputRef:t,onAccept:r=>n({target:{name:o.name,value:r}}),mask:Date,pattern:fp(i),blocks:{m:{mask:Hr.MaskedRange,from:1,to:12,maxLength:2},Y:{mask:Hr.MaskedRange,from:1900,to:9999}},format:r=>Vr(r,i),parse:Yr,autofix:"pad",overwrite:!0})}),At=Qs((e,o)=>{let t=lp({props:e,name:"MonthRangePicker"}),{onChange:n,disabled:i,label:a,error:r,helperText:d,minDate:l,maxDate:s,disableFuture:p,disablePast:c,required:y,sx:C,className:x,format:m="YYYY/MM",size:g,...D}=t,f=rp(null),[v,I]=J(t.value,t.defaultValue||"",Ho(N=>n?.({target:{name:t.name,value:N}}),[t.name,n]),{disableStrict:!0}),[u,P]=np(null),h=!!u,k=tp(()=>v?Yr(v):void 0,[v]);ep(()=>{u||f.current?.blur()},[u,f]),op(o,()=>f.current,[f]);let T=Ho(N=>{I(N.target.value)},[I]),w=Ho(N=>{P(u?null:N.currentTarget),f.current?.focus()},[u,P,f]),F=Ho(([N,O])=>{!N||!O||(I(Vr([N,O],m)),P(null))},[I,P,m]);return Z.createElement(up,null,Z.createElement(sp,{open:!0},Z.createElement(Z.Fragment,null,Z.createElement(W,{...D,color:r?"danger":D.color,ref:o,size:g,value:v,onChange:T,disabled:i,required:y,placeholder:`${m} - ${m}`,slotProps:{input:{component:gp,ref:f,format:m}},error:r,className:x,sx:{...C,fontFamily:"monospace"},endDecorator:Z.createElement(Y,{variant:"plain",onClick:w,"aria-label":"Toggle Calendar","aria-controls":"month-range-picker-popper","aria-haspopup":"dialog","aria-expanded":h},Z.createElement(ip,null)),label:a,helperText:d}),h&&Z.createElement(pp,{onClickAway:()=>P(null)},Z.createElement(mp,{id:"month-range-picker-popper",open:!0,anchorEl:u,placement:"bottom-end",onMouseDown:N=>N.preventDefault(),modifiers:[{name:"offset",options:{offset:[4,4]}}],"aria-label":"Calendar Tooltip","aria-expanded":h},Z.createElement(cp,{tabIndex:-1,role:"presentation"},Z.createElement(ge,{view:"month",views:["month"],rangeSelection:!0,defaultValue:k,onChange:F,minDate:l?new Date(l):void 0,maxDate:s?new Date(s):void 0,disableFuture:p,disablePast:c}),Z.createElement(me,{sx:{p:1}},Z.createElement(H,{size:g,variant:"plain",color:"neutral",onClick:()=>{I(""),P(null)}},"Clear"))))))))});At.displayName="MonthRangePicker";import Ro,{useCallback as $r,useMemo as hp,useState as Cp}from"react";import{NumericFormat as yp}from"react-number-format";import{styled as bp,useThemeProps as xp}from"@mui/joy";var vp=(e,o)=>{let[t,n=""]=`${e}`.split(".");return+`${t}${n.padEnd(o,"0")}`},Dp=Ro.forwardRef(function(o,t){let{onChange:n,min:i,max:a,...r}=o;return Ro.createElement(yp,{...r,onValueChange:({value:d})=>{n?.({target:{name:o.name,value:d}})},valueIsNumericString:!0,thousandSeparator:!0,suffix:"%",getInputRef:t,allowNegative:!0})}),Mp=bp(W,{name:"PercentageInput",slot:"Root",overridesResolver:(e,o)=>o.root})({}),St=Ro.forwardRef(function(o,t){let n=xp({props:o,name:"PercentageInput"}),{name:i,onChange:a,label:r,error:d,helperText:l,required:s,disabled:p,useMinorUnit:c,maxDecimalScale:y=0,min:C,max:x,sx:m,className:g,...D}=n,[f,v]=J(n.value,n.defaultValue,$r(k=>a?.({target:{name:i,value:k}}),[a,i])),[I,u]=Cp(x&&f&&f>x||C&&f&&f<C),P=hp(()=>f&&c?f/Math.pow(10,y):f,[f,c,y]),h=$r(k=>{if(k.target.value===""){v(void 0);return}let T=Number(k.target.value);C&&T<C||x&&T>x?u(!0):u(!1);let w=c?vp(T,y):T;v(w)},[v,c,y,C,x]);return Ro.createElement(Mp,{...D,ref:t,value:P,onChange:h,error:I||d,disabled:p,required:s,color:I||d?"danger":n.color,label:r,helperText:l,slotProps:{input:{component:Dp,"aria-label":D["aria-label"],decimalScale:y}},sx:{...m},className:g})});St.displayName="PercentageInput";import{Radio as Pp,RadioGroup as Tp}from"@mui/joy";import{motion as Jr}from"framer-motion";var kp=Jr(Pp),io=kp;io.displayName="Radio";var wp=Jr(Tp),lo=wp;lo.displayName="RadioGroup";import Ur from"react";function Nt(e){let{items:o,...t}=e;return Ur.createElement(lo,{...t},o.map(n=>Ur.createElement(io,{key:`${n.value}`,value:n.value,label:n.label})))}Nt.displayName="RadioList";import xe from"react";import{Stepper as Ip,Step as Ap,StepIndicator as Sp,stepClasses as Bt,stepIndicatorClasses as so,styled as Ft}from"@mui/joy";import Np from"@mui/icons-material/Check";import{motion as Bp}from"framer-motion";var Vo=Ft(Ap)({});Vo.displayName="Step";var Yo=Ft(Sp)({});Yo.displayName="StepIndicator";var Fp=Ft(Ip)(({theme:e})=>({"--StepIndicator-size":"24px","--Step-gap":e.spacing(2),"--joy-palette-success-solidBg":"var(--joy-palette-success-400)",[`& .${so.root}`]:{fontSize:"var(--ceed-fontSize-xs)"}})),Ep=Bp(Fp);function Et(e){let{steps:o,activeColor:t="primary.500",inactiveColor:n="neutral.400",activeLineColor:i="primary.500",inactiveLineColor:a="neutral.300",activeStep:r}=e;return xe.createElement(Ep,{sx:d=>({"--StepIndicator-size":"24px","--Step-gap":d.spacing(2),[`& .${so.root}`]:{fontSize:"var(--ceed-fontSize-xs)"},[`& .${Bt.completed}`]:{"&::after":{bgcolor:i},[`& .${so.root}`]:{bgcolor:t}},[`& .${Bt.active}`]:{"&::after":{bgcolor:a},[`& .${so.root}`]:{bgcolor:t}},[`& .${Bt.disabled}`]:{"&::after":{bgcolor:a},[`& .${so.root}`]:{bgcolor:n}}})},o.map((d,l)=>{let s=r===l+1,p=r>l+1,c=r<l+1,y=d.label||d.extraContent;return xe.createElement(Vo,{indicator:xe.createElement(Yo,{variant:"solid",color:"primary"},p?xe.createElement(Np,null):d.indicatorContent),active:s,completed:p,disabled:c},y&&xe.createElement(L,null,d.label&&xe.createElement(_,{level:"title-sm"},d.label),d.extraContent&&xe.createElement(_,{level:"body-xs"},d.extraContent)))}))}Et.displayName="Stepper";import _r from"react";import{Switch as Lp,styled as Op,switchClasses as zp}from"@mui/joy";import{motion as Gr}from"framer-motion";var Hp=Gr(Lp),Rp=Op(Gr.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)",[`&.${zp.checked}`]:{left:"unset",right:"var(--Switch-thumbOffset)"}}),Vp=e=>_r.createElement(Rp,{...e,layout:!0,transition:Yp}),Yp={type:"spring",stiffness:700,damping:30},Lt=e=>_r.createElement(Hp,{...e,slots:{thumb:Vp,...e.slots}});Lt.displayName="Switch";import{Tabs as $p,Tab as Jp,TabList as Up,TabPanel as _p,styled as Gp,tabClasses as Wp}from"@mui/joy";import{motion as $o}from"framer-motion";var qp=$o($p),Ot=qp;Ot.displayName="Tabs";var jp=Gp($o(Jp))(({theme:e})=>({[`&:not(.${Wp.selected})`]:{color:e.palette.neutral[700]}})),zt=jp;zt.displayName="Tab";var Kp=$o(Up),Ht=Kp;Ht.displayName="TabList";var Zp=$o(_p),Rt=Zp;Rt.displayName="TabPanel";import Jo from"react";import{CssBaseline as Vt,CssVarsProvider as Xp,checkboxClasses as Qp,extendTheme as Yt,inputClasses as Te}from"@mui/joy";var Wr={palette:{danger:{50:"#FEF3F2",100:"#FDE6E5",200:"#FBC7C4",300:"#F89E99",400:"#F46E66",500:"#DC0D00",600:"#AB0F00",700:"#791000",800:"#430A0A",900:"#240505"},neutral:{50:"#FAFBFC",100:"#F3F5F7",200:"#EBECF0",300:"#D1D5DB",400:"#A2AAB8",500:"#5E6C83",600:"#505E79",700:"#253858",800:"#071B36",900:"#0B0D0E"},primary:{50:"#F2F7FE",100:"#E8F0FD",200:"#CCDFFC",300:"#9DC1F9",400:"#4D8EF3",500:"#015DEE",600:"#0154D6",700:"#0141A7",800:"#00255F",900:"#000F26"},warning:{50:"#FEF8F2",100:"#FEF1E5",200:"#FCE1C4",300:"#FABD7F",400:"#F57C00",500:"#AF5100",600:"#843600",700:"#672600",800:"#421400",900:"#1d1002"}}},$t=Yt({cssVarPrefix:"ceed",spacing:4,zIndex:{popup:1500},colorSchemes:{light:Wr,dark:Wr},components:{CurrencyInput:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${Te.root}`]:{"font-family":"monospace"}}}},DatePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${Te.root}`]:{"font-family":"monospace"}}}},DateRangePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${Te.root}`]:{"font-family":"monospace"}}}},MonthPicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${Te.root}`]:{"font-family":"monospace"}}}},MonthRangePicker:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${Te.root}`]:{"font-family":"monospace"}}}},PercentageInput:{defaultProps:{size:"sm"},styleOverrides:{root:{[`.${Te.root}`]:{"font-family":"monospace"}}}},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:has([type=checkbox]:not(:checked)) th":{"--TableCell-headBackground":"transparent"},"& tbody tr:has([type=checkbox]:checked):hover th":{"--TableCell-headBackground":"var(--TableRow-hoverBackground)"},"& tbody tr:has([type=checkbox]:checked):not(:hover) th":{"--TableCell-headBackground":"var(--TableCell-selectedBackground)"},"& tbody tr:has([type=checkbox]:checked):not(:hover) td":{"--TableCell-dataBackground":"var(--TableCell-selectedBackground)"},[`& .${Qp.root}`]:{verticalAlign:"middle"}})}},JoyTooltip:{defaultProps:{size:"sm",placement:"top"}},JoyAvatar:{styleOverrides:{root:({ownerState:e})=>({...e.size==="xs"&&{width:"24px",height:"24px",fontSize:"12px"}})}}}});function Jt(e){let o=e.theme||$t;return Jo.createElement(Jo.Fragment,null,Jo.createElement(Xp,{theme:o},Jo.createElement(Vt,null),e.children))}Jt.displayName="ThemeProvider";export{go as Accordion,fo as AccordionDetails,uo as AccordionSummary,Wo as Accordions,qo as Alert,Gb as AspectRatio,Ee as Autocomplete,Rb as AutocompleteListbox,Vb as AutocompleteOption,Ko as Avatar,jt as AvatarGroup,qb as Badge,Le as Box,Qo as Breadcrumbs,Ve as Button,Qy as ButtonGroup,Ye as Calendar,Je as Card,nt as CardActions,tt as CardContent,rt as CardCover,at as CardOverflow,Ue as Checkbox,Ne as Chip,rx as CircularProgress,it as Container,Vt as CssBaseline,Po as CurrencyInput,ut as DataTable,To as DatePicker,ht as DateRangePicker,je as DialogActions,eo as DialogContent,vt as DialogFrame,oo as DialogTitle,no as Divider,ax as Drawer,Re as Dropdown,Ie as FormControl,Se as FormHelperText,Ae as FormLabel,Pt as Grid,Be as IconButton,Ge as Input,Dt as InsetDrawer,lx as LinearProgress,Mx as Link,px as List,mx as ListDivider,ux as ListItem,gx as ListItemButton,Cx as ListItemContent,bx as ListItemDecorator,vx as ListSubheader,Tt as Markdown,Oe as Menu,ze as MenuButton,He as MenuItem,yt as Modal,Lo as ModalClose,to as ModalDialog,xt as ModalFrame,bt as ModalOverflow,zr as MonthPicker,At as MonthRangePicker,wo as Option,St as PercentageInput,io as Radio,lo as RadioGroup,Nt as RadioList,Xe as Select,We as Sheet,Nx as Skeleton,Tx as Slider,we as Stack,Vo as Step,Ix as StepButton,Yo as StepIndicator,Et as Stepper,Lt as Switch,zt as Tab,Ht as TabList,Rt as TabPanel,qe as Table,st as TableBody,lt as TableHead,Ot as Tabs,Ke as Textarea,Jt as ThemeProvider,Qe as Tooltip,Q as Typography,Fr as Uploader,Lb as accordionClasses,Ob as accordionDetailsClasses,Hb as accordionSummaryClasses,zb as accordionsClasses,eb as alertClasses,Wb as aspectRatioClasses,Yb as autocompleteClasses,$b as autocompleteListboxClasses,Jb as autocompleteOptionClasses,Ub as avatarClasses,_b as avatarGroupClasses,jb as badgeClasses,ob as boxClasses,Kb as breadcrumbsClasses,tb as buttonClasses,Xb as cardActionsClasses,Zb as cardClasses,Qb as cardContentClasses,ex as cardCoverClasses,ox as cardOverflowClasses,rb as checkboxClasses,tx as chipClasses,nx as circularProgressClasses,Sb as dialogActionsClasses,Ab as dialogContentClasses,Ib as dialogTitleClasses,nb as dividerClasses,ix as drawerClasses,Yt as extendTheme,yb as formControlClasses,xb as formHelperTextClasses,bb as formLabelClasses,vb as gridClasses,ab as iconButtonClasses,ib as inputClasses,sx as linearProgressClasses,Px as linkClasses,dx as listClasses,cx as listDividerClasses,hx as listItemButtonClasses,fx as listItemClasses,yx as listItemContentClasses,xx as listItemDecoratorClasses,Dx as listSubheaderClasses,sb as menuButtonClasses,lb as menuClasses,pb as menuItemClasses,Pb as modalClasses,Tb as modalCloseClasses,kb as modalDialogClasses,wb as modalOverflowClasses,db as optionClasses,mb as radioClasses,cb as radioGroupClasses,ub as selectClasses,Mb as sheetClasses,Bx as skeletonClasses,kx as sliderClasses,Db as stackClasses,Ax as stepButtonClasses,wx as stepClasses,Sx as stepperClasses,fb as switchClasses,Fb as tabListClasses,Eb as tabPanelClasses,gb as tableClasses,Bb as tabsClasses,hb as textareaClasses,$t as theme,Nb as tooltipClasses,Cb as typographyClasses,Zy as useColorScheme,Ky as useTheme,Xy as useThemeProps};
|