@applica-software-guru/react-admin 1.4.225 → 1.4.226
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/ra-inputs/AutocompleteArrayInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/AutocompleteInput.d.ts.map +1 -1
- package/dist/components/ra-inputs/SelectArrayInput.d.ts.map +1 -1
- package/dist/components/ra-lists/List.d.ts.map +1 -1
- package/dist/react-admin.cjs.js +43 -43
- package/dist/react-admin.cjs.js.map +1 -1
- package/dist/react-admin.es.js +1318 -1305
- package/dist/react-admin.es.js.map +1 -1
- package/dist/react-admin.umd.js +2 -2
- package/dist/react-admin.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ra-inputs/AutocompleteArrayInput.tsx +6 -0
- package/src/components/ra-inputs/AutocompleteInput.tsx +0 -3
- package/src/components/ra-inputs/SelectArrayInput.tsx +10 -3
- package/src/components/ra-lists/List.tsx +3 -0
- package/src/themes/overrides/InputLabel.jsx +1 -1
- package/src/themes/overrides/OutlinedInput.jsx +1 -1
package/dist/react-admin.umd.js
CHANGED
|
@@ -209,7 +209,7 @@ attempted value: ${a}
|
|
|
209
209
|
animation: ${0} 1.4s linear infinite;
|
|
210
210
|
`),hF)),IF=ue("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),vF=ue("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Pe(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>z({stroke:"currentColor"},e.variant==="determinate"&&{transition:t.transitions.create("stroke-dashoffset")},e.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink&&xt.css(Gv||(Gv=ru`
|
|
211
211
|
animation: ${0} 1.4s ease-in-out infinite;
|
|
212
|
-
`),CF)),Kv=F.forwardRef(function(t,n){const r=Ut({props:t,name:"MuiCircularProgress"}),{className:o,color:s="primary",disableShrink:a=!1,size:c=40,style:u,thickness:A=3.6,value:p=0,variant:h="indeterminate"}=r,C=Re(r,pF),E=z({},r,{color:s,disableShrink:a,size:c,thickness:A,value:p,variant:h}),m=EF(E),v={},B={},w={};if(h==="determinate"){const M=2*Math.PI*((ko-A)/2);v.strokeDasharray=M.toFixed(3),w["aria-valuenow"]=Math.round(p),v.strokeDashoffset=`${((100-p)/100*M).toFixed(3)}px`,B.transform="rotate(-90deg)"}return f.jsx(mF,z({className:Ve(m.root,o),style:z({width:c,height:c},B,u),ownerState:E,ref:n,role:"progressbar"},w,C,{children:f.jsx(IF,{className:m.svg,ownerState:E,viewBox:`${ko/2} ${ko/2} ${ko} ${ko}`,children:f.jsx(vF,{className:m.circle,style:v,ownerState:E,cx:ko,cy:ko,r:(ko-A)/2,fill:"none",strokeWidth:A})})}))});process.env.NODE_ENV!=="production"&&(Kv.propTypes={classes:g.object,className:g.string,color:g.oneOfType([g.oneOf(["inherit","primary","secondary","error","info","success","warning"]),g.string]),disableShrink:vr(g.bool,e=>e.disableShrink&&e.variant&&e.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),size:g.oneOfType([g.number,g.string]),style:g.object,sx:g.oneOfType([g.arrayOf(g.oneOfType([g.func,g.object,g.bool])),g.func,g.object]),thickness:g.number,value:g.number,variant:g.oneOf(["determinate","indeterminate"])});const mg=Kv;function BF(e){return Ft("MuiLoadingButton",e)}const co=zt("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),yF=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],bF=e=>{const{loading:t,loadingPosition:n,classes:r}=e,o={root:["root",t&&"loading"],startIcon:[t&&`startIconLoading${Pe(n)}`],endIcon:[t&&`endIconLoading${Pe(n)}`],loadingIndicator:["loadingIndicator",t&&`loadingIndicator${Pe(n)}`]},s=Wt(o,BF,r);return z({},r,s)},QF=e=>e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"&&e!=="classes",xF=ue(fF,{shouldForwardProp:e=>QF(e)||e==="classes",name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{[`& .${co.startIconLoadingStart}`]:t.startIconLoadingStart},t.endIconLoadingEnd&&{[`& .${co.endIconLoadingEnd}`]:t.endIconLoadingEnd}]})(({ownerState:e,theme:t})=>z({[`& .${co.startIconLoadingStart}, & .${co.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},e.loadingPosition==="center"&&{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),[`&.${co.loading}`]:{color:"transparent"}},e.loadingPosition==="start"&&e.fullWidth&&{[`& .${co.startIconLoadingStart}, & .${co.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginRight:-8}},e.loadingPosition==="end"&&e.fullWidth&&{[`& .${co.startIconLoadingStart}, & .${co.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginLeft:-8}})),wF=ue("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.loadingIndicator,t[`loadingIndicator${Pe(n.loadingPosition)}`]]}})(({theme:e,ownerState:t})=>z({position:"absolute",visibility:"visible",display:"flex"},t.loadingPosition==="start"&&(t.variant==="outlined"||t.variant==="contained")&&{left:t.size==="small"?10:14},t.loadingPosition==="start"&&t.variant==="text"&&{left:6},t.loadingPosition==="center"&&{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled},t.loadingPosition==="end"&&(t.variant==="outlined"||t.variant==="contained")&&{right:t.size==="small"?10:14},t.loadingPosition==="end"&&t.variant==="text"&&{right:6},t.loadingPosition==="start"&&t.fullWidth&&{position:"relative",left:-10},t.loadingPosition==="end"&&t.fullWidth&&{position:"relative",right:-10})),Jv=F.forwardRef(function(t,n){const r=Ut({props:t,name:"MuiLoadingButton"}),{children:o,disabled:s=!1,id:a,loading:c=!1,loadingIndicator:u,loadingPosition:A="center",variant:p="text"}=r,h=Re(r,yF),C=Cd(a),E=u??f.jsx(mg,{"aria-labelledby":C,color:"inherit",size:16}),m=z({},r,{disabled:s,loading:c,loadingIndicator:E,loadingPosition:A,variant:p}),v=bF(m),B=c?f.jsx(wF,{className:v.loadingIndicator,ownerState:m,children:E}):null;return f.jsxs(xF,z({disabled:s||c,id:C,ref:n},h,{variant:p,classes:v,ownerState:m,children:[m.loadingPosition==="end"?o:B,m.loadingPosition==="end"?B:o]}))});process.env.NODE_ENV!=="production"&&(Jv.propTypes={children:g.node,classes:g.object,disabled:g.bool,id:g.string,loading:g.bool,loadingIndicator:g.node,loadingPosition:vr(g.oneOf(["start","end","center"]),e=>e.loadingPosition==="start"&&!e.startIcon?new Error('MUI: The loadingPosition="start" should be used in combination with startIcon.'):e.loadingPosition==="end"&&!e.endIcon?new Error('MUI: The loadingPosition="end" should be used in combination with endIcon.'):null),sx:g.oneOfType([g.arrayOf(g.oneOfType([g.func,g.object,g.bool])),g.func,g.object]),variant:g.oneOfType([g.oneOf(["contained","outlined","text"]),g.string])});const TF=Jv;function Ig({variant:e,theme:t,color:n,loadingPosition:r}){const o=an(t,n),{lighter:s,main:a,dark:c,contrastText:u}=o,A=`${n}Button`,p=Is(t,A),h={"& .MuiLoadingButton-loadingIndicator":{color:a}},C={...r&&r!=="center"&&{color:a}},E={"&::after":{boxShadow:`0 0 6px 6px ${nt(a,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${nt(a,.9)}`},"&:focus-visible":{outline:`2px solid ${c}`,outlineOffset:2}};switch(e){case"contained":return{backgroundColor:a,...r&&r!=="center"&&{color:u},"& .MuiLoadingButton-loadingIndicator":{color:u},"&:hover":{backgroundColor:c,color:u},...E};case"light":return{backgroundColor:a,...r&&r!=="center"&&{color:u},"& .MuiLoadingButton-loadingIndicator":{color:u},"&:hover":{backgroundColor:c,color:u},...E};case"shadow":return{boxShadow:p,backgroundColor:a,...r&&r!=="center"&&{color:u},"& .MuiLoadingButton-loadingIndicator":{color:u},"&:hover":{boxShadow:"none",backgroundColor:c,color:u},...E};case"outlined":return{backgroundColor:"transparent",borderColor:a,...C,...h};case"dashed":return{backgroundColor:s,borderColor:a,...C,...h,...E};case"text":default:return{color:a,...h,...E}}}const SF=ue(TF,{shouldForwardProp:e=>e!=="shape"&&e!=="variant"})(({theme:e,variant:t,shape:n,color:r,loading:o,loadingPosition:s})=>({"::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:n==="rounded"?"50%":4,opacity:0,transition:"all 0.5s"},":active::after":{position:"absolute",borderRadius:n==="rounded"?"50%":4,left:0,top:0,opacity:1,transition:"0s"},...t==="text"&&{...Ig({variant:t,theme:e,color:r,loadingPosition:s}),"&.MuiButton-sizeMedium":{height:36},"&.MuiButton-sizeSmall":{height:30},"&.MuiButton-sizeLarge":{height:44}},...n&&{minWidth:0,"&.MuiButton-sizeMedium":{width:36,height:36},"&.MuiButton-sizeSmall":{width:30,height:30},"&.MuiButton-sizeLarge":{width:44,height:44},...n==="rounded"&&{borderRadius:"50%"}},...t==="outlined"&&{border:"1px solid"},...t==="dashed"&&{border:"1px dashed"},...(t==="contained"||t==="shadow")&&!o&&{color:"#fff"},...t!=="text"&&{...Ig({variant:t,theme:e,color:r,loadingPosition:s})},"&.Mui-disabled":{...t!=="text"&&{...Ig({variant:t,theme:e,color:r,loadingPosition:s})}}})),vg=x.forwardRef(({variant:e="text",shape:t,children:n,color:r="primary",...o},s)=>{const a=wt();return f.jsx(SF,{ref:s,variant:e,shape:t,theme:a,loadingPosition:o.loadingPosition,loading:o.loading,color:r,...o,children:n})});vg.propTypes={variant:g.string,shape:g.string,children:g.node,color:g.string},vg.displayName="LoadingButton";function PF({color:e,theme:t,labelColor:n}){const r=an(t,e),{main:o,contrastText:s}=r;let a=e||"";return["primary","secondary","info","success","warning","error"].includes(a)?{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:o,color:n||s},[`& .${b.tooltipClasses.arrow}`]:{color:o}}:{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:a,color:n||s,boxShadow:t.shadows[1]},[`& .${b.tooltipClasses.arrow}`]:{color:a}}}const OF=ue(({className:e,...t})=>f.jsx(b.Tooltip,{...t,classes:{popper:e}}),{shouldForwardProp:e=>e!=="color"&&e!=="labelColor"})(({theme:e,color:t,labelColor:n})=>({...t&&PF({color:t,theme:e,labelColor:n})}));function ou({children:e,arrow:t,labelColor:n="",...r}){const o=wt();return f.jsx(b.Box,{display:"flex",children:f.jsx(OF,{arrow:t,...r,theme:o,labelColor:n,children:e})})}ou.propTypes={children:g.element,arrow:g.bool,labelColor:g.string,rest:g.array};const Ro=x.forwardRef(({children:e,position:t="top-left",type:n="grow",direction:r="up",...o},s)=>{let a={transformOrigin:"0 0 0"};switch(t){case"top-right":a={transformOrigin:"top right"};break;case"top":a={transformOrigin:"top"};break;case"bottom-left":a={transformOrigin:"bottom left"};break;case"bottom-right":a={transformOrigin:"bottom right"};break;case"bottom":a={transformOrigin:"bottom"};break;case"top-left":default:a={transformOrigin:"0 0 0"};break}return f.jsxs(b.Box,{ref:s,children:[n==="grow"&&f.jsx(b.Grow,{...o,timeout:{appear:0,enter:150,exit:150},children:f.jsx(b.Box,{sx:a,children:e})}),n==="collapse"&&f.jsx(b.Collapse,{...o,sx:a,children:e}),n==="fade"&&f.jsx(b.Fade,{...o,timeout:{appear:0,enter:300,exit:150},children:f.jsx(b.Box,{sx:a,children:e})}),n==="slide"&&f.jsx(b.Slide,{...o,timeout:{appear:0,enter:150,exit:150},direction:r,children:f.jsx(b.Box,{sx:a,children:e})}),n==="zoom"&&f.jsx(b.Zoom,{...o,children:f.jsx(b.Box,{sx:a,children:e})})]})});Ro.propTypes={children:g.node,type:g.oneOf(["grow","fade","collapse","slide","zoom"]),position:g.oneOf(["top-left","top-right","top","bottom-left","bottom-right","bottom"]),direction:g.oneOf(["up","down","left","right"])},x.forwardRef(function(t,n){return f.jsx(b.Zoom,{ref:n,timeout:200,...t})});function Xv({value:e,...t}){return f.jsxs(b.Box,{sx:{position:"relative",display:"inline-flex"},children:[f.jsx(b.CircularProgress,{variant:"determinate",value:e,...t}),f.jsx(b.Box,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:f.jsx(b.Typography,{variant:"caption",component:"div",color:"text.secondary",children:`${Math.round(e)}%`})})]})}Xv.propTypes={value:g.number};function Zv({value:e,size:t,variant:n,thickness:r,showLabel:o,pathColor:s,sx:a,...c}){return f.jsxs(b.Box,{sx:{position:"relative",display:"inline-flex"},children:[f.jsx(b.CircularProgress,{variant:"determinate",sx:{color:s||"grey.200"},size:t,thickness:r,...c,value:100}),o&&f.jsx(b.Box,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:f.jsx(b.Typography,{variant:"caption",component:"div",color:"text.secondary",children:e?`${Math.round(e)}%`:"0%"})}),f.jsx(b.CircularProgress,{variant:n,sx:{...a,position:"absolute",left:0,[`& .${b.circularProgressClasses.circle}`]:{strokeLinecap:"round"}},size:t,thickness:r,value:e,...c})]})}Zv.propTypes={value:g.number,size:g.number,variant:g.string,thickness:g.number,showLabel:g.bool,pathColor:g.string,sx:g.array,others:g.array};function _v({icon:e,value:t,...n}){return f.jsxs(b.Box,{sx:{display:"flex",alignItems:"center"},children:[f.jsx(b.Box,{sx:{width:"100%",mr:1},children:f.jsx(b.LinearProgress,{variant:"determinate",value:t,...n})}),f.jsx(b.Box,{sx:{minWidth:35},children:e})]})}_v.propTypes={icon:g.node,value:g.number};function qv({value:e,...t}){return f.jsxs(b.Box,{sx:{display:"flex",alignItems:"center"},children:[f.jsx(b.Box,{sx:{width:"100%",mr:1},children:f.jsx(b.LinearProgress,{variant:"determinate",value:e,...t})}),f.jsx(b.Box,{sx:{minWidth:35},children:f.jsx(b.Typography,{variant:"body2",color:"text.secondary",children:`${Math.round(e)}%`})})]})}qv.propTypes={value:g.number};const jF=x.forwardRef(function(t,n){const r=Br(t,{color:"text.primary"},{defaults:!0});return f.jsx(vs,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),xs=x.forwardRef(function(t,n){const r=Br(t,{color:"text.primary",borderStyle:"none",padding:1,fontSize:"1.5rem",width:36,height:36},{defaults:!0});return f.jsx(b.ToggleButton,{ref:n,...t,color:"secondary",sx:r})});function $v(){const{open:e,anchorEl:t,handleClose:n,handleToggle:r}=ya(),[o,s]=ce.useLocaleState(),a=ce.useLocales();if(a.length===0)return null;const c=u=>{s(u),n()};return f.jsxs(f.Fragment,{children:[f.jsx(Im,{value:"locale",onClick:r,sx:{minWidth:"auto"},children:f.jsxs(b.Stack,{direction:"row",spacing:.5,children:[f.jsx(b.Typography,{variant:"body1",children:o.toUpperCase()}),e?f.jsx(Ze.CaretUpOutlined,{}):f.jsx(Ze.CaretDownOutlined,{})]})}),f.jsx(b.Menu,{id:"menu-appbar",anchorEl:t,keepMounted:!0,open:e,onClose:n,children:a.map((u,A)=>f.jsx(b.MenuItem,{onClick:()=>c(u.locale),children:u.name},A))})]})}const MF=ga(k.Toolbar,{slot:"Root"})(({theme:e})=>({...e.mixins.toolbar,backgroundColor:e.palette.background.paper,justifyContent:"flex-end","& .RaToolbar-defaultToolbar":{justifyContent:"right",paddingBottom:e.spacing(2),"& > *":{marginLeft:e.spacing(1)}},"& .MuiButtonBase-root":{marginLeft:e.spacing(1)}}));function yi(e){return f.jsx(MF,{...e})}function DF({children:e,content:t=!0,title:n,subheader:r=null,secondary:o=null,toolbar:s=!1,lg:a=12,md:c=12,sm:u=12,xs:A=12,...p}){const h=k.useTranslate(),C=k.useResourceContext(),{cardTitle:E,cardSubheader:m}=x.useMemo(()=>{const v=n||`resources.${C}.title`;return{cardTitle:h(v,{_:v}),cardSubheader:r!==null?h(r,{_:r}):null}},[C,r,n,h]);return f.jsx(b.Grid,{item:!0,...p,lg:a,md:c,sm:u,xs:A,children:f.jsx(ir,{content:t,title:E,subheader:m,secondary:o,divider:!0,children:f.jsxs(x.Fragment,{children:[e,s===!0?f.jsx(yi,{children:f.jsx(k.SaveButton,{})}):s]})})})}const kF=ue(k.Form,{slot:"root"})(({theme:e,spacing:t})=>({backgroundColor:"transparent","& .RaToolbar-desktopToolbar":{marginTop:e.spacing(t*1.25),padding:0,minHeight:"unset"},"& .RaToolbar-mobileToolbar":{paddingTop:`${e.spacing(2.5)} !important`,paddingRight:"0 !important",paddingLeft:"0 !important",paddingBottom:"0 !important"}}));function eB({children:e,spacing:t,defaultValues:n,...r}){const{spacing:o}=bn();return f.jsx(kF,{defaultValues:n,spacing:t||o,children:f.jsx(b.Grid,{container:!0,...r,spacing:t||o,children:e})})}eB.Section=DF;const RF=ga(k.SimpleForm,{slot:"Root"})(({theme:e})=>({[e.breakpoints.down("sm")]:{paddingBottom:`${e.spacing(2.5)}`}}));function tB({title:e,modal:t=!1,content:n=!1,subheader:r=null,toolbar:o=f.jsx(yi,{children:f.jsx(k.SaveButton,{type:"button"})}),secondary:s=f.jsx(si,{children:f.jsx(k.DeleteWithConfirmButton,{})}),sx:a,...c}){const u=nf(e),A=k.useRecordContext(),p=cd();return f.jsx(ir,{content:n,title:u,subheader:r,secondary:A!=null&&A.id?s:null,sx:{...a,"& .MuiToolbar-root":{position:"initial",paddingLeft:p.spacing(2.5),paddingRight:p.spacing(2.5),paddingBottom:p.spacing(2.5),paddingTop:t?p.spacing(2.5):0,borderTop:t?`1px solid ${p.palette.divider}`:void 0}},border:!t,divider:!0,children:f.jsx(RF,{toolbar:o,...c})})}function nB({label:e,children:t,display:n="label",helperText:r,sx:o,addLabel:s,divider:a=!1,fullWidth:c,...u}){const A=xt.useTheme(),{getCurrentDialog:p}=ai(),{source:h,resource:C,isRequired:E}=u,{getFieldState:m,formState:v}=ri.useFormContext(),{error:B}=m(h,v),w=p();return f.jsxs(b.Stack,{spacing:1,sx:{"& .MuiFormHelperText-root":{color:B?A.palette.error.main:A.palette.text.secondary,"& span":{display:"none"}},width:c?"100%":"auto",...o},children:[n==="label"&&e!==!1&&s!==!1&&f.jsx(b.InputLabel,{error:!!B,sx:{borderBottom:a?`1px solid ${A.palette.divider}`:"none",pb:a?1:0,mt:a?1:0,pt:1},children:f.jsx(k.FieldTitle,{label:e,source:h,resource:w||C,isRequired:E})}),x.isValidElement(t)?x.cloneElement(t,{...t.props,...u,label:n==="legend"?e:!1}):t,n==="label"&&r&&f.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:!!B,children:r})]})}const FF=ue(k.ArrayInput,{slot:"root"})(({theme:e})=>({"& .MuiStack-root > label":{marginTop:e.spacing(2)},"& .MuiInputLabel-shrink":{paddingBottom:0},marginTop:"0 !important","& .RaSimpleFormIterator-line > .RaSimpleFormIterator-form":{paddingBottom:e.spacing(.5),"& > div":{width:"100%"}}}));function LF({label:e,addLabel:t,source:n,helperText:r,divider:o=!0,...s}){return f.jsx(nB,{label:e,addLabel:t,source:n,helperText:r,divider:o,fullWidth:s==null?void 0:s.fullWidth,children:f.jsx(FF,{source:n,label:!1,...s})})}function NF({canEdit:e=!0,canDelete:t=!0,canClone:n=!1}){return!e&&!t&&!n?null:f.jsxs(si,{children:[e&&f.jsx(k.EditButton,{}),t&&f.jsx(k.DeleteWithConfirmButton,{}),n&&f.jsx(k.CloneButton,{})]})}const rB=ue("div",{overridesResolver:(e,t)=>t.root})({display:"inline-block"}),VF=ue("ul")({display:"inline-block"});function HF(e){var p;const{className:t,emptyText:n,source:r,title:o,...s}=e,a=ce.useRecordContext(e),c=ct.get(a,r),u=ce.useTranslate();if(!c)return n?f.jsx(b.Typography,{component:"span",variant:"body2",className:t,...s,children:n&&u(n,{_:n})}):f.jsx(rB,{className:t,...s});if(Array.isArray(c))return f.jsx(VF,{className:t,...s,children:c.map((h,C)=>{var m;const E=o instanceof String?(m=ct.get(h,o))==null?void 0:m.toString():o;return f.jsx("li",{children:E},C)})});const A=o instanceof String?(p=ct.get(a,o))==null?void 0:p.toString():o;return f.jsx(rB,{className:t,...s,children:A})}function oB({entityId:e,property:t,disabled:n,showUser:r=!1,userResource:o="entities/user",...s}){const[a,c]=x.useState(null),u=k.useRecordContext(s),A=k.useDataProvider(),p=k.useResourceContext(),h=x.useCallback(async m=>{m.preventDefault(),m.stopPropagation();const v=ct.get(u,s==null?void 0:s.source),B=p.replace("entities/",""),w=await A.getFile(`/attachments/${B}/${e||(u==null?void 0:u.id)}/${t||(s==null?void 0:s.source)}/${(v==null?void 0:v.id)||(u==null?void 0:u.id)}`),M=document.createElement("a");M.href=w,M.download=ct.get(u,(s==null?void 0:s.title)||(s==null?void 0:s.source)),M.click()},[A,u,e,p,t,s==null?void 0:s.source,s==null?void 0:s.title]),C=x.useMemo(()=>({...u,[s==null?void 0:s.source]:(u==null?void 0:u.src)||ct.get(u,s==null?void 0:s.source),[s==null?void 0:s.title]:(u==null?void 0:u.title)||ct.get(u,(s==null?void 0:s.title)||(s==null?void 0:s.source))}),[u,s==null?void 0:s.source,s==null?void 0:s.title]),E=k.useTranslate();return x.useEffect(()=>{!u||!(u!=null&&u.userId)||r===!1||A.getOne(o,{id:u==null?void 0:u.userId}).then(({data:m})=>c(m)).catch(()=>c(null))},[u,A,o]),f.jsx(HF,{...s,disabled:n,record:C,onClick:h,title:f.jsxs(b.Box,{sx:{cursor:"pointer"},children:[f.jsx(b.Typography,{variant:"subtitle1",children:ct.get(C,(s==null?void 0:s.title)||(s==null?void 0:s.source))}),f.jsxs(b.Typography,{variant:"caption",color:"secondary",children:[ct.get(C,"sizeDescription"),r&&a&&" | ",r&&a&&E("ra.attachment.info",{user:a==null?void 0:a.name,created:Nr(C==null?void 0:C.createdAt).format("DD/MM/YYYY HH:mm")})]})]})})}const zF=ue(k.ImageField,{slot:"root"})(()=>({}));function iB(e){const t=`_${e==null?void 0:e.source}`;return f.jsx(zF,{...e,source:t})}function sB({width:e=150,height:t=150,circle:n=!1,justify:r="flex-start",record:o,...s}){const a=x.useMemo(()=>({width:typeof e=="number"?`${e}px !important`:`${e} !important`,height:typeof t=="number"?`${t}px !important`:`${t} !important`,borderRadius:n?"50%":1.5}),[e,t,n]),c=k.useRecordContext(),u=o||c;return f.jsx(iB,{sx:A=>({margin:0,display:"flex",justifyContent:r,"& img":{margin:"0px !important",border:`1px solid ${A.palette.divider}`,objectFit:"cover !important",...a,minWidth:a.width,minHeight:a.height}}),...s,record:u})}var aB={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(In,function(){return function(n,r,o){n=n||{};var s=r.prototype,a={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function c(A,p,h,C){return s.fromToBase(A,p,h,C)}o.en.relativeTime=a,s.fromToBase=function(A,p,h,C,E){for(var m,v,B,w=h.$locale().relativeTime||a,M=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],Q=M.length,P=0;P<Q;P+=1){var S=M[P];S.d&&(m=C?o(A).diff(h,S.d,!0):h.diff(A,S.d,!0));var D=(n.rounding||Math.round)(Math.abs(m));if(B=m>0,D<=S.r||!S.r){D<=1&&P>0&&(S=M[P-1]);var R=w[S.l];E&&(D=E(""+D)),v=typeof R=="string"?R.replace("%d",D):R(D,p,S.l,B);break}}if(p)return v;var G=B?w.future:w.past;return typeof G=="function"?G(v):G.replace("%s",v)},s.to=function(A,p){return c(A,p,this,!0)},s.from=function(A,p){return c(A,p,this)};var u=function(A){return A.$u?o.utc():o()};s.toNow=function(A){return this.to(u(this),A)},s.fromNow=function(A){return this.from(u(this),A)}}})})(aB);var WF=aB.exports;const UF=Xr(WF);var YF={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(In,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(n){var r=["th","st","nd","rd"],o=n%100;return"["+n+(r[(o-20)%10]||r[o]||r[0])+"]"}}})})(YF);var GF={exports:{}};(function(e,t){(function(n,r){e.exports=r(pm)})(In,function(n){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var o=r(n),s={name:"it",weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un' ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(a){return a+"º"}};return o.default.locale(s,null,!0),s})})(GF),Nr.extend(UF);function lB(e){const t=k.useRecordContext(e),[n]=k.useLocaleState(),r=x.useMemo(()=>Nr(ct.get(t,e==null?void 0:e.source)).locale(n).fromNow(),[t,e==null?void 0:e.source,n]);return f.jsxs(x.Fragment,{children:[f.jsx(k.DateField,{record:t,source:e.source,showTime:!0}),f.jsx("br",{}),f.jsx(b.Typography,{variant:"caption",color:"textSecondary",children:r})]})}const KF=ue(k.DateField,{slot:"Root"})(()=>({}));function JF({variant:e="body1",...t}){return f.jsx(KF,{...t,variant:e})}const XF=ue(k.EmailField,{slot:"Root"})(()=>({}));function ZF({variant:e="body1",...t}){return f.jsx(XF,{...t,variant:e})}const _F=ue(k.FileField,{slot:"root"})(()=>({}));function cB({...e}){const t=k.useRecordContext(e),n=x.useCallback(r=>{r.preventDefault(),r.stopPropagation();const o=ct.get(t,`_${e==null?void 0:e.source}`,ct.get(t,e==null?void 0:e.source)),s=ct.get(t,(e==null?void 0:e.title)||(e==null?void 0:e.source))||(e==null?void 0:e.title),a=document.createElement("a");a.href=o,a.download=s,a.click()},[e==null?void 0:e.source,t,e==null?void 0:e.title]);return f.jsx(_F,{...e,record:t,onClick:n})}function qF({variant:e="body1",...t}){return f.jsx(k.FunctionField,{...t,variant:e})}const $F=ue(k.TextField,{slot:"Root"})(()=>({}));function uB({variant:e="body1",...t}){return f.jsx($F,{...t,variant:e})}function e6(e){const t=b.useTheme(),n=ce.useLocales(),{source:r=""}=e,o=ce.useRecordContext(e),s=o[r],a=!rf(s,n),c=Br(e,{flex:1}),[u]=ce.useLocaleState(),A=x.useMemo(()=>a?f.jsx(Ze.FlagFilled,{style:{color:t.palette.warning.main}}):f.jsx(Ze.FlagOutlined,{}),[a]),p=x.useMemo(()=>f.jsx(b.Stack,{children:ne.map(n,(h,C)=>f.jsx(b.Typography,{children:`${h.locale.toUpperCase()}: ${(s??{})[h.locale]??""}`},C))}),[s,n]);return f.jsx(ou,{title:p,arrow:!1,children:f.jsxs(b.Stack,{alignItems:"center",direction:"row",gap:1,children:[A,f.jsx(uB,{...e,source:`${r}.${u}`,sx:c})]})})}const t6=ue("div")(({theme:e,fullWidth:t})=>({borderBottom:`1px solid ${e.palette.divider}`,paddingTop:e.spacing(1),paddingBottom:e.spacing(1),marginBottom:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",width:t?"100%":"auto",[e.breakpoints.down("sm")]:{whiteSpace:"normal",overflow:"visible",textOverflow:"inherit"}})),n6=({source:e,defaultValue:t=" ",...n})=>{const r=k.useRecordContext(n),o=ct.get(r,e,t);return f.jsx(b.Typography,{...n,dangerouslySetInnerHTML:{__html:o&&o!==null?o:t}})},r6=({title:e,children:t})=>t==null?null:typeof e=="string"||e===!0?f.jsx(b.Tooltip,{title:e,placement:"top",children:t}):t;function o6({label:e,source:t,defaultValue:n=" ",children:r=f.jsx(n6,{source:"",defaultValue:void 0,record:void 0}),tooltip:o,...s}){const{getCurrentDialog:a}=ai(),c=k.useRecordContext(s),u=k.useResourceContext(s),A=a(),p=x.useMemo(()=>o===!1?!1:typeof o=="function"?o(c):typeof o=="string"?ct.get(c,o,o):o,[c,o]),h=Br(s,{width:s!=null&&s.fullWidth?"100%":"auto"});return f.jsx(r6,{title:p,children:f.jsxs(x.Fragment,{children:[f.jsx(b.InputLabel,{sx:{pt:1},children:f.jsx(k.FieldTitle,{label:e,source:t,resource:A||u})}),f.jsx(t6,{...s,children:x.cloneElement(r,{source:t,record:c,defaultValue:n,resource:A||u,sx:h})})]})})}const i6=ga(function({children:e=null,className:t=""}){return f.jsx("div",{className:t,children:e})},{slot:"root"})(({theme:e,bulkActionButtons:t})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,"&>div:first-of-type":{alignItems:"center","& form":{padding:e.spacing(2.5)},"& .MuiToolbar-root":{alignItems:"center",padding:"0 !important",marginTop:e.spacing(1),[e.breakpoints.up("sm")]:{marginLeft:e.spacing(2),marginRight:e.spacing(2),width:`calc(100% - ${e.spacing(4)})`},[e.breakpoints.down("md")]:{marginTop:0,display:"contents"}}},"& .RaDatagrid-root":{overflowX:"auto",paddingTop:t===!1?0:48,[e.breakpoints.down("sm")]:{width:"calc(100vw - 26px)"},"& .RaBulkActionsToolbar-toolbar":{borderRadius:0,"& > .RaBulkActionsToolbar-title":{alignItems:"center"},[e.breakpoints.down("sm")]:{paddingLeft:e.spacing(3)}},"& .RaDatagrid-table":{borderBottom:`1px solid ${e.palette.divider}`}},"& .MuiTablePagination-toolbar":{marginTop:"0 !important",marginBottom:"0 !important"},"& .RaBulkActionsToolbar-collapsed.RaBulkActionsToolbar-toolbar":{minHeight:0}}));function AB(e){return f.jsx(i6,{...e,children:f.jsx(k.ReferenceManyField,{pagination:f.jsx(k.Pagination,{}),...e})})}function s6({source:e,...t}){const n=k.useRecordContext(t),r=ct.get(n,e,0),o=r/1024,s=o/1024,a=s/1024,c=a>1?`${a.toFixed(2)} GB`:s>1?`${s.toFixed(2)} MB`:o>1?`${o.toFixed(2)} KB`:`${r.toFixed(2)} B`;return f.jsx(b.Typography,{component:"span",variant:"body1",...t,children:c})}function pn({label:e,children:t,display:n="label",helperText:r,sx:o,addLabel:s,divider:a=!1,...c}){const u=wt(),{getCurrentDialog:A}=ai(),{source:p,resource:h,isRequired:C}=c,{fieldState:{invalid:E}}=k.useInput(c),m=A();return f.jsxs(b.Stack,{spacing:1,sx:{width:c!=null&&c.fullWidth?"100%":"auto","& .MuiFormHelperText-root":{color:E?u.palette.error.main:u.palette.text.secondary,"& span":{display:"none"}},...o},children:[n==="label"&&e!==!1&&s!==!1&&f.jsx(b.InputLabel,{error:E===!0,sx:{borderBottom:a?`1px solid ${u.palette.divider}`:"none",pt:.5,pb:a?1:0,mt:a?1:0},children:f.jsx(k.FieldTitle,{label:e,source:p,resource:m||h,isRequired:C})}),x.isValidElement(t)?x.cloneElement(t,{...t.props,...c,label:n==="legend"?e:!1}):t,n==="label"&&r&&f.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:E===!0,children:r})]})}const a6=e=>e?{"& .RaFileInput-removeButton > .RaFileInputPreview-removeButton":{display:"none",visiblity:"hidden"},"& .RaFileInput-dropZone":{display:"none",visiblity:"hidden"}}:{},l6=ue(k.FileInput,{slot:"root"})(({disabled:e,theme:t})=>({"& .previews":{},"& .previews>div":{marginTop:t.spacing(1),padding:t.spacing(1.5),border:`1px solid ${t.palette.divider}`,borderRadius:t.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:t.palette.action.hover},"& .MuiLink-root":{fontSize:t.typography.body1.fontSize}},...a6(e)}));function c6({children:e=f.jsx(oB,{title:"name",source:"path"}),multiple:t=!0,disabled:n=!1,type:r="attachment",...o}){const s=k.useRecordContext(o),a=o==null?void 0:o.source,c=s==null?void 0:s.id;return k.useInput({source:`__${r}__${o==null?void 0:o.source}`,defaultValue:o==null?void 0:o.source}),f.jsx(pn,{...o,disabled:n,children:f.jsx(l6,{type:r,multiple:t,disabled:n,children:x.cloneElement(e,{...e.props,entityId:c,property:a})})})}const u6=ue(k.AutocompleteArrayInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"}}));function A6({size:e="small",...t}){return f.jsx(pn,{...t,children:f.jsx(u6,{size:e})})}const d6=ue(k.AutocompleteInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"},"& .MuiOutlinedInput-root.MuiInputBase-sizeSmall":{paddingTop:"4px"}}));function f6({size:e="small",...t}){const{perPage:n,...r}=t;return f.jsx(pn,{...r,children:f.jsx(d6,{size:e})})}const g6=ue(k.BooleanInput,{slot:"Root"})(()=>({marginTop:"0 !important"}));function p6({...e}){const t=xt.useTheme();return f.jsx(pn,{...e,children:f.jsx(g6,{sx:{"& .MuiFormControlLabel-root":{marginLeft:"0 !important",marginRight:"0 !important"},"& .MuiSwitch-root":{margin:"0 !important",marginTop:e.display==="legend"?0:`${t.spacing(1)} !important`}}})})}const h6=ue(k.DateInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function C6(e){return f.jsx(pn,{...e,children:f.jsx(h6,{})})}const E6=ue(k.DateTimeInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function m6(e){return f.jsx(pn,{...e,children:f.jsx(E6,{})})}const I6=ue(k.FileInput,{slot:"root"})(({theme:e})=>({"& .previews":{},"& .previews>div":{marginTop:e.spacing(1),padding:e.spacing(1.5),border:`1px solid ${e.palette.divider}`,borderRadius:e.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:e.palette.action.hover},"& .MuiLink-root":{fontSize:e.typography.body1.fontSize}}}));function v6({children:e=f.jsx(cB,{source:"",title:""}),title:t,...n}){const r=ri.useWatch({name:n.source}),o=k.useRecordContext(n),{source:s}=n,a=x.useMemo(()=>{if(r&&(r!=null&&r.title))return r==null?void 0:r.title;const c=ct.get(o,s);if(c){const u=c.split("__");return u.length>0?u[u.length-1]:c}return c},[o,s,r]);return f.jsx(pn,{...n,children:f.jsx(I6,{children:x.cloneElement(e,{...e.props,title:t||s,source:s,record:{...o,[s]:(r==null?void 0:r.title)||ct.get(o,s),[`_${s}`]:(r==null?void 0:r.src)||ct.get(o,`_${s}`),[t||s]:a}})})})}function B6({children:e=f.jsx(sB,{}),title:t,multiple:n=!1,...r}){const o=ri.useWatch({name:r.source}),s=k.useRecordContext(r),{source:a}=r;return k.useInput({source:`__image__${r==null?void 0:r.source}`,defaultValue:r==null?void 0:r.source}),f.jsx(pn,{...r,multiple:n,children:f.jsx(k.ImageInput,{accept:"image/*",children:x.cloneElement(e,{...e.props,title:t,source:a,record:{...s,[a]:(o==null?void 0:o.title)||ct.get(s,a),[`_${a}`]:(o==null?void 0:o.src)||ct.get(s,`_${a}`)}})})})}function br(e){return f.jsx(pn,{...e,children:f.jsx(k.TextInput,{})})}const y6={vertical:"bottom",horizontal:"right"},b6={vertical:"top",horizontal:"right"};function Q6(e){const{source:t}=e,{fieldState:n}=ce.useInput(e),r=ri.useWatch({name:t}),{error:o}=n,s=ce.useLocales(),a=!rf(r,s),[c]=ce.useLocaleState(),[u,A]=x.useState(c),[p,h]=x.useState(null),C=!!p,E=x.useCallback(B=>h(C?null:B.currentTarget),[C,h]),m=x.useCallback(()=>h(null),[h]),v=x.useMemo(()=>ne.map(s,(B,w)=>f.jsx(b.MenuItem,{onClick:()=>{A(B.locale),m()},children:f.jsx(b.ListItemText,{primary:`${B.locale.toUpperCase()}: ${(r??{})[B.locale]??""}`})},w)),[s,A,m,r]);return f.jsx(pn,{...e,helperText:o==null?void 0:o.message,children:f.jsxs(b.Box,{flex:1,children:[ne.map(s,(B,w)=>f.jsx(br,{...e,source:`${t}.${B.locale}`,sx:{width:"100%",display:B.locale===u?"inline-flex":"none"},label:!1,InputProps:{endAdornment:f.jsx(b.Chip,{label:f.jsx(b.Typography,{variant:"button",children:u}),size:"small",onClick:E,color:a?"warning":void 0})}},w)),f.jsx(b.Menu,{anchorEl:p,open:C,anchorOrigin:y6,transformOrigin:b6,onClose:m,children:v})]})})}const x6=ue(k.NumberInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function w6(e){return f.jsx(pn,{...e,children:f.jsx(x6,{})})}function T6({source:e,minWidth:t=300,children:n}){const r=k.useResourceContext(),o=k.useRecordContext(),[s,a]=x.useState(ct.get(o,e,"")),[c,u]=x.useState(!1),A=x.useCallback(m=>a(m.target.value),[]),p=k.useDataProvider(),h=x.useCallback(m=>{m.key==="Enter"&&(u(!0),p.update(r,{id:o.id,data:{...o,[e]:s,_changed:e},previousData:o}).then(()=>u(!1)))},[s,p,r,o,e]),C=x.useCallback(()=>{ct.get(o,e)!==s&&(u(!0),p.update(r,{id:o.id,data:{...o,[e]:s,_changed:e},previousData:o}).then(()=>u(!1)))},[s,p,r,e,o]),E=x.useCallback(m=>{u(!0),p.update(r,{id:o.id,data:{...o,[e]:m,_changed:e},previousData:o}).then(()=>u(!1))},[p,r,e,o]);return x.useEffect(()=>a(ct.get(o,e)),[o,e]),n?x.cloneElement(n,{...n.props,source:e,value:s,onChange:E}):f.jsx(b.TextField,{value:s,disabled:c,onChange:A,onKeyPress:h,onBlur:C,style:{minWidth:t,width:"100%"},multiline:!0,InputProps:{"arial-label":"naked"},size:"small"})}function S6({children:e,...t}){return f.jsx(k.ReferenceArrayInput,{...t,children:x.cloneElement(e,{...t,source:e.props.source||t.source})})}function P6({children:e,...t}){return f.jsx(k.ReferenceInput,{...t,children:x.cloneElement(e,{...t,source:e.props.source||t.source})})}function O6({reference:e,target:t,children:n,filters:r,actions:o,...s}){return f.jsx(k.ResourceContextProvider,{value:e,children:f.jsx(AB,{perPage:5,pagination:f.jsx(k.Pagination,{}),...s,reference:e,target:t,children:f.jsxs(x.Fragment,{children:[f.jsx(k.ListToolbar,{filters:r,actions:o}),n]})})})}const j6=ue(k.SearchInput,{slot:"root"})(()=>({}));function M6(e){return f.jsx(j6,{...e})}const D6=ue(k.SelectArrayInput,{slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .RaSelectArrayInput-chips > .RaSelectArrayInput-chip":{marginTop:"-2px",marginBottom:"-2px"}}));function k6({optionText:e="name",optionValue:t="id",...n}){return f.jsx(pn,{...n,children:f.jsx(D6,{optionText:e,optionValue:t,options:{autoWidth:!1}})})}const R6=ue(k.SelectInput,{slot:"Root"})(({label:e})=>({"& legend":{width:e===!1||e===null?0:"auto"}}));function F6(e){return f.jsx(pn,{...e,children:f.jsx(R6,{})})}function L6({multiline:e=!1,...t}){var u,A;const n=k.useTranslate(),r=k.maxLength(t==null?void 0:t.maxLength,"app.input.max_length_error"),o=(A=(u=ri.useController({name:t==null?void 0:t.source}))==null?void 0:u.field)==null?void 0:A.value;let s=t.helperText,a=t.validate;a?Array.isArray(a)&&a.indexOf(r)===-1&&a.push(r):a=[r];const c=n("app.input.max_length_info",{count:(o==null?void 0:o.length)||0,max:t==null?void 0:t.maxLength});return t!=null&&t.maxLength&&(s=s&&s.length>0?`${c} - ${n(s)}`:c),f.jsx(br,{...t,validate:a,helperText:s,multiline:e,inputProps:{maxLength:t==null?void 0:t.maxLength}})}function N6(e){if(!e)return"";const t=hm(e);return t?t.format("HH:mm"):""}function V6(e){return e}const H6=ue(k.TimeInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function z6({parse:e=V6,format:t=N6,...n}){return f.jsx(pn,{...n,children:f.jsx(H6,{parse:e,format:t,...n})})}function Bg({onSuccess:e,firstAccess:t}){const{spacing:n}=bn(),[r,o]=x.useState(!1),s=ce.useAuthProvider(),a=ce.useTranslate(),c=ce.useNotify(),u=x.useCallback(A=>{const{oldPassword:p,newPassword:h}=A;o(!0),s==null||s.changePassword(p,h).then(()=>{c("ra.auth.password_changed"),e()}).catch(C=>{c((C==null?void 0:C.message)||(C==null?void 0:C.toString()),{type:"error"})}).finally(()=>o(!1))},[s,e]);return f.jsx(ce.ResourceContextProvider,{value:"user/change-password",children:f.jsx(ce.EditContextProvider,{value:{record:{},resource:"user/change-password",save:u},children:f.jsx(tB,{onSubmit:u,toolbar:f.jsx(yi,{children:f.jsx(k.SaveButton,{disabled:r})}),children:f.jsxs(b.Grid,{container:!0,spacing:n,children:[t===!0&&f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.Alert,{severity:"warning",children:[f.jsx(b.AlertTitle,{children:a("ra.auth.first_access.change_password")}),a("ra.auth.first_access.change_password_helper")]})}),f.jsx(b.Grid,{item:!0,xs:12,children:f.jsx(br,{source:"oldPassword",type:"password",validate:ce.required()})}),f.jsx(b.Grid,{item:!0,xs:12,children:f.jsx(br,{source:"newPassword",type:"password",validate:ce.required()})})]})})})})}const dB=x.createContext({});function W6(e){const{useDefaults:t=!1,queryOptions:n={}}=e,r=k.useResourceContext(),o=k.useDataProvider(),{search:s}=Yi.useLocation(),a=`${r}/new`,c=x.useCallback(()=>{if(!t||!ne.isFunction(o.get))return Promise.resolve({});const C={};return new URLSearchParams(s??"").forEach((E,m)=>{C[m]=E}),o.get(a,C).then(E=>E.data).then(E=>{const{responseCode:m,value:v}=E;return m==="ok"?v:Promise.reject(E)})},[r,t,s,o]),u=x.useMemo(()=>ne.chain(n).extend({queryKey:[r,s],queryFn:c}).value(),[r,s,c,n]),{data:A,isLoading:p}=Gi.useQuery(u),h=ne.omit(e,["useDefaults"]);return p?f.jsx(b.Stack,{alignItems:"center",justifyContent:"center",flex:1,p:2,children:f.jsx(b.CircularProgress,{})}):f.jsx(dB.Provider,{value:A??{},children:f.jsx(k.Create,{...h})})}function U6(){return x.useContext(dB)}const Y6=ue(W6,{slot:"root"})(({theme:e})=>({"& .RaCreate-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaCreate-main":{marginTop:0},"& .RaCreate-main>.MuiPaper-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaToolbar-mobileToolbar":{position:"initial !important",paddingLeft:`${e.spacing(2.5)} !important`,paddingRight:`${e.spacing(2.5)} !important`,paddingTop:"0 !important"},"& .RaCreate-main:has(.LongFormView)>.MuiPaper-root:first-of-type":{overflow:"visible"},"& .RaCreate-main:has(.tabbed-form) .MuiTableContainer-root":{width:"inherit"}})),G6=ue(k.Edit,{slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaEdit-card":{[e.breakpoints.down("sm")]:{marginBottom:e.spacing(6)}},"& .RaEdi-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaToolbar-mobileToolbar":{position:"initial !important",paddingLeft:`${e.spacing(2.5)} !important`,paddingRight:`${e.spacing(2.5)} !important`,paddingTop:"0 !important"},"& .RaEdit-main":{marginTop:0},"& .RaEdit-main>.MuiPaper-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaEdit-main:has(.LongFormView)>.MuiPaper-root:first-of-type":{overflow:"visible"},"& .RaEdit-main:has(.tabbed-form) .MuiTableContainer-root":{width:"inherit"}}));function K6(e){return f.jsx(G6,{...e})}const J6=ue(b.CardHeader)(({theme:e})=>({marginTop:e.spacing(2.5),marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0})),X6=ue(b.Divider)(({theme:e})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,marginBottom:e.spacing(2),width:`calc(100% + ${e.spacing(5)})`}));function Z6({title:e,divider:t=!0,variant:n="h5"}){const r=k.useTranslate();return f.jsxs(x.Fragment,{children:[f.jsx(J6,{title:r(e,{_:e}),titleTypographyProps:{variant:n}}),t&&f.jsx(X6,{})]})}const _6=ue(b.Grid,{name:"LongFormView",slot:"Root"})(({theme:e})=>({"& .MuiToolbar-root.RaToolbar-desktopToolbar":{position:"initial",marginLeft:`-${e.spacing(3)}`,marginRight:`-${e.spacing(3)}`,marginBottom:`-${e.spacing(2)}`,paddingTop:e.spacing(2.5),paddingBottom:e.spacing(2.5),[e.breakpoints.down("sm")]:{position:"initial !important",width:"auto !important",marginRight:0}},"& .RaToolbar-mobileToolbar":{position:"initial !important",paddingTop:`${e.spacing(2.5)} !important`,paddingLeft:"0 !important",paddingRight:"0 !important",paddingBottom:"0 !important"},"& form > .MuiToolbar-root":{margin:0,marginRight:`-${e.spacing(.5)}`,[e.breakpoints.down("sm")]:{marginRight:e.spacing(.5)}}}));function fB(e){const{spacing:t}=bn(),{spacing:n=t}=e,r=ne.omit(e,["spacing"]);return f.jsx(k.Form,{...r,className:"LongFormView",children:f.jsx(_6,{container:!0,spacing:n*2,children:e.children})})}function gB(e){const{disposition:t={xl:9,lg:9,md:8,sm:8,xs:12}}=e,n=ne.omit(e,["disposition"]);return f.jsx(b.Grid,{...n,item:!0,...t,children:e.children})}function yg(e){return e.id??e.label}function pB(e,t){const n=`^${e}.`.replaceAll(".","\\."),r=new RegExp(n,"g");return t.match(r)!==null}function q6(e){return ne.map(e,"id")}function iu(e){const t=e.match(new RegExp("[^.]+","g"));return t===null?0:t.length}function hB(e,t){const n=e!==void 0?iu(e):0;return ne.chain(t).filter(o=>e!==void 0?pB(e,o.id):!0).filter(o=>iu(o.id)===n+1).value()}function $6(e,t){var s;const n=ne.clone(e),{type:r,payload:o}=t;switch(r){case"setFormRootPath":return ne.extend(n,{formRootPath:o});case"setSyncWithLocation":return ne.extend(n,{syncWithLocation:o});case"setErrorCount":return ne.extend(n,{errorCount:o});case"setActiveItem":return ne.includes(q6(e.items),o)?ne.extend(n,{activeItem:o}):n;case"addItem":{const{id:a}=o;return ne.extend(n,{items:ne.chain(n.items).clone().reject(c=>c.id===a).concat([o]).orderBy(c=>c.index).value()})}case"removeItem":{const a=ne.isString(o)?o:o.id,c=ne.chain(n.items).clone().reject(u=>u.id===a).value();return ne.extend(n,{items:c}),n.activeItem===a&&ne.extend(n,{activeItem:((s=ne.first(c))==null?void 0:s.id)??void 0}),n}default:return n}}const e8={syncWithLocation:!0,errorCount:!0,items:[],activeItem:void 0},CB=x.createContext(void 0);function EB(e){const t=!!(e.syncWithLocation??!0),n=!!(e.errorCount??!0),{rootMatchString:r}=e,{pathname:o}=Yi.useLocation(),[s,a]=x.useReducer($6,ne.cloneDeep(e8)),{formRootPath:c,items:u}=s,A=x.useMemo(()=>({state:s,dispatch:a}),[s,a]);return x.useEffect(()=>{const p=["entities/:resource/create/*",":resource/create/*","entities/:resource/:id/show/*",":resource/:id/show/*","entities/:resource/:id/*",":resource/:id/*"];r!==void 0&&p.push(r);const h=ne.chain(p).map(E=>Yi.matchPath(E,o)).reject(E=>E===null).first().value(),C=h==null?void 0:h.pathnameBase;C!==void 0&&C!==c&&a({type:"setFormRootPath",payload:C})},[o,c,r]),x.useEffect(()=>{a({type:"setSyncWithLocation",payload:!!t})},[t,a]),x.useEffect(()=>{a({type:"setErrorCount",payload:!!n})},[n,a]),x.useEffect(()=>{var p;if(t&&c!==void 0){let h=o.replace(c,"").replace(new RegExp(/^\/?/),"");ne.isEmpty(h)&&(h=((p=ne.chain(u).filter(C=>hB(C.id,u).length===0).orderBy([C=>iu(C.id),C=>C.index]).first().value())==null?void 0:p.id)??void 0),a({type:"setActiveItem",payload:h})}},[a,c,o,u]),f.jsx(CB.Provider,{value:A,children:e.children})}function mB(){const e=x.useContext(CB);if(e===void 0)throw new Error("[LongForm] useFormContext: context undefined. Please provide a valid Context using LongForm.Provider");return e}function Ja(){return mB().state}function bg(){return mB().dispatch}function IB(){return Ja().formRootPath}function vB(){return Ja().activeItem}function BB(){return Ja().items}function yB(){return Ja().syncWithLocation}function bB(){return Ja().errorCount}function QB(){const e=bg();return x.useCallback(n=>{e({type:"setActiveItem",payload:n})},[e])}function xB(){const e=bg();return x.useCallback(n=>{e({type:"addItem",payload:n})},[e])}function wB(){const e=bg();return x.useCallback(n=>{e({type:"removeItem",payload:n})},[e])}function TB(e){const t=vB();return t===void 0?!1:e===t||pB(e,t)}function SB(e){const t=BB();return x.useMemo(()=>hB(e,t),[t,e])}function t8(){const e=IB(),{search:t}=Yi.useLocation(),n=Yi.useNavigate();return x.useCallback(o=>{n(`${e}/${o}${t}`)},[e,n])}function PB(){const e=SB();return f.jsx(b.Card,{variant:"outlined",children:f.jsx(b.List,{sx:{"& .MuiListItemButton-root.Mui-selected":{borderColor:"palette.primary.main",borderRightStyle:"solid",borderRightWidth:2},"& .MuiListItemAvatar-root":{minWidth:24}},children:ne.map(e,(t,n)=>f.jsx(Qg,{...t},n))})})}function Qg(e){const t=ce.useTranslate()??ne.identity,n=OB(e),{selected:r,label:o,icon:s,onClick:a,badge:c,items:u,isGroup:A,level:p,errors:h=0}=n,{spacing:C}=bn(),[E,m]=x.useState(r),v=x.useCallback(M=>{m(!E),a(M)},[a,E]),B=s!==void 0,w=ne.omit(e,["label","icon","selected","badge"]);return x.useEffect(()=>{r&&!E&&m(r)},[r,E,m]),f.jsxs(f.Fragment,{children:[f.jsx(b.ListItem,{...w,disablePadding:!0,children:f.jsxs(b.ListItemButton,{selected:r&&!A,onClick:v,sx:{pl:C*p},children:[B&&f.jsx(b.ListItemIcon,{children:s}),f.jsx(b.ListItemText,{inset:!B,primary:h===0?t(o):f.jsx(b.Badge,{variant:"dot",color:"error",sx:{"& > .MuiBadge-badge":{transform:"scale(1) translate(125%, 0)"}},children:t(o)})}),c&&f.jsx(b.ListItemAvatar,{children:f.jsx(Na,{type:"filled",size:"xs",color:c.color??"default",children:c.content})}),A&&(E?f.jsx(_n.ExpandLess,{}):f.jsx(_n.ExpandMore,{}))]})}),A&&f.jsx(b.Collapse,{in:E,timeout:"auto",children:f.jsx(b.List,{children:ne.map(u,(M,Q)=>f.jsx(Qg,{...M},Q))})})]})}function OB(e){const{id:t}=e,n=TB(t),r=iu(t),o=t8(),s=yB(),a=QB(),c=SB(t),u=!ne.isEmpty(c),A=x.useCallback(h=>{u||(s?o(e.id):a(e.id)),ne.isFunction(e.onClick)&&e.onClick(h)},[a,o,e,s,u]);return x.useMemo(()=>({...e,selected:n,onClick:A,items:c,isGroup:u,level:r}),[e,n,A,c,u])}var n8=e=>{let t=e;for(;t=t.parentElement;){const n=getComputedStyle(t,null).getPropertyValue("overflow-y");if(t===document.body)return window;if(n==="auto"||n==="scroll"||n==="overlay")return t}return window},jB=e=>e.firstChild?e.firstChild.offsetParent===e:!0,r8=(e,t)=>{let n=e,r=0;jB(t)||(r+=e.offsetTop-t.offsetTop,t=e.offsetParent,r+=-e.offsetTop);do r+=n.offsetTop,n=n.offsetParent;while(n&&n!==t);return r},o8=e=>{let t=e.parentElement;for(;t&&getComputedStyle(t,null).getPropertyValue("display")==="contents";)t=t.parentElement;return t||window},Xa=null;typeof CSS<"u"&&CSS.supports&&(CSS.supports("position","sticky")?Xa="sticky":CSS.supports("position","-webkit-sticky")&&(Xa="-webkit-sticky"));var su=!1;try{const e=Object.defineProperty({},"passive",{get(){su={passive:!0}}}),t=()=>{};window.addEventListener("testPassive",t,e),window.removeEventListener("testPassive",t,e)}catch{}var xg=e=>{const{el:t,onChange:n,unsubs:r,measure:o}=e;if(t===window){const s=()=>({top:0,left:0,height:window.innerHeight,width:window.innerWidth}),a=o(s()),c=()=>{Object.assign(a,o(s())),n()};return window.addEventListener("resize",c,su),r.push(()=>window.removeEventListener("resize",c)),a}else{const s=o(t.getBoundingClientRect()),a=()=>{Object.assign(s,o(t.getBoundingClientRect())),n()},c=new ResizeObserver(a);return c.observe(t),r.push(()=>c.disconnect()),s}},i8=e=>{const t=getComputedStyle(e,null),n=parseInt(t.getPropertyValue("padding-top"),10),r=parseInt(t.getPropertyValue("padding-bottom"),10);return{top:n,bottom:r}},s8=(e,t,n)=>{const{bottom:r,offsetBottom:o,offsetTop:s}=n,a=n8(e);let c=!1;const u=()=>{c||requestAnimationFrame(()=>{const R=h();R!==Q&&P(R),c=!1}),c=!0};let A=a===window?window.scrollY:a.scrollTop;const p=R=>{const{offsetTop:G,height:X}=E,{naturalTop:q}=B,{height:W}=w;return R+G+X>=q+W+M+o},h=()=>{const{height:R}=E,{height:G}=w;return G+s+o<=R?3:p(A)?1:2},C=a!==window&&jB(a),E=xg({el:a,onChange:u,unsubs:t,measure:({height:R,top:G})=>({height:R,offsetTop:C?G:0})}),m=o8(e),v=m===window?{top:0,bottom:0}:i8(m),B=xg({el:m,onChange:u,unsubs:t,measure:({height:R})=>({height:R-v.top-v.bottom,naturalTop:m===window?0:r8(m,a)+v.top+E.offsetTop})}),w=xg({el:e,onChange:u,unsubs:t,measure:({height:R})=>({height:R})});let M=0,Q=h();const P=R=>{const G=Q;if(Q=R,G===2&&(M=-1),R===3){e.style.position=Xa,r?e.style.bottom=`${o}px`:e.style.top=`${s}px`;return}const{height:X,offsetTop:q}=E,{height:W,naturalTop:re}=B,{height:ie}=w;if(R===2)if(e.style.position="relative",M=G===0?Math.max(0,q+A-re+s):Math.max(0,q+A+X-(re+ie+o)),r){const Z=Math.max(0,W-ie-M);e.style.bottom=`${Z}px`}else e.style.top=`${M}px`;else e.style.position=Xa,R===1?r?e.style.bottom=`${o}px`:e.style.top=`${X-ie-o}px`:r?e.style.bottom=`${X-ie-o}px`:e.style.top=`${s}px`};P(Q);const S=R=>{if(R===A)return;const G=R-A;if(A=R,Q===3)return;const{offsetTop:X,height:q}=E,{naturalTop:W,height:re}=B,{height:ie}=w;if(G>0)if(Q===0){if(R+X+s>W){const Z=Math.max(0,X+A-W+s);R+X+q<=W+ie+Z+o?P(2):P(1)}}else Q===2&&p(R)&&P(1);else if(Q===1){if(X+R+q<W+re+o){const Z=Math.max(0,X+A+q-(W+ie+o));X+R+s>=W+Z?P(2):P(0)}}else Q===2&&X+R+s<W+M&&P(0)},D=a===window?()=>S(window.scrollY):()=>S(a.scrollTop);a.addEventListener("scroll",D,su),a.addEventListener("mousewheel",D,su),t.push(()=>a.removeEventListener("scroll",D),()=>a.removeEventListener("mousewheel",D))},a8=({offsetTop:e=0,offsetBottom:t=0,bottom:n=!1}={})=>{const[r,o]=x.useState(null);return x.useEffect(()=>{if(!r||!Xa)return;const s=[];return s8(r,s,{offsetBottom:t,offsetTop:e,bottom:n}),()=>{s.forEach(a=>a())}},[r,t,e,n]),o},l8=e=>{const{offsetTop:t,offsetBottom:n,bottom:r,children:o,className:s,style:a}=e,c=a8({offsetTop:t,offsetBottom:n,bottom:r});return f.jsx("div",{className:s,style:a,ref:c,children:o})},c8=l8,MB=(e=>(e.TOP="top",e.BOTTOM="bottom",e))(MB||{});function DB(e){const{sticky:t=!0,disposition:n={xl:3,lg:3,md:4,sm:4,xs:12},spacing:r=2}=e,o=ne.omit(e,["sticky","disposition","spacing"]),s=t?c8:b.Box,a=x.useMemo(()=>t?{offsetTop:74,offsetBottom:r*2}:{},[t,r]);return f.jsx(b.Grid,{...o,item:!0,...n,children:f.jsx(s,{...a,children:f.jsx(b.Stack,{spacing:r,children:e.children})})})}function kB(e){return f.jsx(f.Fragment,{children:e.children})}function RB(e){const{children:t}=e;return x.useMemo(()=>{const r={top:[],bottom:[]};return x.Children.forEach(t,o=>{if(x.isValidElement(o)&&(o==null?void 0:o.type)===kB){const{position:s}=o.props;switch(s){case"top":r.top.push(o);break;case"bottom":r.bottom.push(o);break}}}),r},[t])}function FB(e=[],t){const n=ne.isArray(e)?e:[e],r=ne.filter(n,o=>x.isValidElement(o));ne.each(r,o=>{var s;t(o),FB(((s=o==null?void 0:o.props)==null?void 0:s.children)??[],t)})}function LB(e){const{errors:t}=ri.useFormState(),n=bB(),{label:r,icon:o,badge:s,index:a=0,children:c}=e,u=yg(e),A=xB(),p=wB(),h=TB(u),C=[];n&&(e.sources!==void 0?C.push(...e.sources):FB(c,m=>{var v;((v=m==null?void 0:m.props)==null?void 0:v.source)!==void 0&&C.push(m.props.source)}));const E=ne.chain(C).uniq().map(m=>ne.get(t,m)).reject(m=>m===void 0).value().length;return x.useEffect(()=>{A({id:u,index:a,label:r,icon:o,badge:s,errors:E})},[A,p,r,o,u,s,a,E]),x.useEffect(()=>()=>{p(u)},[u]),f.jsx(b.Box,{display:h?"unset":"none",children:e.children})}function NB(e){const t=wg(e),n=yg(e);return f.jsx(LB,{...e,id:n,children:x.Children.map(t,r=>{const o=yg(r.props);return x.cloneElement(r,{id:`${n}.${o}`})})})}function VB(e){return f.jsx(LB,{...e})}function wg(e){const{children:t}=e;return x.useMemo(()=>ne.chain(x.Children.toArray(t)).filter(r=>x.isValidElement(r)&&((r==null?void 0:r.type)===VB||(r==null?void 0:r.type)===NB)).map((r,o)=>x.cloneElement(r,{index:o})).value(),[t])}function u8(e){const{tabsDisposition:t,contentDisposition:n,spacing:r=2}=e,o=ne.pick(e,["syncWithLocation","errorCount"]),s=ne.omit(e,["tabsDisposition","contentDisposition","syncWithLocation"]),{top:a,bottom:c}=RB(e),u=wg(e);return f.jsx(EB,{...o,children:f.jsxs(fB,{...s,spacing:r,children:[f.jsxs(DB,{disposition:t,spacing:r,children:[a,f.jsx(PB,{}),c]}),f.jsx(gB,{disposition:n,children:u})]})})}const Dt=u8;Dt.BaseForm=fB,Dt.Content=gB,Dt.Provider=EB,Dt.useItems=BB,Dt.useSyncWithLocation=yB,Dt.useErrorCount=bB,Dt.useFormRootPath=IB,Dt.useActiveItem=vB,Dt.useSetActiveItem=QB,Dt.useAddItem=xB,Dt.useRemoveItem=wB,Dt.Sidebar=DB,Dt.SidebarSection=kB,Dt.SidebarSectionPosition=MB,Dt.useSidebarChildren=RB,Dt.NavMenu=PB,Dt.NavMenuItem=Qg,Dt.useNavMenuItem=OB,Dt.Tab=VB,Dt.Group=NB,Dt.useBaseItemChildren=wg;const A8=ue(k.Show,{slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaShow-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaShow-main>.MuiPaper-root:first-of-type":{overflow:"visible"}}));function d8(e){return f.jsx(A8,{...e})}const f8=ue(k.SimpleFormIterator,{root:"root"})(({theme:e})=>({"& .RaSimpleFormIterator-line":{paddingTop:e.spacing(1),paddingBottom:e.spacing(.5)},"& .RaSimpleFormIterator-action":{display:"flex",flexDirection:"row",alignItems:"center",mb:1.5},"& section":{width:"100%","& label":{position:"relative",overflow:"visible",transform:"none",marginLeft:0}}}));function g8(e){return f.jsx(f8,{...e})}const p8=ga(k.TabbedForm,{slot:"Root"})(({theme:e})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:0},[e.breakpoints.down("sm")]:{paddingBottom:0,"& .MuiTableContainer-root":{paddingBottom:e.spacing(1)}}}));function h8({children:e}){return f.jsx(f.Fragment,{children:e})}function Tg(e){const{title:t,modal:n,content:r,subheader:o,secondary:s=f.jsx(si,{children:f.jsx(k.DeleteWithConfirmButton,{})}),sx:a,noPadding:c,toolbar:u=f.jsx(yi,{children:f.jsx(k.SaveButton,{type:"button"})}),...A}=e,p=nf(t),h=b.useTheme();return f.jsx(ir,{title:p,modal:n,content:r,subheader:o,secondary:s,sx:{...a,"& .MuiTabs-root":{m:2.5,mb:0},"& .tabbed-form > .MuiDivider-root":{ml:2.5,mr:2.5},"& .MuiToolbar-root.RaToolbar-desktopToolbar":{position:"initial",paddingTop:n?h.spacing(2.5):0},"& .MuiToolbar-root":{padding:h.spacing(2.5),borderTop:n?`1px solid ${h.palette.divider}`:void 0}},border:!n,divider:!0,children:f.jsx(p8,{toolbar:u,component:c?h8:void 0,...A})})}function C8({children:e,...t}){return f.jsx(k.TabbedForm.Tab,{...t,children:f.jsx(b.Box,{sx:{width:"100%",p:2.5},children:e})})}Tg.Tab=k.TabbedForm.Tab,Tg.TabStack=C8;const HB=F.forwardRef((e,t)=>{const{children:n,disabled:r,disableRemove:o=!1,index:s,member:a,resource:c}=e,u=k.useTranslate(),[A,p]=F.useState(!1),{total:h,remove:C}=fm(),E=F.useCallback(()=>{p(!1),C(s)},[s,C]),m=x.useMemo(()=>({index:s,total:h,remove:()=>C(s)}),[s,h,C]);return f.jsxs(Vd.Provider,{value:m,children:[x.Children.map(n,(v,B)=>{if(!x.isValidElement(v))return null;const{source:w,...M}=v.props;return f.jsx(b.TableCell,{children:x.cloneElement(v,{source:w?`${a}.${w}`:a,index:w?void 0:B,resource:c,disabled:r,...M,label:""})})}),!o&&f.jsx(b.TableCell,{children:f.jsx(b.Stack,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:f.jsx(si,{horizontal:!0,children:f.jsx(b.Typography,{color:"error",onClick:()=>p(!0),children:u("ra.action.delete")})})})}),n.length>0&&f.jsx(k.Confirm,{isOpen:A,title:u("ra.action.remove_item"),content:u("ra.message.remove_item"),onConfirm:E,onClose:()=>p(!1)})]})});var E8=Array.isArray,au=E8,m8=typeof In=="object"&&In&&In.Object===Object&&In,I8=m8,v8=I8,B8=typeof self=="object"&&self&&self.Object===Object&&self,y8=v8||B8||Function("return this")(),lu=y8,b8=lu,Q8=b8.Symbol,cu=Q8,zB=cu,WB=Object.prototype,x8=WB.hasOwnProperty,w8=WB.toString,Za=zB?zB.toStringTag:void 0;function T8(e){var t=x8.call(e,Za),n=e[Za];try{e[Za]=void 0;var r=!0}catch{}var o=w8.call(e);return r&&(t?e[Za]=n:delete e[Za]),o}var S8=T8,P8=Object.prototype,O8=P8.toString;function j8(e){return O8.call(e)}var M8=j8,UB=cu,D8=S8,k8=M8,R8="[object Null]",F8="[object Undefined]",YB=UB?UB.toStringTag:void 0;function L8(e){return e==null?e===void 0?F8:R8:YB&&YB in Object(e)?D8(e):k8(e)}var Sg=L8;function N8(e){return e!=null&&typeof e=="object"}var uu=N8,V8=Sg,H8=uu,z8="[object Symbol]";function W8(e){return typeof e=="symbol"||H8(e)&&V8(e)==z8}var Pg=W8,U8=au,Y8=Pg,G8=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,K8=/^\w*$/;function J8(e,t){if(U8(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Y8(e)?!0:K8.test(e)||!G8.test(e)||t!=null&&e in Object(t)}var X8=J8;function Z8(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var GB=Z8,_8=Sg,q8=GB,$8="[object AsyncFunction]",eL="[object Function]",tL="[object GeneratorFunction]",nL="[object Proxy]";function rL(e){if(!q8(e))return!1;var t=_8(e);return t==eL||t==tL||t==$8||t==nL}var KB=rL,oL=lu,iL=oL["__core-js_shared__"],sL=iL,Og=sL,JB=function(){var e=/[^.]+$/.exec(Og&&Og.keys&&Og.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function aL(e){return!!JB&&JB in e}var lL=aL,cL=Function.prototype,uL=cL.toString;function AL(e){if(e!=null){try{return uL.call(e)}catch{}try{return e+""}catch{}}return""}var dL=AL,fL=KB,gL=lL,pL=GB,hL=dL,CL=/[\\^$.*+?()[\]{}|]/g,EL=/^\[object .+?Constructor\]$/,mL=Function.prototype,IL=Object.prototype,vL=mL.toString,BL=IL.hasOwnProperty,yL=RegExp("^"+vL.call(BL).replace(CL,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function bL(e){if(!pL(e)||gL(e))return!1;var t=fL(e)?yL:EL;return t.test(hL(e))}var QL=bL;function xL(e,t){return e==null?void 0:e[t]}var wL=xL,TL=QL,SL=wL;function PL(e,t){var n=SL(e,t);return TL(n)?n:void 0}var Au=PL,OL=Au,jL=OL(Object,"create"),du=jL,XB=du;function ML(){this.__data__=XB?XB(null):{},this.size=0}var DL=ML;function kL(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var RL=kL,FL=du,LL="__lodash_hash_undefined__",NL=Object.prototype,VL=NL.hasOwnProperty;function HL(e){var t=this.__data__;if(FL){var n=t[e];return n===LL?void 0:n}return VL.call(t,e)?t[e]:void 0}var zL=HL,WL=du,UL=Object.prototype,YL=UL.hasOwnProperty;function GL(e){var t=this.__data__;return WL?t[e]!==void 0:YL.call(t,e)}var KL=GL,JL=du,XL="__lodash_hash_undefined__";function ZL(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=JL&&t===void 0?XL:t,this}var _L=ZL,qL=DL,$L=RL,e9=zL,t9=KL,n9=_L;function ws(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ws.prototype.clear=qL,ws.prototype.delete=$L,ws.prototype.get=e9,ws.prototype.has=t9,ws.prototype.set=n9;var r9=ws;function o9(){this.__data__=[],this.size=0}var i9=o9;function s9(e,t){return e===t||e!==e&&t!==t}var a9=s9,l9=a9;function c9(e,t){for(var n=e.length;n--;)if(l9(e[n][0],t))return n;return-1}var fu=c9,u9=fu,A9=Array.prototype,d9=A9.splice;function f9(e){var t=this.__data__,n=u9(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():d9.call(t,n,1),--this.size,!0}var g9=f9,p9=fu;function h9(e){var t=this.__data__,n=p9(t,e);return n<0?void 0:t[n][1]}var C9=h9,E9=fu;function m9(e){return E9(this.__data__,e)>-1}var I9=m9,v9=fu;function B9(e,t){var n=this.__data__,r=v9(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var y9=B9,b9=i9,Q9=g9,x9=C9,w9=I9,T9=y9;function Ts(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ts.prototype.clear=b9,Ts.prototype.delete=Q9,Ts.prototype.get=x9,Ts.prototype.has=w9,Ts.prototype.set=T9;var S9=Ts,P9=Au,O9=lu,j9=P9(O9,"Map"),M9=j9,ZB=r9,D9=S9,k9=M9;function R9(){this.size=0,this.__data__={hash:new ZB,map:new(k9||D9),string:new ZB}}var F9=R9;function L9(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var N9=L9,V9=N9;function H9(e,t){var n=e.__data__;return V9(t)?n[typeof t=="string"?"string":"hash"]:n.map}var gu=H9,z9=gu;function W9(e){var t=z9(this,e).delete(e);return this.size-=t?1:0,t}var U9=W9,Y9=gu;function G9(e){return Y9(this,e).get(e)}var K9=G9,J9=gu;function X9(e){return J9(this,e).has(e)}var Z9=X9,_9=gu;function q9(e,t){var n=_9(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var $9=q9,e2=F9,t2=U9,n2=K9,r2=Z9,o2=$9;function Ss(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ss.prototype.clear=e2,Ss.prototype.delete=t2,Ss.prototype.get=n2,Ss.prototype.has=r2,Ss.prototype.set=o2;var _B=Ss,qB=_B,i2="Expected a function";function jg(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(i2);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],s=n.cache;if(s.has(o))return s.get(o);var a=e.apply(this,r);return n.cache=s.set(o,a)||s,a};return n.cache=new(jg.Cache||qB),n}jg.Cache=qB;var s2=jg,a2=s2,l2=500;function c2(e){var t=a2(e,function(r){return n.size===l2&&n.clear(),r}),n=t.cache;return t}var u2=c2,A2=u2,d2=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,f2=/\\(\\)?/g,g2=A2(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(d2,function(n,r,o,s){t.push(o?s.replace(f2,"$1"):r||n)}),t}),p2=g2;function h2(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var $B=h2,ey=cu,C2=$B,E2=au,m2=Pg,I2=1/0,ty=ey?ey.prototype:void 0,ny=ty?ty.toString:void 0;function ry(e){if(typeof e=="string")return e;if(E2(e))return C2(e,ry)+"";if(m2(e))return ny?ny.call(e):"";var t=e+"";return t=="0"&&1/e==-I2?"-0":t}var v2=ry,B2=v2;function y2(e){return e==null?"":B2(e)}var b2=y2,Q2=au,x2=X8,w2=p2,T2=b2;function S2(e,t){return Q2(e)?e:x2(e,t)?[e]:w2(T2(e))}var P2=S2,O2=Pg,j2=1/0;function M2(e){if(typeof e=="string"||O2(e))return e;var t=e+"";return t=="0"&&1/e==-j2?"-0":t}var D2=M2,k2=P2,R2=D2;function F2(e,t){t=k2(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[R2(t[n++])];return n&&n==r?e:void 0}var L2=F2,N2=L2;function V2(e,t,n){var r=e==null?void 0:N2(e,t);return r===void 0?n:r}var H2=V2;const z2=Xr(H2);function oy(e){var V,_;const{children:t,resource:n,source:r,label:o,disableAdd:s=!1,disableRemove:a=!1,enableClearAll:c=!1,className:u,empty:A,template:p={},inset:h}=e,[C,E]=x.useState(!1),{fields:m,remove:v,replace:B,append:w}=k.useArrayInput(e),{resetField:M}=ri.useFormContext(),Q=wt(),P=ce.useTranslate(),S=ce.useRecordContext(e),D=x.useRef(p||{}),R=ce.useTranslateLabel(),G=x.useCallback(L=>{v(L)},[v]);if(m.length>0){const{...L}=m[0];D.current=L;for(const ee in D.current)D.current[ee]=null}const X=x.useCallback((L=void 0)=>{let ee=L;L==null&&(ee=D.current,x.Children.count(t)===1&&F.isValidElement(x.Children.only(t))&&!x.Children.only(t).props.source&&x.Children.map(t,J=>F.isValidElement(J)&&J.type!==ce.FormDataConsumer).some(Boolean)?ee="":(ee=ee||{},x.Children.forEach(t,J=>{F.isValidElement(J)&&J.type!==ce.FormDataConsumer&&J.props.source&&(ee[J.props.source]=J.props.defaultValue??null)})));const U={...ee,...p};w(U),M(`${r}.${m.length}`,{defaultValue:ee})},[w,t,M,r,m.length,p]),q=L=>ee=>{X(),L&&L(ee)},W=x.useCallback(()=>{B([]),E(!1)},[B]),re=z2(S,r),ie=x.useMemo(()=>({total:m.length,remove:G,source:r}),[m.length,G,r]),Z=Q.palette.mode==="dark"?Q.palette.grey.A400:Q.palette.grey.A800,$=m.length>0&&c;return m?f.jsx(Nd.Provider,{value:ie,children:f.jsxs("div",{className:u,children:[F.cloneElement(f.jsx(W2,{}),{label:o,source:r,disableAdd:s,template:p,onClick:q((_=(V=e==null?void 0:e.addButton)==null?void 0:V.props)==null?void 0:_.onClick),inset:h}),f.jsx(b.TableContainer,{component:b.Paper,sx:h===!0?{borderRadius:0}:{mt:2,border:`1px solid ${Z}`},children:f.jsxs(b.Table,{size:"small",children:[f.jsx(b.TableHead,{sx:h===!0?{}:{borderTop:0,borderBottom:`1px solid ${Z}`},children:f.jsxs(b.TableRow,{children:[x.Children.map(t,(L,ee)=>F.isValidElement(L)?f.jsx(b.TableCell,{children:f.jsx(b.Typography,{display:"flex",variant:"subtitle1",color:"text.primary",textTransform:"none",children:R({...L.props,resource:n})})},ee):null),!a&&($?f.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:f.jsx(si,{horizontal:!0,children:f.jsx(b.Typography,{color:"error",onClick:()=>E(!0),children:P("ra.action.delete")})})},"actions"):f.jsx(b.TableCell,{},"empty_actions"))]})}),f.jsxs(b.TableBody,{children:[m.length===0&&f.jsx(b.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:f.jsx(b.TableCell,{colSpan:4+(a?0:1),align:"center",children:A||f.jsx(b.Typography,{variant:"body1",color:"text.secondary",children:"-"})})}),m.length>0&&m.map((L,ee)=>f.jsx(b.TableRow,{sx:{borderBottom:`1px solid ${Z}}`},children:f.jsx(HB,{disableRemove:a,index:ee,member:`${r}.${ee}`,onRemoveField:G,record:re&&re[ee]||{},resource:n,source:r,children:t})},L.id))]})]})}),m.length>0&&f.jsx(k.Confirm,{isOpen:C,title:P("ra.action.clear_array_input"),content:P("ra.message.clear_array_input"),onConfirm:W,onClose:()=>E(!1)})]})}):null}function W2(e){const{label:t,disableAdd:n,onClick:r,inset:o}=e,s=wt(),a=s.palette.mode==="dark"?s.palette.grey.A400:s.palette.grey.A800,c=s.palette.mode==="light"?"#000000":"#FFFFFF";return f.jsxs(b.Stack,{justifyContent:"space-between",alignItems:"center",flexDirection:"row",sx:o?{p:2.5}:{pt:2},children:[t!==!1&&f.jsx(b.Typography,{children:t}),!n&&(F.isValidElement(e==null?void 0:e.addButton)?F.cloneElement(e==null?void 0:e.addButton,{onClick:r}):f.jsx(b.IconButton,{color:"secondary",sx:{border:`1px solid ${a}`},onClick:r,children:f.jsx(Ze.PlusCircleOutlined,{style:{color:c}})}))]})}const U2=ue(oy,{slot:"Root"})(({theme:e})=>({"& > div.MuiPaper-root":{overflowX:"auto",[e.breakpoints.down("sm")]:{width:`calc(100vw - ${e.spacing(8.25)})`}},[e.breakpoints.down("sm")]:{"& .MuiTableRow-root:last-child":{borderBottom:0}}}));function Y2(e,t){const n=ne.clone(e),{type:r,payload:o}=t;switch(r){case"updateMedia":{const s=ne.chain(n.media).clone().extend(o).value();return ne.extend(n,{media:s})}case"updateDrawer":{const s=ne.chain(n.drawer).clone().extend(o).value();return ne.extend(n,{drawer:s})}case"updateLogo":{const s=ne.chain(n.logo).clone().extend(o).value();return ne.extend(n,{logo:s})}case"updateNotifications":{const s=ne.chain(n.notifications).clone().extend(o).value();return ne.extend(n,s)}case"updateTheme":{const s=ne.chain(n.theme).clone().extend(o).value();return ne.extend(n,{theme:s})}default:return n}}const G2={drawer:{open:!0,width:260,handleDrawerToggle:()=>{}},media:{downMd:!1,downLg:!1,downXl:!1,horizontal:!1},logo:{},notifications:{enable:!0,resource:"entities/notification"},theme:{iconColor:"grey.300",iconColorOpen:"grey.100"}},iy=x.createContext(void 0);function sy(e){var X;const t=ce.useAuthProvider(),n=ce.useGetIdentity(),r=b.useTheme(),o=b.useMediaQuery(r.breakpoints.down("md")),s=b.useMediaQuery(r.breakpoints.down("lg")),a=b.useMediaQuery(r.breakpoints.down("xl")),{miniDrawer:c,isHorizontalLayout:u,menuOrientation:A,drawerWidth:p}=bn(),h=u(A)&&!s,{drawerOpen:C,openDrawer:E}=li(),m=x.useCallback(()=>{E(!C)},[C,E]),[v,B]=x.useState(!1),[w,M]=x.useReducer(Y2,ne.chain(G2).clone().merge({drawer:{open:!c||C}}).value()),Q=x.useCallback(()=>B(!1),[]),P=x.useMemo(()=>({state:w,dispatch:M}),[w,M]),{logoIcon:S,logoMain:D,enableNotification:R,notification:G}=e;return x.useEffect(()=>{M({type:"updateMedia",payload:{downMd:o,downLg:s,downXl:a,horizontal:h}})},[A,o,s,a]),x.useEffect(()=>{M({type:"updateDrawer",payload:{open:C,width:p,handleDrawerToggle:m}})},[C,p,m]),x.useEffect(()=>{c||E(!a)},[a,c]),x.useEffect(()=>{M({type:"updateLogo",payload:{main:D,icon:S}})},[S,D]),x.useEffect(()=>{M({type:"updateNotifications",payload:{enable:R,resource:G??"entities/notification"}})},[R,G]),x.useEffect(()=>{M({type:"updateTheme",payload:{iconColorOpen:r.palette.mode==="dark"?"grey.200":"grey.300",iconColor:r.palette.mode==="dark"?"background.default":"grey.100"}})},[r.palette.mode]),x.useEffect(()=>{if(!t.isImpersonating){console.warn("authProvider does not contain a method called isImpersonating",t);return}t==null||t.isImpersonating().then(q=>{var W;B(!q&&((W=n==null?void 0:n.data)==null?void 0:W.needToChangePassword)===!0)})},[(X=n==null?void 0:n.data)==null?void 0:X.needToChangePassword,t]),f.jsxs(iy.Provider,{value:P,children:[f.jsx(b.Dialog,{open:v,maxWidth:"xs",fullWidth:!0,children:f.jsx(Bg,{onSuccess:Q,firstAccess:!0})}),e.children]})}function ay(e){return x.forwardRef((t,n)=>{const{logoIcon:r,logoMain:o,enableNotification:s,notification:a}=t;return f.jsx(sy,{logoIcon:r,logoMain:o,enableNotification:s,notification:a,children:f.jsx(e,{ref:n,...t})})})}function Mg(){const e=x.useContext(iy);if(e===void 0)throw new Error("[Layout] useLayoutContext: context undefined. Please provide a valid LayoutContext using LayoutProvider");return e}function K2(){return Mg().dispatch}function Ps(){return Mg().state}function Vn(){return Ps().media}function bi(){return Ps().drawer}function ly(){return Ps().logo}function pu(){return Ps().notifications}function J2(){return Ps().theme}const X2={ml:{xs:0,lg:-2}};function cy(){const{open:e,handleDrawerToggle:t}=bi();return f.jsx(xs,{value:"drawer","aria-label":"open drawer",sx:X2,onChange:t,selected:e,children:e?f.jsx(Ze.MenuFoldOutlined,{}):f.jsx(Ze.MenuUnfoldOutlined,{})})}function uy(e){const t=x.useRef(),n=b.useTheme(),{downLg:r,horizontal:o}=Vn(),{open:s,width:a}=bi(),c=r?b.AppBar:mm,u=Br(e,{borderBottom:`1px solid ${n.palette.divider}`,zIndex:1200,width:o?"100%":s?`calc(100% - ${a}px)`:{xs:"100%",lg:"calc(100% - 60px)"}}),A={position:"fixed",color:"inherit",elevation:0,sx:u};return r||ne.extend(A,{open:s}),f.jsx(c,{ref:t,...A,children:f.jsxs(b.Toolbar,{sx:{"& > *":{marginX:n.spacing(.325)}},children:[!o&&f.jsx(cy,{}),e.children]})})}function Z2(e){const t=b.useTheme(),{notification:n,onClick:r,selected:o,divider:s}=e,{resource:a}=pu(),c=ce.useNotify(),u=ce.useRedirect(),[A]=ce.useUpdate(a,{id:n==null?void 0:n.id,data:{...n,readed:Nr().format("YYYY-MM-DD HH:mm:ss")}},{onSuccess:()=>{n!=null&&n.resource?n!=null&&n.resource.startsWith("/")?(u(n==null?void 0:n.resource),r()):(r(),document.location.href=n==null?void 0:n.resource):r()},onFailure:()=>{c("resources.notifications.messages.readed.error","warning")}}),p=x.useCallback(()=>A(),[A]),[h]=ce.useLocaleState(),C=x.useMemo(()=>Nr(n.created).locale(h).fromNow(),[n,h]);return f.jsx(b.ListItem,{disablePadding:!0,divider:s,children:f.jsxs(b.ListItemButton,{selected:o,onClick:p,children:[f.jsx(b.ListItemAvatar,{children:f.jsx(b.Avatar,{sx:{color:"primary.main",bgcolor:"primary.lighter"},children:f.jsx(Ze.MessageOutlined,{})})}),f.jsx(b.ListItemText,{sx:{overflow:"hidden",wordBreak:"break-word",width:"90%"},primary:n.title,secondary:n.content}),f.jsx(b.Box,{flexGrow:1,flexShrink:1,minWidth:t.spacing(2)}),f.jsx(b.ListItemText,{sx:{overflow:"hidden",whiteSpace:"pre-wrap",wordBreak:"break-word"},primary:C,primaryTypographyProps:{variant:"caption"}})]})})}const _2={width:36,height:36,fontSize:"1rem"},q2={mt:"6px",ml:1,top:"auto",right:"auto",alignSelf:"flex-start",transform:"none"};function Ay(){const{enable:e}=pu();return e?f.jsx($2,{}):null}function $2(){const e=ce.useTranslate(),t=b.useTheme(),n=ce.useRefresh(),r=ce.useNotify(),{downMd:o}=Vn(),{resource:s}=pu(),[a,c]=x.useState([]),{data:u,isLoading:A}=ce.useGetList(s,{pagination:{page:1,perPage:25},sort:{field:"created",order:"DESC"},filter:{readed:!1}}),p=a.filter(M=>M.readed===null).length,{open:h,anchorEl:C,handleClose:E,handleToggle:m}=ya();x.useEffect(()=>{!A&&u&&c(u??[])},[u,A]);const v=a.filter(M=>!M.readed).map(M=>M.id),[B]=ce.useUpdateMany(s,{ids:v,data:{readed:Nr().format("YYYY-MM-DD HH:mm:ss")}},{onSuccess:()=>{n(),r("resources.notifications.messages.readed.done")},onError:()=>r("ra.notification.readed_error")}),w=x.useCallback(()=>{B()},[B]);return f.jsxs(f.Fragment,{children:[f.jsx(xs,{value:"notifications",selected:h,onChange:m,children:f.jsx(b.Badge,{badgeContent:p,color:"primary",children:f.jsx(Ze.BellOutlined,{})})}),f.jsx(b.Popper,{placement:o?"bottom":"bottom-end",open:h,anchorEl:C,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:M})=>f.jsx(Ro,{type:"grow",position:o?"top":"top-right",in:h,...M,children:f.jsx(b.Paper,{sx:{marginTop:1,boxShadow:t.customShadows.z1,width:"100%",minWidth:285,maxWidth:420,[t.breakpoints.down("md")]:{maxWidth:285}},children:f.jsx(b.ClickAwayListener,{onClickAway:E,children:f.jsxs(ir,{title:e("ra.notification.title"),elevation:0,border:!1,content:!1,secondary:f.jsx(f.Fragment,{children:p>0&&f.jsx(b.Tooltip,{title:e("ra.notification.mark-as-read"),onClick:w,children:f.jsx(vs,{color:"success",size:"small",children:f.jsx(Ze.CheckCircleOutlined,{style:{fontSize:"1.15rem"}})})})}),children:[f.jsx(b.List,{component:"nav",sx:{p:0,"& .MuiListItemButton-root":{py:.5,"&.Mui-selected":{bgcolor:"grey.50",color:"text.primary"},"& .MuiAvatar-root":_2,"& .MuiListItemSecondaryAction-root":{...q2,position:"relative"}},maxHeight:"calc(100vh - 240px)",overflow:"auto"},children:a.map((Q,P)=>f.jsx(Z2,{selected:p>0,notification:Q,onClick:E,divider:P<a.length-1},Q.id))}),f.jsx(b.ListItemButton,{sx:{textAlign:"center",py:"12px !important"},to:`/${s}`,LinkComponent:Ct.Link,onClick:E,children:f.jsx(b.ListItemText,{primary:f.jsx(b.Typography,{variant:"h6",color:"primary",children:e("ra.notification.view_all")})})}),f.jsx(b.Divider,{})]})})})})})]})}const eN=()=>{const[e,t]=x.useState(!1),n=x.useCallback(()=>t(!1),[t]),r=x.useCallback(()=>t(!0),[t]),o=ce.useTranslate();return f.jsxs(x.Fragment,{children:[f.jsxs(b.ListItemButton,{onClick:r,children:[f.jsx(b.ListItemIcon,{children:f.jsx(_n.Key,{})}),f.jsx(b.ListItemText,{primary:o("ra.auth.change_password")})]}),f.jsx(b.Dialog,{open:e,onClose:()=>t(!1),maxWidth:"xs",fullWidth:!0,children:f.jsx(Bg,{onSuccess:n})})]})},tN=()=>{const e=ce.useLogout(),t=ce.useTranslate();return f.jsx(x.Fragment,{children:f.jsxs(b.ListItemButton,{onClick:e,children:[f.jsx(b.ListItemIcon,{children:f.jsx(_n.LogoutOutlined,{})}),f.jsx(b.ListItemText,{primary:t("ra.auth.logout")})]})})},nN=()=>{const e=ce.useTranslate(),t=ce.useAuthProvider(),n=x.useCallback(()=>t.stopImpersonate().then(()=>document.location.href="/"),[t==null?void 0:t.stopImpersonating]),[r,o]=x.useState(!1);return x.useEffect(()=>{if(!t.isImpersonating){console.warn("The authProvider does not support the isImpersonating feature",t);return}t.isImpersonating().then(s=>o(s))},[t,o]),r?f.jsx(x.Fragment,{children:f.jsxs(b.ListItemButton,{onClick:n,children:[f.jsx(b.ListItemIcon,{children:f.jsx(_n.LogoutOutlined,{})}),f.jsx(b.ListItemText,{primary:e("ra.auth.stop_impersonate")})]})}):null};function dy(){var E;const e=b.useTheme(),t=ce.useDataProvider(),n=ce.useAuthProvider(),{identity:r}=ce.useGetIdentity(),o=r!==void 0&&r.image&&r.image!==null&&r.image!=="",[s,a]=x.useState(null),{open:c,anchorEl:u,handleToggle:A,handleClose:p}=ya(),h=ce.useLogout(),C=x.useCallback(()=>{h()},[n,h]);return x.useEffect(()=>{o&&t.getFile("/profile/me/image").then(m=>a(m))},[t,o]),f.jsxs(f.Fragment,{children:[f.jsx(xs,{sx:{p:.25,width:"auto"},onClick:A,value:"profile",selected:c,children:f.jsxs(b.Stack,{direction:"row",spacing:2,alignItems:"center",sx:{p:.5},children:[f.jsx(Na,{alt:(E=r==null?void 0:r.name)==null?void 0:E.toUpperCase(),src:s,size:"xs"}),f.jsx(b.Typography,{variant:"subtitle1",children:r==null?void 0:r.name})]})}),f.jsx(Lv,{placement:"bottom-end",open:c,anchorEl:u,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:m})=>{var v;return f.jsx(Ro,{type:"grow",position:"top-right",in:c,...m,children:f.jsx(b.Paper,{sx:{boxShadow:e.customShadows.z1,width:290,minWidth:240,maxWidth:290,[e.breakpoints.down("md")]:{maxWidth:250},marginTop:1},children:f.jsx(b.ClickAwayListener,{onClickAway:p,children:f.jsxs(ir,{elevation:0,border:!1,content:!1,children:[f.jsx(b.CardContent,{sx:{px:2.5,pt:3},children:f.jsxs(b.Grid,{container:!0,justifyContent:"space-between",alignItems:"center",children:[f.jsx(b.Grid,{item:!0,children:f.jsxs(b.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[f.jsx(Na,{alt:"profile user",src:s,sx:{width:32,height:32}}),f.jsxs(b.Stack,{children:[f.jsx(b.Typography,{variant:"h6",children:r==null?void 0:r.name}),f.jsx(b.Typography,{variant:"body2",color:"textSecondary",children:(v=r==null?void 0:r.roles)==null?void 0:v.map(B=>B.name.replace("ROLE_","")).join(",")})]})]})}),f.jsx(b.Grid,{item:!0,children:f.jsx(b.Tooltip,{title:"Logout",children:f.jsx(vs,{size:"large",sx:{color:"text.primary"},onClick:C,children:f.jsx(Ze.LogoutOutlined,{})})})})]})}),f.jsx(b.Grid,{container:!0,children:f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.List,{component:"nav",sx:{p:0,"& .MuiListItemIcon-root":{minWidth:32}},children:[f.jsx(eN,{}),f.jsx(tN,{}),f.jsx(nN,{})]})})})]})})})})}})]})}const fy=e=>{const t=wt(),{downMd:n}=Vn(),{open:r,anchorEl:o,handleToggle:s,handleClose:a}=ya();return n?f.jsxs(f.Fragment,{children:[f.jsx(xs,{value:"drawer","aria-label":"open more menu","aria-controls":r?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:s,selected:r,children:f.jsx(Ze.MoreOutlined,{})}),f.jsx(b.Popper,{placement:"bottom-end",open:r,anchorEl:o,role:void 0,transition:!0,disablePortal:!0,style:{width:"100%"},popperOptions:{modifiers:[{name:"offset",options:{offset:[0,9]}}]},children:({TransitionProps:c})=>f.jsx(Ro,{type:"fade",in:r,...c,children:f.jsx(b.Paper,{sx:{boxShadow:t.customShadows.z1},children:f.jsx(b.ClickAwayListener,{onClickAway:a,children:f.jsx(b.AppBar,{color:"inherit",children:f.jsx(b.Toolbar,{children:e.children})})})})})})]}):f.jsx(f.Fragment,{children:e.children})};function gy(e){return f.jsx(b.Box,{...e,flex:1})}function Dg(e){const{name:t,version:n,copy:r="© Applica Software Guru for"}=e;return f.jsx(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{p:"24px 16px 0px",mt:"auto"},children:f.jsxs(b.Typography,{variant:"caption",children:[f.jsx("span",{dangerouslySetInnerHTML:{__html:r||""}})," ",t," - ",n]})})}var kg={};const rN=Zr(DR);var py;function _a(){return py||(py=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=rN}(kg)),kg}var Rg={},oN=ii;Object.defineProperty(Rg,"__esModule",{value:!0});var Fg=Rg.default=void 0,iN=oN(_a()),sN=f;Fg=Rg.default=(0,iN.default)((0,sN.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");function hy(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=hy(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Cy(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=hy(e))&&(r&&(r+=" "),r+=t);return r}var aN="__lodash_hash_undefined__";function lN(e){return this.__data__.set(e,aN),this}var cN=lN;function uN(e){return this.__data__.has(e)}var AN=uN,dN=_B,fN=cN,gN=AN;function hu(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new dN;++t<n;)this.add(e[t])}hu.prototype.add=hu.prototype.push=fN,hu.prototype.has=gN;var Ey=hu;function pN(e,t){return e.has(t)}var my=pN;function hN(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Iy=hN;function CN(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var EN=CN,mN=Sg,IN=uu,vN="[object Arguments]";function BN(e){return IN(e)&&mN(e)==vN}var yN=BN,vy=yN,bN=uu,By=Object.prototype,QN=By.hasOwnProperty,xN=By.propertyIsEnumerable,wN=vy(function(){return arguments}())?vy:function(e){return bN(e)&&QN.call(e,"callee")&&!xN.call(e,"callee")},TN=wN,SN=9007199254740991;function PN(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=SN}var ON=PN;function jN(e){return function(t){return e(t)}}var MN=jN,DN=KB,kN=ON;function RN(e){return e!=null&&kN(e.length)&&!DN(e)}var FN=RN,LN=Au,NN=lu,VN=LN(NN,"Set"),HN=VN,zN=Au,WN=function(){try{var e=zN(Object,"defineProperty");return e({},"",{}),e}catch{}}(),UN=WN,YN=FN,GN=uu;function KN(e){return GN(e)&&YN(e)}var yy=KN;function JN(e){return e}var by=JN;function XN(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var ZN=XN,_N=ZN,Qy=Math.max;function qN(e,t,n){return t=Qy(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,s=Qy(r.length-t,0),a=Array(s);++o<s;)a[o]=r[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=r[o];return c[t]=n(a),_N(e,this,c)}}var $N=qN;function e7(e){return function(){return e}}var t7=e7,n7=t7,xy=UN,r7=by,o7=xy?function(e,t){return xy(e,"toString",{configurable:!0,enumerable:!1,value:n7(t),writable:!0})}:r7,i7=o7,s7=800,a7=16,l7=Date.now;function c7(e){var t=0,n=0;return function(){var r=l7(),o=a7-(r-n);if(n=r,o>0){if(++t>=s7)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var u7=c7,A7=i7,d7=u7,f7=d7(A7),g7=f7,p7=by,h7=$N,C7=g7;function E7(e,t){return C7(h7(e,t,p7),e+"")}var wy=E7,Lg=globalThis&&globalThis.__assign||function(){return Lg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Lg.apply(this,arguments)},m7=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},Cu,Ng,Ty=function(e){var t=e.className,n=e.onClick,r=e.sx,o=m7(e,["className","onClick","sx"]),s=ce.useLoading(),a=wt();return F.createElement(I7,{className:t,sx:r},F.createElement(tb,{className:"".concat(Os.loadedIcon," ").concat(s&&Os.loadedLoading),onClick:n}),s&&F.createElement(mg,Lg({className:Cy("app-loader",Os.loader),color:"inherit",size:a.spacing(2),thickness:6},o)))};Ty.propTypes={classes:g.object,className:g.string,width:g.string};var Eu="RaLoadingIndicator",Os={loader:"".concat(Eu,"-loader"),loadedLoading:"".concat(Eu,"-loadedLoading"),loadedIcon:"".concat(Eu,"-loadedIcon")},I7=ue("div",{name:Eu,overridesResolver:function(e,t){return t.root}})((Cu={position:"relative"},Cu["& .".concat(Os.loadedIcon)]=(Ng={},Ng["&.".concat(Os.loadedLoading)]={opacity:0},Ng),Cu["& .".concat(Os.loader)]={position:"absolute",top:"30%",left:"30%"},Cu));const Vg=e=>e.scrollTop;function js(e,t){var n,r;const{timeout:o,easing:s,style:a={}}=e;return{duration:(n=a.transitionDuration)!=null?n:typeof o=="number"?o:o[t.mode]||0,easing:(r=a.transitionTimingFunction)!=null?r:typeof s=="object"?s[t.mode]:s,delay:a.transitionDelay}}const v7=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function B7(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),s=$i(t);let a;if(t.fakeTransform)a=t.fakeTransform;else{const A=s.getComputedStyle(t);a=A.getPropertyValue("-webkit-transform")||A.getPropertyValue("transform")}let c=0,u=0;if(a&&a!=="none"&&typeof a=="string"){const A=a.split("(")[1].split(")")[0].split(",");c=parseInt(A[4],10),u=parseInt(A[5],10)}return e==="left"?o?`translateX(${o.right+c-r.left}px)`:`translateX(${s.innerWidth+c-r.left}px)`:e==="right"?o?`translateX(-${r.right-o.left-c}px)`:`translateX(-${r.left+r.width-c}px)`:e==="up"?o?`translateY(${o.bottom+u-r.top}px)`:`translateY(${s.innerHeight+u-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-u}px)`:`translateY(-${r.top+r.height-u}px)`}function Sy(e){return typeof e=="function"?e():e}function mu(e,t,n){const r=Sy(n),o=B7(e,t,r);o&&(t.style.webkitTransform=o,t.style.transform=o)}const Py=F.forwardRef(function(t,n){const r=wt(),o={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},s={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:a,appear:c=!0,children:u,container:A,direction:p="down",easing:h=o,in:C,onEnter:E,onEntered:m,onEntering:v,onExit:B,onExited:w,onExiting:M,style:Q,timeout:P=s,TransitionComponent:S=rg}=t,D=Re(t,v7),R=F.useRef(null),G=Zt(u.ref,R,n),X=L=>ee=>{L&&(ee===void 0?L(R.current):L(R.current,ee))},q=X((L,ee)=>{mu(p,L,A),Vg(L),E&&E(L,ee)}),W=X((L,ee)=>{const U=js({timeout:P,style:Q,easing:h},{mode:"enter"});L.style.webkitTransition=r.transitions.create("-webkit-transform",z({},U)),L.style.transition=r.transitions.create("transform",z({},U)),L.style.webkitTransform="none",L.style.transform="none",v&&v(L,ee)}),re=X(m),ie=X(M),Z=X(L=>{const ee=js({timeout:P,style:Q,easing:h},{mode:"exit"});L.style.webkitTransition=r.transitions.create("-webkit-transform",ee),L.style.transition=r.transitions.create("transform",ee),mu(p,L,A),B&&B(L)}),$=X(L=>{L.style.webkitTransition="",L.style.transition="",w&&w(L)}),V=L=>{a&&a(R.current,L)},_=F.useCallback(()=>{R.current&&mu(p,R.current,A)},[p,A]);return F.useEffect(()=>{if(C||p==="down"||p==="right")return;const L=JC(()=>{R.current&&mu(p,R.current,A)}),ee=$i(R.current);return ee.addEventListener("resize",L),()=>{L.clear(),ee.removeEventListener("resize",L)}},[p,C,A]),F.useEffect(()=>{C||_()},[C,_]),f.jsx(S,z({nodeRef:R,onEnter:q,onEntered:re,onEntering:W,onExit:Z,onExited:$,onExiting:ie,addEndListener:V,appear:c,in:C,timeout:P},D,{children:(L,ee)=>F.cloneElement(u,z({ref:G,style:z({visibility:L==="exited"&&!C?"hidden":void 0},Q,u.props.style)},ee))}))});process.env.NODE_ENV!=="production"&&(Py.propTypes={addEndListener:g.func,appear:g.bool,children:qi.isRequired,container:vr(g.oneOfType([kr,g.func]),e=>{if(e.open){const t=Sy(e.container);if(t&&t.nodeType===1){const n=t.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `container` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
212
|
+
`),CF)),Kv=F.forwardRef(function(t,n){const r=Ut({props:t,name:"MuiCircularProgress"}),{className:o,color:s="primary",disableShrink:a=!1,size:c=40,style:u,thickness:A=3.6,value:p=0,variant:h="indeterminate"}=r,C=Re(r,pF),E=z({},r,{color:s,disableShrink:a,size:c,thickness:A,value:p,variant:h}),m=EF(E),v={},B={},w={};if(h==="determinate"){const M=2*Math.PI*((ko-A)/2);v.strokeDasharray=M.toFixed(3),w["aria-valuenow"]=Math.round(p),v.strokeDashoffset=`${((100-p)/100*M).toFixed(3)}px`,B.transform="rotate(-90deg)"}return f.jsx(mF,z({className:Ve(m.root,o),style:z({width:c,height:c},B,u),ownerState:E,ref:n,role:"progressbar"},w,C,{children:f.jsx(IF,{className:m.svg,ownerState:E,viewBox:`${ko/2} ${ko/2} ${ko} ${ko}`,children:f.jsx(vF,{className:m.circle,style:v,ownerState:E,cx:ko,cy:ko,r:(ko-A)/2,fill:"none",strokeWidth:A})})}))});process.env.NODE_ENV!=="production"&&(Kv.propTypes={classes:g.object,className:g.string,color:g.oneOfType([g.oneOf(["inherit","primary","secondary","error","info","success","warning"]),g.string]),disableShrink:vr(g.bool,e=>e.disableShrink&&e.variant&&e.variant!=="indeterminate"?new Error("MUI: You have provided the `disableShrink` prop with a variant other than `indeterminate`. This will have no effect."):null),size:g.oneOfType([g.number,g.string]),style:g.object,sx:g.oneOfType([g.arrayOf(g.oneOfType([g.func,g.object,g.bool])),g.func,g.object]),thickness:g.number,value:g.number,variant:g.oneOf(["determinate","indeterminate"])});const mg=Kv;function BF(e){return Ft("MuiLoadingButton",e)}const co=zt("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),yF=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],bF=e=>{const{loading:t,loadingPosition:n,classes:r}=e,o={root:["root",t&&"loading"],startIcon:[t&&`startIconLoading${Pe(n)}`],endIcon:[t&&`endIconLoading${Pe(n)}`],loadingIndicator:["loadingIndicator",t&&`loadingIndicator${Pe(n)}`]},s=Wt(o,BF,r);return z({},r,s)},QF=e=>e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"&&e!=="classes",xF=ue(fF,{shouldForwardProp:e=>QF(e)||e==="classes",name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{[`& .${co.startIconLoadingStart}`]:t.startIconLoadingStart},t.endIconLoadingEnd&&{[`& .${co.endIconLoadingEnd}`]:t.endIconLoadingEnd}]})(({ownerState:e,theme:t})=>z({[`& .${co.startIconLoadingStart}, & .${co.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0}},e.loadingPosition==="center"&&{transition:t.transitions.create(["background-color","box-shadow","border-color"],{duration:t.transitions.duration.short}),[`&.${co.loading}`]:{color:"transparent"}},e.loadingPosition==="start"&&e.fullWidth&&{[`& .${co.startIconLoadingStart}, & .${co.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginRight:-8}},e.loadingPosition==="end"&&e.fullWidth&&{[`& .${co.startIconLoadingStart}, & .${co.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginLeft:-8}})),wF=ue("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.loadingIndicator,t[`loadingIndicator${Pe(n.loadingPosition)}`]]}})(({theme:e,ownerState:t})=>z({position:"absolute",visibility:"visible",display:"flex"},t.loadingPosition==="start"&&(t.variant==="outlined"||t.variant==="contained")&&{left:t.size==="small"?10:14},t.loadingPosition==="start"&&t.variant==="text"&&{left:6},t.loadingPosition==="center"&&{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled},t.loadingPosition==="end"&&(t.variant==="outlined"||t.variant==="contained")&&{right:t.size==="small"?10:14},t.loadingPosition==="end"&&t.variant==="text"&&{right:6},t.loadingPosition==="start"&&t.fullWidth&&{position:"relative",left:-10},t.loadingPosition==="end"&&t.fullWidth&&{position:"relative",right:-10})),Jv=F.forwardRef(function(t,n){const r=Ut({props:t,name:"MuiLoadingButton"}),{children:o,disabled:s=!1,id:a,loading:c=!1,loadingIndicator:u,loadingPosition:A="center",variant:p="text"}=r,h=Re(r,yF),C=Cd(a),E=u??f.jsx(mg,{"aria-labelledby":C,color:"inherit",size:16}),m=z({},r,{disabled:s,loading:c,loadingIndicator:E,loadingPosition:A,variant:p}),v=bF(m),B=c?f.jsx(wF,{className:v.loadingIndicator,ownerState:m,children:E}):null;return f.jsxs(xF,z({disabled:s||c,id:C,ref:n},h,{variant:p,classes:v,ownerState:m,children:[m.loadingPosition==="end"?o:B,m.loadingPosition==="end"?B:o]}))});process.env.NODE_ENV!=="production"&&(Jv.propTypes={children:g.node,classes:g.object,disabled:g.bool,id:g.string,loading:g.bool,loadingIndicator:g.node,loadingPosition:vr(g.oneOf(["start","end","center"]),e=>e.loadingPosition==="start"&&!e.startIcon?new Error('MUI: The loadingPosition="start" should be used in combination with startIcon.'):e.loadingPosition==="end"&&!e.endIcon?new Error('MUI: The loadingPosition="end" should be used in combination with endIcon.'):null),sx:g.oneOfType([g.arrayOf(g.oneOfType([g.func,g.object,g.bool])),g.func,g.object]),variant:g.oneOfType([g.oneOf(["contained","outlined","text"]),g.string])});const TF=Jv;function Ig({variant:e,theme:t,color:n,loadingPosition:r}){const o=an(t,n),{lighter:s,main:a,dark:c,contrastText:u}=o,A=`${n}Button`,p=Is(t,A),h={"& .MuiLoadingButton-loadingIndicator":{color:a}},C={...r&&r!=="center"&&{color:a}},E={"&::after":{boxShadow:`0 0 6px 6px ${nt(a,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${nt(a,.9)}`},"&:focus-visible":{outline:`2px solid ${c}`,outlineOffset:2}};switch(e){case"contained":return{backgroundColor:a,...r&&r!=="center"&&{color:u},"& .MuiLoadingButton-loadingIndicator":{color:u},"&:hover":{backgroundColor:c,color:u},...E};case"light":return{backgroundColor:a,...r&&r!=="center"&&{color:u},"& .MuiLoadingButton-loadingIndicator":{color:u},"&:hover":{backgroundColor:c,color:u},...E};case"shadow":return{boxShadow:p,backgroundColor:a,...r&&r!=="center"&&{color:u},"& .MuiLoadingButton-loadingIndicator":{color:u},"&:hover":{boxShadow:"none",backgroundColor:c,color:u},...E};case"outlined":return{backgroundColor:"transparent",borderColor:a,...C,...h};case"dashed":return{backgroundColor:s,borderColor:a,...C,...h,...E};case"text":default:return{color:a,...h,...E}}}const SF=ue(TF,{shouldForwardProp:e=>e!=="shape"&&e!=="variant"})(({theme:e,variant:t,shape:n,color:r,loading:o,loadingPosition:s})=>({"::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:n==="rounded"?"50%":4,opacity:0,transition:"all 0.5s"},":active::after":{position:"absolute",borderRadius:n==="rounded"?"50%":4,left:0,top:0,opacity:1,transition:"0s"},...t==="text"&&{...Ig({variant:t,theme:e,color:r,loadingPosition:s}),"&.MuiButton-sizeMedium":{height:36},"&.MuiButton-sizeSmall":{height:30},"&.MuiButton-sizeLarge":{height:44}},...n&&{minWidth:0,"&.MuiButton-sizeMedium":{width:36,height:36},"&.MuiButton-sizeSmall":{width:30,height:30},"&.MuiButton-sizeLarge":{width:44,height:44},...n==="rounded"&&{borderRadius:"50%"}},...t==="outlined"&&{border:"1px solid"},...t==="dashed"&&{border:"1px dashed"},...(t==="contained"||t==="shadow")&&!o&&{color:"#fff"},...t!=="text"&&{...Ig({variant:t,theme:e,color:r,loadingPosition:s})},"&.Mui-disabled":{...t!=="text"&&{...Ig({variant:t,theme:e,color:r,loadingPosition:s})}}})),vg=x.forwardRef(({variant:e="text",shape:t,children:n,color:r="primary",...o},s)=>{const a=wt();return f.jsx(SF,{ref:s,variant:e,shape:t,theme:a,loadingPosition:o.loadingPosition,loading:o.loading,color:r,...o,children:n})});vg.propTypes={variant:g.string,shape:g.string,children:g.node,color:g.string},vg.displayName="LoadingButton";function PF({color:e,theme:t,labelColor:n}){const r=an(t,e),{main:o,contrastText:s}=r;let a=e||"";return["primary","secondary","info","success","warning","error"].includes(a)?{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:o,color:n||s},[`& .${b.tooltipClasses.arrow}`]:{color:o}}:{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:a,color:n||s,boxShadow:t.shadows[1]},[`& .${b.tooltipClasses.arrow}`]:{color:a}}}const OF=ue(({className:e,...t})=>f.jsx(b.Tooltip,{...t,classes:{popper:e}}),{shouldForwardProp:e=>e!=="color"&&e!=="labelColor"})(({theme:e,color:t,labelColor:n})=>({...t&&PF({color:t,theme:e,labelColor:n})}));function ou({children:e,arrow:t,labelColor:n="",...r}){const o=wt();return f.jsx(b.Box,{display:"flex",children:f.jsx(OF,{arrow:t,...r,theme:o,labelColor:n,children:e})})}ou.propTypes={children:g.element,arrow:g.bool,labelColor:g.string,rest:g.array};const Ro=x.forwardRef(({children:e,position:t="top-left",type:n="grow",direction:r="up",...o},s)=>{let a={transformOrigin:"0 0 0"};switch(t){case"top-right":a={transformOrigin:"top right"};break;case"top":a={transformOrigin:"top"};break;case"bottom-left":a={transformOrigin:"bottom left"};break;case"bottom-right":a={transformOrigin:"bottom right"};break;case"bottom":a={transformOrigin:"bottom"};break;case"top-left":default:a={transformOrigin:"0 0 0"};break}return f.jsxs(b.Box,{ref:s,children:[n==="grow"&&f.jsx(b.Grow,{...o,timeout:{appear:0,enter:150,exit:150},children:f.jsx(b.Box,{sx:a,children:e})}),n==="collapse"&&f.jsx(b.Collapse,{...o,sx:a,children:e}),n==="fade"&&f.jsx(b.Fade,{...o,timeout:{appear:0,enter:300,exit:150},children:f.jsx(b.Box,{sx:a,children:e})}),n==="slide"&&f.jsx(b.Slide,{...o,timeout:{appear:0,enter:150,exit:150},direction:r,children:f.jsx(b.Box,{sx:a,children:e})}),n==="zoom"&&f.jsx(b.Zoom,{...o,children:f.jsx(b.Box,{sx:a,children:e})})]})});Ro.propTypes={children:g.node,type:g.oneOf(["grow","fade","collapse","slide","zoom"]),position:g.oneOf(["top-left","top-right","top","bottom-left","bottom-right","bottom"]),direction:g.oneOf(["up","down","left","right"])},x.forwardRef(function(t,n){return f.jsx(b.Zoom,{ref:n,timeout:200,...t})});function Xv({value:e,...t}){return f.jsxs(b.Box,{sx:{position:"relative",display:"inline-flex"},children:[f.jsx(b.CircularProgress,{variant:"determinate",value:e,...t}),f.jsx(b.Box,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:f.jsx(b.Typography,{variant:"caption",component:"div",color:"text.secondary",children:`${Math.round(e)}%`})})]})}Xv.propTypes={value:g.number};function Zv({value:e,size:t,variant:n,thickness:r,showLabel:o,pathColor:s,sx:a,...c}){return f.jsxs(b.Box,{sx:{position:"relative",display:"inline-flex"},children:[f.jsx(b.CircularProgress,{variant:"determinate",sx:{color:s||"grey.200"},size:t,thickness:r,...c,value:100}),o&&f.jsx(b.Box,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:f.jsx(b.Typography,{variant:"caption",component:"div",color:"text.secondary",children:e?`${Math.round(e)}%`:"0%"})}),f.jsx(b.CircularProgress,{variant:n,sx:{...a,position:"absolute",left:0,[`& .${b.circularProgressClasses.circle}`]:{strokeLinecap:"round"}},size:t,thickness:r,value:e,...c})]})}Zv.propTypes={value:g.number,size:g.number,variant:g.string,thickness:g.number,showLabel:g.bool,pathColor:g.string,sx:g.array,others:g.array};function _v({icon:e,value:t,...n}){return f.jsxs(b.Box,{sx:{display:"flex",alignItems:"center"},children:[f.jsx(b.Box,{sx:{width:"100%",mr:1},children:f.jsx(b.LinearProgress,{variant:"determinate",value:t,...n})}),f.jsx(b.Box,{sx:{minWidth:35},children:e})]})}_v.propTypes={icon:g.node,value:g.number};function qv({value:e,...t}){return f.jsxs(b.Box,{sx:{display:"flex",alignItems:"center"},children:[f.jsx(b.Box,{sx:{width:"100%",mr:1},children:f.jsx(b.LinearProgress,{variant:"determinate",value:e,...t})}),f.jsx(b.Box,{sx:{minWidth:35},children:f.jsx(b.Typography,{variant:"body2",color:"text.secondary",children:`${Math.round(e)}%`})})]})}qv.propTypes={value:g.number};const jF=x.forwardRef(function(t,n){const r=Br(t,{color:"text.primary"},{defaults:!0});return f.jsx(vs,{ref:n,...t,color:"secondary",variant:"text",sx:r})}),xs=x.forwardRef(function(t,n){const r=Br(t,{color:"text.primary",borderStyle:"none",padding:1,fontSize:"1.5rem",width:36,height:36},{defaults:!0});return f.jsx(b.ToggleButton,{ref:n,...t,color:"secondary",sx:r})});function $v(){const{open:e,anchorEl:t,handleClose:n,handleToggle:r}=ya(),[o,s]=ce.useLocaleState(),a=ce.useLocales();if(a.length===0)return null;const c=u=>{s(u),n()};return f.jsxs(f.Fragment,{children:[f.jsx(Im,{value:"locale",onClick:r,sx:{minWidth:"auto"},children:f.jsxs(b.Stack,{direction:"row",spacing:.5,children:[f.jsx(b.Typography,{variant:"body1",children:o.toUpperCase()}),e?f.jsx(Ze.CaretUpOutlined,{}):f.jsx(Ze.CaretDownOutlined,{})]})}),f.jsx(b.Menu,{id:"menu-appbar",anchorEl:t,keepMounted:!0,open:e,onClose:n,children:a.map((u,A)=>f.jsx(b.MenuItem,{onClick:()=>c(u.locale),children:u.name},A))})]})}const MF=ga(k.Toolbar,{slot:"Root"})(({theme:e})=>({...e.mixins.toolbar,backgroundColor:e.palette.background.paper,justifyContent:"flex-end","& .RaToolbar-defaultToolbar":{justifyContent:"right",paddingBottom:e.spacing(2),"& > *":{marginLeft:e.spacing(1)}},"& .MuiButtonBase-root":{marginLeft:e.spacing(1)}}));function yi(e){return f.jsx(MF,{...e})}function DF({children:e,content:t=!0,title:n,subheader:r=null,secondary:o=null,toolbar:s=!1,lg:a=12,md:c=12,sm:u=12,xs:A=12,...p}){const h=k.useTranslate(),C=k.useResourceContext(),{cardTitle:E,cardSubheader:m}=x.useMemo(()=>{const v=n||`resources.${C}.title`;return{cardTitle:h(v,{_:v}),cardSubheader:r!==null?h(r,{_:r}):null}},[C,r,n,h]);return f.jsx(b.Grid,{item:!0,...p,lg:a,md:c,sm:u,xs:A,children:f.jsx(ir,{content:t,title:E,subheader:m,secondary:o,divider:!0,children:f.jsxs(x.Fragment,{children:[e,s===!0?f.jsx(yi,{children:f.jsx(k.SaveButton,{})}):s]})})})}const kF=ue(k.Form,{slot:"root"})(({theme:e,spacing:t})=>({backgroundColor:"transparent","& .RaToolbar-desktopToolbar":{marginTop:e.spacing(t*1.25),padding:0,minHeight:"unset"},"& .RaToolbar-mobileToolbar":{paddingTop:`${e.spacing(2.5)} !important`,paddingRight:"0 !important",paddingLeft:"0 !important",paddingBottom:"0 !important"}}));function eB({children:e,spacing:t,defaultValues:n,...r}){const{spacing:o}=bn();return f.jsx(kF,{defaultValues:n,spacing:t||o,children:f.jsx(b.Grid,{container:!0,...r,spacing:t||o,children:e})})}eB.Section=DF;const RF=ga(k.SimpleForm,{slot:"Root"})(({theme:e})=>({[e.breakpoints.down("sm")]:{paddingBottom:`${e.spacing(2.5)}`}}));function tB({title:e,modal:t=!1,content:n=!1,subheader:r=null,toolbar:o=f.jsx(yi,{children:f.jsx(k.SaveButton,{type:"button"})}),secondary:s=f.jsx(si,{children:f.jsx(k.DeleteWithConfirmButton,{})}),sx:a,...c}){const u=nf(e),A=k.useRecordContext(),p=cd();return f.jsx(ir,{content:n,title:u,subheader:r,secondary:A!=null&&A.id?s:null,sx:{...a,"& .MuiToolbar-root":{position:"initial",paddingLeft:p.spacing(2.5),paddingRight:p.spacing(2.5),paddingBottom:p.spacing(2.5),paddingTop:t?p.spacing(2.5):0,borderTop:t?`1px solid ${p.palette.divider}`:void 0}},border:!t,divider:!0,children:f.jsx(RF,{toolbar:o,...c})})}function nB({label:e,children:t,display:n="label",helperText:r,sx:o,addLabel:s,divider:a=!1,fullWidth:c,...u}){const A=xt.useTheme(),{getCurrentDialog:p}=ai(),{source:h,resource:C,isRequired:E}=u,{getFieldState:m,formState:v}=ri.useFormContext(),{error:B}=m(h,v),w=p();return f.jsxs(b.Stack,{spacing:1,sx:{"& .MuiFormHelperText-root":{color:B?A.palette.error.main:A.palette.text.secondary,"& span":{display:"none"}},width:c?"100%":"auto",...o},children:[n==="label"&&e!==!1&&s!==!1&&f.jsx(b.InputLabel,{error:!!B,sx:{borderBottom:a?`1px solid ${A.palette.divider}`:"none",pb:a?1:0,mt:a?1:0,pt:1},children:f.jsx(k.FieldTitle,{label:e,source:h,resource:w||C,isRequired:E})}),x.isValidElement(t)?x.cloneElement(t,{...t.props,...u,label:n==="legend"?e:!1}):t,n==="label"&&r&&f.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:!!B,children:r})]})}const FF=ue(k.ArrayInput,{slot:"root"})(({theme:e})=>({"& .MuiStack-root > label":{marginTop:e.spacing(2)},"& .MuiInputLabel-shrink":{paddingBottom:0},marginTop:"0 !important","& .RaSimpleFormIterator-line > .RaSimpleFormIterator-form":{paddingBottom:e.spacing(.5),"& > div":{width:"100%"}}}));function LF({label:e,addLabel:t,source:n,helperText:r,divider:o=!0,...s}){return f.jsx(nB,{label:e,addLabel:t,source:n,helperText:r,divider:o,fullWidth:s==null?void 0:s.fullWidth,children:f.jsx(FF,{source:n,label:!1,...s})})}function NF({canEdit:e=!0,canDelete:t=!0,canClone:n=!1}){return!e&&!t&&!n?null:f.jsxs(si,{children:[e&&f.jsx(k.EditButton,{}),t&&f.jsx(k.DeleteWithConfirmButton,{}),n&&f.jsx(k.CloneButton,{})]})}const rB=ue("div",{overridesResolver:(e,t)=>t.root})({display:"inline-block"}),VF=ue("ul")({display:"inline-block"});function HF(e){var p;const{className:t,emptyText:n,source:r,title:o,...s}=e,a=ce.useRecordContext(e),c=ct.get(a,r),u=ce.useTranslate();if(!c)return n?f.jsx(b.Typography,{component:"span",variant:"body2",className:t,...s,children:n&&u(n,{_:n})}):f.jsx(rB,{className:t,...s});if(Array.isArray(c))return f.jsx(VF,{className:t,...s,children:c.map((h,C)=>{var m;const E=o instanceof String?(m=ct.get(h,o))==null?void 0:m.toString():o;return f.jsx("li",{children:E},C)})});const A=o instanceof String?(p=ct.get(a,o))==null?void 0:p.toString():o;return f.jsx(rB,{className:t,...s,children:A})}function oB({entityId:e,property:t,disabled:n,showUser:r=!1,userResource:o="entities/user",...s}){const[a,c]=x.useState(null),u=k.useRecordContext(s),A=k.useDataProvider(),p=k.useResourceContext(),h=x.useCallback(async m=>{m.preventDefault(),m.stopPropagation();const v=ct.get(u,s==null?void 0:s.source),B=p.replace("entities/",""),w=await A.getFile(`/attachments/${B}/${e||(u==null?void 0:u.id)}/${t||(s==null?void 0:s.source)}/${(v==null?void 0:v.id)||(u==null?void 0:u.id)}`),M=document.createElement("a");M.href=w,M.download=ct.get(u,(s==null?void 0:s.title)||(s==null?void 0:s.source)),M.click()},[A,u,e,p,t,s==null?void 0:s.source,s==null?void 0:s.title]),C=x.useMemo(()=>({...u,[s==null?void 0:s.source]:(u==null?void 0:u.src)||ct.get(u,s==null?void 0:s.source),[s==null?void 0:s.title]:(u==null?void 0:u.title)||ct.get(u,(s==null?void 0:s.title)||(s==null?void 0:s.source))}),[u,s==null?void 0:s.source,s==null?void 0:s.title]),E=k.useTranslate();return x.useEffect(()=>{!u||!(u!=null&&u.userId)||r===!1||A.getOne(o,{id:u==null?void 0:u.userId}).then(({data:m})=>c(m)).catch(()=>c(null))},[u,A,o]),f.jsx(HF,{...s,disabled:n,record:C,onClick:h,title:f.jsxs(b.Box,{sx:{cursor:"pointer"},children:[f.jsx(b.Typography,{variant:"subtitle1",children:ct.get(C,(s==null?void 0:s.title)||(s==null?void 0:s.source))}),f.jsxs(b.Typography,{variant:"caption",color:"secondary",children:[ct.get(C,"sizeDescription"),r&&a&&" | ",r&&a&&E("ra.attachment.info",{user:a==null?void 0:a.name,created:Nr(C==null?void 0:C.createdAt).format("DD/MM/YYYY HH:mm")})]})]})})}const zF=ue(k.ImageField,{slot:"root"})(()=>({}));function iB(e){const t=`_${e==null?void 0:e.source}`;return f.jsx(zF,{...e,source:t})}function sB({width:e=150,height:t=150,circle:n=!1,justify:r="flex-start",record:o,...s}){const a=x.useMemo(()=>({width:typeof e=="number"?`${e}px !important`:`${e} !important`,height:typeof t=="number"?`${t}px !important`:`${t} !important`,borderRadius:n?"50%":1.5}),[e,t,n]),c=k.useRecordContext(),u=o||c;return f.jsx(iB,{sx:A=>({margin:0,display:"flex",justifyContent:r,"& img":{margin:"0px !important",border:`1px solid ${A.palette.divider}`,objectFit:"cover !important",...a,minWidth:a.width,minHeight:a.height}}),...s,record:u})}var aB={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(In,function(){return function(n,r,o){n=n||{};var s=r.prototype,a={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function c(A,p,h,C){return s.fromToBase(A,p,h,C)}o.en.relativeTime=a,s.fromToBase=function(A,p,h,C,E){for(var m,v,B,w=h.$locale().relativeTime||a,M=n.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],Q=M.length,P=0;P<Q;P+=1){var S=M[P];S.d&&(m=C?o(A).diff(h,S.d,!0):h.diff(A,S.d,!0));var D=(n.rounding||Math.round)(Math.abs(m));if(B=m>0,D<=S.r||!S.r){D<=1&&P>0&&(S=M[P-1]);var R=w[S.l];E&&(D=E(""+D)),v=typeof R=="string"?R.replace("%d",D):R(D,p,S.l,B);break}}if(p)return v;var G=B?w.future:w.past;return typeof G=="function"?G(v):G.replace("%s",v)},s.to=function(A,p){return c(A,p,this,!0)},s.from=function(A,p){return c(A,p,this)};var u=function(A){return A.$u?o.utc():o()};s.toNow=function(A){return this.to(u(this),A)},s.fromNow=function(A){return this.from(u(this),A)}}})})(aB);var WF=aB.exports;const UF=Xr(WF);var YF={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(In,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(n){var r=["th","st","nd","rd"],o=n%100;return"["+n+(r[(o-20)%10]||r[o]||r[0])+"]"}}})})(YF);var GF={exports:{}};(function(e,t){(function(n,r){e.exports=r(pm)})(In,function(n){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var o=r(n),s={name:"it",weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un' ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(a){return a+"º"}};return o.default.locale(s,null,!0),s})})(GF),Nr.extend(UF);function lB(e){const t=k.useRecordContext(e),[n]=k.useLocaleState(),r=x.useMemo(()=>Nr(ct.get(t,e==null?void 0:e.source)).locale(n).fromNow(),[t,e==null?void 0:e.source,n]);return f.jsxs(x.Fragment,{children:[f.jsx(k.DateField,{record:t,source:e.source,showTime:!0}),f.jsx("br",{}),f.jsx(b.Typography,{variant:"caption",color:"textSecondary",children:r})]})}const KF=ue(k.DateField,{slot:"Root"})(()=>({}));function JF({variant:e="body1",...t}){return f.jsx(KF,{...t,variant:e})}const XF=ue(k.EmailField,{slot:"Root"})(()=>({}));function ZF({variant:e="body1",...t}){return f.jsx(XF,{...t,variant:e})}const _F=ue(k.FileField,{slot:"root"})(()=>({}));function cB({...e}){const t=k.useRecordContext(e),n=x.useCallback(r=>{r.preventDefault(),r.stopPropagation();const o=ct.get(t,`_${e==null?void 0:e.source}`,ct.get(t,e==null?void 0:e.source)),s=ct.get(t,(e==null?void 0:e.title)||(e==null?void 0:e.source))||(e==null?void 0:e.title),a=document.createElement("a");a.href=o,a.download=s,a.click()},[e==null?void 0:e.source,t,e==null?void 0:e.title]);return f.jsx(_F,{...e,record:t,onClick:n})}function qF({variant:e="body1",...t}){return f.jsx(k.FunctionField,{...t,variant:e})}const $F=ue(k.TextField,{slot:"Root"})(()=>({}));function uB({variant:e="body1",...t}){return f.jsx($F,{...t,variant:e})}function e6(e){const t=b.useTheme(),n=ce.useLocales(),{source:r=""}=e,o=ce.useRecordContext(e),s=o[r],a=!rf(s,n),c=Br(e,{flex:1}),[u]=ce.useLocaleState(),A=x.useMemo(()=>a?f.jsx(Ze.FlagFilled,{style:{color:t.palette.warning.main}}):f.jsx(Ze.FlagOutlined,{}),[a]),p=x.useMemo(()=>f.jsx(b.Stack,{children:ne.map(n,(h,C)=>f.jsx(b.Typography,{children:`${h.locale.toUpperCase()}: ${(s??{})[h.locale]??""}`},C))}),[s,n]);return f.jsx(ou,{title:p,arrow:!1,children:f.jsxs(b.Stack,{alignItems:"center",direction:"row",gap:1,children:[A,f.jsx(uB,{...e,source:`${r}.${u}`,sx:c})]})})}const t6=ue("div")(({theme:e,fullWidth:t})=>({borderBottom:`1px solid ${e.palette.divider}`,paddingTop:e.spacing(1),paddingBottom:e.spacing(1),marginBottom:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",width:t?"100%":"auto",[e.breakpoints.down("sm")]:{whiteSpace:"normal",overflow:"visible",textOverflow:"inherit"}})),n6=({source:e,defaultValue:t=" ",...n})=>{const r=k.useRecordContext(n),o=ct.get(r,e,t);return f.jsx(b.Typography,{...n,dangerouslySetInnerHTML:{__html:o&&o!==null?o:t}})},r6=({title:e,children:t})=>t==null?null:typeof e=="string"||e===!0?f.jsx(b.Tooltip,{title:e,placement:"top",children:t}):t;function o6({label:e,source:t,defaultValue:n=" ",children:r=f.jsx(n6,{source:"",defaultValue:void 0,record:void 0}),tooltip:o,...s}){const{getCurrentDialog:a}=ai(),c=k.useRecordContext(s),u=k.useResourceContext(s),A=a(),p=x.useMemo(()=>o===!1?!1:typeof o=="function"?o(c):typeof o=="string"?ct.get(c,o,o):o,[c,o]),h=Br(s,{width:s!=null&&s.fullWidth?"100%":"auto"});return f.jsx(r6,{title:p,children:f.jsxs(x.Fragment,{children:[f.jsx(b.InputLabel,{sx:{pt:1},children:f.jsx(k.FieldTitle,{label:e,source:t,resource:A||u})}),f.jsx(t6,{...s,children:x.cloneElement(r,{source:t,record:c,defaultValue:n,resource:A||u,sx:h})})]})})}const i6=ga(function({children:e=null,className:t=""}){return f.jsx("div",{className:t,children:e})},{slot:"root"})(({theme:e,bulkActionButtons:t})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,"&>div:first-of-type":{alignItems:"center","& form":{padding:e.spacing(2.5)},"& .MuiToolbar-root":{alignItems:"center",padding:"0 !important",marginTop:e.spacing(1),[e.breakpoints.up("sm")]:{marginLeft:e.spacing(2),marginRight:e.spacing(2),width:`calc(100% - ${e.spacing(4)})`},[e.breakpoints.down("md")]:{marginTop:0,display:"contents"}}},"& .RaDatagrid-root":{overflowX:"auto",paddingTop:t===!1?0:48,[e.breakpoints.down("sm")]:{width:"calc(100vw - 26px)"},"& .RaBulkActionsToolbar-toolbar":{borderRadius:0,"& > .RaBulkActionsToolbar-title":{alignItems:"center"},[e.breakpoints.down("sm")]:{paddingLeft:e.spacing(3)}},"& .RaDatagrid-table":{borderBottom:`1px solid ${e.palette.divider}`}},"& .MuiTablePagination-toolbar":{marginTop:"0 !important",marginBottom:"0 !important"},"& .RaBulkActionsToolbar-collapsed.RaBulkActionsToolbar-toolbar":{minHeight:0}}));function AB(e){return f.jsx(i6,{...e,children:f.jsx(k.ReferenceManyField,{pagination:f.jsx(k.Pagination,{}),...e})})}function s6({source:e,...t}){const n=k.useRecordContext(t),r=ct.get(n,e,0),o=r/1024,s=o/1024,a=s/1024,c=a>1?`${a.toFixed(2)} GB`:s>1?`${s.toFixed(2)} MB`:o>1?`${o.toFixed(2)} KB`:`${r.toFixed(2)} B`;return f.jsx(b.Typography,{component:"span",variant:"body1",...t,children:c})}function pn({label:e,children:t,display:n="label",helperText:r,sx:o,addLabel:s,divider:a=!1,...c}){const u=wt(),{getCurrentDialog:A}=ai(),{source:p,resource:h,isRequired:C}=c,{fieldState:{invalid:E}}=k.useInput(c),m=A();return f.jsxs(b.Stack,{spacing:1,sx:{width:c!=null&&c.fullWidth?"100%":"auto","& .MuiFormHelperText-root":{color:E?u.palette.error.main:u.palette.text.secondary,"& span":{display:"none"}},...o},children:[n==="label"&&e!==!1&&s!==!1&&f.jsx(b.InputLabel,{error:E===!0,sx:{borderBottom:a?`1px solid ${u.palette.divider}`:"none",pt:.5,pb:a?1:0,mt:a?1:0},children:f.jsx(k.FieldTitle,{label:e,source:p,resource:m||h,isRequired:C})}),x.isValidElement(t)?x.cloneElement(t,{...t.props,...c,label:n==="legend"?e:!1}):t,n==="label"&&r&&f.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:E===!0,children:r})]})}const a6=e=>e?{"& .RaFileInput-removeButton > .RaFileInputPreview-removeButton":{display:"none",visiblity:"hidden"},"& .RaFileInput-dropZone":{display:"none",visiblity:"hidden"}}:{},l6=ue(k.FileInput,{slot:"root"})(({disabled:e,theme:t})=>({"& .previews":{},"& .previews>div":{marginTop:t.spacing(1),padding:t.spacing(1.5),border:`1px solid ${t.palette.divider}`,borderRadius:t.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:t.palette.action.hover},"& .MuiLink-root":{fontSize:t.typography.body1.fontSize}},...a6(e)}));function c6({children:e=f.jsx(oB,{title:"name",source:"path"}),multiple:t=!0,disabled:n=!1,type:r="attachment",...o}){const s=k.useRecordContext(o),a=o==null?void 0:o.source,c=s==null?void 0:s.id;return k.useInput({source:`__${r}__${o==null?void 0:o.source}`,defaultValue:o==null?void 0:o.source}),f.jsx(pn,{...o,disabled:n,children:f.jsx(l6,{type:r,multiple:t,disabled:n,children:x.cloneElement(e,{...e.props,entityId:c,property:a})})})}const u6=ue(k.AutocompleteArrayInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"},"& .MuiOutlinedInput-root.MuiInputBase-sizeSmall:has(.MuiChip-root)":{paddingBottom:"4px"},"& .MuiAutocomplete-tag":{margin:"0px 4px 4px 0px"}}));function A6({size:e="small",...t}){return f.jsx(pn,{...t,children:f.jsx(u6,{size:e})})}const d6=ue(k.AutocompleteInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"}}));function f6({size:e="small",...t}){const{perPage:n,...r}=t;return f.jsx(pn,{...r,children:f.jsx(d6,{size:e})})}const g6=ue(k.BooleanInput,{slot:"Root"})(()=>({marginTop:"0 !important"}));function p6({...e}){const t=xt.useTheme();return f.jsx(pn,{...e,children:f.jsx(g6,{sx:{"& .MuiFormControlLabel-root":{marginLeft:"0 !important",marginRight:"0 !important"},"& .MuiSwitch-root":{margin:"0 !important",marginTop:e.display==="legend"?0:`${t.spacing(1)} !important`}}})})}const h6=ue(k.DateInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function C6(e){return f.jsx(pn,{...e,children:f.jsx(h6,{})})}const E6=ue(k.DateTimeInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function m6(e){return f.jsx(pn,{...e,children:f.jsx(E6,{})})}const I6=ue(k.FileInput,{slot:"root"})(({theme:e})=>({"& .previews":{},"& .previews>div":{marginTop:e.spacing(1),padding:e.spacing(1.5),border:`1px solid ${e.palette.divider}`,borderRadius:e.shape.borderRadius,"& button":{float:"right",placeItems:"flex-end",verticalAlign:"middle"},"&:hover":{backgroundColor:e.palette.action.hover},"& .MuiLink-root":{fontSize:e.typography.body1.fontSize}}}));function v6({children:e=f.jsx(cB,{source:"",title:""}),title:t,...n}){const r=ri.useWatch({name:n.source}),o=k.useRecordContext(n),{source:s}=n,a=x.useMemo(()=>{if(r&&(r!=null&&r.title))return r==null?void 0:r.title;const c=ct.get(o,s);if(c){const u=c.split("__");return u.length>0?u[u.length-1]:c}return c},[o,s,r]);return f.jsx(pn,{...n,children:f.jsx(I6,{children:x.cloneElement(e,{...e.props,title:t||s,source:s,record:{...o,[s]:(r==null?void 0:r.title)||ct.get(o,s),[`_${s}`]:(r==null?void 0:r.src)||ct.get(o,`_${s}`),[t||s]:a}})})})}function B6({children:e=f.jsx(sB,{}),title:t,multiple:n=!1,...r}){const o=ri.useWatch({name:r.source}),s=k.useRecordContext(r),{source:a}=r;return k.useInput({source:`__image__${r==null?void 0:r.source}`,defaultValue:r==null?void 0:r.source}),f.jsx(pn,{...r,multiple:n,children:f.jsx(k.ImageInput,{accept:"image/*",children:x.cloneElement(e,{...e.props,title:t,source:a,record:{...s,[a]:(o==null?void 0:o.title)||ct.get(s,a),[`_${a}`]:(o==null?void 0:o.src)||ct.get(s,`_${a}`)}})})})}function br(e){return f.jsx(pn,{...e,children:f.jsx(k.TextInput,{})})}const y6={vertical:"bottom",horizontal:"right"},b6={vertical:"top",horizontal:"right"};function Q6(e){const{source:t}=e,{fieldState:n}=ce.useInput(e),r=ri.useWatch({name:t}),{error:o}=n,s=ce.useLocales(),a=!rf(r,s),[c]=ce.useLocaleState(),[u,A]=x.useState(c),[p,h]=x.useState(null),C=!!p,E=x.useCallback(B=>h(C?null:B.currentTarget),[C,h]),m=x.useCallback(()=>h(null),[h]),v=x.useMemo(()=>ne.map(s,(B,w)=>f.jsx(b.MenuItem,{onClick:()=>{A(B.locale),m()},children:f.jsx(b.ListItemText,{primary:`${B.locale.toUpperCase()}: ${(r??{})[B.locale]??""}`})},w)),[s,A,m,r]);return f.jsx(pn,{...e,helperText:o==null?void 0:o.message,children:f.jsxs(b.Box,{flex:1,children:[ne.map(s,(B,w)=>f.jsx(br,{...e,source:`${t}.${B.locale}`,sx:{width:"100%",display:B.locale===u?"inline-flex":"none"},label:!1,InputProps:{endAdornment:f.jsx(b.Chip,{label:f.jsx(b.Typography,{variant:"button",children:u}),size:"small",onClick:E,color:a?"warning":void 0})}},w)),f.jsx(b.Menu,{anchorEl:p,open:C,anchorOrigin:y6,transformOrigin:b6,onClose:m,children:v})]})})}const x6=ue(k.NumberInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function w6(e){return f.jsx(pn,{...e,children:f.jsx(x6,{})})}function T6({source:e,minWidth:t=300,children:n}){const r=k.useResourceContext(),o=k.useRecordContext(),[s,a]=x.useState(ct.get(o,e,"")),[c,u]=x.useState(!1),A=x.useCallback(m=>a(m.target.value),[]),p=k.useDataProvider(),h=x.useCallback(m=>{m.key==="Enter"&&(u(!0),p.update(r,{id:o.id,data:{...o,[e]:s,_changed:e},previousData:o}).then(()=>u(!1)))},[s,p,r,o,e]),C=x.useCallback(()=>{ct.get(o,e)!==s&&(u(!0),p.update(r,{id:o.id,data:{...o,[e]:s,_changed:e},previousData:o}).then(()=>u(!1)))},[s,p,r,e,o]),E=x.useCallback(m=>{u(!0),p.update(r,{id:o.id,data:{...o,[e]:m,_changed:e},previousData:o}).then(()=>u(!1))},[p,r,e,o]);return x.useEffect(()=>a(ct.get(o,e)),[o,e]),n?x.cloneElement(n,{...n.props,source:e,value:s,onChange:E}):f.jsx(b.TextField,{value:s,disabled:c,onChange:A,onKeyPress:h,onBlur:C,style:{minWidth:t,width:"100%"},multiline:!0,InputProps:{"arial-label":"naked"},size:"small"})}function S6({children:e,...t}){return f.jsx(k.ReferenceArrayInput,{...t,children:x.cloneElement(e,{...t,source:e.props.source||t.source})})}function P6({children:e,...t}){return f.jsx(k.ReferenceInput,{...t,children:x.cloneElement(e,{...t,source:e.props.source||t.source})})}function O6({reference:e,target:t,children:n,filters:r,actions:o,...s}){return f.jsx(k.ResourceContextProvider,{value:e,children:f.jsx(AB,{perPage:5,pagination:f.jsx(k.Pagination,{}),...s,reference:e,target:t,children:f.jsxs(x.Fragment,{children:[f.jsx(k.ListToolbar,{filters:r,actions:o}),n]})})})}const j6=ue(k.SearchInput,{slot:"root"})(()=>({}));function M6(e){return f.jsx(j6,{...e})}const D6=ue(k.SelectArrayInput,{slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiFormLabel-root.MuiInputLabel-root":{marginTop:"-3px"},"& .MuiInputLabel-root.MuiInputLabel-shrink":{marginTop:0},"& .MuiOutlinedInput-input:has(.MuiChip-root)":{paddingTop:"4px",paddingBottom:"6px",paddingLeft:"6px"}}));function k6({optionText:e="name",optionValue:t="id",...n}){return f.jsx(pn,{...n,children:f.jsx(D6,{optionText:e,optionValue:t,options:{autoWidth:!1}})})}const R6=ue(k.SelectInput,{slot:"Root"})(({label:e})=>({"& legend":{width:e===!1||e===null?0:"auto"}}));function F6(e){return f.jsx(pn,{...e,children:f.jsx(R6,{})})}function L6({multiline:e=!1,...t}){var u,A;const n=k.useTranslate(),r=k.maxLength(t==null?void 0:t.maxLength,"app.input.max_length_error"),o=(A=(u=ri.useController({name:t==null?void 0:t.source}))==null?void 0:u.field)==null?void 0:A.value;let s=t.helperText,a=t.validate;a?Array.isArray(a)&&a.indexOf(r)===-1&&a.push(r):a=[r];const c=n("app.input.max_length_info",{count:(o==null?void 0:o.length)||0,max:t==null?void 0:t.maxLength});return t!=null&&t.maxLength&&(s=s&&s.length>0?`${c} - ${n(s)}`:c),f.jsx(br,{...t,validate:a,helperText:s,multiline:e,inputProps:{maxLength:t==null?void 0:t.maxLength}})}function N6(e){if(!e)return"";const t=hm(e);return t?t.format("HH:mm"):""}function V6(e){return e}const H6=ue(k.TimeInput,{slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}}));function z6({parse:e=V6,format:t=N6,...n}){return f.jsx(pn,{...n,children:f.jsx(H6,{parse:e,format:t,...n})})}function Bg({onSuccess:e,firstAccess:t}){const{spacing:n}=bn(),[r,o]=x.useState(!1),s=ce.useAuthProvider(),a=ce.useTranslate(),c=ce.useNotify(),u=x.useCallback(A=>{const{oldPassword:p,newPassword:h}=A;o(!0),s==null||s.changePassword(p,h).then(()=>{c("ra.auth.password_changed"),e()}).catch(C=>{c((C==null?void 0:C.message)||(C==null?void 0:C.toString()),{type:"error"})}).finally(()=>o(!1))},[s,e]);return f.jsx(ce.ResourceContextProvider,{value:"user/change-password",children:f.jsx(ce.EditContextProvider,{value:{record:{},resource:"user/change-password",save:u},children:f.jsx(tB,{onSubmit:u,toolbar:f.jsx(yi,{children:f.jsx(k.SaveButton,{disabled:r})}),children:f.jsxs(b.Grid,{container:!0,spacing:n,children:[t===!0&&f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.Alert,{severity:"warning",children:[f.jsx(b.AlertTitle,{children:a("ra.auth.first_access.change_password")}),a("ra.auth.first_access.change_password_helper")]})}),f.jsx(b.Grid,{item:!0,xs:12,children:f.jsx(br,{source:"oldPassword",type:"password",validate:ce.required()})}),f.jsx(b.Grid,{item:!0,xs:12,children:f.jsx(br,{source:"newPassword",type:"password",validate:ce.required()})})]})})})})}const dB=x.createContext({});function W6(e){const{useDefaults:t=!1,queryOptions:n={}}=e,r=k.useResourceContext(),o=k.useDataProvider(),{search:s}=Yi.useLocation(),a=`${r}/new`,c=x.useCallback(()=>{if(!t||!ne.isFunction(o.get))return Promise.resolve({});const C={};return new URLSearchParams(s??"").forEach((E,m)=>{C[m]=E}),o.get(a,C).then(E=>E.data).then(E=>{const{responseCode:m,value:v}=E;return m==="ok"?v:Promise.reject(E)})},[r,t,s,o]),u=x.useMemo(()=>ne.chain(n).extend({queryKey:[r,s],queryFn:c}).value(),[r,s,c,n]),{data:A,isLoading:p}=Gi.useQuery(u),h=ne.omit(e,["useDefaults"]);return p?f.jsx(b.Stack,{alignItems:"center",justifyContent:"center",flex:1,p:2,children:f.jsx(b.CircularProgress,{})}):f.jsx(dB.Provider,{value:A??{},children:f.jsx(k.Create,{...h})})}function U6(){return x.useContext(dB)}const Y6=ue(W6,{slot:"root"})(({theme:e})=>({"& .RaCreate-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaCreate-main":{marginTop:0},"& .RaCreate-main>.MuiPaper-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaToolbar-mobileToolbar":{position:"initial !important",paddingLeft:`${e.spacing(2.5)} !important`,paddingRight:`${e.spacing(2.5)} !important`,paddingTop:"0 !important"},"& .RaCreate-main:has(.LongFormView)>.MuiPaper-root:first-of-type":{overflow:"visible"},"& .RaCreate-main:has(.tabbed-form) .MuiTableContainer-root":{width:"inherit"}})),G6=ue(k.Edit,{slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaEdit-card":{[e.breakpoints.down("sm")]:{marginBottom:e.spacing(6)}},"& .RaEdi-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaToolbar-mobileToolbar":{position:"initial !important",paddingLeft:`${e.spacing(2.5)} !important`,paddingRight:`${e.spacing(2.5)} !important`,paddingTop:"0 !important"},"& .RaEdit-main":{marginTop:0},"& .RaEdit-main>.MuiPaper-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaEdit-main:has(.LongFormView)>.MuiPaper-root:first-of-type":{overflow:"visible"},"& .RaEdit-main:has(.tabbed-form) .MuiTableContainer-root":{width:"inherit"}}));function K6(e){return f.jsx(G6,{...e})}const J6=ue(b.CardHeader)(({theme:e})=>({marginTop:e.spacing(2.5),marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0})),X6=ue(b.Divider)(({theme:e})=>({marginLeft:`-${e.spacing(2.5)}`,marginRight:`-${e.spacing(2.5)}`,marginBottom:e.spacing(2),width:`calc(100% + ${e.spacing(5)})`}));function Z6({title:e,divider:t=!0,variant:n="h5"}){const r=k.useTranslate();return f.jsxs(x.Fragment,{children:[f.jsx(J6,{title:r(e,{_:e}),titleTypographyProps:{variant:n}}),t&&f.jsx(X6,{})]})}const _6=ue(b.Grid,{name:"LongFormView",slot:"Root"})(({theme:e})=>({"& .MuiToolbar-root.RaToolbar-desktopToolbar":{position:"initial",marginLeft:`-${e.spacing(3)}`,marginRight:`-${e.spacing(3)}`,marginBottom:`-${e.spacing(2)}`,paddingTop:e.spacing(2.5),paddingBottom:e.spacing(2.5),[e.breakpoints.down("sm")]:{position:"initial !important",width:"auto !important",marginRight:0}},"& .RaToolbar-mobileToolbar":{position:"initial !important",paddingTop:`${e.spacing(2.5)} !important`,paddingLeft:"0 !important",paddingRight:"0 !important",paddingBottom:"0 !important"},"& form > .MuiToolbar-root":{margin:0,marginRight:`-${e.spacing(.5)}`,[e.breakpoints.down("sm")]:{marginRight:e.spacing(.5)}}}));function fB(e){const{spacing:t}=bn(),{spacing:n=t}=e,r=ne.omit(e,["spacing"]);return f.jsx(k.Form,{...r,className:"LongFormView",children:f.jsx(_6,{container:!0,spacing:n*2,children:e.children})})}function gB(e){const{disposition:t={xl:9,lg:9,md:8,sm:8,xs:12}}=e,n=ne.omit(e,["disposition"]);return f.jsx(b.Grid,{...n,item:!0,...t,children:e.children})}function yg(e){return e.id??e.label}function pB(e,t){const n=`^${e}.`.replaceAll(".","\\."),r=new RegExp(n,"g");return t.match(r)!==null}function q6(e){return ne.map(e,"id")}function iu(e){const t=e.match(new RegExp("[^.]+","g"));return t===null?0:t.length}function hB(e,t){const n=e!==void 0?iu(e):0;return ne.chain(t).filter(o=>e!==void 0?pB(e,o.id):!0).filter(o=>iu(o.id)===n+1).value()}function $6(e,t){var s;const n=ne.clone(e),{type:r,payload:o}=t;switch(r){case"setFormRootPath":return ne.extend(n,{formRootPath:o});case"setSyncWithLocation":return ne.extend(n,{syncWithLocation:o});case"setErrorCount":return ne.extend(n,{errorCount:o});case"setActiveItem":return ne.includes(q6(e.items),o)?ne.extend(n,{activeItem:o}):n;case"addItem":{const{id:a}=o;return ne.extend(n,{items:ne.chain(n.items).clone().reject(c=>c.id===a).concat([o]).orderBy(c=>c.index).value()})}case"removeItem":{const a=ne.isString(o)?o:o.id,c=ne.chain(n.items).clone().reject(u=>u.id===a).value();return ne.extend(n,{items:c}),n.activeItem===a&&ne.extend(n,{activeItem:((s=ne.first(c))==null?void 0:s.id)??void 0}),n}default:return n}}const e8={syncWithLocation:!0,errorCount:!0,items:[],activeItem:void 0},CB=x.createContext(void 0);function EB(e){const t=!!(e.syncWithLocation??!0),n=!!(e.errorCount??!0),{rootMatchString:r}=e,{pathname:o}=Yi.useLocation(),[s,a]=x.useReducer($6,ne.cloneDeep(e8)),{formRootPath:c,items:u}=s,A=x.useMemo(()=>({state:s,dispatch:a}),[s,a]);return x.useEffect(()=>{const p=["entities/:resource/create/*",":resource/create/*","entities/:resource/:id/show/*",":resource/:id/show/*","entities/:resource/:id/*",":resource/:id/*"];r!==void 0&&p.push(r);const h=ne.chain(p).map(E=>Yi.matchPath(E,o)).reject(E=>E===null).first().value(),C=h==null?void 0:h.pathnameBase;C!==void 0&&C!==c&&a({type:"setFormRootPath",payload:C})},[o,c,r]),x.useEffect(()=>{a({type:"setSyncWithLocation",payload:!!t})},[t,a]),x.useEffect(()=>{a({type:"setErrorCount",payload:!!n})},[n,a]),x.useEffect(()=>{var p;if(t&&c!==void 0){let h=o.replace(c,"").replace(new RegExp(/^\/?/),"");ne.isEmpty(h)&&(h=((p=ne.chain(u).filter(C=>hB(C.id,u).length===0).orderBy([C=>iu(C.id),C=>C.index]).first().value())==null?void 0:p.id)??void 0),a({type:"setActiveItem",payload:h})}},[a,c,o,u]),f.jsx(CB.Provider,{value:A,children:e.children})}function mB(){const e=x.useContext(CB);if(e===void 0)throw new Error("[LongForm] useFormContext: context undefined. Please provide a valid Context using LongForm.Provider");return e}function Ja(){return mB().state}function bg(){return mB().dispatch}function IB(){return Ja().formRootPath}function vB(){return Ja().activeItem}function BB(){return Ja().items}function yB(){return Ja().syncWithLocation}function bB(){return Ja().errorCount}function QB(){const e=bg();return x.useCallback(n=>{e({type:"setActiveItem",payload:n})},[e])}function xB(){const e=bg();return x.useCallback(n=>{e({type:"addItem",payload:n})},[e])}function wB(){const e=bg();return x.useCallback(n=>{e({type:"removeItem",payload:n})},[e])}function TB(e){const t=vB();return t===void 0?!1:e===t||pB(e,t)}function SB(e){const t=BB();return x.useMemo(()=>hB(e,t),[t,e])}function t8(){const e=IB(),{search:t}=Yi.useLocation(),n=Yi.useNavigate();return x.useCallback(o=>{n(`${e}/${o}${t}`)},[e,n])}function PB(){const e=SB();return f.jsx(b.Card,{variant:"outlined",children:f.jsx(b.List,{sx:{"& .MuiListItemButton-root.Mui-selected":{borderColor:"palette.primary.main",borderRightStyle:"solid",borderRightWidth:2},"& .MuiListItemAvatar-root":{minWidth:24}},children:ne.map(e,(t,n)=>f.jsx(Qg,{...t},n))})})}function Qg(e){const t=ce.useTranslate()??ne.identity,n=OB(e),{selected:r,label:o,icon:s,onClick:a,badge:c,items:u,isGroup:A,level:p,errors:h=0}=n,{spacing:C}=bn(),[E,m]=x.useState(r),v=x.useCallback(M=>{m(!E),a(M)},[a,E]),B=s!==void 0,w=ne.omit(e,["label","icon","selected","badge"]);return x.useEffect(()=>{r&&!E&&m(r)},[r,E,m]),f.jsxs(f.Fragment,{children:[f.jsx(b.ListItem,{...w,disablePadding:!0,children:f.jsxs(b.ListItemButton,{selected:r&&!A,onClick:v,sx:{pl:C*p},children:[B&&f.jsx(b.ListItemIcon,{children:s}),f.jsx(b.ListItemText,{inset:!B,primary:h===0?t(o):f.jsx(b.Badge,{variant:"dot",color:"error",sx:{"& > .MuiBadge-badge":{transform:"scale(1) translate(125%, 0)"}},children:t(o)})}),c&&f.jsx(b.ListItemAvatar,{children:f.jsx(Na,{type:"filled",size:"xs",color:c.color??"default",children:c.content})}),A&&(E?f.jsx(_n.ExpandLess,{}):f.jsx(_n.ExpandMore,{}))]})}),A&&f.jsx(b.Collapse,{in:E,timeout:"auto",children:f.jsx(b.List,{children:ne.map(u,(M,Q)=>f.jsx(Qg,{...M},Q))})})]})}function OB(e){const{id:t}=e,n=TB(t),r=iu(t),o=t8(),s=yB(),a=QB(),c=SB(t),u=!ne.isEmpty(c),A=x.useCallback(h=>{u||(s?o(e.id):a(e.id)),ne.isFunction(e.onClick)&&e.onClick(h)},[a,o,e,s,u]);return x.useMemo(()=>({...e,selected:n,onClick:A,items:c,isGroup:u,level:r}),[e,n,A,c,u])}var n8=e=>{let t=e;for(;t=t.parentElement;){const n=getComputedStyle(t,null).getPropertyValue("overflow-y");if(t===document.body)return window;if(n==="auto"||n==="scroll"||n==="overlay")return t}return window},jB=e=>e.firstChild?e.firstChild.offsetParent===e:!0,r8=(e,t)=>{let n=e,r=0;jB(t)||(r+=e.offsetTop-t.offsetTop,t=e.offsetParent,r+=-e.offsetTop);do r+=n.offsetTop,n=n.offsetParent;while(n&&n!==t);return r},o8=e=>{let t=e.parentElement;for(;t&&getComputedStyle(t,null).getPropertyValue("display")==="contents";)t=t.parentElement;return t||window},Xa=null;typeof CSS<"u"&&CSS.supports&&(CSS.supports("position","sticky")?Xa="sticky":CSS.supports("position","-webkit-sticky")&&(Xa="-webkit-sticky"));var su=!1;try{const e=Object.defineProperty({},"passive",{get(){su={passive:!0}}}),t=()=>{};window.addEventListener("testPassive",t,e),window.removeEventListener("testPassive",t,e)}catch{}var xg=e=>{const{el:t,onChange:n,unsubs:r,measure:o}=e;if(t===window){const s=()=>({top:0,left:0,height:window.innerHeight,width:window.innerWidth}),a=o(s()),c=()=>{Object.assign(a,o(s())),n()};return window.addEventListener("resize",c,su),r.push(()=>window.removeEventListener("resize",c)),a}else{const s=o(t.getBoundingClientRect()),a=()=>{Object.assign(s,o(t.getBoundingClientRect())),n()},c=new ResizeObserver(a);return c.observe(t),r.push(()=>c.disconnect()),s}},i8=e=>{const t=getComputedStyle(e,null),n=parseInt(t.getPropertyValue("padding-top"),10),r=parseInt(t.getPropertyValue("padding-bottom"),10);return{top:n,bottom:r}},s8=(e,t,n)=>{const{bottom:r,offsetBottom:o,offsetTop:s}=n,a=n8(e);let c=!1;const u=()=>{c||requestAnimationFrame(()=>{const R=h();R!==Q&&P(R),c=!1}),c=!0};let A=a===window?window.scrollY:a.scrollTop;const p=R=>{const{offsetTop:G,height:X}=E,{naturalTop:q}=B,{height:W}=w;return R+G+X>=q+W+M+o},h=()=>{const{height:R}=E,{height:G}=w;return G+s+o<=R?3:p(A)?1:2},C=a!==window&&jB(a),E=xg({el:a,onChange:u,unsubs:t,measure:({height:R,top:G})=>({height:R,offsetTop:C?G:0})}),m=o8(e),v=m===window?{top:0,bottom:0}:i8(m),B=xg({el:m,onChange:u,unsubs:t,measure:({height:R})=>({height:R-v.top-v.bottom,naturalTop:m===window?0:r8(m,a)+v.top+E.offsetTop})}),w=xg({el:e,onChange:u,unsubs:t,measure:({height:R})=>({height:R})});let M=0,Q=h();const P=R=>{const G=Q;if(Q=R,G===2&&(M=-1),R===3){e.style.position=Xa,r?e.style.bottom=`${o}px`:e.style.top=`${s}px`;return}const{height:X,offsetTop:q}=E,{height:W,naturalTop:re}=B,{height:ie}=w;if(R===2)if(e.style.position="relative",M=G===0?Math.max(0,q+A-re+s):Math.max(0,q+A+X-(re+ie+o)),r){const Z=Math.max(0,W-ie-M);e.style.bottom=`${Z}px`}else e.style.top=`${M}px`;else e.style.position=Xa,R===1?r?e.style.bottom=`${o}px`:e.style.top=`${X-ie-o}px`:r?e.style.bottom=`${X-ie-o}px`:e.style.top=`${s}px`};P(Q);const S=R=>{if(R===A)return;const G=R-A;if(A=R,Q===3)return;const{offsetTop:X,height:q}=E,{naturalTop:W,height:re}=B,{height:ie}=w;if(G>0)if(Q===0){if(R+X+s>W){const Z=Math.max(0,X+A-W+s);R+X+q<=W+ie+Z+o?P(2):P(1)}}else Q===2&&p(R)&&P(1);else if(Q===1){if(X+R+q<W+re+o){const Z=Math.max(0,X+A+q-(W+ie+o));X+R+s>=W+Z?P(2):P(0)}}else Q===2&&X+R+s<W+M&&P(0)},D=a===window?()=>S(window.scrollY):()=>S(a.scrollTop);a.addEventListener("scroll",D,su),a.addEventListener("mousewheel",D,su),t.push(()=>a.removeEventListener("scroll",D),()=>a.removeEventListener("mousewheel",D))},a8=({offsetTop:e=0,offsetBottom:t=0,bottom:n=!1}={})=>{const[r,o]=x.useState(null);return x.useEffect(()=>{if(!r||!Xa)return;const s=[];return s8(r,s,{offsetBottom:t,offsetTop:e,bottom:n}),()=>{s.forEach(a=>a())}},[r,t,e,n]),o},l8=e=>{const{offsetTop:t,offsetBottom:n,bottom:r,children:o,className:s,style:a}=e,c=a8({offsetTop:t,offsetBottom:n,bottom:r});return f.jsx("div",{className:s,style:a,ref:c,children:o})},c8=l8,MB=(e=>(e.TOP="top",e.BOTTOM="bottom",e))(MB||{});function DB(e){const{sticky:t=!0,disposition:n={xl:3,lg:3,md:4,sm:4,xs:12},spacing:r=2}=e,o=ne.omit(e,["sticky","disposition","spacing"]),s=t?c8:b.Box,a=x.useMemo(()=>t?{offsetTop:74,offsetBottom:r*2}:{},[t,r]);return f.jsx(b.Grid,{...o,item:!0,...n,children:f.jsx(s,{...a,children:f.jsx(b.Stack,{spacing:r,children:e.children})})})}function kB(e){return f.jsx(f.Fragment,{children:e.children})}function RB(e){const{children:t}=e;return x.useMemo(()=>{const r={top:[],bottom:[]};return x.Children.forEach(t,o=>{if(x.isValidElement(o)&&(o==null?void 0:o.type)===kB){const{position:s}=o.props;switch(s){case"top":r.top.push(o);break;case"bottom":r.bottom.push(o);break}}}),r},[t])}function FB(e=[],t){const n=ne.isArray(e)?e:[e],r=ne.filter(n,o=>x.isValidElement(o));ne.each(r,o=>{var s;t(o),FB(((s=o==null?void 0:o.props)==null?void 0:s.children)??[],t)})}function LB(e){const{errors:t}=ri.useFormState(),n=bB(),{label:r,icon:o,badge:s,index:a=0,children:c}=e,u=yg(e),A=xB(),p=wB(),h=TB(u),C=[];n&&(e.sources!==void 0?C.push(...e.sources):FB(c,m=>{var v;((v=m==null?void 0:m.props)==null?void 0:v.source)!==void 0&&C.push(m.props.source)}));const E=ne.chain(C).uniq().map(m=>ne.get(t,m)).reject(m=>m===void 0).value().length;return x.useEffect(()=>{A({id:u,index:a,label:r,icon:o,badge:s,errors:E})},[A,p,r,o,u,s,a,E]),x.useEffect(()=>()=>{p(u)},[u]),f.jsx(b.Box,{display:h?"unset":"none",children:e.children})}function NB(e){const t=wg(e),n=yg(e);return f.jsx(LB,{...e,id:n,children:x.Children.map(t,r=>{const o=yg(r.props);return x.cloneElement(r,{id:`${n}.${o}`})})})}function VB(e){return f.jsx(LB,{...e})}function wg(e){const{children:t}=e;return x.useMemo(()=>ne.chain(x.Children.toArray(t)).filter(r=>x.isValidElement(r)&&((r==null?void 0:r.type)===VB||(r==null?void 0:r.type)===NB)).map((r,o)=>x.cloneElement(r,{index:o})).value(),[t])}function u8(e){const{tabsDisposition:t,contentDisposition:n,spacing:r=2}=e,o=ne.pick(e,["syncWithLocation","errorCount"]),s=ne.omit(e,["tabsDisposition","contentDisposition","syncWithLocation"]),{top:a,bottom:c}=RB(e),u=wg(e);return f.jsx(EB,{...o,children:f.jsxs(fB,{...s,spacing:r,children:[f.jsxs(DB,{disposition:t,spacing:r,children:[a,f.jsx(PB,{}),c]}),f.jsx(gB,{disposition:n,children:u})]})})}const Dt=u8;Dt.BaseForm=fB,Dt.Content=gB,Dt.Provider=EB,Dt.useItems=BB,Dt.useSyncWithLocation=yB,Dt.useErrorCount=bB,Dt.useFormRootPath=IB,Dt.useActiveItem=vB,Dt.useSetActiveItem=QB,Dt.useAddItem=xB,Dt.useRemoveItem=wB,Dt.Sidebar=DB,Dt.SidebarSection=kB,Dt.SidebarSectionPosition=MB,Dt.useSidebarChildren=RB,Dt.NavMenu=PB,Dt.NavMenuItem=Qg,Dt.useNavMenuItem=OB,Dt.Tab=VB,Dt.Group=NB,Dt.useBaseItemChildren=wg;const A8=ue(k.Show,{slot:"root"})(({theme:e})=>({"&>.MuiToolbar-root:first-of-type":{backgroundColor:e.palette.background.default},"& .RaShow-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaShow-main>.MuiPaper-root:first-of-type":{overflow:"visible"}}));function d8(e){return f.jsx(A8,{...e})}const f8=ue(k.SimpleFormIterator,{root:"root"})(({theme:e})=>({"& .RaSimpleFormIterator-line":{paddingTop:e.spacing(1),paddingBottom:e.spacing(.5)},"& .RaSimpleFormIterator-action":{display:"flex",flexDirection:"row",alignItems:"center",mb:1.5},"& section":{width:"100%","& label":{position:"relative",overflow:"visible",transform:"none",marginLeft:0}}}));function g8(e){return f.jsx(f8,{...e})}const p8=ga(k.TabbedForm,{slot:"Root"})(({theme:e})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:0},[e.breakpoints.down("sm")]:{paddingBottom:0,"& .MuiTableContainer-root":{paddingBottom:e.spacing(1)}}}));function h8({children:e}){return f.jsx(f.Fragment,{children:e})}function Tg(e){const{title:t,modal:n,content:r,subheader:o,secondary:s=f.jsx(si,{children:f.jsx(k.DeleteWithConfirmButton,{})}),sx:a,noPadding:c,toolbar:u=f.jsx(yi,{children:f.jsx(k.SaveButton,{type:"button"})}),...A}=e,p=nf(t),h=b.useTheme();return f.jsx(ir,{title:p,modal:n,content:r,subheader:o,secondary:s,sx:{...a,"& .MuiTabs-root":{m:2.5,mb:0},"& .tabbed-form > .MuiDivider-root":{ml:2.5,mr:2.5},"& .MuiToolbar-root.RaToolbar-desktopToolbar":{position:"initial",paddingTop:n?h.spacing(2.5):0},"& .MuiToolbar-root":{padding:h.spacing(2.5),borderTop:n?`1px solid ${h.palette.divider}`:void 0}},border:!n,divider:!0,children:f.jsx(p8,{toolbar:u,component:c?h8:void 0,...A})})}function C8({children:e,...t}){return f.jsx(k.TabbedForm.Tab,{...t,children:f.jsx(b.Box,{sx:{width:"100%",p:2.5},children:e})})}Tg.Tab=k.TabbedForm.Tab,Tg.TabStack=C8;const HB=F.forwardRef((e,t)=>{const{children:n,disabled:r,disableRemove:o=!1,index:s,member:a,resource:c}=e,u=k.useTranslate(),[A,p]=F.useState(!1),{total:h,remove:C}=fm(),E=F.useCallback(()=>{p(!1),C(s)},[s,C]),m=x.useMemo(()=>({index:s,total:h,remove:()=>C(s)}),[s,h,C]);return f.jsxs(Vd.Provider,{value:m,children:[x.Children.map(n,(v,B)=>{if(!x.isValidElement(v))return null;const{source:w,...M}=v.props;return f.jsx(b.TableCell,{children:x.cloneElement(v,{source:w?`${a}.${w}`:a,index:w?void 0:B,resource:c,disabled:r,...M,label:""})})}),!o&&f.jsx(b.TableCell,{children:f.jsx(b.Stack,{direction:"row",spacing:1,justifyContent:"center",alignItems:"center",children:f.jsx(si,{horizontal:!0,children:f.jsx(b.Typography,{color:"error",onClick:()=>p(!0),children:u("ra.action.delete")})})})}),n.length>0&&f.jsx(k.Confirm,{isOpen:A,title:u("ra.action.remove_item"),content:u("ra.message.remove_item"),onConfirm:E,onClose:()=>p(!1)})]})});var E8=Array.isArray,au=E8,m8=typeof In=="object"&&In&&In.Object===Object&&In,I8=m8,v8=I8,B8=typeof self=="object"&&self&&self.Object===Object&&self,y8=v8||B8||Function("return this")(),lu=y8,b8=lu,Q8=b8.Symbol,cu=Q8,zB=cu,WB=Object.prototype,x8=WB.hasOwnProperty,w8=WB.toString,Za=zB?zB.toStringTag:void 0;function T8(e){var t=x8.call(e,Za),n=e[Za];try{e[Za]=void 0;var r=!0}catch{}var o=w8.call(e);return r&&(t?e[Za]=n:delete e[Za]),o}var S8=T8,P8=Object.prototype,O8=P8.toString;function j8(e){return O8.call(e)}var M8=j8,UB=cu,D8=S8,k8=M8,R8="[object Null]",F8="[object Undefined]",YB=UB?UB.toStringTag:void 0;function L8(e){return e==null?e===void 0?F8:R8:YB&&YB in Object(e)?D8(e):k8(e)}var Sg=L8;function N8(e){return e!=null&&typeof e=="object"}var uu=N8,V8=Sg,H8=uu,z8="[object Symbol]";function W8(e){return typeof e=="symbol"||H8(e)&&V8(e)==z8}var Pg=W8,U8=au,Y8=Pg,G8=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,K8=/^\w*$/;function J8(e,t){if(U8(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Y8(e)?!0:K8.test(e)||!G8.test(e)||t!=null&&e in Object(t)}var X8=J8;function Z8(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var GB=Z8,_8=Sg,q8=GB,$8="[object AsyncFunction]",eL="[object Function]",tL="[object GeneratorFunction]",nL="[object Proxy]";function rL(e){if(!q8(e))return!1;var t=_8(e);return t==eL||t==tL||t==$8||t==nL}var KB=rL,oL=lu,iL=oL["__core-js_shared__"],sL=iL,Og=sL,JB=function(){var e=/[^.]+$/.exec(Og&&Og.keys&&Og.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function aL(e){return!!JB&&JB in e}var lL=aL,cL=Function.prototype,uL=cL.toString;function AL(e){if(e!=null){try{return uL.call(e)}catch{}try{return e+""}catch{}}return""}var dL=AL,fL=KB,gL=lL,pL=GB,hL=dL,CL=/[\\^$.*+?()[\]{}|]/g,EL=/^\[object .+?Constructor\]$/,mL=Function.prototype,IL=Object.prototype,vL=mL.toString,BL=IL.hasOwnProperty,yL=RegExp("^"+vL.call(BL).replace(CL,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function bL(e){if(!pL(e)||gL(e))return!1;var t=fL(e)?yL:EL;return t.test(hL(e))}var QL=bL;function xL(e,t){return e==null?void 0:e[t]}var wL=xL,TL=QL,SL=wL;function PL(e,t){var n=SL(e,t);return TL(n)?n:void 0}var Au=PL,OL=Au,jL=OL(Object,"create"),du=jL,XB=du;function ML(){this.__data__=XB?XB(null):{},this.size=0}var DL=ML;function kL(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var RL=kL,FL=du,LL="__lodash_hash_undefined__",NL=Object.prototype,VL=NL.hasOwnProperty;function HL(e){var t=this.__data__;if(FL){var n=t[e];return n===LL?void 0:n}return VL.call(t,e)?t[e]:void 0}var zL=HL,WL=du,UL=Object.prototype,YL=UL.hasOwnProperty;function GL(e){var t=this.__data__;return WL?t[e]!==void 0:YL.call(t,e)}var KL=GL,JL=du,XL="__lodash_hash_undefined__";function ZL(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=JL&&t===void 0?XL:t,this}var _L=ZL,qL=DL,$L=RL,e9=zL,t9=KL,n9=_L;function ws(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ws.prototype.clear=qL,ws.prototype.delete=$L,ws.prototype.get=e9,ws.prototype.has=t9,ws.prototype.set=n9;var r9=ws;function o9(){this.__data__=[],this.size=0}var i9=o9;function s9(e,t){return e===t||e!==e&&t!==t}var a9=s9,l9=a9;function c9(e,t){for(var n=e.length;n--;)if(l9(e[n][0],t))return n;return-1}var fu=c9,u9=fu,A9=Array.prototype,d9=A9.splice;function f9(e){var t=this.__data__,n=u9(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():d9.call(t,n,1),--this.size,!0}var g9=f9,p9=fu;function h9(e){var t=this.__data__,n=p9(t,e);return n<0?void 0:t[n][1]}var C9=h9,E9=fu;function m9(e){return E9(this.__data__,e)>-1}var I9=m9,v9=fu;function B9(e,t){var n=this.__data__,r=v9(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var y9=B9,b9=i9,Q9=g9,x9=C9,w9=I9,T9=y9;function Ts(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ts.prototype.clear=b9,Ts.prototype.delete=Q9,Ts.prototype.get=x9,Ts.prototype.has=w9,Ts.prototype.set=T9;var S9=Ts,P9=Au,O9=lu,j9=P9(O9,"Map"),M9=j9,ZB=r9,D9=S9,k9=M9;function R9(){this.size=0,this.__data__={hash:new ZB,map:new(k9||D9),string:new ZB}}var F9=R9;function L9(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var N9=L9,V9=N9;function H9(e,t){var n=e.__data__;return V9(t)?n[typeof t=="string"?"string":"hash"]:n.map}var gu=H9,z9=gu;function W9(e){var t=z9(this,e).delete(e);return this.size-=t?1:0,t}var U9=W9,Y9=gu;function G9(e){return Y9(this,e).get(e)}var K9=G9,J9=gu;function X9(e){return J9(this,e).has(e)}var Z9=X9,_9=gu;function q9(e,t){var n=_9(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var $9=q9,e2=F9,t2=U9,n2=K9,r2=Z9,o2=$9;function Ss(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ss.prototype.clear=e2,Ss.prototype.delete=t2,Ss.prototype.get=n2,Ss.prototype.has=r2,Ss.prototype.set=o2;var _B=Ss,qB=_B,i2="Expected a function";function jg(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(i2);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],s=n.cache;if(s.has(o))return s.get(o);var a=e.apply(this,r);return n.cache=s.set(o,a)||s,a};return n.cache=new(jg.Cache||qB),n}jg.Cache=qB;var s2=jg,a2=s2,l2=500;function c2(e){var t=a2(e,function(r){return n.size===l2&&n.clear(),r}),n=t.cache;return t}var u2=c2,A2=u2,d2=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,f2=/\\(\\)?/g,g2=A2(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(d2,function(n,r,o,s){t.push(o?s.replace(f2,"$1"):r||n)}),t}),p2=g2;function h2(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var $B=h2,ey=cu,C2=$B,E2=au,m2=Pg,I2=1/0,ty=ey?ey.prototype:void 0,ny=ty?ty.toString:void 0;function ry(e){if(typeof e=="string")return e;if(E2(e))return C2(e,ry)+"";if(m2(e))return ny?ny.call(e):"";var t=e+"";return t=="0"&&1/e==-I2?"-0":t}var v2=ry,B2=v2;function y2(e){return e==null?"":B2(e)}var b2=y2,Q2=au,x2=X8,w2=p2,T2=b2;function S2(e,t){return Q2(e)?e:x2(e,t)?[e]:w2(T2(e))}var P2=S2,O2=Pg,j2=1/0;function M2(e){if(typeof e=="string"||O2(e))return e;var t=e+"";return t=="0"&&1/e==-j2?"-0":t}var D2=M2,k2=P2,R2=D2;function F2(e,t){t=k2(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[R2(t[n++])];return n&&n==r?e:void 0}var L2=F2,N2=L2;function V2(e,t,n){var r=e==null?void 0:N2(e,t);return r===void 0?n:r}var H2=V2;const z2=Xr(H2);function oy(e){var V,_;const{children:t,resource:n,source:r,label:o,disableAdd:s=!1,disableRemove:a=!1,enableClearAll:c=!1,className:u,empty:A,template:p={},inset:h}=e,[C,E]=x.useState(!1),{fields:m,remove:v,replace:B,append:w}=k.useArrayInput(e),{resetField:M}=ri.useFormContext(),Q=wt(),P=ce.useTranslate(),S=ce.useRecordContext(e),D=x.useRef(p||{}),R=ce.useTranslateLabel(),G=x.useCallback(L=>{v(L)},[v]);if(m.length>0){const{...L}=m[0];D.current=L;for(const ee in D.current)D.current[ee]=null}const X=x.useCallback((L=void 0)=>{let ee=L;L==null&&(ee=D.current,x.Children.count(t)===1&&F.isValidElement(x.Children.only(t))&&!x.Children.only(t).props.source&&x.Children.map(t,J=>F.isValidElement(J)&&J.type!==ce.FormDataConsumer).some(Boolean)?ee="":(ee=ee||{},x.Children.forEach(t,J=>{F.isValidElement(J)&&J.type!==ce.FormDataConsumer&&J.props.source&&(ee[J.props.source]=J.props.defaultValue??null)})));const U={...ee,...p};w(U),M(`${r}.${m.length}`,{defaultValue:ee})},[w,t,M,r,m.length,p]),q=L=>ee=>{X(),L&&L(ee)},W=x.useCallback(()=>{B([]),E(!1)},[B]),re=z2(S,r),ie=x.useMemo(()=>({total:m.length,remove:G,source:r}),[m.length,G,r]),Z=Q.palette.mode==="dark"?Q.palette.grey.A400:Q.palette.grey.A800,$=m.length>0&&c;return m?f.jsx(Nd.Provider,{value:ie,children:f.jsxs("div",{className:u,children:[F.cloneElement(f.jsx(W2,{}),{label:o,source:r,disableAdd:s,template:p,onClick:q((_=(V=e==null?void 0:e.addButton)==null?void 0:V.props)==null?void 0:_.onClick),inset:h}),f.jsx(b.TableContainer,{component:b.Paper,sx:h===!0?{borderRadius:0}:{mt:2,border:`1px solid ${Z}`},children:f.jsxs(b.Table,{size:"small",children:[f.jsx(b.TableHead,{sx:h===!0?{}:{borderTop:0,borderBottom:`1px solid ${Z}`},children:f.jsxs(b.TableRow,{children:[x.Children.map(t,(L,ee)=>F.isValidElement(L)?f.jsx(b.TableCell,{children:f.jsx(b.Typography,{display:"flex",variant:"subtitle1",color:"text.primary",textTransform:"none",children:R({...L.props,resource:n})})},ee):null),!a&&($?f.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:f.jsx(si,{horizontal:!0,children:f.jsx(b.Typography,{color:"error",onClick:()=>E(!0),children:P("ra.action.delete")})})},"actions"):f.jsx(b.TableCell,{},"empty_actions"))]})}),f.jsxs(b.TableBody,{children:[m.length===0&&f.jsx(b.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:f.jsx(b.TableCell,{colSpan:4+(a?0:1),align:"center",children:A||f.jsx(b.Typography,{variant:"body1",color:"text.secondary",children:"-"})})}),m.length>0&&m.map((L,ee)=>f.jsx(b.TableRow,{sx:{borderBottom:`1px solid ${Z}}`},children:f.jsx(HB,{disableRemove:a,index:ee,member:`${r}.${ee}`,onRemoveField:G,record:re&&re[ee]||{},resource:n,source:r,children:t})},L.id))]})]})}),m.length>0&&f.jsx(k.Confirm,{isOpen:C,title:P("ra.action.clear_array_input"),content:P("ra.message.clear_array_input"),onConfirm:W,onClose:()=>E(!1)})]})}):null}function W2(e){const{label:t,disableAdd:n,onClick:r,inset:o}=e,s=wt(),a=s.palette.mode==="dark"?s.palette.grey.A400:s.palette.grey.A800,c=s.palette.mode==="light"?"#000000":"#FFFFFF";return f.jsxs(b.Stack,{justifyContent:"space-between",alignItems:"center",flexDirection:"row",sx:o?{p:2.5}:{pt:2},children:[t!==!1&&f.jsx(b.Typography,{children:t}),!n&&(F.isValidElement(e==null?void 0:e.addButton)?F.cloneElement(e==null?void 0:e.addButton,{onClick:r}):f.jsx(b.IconButton,{color:"secondary",sx:{border:`1px solid ${a}`},onClick:r,children:f.jsx(Ze.PlusCircleOutlined,{style:{color:c}})}))]})}const U2=ue(oy,{slot:"Root"})(({theme:e})=>({"& > div.MuiPaper-root":{overflowX:"auto",[e.breakpoints.down("sm")]:{width:`calc(100vw - ${e.spacing(8.25)})`}},[e.breakpoints.down("sm")]:{"& .MuiTableRow-root:last-child":{borderBottom:0}}}));function Y2(e,t){const n=ne.clone(e),{type:r,payload:o}=t;switch(r){case"updateMedia":{const s=ne.chain(n.media).clone().extend(o).value();return ne.extend(n,{media:s})}case"updateDrawer":{const s=ne.chain(n.drawer).clone().extend(o).value();return ne.extend(n,{drawer:s})}case"updateLogo":{const s=ne.chain(n.logo).clone().extend(o).value();return ne.extend(n,{logo:s})}case"updateNotifications":{const s=ne.chain(n.notifications).clone().extend(o).value();return ne.extend(n,s)}case"updateTheme":{const s=ne.chain(n.theme).clone().extend(o).value();return ne.extend(n,{theme:s})}default:return n}}const G2={drawer:{open:!0,width:260,handleDrawerToggle:()=>{}},media:{downMd:!1,downLg:!1,downXl:!1,horizontal:!1},logo:{},notifications:{enable:!0,resource:"entities/notification"},theme:{iconColor:"grey.300",iconColorOpen:"grey.100"}},iy=x.createContext(void 0);function sy(e){var X;const t=ce.useAuthProvider(),n=ce.useGetIdentity(),r=b.useTheme(),o=b.useMediaQuery(r.breakpoints.down("md")),s=b.useMediaQuery(r.breakpoints.down("lg")),a=b.useMediaQuery(r.breakpoints.down("xl")),{miniDrawer:c,isHorizontalLayout:u,menuOrientation:A,drawerWidth:p}=bn(),h=u(A)&&!s,{drawerOpen:C,openDrawer:E}=li(),m=x.useCallback(()=>{E(!C)},[C,E]),[v,B]=x.useState(!1),[w,M]=x.useReducer(Y2,ne.chain(G2).clone().merge({drawer:{open:!c||C}}).value()),Q=x.useCallback(()=>B(!1),[]),P=x.useMemo(()=>({state:w,dispatch:M}),[w,M]),{logoIcon:S,logoMain:D,enableNotification:R,notification:G}=e;return x.useEffect(()=>{M({type:"updateMedia",payload:{downMd:o,downLg:s,downXl:a,horizontal:h}})},[A,o,s,a]),x.useEffect(()=>{M({type:"updateDrawer",payload:{open:C,width:p,handleDrawerToggle:m}})},[C,p,m]),x.useEffect(()=>{c||E(!a)},[a,c]),x.useEffect(()=>{M({type:"updateLogo",payload:{main:D,icon:S}})},[S,D]),x.useEffect(()=>{M({type:"updateNotifications",payload:{enable:R,resource:G??"entities/notification"}})},[R,G]),x.useEffect(()=>{M({type:"updateTheme",payload:{iconColorOpen:r.palette.mode==="dark"?"grey.200":"grey.300",iconColor:r.palette.mode==="dark"?"background.default":"grey.100"}})},[r.palette.mode]),x.useEffect(()=>{if(!t.isImpersonating){console.warn("authProvider does not contain a method called isImpersonating",t);return}t==null||t.isImpersonating().then(q=>{var W;B(!q&&((W=n==null?void 0:n.data)==null?void 0:W.needToChangePassword)===!0)})},[(X=n==null?void 0:n.data)==null?void 0:X.needToChangePassword,t]),f.jsxs(iy.Provider,{value:P,children:[f.jsx(b.Dialog,{open:v,maxWidth:"xs",fullWidth:!0,children:f.jsx(Bg,{onSuccess:Q,firstAccess:!0})}),e.children]})}function ay(e){return x.forwardRef((t,n)=>{const{logoIcon:r,logoMain:o,enableNotification:s,notification:a}=t;return f.jsx(sy,{logoIcon:r,logoMain:o,enableNotification:s,notification:a,children:f.jsx(e,{ref:n,...t})})})}function Mg(){const e=x.useContext(iy);if(e===void 0)throw new Error("[Layout] useLayoutContext: context undefined. Please provide a valid LayoutContext using LayoutProvider");return e}function K2(){return Mg().dispatch}function Ps(){return Mg().state}function Vn(){return Ps().media}function bi(){return Ps().drawer}function ly(){return Ps().logo}function pu(){return Ps().notifications}function J2(){return Ps().theme}const X2={ml:{xs:0,lg:-2}};function cy(){const{open:e,handleDrawerToggle:t}=bi();return f.jsx(xs,{value:"drawer","aria-label":"open drawer",sx:X2,onChange:t,selected:e,children:e?f.jsx(Ze.MenuFoldOutlined,{}):f.jsx(Ze.MenuUnfoldOutlined,{})})}function uy(e){const t=x.useRef(),n=b.useTheme(),{downLg:r,horizontal:o}=Vn(),{open:s,width:a}=bi(),c=r?b.AppBar:mm,u=Br(e,{borderBottom:`1px solid ${n.palette.divider}`,zIndex:1200,width:o?"100%":s?`calc(100% - ${a}px)`:{xs:"100%",lg:"calc(100% - 60px)"}}),A={position:"fixed",color:"inherit",elevation:0,sx:u};return r||ne.extend(A,{open:s}),f.jsx(c,{ref:t,...A,children:f.jsxs(b.Toolbar,{sx:{"& > *":{marginX:n.spacing(.325)}},children:[!o&&f.jsx(cy,{}),e.children]})})}function Z2(e){const t=b.useTheme(),{notification:n,onClick:r,selected:o,divider:s}=e,{resource:a}=pu(),c=ce.useNotify(),u=ce.useRedirect(),[A]=ce.useUpdate(a,{id:n==null?void 0:n.id,data:{...n,readed:Nr().format("YYYY-MM-DD HH:mm:ss")}},{onSuccess:()=>{n!=null&&n.resource?n!=null&&n.resource.startsWith("/")?(u(n==null?void 0:n.resource),r()):(r(),document.location.href=n==null?void 0:n.resource):r()},onFailure:()=>{c("resources.notifications.messages.readed.error","warning")}}),p=x.useCallback(()=>A(),[A]),[h]=ce.useLocaleState(),C=x.useMemo(()=>Nr(n.created).locale(h).fromNow(),[n,h]);return f.jsx(b.ListItem,{disablePadding:!0,divider:s,children:f.jsxs(b.ListItemButton,{selected:o,onClick:p,children:[f.jsx(b.ListItemAvatar,{children:f.jsx(b.Avatar,{sx:{color:"primary.main",bgcolor:"primary.lighter"},children:f.jsx(Ze.MessageOutlined,{})})}),f.jsx(b.ListItemText,{sx:{overflow:"hidden",wordBreak:"break-word",width:"90%"},primary:n.title,secondary:n.content}),f.jsx(b.Box,{flexGrow:1,flexShrink:1,minWidth:t.spacing(2)}),f.jsx(b.ListItemText,{sx:{overflow:"hidden",whiteSpace:"pre-wrap",wordBreak:"break-word"},primary:C,primaryTypographyProps:{variant:"caption"}})]})})}const _2={width:36,height:36,fontSize:"1rem"},q2={mt:"6px",ml:1,top:"auto",right:"auto",alignSelf:"flex-start",transform:"none"};function Ay(){const{enable:e}=pu();return e?f.jsx($2,{}):null}function $2(){const e=ce.useTranslate(),t=b.useTheme(),n=ce.useRefresh(),r=ce.useNotify(),{downMd:o}=Vn(),{resource:s}=pu(),[a,c]=x.useState([]),{data:u,isLoading:A}=ce.useGetList(s,{pagination:{page:1,perPage:25},sort:{field:"created",order:"DESC"},filter:{readed:!1}}),p=a.filter(M=>M.readed===null).length,{open:h,anchorEl:C,handleClose:E,handleToggle:m}=ya();x.useEffect(()=>{!A&&u&&c(u??[])},[u,A]);const v=a.filter(M=>!M.readed).map(M=>M.id),[B]=ce.useUpdateMany(s,{ids:v,data:{readed:Nr().format("YYYY-MM-DD HH:mm:ss")}},{onSuccess:()=>{n(),r("resources.notifications.messages.readed.done")},onError:()=>r("ra.notification.readed_error")}),w=x.useCallback(()=>{B()},[B]);return f.jsxs(f.Fragment,{children:[f.jsx(xs,{value:"notifications",selected:h,onChange:m,children:f.jsx(b.Badge,{badgeContent:p,color:"primary",children:f.jsx(Ze.BellOutlined,{})})}),f.jsx(b.Popper,{placement:o?"bottom":"bottom-end",open:h,anchorEl:C,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:M})=>f.jsx(Ro,{type:"grow",position:o?"top":"top-right",in:h,...M,children:f.jsx(b.Paper,{sx:{marginTop:1,boxShadow:t.customShadows.z1,width:"100%",minWidth:285,maxWidth:420,[t.breakpoints.down("md")]:{maxWidth:285}},children:f.jsx(b.ClickAwayListener,{onClickAway:E,children:f.jsxs(ir,{title:e("ra.notification.title"),elevation:0,border:!1,content:!1,secondary:f.jsx(f.Fragment,{children:p>0&&f.jsx(b.Tooltip,{title:e("ra.notification.mark-as-read"),onClick:w,children:f.jsx(vs,{color:"success",size:"small",children:f.jsx(Ze.CheckCircleOutlined,{style:{fontSize:"1.15rem"}})})})}),children:[f.jsx(b.List,{component:"nav",sx:{p:0,"& .MuiListItemButton-root":{py:.5,"&.Mui-selected":{bgcolor:"grey.50",color:"text.primary"},"& .MuiAvatar-root":_2,"& .MuiListItemSecondaryAction-root":{...q2,position:"relative"}},maxHeight:"calc(100vh - 240px)",overflow:"auto"},children:a.map((Q,P)=>f.jsx(Z2,{selected:p>0,notification:Q,onClick:E,divider:P<a.length-1},Q.id))}),f.jsx(b.ListItemButton,{sx:{textAlign:"center",py:"12px !important"},to:`/${s}`,LinkComponent:Ct.Link,onClick:E,children:f.jsx(b.ListItemText,{primary:f.jsx(b.Typography,{variant:"h6",color:"primary",children:e("ra.notification.view_all")})})}),f.jsx(b.Divider,{})]})})})})})]})}const eN=()=>{const[e,t]=x.useState(!1),n=x.useCallback(()=>t(!1),[t]),r=x.useCallback(()=>t(!0),[t]),o=ce.useTranslate();return f.jsxs(x.Fragment,{children:[f.jsxs(b.ListItemButton,{onClick:r,children:[f.jsx(b.ListItemIcon,{children:f.jsx(_n.Key,{})}),f.jsx(b.ListItemText,{primary:o("ra.auth.change_password")})]}),f.jsx(b.Dialog,{open:e,onClose:()=>t(!1),maxWidth:"xs",fullWidth:!0,children:f.jsx(Bg,{onSuccess:n})})]})},tN=()=>{const e=ce.useLogout(),t=ce.useTranslate();return f.jsx(x.Fragment,{children:f.jsxs(b.ListItemButton,{onClick:e,children:[f.jsx(b.ListItemIcon,{children:f.jsx(_n.LogoutOutlined,{})}),f.jsx(b.ListItemText,{primary:t("ra.auth.logout")})]})})},nN=()=>{const e=ce.useTranslate(),t=ce.useAuthProvider(),n=x.useCallback(()=>t.stopImpersonate().then(()=>document.location.href="/"),[t==null?void 0:t.stopImpersonating]),[r,o]=x.useState(!1);return x.useEffect(()=>{if(!t.isImpersonating){console.warn("The authProvider does not support the isImpersonating feature",t);return}t.isImpersonating().then(s=>o(s))},[t,o]),r?f.jsx(x.Fragment,{children:f.jsxs(b.ListItemButton,{onClick:n,children:[f.jsx(b.ListItemIcon,{children:f.jsx(_n.LogoutOutlined,{})}),f.jsx(b.ListItemText,{primary:e("ra.auth.stop_impersonate")})]})}):null};function dy(){var E;const e=b.useTheme(),t=ce.useDataProvider(),n=ce.useAuthProvider(),{identity:r}=ce.useGetIdentity(),o=r!==void 0&&r.image&&r.image!==null&&r.image!=="",[s,a]=x.useState(null),{open:c,anchorEl:u,handleToggle:A,handleClose:p}=ya(),h=ce.useLogout(),C=x.useCallback(()=>{h()},[n,h]);return x.useEffect(()=>{o&&t.getFile("/profile/me/image").then(m=>a(m))},[t,o]),f.jsxs(f.Fragment,{children:[f.jsx(xs,{sx:{p:.25,width:"auto"},onClick:A,value:"profile",selected:c,children:f.jsxs(b.Stack,{direction:"row",spacing:2,alignItems:"center",sx:{p:.5},children:[f.jsx(Na,{alt:(E=r==null?void 0:r.name)==null?void 0:E.toUpperCase(),src:s,size:"xs"}),f.jsx(b.Typography,{variant:"subtitle1",children:r==null?void 0:r.name})]})}),f.jsx(Lv,{placement:"bottom-end",open:c,anchorEl:u,role:void 0,transition:!0,disablePortal:!0,children:({TransitionProps:m})=>{var v;return f.jsx(Ro,{type:"grow",position:"top-right",in:c,...m,children:f.jsx(b.Paper,{sx:{boxShadow:e.customShadows.z1,width:290,minWidth:240,maxWidth:290,[e.breakpoints.down("md")]:{maxWidth:250},marginTop:1},children:f.jsx(b.ClickAwayListener,{onClickAway:p,children:f.jsxs(ir,{elevation:0,border:!1,content:!1,children:[f.jsx(b.CardContent,{sx:{px:2.5,pt:3},children:f.jsxs(b.Grid,{container:!0,justifyContent:"space-between",alignItems:"center",children:[f.jsx(b.Grid,{item:!0,children:f.jsxs(b.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[f.jsx(Na,{alt:"profile user",src:s,sx:{width:32,height:32}}),f.jsxs(b.Stack,{children:[f.jsx(b.Typography,{variant:"h6",children:r==null?void 0:r.name}),f.jsx(b.Typography,{variant:"body2",color:"textSecondary",children:(v=r==null?void 0:r.roles)==null?void 0:v.map(B=>B.name.replace("ROLE_","")).join(",")})]})]})}),f.jsx(b.Grid,{item:!0,children:f.jsx(b.Tooltip,{title:"Logout",children:f.jsx(vs,{size:"large",sx:{color:"text.primary"},onClick:C,children:f.jsx(Ze.LogoutOutlined,{})})})})]})}),f.jsx(b.Grid,{container:!0,children:f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.List,{component:"nav",sx:{p:0,"& .MuiListItemIcon-root":{minWidth:32}},children:[f.jsx(eN,{}),f.jsx(tN,{}),f.jsx(nN,{})]})})})]})})})})}})]})}const fy=e=>{const t=wt(),{downMd:n}=Vn(),{open:r,anchorEl:o,handleToggle:s,handleClose:a}=ya();return n?f.jsxs(f.Fragment,{children:[f.jsx(xs,{value:"drawer","aria-label":"open more menu","aria-controls":r?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:s,selected:r,children:f.jsx(Ze.MoreOutlined,{})}),f.jsx(b.Popper,{placement:"bottom-end",open:r,anchorEl:o,role:void 0,transition:!0,disablePortal:!0,style:{width:"100%"},popperOptions:{modifiers:[{name:"offset",options:{offset:[0,9]}}]},children:({TransitionProps:c})=>f.jsx(Ro,{type:"fade",in:r,...c,children:f.jsx(b.Paper,{sx:{boxShadow:t.customShadows.z1},children:f.jsx(b.ClickAwayListener,{onClickAway:a,children:f.jsx(b.AppBar,{color:"inherit",children:f.jsx(b.Toolbar,{children:e.children})})})})})})]}):f.jsx(f.Fragment,{children:e.children})};function gy(e){return f.jsx(b.Box,{...e,flex:1})}function Dg(e){const{name:t,version:n,copy:r="© Applica Software Guru for"}=e;return f.jsx(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{p:"24px 16px 0px",mt:"auto"},children:f.jsxs(b.Typography,{variant:"caption",children:[f.jsx("span",{dangerouslySetInnerHTML:{__html:r||""}})," ",t," - ",n]})})}var kg={};const rN=Zr(DR);var py;function _a(){return py||(py=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=rN}(kg)),kg}var Rg={},oN=ii;Object.defineProperty(Rg,"__esModule",{value:!0});var Fg=Rg.default=void 0,iN=oN(_a()),sN=f;Fg=Rg.default=(0,iN.default)((0,sN.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add");function hy(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=hy(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Cy(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=hy(e))&&(r&&(r+=" "),r+=t);return r}var aN="__lodash_hash_undefined__";function lN(e){return this.__data__.set(e,aN),this}var cN=lN;function uN(e){return this.__data__.has(e)}var AN=uN,dN=_B,fN=cN,gN=AN;function hu(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new dN;++t<n;)this.add(e[t])}hu.prototype.add=hu.prototype.push=fN,hu.prototype.has=gN;var Ey=hu;function pN(e,t){return e.has(t)}var my=pN;function hN(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Iy=hN;function CN(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var EN=CN,mN=Sg,IN=uu,vN="[object Arguments]";function BN(e){return IN(e)&&mN(e)==vN}var yN=BN,vy=yN,bN=uu,By=Object.prototype,QN=By.hasOwnProperty,xN=By.propertyIsEnumerable,wN=vy(function(){return arguments}())?vy:function(e){return bN(e)&&QN.call(e,"callee")&&!xN.call(e,"callee")},TN=wN,SN=9007199254740991;function PN(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=SN}var ON=PN;function jN(e){return function(t){return e(t)}}var MN=jN,DN=KB,kN=ON;function RN(e){return e!=null&&kN(e.length)&&!DN(e)}var FN=RN,LN=Au,NN=lu,VN=LN(NN,"Set"),HN=VN,zN=Au,WN=function(){try{var e=zN(Object,"defineProperty");return e({},"",{}),e}catch{}}(),UN=WN,YN=FN,GN=uu;function KN(e){return GN(e)&&YN(e)}var yy=KN;function JN(e){return e}var by=JN;function XN(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var ZN=XN,_N=ZN,Qy=Math.max;function qN(e,t,n){return t=Qy(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,s=Qy(r.length-t,0),a=Array(s);++o<s;)a[o]=r[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=r[o];return c[t]=n(a),_N(e,this,c)}}var $N=qN;function e7(e){return function(){return e}}var t7=e7,n7=t7,xy=UN,r7=by,o7=xy?function(e,t){return xy(e,"toString",{configurable:!0,enumerable:!1,value:n7(t),writable:!0})}:r7,i7=o7,s7=800,a7=16,l7=Date.now;function c7(e){var t=0,n=0;return function(){var r=l7(),o=a7-(r-n);if(n=r,o>0){if(++t>=s7)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var u7=c7,A7=i7,d7=u7,f7=d7(A7),g7=f7,p7=by,h7=$N,C7=g7;function E7(e,t){return C7(h7(e,t,p7),e+"")}var wy=E7,Lg=globalThis&&globalThis.__assign||function(){return Lg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Lg.apply(this,arguments)},m7=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},Cu,Ng,Ty=function(e){var t=e.className,n=e.onClick,r=e.sx,o=m7(e,["className","onClick","sx"]),s=ce.useLoading(),a=wt();return F.createElement(I7,{className:t,sx:r},F.createElement(tb,{className:"".concat(Os.loadedIcon," ").concat(s&&Os.loadedLoading),onClick:n}),s&&F.createElement(mg,Lg({className:Cy("app-loader",Os.loader),color:"inherit",size:a.spacing(2),thickness:6},o)))};Ty.propTypes={classes:g.object,className:g.string,width:g.string};var Eu="RaLoadingIndicator",Os={loader:"".concat(Eu,"-loader"),loadedLoading:"".concat(Eu,"-loadedLoading"),loadedIcon:"".concat(Eu,"-loadedIcon")},I7=ue("div",{name:Eu,overridesResolver:function(e,t){return t.root}})((Cu={position:"relative"},Cu["& .".concat(Os.loadedIcon)]=(Ng={},Ng["&.".concat(Os.loadedLoading)]={opacity:0},Ng),Cu["& .".concat(Os.loader)]={position:"absolute",top:"30%",left:"30%"},Cu));const Vg=e=>e.scrollTop;function js(e,t){var n,r;const{timeout:o,easing:s,style:a={}}=e;return{duration:(n=a.transitionDuration)!=null?n:typeof o=="number"?o:o[t.mode]||0,easing:(r=a.transitionTimingFunction)!=null?r:typeof s=="object"?s[t.mode]:s,delay:a.transitionDelay}}const v7=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function B7(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),s=$i(t);let a;if(t.fakeTransform)a=t.fakeTransform;else{const A=s.getComputedStyle(t);a=A.getPropertyValue("-webkit-transform")||A.getPropertyValue("transform")}let c=0,u=0;if(a&&a!=="none"&&typeof a=="string"){const A=a.split("(")[1].split(")")[0].split(",");c=parseInt(A[4],10),u=parseInt(A[5],10)}return e==="left"?o?`translateX(${o.right+c-r.left}px)`:`translateX(${s.innerWidth+c-r.left}px)`:e==="right"?o?`translateX(-${r.right-o.left-c}px)`:`translateX(-${r.left+r.width-c}px)`:e==="up"?o?`translateY(${o.bottom+u-r.top}px)`:`translateY(${s.innerHeight+u-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-u}px)`:`translateY(-${r.top+r.height-u}px)`}function Sy(e){return typeof e=="function"?e():e}function mu(e,t,n){const r=Sy(n),o=B7(e,t,r);o&&(t.style.webkitTransform=o,t.style.transform=o)}const Py=F.forwardRef(function(t,n){const r=wt(),o={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},s={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:a,appear:c=!0,children:u,container:A,direction:p="down",easing:h=o,in:C,onEnter:E,onEntered:m,onEntering:v,onExit:B,onExited:w,onExiting:M,style:Q,timeout:P=s,TransitionComponent:S=rg}=t,D=Re(t,v7),R=F.useRef(null),G=Zt(u.ref,R,n),X=L=>ee=>{L&&(ee===void 0?L(R.current):L(R.current,ee))},q=X((L,ee)=>{mu(p,L,A),Vg(L),E&&E(L,ee)}),W=X((L,ee)=>{const U=js({timeout:P,style:Q,easing:h},{mode:"enter"});L.style.webkitTransition=r.transitions.create("-webkit-transform",z({},U)),L.style.transition=r.transitions.create("transform",z({},U)),L.style.webkitTransform="none",L.style.transform="none",v&&v(L,ee)}),re=X(m),ie=X(M),Z=X(L=>{const ee=js({timeout:P,style:Q,easing:h},{mode:"exit"});L.style.webkitTransition=r.transitions.create("-webkit-transform",ee),L.style.transition=r.transitions.create("transform",ee),mu(p,L,A),B&&B(L)}),$=X(L=>{L.style.webkitTransition="",L.style.transition="",w&&w(L)}),V=L=>{a&&a(R.current,L)},_=F.useCallback(()=>{R.current&&mu(p,R.current,A)},[p,A]);return F.useEffect(()=>{if(C||p==="down"||p==="right")return;const L=JC(()=>{R.current&&mu(p,R.current,A)}),ee=$i(R.current);return ee.addEventListener("resize",L),()=>{L.clear(),ee.removeEventListener("resize",L)}},[p,C,A]),F.useEffect(()=>{C||_()},[C,_]),f.jsx(S,z({nodeRef:R,onEnter:q,onEntered:re,onEntering:W,onExit:Z,onExited:$,onExiting:ie,addEndListener:V,appear:c,in:C,timeout:P},D,{children:(L,ee)=>F.cloneElement(u,z({ref:G,style:z({visibility:L==="exited"&&!C?"hidden":void 0},Q,u.props.style)},ee))}))});process.env.NODE_ENV!=="production"&&(Py.propTypes={addEndListener:g.func,appear:g.bool,children:qi.isRequired,container:vr(g.oneOfType([kr,g.func]),e=>{if(e.open){const t=Sy(e.container);if(t&&t.nodeType===1){const n=t.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `container` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
213
213
|
`))}else if(!t||typeof t.getBoundingClientRect!="function"||t.contextElement!=null&&t.contextElement.nodeType!==1)return new Error(["MUI: The `container` prop provided to the component is invalid.","It should be an HTML element instance."].join(`
|
|
214
214
|
`))}return null}),direction:g.oneOf(["down","left","right","up"]),easing:g.oneOfType([g.shape({enter:g.string,exit:g.string}),g.string]),in:g.bool,onEnter:g.func,onEntered:g.func,onEntering:g.func,onExit:g.func,onExited:g.func,onExiting:g.func,style:g.object,timeout:g.oneOfType([g.number,g.shape({appear:g.number,enter:g.number,exit:g.number})])});const y7=Py;function b7(e){const t=Fn(e);return t.body===e?$i(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function qa(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Oy(e){return parseInt($i(e).getComputedStyle(e).paddingRight,10)||0}function Q7(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function jy(e,t,n,r,o){const s=[t,n,...r];[].forEach.call(e.children,a=>{const c=s.indexOf(a)===-1,u=!Q7(a);c&&u&&qa(a,o)})}function Hg(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function x7(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(b7(r)){const a=MP(Fn(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${Oy(r)+a}px`;const c=Fn(r).querySelectorAll(".mui-fixed");[].forEach.call(c,u=>{n.push({value:u.style.paddingRight,property:"padding-right",el:u}),u.style.paddingRight=`${Oy(u)+a}px`})}let s;if(r.parentNode instanceof DocumentFragment)s=Fn(r).body;else{const a=r.parentElement,c=$i(r);s=(a==null?void 0:a.nodeName)==="HTML"&&c.getComputedStyle(a).overflowY==="scroll"?a:r}n.push({value:s.style.overflow,property:"overflow",el:s},{value:s.style.overflowX,property:"overflow-x",el:s},{value:s.style.overflowY,property:"overflow-y",el:s}),s.style.overflow="hidden"}return()=>{n.forEach(({value:s,el:a,property:c})=>{s?a.style.setProperty(c,s):a.style.removeProperty(c)})}}function w7(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class T7{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&qa(t.modalRef,!1);const o=w7(n);jy(n,t.mount,t.modalRef,o,!0);const s=Hg(this.containers,a=>a.container===n);return s!==-1?(this.containers[s].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:o}),r)}mount(t,n){const r=Hg(this.containers,s=>s.modals.indexOf(t)!==-1),o=this.containers[r];o.restore||(o.restore=x7(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=Hg(this.containers,a=>a.modals.indexOf(t)!==-1),s=this.containers[o];if(s.modals.splice(s.modals.indexOf(t),1),this.modals.splice(r,1),s.modals.length===0)s.restore&&s.restore(),t.modalRef&&qa(t.modalRef,n),jy(s.container,t.mount,t.modalRef,s.hiddenSiblings,!1),this.containers.splice(o,1);else{const a=s.modals[s.modals.length-1];a.modalRef&&qa(a.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function S7(e){return typeof e=="function"?e():e}function P7(e){return e?e.props.hasOwnProperty("in"):!1}const O7=new T7;function j7(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:o=O7,closeAfterTransition:s=!1,onTransitionEnter:a,onTransitionExited:c,children:u,onClose:A,open:p,rootRef:h}=e,C=F.useRef({}),E=F.useRef(null),m=F.useRef(null),v=Zt(m,h),[B,w]=F.useState(!p),M=P7(u);let Q=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(Q=!1);const P=()=>Fn(E.current),S=()=>(C.current.modalRef=m.current,C.current.mount=E.current,C.current),D=()=>{o.mount(S(),{disableScrollLock:r}),m.current&&(m.current.scrollTop=0)},R=$r(()=>{const V=S7(t)||P().body;o.add(S(),V),m.current&&D()}),G=F.useCallback(()=>o.isTopModal(S()),[o]),X=$r(V=>{E.current=V,V&&(p&&G()?D():m.current&&qa(m.current,Q))}),q=F.useCallback(()=>{o.remove(S(),Q)},[Q,o]);F.useEffect(()=>()=>{q()},[q]),F.useEffect(()=>{p?R():(!M||!s)&&q()},[p,q,M,s,R]);const W=V=>_=>{var L;(L=V.onKeyDown)==null||L.call(V,_),!(_.key!=="Escape"||_.which===229||!G())&&(n||(_.stopPropagation(),A&&A(_,"escapeKeyDown")))},re=V=>_=>{var L;(L=V.onClick)==null||L.call(V,_),_.target===_.currentTarget&&A&&A(_,"backdropClick")};return{getRootProps:(V={})=>{const _=_0(e);delete _.onTransitionEnter,delete _.onTransitionExited;const L=z({},_,V);return z({role:"presentation"},L,{onKeyDown:W(L),ref:v})},getBackdropProps:(V={})=>{const _=V;return z({"aria-hidden":!0},_,{onClick:re(_),open:p})},getTransitionProps:()=>{const V=()=>{w(!1),a&&a()},_=()=>{w(!0),c&&c(),s&&q()};return{onEnter:hd(V,u==null?void 0:u.props.onEnter),onExited:hd(_,u==null?void 0:u.props.onExited)}},rootRef:v,portalRef:X,isTopModal:G,exited:B,hasTransition:M}}const M7=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function D7(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function k7(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function R7(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||k7(e))}function F7(e){const t=[],n=[];return Array.from(e.querySelectorAll(M7)).forEach((r,o)=>{const s=D7(r);s===-1||!R7(r)||(s===0?t.push(r):n.push({documentOrder:o,tabIndex:s,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(t)}function L7(){return!0}function Iu(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:s=F7,isEnabled:a=L7,open:c}=e,u=F.useRef(!1),A=F.useRef(null),p=F.useRef(null),h=F.useRef(null),C=F.useRef(null),E=F.useRef(!1),m=F.useRef(null),v=Zt(t.ref,m),B=F.useRef(null);F.useEffect(()=>{!c||!m.current||(E.current=!n)},[n,c]),F.useEffect(()=>{if(!c||!m.current)return;const Q=Fn(m.current);return m.current.contains(Q.activeElement)||(m.current.hasAttribute("tabIndex")||(process.env.NODE_ENV!=="production"&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
|
|
215
215
|
`)),m.current.setAttribute("tabIndex","-1")),E.current&&m.current.focus()),()=>{o||(h.current&&h.current.focus&&(u.current=!0,h.current.focus()),h.current=null)}},[c]),F.useEffect(()=>{if(!c||!m.current)return;const Q=Fn(m.current),P=R=>{B.current=R,!(r||!a()||R.key!=="Tab")&&Q.activeElement===m.current&&R.shiftKey&&(u.current=!0,p.current&&p.current.focus())},S=()=>{const R=m.current;if(R===null)return;if(!Q.hasFocus()||!a()||u.current){u.current=!1;return}if(R.contains(Q.activeElement)||r&&Q.activeElement!==A.current&&Q.activeElement!==p.current)return;if(Q.activeElement!==C.current)C.current=null;else if(C.current!==null)return;if(!E.current)return;let G=[];if((Q.activeElement===A.current||Q.activeElement===p.current)&&(G=s(m.current)),G.length>0){var X,q;const W=!!((X=B.current)!=null&&X.shiftKey&&((q=B.current)==null?void 0:q.key)==="Tab"),re=G[0],ie=G[G.length-1];typeof re!="string"&&typeof ie!="string"&&(W?ie.focus():re.focus())}else R.focus()};Q.addEventListener("focusin",S),Q.addEventListener("keydown",P,!0);const D=setInterval(()=>{Q.activeElement&&Q.activeElement.tagName==="BODY"&&S()},50);return()=>{clearInterval(D),Q.removeEventListener("focusin",S),Q.removeEventListener("keydown",P,!0)}},[n,r,o,a,c,s]);const w=Q=>{h.current===null&&(h.current=Q.relatedTarget),E.current=!0,C.current=Q.target;const P=t.props.onFocus;P&&P(Q)},M=Q=>{h.current===null&&(h.current=Q.relatedTarget),E.current=!0};return f.jsxs(F.Fragment,{children:[f.jsx("div",{tabIndex:c?0:-1,onFocus:M,ref:A,"data-testid":"sentinelStart"}),F.cloneElement(t,{ref:v,onFocus:w}),f.jsx("div",{tabIndex:c?0:-1,onFocus:M,ref:p,"data-testid":"sentinelEnd"})]})}process.env.NODE_ENV!=="production"&&(Iu.propTypes={children:qi,disableAutoFocus:g.bool,disableEnforceFocus:g.bool,disableRestoreFocus:g.bool,getTabbable:g.func,isEnabled:g.func,open:g.bool.isRequired}),process.env.NODE_ENV!=="production"&&(Iu["propTypes"]=pa(Iu.propTypes));function N7(e){return typeof e=="function"?e():e}const $a=F.forwardRef(function(t,n){const{children:r,container:o,disablePortal:s=!1}=t,[a,c]=F.useState(null),u=Zt(F.isValidElement(r)?r.ref:null,n);if(Dr(()=>{s||c(N7(o)||document.body)},[o,s]),Dr(()=>{if(a&&!s)return es(n,a),()=>{es(n,null)}},[n,a,s]),s){if(F.isValidElement(r)){const A={ref:u};return F.cloneElement(r,A)}return f.jsx(F.Fragment,{children:r})}return f.jsx(F.Fragment,{children:a&&Jh.createPortal(r,a)})});process.env.NODE_ENV!=="production"&&($a.propTypes={children:g.node,container:g.oneOfType([kr,g.func]),disablePortal:g.bool}),process.env.NODE_ENV!=="production"&&($a["propTypes"]=pa($a.propTypes));const V7=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],H7={entering:{opacity:1},entered:{opacity:1}},My=F.forwardRef(function(t,n){const r=wt(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:a=!0,children:c,easing:u,in:A,onEnter:p,onEntered:h,onEntering:C,onExit:E,onExited:m,onExiting:v,style:B,timeout:w=o,TransitionComponent:M=rg}=t,Q=Re(t,V7),P=F.useRef(null),S=Zt(P,c.ref,n),D=Z=>$=>{if(Z){const V=P.current;$===void 0?Z(V):Z(V,$)}},R=D(C),G=D((Z,$)=>{Vg(Z);const V=js({style:B,timeout:w,easing:u},{mode:"enter"});Z.style.webkitTransition=r.transitions.create("opacity",V),Z.style.transition=r.transitions.create("opacity",V),p&&p(Z,$)}),X=D(h),q=D(v),W=D(Z=>{const $=js({style:B,timeout:w,easing:u},{mode:"exit"});Z.style.webkitTransition=r.transitions.create("opacity",$),Z.style.transition=r.transitions.create("opacity",$),E&&E(Z)}),re=D(m),ie=Z=>{s&&s(P.current,Z)};return f.jsx(M,z({appear:a,in:A,nodeRef:P,onEnter:G,onEntered:X,onEntering:R,onExit:W,onExited:re,onExiting:q,addEndListener:ie,timeout:w},Q,{children:(Z,$)=>F.cloneElement(c,z({style:z({opacity:0,visibility:Z==="exited"&&!A?"hidden":void 0},H7[Z],B,c.props.style),ref:S},$))}))});process.env.NODE_ENV!=="production"&&(My.propTypes={addEndListener:g.func,appear:g.bool,children:qi.isRequired,easing:g.oneOfType([g.shape({enter:g.string,exit:g.string}),g.string]),in:g.bool,onEnter:g.func,onEntered:g.func,onEntering:g.func,onExit:g.func,onExited:g.func,onExiting:g.func,style:g.object,timeout:g.oneOfType([g.number,g.shape({appear:g.number,enter:g.number,exit:g.number})])});const z7=My;function W7(e){return Ft("MuiBackdrop",e)}zt("MuiBackdrop",["root","invisible"]);const U7=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Y7=e=>{const{classes:t,invisible:n}=e;return Wt({root:["root",n&&"invisible"]},W7,t)},G7=ue("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>z({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),Dy=F.forwardRef(function(t,n){var r,o,s;const a=Ut({props:t,name:"MuiBackdrop"}),{children:c,className:u,component:A="div",components:p={},componentsProps:h={},invisible:C=!1,open:E,slotProps:m={},slots:v={},TransitionComponent:B=z7,transitionDuration:w}=a,M=Re(a,U7),Q=z({},a,{component:A,invisible:C}),P=Y7(Q),S=(r=m.root)!=null?r:h.root;return f.jsx(B,z({in:E,timeout:w},M,{children:f.jsx(G7,z({"aria-hidden":!0},S,{as:(o=(s=v.root)!=null?s:p.Root)!=null?o:A,className:Ve(P.root,u,S==null?void 0:S.className),ownerState:z({},Q,S==null?void 0:S.ownerState),classes:P,ref:n,children:c}))}))});process.env.NODE_ENV!=="production"&&(Dy.propTypes={children:g.node,classes:g.object,className:g.string,component:g.elementType,components:g.shape({Root:g.elementType}),componentsProps:g.shape({root:g.object}),invisible:g.bool,open:g.bool.isRequired,slotProps:g.shape({root:g.object}),slots:g.shape({root:g.elementType}),sx:g.oneOfType([g.arrayOf(g.oneOfType([g.func,g.object,g.bool])),g.func,g.object]),TransitionComponent:g.elementType,transitionDuration:g.oneOfType([g.number,g.shape({appear:g.number,enter:g.number,exit:g.number})])});const K7=Dy;function J7(e){return Ft("MuiModal",e)}zt("MuiModal",["root","hidden","backdrop"]);const X7=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],Z7=e=>{const{open:t,exited:n,classes:r}=e;return Wt({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},J7,r)},_7=ue("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>z({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),q7=ue(K7,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),ky=F.forwardRef(function(t,n){var r,o,s,a,c,u;const A=Ut({name:"MuiModal",props:t}),{BackdropComponent:p=q7,BackdropProps:h,className:C,closeAfterTransition:E=!1,children:m,container:v,component:B,components:w={},componentsProps:M={},disableAutoFocus:Q=!1,disableEnforceFocus:P=!1,disableEscapeKeyDown:S=!1,disablePortal:D=!1,disableRestoreFocus:R=!1,disableScrollLock:G=!1,hideBackdrop:X=!1,keepMounted:q=!1,onBackdropClick:W,open:re,slotProps:ie,slots:Z}=A,$=Re(A,X7),V=z({},A,{closeAfterTransition:E,disableAutoFocus:Q,disableEnforceFocus:P,disableEscapeKeyDown:S,disablePortal:D,disableRestoreFocus:R,disableScrollLock:G,hideBackdrop:X,keepMounted:q}),{getRootProps:_,getBackdropProps:L,getTransitionProps:ee,portalRef:U,isTopModal:J,exited:fe,hasTransition:he}=j7(z({},V,{rootRef:n})),de=z({},V,{exited:fe}),ge=Z7(de),Ce={};if(m.props.tabIndex===void 0&&(Ce.tabIndex="-1"),he){const{onEnter:Je,onExited:pe}=ee();Ce.onEnter=Je,Ce.onExited=pe}const Be=(r=(o=Z==null?void 0:Z.root)!=null?o:w.Root)!=null?r:_7,Ie=(s=(a=Z==null?void 0:Z.backdrop)!=null?a:w.Backdrop)!=null?s:p,Ee=(c=ie==null?void 0:ie.root)!=null?c:M.root,ve=(u=ie==null?void 0:ie.backdrop)!=null?u:M.backdrop,we=Yc({elementType:Be,externalSlotProps:Ee,externalForwardedProps:$,getSlotProps:_,additionalProps:{ref:n,as:B},ownerState:de,className:Ve(C,Ee==null?void 0:Ee.className,ge==null?void 0:ge.root,!de.open&&de.exited&&(ge==null?void 0:ge.hidden))}),Ae=Yc({elementType:Ie,externalSlotProps:ve,additionalProps:h,getSlotProps:Je=>L(z({},Je,{onClick:pe=>{W&&W(pe),Je!=null&&Je.onClick&&Je.onClick(pe)}})),className:Ve(ve==null?void 0:ve.className,h==null?void 0:h.className,ge==null?void 0:ge.backdrop),ownerState:de});return!q&&!re&&(!he||fe)?null:f.jsx($a,{ref:U,container:v,disablePortal:D,children:f.jsxs(Be,z({},we,{children:[!X&&p?f.jsx(Ie,z({},Ae)):null,f.jsx(Iu,{disableEnforceFocus:P,disableAutoFocus:Q,disableRestoreFocus:R,isEnabled:J,open:re,children:F.cloneElement(m,Ce)})]}))})});process.env.NODE_ENV!=="production"&&(ky.propTypes={BackdropComponent:g.elementType,BackdropProps:g.object,children:qi.isRequired,classes:g.object,className:g.string,closeAfterTransition:g.bool,component:g.elementType,components:g.shape({Backdrop:g.elementType,Root:g.elementType}),componentsProps:g.shape({backdrop:g.oneOfType([g.func,g.object]),root:g.oneOfType([g.func,g.object])}),container:g.oneOfType([kr,g.func]),disableAutoFocus:g.bool,disableEnforceFocus:g.bool,disableEscapeKeyDown:g.bool,disablePortal:g.bool,disableRestoreFocus:g.bool,disableScrollLock:g.bool,hideBackdrop:g.bool,keepMounted:g.bool,onBackdropClick:g.func,onClose:g.func,onTransitionEnter:g.func,onTransitionExited:g.func,open:g.bool.isRequired,slotProps:g.shape({backdrop:g.oneOfType([g.func,g.object]),root:g.oneOfType([g.func,g.object])}),slots:g.shape({backdrop:g.elementType,root:g.elementType}),sx:g.oneOfType([g.arrayOf(g.oneOfType([g.func,g.object,g.bool])),g.func,g.object])});const $7=ky;var zg={},eV=ii;Object.defineProperty(zg,"__esModule",{value:!0});var Ry=zg.default=void 0,tV=eV(_a()),nV=f;Ry=zg.default=(0,tV.default)((0,nV.jsx)("path",{d:"M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z"}),"History");var Wg={},rV=ii;Object.defineProperty(Wg,"__esModule",{value:!0});var Fy=Wg.default=void 0,oV=rV(_a()),iV=f;Fy=Wg.default=(0,oV.default)((0,iV.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var sV=function(e){var t=e.children,n=e.editor,r=e.preferenceKey,o=e.openButtonLabel,s=o===void 0?"ra.configurable.customize":o,a=e.sx,c="preferences.".concat(r),u=ce.usePreferencesEditor(),A=!!u,p=ce.useTranslate(),h=u||{},C=h.isEnabled,E=h.setEditor,m=h.preferenceKey,v=h.setPreferenceKey,B=c===m,w=x.useRef(B),M=x.useRef(null),Q=x.useState(!1),P=Q[0],S=Q[1];if(x.useEffect(function(){w.current=B},[B]),x.useEffect(function(){return function(){w.current&&(v&&v(null),E&&E(null))}},[E,v]),!A)return t;var D=function(){E(x.cloneElement(n,{preferenceKey:c,key:c})),v(c)},R=function(){S(!0)},G=function(){S(!1)};return F.createElement(ce.PreferenceKeyContextProvider,{value:c},F.createElement(aV,{className:Cy(uo.root,C&&uo.editMode,B&&uo.editorActive),sx:a,ref:M,onMouseEnter:C?R:void 0,onMouseLeave:C?G:void 0},t),F.createElement(b.Popover,{open:C&&(P||B),sx:{pointerEvents:"none","& .MuiPaper-root":{pointerEvents:"auto",borderRadius:10,padding:"2px",lineHeight:0,backgroundColor:"warning.light",color:"warning.contrastText","&:hover":{cursor:"pointer"}}},anchorEl:M.current,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"center"},onClose:G,PaperProps:{elevation:1,onMouseEnter:R,onMouseLeave:G,title:p(s),onClick:D},disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:!0,disableScrollLock:!0,marginThreshold:8},F.createElement(Fy,{fontSize:"12px"})))},vu="RaConfigurable",uo={root:"".concat(vu,"-root"),editMode:"".concat(vu,"-editMode"),editorActive:"".concat(vu,"-editorActive")},aV=ue("span",{name:vu,overridesResolver:function(e,t){return t.root}})(function(e){var t,n=e.theme;return t={position:"relative",display:"inline-block"},t["&.".concat(uo.editMode)]={transition:n.transitions.create("outline"),outline:"".concat(b.alpha(n.palette.warning.main,.3)," solid 2px")},t["&.".concat(uo.editMode,":hover ")]={outline:"".concat(b.alpha(n.palette.warning.main,.5)," solid 2px")},t["&.".concat(uo.editMode,".").concat(uo.editorActive," , &.").concat(uo.editMode,".").concat(uo.editorActive,":hover ")]={outline:"".concat(n.palette.warning.main," solid 2px")},t}),Qi=globalThis&&globalThis.__assign||function(){return Qi=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Qi.apply(this,arguments)},lV=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},cV=function(e){var t=e.title,n=e.defaultTitle,r=e.className,o=lV(e,["title","defaultTitle","className"]),s=ce.usePreference()[0],a=ce.useTranslate(),c=ce.useRecordContext();return s?F.createElement("span",Qi({className:r},o),a(s,Qi(Qi({},c),{_:s}))):F.createElement("span",{className:r},t?typeof t=="string"?F.createElement("span",Qi({},o),a(t,{_:t})):t:F.createElement("span",Qi({},o),n))},Bu=globalThis&&globalThis.__assign||function(){return Bu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Bu.apply(this,arguments)},uV=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},AV=function(){var e=ce.usePreferenceInput();return F.createElement("form",null,F.createElement(b.TextField,Bu({label:"title",variant:"filled",size:"small",fullWidth:!0,sx:{mb:1}},e)))},dV=function(e){var t=e.preferenceKey,n=uV(e,["preferenceKey"]),r=Ct.useLocation().pathname;return F.createElement(sV,{editor:F.createElement(AV,null),preferenceKey:t||"".concat(r,".title"),sx:{"&.RaConfigurable-editMode":{margin:"2px"}}},F.createElement(cV,Bu({},n)))},Ug=globalThis&&globalThis.__assign||function(){return Ug=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Ug.apply(this,arguments)},fV=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},Ly=function(e){var t=e.defaultTitle,n=e.title,r=e.preferenceKey,o=fV(e,["defaultTitle","title","preferenceKey"]),s=x.useState(function(){return typeof document<"u"?document.getElementById("react-admin-title"):null}),a=s[0],c=s[1];return x.useEffect(function(){c(function(u){var A=typeof document<"u"&&document.body.contains(u);return u&&A?u:typeof document<"u"?document.getElementById("react-admin-title"):null})},[]),a?(ce.warning(!t&&!n,"Missing title prop in <Title> element"),Ki.createPortal(F.createElement(dV,Ug({title:n,defaultTitle:t,preferenceKey:r},o)),a)):null},Ny=g.oneOfType([g.string,g.element]);Ly.propTypes={defaultTitle:g.string,className:g.string,record:g.any,title:Ny};var gV=function(e){var t=Yi.useLocation().pathname,n=x.useRef(t);x.useEffect(function(){t!==n.current&&e()},[t,e])},pV=function(t,n){return t===void 0&&(t=[]),n===void 0&&(n=[]),t.length!==n.length||t.some(function(r,o){return!Object.is(r,n[o])})},Vy={error:null},hV=function(e){tg(t,e);function t(){for(var r,o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];return r=e.call.apply(e,[this].concat(s))||this,r.state=Vy,r.resetErrorBoundary=function(){for(var c,u=arguments.length,A=new Array(u),p=0;p<u;p++)A[p]=arguments[p];r.props.onReset==null||(c=r.props).onReset.apply(c,A),r.reset()},r}t.getDerivedStateFromError=function(o){return{error:o}};var n=t.prototype;return n.reset=function(){this.setState(Vy)},n.componentDidCatch=function(o,s){var a,c;(a=(c=this.props).onError)==null||a.call(c,o,s)},n.componentDidUpdate=function(o,s){var a=this.state.error,c=this.props.resetKeys;if(a!==null&&s.error!==null&&pV(o.resetKeys,c)){var u,A;(u=(A=this.props).onResetKeysChange)==null||u.call(A,o.resetKeys,c),this.reset()}},n.render=function(){var o=this.state.error,s=this.props,a=s.fallbackRender,c=s.FallbackComponent,u=s.fallback;if(o!==null){var A={error:o,resetErrorBoundary:this.resetErrorBoundary};if(F.isValidElement(u))return u;if(typeof a=="function")return a(A);if(c)return F.createElement(c,A);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},t}(F.Component),Yg=globalThis&&globalThis.__assign||function(){return Yg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Yg.apply(this,arguments)},CV=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n},Hy=function(e){var t=e.className,n=e.loadingPrimary,r=n===void 0?"ra.page.loading":n,o=e.loadingSecondary,s=o===void 0?"ra.message.loading":o,a=CV(e,["className","loadingPrimary","loadingSecondary"]),c=ce.useTimeout(1e3),u=ce.useTranslate();return c?F.createElement(EV,Yg({className:t},a),F.createElement("div",{className:bu.message},F.createElement(mg,{className:bu.icon}),F.createElement(b.Typography,{variant:"h5",mt:3,color:"text.secondary"},u(r,{_:r})),F.createElement(b.Typography,{variant:"body2"},u(s,{_:s})))):null};Hy.propTypes={className:g.string,loadingPrimary:g.string,loadingSecondary:g.string};var yu="RaLoading",bu={root:"".concat(yu,"-root"),icon:"".concat(yu,"-icon"),message:"".concat(yu,"-message")},EV=ue("div",{name:yu,overridesResolver:function(e,t){return t.root}})(function(e){var t,n=e.theme;return t={display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",height:"100%"},t["& .".concat(bu.message)]={textAlign:"center",fontFamily:"Roboto, sans-serif",color:n.palette.text.disabled,paddingTop:"1em",paddingBottom:"1em"},t["& .".concat(bu.icon)]={width:"9em",height:"9em"},t});function mV(e){return Ft("MuiToolbar",e)}zt("MuiToolbar",["root","gutters","regular","dense"]);const IV=["className","component","disableGutters","variant"],vV=e=>{const{classes:t,disableGutters:n,variant:r}=e;return Wt({root:["root",!n&&"gutters",r]},mV,t)},BV=ue("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(({theme:e,ownerState:t})=>z({position:"relative",display:"flex",alignItems:"center"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}},t.variant==="dense"&&{minHeight:48}),({theme:e,ownerState:t})=>t.variant==="regular"&&e.mixins.toolbar),zy=F.forwardRef(function(t,n){const r=Ut({props:t,name:"MuiToolbar"}),{className:o,component:s="div",disableGutters:a=!1,variant:c="regular"}=r,u=Re(r,IV),A=z({},r,{component:s,disableGutters:a,variant:c}),p=vV(A);return f.jsx(BV,z({as:s,className:Ve(p.root,o),ref:n,ownerState:A},u))});process.env.NODE_ENV!=="production"&&(zy.propTypes={children:g.node,classes:g.object,className:g.string,component:g.elementType,disableGutters:g.bool,sx:g.oneOfType([g.arrayOf(g.oneOfType([g.func,g.object,g.bool])),g.func,g.object]),variant:g.oneOfType([g.oneOf(["dense","regular"]),g.string])});const yV=zy;var Gg={},bV=ii;Object.defineProperty(Gg,"__esModule",{value:!0});var Wy=Gg.default=void 0,QV=bV(_a()),xV=f;Wy=Gg.default=(0,QV.default)((0,xV.jsx)("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh");const wV=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Kg(e){return`scale(${e}, ${e**2})`}const TV={entering:{opacity:1,transform:Kg(1)},entered:{opacity:1,transform:"none"}},Jg=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Xg=F.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:s,easing:a,in:c,onEnter:u,onEntered:A,onEntering:p,onExit:h,onExited:C,onExiting:E,style:m,timeout:v="auto",TransitionComponent:B=rg}=t,w=Re(t,wV),M=ts(),Q=F.useRef(),P=wt(),S=F.useRef(null),D=Zt(S,s.ref,n),R=$=>V=>{if($){const _=S.current;V===void 0?$(_):$(_,V)}},G=R(p),X=R(($,V)=>{Vg($);const{duration:_,delay:L,easing:ee}=js({style:m,timeout:v,easing:a},{mode:"enter"});let U;v==="auto"?(U=P.transitions.getAutoHeightDuration($.clientHeight),Q.current=U):U=_,$.style.transition=[P.transitions.create("opacity",{duration:U,delay:L}),P.transitions.create("transform",{duration:Jg?U:U*.666,delay:L,easing:ee})].join(","),u&&u($,V)}),q=R(A),W=R(E),re=R($=>{const{duration:V,delay:_,easing:L}=js({style:m,timeout:v,easing:a},{mode:"exit"});let ee;v==="auto"?(ee=P.transitions.getAutoHeightDuration($.clientHeight),Q.current=ee):ee=V,$.style.transition=[P.transitions.create("opacity",{duration:ee,delay:_}),P.transitions.create("transform",{duration:Jg?ee:ee*.666,delay:Jg?_:_||ee*.333,easing:L})].join(","),$.style.opacity=0,$.style.transform=Kg(.75),h&&h($)}),ie=R(C),Z=$=>{v==="auto"&&M.start(Q.current||0,$),r&&r(S.current,$)};return f.jsx(B,z({appear:o,in:c,nodeRef:S,onEnter:X,onEntered:q,onEntering:G,onExit:re,onExited:ie,onExiting:W,addEndListener:Z,timeout:v==="auto"?null:v},w,{children:($,V)=>F.cloneElement(s,z({style:z({opacity:0,transform:Kg(.75),visibility:$==="exited"&&!c?"hidden":void 0},TV[$],m,s.props.style),ref:D},V))}))});process.env.NODE_ENV!=="production"&&(Xg.propTypes={addEndListener:g.func,appear:g.bool,children:qi.isRequired,easing:g.oneOfType([g.shape({enter:g.string,exit:g.string}),g.string]),in:g.bool,onEnter:g.func,onEntered:g.func,onEntering:g.func,onExit:g.func,onExited:g.func,onExiting:g.func,style:g.object,timeout:g.oneOfType([g.oneOf(["auto"]),g.number,g.shape({appear:g.number,enter:g.number,exit:g.number})])}),Xg.muiSupportAuto=!0;const Uy=Xg,Yy="base";function SV(e){return`${Yy}--${e}`}function PV(e,t){return`${Yy}-${e}-${t}`}function Gy(e,t){const n=kC[t];return n?SV(n):PV(e,t)}function OV(e,t){const n={};return t.forEach(r=>{n[r]=Gy(e,r)}),n}const Ky="Popper";function jV(e){return Gy(Ky,e)}OV(Ky,["root"]);const MV=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],DV=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function kV(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function Qu(e){return typeof e=="function"?e():e}function xu(e){return e.nodeType!==void 0}function RV(e){return!xu(e)}const FV=()=>Wt({root:["root"]},yk(jV)),LV={},NV=F.forwardRef(function(t,n){var r;const{anchorEl:o,children:s,direction:a,disablePortal:c,modifiers:u,open:A,placement:p,popperOptions:h,popperRef:C,slotProps:E={},slots:m={},TransitionProps:v}=t,B=Re(t,MV),w=F.useRef(null),M=Zt(w,n),Q=F.useRef(null),P=Zt(Q,C),S=F.useRef(P);Dr(()=>{S.current=P},[P]),F.useImperativeHandle(C,()=>Q.current,[]);const D=kV(p,a),[R,G]=F.useState(D),[X,q]=F.useState(Qu(o));F.useEffect(()=>{Q.current&&Q.current.forceUpdate()}),F.useEffect(()=>{o&&q(Qu(o))},[o]),Dr(()=>{if(!X||!A)return;const $=L=>{G(L.placement)};if(process.env.NODE_ENV!=="production"&&X&&xu(X)&&X.nodeType===1){const L=X.getBoundingClientRect();process.env.NODE_ENV!=="test"&&L.top===0&&L.left===0&&L.right===0&&L.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
|
|
@@ -272,5 +272,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
272
272
|
`),LU)),YU=ue("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${Pe(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar2Indeterminate,n.variant==="buffer"&&t.bar2Buffer]}})(({ownerState:e,theme:t})=>z({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},e.variant!=="buffer"&&{backgroundColor:e.color==="inherit"?"currentColor":(t.vars||t).palette[e.color].main},e.color==="inherit"&&{opacity:.3},e.variant==="buffer"&&{backgroundColor:fp(t,e.color),transition:`transform .${dp}s linear`}),({ownerState:e})=>(e.variant==="indeterminate"||e.variant==="query")&&xt.css(_Q||(_Q=Fs`
|
|
273
273
|
width: auto;
|
|
274
274
|
animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
|
|
275
|
-
`),NU)),qQ=F.forwardRef(function(t,n){const r=Ut({props:t,name:"MuiLinearProgress"}),{className:o,color:s="primary",value:a,valueBuffer:c,variant:u="indeterminate"}=r,A=Re(r,FU),p=z({},r,{color:s,variant:u}),h=HU(p),C=Bd(),E={},m={bar1:{},bar2:{}};if(u==="determinate"||u==="buffer")if(a!==void 0){E["aria-valuenow"]=Math.round(a),E["aria-valuemin"]=0,E["aria-valuemax"]=100;let v=a-100;C&&(v=-v),m.bar1.transform=`translateX(${v}%)`}else process.env.NODE_ENV!=="production"&&console.error("MUI: You need to provide a value prop when using the determinate or buffer variant of LinearProgress .");if(u==="buffer")if(c!==void 0){let v=(c||0)-100;C&&(v=-v),m.bar2.transform=`translateX(${v}%)`}else process.env.NODE_ENV!=="production"&&console.error("MUI: You need to provide a valueBuffer prop when using the buffer variant of LinearProgress.");return f.jsxs(zU,z({className:Ve(h.root,o),ownerState:p,role:"progressbar"},E,{ref:n},A,{children:[u==="buffer"?f.jsx(WU,{className:h.dashed,ownerState:p}):null,f.jsx(UU,{className:h.bar1,ownerState:p,style:m.bar1}),u==="determinate"?null:f.jsx(YU,{className:h.bar2,ownerState:p,style:m.bar2})]}))});process.env.NODE_ENV!=="production"&&(qQ.propTypes={classes:g.object,className:g.string,color:g.oneOfType([g.oneOf(["inherit","primary","secondary"]),g.string]),sx:g.oneOfType([g.arrayOf(g.oneOfType([g.func,g.object,g.bool])),g.func,g.object]),value:g.number,valueBuffer:g.number,variant:g.oneOf(["buffer","determinate","indeterminate","query"])});const GU=qQ,KU=ue("div")(({theme:e})=>({position:"fixed",top:0,left:0,zIndex:2001,width:"100%","& > * + *":{marginTop:e.spacing(2)}})),$Q=()=>f.jsx(KU,{children:f.jsx(GU,{color:"primary"})}),JU=e=>t=>f.jsx(x.Suspense,{fallback:f.jsx($Q,{}),children:f.jsx(e,{...t})}),gp=({title:e})=>f.jsxs(b.Stack,{direction:"row",children:[f.jsx(b.Typography,{variant:"h2",sx:{fontWeight:"regular",letterSpacing:-2.5},children:"a."})," ",f.jsx(b.Typography,{variant:"h2",sx:{fontWeight:"bold"},children:e})]}),XU=ue(k.Notification,{})(({theme:e})=>({"& *":{fontSize:e.typography.body1.fontSize}}));function ex(e){return f.jsx(XU,{...e})}const pp=({children:e})=>{const t=Ct.useLocation(),{pathname:n}=t;return x.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},[n]),e||null};pp.propTypes={children:g.node};const ZU=ue("div")({width:"100%",overflowX:"auto",display:"block"}),hp=({title:e})=>f.jsx(b.Typography,{variant:"h2",sx:{style:"bold"},children:e==null?void 0:e.substr(0,1).toUpperCase()});hp.propTypes={title:g.string.isRequired};const tx=({children:e,...t})=>{const n=wt();return f.jsx(ir,{sx:{maxWidth:{xs:400,lg:475},margin:{xs:2.5,md:3},"& > *":{flexGrow:1,flexBasis:"50%"}},content:!1,...t,border:!1,boxShadow:!0,shadow:n.customShadows.z1,children:f.jsx(b.Box,{sx:{p:{xs:2,sm:3,md:4,xl:5}},children:e})})};tx.propTypes={children:g.node};function Ls({version:e,name:t,copy:n,children:r,logo:o,background:s=kl}){return f.jsxs(b.Box,{sx:{minHeight:"100vh"},children:[x.isValidElement(s)?s:x.createElement(s),f.jsxs(b.Grid,{container:!0,direction:"column",justifyContent:"flex-end",sx:{minHeight:"100vh"},children:[f.jsx(b.Grid,{item:!0,xs:12,sx:{ml:3},children:o||f.jsx(gp,{title:t})}),f.jsxs(b.Grid,{item:!0,xs:12,children:[f.jsx(b.Grid,{item:!0,xs:12,container:!0,justifyContent:"center",alignItems:"center",sx:{minHeight:{xs:"calc(100vh - 210px)",sm:"calc(100vh - 134px)",md:"calc(100vh - 112px)"}},children:f.jsx(b.Grid,{item:!0,children:f.jsx(tx,{children:r})})}),f.jsx(b.Grid,{item:!0,sx:{pb:1},children:f.jsx(Dg,{name:t,copy:n,version:e})})]})]})]})}Ls.propTypes={children:g.node,version:g.string,name:g.string,copy:g.string,background:g.oneOfType([g.node,g.func,g.object])};var il=(e=>(e.NONE="none",e.BROWSER="browser",e.USER="user",e))(il||{});const _U=no().required(),qU=no().oneOf(Object.values(il));function $U(e){var w;const t=Gi.useQueryClient(),[n,r]=x.useState(!1),[o,s]=x.useState(()=>()=>Promise.resolve()),a=ce.useGetIdentity(),c=(w=a==null?void 0:a.data)==null?void 0:w.email,u=ce.useDataProvider(),A=x.useCallback(()=>c?u.get("onboarding").then(M=>{var Q;return(Q=M==null?void 0:M.data)==null?void 0:Q.value}):Promise.reject(),[u,c]),{data:p,isLoading:h,isError:C}=Gi.useQuery({queryKey:["GET","onboarding",c],queryFn:A,staleTime:24*60*60*1e3,retry:c!==void 0}),[E,m]=x.useState(()=>()=>Promise.resolve()),v=Gi.useMutation({mutationFn:E}),B=v.mutateAsync;return x.useEffect(()=>{function M(){const Q=ne.chain(p??{}).clone().extend({[e]:Date.now()}).value();return u.post("onboarding",Q).then(()=>{t.invalidateQueries(["GET","onboarding",c])})}m(()=>M)},[u,p,e,t,c]),x.useEffect(()=>{r(ne.isNil((p??{})[e]))},[p,e,r]),x.useEffect(()=>{s(()=>()=>B())},[B]),{loading:h,error:C,onboardingRequired:n,acknowledgeOnboarding:o}}function eY(e){const[t,n]=tf("onboarding",{}),[r,o]=x.useState(!1),[s,a]=x.useState(()=>()=>Promise.resolve());return x.useEffect(()=>{o(ne.isNil((t??{})[e]))},[t,e,o]),x.useEffect(()=>{a(()=>()=>(n(c=>ne.extend(c,{[e]:Date.now()})),Promise.resolve()))},[e,n,a]),{onboardingRequired:r,acknowledgeOnboarding:s}}function tY(){return{onboardingRequired:!1,acknowledgeOnboarding:x.useRef(()=>Promise.resolve()).current}}function nY(e,t){ef({mode:qU,topic:_U}).validateSync({mode:e,topic:t});const n=$U(t),r=eY(t),o=tY();switch(e){case il.USER:return n.loading?o:n.error?r:ne.pick(n,["onboardingRequired","acknowledgeOnboarding"]);case il.BROWSER:return r;default:return o}}var sl=(e=>(e.RESTART="RESTART",e.SET_SHOW="SET_SHOW",e.REGISTER_TIP="REGISTER_TIP",e.UNREGISTER_TIP="UNREGISTER_TIP",e.DISMISS_TIP="DISMISS_TIP",e.SET_ON_COMPLETE="SET_ON_COMPLETE",e))(sl||{});function rY(e,t){var o;const n=ne.clone(e),{type:r}=t;switch(r){case"SET_SHOW":{const{payload:s}=t;return ne.extend(n,{show:s})}case"REGISTER_TIP":{const{payload:s}=t,{id:a}=s,c=ne.chain(n.tips).clone().reject(p=>p.id===a).value(),u=ne.find(n.tips,{id:a}),A=ne.chain(u??{}).clone().extend(s).value();return c.push(A),ne.extend(n,{tips:ne.sortBy(c,["step"])})}case"UNREGISTER_TIP":{const{payload:s}=t,a=ne.isString(s)?s:s.id,c=ne.chain(n.tips).reject(u=>u.id===a).sortBy(["step"]).value();return ne.extend(n,{tips:c})}case"DISMISS_TIP":{const{payload:s}=t,a=ne.isString(s)?s:s.id,c=ne.chain(n.tips).reject(C=>C.id===a).value(),u=ne.find(n.tips,{id:a});if(ne.isNil(u))return n;const A=ne.chain(u).clone().extend({dismissed:!0}).value();c.push(A);const p=((o=ne.chain(c).reject(C=>C.dismissed??!1).minBy("step").value())==null?void 0:o.step)??0;return(A==null?void 0:A.completeOnboarding)&&ne.chain(c).reject(C=>C.step<p).reject(C=>C.dismissed??!1).isEmpty().value()&&e.onComplete(),ne.extend(n,{tips:ne.sortBy(c,["step"]),currentStep:p})}case"SET_ON_COMPLETE":{const{payload:s}=t;return ne.extend(n,{onComplete:s})}case"RESTART":{const s=ne.chain(n.tips).clone().map(a=>ne.omit(a,"dismissed")).value();return ne.extend(n,{tips:s,currentStep:0})}default:return n}}const nx=x.createContext(void 0);function oY(e){const{mode:t,topic:n="default"}=e,{onboardingRequired:r,acknowledgeOnboarding:o}=nY(t,n),[s,a]=x.useReducer(rY,{show:r,tips:[],currentStep:0,onComplete:()=>{}}),c=x.useMemo(()=>({state:s,dispatch:a}),[s,a]);return x.useEffect(()=>{a({type:"SET_SHOW",payload:r})},[r,a]),x.useEffect(()=>{function u(){o().then(()=>{a({type:"SET_SHOW",payload:!1})})}a({type:"SET_ON_COMPLETE",payload:u})},[o,a]),f.jsx(nx.Provider,{value:c,children:e.children})}function rx(){const e=x.useContext(nx);if(e===void 0)throw new Error("[Onboarding] useOnboardingContext: context undefined. Please provide a valid OnboardingContext using OnboardingProvider");return e}function iY(){return rx().state}function ox(){return rx().dispatch}function sY(e){ef({id:no().required(),step:im().required()}).validateSync(e);const{id:t,step:n,completeOnboarding:r}=e,{show:o,tips:s,currentStep:a}=iY(),c=ne.find(s,{id:t}),{dismissed:u}=c??{},A=ox(),p=x.useCallback(()=>{A({type:sl.DISMISS_TIP,payload:t})},[A,t]);return x.useEffect(()=>{(ne.isNil(c)||n!==(c==null?void 0:c.step))&&A({type:sl.REGISTER_TIP,payload:{id:t,step:n,completeOnboarding:r}})},[t,n,r,c]),x.useEffect(()=>()=>{A({type:sl.UNREGISTER_TIP,payload:t})},[t,A]),{tip:ne.chain(c??e).clone().extend({open:o&&!ne.isNil(c)&&a===n&&!u}).value(),dismiss:p}}function aY(){const e=ox();return x.useCallback(()=>{e({type:sl.RESTART})},[e])}function lY(e){const{id:t,step:n=0,title:r,completeOnboarding:o}=e,{tip:s,dismiss:a}=sY({id:t,step:n,completeOnboarding:o}),{open:c}=s,u=ne.omit(e,["id","step","title","completeOnboarding"]);return f.jsx(ou,{...u,arrow:!0,open:c,title:f.jsxs(b.Stack,{gap:1,children:[f.jsx(b.Typography,{children:r}),f.jsx(b.Button,{onClick:a,variant:"text",color:"primary",size:"small",children:"Got it!"})]}),children:e.children})}const cY=b.styled(lY)(({theme:e})=>{const{palette:t,spacing:n}=e,{primary:r,background:o}=t;return{[`& .${b.tooltipClasses.tooltip}`]:{padding:`${n(1)} ${n(1.5)}`,backgroundColor:r.main,color:r.contrastText,[`& .${b.buttonClasses.root}`]:{backgroundColor:o.paper}},[`& .${b.tooltipClasses.arrow}`]:{color:r.main}}});function uY({label:e="ra.auth.sign_in",...t}){const n=k.useRecordContext(),[r,o]=x.useState(!1),s=k.useAuthProvider(),a=x.useCallback(c=>{c.stopPropagation(),c.preventDefault(),o(!0),s.impersonate(n==null?void 0:n.id).then(()=>{o(!1),document.location.href="/"})},[s,n==null?void 0:n.id]);return f.jsx(k.Button,{disabled:r||s.impersonate===void 0,color:"primary",variant:"text",label:e,onClick:a,...t,children:f.jsx(_n.VpnKey,{})})}const Cp=(e,t)=>{const n=t.id;if(!e)return[t];const r=e.findIndex(o=>o.id===n);return r===-1?[...e,t]:[...e.slice(0,r),{...e[r],...t},...e.slice(r+1)]},AY=(e,t)=>e&&e.data?{data:Cp(e.data,t),total:e.total+1}:e,dY=(e,t)=>e&&e.length>0?Cp(e,t):e,fY=(e,t)=>e&&e.data?{...e,data:Cp(e.data,t),total:e.total+1}:e,gY=({onClose:e,record:t,children:n,redirect:r=!1,onSubmit:o,onSuccess:s,onError:a,...c})=>{const u=Gi.useQueryClient(),A=k.useResourceContext(),p=k.useRedirect(),h=k.useNotify(),C=x.useCallback((B,w,M)=>{var S;const P=Date.now();u.setQueryData([A,"getOne",{id:B.id}],B),u.setQueriesData([A,"getList"],D=>fY(D,B),{updatedAt:P}),u.setQueriesData([A,"getMany"],D=>dY(D,B),{updatedAt:P}),u.setQueriesData([A,"getManyReference"],D=>AY(D,B),{updatedAt:P}),e(),h("ra.notification.created"),r!==void 0&&p(r,A,B.id,B),s&&s(B,e),(S=c==null?void 0:c.mutationOptions)!=null&&S.onSuccess&&c.mutationOptions.onSuccess(B,w,{...M,onClose:e})},[e,s,u,A,h,p,r]),{save:E,...m}=k.useCreateController({...c,mutationOptions:{...c==null?void 0:c.mutationOptions,onSuccess:C,onError:a}}),v=x.useCallback(B=>{o?o(B,e):E&&E(B)},[o,E,e]);return f.jsx(k.CreateContextProvider,{value:{record:t,save:v,saving:m==null?void 0:m.saving,redirect:r},children:x.cloneElement(n,{...n.props,modal:!0,toolbar:f.jsxs(yi,{children:[f.jsx(k.Button,{variant:"text",size:"medium",label:"ra.action.cancel",onClick:e,disabled:m==null?void 0:m.saving}),f.jsx(k.SaveButton,{type:"button",disabled:m==null?void 0:m.saving})]})})})},pY={true:{_scrollToTop:!0},false:{}},hY=ue(b.Fab,{overridesResolver:(e,t)=>t.root})(({theme:e})=>({[`&.${k.CreateButtonClasses.floating}`]:{color:e.palette.getContrastText(e.palette.primary.main),margin:0,top:"auto",right:20,bottom:60,left:"auto",position:"fixed",zIndex:1e3}}));function CY({fullWidth:e=!0,maxWidth:t="md",label:n="ra.action.create",record:r,redirect:o,scrollToTop:s=!0,className:a,sx:c,style:u,fab:A=!0,onSubmit:p,onSuccess:h,onError:C,...E}){const[m,v]=x.useState(!1),B=k.useTranslate(),w=k.useResourceContext(),{openDialog:M,closeDialog:Q}=ai(),P=x.useCallback(()=>M(w,()=>v(!0)),[M,w]),S=x.useCallback(()=>Q(w,()=>v(!1)),[Q,w]),D=A&&b.useMediaQuery(R=>R.breakpoints.down("md"));return f.jsxs(f.Fragment,{children:[D?f.jsx(hY,{state:pY[String(s)],color:"primary",className:Ve(k.CreateButtonClasses.floating,a),"aria-label":n&&B(n),onClick:P,children:f.jsx(Fg,{})}):f.jsx(k.Button,{sx:c,label:n,onClick:P,style:u,children:f.jsx(Fg,{})}),f.jsx(b.Dialog,{open:m,scroll:"body",onClose:S,fullWidth:e,maxWidth:t,children:f.jsx(gY,{...E,redirect:o,record:r,onClose:S,onSubmit:p,onSuccess:h,onError:C})})]})}const EY=({onClose:e,children:t,mutationMode:n="pessimistic",...r})=>{const o=k.useNotify(),s=k.useRecordContext(),a=k.useResourceContext(),{id:c}=s,{isLoading:u,data:A}=k.useGetOne(a,{id:c}),p=x.useCallback((...E)=>{o("ra.notification.updated",{type:"info",messageArgs:{smart_count:1}}),e(),r.onSuccess&&r.onSuccess(...E)},[e,o]),{save:h,saving:C}=k.useEditController({...r,resource:a,id:c,mutationMode:n,mutationOptions:{...r==null?void 0:r.mutationOptions,onSuccess:p}});return f.jsx(k.EditContextProvider,{value:{record:A,isLoading:u,save:h,saving:C},children:x.cloneElement(t,{...t.props,modal:!0,toolbar:f.jsxs(yi,{children:[f.jsx(k.Button,{variant:"text",size:"medium",label:"ra.action.cancel",onClick:e}),f.jsx(k.SaveButton,{type:"button"})]})})})};function mY({fullWidth:e=!0,maxWidth:t="md",label:n="ra.action.edit",style:r,children:o,...s}){const[a,c]=x.useState(!1),{openDialog:u,closeDialog:A}=ai(),p=k.useResourceContext(),h=x.useCallback(()=>u(p,()=>c(!0)),[u,p]),C=x.useCallback(()=>A(p,()=>c(!1)),[A,p]);return f.jsxs(f.Fragment,{children:[f.jsx(k.Button,{label:n,onClick:h,style:r,children:f.jsx(_n.Edit,{})}),f.jsx(b.Dialog,{open:a,scroll:"body",onClose:C,fullWidth:e,maxWidth:t,children:f.jsx(EY,{...s,onClose:C,children:o})})]})}function ix(e){const{label:t="ra.action.bulk_actions",children:n,className:r,...o}=e,{filterValues:s,resource:a,selectedIds:c=[],onUnselectItems:u}=ce.useListContext(e),A=ce.useTranslate(),p=x.useCallback(()=>{u()},[u]);return f.jsx(IY,{className:r,children:f.jsxs(yV,{"data-test":"bulk-actions-toolbar",className:Ve(Ar.toolbar,{[Ar.collapsed]:c.length===0}),...ce.sanitizeListRestProps(o),children:[f.jsxs("div",{className:Ar.title,children:[f.jsx(cg,{className:Ar.icon,"aria-label":A("ra.action.unselect"),title:A("ra.action.unselect"),onClick:p,size:"small",children:f.jsx(Su,{fontSize:"small"})}),f.jsx(iv,{color:"inherit",variant:"subtitle1",children:A(t,{_:t,smart_count:c.length})})]}),f.jsx(k.TopToolbar,{className:Ar.topToolbar,children:x.Children.map(n,h=>x.isValidElement(h)?x.cloneElement(h,{filterValues:s,resource:a,selectedIds:c}):null)})]})})}const xi="RaBulkActionsToolbar",Ar={toolbar:`${xi}-toolbar`,topToolbar:`${xi}-topToolbar`,buttons:`${xi}-buttons`,collapsed:`${xi}-collapsed`,title:`${xi}-title`,icon:`${xi}-icon`},IY=ue("div",{name:xi,overridesResolver:(e,t)=>t.root})(({theme:e})=>({position:"relative",[`& .${Ar.toolbar}`]:{position:"absolute",left:0,right:0,zIndex:3,color:e.palette.mode==="light"?e.palette.primary.main:e.palette.text.primary,justifyContent:"space-between",backgroundColor:e.palette.mode==="light"?pd(e.palette.primary.light,.8):e.palette.primary.dark,minHeight:e.spacing(6),height:e.spacing(6),transform:`translateY(-${e.spacing(6)})`,transition:`${e.transitions.create("height")}, ${e.transitions.create("min-height")}, ${e.transitions.create("transform")}`,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius},[`& .${Ar.topToolbar}`]:{paddingBottom:e.spacing(1),minHeight:"auto",[e.breakpoints.down("sm")]:{backgroundColor:"transparent"}},[`& .${Ar.buttons}`]:{},[`& .${Ar.collapsed}`]:{minHeight:0,height:0,transform:"translateY(0)",overflowY:"hidden"},[`& .${Ar.title}`]:{display:"flex",flex:"0 0 auto"},[`& .${Ar.icon}`]:{marginLeft:"-0.5em",marginRight:"0.5em"}})),Ep={p:0,m:0},sx={p:2,m:0,borderRadius:0,width:"100%"};function vY(e){const{children:t}=e,[n,r]=F.useState(null),o=m=>{r(m.currentTarget)},s=()=>{r(null)},a=b.useMediaQuery(m=>m.breakpoints.down("md")),{filterValues:c,resource:u,selectedIds:A=[],onUnselectItems:p}=k.useListContext(e),h=!!n&&A!==void 0&&A.length>0,C=h?"simple-popover":void 0,E=F.useCallback(()=>{p(),r(null)},[p,r]);return f.jsx(b.Fade,{in:A!==void 0&&A.length>0,children:f.jsxs(b.Box,{sx:{position:"fixed",bottom:"16px",right:"16px"},children:[f.jsx(b.Fab,{color:"primary","aria-label":"manage",onClick:o,children:A==null?void 0:A.length}),f.jsx(b.Popover,{id:C,open:h,anchorEl:n,onClose:s,anchorOrigin:{vertical:"top",horizontal:a?"center":"right"},transformOrigin:{vertical:"bottom",horizontal:a?"center":"right"},disableScrollLock:!0,elevation:10,children:f.jsxs(b.List,{sx:Ep,children:[f.jsx(b.ListItem,{sx:Ep,children:f.jsx(k.Button,{onClick:E,sx,label:"ra.action.unselect",startIcon:f.jsx(Su,{}),children:f.jsx(Su,{})})}),F.Children.map(t,m=>{var v;return f.jsx(b.ListItem,{sx:Ep,children:F.isValidElement(m)?F.cloneElement(m,{filterValues:c,resource:u,selectedIds:A,sx,...(v=m.props)!=null&&v.popover?{closePopover:s}:{}}):null})})]})})]})})}const ax=x.createContext({});ax.displayName="DatagridContext";const BY=({children:e,value:t})=>f.jsx(ax.Provider,{value:t,children:e}),lx=f.jsx(k.BulkDeleteButton,{}),cx=F.forwardRef((e,t)=>{const{optimized:n=!1,body:r=n?k.PureDatagridBody:k.DatagridBody,header:o=k.DatagridHeader,children:s,className:a,empty:c=QY,expand:u,bulkActionsToolbar:A=!1,bulkActionButtons:p=lx,hover:h,isRowSelectable:C,isRowExpandable:E,resource:m,rowClick:v,rowSx:B,rowStyle:w,size:M="small",sx:Q,expandSingle:P=!1,...S}=e,{sort:D,data:R,isLoading:G,onSelect:X,onToggleItem:q,selectedIds:W,setSort:re,total:ie}=ce.useListContext(e),Z=!!p,$=x.useMemo(()=>({isRowExpandable:E,expandSingle:P}),[E,P]),V=x.useRef(null);x.useEffect(()=>{(!W||W.length===0)&&(V.current=null)},[JSON.stringify(W)]);const _=x.useCallback((L,ee)=>{const U=R.map(fe=>fe.id),J=U.indexOf(V.current);if(V.current=ee.target.checked?L:null,ee.shiftKey&&J!==-1){const fe=U.indexOf(L),he=U.slice(Math.min(J,fe),Math.max(J,fe)+1),de=ee.target.checked?YH(W,he):sz(W,he);X(C?de.filter(ge=>C(R.find(Ce=>Ce.id===ge))):de)}else q(L)},[R,C,X,q,W]);return G===!0?f.jsx(k.DatagridLoading,{className:a,expand:u,hasBulkActions:Z,nbChildren:F.Children.count(s),size:M}):R==null||R.length===0||ie===0?c||null:f.jsx(BY,{value:$,children:f.jsxs(k.DatagridRoot,{sx:Q,className:Ve(k.DatagridClasses.root,a),children:[A!=null&&x.isValidElement(A)?x.cloneElement(A,{selectedIds:W,total:ie}):p!==!1?f.jsx(ix,{children:x.isValidElement(p)?p:lx}):null,f.jsx("div",{className:k.DatagridClasses.tableWrapper,children:f.jsxs(b.Table,{ref:t,className:k.DatagridClasses.table,size:M,...bY(S),children:[ux(o,{children:s,sort:D,data:R,hasExpand:!!u,hasBulkActions:Z,isRowSelectable:C,onSelect:X,resource:m,selectedIds:W,setSort:re},s),ux(r,{expand:u,rowClick:v,data:R,hasBulkActions:Z,hover:h,onToggleItem:_,resource:m,rowSx:B,rowStyle:w,selectedIds:W,isRowSelectable:C},s)]})})]})})}),ux=(e,t,n)=>x.isValidElement(e)?x.cloneElement(e,t,n):x.createElement(e,t,n),yY=["isRequired","setFilter","setPagination","limitChoicesToValue","translateChoice","field","fieldState","formState"],bY=e=>Object.keys(ce.sanitizeListRestProps(e)).filter(t=>!yY.includes(t)).reduce((t,n)=>({...t,[n]:e[n]}),{});cx.displayName="Datagrid";const QY=f.jsx(k.ListNoResults,{}),xY=ue(cx,{slot:"root"})(({theme:e})=>({"& .RaBulkActionsToolbar-toolbar":{height:48},"& .RaBulkActionsToolbar-collapsed":{height:0,paddingTop:0,paddingBottom:0},"& .RaBulkActionsToolbar-topToolbar":{backgroundColor:"transparent"},"& .icon span":{top:-1,left:-1},"& th":{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",backgroundColor:"inherit !important",textTransform:"none",fontSize:e.typography.subtitle1.fontSize}}));function wY(e){return f.jsx(xY,{...e})}const TY=ue("div")(({theme:e})=>({padding:e.spacing(2)}));function SY({actions:e,className:t,...n}){const{hasCreate:r}=ce.useResourceDefinition(n),o=ce.useResourceContext(n),s=ce.useTranslate(),a=ce.useGetResourceLabel(),c=s(`resources.${o}.forcedCaseName`,{smart_count:0,_:a(o,0)}),u=s("ra.page.empty",{name:c}),A=s("ra.page.invite");return f.jsxs(PY,{className:t,children:[f.jsxs("div",{className:wi.message,children:[f.jsx(_n.Inbox,{className:wi.icon}),f.jsx(b.Typography,{variant:"h4",paragraph:!0,children:s(`resources.${o}.empty`,{_:u})}),r&&f.jsx(b.Typography,{variant:"body1",children:s(`resources.${o}.invite`,{_:A})})]}),f.jsx(TY,{className:wi.toolbar,children:e})]})}const Vu="ApplicaEmpty",wi={message:`${Vu}-message`,icon:`${Vu}-icon`,toolbar:`${Vu}-toolbar`},PY=ue("span",{name:Vu,overridesResolver:(e,t)=>t.root})(({theme:e})=>({flex:1,[`& .${wi.message}`]:{textAlign:"center",opacity:e.palette.mode==="light"?.5:.8,margin:"0 1em",color:e.palette.mode==="light"?"inherit":e.palette.text.primary},[`& .${wi.icon}`]:{width:"9em",height:"9em"},[`& .${wi.toolbar}`]:{textAlign:"center",marginTop:"2em"}})),OY=f.jsx(k.ListActions,{}),jY=f.jsx(k.Pagination,{}),MY=f.jsx(k.Empty,{}),DY=gz,kY=e=>{const{actions:t=OY,aside:n,filters:r,bulkActionButtons:o,emptyWhileLoading:s,hasCreate:a,pagination:c=jY,children:u,className:A,component:p=DY,title:h,empty:C=MY,...E}=e,{defaultTitle:m,data:v,error:B,isLoading:w,filterValues:M,resource:Q}=ce.useListContext(e);if(!u||!v&&w&&s)return null;const P=()=>f.jsxs("div",{className:Wo.main,children:[(r||t)&&f.jsx(k.ListToolbar,{className:Wo.actions,filters:r,actions:t,hasCreate:a}),!B&&f.jsx(p,{className:Wo.content,children:o&&u&&F.isValidElement(u)?x.cloneElement(u,{bulkActionButtons:o}):u}),B?f.jsx(ep,{error:B,resetErrorBoundary:null}):c!==!1&&c]}),S=()=>C!==!1&&x.cloneElement(C,{className:Wo.noResults,hasCreate:a}),D=!w&&(v==null?void 0:v.length)===0&&!Object.keys(M).length&&C!==!1;return f.jsxs(RY,{className:Ve("list-page",A),...E,children:[f.jsx(k.Title,{title:h,defaultTitle:m,preferenceKey:`${Q}.list.title`}),D?S():P(),n]})},al="RaList",Wo={main:`${al}-main`,content:`${al}-content`,actions:`${al}-actions`,noResults:`${al}-noResults`},RY=ue("div",{name:al,overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",[`& .${Wo.main}`]:{flex:"1 1 auto",display:"flex",flexDirection:"column"},[`& .${Wo.content}`]:{position:"relative",[e.breakpoints.down("sm")]:{boxShadow:"none"},overflow:"inherit"},[`& .${Wo.actions}`]:{},[`& .${Wo.noResults}`]:{}})),FY=({debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o=LY,filterDefaultValues:s,perPage:a=10,queryOptions:c,resource:u,sort:A,storeKey:p,...h})=>f.jsx(ce.ListBase,{debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o,filterDefaultValues:s,perPage:a,queryOptions:c,resource:u,sort:A,storeKey:p,children:f.jsx(kY,{...h})}),LY={},NY=ga(FY,{slot:"root"})(({theme:e})=>({"& .RaList-main":{overflowX:"auto","& .RaBulkActionsToolbar-toolbar":{height:36,top:42,paddingTop:16,"& .RaBulkActionsToolbar-title":{alignItems:"end","& .MuiTypography-root":{alignSelf:"center"}}},"& .MuiToolbar-root":{"& form":{padding:e.spacing(2),paddingBottom:e.spacing(2),alignItems:"flex-start"}},"& .MuiButton-root":{margin:0},"& .RaList-actions":{minHeight:80,alignItems:"center",padding:e.spacing(2.5),"& form":{alignItems:"center",minHeight:"auto",paddingBottom:0,rowGap:e.spacing(2.5)},"& .RaFilterForm-filterFormInput":{margin:0,"& .MuiFormControl-root":{marginTop:0},"& .ra-input":{alignSelf:"center",marginTop:0},[e.breakpoints.down("sm")]:{"&>.MuiStack-root":{width:"100%","&>div:not(.MuiStack-root)":{width:"100%"}}}},"& .RaFilterFormInput-hideButton":{margin:"0 !important",alignSelf:"center"},"& > .MuiToolbar-root":{flex:"unset",padding:0,alignSelf:"center",minHeight:"fit-content",[e.breakpoints.down("sm")]:{paddingBottom:e.spacing(2)}}},"& .RaList-content":{borderRadius:0,"& .RaBulkActionsToolbar-collapsed":{height:0,paddingTop:0,paddingBottom:0},"& .icon span":{top:-1,left:-1}}},"& .RaEmpty-toolbar":{margin:e.spacing(2)}}));function VY(e){return f.jsx(ir,{content:!1,children:f.jsx(NY,{...e})})}function HY(){const e=k.useRefresh(),t=k.useNotify(),n=k.useResourceContext(),r=k.useUnselectAll(n),{selectedIds:o,data:s}=k.useListContext(),a=k.useRecordContext(),c=o.map(h=>s.find(C=>C.id===h)),[u,{isLoading:A}]=k.useUpdateMany(n,{ids:o.length>0?o:[a==null?void 0:a.id],data:{readed:Nr().format("YYYY-MM-DD HH:mm:ss")},rows:c},{onSuccess:()=>{e(),t("resources.notifications.messages.readed.done"),r()},onError:()=>t("ra.notification.readed_error",{type:"warning"}),onFailure:()=>t("ra.notification.readed_error",{type:"warning"})}),p=x.useCallback(()=>{u()},[u]);return f.jsx(k.Button,{label:"ra.notification.mark_as_readed",disabled:A||(a==null?void 0:a.readed)!==null,onClick:p,children:f.jsx(_n.Email,{})})}function zY(){const e=k.useRefresh(),t=k.useNotify(),n=k.useResourceContext(),r=k.useUnselectAll(n),{selectedIds:o,data:s}=k.useListContext(),a=k.useRecordContext(),c=o.map(h=>s.find(C=>C.id===h)).concat([a]),[u,{isLoading:A}]=k.useUpdateMany(n,{ids:o.length>0?o:[a==null?void 0:a.id],data:{readed:null},rows:c},{onSuccess:()=>{e(),t("resources.notifications.messages.unreaded.done"),r()},onFailure:()=>t("resources.notifications.messages.unreaded.error",{type:"warning"})}),p=x.useCallback(()=>{u()},[u]);return f.jsx(k.Button,{color:"secondary",label:"ra.notification.mark_as_unreaded",disabled:A||a&&!(a!=null&&a.readed),onClick:p,children:f.jsx(_n.Drafts,{})})}function WY(e){const t=k.useRecordContext(e),n=k.useResourceContext(e),r=k.useRedirect(),o=k.useNotify(),s=k.useTranslate(),[a]=k.useLocaleState(),c=x.useMemo(()=>t!=null&&t.readed?Nr(t==null?void 0:t.readed).locale(a).format("ddd, DD MMM YYYY HH:mm:ss"):!1,[t==null?void 0:t.readed,a]),[u]=k.useUpdate(n,{id:t==null?void 0:t.id,data:{...t,readed:Nr().format("YYYY-MM-DD HH:mm:ss")}},{onSuccess:()=>{t!=null&&t.resource&&(t!=null&&t.resource.startsWith("/")?r(t==null?void 0:t.resource):document.location.href=t==null?void 0:t.resource)},onError:()=>{o("ra.notification.readed_error",{type:"warning"})}}),A=x.useCallback(()=>u(),[u]);return f.jsxs("div",{onClick:A,style:{cursor:"pointer"},role:"button",tabIndex:0,children:[f.jsx(b.Typography,{variant:"subtitle1",children:f.jsxs(b.Box,{fontWeight:"bold",children:[" ",t==null?void 0:t.title]})}),f.jsx(b.Typography,{variant:"body1",sx:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",whiteSpace:"break-spaces"},dangerouslySetInnerHTML:{__html:t==null?void 0:t.content}}),c&&f.jsx(b.Typography,{variant:"caption",display:"block",sx:{mt:1},color:"textSecondary",children:s("ra.notification.readed",{readed:c})})]})}function UY({...e}){const t=b.useTheme(),{mode:n,colorize:r,density:o}=x.useMemo(()=>({mode:t.palette.mode,colorize:t.palette.mode==="dark"?b.darken:b.lighten,density:t.palette.mode==="dark"?.5:.9}),[t.palette.mode]),s=a=>({backgroundColor:a!=null&&a.readed?r(t.palette.secondary[n],o):r(t.palette.primary[n],o)});return f.jsxs(k.Datagrid,{...e,rowSx:s,children:[f.jsx(WY,{source:"notification",sortable:!1}),f.jsx(lB,{source:"created"}),f.jsxs(si,{children:[f.jsx(HY,{}),f.jsx(zY,{})]})]})}const YY=ue(k.SimpleList,{name:"ApplicaSimpleList",slot:"root"})(({theme:e})=>({padding:e.spacing(1),paddingTop:0,paddingBottom:0})),Hu={width:"1.5rem",alignSelf:"center"};function GY({source:e,label:t,variant:n="body1",record:r,spaceBottom:o,spaceTop:s,component:a,leftIcon:c,rightIcon:u,button:A,buttonProps:p,...h}){const{getCurrentDialog:C}=ai(),E=ce.useResourceContext(h),m=C(),v=ce.useRecordContext(),B=r||v,w=ct.get(B,e||"");return f.jsxs(b.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:M=>({pt:1,pb:1,borderBottom:`1px solid ${M.palette.divider}`,...o&&{mb:2},...s&&{mt:2}}),children:[f.jsxs(b.Stack,{direction:"row",alignItems:"start",children:[c&&(x.isValidElement(c)?x.cloneElement(c,{style:Hu}):x.createElement(c,{style:Hu})),f.jsx(ce.FieldTitle,{label:t,source:e,resource:m||E})]}),f.jsxs(b.Stack,{direction:"row",alignItems:"center",children:[a?x.isValidElement(a)?x.cloneElement(a,{record:B,resource:E,value:w}):x.createElement(a,{source:e,record:B,resource:E,value:w}):f.jsx(b.Typography,{variant:n,children:w}),u&&(x.isValidElement(u)?x.cloneElement(u,{style:Hu}):x.createElement(u,{style:Hu})),A&&f.jsx(b.Button,{size:"small",variant:"outlined",sx:{ml:1,p:0},...p,children:A})]})]})}const Ax=({name:e,copy:t,logo:n,version:r,background:o})=>{const s=ce.useTranslate(),a=ce.useAuthProvider(),c=ce.useNotify(),u=Ct.useNavigate(),{token:A}=Ct.useParams();return x.useEffect(()=>{if(typeof a.activate!="function")throw new Error("The authProvider used for the ActivatePage must define an activate() method");a.activate(A).then(()=>{c("ra.auth.activate_success",{type:"info"}),ne.delay(()=>u("/login"),1e3)}).catch(p=>{c(p,{type:"error"}),ne.delay(()=>u("/login"),1e3)})},[A]),f.jsx(Ls,{name:e,copy:t,logo:n,version:r,background:o,children:f.jsxs(b.Grid,{container:!0,spacing:3,children:[f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(b.Typography,{variant:"h3",children:s("ra.auth.activate")}),f.jsx(b.Typography,{component:Ct.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:s("ra.auth.back_to_login")})]})}),f.jsx(b.Grid,{item:!0,xs:12,children:s("ra.auth.activate_pending")})]})})};Ax.propTypes={name:g.string.isRequired,version:g.string.isRequired,background:g.node};function dx({version:e,name:t,copy:n,logo:r,enablePasswordRecover:o=!1,enableRegistration:s=!1,redirectTo:a,background:c=f.jsx(kl,{})}){const[u,A]=ce.useSafeSetState(!1),p=ce.useLogin(),h=ce.useTranslate(),C=ce.useNotify(),E=ce.useCheckAuth(),m=Ct.useNavigate();x.useEffect(()=>{E({},!1).then(()=>{m("/")}).catch(()=>{})},[E,m]);const v=B=>{A(!0),p(B,a).then(()=>{A(!1)}).catch(w=>{A(!1),C(typeof w=="string"?w:typeof w>"u"||!w.message?"ra.auth.sign_in_error":w.message,{type:"error",messageArgs:{_:typeof w=="string"?w:w&&w.message?w.message:void 0}})})};return f.jsx(Ls,{name:t,version:e,copy:n,logo:r,background:c,children:f.jsxs(b.Grid,{container:!0,spacing:3,children:[f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(b.Typography,{variant:"h3",children:"Login"}),s&&f.jsx(b.Typography,{component:Ct.Link,to:"/register",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:h("ra.auth.register")})]})}),f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(ce.Form,{onSubmit:v,children:[f.jsxs(b.Grid,{container:!0,children:[f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:2},children:f.jsx(br,{autoFocus:!0,source:"username",label:h("ra.auth.username"),autoComplete:"username",validate:ce.required(),placeholder:"user@company.name",fullWidth:!0})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:2},children:f.jsx(br,{source:"password",label:h("ra.auth.password"),type:"password",autoComplete:"current-password",validate:ce.required(),placeholder:h("ra.auth.password_placeholder"),fullWidth:!0})})]}),o&&f.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(b.Stack,{direction:"row",justifyContent:"flex-end",alignItems:"flex-end",spacing:2,children:f.jsx(b.Link,{variant:"h6",component:Ct.Link,to:"/recover",color:"text.primary",children:h("ra.auth.forgot_password")})})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(b.Button,{variant:"contained",type:"submit",color:"primary",disabled:u,fullWidth:!0,children:u?f.jsx(b.CircularProgress,{size:19,thickness:3}):h("ra.auth.sign_in")})})]})})]})})}const fx=({name:e,copy:t,logo:n,version:r,background:o})=>{const[s,a]=x.useState(!1),c=ce.useTranslate(),u=ce.useRedirect(),A=ce.useNotify(),p=ce.useAuthProvider(),h=({email:C})=>{a(!0),p.recover(C).then(E=>{const m=`ra.auth.recover_${E.responseCode}`,v=E.responseCode==="ok"?"info":"error";A(m,{type:v}),u("/login")}).catch(E=>{A((E==null?void 0:E.message)||(E==null?void 0:E.toString()),{type:"error"})}).finally(()=>a(!1))};return f.jsx(Ls,{name:e,copy:t,logo:n,version:r,background:o,children:f.jsxs(b.Grid,{container:!0,spacing:3,children:[f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(b.Typography,{variant:"h3",children:c("ra.auth.recover.title")}),f.jsx(b.Typography,{component:Ct.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:c("ra.auth.back_to_login")})]})}),f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(k.Form,{onSubmit:h,children:[f.jsx(b.Grid,{container:!0,children:f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(br,{source:"email",validate:[ce.required(),ce.email()]})})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1,mb:1},children:f.jsx(b.Typography,{variant:"caption",children:c("ra.auth.recover.inbox_help")})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(b.Button,{variant:"contained",type:"submit",color:"primary",disabled:s,fullWidth:!0,children:s?f.jsx(b.CircularProgress,{size:19,thickness:3}):c("ra.auth.recover")})})]})})]})})};fx.propTypes={name:g.string.isRequired,version:g.string.isRequired,background:g.node};const gx=({name:e,copy:t,version:n,logo:r,background:o})=>{const[s,a]=x.useState(!1),c=ce.useTranslate(),u=ce.useRedirect(),A=ce.useNotify(),p=ce.useAuthProvider(),h=C=>{a(!0),p.register(C).then(E=>{const m=`ra.auth.register_${E.responseCode}`,v=E.responseCode==="ok"?"info":"error";A(m,{type:v}),u("/login")}).catch(E=>{A(E,{type:"error"})}).finally(()=>a(!1))};return f.jsx(Ls,{name:e,copy:t,logo:r,background:o,version:n,children:f.jsxs(b.Grid,{container:!0,spacing:3,children:[f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(b.Typography,{variant:"h3",children:c("ra.auth.register.title")}),f.jsx(b.Typography,{component:Ct.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:c("ra.auth.already_have_account")})]})}),f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(k.Form,{onSubmit:h,children:[f.jsxs(b.Grid,{container:!0,children:[f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(br,{source:"name",label:c("ra.register.name"),validate:ce.required()})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(br,{source:"email",type:"email",validate:[ce.required(),ce.email()]})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(br,{source:"password",type:"password",validate:ce.required()})})]}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(b.Button,{variant:"contained",type:"submit",color:"primary",disabled:s,fullWidth:!0,children:s?f.jsx(b.CircularProgress,{size:19,thickness:3}):c("ra.auth.create_account")})})]})})]})})};gx.propTypes={name:g.string.isRequired,version:g.string.isRequired};function px(){const e=x.useCallback(()=>location.reload(),[]);return f.jsx(b.Container,{children:f.jsxs(b.Stack,{alignItems:"center",px:2,py:{xs:4,sm:8},spacing:2,textAlign:"center",children:[f.jsx("img",{src:ub,style:{width:"100%",maxWidth:450}}),f.jsx(b.Typography,{variant:"h2",children:"Ops! An error occurred..."}),f.jsx(b.Typography,{children:"We're fixing the problem. Please try again later."}),f.jsx(b.Button,{onClick:e,variant:"contained",children:"Reload"})]})})}const KY=e=>({button:e.palette.mode==="dark"?"0 2px 0 rgb(0 0 0 / 5%)":"0 2px #0000000b",text:"0 -1px 0 rgb(0 0 0 / 12%)",z1:e.palette.mode==="dark"?"0px 1px 1px rgb(0 0 0 / 14%), 0px 2px 1px rgb(0 0 0 / 12%), 0px 1px 3px rgb(0 0 0 / 20%)":`0px 1px 4px ${nt(e.palette.grey[900],.08)}`,primary:`0 0 0 2px ${nt(e.palette.primary.main,.2)}`,secondary:`0 0 0 2px ${nt(e.palette.secondary.main,.2)}`,error:`0 0 0 2px ${nt(e.palette.error.main,.2)}`,warning:`0 0 0 2px ${nt(e.palette.warning.main,.2)}`,info:`0 0 0 2px ${nt(e.palette.info.main,.2)}`,success:`0 0 0 2px ${nt(e.palette.success.main,.2)}`,grey:`0 0 0 2px ${nt(e.palette.grey[500],.2)}`,primaryButton:`0 14px 12px ${nt(e.palette.primary.main,.2)}`,secondaryButton:`0 14px 12px ${nt(e.palette.secondary.main,.2)}`,errorButton:`0 14px 12px ${nt(e.palette.error.main,.2)}`,warningButton:`0 14px 12px ${nt(e.palette.warning.main,.2)}`,infoButton:`0 14px 12px ${nt(e.palette.info.main,.2)}`,successButton:`0 14px 12px ${nt(e.palette.success.main,.2)}`,greyButton:`0 14px 12px ${nt(e.palette.grey[500],.2)}`});function dr(e,t){JY(e)&&(e="100%");var n=XY(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function JY(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function XY(e){return typeof e=="string"&&e.indexOf("%")!==-1}function ZY(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function zu(e){return e<=1?"".concat(Number(e)*100,"%"):e}function mp(e){return e.length===1?"0"+e:String(e)}function _Y(e,t,n){return{r:dr(e,255)*255,g:dr(t,255)*255,b:dr(n,255)*255}}function Ip(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function qY(e,t,n){var r,o,s;if(e=dr(e,360),t=dr(t,100),n=dr(n,100),t===0)o=n,s=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;r=Ip(c,a,e+1/3),o=Ip(c,a,e),s=Ip(c,a,e-1/3)}return{r:r*255,g:o*255,b:s*255}}function $Y(e,t,n){e=dr(e,255),t=dr(t,255),n=dr(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),s=0,a=r,c=r-o,u=r===0?0:c/r;if(r===o)s=0;else{switch(r){case e:s=(t-n)/c+(t<n?6:0);break;case t:s=(n-e)/c+2;break;case n:s=(e-t)/c+4;break}s/=6}return{h:s,s:u,v:a}}function eG(e,t,n){e=dr(e,360)*6,t=dr(t,100),n=dr(n,100);var r=Math.floor(e),o=e-r,s=n*(1-t),a=n*(1-o*t),c=n*(1-(1-o)*t),u=r%6,A=[n,a,s,s,c,n][u],p=[c,n,n,a,s,s][u],h=[s,s,c,n,n,a][u];return{r:A*255,g:p*255,b:h*255}}function tG(e,t,n,r){var o=[mp(Math.round(e).toString(16)),mp(Math.round(t).toString(16)),mp(Math.round(n).toString(16))];return r&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function hx(e){return Wn(e)/255}function Wn(e){return parseInt(e,16)}var Cx={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function ll(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,s=null,a=!1,c=!1;return typeof e=="string"&&(e=oG(e)),typeof e=="object"&&(Ao(e.r)&&Ao(e.g)&&Ao(e.b)?(t=_Y(e.r,e.g,e.b),a=!0,c=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Ao(e.h)&&Ao(e.s)&&Ao(e.v)?(r=zu(e.s),o=zu(e.v),t=eG(e.h,r,o),a=!0,c="hsv"):Ao(e.h)&&Ao(e.s)&&Ao(e.l)&&(r=zu(e.s),s=zu(e.l),t=qY(e.h,r,s),a=!0,c="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=ZY(n),{ok:a,format:e.format||c,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var nG="[-\\+]?\\d+%?",rG="[-\\+]?\\d*\\.\\d+%?",Uo="(?:".concat(rG,")|(?:").concat(nG,")"),vp="[\\s|\\(]+(".concat(Uo,")[,|\\s]+(").concat(Uo,")[,|\\s]+(").concat(Uo,")\\s*\\)?"),Bp="[\\s|\\(]+(".concat(Uo,")[,|\\s]+(").concat(Uo,")[,|\\s]+(").concat(Uo,")[,|\\s]+(").concat(Uo,")\\s*\\)?"),Qr={CSS_UNIT:new RegExp(Uo),rgb:new RegExp("rgb"+vp),rgba:new RegExp("rgba"+Bp),hsl:new RegExp("hsl"+vp),hsla:new RegExp("hsla"+Bp),hsv:new RegExp("hsv"+vp),hsva:new RegExp("hsva"+Bp),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function oG(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Cx[e])e=Cx[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Qr.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Qr.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Qr.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Qr.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Qr.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Qr.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Qr.hex8.exec(e),n?{r:Wn(n[1]),g:Wn(n[2]),b:Wn(n[3]),a:hx(n[4]),format:t?"name":"hex8"}:(n=Qr.hex6.exec(e),n?{r:Wn(n[1]),g:Wn(n[2]),b:Wn(n[3]),format:t?"name":"hex"}:(n=Qr.hex4.exec(e),n?{r:Wn(n[1]+n[1]),g:Wn(n[2]+n[2]),b:Wn(n[3]+n[3]),a:hx(n[4]+n[4]),format:t?"name":"hex8"}:(n=Qr.hex3.exec(e),n?{r:Wn(n[1]+n[1]),g:Wn(n[2]+n[2]),b:Wn(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function Ao(e){return!!Qr.CSS_UNIT.exec(String(e))}var Wu=2,Ex=.16,iG=.05,sG=.05,aG=.15,mx=5,Ix=4,lG=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function vx(e){var t=e.r,n=e.g,r=e.b,o=$Y(t,n,r);return{h:o.h*360,s:o.s,v:o.v}}function Uu(e){var t=e.r,n=e.g,r=e.b;return"#".concat(tG(t,n,r,!1))}function cG(e,t,n){var r=n/100,o={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return o}function Bx(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-Wu*t:Math.round(e.h)+Wu*t:r=n?Math.round(e.h)+Wu*t:Math.round(e.h)-Wu*t,r<0?r+=360:r>=360&&(r-=360),r}function yx(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-Ex*t:t===Ix?r=e.s+Ex:r=e.s+iG*t,r>1&&(r=1),n&&t===mx&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function bx(e,t,n){var r;return n?r=e.v+sG*t:r=e.v-aG*t,r>1&&(r=1),Number(r.toFixed(2))}function Qx(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=ll(e),o=mx;o>0;o-=1){var s=vx(r),a=Uu(ll({h:Bx(s,o,!0),s:yx(s,o,!0),v:bx(s,o,!0)}));n.push(a)}n.push(Uu(r));for(var c=1;c<=Ix;c+=1){var u=vx(r),A=Uu(ll({h:Bx(u,c),s:yx(u,c),v:bx(u,c)}));n.push(A)}return t.theme==="dark"?lG.map(function(p){var h=p.index,C=p.opacity,E=Uu(cG(ll(t.backgroundColor||"#141414"),ll(n[h]),C*100));return E}):n}var yp={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},_t={},Yu={};Object.keys(yp).forEach(function(e){_t[e]=Qx(yp[e]),_t[e].primary=_t[e][5],Yu[e]=Qx(yp[e],{theme:"dark",backgroundColor:"#141414"}),Yu[e].primary=Yu[e][5]}),_t.red,_t.volcano,_t.gold,_t.orange,_t.yellow,_t.lime,_t.green,_t.cyan,_t.blue,_t.geekblue,_t.purple,_t.magenta,_t.grey,_t.grey;const xx=e=>{const{blue:t,red:n,gold:r,cyan:o,green:s,grey:a}=e,c={0:a[0],50:a[1],100:a[2],200:a[3],300:a[4],400:a[5],500:a[6],600:a[7],700:a[8],800:a[9],900:a[10],A50:a[15],A100:a[11],A200:a[12],A400:a[13],A700:a[14],A800:a[16]},u="#fff";return{primary:{lighter:t[0],100:t[1],200:t[2],light:t[3],400:t[4],main:t[5],dark:t[6],700:t[7],darker:t[8],900:t[9],contrastText:u},secondary:{lighter:c[100],100:c[100],200:c[200],light:c[300],400:c[400],main:c[500],600:c[600],dark:c[700],800:c[800],darker:c[900],A100:c[0],A200:c.A400,A300:c.A700,contrastText:c[0]},error:{lighter:n[0],light:n[2],main:n[4],dark:n[7],darker:n[9],contrastText:u},warning:{lighter:r[0],light:r[3],main:r[5],dark:r[7],darker:r[9],contrastText:c[100]},info:{lighter:o[0],light:o[3],main:o[5],dark:o[7],darker:o[9],contrastText:u},success:{lighter:s[0],light:s[3],main:s[5],dark:s[7],darker:s[9],contrastText:u},grey:c}};xx.propTypes={colors:g.object};const uG=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#D6E4FF","#D6E4FF","#ADC8FF","#84A9FF","#6690FF","#3366FF","#254EDB","#1939B7","#102693","#102693"],a=["#FFE7D3","#FF805D","#FF4528","#DB271D","#930C1A"],c=["#FFF6D0","#FFCF4E","#FFB814","#DB970E","#935B06"],u=["#DCF0FF","#7EB9FF","#549BFF","#3D78DB","#1A3D93"],A=["#EAFCD4","#8AE65B","#58D62A","#3DB81E","#137C0D"];return t==="dark"&&(s=["#1c2134","#1f294d","#243462","#273e83","#2c4db0","#305bdd","#567fe9","#80a4f4","#a9c5f8","#d2e2fb"],a=["#341d1b","#b03725","#dd3f27","#e9664d","#fbd6c9"],c=["#342a1a","#83631a","#dda116","#e9ba3a","#fbefb5"],u=["#202734","#416fb0","#4c88dd","#74a8e9","#ecf4fb"],A=["#1f2e1c","#449626","#4fba28","#74cf4d","#e3fbd2"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},grey:r}},AG=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#EEEDFC","#D5D1F8","#B9B2F3","#9C93EE","#877CEA","#7265E6","#6A5DE3","#5F53DF","#5549DB","#4237D5"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],A=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#222130","#2b2946","#37335a","#443e78","#554ca0","#655ac8","#9186dd","#5F53DF","#c3baf4","#efecfb"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],A=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},grey:r}},dG=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#E6F3EC","#84c297","#5eb57d","#3da866","#1f9c53","#068e44","#006933","#004222","#001c0f","#000000"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],A=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a231f","#173123","#174029","#13502f","#0e6737","#0a7d3e","#1f8f4e","#3ba162","#5cb07a","#82bf95"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],A=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},grey:r}},fG=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#f0f6ff","#edf4ff","#bed3f7","#8faeeb","#6488de","#3c64d0","#2947ab","#192f85","#0d1b5e","#070e38"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],A=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1d212d","#212841","#273353","#2c3e6e","#324c92","#385ab5","#5d7dcb","#89a7e1","#b9cef0","#e9f0fb"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],A=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},grey:r}},gG=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#fff4e6","#ffdfb8","#ffc98f","#ffb066","#ff943d","#f27013","#cc5206","#a63a00","#802800","#591900"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],A=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#32221a","#4a2b18","#5e371b","#7d4319","#a85317","#d26415","#e9883a","#f4a962","#f8c48c","#fbdbb5"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],A=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},grey:r}},pG=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#e1f0ef","#c8e3e2","#9ad6d6","#71c6c9","#4bb5bd","#2aa1af","#1a7b8a","#0e5563","#06323d","#021217"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],A=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1c2628","#1d3539","#22454a","#23595f","#26737c","#288d99","#47a6ad","#6dbec0","#96d0d0","#c5dfde"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],A=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},grey:r}},hG=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#d1e8d99c","#8cdba9","#63cf8e","#3ec277","#1db564","#00a854","#008245","#005c34","#003620","#000f0a"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],A=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a2721","#173728","#15472e","#115c36","#0b7841","#05934c","#1da65d","#3cba73","#61ca8b","#8ad7a6"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],A=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},grey:r}},CG=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#c1d6d066","#81c9b9","#5bbda9","#38b09c","#1aa391","#009688","#007069","#004a47","#002424","#000000"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],A=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a2524","#173331","#15423e","#11544e","#0b6c63","#058478","#1a9686","#37a996","#59b8a5","#7fc6b6"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],A=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},grey:r}},wx=(e,t,n)=>{switch(t){case"theme1":return uG(e,n);case"theme2":return AG(e,n);case"theme3":return dG(e,n);case"theme4":return fG(e,n);case"theme5":return gG(e,n);case"theme6":return pG(e,n);case"theme7":return hG(e,n);case"theme8":return CG(e,n);default:return xx(e)}};wx.propTypes={colors:g.object,presetColor:g.any};const EG=(e,t)=>{const n=e==="dark"?Yu:_t;let r=["#ffffff","#fafafa","#f5f5f5","#f0f0f0","#d9d9d9","#bfbfbf","#8c8c8c","#595959","#262626","#141414","#000000"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],s=["#fafafb","#e6ebf1"];e==="dark"&&(r=["#000000","#141414","#1e1e1e","#595959","#8c8c8c","#bfbfbf","#d9d9d9","#f0f0f0","#f5f5f5","#fafafa","#ffffff"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],s=["#121212","#d3d8db"]),n.grey=[...r,...o,...s];const a=wx(n,t,e);return wd({palette:{mode:e,common:{black:"#000",white:"#fff"},...a,text:{primary:e==="dark"?nt(a.grey[900],.87):a.grey[700],secondary:e==="dark"?nt(a.grey[900],.45):a.grey[500],disabled:e==="dark"?nt(a.grey[900],.1):a.grey[400]},action:{disabled:a.grey[300]},divider:e==="dark"?nt(a.grey[900],.05):a.grey[200],background:{paper:e==="dark"?a.grey[100]:a.grey[0],default:a.grey.A50}}})},mG=e=>({htmlFontSize:16,fontFamily:e,fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:500,fontWeightBold:600,h1:{fontWeight:600,fontSize:"2.375rem",lineHeight:1.21},h2:{fontWeight:600,fontSize:"1.875rem",lineHeight:1.27},h3:{fontWeight:600,fontSize:"1.5rem",lineHeight:1.33},h4:{fontWeight:600,fontSize:"1.25rem",lineHeight:1.4},h5:{fontWeight:600,fontSize:"1rem",lineHeight:1.5},h6:{fontWeight:400,fontSize:"0.875rem",lineHeight:1.57},caption:{fontWeight:400,fontSize:"0.75rem",lineHeight:1.66},body1:{fontSize:"0.875rem",lineHeight:1.57},body2:{fontSize:"0.75rem",lineHeight:1.66},subtitle1:{fontSize:"0.875rem",fontWeight:600,lineHeight:1.57},subtitle2:{fontSize:"0.75rem",fontWeight:500,lineHeight:1.66},overline:{lineHeight:1.66},button:{textTransform:"capitalize"}});function IG(e){return{MuiAccordion:{defaultProps:{disableGutters:!0,square:!0,elevation:0},styleOverrides:{root:{border:`1px solid ${e.palette.secondary.light}`,"&:not(:last-child)":{borderBottom:0},"&:before":{display:"none"},"&.Mui-disabled":{backgroundColor:e.palette.secondary.lighter}}}}}}function vG(e){return{MuiAccordionDetails:{styleOverrides:{root:{padding:e.spacing(2),borderTop:`1px solid ${e.palette.secondary.light}`}}}}}function BG(e){const{palette:t,spacing:n}=e;return{MuiAccordionSummary:{defaultProps:{expandIcon:f.jsx(Ze.RightOutlined,{style:{fontSize:"0.75rem"}})},styleOverrides:{root:{backgroundColor:t.secondary.lighter,flexDirection:"row-reverse",minHeight:46},expandIconWrapper:{"&.Mui-expanded":{transform:"rotate(90deg)"}},content:{marginTop:n(1.25),marginBottom:n(1.25),marginLeft:n(1)}}}}}function Ti({color:e,theme:t}){const n=an(t,e),{lighter:r,light:o,main:s}=n;return{borderColor:nt(o,.5),backgroundColor:r,"& .MuiAlert-icon":{color:s}}}function yG(e){const t=Ti({color:"primary",theme:e});return{MuiAlert:{styleOverrides:{root:{color:e.palette.text.primary,fontSize:"0.875rem"},icon:{fontSize:"1rem"},message:{padding:0,marginTop:3},filled:{color:e.palette.grey[0]},border:{padding:"10px 16px",border:"1px solid",...t,"&.MuiAlert-borderPrimary":Ti({color:"primary",theme:e}),"&.MuiAlert-borderSecondary":Ti({color:"secondary",theme:e}),"&.MuiAlert-borderError":Ti({color:"error",theme:e}),"&.MuiAlert-borderSuccess":Ti({color:"success",theme:e}),"&.MuiAlert-borderInfo":Ti({color:"info",theme:e}),"&.MuiAlert-borderWarning":Ti({color:"warning",theme:e})},action:{"& .MuiButton-root":{padding:2,height:"auto",fontSize:"0.75rem",marginTop:-2},"& .MuiIconButton-root":{width:"auto",height:"auto",padding:2,marginRight:6,"& .MuiSvgIcon-root":{fontSize:"1rem"}}}}}}}function bG(){return{MuiAlertTitle:{styleOverrides:{root:{marginBottom:4,marginTop:0,fontWeight:400}}}}}function QG(e){var t;return{MuiAutocomplete:{styleOverrides:{root:{"& .MuiOutlinedInput-root":{padding:"3px 9px"}},popupIndicator:{width:"auto",height:"auto"},popper:{border:`1px solid ${e.palette.mode==="dark"?(t=e.palette.dark)==null?void 0:t.main:e.palette.grey[100]}`},clearIndicator:{width:"auto",height:"auto"}}}}}function Si({color:e,theme:t}){const n=an(t,e),{lighter:r,main:o}=n;return{color:o,backgroundColor:r}}function xG(e){const t=Si({color:"primary",theme:e});return{MuiBadge:{styleOverrides:{standard:{minWidth:e.spacing(2),height:e.spacing(2),padding:e.spacing(.5)},light:{...t,"&.MuiBadge-colorPrimary":Si({color:"primary",theme:e}),"&.MuiBadge-colorSecondary":Si({color:"secondary",theme:e}),"&.MuiBadge-colorError":Si({color:"error",theme:e}),"&.MuiBadge-colorInfo":Si({color:"info",theme:e}),"&.MuiBadge-colorSuccess":Si({color:"success",theme:e}),"&.MuiBadge-colorWarning":Si({color:"warning",theme:e})}}}}}function $e({variant:e,color:t,theme:n}){const r=an(n,t),{lighter:o,main:s,dark:a,contrastText:c}=r,u=`${t}Button`,A=Is(n,u),p={"&::after":{boxShadow:`0 0 5px 5px ${nt(s,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${nt(s,.9)}`},"&:focus-visible":{outline:`2px solid ${a}`,outlineOffset:2}};switch(e){case"contained":return{"&:hover":{backgroundColor:a},...p};case"shadow":return{color:c,backgroundColor:s,boxShadow:A,"&:hover":{boxShadow:"none",backgroundColor:a},...p};case"outlined":return{borderColor:s,"&:hover":{color:a,backgroundColor:"transparent",borderColor:a},...p};case"dashed":return{color:s,borderColor:s,backgroundColor:o,"&:hover":{color:a,borderColor:a},...p};case"text":default:return{"&:hover":{color:a,backgroundColor:o},...p}}}function wG(e){const t=$e({variant:"dashed",color:"primary",theme:e}),n=$e({variant:"shadow",color:"primary",theme:e}),r={"&.Mui-disabled":{backgroundColor:e.palette.grey[200]}},o={"&>*:nth-of-type(1)":{fontSize:"inherit"}};return{MuiButton:{defaultProps:{disableElevation:!0},styleOverrides:{root:{fontWeight:400,"&::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:4,opacity:0,transition:"all 0.5s"},"&:active::after":{position:"absolute",borderRadius:4,left:0,top:0,opacity:1,transition:"0s"}},contained:{...r},outlined:{...r},text:{boxShadow:"none","&:hover":{boxShadow:"none"}},endIcon:{...o},startIcon:{...o},dashed:{border:"1px dashed",...t,"&.MuiButton-dashedPrimary":$e({variant:"dashed",color:"primary",theme:e}),"&.MuiButton-dashedSecondary":$e({variant:"dashed",color:"secondary",theme:e}),"&.MuiButton-dashedError":$e({variant:"dashed",color:"error",theme:e}),"&.MuiButton-dashedSuccess":$e({variant:"dashed",color:"success",theme:e}),"&.MuiButton-dashedInfo":$e({variant:"dashed",color:"info",theme:e}),"&.MuiButton-dashedWarning":$e({variant:"dashed",color:"warning",theme:e}),"&.Mui-disabled":{color:`${e.palette.grey[300]} !important`,borderColor:`${e.palette.grey[400]} !important`,backgroundColor:`${e.palette.grey[200]} !important`}},shadow:{...n,"&.MuiButton-shadowPrimary":$e({variant:"shadow",color:"primary",theme:e}),"&.MuiButton-shadowSecondary":$e({variant:"shadow",color:"secondary",theme:e}),"&.MuiButton-shadowError":$e({variant:"shadow",color:"error",theme:e}),"&.MuiButton-shadowSuccess":$e({variant:"shadow",color:"success",theme:e}),"&.MuiButton-shadowInfo":$e({variant:"shadow",color:"info",theme:e}),"&.MuiButton-shadowWarning":$e({variant:"shadow",color:"warning",theme:e}),"&.Mui-disabled":{color:`${e.palette.grey[300]} !important`,borderColor:`${e.palette.grey[400]} !important`,backgroundColor:`${e.palette.grey[200]} !important`}},containedPrimary:$e({variant:"contained",color:"primary",theme:e}),containedSecondary:$e({variant:"contained",color:"secondary",theme:e}),containedError:$e({variant:"contained",color:"error",theme:e}),containedSuccess:$e({variant:"contained",color:"success",theme:e}),containedInfo:$e({variant:"contained",color:"info",theme:e}),containedWarning:$e({variant:"contained",color:"warning",theme:e}),outlinedPrimary:$e({variant:"outlined",color:"primary",theme:e}),outlinedSecondary:$e({variant:"outlined",color:"secondary",theme:e}),outlinedError:$e({variant:"outlined",color:"error",theme:e}),outlinedSuccess:$e({variant:"outlined",color:"success",theme:e}),outlinedInfo:$e({variant:"outlined",color:"info",theme:e}),outlinedWarning:$e({variant:"outlined",color:"warning",theme:e}),textPrimary:$e({variant:"text",color:"primary",theme:e}),textSecondary:$e({variant:"text",color:"secondary",theme:e}),textError:$e({variant:"text",color:"error",theme:e}),textSuccess:$e({variant:"text",color:"success",theme:e}),textInfo:$e({variant:"text",color:"info",theme:e}),textWarning:$e({variant:"text",color:"warning",theme:e}),sizeExtraSmall:{minWidth:56,fontSize:"0.625rem",padding:"2px 8px"}}}}}function TG(){return{MuiButtonBase:{defaultProps:{disableRipple:!0,size:"medium"}}}}function SG(){return{MuiButtonGroup:{defaultProps:{disableRipple:!0}}}}function PG(){return{MuiCardContent:{styleOverrides:{root:{padding:20,"&:last-child":{paddingBottom:20}}}}}}function Ns({color:e,theme:t}){const n=an(t,e),{lighter:r,main:o,dark:s}=n;return{"&:hover":{backgroundColor:r,"& .icon":{borderColor:o}},"&.Mui-focusVisible":{outline:`2px solid ${s}`,outlineOffset:-4}}}function OG(e){switch(e){case"small":return{size:16,fontSize:1,position:1};case"large":return{size:24,fontSize:1.6,position:2};case"medium":default:return{size:20,fontSize:1.35,position:2}}}function bp(e){const t=OG(e);return{"& .icon":{width:t.size,height:t.size,"& .filled":{fontSize:`${t.fontSize}rem`,top:-t.position,left:-t.position}}}}function jG(e){const{palette:t}=e;return{MuiCheckbox:{defaultProps:{className:"size-small",icon:f.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25}}),checkedIcon:f.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:f.jsx(Ze.CheckSquareFilled,{className:"filled",style:{position:"absolute"}})}),indeterminateIcon:f.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:f.jsx(Ze.MinusSquareFilled,{className:"filled",style:{position:"absolute"}})})},styleOverrides:{root:{borderRadius:0,color:t.secondary[300],"&.size-small":{...bp("small")},"&.size-medium":{...bp("medium")},"&.size-large":{...bp("large")}},colorPrimary:Ns({color:"primary",theme:e}),colorSecondary:Ns({color:"secondary",theme:e}),colorSuccess:Ns({color:"success",theme:e}),colorWarning:Ns({color:"warning",theme:e}),colorInfo:Ns({color:"info",theme:e}),colorError:Ns({color:"error",theme:e})}}}}function Vs({color:e,theme:t}){const n=an(t,e),{dark:r}=n;return{"&.Mui-focusVisible":{outline:`2px solid ${r}`,outlineOffset:2}}}function Un({color:e,theme:t}){const n=an(t,e),{light:r,lighter:o,main:s}=n;return{color:s,backgroundColor:o,borderColor:r,"& .MuiChip-deleteIcon":{color:s,"&:hover":{color:r}}}}function MG(e){const t=Un({color:"secondary",theme:e});return{MuiChip:{styleOverrides:{root:{borderRadius:4,"&:active":{boxShadow:"none"},"&.MuiChip-colorPrimary":Vs({color:"primary",theme:e}),"&.MuiChip-colorSecondary":Vs({color:"secondary",theme:e}),"&.MuiChip-colorError":Vs({color:"error",theme:e}),"&.MuiChip-colorInfo":Vs({color:"info",theme:e}),"&.MuiChip-colorSuccess":Vs({color:"success",theme:e}),"&.MuiChip-colorWarning":Vs({color:"warning",theme:e})},sizeLarge:{fontSize:"1rem",height:40},light:{...t,"&.MuiChip-lightPrimary":Un({color:"primary",theme:e}),"&.MuiChip-lightSecondary":Un({color:"secondary",theme:e}),"&.MuiChip-lightError":Un({color:"error",theme:e}),"&.MuiChip-lightInfo":Un({color:"info",theme:e}),"&.MuiChip-lightSuccess":Un({color:"success",theme:e}),"&.MuiChip-lightWarning":Un({color:"warning",theme:e})},combined:{border:"1px solid",...t,"&.MuiChip-combinedPrimary":Un({color:"primary",theme:e}),"&.MuiChip-combinedSecondary":Un({color:"secondary",theme:e}),"&.MuiChip-combinedError":Un({color:"error",theme:e}),"&.MuiChip-combinedInfo":Un({color:"info",theme:e}),"&.MuiChip-combinedSuccess":Un({color:"success",theme:e}),"&.MuiChip-combinedWarning":Un({color:"warning",theme:e})}}}}}function DG(e){return{MuiDialog:{styleOverrides:{root:{"& .MuiBackdrop-root":{backgroundColor:nt("#000",.7)},"& .MuiCardContent-root":{[e.breakpoints.down("sm")]:{paddingBottom:`${e.spacing(2.5)}`}},"& .MuiPaper-root:has(.tabbed-form)":{overflowY:"unset",width:"100%"}}}}}}function kG(e){return{MuiDialogContentText:{styleOverrides:{root:{fontSize:"0.875rem",color:e.palette.text.primary}}}}}function RG(){return{MuiDialogTitle:{styleOverrides:{root:{fontSize:"1rem",fontWeight:500}}}}}function Hs({color:e,theme:t}){const n=an(t,e),{main:r,dark:o,contrastText:s}=n,a=`${e}Button`,c=Is(t,a);return{color:s,backgroundColor:r,boxShadow:c,"&:hover":{boxShadow:"none",backgroundColor:o},"&:focus-visible":{outline:`2px solid ${o}`,outlineOffset:2},"&::after":{borderRadius:"50px",boxShadow:`0 0 5px 5px ${nt(r,.9)}`},"&:active::after":{borderRadius:"50px",boxShadow:`0 0 0 0 ${nt(r,.9)}`}}}function FG(e){return{MuiFab:{styleOverrides:{root:{fontWeight:400,"&.Mui-disabled":{backgroundColor:e.palette.grey[200]},"&.MuiFab-primary":Hs({color:"primary",theme:e}),"&.MuiFab-secondary":Hs({color:"secondary",theme:e}),"&.Mui-error":Hs({color:"error",theme:e}),"&.MuiFab-success":Hs({color:"success",theme:e}),"&.MuiFab-info":Hs({color:"info",theme:e}),"&.MuiFab-warning":Hs({color:"warning",theme:e}),"&::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:4,opacity:0,transition:"all 0.5s"},"&:active::after":{position:"absolute",borderRadius:4,left:0,top:0,opacity:1,transition:"0s"}}}}}}function LG(e){return{MuiIconButton:{styleOverrides:{root:{borderRadius:4},sizeLarge:{width:e.spacing(5.5),height:e.spacing(5.5),fontSize:"1.25rem"},sizeMedium:{width:e.spacing(4.5),height:e.spacing(4.5),fontSize:"1rem"},sizeSmall:{width:e.spacing(3.75),height:e.spacing(3.75),fontSize:"0.75rem"},sizeExtraSmall:{width:e.spacing(2.6875),height:e.spacing(2.6875),fontSize:"0.625rem"}}}}}function NG(){return{MuiInputBase:{styleOverrides:{}}}}function VG(e){return{MuiInputLabel:{styleOverrides:{root:{color:e.palette.grey[600]},outlined:{lineHeight:"0.8em","&.MuiInputLabel-sizeSmall":{lineHeight:"1em"},"&.MuiInputLabel-shrink":{background:e.palette.background.paper,padding:"0 8px",marginLeft:-6,lineHeight:"1.4375em"}}}}}}function HG(){return{MuiLinearProgress:{styleOverrides:{root:{height:6,borderRadius:100},bar:{borderRadius:100}}}}}function zG(){return{MuiLink:{defaultProps:{underline:"hover"}}}}function WG(e){return{MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{color:e.palette.primary.main,"& .MuiListItemIcon-root":{color:e.palette.primary.main}}}}}}}function UG(e){return{MuiListItemIcon:{styleOverrides:{root:{minWidth:24,color:e.palette.text.primary}}}}}function YG(){return{MuiListItemText:{styleOverrides:{root:{"&.MuiListItemText-inset":{paddingLeft:24}}}}}}function GG(){return{MuiLoadingButton:{styleOverrides:{root:{padding:"6px 16px","&.MuiLoadingButton-loading":{opacity:.6,textShadow:"none"}}}}}}function Pi({variant:e,theme:t}){const n=an(t,e),{light:r}=n,o=Is(t,`${e}`);return{"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:r},"&.Mui-focused":{boxShadow:o,"& .MuiOutlinedInput-notchedOutline":{border:`1px solid ${r}`}}}}function KG(e){return{MuiOutlinedInput:{styleOverrides:{input:{padding:"10.5px 14px 10.5px 12px"},notchedOutline:{borderColor:e.palette.mode==="dark"?e.palette.grey[200]:e.palette.grey[300]},root:{...Pi({variant:"primary",theme:e}),"&.Mui-error":{...Pi({variant:"error",theme:e})}},inputSizeSmall:{padding:"7.5px 8px 7.5px 12px"},inputMultiline:{padding:0},colorSecondary:Pi({variant:"secondary",theme:e}),colorError:Pi({variant:"error",theme:e}),colorWarning:Pi({variant:"warning",theme:e}),colorInfo:Pi({variant:"info",theme:e}),colorSuccess:Pi({variant:"success",theme:e})}}}}function JG(){return{MuiPagination:{defaultProps:{shape:"rounded"}}}}function yt({variant:e,color:t,theme:n}){const r=an(n,t),{lighter:o,light:s,dark:a,main:c,contrastText:u}=r,A={"&:focus-visible":{outline:`2px solid ${a}`,outlineOffset:2,...e==="text"&&{backgroundColor:n.palette.background.paper}}};switch(e){case"combined":case"contained":return{color:u,backgroundColor:c,"&:hover":{backgroundColor:s},...A};case"outlined":return{borderColor:c,"&:hover":{backgroundColor:o,borderColor:s},...A};case"text":default:return{color:c,"&:hover":{backgroundColor:c,color:o},...A}}}function XG(e){return{MuiPaginationItem:{styleOverrides:{root:{"&:focus-visible":{outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:2}},text:{"&.Mui-selected":{backgroundColor:"transparent",fontSize:"1rem",fontWeight:500,"&.MuiPaginationItem-textPrimary":yt({variant:"text",color:"primary",theme:e}),"&.MuiPaginationItem-textSecondary":yt({variant:"text",color:"secondary",theme:e}),"&.MuiPaginationItem-textError":yt({variant:"text",color:"error",theme:e}),"&.MuiPaginationItem-textSuccess":yt({variant:"text",color:"success",theme:e}),"&.MuiPaginationItem-textInfo":yt({variant:"text",color:"info",theme:e}),"&.MuiPaginationItem-textWarning":yt({variant:"text",color:"warning",theme:e})}},contained:{"&.Mui-selected":{"&.MuiPaginationItem-containedPrimary":yt({variant:"contained",color:"primary",theme:e}),"&.MuiPaginationItem-containedSecondary":yt({variant:"contained",color:"secondary",theme:e}),"&.MuiPaginationItem-containedError":yt({variant:"contained",color:"error",theme:e}),"&.MuiPaginationItem-containedSuccess":yt({variant:"contained",color:"success",theme:e}),"&.MuiPaginationItem-containedInfo":yt({variant:"contained",color:"info",theme:e}),"&.MuiPaginationItem-containedWarning":yt({variant:"contained",color:"warning",theme:e})}},combined:{border:"1px solid",borderColor:e.palette.divider,"&.MuiPaginationItem-ellipsis":{border:"none"},"&.Mui-selected":{"&.MuiPaginationItem-combinedPrimary":yt({variant:"combined",color:"primary",theme:e}),"&.MuiPaginationItem-combinedSecondary":yt({variant:"combined",color:"secondary",theme:e}),"&.MuiPaginationItem-combinedError":yt({variant:"combined",color:"error",theme:e}),"&.MuiPaginationItem-combinedSuccess":yt({variant:"combined",color:"success",theme:e}),"&.MuiPaginationItem-combinedInfo":yt({variant:"combined",color:"info",theme:e}),"&.MuiPaginationItem-combinedWarning":yt({variant:"combined",color:"warning",theme:e})}},outlined:{borderColor:e.palette.divider,"&.Mui-selected":{backgroundColor:"transparent","&.MuiPaginationItem-outlinedPrimary":yt({variant:"outlined",color:"primary",theme:e}),"&.MuiPaginationItem-outlinedSecondary":yt({variant:"outlined",color:"secondary",theme:e}),"&.MuiPaginationItem-outlinedError":yt({variant:"outlined",color:"error",theme:e}),"&.MuiPaginationItem-outlinedSuccess":yt({variant:"outlined",color:"success",theme:e}),"&.MuiPaginationItem-outlinedInfo":yt({variant:"outlined",color:"info",theme:e}),"&.MuiPaginationItem-outlinedWarning":yt({variant:"outlined",color:"warning",theme:e})}}}}}}function ZG(e){return{MuiPopover:{styleOverrides:{paper:{boxShadow:e.customShadows.z1}}}}}function zs({color:e,theme:t}){const n=an(t,e),{lighter:r,main:o,dark:s}=n;return{"& .dot":{backgroundColor:o},"&:hover":{backgroundColor:r},"&.Mui-focusVisible":{outline:`2px solid ${s}`,outlineOffset:-4}}}function _G(e){switch(e){case"small":return{size:16,dotSize:8,position:3};case"large":return{size:24,dotSize:12,position:5};case"medium":default:return{size:20,dotSize:10,position:4}}}function Qp(e){const t=_G(e);return{"& .icon":{width:t.size,height:t.size,"& .dot":{width:t.dotSize,height:t.dotSize,top:t.position,left:t.position}}}}function qG(e){const{palette:t}=e;return{MuiRadio:{defaultProps:{className:"size-small",icon:f.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%"}}),checkedIcon:f.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%",position:"relative"},children:f.jsx(b.Box,{className:"dot",sx:{width:8,height:8,backgroundColor:"inherit",borderRadius:"50%",position:"absolute",top:3,left:3}})})},styleOverrides:{root:{color:t.secondary[300],"&.size-small":{...Qp("small")},"&.size-medium":{...Qp("medium")},"&.size-large":{...Qp("large")}},colorPrimary:zs({color:"primary",theme:e}),colorSecondary:zs({color:"secondary",theme:e}),colorSuccess:zs({color:"success",theme:e}),colorWarning:zs({color:"warning",theme:e}),colorInfo:zs({color:"info",theme:e}),colorError:zs({color:"error",theme:e})}}}}function Ws({color:e,theme:t}){const n=an(t,e),{main:r}=n;return{border:`2px solid ${r}`}}function $G(e){return{MuiSlider:{styleOverrides:{track:{height:"1px"},thumb:{width:14,height:14,border:`2px solid ${e.palette.primary.main}`,backgroundColor:e.palette.background.paper,"&.MuiSlider-thumbColorPrimary":Ws({color:"primary",theme:e}),"&.MuiSlider-thumbColorSecondary":Ws({color:"secondary",theme:e}),"&.MuiSlider-thumbColorSuccess":Ws({color:"success",theme:e}),"&.MuiSlider-thumbColorWarning":Ws({color:"warning",theme:e}),"&.MuiSlider-thumbColorInfo":Ws({color:"info",theme:e}),"&.MuiSlider-thumbColorError":Ws({color:"error",theme:e})},mark:{width:4,height:4,borderRadius:"50%",border:`1px solid ${e.palette.secondary.light}`,backgroundColor:e.palette.background.paper,"&.MuiSlider-markActive":{opacity:1,borderColor:"inherit",borderWidth:2}},rail:{color:e.palette.secondary.light},root:{"&.Mui-disabled":{".MuiSlider-rail":{opacity:.25},".MuiSlider-track":{color:e.palette.secondary.lighter},".MuiSlider-thumb":{border:`2px solid ${e.palette.secondary.lighter}`}}},valueLabel:{backgroundColor:e.palette.grey[600],color:e.palette.grey[0]}}}}}function eK(e){switch(e){case"small":return{width:28,height:16,base:12,thumb:10,trackRadius:8};case"large":return{width:60,height:28,base:32,thumb:22,trackRadius:24};case"medium":default:return{width:44,height:22,base:22,thumb:16,trackRadius:16}}}function xp(e,t){const n=eK(t);return{width:n.width,height:n.height,"& .MuiSwitch-switchBase":{padding:3,"&.Mui-checked":{transform:`translateX(${n.base}px)`}},"& .MuiSwitch-thumb":{width:n.thumb,height:n.thumb},"& .MuiSwitch-track":{borderRadius:n.trackRadius}}}function tK(e){return{MuiSwitch:{styleOverrides:{track:{opacity:1,backgroundColor:e.palette.secondary[400],boxSizing:"border-box"},thumb:{borderRadius:"50%",transition:e.transitions.create(["width"],{duration:200})},switchBase:{"&.Mui-checked":{color:"#fff","& + .MuiSwitch-track":{opacity:1},"&.Mui-disabled":{color:e.palette.background.paper}},"&.Mui-disabled":{color:e.palette.background.paper,"+.MuiSwitch-track":{opacity:.3}}},root:{color:e.palette.text.primary,padding:0,margin:8,display:"flex","& ~ .MuiFormControlLabel-label":{margin:6},...xp(e,"medium")},sizeLarge:{...xp(e,"large")},sizeSmall:{...xp(e,"small")}}}}}function nK(e){return{MuiTab:{styleOverrides:{root:{minHeight:46,color:e.palette.text.primary,borderRadius:4,"&:hover":{backgroundColor:e.palette.primary.lighter+60,color:e.palette.primary.main},"&:focus-visible":{borderRadius:4,outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:-3}}}}}}function rK(e){const t={"&:hover":{backgroundColor:e.palette.secondary.lighter}};return{MuiTableBody:{styleOverrides:{root:{"&.striped .MuiTableRow-root":{"&:nth-of-type(even)":{backgroundColor:e.palette.grey[50]},...t},"& .MuiTableRow-root":{...t}}}}}}function oK(e){const t={"&:not(:last-of-type)":{position:"relative","&:after":{position:"absolute",content:'""',backgroundColor:e.palette.divider,width:1,height:"calc(100% - 30px)",right:0,top:16}}};return{MuiTableCell:{styleOverrides:{root:{fontSize:"0.875rem",padding:12,borderColor:e.palette.divider},sizeSmall:{padding:8},head:{fontSize:"0.75rem",fontWeight:700,textTransform:"uppercase",...t},footer:{fontSize:"0.75rem",textTransform:"uppercase",...t}}}}}function iK(e){return{MuiTableFooter:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`2px solid ${e.palette.divider}`,borderBottom:`1px solid ${e.palette.divider}`}}}}}function sK(e){return{MuiTableHead:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`1px solid ${e.palette.divider}`,borderBottom:`2px solid ${e.palette.divider}`}}}}}function aK(){return{MuiTablePagination:{styleOverrides:{selectLabel:{fontSize:"0.875rem"},displayedRows:{fontSize:"0.875rem"}}}}}function lK(){return{MuiTableRow:{styleOverrides:{root:{"&:last-of-type":{"& .MuiTableCell-root":{borderBottom:"none"}},"& .MuiTableCell-root":{"&:last-of-type":{paddingRight:24},"&:first-of-type":{paddingLeft:24}}}}}}}function cK(){return{MuiTabs:{styleOverrides:{vertical:{overflow:"visible"}}}}}function uK(e){return{MuiToggleButton:{styleOverrides:{root:{"&.Mui-disabled":{borderColor:e.palette.divider,color:e.palette.text.disabled},"&:focus-visible":{outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:2}}}}}}function AK(e){return{MuiTooltip:{styleOverrides:{tooltip:{color:e.palette.background.paper}}}}}function dK(){return{MuiTreeItem:{styleOverrides:{content:{padding:8},iconContainer:{"& svg":{fontSize:"0.625rem"}}}}}}function fK(){return{MuiTypography:{styleOverrides:{gutterBottom:{marginBottom:12}}}}}function gK(e){return ct.merge(IG(e),vG(e),BG(e),yG(e),bG(),QG(e),xG(e),wG(e),TG(),SG(),PG(),jG(e),MG(e),DG(e),kG(e),RG(),FG(e),LG(e),NG(),VG(e),HG(),zG(),WG(e),UG(e),YG(),GG(),KG(e),JG(),XG(e),ZG(e),qG(e),$G(e),tK(e),nK(e),rK(e),oK(e),iK(e),sK(e),aK(),lK(),cK(),uK(e),AK(e),dK(),fK())}const Gu=({themeOverrides:e,children:t})=>{const n=bn(),{themeDirection:r,mode:o,presetColor:s,fontFamily:a}=n,c=x.useMemo(()=>EG(o,s),[o,s]),u=x.useMemo(()=>mG(a),[a]),A=x.useMemo(()=>KY(c),[c]),p=x.useMemo(()=>ne.merge({breakpoints:{values:{xs:0,sm:768,md:1024,lg:1266,xl:1440}},direction:r,mixins:{toolbar:{minHeight:60,paddingTop:8,paddingBottom:8}},palette:c.palette,customShadows:A,typography:u,shadows:c.shadows.map(()=>"none"),components:{MuiIconButton:{styleOverrides:{sizeExtraSmall:{width:c.spacing(2.6875),height:c.spacing(2.6875),fontSize:"0.625rem"}}}}},typeof e=="function"?e(c):e),[r,c,u,A,e]),h=wd(p),C=ne.cloneDeep(h.components??{});return h.components=ne.merge(gK(h),C),f.jsx(b.StyledEngineProvider,{injectFirst:!0,children:f.jsxs(OE,{theme:h,children:[f.jsx(b.CssBaseline,{enableColorScheme:!0}),t]})})};Gu.propTypes={children:g.node,themeOverrides:g.oneOfType([g.object,g.func])};function pK({children:e,theme:t,...n}){return f.jsx(k.CoreAdminContext,{...n,children:f.jsx(Gu,{themeOverrides:t,children:f.jsx(pp,{children:e})})})}function Tx(e){const{authProvider:t,catchAll:n,children:r,dashboard:o,dataProvider:s,disableTelemetry:a,history:c,i18nProvider:u,layout:A,loading:p,loginPage:h,authCallbackPage:C,menu:E,notification:m,queryClient:v,requireAuth:B,store:w=k.localStorageStore(),ready:M,theme:Q,title:P="React Admin"}=e;return f.jsx(pK,{authProvider:t,dataProvider:s,i18nProvider:u,store:w,history:c,queryClient:v,theme:Q,children:f.jsx(k.AdminUI,{layout:A,dashboard:o,disableTelemetry:a,menu:E,catchAll:n,title:P,loading:p,loginPage:h,authCallbackPage:C,notification:m,requireAuth:B,ready:M,children:r})})}class hK{constructor(t){yo(this,cl,void 0);yo(this,ul,void 0);yo(this,Us,new Set);const{apiUrl:n}=t??{};if(!ne.isString(n)||ne.isEmpty(n))throw new Error("[ErrorMessageHandler] constructor: please provide a valid apiUrl");ni(this,ul,n),ni(this,cl,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handle(t){var c;const{message:n,filename:r,lineno:o,colno:s}=t,a=`${n}${r}${o}${s}`;Dn(this,Us).has(a)||(Dn(this,Us).add(a),fetch(`${Dn(this,ul)}/ui/error-log`,{method:"PUT",headers:Dn(this,cl),body:JSON.stringify({filename:t.filename,message:t.message,line:t.lineno,column:t.colno,stack:(c=t.error)==null?void 0:c.stack})}).catch(u=>{console.warn("Unable to send error to server",u),Dn(this,Us).delete(a)}))}}cl=new WeakMap,ul=new WeakMap,Us=new WeakMap;class Sx{constructor({catch:t,display:n,log:r,error:o}){jl(this,"catch");jl(this,"display");jl(this,"log");jl(this,"error");this.catch=t,this.display=n,this.log=r,this.error=o}isCatched(){return this.catch}logError(){return this.log}displayError(){return this.display}}const CK=({enabled:e=!0,apiUrl:t,loading:n,catcherFn:r=s=>new Sx({catch:s!=null,display:!1,log:s!=null,error:s}),...o})=>{const s=F.useMemo(()=>o.errorHandler?o.errorHandler:new hK({apiUrl:t}),[t,o.errorHandler]),a=console.error,c=F.useCallback(function(u,...A){var h;if(!u)return!1;const p=r(u instanceof ErrorEvent?u:(h=u==null?void 0:u.toString())==null?void 0:h.replace(/%s/g,()=>A.shift()));if(p.isCatched())return!1;p.logError()&&(u instanceof ErrorEvent?s.handle(u):s.handle(new ErrorEvent("window.onerror",{error:u,message:u.toString()}))),p.displayError()&&a.apply(console,arguments)},[t,n,r,e,s]);return F.useEffect(()=>(window.removeEventListener("error",c),window.addEventListener("error",c),console.error=c,()=>{window.removeEventListener("error",c),console.error=a}),[c]),!0};class EK{constructor(t){yo(this,Al,void 0);yo(this,dl,void 0);yo(this,ji,[]);const{apiUrl:n}=t??{};if(!ne.isString(n)||ne.isEmpty(n))throw new Error("[MissingMessageHandler] constructor: please provide a valid apiUrl");ni(this,dl,n),ni(this,Al,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handleMessage(t){if(!ne.isPlainObject(t))throw new Error("[MissingMessageHandler] handleMessage: please provide valid message data");const{code:n,lang:r}=t;if(!ne.isString(n)||ne.isEmpty(n))throw new Error("[MissingMessageHandler] handleMessage: please provide valid code");if(!ne.isString(r)||ne.isEmpty(r))throw new Error("[MissingMessageHandler] handleMessage: please provide valid lang");if(!ne.some(Dn(this,ji),o=>ne.isEqual(o,{code:n,lang:r}))){Dn(this,ji).push({code:n,lang:r}),fetch(`${Dn(this,dl)}/i18n/message`,{method:"put",headers:Dn(this,Al),body:JSON.stringify({code:n,lang:r,text:n})}).then(o=>o.json()).then(()=>{console.log(`[MissingMessageHandler] handleMessage: created message for lang ${r} and code ${n}`)}).catch(o=>{console.error(o),ni(this,ji,ne.reject(Dn(this,ji),s=>ne.isEqual(s,{code:n,lang:r})))});return}}}Al=new WeakMap,dl=new WeakMap,ji=new WeakMap;function Px(e){const{apiUrl:t,defaultLocale:n,allowMissing:r=!1,createMissing:o=!1}=e,s=[{locale:n,name:n}],a=new Headers({Accept:"application/json","Content-Type":"application/json"}),c=new EK({apiUrl:t}),u=()=>fetch(`${t}/i18n/languages`,{headers:a,method:"get"}).then(h=>h.json()).catch(()=>Promise.resolve(s)),A=()=>fetch(`${t}/i18n/messages`,{headers:a,method:"get"}).then(h=>h.json()).then(h=>h.reduce((C,E)=>({...C,[E.lang]:{...C[E.lang]||{},[E.code]:E.text}}),{})),p=(h,C,E)=>(r||console.error(`Warning: Missing translation for key: "${h}"`),o&&(ne.isString(h)?h.match(new RegExp(/[\s[\]]/,"gm"))?console.error(`[createI18nProvider] onMissingKey: illegal character in key ${h}`):c.handleMessage({code:h,lang:E}):console.error("[createI18nProvider] onMissingKey: provided key is not a string")),h);return Promise.all([u(),A()]).then(h=>{const[C,E]=h;function m(v){return ne.get(E,v,{})}return oT(m,n,C,{allowMissing:r||o,onMissingKey:p})})}window.React=x;const mK=({apiUrl:e,endpoint:t="/languages/load",mapper:n=({data:r})=>({data:r})})=>{const[r,o]=x.useState({loading:!0,languages:null});return x.useEffect(()=>{let s=new Headers;s.append("Accept","application/json"),s.append("Content-Type","application/json"),fetch(`${e}${t}`,{headers:s}).then(a=>a.json()).then(a=>o({loading:!1,...n(a)}))},[e,t,n]),r};function Ox(e){const[t,n]=x.useState(),r=Em(e);return x.useEffect(()=>{Px(r).then(o=>{n(o)}).catch(()=>{n({error:!0})})},[r]),t}const IK=new Gi.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1}}});function vK({theme:e,themeConfig:t,apiUrl:n,defaultLocale:r="en",development:o=!1,logoMain:s,logoIcon:a,loginPage:c=f.jsx(dx,{version:"0.0.0",name:"Applica",redirectTo:"/",background:f.jsx(kl,{})}),menu:u,name:A,copy:p,version:h="0.0.0",dataProvider:C,authProvider:E,errorHandler:m,error:v,enableNotification:B=!1,enableRegistration:w=!1,enablePasswordRecover:M=!1,enableThemeToggler:Q=!1,queryClient:P=IK,background:S,notificationAPI:D="entities/notification",...R}){CK({apiUrl:n,errorHandler:m,catcherFn:W=>{const re=W==null?void 0:W.toString(),Z=["Invalid prop `file` of type `string` supplied to `FileInputPreview`, expected `object`.","Failed prop type: Invalid prop `checked` of type `string` supplied to `ForwardRef(Switch)`, expected `boolean`.","Failed prop type: Invalid prop `checked` of type `string` supplied to `ForwardRef(SwitchBase)`, expected `boolean`.","Support for defaultProps will be removed from function components in a future major release.","validateDOMNesting(...): <form> cannot appear as a descendant of <form>.","Missing translation for key:","HttpError: "].some(V=>re==null?void 0:re.includes(V));return new Sx({catch:Z,display:!Z,log:!Z,error:re})}});const G=x.useMemo(()=>x.isValidElement(c)?x.cloneElement(c,{name:A,copy:p,logo:s,version:h,background:S,enableRegistration:w,enablePasswordRecover:M}):c,[c,A,h,p,S,s,w,M]),X=x.useMemo(()=>W=>{const re=A?f.jsx(gp,{title:A}):s,ie=A?f.jsx(hp,{title:A}):a;return f.jsx(YQ,{...W,name:A,copy:p,enableThemeToggler:Q,version:h,logoMain:re,logoIcon:ie,notification:D,enableNotification:B,error:v})},[s,a,A,h,v,D,B]),q=Ox({apiUrl:n,defaultLocale:r,allowMissing:o,createMissing:o});return q===void 0?f.jsx(f.Fragment,{}):q.error?f.jsx(gc,{initialConfig:t,children:f.jsx(Gu,{themeOverrides:e,children:f.jsx(px,{})})}):f.jsx(Rd,{children:f.jsx(LE,{menu:u,children:f.jsx(gc,{initialConfig:t,children:f.jsx(Tx,{theme:e,layout:X,notification:ex,queryClient:P,dataProvider:C,authProvider:E,i18nProvider:q,loginPage:G,...R})})})})}Object.defineProperty(j,"ArrayField",{enumerable:!0,get:()=>k.ArrayField}),Object.defineProperty(j,"ArrayInputContext",{enumerable:!0,get:()=>k.ArrayInputContext}),Object.defineProperty(j,"BooleanField",{enumerable:!0,get:()=>k.BooleanField}),Object.defineProperty(j,"BulkDeleteWithConfirmButton",{enumerable:!0,get:()=>k.BulkDeleteWithConfirmButton}),Object.defineProperty(j,"Button",{enumerable:!0,get:()=>k.Button}),Object.defineProperty(j,"ChipField",{enumerable:!0,get:()=>k.ChipField}),Object.defineProperty(j,"Confirm",{enumerable:!0,get:()=>k.Confirm}),Object.defineProperty(j,"CreateButton",{enumerable:!0,get:()=>k.CreateButton}),Object.defineProperty(j,"CreateContextProvider",{enumerable:!0,get:()=>k.CreateContextProvider}),Object.defineProperty(j,"CustomRoutes",{enumerable:!0,get:()=>k.CustomRoutes}),Object.defineProperty(j,"DeleteWithConfirmButton",{enumerable:!0,get:()=>k.DeleteWithConfirmButton}),Object.defineProperty(j,"DeleteWithUndoButton",{enumerable:!0,get:()=>k.DeleteWithUndoButton}),Object.defineProperty(j,"EditButton",{enumerable:!0,get:()=>k.EditButton}),Object.defineProperty(j,"EditContextProvider",{enumerable:!0,get:()=>k.EditContextProvider}),Object.defineProperty(j,"FieldTitle",{enumerable:!0,get:()=>k.FieldTitle}),Object.defineProperty(j,"FilterButton",{enumerable:!0,get:()=>k.FilterButton}),Object.defineProperty(j,"Form",{enumerable:!0,get:()=>k.Form}),Object.defineProperty(j,"FormDataConsumer",{enumerable:!0,get:()=>k.FormDataConsumer}),Object.defineProperty(j,"HttpError",{enumerable:!0,get:()=>k.HttpError}),Object.defineProperty(j,"I18nContextProvider",{enumerable:!0,get:()=>k.I18nContextProvider}),Object.defineProperty(j,"ListBase",{enumerable:!0,get:()=>k.ListBase}),Object.defineProperty(j,"ListToolbar",{enumerable:!0,get:()=>k.ListToolbar}),Object.defineProperty(j,"LoadingIndicator",{enumerable:!0,get:()=>k.LoadingIndicator}),Object.defineProperty(j,"Pagination",{enumerable:!0,get:()=>k.Pagination}),Object.defineProperty(j,"RaSimpleFormIterator",{enumerable:!0,get:()=>k.SimpleFormIterator}),Object.defineProperty(j,"RecordContextProvider",{enumerable:!0,get:()=>k.RecordContextProvider}),Object.defineProperty(j,"ReferenceArrayField",{enumerable:!0,get:()=>k.ReferenceArrayField}),Object.defineProperty(j,"ReferenceField",{enumerable:!0,get:()=>k.ReferenceField}),Object.defineProperty(j,"Resource",{enumerable:!0,get:()=>k.Resource}),Object.defineProperty(j,"ResourceContextProvider",{enumerable:!0,get:()=>k.ResourceContextProvider}),Object.defineProperty(j,"SaveButton",{enumerable:!0,get:()=>k.SaveButton}),Object.defineProperty(j,"SimpleFormIteratorContext",{enumerable:!0,get:()=>k.SimpleFormIteratorContext}),Object.defineProperty(j,"SimpleShowLayout",{enumerable:!0,get:()=>k.SimpleShowLayout}),Object.defineProperty(j,"SingleFieldList",{enumerable:!0,get:()=>k.SingleFieldList}),Object.defineProperty(j,"TabbedFormTabs",{enumerable:!0,get:()=>k.TabbedFormTabs}),Object.defineProperty(j,"TopToolbar",{enumerable:!0,get:()=>k.TopToolbar}),Object.defineProperty(j,"UrlField",{enumerable:!0,get:()=>k.UrlField}),Object.defineProperty(j,"choices",{enumerable:!0,get:()=>k.choices}),Object.defineProperty(j,"email",{enumerable:!0,get:()=>k.email}),Object.defineProperty(j,"maxLength",{enumerable:!0,get:()=>k.maxLength}),Object.defineProperty(j,"maxValue",{enumerable:!0,get:()=>k.maxValue}),Object.defineProperty(j,"minLength",{enumerable:!0,get:()=>k.minLength}),Object.defineProperty(j,"minValue",{enumerable:!0,get:()=>k.minValue}),Object.defineProperty(j,"number",{enumerable:!0,get:()=>k.number}),Object.defineProperty(j,"regex",{enumerable:!0,get:()=>k.regex}),Object.defineProperty(j,"required",{enumerable:!0,get:()=>k.required}),Object.defineProperty(j,"useArrayInput",{enumerable:!0,get:()=>k.useArrayInput}),Object.defineProperty(j,"useAuthProvider",{enumerable:!0,get:()=>k.useAuthProvider}),Object.defineProperty(j,"useChoices",{enumerable:!0,get:()=>k.useChoices}),Object.defineProperty(j,"useChoicesContext",{enumerable:!0,get:()=>k.useChoicesContext}),Object.defineProperty(j,"useCreate",{enumerable:!0,get:()=>k.useCreate}),Object.defineProperty(j,"useCreateContext",{enumerable:!0,get:()=>k.useCreateContext}),Object.defineProperty(j,"useCreateController",{enumerable:!0,get:()=>k.useCreateController}),Object.defineProperty(j,"useDataProvider",{enumerable:!0,get:()=>k.useDataProvider}),Object.defineProperty(j,"useEditContext",{enumerable:!0,get:()=>k.useEditContext}),Object.defineProperty(j,"useEditController",{enumerable:!0,get:()=>k.useEditController}),Object.defineProperty(j,"useGetIdentity",{enumerable:!0,get:()=>k.useGetIdentity}),Object.defineProperty(j,"useGetList",{enumerable:!0,get:()=>k.useGetList}),Object.defineProperty(j,"useGetMany",{enumerable:!0,get:()=>k.useGetMany}),Object.defineProperty(j,"useGetManyReference",{enumerable:!0,get:()=>k.useGetManyReference}),Object.defineProperty(j,"useGetOne",{enumerable:!0,get:()=>k.useGetOne}),Object.defineProperty(j,"useInput",{enumerable:!0,get:()=>k.useInput}),Object.defineProperty(j,"useListContext",{enumerable:!0,get:()=>k.useListContext}),Object.defineProperty(j,"useListController",{enumerable:!0,get:()=>k.useListController}),Object.defineProperty(j,"useLocaleState",{enumerable:!0,get:()=>k.useLocaleState}),Object.defineProperty(j,"useLocales",{enumerable:!0,get:()=>k.useLocales}),Object.defineProperty(j,"useNotify",{enumerable:!0,get:()=>k.useNotify}),Object.defineProperty(j,"usePermissions",{enumerable:!0,get:()=>k.usePermissions}),Object.defineProperty(j,"useRecordContext",{enumerable:!0,get:()=>k.useRecordContext}),Object.defineProperty(j,"useRefresh",{enumerable:!0,get:()=>k.useRefresh}),Object.defineProperty(j,"useResourceContext",{enumerable:!0,get:()=>k.useResourceContext}),Object.defineProperty(j,"useResourceDefinition",{enumerable:!0,get:()=>k.useResourceDefinition}),Object.defineProperty(j,"useResourceDefinitions",{enumerable:!0,get:()=>k.useResourceDefinitions}),Object.defineProperty(j,"useShowContext",{enumerable:!0,get:()=>k.useShowContext}),Object.defineProperty(j,"useShowController",{enumerable:!0,get:()=>k.useShowController}),Object.defineProperty(j,"useSimpleFormIterator",{enumerable:!0,get:()=>k.useSimpleFormIterator}),Object.defineProperty(j,"useSimpleFormIteratorItem",{enumerable:!0,get:()=>k.useSimpleFormIteratorItem}),Object.defineProperty(j,"useTranslate",{enumerable:!0,get:()=>k.useTranslate}),Object.defineProperty(j,"useTranslateLabel",{enumerable:!0,get:()=>k.useTranslateLabel}),Object.defineProperty(j,"useUnselect",{enumerable:!0,get:()=>k.useUnselect}),Object.defineProperty(j,"useUnselectAll",{enumerable:!0,get:()=>k.useUnselectAll}),Object.defineProperty(j,"useUpdate",{enumerable:!0,get:()=>k.useUpdate}),Object.defineProperty(j,"useUpdateMany",{enumerable:!0,get:()=>k.useUpdateMany}),Object.defineProperty(j,"withLifecycleCallbacks",{enumerable:!0,get:()=>k.withLifecycleCallbacks}),j.ActionsField=NF,j.ActionsMenu=si,j.ActivatePage=Ax,j.Admin=Tx,j.AnimateButton=J0,j.AppBarStyled=mm,j.AppConfigContext=kd,j.AppConfigProvider=Rd,j.ApplicaAdmin=vK,j.ArrayInput=LF,j.AttachmentField=oB,j.AttachmentInput=c6,j.AuthBackground=kl,j.AuthWrapper=Ls,j.AutocompleteArrayInput=A6,j.AutocompleteInput=f6,j.Avatar=Na,j.BooleanInput=p6,j.Breadcrumbs=hv,j.BulkActionsToolbar=ix,j.BulkActionsToolbarClasses=Ar,j.BulkFloatingActionsToolbar=vY,j.CardForm=eB,j.ChangePasswordForm=Bg,j.CircularWithLabel=Xv,j.CircularWithPath=Zv,j.CoverField=sB,j.Create=Y6,j.CreateInDialogButton=CY,j.Datagrid=wY,j.DateAgoField=lB,j.DateField=JF,j.DateInput=C6,j.DateTimeInput=m6,j.Dot=Jc,j.Drawer=LQ,j.DrawerHeader=Ib,j.DrawerHeaderStyled=mb,j.DrawerToggle=cy,j.Edit=K6,j.EditInDialogButton=mY,j.EmailField=ZF,j.Empty=SY,j.EmptyClasses=wi,j.FileField=cB,j.FileInput=v6,j.Footer=Dg,j.FormHeader=Z6,j.FunctionField=qF,j.GenericErrorPage=px,j.Header=uy,j.HeaderButton=Im,j.HeaderIconButton=jF,j.HeaderNotification=Ay,j.HeaderProfile=dy,j.HeaderSpacer=gy,j.HeaderToggleButton=xs,j.HorizontalBar=NQ,j.IconButton=vs,j.ImageField=iB,j.ImageInput=B6,j.ImpersonateUserButton=uY,j.LabeledArrayInput=nB,j.LabeledInput=pn,j.Layout=YQ,j.LayoutContent=Ab,j.LayoutProvider=sy,j.LayoutWrapper=db,j.LinearWithIcon=_v,j.LinearWithLabel=qv,j.List=VY,j.ListItem=GY,j.Loadable=JU,j.Loader=$Q,j.LoadingButton=vg,j.LocalStorage=dm,j.LocaleButton=$v,j.LocalizedTextField=e6,j.LocalizedTextInput=Q6,j.LoginPage=dx,j.Logo=tp,j.LongForm=Dt,j.MainCard=ir,j.MainIcon=gp,j.MenuConfigContext=Ld,j.MenuConfigProvider=LE,j.MenuPopover=Md,j.NavGroup=zQ,j.NavMenu=VQ,j.Navigation=WQ,j.Notification=ex,j.NotificationList=UY,j.NumberInput=w6,j.OnboardingModes=il,j.OnboardingProvider=oY,j.OnboardingTip=cY,j.RawTableFormIterator=oy,j.ReadonlyField=o6,j.RecordInput=T6,j.RecoverPage=fx,j.ReferenceArrayInput=S6,j.ReferenceInput=P6,j.ReferenceManyField=AB,j.ReferenceManyInput=O6,j.RegisterPage=gx,j.ResponsiveSection=fy,j.ScrollTop=pp,j.ScrollX=ZU,j.SearchInput=M6,j.SelectArrayInput=k6,j.SelectInput=F6,j.Show=d8,j.SimpleBar=Ap,j.SimpleForm=tB,j.SimpleFormIterator=g8,j.SimpleList=YY,j.SizeField=s6,j.SmallIcon=hp,j.SmartTextInput=L6,j.TabbedForm=Tg,j.TableFormIterator=U2,j.TableFormIteratorContext=Nd,j.TableFormIteratorItem=HB,j.TableFormIteratorItemContext=Vd,j.TextField=uB,j.TextInput=br,j.ThemeConfigContext=Fd,j.ThemeConfigProvider=gc,j.ThemeProvider=Gu,j.ThemeToggler=UQ,j.TimeInput=z6,j.Toolbar=yi,j.Tooltip=ou,j.Transitions=Ro,j.createI18nProvider=Px,j.getLocalizedValue=of,j.localizedValueHasAllLocales=rf,j.parseTime=hm,j.useAppConfig=ai,j.useBreadcrumbs=WE,j.useGetLocalizedValue=ij,j.useI18nLanguages=mK,j.useI18nProvider=Ox,j.useLayoutContext=Mg,j.useLayoutDispatch=K2,j.useLayoutDrawerState=bi,j.useLayoutLogoState=ly,j.useLayoutMediaState=Vn,j.useLayoutNotificationsState=pu,j.useLayoutState=Ps,j.useLayoutThemeState=J2,j.useLocalStorage=tf,j.useLocalizedValue=oj,j.useMemoizedObject=Em,j.useMenu=zd,j.useMenuConfig=li,j.usePopoverState=ya,j.useRefDimensions=sj,j.useResourceDefaultValues=U6,j.useResourceTitle=nf,j.useRestartOnboarding=aY,j.useSx=Br,j.useTableFormIterator=fm,j.useTableFormIteratorItem=nj,j.useThemeConfig=bn,j.uuid=rj,j.withLayoutProvider=ay,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"})});
|
|
275
|
+
`),NU)),qQ=F.forwardRef(function(t,n){const r=Ut({props:t,name:"MuiLinearProgress"}),{className:o,color:s="primary",value:a,valueBuffer:c,variant:u="indeterminate"}=r,A=Re(r,FU),p=z({},r,{color:s,variant:u}),h=HU(p),C=Bd(),E={},m={bar1:{},bar2:{}};if(u==="determinate"||u==="buffer")if(a!==void 0){E["aria-valuenow"]=Math.round(a),E["aria-valuemin"]=0,E["aria-valuemax"]=100;let v=a-100;C&&(v=-v),m.bar1.transform=`translateX(${v}%)`}else process.env.NODE_ENV!=="production"&&console.error("MUI: You need to provide a value prop when using the determinate or buffer variant of LinearProgress .");if(u==="buffer")if(c!==void 0){let v=(c||0)-100;C&&(v=-v),m.bar2.transform=`translateX(${v}%)`}else process.env.NODE_ENV!=="production"&&console.error("MUI: You need to provide a valueBuffer prop when using the buffer variant of LinearProgress.");return f.jsxs(zU,z({className:Ve(h.root,o),ownerState:p,role:"progressbar"},E,{ref:n},A,{children:[u==="buffer"?f.jsx(WU,{className:h.dashed,ownerState:p}):null,f.jsx(UU,{className:h.bar1,ownerState:p,style:m.bar1}),u==="determinate"?null:f.jsx(YU,{className:h.bar2,ownerState:p,style:m.bar2})]}))});process.env.NODE_ENV!=="production"&&(qQ.propTypes={classes:g.object,className:g.string,color:g.oneOfType([g.oneOf(["inherit","primary","secondary"]),g.string]),sx:g.oneOfType([g.arrayOf(g.oneOfType([g.func,g.object,g.bool])),g.func,g.object]),value:g.number,valueBuffer:g.number,variant:g.oneOf(["buffer","determinate","indeterminate","query"])});const GU=qQ,KU=ue("div")(({theme:e})=>({position:"fixed",top:0,left:0,zIndex:2001,width:"100%","& > * + *":{marginTop:e.spacing(2)}})),$Q=()=>f.jsx(KU,{children:f.jsx(GU,{color:"primary"})}),JU=e=>t=>f.jsx(x.Suspense,{fallback:f.jsx($Q,{}),children:f.jsx(e,{...t})}),gp=({title:e})=>f.jsxs(b.Stack,{direction:"row",children:[f.jsx(b.Typography,{variant:"h2",sx:{fontWeight:"regular",letterSpacing:-2.5},children:"a."})," ",f.jsx(b.Typography,{variant:"h2",sx:{fontWeight:"bold"},children:e})]}),XU=ue(k.Notification,{})(({theme:e})=>({"& *":{fontSize:e.typography.body1.fontSize}}));function ex(e){return f.jsx(XU,{...e})}const pp=({children:e})=>{const t=Ct.useLocation(),{pathname:n}=t;return x.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"smooth"})},[n]),e||null};pp.propTypes={children:g.node};const ZU=ue("div")({width:"100%",overflowX:"auto",display:"block"}),hp=({title:e})=>f.jsx(b.Typography,{variant:"h2",sx:{style:"bold"},children:e==null?void 0:e.substr(0,1).toUpperCase()});hp.propTypes={title:g.string.isRequired};const tx=({children:e,...t})=>{const n=wt();return f.jsx(ir,{sx:{maxWidth:{xs:400,lg:475},margin:{xs:2.5,md:3},"& > *":{flexGrow:1,flexBasis:"50%"}},content:!1,...t,border:!1,boxShadow:!0,shadow:n.customShadows.z1,children:f.jsx(b.Box,{sx:{p:{xs:2,sm:3,md:4,xl:5}},children:e})})};tx.propTypes={children:g.node};function Ls({version:e,name:t,copy:n,children:r,logo:o,background:s=kl}){return f.jsxs(b.Box,{sx:{minHeight:"100vh"},children:[x.isValidElement(s)?s:x.createElement(s),f.jsxs(b.Grid,{container:!0,direction:"column",justifyContent:"flex-end",sx:{minHeight:"100vh"},children:[f.jsx(b.Grid,{item:!0,xs:12,sx:{ml:3},children:o||f.jsx(gp,{title:t})}),f.jsxs(b.Grid,{item:!0,xs:12,children:[f.jsx(b.Grid,{item:!0,xs:12,container:!0,justifyContent:"center",alignItems:"center",sx:{minHeight:{xs:"calc(100vh - 210px)",sm:"calc(100vh - 134px)",md:"calc(100vh - 112px)"}},children:f.jsx(b.Grid,{item:!0,children:f.jsx(tx,{children:r})})}),f.jsx(b.Grid,{item:!0,sx:{pb:1},children:f.jsx(Dg,{name:t,copy:n,version:e})})]})]})]})}Ls.propTypes={children:g.node,version:g.string,name:g.string,copy:g.string,background:g.oneOfType([g.node,g.func,g.object])};var il=(e=>(e.NONE="none",e.BROWSER="browser",e.USER="user",e))(il||{});const _U=no().required(),qU=no().oneOf(Object.values(il));function $U(e){var w;const t=Gi.useQueryClient(),[n,r]=x.useState(!1),[o,s]=x.useState(()=>()=>Promise.resolve()),a=ce.useGetIdentity(),c=(w=a==null?void 0:a.data)==null?void 0:w.email,u=ce.useDataProvider(),A=x.useCallback(()=>c?u.get("onboarding").then(M=>{var Q;return(Q=M==null?void 0:M.data)==null?void 0:Q.value}):Promise.reject(),[u,c]),{data:p,isLoading:h,isError:C}=Gi.useQuery({queryKey:["GET","onboarding",c],queryFn:A,staleTime:24*60*60*1e3,retry:c!==void 0}),[E,m]=x.useState(()=>()=>Promise.resolve()),v=Gi.useMutation({mutationFn:E}),B=v.mutateAsync;return x.useEffect(()=>{function M(){const Q=ne.chain(p??{}).clone().extend({[e]:Date.now()}).value();return u.post("onboarding",Q).then(()=>{t.invalidateQueries(["GET","onboarding",c])})}m(()=>M)},[u,p,e,t,c]),x.useEffect(()=>{r(ne.isNil((p??{})[e]))},[p,e,r]),x.useEffect(()=>{s(()=>()=>B())},[B]),{loading:h,error:C,onboardingRequired:n,acknowledgeOnboarding:o}}function eY(e){const[t,n]=tf("onboarding",{}),[r,o]=x.useState(!1),[s,a]=x.useState(()=>()=>Promise.resolve());return x.useEffect(()=>{o(ne.isNil((t??{})[e]))},[t,e,o]),x.useEffect(()=>{a(()=>()=>(n(c=>ne.extend(c,{[e]:Date.now()})),Promise.resolve()))},[e,n,a]),{onboardingRequired:r,acknowledgeOnboarding:s}}function tY(){return{onboardingRequired:!1,acknowledgeOnboarding:x.useRef(()=>Promise.resolve()).current}}function nY(e,t){ef({mode:qU,topic:_U}).validateSync({mode:e,topic:t});const n=$U(t),r=eY(t),o=tY();switch(e){case il.USER:return n.loading?o:n.error?r:ne.pick(n,["onboardingRequired","acknowledgeOnboarding"]);case il.BROWSER:return r;default:return o}}var sl=(e=>(e.RESTART="RESTART",e.SET_SHOW="SET_SHOW",e.REGISTER_TIP="REGISTER_TIP",e.UNREGISTER_TIP="UNREGISTER_TIP",e.DISMISS_TIP="DISMISS_TIP",e.SET_ON_COMPLETE="SET_ON_COMPLETE",e))(sl||{});function rY(e,t){var o;const n=ne.clone(e),{type:r}=t;switch(r){case"SET_SHOW":{const{payload:s}=t;return ne.extend(n,{show:s})}case"REGISTER_TIP":{const{payload:s}=t,{id:a}=s,c=ne.chain(n.tips).clone().reject(p=>p.id===a).value(),u=ne.find(n.tips,{id:a}),A=ne.chain(u??{}).clone().extend(s).value();return c.push(A),ne.extend(n,{tips:ne.sortBy(c,["step"])})}case"UNREGISTER_TIP":{const{payload:s}=t,a=ne.isString(s)?s:s.id,c=ne.chain(n.tips).reject(u=>u.id===a).sortBy(["step"]).value();return ne.extend(n,{tips:c})}case"DISMISS_TIP":{const{payload:s}=t,a=ne.isString(s)?s:s.id,c=ne.chain(n.tips).reject(C=>C.id===a).value(),u=ne.find(n.tips,{id:a});if(ne.isNil(u))return n;const A=ne.chain(u).clone().extend({dismissed:!0}).value();c.push(A);const p=((o=ne.chain(c).reject(C=>C.dismissed??!1).minBy("step").value())==null?void 0:o.step)??0;return(A==null?void 0:A.completeOnboarding)&&ne.chain(c).reject(C=>C.step<p).reject(C=>C.dismissed??!1).isEmpty().value()&&e.onComplete(),ne.extend(n,{tips:ne.sortBy(c,["step"]),currentStep:p})}case"SET_ON_COMPLETE":{const{payload:s}=t;return ne.extend(n,{onComplete:s})}case"RESTART":{const s=ne.chain(n.tips).clone().map(a=>ne.omit(a,"dismissed")).value();return ne.extend(n,{tips:s,currentStep:0})}default:return n}}const nx=x.createContext(void 0);function oY(e){const{mode:t,topic:n="default"}=e,{onboardingRequired:r,acknowledgeOnboarding:o}=nY(t,n),[s,a]=x.useReducer(rY,{show:r,tips:[],currentStep:0,onComplete:()=>{}}),c=x.useMemo(()=>({state:s,dispatch:a}),[s,a]);return x.useEffect(()=>{a({type:"SET_SHOW",payload:r})},[r,a]),x.useEffect(()=>{function u(){o().then(()=>{a({type:"SET_SHOW",payload:!1})})}a({type:"SET_ON_COMPLETE",payload:u})},[o,a]),f.jsx(nx.Provider,{value:c,children:e.children})}function rx(){const e=x.useContext(nx);if(e===void 0)throw new Error("[Onboarding] useOnboardingContext: context undefined. Please provide a valid OnboardingContext using OnboardingProvider");return e}function iY(){return rx().state}function ox(){return rx().dispatch}function sY(e){ef({id:no().required(),step:im().required()}).validateSync(e);const{id:t,step:n,completeOnboarding:r}=e,{show:o,tips:s,currentStep:a}=iY(),c=ne.find(s,{id:t}),{dismissed:u}=c??{},A=ox(),p=x.useCallback(()=>{A({type:sl.DISMISS_TIP,payload:t})},[A,t]);return x.useEffect(()=>{(ne.isNil(c)||n!==(c==null?void 0:c.step))&&A({type:sl.REGISTER_TIP,payload:{id:t,step:n,completeOnboarding:r}})},[t,n,r,c]),x.useEffect(()=>()=>{A({type:sl.UNREGISTER_TIP,payload:t})},[t,A]),{tip:ne.chain(c??e).clone().extend({open:o&&!ne.isNil(c)&&a===n&&!u}).value(),dismiss:p}}function aY(){const e=ox();return x.useCallback(()=>{e({type:sl.RESTART})},[e])}function lY(e){const{id:t,step:n=0,title:r,completeOnboarding:o}=e,{tip:s,dismiss:a}=sY({id:t,step:n,completeOnboarding:o}),{open:c}=s,u=ne.omit(e,["id","step","title","completeOnboarding"]);return f.jsx(ou,{...u,arrow:!0,open:c,title:f.jsxs(b.Stack,{gap:1,children:[f.jsx(b.Typography,{children:r}),f.jsx(b.Button,{onClick:a,variant:"text",color:"primary",size:"small",children:"Got it!"})]}),children:e.children})}const cY=b.styled(lY)(({theme:e})=>{const{palette:t,spacing:n}=e,{primary:r,background:o}=t;return{[`& .${b.tooltipClasses.tooltip}`]:{padding:`${n(1)} ${n(1.5)}`,backgroundColor:r.main,color:r.contrastText,[`& .${b.buttonClasses.root}`]:{backgroundColor:o.paper}},[`& .${b.tooltipClasses.arrow}`]:{color:r.main}}});function uY({label:e="ra.auth.sign_in",...t}){const n=k.useRecordContext(),[r,o]=x.useState(!1),s=k.useAuthProvider(),a=x.useCallback(c=>{c.stopPropagation(),c.preventDefault(),o(!0),s.impersonate(n==null?void 0:n.id).then(()=>{o(!1),document.location.href="/"})},[s,n==null?void 0:n.id]);return f.jsx(k.Button,{disabled:r||s.impersonate===void 0,color:"primary",variant:"text",label:e,onClick:a,...t,children:f.jsx(_n.VpnKey,{})})}const Cp=(e,t)=>{const n=t.id;if(!e)return[t];const r=e.findIndex(o=>o.id===n);return r===-1?[...e,t]:[...e.slice(0,r),{...e[r],...t},...e.slice(r+1)]},AY=(e,t)=>e&&e.data?{data:Cp(e.data,t),total:e.total+1}:e,dY=(e,t)=>e&&e.length>0?Cp(e,t):e,fY=(e,t)=>e&&e.data?{...e,data:Cp(e.data,t),total:e.total+1}:e,gY=({onClose:e,record:t,children:n,redirect:r=!1,onSubmit:o,onSuccess:s,onError:a,...c})=>{const u=Gi.useQueryClient(),A=k.useResourceContext(),p=k.useRedirect(),h=k.useNotify(),C=x.useCallback((B,w,M)=>{var S;const P=Date.now();u.setQueryData([A,"getOne",{id:B.id}],B),u.setQueriesData([A,"getList"],D=>fY(D,B),{updatedAt:P}),u.setQueriesData([A,"getMany"],D=>dY(D,B),{updatedAt:P}),u.setQueriesData([A,"getManyReference"],D=>AY(D,B),{updatedAt:P}),e(),h("ra.notification.created"),r!==void 0&&p(r,A,B.id,B),s&&s(B,e),(S=c==null?void 0:c.mutationOptions)!=null&&S.onSuccess&&c.mutationOptions.onSuccess(B,w,{...M,onClose:e})},[e,s,u,A,h,p,r]),{save:E,...m}=k.useCreateController({...c,mutationOptions:{...c==null?void 0:c.mutationOptions,onSuccess:C,onError:a}}),v=x.useCallback(B=>{o?o(B,e):E&&E(B)},[o,E,e]);return f.jsx(k.CreateContextProvider,{value:{record:t,save:v,saving:m==null?void 0:m.saving,redirect:r},children:x.cloneElement(n,{...n.props,modal:!0,toolbar:f.jsxs(yi,{children:[f.jsx(k.Button,{variant:"text",size:"medium",label:"ra.action.cancel",onClick:e,disabled:m==null?void 0:m.saving}),f.jsx(k.SaveButton,{type:"button",disabled:m==null?void 0:m.saving})]})})})},pY={true:{_scrollToTop:!0},false:{}},hY=ue(b.Fab,{overridesResolver:(e,t)=>t.root})(({theme:e})=>({[`&.${k.CreateButtonClasses.floating}`]:{color:e.palette.getContrastText(e.palette.primary.main),margin:0,top:"auto",right:20,bottom:60,left:"auto",position:"fixed",zIndex:1e3}}));function CY({fullWidth:e=!0,maxWidth:t="md",label:n="ra.action.create",record:r,redirect:o,scrollToTop:s=!0,className:a,sx:c,style:u,fab:A=!0,onSubmit:p,onSuccess:h,onError:C,...E}){const[m,v]=x.useState(!1),B=k.useTranslate(),w=k.useResourceContext(),{openDialog:M,closeDialog:Q}=ai(),P=x.useCallback(()=>M(w,()=>v(!0)),[M,w]),S=x.useCallback(()=>Q(w,()=>v(!1)),[Q,w]),D=A&&b.useMediaQuery(R=>R.breakpoints.down("md"));return f.jsxs(f.Fragment,{children:[D?f.jsx(hY,{state:pY[String(s)],color:"primary",className:Ve(k.CreateButtonClasses.floating,a),"aria-label":n&&B(n),onClick:P,children:f.jsx(Fg,{})}):f.jsx(k.Button,{sx:c,label:n,onClick:P,style:u,children:f.jsx(Fg,{})}),f.jsx(b.Dialog,{open:m,scroll:"body",onClose:S,fullWidth:e,maxWidth:t,children:f.jsx(gY,{...E,redirect:o,record:r,onClose:S,onSubmit:p,onSuccess:h,onError:C})})]})}const EY=({onClose:e,children:t,mutationMode:n="pessimistic",...r})=>{const o=k.useNotify(),s=k.useRecordContext(),a=k.useResourceContext(),{id:c}=s,{isLoading:u,data:A}=k.useGetOne(a,{id:c}),p=x.useCallback((...E)=>{o("ra.notification.updated",{type:"info",messageArgs:{smart_count:1}}),e(),r.onSuccess&&r.onSuccess(...E)},[e,o]),{save:h,saving:C}=k.useEditController({...r,resource:a,id:c,mutationMode:n,mutationOptions:{...r==null?void 0:r.mutationOptions,onSuccess:p}});return f.jsx(k.EditContextProvider,{value:{record:A,isLoading:u,save:h,saving:C},children:x.cloneElement(t,{...t.props,modal:!0,toolbar:f.jsxs(yi,{children:[f.jsx(k.Button,{variant:"text",size:"medium",label:"ra.action.cancel",onClick:e}),f.jsx(k.SaveButton,{type:"button"})]})})})};function mY({fullWidth:e=!0,maxWidth:t="md",label:n="ra.action.edit",style:r,children:o,...s}){const[a,c]=x.useState(!1),{openDialog:u,closeDialog:A}=ai(),p=k.useResourceContext(),h=x.useCallback(()=>u(p,()=>c(!0)),[u,p]),C=x.useCallback(()=>A(p,()=>c(!1)),[A,p]);return f.jsxs(f.Fragment,{children:[f.jsx(k.Button,{label:n,onClick:h,style:r,children:f.jsx(_n.Edit,{})}),f.jsx(b.Dialog,{open:a,scroll:"body",onClose:C,fullWidth:e,maxWidth:t,children:f.jsx(EY,{...s,onClose:C,children:o})})]})}function ix(e){const{label:t="ra.action.bulk_actions",children:n,className:r,...o}=e,{filterValues:s,resource:a,selectedIds:c=[],onUnselectItems:u}=ce.useListContext(e),A=ce.useTranslate(),p=x.useCallback(()=>{u()},[u]);return f.jsx(IY,{className:r,children:f.jsxs(yV,{"data-test":"bulk-actions-toolbar",className:Ve(Ar.toolbar,{[Ar.collapsed]:c.length===0}),...ce.sanitizeListRestProps(o),children:[f.jsxs("div",{className:Ar.title,children:[f.jsx(cg,{className:Ar.icon,"aria-label":A("ra.action.unselect"),title:A("ra.action.unselect"),onClick:p,size:"small",children:f.jsx(Su,{fontSize:"small"})}),f.jsx(iv,{color:"inherit",variant:"subtitle1",children:A(t,{_:t,smart_count:c.length})})]}),f.jsx(k.TopToolbar,{className:Ar.topToolbar,children:x.Children.map(n,h=>x.isValidElement(h)?x.cloneElement(h,{filterValues:s,resource:a,selectedIds:c}):null)})]})})}const xi="RaBulkActionsToolbar",Ar={toolbar:`${xi}-toolbar`,topToolbar:`${xi}-topToolbar`,buttons:`${xi}-buttons`,collapsed:`${xi}-collapsed`,title:`${xi}-title`,icon:`${xi}-icon`},IY=ue("div",{name:xi,overridesResolver:(e,t)=>t.root})(({theme:e})=>({position:"relative",[`& .${Ar.toolbar}`]:{position:"absolute",left:0,right:0,zIndex:3,color:e.palette.mode==="light"?e.palette.primary.main:e.palette.text.primary,justifyContent:"space-between",backgroundColor:e.palette.mode==="light"?pd(e.palette.primary.light,.8):e.palette.primary.dark,minHeight:e.spacing(6),height:e.spacing(6),transform:`translateY(-${e.spacing(6)})`,transition:`${e.transitions.create("height")}, ${e.transitions.create("min-height")}, ${e.transitions.create("transform")}`,borderTopLeftRadius:e.shape.borderRadius,borderTopRightRadius:e.shape.borderRadius},[`& .${Ar.topToolbar}`]:{paddingBottom:e.spacing(1),minHeight:"auto",[e.breakpoints.down("sm")]:{backgroundColor:"transparent"}},[`& .${Ar.buttons}`]:{},[`& .${Ar.collapsed}`]:{minHeight:0,height:0,transform:"translateY(0)",overflowY:"hidden"},[`& .${Ar.title}`]:{display:"flex",flex:"0 0 auto"},[`& .${Ar.icon}`]:{marginLeft:"-0.5em",marginRight:"0.5em"}})),Ep={p:0,m:0},sx={p:2,m:0,borderRadius:0,width:"100%"};function vY(e){const{children:t}=e,[n,r]=F.useState(null),o=m=>{r(m.currentTarget)},s=()=>{r(null)},a=b.useMediaQuery(m=>m.breakpoints.down("md")),{filterValues:c,resource:u,selectedIds:A=[],onUnselectItems:p}=k.useListContext(e),h=!!n&&A!==void 0&&A.length>0,C=h?"simple-popover":void 0,E=F.useCallback(()=>{p(),r(null)},[p,r]);return f.jsx(b.Fade,{in:A!==void 0&&A.length>0,children:f.jsxs(b.Box,{sx:{position:"fixed",bottom:"16px",right:"16px"},children:[f.jsx(b.Fab,{color:"primary","aria-label":"manage",onClick:o,children:A==null?void 0:A.length}),f.jsx(b.Popover,{id:C,open:h,anchorEl:n,onClose:s,anchorOrigin:{vertical:"top",horizontal:a?"center":"right"},transformOrigin:{vertical:"bottom",horizontal:a?"center":"right"},disableScrollLock:!0,elevation:10,children:f.jsxs(b.List,{sx:Ep,children:[f.jsx(b.ListItem,{sx:Ep,children:f.jsx(k.Button,{onClick:E,sx,label:"ra.action.unselect",startIcon:f.jsx(Su,{}),children:f.jsx(Su,{})})}),F.Children.map(t,m=>{var v;return f.jsx(b.ListItem,{sx:Ep,children:F.isValidElement(m)?F.cloneElement(m,{filterValues:c,resource:u,selectedIds:A,sx,...(v=m.props)!=null&&v.popover?{closePopover:s}:{}}):null})})]})})]})})}const ax=x.createContext({});ax.displayName="DatagridContext";const BY=({children:e,value:t})=>f.jsx(ax.Provider,{value:t,children:e}),lx=f.jsx(k.BulkDeleteButton,{}),cx=F.forwardRef((e,t)=>{const{optimized:n=!1,body:r=n?k.PureDatagridBody:k.DatagridBody,header:o=k.DatagridHeader,children:s,className:a,empty:c=QY,expand:u,bulkActionsToolbar:A=!1,bulkActionButtons:p=lx,hover:h,isRowSelectable:C,isRowExpandable:E,resource:m,rowClick:v,rowSx:B,rowStyle:w,size:M="small",sx:Q,expandSingle:P=!1,...S}=e,{sort:D,data:R,isLoading:G,onSelect:X,onToggleItem:q,selectedIds:W,setSort:re,total:ie}=ce.useListContext(e),Z=!!p,$=x.useMemo(()=>({isRowExpandable:E,expandSingle:P}),[E,P]),V=x.useRef(null);x.useEffect(()=>{(!W||W.length===0)&&(V.current=null)},[JSON.stringify(W)]);const _=x.useCallback((L,ee)=>{const U=R.map(fe=>fe.id),J=U.indexOf(V.current);if(V.current=ee.target.checked?L:null,ee.shiftKey&&J!==-1){const fe=U.indexOf(L),he=U.slice(Math.min(J,fe),Math.max(J,fe)+1),de=ee.target.checked?YH(W,he):sz(W,he);X(C?de.filter(ge=>C(R.find(Ce=>Ce.id===ge))):de)}else q(L)},[R,C,X,q,W]);return G===!0?f.jsx(k.DatagridLoading,{className:a,expand:u,hasBulkActions:Z,nbChildren:F.Children.count(s),size:M}):R==null||R.length===0||ie===0?c||null:f.jsx(BY,{value:$,children:f.jsxs(k.DatagridRoot,{sx:Q,className:Ve(k.DatagridClasses.root,a),children:[A!=null&&x.isValidElement(A)?x.cloneElement(A,{selectedIds:W,total:ie}):p!==!1?f.jsx(ix,{children:x.isValidElement(p)?p:lx}):null,f.jsx("div",{className:k.DatagridClasses.tableWrapper,children:f.jsxs(b.Table,{ref:t,className:k.DatagridClasses.table,size:M,...bY(S),children:[ux(o,{children:s,sort:D,data:R,hasExpand:!!u,hasBulkActions:Z,isRowSelectable:C,onSelect:X,resource:m,selectedIds:W,setSort:re},s),ux(r,{expand:u,rowClick:v,data:R,hasBulkActions:Z,hover:h,onToggleItem:_,resource:m,rowSx:B,rowStyle:w,selectedIds:W,isRowSelectable:C},s)]})})]})})}),ux=(e,t,n)=>x.isValidElement(e)?x.cloneElement(e,t,n):x.createElement(e,t,n),yY=["isRequired","setFilter","setPagination","limitChoicesToValue","translateChoice","field","fieldState","formState"],bY=e=>Object.keys(ce.sanitizeListRestProps(e)).filter(t=>!yY.includes(t)).reduce((t,n)=>({...t,[n]:e[n]}),{});cx.displayName="Datagrid";const QY=f.jsx(k.ListNoResults,{}),xY=ue(cx,{slot:"root"})(({theme:e})=>({"& .RaBulkActionsToolbar-toolbar":{height:48},"& .RaBulkActionsToolbar-collapsed":{height:0,paddingTop:0,paddingBottom:0},"& .RaBulkActionsToolbar-topToolbar":{backgroundColor:"transparent"},"& .icon span":{top:-1,left:-1},"& th":{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",backgroundColor:"inherit !important",textTransform:"none",fontSize:e.typography.subtitle1.fontSize}}));function wY(e){return f.jsx(xY,{...e})}const TY=ue("div")(({theme:e})=>({padding:e.spacing(2)}));function SY({actions:e,className:t,...n}){const{hasCreate:r}=ce.useResourceDefinition(n),o=ce.useResourceContext(n),s=ce.useTranslate(),a=ce.useGetResourceLabel(),c=s(`resources.${o}.forcedCaseName`,{smart_count:0,_:a(o,0)}),u=s("ra.page.empty",{name:c}),A=s("ra.page.invite");return f.jsxs(PY,{className:t,children:[f.jsxs("div",{className:wi.message,children:[f.jsx(_n.Inbox,{className:wi.icon}),f.jsx(b.Typography,{variant:"h4",paragraph:!0,children:s(`resources.${o}.empty`,{_:u})}),r&&f.jsx(b.Typography,{variant:"body1",children:s(`resources.${o}.invite`,{_:A})})]}),f.jsx(TY,{className:wi.toolbar,children:e})]})}const Vu="ApplicaEmpty",wi={message:`${Vu}-message`,icon:`${Vu}-icon`,toolbar:`${Vu}-toolbar`},PY=ue("span",{name:Vu,overridesResolver:(e,t)=>t.root})(({theme:e})=>({flex:1,[`& .${wi.message}`]:{textAlign:"center",opacity:e.palette.mode==="light"?.5:.8,margin:"0 1em",color:e.palette.mode==="light"?"inherit":e.palette.text.primary},[`& .${wi.icon}`]:{width:"9em",height:"9em"},[`& .${wi.toolbar}`]:{textAlign:"center",marginTop:"2em"}})),OY=f.jsx(k.ListActions,{}),jY=f.jsx(k.Pagination,{}),MY=f.jsx(k.Empty,{}),DY=gz,kY=e=>{const{actions:t=OY,aside:n,filters:r,bulkActionButtons:o,emptyWhileLoading:s,hasCreate:a,pagination:c=jY,children:u,className:A,component:p=DY,title:h,empty:C=MY,...E}=e,{defaultTitle:m,data:v,error:B,isLoading:w,filterValues:M,resource:Q}=ce.useListContext(e);if(!u||!v&&w&&s)return null;const P=()=>f.jsxs("div",{className:Wo.main,children:[(r||t)&&f.jsx(k.ListToolbar,{className:Wo.actions,filters:r,actions:t,hasCreate:a}),!B&&f.jsx(p,{className:Wo.content,children:o&&u&&F.isValidElement(u)?x.cloneElement(u,{bulkActionButtons:o}):u}),B?f.jsx(ep,{error:B,resetErrorBoundary:null}):c!==!1&&c]}),S=()=>C!==!1&&x.cloneElement(C,{className:Wo.noResults,hasCreate:a}),D=!w&&(v==null?void 0:v.length)===0&&!Object.keys(M).length&&C!==!1;return f.jsxs(RY,{className:Ve("list-page",A),...E,children:[f.jsx(k.Title,{title:h,defaultTitle:m,preferenceKey:`${Q}.list.title`}),D?S():P(),n]})},al="RaList",Wo={main:`${al}-main`,content:`${al}-content`,actions:`${al}-actions`,noResults:`${al}-noResults`},RY=ue("div",{name:al,overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",[`& .${Wo.main}`]:{flex:"1 1 auto",display:"flex",flexDirection:"column"},[`& .${Wo.content}`]:{position:"relative",[e.breakpoints.down("sm")]:{boxShadow:"none"},overflow:"inherit"},[`& .${Wo.actions}`]:{},[`& .${Wo.noResults}`]:{}})),FY=({debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o=LY,filterDefaultValues:s,perPage:a=10,queryOptions:c,resource:u,sort:A,storeKey:p,...h})=>f.jsx(ce.ListBase,{debounce:e,disableAuthentication:t,disableSyncWithLocation:n,exporter:r,filter:o,filterDefaultValues:s,perPage:a,queryOptions:c,resource:u,sort:A,storeKey:p,children:f.jsx(kY,{...h})}),LY={},NY=ga(FY,{slot:"root"})(({theme:e})=>({"& .RaList-main":{overflowX:"auto","& .RaBulkActionsToolbar-toolbar":{height:36,top:42,paddingTop:16,"& .RaBulkActionsToolbar-title":{alignItems:"end","& .MuiTypography-root":{alignSelf:"center"}}},"& .MuiToolbar-root":{"& form":{padding:e.spacing(2),paddingBottom:e.spacing(2),alignItems:"flex-start"}},"& .MuiButton-root":{margin:0},"& .RaList-actions":{minHeight:80,alignItems:"center",padding:e.spacing(2.5),"& form":{alignItems:"center",minHeight:"auto",paddingBottom:0,rowGap:e.spacing(2.5)},"& .RaFilterForm-filterFormInput":{margin:0,"& .MuiInputLabel-root":{paddingTop:0},"& .MuiFormControl-root":{marginTop:0},"& .ra-input":{alignSelf:"center",marginTop:0},[e.breakpoints.down("sm")]:{"&>.MuiStack-root":{width:"100%","&>div:not(.MuiStack-root)":{width:"100%"}}}},"& .RaFilterFormInput-hideButton":{margin:"0 !important",alignSelf:"center"},"& > .MuiToolbar-root":{flex:"unset",padding:0,alignSelf:"center",minHeight:"fit-content",[e.breakpoints.down("sm")]:{paddingBottom:e.spacing(2)}}},"& .RaList-content":{borderRadius:0,"& .RaBulkActionsToolbar-collapsed":{height:0,paddingTop:0,paddingBottom:0},"& .icon span":{top:-1,left:-1}}},"& .RaEmpty-toolbar":{margin:e.spacing(2)}}));function VY(e){return f.jsx(ir,{content:!1,children:f.jsx(NY,{...e})})}function HY(){const e=k.useRefresh(),t=k.useNotify(),n=k.useResourceContext(),r=k.useUnselectAll(n),{selectedIds:o,data:s}=k.useListContext(),a=k.useRecordContext(),c=o.map(h=>s.find(C=>C.id===h)),[u,{isLoading:A}]=k.useUpdateMany(n,{ids:o.length>0?o:[a==null?void 0:a.id],data:{readed:Nr().format("YYYY-MM-DD HH:mm:ss")},rows:c},{onSuccess:()=>{e(),t("resources.notifications.messages.readed.done"),r()},onError:()=>t("ra.notification.readed_error",{type:"warning"}),onFailure:()=>t("ra.notification.readed_error",{type:"warning"})}),p=x.useCallback(()=>{u()},[u]);return f.jsx(k.Button,{label:"ra.notification.mark_as_readed",disabled:A||(a==null?void 0:a.readed)!==null,onClick:p,children:f.jsx(_n.Email,{})})}function zY(){const e=k.useRefresh(),t=k.useNotify(),n=k.useResourceContext(),r=k.useUnselectAll(n),{selectedIds:o,data:s}=k.useListContext(),a=k.useRecordContext(),c=o.map(h=>s.find(C=>C.id===h)).concat([a]),[u,{isLoading:A}]=k.useUpdateMany(n,{ids:o.length>0?o:[a==null?void 0:a.id],data:{readed:null},rows:c},{onSuccess:()=>{e(),t("resources.notifications.messages.unreaded.done"),r()},onFailure:()=>t("resources.notifications.messages.unreaded.error",{type:"warning"})}),p=x.useCallback(()=>{u()},[u]);return f.jsx(k.Button,{color:"secondary",label:"ra.notification.mark_as_unreaded",disabled:A||a&&!(a!=null&&a.readed),onClick:p,children:f.jsx(_n.Drafts,{})})}function WY(e){const t=k.useRecordContext(e),n=k.useResourceContext(e),r=k.useRedirect(),o=k.useNotify(),s=k.useTranslate(),[a]=k.useLocaleState(),c=x.useMemo(()=>t!=null&&t.readed?Nr(t==null?void 0:t.readed).locale(a).format("ddd, DD MMM YYYY HH:mm:ss"):!1,[t==null?void 0:t.readed,a]),[u]=k.useUpdate(n,{id:t==null?void 0:t.id,data:{...t,readed:Nr().format("YYYY-MM-DD HH:mm:ss")}},{onSuccess:()=>{t!=null&&t.resource&&(t!=null&&t.resource.startsWith("/")?r(t==null?void 0:t.resource):document.location.href=t==null?void 0:t.resource)},onError:()=>{o("ra.notification.readed_error",{type:"warning"})}}),A=x.useCallback(()=>u(),[u]);return f.jsxs("div",{onClick:A,style:{cursor:"pointer"},role:"button",tabIndex:0,children:[f.jsx(b.Typography,{variant:"subtitle1",children:f.jsxs(b.Box,{fontWeight:"bold",children:[" ",t==null?void 0:t.title]})}),f.jsx(b.Typography,{variant:"body1",sx:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",whiteSpace:"break-spaces"},dangerouslySetInnerHTML:{__html:t==null?void 0:t.content}}),c&&f.jsx(b.Typography,{variant:"caption",display:"block",sx:{mt:1},color:"textSecondary",children:s("ra.notification.readed",{readed:c})})]})}function UY({...e}){const t=b.useTheme(),{mode:n,colorize:r,density:o}=x.useMemo(()=>({mode:t.palette.mode,colorize:t.palette.mode==="dark"?b.darken:b.lighten,density:t.palette.mode==="dark"?.5:.9}),[t.palette.mode]),s=a=>({backgroundColor:a!=null&&a.readed?r(t.palette.secondary[n],o):r(t.palette.primary[n],o)});return f.jsxs(k.Datagrid,{...e,rowSx:s,children:[f.jsx(WY,{source:"notification",sortable:!1}),f.jsx(lB,{source:"created"}),f.jsxs(si,{children:[f.jsx(HY,{}),f.jsx(zY,{})]})]})}const YY=ue(k.SimpleList,{name:"ApplicaSimpleList",slot:"root"})(({theme:e})=>({padding:e.spacing(1),paddingTop:0,paddingBottom:0})),Hu={width:"1.5rem",alignSelf:"center"};function GY({source:e,label:t,variant:n="body1",record:r,spaceBottom:o,spaceTop:s,component:a,leftIcon:c,rightIcon:u,button:A,buttonProps:p,...h}){const{getCurrentDialog:C}=ai(),E=ce.useResourceContext(h),m=C(),v=ce.useRecordContext(),B=r||v,w=ct.get(B,e||"");return f.jsxs(b.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:M=>({pt:1,pb:1,borderBottom:`1px solid ${M.palette.divider}`,...o&&{mb:2},...s&&{mt:2}}),children:[f.jsxs(b.Stack,{direction:"row",alignItems:"start",children:[c&&(x.isValidElement(c)?x.cloneElement(c,{style:Hu}):x.createElement(c,{style:Hu})),f.jsx(ce.FieldTitle,{label:t,source:e,resource:m||E})]}),f.jsxs(b.Stack,{direction:"row",alignItems:"center",children:[a?x.isValidElement(a)?x.cloneElement(a,{record:B,resource:E,value:w}):x.createElement(a,{source:e,record:B,resource:E,value:w}):f.jsx(b.Typography,{variant:n,children:w}),u&&(x.isValidElement(u)?x.cloneElement(u,{style:Hu}):x.createElement(u,{style:Hu})),A&&f.jsx(b.Button,{size:"small",variant:"outlined",sx:{ml:1,p:0},...p,children:A})]})]})}const Ax=({name:e,copy:t,logo:n,version:r,background:o})=>{const s=ce.useTranslate(),a=ce.useAuthProvider(),c=ce.useNotify(),u=Ct.useNavigate(),{token:A}=Ct.useParams();return x.useEffect(()=>{if(typeof a.activate!="function")throw new Error("The authProvider used for the ActivatePage must define an activate() method");a.activate(A).then(()=>{c("ra.auth.activate_success",{type:"info"}),ne.delay(()=>u("/login"),1e3)}).catch(p=>{c(p,{type:"error"}),ne.delay(()=>u("/login"),1e3)})},[A]),f.jsx(Ls,{name:e,copy:t,logo:n,version:r,background:o,children:f.jsxs(b.Grid,{container:!0,spacing:3,children:[f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(b.Typography,{variant:"h3",children:s("ra.auth.activate")}),f.jsx(b.Typography,{component:Ct.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:s("ra.auth.back_to_login")})]})}),f.jsx(b.Grid,{item:!0,xs:12,children:s("ra.auth.activate_pending")})]})})};Ax.propTypes={name:g.string.isRequired,version:g.string.isRequired,background:g.node};function dx({version:e,name:t,copy:n,logo:r,enablePasswordRecover:o=!1,enableRegistration:s=!1,redirectTo:a,background:c=f.jsx(kl,{})}){const[u,A]=ce.useSafeSetState(!1),p=ce.useLogin(),h=ce.useTranslate(),C=ce.useNotify(),E=ce.useCheckAuth(),m=Ct.useNavigate();x.useEffect(()=>{E({},!1).then(()=>{m("/")}).catch(()=>{})},[E,m]);const v=B=>{A(!0),p(B,a).then(()=>{A(!1)}).catch(w=>{A(!1),C(typeof w=="string"?w:typeof w>"u"||!w.message?"ra.auth.sign_in_error":w.message,{type:"error",messageArgs:{_:typeof w=="string"?w:w&&w.message?w.message:void 0}})})};return f.jsx(Ls,{name:t,version:e,copy:n,logo:r,background:c,children:f.jsxs(b.Grid,{container:!0,spacing:3,children:[f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(b.Typography,{variant:"h3",children:"Login"}),s&&f.jsx(b.Typography,{component:Ct.Link,to:"/register",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:h("ra.auth.register")})]})}),f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(ce.Form,{onSubmit:v,children:[f.jsxs(b.Grid,{container:!0,children:[f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:2},children:f.jsx(br,{autoFocus:!0,source:"username",label:h("ra.auth.username"),autoComplete:"username",validate:ce.required(),placeholder:"user@company.name",fullWidth:!0})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:2},children:f.jsx(br,{source:"password",label:h("ra.auth.password"),type:"password",autoComplete:"current-password",validate:ce.required(),placeholder:h("ra.auth.password_placeholder"),fullWidth:!0})})]}),o&&f.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(b.Stack,{direction:"row",justifyContent:"flex-end",alignItems:"flex-end",spacing:2,children:f.jsx(b.Link,{variant:"h6",component:Ct.Link,to:"/recover",color:"text.primary",children:h("ra.auth.forgot_password")})})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(b.Button,{variant:"contained",type:"submit",color:"primary",disabled:u,fullWidth:!0,children:u?f.jsx(b.CircularProgress,{size:19,thickness:3}):h("ra.auth.sign_in")})})]})})]})})}const fx=({name:e,copy:t,logo:n,version:r,background:o})=>{const[s,a]=x.useState(!1),c=ce.useTranslate(),u=ce.useRedirect(),A=ce.useNotify(),p=ce.useAuthProvider(),h=({email:C})=>{a(!0),p.recover(C).then(E=>{const m=`ra.auth.recover_${E.responseCode}`,v=E.responseCode==="ok"?"info":"error";A(m,{type:v}),u("/login")}).catch(E=>{A((E==null?void 0:E.message)||(E==null?void 0:E.toString()),{type:"error"})}).finally(()=>a(!1))};return f.jsx(Ls,{name:e,copy:t,logo:n,version:r,background:o,children:f.jsxs(b.Grid,{container:!0,spacing:3,children:[f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(b.Typography,{variant:"h3",children:c("ra.auth.recover.title")}),f.jsx(b.Typography,{component:Ct.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:c("ra.auth.back_to_login")})]})}),f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(k.Form,{onSubmit:h,children:[f.jsx(b.Grid,{container:!0,children:f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(br,{source:"email",validate:[ce.required(),ce.email()]})})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1,mb:1},children:f.jsx(b.Typography,{variant:"caption",children:c("ra.auth.recover.inbox_help")})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(b.Button,{variant:"contained",type:"submit",color:"primary",disabled:s,fullWidth:!0,children:s?f.jsx(b.CircularProgress,{size:19,thickness:3}):c("ra.auth.recover")})})]})})]})})};fx.propTypes={name:g.string.isRequired,version:g.string.isRequired,background:g.node};const gx=({name:e,copy:t,version:n,logo:r,background:o})=>{const[s,a]=x.useState(!1),c=ce.useTranslate(),u=ce.useRedirect(),A=ce.useNotify(),p=ce.useAuthProvider(),h=C=>{a(!0),p.register(C).then(E=>{const m=`ra.auth.register_${E.responseCode}`,v=E.responseCode==="ok"?"info":"error";A(m,{type:v}),u("/login")}).catch(E=>{A(E,{type:"error"})}).finally(()=>a(!1))};return f.jsx(Ls,{name:e,copy:t,logo:r,background:o,version:n,children:f.jsxs(b.Grid,{container:!0,spacing:3,children:[f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"baseline",sx:{mb:{xs:-.5,sm:.5}},children:[f.jsx(b.Typography,{variant:"h3",children:c("ra.auth.register.title")}),f.jsx(b.Typography,{component:Ct.Link,to:"/login",variant:"body1",sx:{textDecoration:"none"},color:"primary",children:c("ra.auth.already_have_account")})]})}),f.jsx(b.Grid,{item:!0,xs:12,children:f.jsxs(k.Form,{onSubmit:h,children:[f.jsxs(b.Grid,{container:!0,children:[f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(br,{source:"name",label:c("ra.register.name"),validate:ce.required()})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(br,{source:"email",type:"email",validate:[ce.required(),ce.email()]})}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mb:1},children:f.jsx(br,{source:"password",type:"password",validate:ce.required()})})]}),f.jsx(b.Grid,{item:!0,xs:12,sx:{mt:1},children:f.jsx(b.Button,{variant:"contained",type:"submit",color:"primary",disabled:s,fullWidth:!0,children:s?f.jsx(b.CircularProgress,{size:19,thickness:3}):c("ra.auth.create_account")})})]})})]})})};gx.propTypes={name:g.string.isRequired,version:g.string.isRequired};function px(){const e=x.useCallback(()=>location.reload(),[]);return f.jsx(b.Container,{children:f.jsxs(b.Stack,{alignItems:"center",px:2,py:{xs:4,sm:8},spacing:2,textAlign:"center",children:[f.jsx("img",{src:ub,style:{width:"100%",maxWidth:450}}),f.jsx(b.Typography,{variant:"h2",children:"Ops! An error occurred..."}),f.jsx(b.Typography,{children:"We're fixing the problem. Please try again later."}),f.jsx(b.Button,{onClick:e,variant:"contained",children:"Reload"})]})})}const KY=e=>({button:e.palette.mode==="dark"?"0 2px 0 rgb(0 0 0 / 5%)":"0 2px #0000000b",text:"0 -1px 0 rgb(0 0 0 / 12%)",z1:e.palette.mode==="dark"?"0px 1px 1px rgb(0 0 0 / 14%), 0px 2px 1px rgb(0 0 0 / 12%), 0px 1px 3px rgb(0 0 0 / 20%)":`0px 1px 4px ${nt(e.palette.grey[900],.08)}`,primary:`0 0 0 2px ${nt(e.palette.primary.main,.2)}`,secondary:`0 0 0 2px ${nt(e.palette.secondary.main,.2)}`,error:`0 0 0 2px ${nt(e.palette.error.main,.2)}`,warning:`0 0 0 2px ${nt(e.palette.warning.main,.2)}`,info:`0 0 0 2px ${nt(e.palette.info.main,.2)}`,success:`0 0 0 2px ${nt(e.palette.success.main,.2)}`,grey:`0 0 0 2px ${nt(e.palette.grey[500],.2)}`,primaryButton:`0 14px 12px ${nt(e.palette.primary.main,.2)}`,secondaryButton:`0 14px 12px ${nt(e.palette.secondary.main,.2)}`,errorButton:`0 14px 12px ${nt(e.palette.error.main,.2)}`,warningButton:`0 14px 12px ${nt(e.palette.warning.main,.2)}`,infoButton:`0 14px 12px ${nt(e.palette.info.main,.2)}`,successButton:`0 14px 12px ${nt(e.palette.success.main,.2)}`,greyButton:`0 14px 12px ${nt(e.palette.grey[500],.2)}`});function dr(e,t){JY(e)&&(e="100%");var n=XY(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function JY(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function XY(e){return typeof e=="string"&&e.indexOf("%")!==-1}function ZY(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function zu(e){return e<=1?"".concat(Number(e)*100,"%"):e}function mp(e){return e.length===1?"0"+e:String(e)}function _Y(e,t,n){return{r:dr(e,255)*255,g:dr(t,255)*255,b:dr(n,255)*255}}function Ip(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function qY(e,t,n){var r,o,s;if(e=dr(e,360),t=dr(t,100),n=dr(n,100),t===0)o=n,s=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;r=Ip(c,a,e+1/3),o=Ip(c,a,e),s=Ip(c,a,e-1/3)}return{r:r*255,g:o*255,b:s*255}}function $Y(e,t,n){e=dr(e,255),t=dr(t,255),n=dr(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),s=0,a=r,c=r-o,u=r===0?0:c/r;if(r===o)s=0;else{switch(r){case e:s=(t-n)/c+(t<n?6:0);break;case t:s=(n-e)/c+2;break;case n:s=(e-t)/c+4;break}s/=6}return{h:s,s:u,v:a}}function eG(e,t,n){e=dr(e,360)*6,t=dr(t,100),n=dr(n,100);var r=Math.floor(e),o=e-r,s=n*(1-t),a=n*(1-o*t),c=n*(1-(1-o)*t),u=r%6,A=[n,a,s,s,c,n][u],p=[c,n,n,a,s,s][u],h=[s,s,c,n,n,a][u];return{r:A*255,g:p*255,b:h*255}}function tG(e,t,n,r){var o=[mp(Math.round(e).toString(16)),mp(Math.round(t).toString(16)),mp(Math.round(n).toString(16))];return r&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function hx(e){return Wn(e)/255}function Wn(e){return parseInt(e,16)}var Cx={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function ll(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,s=null,a=!1,c=!1;return typeof e=="string"&&(e=oG(e)),typeof e=="object"&&(Ao(e.r)&&Ao(e.g)&&Ao(e.b)?(t=_Y(e.r,e.g,e.b),a=!0,c=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Ao(e.h)&&Ao(e.s)&&Ao(e.v)?(r=zu(e.s),o=zu(e.v),t=eG(e.h,r,o),a=!0,c="hsv"):Ao(e.h)&&Ao(e.s)&&Ao(e.l)&&(r=zu(e.s),s=zu(e.l),t=qY(e.h,r,s),a=!0,c="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=ZY(n),{ok:a,format:e.format||c,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var nG="[-\\+]?\\d+%?",rG="[-\\+]?\\d*\\.\\d+%?",Uo="(?:".concat(rG,")|(?:").concat(nG,")"),vp="[\\s|\\(]+(".concat(Uo,")[,|\\s]+(").concat(Uo,")[,|\\s]+(").concat(Uo,")\\s*\\)?"),Bp="[\\s|\\(]+(".concat(Uo,")[,|\\s]+(").concat(Uo,")[,|\\s]+(").concat(Uo,")[,|\\s]+(").concat(Uo,")\\s*\\)?"),Qr={CSS_UNIT:new RegExp(Uo),rgb:new RegExp("rgb"+vp),rgba:new RegExp("rgba"+Bp),hsl:new RegExp("hsl"+vp),hsla:new RegExp("hsla"+Bp),hsv:new RegExp("hsv"+vp),hsva:new RegExp("hsva"+Bp),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function oG(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Cx[e])e=Cx[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Qr.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Qr.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Qr.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Qr.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Qr.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Qr.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Qr.hex8.exec(e),n?{r:Wn(n[1]),g:Wn(n[2]),b:Wn(n[3]),a:hx(n[4]),format:t?"name":"hex8"}:(n=Qr.hex6.exec(e),n?{r:Wn(n[1]),g:Wn(n[2]),b:Wn(n[3]),format:t?"name":"hex"}:(n=Qr.hex4.exec(e),n?{r:Wn(n[1]+n[1]),g:Wn(n[2]+n[2]),b:Wn(n[3]+n[3]),a:hx(n[4]+n[4]),format:t?"name":"hex8"}:(n=Qr.hex3.exec(e),n?{r:Wn(n[1]+n[1]),g:Wn(n[2]+n[2]),b:Wn(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function Ao(e){return!!Qr.CSS_UNIT.exec(String(e))}var Wu=2,Ex=.16,iG=.05,sG=.05,aG=.15,mx=5,Ix=4,lG=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function vx(e){var t=e.r,n=e.g,r=e.b,o=$Y(t,n,r);return{h:o.h*360,s:o.s,v:o.v}}function Uu(e){var t=e.r,n=e.g,r=e.b;return"#".concat(tG(t,n,r,!1))}function cG(e,t,n){var r=n/100,o={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return o}function Bx(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-Wu*t:Math.round(e.h)+Wu*t:r=n?Math.round(e.h)+Wu*t:Math.round(e.h)-Wu*t,r<0?r+=360:r>=360&&(r-=360),r}function yx(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-Ex*t:t===Ix?r=e.s+Ex:r=e.s+iG*t,r>1&&(r=1),n&&t===mx&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function bx(e,t,n){var r;return n?r=e.v+sG*t:r=e.v-aG*t,r>1&&(r=1),Number(r.toFixed(2))}function Qx(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=ll(e),o=mx;o>0;o-=1){var s=vx(r),a=Uu(ll({h:Bx(s,o,!0),s:yx(s,o,!0),v:bx(s,o,!0)}));n.push(a)}n.push(Uu(r));for(var c=1;c<=Ix;c+=1){var u=vx(r),A=Uu(ll({h:Bx(u,c),s:yx(u,c),v:bx(u,c)}));n.push(A)}return t.theme==="dark"?lG.map(function(p){var h=p.index,C=p.opacity,E=Uu(cG(ll(t.backgroundColor||"#141414"),ll(n[h]),C*100));return E}):n}var yp={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},_t={},Yu={};Object.keys(yp).forEach(function(e){_t[e]=Qx(yp[e]),_t[e].primary=_t[e][5],Yu[e]=Qx(yp[e],{theme:"dark",backgroundColor:"#141414"}),Yu[e].primary=Yu[e][5]}),_t.red,_t.volcano,_t.gold,_t.orange,_t.yellow,_t.lime,_t.green,_t.cyan,_t.blue,_t.geekblue,_t.purple,_t.magenta,_t.grey,_t.grey;const xx=e=>{const{blue:t,red:n,gold:r,cyan:o,green:s,grey:a}=e,c={0:a[0],50:a[1],100:a[2],200:a[3],300:a[4],400:a[5],500:a[6],600:a[7],700:a[8],800:a[9],900:a[10],A50:a[15],A100:a[11],A200:a[12],A400:a[13],A700:a[14],A800:a[16]},u="#fff";return{primary:{lighter:t[0],100:t[1],200:t[2],light:t[3],400:t[4],main:t[5],dark:t[6],700:t[7],darker:t[8],900:t[9],contrastText:u},secondary:{lighter:c[100],100:c[100],200:c[200],light:c[300],400:c[400],main:c[500],600:c[600],dark:c[700],800:c[800],darker:c[900],A100:c[0],A200:c.A400,A300:c.A700,contrastText:c[0]},error:{lighter:n[0],light:n[2],main:n[4],dark:n[7],darker:n[9],contrastText:u},warning:{lighter:r[0],light:r[3],main:r[5],dark:r[7],darker:r[9],contrastText:c[100]},info:{lighter:o[0],light:o[3],main:o[5],dark:o[7],darker:o[9],contrastText:u},success:{lighter:s[0],light:s[3],main:s[5],dark:s[7],darker:s[9],contrastText:u},grey:c}};xx.propTypes={colors:g.object};const uG=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#D6E4FF","#D6E4FF","#ADC8FF","#84A9FF","#6690FF","#3366FF","#254EDB","#1939B7","#102693","#102693"],a=["#FFE7D3","#FF805D","#FF4528","#DB271D","#930C1A"],c=["#FFF6D0","#FFCF4E","#FFB814","#DB970E","#935B06"],u=["#DCF0FF","#7EB9FF","#549BFF","#3D78DB","#1A3D93"],A=["#EAFCD4","#8AE65B","#58D62A","#3DB81E","#137C0D"];return t==="dark"&&(s=["#1c2134","#1f294d","#243462","#273e83","#2c4db0","#305bdd","#567fe9","#80a4f4","#a9c5f8","#d2e2fb"],a=["#341d1b","#b03725","#dd3f27","#e9664d","#fbd6c9"],c=["#342a1a","#83631a","#dda116","#e9ba3a","#fbefb5"],u=["#202734","#416fb0","#4c88dd","#74a8e9","#ecf4fb"],A=["#1f2e1c","#449626","#4fba28","#74cf4d","#e3fbd2"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},grey:r}},AG=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#EEEDFC","#D5D1F8","#B9B2F3","#9C93EE","#877CEA","#7265E6","#6A5DE3","#5F53DF","#5549DB","#4237D5"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],A=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#222130","#2b2946","#37335a","#443e78","#554ca0","#655ac8","#9186dd","#5F53DF","#c3baf4","#efecfb"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],A=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},grey:r}},dG=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#E6F3EC","#84c297","#5eb57d","#3da866","#1f9c53","#068e44","#006933","#004222","#001c0f","#000000"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],A=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a231f","#173123","#174029","#13502f","#0e6737","#0a7d3e","#1f8f4e","#3ba162","#5cb07a","#82bf95"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],A=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},grey:r}},fG=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#f0f6ff","#edf4ff","#bed3f7","#8faeeb","#6488de","#3c64d0","#2947ab","#192f85","#0d1b5e","#070e38"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],A=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1d212d","#212841","#273353","#2c3e6e","#324c92","#385ab5","#5d7dcb","#89a7e1","#b9cef0","#e9f0fb"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],A=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},grey:r}},gG=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#fff4e6","#ffdfb8","#ffc98f","#ffb066","#ff943d","#f27013","#cc5206","#a63a00","#802800","#591900"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],A=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#32221a","#4a2b18","#5e371b","#7d4319","#a85317","#d26415","#e9883a","#f4a962","#f8c48c","#fbdbb5"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],A=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},grey:r}},pG=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#e1f0ef","#c8e3e2","#9ad6d6","#71c6c9","#4bb5bd","#2aa1af","#1a7b8a","#0e5563","#06323d","#021217"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],A=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1c2628","#1d3539","#22454a","#23595f","#26737c","#288d99","#47a6ad","#6dbec0","#96d0d0","#c5dfde"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],A=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},grey:r}},hG=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#d1e8d99c","#8cdba9","#63cf8e","#3ec277","#1db564","#00a854","#008245","#005c34","#003620","#000f0a"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],A=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a2721","#173728","#15472e","#115c36","#0b7841","#05934c","#1da65d","#3cba73","#61ca8b","#8ad7a6"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],A=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},grey:r}},CG=(e,t)=>{const{grey:n}=e,r={0:n[0],50:n[1],100:n[2],200:n[3],300:n[4],400:n[5],500:n[6],600:n[7],700:n[8],800:n[9],900:n[10],A50:n[15],A100:n[11],A200:n[12],A400:n[13],A700:n[14],A800:n[16]},o="#fff";let s=["#c1d6d066","#81c9b9","#5bbda9","#38b09c","#1aa391","#009688","#007069","#004a47","#002424","#000000"],a=["#FDE8E7","#F25E52","#F04134","#EE3B2F","#E92A21"],c=["#FFF7E0","#FFC926","#FFBF00","#FFB900","#FFA900"],u=["#E0F4F5","#26B0BA","#00A2AE","#009AA7","#008694"],A=["#E0F5EA","#26B56E","#00A854","#00A04D","#008D3A"];return t==="dark"&&(s=["#1a2524","#173331","#15423e","#11544e","#0b6c63","#058478","#1a9686","#37a996","#59b8a5","#7fc6b6"],a=["#321d1d","#7d2e28","#d13c31","#e66859","#f8baaf"],c=["#342c1a","#836611","#dda705","#e9bf28","#f8e577"],u=["#1a2628","#11595f","#058e98","#1ea6aa","#64cfcb"],A=["#1a2721","#115c36","#05934c","#1da65d","#61ca8b"]),{primary:{lighter:s[0],100:s[1],200:s[2],light:s[3],400:s[4],main:s[5],dark:s[6],700:s[7],darker:s[8],900:s[9],contrastText:o},secondary:{lighter:r[100],100:r[100],200:r[200],light:r[300],400:r[400],main:r[500],600:r[600],dark:r[700],800:r[800],darker:r[900],A100:r[0],A200:r.A400,A300:r.A700,contrastText:r[0]},error:{lighter:a[0],light:a[1],main:a[2],dark:a[3],darker:a[4],contrastText:o},warning:{lighter:c[0],light:c[1],main:c[2],dark:c[3],darker:c[4],contrastText:r[100]},info:{lighter:u[0],light:u[1],main:u[2],dark:u[3],darker:u[4],contrastText:o},success:{lighter:A[0],light:A[1],main:A[2],dark:A[3],darker:A[4],contrastText:o},grey:r}},wx=(e,t,n)=>{switch(t){case"theme1":return uG(e,n);case"theme2":return AG(e,n);case"theme3":return dG(e,n);case"theme4":return fG(e,n);case"theme5":return gG(e,n);case"theme6":return pG(e,n);case"theme7":return hG(e,n);case"theme8":return CG(e,n);default:return xx(e)}};wx.propTypes={colors:g.object,presetColor:g.any};const EG=(e,t)=>{const n=e==="dark"?Yu:_t;let r=["#ffffff","#fafafa","#f5f5f5","#f0f0f0","#d9d9d9","#bfbfbf","#8c8c8c","#595959","#262626","#141414","#000000"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],s=["#fafafb","#e6ebf1"];e==="dark"&&(r=["#000000","#141414","#1e1e1e","#595959","#8c8c8c","#bfbfbf","#d9d9d9","#f0f0f0","#f5f5f5","#fafafa","#ffffff"],o=["#fafafa","#bfbfbf","#434343","#1f1f1f"],s=["#121212","#d3d8db"]),n.grey=[...r,...o,...s];const a=wx(n,t,e);return wd({palette:{mode:e,common:{black:"#000",white:"#fff"},...a,text:{primary:e==="dark"?nt(a.grey[900],.87):a.grey[700],secondary:e==="dark"?nt(a.grey[900],.45):a.grey[500],disabled:e==="dark"?nt(a.grey[900],.1):a.grey[400]},action:{disabled:a.grey[300]},divider:e==="dark"?nt(a.grey[900],.05):a.grey[200],background:{paper:e==="dark"?a.grey[100]:a.grey[0],default:a.grey.A50}}})},mG=e=>({htmlFontSize:16,fontFamily:e,fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:500,fontWeightBold:600,h1:{fontWeight:600,fontSize:"2.375rem",lineHeight:1.21},h2:{fontWeight:600,fontSize:"1.875rem",lineHeight:1.27},h3:{fontWeight:600,fontSize:"1.5rem",lineHeight:1.33},h4:{fontWeight:600,fontSize:"1.25rem",lineHeight:1.4},h5:{fontWeight:600,fontSize:"1rem",lineHeight:1.5},h6:{fontWeight:400,fontSize:"0.875rem",lineHeight:1.57},caption:{fontWeight:400,fontSize:"0.75rem",lineHeight:1.66},body1:{fontSize:"0.875rem",lineHeight:1.57},body2:{fontSize:"0.75rem",lineHeight:1.66},subtitle1:{fontSize:"0.875rem",fontWeight:600,lineHeight:1.57},subtitle2:{fontSize:"0.75rem",fontWeight:500,lineHeight:1.66},overline:{lineHeight:1.66},button:{textTransform:"capitalize"}});function IG(e){return{MuiAccordion:{defaultProps:{disableGutters:!0,square:!0,elevation:0},styleOverrides:{root:{border:`1px solid ${e.palette.secondary.light}`,"&:not(:last-child)":{borderBottom:0},"&:before":{display:"none"},"&.Mui-disabled":{backgroundColor:e.palette.secondary.lighter}}}}}}function vG(e){return{MuiAccordionDetails:{styleOverrides:{root:{padding:e.spacing(2),borderTop:`1px solid ${e.palette.secondary.light}`}}}}}function BG(e){const{palette:t,spacing:n}=e;return{MuiAccordionSummary:{defaultProps:{expandIcon:f.jsx(Ze.RightOutlined,{style:{fontSize:"0.75rem"}})},styleOverrides:{root:{backgroundColor:t.secondary.lighter,flexDirection:"row-reverse",minHeight:46},expandIconWrapper:{"&.Mui-expanded":{transform:"rotate(90deg)"}},content:{marginTop:n(1.25),marginBottom:n(1.25),marginLeft:n(1)}}}}}function Ti({color:e,theme:t}){const n=an(t,e),{lighter:r,light:o,main:s}=n;return{borderColor:nt(o,.5),backgroundColor:r,"& .MuiAlert-icon":{color:s}}}function yG(e){const t=Ti({color:"primary",theme:e});return{MuiAlert:{styleOverrides:{root:{color:e.palette.text.primary,fontSize:"0.875rem"},icon:{fontSize:"1rem"},message:{padding:0,marginTop:3},filled:{color:e.palette.grey[0]},border:{padding:"10px 16px",border:"1px solid",...t,"&.MuiAlert-borderPrimary":Ti({color:"primary",theme:e}),"&.MuiAlert-borderSecondary":Ti({color:"secondary",theme:e}),"&.MuiAlert-borderError":Ti({color:"error",theme:e}),"&.MuiAlert-borderSuccess":Ti({color:"success",theme:e}),"&.MuiAlert-borderInfo":Ti({color:"info",theme:e}),"&.MuiAlert-borderWarning":Ti({color:"warning",theme:e})},action:{"& .MuiButton-root":{padding:2,height:"auto",fontSize:"0.75rem",marginTop:-2},"& .MuiIconButton-root":{width:"auto",height:"auto",padding:2,marginRight:6,"& .MuiSvgIcon-root":{fontSize:"1rem"}}}}}}}function bG(){return{MuiAlertTitle:{styleOverrides:{root:{marginBottom:4,marginTop:0,fontWeight:400}}}}}function QG(e){var t;return{MuiAutocomplete:{styleOverrides:{root:{"& .MuiOutlinedInput-root":{padding:"3px 9px"}},popupIndicator:{width:"auto",height:"auto"},popper:{border:`1px solid ${e.palette.mode==="dark"?(t=e.palette.dark)==null?void 0:t.main:e.palette.grey[100]}`},clearIndicator:{width:"auto",height:"auto"}}}}}function Si({color:e,theme:t}){const n=an(t,e),{lighter:r,main:o}=n;return{color:o,backgroundColor:r}}function xG(e){const t=Si({color:"primary",theme:e});return{MuiBadge:{styleOverrides:{standard:{minWidth:e.spacing(2),height:e.spacing(2),padding:e.spacing(.5)},light:{...t,"&.MuiBadge-colorPrimary":Si({color:"primary",theme:e}),"&.MuiBadge-colorSecondary":Si({color:"secondary",theme:e}),"&.MuiBadge-colorError":Si({color:"error",theme:e}),"&.MuiBadge-colorInfo":Si({color:"info",theme:e}),"&.MuiBadge-colorSuccess":Si({color:"success",theme:e}),"&.MuiBadge-colorWarning":Si({color:"warning",theme:e})}}}}}function $e({variant:e,color:t,theme:n}){const r=an(n,t),{lighter:o,main:s,dark:a,contrastText:c}=r,u=`${t}Button`,A=Is(n,u),p={"&::after":{boxShadow:`0 0 5px 5px ${nt(s,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${nt(s,.9)}`},"&:focus-visible":{outline:`2px solid ${a}`,outlineOffset:2}};switch(e){case"contained":return{"&:hover":{backgroundColor:a},...p};case"shadow":return{color:c,backgroundColor:s,boxShadow:A,"&:hover":{boxShadow:"none",backgroundColor:a},...p};case"outlined":return{borderColor:s,"&:hover":{color:a,backgroundColor:"transparent",borderColor:a},...p};case"dashed":return{color:s,borderColor:s,backgroundColor:o,"&:hover":{color:a,borderColor:a},...p};case"text":default:return{"&:hover":{color:a,backgroundColor:o},...p}}}function wG(e){const t=$e({variant:"dashed",color:"primary",theme:e}),n=$e({variant:"shadow",color:"primary",theme:e}),r={"&.Mui-disabled":{backgroundColor:e.palette.grey[200]}},o={"&>*:nth-of-type(1)":{fontSize:"inherit"}};return{MuiButton:{defaultProps:{disableElevation:!0},styleOverrides:{root:{fontWeight:400,"&::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:4,opacity:0,transition:"all 0.5s"},"&:active::after":{position:"absolute",borderRadius:4,left:0,top:0,opacity:1,transition:"0s"}},contained:{...r},outlined:{...r},text:{boxShadow:"none","&:hover":{boxShadow:"none"}},endIcon:{...o},startIcon:{...o},dashed:{border:"1px dashed",...t,"&.MuiButton-dashedPrimary":$e({variant:"dashed",color:"primary",theme:e}),"&.MuiButton-dashedSecondary":$e({variant:"dashed",color:"secondary",theme:e}),"&.MuiButton-dashedError":$e({variant:"dashed",color:"error",theme:e}),"&.MuiButton-dashedSuccess":$e({variant:"dashed",color:"success",theme:e}),"&.MuiButton-dashedInfo":$e({variant:"dashed",color:"info",theme:e}),"&.MuiButton-dashedWarning":$e({variant:"dashed",color:"warning",theme:e}),"&.Mui-disabled":{color:`${e.palette.grey[300]} !important`,borderColor:`${e.palette.grey[400]} !important`,backgroundColor:`${e.palette.grey[200]} !important`}},shadow:{...n,"&.MuiButton-shadowPrimary":$e({variant:"shadow",color:"primary",theme:e}),"&.MuiButton-shadowSecondary":$e({variant:"shadow",color:"secondary",theme:e}),"&.MuiButton-shadowError":$e({variant:"shadow",color:"error",theme:e}),"&.MuiButton-shadowSuccess":$e({variant:"shadow",color:"success",theme:e}),"&.MuiButton-shadowInfo":$e({variant:"shadow",color:"info",theme:e}),"&.MuiButton-shadowWarning":$e({variant:"shadow",color:"warning",theme:e}),"&.Mui-disabled":{color:`${e.palette.grey[300]} !important`,borderColor:`${e.palette.grey[400]} !important`,backgroundColor:`${e.palette.grey[200]} !important`}},containedPrimary:$e({variant:"contained",color:"primary",theme:e}),containedSecondary:$e({variant:"contained",color:"secondary",theme:e}),containedError:$e({variant:"contained",color:"error",theme:e}),containedSuccess:$e({variant:"contained",color:"success",theme:e}),containedInfo:$e({variant:"contained",color:"info",theme:e}),containedWarning:$e({variant:"contained",color:"warning",theme:e}),outlinedPrimary:$e({variant:"outlined",color:"primary",theme:e}),outlinedSecondary:$e({variant:"outlined",color:"secondary",theme:e}),outlinedError:$e({variant:"outlined",color:"error",theme:e}),outlinedSuccess:$e({variant:"outlined",color:"success",theme:e}),outlinedInfo:$e({variant:"outlined",color:"info",theme:e}),outlinedWarning:$e({variant:"outlined",color:"warning",theme:e}),textPrimary:$e({variant:"text",color:"primary",theme:e}),textSecondary:$e({variant:"text",color:"secondary",theme:e}),textError:$e({variant:"text",color:"error",theme:e}),textSuccess:$e({variant:"text",color:"success",theme:e}),textInfo:$e({variant:"text",color:"info",theme:e}),textWarning:$e({variant:"text",color:"warning",theme:e}),sizeExtraSmall:{minWidth:56,fontSize:"0.625rem",padding:"2px 8px"}}}}}function TG(){return{MuiButtonBase:{defaultProps:{disableRipple:!0,size:"medium"}}}}function SG(){return{MuiButtonGroup:{defaultProps:{disableRipple:!0}}}}function PG(){return{MuiCardContent:{styleOverrides:{root:{padding:20,"&:last-child":{paddingBottom:20}}}}}}function Ns({color:e,theme:t}){const n=an(t,e),{lighter:r,main:o,dark:s}=n;return{"&:hover":{backgroundColor:r,"& .icon":{borderColor:o}},"&.Mui-focusVisible":{outline:`2px solid ${s}`,outlineOffset:-4}}}function OG(e){switch(e){case"small":return{size:16,fontSize:1,position:1};case"large":return{size:24,fontSize:1.6,position:2};case"medium":default:return{size:20,fontSize:1.35,position:2}}}function bp(e){const t=OG(e);return{"& .icon":{width:t.size,height:t.size,"& .filled":{fontSize:`${t.fontSize}rem`,top:-t.position,left:-t.position}}}}function jG(e){const{palette:t}=e;return{MuiCheckbox:{defaultProps:{className:"size-small",icon:f.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25}}),checkedIcon:f.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:f.jsx(Ze.CheckSquareFilled,{className:"filled",style:{position:"absolute"}})}),indeterminateIcon:f.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:.25,position:"relative"},children:f.jsx(Ze.MinusSquareFilled,{className:"filled",style:{position:"absolute"}})})},styleOverrides:{root:{borderRadius:0,color:t.secondary[300],"&.size-small":{...bp("small")},"&.size-medium":{...bp("medium")},"&.size-large":{...bp("large")}},colorPrimary:Ns({color:"primary",theme:e}),colorSecondary:Ns({color:"secondary",theme:e}),colorSuccess:Ns({color:"success",theme:e}),colorWarning:Ns({color:"warning",theme:e}),colorInfo:Ns({color:"info",theme:e}),colorError:Ns({color:"error",theme:e})}}}}function Vs({color:e,theme:t}){const n=an(t,e),{dark:r}=n;return{"&.Mui-focusVisible":{outline:`2px solid ${r}`,outlineOffset:2}}}function Un({color:e,theme:t}){const n=an(t,e),{light:r,lighter:o,main:s}=n;return{color:s,backgroundColor:o,borderColor:r,"& .MuiChip-deleteIcon":{color:s,"&:hover":{color:r}}}}function MG(e){const t=Un({color:"secondary",theme:e});return{MuiChip:{styleOverrides:{root:{borderRadius:4,"&:active":{boxShadow:"none"},"&.MuiChip-colorPrimary":Vs({color:"primary",theme:e}),"&.MuiChip-colorSecondary":Vs({color:"secondary",theme:e}),"&.MuiChip-colorError":Vs({color:"error",theme:e}),"&.MuiChip-colorInfo":Vs({color:"info",theme:e}),"&.MuiChip-colorSuccess":Vs({color:"success",theme:e}),"&.MuiChip-colorWarning":Vs({color:"warning",theme:e})},sizeLarge:{fontSize:"1rem",height:40},light:{...t,"&.MuiChip-lightPrimary":Un({color:"primary",theme:e}),"&.MuiChip-lightSecondary":Un({color:"secondary",theme:e}),"&.MuiChip-lightError":Un({color:"error",theme:e}),"&.MuiChip-lightInfo":Un({color:"info",theme:e}),"&.MuiChip-lightSuccess":Un({color:"success",theme:e}),"&.MuiChip-lightWarning":Un({color:"warning",theme:e})},combined:{border:"1px solid",...t,"&.MuiChip-combinedPrimary":Un({color:"primary",theme:e}),"&.MuiChip-combinedSecondary":Un({color:"secondary",theme:e}),"&.MuiChip-combinedError":Un({color:"error",theme:e}),"&.MuiChip-combinedInfo":Un({color:"info",theme:e}),"&.MuiChip-combinedSuccess":Un({color:"success",theme:e}),"&.MuiChip-combinedWarning":Un({color:"warning",theme:e})}}}}}function DG(e){return{MuiDialog:{styleOverrides:{root:{"& .MuiBackdrop-root":{backgroundColor:nt("#000",.7)},"& .MuiCardContent-root":{[e.breakpoints.down("sm")]:{paddingBottom:`${e.spacing(2.5)}`}},"& .MuiPaper-root:has(.tabbed-form)":{overflowY:"unset",width:"100%"}}}}}}function kG(e){return{MuiDialogContentText:{styleOverrides:{root:{fontSize:"0.875rem",color:e.palette.text.primary}}}}}function RG(){return{MuiDialogTitle:{styleOverrides:{root:{fontSize:"1rem",fontWeight:500}}}}}function Hs({color:e,theme:t}){const n=an(t,e),{main:r,dark:o,contrastText:s}=n,a=`${e}Button`,c=Is(t,a);return{color:s,backgroundColor:r,boxShadow:c,"&:hover":{boxShadow:"none",backgroundColor:o},"&:focus-visible":{outline:`2px solid ${o}`,outlineOffset:2},"&::after":{borderRadius:"50px",boxShadow:`0 0 5px 5px ${nt(r,.9)}`},"&:active::after":{borderRadius:"50px",boxShadow:`0 0 0 0 ${nt(r,.9)}`}}}function FG(e){return{MuiFab:{styleOverrides:{root:{fontWeight:400,"&.Mui-disabled":{backgroundColor:e.palette.grey[200]},"&.MuiFab-primary":Hs({color:"primary",theme:e}),"&.MuiFab-secondary":Hs({color:"secondary",theme:e}),"&.Mui-error":Hs({color:"error",theme:e}),"&.MuiFab-success":Hs({color:"success",theme:e}),"&.MuiFab-info":Hs({color:"info",theme:e}),"&.MuiFab-warning":Hs({color:"warning",theme:e}),"&::after":{content:'""',display:"block",position:"absolute",left:0,top:0,width:"100%",height:"100%",borderRadius:4,opacity:0,transition:"all 0.5s"},"&:active::after":{position:"absolute",borderRadius:4,left:0,top:0,opacity:1,transition:"0s"}}}}}}function LG(e){return{MuiIconButton:{styleOverrides:{root:{borderRadius:4},sizeLarge:{width:e.spacing(5.5),height:e.spacing(5.5),fontSize:"1.25rem"},sizeMedium:{width:e.spacing(4.5),height:e.spacing(4.5),fontSize:"1rem"},sizeSmall:{width:e.spacing(3.75),height:e.spacing(3.75),fontSize:"0.75rem"},sizeExtraSmall:{width:e.spacing(2.6875),height:e.spacing(2.6875),fontSize:"0.625rem"}}}}}function NG(){return{MuiInputBase:{styleOverrides:{}}}}function VG(e){return{MuiInputLabel:{styleOverrides:{root:{color:e.palette.grey[600]},outlined:{lineHeight:"0.8em","&.MuiInputLabel-sizeSmall":{lineHeight:"1.3em"},"&.MuiInputLabel-shrink":{background:e.palette.background.paper,padding:"0 8px",marginLeft:-6,lineHeight:"1.4375em"}}}}}}function HG(){return{MuiLinearProgress:{styleOverrides:{root:{height:6,borderRadius:100},bar:{borderRadius:100}}}}}function zG(){return{MuiLink:{defaultProps:{underline:"hover"}}}}function WG(e){return{MuiListItemButton:{styleOverrides:{root:{"&.Mui-selected":{color:e.palette.primary.main,"& .MuiListItemIcon-root":{color:e.palette.primary.main}}}}}}}function UG(e){return{MuiListItemIcon:{styleOverrides:{root:{minWidth:24,color:e.palette.text.primary}}}}}function YG(){return{MuiListItemText:{styleOverrides:{root:{"&.MuiListItemText-inset":{paddingLeft:24}}}}}}function GG(){return{MuiLoadingButton:{styleOverrides:{root:{padding:"6px 16px","&.MuiLoadingButton-loading":{opacity:.6,textShadow:"none"}}}}}}function Pi({variant:e,theme:t}){const n=an(t,e),{light:r}=n,o=Is(t,`${e}`);return{"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:r},"&.Mui-focused":{boxShadow:o,"& .MuiOutlinedInput-notchedOutline":{border:`1px solid ${r}`}}}}function KG(e){return{MuiOutlinedInput:{styleOverrides:{input:{padding:"10.5px 14px 10.5px 12px"},notchedOutline:{borderColor:e.palette.mode==="dark"?e.palette.grey[200]:e.palette.grey[300]},root:{...Pi({variant:"primary",theme:e}),"&.Mui-error":{...Pi({variant:"error",theme:e})}},inputSizeSmall:{padding:"9px 8px 9px 12px"},inputMultiline:{padding:0},colorSecondary:Pi({variant:"secondary",theme:e}),colorError:Pi({variant:"error",theme:e}),colorWarning:Pi({variant:"warning",theme:e}),colorInfo:Pi({variant:"info",theme:e}),colorSuccess:Pi({variant:"success",theme:e})}}}}function JG(){return{MuiPagination:{defaultProps:{shape:"rounded"}}}}function yt({variant:e,color:t,theme:n}){const r=an(n,t),{lighter:o,light:s,dark:a,main:c,contrastText:u}=r,A={"&:focus-visible":{outline:`2px solid ${a}`,outlineOffset:2,...e==="text"&&{backgroundColor:n.palette.background.paper}}};switch(e){case"combined":case"contained":return{color:u,backgroundColor:c,"&:hover":{backgroundColor:s},...A};case"outlined":return{borderColor:c,"&:hover":{backgroundColor:o,borderColor:s},...A};case"text":default:return{color:c,"&:hover":{backgroundColor:c,color:o},...A}}}function XG(e){return{MuiPaginationItem:{styleOverrides:{root:{"&:focus-visible":{outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:2}},text:{"&.Mui-selected":{backgroundColor:"transparent",fontSize:"1rem",fontWeight:500,"&.MuiPaginationItem-textPrimary":yt({variant:"text",color:"primary",theme:e}),"&.MuiPaginationItem-textSecondary":yt({variant:"text",color:"secondary",theme:e}),"&.MuiPaginationItem-textError":yt({variant:"text",color:"error",theme:e}),"&.MuiPaginationItem-textSuccess":yt({variant:"text",color:"success",theme:e}),"&.MuiPaginationItem-textInfo":yt({variant:"text",color:"info",theme:e}),"&.MuiPaginationItem-textWarning":yt({variant:"text",color:"warning",theme:e})}},contained:{"&.Mui-selected":{"&.MuiPaginationItem-containedPrimary":yt({variant:"contained",color:"primary",theme:e}),"&.MuiPaginationItem-containedSecondary":yt({variant:"contained",color:"secondary",theme:e}),"&.MuiPaginationItem-containedError":yt({variant:"contained",color:"error",theme:e}),"&.MuiPaginationItem-containedSuccess":yt({variant:"contained",color:"success",theme:e}),"&.MuiPaginationItem-containedInfo":yt({variant:"contained",color:"info",theme:e}),"&.MuiPaginationItem-containedWarning":yt({variant:"contained",color:"warning",theme:e})}},combined:{border:"1px solid",borderColor:e.palette.divider,"&.MuiPaginationItem-ellipsis":{border:"none"},"&.Mui-selected":{"&.MuiPaginationItem-combinedPrimary":yt({variant:"combined",color:"primary",theme:e}),"&.MuiPaginationItem-combinedSecondary":yt({variant:"combined",color:"secondary",theme:e}),"&.MuiPaginationItem-combinedError":yt({variant:"combined",color:"error",theme:e}),"&.MuiPaginationItem-combinedSuccess":yt({variant:"combined",color:"success",theme:e}),"&.MuiPaginationItem-combinedInfo":yt({variant:"combined",color:"info",theme:e}),"&.MuiPaginationItem-combinedWarning":yt({variant:"combined",color:"warning",theme:e})}},outlined:{borderColor:e.palette.divider,"&.Mui-selected":{backgroundColor:"transparent","&.MuiPaginationItem-outlinedPrimary":yt({variant:"outlined",color:"primary",theme:e}),"&.MuiPaginationItem-outlinedSecondary":yt({variant:"outlined",color:"secondary",theme:e}),"&.MuiPaginationItem-outlinedError":yt({variant:"outlined",color:"error",theme:e}),"&.MuiPaginationItem-outlinedSuccess":yt({variant:"outlined",color:"success",theme:e}),"&.MuiPaginationItem-outlinedInfo":yt({variant:"outlined",color:"info",theme:e}),"&.MuiPaginationItem-outlinedWarning":yt({variant:"outlined",color:"warning",theme:e})}}}}}}function ZG(e){return{MuiPopover:{styleOverrides:{paper:{boxShadow:e.customShadows.z1}}}}}function zs({color:e,theme:t}){const n=an(t,e),{lighter:r,main:o,dark:s}=n;return{"& .dot":{backgroundColor:o},"&:hover":{backgroundColor:r},"&.Mui-focusVisible":{outline:`2px solid ${s}`,outlineOffset:-4}}}function _G(e){switch(e){case"small":return{size:16,dotSize:8,position:3};case"large":return{size:24,dotSize:12,position:5};case"medium":default:return{size:20,dotSize:10,position:4}}}function Qp(e){const t=_G(e);return{"& .icon":{width:t.size,height:t.size,"& .dot":{width:t.dotSize,height:t.dotSize,top:t.position,left:t.position}}}}function qG(e){const{palette:t}=e;return{MuiRadio:{defaultProps:{className:"size-small",icon:f.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%"}}),checkedIcon:f.jsx(b.Box,{className:"icon",sx:{width:16,height:16,border:"1px solid",borderColor:"inherit",borderRadius:"50%",position:"relative"},children:f.jsx(b.Box,{className:"dot",sx:{width:8,height:8,backgroundColor:"inherit",borderRadius:"50%",position:"absolute",top:3,left:3}})})},styleOverrides:{root:{color:t.secondary[300],"&.size-small":{...Qp("small")},"&.size-medium":{...Qp("medium")},"&.size-large":{...Qp("large")}},colorPrimary:zs({color:"primary",theme:e}),colorSecondary:zs({color:"secondary",theme:e}),colorSuccess:zs({color:"success",theme:e}),colorWarning:zs({color:"warning",theme:e}),colorInfo:zs({color:"info",theme:e}),colorError:zs({color:"error",theme:e})}}}}function Ws({color:e,theme:t}){const n=an(t,e),{main:r}=n;return{border:`2px solid ${r}`}}function $G(e){return{MuiSlider:{styleOverrides:{track:{height:"1px"},thumb:{width:14,height:14,border:`2px solid ${e.palette.primary.main}`,backgroundColor:e.palette.background.paper,"&.MuiSlider-thumbColorPrimary":Ws({color:"primary",theme:e}),"&.MuiSlider-thumbColorSecondary":Ws({color:"secondary",theme:e}),"&.MuiSlider-thumbColorSuccess":Ws({color:"success",theme:e}),"&.MuiSlider-thumbColorWarning":Ws({color:"warning",theme:e}),"&.MuiSlider-thumbColorInfo":Ws({color:"info",theme:e}),"&.MuiSlider-thumbColorError":Ws({color:"error",theme:e})},mark:{width:4,height:4,borderRadius:"50%",border:`1px solid ${e.palette.secondary.light}`,backgroundColor:e.palette.background.paper,"&.MuiSlider-markActive":{opacity:1,borderColor:"inherit",borderWidth:2}},rail:{color:e.palette.secondary.light},root:{"&.Mui-disabled":{".MuiSlider-rail":{opacity:.25},".MuiSlider-track":{color:e.palette.secondary.lighter},".MuiSlider-thumb":{border:`2px solid ${e.palette.secondary.lighter}`}}},valueLabel:{backgroundColor:e.palette.grey[600],color:e.palette.grey[0]}}}}}function eK(e){switch(e){case"small":return{width:28,height:16,base:12,thumb:10,trackRadius:8};case"large":return{width:60,height:28,base:32,thumb:22,trackRadius:24};case"medium":default:return{width:44,height:22,base:22,thumb:16,trackRadius:16}}}function xp(e,t){const n=eK(t);return{width:n.width,height:n.height,"& .MuiSwitch-switchBase":{padding:3,"&.Mui-checked":{transform:`translateX(${n.base}px)`}},"& .MuiSwitch-thumb":{width:n.thumb,height:n.thumb},"& .MuiSwitch-track":{borderRadius:n.trackRadius}}}function tK(e){return{MuiSwitch:{styleOverrides:{track:{opacity:1,backgroundColor:e.palette.secondary[400],boxSizing:"border-box"},thumb:{borderRadius:"50%",transition:e.transitions.create(["width"],{duration:200})},switchBase:{"&.Mui-checked":{color:"#fff","& + .MuiSwitch-track":{opacity:1},"&.Mui-disabled":{color:e.palette.background.paper}},"&.Mui-disabled":{color:e.palette.background.paper,"+.MuiSwitch-track":{opacity:.3}}},root:{color:e.palette.text.primary,padding:0,margin:8,display:"flex","& ~ .MuiFormControlLabel-label":{margin:6},...xp(e,"medium")},sizeLarge:{...xp(e,"large")},sizeSmall:{...xp(e,"small")}}}}}function nK(e){return{MuiTab:{styleOverrides:{root:{minHeight:46,color:e.palette.text.primary,borderRadius:4,"&:hover":{backgroundColor:e.palette.primary.lighter+60,color:e.palette.primary.main},"&:focus-visible":{borderRadius:4,outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:-3}}}}}}function rK(e){const t={"&:hover":{backgroundColor:e.palette.secondary.lighter}};return{MuiTableBody:{styleOverrides:{root:{"&.striped .MuiTableRow-root":{"&:nth-of-type(even)":{backgroundColor:e.palette.grey[50]},...t},"& .MuiTableRow-root":{...t}}}}}}function oK(e){const t={"&:not(:last-of-type)":{position:"relative","&:after":{position:"absolute",content:'""',backgroundColor:e.palette.divider,width:1,height:"calc(100% - 30px)",right:0,top:16}}};return{MuiTableCell:{styleOverrides:{root:{fontSize:"0.875rem",padding:12,borderColor:e.palette.divider},sizeSmall:{padding:8},head:{fontSize:"0.75rem",fontWeight:700,textTransform:"uppercase",...t},footer:{fontSize:"0.75rem",textTransform:"uppercase",...t}}}}}function iK(e){return{MuiTableFooter:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`2px solid ${e.palette.divider}`,borderBottom:`1px solid ${e.palette.divider}`}}}}}function sK(e){return{MuiTableHead:{styleOverrides:{root:{backgroundColor:e.palette.grey[50],borderTop:`1px solid ${e.palette.divider}`,borderBottom:`2px solid ${e.palette.divider}`}}}}}function aK(){return{MuiTablePagination:{styleOverrides:{selectLabel:{fontSize:"0.875rem"},displayedRows:{fontSize:"0.875rem"}}}}}function lK(){return{MuiTableRow:{styleOverrides:{root:{"&:last-of-type":{"& .MuiTableCell-root":{borderBottom:"none"}},"& .MuiTableCell-root":{"&:last-of-type":{paddingRight:24},"&:first-of-type":{paddingLeft:24}}}}}}}function cK(){return{MuiTabs:{styleOverrides:{vertical:{overflow:"visible"}}}}}function uK(e){return{MuiToggleButton:{styleOverrides:{root:{"&.Mui-disabled":{borderColor:e.palette.divider,color:e.palette.text.disabled},"&:focus-visible":{outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:2}}}}}}function AK(e){return{MuiTooltip:{styleOverrides:{tooltip:{color:e.palette.background.paper}}}}}function dK(){return{MuiTreeItem:{styleOverrides:{content:{padding:8},iconContainer:{"& svg":{fontSize:"0.625rem"}}}}}}function fK(){return{MuiTypography:{styleOverrides:{gutterBottom:{marginBottom:12}}}}}function gK(e){return ct.merge(IG(e),vG(e),BG(e),yG(e),bG(),QG(e),xG(e),wG(e),TG(),SG(),PG(),jG(e),MG(e),DG(e),kG(e),RG(),FG(e),LG(e),NG(),VG(e),HG(),zG(),WG(e),UG(e),YG(),GG(),KG(e),JG(),XG(e),ZG(e),qG(e),$G(e),tK(e),nK(e),rK(e),oK(e),iK(e),sK(e),aK(),lK(),cK(),uK(e),AK(e),dK(),fK())}const Gu=({themeOverrides:e,children:t})=>{const n=bn(),{themeDirection:r,mode:o,presetColor:s,fontFamily:a}=n,c=x.useMemo(()=>EG(o,s),[o,s]),u=x.useMemo(()=>mG(a),[a]),A=x.useMemo(()=>KY(c),[c]),p=x.useMemo(()=>ne.merge({breakpoints:{values:{xs:0,sm:768,md:1024,lg:1266,xl:1440}},direction:r,mixins:{toolbar:{minHeight:60,paddingTop:8,paddingBottom:8}},palette:c.palette,customShadows:A,typography:u,shadows:c.shadows.map(()=>"none"),components:{MuiIconButton:{styleOverrides:{sizeExtraSmall:{width:c.spacing(2.6875),height:c.spacing(2.6875),fontSize:"0.625rem"}}}}},typeof e=="function"?e(c):e),[r,c,u,A,e]),h=wd(p),C=ne.cloneDeep(h.components??{});return h.components=ne.merge(gK(h),C),f.jsx(b.StyledEngineProvider,{injectFirst:!0,children:f.jsxs(OE,{theme:h,children:[f.jsx(b.CssBaseline,{enableColorScheme:!0}),t]})})};Gu.propTypes={children:g.node,themeOverrides:g.oneOfType([g.object,g.func])};function pK({children:e,theme:t,...n}){return f.jsx(k.CoreAdminContext,{...n,children:f.jsx(Gu,{themeOverrides:t,children:f.jsx(pp,{children:e})})})}function Tx(e){const{authProvider:t,catchAll:n,children:r,dashboard:o,dataProvider:s,disableTelemetry:a,history:c,i18nProvider:u,layout:A,loading:p,loginPage:h,authCallbackPage:C,menu:E,notification:m,queryClient:v,requireAuth:B,store:w=k.localStorageStore(),ready:M,theme:Q,title:P="React Admin"}=e;return f.jsx(pK,{authProvider:t,dataProvider:s,i18nProvider:u,store:w,history:c,queryClient:v,theme:Q,children:f.jsx(k.AdminUI,{layout:A,dashboard:o,disableTelemetry:a,menu:E,catchAll:n,title:P,loading:p,loginPage:h,authCallbackPage:C,notification:m,requireAuth:B,ready:M,children:r})})}class hK{constructor(t){yo(this,cl,void 0);yo(this,ul,void 0);yo(this,Us,new Set);const{apiUrl:n}=t??{};if(!ne.isString(n)||ne.isEmpty(n))throw new Error("[ErrorMessageHandler] constructor: please provide a valid apiUrl");ni(this,ul,n),ni(this,cl,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handle(t){var c;const{message:n,filename:r,lineno:o,colno:s}=t,a=`${n}${r}${o}${s}`;Dn(this,Us).has(a)||(Dn(this,Us).add(a),fetch(`${Dn(this,ul)}/ui/error-log`,{method:"PUT",headers:Dn(this,cl),body:JSON.stringify({filename:t.filename,message:t.message,line:t.lineno,column:t.colno,stack:(c=t.error)==null?void 0:c.stack})}).catch(u=>{console.warn("Unable to send error to server",u),Dn(this,Us).delete(a)}))}}cl=new WeakMap,ul=new WeakMap,Us=new WeakMap;class Sx{constructor({catch:t,display:n,log:r,error:o}){jl(this,"catch");jl(this,"display");jl(this,"log");jl(this,"error");this.catch=t,this.display=n,this.log=r,this.error=o}isCatched(){return this.catch}logError(){return this.log}displayError(){return this.display}}const CK=({enabled:e=!0,apiUrl:t,loading:n,catcherFn:r=s=>new Sx({catch:s!=null,display:!1,log:s!=null,error:s}),...o})=>{const s=F.useMemo(()=>o.errorHandler?o.errorHandler:new hK({apiUrl:t}),[t,o.errorHandler]),a=console.error,c=F.useCallback(function(u,...A){var h;if(!u)return!1;const p=r(u instanceof ErrorEvent?u:(h=u==null?void 0:u.toString())==null?void 0:h.replace(/%s/g,()=>A.shift()));if(p.isCatched())return!1;p.logError()&&(u instanceof ErrorEvent?s.handle(u):s.handle(new ErrorEvent("window.onerror",{error:u,message:u.toString()}))),p.displayError()&&a.apply(console,arguments)},[t,n,r,e,s]);return F.useEffect(()=>(window.removeEventListener("error",c),window.addEventListener("error",c),console.error=c,()=>{window.removeEventListener("error",c),console.error=a}),[c]),!0};class EK{constructor(t){yo(this,Al,void 0);yo(this,dl,void 0);yo(this,ji,[]);const{apiUrl:n}=t??{};if(!ne.isString(n)||ne.isEmpty(n))throw new Error("[MissingMessageHandler] constructor: please provide a valid apiUrl");ni(this,dl,n),ni(this,Al,new Headers({Accept:"application/json","Content-Type":"application/json"}))}handleMessage(t){if(!ne.isPlainObject(t))throw new Error("[MissingMessageHandler] handleMessage: please provide valid message data");const{code:n,lang:r}=t;if(!ne.isString(n)||ne.isEmpty(n))throw new Error("[MissingMessageHandler] handleMessage: please provide valid code");if(!ne.isString(r)||ne.isEmpty(r))throw new Error("[MissingMessageHandler] handleMessage: please provide valid lang");if(!ne.some(Dn(this,ji),o=>ne.isEqual(o,{code:n,lang:r}))){Dn(this,ji).push({code:n,lang:r}),fetch(`${Dn(this,dl)}/i18n/message`,{method:"put",headers:Dn(this,Al),body:JSON.stringify({code:n,lang:r,text:n})}).then(o=>o.json()).then(()=>{console.log(`[MissingMessageHandler] handleMessage: created message for lang ${r} and code ${n}`)}).catch(o=>{console.error(o),ni(this,ji,ne.reject(Dn(this,ji),s=>ne.isEqual(s,{code:n,lang:r})))});return}}}Al=new WeakMap,dl=new WeakMap,ji=new WeakMap;function Px(e){const{apiUrl:t,defaultLocale:n,allowMissing:r=!1,createMissing:o=!1}=e,s=[{locale:n,name:n}],a=new Headers({Accept:"application/json","Content-Type":"application/json"}),c=new EK({apiUrl:t}),u=()=>fetch(`${t}/i18n/languages`,{headers:a,method:"get"}).then(h=>h.json()).catch(()=>Promise.resolve(s)),A=()=>fetch(`${t}/i18n/messages`,{headers:a,method:"get"}).then(h=>h.json()).then(h=>h.reduce((C,E)=>({...C,[E.lang]:{...C[E.lang]||{},[E.code]:E.text}}),{})),p=(h,C,E)=>(r||console.error(`Warning: Missing translation for key: "${h}"`),o&&(ne.isString(h)?h.match(new RegExp(/[\s[\]]/,"gm"))?console.error(`[createI18nProvider] onMissingKey: illegal character in key ${h}`):c.handleMessage({code:h,lang:E}):console.error("[createI18nProvider] onMissingKey: provided key is not a string")),h);return Promise.all([u(),A()]).then(h=>{const[C,E]=h;function m(v){return ne.get(E,v,{})}return oT(m,n,C,{allowMissing:r||o,onMissingKey:p})})}window.React=x;const mK=({apiUrl:e,endpoint:t="/languages/load",mapper:n=({data:r})=>({data:r})})=>{const[r,o]=x.useState({loading:!0,languages:null});return x.useEffect(()=>{let s=new Headers;s.append("Accept","application/json"),s.append("Content-Type","application/json"),fetch(`${e}${t}`,{headers:s}).then(a=>a.json()).then(a=>o({loading:!1,...n(a)}))},[e,t,n]),r};function Ox(e){const[t,n]=x.useState(),r=Em(e);return x.useEffect(()=>{Px(r).then(o=>{n(o)}).catch(()=>{n({error:!0})})},[r]),t}const IK=new Gi.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1}}});function vK({theme:e,themeConfig:t,apiUrl:n,defaultLocale:r="en",development:o=!1,logoMain:s,logoIcon:a,loginPage:c=f.jsx(dx,{version:"0.0.0",name:"Applica",redirectTo:"/",background:f.jsx(kl,{})}),menu:u,name:A,copy:p,version:h="0.0.0",dataProvider:C,authProvider:E,errorHandler:m,error:v,enableNotification:B=!1,enableRegistration:w=!1,enablePasswordRecover:M=!1,enableThemeToggler:Q=!1,queryClient:P=IK,background:S,notificationAPI:D="entities/notification",...R}){CK({apiUrl:n,errorHandler:m,catcherFn:W=>{const re=W==null?void 0:W.toString(),Z=["Invalid prop `file` of type `string` supplied to `FileInputPreview`, expected `object`.","Failed prop type: Invalid prop `checked` of type `string` supplied to `ForwardRef(Switch)`, expected `boolean`.","Failed prop type: Invalid prop `checked` of type `string` supplied to `ForwardRef(SwitchBase)`, expected `boolean`.","Support for defaultProps will be removed from function components in a future major release.","validateDOMNesting(...): <form> cannot appear as a descendant of <form>.","Missing translation for key:","HttpError: "].some(V=>re==null?void 0:re.includes(V));return new Sx({catch:Z,display:!Z,log:!Z,error:re})}});const G=x.useMemo(()=>x.isValidElement(c)?x.cloneElement(c,{name:A,copy:p,logo:s,version:h,background:S,enableRegistration:w,enablePasswordRecover:M}):c,[c,A,h,p,S,s,w,M]),X=x.useMemo(()=>W=>{const re=A?f.jsx(gp,{title:A}):s,ie=A?f.jsx(hp,{title:A}):a;return f.jsx(YQ,{...W,name:A,copy:p,enableThemeToggler:Q,version:h,logoMain:re,logoIcon:ie,notification:D,enableNotification:B,error:v})},[s,a,A,h,v,D,B]),q=Ox({apiUrl:n,defaultLocale:r,allowMissing:o,createMissing:o});return q===void 0?f.jsx(f.Fragment,{}):q.error?f.jsx(gc,{initialConfig:t,children:f.jsx(Gu,{themeOverrides:e,children:f.jsx(px,{})})}):f.jsx(Rd,{children:f.jsx(LE,{menu:u,children:f.jsx(gc,{initialConfig:t,children:f.jsx(Tx,{theme:e,layout:X,notification:ex,queryClient:P,dataProvider:C,authProvider:E,i18nProvider:q,loginPage:G,...R})})})})}Object.defineProperty(j,"ArrayField",{enumerable:!0,get:()=>k.ArrayField}),Object.defineProperty(j,"ArrayInputContext",{enumerable:!0,get:()=>k.ArrayInputContext}),Object.defineProperty(j,"BooleanField",{enumerable:!0,get:()=>k.BooleanField}),Object.defineProperty(j,"BulkDeleteWithConfirmButton",{enumerable:!0,get:()=>k.BulkDeleteWithConfirmButton}),Object.defineProperty(j,"Button",{enumerable:!0,get:()=>k.Button}),Object.defineProperty(j,"ChipField",{enumerable:!0,get:()=>k.ChipField}),Object.defineProperty(j,"Confirm",{enumerable:!0,get:()=>k.Confirm}),Object.defineProperty(j,"CreateButton",{enumerable:!0,get:()=>k.CreateButton}),Object.defineProperty(j,"CreateContextProvider",{enumerable:!0,get:()=>k.CreateContextProvider}),Object.defineProperty(j,"CustomRoutes",{enumerable:!0,get:()=>k.CustomRoutes}),Object.defineProperty(j,"DeleteWithConfirmButton",{enumerable:!0,get:()=>k.DeleteWithConfirmButton}),Object.defineProperty(j,"DeleteWithUndoButton",{enumerable:!0,get:()=>k.DeleteWithUndoButton}),Object.defineProperty(j,"EditButton",{enumerable:!0,get:()=>k.EditButton}),Object.defineProperty(j,"EditContextProvider",{enumerable:!0,get:()=>k.EditContextProvider}),Object.defineProperty(j,"FieldTitle",{enumerable:!0,get:()=>k.FieldTitle}),Object.defineProperty(j,"FilterButton",{enumerable:!0,get:()=>k.FilterButton}),Object.defineProperty(j,"Form",{enumerable:!0,get:()=>k.Form}),Object.defineProperty(j,"FormDataConsumer",{enumerable:!0,get:()=>k.FormDataConsumer}),Object.defineProperty(j,"HttpError",{enumerable:!0,get:()=>k.HttpError}),Object.defineProperty(j,"I18nContextProvider",{enumerable:!0,get:()=>k.I18nContextProvider}),Object.defineProperty(j,"ListBase",{enumerable:!0,get:()=>k.ListBase}),Object.defineProperty(j,"ListToolbar",{enumerable:!0,get:()=>k.ListToolbar}),Object.defineProperty(j,"LoadingIndicator",{enumerable:!0,get:()=>k.LoadingIndicator}),Object.defineProperty(j,"Pagination",{enumerable:!0,get:()=>k.Pagination}),Object.defineProperty(j,"RaSimpleFormIterator",{enumerable:!0,get:()=>k.SimpleFormIterator}),Object.defineProperty(j,"RecordContextProvider",{enumerable:!0,get:()=>k.RecordContextProvider}),Object.defineProperty(j,"ReferenceArrayField",{enumerable:!0,get:()=>k.ReferenceArrayField}),Object.defineProperty(j,"ReferenceField",{enumerable:!0,get:()=>k.ReferenceField}),Object.defineProperty(j,"Resource",{enumerable:!0,get:()=>k.Resource}),Object.defineProperty(j,"ResourceContextProvider",{enumerable:!0,get:()=>k.ResourceContextProvider}),Object.defineProperty(j,"SaveButton",{enumerable:!0,get:()=>k.SaveButton}),Object.defineProperty(j,"SimpleFormIteratorContext",{enumerable:!0,get:()=>k.SimpleFormIteratorContext}),Object.defineProperty(j,"SimpleShowLayout",{enumerable:!0,get:()=>k.SimpleShowLayout}),Object.defineProperty(j,"SingleFieldList",{enumerable:!0,get:()=>k.SingleFieldList}),Object.defineProperty(j,"TabbedFormTabs",{enumerable:!0,get:()=>k.TabbedFormTabs}),Object.defineProperty(j,"TopToolbar",{enumerable:!0,get:()=>k.TopToolbar}),Object.defineProperty(j,"UrlField",{enumerable:!0,get:()=>k.UrlField}),Object.defineProperty(j,"choices",{enumerable:!0,get:()=>k.choices}),Object.defineProperty(j,"email",{enumerable:!0,get:()=>k.email}),Object.defineProperty(j,"maxLength",{enumerable:!0,get:()=>k.maxLength}),Object.defineProperty(j,"maxValue",{enumerable:!0,get:()=>k.maxValue}),Object.defineProperty(j,"minLength",{enumerable:!0,get:()=>k.minLength}),Object.defineProperty(j,"minValue",{enumerable:!0,get:()=>k.minValue}),Object.defineProperty(j,"number",{enumerable:!0,get:()=>k.number}),Object.defineProperty(j,"regex",{enumerable:!0,get:()=>k.regex}),Object.defineProperty(j,"required",{enumerable:!0,get:()=>k.required}),Object.defineProperty(j,"useArrayInput",{enumerable:!0,get:()=>k.useArrayInput}),Object.defineProperty(j,"useAuthProvider",{enumerable:!0,get:()=>k.useAuthProvider}),Object.defineProperty(j,"useChoices",{enumerable:!0,get:()=>k.useChoices}),Object.defineProperty(j,"useChoicesContext",{enumerable:!0,get:()=>k.useChoicesContext}),Object.defineProperty(j,"useCreate",{enumerable:!0,get:()=>k.useCreate}),Object.defineProperty(j,"useCreateContext",{enumerable:!0,get:()=>k.useCreateContext}),Object.defineProperty(j,"useCreateController",{enumerable:!0,get:()=>k.useCreateController}),Object.defineProperty(j,"useDataProvider",{enumerable:!0,get:()=>k.useDataProvider}),Object.defineProperty(j,"useEditContext",{enumerable:!0,get:()=>k.useEditContext}),Object.defineProperty(j,"useEditController",{enumerable:!0,get:()=>k.useEditController}),Object.defineProperty(j,"useGetIdentity",{enumerable:!0,get:()=>k.useGetIdentity}),Object.defineProperty(j,"useGetList",{enumerable:!0,get:()=>k.useGetList}),Object.defineProperty(j,"useGetMany",{enumerable:!0,get:()=>k.useGetMany}),Object.defineProperty(j,"useGetManyReference",{enumerable:!0,get:()=>k.useGetManyReference}),Object.defineProperty(j,"useGetOne",{enumerable:!0,get:()=>k.useGetOne}),Object.defineProperty(j,"useInput",{enumerable:!0,get:()=>k.useInput}),Object.defineProperty(j,"useListContext",{enumerable:!0,get:()=>k.useListContext}),Object.defineProperty(j,"useListController",{enumerable:!0,get:()=>k.useListController}),Object.defineProperty(j,"useLocaleState",{enumerable:!0,get:()=>k.useLocaleState}),Object.defineProperty(j,"useLocales",{enumerable:!0,get:()=>k.useLocales}),Object.defineProperty(j,"useNotify",{enumerable:!0,get:()=>k.useNotify}),Object.defineProperty(j,"usePermissions",{enumerable:!0,get:()=>k.usePermissions}),Object.defineProperty(j,"useRecordContext",{enumerable:!0,get:()=>k.useRecordContext}),Object.defineProperty(j,"useRefresh",{enumerable:!0,get:()=>k.useRefresh}),Object.defineProperty(j,"useResourceContext",{enumerable:!0,get:()=>k.useResourceContext}),Object.defineProperty(j,"useResourceDefinition",{enumerable:!0,get:()=>k.useResourceDefinition}),Object.defineProperty(j,"useResourceDefinitions",{enumerable:!0,get:()=>k.useResourceDefinitions}),Object.defineProperty(j,"useShowContext",{enumerable:!0,get:()=>k.useShowContext}),Object.defineProperty(j,"useShowController",{enumerable:!0,get:()=>k.useShowController}),Object.defineProperty(j,"useSimpleFormIterator",{enumerable:!0,get:()=>k.useSimpleFormIterator}),Object.defineProperty(j,"useSimpleFormIteratorItem",{enumerable:!0,get:()=>k.useSimpleFormIteratorItem}),Object.defineProperty(j,"useTranslate",{enumerable:!0,get:()=>k.useTranslate}),Object.defineProperty(j,"useTranslateLabel",{enumerable:!0,get:()=>k.useTranslateLabel}),Object.defineProperty(j,"useUnselect",{enumerable:!0,get:()=>k.useUnselect}),Object.defineProperty(j,"useUnselectAll",{enumerable:!0,get:()=>k.useUnselectAll}),Object.defineProperty(j,"useUpdate",{enumerable:!0,get:()=>k.useUpdate}),Object.defineProperty(j,"useUpdateMany",{enumerable:!0,get:()=>k.useUpdateMany}),Object.defineProperty(j,"withLifecycleCallbacks",{enumerable:!0,get:()=>k.withLifecycleCallbacks}),j.ActionsField=NF,j.ActionsMenu=si,j.ActivatePage=Ax,j.Admin=Tx,j.AnimateButton=J0,j.AppBarStyled=mm,j.AppConfigContext=kd,j.AppConfigProvider=Rd,j.ApplicaAdmin=vK,j.ArrayInput=LF,j.AttachmentField=oB,j.AttachmentInput=c6,j.AuthBackground=kl,j.AuthWrapper=Ls,j.AutocompleteArrayInput=A6,j.AutocompleteInput=f6,j.Avatar=Na,j.BooleanInput=p6,j.Breadcrumbs=hv,j.BulkActionsToolbar=ix,j.BulkActionsToolbarClasses=Ar,j.BulkFloatingActionsToolbar=vY,j.CardForm=eB,j.ChangePasswordForm=Bg,j.CircularWithLabel=Xv,j.CircularWithPath=Zv,j.CoverField=sB,j.Create=Y6,j.CreateInDialogButton=CY,j.Datagrid=wY,j.DateAgoField=lB,j.DateField=JF,j.DateInput=C6,j.DateTimeInput=m6,j.Dot=Jc,j.Drawer=LQ,j.DrawerHeader=Ib,j.DrawerHeaderStyled=mb,j.DrawerToggle=cy,j.Edit=K6,j.EditInDialogButton=mY,j.EmailField=ZF,j.Empty=SY,j.EmptyClasses=wi,j.FileField=cB,j.FileInput=v6,j.Footer=Dg,j.FormHeader=Z6,j.FunctionField=qF,j.GenericErrorPage=px,j.Header=uy,j.HeaderButton=Im,j.HeaderIconButton=jF,j.HeaderNotification=Ay,j.HeaderProfile=dy,j.HeaderSpacer=gy,j.HeaderToggleButton=xs,j.HorizontalBar=NQ,j.IconButton=vs,j.ImageField=iB,j.ImageInput=B6,j.ImpersonateUserButton=uY,j.LabeledArrayInput=nB,j.LabeledInput=pn,j.Layout=YQ,j.LayoutContent=Ab,j.LayoutProvider=sy,j.LayoutWrapper=db,j.LinearWithIcon=_v,j.LinearWithLabel=qv,j.List=VY,j.ListItem=GY,j.Loadable=JU,j.Loader=$Q,j.LoadingButton=vg,j.LocalStorage=dm,j.LocaleButton=$v,j.LocalizedTextField=e6,j.LocalizedTextInput=Q6,j.LoginPage=dx,j.Logo=tp,j.LongForm=Dt,j.MainCard=ir,j.MainIcon=gp,j.MenuConfigContext=Ld,j.MenuConfigProvider=LE,j.MenuPopover=Md,j.NavGroup=zQ,j.NavMenu=VQ,j.Navigation=WQ,j.Notification=ex,j.NotificationList=UY,j.NumberInput=w6,j.OnboardingModes=il,j.OnboardingProvider=oY,j.OnboardingTip=cY,j.RawTableFormIterator=oy,j.ReadonlyField=o6,j.RecordInput=T6,j.RecoverPage=fx,j.ReferenceArrayInput=S6,j.ReferenceInput=P6,j.ReferenceManyField=AB,j.ReferenceManyInput=O6,j.RegisterPage=gx,j.ResponsiveSection=fy,j.ScrollTop=pp,j.ScrollX=ZU,j.SearchInput=M6,j.SelectArrayInput=k6,j.SelectInput=F6,j.Show=d8,j.SimpleBar=Ap,j.SimpleForm=tB,j.SimpleFormIterator=g8,j.SimpleList=YY,j.SizeField=s6,j.SmallIcon=hp,j.SmartTextInput=L6,j.TabbedForm=Tg,j.TableFormIterator=U2,j.TableFormIteratorContext=Nd,j.TableFormIteratorItem=HB,j.TableFormIteratorItemContext=Vd,j.TextField=uB,j.TextInput=br,j.ThemeConfigContext=Fd,j.ThemeConfigProvider=gc,j.ThemeProvider=Gu,j.ThemeToggler=UQ,j.TimeInput=z6,j.Toolbar=yi,j.Tooltip=ou,j.Transitions=Ro,j.createI18nProvider=Px,j.getLocalizedValue=of,j.localizedValueHasAllLocales=rf,j.parseTime=hm,j.useAppConfig=ai,j.useBreadcrumbs=WE,j.useGetLocalizedValue=ij,j.useI18nLanguages=mK,j.useI18nProvider=Ox,j.useLayoutContext=Mg,j.useLayoutDispatch=K2,j.useLayoutDrawerState=bi,j.useLayoutLogoState=ly,j.useLayoutMediaState=Vn,j.useLayoutNotificationsState=pu,j.useLayoutState=Ps,j.useLayoutThemeState=J2,j.useLocalStorage=tf,j.useLocalizedValue=oj,j.useMemoizedObject=Em,j.useMenu=zd,j.useMenuConfig=li,j.usePopoverState=ya,j.useRefDimensions=sj,j.useResourceDefaultValues=U6,j.useResourceTitle=nf,j.useRestartOnboarding=aY,j.useSx=Br,j.useTableFormIterator=fm,j.useTableFormIteratorItem=nj,j.useThemeConfig=bn,j.uuid=rj,j.withLayoutProvider=ay,Object.defineProperty(j,Symbol.toStringTag,{value:"Module"})});
|
|
276
276
|
//# sourceMappingURL=react-admin.umd.js.map
|