@applica-software-guru/react-admin 1.1.99 → 1.1.100

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.
@@ -199,7 +199,7 @@ function print() { __p += __j.call(arguments, '') }
199
199
  animation: ${0} 1.4s linear infinite;
200
200
  `),$4)),rO=ue("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),oO=ue("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Te(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>U({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&&Ut.css(Am||(Am=vl`
201
201
  animation: ${0} 1.4s ease-in-out infinite;
202
- `),eO)),dm=V.forwardRef(function(t,n){const r=Gt({props:t,name:"MuiCircularProgress"}),{className:i,color:a="primary",disableShrink:l=!1,size:u=40,style:A,thickness:f=3.6,value:p=0,variant:C="indeterminate"}=r,h=Ke(r,q4),m=U({},r,{color:a,disableShrink:l,size:u,thickness:f,value:p,variant:C}),I=tO(m),B={},v={},O={};if(C==="determinate"){const R=2*Math.PI*((oo-f)/2);B.strokeDasharray=R.toFixed(3),O["aria-valuenow"]=Math.round(p),B.strokeDashoffset=`${((100-p)/100*R).toFixed(3)}px`,v.transform="rotate(-90deg)"}return g.jsx(nO,U({className:Xe(I.root,i),style:U({width:u,height:u},v,A),ownerState:m,ref:n,role:"progressbar"},O,h,{children:g.jsx(rO,{className:I.svg,ownerState:m,viewBox:`${oo/2} ${oo/2} ${oo} ${oo}`,children:g.jsx(oO,{className:I.circle,style:B,ownerState:m,cx:oo,cy:oo,r:(oo-f)/2,fill:"none",strokeWidth:f})})}))});process.env.NODE_ENV!=="production"&&(dm.propTypes={classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","primary","secondary","error","info","success","warning"]),c.string]),disableShrink:vr(c.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:c.oneOfType([c.number,c.string]),style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),thickness:c.number,value:c.number,variant:c.oneOf(["determinate","indeterminate"])});const fm=dm;function iO(e){return Vt("MuiLoadingButton",e)}const Or=Yt("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),sO=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],aO=e=>{const{loading:t,loadingPosition:n,classes:r}=e,i={root:["root",t&&"loading"],startIcon:[t&&`startIconLoading${Te(n)}`],endIcon:[t&&`endIconLoading${Te(n)}`],loadingIndicator:["loadingIndicator",t&&`loadingIndicator${Te(n)}`]},a=ur.unstable_composeClasses(i,iO,r);return U({},r,a)},lO=e=>e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"&&e!=="classes",cO=ue(X4,{shouldForwardProp:e=>lO(e)||e==="classes",name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{[`& .${Or.startIconLoadingStart}`]:t.startIconLoadingStart},t.endIconLoadingEnd&&{[`& .${Or.endIconLoadingEnd}`]:t.endIconLoadingEnd}]})(({ownerState:e,theme:t})=>U({[`& .${Or.startIconLoadingStart}, & .${Or.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}),[`&.${Or.loading}`]:{color:"transparent"}},e.loadingPosition==="start"&&e.fullWidth&&{[`& .${Or.startIconLoadingStart}, & .${Or.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginRight:-8}},e.loadingPosition==="end"&&e.fullWidth&&{[`& .${Or.startIconLoadingStart}, & .${Or.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginLeft:-8}})),uO=ue("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.loadingIndicator,t[`loadingIndicator${Te(n.loadingPosition)}`]]}})(({theme:e,ownerState:t})=>U({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})),gm=V.forwardRef(function(t,n){const r=Gt({props:t,name:"MuiLoadingButton"}),{children:i,disabled:a=!1,id:l,loading:u=!1,loadingIndicator:A,loadingPosition:f="center",variant:p="text"}=r,C=Ke(r,sO),h=Bu(l),m=A??g.jsx(fm,{"aria-labelledby":h,color:"inherit",size:16}),I=U({},r,{disabled:a,loading:u,loadingIndicator:m,loadingPosition:f,variant:p}),B=aO(I),v=u?g.jsx(uO,{className:B.loadingIndicator,ownerState:I,children:m}):null;return g.jsxs(cO,U({disabled:a||u,id:h,ref:n},C,{variant:p,classes:B,ownerState:I,children:[I.loadingPosition==="end"?i:v,I.loadingPosition==="end"?v:i]}))});process.env.NODE_ENV!=="production"&&(gm.propTypes={children:c.node,classes:c.object,disabled:c.bool,id:c.string,loading:c.bool,loadingIndicator:c.node,loadingPosition:vr(c.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:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["contained","outlined","text"]),c.string])});const AO=gm;function JA({variant:e,theme:t,color:n,loadingPosition:r}){const i=$t(t,n),{lighter:a,main:l,dark:u,contrastText:A}=i,f=`${n}Button`,p=bi(t,f),C={"& .MuiLoadingButton-loadingIndicator":{color:l}},h={...r&&r!=="center"&&{color:l}},m={"&::after":{boxShadow:`0 0 6px 6px ${Ne(l,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${Ne(l,.9)}`},"&:focus-visible":{outline:`2px solid ${u}`,outlineOffset:2}};switch(e){case"contained":return{backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{backgroundColor:u,color:A},...m};case"light":return{backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{backgroundColor:u,color:A},...m};case"shadow":return{boxShadow:p,backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{boxShadow:"none",backgroundColor:u,color:A},...m};case"outlined":return{backgroundColor:"transparent",borderColor:l,...h,...C};case"dashed":return{backgroundColor:a,borderColor:l,...h,...C,...m};case"text":default:return{color:l,...C,...m}}}const dO=ue(AO,{shouldForwardProp:e=>e!=="shape"&&e!=="variant"})(({theme:e,variant:t,shape:n,color:r,loading:i,loadingPosition:a})=>({"::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"&&{...JA({variant:t,theme:e,color:r,loadingPosition:a}),"&.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")&&!i&&{color:"#fff"},...t!=="text"&&{...JA({variant:t,theme:e,color:r,loadingPosition:a})},"&.Mui-disabled":{...t!=="text"&&{...JA({variant:t,theme:e,color:r,loadingPosition:a})}}})),XA=S.forwardRef(({variant:e="text",shape:t,children:n,color:r="primary",...i},a)=>{const l=xt();return g.jsx(dO,{ref:a,variant:e,shape:t,theme:l,loadingPosition:i.loadingPosition,loading:i.loading,color:r,...i,children:n})});XA.propTypes={variant:c.string,shape:c.string,children:c.node,color:c.string},XA.displayName="LoadingButton";function fO({color:e,theme:t,labelColor:n}){const r=$t(t,e),{main:i,contrastText:a}=r;let l=e||"";return["primary","secondary","info","success","warning","error"].includes(l)?{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:i,color:n||a},[`& .${b.tooltipClasses.arrow}`]:{color:i}}:{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:l,color:n||a,boxShadow:t.shadows[1]},[`& .${b.tooltipClasses.arrow}`]:{color:l}}}const gO=ue(({className:e,...t})=>g.jsx(b.Tooltip,{...t,classes:{popper:e}}),{shouldForwardProp:e=>e!=="color"&&e!=="labelColor"})(({theme:e,color:t,labelColor:n})=>({...t&&fO({color:t,theme:e,labelColor:n})}));function pm({children:e,arrow:t,labelColor:n="",...r}){const i=xt();return g.jsx(b.Box,{display:"flex",children:g.jsx(gO,{arrow:t,...r,theme:i,labelColor:n,children:e})})}pm.propTypes={children:c.element,arrow:c.bool,labelColor:c.string,rest:c.array};const io=S.forwardRef(({children:e,position:t="top-left",type:n="grow",direction:r="up",...i},a)=>{let l={transformOrigin:"0 0 0"};switch(t){case"top-right":l={transformOrigin:"top right"};break;case"top":l={transformOrigin:"top"};break;case"bottom-left":l={transformOrigin:"bottom left"};break;case"bottom-right":l={transformOrigin:"bottom right"};break;case"bottom":l={transformOrigin:"bottom"};break;case"top-left":default:l={transformOrigin:"0 0 0"};break}return g.jsxs(b.Box,{ref:a,children:[n==="grow"&&g.jsx(b.Grow,{...i,timeout:{appear:0,enter:150,exit:150},children:g.jsx(b.Box,{sx:l,children:e})}),n==="collapse"&&g.jsx(b.Collapse,{...i,sx:l,children:e}),n==="fade"&&g.jsx(b.Fade,{...i,timeout:{appear:0,enter:300,exit:150},children:g.jsx(b.Box,{sx:l,children:e})}),n==="slide"&&g.jsx(b.Slide,{...i,timeout:{appear:0,enter:150,exit:150},direction:r,children:g.jsx(b.Box,{sx:l,children:e})}),n==="zoom"&&g.jsx(b.Zoom,{...i,children:g.jsx(b.Box,{sx:l,children:e})})]})});io.propTypes={children:c.node,type:c.oneOf(["grow","fade","collapse","slide","zoom"]),position:c.oneOf(["top-left","top-right","top","bottom-left","bottom-right","bottom"]),direction:c.oneOf(["up","down","left","right"])},S.forwardRef(function(t,n){return g.jsx(b.Zoom,{ref:n,timeout:200,...t})});function hm({value:e,...t}){return g.jsxs(b.Box,{sx:{position:"relative",display:"inline-flex"},children:[g.jsx(b.CircularProgress,{variant:"determinate",value:e,...t}),g.jsx(b.Box,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:g.jsx(b.Typography,{variant:"caption",component:"div",color:"text.secondary",children:`${Math.round(e)}%`})})]})}hm.propTypes={value:c.number};function Cm({value:e,size:t,variant:n,thickness:r,showLabel:i,pathColor:a,sx:l,...u}){return g.jsxs(b.Box,{sx:{position:"relative",display:"inline-flex"},children:[g.jsx(b.CircularProgress,{variant:"determinate",sx:{color:a||"grey.200"},size:t,thickness:r,...u,value:100}),i&&g.jsx(b.Box,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:g.jsx(b.Typography,{variant:"caption",component:"div",color:"text.secondary",children:e?`${Math.round(e)}%`:"0%"})}),g.jsx(b.CircularProgress,{variant:n,sx:{...l,position:"absolute",left:0,[`& .${b.circularProgressClasses.circle}`]:{strokeLinecap:"round"}},size:t,thickness:r,value:e,...u})]})}Cm.propTypes={value:c.number,size:c.number,variant:c.string,thickness:c.number,showLabel:c.bool,pathColor:c.string,sx:c.array,others:c.array};function Em({icon:e,value:t,...n}){return g.jsxs(b.Box,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(b.Box,{sx:{width:"100%",mr:1},children:g.jsx(b.LinearProgress,{variant:"determinate",value:t,...n})}),g.jsx(b.Box,{sx:{minWidth:35},children:e})]})}Em.propTypes={icon:c.node,value:c.number};function mm({value:e,...t}){return g.jsxs(b.Box,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(b.Box,{sx:{width:"100%",mr:1},children:g.jsx(b.LinearProgress,{variant:"determinate",value:e,...t})}),g.jsx(b.Box,{sx:{minWidth:35},children:g.jsx(b.Typography,{variant:"body2",color:"text.secondary",children:`${Math.round(e)}%`})})]})}mm.propTypes={value:c.number};const pO=ai(M.Toolbar,{name:"RaApplicaToolbar",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)}})),Mr=e=>g.jsx(pO,{...e});Mr.defaultProps={...M.Toolbar.defaultProps},Mr.propTypes={...M.Toolbar.propTypes};const ZA=({children:e,content:t,title:n,subheader:r,secondary:i,toolbar:a,...l})=>{const u=M.useTranslate(),A=M.useResourceContext(),{cardTitle:f,cardSubheader:p}=S.useMemo(()=>{const C=n||`resources.${A}.title`;return{cardTitle:u(C,{_:C}),cardSubheader:r!==null?u(r,{_:r}):null}},[A,r,n,u]);return g.jsx(b.Grid,{item:!0,...l,children:g.jsx(Nn,{content:t,title:f,subheader:p,secondary:i,divider:!0,children:g.jsxs(S.Fragment,{children:[e,a===!0?g.jsx(Mr,{children:g.jsx(M.SaveButton,{})}):a]})})})};ZA.defaultProps={...b.Grid.defaultProps,content:!0,subheader:null,title:null,secondary:null,toolbar:!1,item:!0,lg:12,md:12,sm:12,xs:12},ZA.propTypes={...b.Grid.propTypes,children:c.oneOfType([c.node,c.arrayOf(c.node)]),contained:c.bool,content:c.bool,subheader:c.oneOfType([c.string,c.node]),title:c.oneOfType([c.string,c.node]),secondary:c.oneOfType([c.node,c.string,c.object]),spacing:c.number,toolbar:c.oneOfType([c.node,c.bool])};const hO=ue(M.Form,{name:"RaApplicaCardForm",slot:"root"})(({theme:e,spacing:t})=>({backgroundColor:"transparent","& .RaToolbar-desktopToolbar":{marginTop:e.spacing(t*2),padding:0}})),bl=({children:e,spacing:t,defaultValues:n,...r})=>{const{spacing:i}=Fn();return g.jsx(hO,{defaultValues:n,spacing:t||i,children:g.jsx(b.Grid,{container:!0,...r,spacing:t||i,children:e})})};bl.propTypes={...b.Grid.propTypes,...M.Form.propTypes,children:c.oneOfType([c.node,c.arrayOf(c.node)]),spacing:c.number,defaultValues:c.oneOfType([c.object,c.func]),record:c.object,validate:c.func},bl.defaultProps={...b.Stack.defaultProps},bl.Section=ZA;const CO=ai(M.SimpleForm,{name:"RaApplicaSimpleForm",slot:"Root"})(({theme:e,modal:t})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:e.spacing(t?2:1)}})),Ql=({title:e,modal:t,content:n,subheader:r,secondary:i,sx:a,...l})=>{const u=Ah(e),A=M.useRecordContext();return g.jsx(Nn,{content:n,title:u,subheader:r,secondary:A!=null&&A.id?i:null,sx:a,border:!t,divider:!0,children:g.jsx(CO,{toolbar:g.jsx(Mr,{}),...l})})};Ql.defaultProps={modal:!1,content:!1,subheader:null,title:null,toolbar:g.jsx(Mr,{children:g.jsx(M.SaveButton,{type:"button"})}),secondary:g.jsx(fi,{children:g.jsx(M.DeleteWithConfirmButton,{})})},Ql.propTypes={...M.SimpleForm.propTypes,modal:c.bool,content:c.bool,contained:c.bool,subheader:c.oneOfType([c.string,c.node]),title:c.oneOfType([c.string,c.node]),secondary:c.oneOfType([c.node,c.string,c.object])};const xl=({label:e,children:t,display:n,helperText:r,sx:i,addLabel:a,divider:l,...u})=>{const A=Ut.useTheme(),{getCurrentDialog:f}=xo(),{source:p,resource:C,isRequired:h}=u,{getFieldState:m,formState:I}=va.useFormContext(),{error:B}=m(p,I),v=f();return g.jsxs(b.Stack,{spacing:1,sx:{"& .MuiFormHelperText-root":{color:B?A.palette.error.main:A.palette.text.secondary,"& span":{display:"none"}},...i},children:[n==="label"&&e!==!1&&a!==!1&&g.jsx(b.InputLabel,{error:!!B,sx:{borderBottom:l?`1px solid ${A.palette.divider}`:"none",pb:l?1:0,mt:l?1:0},children:g.jsx(M.FieldTitle,{label:e,source:p,resource:v||C,isRequired:h})}),S.isValidElement(t)?S.cloneElement(t,{...t.props,...u,label:n==="legend"?e:!1}):t,n==="label"&&r&&g.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:!!B,children:r})]})};xl.propTypes={sx:c.object,children:c.element,label:c.oneOfType([c.string,c.bool]),addLabel:c.bool,resource:c.string,isRequired:c.bool,source:c.string,display:c.oneOf(["legend","label"]),helperText:c.oneOfType([c.string,c.bool]),divider:c.bool},xl.defaultProps={display:"label",divider:!1};const EO=ue(M.ArrayInput,{name:"ApplicaArrayInput",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%"}}})),mO=({label:e,addLabel:t,source:n,helperText:r,divider:i=!0,...a})=>g.jsx(xl,{label:e,addLabel:t,source:n,helperText:r,divider:i,children:g.jsx(EO,{source:n,label:!1,...a})}),qA=({canEdit:e,canDelete:t,canClone:n})=>!e&&!t&&!n?null:g.jsxs(fi,{children:[e&&g.jsx(M.EditButton,{}),t&&g.jsx(M.DeleteWithConfirmButton,{}),n&&g.jsx(M.CloneButton,{})]});qA.defaultProps={canEdit:!0,canDelete:!0,canClone:!1},qA.propTypes={canEdit:c.bool,canDelete:c.bool,canClone:c.bool};const Im=ue("div",{name:"ApplicaBaseAttachmentField",overridesResolver:(e,t)=>t.root})({display:"inline-block"}),IO=ue("ul")({display:"inline-block"}),Bm=e=>{var p;const{className:t,emptyText:n,source:r,title:i,...a}=e,l=be.useRecordContext(e),u=st.get(l,r),A=be.useTranslate();if(!u)return n?g.jsx(b.Typography,{component:"span",variant:"body2",className:t,...a,children:n&&A(n,{_:n})}):g.jsx(Im,{className:t,...a});if(Array.isArray(u))return g.jsx(IO,{className:t,...a,children:u.map((C,h)=>{var I;const m=i instanceof String?(I=st.get(C,i))==null?void 0:I.toString():i;return g.jsx("li",{children:m},h)})});const f=i instanceof String?(p=st.get(l,i))==null?void 0:p.toString():i;return g.jsx(Im,{className:t,...a,children:f})};Bm.propTypes={className:c.string,emptyText:c.string,source:c.string.isRequired,src:c.string,title:c.oneOfType([c.string,c.element]),target:c.string,download:c.oneOfType([c.bool,c.string]),ping:c.string,rel:c.string};var ym={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(kn,function(){var n=1e3,r=6e4,i=36e5,a="millisecond",l="second",u="minute",A="hour",f="day",p="week",C="month",h="quarter",m="year",I="date",B="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,O=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,R={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(q){var K=["th","st","nd","rd"],z=q%100;return"["+q+(K[(z-20)%10]||K[z]||K[0])+"]"}},x=function(q,K,z){var Z=String(q);return!Z||Z.length>=K?q:""+Array(K+1-Z.length).join(z)+q},T={s:x,z:function(q){var K=-q.utcOffset(),z=Math.abs(K),Z=Math.floor(z/60),F=z%60;return(K<=0?"+":"-")+x(Z,2,"0")+":"+x(F,2,"0")},m:function q(K,z){if(K.date()<z.date())return-q(z,K);var Z=12*(z.year()-K.year())+(z.month()-K.month()),F=K.clone().add(Z,C),te=z-F<0,W=K.clone().add(Z+(te?-1:1),C);return+(-(Z+(z-F)/(te?F-W:W-F))||0)},a:function(q){return q<0?Math.ceil(q)||0:Math.floor(q)},p:function(q){return{M:C,y:m,w:p,d:f,D:I,h:A,m:u,s:l,ms:a,Q:h}[q]||String(q||"").toLowerCase().replace(/s$/,"")},u:function(q){return q===void 0}},P="en",L={};L[P]=R;var k="$isDayjsObject",_=function(q){return q instanceof le||!(!q||!q[k])},J=function q(K,z,Z){var F;if(!K)return P;if(typeof K=="string"){var te=K.toLowerCase();L[te]&&(F=te),z&&(L[te]=z,F=te);var W=K.split("-");if(!F&&W.length>1)return q(W[0])}else{var X=K.name;L[X]=K,F=X}return!Z&&F&&(P=F),F||!Z&&P},Y=function(q,K){if(_(q))return q.clone();var z=typeof K=="object"?K:{};return z.date=q,z.args=arguments,new le(z)},ee=T;ee.l=J,ee.i=_,ee.w=function(q,K){return Y(q,{locale:K.$L,utc:K.$u,x:K.$x,$offset:K.$offset})};var le=function(){function q(z){this.$L=J(z.locale,null,!0),this.parse(z),this.$x=this.$x||z.x||{},this[k]=!0}var K=q.prototype;return K.parse=function(z){this.$d=function(Z){var F=Z.date,te=Z.utc;if(F===null)return new Date(NaN);if(ee.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var W=F.match(v);if(W){var X=W[2]-1||0,de=(W[7]||"0").substring(0,3);return te?new Date(Date.UTC(W[1],X,W[3]||1,W[4]||0,W[5]||0,W[6]||0,de)):new Date(W[1],X,W[3]||1,W[4]||0,W[5]||0,W[6]||0,de)}}return new Date(F)}(z),this.init()},K.init=function(){var z=this.$d;this.$y=z.getFullYear(),this.$M=z.getMonth(),this.$D=z.getDate(),this.$W=z.getDay(),this.$H=z.getHours(),this.$m=z.getMinutes(),this.$s=z.getSeconds(),this.$ms=z.getMilliseconds()},K.$utils=function(){return ee},K.isValid=function(){return this.$d.toString()!==B},K.isSame=function(z,Z){var F=Y(z);return this.startOf(Z)<=F&&F<=this.endOf(Z)},K.isAfter=function(z,Z){return Y(z)<this.startOf(Z)},K.isBefore=function(z,Z){return this.endOf(Z)<Y(z)},K.$g=function(z,Z,F){return ee.u(z)?this[Z]:this.set(F,z)},K.unix=function(){return Math.floor(this.valueOf()/1e3)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(z,Z){var F=this,te=!!ee.u(Z)||Z,W=ee.p(z),X=function(he,me){var xe=ee.w(F.$u?Date.UTC(F.$y,me,he):new Date(F.$y,me,he),F);return te?xe:xe.endOf(f)},de=function(he,me){return ee.w(F.toDate()[he].apply(F.toDate("s"),(te?[0,0,0,0]:[23,59,59,999]).slice(me)),F)},ge=this.$W,ce=this.$M,Ae=this.$D,pe="set"+(this.$u?"UTC":"");switch(W){case m:return te?X(1,0):X(31,11);case C:return te?X(1,ce):X(0,ce+1);case p:var Ie=this.$locale().weekStart||0,Ee=(ge<Ie?ge+7:ge)-Ie;return X(te?Ae-Ee:Ae+(6-Ee),ce);case f:case I:return de(pe+"Hours",0);case A:return de(pe+"Minutes",1);case u:return de(pe+"Seconds",2);case l:return de(pe+"Milliseconds",3);default:return this.clone()}},K.endOf=function(z){return this.startOf(z,!1)},K.$set=function(z,Z){var F,te=ee.p(z),W="set"+(this.$u?"UTC":""),X=(F={},F[f]=W+"Date",F[I]=W+"Date",F[C]=W+"Month",F[m]=W+"FullYear",F[A]=W+"Hours",F[u]=W+"Minutes",F[l]=W+"Seconds",F[a]=W+"Milliseconds",F)[te],de=te===f?this.$D+(Z-this.$W):Z;if(te===C||te===m){var ge=this.clone().set(I,1);ge.$d[X](de),ge.init(),this.$d=ge.set(I,Math.min(this.$D,ge.daysInMonth())).$d}else X&&this.$d[X](de);return this.init(),this},K.set=function(z,Z){return this.clone().$set(z,Z)},K.get=function(z){return this[ee.p(z)]()},K.add=function(z,Z){var F,te=this;z=Number(z);var W=ee.p(Z),X=function(ce){var Ae=Y(te);return ee.w(Ae.date(Ae.date()+Math.round(ce*z)),te)};if(W===C)return this.set(C,this.$M+z);if(W===m)return this.set(m,this.$y+z);if(W===f)return X(1);if(W===p)return X(7);var de=(F={},F[u]=r,F[A]=i,F[l]=n,F)[W]||1,ge=this.$d.getTime()+z*de;return ee.w(ge,this)},K.subtract=function(z,Z){return this.add(-1*z,Z)},K.format=function(z){var Z=this,F=this.$locale();if(!this.isValid())return F.invalidDate||B;var te=z||"YYYY-MM-DDTHH:mm:ssZ",W=ee.z(this),X=this.$H,de=this.$m,ge=this.$M,ce=F.weekdays,Ae=F.months,pe=F.meridiem,Ie=function(me,xe,ae,ze){return me&&(me[xe]||me(Z,te))||ae[xe].slice(0,ze)},Ee=function(me){return ee.s(X%12||12,me,"0")},he=pe||function(me,xe,ae){var ze=me<12?"AM":"PM";return ae?ze.toLowerCase():ze};return te.replace(O,function(me,xe){return xe||function(ae){switch(ae){case"YY":return String(Z.$y).slice(-2);case"YYYY":return ee.s(Z.$y,4,"0");case"M":return ge+1;case"MM":return ee.s(ge+1,2,"0");case"MMM":return Ie(F.monthsShort,ge,Ae,3);case"MMMM":return Ie(Ae,ge);case"D":return Z.$D;case"DD":return ee.s(Z.$D,2,"0");case"d":return String(Z.$W);case"dd":return Ie(F.weekdaysMin,Z.$W,ce,2);case"ddd":return Ie(F.weekdaysShort,Z.$W,ce,3);case"dddd":return ce[Z.$W];case"H":return String(X);case"HH":return ee.s(X,2,"0");case"h":return Ee(1);case"hh":return Ee(2);case"a":return he(X,de,!0);case"A":return he(X,de,!1);case"m":return String(de);case"mm":return ee.s(de,2,"0");case"s":return String(Z.$s);case"ss":return ee.s(Z.$s,2,"0");case"SSS":return ee.s(Z.$ms,3,"0");case"Z":return W}return null}(me)||W.replace(":","")})},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(z,Z,F){var te,W=this,X=ee.p(Z),de=Y(z),ge=(de.utcOffset()-this.utcOffset())*r,ce=this-de,Ae=function(){return ee.m(W,de)};switch(X){case m:te=Ae()/12;break;case C:te=Ae();break;case h:te=Ae()/3;break;case p:te=(ce-ge)/6048e5;break;case f:te=(ce-ge)/864e5;break;case A:te=ce/i;break;case u:te=ce/r;break;case l:te=ce/n;break;default:te=ce}return F?te:ee.a(te)},K.daysInMonth=function(){return this.endOf(C).$D},K.$locale=function(){return L[this.$L]},K.locale=function(z,Z){if(!z)return this.$L;var F=this.clone(),te=J(z,Z,!0);return te&&(F.$L=te),F},K.clone=function(){return ee.w(this.$d,this)},K.toDate=function(){return new Date(this.valueOf())},K.toJSON=function(){return this.isValid()?this.toISOString():null},K.toISOString=function(){return this.$d.toISOString()},K.toString=function(){return this.$d.toUTCString()},q}(),se=le.prototype;return Y.prototype=se,[["$ms",a],["$s",l],["$m",u],["$H",A],["$W",f],["$M",C],["$y",m],["$D",I]].forEach(function(q){se[q[1]]=function(K){return this.$g(K,q[0],q[1])}}),Y.extend=function(q,K){return q.$i||(q(K,le,Y),q.$i=!0),Y},Y.locale=J,Y.isDayjs=_,Y.unix=function(q){return Y(1e3*q)},Y.en=L[P],Y.Ls=L,Y.p={},Y})})(ym);var BO=ym.exports;const Dr=ti(BO),$A=({entityId:e,property:t,disabled:n,userResource:r="entities/user",...i})=>{const[a,l]=S.useState(null),u=M.useRecordContext(i),A=M.useDataProvider(),f=M.useResourceContext(),p=S.useCallback(async m=>{m.preventDefault(),m.stopPropagation();const I=st.get(u,i==null?void 0:i.source),B=f.replace("entities/",""),v=await A.getFile(`/attachments/${B}/${e||(u==null?void 0:u.id)}/${t||(i==null?void 0:i.source)}/${(I==null?void 0:I.id)||(u==null?void 0:u.id)}`),O=document.createElement("a");O.href=v,O.download=st.get(u,(i==null?void 0:i.title)||(i==null?void 0:i.source)),O.click()},[A,u,e,f,t,i==null?void 0:i.source,i==null?void 0:i.title]),C=S.useMemo(()=>({...u,[i==null?void 0:i.source]:(u==null?void 0:u.src)||st.get(u,i==null?void 0:i.source),[i==null?void 0:i.title]:(u==null?void 0:u.title)||st.get(u,(i==null?void 0:i.title)||(i==null?void 0:i.source))}),[u,i==null?void 0:i.source,i==null?void 0:i.title]),h=M.useTranslate();return S.useEffect(()=>{!u||!(u!=null&&u.userId)||A.getOne(r,{id:u==null?void 0:u.userId}).then(({data:m})=>l(m)).catch(()=>l(null))},[u,A,r]),g.jsx(Bm,{...i,disabled:n,record:C,onClick:p,title:g.jsxs(b.Box,{sx:{cursor:"pointer"},children:[g.jsx(b.Typography,{variant:"subtitle1",children:st.get(C,(i==null?void 0:i.title)||(i==null?void 0:i.source))}),g.jsxs(b.Typography,{variant:"caption",color:"secondary",children:[st.get(C,"sizeDescription"),a&&" | ",a&&h("ra.attachment.info",{user:a==null?void 0:a.name,created:Dr(C==null?void 0:C.createdAt).format("DD/MM/YYYY HH:mm")})]})]})})};$A.propTypes={...M.FileField.propTypes,source:c.string,title:c.string,disabled:c.bool};const yO=ue(M.ImageField,{name:"RaApplicaImageField",slot:"root"})(()=>({})),Ds=e=>{const t=`_${e==null?void 0:e.source}`;return g.jsx(yO,{...e,source:t})};Ds.propTypes={...M.ImageField.propTypes,source:c.string};const wl=({width:e,height:t,circle:n,justify:r,record:i,...a})=>{const l=S.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]),u=M.useRecordContext(),A=i||u;return g.jsx(Ds,{sx:f=>({margin:0,display:"flex",justifyContent:r,"& img":{margin:"0px !important",border:`1px solid ${f.palette.divider}`,objectFit:"cover !important",...l,minWidth:l.width,minHeight:l.height}}),...a,record:A})};wl.defaultProps={...Ds.defaultProps,width:150,height:150,circle:!1,justify:"flex-start"},wl.propTypes={...Ds.propTypes,width:c.oneOfType([c.number,c.string]),height:c.oneOfType([c.number,c.string]),circle:c.bool,justify:c.oneOf(["flex-start","center","flex-end"])};var vm={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(kn,function(){return function(n,r,i){n=n||{};var a=r.prototype,l={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 u(f,p,C,h){return a.fromToBase(f,p,C,h)}i.en.relativeTime=l,a.fromToBase=function(f,p,C,h,m){for(var I,B,v,O=C.$locale().relativeTime||l,R=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"}],x=R.length,T=0;T<x;T+=1){var P=R[T];P.d&&(I=h?i(f).diff(C,P.d,!0):C.diff(f,P.d,!0));var L=(n.rounding||Math.round)(Math.abs(I));if(v=I>0,L<=P.r||!P.r){L<=1&&T>0&&(P=R[T-1]);var k=O[P.l];m&&(L=m(""+L)),B=typeof k=="string"?k.replace("%d",L):k(L,p,P.l,v);break}}if(p)return B;var _=v?O.future:O.past;return typeof _=="function"?_(B):_.replace("%s",B)},a.to=function(f,p){return u(f,p,this,!0)},a.from=function(f,p){return u(f,p,this)};var A=function(f){return f.$u?i.utc():i()};a.toNow=function(f){return this.to(A(this),f)},a.fromNow=function(f){return this.from(A(this),f)}}})})(vm);var vO=vm.exports;const bO=ti(vO);Dr.extend(bO);const Tl=e=>{const t=M.useRecordContext(e),[n]=M.useLocaleState(),r=S.useMemo(()=>Dr(st.get(t,e==null?void 0:e.source)).locale(n).fromNow(),[t,e==null?void 0:e.source,n]);return g.jsxs(S.Fragment,{children:[g.jsx(M.DateField,{record:t,source:e.source,showTime:!0}),g.jsx("br",{}),g.jsx(b.Typography,{variant:"caption",color:"textSecondary",children:r})]})};Tl.displayName="DateAgoField",Tl.propTypes={source:c.string.isRequired};const bm=ue(M.DateField,{name:"RaApplicaDateField",slot:"Root"})(()=>({}));bm.propTypes={...M.DateField.propTypes};const ed=e=>g.jsx(bm,{...e});ed.defaultProps={...M.DateField.defaultProps,variant:"body1"},ed.propTypes={...M.DateField.propTypes};const Qm=ue(M.EmailField,{name:"RaApplicaEmailField",slot:"Root"})(()=>({}));Qm.propTypes={...M.EmailField.propTypes};const td=e=>g.jsx(Qm,{...e});td.defaultProps={...M.EmailField.defaultProps,variant:"body1"},td.propTypes={...M.EmailField.propTypes};const QO=ue(M.FileField,{name:"RaApplicaFileField",slot:"root"})(()=>({})),nd=({...e})=>{const t=M.useRecordContext(e),n=S.useCallback(r=>{r.preventDefault(),r.stopPropagation();const i=st.get(t,`_${e==null?void 0:e.source}`,st.get(t,e==null?void 0:e.source)),a=st.get(t,(e==null?void 0:e.title)||(e==null?void 0:e.source))||(e==null?void 0:e.title),l=document.createElement("a");l.href=i,l.download=a,l.click()},[e==null?void 0:e.source,t,e==null?void 0:e.title]);return g.jsx(QO,{...e,record:t,onClick:n})};nd.propTypes={...M.FileField.propTypes,source:c.string,title:c.string};const xm=e=>g.jsx(M.FunctionField,{...e});xm.defaultProps={variant:"body1"};const xO=ue("div")(({theme:e})=>({borderBottom:`1px solid ${e.palette.divider}`,paddingTop:e.spacing(1),paddingBottom:e.spacing(1),marginBottom:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",[e.breakpoints.down("sm")]:{whiteSpace:"normal",overflow:"visible",textOverflow:"inherit"}})),rd=({source:e,defaultValue:t,...n})=>{const r=M.useRecordContext(n),i=st.get(r,e,t);return g.jsx("span",{dangerouslySetInnerHTML:{__html:i&&i!==null?i:t}})};rd.propTypes={defaultValue:c.any,source:c.string,record:c.object},rd.defaultProps={defaultValue:"&nbsp;"};const wm=({title:e,children:t})=>e&&e!==!1?g.jsx(b.Tooltip,{title:e,placement:"top",children:t}):t;wm.propTypes={title:c.oneOfType([c.string,c.bool]),children:c.oneOfType([c.element,c.arrayOf(c.element)])};const od=({label:e,source:t,defaultValue:n,children:r,tooltip:i,...a})=>{const{getCurrentDialog:l}=xo(),u=M.useRecordContext(a),A=M.useResourceContext(a),f=l(),p=S.useMemo(()=>!i||i===!1?!1:typeof i=="function"?i(u):typeof i=="string"?st.get(u,i,i):i,[u,i]);return g.jsx(wm,{title:p,children:g.jsxs(S.Fragment,{children:[g.jsx(b.InputLabel,{children:g.jsx(M.FieldTitle,{label:e,source:t,resource:f||A})}),g.jsx(xO,{...a,children:S.cloneElement(r,{source:t,record:u,defaultValue:n,resource:f||A})})]})})};od.propTypes={defaultValue:c.any,tooltip:c.oneOfType([c.string,c.bool,c.func]),source:c.string,label:c.string,name:c.string,children:c.element},od.defaultProps={defaultValue:"&nbsp;",children:g.jsx(rd,{})};const wO=ai("div",{name:"RaApplicaReferenceManyField",slot:"root"})(({theme:e,margin:t,border:n})=>({marginLeft:t?0:`-${e.spacing(2.5)}`,marginRight:t?0:`-${e.spacing(2.5)}`,borderBottom:n?`1px solid ${e.palette.divider}`:"none","& form":{padding:e.spacing(2)},"& .MuiCardContent-root":{borderTop:n?`1px solid ${e.palette.divider}`:"none"},"& .MuiToolbar-root":{[e.breakpoints.up("sm")]:{marginTop:`-${e.spacing(2)}`,marginBottom:e.spacing(t?0:1),marginLeft:e.spacing(t?1:2),marginRight:e.spacing(t?1:2.5),width:t?"auto":`calc(100% - ${e.spacing(5)})`},[e.breakpoints.down("md")]:{marginTop:0}},"& .RaDatagrid-root":{overflowX:"auto",paddingTop:48,[e.breakpoints.down("sm")]:{width:"calc(100vw - 34px)"}},"& .RaDatagrid-table":{borderBottom:`1px solid ${e.palette.divider}`},"& .MuiTablePagination-toolbar":{marginTop:e.spacing(1),marginBottom:0},"& .RaBulkActionsToolbar-collapsed.RaBulkActionsToolbar-toolbar":{minHeight:0},"& .RaBulkActionsToolbar-toolbar":{minHeight:48,bottom:-56,"& h6":{marginTop:e.spacing(.5)},"& .RaBulkActionsToolbar-topToolbar":{marginTop:e.spacing(1)},[e.breakpoints.down("sm")]:{bottom:-48,borderRadius:0}}})),Qi=e=>g.jsx(wO,{children:g.jsx(M.ReferenceManyField,{...e})});Qi.defaultProps={...M.ReferenceManyField.defaultProps,margin:!1,border:!1},Qi.propTypes={...M.ReferenceManyField.propTypes,margin:c.bool,border:c.bool};const Tm=({source:e,...t})=>{const n=M.useRecordContext(t),r=st.get(n,e,0),i=r/1024,a=i/1024,l=a/1024,u=l>1?`${l.toFixed(2)} GB`:a>1?`${a.toFixed(2)} MB`:i>1?`${i.toFixed(2)} KB`:`${r.toFixed(2)} B`;return g.jsx(b.Typography,{component:"span",variant:"body1",...t,children:u})};Tm.propTypes={record:c.object,source:c.string};const Pm=ue(M.TextField,{name:"RaApplicaTextField",slot:"Root"})(()=>({}));Pm.propTypes={...M.TextField.propTypes};const id=e=>g.jsx(Pm,{...e});id.defaultProps={...M.TextField.defaultProps,variant:"body1"},id.propTypes={...M.TextField.propTypes};const at=({label:e,children:t,display:n,helperText:r,sx:i,addLabel:a,divider:l,...u})=>{const A=Ut.useTheme(),{getCurrentDialog:f}=xo(),{source:p,resource:C,isRequired:h}=u,{fieldState:{invalid:m}}=M.useInput(u),I=f();return g.jsxs(b.Stack,{spacing:1,sx:{width:u!=null&&u.fullWidth?"100%":"auto","& .MuiFormHelperText-root":{color:m?A.palette.error.main:A.palette.text.secondary,"& span":{display:"none"}},...i},children:[n==="label"&&e!==!1&&a!==!1&&g.jsx(b.InputLabel,{error:m===!0,sx:{borderBottom:l?`1px solid ${A.palette.divider}`:"none",pb:l?1:0,mt:l?1:0},children:g.jsx(M.FieldTitle,{label:e,source:p,resource:I||C,isRequired:h})}),S.isValidElement(t)?S.cloneElement(t,{...t.props,...u,label:n==="legend"?e:!1}):t,n==="label"&&r&&g.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:m===!0,children:r})]})};at.propTypes={sx:c.object,children:c.element,label:c.oneOfType([c.string,c.bool]),addLabel:c.bool,resource:c.string,isRequired:c.bool,source:c.string,display:c.oneOf(["legend","label"]),helperText:c.oneOfType([c.string,c.bool]),divider:c.bool},at.defaultProps={display:"label",divider:!1};const TO=e=>e?{"& .RaFileInput-removeButton > .RaFileInputPreview-removeButton":{display:"none",visiblity:"hidden"},"& .RaFileInput-dropZone":{display:"none",visiblity:"hidden"}}:{},PO=ue(M.FileInput,{name:"RaApplicaFileInput",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}},...TO(e)})),sd=({children:e,disabled:t,type:n,...r})=>{const i=M.useRecordContext(r),a=r==null?void 0:r.source,l=i==null?void 0:i.id;return M.useInput({source:`__${n}__${r==null?void 0:r.source}`,defaultValue:r==null?void 0:r.source}),g.jsx(at,{...r,children:g.jsx(PO,{disabled:t,children:S.cloneElement(e,{...e.props,entityId:l,property:a})})})};sd.propTypes={...M.FileInput.propTypes,children:c.node,multiple:c.bool,disabled:c.bool},sd.defaultProps={children:g.jsx($A,{title:"name",source:"path"}),multiple:!0,disabled:!1,type:"attachment"};const SO=ue(M.AutocompleteArrayInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"},'& label.MuiFormLabel-root[data-shrink="false"]':{minHeight:"18px"}})),ad=({...e})=>g.jsx(at,{...e,children:g.jsx(SO,{})});ad.propTypes={...M.AutocompleteArrayInput.propTypes,...at.propTypes},ad.defaultProps={...M.AutocompleteArrayInput.defaultProps,size:"small"};const OO=ue(M.AutocompleteInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},'& label.MuiFormLabel-root[data-shrink="false"]':{minHeight:"18px"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"},"& .MuiOutlinedInput-root.MuiInputBase-sizeSmall":{paddingTop:"4px"}})),ld=e=>{const{perPage:t,...n}=e;return g.jsx(at,{...n,children:g.jsx(OO,{})})};ld.propTypes={...M.AutocompleteInput.propTypes,...at.propTypes},ld.defaultProps={...M.AutocompleteInput.defaultProps,size:"small"};const MO=ue(M.BooleanInput,{name:"RaApplicaBooleanInput",slot:"Root"})(()=>({})),cd=({horizontal:e,...t})=>{const n=xt();return g.jsx(at,{...t,sx:e?{flexDirection:e?"row":"column",alignItems:e?"center":"flex-start","& .MuiFormGroup-root":{margin:0},"& .MuiFormControlLabel-root":{margin:0,"& .MuiTypography-root":{display:"none",visibility:"hidden"},"& .MuiSwitch-root":{marginRight:`-${n.spacing(.5)}`}}}:{},children:g.jsx(MO,{})})};cd.defaultProps={...M.BooleanInput.defaultProps,...at.defaultProps},cd.propTypes={...M.BooleanInput.propTypes,...at.propTypes,horizontal:c.bool};const DO=ue(M.DateInput,{name:"RaApplicaDateInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),ud=e=>g.jsx(at,{...e,children:g.jsx(DO,{})});ud.propTypes={...M.DateInput.propTypes,...at.propTypes},ud.defaultProps={...M.DateInput.defaultProps,...at.defaultProps};const RO=ue(M.DateTimeInput,{name:"RaApplicaDateTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),Ad=e=>g.jsx(at,{...e,children:g.jsx(RO,{})});Ad.propTypes={...M.DateTimeInput.propTypes,...at.propTypes},Ad.defaultProps={...at.defaultProps};const jO=ue(M.FileInput,{name:"RaApplicaFileInput",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}}})),dd=({children:e,title:t,...n})=>{const r=va.useWatch({name:n.source}),i=M.useRecordContext(n),{source:a}=n,l=S.useMemo(()=>{if(r&&(r!=null&&r.title))return r==null?void 0:r.title;const u=st.get(i,a);if(u){const A=u.split("__");return A.length>0?A[A.length-1]:u}return u},[i,a,r]);return g.jsx(at,{...n,children:g.jsx(jO,{children:S.cloneElement(e,{...e.props,title:t||a,source:a,record:{...i,[a]:(r==null?void 0:r.title)||st.get(i,a),[`_${a}`]:(r==null?void 0:r.src)||st.get(i,`_${a}`),[t||a]:l}})})})};dd.propTypes={...M.FileInput.propTypes,source:c.string,title:c.string,children:c.node},dd.defaultProps={children:g.jsx(nd,{})};const fd=({children:e,title:t,...n})=>{const r=va.useWatch({name:n.source}),i=M.useRecordContext(n),{source:a}=n;return M.useInput({source:`__image__${n==null?void 0:n.source}`,defaultValue:n==null?void 0:n.source}),g.jsx(at,{...n,children:g.jsx(M.ImageInput,{accept:"image/*",children:S.cloneElement(e,{...e.props,title:t,source:a,record:{...i,[a]:(r==null?void 0:r.title)||st.get(i,a),[`_${a}`]:(r==null?void 0:r.src)||st.get(i,`_${a}`)}})})})};fd.defaultProps={children:g.jsx(wl,{}),multiple:!1},fd.propTypes={...M.ImageInput.propTypes,source:c.string,title:c.string,children:c.node,multiple:c.bool};const kO=ue(M.NumberInput,{name:"RaApplicaNumberInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),gd=e=>g.jsx(at,{...e,children:g.jsx(kO,{})});gd.propTypes={...M.NumberInput.propTypes,...at.propTypes},gd.defaultProps={...M.NumberInput.defaultProps,...at.defaultProps};const Sm=({source:e,minWidth:t=300,children:n})=>{const r=M.useResourceContext(),i=M.useRecordContext(),[a,l]=S.useState(st.get(i,e,"")),[u,A]=S.useState(!1),f=S.useCallback(I=>l(I.target.value),[]),p=M.useDataProvider(),C=S.useCallback(I=>{I.key==="Enter"&&(A(!0),p.update(r,{id:i.id,data:{...i,[e]:a,_changed:e}}).then(()=>A(!1)))},[a,p,r,i,e]),h=S.useCallback(()=>{st.get(i,e)!==a&&(A(!0),p.update(r,{id:i.id,data:{...i,[e]:a,_changed:e}}).then(()=>A(!1)))},[a,p,r,e,i]),m=S.useCallback(I=>{A(!0),p.update(r,{id:i.id,data:{...i,[e]:I,_changed:e}}).then(()=>A(!1))},[p,r,e,i]);return S.useEffect(()=>l(st.get(i,e)),[i,e]),n?S.cloneElement(n,{...n.props,source:e,value:a,onChange:m}):g.jsx(b.TextField,{value:a,disabled:u,onChange:f,onKeyPress:C,onBlur:h,style:{minWidth:t,width:"100%"},multiline:!0,InputProps:{"arial-label":"naked"},size:"small"})};Sm.propTypes={source:c.string.isRequired,minWidth:c.number,children:c.element};const pd=({children:e,...t})=>g.jsx(M.ReferenceArrayInput,{...t,children:S.cloneElement(e,{...t,source:e.props.source||t.source})});pd.propTypes={...M.ReferenceArrayInput.propTypes,children:c.element},pd.defaultProps={...M.ReferenceArrayInput.defaultProps};const hd=({children:e,...t})=>g.jsx(M.ReferenceInput,{...t,children:S.cloneElement(e,{...t,source:e.props.source||t.source})});hd.propTypes={...M.ReferenceInput.propTypes,children:c.element},hd.defaultProps={...M.ReferenceInput.defaultProps};const Cd=({reference:e,target:t,children:n,filters:r,actions:i,...a})=>g.jsx(M.ResourceContextProvider,{value:e,children:g.jsx(Qi,{perPage:5,pagination:g.jsx(M.Pagination,{}),...a,reference:e,target:t,children:g.jsxs(S.Fragment,{children:[g.jsx(M.ListToolbar,{filters:r,actions:i}),n]})})});Cd.propTypes={...Qi.propTypes,children:c.node.isRequired,reference:c.string.isRequired,target:c.string.isRequired,filters:c.oneOfType([c.element,c.func,c.element,c.arrayOf(c.node)]),actions:c.oneOfType([c.element,c.func,c.element])},Cd.defaultProps={...Qi.defaultProps};const FO=ue(M.SearchInput,{name:"RaApplicaSearchInput",slot:"root"})(()=>({})),LO=e=>g.jsx(FO,{...e}),Om=ue(M.SelectArrayInput,{name:"RaApplicaSelectArrayInput",slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .RaSelectArrayInput-chips > .RaSelectArrayInput-chip":{marginTop:"-2px",marginBottom:"-2px"},'& label.MuiFormLabel-root[data-shrink="false"]':{marginTop:"2px"}}));Om.propTypes={...M.SelectArrayInput.propTypes};const Ed=e=>g.jsx(at,{...e,children:g.jsx(Om,{options:{autoWidth:!1}})});Ed.defaultProps={optionText:"name",optionValue:"id"},Ed.propTypes={...M.SelectArrayInput.propTypes,...at.propTypes};const NO=ue(M.SelectInput,{name:"RaApplicaSelectArrayInput",slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},'& label.MuiFormLabel-root[data-shrink="false"]':{marginTop:"2px"}})),Mm=e=>g.jsx(at,{...e,children:g.jsx(NO,{})});Mm.propTypes={...M.SelectInput.propTypes,...at.propTypes};const Hn=e=>g.jsx(at,{...e,children:g.jsx(M.TextInput,{})});Hn.propTypes={...M.TextInput.propTypes,...at.propTypes};const Pl=({...e})=>{var u,A;const t=M.useTranslate(),n=M.maxLength(e==null?void 0:e.maxLength,"app.input.max_length_error"),r=(A=(u=va.useController({name:e==null?void 0:e.source}))==null?void 0:u.field)==null?void 0:A.value;let i=e.helperText,a=e.validate;a?Array.isArray(a)&&a.indexOf(n)===-1&&a.push(n):a=[n];const l=t("app.input.max_length_info",{count:(r==null?void 0:r.length)||0,max:e==null?void 0:e.maxLength});return e!=null&&e.maxLength&&(i=i&&i.length>0?`${l} - ${t(i)}`:l),g.jsx(Hn,{...e,validate:a,helperText:i,inputProps:{maxLength:e==null?void 0:e.maxLength}})};Pl.displayName="SmartTextInput",Pl.defaultProps={multiline:!1},Pl.propTypes={...Hn.propTypes,maxLength:c.number,multiline:c.bool,rows:c.number};const Dm=e=>{const t=e.split(":");t.length===1&&t.push("00");const n=parseInt(t[0]),r=parseInt(t[1]);return Dr().hour(n).minute(r)};function VO(){let e=new Date().getTime();return window.performance&&typeof window.performance.now=="function"&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){const r=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(n=="x"?r:r&3|8).toString(16)})}const HO=e=>{if(!e)return"";const t=Dm(e);return t?t.format("HH:mm"):""},zO=e=>e,WO=ue(M.TimeInput,{name:"RaApplicaTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),md=e=>g.jsx(at,{...e,children:g.jsx(WO,{})});md.defaultProps={...M.TimeInput.defaultProps,format:HO,parse:zO},md.propTypes={...M.TimeInput.propTypes,...at.propTypes};const Id=({onSuccess:e,firstAccess:t})=>{const{spacing:n}=Fn(),[r,i]=S.useState(!1),a=be.useAuthProvider(),l=be.useTranslate(),u=be.useNotify(),A=S.useCallback(f=>{const{oldPassword:p,newPassword:C}=f;i(!0),a==null||a.changePassword(p,C).then(()=>{u("ra.auth.password_changed"),e()}).catch(h=>u(h,{type:"error"})).finally(()=>i(!1))},[a,e]);return g.jsx(be.ResourceContextProvider,{value:"user/change-password",children:g.jsx(be.EditContextProvider,{value:{record:{},resource:"user/change-password",save:A},children:g.jsx(Ql,{onSubmit:A,toolbar:g.jsx(Mr,{children:g.jsx(M.SaveButton,{disabled:r})}),children:g.jsxs(b.Grid,{container:!0,spacing:n,children:[t===!0&&g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(b.Alert,{severity:"warning",children:[g.jsx(b.AlertTitle,{children:l("ra.auth.first_access.change_password")}),l("ra.auth.first_access.change_password_helper")]})}),g.jsx(b.Grid,{item:!0,xs:12,children:g.jsx(Hn,{source:"oldPassword",type:"password",validate:be.required()})}),g.jsx(b.Grid,{item:!0,xs:12,children:g.jsx(Hn,{source:"newPassword",type:"password",validate:be.required()})})]})})})})},UO=ue(M.Create,{name:"RaApplicaEdit",slot:"root"})(({theme:e})=>({"& .RaCreate-card, & > div > div > form":{backgroundColor:e.palette.background.default,"& .RaToolbar-mobileToolbar":{backgroundColor:"yellow"}},"& .RaCreate-main>.MuiPaper-root:first-of-type":{overflow:"visible"}})),YO=ue(M.Edit,{name:"RaApplicaEdit",slot:"root"})(({theme:e})=>({"& .RaEdi-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaToolbar-mobileToolbar":{borderTop:`1px solid ${e.palette.divider}`},"& .RaEdit-main>.MuiPaper-root:first-of-type":{overflow:"visible"}})),GO=ue(b.CardHeader)(({theme:e})=>({marginTop:e.spacing(4),marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0})),KO=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)})`})),Bd=({title:e,divider:t,variant:n})=>{const r=M.useTranslate();return g.jsxs(S.Fragment,{children:[g.jsx(GO,{title:r(e,{_:e}),titleTypographyProps:{variant:n}}),t&&g.jsx(KO,{})]})};Bd.propTypes={title:c.string.isRequired,divider:c.bool,variant:c.oneOf(["h1","h2","h3","h4","h5","h6"])},Bd.defaultProps={divider:!0,variant:"h4"};const Sl=c.shape({xl:c.number,lg:c.number,md:c.number,sm:c.number,xs:c.number}),_O=ue("div")(({theme:e})=>({marginBottom:e.spacing(2)})),Ol=({children:e,visibility:t})=>b.useMediaQuery(r=>r.breakpoints.up(t))?g.jsx(_O,{children:e}):null;Ol.propTypes={visibility:c.oneOf(["xl","lg","md","sm","xs"]),position:c.oneOf(["top","bottom"]).isRequired,children:c.node.isRequired},Ol.defaultProps={position:"top",visibility:"md"};const JO={display:"none"},Ml=({intent:e,hidden:t,unmountOnExit:n,label:r,icon:i,value:a,syncWithLocation:l,selected:u,onChange:A,children:f,badgeColor:p,badgeContent:C,...h})=>{const m=M.useTranslate(),I=Gr.useLocation(),B={component:gt.Link,to:{...I,pathname:a}},v=S.isValidElement(r)?r:m(r,{_:r}),O=S.useCallback(()=>A(a),[A,a]);return e==="header"?(()=>g.jsxs(b.ListItemButton,{selected:u,...l?B:{},onClick:O,children:[i&&g.jsx(b.ListItemIcon,{children:i}),g.jsx(b.ListItemText,{primary:v}),C&&g.jsx(b.ListItemSecondaryAction,{children:g.jsx(b.Avatar,{sx:{width:24,height:24,fontSize:12,backgroundColor:T=>{var P;return(P=T.palette[p])==null?void 0:P.main},color:T=>{var P;return(P=T.palette[p])==null?void 0:P.contrastText}},children:C})})]}))():(()=>n&&t?null:g.jsx(M.FormGroupContextProvider,{name:a.toString(),children:g.jsx(b.Stack,{alignContent:"stretch",style:t?JO:{},id:`tabpanel-${a}`,"aria-labelledby":`tabheader-${a}`,"aria-hidden":t||void 0,...h,children:f})}))()};Ml.propTypes={intent:c.oneOf(["header","content","sidebar"]),className:c.string,contentClassName:c.string,url:c.string,icon:c.element,label:c.oneOfType([c.string,c.element]).isRequired,value:c.oneOfType([c.string,c.number]),syncWithLocation:c.bool,onChange:c.func,selected:c.bool,hidden:c.bool,unmountOnExit:c.bool,children:c.node,badgeColor:c.oneOf(["default","error","info","primary","secondary","success","warning"]),badgeContent:c.oneOfType([c.string,c.number])},Ml.defaultProps={badgeColor:"default",unmountOnExit:!1};const XO=ai(b.List,{name:"RaLongFormTabs",slot:"Root"})(({theme:e})=>({p:0,"& .MuiListItemIcon-root":{minWidth:32,color:e.palette.grey[500]},"& .MuiListItemButton-root.Mui-selected":{borderRight:`2px solid ${e.palette.primary.main}`,marginRight:"-2px"}})),Rm=({children:e,syncWithLocation:t,value:n,url:r,onChange:i})=>{const a=Gr.useLocation();return g.jsx(Nn,{children:g.jsx(XO,{component:"nav",children:S.Children.map(e,(l,u)=>{if(!S.isValidElement(l))return null;const A=ZO(l,u),f=t?!!Gr.matchPath(`${r}/${A}`,a.pathname):u===n;return S.cloneElement(l,{intent:"header",value:t?A:u,syncWithLocation:t,onChange:i,url:r,selected:f})})})})},ZO=(e,t)=>e.props.path!=null?e.props.path:t>0?t.toString():"";Rm.propTypes={children:c.node,url:c.string,tabsWithErrors:c.arrayOf(c.string),syncWithLocation:c.bool,onChange:c.func,value:c.oneOfType([c.string,c.number])};var qO=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},jm=e=>e.firstChild?e.firstChild.offsetParent===e:!0,$O=(e,t)=>{let n=e,r=0;jm(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},e3=e=>{let t=e.parentElement;for(;t&&getComputedStyle(t,null).getPropertyValue("display")==="contents";)t=t.parentElement;return t||window},Rs=null;typeof CSS<"u"&&CSS.supports&&(CSS.supports("position","sticky")?Rs="sticky":CSS.supports("position","-webkit-sticky")&&(Rs="-webkit-sticky"));var Dl=!1;try{const e=Object.defineProperty({},"passive",{get(){Dl={passive:!0}}}),t=()=>{};window.addEventListener("testPassive",t,e),window.removeEventListener("testPassive",t,e)}catch{}var yd=e=>{const{el:t,onChange:n,unsubs:r,measure:i}=e;if(t===window){const a=()=>({top:0,left:0,height:window.innerHeight,width:window.innerWidth}),l=i(a()),u=()=>{Object.assign(l,i(a())),n()};return window.addEventListener("resize",u,Dl),r.push(()=>window.removeEventListener("resize",u)),l}else{const a=i(t.getBoundingClientRect()),l=()=>{Object.assign(a,i(t.getBoundingClientRect())),n()},u=new ResizeObserver(l);return u.observe(t),r.push(()=>u.disconnect()),a}},t3=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}},n3=(e,t,n)=>{const{bottom:r,offsetBottom:i,offsetTop:a}=n,l=qO(e);let u=!1;const A=()=>{u||requestAnimationFrame(()=>{const k=C();k!==x&&T(k),u=!1}),u=!0};let f=l===window?window.scrollY:l.scrollTop;const p=k=>{const{offsetTop:_,height:J}=m,{naturalTop:Y}=v,{height:ee}=O;return k+_+J>=Y+ee+R+i},C=()=>{const{height:k}=m,{height:_}=O;return _+a+i<=k?3:p(f)?1:2},h=l!==window&&jm(l),m=yd({el:l,onChange:A,unsubs:t,measure:({height:k,top:_})=>({height:k,offsetTop:h?_:0})}),I=e3(e),B=I===window?{top:0,bottom:0}:t3(I),v=yd({el:I,onChange:A,unsubs:t,measure:({height:k})=>({height:k-B.top-B.bottom,naturalTop:I===window?0:$O(I,l)+B.top+m.offsetTop})}),O=yd({el:e,onChange:A,unsubs:t,measure:({height:k})=>({height:k})});let R=0,x=C();const T=k=>{const _=x;if(x=k,_===2&&(R=-1),k===3){e.style.position=Rs,r?e.style.bottom=`${i}px`:e.style.top=`${a}px`;return}const{height:J,offsetTop:Y}=m,{height:ee,naturalTop:le}=v,{height:se}=O;if(k===2)if(e.style.position="relative",R=_===0?Math.max(0,Y+f-le+a):Math.max(0,Y+f+J-(le+se+i)),r){const q=Math.max(0,ee-se-R);e.style.bottom=`${q}px`}else e.style.top=`${R}px`;else e.style.position=Rs,k===1?r?e.style.bottom=`${i}px`:e.style.top=`${J-se-i}px`:r?e.style.bottom=`${J-se-i}px`:e.style.top=`${a}px`};T(x);const P=k=>{if(k===f)return;const _=k-f;if(f=k,x===3)return;const{offsetTop:J,height:Y}=m,{naturalTop:ee,height:le}=v,{height:se}=O;if(_>0)if(x===0){if(k+J+a>ee){const q=Math.max(0,J+f-ee+a);k+J+Y<=ee+se+q+i?T(2):T(1)}}else x===2&&p(k)&&T(1);else if(x===1){if(J+k+Y<ee+le+i){const q=Math.max(0,J+f+Y-(ee+se+i));J+k+a>=ee+q?T(2):T(0)}}else x===2&&J+k+a<ee+R&&T(0)},L=l===window?()=>P(window.scrollY):()=>P(l.scrollTop);l.addEventListener("scroll",L,Dl),l.addEventListener("mousewheel",L,Dl),t.push(()=>l.removeEventListener("scroll",L),()=>l.removeEventListener("mousewheel",L))},r3=({offsetTop:e=0,offsetBottom:t=0,bottom:n=!1}={})=>{const[r,i]=S.useState(null);return S.useEffect(()=>{if(!r||!Rs)return;const a=[];return n3(r,a,{offsetBottom:t,offsetTop:e,bottom:n}),()=>{a.forEach(l=>l())}},[r,t,e,n]),i},o3=e=>{const{offsetTop:t,offsetBottom:n,bottom:r,children:i,className:a,style:l}=e,u=r3({offsetTop:t,offsetBottom:n,bottom:r});return g.jsx("div",{className:a,style:l,ref:u,children:i})},i3=o3;const s3=ue(b.Grid,{name:"ApplicaLongFormView",slot:"Root"})(({theme:e})=>({"& .MuiToolbar-root":{position:"initial",marginTop:e.spacing(2),marginLeft:`-${e.spacing(3)}`,marginRight:`-${e.spacing(3)}`,marginBottom:`-${e.spacing(2)}`,borderTop:`1px solid ${e.palette.divider}`,[e.breakpoints.down("sm")]:{position:"initial !important",width:"auto !important"}},"& form > .MuiToolbar-root":{margin:0,marginRight:`-${e.spacing(.5)}`,[e.breakpoints.down("sm")]:{marginRight:e.spacing(.5)}}})),km=(e,t)=>e&&e.type===Ol&&e.props.position===t,a3=e=>e&&e.type===Ml,vd=({children:e,formRootPathname:t,syncWithLocation:n,spacing:r,tabs:i,tabsDisposition:a,contentDisposition:l,sticky:u,...A})=>{const[f,p]=S.useState(0),C=Gr.useResolvedPath(""),h=M.useResourceContext(A),m=Gr.useLocation(),I=S.useMemo(()=>S.Children.toArray(e).find(T=>km(T,"top")),[e]),B=S.useMemo(()=>S.Children.toArray(e).find(T=>km(T,"bottom")),[e]),v=S.useMemo(()=>S.Children.toArray(e).filter(T=>a3(T)),[e]),O=T=>{n||p(T)},R=()=>S.cloneElement(i,{onChange:O,syncWithLocation:n,url:t,value:f,intent:"header"},v),x=S.useMemo(()=>g.jsxs(S.Fragment,{children:[I,n?g.jsx(Gr.Routes,{children:g.jsx(Gr.Route,{path:"/*",element:R()})}):R(),B]}),[I,n,R,B]);return g.jsxs(s3,{container:!0,spacing:r*2,children:[g.jsx(b.Grid,{item:!0,...a,children:u?g.jsx(i3,{offsetTop:74,offsetBottom:r*2,children:x}):x}),g.jsx(b.Grid,{item:!0,...l,children:S.Children.map(v,(T,P)=>{if(!T)return null;const L=M.getTabbedFormTabFullPath(T,P),k=n?!Gr.matchPath(`${C.pathname}/${L}`,m.pathname):f!==P;return S.isValidElement(T)?S.cloneElement(T,{intent:"content",resource:h,hidden:k,value:n?L:P}):null})})]})};vd.propTypes={children:c.node,spacing:c.number,syncWithLocation:c.bool,tabs:c.element,formRootPathname:c.string,tabsDisposition:Sl,contentDisposition:Sl},vd.defaultProps={tabs:g.jsx(Rm,{})};const l3=()=>{const e=gt.useLocation(),t=["entities/:resource/create/*",":resource/create/*","entities/:resource/:id/*",":resource/:id/*"];for(const n of t){const r=gt.matchPath(n,e.pathname);if(r)return r.pathnameBase}return""},js=({spacing:e,...t})=>{const n=l3(),{spacing:r}=Fn(),i=e||r;return g.jsx(M.Form,{formRootPathname:n,...t,children:g.jsx(vd,{formRootPathname:n,...t,spacing:i})})};js.propTypes={syncWithLocation:c.bool,spacing:c.number,tabsDisposition:Sl,contentDisposition:Sl,sticky:c.bool},js.defaultProps={syncWithLocation:!1,sticky:!0,spacing:2,tabsDisposition:{xl:3,lg:3,md:4,sm:4,xs:12},contentDisposition:{xl:9,lg:9,md:8,sm:8,xs:12}},js.Tab=Ml,js.Sidebar=Ol;const c3=ue(M.SimpleFormIterator,{name:"ApplicaSimpleFormIterator",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}}})),Rl=ai(M.TabbedForm,{name:"RaApplicaTabbedForm",slot:"Root"})(()=>({}));Rl.propTypes={...M.TabbedForm.propTypes},Rl.defaultProps={...M.TabbedForm.defaultProps},Rl.Tab=M.TabbedForm.Tab;const Fm=S.createContext(void 0),u3=S.createContext(void 0),A3=()=>S.useContext(Fm),d3=V.forwardRef((e,t)=>{const{children:n,disabled:r,disableActions:i=!1,index:a,member:l,resource:u}=e,A=M.useTranslate(),[f,p]=V.useState(!1),{total:C,remove:h}=A3(),m=V.useCallback(()=>{p(!1),h(a)},[a,h]),I=S.useMemo(()=>({index:a,total:C,remove:()=>h(a)}),[a,C,h]);return g.jsxs(u3.Provider,{value:I,children:[S.Children.map(n,(B,v)=>{if(!S.isValidElement(B))return null;const{source:O,...R}=B.props;return g.jsx(b.TableCell,{sx:{border:0,verticalAlign:"top"},children:S.cloneElement(B,{source:O?`${l}.${O}`:l,index:O?void 0:v,resource:u,disabled:r,...R,label:!1})})}),!i&&g.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center",border:0,pt:2},children:g.jsx(fi,{horizontal:!0,children:g.jsx(b.Typography,{color:"error",onClick:()=>p(!0),children:A("ra.action.delete")})})}),n.length>0&&g.jsx(M.Confirm,{isOpen:f,title:A("ra.action.remove_item"),content:A("ra.message.remove_item"),onConfirm:m,onClose:()=>p(!1)})]})});var f3=Array.isArray,bd=f3,g3=typeof kn=="object"&&kn&&kn.Object===Object&&kn,p3=g3,h3=p3,C3=typeof self=="object"&&self&&self.Object===Object&&self,E3=h3||C3||Function("return this")(),Qd=E3,m3=Qd,I3=m3.Symbol,xd=I3,Lm=xd,Nm=Object.prototype,B3=Nm.hasOwnProperty,y3=Nm.toString,ks=Lm?Lm.toStringTag:void 0;function v3(e){var t=B3.call(e,ks),n=e[ks];try{e[ks]=void 0;var r=!0}catch{}var i=y3.call(e);return r&&(t?e[ks]=n:delete e[ks]),i}var b3=v3,Q3=Object.prototype,x3=Q3.toString;function w3(e){return x3.call(e)}var T3=w3,Vm=xd,P3=b3,S3=T3,O3="[object Null]",M3="[object Undefined]",Hm=Vm?Vm.toStringTag:void 0;function D3(e){return e==null?e===void 0?M3:O3:Hm&&Hm in Object(e)?P3(e):S3(e)}var zm=D3;function R3(e){return e!=null&&typeof e=="object"}var j3=R3,k3=zm,F3=j3,L3="[object Symbol]";function N3(e){return typeof e=="symbol"||F3(e)&&k3(e)==L3}var wd=N3,V3=bd,H3=wd,z3=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,W3=/^\w*$/;function U3(e,t){if(V3(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||H3(e)?!0:W3.test(e)||!z3.test(e)||t!=null&&e in Object(t)}var Y3=U3;function G3(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Wm=G3,K3=zm,_3=Wm,J3="[object AsyncFunction]",X3="[object Function]",Z3="[object GeneratorFunction]",q3="[object Proxy]";function $3(e){if(!_3(e))return!1;var t=K3(e);return t==X3||t==Z3||t==J3||t==q3}var eM=$3,tM=Qd,nM=tM["__core-js_shared__"],rM=nM,Td=rM,Um=function(){var e=/[^.]+$/.exec(Td&&Td.keys&&Td.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function oM(e){return!!Um&&Um in e}var iM=oM,sM=Function.prototype,aM=sM.toString;function lM(e){if(e!=null){try{return aM.call(e)}catch{}try{return e+""}catch{}}return""}var cM=lM,uM=eM,AM=iM,dM=Wm,fM=cM,gM=/[\\^$.*+?()[\]{}|]/g,pM=/^\[object .+?Constructor\]$/,hM=Function.prototype,CM=Object.prototype,EM=hM.toString,mM=CM.hasOwnProperty,IM=RegExp("^"+EM.call(mM).replace(gM,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function BM(e){if(!dM(e)||AM(e))return!1;var t=uM(e)?IM:pM;return t.test(fM(e))}var yM=BM;function vM(e,t){return e==null?void 0:e[t]}var bM=vM,QM=yM,xM=bM;function wM(e,t){var n=xM(e,t);return QM(n)?n:void 0}var Ym=wM,TM=Ym,PM=TM(Object,"create"),jl=PM,Gm=jl;function SM(){this.__data__=Gm?Gm(null):{},this.size=0}var OM=SM;function MM(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var DM=MM,RM=jl,jM="__lodash_hash_undefined__",kM=Object.prototype,FM=kM.hasOwnProperty;function LM(e){var t=this.__data__;if(RM){var n=t[e];return n===jM?void 0:n}return FM.call(t,e)?t[e]:void 0}var NM=LM,VM=jl,HM=Object.prototype,zM=HM.hasOwnProperty;function WM(e){var t=this.__data__;return VM?t[e]!==void 0:zM.call(t,e)}var UM=WM,YM=jl,GM="__lodash_hash_undefined__";function KM(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=YM&&t===void 0?GM:t,this}var _M=KM,JM=OM,XM=DM,ZM=NM,qM=UM,$M=_M;function xi(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])}}xi.prototype.clear=JM,xi.prototype.delete=XM,xi.prototype.get=ZM,xi.prototype.has=qM,xi.prototype.set=$M;var eD=xi;function tD(){this.__data__=[],this.size=0}var nD=tD;function rD(e,t){return e===t||e!==e&&t!==t}var oD=rD,iD=oD;function sD(e,t){for(var n=e.length;n--;)if(iD(e[n][0],t))return n;return-1}var kl=sD,aD=kl,lD=Array.prototype,cD=lD.splice;function uD(e){var t=this.__data__,n=aD(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():cD.call(t,n,1),--this.size,!0}var AD=uD,dD=kl;function fD(e){var t=this.__data__,n=dD(t,e);return n<0?void 0:t[n][1]}var gD=fD,pD=kl;function hD(e){return pD(this.__data__,e)>-1}var CD=hD,ED=kl;function mD(e,t){var n=this.__data__,r=ED(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var ID=mD,BD=nD,yD=AD,vD=gD,bD=CD,QD=ID;function wi(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])}}wi.prototype.clear=BD,wi.prototype.delete=yD,wi.prototype.get=vD,wi.prototype.has=bD,wi.prototype.set=QD;var xD=wi,wD=Ym,TD=Qd,PD=wD(TD,"Map"),SD=PD,Km=eD,OD=xD,MD=SD;function DD(){this.size=0,this.__data__={hash:new Km,map:new(MD||OD),string:new Km}}var RD=DD;function jD(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var kD=jD,FD=kD;function LD(e,t){var n=e.__data__;return FD(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Fl=LD,ND=Fl;function VD(e){var t=ND(this,e).delete(e);return this.size-=t?1:0,t}var HD=VD,zD=Fl;function WD(e){return zD(this,e).get(e)}var UD=WD,YD=Fl;function GD(e){return YD(this,e).has(e)}var KD=GD,_D=Fl;function JD(e,t){var n=_D(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var XD=JD,ZD=RD,qD=HD,$D=UD,eR=KD,tR=XD;function Ti(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])}}Ti.prototype.clear=ZD,Ti.prototype.delete=qD,Ti.prototype.get=$D,Ti.prototype.has=eR,Ti.prototype.set=tR;var nR=Ti,_m=nR,rR="Expected a function";function Pd(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(rR);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var l=e.apply(this,r);return n.cache=a.set(i,l)||a,l};return n.cache=new(Pd.Cache||_m),n}Pd.Cache=_m;var oR=Pd,iR=oR,sR=500;function aR(e){var t=iR(e,function(r){return n.size===sR&&n.clear(),r}),n=t.cache;return t}var lR=aR,cR=lR,uR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,AR=/\\(\\)?/g,dR=cR(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(uR,function(n,r,i,a){t.push(i?a.replace(AR,"$1"):r||n)}),t}),fR=dR;function gR(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var pR=gR,Jm=xd,hR=pR,CR=bd,ER=wd,mR=1/0,Xm=Jm?Jm.prototype:void 0,Zm=Xm?Xm.toString:void 0;function qm(e){if(typeof e=="string")return e;if(CR(e))return hR(e,qm)+"";if(ER(e))return Zm?Zm.call(e):"";var t=e+"";return t=="0"&&1/e==-mR?"-0":t}var IR=qm,BR=IR;function yR(e){return e==null?"":BR(e)}var vR=yR,bR=bd,QR=Y3,xR=fR,wR=vR;function TR(e,t){return bR(e)?e:QR(e,t)?[e]:xR(wR(e))}var PR=TR,SR=wd,OR=1/0;function MR(e){if(typeof e=="string"||SR(e))return e;var t=e+"";return t=="0"&&1/e==-OR?"-0":t}var DR=MR,RR=PR,jR=DR;function kR(e,t){t=RR(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[jR(t[n++])];return n&&n==r?e:void 0}var FR=kR,LR=FR;function NR(e,t,n){var r=e==null?void 0:LR(e,t);return r===void 0?n:r}var VR=NR;const HR=ti(VR),$m=e=>{const{children:t,resource:n,source:r,label:i,disableActions:a=!1,disableAdd:l=!1,disableRemove:u=!1,className:A,empty:f}=e,[p,C]=S.useState(!1),{fields:h,remove:m,replace:I}=M.useArrayInput(e),B=xt(),v=be.useTranslate(),O=be.useRecordContext(e),R=S.useRef({}),x=be.useTranslateLabel(),T=S.useCallback(J=>{m(J)},[m]);if(h.length>0){const{...J}=h[0];R.current=J;for(const Y in R.current)R.current[Y]=null}const P=S.useCallback(()=>{I([]),C(!1)},[I]),L=HR(O,r),k=S.useMemo(()=>({total:h.length,remove:T,source:r}),[h.length,T,r]),_=B.palette.mode==="dark"?B.palette.grey.A400:B.palette.grey.A800;return h?g.jsx(Fm.Provider,{value:k,children:g.jsxs("div",{className:A,children:[g.jsx(e0,{label:i,source:r,disableAdd:l}),g.jsx(b.TableContainer,{component:b.Paper,sx:{mt:2,border:`1px solid ${_}`},children:g.jsxs(b.Table,{children:[g.jsx(b.TableHead,{sx:{borderTop:0,borderBottom:`1px solid ${_}`},children:g.jsxs(b.TableRow,{children:[S.Children.map(t,(J,Y)=>V.isValidElement(J)?g.jsx(b.TableCell,{children:g.jsx(b.Typography,{display:"flex",variant:"subtitle1",fontWeight:500,color:"text.primary",textTransform:"none",children:x({...J.props,resource:n})})},Y):null),!a&&g.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center",verticalAlign:"top"},children:g.jsx(b.Typography,{display:"flex",variant:"subtitle1",fontWeight:500,color:"text.primary",textTransform:"none"})},"actions")]})}),g.jsxs(b.TableBody,{children:[h.length===0&&g.jsx(b.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:g.jsx(b.TableCell,{colSpan:4+(a?0:1),align:"center",children:f||g.jsx(b.Typography,{variant:"body1",color:"text.secondary",children:"-"})})}),h.length>0&&h.map((J,Y)=>g.jsx(b.TableRow,{sx:{borderBottom:`1px solid ${_}}`},children:g.jsx(d3,{disableRemove:u,disableActions:a,index:Y,member:`${r}.${Y}`,onRemoveField:T,record:L&&L[Y]||{},resource:n,source:r,children:t})},J.id))]})]})}),h.length>0&&g.jsx(M.Confirm,{isOpen:p,title:v("ra.action.clear_array_input"),content:v("ra.message.clear_array_input"),onConfirm:P,onClose:()=>C(!1)})]})}):null},e0=e=>{const{label:t,disableAdd:n}=e,{append:r}=M.useArrayInput(e),i=xt(),a=i.palette.mode==="dark"?i.palette.grey.A400:i.palette.grey.A800,l=i.palette.mode==="light"?"#000000":"#FFFFFF";return g.jsxs(b.Stack,{justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[g.jsx(b.Typography,{children:t}),!n&&g.jsx(b.IconButton,{size:"small",color:"secondary",sx:{border:`1px solid ${a}`},onClick:()=>r({}),children:g.jsx(et.PlusCircleOutlined,{style:{color:l}})})]})},zR=ue($m,{name:"RaApplicaTableFormIterator",slot:"Root"})(({theme:e})=>({"& > div.MuiPaper-root":{overflowX:"auto",[e.breakpoints.down("sm")]:{width:`calc(100vw - ${e.spacing(8)})`}}}));e0.propTypes={label:c.string.isRequired,source:c.string.isRequired},$m.propTypes={addButton:c.element,children:c.node,className:c.string,field:c.object,fields:c.array,fieldState:c.object,formState:c.object,record:c.object,source:c.string,label:c.string,resource:c.string,translate:c.func,disableAdd:c.bool,disableRemove:c.oneOfType([c.func,c.bool]),TransitionProps:c.shape({}),empty:c.oneOfType([c.node,c.string])};function WR(e,t){const n=yt.clone(e),{type:r,payload:i}=t;switch(r){case"updateMedia":{const a=yt.chain(n.media).clone().extend(i).value();return yt.extend(n,{media:a})}case"updateDrawer":{const a=yt.chain(n.drawer).clone().extend(i).value();return yt.extend(n,{drawer:a})}case"updateLogo":{const a=yt.chain(n.logo).clone().extend(i).value();return yt.extend(n,{logo:a})}case"updateNotifications":{const a=yt.chain(n.notifications).clone().extend(i).value();return yt.extend(n,{notifications:a})}case"updateTheme":{const a=yt.chain(n.theme).clone().extend(i).value();return yt.extend(n,{theme:a})}default:return n}}const UR={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"}},t0=S.createContext(void 0);function n0(e){const t=be.useGetIdentity(),n=b.useTheme(),r=b.useMediaQuery(n.breakpoints.down("md")),i=b.useMediaQuery(n.breakpoints.down("lg")),a=b.useMediaQuery(n.breakpoints.down("xl")),{miniDrawer:l,isHorizontalLayout:u,menuOrientation:A,drawerWidth:f}=Fn(),p=u(A)&&!i,{drawerOpen:C,openDrawer:h}=Jr(),m=S.useCallback(()=>{h(!C)},[C,h]),[I,B]=S.useState(!1),[v,O]=S.useReducer(WR,yt.chain(UR).clone().merge({drawer:{open:!l||C}}).value()),R=S.useCallback(()=>B(!1),[]),x=S.useMemo(()=>({state:v,dispatch:O}),[v,O]),{logoIcon:T,logoMain:P,enableNotification:L,notification:k}=e;return S.useEffect(()=>{O({type:"updateMedia",payload:{downMd:r,downLg:i,downXl:a,horizontal:p}})},[A,r,i,a]),S.useEffect(()=>{O({type:"updateDrawer",payload:{open:C,width:f,handleDrawerToggle:m}})},[C,f,m]),S.useEffect(()=>{l||h(!a)},[a,l]),S.useEffect(()=>{O({type:"updateLogo",payload:{main:P,icon:T}})},[T,P]),S.useEffect(()=>{O({type:"updateNotifications",payload:{enable:L,resource:k??"entities/notification"}})},[L,k]),S.useEffect(()=>{O({type:"updateTheme",payload:{iconColorOpen:n.palette.mode==="dark"?"grey.200":"grey.300",iconColor:n.palette.mode==="dark"?"background.default":"grey.100"}})},[n.palette.mode]),S.useEffect(()=>{B((t==null?void 0:t.needToChangePassword)===!0)},[t]),g.jsxs(t0.Provider,{value:x,children:[g.jsx(b.Dialog,{open:I,maxWidth:"xs",fullWidth:!0,children:g.jsx(Id,{onSuccess:R,firstAccess:!0})}),e.children]})}function r0(e){return S.forwardRef((t,n)=>{const{logoIcon:r,logoMain:i,enableNotification:a}=t;return g.jsx(n0,{logoIcon:r,logoMain:i,enableNotification:a,children:g.jsx(e,{ref:n,...t})})})}function Sd(){const e=S.useContext(t0);if(e===void 0)throw new Error("[Layout] useLayoutContext: context undefined. Please provide a valid LayoutContext using LayoutProvider");return e}function YR(){return Sd().dispatch}function Pi(){return Sd().state}function zn(){return Pi().media}function ko(){return Pi().drawer}function o0(){return Pi().logo}function Ll(){return Pi().notifications}function Nl(){return Pi().theme}function i0(){const{iconColor:e,iconColorOpen:t}=Nl(),{open:n,handleDrawerToggle:r}=ko();return g.jsx(ro,{"aria-label":"open drawer",onClick:r,edge:"start",color:"secondary",variant:"light",sx:{color:"text.primary",bgcolor:n?t:e,ml:{xs:0,lg:-2}},children:n?g.jsx(et.MenuFoldOutlined,{}):g.jsx(et.MenuUnfoldOutlined,{})})}function s0(e){const t=S.useRef(),n=b.useTheme(),{downLg:r,horizontal:i}=zn(),{open:a,width:l}=ko(),u=r?b.AppBar:dh,A=pi(e,{borderBottom:`1px solid ${n.palette.divider}`,zIndex:1200,width:i?"100%":a?`calc(100% - ${l}px)`:{xs:"100%",lg:"calc(100% - 60px)"}}),f={position:"fixed",color:"inherit",elevation:0,sx:A};return r||yt.extend(f,{open:a}),g.jsx(u,{ref:t,...f,children:g.jsxs(b.Toolbar,{sx:{"& > *":{marginX:n.spacing(.325)}},children:[!i&&g.jsx(i0,{}),e.children]})})}function GR(e){const t=b.useTheme(),{notification:n,onClick:r,selected:i,divider:a}=e,{resource:l}=Ll(),u=be.useNotify(),A=be.useRedirect(),[f]=be.useUpdate(l,{id:n==null?void 0:n.id,data:{...n,readed:Dr().format("YYYY-MM-DD HH:mm:ss")}},{onSuccess:()=>{n!=null&&n.resource?n!=null&&n.resource.startsWith("/")?(A(n==null?void 0:n.resource),r()):document.location.href=n==null?void 0:n.resource:r()},onFailure:()=>{u("resources.notifications.messages.readed.error","warning")}}),p=S.useCallback(()=>f(),[f]),[C]=be.useLocaleState(),h=S.useMemo(()=>Dr(n.created).locale(C).fromNow(),[n,C]);return g.jsx(b.ListItem,{disablePadding:!0,divider:a,children:g.jsxs(b.ListItemButton,{selected:i,onClick:p,children:[g.jsx(b.ListItemAvatar,{children:g.jsx(b.Avatar,{sx:{color:"primary.main",bgcolor:"primary.lighter"},children:g.jsx(et.MessageOutlined,{})})}),g.jsx(b.ListItemText,{primary:n.title,secondary:n.content}),g.jsx(b.Box,{flexGrow:1,flexShrink:1,minWidth:t.spacing(2)}),g.jsx(b.ListItemText,{primary:h,primaryTypographyProps:{variant:"caption"}})]})})}const KR={width:36,height:36,fontSize:"1rem"},_R={mt:"6px",ml:1,top:"auto",right:"auto",alignSelf:"flex-start",transform:"none"};function a0(){const{enable:e}=Ll();return e?g.jsx(JR,{}):null}function JR(){const e=b.useTheme(),t=S.useRef(),{resource:n}=Ll(),{downMd:r}=zn(),{iconColor:i,iconColorOpen:a}=Nl(),[l,u]=S.useState(!1),[A,f]=S.useState([]),p=A.filter(B=>B.readed===null).length,C=S.useCallback(()=>u(!l),[l]),h=S.useCallback(()=>{t.current&&t.current.contains(event.target)||u(!1)},[t.current,u]),{data:m,isLoading:I}=be.useGetList(n,{pagination:{page:1,perPage:50},sort:{field:"created",order:"DESC"},filter:{readed:!1}});return S.useEffect(()=>{!I&&m&&f(m??[])},[m,I]),g.jsxs(b.Box,{sx:{flexShrink:0},children:[g.jsx(ro,{color:"secondary",variant:"light",sx:{color:"text.primary",bgcolor:l?a:i},"aria-label":"open profile",ref:t,"aria-controls":l?"profile-grow":void 0,"aria-haspopup":"true",onClick:C,children:g.jsx(b.Badge,{badgeContent:p,color:"primary",children:g.jsx(et.BellOutlined,{})})}),g.jsx(b.Popper,{placement:r?"bottom":"bottom-end",open:l,anchorEl:t.current,role:void 0,transition:!0,disablePortal:!0,popperOptions:{modifiers:[{name:"offset",options:{offset:[r?-5:0,9]}}]},children:({TransitionProps:B})=>g.jsx(io,{type:"grow",position:r?"top":"top-right",in:open,...B,children:g.jsx(b.Paper,{sx:{boxShadow:e.customShadows.z1,width:"100%",minWidth:285,maxWidth:420,[e.breakpoints.down("md")]:{maxWidth:285}},children:g.jsx(b.ClickAwayListener,{onClickAway:h,children:g.jsx(Nn,{title:"Notification",elevation:0,border:!1,content:!1,secondary:g.jsx(g.Fragment,{children:p>0&&g.jsx(b.Tooltip,{title:"Mark as all read",children:g.jsx(ro,{color:"success",size:"small",children:g.jsx(et.CheckCircleOutlined,{style:{fontSize:"1.15rem"}})})})}),children:g.jsx(b.List,{component:"nav",sx:{p:0,"& .MuiListItemButton-root":{py:.5,"&.Mui-selected":{bgcolor:"grey.50",color:"text.primary"},"& .MuiAvatar-root":KR,"& .MuiListItemSecondaryAction-root":{..._R,position:"relative"}}},children:A.map((v,O)=>g.jsx(GR,{selected:p>0,notification:v,onClick:h,divider:O<A.length-1},v.id))})})})})})})]})}const XR=()=>{const[e,t]=S.useState(!1),n=S.useCallback(()=>t(!1),[t]),r=S.useCallback(()=>t(!0),[t]),i=be.useTranslate();return g.jsxs(S.Fragment,{children:[g.jsxs(b.ListItemButton,{onClick:r,children:[g.jsx(b.ListItemIcon,{children:g.jsx(jn.Key,{})}),g.jsx(b.ListItemText,{primary:i("ra.auth.change_password")})]}),g.jsx(b.Dialog,{open:e,onClose:()=>t(!1),maxWidth:"xs",fullWidth:!0,children:g.jsx(Id,{onSuccess:n})})]})},ZR=()=>{const e=be.useLogout(),t=be.useTranslate();return g.jsx(S.Fragment,{children:g.jsxs(b.ListItemButton,{onClick:e,children:[g.jsx(b.ListItemIcon,{children:g.jsx(jn.LogoutOutlined,{})}),g.jsx(b.ListItemText,{primary:t("ra.auth.logout")})]})})},qR=()=>{const e=be.useTranslate(),t=be.useAuthProvider(),n=S.useCallback(()=>t.stopImpersonate().then(()=>document.location.href="/"),[t==null?void 0:t.stopImpersonating]),[r,i]=S.useState(!1);return S.useEffect(()=>{t.isImpersonating&&t.isImpersonating().then(a=>i(a))},[t,i]),r?g.jsx(S.Fragment,{children:g.jsxs(b.ListItemButton,{onClick:n,children:[g.jsx(b.ListItemIcon,{children:g.jsx(jn.LogoutOutlined,{})}),g.jsx(b.ListItemText,{primary:e("ra.auth.stop_impersonate")})]})}):null};c.node,c.any.isRequired,c.any.isRequired;const l0=()=>{var B;const e=b.useTheme(),{identity:t}=M.useGetIdentity(),n=t!==void 0&&t.image&&t.image!==null&&t.image!=="",r=S.useRef(null),[i,a]=S.useState(!1),l=()=>{a(v=>!v)},u=v=>{r.current&&r.current.contains(v.target)||a(!1)},A=e.palette.mode==="dark"?"grey.200":"grey.300",f=M.useLogout(),p=M.useDataProvider(),C=M.useAuthProvider(),h=S.useCallback(()=>{f()},[C,f]),[m,I]=S.useState(null);return S.useEffect(()=>{if(!n)return;async function v(){var O=await p.getFile("/profile/me/image");I(O)}v()},[p,n]),g.jsxs(b.Box,{sx:{flexShrink:0},children:[g.jsx(b.ButtonBase,{sx:{p:.25,bgcolor:i?A:"transparent",borderRadius:1,"&:hover":{bgcolor:e.palette.mode==="dark"?"secondary.light":"secondary.lighter"},"&:focus-visible":{outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:2}},"aria-label":"open profile",ref:r,"aria-controls":i?"profile-grow":void 0,"aria-haspopup":"true",onClick:l,children:g.jsxs(b.Stack,{direction:"row",spacing:2,alignItems:"center",sx:{p:.5},children:[g.jsx(Cl,{alt:(B=t==null?void 0:t.name)==null?void 0:B.toUpperCase(),src:m,size:"xs"}),g.jsx(b.Typography,{variant:"subtitle1",children:t==null?void 0:t.name})]})}),g.jsx(b.Popper,{placement:"bottom-end",open:i,anchorEl:r.current,role:void 0,transition:!0,disablePortal:!0,popperOptions:{modifiers:[{name:"offset",options:{offset:[0,9]}}]},children:({TransitionProps:v})=>{var O;return g.jsx(io,{type:"grow",position:"top-right",in:i,...v,children:g.jsx(b.Paper,{sx:{boxShadow:e.customShadows.z1,width:290,minWidth:240,maxWidth:290,[e.breakpoints.down("md")]:{maxWidth:250}},children:g.jsx(b.ClickAwayListener,{onClickAway:u,children:g.jsxs(Nn,{elevation:0,border:!1,content:!1,children:[g.jsx(b.CardContent,{sx:{px:2.5,pt:3},children:g.jsxs(b.Grid,{container:!0,justifyContent:"space-between",alignItems:"center",children:[g.jsx(b.Grid,{item:!0,children:g.jsxs(b.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[g.jsx(Cl,{alt:"profile user",src:m,sx:{width:32,height:32}}),g.jsxs(b.Stack,{children:[g.jsx(b.Typography,{variant:"h6",children:t==null?void 0:t.name}),g.jsx(b.Typography,{variant:"body2",color:"textSecondary",children:(O=t==null?void 0:t.roles)==null?void 0:O.map(R=>R.name.replace("ROLE_","")).join(",")})]})]})}),g.jsx(b.Grid,{item:!0,children:g.jsx(b.Tooltip,{title:"Logout",children:g.jsx(ro,{size:"large",sx:{color:"text.primary"},onClick:h,children:g.jsx(et.LogoutOutlined,{})})})})]})}),g.jsx(b.Grid,{container:!0,children:g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(b.List,{component:"nav",sx:{p:0,"& .MuiListItemIcon-root":{minWidth:32}},children:[g.jsx(XR,{}),g.jsx(ZR,{}),g.jsx(qR,{})]})})})]})})})})}})]})},c0=e=>{const t=xt(),{downMd:n}=zn(),{iconColor:r,iconColorOpen:i}=Nl(),[a,l]=S.useState(!1),u=S.useRef(null),A=S.useCallback(()=>{l(!a)},[a]),f=S.useCallback(p=>{u.current&&u.current.contains(p.target)||l(!1)},[]);return n?g.jsxs(g.Fragment,{children:[g.jsx(b.Box,{sx:{flexShrink:0},children:g.jsx(ro,{sx:{color:"text.primary",bgcolor:a?i:r},"aria-label":"open more menu",ref:u,"aria-controls":a?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:A,color:"secondary",variant:"light",children:g.jsx(et.MoreOutlined,{})})}),g.jsx(b.Popper,{placement:"bottom-end",open:a,anchorEl:u.current,role:void 0,transition:!0,disablePortal:!0,style:{width:"100%"},popperOptions:{modifiers:[{name:"offset",options:{offset:[0,9]}}]},children:({TransitionProps:p})=>g.jsx(io,{type:"fade",in:a,...p,children:g.jsx(b.Paper,{sx:{boxShadow:t.customShadows.z1},children:g.jsx(b.ClickAwayListener,{onClickAway:f,children:g.jsx(b.AppBar,{color:"inherit",children:g.jsx(b.Toolbar,{children:e.children})})})})})})]}):g.jsx(g.Fragment,{children:e.children})};function u0(e){return g.jsx(b.Box,{...e,flex:1})}function Fs(e){const{name:t,version:n}=e;return g.jsx(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{p:"24px 16px 0px",mt:"auto"},children:g.jsxs(b.Typography,{variant:"caption",children:[g.jsx("span",{dangerouslySetInnerHTML:{__html:(e==null?void 0:e.copy)||""}})," ",t," - ",n]})})}Fs.propTypes={name:c.string.isRequired,version:c.string.isRequired,copy:c.string},Fs.defaultProps={copy:"&copy; Applica Software Guru for"};function A0(e){const{width:t}=ko(),{horizontal:n}=zn(),{container:r}=Fn();return g.jsxs(b.Box,{component:"main",sx:{width:`calc(100% - ${t}px)`,flexGrow:1,p:{xs:0,sm:2,lg:1},pt:{lg:2}},children:[g.jsx(b.Toolbar,{sx:{mt:n?8:"inherit"}})," ",g.jsx(b.Container,{maxWidth:r?"xl":!1,sx:{...r&&{px:{xs:0,sm:2}},position:"relative",minHeight:"calc(100vh - 110px)",display:"flex",flexDirection:"column"},children:e.children})]})}const d0=S.forwardRef((e,t)=>{const n=pi(e,{display:"flex",width:"100%"});return g.jsx(b.Box,{ref:t,...e,sx:n,children:e.children})});var f0={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(f0);var $R=f0.exports,Od={};const ej=Fb(H4);var g0;function tj(){return g0||(g0=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=ej}(Od)),Od}function p0(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=p0(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function nj(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=p0(e))&&(r&&(r+=" "),r+=t);return r}var Md=globalThis&&globalThis.__assign||function(){return Md=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Md.apply(this,arguments)},rj=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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},h0=function(e){var t=e.className,n=e.sx,r=rj(e,["className","sx"]),i=be.useLoading(),a=xt();return V.createElement(oj,{className:t,sx:n},i?V.createElement(fm,Md({className:nj("app-loader",Vl.loader),color:"inherit",size:a.spacing(2),thickness:6},r)):V.createElement(X0,{className:Vl.loadedIcon}))};h0.propTypes={classes:c.object,className:c.string,width:c.string};var Dd="RaLoadingIndicator",Vl={loader:"".concat(Dd,"-loader"),loadedIcon:"".concat(Dd,"-loadedIcon")},oj=ue("div",{name:Dd,overridesResolver:function(e,t){return t.root}})(function(e){var t,n=e.theme;return t={},t["& .".concat(Vl.loader)]={marginLeft:n.spacing(1.5),marginRight:n.spacing(1.5)},t["& .".concat(Vl.loadedIcon)]={},t});const Rd=e=>e.scrollTop;function Si(e,t){var n,r;const{timeout:i,easing:a,style:l={}}=e;return{duration:(n=l.transitionDuration)!=null?n:typeof i=="number"?i:i[t.mode]||0,easing:(r=l.transitionTimingFunction)!=null?r:typeof a=="object"?a[t.mode]:a,delay:l.transitionDelay}}const ij=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function sj(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),a=oi(t);let l;if(t.fakeTransform)l=t.fakeTransform;else{const f=a.getComputedStyle(t);l=f.getPropertyValue("-webkit-transform")||f.getPropertyValue("transform")}let u=0,A=0;if(l&&l!=="none"&&typeof l=="string"){const f=l.split("(")[1].split(")")[0].split(",");u=parseInt(f[4],10),A=parseInt(f[5],10)}return e==="left"?i?`translateX(${i.right+u-r.left}px)`:`translateX(${a.innerWidth+u-r.left}px)`:e==="right"?i?`translateX(-${r.right-i.left-u}px)`:`translateX(-${r.left+r.width-u}px)`:e==="up"?i?`translateY(${i.bottom+A-r.top}px)`:`translateY(${a.innerHeight+A-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-A}px)`:`translateY(-${r.top+r.height-A}px)`}function C0(e){return typeof e=="function"?e():e}function Hl(e,t,n){const r=C0(n),i=sj(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const E0=V.forwardRef(function(t,n){const r=xt(),i={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},a={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:l,appear:u=!0,children:A,container:f,direction:p="down",easing:C=i,in:h,onEnter:m,onEntered:I,onEntering:B,onExit:v,onExited:O,onExiting:R,style:x,timeout:T=a,TransitionComponent:P=WA}=t,L=Ke(t,ij),k=V.useRef(null),_=Bn(A.ref,k,n),J=F=>te=>{F&&(te===void 0?F(k.current):F(k.current,te))},Y=J((F,te)=>{Hl(p,F,f),Rd(F),m&&m(F,te)}),ee=J((F,te)=>{const W=Si({timeout:T,style:x,easing:C},{mode:"enter"});F.style.webkitTransition=r.transitions.create("-webkit-transform",U({},W)),F.style.transition=r.transitions.create("transform",U({},W)),F.style.webkitTransform="none",F.style.transform="none",B&&B(F,te)}),le=J(I),se=J(R),q=J(F=>{const te=Si({timeout:T,style:x,easing:C},{mode:"exit"});F.style.webkitTransition=r.transitions.create("-webkit-transform",te),F.style.transition=r.transitions.create("transform",te),Hl(p,F,f),v&&v(F)}),K=J(F=>{F.style.webkitTransition="",F.style.transition="",O&&O(F)}),z=F=>{l&&l(k.current,F)},Z=V.useCallback(()=>{k.current&&Hl(p,k.current,f)},[p,f]);return V.useEffect(()=>{if(h||p==="down"||p==="right")return;const F=Ep(()=>{k.current&&Hl(p,k.current,f)}),te=oi(k.current);return te.addEventListener("resize",F),()=>{F.clear(),te.removeEventListener("resize",F)}},[p,h,f]),V.useEffect(()=>{h||Z()},[h,Z]),g.jsx(P,U({nodeRef:k,onEnter:Y,onEntered:le,onEntering:ee,onExit:q,onExited:K,onExiting:se,addEndListener:z,appear:u,in:h,timeout:T},L,{children:(F,te)=>V.cloneElement(A,U({ref:_,style:U({visibility:F==="exited"&&!h?"hidden":void 0},x,A.props.style)},te))}))});process.env.NODE_ENV!=="production"&&(E0.propTypes={addEndListener:c.func,appear:c.bool,children:ni.isRequired,container:vr(c.oneOfType([bo,c.func]),e=>{if(e.open){const t=C0(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(`
202
+ `),eO)),dm=V.forwardRef(function(t,n){const r=Gt({props:t,name:"MuiCircularProgress"}),{className:i,color:a="primary",disableShrink:l=!1,size:u=40,style:A,thickness:f=3.6,value:p=0,variant:C="indeterminate"}=r,h=Ke(r,q4),m=U({},r,{color:a,disableShrink:l,size:u,thickness:f,value:p,variant:C}),I=tO(m),B={},v={},O={};if(C==="determinate"){const R=2*Math.PI*((oo-f)/2);B.strokeDasharray=R.toFixed(3),O["aria-valuenow"]=Math.round(p),B.strokeDashoffset=`${((100-p)/100*R).toFixed(3)}px`,v.transform="rotate(-90deg)"}return g.jsx(nO,U({className:Xe(I.root,i),style:U({width:u,height:u},v,A),ownerState:m,ref:n,role:"progressbar"},O,h,{children:g.jsx(rO,{className:I.svg,ownerState:m,viewBox:`${oo/2} ${oo/2} ${oo} ${oo}`,children:g.jsx(oO,{className:I.circle,style:B,ownerState:m,cx:oo,cy:oo,r:(oo-f)/2,fill:"none",strokeWidth:f})})}))});process.env.NODE_ENV!=="production"&&(dm.propTypes={classes:c.object,className:c.string,color:c.oneOfType([c.oneOf(["inherit","primary","secondary","error","info","success","warning"]),c.string]),disableShrink:vr(c.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:c.oneOfType([c.number,c.string]),style:c.object,sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),thickness:c.number,value:c.number,variant:c.oneOf(["determinate","indeterminate"])});const fm=dm;function iO(e){return Vt("MuiLoadingButton",e)}const Or=Yt("MuiLoadingButton",["root","loading","loadingIndicator","loadingIndicatorCenter","loadingIndicatorStart","loadingIndicatorEnd","endIconLoadingEnd","startIconLoadingStart"]),sO=["children","disabled","id","loading","loadingIndicator","loadingPosition","variant"],aO=e=>{const{loading:t,loadingPosition:n,classes:r}=e,i={root:["root",t&&"loading"],startIcon:[t&&`startIconLoading${Te(n)}`],endIcon:[t&&`endIconLoading${Te(n)}`],loadingIndicator:["loadingIndicator",t&&`loadingIndicator${Te(n)}`]},a=ur.unstable_composeClasses(i,iO,r);return U({},r,a)},lO=e=>e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"&&e!=="classes",cO=ue(X4,{shouldForwardProp:e=>lO(e)||e==="classes",name:"MuiLoadingButton",slot:"Root",overridesResolver:(e,t)=>[t.root,t.startIconLoadingStart&&{[`& .${Or.startIconLoadingStart}`]:t.startIconLoadingStart},t.endIconLoadingEnd&&{[`& .${Or.endIconLoadingEnd}`]:t.endIconLoadingEnd}]})(({ownerState:e,theme:t})=>U({[`& .${Or.startIconLoadingStart}, & .${Or.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}),[`&.${Or.loading}`]:{color:"transparent"}},e.loadingPosition==="start"&&e.fullWidth&&{[`& .${Or.startIconLoadingStart}, & .${Or.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginRight:-8}},e.loadingPosition==="end"&&e.fullWidth&&{[`& .${Or.startIconLoadingStart}, & .${Or.endIconLoadingEnd}`]:{transition:t.transitions.create(["opacity"],{duration:t.transitions.duration.short}),opacity:0,marginLeft:-8}})),uO=ue("span",{name:"MuiLoadingButton",slot:"LoadingIndicator",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.loadingIndicator,t[`loadingIndicator${Te(n.loadingPosition)}`]]}})(({theme:e,ownerState:t})=>U({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})),gm=V.forwardRef(function(t,n){const r=Gt({props:t,name:"MuiLoadingButton"}),{children:i,disabled:a=!1,id:l,loading:u=!1,loadingIndicator:A,loadingPosition:f="center",variant:p="text"}=r,C=Ke(r,sO),h=Bu(l),m=A??g.jsx(fm,{"aria-labelledby":h,color:"inherit",size:16}),I=U({},r,{disabled:a,loading:u,loadingIndicator:m,loadingPosition:f,variant:p}),B=aO(I),v=u?g.jsx(uO,{className:B.loadingIndicator,ownerState:I,children:m}):null;return g.jsxs(cO,U({disabled:a||u,id:h,ref:n},C,{variant:p,classes:B,ownerState:I,children:[I.loadingPosition==="end"?i:v,I.loadingPosition==="end"?v:i]}))});process.env.NODE_ENV!=="production"&&(gm.propTypes={children:c.node,classes:c.object,disabled:c.bool,id:c.string,loading:c.bool,loadingIndicator:c.node,loadingPosition:vr(c.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:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),variant:c.oneOfType([c.oneOf(["contained","outlined","text"]),c.string])});const AO=gm;function JA({variant:e,theme:t,color:n,loadingPosition:r}){const i=$t(t,n),{lighter:a,main:l,dark:u,contrastText:A}=i,f=`${n}Button`,p=bi(t,f),C={"& .MuiLoadingButton-loadingIndicator":{color:l}},h={...r&&r!=="center"&&{color:l}},m={"&::after":{boxShadow:`0 0 6px 6px ${Ne(l,.9)}`},"&:active::after":{boxShadow:`0 0 0 0 ${Ne(l,.9)}`},"&:focus-visible":{outline:`2px solid ${u}`,outlineOffset:2}};switch(e){case"contained":return{backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{backgroundColor:u,color:A},...m};case"light":return{backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{backgroundColor:u,color:A},...m};case"shadow":return{boxShadow:p,backgroundColor:l,...r&&r!=="center"&&{color:A},"& .MuiLoadingButton-loadingIndicator":{color:A},"&:hover":{boxShadow:"none",backgroundColor:u,color:A},...m};case"outlined":return{backgroundColor:"transparent",borderColor:l,...h,...C};case"dashed":return{backgroundColor:a,borderColor:l,...h,...C,...m};case"text":default:return{color:l,...C,...m}}}const dO=ue(AO,{shouldForwardProp:e=>e!=="shape"&&e!=="variant"})(({theme:e,variant:t,shape:n,color:r,loading:i,loadingPosition:a})=>({"::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"&&{...JA({variant:t,theme:e,color:r,loadingPosition:a}),"&.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")&&!i&&{color:"#fff"},...t!=="text"&&{...JA({variant:t,theme:e,color:r,loadingPosition:a})},"&.Mui-disabled":{...t!=="text"&&{...JA({variant:t,theme:e,color:r,loadingPosition:a})}}})),XA=S.forwardRef(({variant:e="text",shape:t,children:n,color:r="primary",...i},a)=>{const l=xt();return g.jsx(dO,{ref:a,variant:e,shape:t,theme:l,loadingPosition:i.loadingPosition,loading:i.loading,color:r,...i,children:n})});XA.propTypes={variant:c.string,shape:c.string,children:c.node,color:c.string},XA.displayName="LoadingButton";function fO({color:e,theme:t,labelColor:n}){const r=$t(t,e),{main:i,contrastText:a}=r;let l=e||"";return["primary","secondary","info","success","warning","error"].includes(l)?{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:i,color:n||a},[`& .${b.tooltipClasses.arrow}`]:{color:i}}:{[`& .${b.tooltipClasses.tooltip}`]:{backgroundColor:l,color:n||a,boxShadow:t.shadows[1]},[`& .${b.tooltipClasses.arrow}`]:{color:l}}}const gO=ue(({className:e,...t})=>g.jsx(b.Tooltip,{...t,classes:{popper:e}}),{shouldForwardProp:e=>e!=="color"&&e!=="labelColor"})(({theme:e,color:t,labelColor:n})=>({...t&&fO({color:t,theme:e,labelColor:n})}));function pm({children:e,arrow:t,labelColor:n="",...r}){const i=xt();return g.jsx(b.Box,{display:"flex",children:g.jsx(gO,{arrow:t,...r,theme:i,labelColor:n,children:e})})}pm.propTypes={children:c.element,arrow:c.bool,labelColor:c.string,rest:c.array};const io=S.forwardRef(({children:e,position:t="top-left",type:n="grow",direction:r="up",...i},a)=>{let l={transformOrigin:"0 0 0"};switch(t){case"top-right":l={transformOrigin:"top right"};break;case"top":l={transformOrigin:"top"};break;case"bottom-left":l={transformOrigin:"bottom left"};break;case"bottom-right":l={transformOrigin:"bottom right"};break;case"bottom":l={transformOrigin:"bottom"};break;case"top-left":default:l={transformOrigin:"0 0 0"};break}return g.jsxs(b.Box,{ref:a,children:[n==="grow"&&g.jsx(b.Grow,{...i,timeout:{appear:0,enter:150,exit:150},children:g.jsx(b.Box,{sx:l,children:e})}),n==="collapse"&&g.jsx(b.Collapse,{...i,sx:l,children:e}),n==="fade"&&g.jsx(b.Fade,{...i,timeout:{appear:0,enter:300,exit:150},children:g.jsx(b.Box,{sx:l,children:e})}),n==="slide"&&g.jsx(b.Slide,{...i,timeout:{appear:0,enter:150,exit:150},direction:r,children:g.jsx(b.Box,{sx:l,children:e})}),n==="zoom"&&g.jsx(b.Zoom,{...i,children:g.jsx(b.Box,{sx:l,children:e})})]})});io.propTypes={children:c.node,type:c.oneOf(["grow","fade","collapse","slide","zoom"]),position:c.oneOf(["top-left","top-right","top","bottom-left","bottom-right","bottom"]),direction:c.oneOf(["up","down","left","right"])},S.forwardRef(function(t,n){return g.jsx(b.Zoom,{ref:n,timeout:200,...t})});function hm({value:e,...t}){return g.jsxs(b.Box,{sx:{position:"relative",display:"inline-flex"},children:[g.jsx(b.CircularProgress,{variant:"determinate",value:e,...t}),g.jsx(b.Box,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:g.jsx(b.Typography,{variant:"caption",component:"div",color:"text.secondary",children:`${Math.round(e)}%`})})]})}hm.propTypes={value:c.number};function Cm({value:e,size:t,variant:n,thickness:r,showLabel:i,pathColor:a,sx:l,...u}){return g.jsxs(b.Box,{sx:{position:"relative",display:"inline-flex"},children:[g.jsx(b.CircularProgress,{variant:"determinate",sx:{color:a||"grey.200"},size:t,thickness:r,...u,value:100}),i&&g.jsx(b.Box,{sx:{top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"},children:g.jsx(b.Typography,{variant:"caption",component:"div",color:"text.secondary",children:e?`${Math.round(e)}%`:"0%"})}),g.jsx(b.CircularProgress,{variant:n,sx:{...l,position:"absolute",left:0,[`& .${b.circularProgressClasses.circle}`]:{strokeLinecap:"round"}},size:t,thickness:r,value:e,...u})]})}Cm.propTypes={value:c.number,size:c.number,variant:c.string,thickness:c.number,showLabel:c.bool,pathColor:c.string,sx:c.array,others:c.array};function Em({icon:e,value:t,...n}){return g.jsxs(b.Box,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(b.Box,{sx:{width:"100%",mr:1},children:g.jsx(b.LinearProgress,{variant:"determinate",value:t,...n})}),g.jsx(b.Box,{sx:{minWidth:35},children:e})]})}Em.propTypes={icon:c.node,value:c.number};function mm({value:e,...t}){return g.jsxs(b.Box,{sx:{display:"flex",alignItems:"center"},children:[g.jsx(b.Box,{sx:{width:"100%",mr:1},children:g.jsx(b.LinearProgress,{variant:"determinate",value:e,...t})}),g.jsx(b.Box,{sx:{minWidth:35},children:g.jsx(b.Typography,{variant:"body2",color:"text.secondary",children:`${Math.round(e)}%`})})]})}mm.propTypes={value:c.number};const pO=ai(M.Toolbar,{name:"RaApplicaToolbar",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)}})),Mr=e=>g.jsx(pO,{...e});Mr.defaultProps={...M.Toolbar.defaultProps},Mr.propTypes={...M.Toolbar.propTypes};const ZA=({children:e,content:t,title:n,subheader:r,secondary:i,toolbar:a,...l})=>{const u=M.useTranslate(),A=M.useResourceContext(),{cardTitle:f,cardSubheader:p}=S.useMemo(()=>{const C=n||`resources.${A}.title`;return{cardTitle:u(C,{_:C}),cardSubheader:r!==null?u(r,{_:r}):null}},[A,r,n,u]);return g.jsx(b.Grid,{item:!0,...l,children:g.jsx(Nn,{content:t,title:f,subheader:p,secondary:i,divider:!0,children:g.jsxs(S.Fragment,{children:[e,a===!0?g.jsx(Mr,{children:g.jsx(M.SaveButton,{})}):a]})})})};ZA.defaultProps={...b.Grid.defaultProps,content:!0,subheader:null,title:null,secondary:null,toolbar:!1,item:!0,lg:12,md:12,sm:12,xs:12},ZA.propTypes={...b.Grid.propTypes,children:c.oneOfType([c.node,c.arrayOf(c.node)]),contained:c.bool,content:c.bool,subheader:c.oneOfType([c.string,c.node]),title:c.oneOfType([c.string,c.node]),secondary:c.oneOfType([c.node,c.string,c.object]),spacing:c.number,toolbar:c.oneOfType([c.node,c.bool])};const hO=ue(M.Form,{name:"RaApplicaCardForm",slot:"root"})(({theme:e,spacing:t})=>({backgroundColor:"transparent","& .RaToolbar-desktopToolbar":{marginTop:e.spacing(t*2),padding:0}})),bl=({children:e,spacing:t,defaultValues:n,...r})=>{const{spacing:i}=Fn();return g.jsx(hO,{defaultValues:n,spacing:t||i,children:g.jsx(b.Grid,{container:!0,...r,spacing:t||i,children:e})})};bl.propTypes={...b.Grid.propTypes,...M.Form.propTypes,children:c.oneOfType([c.node,c.arrayOf(c.node)]),spacing:c.number,defaultValues:c.oneOfType([c.object,c.func]),record:c.object,validate:c.func},bl.defaultProps={...b.Stack.defaultProps},bl.Section=ZA;const CO=ai(M.SimpleForm,{name:"RaApplicaSimpleForm",slot:"Root"})(({theme:e,modal:t})=>({"& .MuiGrid-root.MuiGrid-container":{paddingBottom:e.spacing(t?2:1)}})),Ql=({title:e,modal:t,content:n,subheader:r,secondary:i,sx:a,...l})=>{const u=Ah(e),A=M.useRecordContext();return g.jsx(Nn,{content:n,title:u,subheader:r,secondary:A!=null&&A.id?i:null,sx:a,border:!t,divider:!0,children:g.jsx(CO,{toolbar:g.jsx(Mr,{}),...l})})};Ql.defaultProps={modal:!1,content:!1,subheader:null,title:null,toolbar:g.jsx(Mr,{children:g.jsx(M.SaveButton,{type:"button"})}),secondary:g.jsx(fi,{children:g.jsx(M.DeleteWithConfirmButton,{})})},Ql.propTypes={...M.SimpleForm.propTypes,modal:c.bool,content:c.bool,contained:c.bool,subheader:c.oneOfType([c.string,c.node]),title:c.oneOfType([c.string,c.node]),secondary:c.oneOfType([c.node,c.string,c.object])};const xl=({label:e,children:t,display:n,helperText:r,sx:i,addLabel:a,divider:l,...u})=>{const A=Ut.useTheme(),{getCurrentDialog:f}=xo(),{source:p,resource:C,isRequired:h}=u,{getFieldState:m,formState:I}=va.useFormContext(),{error:B}=m(p,I),v=f();return g.jsxs(b.Stack,{spacing:1,sx:{"& .MuiFormHelperText-root":{color:B?A.palette.error.main:A.palette.text.secondary,"& span":{display:"none"}},...i},children:[n==="label"&&e!==!1&&a!==!1&&g.jsx(b.InputLabel,{error:!!B,sx:{borderBottom:l?`1px solid ${A.palette.divider}`:"none",pb:l?1:0,mt:l?1:0},children:g.jsx(M.FieldTitle,{label:e,source:p,resource:v||C,isRequired:h})}),S.isValidElement(t)?S.cloneElement(t,{...t.props,...u,label:n==="legend"?e:!1}):t,n==="label"&&r&&g.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:!!B,children:r})]})};xl.propTypes={sx:c.object,children:c.element,label:c.oneOfType([c.string,c.bool]),addLabel:c.bool,resource:c.string,isRequired:c.bool,source:c.string,display:c.oneOf(["legend","label"]),helperText:c.oneOfType([c.string,c.bool]),divider:c.bool},xl.defaultProps={display:"label",divider:!1};const EO=ue(M.ArrayInput,{name:"ApplicaArrayInput",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%"}}})),mO=({label:e,addLabel:t,source:n,helperText:r,divider:i=!0,...a})=>g.jsx(xl,{label:e,addLabel:t,source:n,helperText:r,divider:i,children:g.jsx(EO,{source:n,label:!1,...a})}),qA=({canEdit:e,canDelete:t,canClone:n})=>!e&&!t&&!n?null:g.jsxs(fi,{children:[e&&g.jsx(M.EditButton,{}),t&&g.jsx(M.DeleteWithConfirmButton,{}),n&&g.jsx(M.CloneButton,{})]});qA.defaultProps={canEdit:!0,canDelete:!0,canClone:!1},qA.propTypes={canEdit:c.bool,canDelete:c.bool,canClone:c.bool};const Im=ue("div",{name:"ApplicaBaseAttachmentField",overridesResolver:(e,t)=>t.root})({display:"inline-block"}),IO=ue("ul")({display:"inline-block"}),Bm=e=>{var p;const{className:t,emptyText:n,source:r,title:i,...a}=e,l=be.useRecordContext(e),u=st.get(l,r),A=be.useTranslate();if(!u)return n?g.jsx(b.Typography,{component:"span",variant:"body2",className:t,...a,children:n&&A(n,{_:n})}):g.jsx(Im,{className:t,...a});if(Array.isArray(u))return g.jsx(IO,{className:t,...a,children:u.map((C,h)=>{var I;const m=i instanceof String?(I=st.get(C,i))==null?void 0:I.toString():i;return g.jsx("li",{children:m},h)})});const f=i instanceof String?(p=st.get(l,i))==null?void 0:p.toString():i;return g.jsx(Im,{className:t,...a,children:f})};Bm.propTypes={className:c.string,emptyText:c.string,source:c.string.isRequired,src:c.string,title:c.oneOfType([c.string,c.element]),target:c.string,download:c.oneOfType([c.bool,c.string]),ping:c.string,rel:c.string};var ym={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(kn,function(){var n=1e3,r=6e4,i=36e5,a="millisecond",l="second",u="minute",A="hour",f="day",p="week",C="month",h="quarter",m="year",I="date",B="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,O=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,R={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(q){var K=["th","st","nd","rd"],z=q%100;return"["+q+(K[(z-20)%10]||K[z]||K[0])+"]"}},x=function(q,K,z){var Z=String(q);return!Z||Z.length>=K?q:""+Array(K+1-Z.length).join(z)+q},T={s:x,z:function(q){var K=-q.utcOffset(),z=Math.abs(K),Z=Math.floor(z/60),F=z%60;return(K<=0?"+":"-")+x(Z,2,"0")+":"+x(F,2,"0")},m:function q(K,z){if(K.date()<z.date())return-q(z,K);var Z=12*(z.year()-K.year())+(z.month()-K.month()),F=K.clone().add(Z,C),te=z-F<0,W=K.clone().add(Z+(te?-1:1),C);return+(-(Z+(z-F)/(te?F-W:W-F))||0)},a:function(q){return q<0?Math.ceil(q)||0:Math.floor(q)},p:function(q){return{M:C,y:m,w:p,d:f,D:I,h:A,m:u,s:l,ms:a,Q:h}[q]||String(q||"").toLowerCase().replace(/s$/,"")},u:function(q){return q===void 0}},P="en",L={};L[P]=R;var k="$isDayjsObject",_=function(q){return q instanceof le||!(!q||!q[k])},J=function q(K,z,Z){var F;if(!K)return P;if(typeof K=="string"){var te=K.toLowerCase();L[te]&&(F=te),z&&(L[te]=z,F=te);var W=K.split("-");if(!F&&W.length>1)return q(W[0])}else{var X=K.name;L[X]=K,F=X}return!Z&&F&&(P=F),F||!Z&&P},Y=function(q,K){if(_(q))return q.clone();var z=typeof K=="object"?K:{};return z.date=q,z.args=arguments,new le(z)},ee=T;ee.l=J,ee.i=_,ee.w=function(q,K){return Y(q,{locale:K.$L,utc:K.$u,x:K.$x,$offset:K.$offset})};var le=function(){function q(z){this.$L=J(z.locale,null,!0),this.parse(z),this.$x=this.$x||z.x||{},this[k]=!0}var K=q.prototype;return K.parse=function(z){this.$d=function(Z){var F=Z.date,te=Z.utc;if(F===null)return new Date(NaN);if(ee.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var W=F.match(v);if(W){var X=W[2]-1||0,de=(W[7]||"0").substring(0,3);return te?new Date(Date.UTC(W[1],X,W[3]||1,W[4]||0,W[5]||0,W[6]||0,de)):new Date(W[1],X,W[3]||1,W[4]||0,W[5]||0,W[6]||0,de)}}return new Date(F)}(z),this.init()},K.init=function(){var z=this.$d;this.$y=z.getFullYear(),this.$M=z.getMonth(),this.$D=z.getDate(),this.$W=z.getDay(),this.$H=z.getHours(),this.$m=z.getMinutes(),this.$s=z.getSeconds(),this.$ms=z.getMilliseconds()},K.$utils=function(){return ee},K.isValid=function(){return this.$d.toString()!==B},K.isSame=function(z,Z){var F=Y(z);return this.startOf(Z)<=F&&F<=this.endOf(Z)},K.isAfter=function(z,Z){return Y(z)<this.startOf(Z)},K.isBefore=function(z,Z){return this.endOf(Z)<Y(z)},K.$g=function(z,Z,F){return ee.u(z)?this[Z]:this.set(F,z)},K.unix=function(){return Math.floor(this.valueOf()/1e3)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(z,Z){var F=this,te=!!ee.u(Z)||Z,W=ee.p(z),X=function(he,me){var xe=ee.w(F.$u?Date.UTC(F.$y,me,he):new Date(F.$y,me,he),F);return te?xe:xe.endOf(f)},de=function(he,me){return ee.w(F.toDate()[he].apply(F.toDate("s"),(te?[0,0,0,0]:[23,59,59,999]).slice(me)),F)},ge=this.$W,ce=this.$M,Ae=this.$D,pe="set"+(this.$u?"UTC":"");switch(W){case m:return te?X(1,0):X(31,11);case C:return te?X(1,ce):X(0,ce+1);case p:var Ie=this.$locale().weekStart||0,Ee=(ge<Ie?ge+7:ge)-Ie;return X(te?Ae-Ee:Ae+(6-Ee),ce);case f:case I:return de(pe+"Hours",0);case A:return de(pe+"Minutes",1);case u:return de(pe+"Seconds",2);case l:return de(pe+"Milliseconds",3);default:return this.clone()}},K.endOf=function(z){return this.startOf(z,!1)},K.$set=function(z,Z){var F,te=ee.p(z),W="set"+(this.$u?"UTC":""),X=(F={},F[f]=W+"Date",F[I]=W+"Date",F[C]=W+"Month",F[m]=W+"FullYear",F[A]=W+"Hours",F[u]=W+"Minutes",F[l]=W+"Seconds",F[a]=W+"Milliseconds",F)[te],de=te===f?this.$D+(Z-this.$W):Z;if(te===C||te===m){var ge=this.clone().set(I,1);ge.$d[X](de),ge.init(),this.$d=ge.set(I,Math.min(this.$D,ge.daysInMonth())).$d}else X&&this.$d[X](de);return this.init(),this},K.set=function(z,Z){return this.clone().$set(z,Z)},K.get=function(z){return this[ee.p(z)]()},K.add=function(z,Z){var F,te=this;z=Number(z);var W=ee.p(Z),X=function(ce){var Ae=Y(te);return ee.w(Ae.date(Ae.date()+Math.round(ce*z)),te)};if(W===C)return this.set(C,this.$M+z);if(W===m)return this.set(m,this.$y+z);if(W===f)return X(1);if(W===p)return X(7);var de=(F={},F[u]=r,F[A]=i,F[l]=n,F)[W]||1,ge=this.$d.getTime()+z*de;return ee.w(ge,this)},K.subtract=function(z,Z){return this.add(-1*z,Z)},K.format=function(z){var Z=this,F=this.$locale();if(!this.isValid())return F.invalidDate||B;var te=z||"YYYY-MM-DDTHH:mm:ssZ",W=ee.z(this),X=this.$H,de=this.$m,ge=this.$M,ce=F.weekdays,Ae=F.months,pe=F.meridiem,Ie=function(me,xe,ae,ze){return me&&(me[xe]||me(Z,te))||ae[xe].slice(0,ze)},Ee=function(me){return ee.s(X%12||12,me,"0")},he=pe||function(me,xe,ae){var ze=me<12?"AM":"PM";return ae?ze.toLowerCase():ze};return te.replace(O,function(me,xe){return xe||function(ae){switch(ae){case"YY":return String(Z.$y).slice(-2);case"YYYY":return ee.s(Z.$y,4,"0");case"M":return ge+1;case"MM":return ee.s(ge+1,2,"0");case"MMM":return Ie(F.monthsShort,ge,Ae,3);case"MMMM":return Ie(Ae,ge);case"D":return Z.$D;case"DD":return ee.s(Z.$D,2,"0");case"d":return String(Z.$W);case"dd":return Ie(F.weekdaysMin,Z.$W,ce,2);case"ddd":return Ie(F.weekdaysShort,Z.$W,ce,3);case"dddd":return ce[Z.$W];case"H":return String(X);case"HH":return ee.s(X,2,"0");case"h":return Ee(1);case"hh":return Ee(2);case"a":return he(X,de,!0);case"A":return he(X,de,!1);case"m":return String(de);case"mm":return ee.s(de,2,"0");case"s":return String(Z.$s);case"ss":return ee.s(Z.$s,2,"0");case"SSS":return ee.s(Z.$ms,3,"0");case"Z":return W}return null}(me)||W.replace(":","")})},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(z,Z,F){var te,W=this,X=ee.p(Z),de=Y(z),ge=(de.utcOffset()-this.utcOffset())*r,ce=this-de,Ae=function(){return ee.m(W,de)};switch(X){case m:te=Ae()/12;break;case C:te=Ae();break;case h:te=Ae()/3;break;case p:te=(ce-ge)/6048e5;break;case f:te=(ce-ge)/864e5;break;case A:te=ce/i;break;case u:te=ce/r;break;case l:te=ce/n;break;default:te=ce}return F?te:ee.a(te)},K.daysInMonth=function(){return this.endOf(C).$D},K.$locale=function(){return L[this.$L]},K.locale=function(z,Z){if(!z)return this.$L;var F=this.clone(),te=J(z,Z,!0);return te&&(F.$L=te),F},K.clone=function(){return ee.w(this.$d,this)},K.toDate=function(){return new Date(this.valueOf())},K.toJSON=function(){return this.isValid()?this.toISOString():null},K.toISOString=function(){return this.$d.toISOString()},K.toString=function(){return this.$d.toUTCString()},q}(),se=le.prototype;return Y.prototype=se,[["$ms",a],["$s",l],["$m",u],["$H",A],["$W",f],["$M",C],["$y",m],["$D",I]].forEach(function(q){se[q[1]]=function(K){return this.$g(K,q[0],q[1])}}),Y.extend=function(q,K){return q.$i||(q(K,le,Y),q.$i=!0),Y},Y.locale=J,Y.isDayjs=_,Y.unix=function(q){return Y(1e3*q)},Y.en=L[P],Y.Ls=L,Y.p={},Y})})(ym);var BO=ym.exports;const Dr=ti(BO),$A=({entityId:e,property:t,disabled:n,userResource:r="entities/user",...i})=>{const[a,l]=S.useState(null),u=M.useRecordContext(i),A=M.useDataProvider(),f=M.useResourceContext(),p=S.useCallback(async m=>{m.preventDefault(),m.stopPropagation();const I=st.get(u,i==null?void 0:i.source),B=f.replace("entities/",""),v=await A.getFile(`/attachments/${B}/${e||(u==null?void 0:u.id)}/${t||(i==null?void 0:i.source)}/${(I==null?void 0:I.id)||(u==null?void 0:u.id)}`),O=document.createElement("a");O.href=v,O.download=st.get(u,(i==null?void 0:i.title)||(i==null?void 0:i.source)),O.click()},[A,u,e,f,t,i==null?void 0:i.source,i==null?void 0:i.title]),C=S.useMemo(()=>({...u,[i==null?void 0:i.source]:(u==null?void 0:u.src)||st.get(u,i==null?void 0:i.source),[i==null?void 0:i.title]:(u==null?void 0:u.title)||st.get(u,(i==null?void 0:i.title)||(i==null?void 0:i.source))}),[u,i==null?void 0:i.source,i==null?void 0:i.title]),h=M.useTranslate();return S.useEffect(()=>{!u||!(u!=null&&u.userId)||A.getOne(r,{id:u==null?void 0:u.userId}).then(({data:m})=>l(m)).catch(()=>l(null))},[u,A,r]),g.jsx(Bm,{...i,disabled:n,record:C,onClick:p,title:g.jsxs(b.Box,{sx:{cursor:"pointer"},children:[g.jsx(b.Typography,{variant:"subtitle1",children:st.get(C,(i==null?void 0:i.title)||(i==null?void 0:i.source))}),g.jsxs(b.Typography,{variant:"caption",color:"secondary",children:[st.get(C,"sizeDescription"),a&&" | ",a&&h("ra.attachment.info",{user:a==null?void 0:a.name,created:Dr(C==null?void 0:C.createdAt).format("DD/MM/YYYY HH:mm")})]})]})})};$A.propTypes={...M.FileField.propTypes,source:c.string,title:c.string,disabled:c.bool};const yO=ue(M.ImageField,{name:"RaApplicaImageField",slot:"root"})(()=>({})),Ds=e=>{const t=`_${e==null?void 0:e.source}`;return g.jsx(yO,{...e,source:t})};Ds.propTypes={...M.ImageField.propTypes,source:c.string};const wl=({width:e,height:t,circle:n,justify:r,record:i,...a})=>{const l=S.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]),u=M.useRecordContext(),A=i||u;return g.jsx(Ds,{sx:f=>({margin:0,display:"flex",justifyContent:r,"& img":{margin:"0px !important",border:`1px solid ${f.palette.divider}`,objectFit:"cover !important",...l,minWidth:l.width,minHeight:l.height}}),...a,record:A})};wl.defaultProps={...Ds.defaultProps,width:150,height:150,circle:!1,justify:"flex-start"},wl.propTypes={...Ds.propTypes,width:c.oneOfType([c.number,c.string]),height:c.oneOfType([c.number,c.string]),circle:c.bool,justify:c.oneOf(["flex-start","center","flex-end"])};var vm={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(kn,function(){return function(n,r,i){n=n||{};var a=r.prototype,l={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 u(f,p,C,h){return a.fromToBase(f,p,C,h)}i.en.relativeTime=l,a.fromToBase=function(f,p,C,h,m){for(var I,B,v,O=C.$locale().relativeTime||l,R=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"}],x=R.length,T=0;T<x;T+=1){var P=R[T];P.d&&(I=h?i(f).diff(C,P.d,!0):C.diff(f,P.d,!0));var L=(n.rounding||Math.round)(Math.abs(I));if(v=I>0,L<=P.r||!P.r){L<=1&&T>0&&(P=R[T-1]);var k=O[P.l];m&&(L=m(""+L)),B=typeof k=="string"?k.replace("%d",L):k(L,p,P.l,v);break}}if(p)return B;var _=v?O.future:O.past;return typeof _=="function"?_(B):_.replace("%s",B)},a.to=function(f,p){return u(f,p,this,!0)},a.from=function(f,p){return u(f,p,this)};var A=function(f){return f.$u?i.utc():i()};a.toNow=function(f){return this.to(A(this),f)},a.fromNow=function(f){return this.from(A(this),f)}}})})(vm);var vO=vm.exports;const bO=ti(vO);Dr.extend(bO);const Tl=e=>{const t=M.useRecordContext(e),[n]=M.useLocaleState(),r=S.useMemo(()=>Dr(st.get(t,e==null?void 0:e.source)).locale(n).fromNow(),[t,e==null?void 0:e.source,n]);return g.jsxs(S.Fragment,{children:[g.jsx(M.DateField,{record:t,source:e.source,showTime:!0}),g.jsx("br",{}),g.jsx(b.Typography,{variant:"caption",color:"textSecondary",children:r})]})};Tl.displayName="DateAgoField",Tl.propTypes={source:c.string.isRequired};const bm=ue(M.DateField,{name:"RaApplicaDateField",slot:"Root"})(()=>({}));bm.propTypes={...M.DateField.propTypes};const ed=e=>g.jsx(bm,{...e});ed.defaultProps={...M.DateField.defaultProps,variant:"body1"},ed.propTypes={...M.DateField.propTypes};const Qm=ue(M.EmailField,{name:"RaApplicaEmailField",slot:"Root"})(()=>({}));Qm.propTypes={...M.EmailField.propTypes};const td=e=>g.jsx(Qm,{...e});td.defaultProps={...M.EmailField.defaultProps,variant:"body1"},td.propTypes={...M.EmailField.propTypes};const QO=ue(M.FileField,{name:"RaApplicaFileField",slot:"root"})(()=>({})),nd=({...e})=>{const t=M.useRecordContext(e),n=S.useCallback(r=>{r.preventDefault(),r.stopPropagation();const i=st.get(t,`_${e==null?void 0:e.source}`,st.get(t,e==null?void 0:e.source)),a=st.get(t,(e==null?void 0:e.title)||(e==null?void 0:e.source))||(e==null?void 0:e.title),l=document.createElement("a");l.href=i,l.download=a,l.click()},[e==null?void 0:e.source,t,e==null?void 0:e.title]);return g.jsx(QO,{...e,record:t,onClick:n})};nd.propTypes={...M.FileField.propTypes,source:c.string,title:c.string};const xm=e=>g.jsx(M.FunctionField,{...e});xm.defaultProps={variant:"body1"};const xO=ue("div")(({theme:e})=>({borderBottom:`1px solid ${e.palette.divider}`,paddingTop:e.spacing(1),paddingBottom:e.spacing(1),marginBottom:e.spacing(1),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",[e.breakpoints.down("sm")]:{whiteSpace:"normal",overflow:"visible",textOverflow:"inherit"}})),rd=({source:e,defaultValue:t,...n})=>{const r=M.useRecordContext(n),i=st.get(r,e,t);return g.jsx("span",{dangerouslySetInnerHTML:{__html:i&&i!==null?i:t}})};rd.propTypes={defaultValue:c.any,source:c.string,record:c.object},rd.defaultProps={defaultValue:"&nbsp;"};const wm=({title:e,children:t})=>e&&e!==!1?g.jsx(b.Tooltip,{title:e,placement:"top",children:t}):t;wm.propTypes={title:c.oneOfType([c.string,c.bool]),children:c.oneOfType([c.element,c.arrayOf(c.element)])};const od=({label:e,source:t,defaultValue:n,children:r,tooltip:i,...a})=>{const{getCurrentDialog:l}=xo(),u=M.useRecordContext(a),A=M.useResourceContext(a),f=l(),p=S.useMemo(()=>!i||i===!1?!1:typeof i=="function"?i(u):typeof i=="string"?st.get(u,i,i):i,[u,i]);return g.jsx(wm,{title:p,children:g.jsxs(S.Fragment,{children:[g.jsx(b.InputLabel,{children:g.jsx(M.FieldTitle,{label:e,source:t,resource:f||A})}),g.jsx(xO,{...a,children:S.cloneElement(r,{source:t,record:u,defaultValue:n,resource:f||A})})]})})};od.propTypes={defaultValue:c.any,tooltip:c.oneOfType([c.string,c.bool,c.func]),source:c.string,label:c.string,name:c.string,children:c.element},od.defaultProps={defaultValue:"&nbsp;",children:g.jsx(rd,{})};const wO=ai("div",{name:"RaApplicaReferenceManyField",slot:"root"})(({theme:e,margin:t,border:n})=>({marginLeft:t?0:`-${e.spacing(2.5)}`,marginRight:t?0:`-${e.spacing(2.5)}`,borderBottom:n?`1px solid ${e.palette.divider}`:"none","& form":{padding:e.spacing(2)},"& .MuiCardContent-root":{borderTop:n?`1px solid ${e.palette.divider}`:"none"},"& .MuiToolbar-root":{[e.breakpoints.up("sm")]:{marginTop:`-${e.spacing(2)}`,marginBottom:e.spacing(t?0:1),marginLeft:e.spacing(t?1:2),marginRight:e.spacing(t?1:2.5),width:t?"auto":`calc(100% - ${e.spacing(5)})`},[e.breakpoints.down("md")]:{marginTop:0}},"& .RaDatagrid-root":{overflowX:"auto",paddingTop:48,[e.breakpoints.down("sm")]:{width:"calc(100vw - 34px)"}},"& .RaDatagrid-table":{borderBottom:`1px solid ${e.palette.divider}`},"& .MuiTablePagination-toolbar":{marginTop:e.spacing(1),marginBottom:0},"& .RaBulkActionsToolbar-collapsed.RaBulkActionsToolbar-toolbar":{minHeight:0},"& .RaBulkActionsToolbar-toolbar":{minHeight:48,bottom:-56,"& h6":{marginTop:e.spacing(.5)},"& .RaBulkActionsToolbar-topToolbar":{marginTop:e.spacing(1)},[e.breakpoints.down("sm")]:{bottom:-48,borderRadius:0}}})),Qi=e=>g.jsx(wO,{children:g.jsx(M.ReferenceManyField,{...e})});Qi.defaultProps={...M.ReferenceManyField.defaultProps,margin:!1,border:!1},Qi.propTypes={...M.ReferenceManyField.propTypes,margin:c.bool,border:c.bool};const Tm=({source:e,...t})=>{const n=M.useRecordContext(t),r=st.get(n,e,0),i=r/1024,a=i/1024,l=a/1024,u=l>1?`${l.toFixed(2)} GB`:a>1?`${a.toFixed(2)} MB`:i>1?`${i.toFixed(2)} KB`:`${r.toFixed(2)} B`;return g.jsx(b.Typography,{component:"span",variant:"body1",...t,children:u})};Tm.propTypes={record:c.object,source:c.string};const Pm=ue(M.TextField,{name:"RaApplicaTextField",slot:"Root"})(()=>({}));Pm.propTypes={...M.TextField.propTypes};const id=e=>g.jsx(Pm,{...e});id.defaultProps={...M.TextField.defaultProps,variant:"body1"},id.propTypes={...M.TextField.propTypes};const at=({label:e,children:t,display:n,helperText:r,sx:i,addLabel:a,divider:l,...u})=>{const A=Ut.useTheme(),{getCurrentDialog:f}=xo(),{source:p,resource:C,isRequired:h}=u,{fieldState:{invalid:m}}=M.useInput(u),I=f();return g.jsxs(b.Stack,{spacing:1,sx:{width:u!=null&&u.fullWidth?"100%":"auto","& .MuiFormHelperText-root":{color:m?A.palette.error.main:A.palette.text.secondary,"& span":{display:"none"}},...i},children:[n==="label"&&e!==!1&&a!==!1&&g.jsx(b.InputLabel,{error:m===!0,sx:{borderBottom:l?`1px solid ${A.palette.divider}`:"none",pb:l?1:0,mt:l?1:0},children:g.jsx(M.FieldTitle,{label:e,source:p,resource:I||C,isRequired:h})}),S.isValidElement(t)?S.cloneElement(t,{...t.props,...u,label:n==="legend"?e:!1}):t,n==="label"&&r&&g.jsx(b.FormHelperText,{sx:{pl:1.8,pb:2,marginTop:"0 !important"},error:m===!0,children:r})]})};at.propTypes={sx:c.object,children:c.element,label:c.oneOfType([c.string,c.bool]),addLabel:c.bool,resource:c.string,isRequired:c.bool,source:c.string,display:c.oneOf(["legend","label"]),helperText:c.oneOfType([c.string,c.bool]),divider:c.bool},at.defaultProps={display:"label",divider:!1};const TO=e=>e?{"& .RaFileInput-removeButton > .RaFileInputPreview-removeButton":{display:"none",visiblity:"hidden"},"& .RaFileInput-dropZone":{display:"none",visiblity:"hidden"}}:{},PO=ue(M.FileInput,{name:"RaApplicaFileInput",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}},...TO(e)})),sd=({children:e,disabled:t,type:n,...r})=>{const i=M.useRecordContext(r),a=r==null?void 0:r.source,l=i==null?void 0:i.id;return M.useInput({source:`__${n}__${r==null?void 0:r.source}`,defaultValue:r==null?void 0:r.source}),g.jsx(at,{...r,children:g.jsx(PO,{disabled:t,children:S.cloneElement(e,{...e.props,entityId:l,property:a})})})};sd.propTypes={...M.FileInput.propTypes,children:c.node,multiple:c.bool,disabled:c.bool},sd.defaultProps={children:g.jsx($A,{title:"name",source:"path"}),multiple:!0,disabled:!1,type:"attachment"};const SO=ue(M.AutocompleteArrayInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"},'& label.MuiFormLabel-root[data-shrink="false"]':{minHeight:"18px"}})),ad=({...e})=>g.jsx(at,{...e,children:g.jsx(SO,{})});ad.propTypes={...M.AutocompleteArrayInput.propTypes,...at.propTypes},ad.defaultProps={...M.AutocompleteArrayInput.defaultProps,size:"small"};const OO=ue(M.AutocompleteInput,{name:"StyledAutocompleteInput",root:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},'& label.MuiFormLabel-root[data-shrink="false"]':{minHeight:"18px"},"& .MuiAutocomplete-inputRoot":{padding:"0px 9px"},"& .MuiOutlinedInput-root.MuiInputBase-sizeSmall":{paddingTop:"4px"}})),ld=e=>{const{perPage:t,...n}=e;return g.jsx(at,{...n,children:g.jsx(OO,{})})};ld.propTypes={...M.AutocompleteInput.propTypes,...at.propTypes},ld.defaultProps={...M.AutocompleteInput.defaultProps,size:"small"};const MO=ue(M.BooleanInput,{name:"RaApplicaBooleanInput",slot:"Root"})(()=>({})),cd=({horizontal:e,...t})=>{const n=xt();return g.jsx(at,{...t,sx:e?{flexDirection:e?"row":"column",alignItems:e?"center":"flex-start","& .MuiFormGroup-root":{margin:0},"& .MuiFormControlLabel-root":{margin:0,"& .MuiTypography-root":{display:"none",visibility:"hidden"},"& .MuiSwitch-root":{marginRight:`-${n.spacing(.5)}`}}}:{},children:g.jsx(MO,{})})};cd.defaultProps={...M.BooleanInput.defaultProps,...at.defaultProps},cd.propTypes={...M.BooleanInput.propTypes,...at.propTypes,horizontal:c.bool};const DO=ue(M.DateInput,{name:"RaApplicaDateInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),ud=e=>g.jsx(at,{...e,children:g.jsx(DO,{})});ud.propTypes={...M.DateInput.propTypes,...at.propTypes},ud.defaultProps={...M.DateInput.defaultProps,...at.defaultProps};const RO=ue(M.DateTimeInput,{name:"RaApplicaDateTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),Ad=e=>g.jsx(at,{...e,children:g.jsx(RO,{})});Ad.propTypes={...M.DateTimeInput.propTypes,...at.propTypes},Ad.defaultProps={...at.defaultProps};const jO=ue(M.FileInput,{name:"RaApplicaFileInput",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}}})),dd=({children:e,title:t,...n})=>{const r=va.useWatch({name:n.source}),i=M.useRecordContext(n),{source:a}=n,l=S.useMemo(()=>{if(r&&(r!=null&&r.title))return r==null?void 0:r.title;const u=st.get(i,a);if(u){const A=u.split("__");return A.length>0?A[A.length-1]:u}return u},[i,a,r]);return g.jsx(at,{...n,children:g.jsx(jO,{children:S.cloneElement(e,{...e.props,title:t||a,source:a,record:{...i,[a]:(r==null?void 0:r.title)||st.get(i,a),[`_${a}`]:(r==null?void 0:r.src)||st.get(i,`_${a}`),[t||a]:l}})})})};dd.propTypes={...M.FileInput.propTypes,source:c.string,title:c.string,children:c.node},dd.defaultProps={children:g.jsx(nd,{})};const fd=({children:e,title:t,...n})=>{const r=va.useWatch({name:n.source}),i=M.useRecordContext(n),{source:a}=n;return M.useInput({source:`__image__${n==null?void 0:n.source}`,defaultValue:n==null?void 0:n.source}),g.jsx(at,{...n,children:g.jsx(M.ImageInput,{accept:"image/*",children:S.cloneElement(e,{...e.props,title:t,source:a,record:{...i,[a]:(r==null?void 0:r.title)||st.get(i,a),[`_${a}`]:(r==null?void 0:r.src)||st.get(i,`_${a}`)}})})})};fd.defaultProps={children:g.jsx(wl,{}),multiple:!1},fd.propTypes={...M.ImageInput.propTypes,source:c.string,title:c.string,children:c.node,multiple:c.bool};const kO=ue(M.NumberInput,{name:"RaApplicaNumberInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),gd=e=>g.jsx(at,{...e,children:g.jsx(kO,{})});gd.propTypes={...M.NumberInput.propTypes,...at.propTypes},gd.defaultProps={...M.NumberInput.defaultProps,...at.defaultProps};const Sm=({source:e,minWidth:t=300,children:n})=>{const r=M.useResourceContext(),i=M.useRecordContext(),[a,l]=S.useState(st.get(i,e,"")),[u,A]=S.useState(!1),f=S.useCallback(I=>l(I.target.value),[]),p=M.useDataProvider(),C=S.useCallback(I=>{I.key==="Enter"&&(A(!0),p.update(r,{id:i.id,data:{...i,[e]:a,_changed:e}}).then(()=>A(!1)))},[a,p,r,i,e]),h=S.useCallback(()=>{st.get(i,e)!==a&&(A(!0),p.update(r,{id:i.id,data:{...i,[e]:a,_changed:e}}).then(()=>A(!1)))},[a,p,r,e,i]),m=S.useCallback(I=>{A(!0),p.update(r,{id:i.id,data:{...i,[e]:I,_changed:e}}).then(()=>A(!1))},[p,r,e,i]);return S.useEffect(()=>l(st.get(i,e)),[i,e]),n?S.cloneElement(n,{...n.props,source:e,value:a,onChange:m}):g.jsx(b.TextField,{value:a,disabled:u,onChange:f,onKeyPress:C,onBlur:h,style:{minWidth:t,width:"100%"},multiline:!0,InputProps:{"arial-label":"naked"},size:"small"})};Sm.propTypes={source:c.string.isRequired,minWidth:c.number,children:c.element};const pd=({children:e,...t})=>g.jsx(M.ReferenceArrayInput,{...t,children:S.cloneElement(e,{...t,source:e.props.source||t.source})});pd.propTypes={...M.ReferenceArrayInput.propTypes,children:c.element},pd.defaultProps={...M.ReferenceArrayInput.defaultProps};const hd=({children:e,...t})=>g.jsx(M.ReferenceInput,{...t,children:S.cloneElement(e,{...t,source:e.props.source||t.source})});hd.propTypes={...M.ReferenceInput.propTypes,children:c.element},hd.defaultProps={...M.ReferenceInput.defaultProps};const Cd=({reference:e,target:t,children:n,filters:r,actions:i,...a})=>g.jsx(M.ResourceContextProvider,{value:e,children:g.jsx(Qi,{perPage:5,pagination:g.jsx(M.Pagination,{}),...a,reference:e,target:t,children:g.jsxs(S.Fragment,{children:[g.jsx(M.ListToolbar,{filters:r,actions:i}),n]})})});Cd.propTypes={...Qi.propTypes,children:c.node.isRequired,reference:c.string.isRequired,target:c.string.isRequired,filters:c.oneOfType([c.element,c.func,c.element,c.arrayOf(c.node)]),actions:c.oneOfType([c.element,c.func,c.element])},Cd.defaultProps={...Qi.defaultProps};const FO=ue(M.SearchInput,{name:"RaApplicaSearchInput",slot:"root"})(()=>({})),LO=e=>g.jsx(FO,{...e}),Om=ue(M.SelectArrayInput,{name:"RaApplicaSelectArrayInput",slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},"& .RaSelectArrayInput-chips > .RaSelectArrayInput-chip":{marginTop:"-2px",marginBottom:"-2px"},'& label.MuiFormLabel-root[data-shrink="false"]':{marginTop:"2px"}}));Om.propTypes={...M.SelectArrayInput.propTypes};const Ed=e=>g.jsx(at,{...e,children:g.jsx(Om,{options:{autoWidth:!1}})});Ed.defaultProps={optionText:"name",optionValue:"id"},Ed.propTypes={...M.SelectArrayInput.propTypes,...at.propTypes};const NO=ue(M.SelectInput,{name:"RaApplicaSelectArrayInput",slot:"Root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"},'& label.MuiFormLabel-root[data-shrink="false"]':{marginTop:"2px"}})),Mm=e=>g.jsx(at,{...e,children:g.jsx(NO,{})});Mm.propTypes={...M.SelectInput.propTypes,...at.propTypes};const Hn=e=>g.jsx(at,{...e,children:g.jsx(M.TextInput,{})});Hn.propTypes={...M.TextInput.propTypes,...at.propTypes};const Pl=({...e})=>{var u,A;const t=M.useTranslate(),n=M.maxLength(e==null?void 0:e.maxLength,"app.input.max_length_error"),r=(A=(u=va.useController({name:e==null?void 0:e.source}))==null?void 0:u.field)==null?void 0:A.value;let i=e.helperText,a=e.validate;a?Array.isArray(a)&&a.indexOf(n)===-1&&a.push(n):a=[n];const l=t("app.input.max_length_info",{count:(r==null?void 0:r.length)||0,max:e==null?void 0:e.maxLength});return e!=null&&e.maxLength&&(i=i&&i.length>0?`${l} - ${t(i)}`:l),g.jsx(Hn,{...e,validate:a,helperText:i,inputProps:{maxLength:e==null?void 0:e.maxLength}})};Pl.displayName="SmartTextInput",Pl.defaultProps={multiline:!1},Pl.propTypes={...Hn.propTypes,maxLength:c.number,multiline:c.bool,rows:c.number};const Dm=e=>{const t=e.split(":");t.length===1&&t.push("00");const n=parseInt(t[0]),r=parseInt(t[1]);return Dr().hour(n).minute(r)};function VO(){let e=new Date().getTime();return window.performance&&typeof window.performance.now=="function"&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){const r=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(n=="x"?r:r&3|8).toString(16)})}const HO=e=>{if(!e)return"";const t=Dm(e);return t?t.format("HH:mm"):""},zO=e=>e,WO=ue(M.TimeInput,{name:"RaApplicaTimeInput",slot:"root"})(({label:e})=>({"& legend":{width:e===!1?0:"auto"}})),md=e=>g.jsx(at,{...e,children:g.jsx(WO,{})});md.defaultProps={...M.TimeInput.defaultProps,format:HO,parse:zO},md.propTypes={...M.TimeInput.propTypes,...at.propTypes};const Id=({onSuccess:e,firstAccess:t})=>{const{spacing:n}=Fn(),[r,i]=S.useState(!1),a=be.useAuthProvider(),l=be.useTranslate(),u=be.useNotify(),A=S.useCallback(f=>{const{oldPassword:p,newPassword:C}=f;i(!0),a==null||a.changePassword(p,C).then(()=>{u("ra.auth.password_changed"),e()}).catch(h=>u(h,{type:"error"})).finally(()=>i(!1))},[a,e]);return g.jsx(be.ResourceContextProvider,{value:"user/change-password",children:g.jsx(be.EditContextProvider,{value:{record:{},resource:"user/change-password",save:A},children:g.jsx(Ql,{onSubmit:A,toolbar:g.jsx(Mr,{children:g.jsx(M.SaveButton,{disabled:r})}),children:g.jsxs(b.Grid,{container:!0,spacing:n,children:[t===!0&&g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(b.Alert,{severity:"warning",children:[g.jsx(b.AlertTitle,{children:l("ra.auth.first_access.change_password")}),l("ra.auth.first_access.change_password_helper")]})}),g.jsx(b.Grid,{item:!0,xs:12,children:g.jsx(Hn,{source:"oldPassword",type:"password",validate:be.required()})}),g.jsx(b.Grid,{item:!0,xs:12,children:g.jsx(Hn,{source:"newPassword",type:"password",validate:be.required()})})]})})})})},UO=ue(M.Create,{name:"RaApplicaEdit",slot:"root"})(({theme:e})=>({"& .RaCreate-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaCreate-main>.MuiPaper-root:first-of-type":{overflow:"visible"}})),YO=ue(M.Edit,{name:"RaApplicaEdit",slot:"root"})(({theme:e})=>({"& .RaEdi-card, & > div > div > form":{backgroundColor:e.palette.background.default},"& .RaToolbar-mobileToolbar":{borderTop:`1px solid ${e.palette.divider}`},"& .RaEdit-main>.MuiPaper-root:first-of-type":{overflow:"visible"}})),GO=ue(b.CardHeader)(({theme:e})=>({marginTop:e.spacing(4),marginLeft:0,marginRight:0,paddingLeft:0,paddingRight:0})),KO=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)})`})),Bd=({title:e,divider:t,variant:n})=>{const r=M.useTranslate();return g.jsxs(S.Fragment,{children:[g.jsx(GO,{title:r(e,{_:e}),titleTypographyProps:{variant:n}}),t&&g.jsx(KO,{})]})};Bd.propTypes={title:c.string.isRequired,divider:c.bool,variant:c.oneOf(["h1","h2","h3","h4","h5","h6"])},Bd.defaultProps={divider:!0,variant:"h4"};const Sl=c.shape({xl:c.number,lg:c.number,md:c.number,sm:c.number,xs:c.number}),_O=ue("div")(({theme:e})=>({marginBottom:e.spacing(2)})),Ol=({children:e,visibility:t})=>b.useMediaQuery(r=>r.breakpoints.up(t))?g.jsx(_O,{children:e}):null;Ol.propTypes={visibility:c.oneOf(["xl","lg","md","sm","xs"]),position:c.oneOf(["top","bottom"]).isRequired,children:c.node.isRequired},Ol.defaultProps={position:"top",visibility:"md"};const JO={display:"none"},Ml=({intent:e,hidden:t,unmountOnExit:n,label:r,icon:i,value:a,syncWithLocation:l,selected:u,onChange:A,children:f,badgeColor:p,badgeContent:C,...h})=>{const m=M.useTranslate(),I=Gr.useLocation(),B={component:gt.Link,to:{...I,pathname:a}},v=S.isValidElement(r)?r:m(r,{_:r}),O=S.useCallback(()=>A(a),[A,a]);return e==="header"?(()=>g.jsxs(b.ListItemButton,{selected:u,...l?B:{},onClick:O,children:[i&&g.jsx(b.ListItemIcon,{children:i}),g.jsx(b.ListItemText,{primary:v}),C&&g.jsx(b.ListItemSecondaryAction,{children:g.jsx(b.Avatar,{sx:{width:24,height:24,fontSize:12,backgroundColor:T=>{var P;return(P=T.palette[p])==null?void 0:P.main},color:T=>{var P;return(P=T.palette[p])==null?void 0:P.contrastText}},children:C})})]}))():(()=>n&&t?null:g.jsx(M.FormGroupContextProvider,{name:a.toString(),children:g.jsx(b.Stack,{alignContent:"stretch",style:t?JO:{},id:`tabpanel-${a}`,"aria-labelledby":`tabheader-${a}`,"aria-hidden":t||void 0,...h,children:f})}))()};Ml.propTypes={intent:c.oneOf(["header","content","sidebar"]),className:c.string,contentClassName:c.string,url:c.string,icon:c.element,label:c.oneOfType([c.string,c.element]).isRequired,value:c.oneOfType([c.string,c.number]),syncWithLocation:c.bool,onChange:c.func,selected:c.bool,hidden:c.bool,unmountOnExit:c.bool,children:c.node,badgeColor:c.oneOf(["default","error","info","primary","secondary","success","warning"]),badgeContent:c.oneOfType([c.string,c.number])},Ml.defaultProps={badgeColor:"default",unmountOnExit:!1};const XO=ai(b.List,{name:"RaLongFormTabs",slot:"Root"})(({theme:e})=>({p:0,"& .MuiListItemIcon-root":{minWidth:32,color:e.palette.grey[500]},"& .MuiListItemButton-root.Mui-selected":{borderRight:`2px solid ${e.palette.primary.main}`,marginRight:"-2px"}})),Rm=({children:e,syncWithLocation:t,value:n,url:r,onChange:i})=>{const a=Gr.useLocation();return g.jsx(Nn,{children:g.jsx(XO,{component:"nav",children:S.Children.map(e,(l,u)=>{if(!S.isValidElement(l))return null;const A=ZO(l,u),f=t?!!Gr.matchPath(`${r}/${A}`,a.pathname):u===n;return S.cloneElement(l,{intent:"header",value:t?A:u,syncWithLocation:t,onChange:i,url:r,selected:f})})})})},ZO=(e,t)=>e.props.path!=null?e.props.path:t>0?t.toString():"";Rm.propTypes={children:c.node,url:c.string,tabsWithErrors:c.arrayOf(c.string),syncWithLocation:c.bool,onChange:c.func,value:c.oneOfType([c.string,c.number])};var qO=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},jm=e=>e.firstChild?e.firstChild.offsetParent===e:!0,$O=(e,t)=>{let n=e,r=0;jm(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},e3=e=>{let t=e.parentElement;for(;t&&getComputedStyle(t,null).getPropertyValue("display")==="contents";)t=t.parentElement;return t||window},Rs=null;typeof CSS<"u"&&CSS.supports&&(CSS.supports("position","sticky")?Rs="sticky":CSS.supports("position","-webkit-sticky")&&(Rs="-webkit-sticky"));var Dl=!1;try{const e=Object.defineProperty({},"passive",{get(){Dl={passive:!0}}}),t=()=>{};window.addEventListener("testPassive",t,e),window.removeEventListener("testPassive",t,e)}catch{}var yd=e=>{const{el:t,onChange:n,unsubs:r,measure:i}=e;if(t===window){const a=()=>({top:0,left:0,height:window.innerHeight,width:window.innerWidth}),l=i(a()),u=()=>{Object.assign(l,i(a())),n()};return window.addEventListener("resize",u,Dl),r.push(()=>window.removeEventListener("resize",u)),l}else{const a=i(t.getBoundingClientRect()),l=()=>{Object.assign(a,i(t.getBoundingClientRect())),n()},u=new ResizeObserver(l);return u.observe(t),r.push(()=>u.disconnect()),a}},t3=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}},n3=(e,t,n)=>{const{bottom:r,offsetBottom:i,offsetTop:a}=n,l=qO(e);let u=!1;const A=()=>{u||requestAnimationFrame(()=>{const k=C();k!==x&&T(k),u=!1}),u=!0};let f=l===window?window.scrollY:l.scrollTop;const p=k=>{const{offsetTop:_,height:J}=m,{naturalTop:Y}=v,{height:ee}=O;return k+_+J>=Y+ee+R+i},C=()=>{const{height:k}=m,{height:_}=O;return _+a+i<=k?3:p(f)?1:2},h=l!==window&&jm(l),m=yd({el:l,onChange:A,unsubs:t,measure:({height:k,top:_})=>({height:k,offsetTop:h?_:0})}),I=e3(e),B=I===window?{top:0,bottom:0}:t3(I),v=yd({el:I,onChange:A,unsubs:t,measure:({height:k})=>({height:k-B.top-B.bottom,naturalTop:I===window?0:$O(I,l)+B.top+m.offsetTop})}),O=yd({el:e,onChange:A,unsubs:t,measure:({height:k})=>({height:k})});let R=0,x=C();const T=k=>{const _=x;if(x=k,_===2&&(R=-1),k===3){e.style.position=Rs,r?e.style.bottom=`${i}px`:e.style.top=`${a}px`;return}const{height:J,offsetTop:Y}=m,{height:ee,naturalTop:le}=v,{height:se}=O;if(k===2)if(e.style.position="relative",R=_===0?Math.max(0,Y+f-le+a):Math.max(0,Y+f+J-(le+se+i)),r){const q=Math.max(0,ee-se-R);e.style.bottom=`${q}px`}else e.style.top=`${R}px`;else e.style.position=Rs,k===1?r?e.style.bottom=`${i}px`:e.style.top=`${J-se-i}px`:r?e.style.bottom=`${J-se-i}px`:e.style.top=`${a}px`};T(x);const P=k=>{if(k===f)return;const _=k-f;if(f=k,x===3)return;const{offsetTop:J,height:Y}=m,{naturalTop:ee,height:le}=v,{height:se}=O;if(_>0)if(x===0){if(k+J+a>ee){const q=Math.max(0,J+f-ee+a);k+J+Y<=ee+se+q+i?T(2):T(1)}}else x===2&&p(k)&&T(1);else if(x===1){if(J+k+Y<ee+le+i){const q=Math.max(0,J+f+Y-(ee+se+i));J+k+a>=ee+q?T(2):T(0)}}else x===2&&J+k+a<ee+R&&T(0)},L=l===window?()=>P(window.scrollY):()=>P(l.scrollTop);l.addEventListener("scroll",L,Dl),l.addEventListener("mousewheel",L,Dl),t.push(()=>l.removeEventListener("scroll",L),()=>l.removeEventListener("mousewheel",L))},r3=({offsetTop:e=0,offsetBottom:t=0,bottom:n=!1}={})=>{const[r,i]=S.useState(null);return S.useEffect(()=>{if(!r||!Rs)return;const a=[];return n3(r,a,{offsetBottom:t,offsetTop:e,bottom:n}),()=>{a.forEach(l=>l())}},[r,t,e,n]),i},o3=e=>{const{offsetTop:t,offsetBottom:n,bottom:r,children:i,className:a,style:l}=e,u=r3({offsetTop:t,offsetBottom:n,bottom:r});return g.jsx("div",{className:a,style:l,ref:u,children:i})},i3=o3;const s3=ue(b.Grid,{name:"ApplicaLongFormView",slot:"Root"})(({theme:e})=>({"& .MuiToolbar-root":{position:"initial",marginTop:e.spacing(2),marginLeft:`-${e.spacing(3)}`,marginRight:`-${e.spacing(3)}`,marginBottom:`-${e.spacing(2)}`,borderTop:`1px solid ${e.palette.divider}`,[e.breakpoints.down("sm")]:{position:"initial !important",width:"auto !important"}},"& form > .MuiToolbar-root":{margin:0,marginRight:`-${e.spacing(.5)}`,[e.breakpoints.down("sm")]:{marginRight:e.spacing(.5)}}})),km=(e,t)=>e&&e.type===Ol&&e.props.position===t,a3=e=>e&&e.type===Ml,vd=({children:e,formRootPathname:t,syncWithLocation:n,spacing:r,tabs:i,tabsDisposition:a,contentDisposition:l,sticky:u,...A})=>{const[f,p]=S.useState(0),C=Gr.useResolvedPath(""),h=M.useResourceContext(A),m=Gr.useLocation(),I=S.useMemo(()=>S.Children.toArray(e).find(T=>km(T,"top")),[e]),B=S.useMemo(()=>S.Children.toArray(e).find(T=>km(T,"bottom")),[e]),v=S.useMemo(()=>S.Children.toArray(e).filter(T=>a3(T)),[e]),O=T=>{n||p(T)},R=()=>S.cloneElement(i,{onChange:O,syncWithLocation:n,url:t,value:f,intent:"header"},v),x=S.useMemo(()=>g.jsxs(S.Fragment,{children:[I,n?g.jsx(Gr.Routes,{children:g.jsx(Gr.Route,{path:"/*",element:R()})}):R(),B]}),[I,n,R,B]);return g.jsxs(s3,{container:!0,spacing:r*2,children:[g.jsx(b.Grid,{item:!0,...a,children:u?g.jsx(i3,{offsetTop:74,offsetBottom:r*2,children:x}):x}),g.jsx(b.Grid,{item:!0,...l,children:S.Children.map(v,(T,P)=>{if(!T)return null;const L=M.getTabbedFormTabFullPath(T,P),k=n?!Gr.matchPath(`${C.pathname}/${L}`,m.pathname):f!==P;return S.isValidElement(T)?S.cloneElement(T,{intent:"content",resource:h,hidden:k,value:n?L:P}):null})})]})};vd.propTypes={children:c.node,spacing:c.number,syncWithLocation:c.bool,tabs:c.element,formRootPathname:c.string,tabsDisposition:Sl,contentDisposition:Sl},vd.defaultProps={tabs:g.jsx(Rm,{})};const l3=()=>{const e=gt.useLocation(),t=["entities/:resource/create/*",":resource/create/*","entities/:resource/:id/*",":resource/:id/*"];for(const n of t){const r=gt.matchPath(n,e.pathname);if(r)return r.pathnameBase}return""},js=({spacing:e,...t})=>{const n=l3(),{spacing:r}=Fn(),i=e||r;return g.jsx(M.Form,{formRootPathname:n,...t,children:g.jsx(vd,{formRootPathname:n,...t,spacing:i})})};js.propTypes={syncWithLocation:c.bool,spacing:c.number,tabsDisposition:Sl,contentDisposition:Sl,sticky:c.bool},js.defaultProps={syncWithLocation:!1,sticky:!0,spacing:2,tabsDisposition:{xl:3,lg:3,md:4,sm:4,xs:12},contentDisposition:{xl:9,lg:9,md:8,sm:8,xs:12}},js.Tab=Ml,js.Sidebar=Ol;const c3=ue(M.SimpleFormIterator,{name:"ApplicaSimpleFormIterator",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}}})),Rl=ai(M.TabbedForm,{name:"RaApplicaTabbedForm",slot:"Root"})(()=>({}));Rl.propTypes={...M.TabbedForm.propTypes},Rl.defaultProps={...M.TabbedForm.defaultProps},Rl.Tab=M.TabbedForm.Tab;const Fm=S.createContext(void 0),u3=S.createContext(void 0),A3=()=>S.useContext(Fm),d3=V.forwardRef((e,t)=>{const{children:n,disabled:r,disableActions:i=!1,index:a,member:l,resource:u}=e,A=M.useTranslate(),[f,p]=V.useState(!1),{total:C,remove:h}=A3(),m=V.useCallback(()=>{p(!1),h(a)},[a,h]),I=S.useMemo(()=>({index:a,total:C,remove:()=>h(a)}),[a,C,h]);return g.jsxs(u3.Provider,{value:I,children:[S.Children.map(n,(B,v)=>{if(!S.isValidElement(B))return null;const{source:O,...R}=B.props;return g.jsx(b.TableCell,{sx:{border:0,verticalAlign:"top"},children:S.cloneElement(B,{source:O?`${l}.${O}`:l,index:O?void 0:v,resource:u,disabled:r,...R,label:!1})})}),!i&&g.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center",border:0,pt:2},children:g.jsx(fi,{horizontal:!0,children:g.jsx(b.Typography,{color:"error",onClick:()=>p(!0),children:A("ra.action.delete")})})}),n.length>0&&g.jsx(M.Confirm,{isOpen:f,title:A("ra.action.remove_item"),content:A("ra.message.remove_item"),onConfirm:m,onClose:()=>p(!1)})]})});var f3=Array.isArray,bd=f3,g3=typeof kn=="object"&&kn&&kn.Object===Object&&kn,p3=g3,h3=p3,C3=typeof self=="object"&&self&&self.Object===Object&&self,E3=h3||C3||Function("return this")(),Qd=E3,m3=Qd,I3=m3.Symbol,xd=I3,Lm=xd,Nm=Object.prototype,B3=Nm.hasOwnProperty,y3=Nm.toString,ks=Lm?Lm.toStringTag:void 0;function v3(e){var t=B3.call(e,ks),n=e[ks];try{e[ks]=void 0;var r=!0}catch{}var i=y3.call(e);return r&&(t?e[ks]=n:delete e[ks]),i}var b3=v3,Q3=Object.prototype,x3=Q3.toString;function w3(e){return x3.call(e)}var T3=w3,Vm=xd,P3=b3,S3=T3,O3="[object Null]",M3="[object Undefined]",Hm=Vm?Vm.toStringTag:void 0;function D3(e){return e==null?e===void 0?M3:O3:Hm&&Hm in Object(e)?P3(e):S3(e)}var zm=D3;function R3(e){return e!=null&&typeof e=="object"}var j3=R3,k3=zm,F3=j3,L3="[object Symbol]";function N3(e){return typeof e=="symbol"||F3(e)&&k3(e)==L3}var wd=N3,V3=bd,H3=wd,z3=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,W3=/^\w*$/;function U3(e,t){if(V3(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||H3(e)?!0:W3.test(e)||!z3.test(e)||t!=null&&e in Object(t)}var Y3=U3;function G3(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Wm=G3,K3=zm,_3=Wm,J3="[object AsyncFunction]",X3="[object Function]",Z3="[object GeneratorFunction]",q3="[object Proxy]";function $3(e){if(!_3(e))return!1;var t=K3(e);return t==X3||t==Z3||t==J3||t==q3}var eM=$3,tM=Qd,nM=tM["__core-js_shared__"],rM=nM,Td=rM,Um=function(){var e=/[^.]+$/.exec(Td&&Td.keys&&Td.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function oM(e){return!!Um&&Um in e}var iM=oM,sM=Function.prototype,aM=sM.toString;function lM(e){if(e!=null){try{return aM.call(e)}catch{}try{return e+""}catch{}}return""}var cM=lM,uM=eM,AM=iM,dM=Wm,fM=cM,gM=/[\\^$.*+?()[\]{}|]/g,pM=/^\[object .+?Constructor\]$/,hM=Function.prototype,CM=Object.prototype,EM=hM.toString,mM=CM.hasOwnProperty,IM=RegExp("^"+EM.call(mM).replace(gM,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function BM(e){if(!dM(e)||AM(e))return!1;var t=uM(e)?IM:pM;return t.test(fM(e))}var yM=BM;function vM(e,t){return e==null?void 0:e[t]}var bM=vM,QM=yM,xM=bM;function wM(e,t){var n=xM(e,t);return QM(n)?n:void 0}var Ym=wM,TM=Ym,PM=TM(Object,"create"),jl=PM,Gm=jl;function SM(){this.__data__=Gm?Gm(null):{},this.size=0}var OM=SM;function MM(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var DM=MM,RM=jl,jM="__lodash_hash_undefined__",kM=Object.prototype,FM=kM.hasOwnProperty;function LM(e){var t=this.__data__;if(RM){var n=t[e];return n===jM?void 0:n}return FM.call(t,e)?t[e]:void 0}var NM=LM,VM=jl,HM=Object.prototype,zM=HM.hasOwnProperty;function WM(e){var t=this.__data__;return VM?t[e]!==void 0:zM.call(t,e)}var UM=WM,YM=jl,GM="__lodash_hash_undefined__";function KM(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=YM&&t===void 0?GM:t,this}var _M=KM,JM=OM,XM=DM,ZM=NM,qM=UM,$M=_M;function xi(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])}}xi.prototype.clear=JM,xi.prototype.delete=XM,xi.prototype.get=ZM,xi.prototype.has=qM,xi.prototype.set=$M;var eD=xi;function tD(){this.__data__=[],this.size=0}var nD=tD;function rD(e,t){return e===t||e!==e&&t!==t}var oD=rD,iD=oD;function sD(e,t){for(var n=e.length;n--;)if(iD(e[n][0],t))return n;return-1}var kl=sD,aD=kl,lD=Array.prototype,cD=lD.splice;function uD(e){var t=this.__data__,n=aD(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():cD.call(t,n,1),--this.size,!0}var AD=uD,dD=kl;function fD(e){var t=this.__data__,n=dD(t,e);return n<0?void 0:t[n][1]}var gD=fD,pD=kl;function hD(e){return pD(this.__data__,e)>-1}var CD=hD,ED=kl;function mD(e,t){var n=this.__data__,r=ED(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var ID=mD,BD=nD,yD=AD,vD=gD,bD=CD,QD=ID;function wi(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])}}wi.prototype.clear=BD,wi.prototype.delete=yD,wi.prototype.get=vD,wi.prototype.has=bD,wi.prototype.set=QD;var xD=wi,wD=Ym,TD=Qd,PD=wD(TD,"Map"),SD=PD,Km=eD,OD=xD,MD=SD;function DD(){this.size=0,this.__data__={hash:new Km,map:new(MD||OD),string:new Km}}var RD=DD;function jD(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var kD=jD,FD=kD;function LD(e,t){var n=e.__data__;return FD(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Fl=LD,ND=Fl;function VD(e){var t=ND(this,e).delete(e);return this.size-=t?1:0,t}var HD=VD,zD=Fl;function WD(e){return zD(this,e).get(e)}var UD=WD,YD=Fl;function GD(e){return YD(this,e).has(e)}var KD=GD,_D=Fl;function JD(e,t){var n=_D(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var XD=JD,ZD=RD,qD=HD,$D=UD,eR=KD,tR=XD;function Ti(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])}}Ti.prototype.clear=ZD,Ti.prototype.delete=qD,Ti.prototype.get=$D,Ti.prototype.has=eR,Ti.prototype.set=tR;var nR=Ti,_m=nR,rR="Expected a function";function Pd(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(rR);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var l=e.apply(this,r);return n.cache=a.set(i,l)||a,l};return n.cache=new(Pd.Cache||_m),n}Pd.Cache=_m;var oR=Pd,iR=oR,sR=500;function aR(e){var t=iR(e,function(r){return n.size===sR&&n.clear(),r}),n=t.cache;return t}var lR=aR,cR=lR,uR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,AR=/\\(\\)?/g,dR=cR(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(uR,function(n,r,i,a){t.push(i?a.replace(AR,"$1"):r||n)}),t}),fR=dR;function gR(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var pR=gR,Jm=xd,hR=pR,CR=bd,ER=wd,mR=1/0,Xm=Jm?Jm.prototype:void 0,Zm=Xm?Xm.toString:void 0;function qm(e){if(typeof e=="string")return e;if(CR(e))return hR(e,qm)+"";if(ER(e))return Zm?Zm.call(e):"";var t=e+"";return t=="0"&&1/e==-mR?"-0":t}var IR=qm,BR=IR;function yR(e){return e==null?"":BR(e)}var vR=yR,bR=bd,QR=Y3,xR=fR,wR=vR;function TR(e,t){return bR(e)?e:QR(e,t)?[e]:xR(wR(e))}var PR=TR,SR=wd,OR=1/0;function MR(e){if(typeof e=="string"||SR(e))return e;var t=e+"";return t=="0"&&1/e==-OR?"-0":t}var DR=MR,RR=PR,jR=DR;function kR(e,t){t=RR(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[jR(t[n++])];return n&&n==r?e:void 0}var FR=kR,LR=FR;function NR(e,t,n){var r=e==null?void 0:LR(e,t);return r===void 0?n:r}var VR=NR;const HR=ti(VR),$m=e=>{const{children:t,resource:n,source:r,label:i,disableActions:a=!1,disableAdd:l=!1,disableRemove:u=!1,className:A,empty:f}=e,[p,C]=S.useState(!1),{fields:h,remove:m,replace:I}=M.useArrayInput(e),B=xt(),v=be.useTranslate(),O=be.useRecordContext(e),R=S.useRef({}),x=be.useTranslateLabel(),T=S.useCallback(J=>{m(J)},[m]);if(h.length>0){const{...J}=h[0];R.current=J;for(const Y in R.current)R.current[Y]=null}const P=S.useCallback(()=>{I([]),C(!1)},[I]),L=HR(O,r),k=S.useMemo(()=>({total:h.length,remove:T,source:r}),[h.length,T,r]),_=B.palette.mode==="dark"?B.palette.grey.A400:B.palette.grey.A800;return h?g.jsx(Fm.Provider,{value:k,children:g.jsxs("div",{className:A,children:[g.jsx(e0,{label:i,source:r,disableAdd:l}),g.jsx(b.TableContainer,{component:b.Paper,sx:{mt:2,border:`1px solid ${_}`},children:g.jsxs(b.Table,{children:[g.jsx(b.TableHead,{sx:{borderTop:0,borderBottom:`1px solid ${_}`},children:g.jsxs(b.TableRow,{children:[S.Children.map(t,(J,Y)=>V.isValidElement(J)?g.jsx(b.TableCell,{children:g.jsx(b.Typography,{display:"flex",variant:"subtitle1",fontWeight:500,color:"text.primary",textTransform:"none",children:x({...J.props,resource:n})})},Y):null),!a&&g.jsx(b.TableCell,{sx:{display:"flex",justifyContent:"center",alignItems:"center",verticalAlign:"top"},children:g.jsx(b.Typography,{display:"flex",variant:"subtitle1",fontWeight:500,color:"text.primary",textTransform:"none"})},"actions")]})}),g.jsxs(b.TableBody,{children:[h.length===0&&g.jsx(b.TableRow,{sx:{"&:last-child td, &:last-child th":{border:0}},children:g.jsx(b.TableCell,{colSpan:4+(a?0:1),align:"center",children:f||g.jsx(b.Typography,{variant:"body1",color:"text.secondary",children:"-"})})}),h.length>0&&h.map((J,Y)=>g.jsx(b.TableRow,{sx:{borderBottom:`1px solid ${_}}`},children:g.jsx(d3,{disableRemove:u,disableActions:a,index:Y,member:`${r}.${Y}`,onRemoveField:T,record:L&&L[Y]||{},resource:n,source:r,children:t})},J.id))]})]})}),h.length>0&&g.jsx(M.Confirm,{isOpen:p,title:v("ra.action.clear_array_input"),content:v("ra.message.clear_array_input"),onConfirm:P,onClose:()=>C(!1)})]})}):null},e0=e=>{const{label:t,disableAdd:n}=e,{append:r}=M.useArrayInput(e),i=xt(),a=i.palette.mode==="dark"?i.palette.grey.A400:i.palette.grey.A800,l=i.palette.mode==="light"?"#000000":"#FFFFFF";return g.jsxs(b.Stack,{justifyContent:"space-between",alignItems:"center",flexDirection:"row",children:[g.jsx(b.Typography,{children:t}),!n&&g.jsx(b.IconButton,{size:"small",color:"secondary",sx:{border:`1px solid ${a}`},onClick:()=>r({}),children:g.jsx(et.PlusCircleOutlined,{style:{color:l}})})]})},zR=ue($m,{name:"RaApplicaTableFormIterator",slot:"Root"})(({theme:e})=>({"& > div.MuiPaper-root":{overflowX:"auto",[e.breakpoints.down("sm")]:{width:`calc(100vw - ${e.spacing(8)})`}}}));e0.propTypes={label:c.string.isRequired,source:c.string.isRequired},$m.propTypes={addButton:c.element,children:c.node,className:c.string,field:c.object,fields:c.array,fieldState:c.object,formState:c.object,record:c.object,source:c.string,label:c.string,resource:c.string,translate:c.func,disableAdd:c.bool,disableRemove:c.oneOfType([c.func,c.bool]),TransitionProps:c.shape({}),empty:c.oneOfType([c.node,c.string])};function WR(e,t){const n=yt.clone(e),{type:r,payload:i}=t;switch(r){case"updateMedia":{const a=yt.chain(n.media).clone().extend(i).value();return yt.extend(n,{media:a})}case"updateDrawer":{const a=yt.chain(n.drawer).clone().extend(i).value();return yt.extend(n,{drawer:a})}case"updateLogo":{const a=yt.chain(n.logo).clone().extend(i).value();return yt.extend(n,{logo:a})}case"updateNotifications":{const a=yt.chain(n.notifications).clone().extend(i).value();return yt.extend(n,{notifications:a})}case"updateTheme":{const a=yt.chain(n.theme).clone().extend(i).value();return yt.extend(n,{theme:a})}default:return n}}const UR={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"}},t0=S.createContext(void 0);function n0(e){const t=be.useGetIdentity(),n=b.useTheme(),r=b.useMediaQuery(n.breakpoints.down("md")),i=b.useMediaQuery(n.breakpoints.down("lg")),a=b.useMediaQuery(n.breakpoints.down("xl")),{miniDrawer:l,isHorizontalLayout:u,menuOrientation:A,drawerWidth:f}=Fn(),p=u(A)&&!i,{drawerOpen:C,openDrawer:h}=Jr(),m=S.useCallback(()=>{h(!C)},[C,h]),[I,B]=S.useState(!1),[v,O]=S.useReducer(WR,yt.chain(UR).clone().merge({drawer:{open:!l||C}}).value()),R=S.useCallback(()=>B(!1),[]),x=S.useMemo(()=>({state:v,dispatch:O}),[v,O]),{logoIcon:T,logoMain:P,enableNotification:L,notification:k}=e;return S.useEffect(()=>{O({type:"updateMedia",payload:{downMd:r,downLg:i,downXl:a,horizontal:p}})},[A,r,i,a]),S.useEffect(()=>{O({type:"updateDrawer",payload:{open:C,width:f,handleDrawerToggle:m}})},[C,f,m]),S.useEffect(()=>{l||h(!a)},[a,l]),S.useEffect(()=>{O({type:"updateLogo",payload:{main:P,icon:T}})},[T,P]),S.useEffect(()=>{O({type:"updateNotifications",payload:{enable:L,resource:k??"entities/notification"}})},[L,k]),S.useEffect(()=>{O({type:"updateTheme",payload:{iconColorOpen:n.palette.mode==="dark"?"grey.200":"grey.300",iconColor:n.palette.mode==="dark"?"background.default":"grey.100"}})},[n.palette.mode]),S.useEffect(()=>{B((t==null?void 0:t.needToChangePassword)===!0)},[t]),g.jsxs(t0.Provider,{value:x,children:[g.jsx(b.Dialog,{open:I,maxWidth:"xs",fullWidth:!0,children:g.jsx(Id,{onSuccess:R,firstAccess:!0})}),e.children]})}function r0(e){return S.forwardRef((t,n)=>{const{logoIcon:r,logoMain:i,enableNotification:a}=t;return g.jsx(n0,{logoIcon:r,logoMain:i,enableNotification:a,children:g.jsx(e,{ref:n,...t})})})}function Sd(){const e=S.useContext(t0);if(e===void 0)throw new Error("[Layout] useLayoutContext: context undefined. Please provide a valid LayoutContext using LayoutProvider");return e}function YR(){return Sd().dispatch}function Pi(){return Sd().state}function zn(){return Pi().media}function ko(){return Pi().drawer}function o0(){return Pi().logo}function Ll(){return Pi().notifications}function Nl(){return Pi().theme}function i0(){const{iconColor:e,iconColorOpen:t}=Nl(),{open:n,handleDrawerToggle:r}=ko();return g.jsx(ro,{"aria-label":"open drawer",onClick:r,edge:"start",color:"secondary",variant:"light",sx:{color:"text.primary",bgcolor:n?t:e,ml:{xs:0,lg:-2}},children:n?g.jsx(et.MenuFoldOutlined,{}):g.jsx(et.MenuUnfoldOutlined,{})})}function s0(e){const t=S.useRef(),n=b.useTheme(),{downLg:r,horizontal:i}=zn(),{open:a,width:l}=ko(),u=r?b.AppBar:dh,A=pi(e,{borderBottom:`1px solid ${n.palette.divider}`,zIndex:1200,width:i?"100%":a?`calc(100% - ${l}px)`:{xs:"100%",lg:"calc(100% - 60px)"}}),f={position:"fixed",color:"inherit",elevation:0,sx:A};return r||yt.extend(f,{open:a}),g.jsx(u,{ref:t,...f,children:g.jsxs(b.Toolbar,{sx:{"& > *":{marginX:n.spacing(.325)}},children:[!i&&g.jsx(i0,{}),e.children]})})}function GR(e){const t=b.useTheme(),{notification:n,onClick:r,selected:i,divider:a}=e,{resource:l}=Ll(),u=be.useNotify(),A=be.useRedirect(),[f]=be.useUpdate(l,{id:n==null?void 0:n.id,data:{...n,readed:Dr().format("YYYY-MM-DD HH:mm:ss")}},{onSuccess:()=>{n!=null&&n.resource?n!=null&&n.resource.startsWith("/")?(A(n==null?void 0:n.resource),r()):document.location.href=n==null?void 0:n.resource:r()},onFailure:()=>{u("resources.notifications.messages.readed.error","warning")}}),p=S.useCallback(()=>f(),[f]),[C]=be.useLocaleState(),h=S.useMemo(()=>Dr(n.created).locale(C).fromNow(),[n,C]);return g.jsx(b.ListItem,{disablePadding:!0,divider:a,children:g.jsxs(b.ListItemButton,{selected:i,onClick:p,children:[g.jsx(b.ListItemAvatar,{children:g.jsx(b.Avatar,{sx:{color:"primary.main",bgcolor:"primary.lighter"},children:g.jsx(et.MessageOutlined,{})})}),g.jsx(b.ListItemText,{primary:n.title,secondary:n.content}),g.jsx(b.Box,{flexGrow:1,flexShrink:1,minWidth:t.spacing(2)}),g.jsx(b.ListItemText,{primary:h,primaryTypographyProps:{variant:"caption"}})]})})}const KR={width:36,height:36,fontSize:"1rem"},_R={mt:"6px",ml:1,top:"auto",right:"auto",alignSelf:"flex-start",transform:"none"};function a0(){const{enable:e}=Ll();return e?g.jsx(JR,{}):null}function JR(){const e=b.useTheme(),t=S.useRef(),{resource:n}=Ll(),{downMd:r}=zn(),{iconColor:i,iconColorOpen:a}=Nl(),[l,u]=S.useState(!1),[A,f]=S.useState([]),p=A.filter(B=>B.readed===null).length,C=S.useCallback(()=>u(!l),[l]),h=S.useCallback(()=>{t.current&&t.current.contains(event.target)||u(!1)},[t.current,u]),{data:m,isLoading:I}=be.useGetList(n,{pagination:{page:1,perPage:50},sort:{field:"created",order:"DESC"},filter:{readed:!1}});return S.useEffect(()=>{!I&&m&&f(m??[])},[m,I]),g.jsxs(b.Box,{sx:{flexShrink:0},children:[g.jsx(ro,{color:"secondary",variant:"light",sx:{color:"text.primary",bgcolor:l?a:i},"aria-label":"open profile",ref:t,"aria-controls":l?"profile-grow":void 0,"aria-haspopup":"true",onClick:C,children:g.jsx(b.Badge,{badgeContent:p,color:"primary",children:g.jsx(et.BellOutlined,{})})}),g.jsx(b.Popper,{placement:r?"bottom":"bottom-end",open:l,anchorEl:t.current,role:void 0,transition:!0,disablePortal:!0,popperOptions:{modifiers:[{name:"offset",options:{offset:[r?-5:0,9]}}]},children:({TransitionProps:B})=>g.jsx(io,{type:"grow",position:r?"top":"top-right",in:open,...B,children:g.jsx(b.Paper,{sx:{boxShadow:e.customShadows.z1,width:"100%",minWidth:285,maxWidth:420,[e.breakpoints.down("md")]:{maxWidth:285}},children:g.jsx(b.ClickAwayListener,{onClickAway:h,children:g.jsx(Nn,{title:"Notification",elevation:0,border:!1,content:!1,secondary:g.jsx(g.Fragment,{children:p>0&&g.jsx(b.Tooltip,{title:"Mark as all read",children:g.jsx(ro,{color:"success",size:"small",children:g.jsx(et.CheckCircleOutlined,{style:{fontSize:"1.15rem"}})})})}),children:g.jsx(b.List,{component:"nav",sx:{p:0,"& .MuiListItemButton-root":{py:.5,"&.Mui-selected":{bgcolor:"grey.50",color:"text.primary"},"& .MuiAvatar-root":KR,"& .MuiListItemSecondaryAction-root":{..._R,position:"relative"}}},children:A.map((v,O)=>g.jsx(GR,{selected:p>0,notification:v,onClick:h,divider:O<A.length-1},v.id))})})})})})})]})}const XR=()=>{const[e,t]=S.useState(!1),n=S.useCallback(()=>t(!1),[t]),r=S.useCallback(()=>t(!0),[t]),i=be.useTranslate();return g.jsxs(S.Fragment,{children:[g.jsxs(b.ListItemButton,{onClick:r,children:[g.jsx(b.ListItemIcon,{children:g.jsx(jn.Key,{})}),g.jsx(b.ListItemText,{primary:i("ra.auth.change_password")})]}),g.jsx(b.Dialog,{open:e,onClose:()=>t(!1),maxWidth:"xs",fullWidth:!0,children:g.jsx(Id,{onSuccess:n})})]})},ZR=()=>{const e=be.useLogout(),t=be.useTranslate();return g.jsx(S.Fragment,{children:g.jsxs(b.ListItemButton,{onClick:e,children:[g.jsx(b.ListItemIcon,{children:g.jsx(jn.LogoutOutlined,{})}),g.jsx(b.ListItemText,{primary:t("ra.auth.logout")})]})})},qR=()=>{const e=be.useTranslate(),t=be.useAuthProvider(),n=S.useCallback(()=>t.stopImpersonate().then(()=>document.location.href="/"),[t==null?void 0:t.stopImpersonating]),[r,i]=S.useState(!1);return S.useEffect(()=>{t.isImpersonating&&t.isImpersonating().then(a=>i(a))},[t,i]),r?g.jsx(S.Fragment,{children:g.jsxs(b.ListItemButton,{onClick:n,children:[g.jsx(b.ListItemIcon,{children:g.jsx(jn.LogoutOutlined,{})}),g.jsx(b.ListItemText,{primary:e("ra.auth.stop_impersonate")})]})}):null};c.node,c.any.isRequired,c.any.isRequired;const l0=()=>{var B;const e=b.useTheme(),{identity:t}=M.useGetIdentity(),n=t!==void 0&&t.image&&t.image!==null&&t.image!=="",r=S.useRef(null),[i,a]=S.useState(!1),l=()=>{a(v=>!v)},u=v=>{r.current&&r.current.contains(v.target)||a(!1)},A=e.palette.mode==="dark"?"grey.200":"grey.300",f=M.useLogout(),p=M.useDataProvider(),C=M.useAuthProvider(),h=S.useCallback(()=>{f()},[C,f]),[m,I]=S.useState(null);return S.useEffect(()=>{if(!n)return;async function v(){var O=await p.getFile("/profile/me/image");I(O)}v()},[p,n]),g.jsxs(b.Box,{sx:{flexShrink:0},children:[g.jsx(b.ButtonBase,{sx:{p:.25,bgcolor:i?A:"transparent",borderRadius:1,"&:hover":{bgcolor:e.palette.mode==="dark"?"secondary.light":"secondary.lighter"},"&:focus-visible":{outline:`2px solid ${e.palette.secondary.dark}`,outlineOffset:2}},"aria-label":"open profile",ref:r,"aria-controls":i?"profile-grow":void 0,"aria-haspopup":"true",onClick:l,children:g.jsxs(b.Stack,{direction:"row",spacing:2,alignItems:"center",sx:{p:.5},children:[g.jsx(Cl,{alt:(B=t==null?void 0:t.name)==null?void 0:B.toUpperCase(),src:m,size:"xs"}),g.jsx(b.Typography,{variant:"subtitle1",children:t==null?void 0:t.name})]})}),g.jsx(b.Popper,{placement:"bottom-end",open:i,anchorEl:r.current,role:void 0,transition:!0,disablePortal:!0,popperOptions:{modifiers:[{name:"offset",options:{offset:[0,9]}}]},children:({TransitionProps:v})=>{var O;return g.jsx(io,{type:"grow",position:"top-right",in:i,...v,children:g.jsx(b.Paper,{sx:{boxShadow:e.customShadows.z1,width:290,minWidth:240,maxWidth:290,[e.breakpoints.down("md")]:{maxWidth:250}},children:g.jsx(b.ClickAwayListener,{onClickAway:u,children:g.jsxs(Nn,{elevation:0,border:!1,content:!1,children:[g.jsx(b.CardContent,{sx:{px:2.5,pt:3},children:g.jsxs(b.Grid,{container:!0,justifyContent:"space-between",alignItems:"center",children:[g.jsx(b.Grid,{item:!0,children:g.jsxs(b.Stack,{direction:"row",spacing:1.25,alignItems:"center",children:[g.jsx(Cl,{alt:"profile user",src:m,sx:{width:32,height:32}}),g.jsxs(b.Stack,{children:[g.jsx(b.Typography,{variant:"h6",children:t==null?void 0:t.name}),g.jsx(b.Typography,{variant:"body2",color:"textSecondary",children:(O=t==null?void 0:t.roles)==null?void 0:O.map(R=>R.name.replace("ROLE_","")).join(",")})]})]})}),g.jsx(b.Grid,{item:!0,children:g.jsx(b.Tooltip,{title:"Logout",children:g.jsx(ro,{size:"large",sx:{color:"text.primary"},onClick:h,children:g.jsx(et.LogoutOutlined,{})})})})]})}),g.jsx(b.Grid,{container:!0,children:g.jsx(b.Grid,{item:!0,xs:12,children:g.jsxs(b.List,{component:"nav",sx:{p:0,"& .MuiListItemIcon-root":{minWidth:32}},children:[g.jsx(XR,{}),g.jsx(ZR,{}),g.jsx(qR,{})]})})})]})})})})}})]})},c0=e=>{const t=xt(),{downMd:n}=zn(),{iconColor:r,iconColorOpen:i}=Nl(),[a,l]=S.useState(!1),u=S.useRef(null),A=S.useCallback(()=>{l(!a)},[a]),f=S.useCallback(p=>{u.current&&u.current.contains(p.target)||l(!1)},[]);return n?g.jsxs(g.Fragment,{children:[g.jsx(b.Box,{sx:{flexShrink:0},children:g.jsx(ro,{sx:{color:"text.primary",bgcolor:a?i:r},"aria-label":"open more menu",ref:u,"aria-controls":a?"menu-list-grow":void 0,"aria-haspopup":"true",onClick:A,color:"secondary",variant:"light",children:g.jsx(et.MoreOutlined,{})})}),g.jsx(b.Popper,{placement:"bottom-end",open:a,anchorEl:u.current,role:void 0,transition:!0,disablePortal:!0,style:{width:"100%"},popperOptions:{modifiers:[{name:"offset",options:{offset:[0,9]}}]},children:({TransitionProps:p})=>g.jsx(io,{type:"fade",in:a,...p,children:g.jsx(b.Paper,{sx:{boxShadow:t.customShadows.z1},children:g.jsx(b.ClickAwayListener,{onClickAway:f,children:g.jsx(b.AppBar,{color:"inherit",children:g.jsx(b.Toolbar,{children:e.children})})})})})})]}):g.jsx(g.Fragment,{children:e.children})};function u0(e){return g.jsx(b.Box,{...e,flex:1})}function Fs(e){const{name:t,version:n}=e;return g.jsx(b.Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",sx:{p:"24px 16px 0px",mt:"auto"},children:g.jsxs(b.Typography,{variant:"caption",children:[g.jsx("span",{dangerouslySetInnerHTML:{__html:(e==null?void 0:e.copy)||""}})," ",t," - ",n]})})}Fs.propTypes={name:c.string.isRequired,version:c.string.isRequired,copy:c.string},Fs.defaultProps={copy:"&copy; Applica Software Guru for"};function A0(e){const{width:t}=ko(),{horizontal:n}=zn(),{container:r}=Fn();return g.jsxs(b.Box,{component:"main",sx:{width:`calc(100% - ${t}px)`,flexGrow:1,p:{xs:0,sm:2,lg:1},pt:{lg:2}},children:[g.jsx(b.Toolbar,{sx:{mt:n?8:"inherit"}})," ",g.jsx(b.Container,{maxWidth:r?"xl":!1,sx:{...r&&{px:{xs:0,sm:2}},position:"relative",minHeight:"calc(100vh - 110px)",display:"flex",flexDirection:"column"},children:e.children})]})}const d0=S.forwardRef((e,t)=>{const n=pi(e,{display:"flex",width:"100%"});return g.jsx(b.Box,{ref:t,...e,sx:n,children:e.children})});var f0={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(f0);var $R=f0.exports,Od={};const ej=Fb(H4);var g0;function tj(){return g0||(g0=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=ej}(Od)),Od}function p0(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=p0(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function nj(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=p0(e))&&(r&&(r+=" "),r+=t);return r}var Md=globalThis&&globalThis.__assign||function(){return Md=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Md.apply(this,arguments)},rj=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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},h0=function(e){var t=e.className,n=e.sx,r=rj(e,["className","sx"]),i=be.useLoading(),a=xt();return V.createElement(oj,{className:t,sx:n},i?V.createElement(fm,Md({className:nj("app-loader",Vl.loader),color:"inherit",size:a.spacing(2),thickness:6},r)):V.createElement(X0,{className:Vl.loadedIcon}))};h0.propTypes={classes:c.object,className:c.string,width:c.string};var Dd="RaLoadingIndicator",Vl={loader:"".concat(Dd,"-loader"),loadedIcon:"".concat(Dd,"-loadedIcon")},oj=ue("div",{name:Dd,overridesResolver:function(e,t){return t.root}})(function(e){var t,n=e.theme;return t={},t["& .".concat(Vl.loader)]={marginLeft:n.spacing(1.5),marginRight:n.spacing(1.5)},t["& .".concat(Vl.loadedIcon)]={},t});const Rd=e=>e.scrollTop;function Si(e,t){var n,r;const{timeout:i,easing:a,style:l={}}=e;return{duration:(n=l.transitionDuration)!=null?n:typeof i=="number"?i:i[t.mode]||0,easing:(r=l.transitionTimingFunction)!=null?r:typeof a=="object"?a[t.mode]:a,delay:l.transitionDelay}}const ij=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function sj(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),a=oi(t);let l;if(t.fakeTransform)l=t.fakeTransform;else{const f=a.getComputedStyle(t);l=f.getPropertyValue("-webkit-transform")||f.getPropertyValue("transform")}let u=0,A=0;if(l&&l!=="none"&&typeof l=="string"){const f=l.split("(")[1].split(")")[0].split(",");u=parseInt(f[4],10),A=parseInt(f[5],10)}return e==="left"?i?`translateX(${i.right+u-r.left}px)`:`translateX(${a.innerWidth+u-r.left}px)`:e==="right"?i?`translateX(-${r.right-i.left-u}px)`:`translateX(-${r.left+r.width-u}px)`:e==="up"?i?`translateY(${i.bottom+A-r.top}px)`:`translateY(${a.innerHeight+A-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-A}px)`:`translateY(-${r.top+r.height-A}px)`}function C0(e){return typeof e=="function"?e():e}function Hl(e,t,n){const r=C0(n),i=sj(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const E0=V.forwardRef(function(t,n){const r=xt(),i={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},a={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:l,appear:u=!0,children:A,container:f,direction:p="down",easing:C=i,in:h,onEnter:m,onEntered:I,onEntering:B,onExit:v,onExited:O,onExiting:R,style:x,timeout:T=a,TransitionComponent:P=WA}=t,L=Ke(t,ij),k=V.useRef(null),_=Bn(A.ref,k,n),J=F=>te=>{F&&(te===void 0?F(k.current):F(k.current,te))},Y=J((F,te)=>{Hl(p,F,f),Rd(F),m&&m(F,te)}),ee=J((F,te)=>{const W=Si({timeout:T,style:x,easing:C},{mode:"enter"});F.style.webkitTransition=r.transitions.create("-webkit-transform",U({},W)),F.style.transition=r.transitions.create("transform",U({},W)),F.style.webkitTransform="none",F.style.transform="none",B&&B(F,te)}),le=J(I),se=J(R),q=J(F=>{const te=Si({timeout:T,style:x,easing:C},{mode:"exit"});F.style.webkitTransition=r.transitions.create("-webkit-transform",te),F.style.transition=r.transitions.create("transform",te),Hl(p,F,f),v&&v(F)}),K=J(F=>{F.style.webkitTransition="",F.style.transition="",O&&O(F)}),z=F=>{l&&l(k.current,F)},Z=V.useCallback(()=>{k.current&&Hl(p,k.current,f)},[p,f]);return V.useEffect(()=>{if(h||p==="down"||p==="right")return;const F=Ep(()=>{k.current&&Hl(p,k.current,f)}),te=oi(k.current);return te.addEventListener("resize",F),()=>{F.clear(),te.removeEventListener("resize",F)}},[p,h,f]),V.useEffect(()=>{h||Z()},[h,Z]),g.jsx(P,U({nodeRef:k,onEnter:Y,onEntered:le,onEntering:ee,onExit:q,onExited:K,onExiting:se,addEndListener:z,appear:u,in:h,timeout:T},L,{children:(F,te)=>V.cloneElement(A,U({ref:_,style:U({visibility:F==="exited"&&!h?"hidden":void 0},x,A.props.style)},te))}))});process.env.NODE_ENV!=="production"&&(E0.propTypes={addEndListener:c.func,appear:c.bool,children:ni.isRequired,container:vr(c.oneOfType([bo,c.func]),e=>{if(e.open){const t=C0(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(`
203
203
  `))}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(`
204
204
  `))}return null}),direction:c.oneOf(["down","left","right","up"]),easing:c.oneOfType([c.shape({enter:c.string,exit:c.string}),c.string]),in:c.bool,onEnter:c.func,onEntered:c.func,onEntering:c.func,onExit:c.func,onExited:c.func,onExiting:c.func,style:c.object,timeout:c.oneOfType([c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})])});const aj=E0;function lj(e){return typeof e=="string"}function cj(e,t,n){return e===void 0||lj(e)?t:U({},t,{ownerState:U({},t.ownerState,n)})}const uj={disableDefaultClasses:!1},Aj=V.createContext(uj);function dj(e){const{disableDefaultClasses:t}=V.useContext(Aj);return n=>t?"":e(n)}function m0(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function fj(e,t,n){return typeof e=="function"?e(t,n):e}function I0(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function gj(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:a}=e;if(!t){const m=Xe(i==null?void 0:i.className,r==null?void 0:r.className,a,n==null?void 0:n.className),I=U({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),B=U({},n,i,r);return m.length>0&&(B.className=m),Object.keys(I).length>0&&(B.style=I),{props:B,internalRef:void 0}}const l=m0(U({},i,r)),u=I0(r),A=I0(i),f=t(l),p=Xe(f==null?void 0:f.className,n==null?void 0:n.className,a,i==null?void 0:i.className,r==null?void 0:r.className),C=U({},f==null?void 0:f.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),h=U({},f,n,A,u);return p.length>0&&(h.className=p),Object.keys(C).length>0&&(h.style=C),{props:h,internalRef:f.ref}}const pj=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function hj(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:a=!1}=e,l=Ke(e,pj),u=a?{}:fj(r,i),{props:A,internalRef:f}=gj(U({},l,{externalSlotProps:u})),p=Bn(f,u==null?void 0:u.ref,(t=e.additionalProps)==null?void 0:t.ref);return cj(n,U({},A,{ref:p}),i)}function Cj(e){const t=rr(e);return t.body===e?oi(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Ls(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function B0(e){return parseInt(oi(e).getComputedStyle(e).paddingRight,10)||0}function Ej(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 y0(e,t,n,r,i){const a=[t,n,...r];[].forEach.call(e.children,l=>{const u=a.indexOf(l)===-1,A=!Ej(l);u&&A&&Ls(l,i)})}function jd(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function mj(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(Cj(r)){const l=gQ(rr(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${B0(r)+l}px`;const u=rr(r).querySelectorAll(".mui-fixed");[].forEach.call(u,A=>{n.push({value:A.style.paddingRight,property:"padding-right",el:A}),A.style.paddingRight=`${B0(A)+l}px`})}let a;if(r.parentNode instanceof DocumentFragment)a=rr(r).body;else{const l=r.parentElement,u=oi(r);a=(l==null?void 0:l.nodeName)==="HTML"&&u.getComputedStyle(l).overflowY==="scroll"?l:r}n.push({value:a.style.overflow,property:"overflow",el:a},{value:a.style.overflowX,property:"overflow-x",el:a},{value:a.style.overflowY,property:"overflow-y",el:a}),a.style.overflow="hidden"}return()=>{n.forEach(({value:a,el:l,property:u})=>{a?l.style.setProperty(u,a):l.style.removeProperty(u)})}}function Ij(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class Bj{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&&Ls(t.modalRef,!1);const i=Ij(n);y0(n,t.mount,t.modalRef,i,!0);const a=jd(this.containers,l=>l.container===n);return a!==-1?(this.containers[a].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:i}),r)}mount(t,n){const r=jd(this.containers,a=>a.modals.indexOf(t)!==-1),i=this.containers[r];i.restore||(i.restore=mj(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=jd(this.containers,l=>l.modals.indexOf(t)!==-1),a=this.containers[i];if(a.modals.splice(a.modals.indexOf(t),1),this.modals.splice(r,1),a.modals.length===0)a.restore&&a.restore(),t.modalRef&&Ls(t.modalRef,n),y0(a.container,t.mount,t.modalRef,a.hiddenSiblings,!1),this.containers.splice(i,1);else{const l=a.modals[a.modals.length-1];l.modalRef&&Ls(l.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function yj(e){return typeof e=="function"?e():e}function vj(e){return e?e.props.hasOwnProperty("in"):!1}const bj=new Bj;function Qj(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=bj,closeAfterTransition:a=!1,onTransitionEnter:l,onTransitionExited:u,children:A,onClose:f,open:p,rootRef:C}=e,h=V.useRef({}),m=V.useRef(null),I=V.useRef(null),B=Bn(I,C),[v,O]=V.useState(!p),R=vj(A);let x=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(x=!1);const T=()=>rr(m.current),P=()=>(h.current.modalRef=I.current,h.current.mount=m.current,h.current),L=()=>{i.mount(P(),{disableScrollLock:r}),I.current&&(I.current.scrollTop=0)},k=Kr(()=>{const z=yj(t)||T().body;i.add(P(),z),I.current&&L()}),_=V.useCallback(()=>i.isTopModal(P()),[i]),J=Kr(z=>{m.current=z,z&&(p&&_()?L():I.current&&Ls(I.current,x))}),Y=V.useCallback(()=>{i.remove(P(),x)},[x,i]);V.useEffect(()=>()=>{Y()},[Y]),V.useEffect(()=>{p?k():(!R||!a)&&Y()},[p,Y,R,a,k]);const ee=z=>Z=>{var F;(F=z.onKeyDown)==null||F.call(z,Z),!(Z.key!=="Escape"||!_())&&(n||(Z.stopPropagation(),f&&f(Z,"escapeKeyDown")))},le=z=>Z=>{var F;(F=z.onClick)==null||F.call(z,Z),Z.target===Z.currentTarget&&f&&f(Z,"backdropClick")};return{getRootProps:(z={})=>{const Z=m0(e);delete Z.onTransitionEnter,delete Z.onTransitionExited;const F=U({},Z,z);return U({role:"presentation"},F,{onKeyDown:ee(F),ref:B})},getBackdropProps:(z={})=>{const Z=z;return U({"aria-hidden":!0},Z,{onClick:le(Z),open:p})},getTransitionProps:()=>{const z=()=>{O(!1),l&&l()},Z=()=>{O(!0),u&&u(),a&&Y()};return{onEnter:Iu(z,A==null?void 0:A.props.onEnter),onExited:Iu(Z,A==null?void 0:A.props.onExited)}},rootRef:B,portalRef:J,isTopModal:_,exited:v,hasTransition:R}}const xj=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function wj(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 Tj(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 Pj(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||Tj(e))}function Sj(e){const t=[],n=[];return Array.from(e.querySelectorAll(xj)).forEach((r,i)=>{const a=wj(r);a===-1||!Pj(r)||(a===0?t.push(r):n.push({documentOrder:i,tabIndex:a,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(t)}function Oj(){return!0}function zl(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=Sj,isEnabled:l=Oj,open:u}=e,A=V.useRef(!1),f=V.useRef(null),p=V.useRef(null),C=V.useRef(null),h=V.useRef(null),m=V.useRef(!1),I=V.useRef(null),B=Bn(t.ref,I),v=V.useRef(null);V.useEffect(()=>{!u||!I.current||(m.current=!n)},[n,u]),V.useEffect(()=>{if(!u||!I.current)return;const x=rr(I.current);return I.current.contains(x.activeElement)||(I.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(`
205
205
  `)),I.current.setAttribute("tabIndex","-1")),m.current&&I.current.focus()),()=>{i||(C.current&&C.current.focus&&(A.current=!0,C.current.focus()),C.current=null)}},[u]),V.useEffect(()=>{if(!u||!I.current)return;const x=rr(I.current),T=k=>{v.current=k,!(r||!l()||k.key!=="Tab")&&x.activeElement===I.current&&k.shiftKey&&(A.current=!0,p.current&&p.current.focus())},P=()=>{const k=I.current;if(k===null)return;if(!x.hasFocus()||!l()||A.current){A.current=!1;return}if(k.contains(x.activeElement)||r&&x.activeElement!==f.current&&x.activeElement!==p.current)return;if(x.activeElement!==h.current)h.current=null;else if(h.current!==null)return;if(!m.current)return;let _=[];if((x.activeElement===f.current||x.activeElement===p.current)&&(_=a(I.current)),_.length>0){var J,Y;const ee=!!((J=v.current)!=null&&J.shiftKey&&((Y=v.current)==null?void 0:Y.key)==="Tab"),le=_[0],se=_[_.length-1];typeof le!="string"&&typeof se!="string"&&(ee?se.focus():le.focus())}else k.focus()};x.addEventListener("focusin",P),x.addEventListener("keydown",T,!0);const L=setInterval(()=>{x.activeElement&&x.activeElement.tagName==="BODY"&&P()},50);return()=>{clearInterval(L),x.removeEventListener("focusin",P),x.removeEventListener("keydown",T,!0)}},[n,r,i,l,u,a]);const O=x=>{C.current===null&&(C.current=x.relatedTarget),m.current=!0,h.current=x.target;const T=t.props.onFocus;T&&T(x)},R=x=>{C.current===null&&(C.current=x.relatedTarget),m.current=!0};return g.jsxs(V.Fragment,{children:[g.jsx("div",{tabIndex:u?0:-1,onFocus:R,ref:f,"data-testid":"sentinelStart"}),V.cloneElement(t,{ref:B,onFocus:O}),g.jsx("div",{tabIndex:u?0:-1,onFocus:R,ref:p,"data-testid":"sentinelEnd"})]})}process.env.NODE_ENV!=="production"&&(zl.propTypes={children:ni,disableAutoFocus:c.bool,disableEnforceFocus:c.bool,disableRestoreFocus:c.bool,getTabbable:c.func,isEnabled:c.func,open:c.bool.isRequired}),process.env.NODE_ENV!=="production"&&(zl["propTypes"]=Qa(zl.propTypes));function Mj(e){return typeof e=="function"?e():e}const Ns=V.forwardRef(function(t,n){const{children:r,container:i,disablePortal:a=!1}=t,[l,u]=V.useState(null),A=Bn(V.isValidElement(r)?r.ref:null,n);if(ii(()=>{a||u(Mj(i)||document.body)},[i,a]),ii(()=>{if(l&&!a)return xa(n,l),()=>{xa(n,null)}},[n,l,a]),a){if(V.isValidElement(r)){const f={ref:A};return V.cloneElement(r,f)}return g.jsx(V.Fragment,{children:r})}return g.jsx(V.Fragment,{children:l&&kb.createPortal(r,l)})});process.env.NODE_ENV!=="production"&&(Ns.propTypes={children:c.node,container:c.oneOfType([bo,c.func]),disablePortal:c.bool}),process.env.NODE_ENV!=="production"&&(Ns["propTypes"]=Qa(Ns.propTypes));const Dj=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Rj={entering:{opacity:1},entered:{opacity:1}},v0=V.forwardRef(function(t,n){const r=xt(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:a,appear:l=!0,children:u,easing:A,in:f,onEnter:p,onEntered:C,onEntering:h,onExit:m,onExited:I,onExiting:B,style:v,timeout:O=i,TransitionComponent:R=WA}=t,x=Ke(t,Dj),T=V.useRef(null),P=Bn(T,u.ref,n),L=q=>K=>{if(q){const z=T.current;K===void 0?q(z):q(z,K)}},k=L(h),_=L((q,K)=>{Rd(q);const z=Si({style:v,timeout:O,easing:A},{mode:"enter"});q.style.webkitTransition=r.transitions.create("opacity",z),q.style.transition=r.transitions.create("opacity",z),p&&p(q,K)}),J=L(C),Y=L(B),ee=L(q=>{const K=Si({style:v,timeout:O,easing:A},{mode:"exit"});q.style.webkitTransition=r.transitions.create("opacity",K),q.style.transition=r.transitions.create("opacity",K),m&&m(q)}),le=L(I),se=q=>{a&&a(T.current,q)};return g.jsx(R,U({appear:l,in:f,nodeRef:T,onEnter:_,onEntered:J,onEntering:k,onExit:ee,onExited:le,onExiting:Y,addEndListener:se,timeout:O},x,{children:(q,K)=>V.cloneElement(u,U({style:U({opacity:0,visibility:q==="exited"&&!f?"hidden":void 0},Rj[q],v,u.props.style),ref:P},K))}))});process.env.NODE_ENV!=="production"&&(v0.propTypes={addEndListener:c.func,appear:c.bool,children:ni.isRequired,easing:c.oneOfType([c.shape({enter:c.string,exit:c.string}),c.string]),in:c.bool,onEnter:c.func,onEntered:c.func,onEntering:c.func,onExit:c.func,onExited:c.func,onExiting:c.func,style:c.object,timeout:c.oneOfType([c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})])});const jj=v0;function kj(e){return Vt("MuiBackdrop",e)}Yt("MuiBackdrop",["root","invisible"]);const Fj=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Lj=e=>{const{classes:t,invisible:n}=e;return un({root:["root",n&&"invisible"]},kj,t)},Nj=ue("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>U({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"})),b0=V.forwardRef(function(t,n){var r,i,a;const l=Gt({props:t,name:"MuiBackdrop"}),{children:u,className:A,component:f="div",components:p={},componentsProps:C={},invisible:h=!1,open:m,slotProps:I={},slots:B={},TransitionComponent:v=jj,transitionDuration:O}=l,R=Ke(l,Fj),x=U({},l,{component:f,invisible:h}),T=Lj(x),P=(r=I.root)!=null?r:C.root;return g.jsx(v,U({in:m,timeout:O},R,{children:g.jsx(Nj,U({"aria-hidden":!0},P,{as:(i=(a=B.root)!=null?a:p.Root)!=null?i:f,className:Xe(T.root,A,P==null?void 0:P.className),ownerState:U({},x,P==null?void 0:P.ownerState),classes:T,ref:n,children:u}))}))});process.env.NODE_ENV!=="production"&&(b0.propTypes={children:c.node,classes:c.object,className:c.string,component:c.elementType,components:c.shape({Root:c.elementType}),componentsProps:c.shape({root:c.object}),invisible:c.bool,open:c.bool.isRequired,slotProps:c.shape({root:c.object}),slots:c.shape({root:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object]),TransitionComponent:c.elementType,transitionDuration:c.oneOfType([c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})])});const Vj=b0;function Hj(e){return Vt("MuiModal",e)}Yt("MuiModal",["root","hidden","backdrop"]);const zj=["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"],Wj=e=>{const{open:t,exited:n,classes:r}=e;return un({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},Hj,r)},Uj=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})=>U({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),Yj=ue(Vj,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Q0=V.forwardRef(function(t,n){var r,i,a,l,u,A;const f=Gt({name:"MuiModal",props:t}),{BackdropComponent:p=Yj,BackdropProps:C,className:h,closeAfterTransition:m=!1,children:I,container:B,component:v,components:O={},componentsProps:R={},disableAutoFocus:x=!1,disableEnforceFocus:T=!1,disableEscapeKeyDown:P=!1,disablePortal:L=!1,disableRestoreFocus:k=!1,disableScrollLock:_=!1,hideBackdrop:J=!1,keepMounted:Y=!1,onBackdropClick:ee,open:le,slotProps:se,slots:q}=f,K=Ke(f,zj),z=U({},f,{closeAfterTransition:m,disableAutoFocus:x,disableEnforceFocus:T,disableEscapeKeyDown:P,disablePortal:L,disableRestoreFocus:k,disableScrollLock:_,hideBackdrop:J,keepMounted:Y}),{getRootProps:Z,getBackdropProps:F,getTransitionProps:te,portalRef:W,isTopModal:X,exited:de,hasTransition:ge}=Qj(U({},z,{rootRef:n})),ce=U({},z,{exited:de}),Ae=Wj(ce),pe={};if(I.props.tabIndex===void 0&&(pe.tabIndex="-1"),ge){const{onEnter:ze,onExited:fe}=te();pe.onEnter=ze,pe.onExited=fe}const Ie=(r=(i=q==null?void 0:q.root)!=null?i:O.Root)!=null?r:Uj,Ee=(a=(l=q==null?void 0:q.backdrop)!=null?l:O.Backdrop)!=null?a:p,he=(u=se==null?void 0:se.root)!=null?u:R.root,me=(A=se==null?void 0:se.backdrop)!=null?A:R.backdrop,xe=ur.useSlotProps({elementType:Ie,externalSlotProps:he,externalForwardedProps:K,getSlotProps:Z,additionalProps:{ref:n,as:v},ownerState:ce,className:Xe(h,he==null?void 0:he.className,Ae==null?void 0:Ae.root,!ce.open&&ce.exited&&(Ae==null?void 0:Ae.hidden))}),ae=ur.useSlotProps({elementType:Ee,externalSlotProps:me,additionalProps:C,getSlotProps:ze=>F(U({},ze,{onClick:fe=>{ee&&ee(fe),ze!=null&&ze.onClick&&ze.onClick(fe)}})),className:Xe(me==null?void 0:me.className,C==null?void 0:C.className,Ae==null?void 0:Ae.backdrop),ownerState:ce});return!Y&&!le&&(!ge||de)?null:g.jsx(Ns,{ref:W,container:B,disablePortal:L,children:g.jsxs(Ie,U({},xe,{children:[!J&&p?g.jsx(Ee,U({},ae)):null,g.jsx(zl,{disableEnforceFocus:T,disableAutoFocus:x,disableRestoreFocus:k,isEnabled:X,open:le,children:V.cloneElement(I,pe)})]}))})});process.env.NODE_ENV!=="production"&&(Q0.propTypes={BackdropComponent:c.elementType,BackdropProps:c.object,children:ni.isRequired,classes:c.object,className:c.string,closeAfterTransition:c.bool,component:c.elementType,components:c.shape({Backdrop:c.elementType,Root:c.elementType}),componentsProps:c.shape({backdrop:c.oneOfType([c.func,c.object]),root:c.oneOfType([c.func,c.object])}),container:c.oneOfType([bo,c.func]),disableAutoFocus:c.bool,disableEnforceFocus:c.bool,disableEscapeKeyDown:c.bool,disablePortal:c.bool,disableRestoreFocus:c.bool,disableScrollLock:c.bool,hideBackdrop:c.bool,keepMounted:c.bool,onBackdropClick:c.func,onClose:c.func,onTransitionEnter:c.func,onTransitionExited:c.func,open:c.bool.isRequired,slotProps:c.shape({backdrop:c.oneOfType([c.func,c.object]),root:c.oneOfType([c.func,c.object])}),slots:c.shape({backdrop:c.elementType,root:c.elementType}),sx:c.oneOfType([c.arrayOf(c.oneOfType([c.func,c.object,c.bool])),c.func,c.object])});const Gj=Q0;var kd={},Kj=$R;Object.defineProperty(kd,"__esModule",{value:!0});var x0=kd.default=void 0,_j=Kj(tj()),Jj=g,Xj=(0,_j.default)((0,Jj.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 11h7V4l-2.35 2.35z"}),"Refresh");x0=kd.default=Xj;const Zj=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function Fd(e){return`scale(${e}, ${e**2})`}const qj={entering:{opacity:1,transform:Fd(1)},entered:{opacity:1,transform:"none"}},Ld=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Nd=V.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:a,easing:l,in:u,onEnter:A,onEntered:f,onEntering:p,onExit:C,onExited:h,onExiting:m,style:I,timeout:B="auto",TransitionComponent:v=WA}=t,O=Ke(t,Zj),R=V.useRef(),x=V.useRef(),T=xt(),P=V.useRef(null),L=Bn(P,a.ref,n),k=K=>z=>{if(K){const Z=P.current;z===void 0?K(Z):K(Z,z)}},_=k(p),J=k((K,z)=>{Rd(K);const{duration:Z,delay:F,easing:te}=Si({style:I,timeout:B,easing:l},{mode:"enter"});let W;B==="auto"?(W=T.transitions.getAutoHeightDuration(K.clientHeight),x.current=W):W=Z,K.style.transition=[T.transitions.create("opacity",{duration:W,delay:F}),T.transitions.create("transform",{duration:Ld?W:W*.666,delay:F,easing:te})].join(","),A&&A(K,z)}),Y=k(f),ee=k(m),le=k(K=>{const{duration:z,delay:Z,easing:F}=Si({style:I,timeout:B,easing:l},{mode:"exit"});let te;B==="auto"?(te=T.transitions.getAutoHeightDuration(K.clientHeight),x.current=te):te=z,K.style.transition=[T.transitions.create("opacity",{duration:te,delay:Z}),T.transitions.create("transform",{duration:Ld?te:te*.666,delay:Ld?Z:Z||te*.333,easing:F})].join(","),K.style.opacity=0,K.style.transform=Fd(.75),C&&C(K)}),se=k(h),q=K=>{B==="auto"&&(R.current=setTimeout(K,x.current||0)),r&&r(P.current,K)};return V.useEffect(()=>()=>{clearTimeout(R.current)},[]),g.jsx(v,U({appear:i,in:u,nodeRef:P,onEnter:J,onEntered:Y,onEntering:_,onExit:le,onExited:se,onExiting:ee,addEndListener:q,timeout:B==="auto"?null:B},O,{children:(K,z)=>V.cloneElement(a,U({style:U({opacity:0,transform:Fd(.75),visibility:K==="exited"&&!u?"hidden":void 0},qj[K],I,a.props.style),ref:L},z))}))});process.env.NODE_ENV!=="production"&&(Nd.propTypes={addEndListener:c.func,appear:c.bool,children:ni.isRequired,easing:c.oneOfType([c.shape({enter:c.string,exit:c.string}),c.string]),in:c.bool,onEnter:c.func,onEntered:c.func,onEntering:c.func,onExit:c.func,onExited:c.func,onExiting:c.func,style:c.object,timeout:c.oneOfType([c.oneOf(["auto"]),c.number,c.shape({appear:c.number,enter:c.number,exit:c.number})])}),Nd.muiSupportAuto=!0;const w0=Nd;var dn="top",Wn="bottom",Un="right",fn="left",Vd="auto",Vs=[dn,Wn,Un,fn],Oi="start",Hs="end",$j="clippingParents",T0="viewport",zs="popper",e5="reference",P0=Vs.reduce(function(e,t){return e.concat([t+"-"+Oi,t+"-"+Hs])},[]),S0=[].concat(Vs,[Vd]).reduce(function(e,t){return e.concat([t,t+"-"+Oi,t+"-"+Hs])},[]),t5="beforeRead",n5="read",r5="afterRead",o5="beforeMain",i5="main",s5="afterMain",a5="beforeWrite",l5="write",c5="afterWrite",u5=[t5,n5,r5,o5,i5,s5,a5,l5,c5];function pr(e){return e?(e.nodeName||"").toLowerCase():null}function bn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Fo(e){var t=bn(e).Element;return e instanceof t||e instanceof Element}function Yn(e){var t=bn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Hd(e){if(typeof ShadowRoot>"u")return!1;var t=bn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function A5(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},a=t.elements[n];!Yn(a)||!pr(a)||(Object.assign(a.style,r),Object.keys(i).forEach(function(l){var u=i[l];u===!1?a.removeAttribute(l):a.setAttribute(l,u===!0?"":u)}))})}function d5(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],a=t.attributes[r]||{},l=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),u=l.reduce(function(A,f){return A[f]="",A},{});!Yn(i)||!pr(i)||(Object.assign(i.style,u),Object.keys(a).forEach(function(A){i.removeAttribute(A)}))})}}const f5={name:"applyStyles",enabled:!0,phase:"write",fn:A5,effect:d5,requires:["computeStyles"]};function hr(e){return e.split("-")[0]}var Lo=Math.max,Wl=Math.min,Mi=Math.round;function zd(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function O0(){return!/^((?!chrome|android).)*safari/i.test(zd())}function Di(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&Yn(e)&&(i=e.offsetWidth>0&&Mi(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Mi(r.height)/e.offsetHeight||1);var l=Fo(e)?bn(e):window,u=l.visualViewport,A=!O0()&&n,f=(r.left+(A&&u?u.offsetLeft:0))/i,p=(r.top+(A&&u?u.offsetTop:0))/a,C=r.width/i,h=r.height/a;return{width:C,height:h,top:p,right:f+C,bottom:p+h,left:f,x:f,y:p}}function Wd(e){var t=Di(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function M0(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Hd(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Rr(e){return bn(e).getComputedStyle(e)}function g5(e){return["table","td","th"].indexOf(pr(e))>=0}function so(e){return((Fo(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ul(e){return pr(e)==="html"?e:e.assignedSlot||e.parentNode||(Hd(e)?e.host:null)||so(e)}function D0(e){return!Yn(e)||Rr(e).position==="fixed"?null:e.offsetParent}function p5(e){var t=/firefox/i.test(zd()),n=/Trident/i.test(zd());if(n&&Yn(e)){var r=Rr(e);if(r.position==="fixed")return null}var i=Ul(e);for(Hd(i)&&(i=i.host);Yn(i)&&["html","body"].indexOf(pr(i))<0;){var a=Rr(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function Ws(e){for(var t=bn(e),n=D0(e);n&&g5(n)&&Rr(n).position==="static";)n=D0(n);return n&&(pr(n)==="html"||pr(n)==="body"&&Rr(n).position==="static")?t:n||p5(e)||t}function Ud(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Us(e,t,n){return Lo(e,Wl(t,n))}function h5(e,t,n){var r=Us(e,t,n);return r>n?n:r}function R0(){return{top:0,right:0,bottom:0,left:0}}function j0(e){return Object.assign({},R0(),e)}function k0(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var C5=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,j0(typeof t!="number"?t:k0(t,Vs))};function E5(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,l=n.modifiersData.popperOffsets,u=hr(n.placement),A=Ud(u),f=[fn,Un].indexOf(u)>=0,p=f?"height":"width";if(!(!a||!l)){var C=C5(i.padding,n),h=Wd(a),m=A==="y"?dn:fn,I=A==="y"?Wn:Un,B=n.rects.reference[p]+n.rects.reference[A]-l[A]-n.rects.popper[p],v=l[A]-n.rects.reference[A],O=Ws(a),R=O?A==="y"?O.clientHeight||0:O.clientWidth||0:0,x=B/2-v/2,T=C[m],P=R-h[p]-C[I],L=R/2-h[p]/2+x,k=Us(T,L,P),_=A;n.modifiersData[r]=(t={},t[_]=k,t.centerOffset=k-L,t)}}function m5(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||M0(t.elements.popper,i)&&(t.elements.arrow=i))}const I5={name:"arrow",enabled:!0,phase:"main",fn:E5,effect:m5,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ri(e){return e.split("-")[1]}var B5={top:"auto",right:"auto",bottom:"auto",left:"auto"};function y5(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Mi(n*i)/i||0,y:Mi(r*i)/i||0}}function F0(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,l=e.offsets,u=e.position,A=e.gpuAcceleration,f=e.adaptive,p=e.roundOffsets,C=e.isFixed,h=l.x,m=h===void 0?0:h,I=l.y,B=I===void 0?0:I,v=typeof p=="function"?p({x:m,y:B}):{x:m,y:B};m=v.x,B=v.y;var O=l.hasOwnProperty("x"),R=l.hasOwnProperty("y"),x=fn,T=dn,P=window;if(f){var L=Ws(n),k="clientHeight",_="clientWidth";if(L===bn(n)&&(L=so(n),Rr(L).position!=="static"&&u==="absolute"&&(k="scrollHeight",_="scrollWidth")),L=L,i===dn||(i===fn||i===Un)&&a===Hs){T=Wn;var J=C&&L===P&&P.visualViewport?P.visualViewport.height:L[k];B-=J-r.height,B*=A?1:-1}if(i===fn||(i===dn||i===Wn)&&a===Hs){x=Un;var Y=C&&L===P&&P.visualViewport?P.visualViewport.width:L[_];m-=Y-r.width,m*=A?1:-1}}var ee=Object.assign({position:u},f&&B5),le=p===!0?y5({x:m,y:B},bn(n)):{x:m,y:B};if(m=le.x,B=le.y,A){var se;return Object.assign({},ee,(se={},se[T]=R?"0":"",se[x]=O?"0":"",se.transform=(P.devicePixelRatio||1)<=1?"translate("+m+"px, "+B+"px)":"translate3d("+m+"px, "+B+"px, 0)",se))}return Object.assign({},ee,(t={},t[T]=R?B+"px":"",t[x]=O?m+"px":"",t.transform="",t))}function v5(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,a=n.adaptive,l=a===void 0?!0:a,u=n.roundOffsets,A=u===void 0?!0:u,f={placement:hr(t.placement),variation:Ri(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,F0(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:l,roundOffsets:A})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,F0(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:A})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const b5={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:v5,data:{}};var Yl={passive:!0};function Q5(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0?!0:i,l=r.resize,u=l===void 0?!0:l,A=bn(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&f.forEach(function(p){p.addEventListener("scroll",n.update,Yl)}),u&&A.addEventListener("resize",n.update,Yl),function(){a&&f.forEach(function(p){p.removeEventListener("scroll",n.update,Yl)}),u&&A.removeEventListener("resize",n.update,Yl)}}const x5={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Q5,data:{}};var w5={left:"right",right:"left",bottom:"top",top:"bottom"};function Gl(e){return e.replace(/left|right|bottom|top/g,function(t){return w5[t]})}var T5={start:"end",end:"start"};function L0(e){return e.replace(/start|end/g,function(t){return T5[t]})}function Yd(e){var t=bn(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Gd(e){return Di(so(e)).left+Yd(e).scrollLeft}function P5(e,t){var n=bn(e),r=so(e),i=n.visualViewport,a=r.clientWidth,l=r.clientHeight,u=0,A=0;if(i){a=i.width,l=i.height;var f=O0();(f||!f&&t==="fixed")&&(u=i.offsetLeft,A=i.offsetTop)}return{width:a,height:l,x:u+Gd(e),y:A}}function S5(e){var t,n=so(e),r=Yd(e),i=(t=e.ownerDocument)==null?void 0:t.body,a=Lo(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),l=Lo(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),u=-r.scrollLeft+Gd(e),A=-r.scrollTop;return Rr(i||n).direction==="rtl"&&(u+=Lo(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:l,x:u,y:A}}function Kd(e){var t=Rr(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function N0(e){return["html","body","#document"].indexOf(pr(e))>=0?e.ownerDocument.body:Yn(e)&&Kd(e)?e:N0(Ul(e))}function Ys(e,t){var n;t===void 0&&(t=[]);var r=N0(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),a=bn(r),l=i?[a].concat(a.visualViewport||[],Kd(r)?r:[]):r,u=t.concat(l);return i?u:u.concat(Ys(Ul(l)))}function _d(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function O5(e,t){var n=Di(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function V0(e,t,n){return t===T0?_d(P5(e,n)):Fo(t)?O5(t,n):_d(S5(so(e)))}function M5(e){var t=Ys(Ul(e)),n=["absolute","fixed"].indexOf(Rr(e).position)>=0,r=n&&Yn(e)?Ws(e):e;return Fo(r)?t.filter(function(i){return Fo(i)&&M0(i,r)&&pr(i)!=="body"}):[]}function D5(e,t,n,r){var i=t==="clippingParents"?M5(e):[].concat(t),a=[].concat(i,[n]),l=a[0],u=a.reduce(function(A,f){var p=V0(e,f,r);return A.top=Lo(p.top,A.top),A.right=Wl(p.right,A.right),A.bottom=Wl(p.bottom,A.bottom),A.left=Lo(p.left,A.left),A},V0(e,l,r));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function H0(e){var t=e.reference,n=e.element,r=e.placement,i=r?hr(r):null,a=r?Ri(r):null,l=t.x+t.width/2-n.width/2,u=t.y+t.height/2-n.height/2,A;switch(i){case dn:A={x:l,y:t.y-n.height};break;case Wn:A={x:l,y:t.y+t.height};break;case Un:A={x:t.x+t.width,y:u};break;case fn:A={x:t.x-n.width,y:u};break;default:A={x:t.x,y:t.y}}var f=i?Ud(i):null;if(f!=null){var p=f==="y"?"height":"width";switch(a){case Oi:A[f]=A[f]-(t[p]/2-n[p]/2);break;case Hs:A[f]=A[f]+(t[p]/2-n[p]/2);break}}return A}function Gs(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,l=a===void 0?e.strategy:a,u=n.boundary,A=u===void 0?$j:u,f=n.rootBoundary,p=f===void 0?T0:f,C=n.elementContext,h=C===void 0?zs:C,m=n.altBoundary,I=m===void 0?!1:m,B=n.padding,v=B===void 0?0:B,O=j0(typeof v!="number"?v:k0(v,Vs)),R=h===zs?e5:zs,x=e.rects.popper,T=e.elements[I?R:h],P=D5(Fo(T)?T:T.contextElement||so(e.elements.popper),A,p,l),L=Di(e.elements.reference),k=H0({reference:L,element:x,strategy:"absolute",placement:i}),_=_d(Object.assign({},x,k)),J=h===zs?_:L,Y={top:P.top-J.top+O.top,bottom:J.bottom-P.bottom+O.bottom,left:P.left-J.left+O.left,right:J.right-P.right+O.right},ee=e.modifiersData.offset;if(h===zs&&ee){var le=ee[i];Object.keys(Y).forEach(function(se){var q=[Un,Wn].indexOf(se)>=0?1:-1,K=[dn,Wn].indexOf(se)>=0?"y":"x";Y[se]+=le[K]*q})}return Y}function R5(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,l=n.padding,u=n.flipVariations,A=n.allowedAutoPlacements,f=A===void 0?S0:A,p=Ri(r),C=p?u?P0:P0.filter(function(I){return Ri(I)===p}):Vs,h=C.filter(function(I){return f.indexOf(I)>=0});h.length===0&&(h=C);var m=h.reduce(function(I,B){return I[B]=Gs(e,{placement:B,boundary:i,rootBoundary:a,padding:l})[hr(B)],I},{});return Object.keys(m).sort(function(I,B){return m[I]-m[B]})}function j5(e){if(hr(e)===Vd)return[];var t=Gl(e);return[L0(e),t,L0(t)]}function k5(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0?!0:i,l=n.altAxis,u=l===void 0?!0:l,A=n.fallbackPlacements,f=n.padding,p=n.boundary,C=n.rootBoundary,h=n.altBoundary,m=n.flipVariations,I=m===void 0?!0:m,B=n.allowedAutoPlacements,v=t.options.placement,O=hr(v),R=O===v,x=A||(R||!I?[Gl(v)]:j5(v)),T=[v].concat(x).reduce(function(ce,Ae){return ce.concat(hr(Ae)===Vd?R5(t,{placement:Ae,boundary:p,rootBoundary:C,padding:f,flipVariations:I,allowedAutoPlacements:B}):Ae)},[]),P=t.rects.reference,L=t.rects.popper,k=new Map,_=!0,J=T[0],Y=0;Y<T.length;Y++){var ee=T[Y],le=hr(ee),se=Ri(ee)===Oi,q=[dn,Wn].indexOf(le)>=0,K=q?"width":"height",z=Gs(t,{placement:ee,boundary:p,rootBoundary:C,altBoundary:h,padding:f}),Z=q?se?Un:fn:se?Wn:dn;P[K]>L[K]&&(Z=Gl(Z));var F=Gl(Z),te=[];if(a&&te.push(z[le]<=0),u&&te.push(z[Z]<=0,z[F]<=0),te.every(function(ce){return ce})){J=ee,_=!1;break}k.set(ee,te)}if(_)for(var W=I?3:1,X=function(Ae){var pe=T.find(function(Ie){var Ee=k.get(Ie);if(Ee)return Ee.slice(0,Ae).every(function(he){return he})});if(pe)return J=pe,"break"},de=W;de>0;de--){var ge=X(de);if(ge==="break")break}t.placement!==J&&(t.modifiersData[r]._skip=!0,t.placement=J,t.reset=!0)}}const F5={name:"flip",enabled:!0,phase:"main",fn:k5,requiresIfExists:["offset"],data:{_skip:!1}};function z0(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function W0(e){return[dn,Un,Wn,fn].some(function(t){return e[t]>=0})}function L5(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,l=Gs(t,{elementContext:"reference"}),u=Gs(t,{altBoundary:!0}),A=z0(l,r),f=z0(u,i,a),p=W0(A),C=W0(f);t.modifiersData[n]={referenceClippingOffsets:A,popperEscapeOffsets:f,isReferenceHidden:p,hasPopperEscaped:C},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":C})}const N5={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:L5};function V5(e,t,n){var r=hr(e),i=[fn,dn].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,l=a[0],u=a[1];return l=l||0,u=(u||0)*i,[fn,Un].indexOf(r)>=0?{x:u,y:l}:{x:l,y:u}}function H5(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,l=S0.reduce(function(p,C){return p[C]=V5(C,t.rects,a),p},{}),u=l[t.placement],A=u.x,f=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=A,t.modifiersData.popperOffsets.y+=f),t.modifiersData[r]=l}const z5={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:H5};function W5(e){var t=e.state,n=e.name;t.modifiersData[n]=H0({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const U5={name:"popperOffsets",enabled:!0,phase:"read",fn:W5,data:{}};function Y5(e){return e==="x"?"y":"x"}function G5(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0?!0:i,l=n.altAxis,u=l===void 0?!1:l,A=n.boundary,f=n.rootBoundary,p=n.altBoundary,C=n.padding,h=n.tether,m=h===void 0?!0:h,I=n.tetherOffset,B=I===void 0?0:I,v=Gs(t,{boundary:A,rootBoundary:f,padding:C,altBoundary:p}),O=hr(t.placement),R=Ri(t.placement),x=!R,T=Ud(O),P=Y5(T),L=t.modifiersData.popperOffsets,k=t.rects.reference,_=t.rects.popper,J=typeof B=="function"?B(Object.assign({},t.rects,{placement:t.placement})):B,Y=typeof J=="number"?{mainAxis:J,altAxis:J}:Object.assign({mainAxis:0,altAxis:0},J),ee=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,le={x:0,y:0};if(L){if(a){var se,q=T==="y"?dn:fn,K=T==="y"?Wn:Un,z=T==="y"?"height":"width",Z=L[T],F=Z+v[q],te=Z-v[K],W=m?-_[z]/2:0,X=R===Oi?k[z]:_[z],de=R===Oi?-_[z]:-k[z],ge=t.elements.arrow,ce=m&&ge?Wd(ge):{width:0,height:0},Ae=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:R0(),pe=Ae[q],Ie=Ae[K],Ee=Us(0,k[z],ce[z]),he=x?k[z]/2-W-Ee-pe-Y.mainAxis:X-Ee-pe-Y.mainAxis,me=x?-k[z]/2+W+Ee+Ie+Y.mainAxis:de+Ee+Ie+Y.mainAxis,xe=t.elements.arrow&&Ws(t.elements.arrow),ae=xe?T==="y"?xe.clientTop||0:xe.clientLeft||0:0,ze=(se=ee==null?void 0:ee[T])!=null?se:0,fe=Z+he-ze-ae,ct=Z+me-ze,Ht=Us(m?Wl(F,fe):F,Z,m?Lo(te,ct):te);L[T]=Ht,le[T]=Ht-Z}if(u){var Et,Tt=T==="x"?dn:fn,Er=T==="x"?Wn:Un,bt=L[P],mt=P==="y"?"height":"width",At=bt+v[Tt],Ft=bt-v[Er],Lt=[dn,fn].indexOf(O)!==-1,Se=(Et=ee==null?void 0:ee[P])!=null?Et:0,ke=Lt?At:bt-k[mt]-_[mt]-Se+Y.altAxis,we=Lt?bt+k[mt]+_[mt]-Se-Y.altAxis:Ft,We=m&&Lt?h5(ke,bt,we):Us(m?ke:At,bt,m?we:Ft);L[P]=We,le[P]=We-bt}t.modifiersData[r]=le}}const K5={name:"preventOverflow",enabled:!0,phase:"main",fn:G5,requiresIfExists:["offset"]};function _5(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function J5(e){return e===bn(e)||!Yn(e)?Yd(e):_5(e)}function X5(e){var t=e.getBoundingClientRect(),n=Mi(t.width)/e.offsetWidth||1,r=Mi(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Z5(e,t,n){n===void 0&&(n=!1);var r=Yn(t),i=Yn(t)&&X5(t),a=so(t),l=Di(e,i,n),u={scrollLeft:0,scrollTop:0},A={x:0,y:0};return(r||!r&&!n)&&((pr(t)!=="body"||Kd(a))&&(u=J5(t)),Yn(t)?(A=Di(t,!0),A.x+=t.clientLeft,A.y+=t.clientTop):a&&(A.x=Gd(a))),{x:l.left+u.scrollLeft-A.x,y:l.top+u.scrollTop-A.y,width:l.width,height:l.height}}function q5(e){var t=new Map,n=new Set,r=[];e.forEach(function(a){t.set(a.name,a)});function i(a){n.add(a.name);var l=[].concat(a.requires||[],a.requiresIfExists||[]);l.forEach(function(u){if(!n.has(u)){var A=t.get(u);A&&i(A)}}),r.push(a)}return e.forEach(function(a){n.has(a.name)||i(a)}),r}function $5(e){var t=q5(e);return u5.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function ek(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function tk(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var U0={placement:"bottom",modifiers:[],strategy:"absolute"};function Y0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function nk(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?U0:i;return function(u,A,f){f===void 0&&(f=a);var p={placement:"bottom",orderedModifiers:[],options:Object.assign({},U0,a),modifiersData:{},elements:{reference:u,popper:A},attributes:{},styles:{}},C=[],h=!1,m={state:p,setOptions:function(O){var R=typeof O=="function"?O(p.options):O;B(),p.options=Object.assign({},a,p.options,R),p.scrollParents={reference:Fo(u)?Ys(u):u.contextElement?Ys(u.contextElement):[],popper:Ys(A)};var x=$5(tk([].concat(r,p.options.modifiers)));return p.orderedModifiers=x.filter(function(T){return T.enabled}),I(),m.update()},forceUpdate:function(){if(!h){var O=p.elements,R=O.reference,x=O.popper;if(Y0(R,x)){p.rects={reference:Z5(R,Ws(x),p.options.strategy==="fixed"),popper:Wd(x)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(Y){return p.modifiersData[Y.name]=Object.assign({},Y.data)});for(var T=0;T<p.orderedModifiers.length;T++){if(p.reset===!0){p.reset=!1,T=-1;continue}var P=p.orderedModifiers[T],L=P.fn,k=P.options,_=k===void 0?{}:k,J=P.name;typeof L=="function"&&(p=L({state:p,options:_,name:J,instance:m})||p)}}}},update:ek(function(){return new Promise(function(v){m.forceUpdate(),v(p)})}),destroy:function(){B(),h=!0}};if(!Y0(u,A))return m;m.setOptions(f).then(function(v){!h&&f.onFirstUpdate&&f.onFirstUpdate(v)});function I(){p.orderedModifiers.forEach(function(v){var O=v.name,R=v.options,x=R===void 0?{}:R,T=v.effect;if(typeof T=="function"){var P=T({state:p,name:O,instance:m,options:x}),L=function(){};C.push(P||L)}})}function B(){C.forEach(function(v){return v()}),C=[]}return m}}var rk=[x5,U5,b5,f5,z5,F5,K5,I5,N5],ok=nk({defaultModifiers:rk});function ik(e){return Vt("MuiPopper",e)}Yt("MuiPopper",["root"]);const sk=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],ak=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function lk(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 Kl(e){return typeof e=="function"?e():e}function _l(e){return e.nodeType!==void 0}function ck(e){return!_l(e)}const uk=()=>un({root:["root"]},dj(ik)),Ak={},dk=V.forwardRef(function(t,n){var r;const{anchorEl:i,children:a,direction:l,disablePortal:u,modifiers:A,open:f,placement:p,popperOptions:C,popperRef:h,slotProps:m={},slots:I={},TransitionProps:B}=t,v=Ke(t,sk),O=V.useRef(null),R=Bn(O,n),x=V.useRef(null),T=Bn(x,h),P=V.useRef(T);ii(()=>{P.current=T},[T]),V.useImperativeHandle(h,()=>x.current,[]);const L=lk(p,l),[k,_]=V.useState(L),[J,Y]=V.useState(Kl(i));V.useEffect(()=>{x.current&&x.current.forceUpdate()}),V.useEffect(()=>{i&&Y(Kl(i))},[i]),ii(()=>{if(!J||!f)return;const K=F=>{_(F.placement)};if(process.env.NODE_ENV!=="production"&&J&&_l(J)&&J.nodeType===1){const F=J.getBoundingClientRect();process.env.NODE_ENV!=="test"&&F.top===0&&F.left===0&&F.right===0&&F.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(`