@carto/meridian-ds 1.4.1 → 1.4.2-alpha-forwarding-props.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -1
- package/dist/{Alert-Cn0nq6aq.js → Alert-1b84B18a.js} +1 -1
- package/dist/{Alert-B2JgFj6Y.cjs → Alert-BbMbtaix.cjs} +1 -1
- package/dist/{MenuItem-vbfSlKyV.js → MenuItem-Cd34y6F3.js} +41 -15
- package/dist/MenuItem-Dbss-WG1.cjs +1 -0
- package/dist/{TablePaginationActions-EC4ynZRa.js → TablePaginationActions-EDxBCxpG.js} +1 -0
- package/dist/TablePaginationActions-V8ultBUz.cjs +9 -0
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.js +1113 -1005
- package/dist/theme/index.cjs +1 -1
- package/dist/theme/index.js +42 -36
- package/dist/types/components/atoms/Button.d.ts.map +1 -1
- package/dist/types/components/atoms/IconButton.d.ts.map +1 -1
- package/dist/types/components/atoms/Typography.d.ts.map +1 -1
- package/dist/types/components/molecules/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/types/components/molecules/Autocomplete/CreatableAutocomplete.d.ts +1 -1
- package/dist/types/components/molecules/Autocomplete/CreatableAutocomplete.d.ts.map +1 -1
- package/dist/types/components/molecules/Autocomplete/ListBoxWithFilter.d.ts +2 -0
- package/dist/types/components/molecules/Autocomplete/ListBoxWithFilter.d.ts.map +1 -1
- package/dist/types/components/molecules/Autocomplete/MultipleAutocomplete.d.ts +1 -1
- package/dist/types/components/molecules/Autocomplete/MultipleAutocomplete.d.ts.map +1 -1
- package/dist/types/components/molecules/Autocomplete/useAutocompleteRenderOption.d.ts.map +1 -1
- package/dist/types/components/molecules/Autocomplete/useMultipleAutocomplete.d.ts +2 -2
- package/dist/types/components/molecules/Autocomplete/useMultipleAutocomplete.d.ts.map +1 -1
- package/dist/types/components/molecules/Autocomplete/utils.d.ts +1 -0
- package/dist/types/components/molecules/Autocomplete/utils.d.ts.map +1 -1
- package/dist/types/components/molecules/Menu/Menu.d.ts +2 -1
- package/dist/types/components/molecules/Menu/Menu.d.ts.map +1 -1
- package/dist/types/components/molecules/Menu/MenuItem.d.ts +2 -1
- package/dist/types/components/molecules/Menu/MenuItem.d.ts.map +1 -1
- package/dist/types/components/molecules/Menu/MenuItemFilter.d.ts +9 -0
- package/dist/types/components/molecules/Menu/MenuItemFilter.d.ts.map +1 -0
- package/dist/types/components/molecules/Menu/MenuList.d.ts +2 -1
- package/dist/types/components/molecules/Menu/MenuList.d.ts.map +1 -1
- package/dist/types/components/molecules/Menu/index.d.ts +2 -2
- package/dist/types/components/molecules/Menu/index.d.ts.map +1 -1
- package/dist/types/components/organisms/DatePickers/DatePicker.d.ts +1 -1
- package/dist/types/components/organisms/DatePickers/DatePicker.d.ts.map +1 -1
- package/dist/types/components/organisms/DatePickers/DateRangePicker.d.ts +1 -1
- package/dist/types/components/organisms/DatePickers/DateRangePicker.d.ts.map +1 -1
- package/dist/types/components/organisms/DatePickers/DateTimePicker.d.ts +1 -1
- package/dist/types/components/organisms/DatePickers/DateTimePicker.d.ts.map +1 -1
- package/dist/types/components/organisms/DatePickers/PickersDay.d.ts.map +1 -1
- package/dist/types/components/organisms/DatePickers/TimePicker.d.ts +1 -1
- package/dist/types/components/organisms/DatePickers/TimePicker.d.ts.map +1 -1
- package/dist/types/components/organisms/DatePickers/types.d.ts +2 -0
- package/dist/types/components/organisms/DatePickers/types.d.ts.map +1 -1
- package/dist/types/components/organisms/Dialog/Dialog.d.ts +1 -1
- package/dist/types/components/organisms/Dialog/Dialog.d.ts.map +1 -1
- package/dist/types/components/organisms/Dialog/DialogConfirmation.d.ts.map +1 -1
- package/dist/types/components/organisms/Dialog/DialogContent.d.ts.map +1 -1
- package/dist/types/components/organisms/Dialog/DialogFooter.d.ts.map +1 -1
- package/dist/types/components/organisms/Dialog/DialogHeader.d.ts.map +1 -1
- package/dist/types/theme/sections/components/data-display.d.ts.map +1 -1
- package/dist/types/theme/sections/components/forms.d.ts.map +1 -1
- package/dist/widgets/index.cjs +2 -2
- package/dist/widgets/index.js +3 -3
- package/package.json +1 -1
- package/dist/MenuItem-CuEx97RN.cjs +0 -1
- package/dist/TablePaginationActions-7wkkiCXh.cjs +0 -9
- package/dist/types/components/molecules/Menu/MenuFilter.d.ts +0 -8
- package/dist/types/components/molecules/Menu/MenuFilter.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),b=require("react"),i=require("@mui/material"),y=require("../TablePaginationActions-7wkkiCXh.cjs"),k=require("react-intl"),T=require("@mui/icons-material"),E=require("../Alert-B2JgFj6Y.cjs");require("cartocolor");const W=require("../MenuItem-CuEx97RN.cjs"),H=require("../ArrowDown-CGnG0E-4.cjs"),ct=require("@mui/x-date-pickers/DatePicker"),dt=require("@mui/x-date-pickers"),ut=require("@mui/x-date-pickers/TimePicker"),pt=require("@mui/x-date-pickers/DateTimePicker"),gt=require("@mui/material/ClickAwayListener"),xt=i.styled(i.Box)({position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"}),ft=i.styled(i.Box)({visibility:"hidden",pointerEvents:"none"});function ht({children:t,loading:e,disabled:o,startIcon:r,endIcon:a,loadingPosition:l,...s},d){const c=n.jsx(i.CircularProgress,{size:18,color:"inherit"}),u=e&&l===void 0,f=()=>u?n.jsxs(i.Box,{sx:{position:"relative"},children:[n.jsx(xt,{children:c}),n.jsx(ft,{children:t})]}):t,p=g=>{if(!u)return e&&l!==void 0?l===g?c:void 0:g==="start"?r:a};return n.jsx(i.Button,{disabled:e||o,startIcon:p("start"),endIcon:p("end"),...s,ref:d,children:n.jsx(y.Typography,{variant:"inherit",color:"inherit",noWrap:!0,component:"span",children:f()})})}const mt=b.forwardRef(ht),bt=i.styled(i.Box)(({theme:t})=>({display:"flex",alignItems:"center",gap:t.spacing(.5)})),yt=i.styled(y.Typography)(({theme:t})=>({".Mui-disabled &":{color:t.palette.text.disabled}})),jt=i.styled(i.Box)(({theme:t})=>({display:"flex",svg:{width:y.ICON_SIZE_SMALL,height:y.ICON_SIZE_SMALL,fontSize:y.ICON_SIZE_SMALL,path:{fill:t.palette.text.secondary,".Mui-disabled &":{fill:t.palette.text.disabled}}}}));function F({label:t,type:e,icon:o,inheritSize:r}){return n.jsxs(bt,{children:[t,e&&n.jsx(yt,{component:"span",variant:r?"inherit":"caption",color:"textSecondary",weight:"regular",children:e==="required"?"(required)":"(optional)"}),o&&n.jsx(jt,{children:o})]})}function Mt({InputProps:t,size:e="small",...o},r){const a=k.useIntl(),l=y.useImperativeIntl(a),[s,d]=b.useState(!1),c=()=>d(!s);return n.jsx(i.TextField,{...o,ref:r,type:s?"text":"password",size:e,InputProps:{...t,endAdornment:n.jsx(i.InputAdornment,{position:"end",children:n.jsx(i.IconButton,{size:e,onClick:c,children:n.jsx(i.Tooltip,{title:l.formatMessage({id:`c4r.form.${s?"hidePassword":"showPassword"}`}),children:s?n.jsx(T.VisibilityOffOutlined,{}):n.jsx(T.VisibilityOutlined,{})})})})}})}const It=b.forwardRef(Mt),O={};function Ct(t="$lodash$"){O[t]||(O[t]=0);const e=++O[t];return t==="$lodash$"?`${e}`:`${t}${e}`}const vt=i.styled(i.Select)(({theme:t})=>({"& .MuiInputAdornment-positionStart":{paddingLeft:t.spacing(2),"&.MuiInputAdornment-sizeSmall":{paddingLeft:t.spacing(1.5)}},"& .MuiInputBase-inputAdornedStart":{paddingLeft:"0px !important"},"& .MuiSelect-select .MuiMenuItem-root:hover":{backgroundColor:"transparent"},"&.MuiInputBase-root .MuiSelect-select.MuiSelect-multiple":{paddingRight:t.spacing(7)}})),Bt=i.styled(i.MenuItem)(()=>({display:"none"}));function At({children:t,placeholder:e,size:o="small",displayEmpty:r,menuProps:a,inputProps:l,labelId:s,label:d,labelSecondary:c,helperText:u,name:f,error:p,focused:g,disabled:x,fullWidth:h,required:j,"aria-label":m,...A},D){const C=o==="small",[M]=b.useState(()=>Ct("select-label-")),v=d?s??M:void 0;return n.jsxs(i.FormControl,{size:o,error:p,focused:g,disabled:x,fullWidth:h,required:j,children:[n.jsxs(i.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[d&&n.jsx(i.InputLabel,{shrink:!0,id:v,children:d}),c&&n.jsx(i.Box,{display:"flex",alignItems:"center",ml:2,mb:.5,children:c})]}),n.jsxs(vt,{...A,labelId:v,name:f,ref:D,size:o,fullWidth:h,displayEmpty:r??!!e,inputProps:{...l,"aria-label":m},MenuProps:{...a,PopoverClasses:{paper:C?"MuiMenu-paper-sizeSmall":void 0},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:0,horizontal:"left"}},children:[e&&n.jsx(Bt,{disabled:!0,value:"",children:n.jsx(y.Typography,{variant:C?"body2":"body1",color:"text.hint",component:"span",children:e})}),t]}),u&&n.jsx(i.FormHelperText,{"aria-label":`${f}-helper`,children:u})]})}const K=b.forwardRef(At),Dt=i.styled(i.ToggleButtonGroup,{shouldForwardProp:t=>t!=="variant"&&t!=="backgroundColor"})(({variant:t,backgroundColor:e,theme:o})=>({...t==="contained"&&{boxShadow:"none"},...t==="unbounded"&&{boxShadow:"none",borderRadius:o.spacing(.5),"& .MuiDivider-root":{height:o.spacing(4),"&.MuiToggleButtonGroup-groupedHorizontal":{height:o.spacing(4)},"&.MuiToggleButtonGroup-groupedVertical":{height:"auto",width:o.spacing(4),margin:`${o.spacing(.5,0,1)} !important`,borderRadius:"0 !important"}},"& .MuiToggleButton-sizeSmall":{margin:0,"&.MuiToggleButtonGroup-grouped:not(.MuiDivider-root)":{margin:0},"& + .MuiDivider-root.MuiToggleButtonGroup-groupedHorizontal":{height:o.spacing(3)},"& + .MuiDivider-root.MuiToggleButtonGroup-groupedVertical":{height:"auto",width:o.spacing(3)}},".MuiToggleButtonGroup-grouped:not(.MuiDivider-root)":{margin:0,"&:first-of-type":{marginLeft:0},"&:not(:last-of-type)":{marginRight:o.spacing(.5)}},"&.MuiToggleButtonGroup-horizontal:not(.MuiDivider-root)":{".MuiToggleButtonGroup-grouped":{margin:o.spacing(0,.5)}},"&.MuiToggleButtonGroup-vertical:not(.MuiDivider-root)":{".MuiToggleButtonGroup-grouped":{margin:o.spacing(0,0,.5),"&:not(:last-of-type)":{marginRight:0},"&:last-of-type":{marginBottom:0}}}},...e==="primary"&&{backgroundColor:o.palette.background.paper},...e==="secondary"&&{backgroundColor:o.palette.background.default},...e==="transparent"&&{backgroundColor:"transparent"}}));function St({children:t,variant:e="floating",backgroundColor:o,...r}){const l=e==="unbounded"?"transparent":"primary";return n.jsx(Dt,{...r,variant:e,backgroundColor:o??l,children:t})}const Tt=i.styled("div")(({theme:t})=>({position:"relative",display:"inline-flex","& + &, & + .optionIconButton":{marginLeft:t.spacing(.5)}})),kt=i.styled(i.IconButton,{shouldForwardProp:t=>!["active"].includes(t)})(({active:t,theme:e})=>({...t&&{color:e.palette.primary.main,backgroundColor:e.palette.primary.background,"& svg:not(.doNotFillIcon) path":{fill:e.palette.primary.main}}}));function wt({tooltip:t,tooltipPlacement:e="top",icon:o,size:r="medium",variant:a="icon",color:l="default",sx:s,className:d,loading:c,disabled:u,active:f,...p},g){return n.jsx(i.Tooltip,{placement:e,title:t??"",children:n.jsx(Tt,{className:`optionIconButton ${d??""}`,sx:s,"data-testid":"icon-button",children:n.jsx(kt,{...p,ref:g,size:r,variant:a,color:l,active:f,disabled:u||c,children:c?n.jsx(i.CircularProgress,{size:18,color:"inherit"}):o})})})}const Q=b.forwardRef(wt),Rt=i.styled(i.Menu,{shouldForwardProp:t=>!["extended","width","height"].includes(t)})(({theme:t,extended:e,width:o,height:r})=>({...e&&{".MuiMenuItem-root":{minHeight:t.spacing(6)}},...o&&{".MuiList-root":{width:o,minWidth:o}},...r&&{".MuiMenu-paper":{overflow:"hidden"},".MuiList-root":{maxHeight:r}}}));function Ft(t){return n.jsx(Rt,{...t})}const Ot=i.styled(i.MenuList,{shouldForwardProp:t=>!["extended","width","height"].includes(t)})(({theme:t,extended:e,width:o,height:r})=>({...e&&{".MuiMenuItem-root":{minHeight:t.spacing(6)}},"&.MuiList-root":{...o&&{width:o,minWidth:o},...r&&{maxHeight:r}}}));function $t(t){return n.jsx(Ot,{...t})}const Lt=i.styled(W.MenuItem)(()=>({marginTop:"0 !important"})),Pt=i.styled(i.Link)(({disabled:t,theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),width:"100%",textAlign:"initial",...t&&{pointerEvents:"none",color:e.palette.text.disabled}}));function _({areAllSelected:t,areAnySelected:e,selectAll:o,selectAllDisabled:r}){const a=k.useIntl(),l=y.useImperativeIntl(a);return n.jsx(Lt,{fixed:!0,children:n.jsxs(Pt,{variant:"body2",color:"textPrimary",component:"button",underline:"none",disabled:!!r,onClick:o,tabIndex:0,children:[n.jsx(i.Checkbox,{checked:t,indeterminate:e&&!t,disabled:r}),l.formatMessage({id:"c4r.form.selectAll"})]})})}function Et({selectedOptions:t,options:e,onChange:o}){const[r,a]=b.useState(t??[]),l=e.length===r.length,s=r.length>0;return b.useEffect(()=>{r!==t&&a(r)},[t]),{areAllSelected:l,areAnySelected:s,currentOptions:r,handleChange:f=>{const{target:{value:p}}=f,g=typeof p=="string"?p.split(","):p.filter(x=>x!==void 0);a(g),o(g)},selectAll:()=>{const f=e==null?void 0:e.filter(({disabled:p})=>!p).map(({value:p})=>p);f&&(f.every(g=>r.includes(g))?(a([]),o([])):(a(f),o(f)))},unselectAll:()=>{a([]),o([])}}}const Wt=i.styled(i.MenuItem)(({theme:t})=>({"&.Mui-disabled":{pointerEvents:"auto","&:hover":{backgroundColor:`${t.palette.background.default} !important`}}})),Ht=i.styled(i.InputAdornment,{shouldForwardProp:t=>t!=="size"})(({theme:t,size:e})=>({display:"none",position:"absolute",top:t.spacing(2),right:t.spacing(3.5),".MuiInputBase-root:hover &, .MuiInputBase-root.Mui-focused &":{display:"flex"},".MuiSvgIcon-root":{color:t.palette.text.hint},...e==="medium"&&{top:t.spacing(3),right:t.spacing(5)}})),_t=[],Nt=()=>{};function qt({options:t=_t,selectedOptions:e,size:o="small",placeholder:r,showCounter:a,showFilters:l=!0,onChange:s=Nt,selectAllDisabled:d,tooltipPlacement:c,variant:u,...f},p){const{areAllSelected:g,areAnySelected:x,currentOptions:h,handleChange:j,selectAll:m,unselectAll:A}=Et({options:t,selectedOptions:e,onChange:s}),D=o==="small",C=D||u==="standard"?0:2,M=k.useIntl(),v=y.useImperativeIntl(M),B=`${h.length} ${v.formatMessage({id:"c4r.form.selected"})}`,w=b.useMemo(()=>g?n.jsx(y.Typography,{component:"span",variant:D?"body2":"body1",color:"textPrimary",ml:C,children:v.formatMessage({id:"c4r.form.allSelected"})}):x?n.jsx(y.Typography,{component:"span",variant:D?"body2":"body1",color:"textPrimary",ml:C,children:a&&h.length>1?B:h.join(", ")}):n.jsx(y.Typography,{component:"span",variant:D?"body2":"body1",color:"text.hint",ml:C,children:r??v.formatMessage({id:"c4r.form.noneSelected"})}),[g,x,B,h,v,D,C,r,a]);return n.jsxs(K,{...f,ref:p,multiple:!0,displayEmpty:!0,placeholder:r,value:h,renderValue:()=>w,onChange:j,size:o,variant:u,endAdornment:l&&x&&n.jsx(Ht,{position:"end",size:o,children:n.jsx(i.IconButton,{onClick:A,size:o,children:n.jsx(T.Cancel,{})})}),menuProps:{PaperProps:{sx:{".MuiList-root":{paddingTop:0}}}},children:[l&&n.jsx(_,{areAllSelected:g,areAnySelected:x,selectAll:m,selectAllDisabled:d}),t==null?void 0:t.map(I=>{const S=n.jsxs(Wt,{value:I.value,disabled:I.disabled,tabIndex:0,children:[n.jsx(i.Checkbox,{disabled:I.disabled,checked:h.includes(I.value)}),n.jsx(i.ListItemText,{primary:I.label})]},I.value);return I.tooltip?n.jsx(i.Tooltip,{title:I.tooltip,placement:c,children:S},I.value):S})]})}const Gt=b.forwardRef(qt),Vt=i.styled(i.TextField,{shouldForwardProp:t=>t!=="cursor"})(({cursor:t,theme:e})=>({"&.MuiTextField-root .MuiInputBase-root":{cursor:t,paddingRight:e.spacing(1),"& input":{cursor:t},"&.Mui-disabled":{pointerEvents:"none","& .MuiButtonBase-root":{color:e.palette.text.disabled}},"&.MuiInputBase-sizeSmall":{paddingRight:e.spacing(.5)}},"& .MuiFormLabel-root":{cursor:t,"&.Mui-disabled":{pointerEvents:"none"}}}));function Ut({buttonText:t,hasFiles:e,size:o,error:r,disabled:a,handleReset:l,handleOpen:s,inProgress:d}){return n.jsx(i.InputAdornment,{position:"end",children:d?n.jsx(i.IconButton,{"aria-label":"loading",disabled:!0,size:o,children:n.jsx(i.CircularProgress,{size:18})}):e?n.jsx(i.IconButton,{onClick:l,size:o,"aria-label":"delete",disabled:a,children:n.jsx(T.Cancel,{})}):n.jsx(i.Button,{onClick:s,size:o,variant:"text",color:r?"default":"primary",disabled:a,children:t})})}function tt({name:t,multiple:e,handleReset:o,handleOpen:r,dragOver:a,error:l,placeholder:s,focused:d,buttonText:c="Browse",inProgress:u,InputProps:f,size:p="small",hasFiles:g,cursor:x="pointer",...h}){return n.jsx(Vt,{...h,size:p,error:l,placeholder:s,focused:d??a,cursor:x,InputProps:{...f,name:t,readOnly:!0,endAdornment:n.jsx(Ut,{buttonText:c,hasFiles:g,size:p,error:l,disabled:!!a,handleReset:o,handleOpen:r,inProgress:u})}})}function zt({onChange:t,files:e,multiple:o,placeholder:r,uploadInputRef:a}){const l=k.useIntl(),s=y.useImperativeIntl(l),[d,c]=b.useState(""),[u,f]=b.useState(!1);b.useEffect(()=>{!e||e.length===0?c(""):e.length===1?c(e[0].name):c(s.formatMessage({id:"c4r.form.filesSelected"},{count:e.length}))},[e,s]);const p=()=>{var M;(M=a.current)==null||M.click()},g=M=>{M.preventDefault(),f(!0)},x=M=>{M.preventDefault(),f(!1)},h=M=>{M.preventDefault(),f(!1);const v=M.dataTransfer.items,B=j(v);t==null||t(B)},j=M=>{const v=[];for(const B of Array.from(M))if(B.kind==="file"){const w=B.getAsFile();v.push(w)}return v},m=M=>{const v=Array.from(M.target.files);t==null||t(v)},A=M=>{M.stopPropagation(),c("")},D=b.useMemo(()=>{const M=s.formatMessage({id:"c4r.form.dragPlaceholder"},{count:o?0:1}),v=s.formatMessage({id:"c4r.form.dragActivePlaceholder"},{count:o?0:1});let B="";return u?B=v:B=r??M,B},[u,o,r,s]);return{filesText:d,getPlaceholder:D,dragOver:u,inputEvents:{onDragOver:g,onDragLeave:x,onDrop:h,onClick:p},handleFiles:m,handleReset:A}}const Zt=["application/JSON"];function Yt({name:t,buttonText:e,accept:o,files:r,inProgress:a,onChange:l,multiple:s,placeholder:d,error:c,focused:u,nativeInputProps:f,...p}){const g=o??Zt,x=b.useRef(null),{filesText:h,getPlaceholder:j,dragOver:m,inputEvents:A,handleFiles:D,handleReset:C}=zt({uploadInputRef:x,files:r,onChange:l,multiple:s,placeholder:d});return n.jsxs(n.Fragment,{children:[n.jsx(tt,{...p,placeholder:j,value:h,error:c,focused:u??m,handleReset:C,dragOver:m,inProgress:a,hasFiles:!!h,InputProps:A,buttonText:e}),n.jsx("input",{...f,ref:x,style:{display:"none"},type:"file","aria-label":t,name:t,accept:String(g),multiple:s,onChange:D})]})}function Jt({disabled:t,loading:e,...o},r){return n.jsx(i.Autocomplete,{...o,ref:r,disabled:t||e,popupIcon:e?n.jsx(i.CircularProgress,{size:18,color:"inherit"}):n.jsx(H.ArrowDown,{})})}const Xt=b.forwardRef(Jt),et=t=>t&&typeof t=="object"?t.title??String(t):String(t),nt=(t,e)=>typeof t!="object"||t===null?{value:t,multiple:e}:{...t,multiple:e};function ot(){return{renderOption:(e,o,r,a,l)=>{const{title:s,inputValue:d,divider:c,fixed:u,extended:f,dense:p,destructive:g,disabled:x,subtitle:h,iconColor:j,startAdornment:m,endAdornment:A,alternativeTitle:D,secondaryText:C,multiple:M}=o,{key:v,...B}=e,w=typeof o=="string"||typeof o=="number",I=(S,R,U,z)=>U||z||(R&&typeof R=="object"&&"value"in R?String(R.value):S(R));return n.jsx(b.Fragment,{children:c?n.jsx(i.Divider,{}):n.jsxs(n.Fragment,{children:[d&&n.jsx(i.Divider,{}),n.jsxs(W.MenuItem,{...B,...!w&&{fixed:u,extended:f,dense:p,destructive:g,disabled:x,subtitle:h,iconColor:j},children:[!h&&(m||M||l)&&n.jsxs(i.ListItemIcon,{children:[l||M&&n.jsx(i.Checkbox,{checked:r.selected}),m]}),n.jsxs(i.ListItemText,{children:[I(a??et,o,D,s),C&&n.jsx(y.Typography,{component:"p",variant:"caption",color:"text.secondary",children:C})]}),A]})]})},v)}}}function Kt({getOptionLabel:t,newItemLabel:e,newItemIcon:o,multiple:r}){const a=k.useIntl(),l=y.useImperativeIntl(a),s=i.createFilterOptions(),{renderOption:d}=ot();return{creatableFilterOptions:(p,g)=>{const x=s(p,g),{inputValue:h}=g,j=p.some(m=>h===t(m));if(h.length>1&&h!==""&&!j){let m;typeof e=="function"?m=e(h):e?m=`${e} "${h}"`:m=`${l.formatMessage({id:"c4r.form.add"})} "${h}"`,x.push({inputValue:h,title:m})}return x},creatableOptionLabel:p=>typeof p=="string"?p:p.inputValue?p.inputValue:t(p),creatableRenderOption:(p,g,x)=>{const h=g.inputValue?o??n.jsx(T.AddCircleOutlineOutlined,{}):void 0,j=nt(g,!!r);return d(p,j,x,t,h)}}}function it({options:t,value:e,onChange:o,getOptionLabel:r}){const[a,l]=b.useState(Array.isArray(e)?e:e?[e]:[]),{renderOption:s}=ot();b.useEffect(()=>{const g=Array.isArray(e)?e:e?[e]:[];l(g)},[e]);const d=a.length===t.length,c=a.length>0&&a.length<t.length;return{multipleValue:a,allSelected:d,someSelected:c,handleSelectAll:()=>{l(d?[]:[...t])},handleChange:(g,x)=>{l(x===null?[]:x),o==null||o(g,x,"selectOption")},multipleRenderOption:(g,x,h)=>{const j=nt(x,!0);return s(g,j,h,r)}}}function Qt({children:t,showFilters:e,allSelected:o,someSelected:r,handleSelectAll:a=()=>{},...l},s){return n.jsxs("ul",{ref:s,...l,children:[e&&n.jsx(_,{areAllSelected:!!o,areAnySelected:!!r,selectAll:a}),t]})}const rt=b.forwardRef(Qt);function te({newItemLabel:t,newItemIcon:e,getOptionLabel:o=et,multiple:r,disableCloseOnSelect:a,disabled:l,loading:s,showFilters:d,options:c=[],value:u,onChange:f,...p},g){const{freeSolo:x=!0,...h}=p,{multipleValue:j,allSelected:m,someSelected:A,handleSelectAll:D,handleChange:C}=it({options:c,value:u,onChange:f}),{creatableFilterOptions:M,creatableOptionLabel:v,creatableRenderOption:B}=Kt({getOptionLabel:o,newItemLabel:t,newItemIcon:e,multiple:r});return n.jsx(i.Autocomplete,{...h,ref:g,options:c,value:r?j:u,onChange:C,filterOptions:M,getOptionLabel:v,renderOption:B,freeSolo:x,forcePopupIcon:!0,multiple:r,disableCloseOnSelect:a||r,ListboxComponent:r?rt:void 0,ListboxProps:r?{showFilters:d,allSelected:m,someSelected:A,handleSelectAll:D}:void 0,disabled:l||s,popupIcon:s?n.jsx(i.CircularProgress,{size:18,color:"inherit"}):n.jsx(H.ArrowDown,{})})}const ee=b.forwardRef(te);function ne({renderOption:t,disableCloseOnSelect:e=!0,disabled:o,loading:r,showFilters:a,options:l,value:s,onChange:d,getOptionLabel:c,...u},f){const{multipleValue:p,allSelected:g,someSelected:x,handleSelectAll:h,handleChange:j,multipleRenderOption:m}=it({options:l,value:s,onChange:d,getOptionLabel:c});return n.jsx(i.Autocomplete,{...u,ref:f,options:l,value:p,onChange:j,getOptionLabel:c,renderOption:t??m,ListboxComponent:rt,ListboxProps:{showFilters:a,allSelected:g,someSelected:x,handleSelectAll:h},multiple:!0,disableCloseOnSelect:e,disabled:o||r,popupIcon:r?n.jsx(i.CircularProgress,{size:18,color:"inherit"}):n.jsx(H.ArrowDown,{})})}const oe=b.forwardRef(ne),ie=i.styled("div",{shouldForwardProp:t=>t!=="variant"})(({variant:t,theme:e})=>({width:"100%",borderRadius:e.spacing(.5),...t==="outlined"&&{backgroundColor:e.palette.background.paper,boxShadow:`inset 0 0 0 1px ${e.palette.divider}`}}));function re({variant:t="standard",items:e,...o}){return n.jsx(ie,{...o,variant:t,children:e.map((r,a)=>n.jsxs(i.Accordion,{disabled:r.disabled,defaultExpanded:r.defaultExpanded,onChange:r.onChange,children:[n.jsx(i.AccordionSummary,{"aria-controls":`${a}-content`,id:`${a}-header`,children:r.summary}),n.jsx(i.AccordionDetails,{children:r.content})]},a))})}const Z={large:5,medium:4,small:3,xsmall:2.25},ae=i.styled(i.Avatar,{shouldForwardProp:t=>t!=="size"&&t!=="disabled"})(({theme:t,size:e="medium",disabled:o=!1})=>({width:t.spacing(Z[e]),height:t.spacing(Z[e]),...t.typography.subtitle1,...e==="large"&&{...t.typography.h6},...e==="small"&&{...t.typography.caption,fontWeight:500},...e==="xsmall"&&{...t.typography.caption,fontWeight:500,svg:{width:y.ICON_SIZE_SMALL,height:y.ICON_SIZE_SMALL}},...o&&{opacity:.6}}));function le(t){return n.jsx(ae,{...t})}const at=480,se=i.styled(i.Snackbar)(({theme:t})=>({bottom:t.spacing(2),right:t.spacing(2),left:t.spacing(2),[t.breakpoints.up("sm")]:{bottom:t.spacing(4),right:"auto",left:"50%",width:"100%",maxWidth:`${at}px`}})),ce=i.styled(i.Box,{shouldForwardProp:t=>t!=="autoWidth"})(({autoWidth:t,theme:e})=>({minWidth:"100%",maxWidth:`${at}px`,margin:e.spacing(0,1),...t&&{minWidth:"auto"},[e.breakpoints.up("sm")]:{minWidth:e.spacing(40),...t&&{minWidth:"auto"}}})),de=i.styled(E.Alert,{shouldForwardProp:t=>!["hasActions","closeable"].includes(t)})(({hasActions:t,closeable:e,icon:o,theme:r})=>({position:"relative",display:"flex",flexWrap:"wrap",columnGap:r.spacing(1),rowGap:r.spacing(.25),padding:r.spacing(1),paddingLeft:r.spacing(2),color:r.palette.common.white,backgroundColor:r.palette.common.black,".MuiAlert-message":{padding:r.spacing(.75,0)},".MuiAlert-message .MuiTypography-root, .MuiAlert-icon":{color:r.palette.common.white},".MuiAlert-message .MuiTypography-root:not(.MuiAlertTitle-root)":{...r.typography.body2},".MuiAlert-message .MuiCircularProgress-circle":{color:r.palette.common.white},".MuiAlert-icon":{position:"absolute",top:r.spacing(1),left:r.spacing(1.5),display:"flex",alignItems:"center",justifyContent:"center",width:r.spacing(3),marginTop:r.spacing(.5)},"&.MuiAlert-standardError":{backgroundColor:r.palette.error.main},...o!==!1&&{paddingLeft:r.spacing(5.5)},...e&&{paddingRight:r.spacing(6)},...!e&&!t&&{paddingRight:r.spacing(1.5)},...t&&{".MuiAlert-message":{minWidth:"fit-content",padding:r.spacing(.75,0)}}})),ue=i.styled(i.Box)(({theme:t})=>({position:"absolute",top:t.spacing(1),right:t.spacing(1),"& button:hover, & button:focus-visible":{backgroundColor:t.palette.white[8]},svg:{color:t.palette.white[60]}}));function pe({severity:t="neutral",autoHideDuration:e=y.NOTIFICATION_DURATION_IN_MS,closeable:o=!0,children:r,title:a,action:l,open:s,onClose:d=()=>{},autoWidth:c,icon:u,...f}){const p=k.useIntl(),g=y.useImperativeIntl(p),h=u===!1||t==="neutral"&&!u,m=e===null?null:e||y.NOTIFICATION_DURATION_IN_MS;return n.jsx(i.Portal,{children:n.jsx(se,{...f,open:s,autoHideDuration:m,onClose:d,TransitionComponent:c?i.Fade:i.Slide,"data-auto-width":c,children:n.jsxs(ce,{sx:{position:"relative"},autoWidth:c,children:[n.jsx(de,{severity:t,action:l,icon:h?!1:u,elevation:6,hasActions:!!l,closeable:o,title:a,children:r}),o&&n.jsx(ue,{children:n.jsx(Q,{color:"default",onClick:A=>d(A,"timeout"),icon:n.jsx(T.CloseOutlined,{}),tooltip:g.formatMessage({id:"c4r.button.close"})})})]})})})}const ge=i.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",height:y.APPBAR_SIZE,marginRight:t.spacing(1.5)})),xe=i.styled(i.IconButton)(({theme:t})=>({marginRight:t.spacing(1),"&.MuiButtonBase-root svg path":{fill:t.palette.brand.appBarContrastText}})),fe=i.styled(i.Divider)(({theme:t})=>({borderColor:i.alpha(t.palette.brand.appBarContrastText,.12)}));function he({onClickMenu:t}){return n.jsx(i.Box,{sx:{display:{md:"none",xs:"block"}},children:n.jsxs(ge,{children:[n.jsx(xe,{onClick:t,children:n.jsx(T.MenuOutlined,{})}),n.jsx(fe,{orientation:"vertical",flexItem:!0})]})})}const me=i.styled("div")(({theme:t})=>({display:"flex",marginRight:t.spacing(1.5),"& a":{display:"flex"},"& svg, & img":{width:t.spacing(4),height:t.spacing(4)}}));function be({logo:t}){return n.jsx(me,{children:t})}const ye=i.styled(y.Typography)({display:"flex",alignItems:"center",whiteSpace:"nowrap"});function je({text:t}){const e=i.useTheme();return n.jsx(ye,{component:"span",variant:"subtitle1",color:e.palette.brand.appBarContrastText,children:t})}const Me=i.styled(y.Typography)(({theme:t})=>({display:"flex",alignItems:"center","&::before":{content:'"/"',margin:t.spacing(0,1),opacity:.6,color:t.palette.brand.appBarContrastText}}));function Ie({text:t}){const e=i.useTheme();return n.jsx(Me,{component:"span",variant:"body2",weight:"strong",color:e.palette.brand.appBarContrastText,children:t})}const Ce=i.styled(i.AppBar)(({theme:t})=>({backgroundColor:t.palette.brand.appBarMain,"& .MuiTypography-root":{color:t.palette.brand.appBarContrastText},"& .MuiIconButton-root path":{fill:t.palette.brand.appBarContrastText}})),ve=i.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",maxWidth:"calc(100% - 300px)",overflow:"hidden",[t.breakpoints.down("sm")]:{minWidth:"192px"}})),Be=i.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between",flex:1,marginLeft:t.spacing(1)}));function Ae({children:t,brandLogo:e,brandText:o,secondaryText:r,showBurgerMenu:a=!1,onClickMenu:l,...s}){return n.jsx(Ce,{...s,children:n.jsxs(i.Toolbar,{children:[n.jsxs(ve,{children:[a&&n.jsx(he,{onClickMenu:l}),e&&n.jsx(be,{logo:e}),o&&n.jsx(je,{text:o}),r&&n.jsx(Ie,{text:r})]}),n.jsx(Be,{children:t})]})})}const De=i.styled(i.Box,{shouldForwardProp:t=>!["size","variant"].includes(t)})(({size:t,variant:e,theme:o})=>({position:"absolute",right:o.spacing(5.75),...t==="small"&&{right:o.spacing(4),top:"3px"},...e==="standard"&&{right:o.spacing(4.75),...t==="small"&&{right:o.spacing(3.5)}}}));function N({size:t,variant:e,...o}){const r=k.useIntl(),a=y.useImperativeIntl(r);return n.jsx(De,{size:t,variant:e,children:n.jsx(i.IconButton,{...o,size:t,"aria-label":a.formatMessage({id:"c4r.form.clearSelection"})})})}const Se=i.styled(i.Box,{shouldForwardProp:t=>!["size","variant","readOnly"].includes(t)})(({size:t,variant:e,readOnly:o,theme:r})=>({".MuiInputBase-root":{"& .clearButton svg":{color:r.palette.text.hint},...t==="small"&&{paddingRight:`${r.spacing(1)} !important`},...t==="medium"&&{"& .MuiInputAdornment-root":{"& .MuiIconButton-edgeEnd":{marginRight:r.spacing(-1)}}},...e==="standard"&&{paddingRight:`${r.spacing(1)} !important`,...t==="small"&&{paddingRight:`${r.spacing(.5)} !important`}},...o&&{"& .MuiInputAdornment-root":{"& svg":{color:r.palette.text.disabled}}}}}));function q({children:t,size:e,variant:o,readOnly:r,...a}){return n.jsx(Se,{...a,size:e,variant:o,readOnly:r,children:t})}function $({handleClear:t,variant:e="outlined",size:o="small",label:r,labelHelpTooltip:a,type:l,helperText:s,placeholder:d,slotProps:c,slots:u,error:f,showCalendar:p=!0,readOnly:g,...x}){const h=k.useIntl(),j=y.useImperativeIntl(h);return n.jsx(i.Box,{className:"CartoDatePicker-root","data-testid":"date-picker",children:n.jsx(q,{size:o,variant:e,readOnly:g,children:n.jsx(ct.DatePicker,{...x,label:r&&n.jsx(F,{label:r,type:l,icon:a&&n.jsx(i.Tooltip,{title:a,children:n.jsx(T.HelpOutline,{htmlColor:"text.secondary"})})}),slotProps:{textField:{variant:e,helperText:s,placeholder:d,size:o,error:f??void 0,inputProps:{"data-testid":"date-picker-input"}},field:{clearable:!!t,onClear:t},...c},slots:{clearButton:m=>n.jsx(N,{...m,size:o,variant:e}),openPickerButton:m=>n.jsx(i.IconButton,{...m,size:o,"aria-label":j.formatMessage({id:"c4r.form.chooseDate"})}),...u},disableOpenPicker:!p,readOnly:g})})})}const Te=i.styled(i.Box,{shouldForwardProp:t=>!["isSelected","isStartDate","isEndDate","isSelectedMonth","isLastDay","isFirstDay"].includes(t)})(({theme:t,isSelected:e,isStartDate:o,isEndDate:r,isSelectedMonth:a,isLastDay:l,isFirstDay:s})=>({position:"relative",margin:t.spacing(.25),"& .MuiPickersDay-root":{margin:0},...e&&a&&{"&::before":{content:'""',position:"absolute",top:0,right:"-2px",bottom:0,left:"-2px",backgroundColor:t.palette.primary.background,...(o||s)&&{left:0,borderRadius:`${t.shape.borderRadius}px 0 0 ${t.shape.borderRadius}px`},...(r||l)&&{right:0,borderRadius:`0 ${t.shape.borderRadius}px ${t.shape.borderRadius}px 0`}},"&:first-of-type::before":{left:0,borderRadius:`${t.shape.borderRadius}px 0 0 ${t.shape.borderRadius}px`},"&:last-of-type::before":{right:0,borderRadius:`0 ${t.shape.borderRadius}px ${t.shape.borderRadius}px 0`},...s&&{"&:last-of-type::before":{left:0,right:0,borderRadius:t.shape.borderRadius}},...l&&{"&:first-of-type::before":{left:0,right:0,borderRadius:t.shape.borderRadius}},"& .MuiPickersDay-today":{borderColor:`${t.palette.default.outlinedBorder} !important`,...(o||r)&&{boxShadow:`0 0 0 1px inset ${t.palette.background.paper}`}},"&::after":{content:'""',position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:t.palette.background.paper,borderRadius:t.shape.borderRadius,transition:"background-color 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms"},"&:hover::after":{backgroundColor:t.palette.primary.relatedLight}}})),ke=i.styled(dt.PickersDay,{shouldForwardProp:t=>t!=="isDateRangeLimit"})(({theme:t,isDateRangeLimit:e})=>({"&.MuiPickersDay-root":{position:"relative",zIndex:1,"&.Mui-selected":{color:t.palette.text.primary},...e&&{"&.Mui-selected":{backgroundColor:`${t.palette.primary.main} !important`,color:t.palette.primary.contrastText,"&:hover":{backgroundColor:`${t.palette.primary.dark} !important`}}}}}));function Y({day:t,startDate:e,endDate:o,selectedMonth:r,...a}){const l=!!(e&&t.getTime()===e.getTime()),s=!!(o&&t.getTime()===o.getTime()),d=!!(e&&o&&t>=e&&t<=o),c=t.getDate()===1,u=t.getDate()===new Date(t.getFullYear(),t.getMonth()+1,0).getDate(),f=!!(r&&t.getMonth()==r.getMonth());return n.jsx(Te,{isSelected:d,isStartDate:l,isEndDate:s,isSelectedMonth:f,isLastDay:u,isFirstDay:c,children:n.jsx(ke,{...a,day:t,selected:d||l||s,isDateRangeLimit:l||s})})}const we=i.styled(i.Box,{shouldForwardProp:t=>!["variant"].includes(t)})(({variant:t,theme:e})=>({display:"flex",gap:t==="standard"?e.spacing(1):"1px","& .CartoDatePicker-root":{"&:first-of-type":{".MuiInputBase-root":{borderRadius:e.spacing(.5,0,0,.5),boxShadow:`1px 0 0 0 ${e.palette.default.outlinedBorder}`,...t==="outlined"&&{"&:not(:hover):not(.Mui-focused):not(.Mui-error) .MuiOutlinedInput-notchedOutline":{borderRightColor:"transparent"}},...t==="filled"&&{"&::before, &::after":{borderRadius:e.spacing(.5,0,0,.5)}},...t==="standard"&&{boxShadow:"none",borderRadius:0}}},"&:last-of-type":{".MuiInputBase-root":{borderRadius:e.spacing(0,.5,.5,0),...t==="outlined"&&{"&:not(:hover):not(.Mui-focused):not(.Mui-error) .MuiOutlinedInput-notchedOutline":{borderLeftColor:"transparent"}},...t==="filled"&&{"&::before, &::after":{borderRadius:e.spacing(0,.5,.5,0)}},...t==="standard"&&{borderRadius:0}}}}}));function Re({globalHelperText:t,error:e,variant:o="outlined",startProps:r,endProps:a,...l}){const s=k.useIntl(),d=y.useImperativeIntl(s),[c,u]=b.useState(!1),[f,p]=b.useState(!1),[g,x]=b.useState(null),[h,j]=b.useState(null),[m,A]=b.useState(new Date),D=e??(r==null?void 0:r.error)??(a==null?void 0:a.error),C=(I,S)=>{x(I),r!=null&&r.onChange&&r.onChange(I,S),I&&S.validationError===null&&!f&&S.trigger===null&&(p(!1),u(!0))},M=(I,S)=>{j(I),a!=null&&a.onChange&&a.onChange(I,S)},v=()=>{p(!0),u(!1),setTimeout(()=>{A(g??new Date)},120)},B=()=>{p(!1),u(!0),setTimeout(()=>{A(h??g??new Date)},120)},w=()=>{p(!1),u(!0),setTimeout(()=>{A(h??g??new Date)},120)};return n.jsxs(i.Box,{children:[n.jsxs(we,{variant:o,children:[n.jsx($,{...l,...r,value:(r==null?void 0:r.value)??g,maxDate:h??void 0,label:(r==null?void 0:r.label)??d.formatMessage({id:"c4r.form.startDate"}),slotProps:{popper:{placement:"bottom-start","aria-label":d.formatMessage({id:"c4r.form.startDateCalendar"})},...r==null?void 0:r.slotProps},slots:{openPickerIcon:T.TodayOutlined,day:I=>n.jsx(Y,{...I,startDate:g,endDate:h,selectedMonth:m}),...r==null?void 0:r.slots},error:(r==null?void 0:r.error)??e,open:f,onChange:C,onOpen:v,onClose:B,onMonthChange:I=>A(I),variant:o}),n.jsx($,{...l,...a,value:(a==null?void 0:a.value)??h,minDate:g??void 0,slotProps:{popper:{"aria-label":d.formatMessage({id:"c4r.form.endDateCalendar"})},...a==null?void 0:a.slotProps},slots:{day:I=>n.jsx(Y,{...I,startDate:g,endDate:h,selectedMonth:m}),...a==null?void 0:a.slots},label:(a==null?void 0:a.label)??d.formatMessage({id:"c4r.form.endDate"}),error:(a==null?void 0:a.error)??e,open:c,onOpen:w,onClose:()=>u(!1),onChange:M,onMonthChange:I=>A(I),variant:o})]}),t&&n.jsx(i.FormHelperText,{error:D,children:t})]})}const lt=(t,e,o,r)=>{const a=t==null?void 0:t.includes("hours"),l=t==null?void 0:t.includes("seconds"),s=t==null?void 0:t.includes("minutes"),d=(t==null?void 0:t.length)===1&&t[0]==="hours";if(r)return r;const c=[];return e&&c.push("MM/dd/yyyy "),a&&c.push(o?"hh":"HH"),d||c.push(":"),s&&c.push("mm"),l&&c.push(":ss"),o&&c.push(" a"),c.join("")};function Fe({handleClear:t,variant:e="outlined",size:o="small",label:r,labelHelpTooltip:a,type:l,helperText:s,placeholder:d,error:c,showClock:u=!0,readOnly:f,slotProps:p,slots:g,ampm:x=!0,views:h=["hours","minutes"],format:j,...m}){const A=k.useIntl(),D=y.useImperativeIntl(A),C=b.useRef(null),[M,v]=b.useState(0);return b.useEffect(()=>{if(!C.current)return;const B=new ResizeObserver(w=>{var S;const I=(S=w[0])==null?void 0:S.contentRect.width;I&&v(I)});return B.observe(C.current),()=>{B.disconnect()}},[]),n.jsx(q,{size:o,variant:e,readOnly:f,"data-testid":"time-picker",children:n.jsx(ut.TimePicker,{...m,ref:C,label:n.jsx(F,{label:r??D.formatMessage({id:"c4r.form.time"}),type:l,icon:a&&n.jsx(i.Tooltip,{title:a,children:n.jsx(T.HelpOutline,{htmlColor:"text.secondary"})})}),views:["hours"],format:lt(h,!1,x,j),slotProps:{textField:{variant:e,helperText:s,placeholder:d,size:o,error:c??void 0,inputProps:{"data-testid":"time-picker-input"}},field:{clearable:!!t,onClear:t},popper:{placement:"bottom-end"},layout:{sx:{width:M}},...p},slots:{clearButton:B=>n.jsx(N,{...B,size:o,variant:e}),openPickerButton:B=>n.jsx(i.IconButton,{...B,size:o,"aria-label":D.formatMessage({id:"c4r.form.chooseDate"})}),...g},disableOpenPicker:!u,readOnly:f,ampm:x})})}function Oe({handleClear:t,variant:e="outlined",size:o="small",label:r,labelHelpTooltip:a,type:l,helperText:s,placeholder:d,error:c,showCalendar:u=!0,readOnly:f,slotProps:p,slots:g,ampm:x=!0,views:h=["hours","minutes"],format:j,...m}){const A=k.useIntl(),D=y.useImperativeIntl(A);return n.jsx(q,{size:o,variant:e,readOnly:f,"data-testid":"date-time-picker",children:n.jsx(pt.DateTimePicker,{...m,label:n.jsx(F,{label:r??D.formatMessage({id:"c4r.form.time"}),type:l,icon:a&&n.jsx(i.Tooltip,{title:a,children:n.jsx(T.HelpOutline,{htmlColor:"text.secondary"})})}),views:["year","month","day","hours"],format:lt(h,!0,x,j),slotProps:{textField:{variant:e,helperText:s,placeholder:d,size:o,error:c??void 0,inputProps:{"data-testid":"date-time-picker-input"}},field:{clearable:!!t,onClear:t},...p},slots:{clearButton:C=>n.jsx(N,{...C,size:o,variant:e}),openPickerButton:C=>n.jsx(i.IconButton,{...C,size:o,"aria-label":D.formatMessage({id:"c4r.form.chooseDate"})}),...g},disableOpenPicker:!u,readOnly:f,ampm:x})})}const $e=[{outlinedBullet:!1,value:""}],Le=i.styled("ul")(({theme:t})=>({listStyle:"none",paddingLeft:0,margin:t.spacing(.5,0,0,0)})),Pe=i.styled("li")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between","&:not(:last-child)":{marginBottom:t.spacing(.5)}})),Ee=i.styled("span")(({theme:t})=>({width:t.spacing(1),height:t.spacing(1),marginRight:t.spacing(.5),border:`2px solid ${t.palette.qualitative.bold[1]}`,borderRadius:"50%",backgroundColor:t.palette.qualitative.bold[1]})),We=i.styled(y.Typography)(({theme:t})=>({minWidth:t.spacing(10),marginRight:t.spacing(1.5)}));function He({items:t=$e,title:e}){return n.jsxs(n.Fragment,{children:[e&&n.jsx(y.Typography,{color:"inherit",variant:"caption",weight:"medium",children:e}),n.jsx(Le,{children:t.map((o,r)=>n.jsxs(Pe,{children:[n.jsx(Ee,{style:{backgroundColor:`${o.outlinedBullet?"transparent":o.color}`,borderColor:o.color}}),o.category&&n.jsx(We,{color:"inherit",variant:"caption",children:o.category}),n.jsx(y.Typography,{color:"inherit",variant:"caption",weight:"medium",children:o.value})]},r))})]})}const J={small:"480px",medium:"640px",large:"640px",xlarge:"720px"},L={small:{width:"432px",maxWidth:"432px"},medium:{width:"592px",maxWidth:"592px"},large:{width:"768px",maxWidth:"768px",minHeight:"576px"},xlarge:{width:"calc(100vw - 80px)",height:"calc(100vh - 80px)",maxWidth:"960px"}},P=i.styled(i.Paper,{shouldForwardProp:t=>!["fullScreen","height","width","hasForm"].includes(t)})(({fullScreen:t,height:e,width:o,hasForm:r,size:a="small",theme:l})=>({"&.MuiPaper-root":{position:"relative",display:"flex",flexDirection:"column",margin:l.spacing(5),borderRadius:l.spacing(1),...L[a],maxHeight:J[a],[`@media (max-height:${J[a]})`]:{maxHeight:"calc(100vh - 80px)",...a==="large"&&{minHeight:e!=="auto"?"calc(100vh - 80px)":"auto"}},...t&&{width:"100vw",maxWidth:`calc(100vw - ${l.spacing(10)})`,height:"100vh",maxHeight:`calc(100vh - ${l.spacing(10)})`,margin:l.spacing(5),borderRadius:l.spacing(1)},...e&&{height:e,minHeight:e},...o&&{width:o},[l.breakpoints.down("sm")]:{position:"absolute",width:"100%",maxWidth:"100%",height:"100vh",maxHeight:"100vh",top:0,bottom:0,left:0,right:0,margin:0,borderRadius:0,...e&&{top:"auto",borderRadius:l.spacing(1,1,0,0),height:e,minHeight:e}},...r&&{maxHeight:`calc(100vh - ${l.spacing(10)})`,form:{flex:1,display:"flex",flexDirection:"column",justifyContent:"space-between",overflow:"hidden",...L[a],maxWidth:"100%",...t&&{width:"100%",maxWidth:"100%",height:"100%",maxHeight:"100%"},...e&&{height:e,minHeight:e},...o&&{width:o},[l.breakpoints.down("sm")]:{width:"100%",maxWidth:"100%",height:"100vh",maxHeight:"100vh",...e&&{top:"auto",borderRadius:l.spacing(1,1,0,0),height:e,minHeight:e}}}}}}));function _e({nonModal:t,children:e,size:o="small",PaperProps:r,fullScreen:a,height:l,width:s,hasForm:d,"aria-label":c,"data-testid":u,...f}){return t?n.jsx(P,{size:o,fullScreen:a,height:l,width:s,hasForm:d,"aria-label":c,"data-testid":u,...f,children:e}):n.jsx(i.Dialog,{PaperComponent:P,PaperProps:{...r,size:o,fullScreen:a,height:l,width:s,hasForm:d},fullScreen:a,role:"section","aria-label":c,"data-testid":u,"data-size":o,"data-width":s,"data-height":l,...f,children:e})}const Ne=i.styled(i.DialogTitle)(()=>({padding:0,zIndex:10})),qe=i.styled(i.Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between",padding:t.spacing(2),minHeight:t.spacing(8)})),X=i.styled(i.Box)(({theme:t})=>({display:"flex",alignItems:"center",gap:t.spacing(1),overflow:"hidden"})),Ge=i.styled(T.CloseOutlined)(({theme:t})=>({color:t.palette.text.secondary})),Ve=i.styled(i.Divider)(()=>({"+ .MuiDialogContent-root":{borderTop:"none !important"}}));function Ue({title:t,chipLabel:e,chipProps:o,children:r,onClose:a,secondaryActions:l,"aria-label":s,closeIcon:d,...c}){const u=k.useIntl(),f=y.useImperativeIntl(u);return n.jsxs(n.Fragment,{children:[n.jsxs(Ne,{component:"div",...c,children:[n.jsxs(qe,{children:[n.jsxs(X,{flex:1,maxWidth:.8,children:[n.jsx(y.Typography,{component:"h2",variant:"inherit",noWrap:!0,"aria-label":s,children:t}),e&&n.jsx(i.Chip,{color:"default",label:e,...o})]}),n.jsxs(X,{children:[l,a&&n.jsx(i.Tooltip,{title:f.formatMessage({id:"c4r.button.close"}),placement:"left",children:n.jsx(i.IconButton,{onClick:a,children:d||n.jsx(Ge,{"data-testid":"CloseIcon"})})})]})]}),r]}),r&&n.jsx(Ve,{})]})}const ze=i.styled(i.DialogContent,{shouldForwardProp:t=>!["scrollableContent","withGutter","withBottomGutter"].includes(t)})(({theme:t,scrollableContent:e,withGutter:o,withBottomGutter:r})=>({display:"flex",flexDirection:"column",gap:t.spacing(3),padding:0,...t.typography.body2,color:t.palette.text.secondary,".MuiAlert-root":{minHeight:"auto"},...e&&{borderBottom:`1px solid ${t.palette.divider}`,"+ .MuiDivider-root":{display:"none"}},...o&&{padding:` ${t.spacing(1,2,0)} !important`,".MuiDialog-paperFullScreen &":{padding:`${t.spacing(2,2,0)} !important`}},...r&&{paddingBottom:`${t.spacing(3)} !important`,".MuiDialog-paperFullScreen &":{paddingBottom:`${t.spacing(3)} !important`}}}));function Ze({children:t,scrollableContent:e,hasFooterAlert:o,withGutter:r=!0,withBottomGutter:a=!0,onScroll:l,...s},d){const c=i.useTheme(),[u,f]=b.useState(null);b.useImperativeHandle(d,()=>u,[u]);const p=b.useCallback(x=>{const h=Math.abs(x.scrollHeight-x.clientHeight-x.scrollTop)<1,j=x.scrollTop===0,m=`1px solid ${c.palette.divider}`;x.style.borderTop=j?"none":m,x.style.borderBottom=h&&!o?"none":m},[c.palette.divider,o]),g=b.useCallback(x=>{p(x.target),l==null||l(x)},[p,l]);return b.useEffect(()=>{u&&p(u)},[u,p]),b.useEffect(()=>{if(!u||typeof ResizeObserver>"u")return;const x=new ResizeObserver(()=>{p(u)});return x.observe(u),()=>x.disconnect()},[u,p]),n.jsx(ze,{ref:f,onScroll:g,scrollableContent:e,withGutter:r,withBottomGutter:a&&r,...s,children:t})}const st=b.forwardRef(Ze),Ye=i.styled(st,{shouldForwardProp:t=>t!=="withAlert"})(({withAlert:t,theme:e})=>({padding:`${e.spacing(0,2)} !important`,...t&&{paddingBottom:`${e.spacing(3)} !important`}})),Je=i.styled(E.Alert)(({theme:t})=>({minHeight:"auto",padding:0,backgroundColor:"transparent","& .MuiTypography-root":{color:t.palette.text.secondary,a:{color:t.palette.primary.main}},"& .MuiAlertTitle-root":{color:t.palette.text.primary}}));function G({children:t,severity:e="neutral",...o}){return n.jsx(Je,{severity:e,...o,children:t})}const Xe=i.styled(i.Box,{shouldForwardProp:t=>!["dark","hasChildren"].includes(t)})(({dark:t,hasChildren:e,theme:o})=>({flex:"0 0 auto",display:"block",minHeight:e?o.spacing(8):"auto",zIndex:10,...t&&{backgroundColor:o.palette.common.black,color:o.palette.white[60],".MuiAlert-root":{".MuiTypography-root, .MuiAlert-message :not(.MuiAlertTitle-root)":{color:o.palette.white[60],a:{color:`${o.palette.secondary.main} !important`}},".MuiAlert-icon":{color:o.palette.white[60]}}}})),Ke=i.styled(i.Box)(()=>({display:"flex",alignItems:"center",justifyContent:"space-between","& > div:empty":{padding:0}})),Qe=i.styled(i.Box,{shouldForwardProp:t=>t!=="hasAlert"})(({hasAlert:t,theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),padding:e.spacing(2),paddingTop:t?0:e.spacing(2)})),V=i.styled(i.DialogActions,{shouldForwardProp:t=>t!=="hasAlert"})(({hasAlert:t,theme:e})=>({gap:e.spacing(1),padding:e.spacing(2),paddingTop:t?0:e.spacing(2),margin:0,".MuiButton-root + .MuiButton-root":{marginLeft:0}})),tn=i.styled(i.Divider)(()=>({marginTop:"-1px"}));function en({children:t,secondaryActions:e,alertContent:o,alertProps:r,dark:a,topContent:l,...s}){return n.jsxs(n.Fragment,{children:[l,!!o&&n.jsx(tn,{}),n.jsxs(Xe,{...s,dark:a,"data-theme":a?"dark":"light",hasChildren:!!t,children:[!!o&&n.jsx(i.Box,{sx:{p:2,pt:1.5,pb:1},children:n.jsx(G,{...r,children:o})}),n.jsxs(Ke,{children:[n.jsx(Qe,{hasAlert:!!o,children:e}),n.jsx(V,{hasAlert:!!o,children:t})]})]})]})}const nn=i.styled(i.Box)(({theme:t})=>({position:"absolute",width:"100%",zIndex:100,top:0,bottom:0,left:0,right:0,overflow:"hidden",display:"flex",boxSizing:"border-box",alignItems:"flex-end",background:t.palette.white[60]})),on=i.styled("div")(()=>({width:"100%"})),rn=i.styled(i.Box)(({theme:t})=>({width:"100%",padding:t.spacing(1.5,2,2),backgroundColor:t.palette.background.paper,borderTop:`1px solid ${t.palette.divider}`,".MuiDialogActions-root":{padding:0,marginTop:t.spacing(1)}}));function an({children:t,onClickAway:e,actions:o,severity:r="warning",opened:a,"data-testid":l,"aria-label":s,...d}){const c=b.useRef(null),u=i.useTheme(),f=()=>{e&&e()};return n.jsx(nn,{ref:c,"data-testid":l,"aria-label":s,role:"presentation",children:n.jsx(gt,{onClickAway:f,children:n.jsx(i.Slide,{direction:"up",in:a,container:c.current,mountOnEnter:!0,unmountOnExit:!0,easing:u.transitions.easing.easeOut,timeout:350,children:n.jsx(on,{children:n.jsxs(rn,{children:[n.jsx(G,{severity:r,...d,children:t}),n.jsx(V,{children:o})]})})})})})}const ln=i.styled(i.Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",height:t.spacing(8),marginBottom:t.spacing(2),"& > div":{flex:1}})),sn=i.styled(i.Box)(({theme:t})=>({display:"flex",flex:1,flexDirection:"column",justifyContent:"center",alignItems:"center",position:"relative","&:before, &:after":{content:'""',background:t.palette.divider,position:"absolute",top:t.spacing(1.25),height:t.spacing(.25),width:`calc(50% - ${t.spacing(2.5)})`},"&:before":{left:0},"&:after":{right:0},"&:first-of-type:before":{content:"none"},"&:last-of-type:after":{content:"none"}}));function cn({theme:t,completed:e,current:o}){return e?{background:t.palette.success.main,borderColor:t.palette.success.main,color:t.palette.common.white}:o?{background:t.palette.text.primary,borderColor:t.palette.text.primary,color:t.palette.common.white}:{borderColor:t.palette.text.secondary,color:t.palette.text.secondary}}const dn=i.styled("span",{shouldForwardProp:t=>t!=="completed"&&t!=="current"})(({theme:t,completed:e,current:o})=>({display:"flex",justifyContent:"center",alignItems:"center",height:t.spacing(3),width:t.spacing(3),marginBottom:t.spacing(1),borderRadius:"50%",border:`${t.spacing(.25)} solid currentColor`,...t.typography.caption,...cn({theme:t,completed:e,current:o})}));function un({currentStep:t,stepsLabels:e,...o}){return n.jsx(ln,{...o,children:n.jsx(i.Box,{sx:{display:"flex"},children:e.map((r,a)=>{const l=a+1,s=l===t,d=l<t,c=d?"success.main":s?"textPrimary":"textSecondary";return n.jsxs(sn,{"data-state":d?"completed":s?"current":"uncompleted",children:[n.jsx(dn,{completed:d,current:s,children:d?n.jsx(T.Check,{fontSize:"small","aria-label":"Completed step"}):l}),n.jsx(y.Typography,{variant:"caption",component:"div",color:c,children:r})]},a)})})})}exports.TablePaginationActions=y.TablePaginationActions;exports.Typography=y.Typography;exports.Alert=E.Alert;exports.MenuItem=W.MenuItem;exports.AccordionGroup=re;exports.AppBar=Ae;exports.Autocomplete=Xt;exports.Avatar=le;exports.Button=mt;exports.CreatableAutocomplete=ee;exports.DatePicker=$;exports.DateRangePicker=Re;exports.DateTimePicker=Oe;exports.Dialog=_e;exports.DialogActions=V;exports.DialogAlert=G;exports.DialogConfirmation=an;exports.DialogContent=st;exports.DialogContentPadded=Ye;exports.DialogFooter=en;exports.DialogHeader=Ue;exports.DialogPaper=P;exports.DialogStepper=un;exports.IconButton=Q;exports.LabelWithIndicator=F;exports.Menu=Ft;exports.MenuFilter=_;exports.MenuList=$t;exports.MultipleAutocomplete=oe;exports.MultipleSelectField=Gt;exports.PasswordField=It;exports.SelectField=K;exports.Snackbar=pe;exports.TimePicker=Fe;exports.ToggleButtonGroup=St;exports.TooltipData=He;exports.UploadField=Yt;exports.UploadFieldBase=tt;exports.dialogDimensionsBySize=L;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),h=require("react"),a=require("@mui/material"),y=require("../TablePaginationActions-V8ultBUz.cjs"),k=require("react-intl"),S=require("@mui/icons-material"),H=require("../Alert-BbMbtaix.cjs");require("cartocolor");const _=require("../MenuItem-Dbss-WG1.cjs"),P=require("../ArrowDown-CGnG0E-4.cjs"),ut=require("@mui/x-date-pickers/DatePicker"),pt=require("@mui/x-date-pickers"),gt=require("@mui/x-date-pickers/TimePicker"),xt=require("@mui/x-date-pickers/DateTimePicker"),ft=require("@mui/material/ClickAwayListener"),mt=a.styled(a.Box)({position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"}),ht=a.styled(a.Box)({visibility:"hidden",pointerEvents:"none"});function bt({children:t,loading:e,disabled:o,startIcon:i,endIcon:r,loadingPosition:l,...s},d){const c=n.jsx(a.CircularProgress,{size:18,color:"inherit"}),g=e&&l===void 0,m=()=>g?n.jsxs(a.Box,{sx:{position:"relative"},children:[n.jsx(mt,{children:c}),n.jsx(ht,{children:t})]}):t,u=f=>{if(!g)return e&&l!==void 0?l===f?c:void 0:f==="start"?i:r};return n.jsx(a.Button,{disabled:e||o,startIcon:u("start"),endIcon:u("end"),...s,role:"button",ref:d,children:n.jsx(y.Typography,{variant:"inherit",color:"inherit",noWrap:!0,component:"span",children:m()})})}const yt=h.forwardRef(bt),jt=a.styled(a.Box)(({theme:t})=>({display:"flex",alignItems:"center",gap:t.spacing(.5)})),Mt=a.styled(y.Typography)(({theme:t})=>({".Mui-disabled &":{color:t.palette.text.disabled}})),It=a.styled(a.Box)(({theme:t})=>({display:"flex",svg:{width:y.ICON_SIZE_SMALL,height:y.ICON_SIZE_SMALL,fontSize:y.ICON_SIZE_SMALL,path:{fill:t.palette.text.secondary,".Mui-disabled &":{fill:t.palette.text.disabled}}}}));function O({label:t,type:e,icon:o,inheritSize:i}){return n.jsxs(jt,{children:[t,e&&n.jsx(Mt,{component:"span",variant:i?"inherit":"caption",color:"textSecondary",weight:"regular",children:e==="required"?"(required)":"(optional)"}),o&&n.jsx(It,{children:o})]})}function Ct({InputProps:t,size:e="small",...o},i){const r=k.useIntl(),l=y.useImperativeIntl(r),[s,d]=h.useState(!1),c=()=>d(!s);return n.jsx(a.TextField,{...o,ref:i,type:s?"text":"password",size:e,InputProps:{...t,endAdornment:n.jsx(a.InputAdornment,{position:"end",children:n.jsx(a.IconButton,{size:e,onClick:c,children:n.jsx(a.Tooltip,{title:l.formatMessage({id:`c4r.form.${s?"hidePassword":"showPassword"}`}),children:s?n.jsx(S.VisibilityOffOutlined,{}):n.jsx(S.VisibilityOutlined,{})})})})}})}const vt=h.forwardRef(Ct),$={};function Bt(t="$lodash$"){$[t]||($[t]=0);const e=++$[t];return t==="$lodash$"?`${e}`:`${t}${e}`}const Dt=a.styled(a.Select)(({theme:t})=>({"& .MuiInputAdornment-positionStart":{paddingLeft:t.spacing(2),"&.MuiInputAdornment-sizeSmall":{paddingLeft:t.spacing(1.5)}},"& .MuiInputBase-inputAdornedStart":{paddingLeft:"0px !important"},"& .MuiSelect-select .MuiMenuItem-root:hover":{backgroundColor:"transparent"},"&.MuiInputBase-root .MuiSelect-select.MuiSelect-multiple":{paddingRight:t.spacing(7)}})),At=a.styled(a.MenuItem)(()=>({display:"none"}));function Tt({children:t,placeholder:e,size:o="small",displayEmpty:i,menuProps:r,inputProps:l,labelId:s,label:d,labelSecondary:c,helperText:g,name:m,error:u,focused:f,disabled:p,fullWidth:x,required:M,"aria-label":b,...D},C){const v=o==="small",[j]=h.useState(()=>Bt("select-label-")),I=d?s??j:void 0;return n.jsxs(a.FormControl,{size:o,error:u,focused:f,disabled:p,fullWidth:x,required:M,children:[n.jsxs(a.Box,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[d&&n.jsx(a.InputLabel,{shrink:!0,id:I,children:d}),c&&n.jsx(a.Box,{display:"flex",alignItems:"center",ml:2,mb:.5,children:c})]}),n.jsxs(Dt,{...D,labelId:I,name:m,ref:C,size:o,fullWidth:x,displayEmpty:i??!!e,inputProps:{...l,"aria-label":b},MenuProps:{...r,PopoverClasses:{paper:v?"MuiMenu-paper-sizeSmall":void 0},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:0,horizontal:"left"}},children:[e&&n.jsx(At,{disabled:!0,value:"",children:n.jsx(y.Typography,{variant:v?"body2":"body1",color:"text.hint",component:"span",children:e})}),t]}),g&&n.jsx(a.FormHelperText,{"aria-label":`${m}-helper`,children:g})]})}const Q=h.forwardRef(Tt),St=a.styled(a.ToggleButtonGroup,{shouldForwardProp:t=>t!=="variant"&&t!=="backgroundColor"})(({variant:t,backgroundColor:e,theme:o})=>({...t==="contained"&&{boxShadow:"none"},...t==="unbounded"&&{boxShadow:"none",borderRadius:o.spacing(.5),"& .MuiDivider-root":{height:o.spacing(4),"&.MuiToggleButtonGroup-groupedHorizontal":{height:o.spacing(4)},"&.MuiToggleButtonGroup-groupedVertical":{height:"auto",width:o.spacing(4),margin:`${o.spacing(.5,0,1)} !important`,borderRadius:"0 !important"}},"& .MuiToggleButton-sizeSmall":{margin:0,"&.MuiToggleButtonGroup-grouped:not(.MuiDivider-root)":{margin:0},"& + .MuiDivider-root.MuiToggleButtonGroup-groupedHorizontal":{height:o.spacing(3)},"& + .MuiDivider-root.MuiToggleButtonGroup-groupedVertical":{height:"auto",width:o.spacing(3)}},".MuiToggleButtonGroup-grouped:not(.MuiDivider-root)":{margin:0,"&:first-of-type":{marginLeft:0},"&:not(:last-of-type)":{marginRight:o.spacing(.5)}},"&.MuiToggleButtonGroup-horizontal:not(.MuiDivider-root)":{".MuiToggleButtonGroup-grouped":{margin:o.spacing(0,.5)}},"&.MuiToggleButtonGroup-vertical:not(.MuiDivider-root)":{".MuiToggleButtonGroup-grouped":{margin:o.spacing(0,0,.5),"&:not(:last-of-type)":{marginRight:0},"&:last-of-type":{marginBottom:0}}}},...e==="primary"&&{backgroundColor:o.palette.background.paper},...e==="secondary"&&{backgroundColor:o.palette.background.default},...e==="transparent"&&{backgroundColor:"transparent"}}));function kt({children:t,variant:e="floating",backgroundColor:o,...i}){const l=e==="unbounded"?"transparent":"primary";return n.jsx(St,{...i,variant:e,backgroundColor:o??l,children:t})}const wt=a.styled("div")(({theme:t})=>({position:"relative",display:"inline-flex","& + &, & + .optionIconButton":{marginLeft:t.spacing(.5)}})),Rt=a.styled(a.IconButton,{shouldForwardProp:t=>!["active"].includes(t)})(({active:t,theme:e})=>({...t&&{color:e.palette.primary.main,backgroundColor:e.palette.primary.background,"& svg:not(.doNotFillIcon) path":{fill:e.palette.primary.main}}}));function Ft({tooltip:t,tooltipPlacement:e="top",icon:o,size:i="medium",variant:r="icon",color:l="default",sx:s,className:d,loading:c,disabled:g,active:m,...u},f){return n.jsx(a.Tooltip,{placement:e,title:t??"",children:n.jsx(wt,{className:`optionIconButton ${d??""}`,sx:s,"data-testid":"icon-button",children:n.jsx(Rt,{...u,ref:f,size:i,variant:r,color:l,active:m,disabled:g||c,role:"button",children:c?n.jsx(a.CircularProgress,{size:18,color:"inherit"}):o})})})}const tt=h.forwardRef(Ft),Ot=a.styled(a.Menu,{shouldForwardProp:t=>!["extended","width","height"].includes(t)})(({theme:t,extended:e,width:o,height:i})=>({...e&&{".MuiMenuItem-root":{minHeight:t.spacing(6)}},...o&&{".MuiList-root":{width:o,minWidth:o}},...i&&{".MuiMenu-paper":{overflow:"hidden"},".MuiList-root":{maxHeight:i}}}));function $t({extended:t,width:e,height:o,MenuListProps:i,...r},l){return n.jsx(Ot,{...r,ref:l,"data-name":"menu",width:e,height:o,extended:t,MenuListProps:{...i,"data-width":e,"data-height":o,"data-extended":t}})}const Lt=h.forwardRef($t),Et=a.styled(a.MenuList,{shouldForwardProp:t=>!["extended","width","height"].includes(t)})(({theme:t,extended:e,width:o,height:i})=>({...e&&{".MuiMenuItem-root":{minHeight:t.spacing(6)}},"&.MuiList-root":{...o&&{width:o,minWidth:o},...i&&{maxHeight:i}}}));function Wt({extended:t,width:e,height:o,...i},r){return n.jsx(Et,{...i,ref:r,width:e,height:o,extended:t,"data-name":"menu-list","data-width":e,"data-height":o,"data-extended":t})}const Ht=h.forwardRef(Wt),_t=a.styled(_.MenuItem)(()=>({marginTop:"0 !important"})),Pt=a.styled(a.Link)(({disabled:t,theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),width:"100%",textAlign:"initial",...t&&{pointerEvents:"none",color:e.palette.text.disabled}}));function Nt({areAllSelected:t,areAnySelected:e,selectAll:o,selectAllDisabled:i,...r},l){const s=k.useIntl(),d=y.useImperativeIntl(s);return n.jsx(_t,{...r,ref:l,fixed:!0,"data-name":"menu-filter",children:n.jsxs(Pt,{variant:"body2",color:"textPrimary",component:"button",underline:"none",disabled:!!i,onClick:o,tabIndex:0,children:[n.jsx(a.Checkbox,{checked:t,indeterminate:e&&!t,disabled:i}),d.formatMessage({id:"c4r.form.selectAll"})]})})}const N=h.forwardRef(Nt);function qt({selectedOptions:t,options:e,onChange:o}){const[i,r]=h.useState(t??[]),l=e.length===i.length,s=i.length>0;return h.useEffect(()=>{i!==t&&r(i)},[t]),{areAllSelected:l,areAnySelected:s,currentOptions:i,handleChange:m=>{const{target:{value:u}}=m,f=typeof u=="string"?u.split(","):u.filter(p=>p!==void 0);r(f),o(f)},selectAll:()=>{const m=e==null?void 0:e.filter(({disabled:u})=>!u).map(({value:u})=>u);m&&(m.every(f=>i.includes(f))?(r([]),o([])):(r(m),o(m)))},unselectAll:()=>{r([]),o([])}}}const Gt=a.styled(a.MenuItem)(({theme:t})=>({"&.Mui-disabled":{pointerEvents:"auto","&:hover":{backgroundColor:`${t.palette.background.default} !important`}}})),Vt=a.styled(a.InputAdornment,{shouldForwardProp:t=>t!=="size"})(({theme:t,size:e})=>({display:"none",position:"absolute",top:t.spacing(2),right:t.spacing(3.5),".MuiInputBase-root:hover &, .MuiInputBase-root.Mui-focused &":{display:"flex"},".MuiSvgIcon-root":{color:t.palette.text.hint},...e==="medium"&&{top:t.spacing(3),right:t.spacing(5)}})),Ut=[],zt=()=>{};function Yt({options:t=Ut,selectedOptions:e,size:o="small",placeholder:i,showCounter:r,showFilters:l=!0,onChange:s=zt,selectAllDisabled:d,tooltipPlacement:c,variant:g,...m},u){const{areAllSelected:f,areAnySelected:p,currentOptions:x,handleChange:M,selectAll:b,unselectAll:D}=qt({options:t,selectedOptions:e,onChange:s}),C=o==="small",v=C||g==="standard"?0:2,j=k.useIntl(),I=y.useImperativeIntl(j),T=`${x.length} ${I.formatMessage({id:"c4r.form.selected"})}`,w=h.useMemo(()=>f?n.jsx(y.Typography,{component:"span",variant:C?"body2":"body1",color:"textPrimary",ml:v,children:I.formatMessage({id:"c4r.form.allSelected"})}):p?n.jsx(y.Typography,{component:"span",variant:C?"body2":"body1",color:"textPrimary",ml:v,children:r&&x.length>1?T:x.join(", ")}):n.jsx(y.Typography,{component:"span",variant:C?"body2":"body1",color:"text.hint",ml:v,children:i??I.formatMessage({id:"c4r.form.noneSelected"})}),[f,p,T,x,I,C,v,i,r]);return n.jsxs(Q,{...m,ref:u,multiple:!0,displayEmpty:!0,placeholder:i,value:x,renderValue:()=>w,onChange:M,size:o,variant:g,endAdornment:l&&p&&n.jsx(Vt,{position:"end",size:o,children:n.jsx(a.IconButton,{onClick:D,size:o,children:n.jsx(S.Cancel,{})})}),menuProps:{PaperProps:{sx:{".MuiList-root":{paddingTop:0}}}},children:[l&&n.jsx(N,{areAllSelected:f,areAnySelected:p,selectAll:b,selectAllDisabled:d}),t==null?void 0:t.map(A=>{const F=n.jsxs(Gt,{value:A.value,disabled:A.disabled,tabIndex:0,children:[n.jsx(a.Checkbox,{disabled:A.disabled,checked:x.includes(A.value)}),n.jsx(a.ListItemText,{primary:A.label})]},A.value);return A.tooltip?n.jsx(a.Tooltip,{title:A.tooltip,placement:c,children:F},A.value):F})]})}const Zt=h.forwardRef(Yt),Jt=a.styled(a.TextField,{shouldForwardProp:t=>t!=="cursor"})(({cursor:t,theme:e})=>({"&.MuiTextField-root .MuiInputBase-root":{cursor:t,paddingRight:e.spacing(1),"& input":{cursor:t},"&.Mui-disabled":{pointerEvents:"none","& .MuiButtonBase-root":{color:e.palette.text.disabled}},"&.MuiInputBase-sizeSmall":{paddingRight:e.spacing(.5)}},"& .MuiFormLabel-root":{cursor:t,"&.Mui-disabled":{pointerEvents:"none"}}}));function Xt({buttonText:t,hasFiles:e,size:o,error:i,disabled:r,handleReset:l,handleOpen:s,inProgress:d}){return n.jsx(a.InputAdornment,{position:"end",children:d?n.jsx(a.IconButton,{"aria-label":"loading",disabled:!0,size:o,children:n.jsx(a.CircularProgress,{size:18})}):e?n.jsx(a.IconButton,{onClick:l,size:o,"aria-label":"delete",disabled:r,children:n.jsx(S.Cancel,{})}):n.jsx(a.Button,{onClick:s,size:o,variant:"text",color:i?"default":"primary",disabled:r,children:t})})}function et({name:t,multiple:e,handleReset:o,handleOpen:i,dragOver:r,error:l,placeholder:s,focused:d,buttonText:c="Browse",inProgress:g,InputProps:m,size:u="small",hasFiles:f,cursor:p="pointer",...x}){return n.jsx(Jt,{...x,size:u,error:l,placeholder:s,focused:d??r,cursor:p,InputProps:{...m,name:t,readOnly:!0,endAdornment:n.jsx(Xt,{buttonText:c,hasFiles:f,size:u,error:l,disabled:!!r,handleReset:o,handleOpen:i,inProgress:g})}})}function Kt({onChange:t,files:e,multiple:o,placeholder:i,uploadInputRef:r}){const l=k.useIntl(),s=y.useImperativeIntl(l),[d,c]=h.useState(""),[g,m]=h.useState(!1);h.useEffect(()=>{!e||e.length===0?c(""):e.length===1?c(e[0].name):c(s.formatMessage({id:"c4r.form.filesSelected"},{count:e.length}))},[e,s]);const u=()=>{var j;(j=r.current)==null||j.click()},f=j=>{j.preventDefault(),m(!0)},p=j=>{j.preventDefault(),m(!1)},x=j=>{j.preventDefault(),m(!1);const I=j.dataTransfer.items,T=M(I);t==null||t(T)},M=j=>{const I=[];for(const T of Array.from(j))if(T.kind==="file"){const w=T.getAsFile();I.push(w)}return I},b=j=>{const I=Array.from(j.target.files);t==null||t(I)},D=j=>{j.stopPropagation(),c("")},C=h.useMemo(()=>{const j=s.formatMessage({id:"c4r.form.dragPlaceholder"},{count:o?0:1}),I=s.formatMessage({id:"c4r.form.dragActivePlaceholder"},{count:o?0:1});let T="";return g?T=I:T=i??j,T},[g,o,i,s]);return{filesText:d,getPlaceholder:C,dragOver:g,inputEvents:{onDragOver:f,onDragLeave:p,onDrop:x,onClick:u},handleFiles:b,handleReset:D}}const Qt=["application/JSON"];function te({name:t,buttonText:e,accept:o,files:i,inProgress:r,onChange:l,multiple:s,placeholder:d,error:c,focused:g,nativeInputProps:m,...u}){const f=o??Qt,p=h.useRef(null),{filesText:x,getPlaceholder:M,dragOver:b,inputEvents:D,handleFiles:C,handleReset:v}=Kt({uploadInputRef:p,files:i,onChange:l,multiple:s,placeholder:d});return n.jsxs(n.Fragment,{children:[n.jsx(et,{...u,placeholder:M,value:x,error:c,focused:g??b,handleReset:v,dragOver:b,inProgress:r,hasFiles:!!x,InputProps:D,buttonText:e}),n.jsx("input",{...m,ref:p,style:{display:"none"},type:"file","aria-label":t,name:t,accept:String(f),multiple:s,onChange:C})]})}function ee({disabled:t,loading:e,...o},i){return n.jsx(a.Autocomplete,{...o,ref:i,disabled:t||e,popupIcon:e?n.jsx(a.CircularProgress,{size:18,color:"inherit"}):n.jsx(P.ArrowDown,{}),"data-name":"autocomplete",ListboxProps:{"aria-multiselectable":!1,...o.ListboxProps}})}const ne=h.forwardRef(ee),nt=t=>t&&typeof t=="object"?t.title??String(t):String(t),ot=(t,e)=>typeof t!="object"||t===null?{value:t,multiple:e}:{...t,multiple:e},it=t=>n.jsx("span",{"data-testid":"more-options-tag",children:`+${t}`});function at(){return{renderOption:(e,o,i,r,l)=>{const{title:s,inputValue:d,divider:c,fixed:g,extended:m,dense:u,destructive:f,disabled:p,subtitle:x,iconColor:M,startAdornment:b,endAdornment:D,alternativeTitle:C,secondaryText:v,multiple:j}=o,{key:I,...T}=e,w=typeof o=="string"||typeof o=="number",A=(F,B,R,z)=>R||z||(B&&typeof B=="object"&&"value"in B?String(B.value):F(B));return n.jsx(h.Fragment,{children:c?n.jsx(a.Divider,{}):n.jsxs(n.Fragment,{children:[d&&n.jsx(a.Divider,{}),n.jsxs(_.MenuItem,{...T,...!w&&{fixed:g,extended:m,dense:u,destructive:f,disabled:p,subtitle:x,iconColor:M},"aria-disabled":x||p,"aria-selected":i.selected,children:[!x&&(b||j||l)&&n.jsxs(a.ListItemIcon,{children:[l||j&&n.jsx(a.Checkbox,{checked:i.selected}),b]}),n.jsxs(a.ListItemText,{children:[A(r??nt,o,C,s),v&&n.jsx(y.Typography,{component:"p",variant:"caption",color:"text.secondary",children:v})]}),!x&&D]})]})},I)}}}function oe({getOptionLabel:t,newItemLabel:e,newItemIcon:o,multiple:i}){const r=k.useIntl(),l=y.useImperativeIntl(r),s=a.createFilterOptions(),{renderOption:d}=at();return{creatableFilterOptions:(u,f)=>{const p=s(u,f),{inputValue:x}=f,M=u.some(b=>x===t(b));if(x.length>1&&x!==""&&!M){let b;typeof e=="function"?b=e(x):e?b=`${e} "${x}"`:b=`${l.formatMessage({id:"c4r.form.add"})} "${x}"`,p.push({inputValue:x,title:b})}return p},creatableOptionLabel:u=>typeof u=="string"?u:u.inputValue?u.inputValue:t(u),creatableRenderOption:(u,f,p)=>{const x=f.inputValue?o??n.jsx(S.AddCircleOutlineOutlined,{}):void 0,M=ot(f,!!i);return d(u,M,p,t,x)}}}function rt({options:t,value:e,onChange:o,getOptionLabel:i}){const[r,l]=h.useState(Array.isArray(e)?e:e?[e]:[]),{renderOption:s}=at();h.useEffect(()=>{const f=Array.isArray(e)?e:e?[e]:[];l(f)},[e]);const d=r.length===t.length,c=r.length>0&&r.length<t.length;return{multipleValue:r,allSelected:d,someSelected:c,handleSelectAll:f=>{const p=d?[]:[...t];l(p),o==null||o(f,p,"selectOption")},handleChange:(f,p,x)=>{l(p===null?[]:p),o==null||o(f,p,x)},multipleRenderOption:(f,p,x)=>{const M=ot(p,!0);return s(f,M,x,i)}}}function ie({children:t,showFilters:e,allSelected:o,someSelected:i,handleSelectAll:r=()=>{},multiple:l,...s},d){return n.jsxs("ul",{ref:d,...s,role:"listbox","aria-multiselectable":l,children:[e&&l&&n.jsx(N,{areAllSelected:!!o,areAnySelected:!!i,selectAll:r}),t]})}const lt=h.forwardRef(ie);function ae({newItemLabel:t,newItemIcon:e,getOptionLabel:o=nt,multiple:i,disableCloseOnSelect:r,disabled:l,loading:s,showFilters:d,options:c=[],value:g,onChange:m,getLimitTagsText:u,...f},p){const{freeSolo:x=!0,...M}=f,{multipleValue:b,allSelected:D,someSelected:C,handleSelectAll:v,handleChange:j}=rt({options:c,value:g,onChange:m}),{creatableFilterOptions:I,creatableOptionLabel:T,creatableRenderOption:w}=oe({getOptionLabel:o,newItemLabel:t,newItemIcon:e,multiple:i});return n.jsx(a.Autocomplete,{...M,ref:p,options:c,value:i?b:g,onChange:j,filterOptions:I,getOptionLabel:T,renderOption:w,freeSolo:x,forcePopupIcon:!0,multiple:i,disableCloseOnSelect:r??i,ListboxComponent:lt,ListboxProps:{showFilters:d,allSelected:D,someSelected:C,handleSelectAll:v,multiple:i},getLimitTagsText:u??it,disabled:l||s,popupIcon:s?n.jsx(a.CircularProgress,{size:18,color:"inherit"}):n.jsx(P.ArrowDown,{}),"data-name":"creatable-autocomplete"})}const re=h.forwardRef(ae);function le({renderOption:t,disableCloseOnSelect:e=!0,disabled:o,loading:i,showFilters:r,options:l,value:s,onChange:d,getOptionLabel:c,getLimitTagsText:g,...m},u){const{multipleValue:f,allSelected:p,someSelected:x,handleSelectAll:M,handleChange:b,multipleRenderOption:D}=rt({options:l,value:s,onChange:d,getOptionLabel:c});return n.jsx(a.Autocomplete,{...m,ref:u,options:l,value:f,onChange:b,getOptionLabel:c,renderOption:t??D,ListboxComponent:lt,ListboxProps:{showFilters:r,allSelected:p,someSelected:x,handleSelectAll:M,multiple:!0},multiple:!0,getLimitTagsText:g??it,disableCloseOnSelect:e,disabled:o||i,popupIcon:i?n.jsx(a.CircularProgress,{size:18,color:"inherit"}):n.jsx(P.ArrowDown,{}),"data-name":"multiple-autocomplete"})}const se=h.forwardRef(le),ce=a.styled("div",{shouldForwardProp:t=>t!=="variant"})(({variant:t,theme:e})=>({width:"100%",borderRadius:e.spacing(.5),...t==="outlined"&&{backgroundColor:e.palette.background.paper,boxShadow:`inset 0 0 0 1px ${e.palette.divider}`}}));function de({variant:t="standard",items:e,...o}){return n.jsx(ce,{...o,variant:t,children:e.map((i,r)=>n.jsxs(a.Accordion,{disabled:i.disabled,defaultExpanded:i.defaultExpanded,onChange:i.onChange,children:[n.jsx(a.AccordionSummary,{"aria-controls":`${r}-content`,id:`${r}-header`,children:i.summary}),n.jsx(a.AccordionDetails,{children:i.content})]},r))})}const Y={large:5,medium:4,small:3,xsmall:2.25},ue=a.styled(a.Avatar,{shouldForwardProp:t=>t!=="size"&&t!=="disabled"})(({theme:t,size:e="medium",disabled:o=!1})=>({width:t.spacing(Y[e]),height:t.spacing(Y[e]),...t.typography.subtitle1,...e==="large"&&{...t.typography.h6},...e==="small"&&{...t.typography.caption,fontWeight:500},...e==="xsmall"&&{...t.typography.caption,fontWeight:500,svg:{width:y.ICON_SIZE_SMALL,height:y.ICON_SIZE_SMALL}},...o&&{opacity:.6}}));function pe(t){return n.jsx(ue,{...t})}const st=480,ge=a.styled(a.Snackbar)(({theme:t})=>({bottom:t.spacing(2),right:t.spacing(2),left:t.spacing(2),[t.breakpoints.up("sm")]:{bottom:t.spacing(4),right:"auto",left:"50%",width:"100%",maxWidth:`${st}px`}})),xe=a.styled(a.Box,{shouldForwardProp:t=>t!=="autoWidth"})(({autoWidth:t,theme:e})=>({minWidth:"100%",maxWidth:`${st}px`,margin:e.spacing(0,1),...t&&{minWidth:"auto"},[e.breakpoints.up("sm")]:{minWidth:e.spacing(40),...t&&{minWidth:"auto"}}})),fe=a.styled(H.Alert,{shouldForwardProp:t=>!["hasActions","closeable"].includes(t)})(({hasActions:t,closeable:e,icon:o,theme:i})=>({position:"relative",display:"flex",flexWrap:"wrap",columnGap:i.spacing(1),rowGap:i.spacing(.25),padding:i.spacing(1),paddingLeft:i.spacing(2),color:i.palette.common.white,backgroundColor:i.palette.common.black,".MuiAlert-message":{padding:i.spacing(.75,0)},".MuiAlert-message .MuiTypography-root, .MuiAlert-icon":{color:i.palette.common.white},".MuiAlert-message .MuiTypography-root:not(.MuiAlertTitle-root)":{...i.typography.body2},".MuiAlert-message .MuiCircularProgress-circle":{color:i.palette.common.white},".MuiAlert-icon":{position:"absolute",top:i.spacing(1),left:i.spacing(1.5),display:"flex",alignItems:"center",justifyContent:"center",width:i.spacing(3),marginTop:i.spacing(.5)},"&.MuiAlert-standardError":{backgroundColor:i.palette.error.main},...o!==!1&&{paddingLeft:i.spacing(5.5)},...e&&{paddingRight:i.spacing(6)},...!e&&!t&&{paddingRight:i.spacing(1.5)},...t&&{".MuiAlert-message":{minWidth:"fit-content",padding:i.spacing(.75,0)}}})),me=a.styled(a.Box)(({theme:t})=>({position:"absolute",top:t.spacing(1),right:t.spacing(1),"& button:hover, & button:focus-visible":{backgroundColor:t.palette.white[8]},svg:{color:t.palette.white[60]}}));function he({severity:t="neutral",autoHideDuration:e=y.NOTIFICATION_DURATION_IN_MS,closeable:o=!0,children:i,title:r,action:l,open:s,onClose:d=()=>{},autoWidth:c,icon:g,...m}){const u=k.useIntl(),f=y.useImperativeIntl(u),x=g===!1||t==="neutral"&&!g,b=e===null?null:e||y.NOTIFICATION_DURATION_IN_MS;return n.jsx(a.Portal,{children:n.jsx(ge,{...m,open:s,autoHideDuration:b,onClose:d,TransitionComponent:c?a.Fade:a.Slide,"data-auto-width":c,children:n.jsxs(xe,{sx:{position:"relative"},autoWidth:c,children:[n.jsx(fe,{severity:t,action:l,icon:x?!1:g,elevation:6,hasActions:!!l,closeable:o,title:r,children:i}),o&&n.jsx(me,{children:n.jsx(tt,{color:"default",onClick:D=>d(D,"timeout"),icon:n.jsx(S.CloseOutlined,{}),tooltip:f.formatMessage({id:"c4r.button.close"})})})]})})})}const be=a.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",height:y.APPBAR_SIZE,marginRight:t.spacing(1.5)})),ye=a.styled(a.IconButton)(({theme:t})=>({marginRight:t.spacing(1),"&.MuiButtonBase-root svg path":{fill:t.palette.brand.appBarContrastText}})),je=a.styled(a.Divider)(({theme:t})=>({borderColor:a.alpha(t.palette.brand.appBarContrastText,.12)}));function Me({onClickMenu:t}){return n.jsx(a.Box,{sx:{display:{md:"none",xs:"block"}},children:n.jsxs(be,{children:[n.jsx(ye,{onClick:t,children:n.jsx(S.MenuOutlined,{})}),n.jsx(je,{orientation:"vertical",flexItem:!0})]})})}const Ie=a.styled("div")(({theme:t})=>({display:"flex",marginRight:t.spacing(1.5),"& a":{display:"flex"},"& svg, & img":{width:t.spacing(4),height:t.spacing(4)}}));function Ce({logo:t}){return n.jsx(Ie,{children:t})}const ve=a.styled(y.Typography)({display:"flex",alignItems:"center",whiteSpace:"nowrap"});function Be({text:t}){const e=a.useTheme();return n.jsx(ve,{component:"span",variant:"subtitle1",color:e.palette.brand.appBarContrastText,children:t})}const De=a.styled(y.Typography)(({theme:t})=>({display:"flex",alignItems:"center","&::before":{content:'"/"',margin:t.spacing(0,1),opacity:.6,color:t.palette.brand.appBarContrastText}}));function Ae({text:t}){const e=a.useTheme();return n.jsx(De,{component:"span",variant:"body2",weight:"strong",color:e.palette.brand.appBarContrastText,children:t})}const Te=a.styled(a.AppBar)(({theme:t})=>({backgroundColor:t.palette.brand.appBarMain,"& .MuiTypography-root":{color:t.palette.brand.appBarContrastText},"& .MuiIconButton-root path":{fill:t.palette.brand.appBarContrastText}})),Se=a.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",maxWidth:"calc(100% - 300px)",overflow:"hidden",[t.breakpoints.down("sm")]:{minWidth:"192px"}})),ke=a.styled("div")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between",flex:1,marginLeft:t.spacing(1)}));function we({children:t,brandLogo:e,brandText:o,secondaryText:i,showBurgerMenu:r=!1,onClickMenu:l,...s}){return n.jsx(Te,{...s,children:n.jsxs(a.Toolbar,{children:[n.jsxs(Se,{children:[r&&n.jsx(Me,{onClickMenu:l}),e&&n.jsx(Ce,{logo:e}),o&&n.jsx(Be,{text:o}),i&&n.jsx(Ae,{text:i})]}),n.jsx(ke,{children:t})]})})}const Re=a.styled(a.Box,{shouldForwardProp:t=>!["size","variant"].includes(t)})(({size:t,variant:e,theme:o})=>({position:"absolute",right:o.spacing(5.75),...t==="small"&&{right:o.spacing(4),top:"3px"},...e==="standard"&&{right:o.spacing(4.75),...t==="small"&&{right:o.spacing(3.5)}}}));function q({size:t,variant:e,...o}){const i=k.useIntl(),r=y.useImperativeIntl(i);return n.jsx(Re,{size:t,variant:e,children:n.jsx(a.IconButton,{...o,size:t,"aria-label":r.formatMessage({id:"c4r.form.clearSelection"})})})}const Fe=a.styled(a.Box,{shouldForwardProp:t=>!["size","variant","readOnly"].includes(t)})(({size:t,variant:e,readOnly:o,theme:i})=>({".MuiInputBase-root":{"& .clearButton svg":{color:i.palette.text.hint},...t==="small"&&{paddingRight:`${i.spacing(1)} !important`},...t==="medium"&&{"& .MuiInputAdornment-root":{"& .MuiIconButton-edgeEnd":{marginRight:i.spacing(-1)}}},...e==="standard"&&{paddingRight:`${i.spacing(1)} !important`,...t==="small"&&{paddingRight:`${i.spacing(.5)} !important`}},...o&&{"& .MuiInputAdornment-root":{"& svg":{color:i.palette.text.disabled}}}}}));function G({children:t,size:e,variant:o,readOnly:i,...r}){return n.jsx(Fe,{...r,size:e,variant:o,readOnly:i,children:t})}function L({handleClear:t,variant:e="outlined",size:o="small",label:i,labelHelpTooltip:r,type:l,helperText:s,placeholder:d,slotProps:c,slots:g,error:m,showCalendar:u=!0,readOnly:f,"aria-label":p,"data-testid":x,...M}){const b=k.useIntl(),D=y.useImperativeIntl(b);return n.jsx(a.Box,{className:"CartoDatePicker-root","data-testid":"date-picker",children:n.jsx(G,{size:o,variant:e,readOnly:f,"data-name":"date-picker","aria-label":p,"data-testid":x,children:n.jsx(ut.DatePicker,{...M,label:i&&n.jsx(O,{label:i,type:l,icon:r&&n.jsx(a.Tooltip,{title:r,children:n.jsx(S.HelpOutline,{htmlColor:"text.secondary"})})}),slotProps:{textField:{variant:e,helperText:s,placeholder:d,size:o,error:m??void 0,inputProps:{"data-testid":"date-picker-input"}},field:{clearable:!!t,onClear:t},...c},slots:{clearButton:C=>n.jsx(q,{...C,size:o,variant:e}),openPickerButton:C=>n.jsx(a.IconButton,{...C,size:o,"aria-label":D.formatMessage({id:"c4r.form.chooseDate"})}),...g},disableOpenPicker:!u,readOnly:f})})})}const Oe=a.styled(a.Box,{shouldForwardProp:t=>!["isSelected","isStartDate","isEndDate","isSelectedMonth","isLastDay","isFirstDay"].includes(t)})(({theme:t,isSelected:e,isStartDate:o,isEndDate:i,isSelectedMonth:r,isLastDay:l,isFirstDay:s})=>({position:"relative",margin:t.spacing(.25),"& .MuiPickersDay-root":{margin:0},...e&&r&&{"&::before":{content:'""',position:"absolute",top:0,right:"-2px",bottom:0,left:"-2px",backgroundColor:t.palette.primary.background,...(o||s)&&{left:0,borderRadius:`${t.shape.borderRadius}px 0 0 ${t.shape.borderRadius}px`},...(i||l)&&{right:0,borderRadius:`0 ${t.shape.borderRadius}px ${t.shape.borderRadius}px 0`}},"&:first-of-type::before":{left:0,borderRadius:`${t.shape.borderRadius}px 0 0 ${t.shape.borderRadius}px`},"&:last-of-type::before":{right:0,borderRadius:`0 ${t.shape.borderRadius}px ${t.shape.borderRadius}px 0`},...s&&{"&:last-of-type::before":{left:0,right:0,borderRadius:t.shape.borderRadius}},...l&&{"&:first-of-type::before":{left:0,right:0,borderRadius:t.shape.borderRadius}},"& .MuiPickersDay-today":{borderColor:`${t.palette.default.outlinedBorder} !important`,...(o||i)&&{boxShadow:`0 0 0 1px inset ${t.palette.background.paper}`}},"&::after":{content:'""',position:"absolute",top:0,right:0,bottom:0,left:0,backgroundColor:t.palette.background.paper,borderRadius:t.shape.borderRadius,transition:"background-color 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms"},"&:hover::after":{backgroundColor:t.palette.primary.relatedLight}}})),$e=a.styled(pt.PickersDay,{shouldForwardProp:t=>t!=="isDateRangeLimit"})(({theme:t,isDateRangeLimit:e})=>({"&.MuiPickersDay-root":{position:"relative",zIndex:1,"&.Mui-selected":{color:t.palette.text.primary},...e&&{"&.Mui-selected":{backgroundColor:`${t.palette.primary.main} !important`,color:t.palette.primary.contrastText,"&:hover":{backgroundColor:`${t.palette.primary.dark} !important`}}}}})),Z=(t,e)=>!t||!e?!1:t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate();function J({day:t,startDate:e,endDate:o,selectedMonth:i,...r}){const l=!!(e&&Z(e,t)),s=!!(o&&Z(o,t)),d=!!(e&&o&&t.getTime()>=e.getTime()&&t.getTime()<=o.getTime()),c=t.getDate()===1,g=t.getDate()===new Date(t.getFullYear(),t.getMonth()+1,0).getDate(),m=!!(i&&t.getMonth()===i.getMonth());return n.jsx(Oe,{isSelected:d,isStartDate:l,isEndDate:s,isSelectedMonth:m,isLastDay:g,isFirstDay:c,children:n.jsx($e,{...r,day:t,selected:d||l||s,isDateRangeLimit:l||s,"data-name":"pickers-day"})})}const Le=a.styled(a.Box,{shouldForwardProp:t=>!["variant"].includes(t)})(({variant:t,theme:e})=>({display:"flex",gap:t==="standard"?e.spacing(1):"1px","& .CartoDatePicker-root":{"&:first-of-type":{".MuiInputBase-root":{borderRadius:e.spacing(.5,0,0,.5),boxShadow:`1px 0 0 0 ${e.palette.default.outlinedBorder}`,...t==="outlined"&&{"&:not(:hover):not(.Mui-focused):not(.Mui-error) .MuiOutlinedInput-notchedOutline":{borderRightColor:"transparent"}},...t==="filled"&&{"&::before, &::after":{borderRadius:e.spacing(.5,0,0,.5)}},...t==="standard"&&{boxShadow:"none",borderRadius:0}}},"&:last-of-type":{".MuiInputBase-root":{borderRadius:e.spacing(0,.5,.5,0),...t==="outlined"&&{"&:not(:hover):not(.Mui-focused):not(.Mui-error) .MuiOutlinedInput-notchedOutline":{borderLeftColor:"transparent"}},...t==="filled"&&{"&::before, &::after":{borderRadius:e.spacing(0,.5,.5,0)}},...t==="standard"&&{borderRadius:0}}}}}));function Ee({globalHelperText:t,error:e,variant:o="outlined",startProps:i,endProps:r,"aria-label":l,"data-testid":s,...d}){const c=k.useIntl(),g=y.useImperativeIntl(c),[m,u]=h.useState(!1),[f,p]=h.useState(!1),[x,M]=h.useState((i==null?void 0:i.value)||null),[b,D]=h.useState((r==null?void 0:r.value)||null),[C,v]=h.useState((r==null?void 0:r.value)??(i==null?void 0:i.value)??new Date),j=e??(i==null?void 0:i.error)??(r==null?void 0:r.error),I=(B,R)=>{M(B),i!=null&&i.onChange&&i.onChange(B,R),B&&R.validationError===null&&!f&&R.trigger===null&&(p(!1),u(!0))},T=(B,R)=>{D(B),r!=null&&r.onChange&&r.onChange(B,R)},w=()=>{p(!0),u(!1),setTimeout(()=>{v(x??new Date)},120)},A=()=>{p(!1),u(!0),setTimeout(()=>{v(b??x??new Date)},120)},F=()=>{p(!1),u(!0),setTimeout(()=>{v(b??x??new Date)},120)};return n.jsxs(a.Box,{children:[n.jsxs(Le,{variant:o,"data-name":"date-range-picker","aria-label":l,"data-testid":s,children:[n.jsx(L,{...d,...i,value:(i==null?void 0:i.value)??x,maxDate:b??void 0,label:(i==null?void 0:i.label)??g.formatMessage({id:"c4r.form.startDate"}),slotProps:{popper:{placement:"bottom-start","aria-label":g.formatMessage({id:"c4r.form.startDateCalendar"})},...i==null?void 0:i.slotProps},slots:{openPickerIcon:S.TodayOutlined,day:B=>n.jsx(J,{...B,startDate:x,endDate:b,selectedMonth:C}),...i==null?void 0:i.slots},error:(i==null?void 0:i.error)??e,open:f,onChange:I,onOpen:w,onClose:A,onMonthChange:B=>v(B),variant:o}),n.jsx(L,{...d,...r,value:(r==null?void 0:r.value)??b,minDate:x??void 0,slotProps:{popper:{"aria-label":g.formatMessage({id:"c4r.form.endDateCalendar"})},...r==null?void 0:r.slotProps},slots:{day:B=>n.jsx(J,{...B,startDate:x,endDate:b,selectedMonth:C}),...r==null?void 0:r.slots},label:(r==null?void 0:r.label)??g.formatMessage({id:"c4r.form.endDate"}),error:(r==null?void 0:r.error)??e,open:m,onOpen:F,onClose:()=>u(!1),onChange:T,onMonthChange:B=>v(B),variant:o})]}),t&&n.jsx(a.FormHelperText,{error:j,children:t})]})}const ct=(t,e,o,i)=>{const r=t==null?void 0:t.includes("hours"),l=t==null?void 0:t.includes("seconds"),s=t==null?void 0:t.includes("minutes"),d=(t==null?void 0:t.length)===1&&t[0]==="hours";if(i)return i;const c=[];return e&&c.push("MM/dd/yyyy "),r&&c.push(o?"hh":"HH"),d||c.push(":"),s&&c.push("mm"),l&&c.push(":ss"),o&&c.push(" a"),c.join("")};function We({handleClear:t,variant:e="outlined",size:o="small",label:i,labelHelpTooltip:r,type:l,helperText:s,placeholder:d,error:c,showClock:g=!0,readOnly:m,slotProps:u,slots:f,ampm:p=!0,views:x=["hours","minutes"],format:M,"data-testid":b,"aria-label":D,...C}){const v=k.useIntl(),j=y.useImperativeIntl(v),I=h.useRef(null),[T,w]=h.useState(0);return h.useEffect(()=>{if(!I.current)return;const A=new ResizeObserver(F=>{var R;const B=(R=F[0])==null?void 0:R.contentRect.width;B&&w(B)});return A.observe(I.current),()=>{A.disconnect()}},[]),n.jsx(G,{size:o,variant:e,readOnly:m,"data-name":"time-picker","data-testid":b??"time-picker","aria-label":D,children:n.jsx(gt.TimePicker,{...C,ref:I,label:n.jsx(O,{label:i??j.formatMessage({id:"c4r.form.time"}),type:l,icon:r&&n.jsx(a.Tooltip,{title:r,children:n.jsx(S.HelpOutline,{htmlColor:"text.secondary"})})}),views:["hours"],format:ct(x,!1,p,M),slotProps:{textField:{variant:e,helperText:s,placeholder:d,size:o,error:c??void 0,inputProps:{"data-testid":"time-picker-input"}},field:{clearable:!!t,onClear:t},popper:{placement:"bottom-end"},layout:{sx:{width:T}},...u},slots:{clearButton:A=>n.jsx(q,{...A,size:o,variant:e}),openPickerButton:A=>n.jsx(a.IconButton,{...A,size:o,"aria-label":j.formatMessage({id:"c4r.form.chooseDate"})}),...f},disableOpenPicker:!g,readOnly:m,ampm:p})})}function He({handleClear:t,variant:e="outlined",size:o="small",label:i,labelHelpTooltip:r,type:l,helperText:s,placeholder:d,error:c,showCalendar:g=!0,readOnly:m,slotProps:u,slots:f,ampm:p=!0,views:x=["hours","minutes"],format:M,"data-testid":b,"aria-label":D,...C}){const v=k.useIntl(),j=y.useImperativeIntl(v);return n.jsx(G,{size:o,variant:e,readOnly:m,"data-name":"date-time-picker","data-testid":b??"date-time-picker","aria-label":D,children:n.jsx(xt.DateTimePicker,{...C,label:n.jsx(O,{label:i??j.formatMessage({id:"c4r.form.time"}),type:l,icon:r&&n.jsx(a.Tooltip,{title:r,children:n.jsx(S.HelpOutline,{htmlColor:"text.secondary"})})}),views:["year","month","day","hours"],format:ct(x,!0,p,M),slotProps:{textField:{variant:e,helperText:s,placeholder:d,size:o,error:c??void 0,inputProps:{"data-testid":"date-time-picker-input"}},field:{clearable:!!t,onClear:t},...u},slots:{clearButton:I=>n.jsx(q,{...I,size:o,variant:e}),openPickerButton:I=>n.jsx(a.IconButton,{...I,size:o,"aria-label":j.formatMessage({id:"c4r.form.chooseDate"})}),...f},disableOpenPicker:!g,readOnly:m,ampm:p})})}const _e=[{outlinedBullet:!1,value:""}],Pe=a.styled("ul")(({theme:t})=>({listStyle:"none",paddingLeft:0,margin:t.spacing(.5,0,0,0)})),Ne=a.styled("li")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between","&:not(:last-child)":{marginBottom:t.spacing(.5)}})),qe=a.styled("span")(({theme:t})=>({width:t.spacing(1),height:t.spacing(1),marginRight:t.spacing(.5),border:`2px solid ${t.palette.qualitative.bold[1]}`,borderRadius:"50%",backgroundColor:t.palette.qualitative.bold[1]})),Ge=a.styled(y.Typography)(({theme:t})=>({minWidth:t.spacing(10),marginRight:t.spacing(1.5)}));function Ve({items:t=_e,title:e}){return n.jsxs(n.Fragment,{children:[e&&n.jsx(y.Typography,{color:"inherit",variant:"caption",weight:"medium",children:e}),n.jsx(Pe,{children:t.map((o,i)=>n.jsxs(Ne,{children:[n.jsx(qe,{style:{backgroundColor:`${o.outlinedBullet?"transparent":o.color}`,borderColor:o.color}}),o.category&&n.jsx(Ge,{color:"inherit",variant:"caption",children:o.category}),n.jsx(y.Typography,{color:"inherit",variant:"caption",weight:"medium",children:o.value})]},i))})]})}const X={small:"480px",medium:"640px",large:"640px",xlarge:"720px"},E={small:{width:"432px",maxWidth:"432px"},medium:{width:"592px",maxWidth:"592px"},large:{width:"768px",maxWidth:"768px",minHeight:"576px"},xlarge:{width:"calc(100vw - 80px)",height:"calc(100vh - 80px)",maxWidth:"960px"}},W=a.styled(a.Paper,{shouldForwardProp:t=>!["fullScreen","height","width","hasForm"].includes(t)})(({fullScreen:t,height:e,width:o,hasForm:i,size:r="small",theme:l})=>({"&.MuiPaper-root":{position:"relative",display:"flex",flexDirection:"column",margin:l.spacing(5),borderRadius:l.spacing(1),...E[r],maxHeight:X[r],[`@media (max-height:${X[r]})`]:{maxHeight:"calc(100vh - 80px)",...r==="large"&&{minHeight:e!=="auto"?"calc(100vh - 80px)":"auto"}},...t&&{width:"100vw",maxWidth:`calc(100vw - ${l.spacing(10)})`,height:"100vh",maxHeight:`calc(100vh - ${l.spacing(10)})`,margin:l.spacing(5),borderRadius:l.spacing(1)},...e&&{height:e,minHeight:e},...o&&{width:o},[l.breakpoints.down("sm")]:{position:"absolute",width:"100%",maxWidth:"100%",height:"100vh",maxHeight:"100vh",top:0,bottom:0,left:0,right:0,margin:0,borderRadius:0,...e&&{top:"auto",borderRadius:l.spacing(1,1,0,0),height:e,minHeight:e}},...i&&{maxHeight:`calc(100vh - ${l.spacing(10)})`,form:{flex:1,display:"flex",flexDirection:"column",justifyContent:"space-between",overflow:"hidden",...E[r],maxWidth:"100%",...t&&{width:"100%",maxWidth:"100%",height:"100%",maxHeight:"100%"},...e&&{height:e,minHeight:e},...o&&{width:o},[l.breakpoints.down("sm")]:{width:"100%",maxWidth:"100%",height:"100vh",maxHeight:"100vh",...e&&{top:"auto",borderRadius:l.spacing(1,1,0,0),height:e,minHeight:e}}}}}}));function Ue({nonModal:t,children:e,size:o="small",PaperProps:i,fullScreen:r,height:l,width:s,hasForm:d,"aria-label":c,"data-testid":g,...m},u){return t?n.jsx(W,{size:o,fullScreen:r,height:l,width:s,hasForm:d,"aria-label":c,"data-testid":g,"data-name":"dialog",...m,ref:u,children:e}):n.jsx(a.Dialog,{PaperComponent:W,PaperProps:{...i,size:o,fullScreen:r,height:l,width:s,hasForm:d},fullScreen:r,role:"section","aria-label":c,"data-testid":g,"data-size":o,"data-width":s,"data-height":l,"data-name":"dialog",...m,ref:u,children:e})}const ze=h.forwardRef(Ue),Ye=a.styled(a.DialogTitle)(()=>({padding:0,zIndex:10})),Ze=a.styled(a.Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"space-between",padding:t.spacing(2),minHeight:t.spacing(8)})),K=a.styled(a.Box)(({theme:t})=>({display:"flex",alignItems:"center",gap:t.spacing(1),overflow:"hidden"})),Je=a.styled(S.CloseOutlined)(({theme:t})=>({color:t.palette.text.secondary})),Xe=a.styled(a.Divider)(()=>({"+ .MuiDialogContent-root":{borderTop:"none !important"}}));function Ke({title:t,chipLabel:e,chipProps:o,children:i,onClose:r,secondaryActions:l,"aria-label":s,closeIcon:d,...c}){const g=k.useIntl(),m=y.useImperativeIntl(g);return n.jsxs(n.Fragment,{children:[n.jsxs(Ye,{component:"div","data-name":"dialog-header",...c,children:[n.jsxs(Ze,{children:[n.jsxs(K,{flex:1,maxWidth:.8,children:[n.jsx(y.Typography,{component:"h2",variant:"inherit",noWrap:!0,"aria-label":s,role:"heading",children:t}),e&&n.jsx(a.Chip,{color:"default",label:e,...o})]}),n.jsxs(K,{children:[l,r&&n.jsx(a.Tooltip,{title:m.formatMessage({id:"c4r.button.close"}),placement:"left",children:n.jsx(a.IconButton,{onClick:r,children:d||n.jsx(Je,{"data-testid":"CloseIcon"})})})]})]}),i]}),i&&n.jsx(Xe,{})]})}const Qe=a.styled(a.DialogContent,{shouldForwardProp:t=>!["scrollableContent","withGutter","withBottomGutter"].includes(t)})(({theme:t,scrollableContent:e,withGutter:o,withBottomGutter:i})=>({display:"flex",flexDirection:"column",gap:t.spacing(3),padding:0,...t.typography.body2,color:t.palette.text.secondary,".MuiAlert-root":{minHeight:"auto"},...e&&{borderBottom:`1px solid ${t.palette.divider}`,"+ .MuiDivider-root":{display:"none"}},...o&&{padding:` ${t.spacing(1,2,0)} !important`,".MuiDialog-paperFullScreen &":{padding:`${t.spacing(2,2,0)} !important`}},...i&&{paddingBottom:`${t.spacing(3)} !important`,".MuiDialog-paperFullScreen &":{paddingBottom:`${t.spacing(3)} !important`}}}));function tn({children:t,scrollableContent:e,hasFooterAlert:o,withGutter:i=!0,withBottomGutter:r=!0,onScroll:l,...s},d){const c=a.useTheme(),[g,m]=h.useState(null);h.useImperativeHandle(d,()=>g,[g]);const u=h.useCallback(p=>{const x=Math.abs(p.scrollHeight-p.clientHeight-p.scrollTop)<1,M=p.scrollTop===0,b=`1px solid ${c.palette.divider}`;p.style.borderTop=M?"none":b,p.style.borderBottom=x&&!o?"none":b},[c.palette.divider,o]),f=h.useCallback(p=>{u(p.target),l==null||l(p)},[u,l]);return h.useEffect(()=>{g&&u(g)},[g,u]),h.useEffect(()=>{if(!g||typeof ResizeObserver>"u")return;const p=new ResizeObserver(()=>{u(g)});return p.observe(g),()=>p.disconnect()},[g,u]),n.jsx(Qe,{ref:m,onScroll:f,scrollableContent:e,withGutter:i,withBottomGutter:r&&i,"data-name":"dialog-content",...s,children:t})}const dt=h.forwardRef(tn),en=a.styled(dt,{shouldForwardProp:t=>t!=="withAlert"})(({withAlert:t,theme:e})=>({padding:`${e.spacing(0,2)} !important`,...t&&{paddingBottom:`${e.spacing(3)} !important`}})),nn=a.styled(H.Alert)(({theme:t})=>({minHeight:"auto",padding:0,backgroundColor:"transparent","& .MuiTypography-root":{color:t.palette.text.secondary,a:{color:t.palette.primary.main}},"& .MuiAlertTitle-root":{color:t.palette.text.primary}}));function V({children:t,severity:e="neutral",...o}){return n.jsx(nn,{severity:e,...o,"data-name":"dialog-alert",children:t})}const on=a.styled(a.Box,{shouldForwardProp:t=>!["dark","hasChildren"].includes(t)})(({dark:t,hasChildren:e,theme:o})=>({flex:"0 0 auto",display:"block",minHeight:e?o.spacing(8):"auto",zIndex:10,...t&&{backgroundColor:o.palette.common.black,color:o.palette.white[60],".MuiAlert-root":{".MuiTypography-root, .MuiAlert-message :not(.MuiAlertTitle-root)":{color:o.palette.white[60],a:{color:`${o.palette.secondary.main} !important`}},".MuiAlert-icon":{color:o.palette.white[60]}}}})),an=a.styled(a.Box)(()=>({display:"flex",alignItems:"center",justifyContent:"space-between","& > div:empty":{padding:0}})),rn=a.styled(a.Box,{shouldForwardProp:t=>t!=="hasAlert"})(({hasAlert:t,theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),padding:e.spacing(2),paddingTop:t?0:e.spacing(2)})),U=a.styled(a.DialogActions,{shouldForwardProp:t=>t!=="hasAlert"})(({hasAlert:t,theme:e})=>({gap:e.spacing(1),padding:e.spacing(2),paddingTop:t?0:e.spacing(2),margin:0,".MuiButton-root + .MuiButton-root":{marginLeft:0}})),ln=a.styled(a.Divider)(()=>({marginTop:"-1px"}));function sn({children:t,secondaryActions:e,alertContent:o,alertProps:i,dark:r,topContent:l,...s}){return n.jsxs(n.Fragment,{children:[l,!!o&&n.jsx(ln,{}),n.jsxs(on,{...s,dark:r,"data-theme":r?"dark":"light","data-name":"dialog-footer",hasChildren:!!t,children:[!!o&&n.jsx(a.Box,{sx:{p:2,pt:1.5,pb:1},children:n.jsx(V,{...i,children:o})}),n.jsxs(an,{children:[n.jsx(rn,{hasAlert:!!o,children:e}),n.jsx(U,{hasAlert:!!o,children:t})]})]})]})}const cn=a.styled(a.Box)(({theme:t})=>({position:"absolute",width:"100%",zIndex:100,top:0,bottom:0,left:0,right:0,overflow:"hidden",display:"flex",boxSizing:"border-box",alignItems:"flex-end",background:t.palette.white[60]})),dn=a.styled("div")(()=>({width:"100%"})),un=a.styled(a.Box)(({theme:t})=>({width:"100%",padding:t.spacing(1.5,2,2),backgroundColor:t.palette.background.paper,borderTop:`1px solid ${t.palette.divider}`,".MuiDialogActions-root":{padding:0,marginTop:t.spacing(1)}}));function pn({children:t,onClickAway:e,actions:o,severity:i="warning",opened:r,"data-testid":l,"aria-label":s,...d}){const c=h.useRef(null),g=a.useTheme(),m=()=>{e&&e()};return n.jsx(cn,{ref:c,"data-testid":l,"aria-label":s,role:"presentation","data-name":"dialog-confirmation",children:n.jsx(ft,{onClickAway:m,children:n.jsx(a.Slide,{direction:"up",in:r,container:c.current,mountOnEnter:!0,unmountOnExit:!0,easing:g.transitions.easing.easeOut,timeout:350,children:n.jsx(dn,{children:n.jsxs(un,{children:[n.jsx(V,{severity:i,...d,children:t}),n.jsx(U,{children:o})]})})})})})}const gn=a.styled(a.Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",height:t.spacing(8),marginBottom:t.spacing(2),"& > div":{flex:1}})),xn=a.styled(a.Box)(({theme:t})=>({display:"flex",flex:1,flexDirection:"column",justifyContent:"center",alignItems:"center",position:"relative","&:before, &:after":{content:'""',background:t.palette.divider,position:"absolute",top:t.spacing(1.25),height:t.spacing(.25),width:`calc(50% - ${t.spacing(2.5)})`},"&:before":{left:0},"&:after":{right:0},"&:first-of-type:before":{content:"none"},"&:last-of-type:after":{content:"none"}}));function fn({theme:t,completed:e,current:o}){return e?{background:t.palette.success.main,borderColor:t.palette.success.main,color:t.palette.common.white}:o?{background:t.palette.text.primary,borderColor:t.palette.text.primary,color:t.palette.common.white}:{borderColor:t.palette.text.secondary,color:t.palette.text.secondary}}const mn=a.styled("span",{shouldForwardProp:t=>t!=="completed"&&t!=="current"})(({theme:t,completed:e,current:o})=>({display:"flex",justifyContent:"center",alignItems:"center",height:t.spacing(3),width:t.spacing(3),marginBottom:t.spacing(1),borderRadius:"50%",border:`${t.spacing(.25)} solid currentColor`,...t.typography.caption,...fn({theme:t,completed:e,current:o})}));function hn({currentStep:t,stepsLabels:e,...o}){return n.jsx(gn,{...o,"data-name":"dialog-stepper",children:n.jsx(a.Box,{sx:{display:"flex"},children:e.map((i,r)=>{const l=r+1,s=l===t,d=l<t,c=d?"success.main":s?"textPrimary":"textSecondary";return n.jsxs(xn,{"data-state":d?"completed":s?"current":"uncompleted",children:[n.jsx(mn,{completed:d,current:s,children:d?n.jsx(S.Check,{fontSize:"small","aria-label":"Completed step"}):l}),n.jsx(y.Typography,{variant:"caption",component:"div",color:c,children:i})]},r)})})})}exports.TablePaginationActions=y.TablePaginationActions;exports.Typography=y.Typography;exports.Alert=H.Alert;exports.MenuItem=_.MenuItem;exports.AccordionGroup=de;exports.AppBar=we;exports.Autocomplete=ne;exports.Avatar=pe;exports.Button=yt;exports.CreatableAutocomplete=re;exports.DatePicker=L;exports.DateRangePicker=Ee;exports.DateTimePicker=He;exports.Dialog=ze;exports.DialogActions=U;exports.DialogAlert=V;exports.DialogConfirmation=pn;exports.DialogContent=dt;exports.DialogContentPadded=en;exports.DialogFooter=sn;exports.DialogHeader=Ke;exports.DialogPaper=W;exports.DialogStepper=hn;exports.IconButton=tt;exports.LabelWithIndicator=O;exports.Menu=Lt;exports.MenuItemFilter=N;exports.MenuList=Ht;exports.MultipleAutocomplete=se;exports.MultipleSelectField=Zt;exports.PasswordField=vt;exports.SelectField=Q;exports.Snackbar=he;exports.TimePicker=We;exports.ToggleButtonGroup=kt;exports.TooltipData=Ve;exports.UploadField=te;exports.UploadFieldBase=et;exports.dialogDimensionsBySize=E;
|