identity-admin-ui 1.8.0 → 1.8.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/lib/cjs/index.js +2 -2
- package/lib/esm/index.js +2 -2
- package/package.json +1 -1
package/lib/cjs/index.js
CHANGED
|
@@ -119,9 +119,9 @@ function Wt(e,t){const n=i(e,t);return"production"!==process.env.NODE_ENV?(...t)
|
|
|
119
119
|
animation-iteration-count: infinite;
|
|
120
120
|
animation-delay: 200ms;
|
|
121
121
|
}
|
|
122
|
-
`),np.rippleVisible,cp,550,(({theme:e})=>e.transitions.easing.easeInOut),np.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),np.child,np.childLeaving,up,550,(({theme:e})=>e.transitions.easing.easeInOut),np.childPulsate,dp,(({theme:e})=>e.transitions.easing.easeInOut)),mp=N.forwardRef((function(e,t){const n=co({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:o={},className:a}=n,i=It(n,rp),[s,l]=N.useState([]),c=N.useRef(0),u=N.useRef(null);N.useEffect((()=>{u.current&&(u.current(),u.current=null)}),[s]);const d=N.useRef(!1),p=N.useRef(0),f=N.useRef(null),m=N.useRef(null);N.useEffect((()=>()=>{p.current&&clearTimeout(p.current)}),[]);const h=N.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:a,cb:i}=e;l((e=>[...e,Y.jsx(fp,{classes:{ripple:Kn(o.ripple,np.ripple),rippleVisible:Kn(o.rippleVisible,np.rippleVisible),ripplePulsate:Kn(o.ripplePulsate,np.ripplePulsate),child:Kn(o.child,np.child),childLeaving:Kn(o.childLeaving,np.childLeaving),childPulsate:Kn(o.childPulsate,np.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:a},c.current)])),c.current+=1,u.current=i}),[o]),g=N.useCallback(((e={},t={},n=(()=>{}))=>{const{pulsate:o=!1,center:a=r||t.pulsate,fakeElement:i=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&d.current)return void(d.current=!1);"touchstart"===(null==e?void 0:e.type)&&(d.current=!0);const s=i?null:m.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,g;if(a||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(a)g=Math.sqrt((2*l.width**2+l.height**2)/3),g%2==0&&(g+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;g=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===f.current&&(f.current=()=>{h({pulsate:o,rippleX:c,rippleY:u,rippleSize:g,cb:n})},p.current=setTimeout((()=>{f.current&&(f.current(),f.current=null)}),80)):h({pulsate:o,rippleX:c,rippleY:u,rippleSize:g,cb:n})}),[r,h]),v=N.useCallback((()=>{g({},{pulsate:!0})}),[g]),A=N.useCallback(((e,t)=>{if(clearTimeout(p.current),"touchend"===(null==e?void 0:e.type)&&f.current)return f.current(),f.current=null,void(p.current=setTimeout((()=>{A(e,t)})));f.current=null,l((e=>e.length>0?e.slice(1):e)),u.current=t}),[]);return N.useImperativeHandle(t,(()=>({pulsate:v,start:g,stop:A})),[v,g,A]),Y.jsx(pp,te({className:Kn(np.root,o.root,a),ref:m},i,{children:Y.jsx(da,{component:null,exit:!0,children:s})}))}));"production"!==process.env.NODE_ENV&&(mp.propTypes={center:De.bool,classes:De.object,className:De.string});var hp=mp;function gp(e){return kt("MuiButtonBase",e)}var vp=Et("MuiButtonBase",["root","disabled","focusVisible"]);const Ap=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],bp=fo("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${vp.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),yp=N.forwardRef((function(e,t){const n=co({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:o=!1,children:a,className:i,component:s="button",disabled:l=!1,disableRipple:c=!1,disableTouchRipple:u=!1,focusRipple:d=!1,LinkComponent:p="a",onBlur:f,onClick:m,onContextMenu:h,onDragLeave:g,onFocus:v,onFocusVisible:A,onKeyDown:b,onKeyUp:y,onMouseDown:x,onMouseLeave:w,onMouseUp:z,onTouchEnd:O,onTouchMove:C,onTouchStart:j,tabIndex:P=0,TouchRippleProps:B,touchRippleRef:D,type:M}=n,T=It(n,Ap),k=N.useRef(null),E=N.useRef(null),L=lt(E,D),{isFocusVisibleRef:W,onFocus:I,onBlur:S,ref:H}=vt(),[V,X]=N.useState(!1);l&&V&&X(!1),N.useImperativeHandle(r,(()=>({focusVisible:()=>{X(!0),k.current.focus()}})),[]);const[R,Q]=N.useState(!1);N.useEffect((()=>{Q(!0)}),[]);const F=R&&!c&&!l;function G(e,t,n=u){return st((r=>{t&&t(r);return!n&&E.current&&E.current[e](r),!0}))}N.useEffect((()=>{V&&d&&!c&&R&&E.current.pulsate()}),[c,d,V,R]);const Z=G("start",x),q=G("stop",h),U=G("stop",g),K=G("stop",z),J=G("stop",(e=>{V&&e.preventDefault(),w&&w(e)})),_=G("start",j),$=G("stop",O),ee=G("stop",C),ne=G("stop",(e=>{S(e),!1===W.current&&X(!1),f&&f(e)}),!1),re=st((e=>{k.current||(k.current=e.currentTarget),I(e),!0===W.current&&(X(!0),A&&A(e)),v&&v(e)})),oe=()=>{const e=k.current;return s&&"button"!==s&&!("A"===e.tagName&&e.href)},ae=N.useRef(!1),ie=st((e=>{d&&!ae.current&&V&&E.current&&" "===e.key&&(ae.current=!0,E.current.stop(e,(()=>{E.current.start(e)}))),e.target===e.currentTarget&&oe()&&" "===e.key&&e.preventDefault(),b&&b(e),e.target===e.currentTarget&&oe()&&"Enter"===e.key&&!l&&(e.preventDefault(),m&&m(e))})),se=st((e=>{d&&" "===e.key&&E.current&&V&&!e.defaultPrevented&&(ae.current=!1,E.current.stop(e,(()=>{E.current.pulsate(e)}))),y&&y(e),m&&e.target===e.currentTarget&&oe()&&" "===e.key&&!e.defaultPrevented&&m(e)}));let le=s;"button"===le&&(T.href||T.to)&&(le=p);const ce={};"button"===le?(ce.type=void 0===M?"button":M,ce.disabled=l):(T.href||T.to||(ce.role="button"),l&&(ce["aria-disabled"]=l));const ue=lt(t,H,k);"production"!==process.env.NODE_ENV&&N.useEffect((()=>{F&&!E.current&&console.error(["MUI: The `component` prop provided to ButtonBase is invalid.","Please make sure the children prop is rendered in this custom component."].join("\n"))}),[F]);const de=te({},n,{centerRipple:o,component:s,disabled:l,disableRipple:c,disableTouchRipple:u,focusRipple:d,tabIndex:P,focusVisible:V}),pe=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,a=Dt({root:["root",t&&"disabled",n&&"focusVisible"]},gp,o);return n&&r&&(a.root+=` ${r}`),a})(de);return Y.jsxs(bp,te({as:le,className:Kn(pe.root,i),ownerState:de,onBlur:ne,onClick:m,onContextMenu:q,onFocus:re,onKeyDown:ie,onKeyUp:se,onMouseDown:Z,onMouseLeave:J,onMouseUp:K,onDragLeave:U,onTouchEnd:$,onTouchMove:ee,onTouchStart:_,ref:ue,tabIndex:l?-1:P,type:M},ce,T,{children:[a,F?Y.jsx(hp,te({ref:L,center:o},B)):null]}))}));"production"!==process.env.NODE_ENV&&(yp.propTypes={action:Ge,centerRipple:De.bool,children:De.node,classes:De.object,className:De.string,component:ke,disabled:De.bool,disableRipple:De.bool,disableTouchRipple:De.bool,focusRipple:De.bool,focusVisibleClassName:De.string,href:De.any,LinkComponent:De.elementType,onBlur:De.func,onClick:De.func,onContextMenu:De.func,onDragLeave:De.func,onFocus:De.func,onFocusVisible:De.func,onKeyDown:De.func,onKeyUp:De.func,onMouseDown:De.func,onMouseLeave:De.func,onMouseUp:De.func,onTouchEnd:De.func,onTouchMove:De.func,onTouchStart:De.func,sx:De.oneOfType([De.arrayOf(De.oneOfType([De.func,De.object,De.bool])),De.func,De.object]),tabIndex:De.number,TouchRippleProps:De.object,touchRippleRef:De.oneOfType([De.func,De.shape({current:De.shape({pulsate:De.func.isRequired,start:De.func.isRequired,stop:De.func.isRequired})})]),type:De.oneOfType([De.oneOf(["button","reset","submit"]),De.string])});var xp=yp;function wp(e){return kt("MuiIconButton",e)}var zp=Et("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]);const Op=["edge","children","className","color","disabled","disableFocusRipple","size"],Cp=fo(xp,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${Ze(n.color)}`],n.edge&&t[`edge${Ze(n.edge)}`],t[`size${Ze(n.size)}`]]}})((({theme:e,ownerState:t})=>te({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:gr(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})),(({theme:e,ownerState:t})=>{var n;const r=null==(n=(e.vars||e).palette)?void 0:n[t.color];return te({},"inherit"===t.color&&{color:"inherit"},"inherit"!==t.color&&"default"!==t.color&&te({color:null==r?void 0:r.main},!t.disableRipple&&{"&:hover":te({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:gr(r.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===t.size&&{padding:5,fontSize:e.typography.pxToRem(18)},"large"===t.size&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${zp.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})})),jp=N.forwardRef((function(e,t){const n=co({props:e,name:"MuiIconButton"}),{edge:r=!1,children:o,className:a,color:i="default",disabled:s=!1,disableFocusRipple:l=!1,size:c="medium"}=n,u=It(n,Op),d=te({},n,{edge:r,color:i,disabled:s,disableFocusRipple:l,size:c}),p=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:a}=e;return Dt({root:["root",n&&"disabled","default"!==r&&`color${Ze(r)}`,o&&`edge${Ze(o)}`,`size${Ze(a)}`]},wp,t)})(d);return Y.jsx(Cp,te({className:Kn(p.root,a),centerRipple:!0,focusRipple:!l,disabled:s,ref:t,ownerState:d},u,{children:o}))}));"production"!==process.env.NODE_ENV&&(jp.propTypes={children:ee(De.node,(e=>N.Children.toArray(e.children).some((e=>N.isValidElement(e)&&e.props.onClick))?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join("\n")):null)),classes:De.object,className:De.string,color:De.oneOfType([De.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),De.string]),disabled:De.bool,disableFocusRipple:De.bool,disableRipple:De.bool,edge:De.oneOf(["end","start",!1]),size:De.oneOfType([De.oneOf(["small","medium","large"]),De.string]),sx:De.oneOfType([De.arrayOf(De.oneOfType([De.func,De.object,De.bool])),De.func,De.object])});var Pp=jp,Bp=Ea(Y.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function Dp(e){return kt("MuiChip",e)}var Mp=Et("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]);const Tp=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],Np=fo("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:a,onDelete:i,size:s,variant:l}=n;return[{[`& .${Mp.avatar}`]:t.avatar},{[`& .${Mp.avatar}`]:t[`avatar${Ze(s)}`]},{[`& .${Mp.avatar}`]:t[`avatarColor${Ze(r)}`]},{[`& .${Mp.icon}`]:t.icon},{[`& .${Mp.icon}`]:t[`icon${Ze(s)}`]},{[`& .${Mp.icon}`]:t[`iconColor${Ze(o)}`]},{[`& .${Mp.deleteIcon}`]:t.deleteIcon},{[`& .${Mp.deleteIcon}`]:t[`deleteIcon${Ze(s)}`]},{[`& .${Mp.deleteIcon}`]:t[`deleteIconColor${Ze(r)}`]},{[`& .${Mp.deleteIcon}`]:t[`deleteIcon${Ze(l)}Color${Ze(r)}`]},t.root,t[`size${Ze(s)}`],t[`color${Ze(r)}`],a&&t.clickable,a&&"default"!==r&&t[`clickableColor${Ze(r)})`],i&&t.deletable,i&&"default"!==r&&t[`deletableColor${Ze(r)}`],t[l],t[`${l}${Ze(r)}`]]}})((({theme:e,ownerState:t})=>{const n="light"===e.palette.mode?e.palette.grey[700]:e.palette.grey[300];return te({maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${Mp.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Mp.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:n,fontSize:e.typography.pxToRem(12)},[`& .${Mp.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Mp.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Mp.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Mp.icon}`]:te({marginLeft:5,marginRight:-6},"small"===t.size&&{fontSize:18,marginLeft:4,marginRight:-4},t.iconColor===t.color&&te({color:e.vars?e.vars.palette.Chip.defaultIconColor:n},"default"!==t.color&&{color:"inherit"})),[`& .${Mp.deleteIcon}`]:te({WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:gr(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:gr(e.palette.text.primary,.4)}},"small"===t.size&&{fontSize:16,marginRight:4,marginLeft:-4},"default"!==t.color&&{color:e.vars?`rgba(${e.vars.palette[t.color].contrastTextChannel} / 0.7)`:gr(e.palette[t.color].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].contrastText}})},"small"===t.size&&{height:24},"default"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].main,color:(e.vars||e).palette[t.color].contrastText},t.onDelete&&{[`&.${Mp.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:gr(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},t.onDelete&&"default"!==t.color&&{[`&.${Mp.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})}),(({theme:e,ownerState:t})=>te({},t.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:gr(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${Mp.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:gr(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}},t.clickable&&"default"!==t.color&&{[`&:hover, &.${Mp.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})),(({theme:e,ownerState:t})=>te({},"outlined"===t.variant&&{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${"light"===e.palette.mode?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Mp.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Mp.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Mp.avatar}`]:{marginLeft:4},[`& .${Mp.avatarSmall}`]:{marginLeft:2},[`& .${Mp.icon}`]:{marginLeft:4},[`& .${Mp.iconSmall}`]:{marginLeft:2},[`& .${Mp.deleteIcon}`]:{marginRight:5},[`& .${Mp.deleteIconSmall}`]:{marginRight:3}},"outlined"===t.variant&&"default"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:gr(e.palette[t.color].main,.7)}`,[`&.${Mp.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:gr(e.palette[t.color].main,e.palette.action.hoverOpacity)},[`&.${Mp.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:gr(e.palette[t.color].main,e.palette.action.focusOpacity)},[`& .${Mp.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:gr(e.palette[t.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].main}}}))),kp=fo("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${Ze(r)}`]]}})((({ownerState:e})=>te({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},"small"===e.size&&{paddingLeft:8,paddingRight:8})));function Ep(e){return"Backspace"===e.key||"Delete"===e.key}const Lp=N.forwardRef((function(e,t){const n=co({props:e,name:"MuiChip"}),{avatar:r,className:o,clickable:a,color:i="default",component:s,deleteIcon:l,disabled:c=!1,icon:u,label:d,onClick:p,onDelete:f,onKeyDown:m,onKeyUp:h,size:g="medium",variant:v="filled",tabIndex:A,skipFocusWhenDisabled:b=!1}=n,y=It(n,Tp),x=N.useRef(null),w=lt(x,t),z=e=>{e.stopPropagation(),f&&f(e)},O=!(!1===a||!p)||a,C=O||f?xp:s||"div",j=te({},n,{component:C,disabled:c,size:g,color:i,iconColor:N.isValidElement(u)&&u.props.color||i,onDelete:!!f,clickable:O,variant:v}),P=(e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:a,onDelete:i,clickable:s,variant:l}=e;return Dt({root:["root",l,n&&"disabled",`size${Ze(r)}`,`color${Ze(o)}`,s&&"clickable",s&&`clickableColor${Ze(o)}`,i&&"deletable",i&&`deletableColor${Ze(o)}`,`${l}${Ze(o)}`],label:["label",`label${Ze(r)}`],avatar:["avatar",`avatar${Ze(r)}`,`avatarColor${Ze(o)}`],icon:["icon",`icon${Ze(r)}`,`iconColor${Ze(a)}`],deleteIcon:["deleteIcon",`deleteIcon${Ze(r)}`,`deleteIconColor${Ze(o)}`,`deleteIcon${Ze(l)}Color${Ze(o)}`]},Dp,t)})(j),B=C===xp?te({component:s||"div",focusVisibleClassName:P.focusVisible},f&&{disableRipple:!0}):{};let D=null;f&&(D=l&&N.isValidElement(l)?N.cloneElement(l,{className:Kn(l.props.className,P.deleteIcon),onClick:z}):Y.jsx(Bp,{className:Kn(P.deleteIcon),onClick:z}));let M=null;r&&N.isValidElement(r)&&(M=N.cloneElement(r,{className:Kn(P.avatar,r.props.className)}));let T=null;return u&&N.isValidElement(u)&&(T=N.cloneElement(u,{className:Kn(P.icon,u.props.className)})),"production"!==process.env.NODE_ENV&&M&&T&&console.error("MUI: The Chip component can not handle the avatar and the icon prop at the same time. Pick one."),Y.jsxs(Np,te({as:C,className:Kn(P.root,o),disabled:!(!O||!c)||void 0,onClick:p,onKeyDown:e=>{e.currentTarget===e.target&&Ep(e)&&e.preventDefault(),m&&m(e)},onKeyUp:e=>{e.currentTarget===e.target&&(f&&Ep(e)?f(e):"Escape"===e.key&&x.current&&x.current.blur()),h&&h(e)},ref:w,tabIndex:b&&c?-1:A,ownerState:j},B,y,{children:[M||T,Y.jsx(kp,{className:Kn(P.label),ownerState:j,children:d}),D]}))}));"production"!==process.env.NODE_ENV&&(Lp.propTypes={avatar:De.element,children:at,classes:De.object,className:De.string,clickable:De.bool,color:De.oneOfType([De.oneOf(["default","primary","secondary","error","info","success","warning"]),De.string]),component:De.elementType,deleteIcon:De.element,disabled:De.bool,icon:De.element,label:De.node,onClick:De.func,onDelete:De.func,onKeyDown:De.func,onKeyUp:De.func,size:De.oneOfType([De.oneOf(["medium","small"]),De.string]),skipFocusWhenDisabled:De.bool,sx:De.oneOfType([De.arrayOf(De.oneOfType([De.func,De.object,De.bool])),De.func,De.object]),tabIndex:De.number,variant:De.oneOfType([De.oneOf(["filled","outlined"]),De.string])});var Wp=Lp,Ip=Ea(Y.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");function Sp(e){return kt("MuiAutocomplete",e)}var Hp,Vp,Xp=Et("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);const Rp=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],Yp=["ref"],Qp=fo("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:a,inputFocused:i,size:s}=n;return[{[`& .${Xp.tag}`]:t.tag},{[`& .${Xp.tag}`]:t[`tagSize${Ze(s)}`]},{[`& .${Xp.inputRoot}`]:t.inputRoot},{[`& .${Xp.input}`]:t.input},{[`& .${Xp.input}`]:i&&t.inputFocused},t.root,r&&t.fullWidth,a&&t.hasPopupIcon,o&&t.hasClearIcon]}})((({ownerState:e})=>te({[`&.${Xp.focused} .${Xp.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${Xp.clearIndicator}`]:{visibility:"visible"}}},e.fullWidth&&{width:"100%"},{[`& .${Xp.tag}`]:te({margin:3,maxWidth:"calc(100% - 6px)"},"small"===e.size&&{margin:2,maxWidth:"calc(100% - 4px)"}),[`& .${Xp.inputRoot}`]:{flexWrap:"wrap",[`.${Xp.hasPopupIcon}&, .${Xp.hasClearIcon}&`]:{paddingRight:30},[`.${Xp.hasPopupIcon}.${Xp.hasClearIcon}&`]:{paddingRight:56},[`& .${Xp.input}`]:{width:0,minWidth:30}},[`& .${bc.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${bc.root}.${cc.sizeSmall}`]:{[`& .${bc.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Sc.root}`]:{padding:9,[`.${Xp.hasPopupIcon}&, .${Xp.hasClearIcon}&`]:{paddingRight:39},[`.${Xp.hasPopupIcon}.${Xp.hasClearIcon}&`]:{paddingRight:65},[`& .${Xp.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${Xp.endAdornment}`]:{right:9}},[`& .${Sc.root}.${cc.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${Xp.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${jc.root}`]:{paddingTop:19,paddingLeft:8,[`.${Xp.hasPopupIcon}&, .${Xp.hasClearIcon}&`]:{paddingRight:39},[`.${Xp.hasPopupIcon}.${Xp.hasClearIcon}&`]:{paddingRight:65},[`& .${jc.input}`]:{padding:"7px 4px"},[`& .${Xp.endAdornment}`]:{right:9}},[`& .${jc.root}.${cc.sizeSmall}`]:{paddingBottom:1,[`& .${jc.input}`]:{padding:"2.5px 4px"}},[`& .${cc.hiddenLabel}`]:{paddingTop:8},[`& .${jc.root}.${cc.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${Xp.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${jc.root}.${cc.hiddenLabel}.${cc.sizeSmall}`]:{[`& .${Xp.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${Xp.input}`]:te({flexGrow:1,textOverflow:"ellipsis",opacity:0},e.inputFocused&&{opacity:1})}))),Fp=fo("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"calc(50% - 14px)"}),Gp=fo(Pp,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),Zp=fo(Pp,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:e},t)=>te({},t.popupIndicator,e.popupOpen&&t.popupIndicatorOpen)})((({ownerState:e})=>te({padding:2,marginRight:-2},e.popupOpen&&{transform:"rotate(180deg)"}))),qp=fo(Ud,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Xp.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})((({theme:e,ownerState:t})=>te({zIndex:(e.vars||e).zIndex.modal},t.disablePortal&&{position:"absolute"}))),Up=fo(Za,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})((({theme:e})=>te({},e.typography.body1,{overflow:"auto"}))),Kp=fo("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})((({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),Jp=fo("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})((({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),_p=fo("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})((({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${Xp.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${Xp.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${Xp.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:gr(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Xp.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:gr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${Xp.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:gr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}}))),$p=fo(ep,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})((({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),ef=fo("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${Xp.option}`]:{paddingLeft:24}}),tf=N.forwardRef((function(e,t){var n,r,o,a;const i=co({props:e,name:"MuiAutocomplete"}),{autoComplete:s=!1,autoHighlight:l=!1,autoSelect:c=!1,blurOnSelect:u=!1,ChipProps:d,className:p,clearIcon:f=Hp||(Hp=Y.jsx(Ip,{fontSize:"small"})),clearOnBlur:m=!i.freeSolo,clearOnEscape:h=!1,clearText:g="Clear",closeText:v="Close",componentsProps:A={},defaultValue:b=(i.multiple?[]:null),disableClearable:y=!1,disableCloseOnSelect:x=!1,disabled:w=!1,disabledItemsFocusable:z=!1,disableListWrap:O=!1,disablePortal:C=!1,filterSelectedOptions:j=!1,forcePopupIcon:P="auto",freeSolo:B=!1,fullWidth:D=!1,getLimitTagsText:M=(e=>`+${e}`),getOptionLabel:T,groupBy:k,handleHomeEndKeys:E=!i.freeSolo,includeInputInList:L=!1,limitTags:W=-1,ListboxComponent:I="ul",ListboxProps:S,loading:H=!1,loadingText:V="Loading…",multiple:X=!1,noOptionsText:R="No options",openOnFocus:Q=!1,openText:F="Open",PaperComponent:G=Za,PopperComponent:Z=Ud,popupIcon:q=Vp||(Vp=Y.jsx(Nd,{})),readOnly:U=!1,renderGroup:K,renderInput:J,renderOption:_,renderTags:$,selectOnFocus:ee=!i.freeSolo,size:ne="medium",slotProps:re={}}=i,oe=It(i,Rp),{getRootProps:ae,getInputProps:ie,getInputLabelProps:se,getPopupIndicatorProps:le,getClearProps:ce,getTagProps:ue,getListboxProps:de,getOptionProps:pe,value:fe,dirty:me,expanded:he,id:ge,popupOpen:ve,focused:Ae,focusedTag:be,anchorEl:ye,setAnchorEl:xe,inputValue:we,groupedOptions:ze}=ec(te({},i,{componentName:"Autocomplete"})),Oe=!y&&!w&&me&&!U,Ce=(!B||!0===P)&&!1!==P,{onMouseDown:je}=ie(),{ref:Pe}=null!=S?S:{},Be=de(),{ref:De}=Be,Me=It(Be,Yp),Te=lt(De,Pe),Ne=T||(e=>{var t;return null!=(t=e.label)?t:e}),ke=te({},i,{disablePortal:C,expanded:he,focused:Ae,fullWidth:D,getOptionLabel:Ne,hasClearIcon:Oe,hasPopupIcon:Ce,inputFocused:-1===be,popupOpen:ve,size:ne}),Ee=(e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:a,hasClearIcon:i,hasPopupIcon:s,inputFocused:l,popupOpen:c,size:u}=e;return Dt({root:["root",r&&"expanded",o&&"focused",a&&"fullWidth",i&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${Ze(u)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",c&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]},Sp,t)})(ke);let Le;if(X&&fe.length>0){const e=e=>te({className:Ee.tag,disabled:w},ue(e));Le=$?$(fe,e,ke):fe.map(((t,n)=>Y.jsx(Wp,te({label:Ne(t),size:ne},e({index:n}),d))))}if(W>-1&&Array.isArray(Le)){const e=Le.length-W;!Ae&&e>0&&(Le=Le.splice(0,W),Le.push(Y.jsx("span",{className:Ee.tag,children:M(e)},Le.length)))}const We=K||(e=>Y.jsxs("li",{children:[Y.jsx($p,{className:Ee.groupLabel,ownerState:ke,component:"div",children:e.group}),Y.jsx(ef,{className:Ee.groupUl,ownerState:ke,children:e.children})]},e.key)),Ie=_||((e,t)=>Y.jsx("li",te({},e,{children:Ne(t)}))),Se=(e,t)=>{const n=pe({option:e,index:t});return Ie(te({},n,{className:Ee.option}),e,{selected:n["aria-selected"],index:t,inputValue:we},ke)},He=null!=(n=re.clearIndicator)?n:A.clearIndicator,Ve=null!=(r=re.paper)?r:A.paper,Xe=null!=(o=re.popper)?o:A.popper,Re=null!=(a=re.popupIndicator)?a:A.popupIndicator;return Y.jsxs(N.Fragment,{children:[Y.jsx(Qp,te({ref:t,className:Kn(Ee.root,p),ownerState:ke},ae(oe),{children:J({id:ge,disabled:w,fullWidth:!0,size:"small"===ne?"small":void 0,InputLabelProps:se(),InputProps:te({ref:xe,className:Ee.inputRoot,startAdornment:Le,onClick:e=>{e.target===e.currentTarget&&je(e)}},(Oe||Ce)&&{endAdornment:Y.jsxs(Fp,{className:Ee.endAdornment,ownerState:ke,children:[Oe?Y.jsx(Gp,te({},ce(),{"aria-label":g,title:g,ownerState:ke},He,{className:Kn(Ee.clearIndicator,null==He?void 0:He.className),children:f})):null,Ce?Y.jsx(Zp,te({},le(),{disabled:w,"aria-label":ve?v:F,title:ve?v:F,ownerState:ke},Re,{className:Kn(Ee.popupIndicator,null==Re?void 0:Re.className),children:q})):null]})}),inputProps:te({className:Ee.input,disabled:w,readOnly:U},ie())})})),ye?Y.jsx(qp,te({as:Z,disablePortal:C,style:{width:ye?ye.clientWidth:null},ownerState:ke,role:"presentation",anchorEl:ye,open:ve},Xe,{className:Kn(Ee.popper,null==Xe?void 0:Xe.className),children:Y.jsxs(Up,te({ownerState:ke,as:G},Ve,{className:Kn(Ee.paper,null==Ve?void 0:Ve.className),children:[H&&0===ze.length?Y.jsx(Kp,{className:Ee.loading,ownerState:ke,children:V}):null,0!==ze.length||B||H?null:Y.jsx(Jp,{className:Ee.noOptions,ownerState:ke,role:"presentation",onMouseDown:e=>{e.preventDefault()},children:R}),ze.length>0?Y.jsx(_p,te({as:I,className:Ee.listbox,ownerState:ke},Me,S,{ref:Te,children:ze.map(((e,t)=>k?We({key:e.key,group:e.group,children:e.options.map(((t,n)=>Se(t,e.index+n)))}):Se(e,t)))})):null]}))})):null]})}));"production"!==process.env.NODE_ENV&&(tf.propTypes={autoComplete:De.bool,autoHighlight:De.bool,autoSelect:De.bool,blurOnSelect:De.oneOfType([De.oneOf(["mouse","touch"]),De.bool]),ChipProps:De.object,classes:De.object,className:De.string,clearIcon:De.node,clearOnBlur:De.bool,clearOnEscape:De.bool,clearText:De.string,closeText:De.string,componentsProps:De.shape({clearIndicator:De.object,paper:De.object,popper:De.object,popupIndicator:De.object}),defaultValue:ee(De.any,(e=>e.multiple&&void 0!==e.defaultValue&&!Array.isArray(e.defaultValue)?new Error(["MUI: The Autocomplete expects the `defaultValue` prop to be an array when `multiple={true}` or undefined.",`However, ${e.defaultValue} was provided.`].join("\n")):null)),disableClearable:De.bool,disableCloseOnSelect:De.bool,disabled:De.bool,disabledItemsFocusable:De.bool,disableListWrap:De.bool,disablePortal:De.bool,filterOptions:De.func,filterSelectedOptions:De.bool,forcePopupIcon:De.oneOfType([De.oneOf(["auto"]),De.bool]),freeSolo:De.bool,fullWidth:De.bool,getLimitTagsText:De.func,getOptionDisabled:De.func,getOptionLabel:De.func,groupBy:De.func,handleHomeEndKeys:De.bool,id:De.string,includeInputInList:De.bool,inputValue:De.string,isOptionEqualToValue:De.func,limitTags:Pt,ListboxComponent:De.elementType,ListboxProps:De.object,loading:De.bool,loadingText:De.node,multiple:De.bool,noOptionsText:De.node,onChange:De.func,onClose:De.func,onHighlightChange:De.func,onInputChange:De.func,onOpen:De.func,open:De.bool,openOnFocus:De.bool,openText:De.string,options:De.array.isRequired,PaperComponent:De.elementType,PopperComponent:De.elementType,popupIcon:De.node,readOnly:De.bool,renderGroup:De.func,renderInput:De.func.isRequired,renderOption:De.func,renderTags:De.func,selectOnFocus:De.bool,size:De.oneOfType([De.oneOf(["small","medium"]),De.string]),slotProps:De.shape({clearIndicator:De.object,paper:De.object,popper:De.object,popupIndicator:De.object}),sx:De.oneOfType([De.arrayOf(De.oneOfType([De.func,De.object,De.bool])),De.func,De.object]),value:ee(De.any,(e=>e.multiple&&void 0!==e.value&&!Array.isArray(e.value)?new Error(["MUI: The Autocomplete expects the `value` prop to be an array when `multiple={true}` or undefined.",`However, ${e.value} was provided.`].join("\n")):null))});var nf=tf;const rf=N.createContext();"production"!==process.env.NODE_ENV&&(rf.displayName="GridContext");var of=rf;function af(e){return kt("MuiGrid",e)}const sf=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],lf=Et("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((e=>`spacing-xs-${e}`)),...["column-reverse","column","row-reverse","row"].map((e=>`direction-xs-${e}`)),...["nowrap","wrap-reverse","wrap"].map((e=>`wrap-xs-${e}`)),...sf.map((e=>`grid-xs-${e}`)),...sf.map((e=>`grid-sm-${e}`)),...sf.map((e=>`grid-md-${e}`)),...sf.map((e=>`grid-lg-${e}`)),...sf.map((e=>`grid-xl-${e}`))]);var cf=lf;const uf=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function df(e){const t=parseFloat(e);return`${t}${String(e).replace(String(t),"")||"px"}`}function pf({breakpoints:e,values:t}){let n="";Object.keys(t).forEach((e=>{""===n&&0!==t[e]&&(n=e)}));const r=Object.keys(e).sort(((t,n)=>e[t]-e[n]));return r.slice(0,r.indexOf(n))}const ff=fo("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:o,item:a,spacing:i,wrap:s,zeroMinWidth:l,breakpoints:c}=n;let u=[];r&&(u=function(e,t,n={}){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[n[`spacing-xs-${String(e)}`]];const r=[];return t.forEach((t=>{const o=e[t];Number(o)>0&&r.push(n[`spacing-${t}-${String(o)}`])})),r}(i,c,t));const d=[];return c.forEach((e=>{const r=n[e];r&&d.push(t[`grid-${e}-${String(r)}`])})),[t.root,r&&t.container,a&&t.item,l&&t.zeroMinWidth,...u,"row"!==o&&t[`direction-xs-${String(o)}`],"wrap"!==s&&t[`wrap-xs-${String(s)}`],...d]}})((({ownerState:e})=>te({boxSizing:"border-box"},e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},e.item&&{margin:0},e.zeroMinWidth&&{minWidth:0},"wrap"!==e.wrap&&{flexWrap:e.wrap})),(function({theme:e,ownerState:t}){return Ft({theme:e},qt({values:t.direction,breakpoints:e.breakpoints.values}),(e=>{const t={flexDirection:e};return 0===e.indexOf("column")&&(t[`& > .${cf.item}`]={maxWidth:"none"}),t}))}),(function({theme:e,ownerState:t}){const{container:n,rowSpacing:r}=t;let o={};if(n&&0!==r){const t=qt({values:r,breakpoints:e.breakpoints.values});let n;"object"==typeof t&&(n=pf({breakpoints:e.breakpoints.values,values:t})),o=Ft({theme:e},t,((t,r)=>{var o;const a=e.spacing(t);return"0px"!==a?{marginTop:`-${df(a)}`,[`& > .${cf.item}`]:{paddingTop:df(a)}}:null!=(o=n)&&o.includes(r)?{}:{marginTop:0,[`& > .${cf.item}`]:{paddingTop:0}}}))}return o}),(function({theme:e,ownerState:t}){const{container:n,columnSpacing:r}=t;let o={};if(n&&0!==r){const t=qt({values:r,breakpoints:e.breakpoints.values});let n;"object"==typeof t&&(n=pf({breakpoints:e.breakpoints.values,values:t})),o=Ft({theme:e},t,((t,r)=>{var o;const a=e.spacing(t);return"0px"!==a?{width:`calc(100% + ${df(a)})`,marginLeft:`-${df(a)}`,[`& > .${cf.item}`]:{paddingLeft:df(a)}}:null!=(o=n)&&o.includes(r)?{}:{width:"100%",marginLeft:0,[`& > .${cf.item}`]:{paddingLeft:0}}}))}return o}),(function({theme:e,ownerState:t}){let n;return e.breakpoints.keys.reduce(((r,o)=>{let a={};if(t[o]&&(n=t[o]),!n)return r;if(!0===n)a={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===n)a={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const i=qt({values:t.columns,breakpoints:e.breakpoints.values}),s="object"==typeof i?i[o]:i;if(null==s)return r;const l=Math.round(n/s*1e8)/1e6+"%";let c={};if(t.container&&t.item&&0!==t.columnSpacing){const n=e.spacing(t.columnSpacing);if("0px"!==n){const e=`calc(${l} + ${df(n)})`;c={flexBasis:e,maxWidth:e}}}a=te({flexBasis:l,flexGrow:0,maxWidth:l},c)}return 0===e.breakpoints.values[o]?Object.assign(r,a):r[e.breakpoints.up(o)]=a,r}),{})}));const mf=e=>{const{classes:t,container:n,direction:r,item:o,spacing:a,wrap:i,zeroMinWidth:s,breakpoints:l}=e;let c=[];n&&(c=function(e,t){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[`spacing-xs-${String(e)}`];const n=[];return t.forEach((t=>{const r=e[t];if(Number(r)>0){const e=`spacing-${t}-${String(r)}`;n.push(e)}})),n}(a,l));const u=[];l.forEach((t=>{const n=e[t];n&&u.push(`grid-${t}-${String(n)}`)}));return Dt({root:["root",n&&"container",o&&"item",s&&"zeroMinWidth",...c,"row"!==r&&`direction-xs-${String(r)}`,"wrap"!==i&&`wrap-xs-${String(i)}`,...u]},af,t)},hf=N.forwardRef((function(e,t){const n=co({props:e,name:"MuiGrid"}),{breakpoints:r}=lo(),o=qn(n),{className:a,columns:i,columnSpacing:s,component:l="div",container:c=!1,direction:u="row",item:d=!1,rowSpacing:p,spacing:f=0,wrap:m="wrap",zeroMinWidth:h=!1}=o,g=It(o,uf),v=p||f,A=s||f,b=N.useContext(of),y=c?i||12:b,x={},w=te({},g);r.keys.forEach((e=>{null!=g[e]&&(x[e]=g[e],delete w[e])}));const z=te({},o,{columns:y,container:c,direction:u,item:d,rowSpacing:v,columnSpacing:A,wrap:m,zeroMinWidth:h,spacing:f},x,{breakpoints:r.keys}),O=mf(z);return Y.jsx(of.Provider,{value:y,children:Y.jsx(ff,te({ownerState:z,className:Kn(O.root,a),as:l,ref:t},w))})}));if("production"!==process.env.NODE_ENV&&(hf.propTypes={children:De.node,classes:De.object,className:De.string,columns:De.oneOfType([De.arrayOf(De.number),De.number,De.object]),columnSpacing:De.oneOfType([De.arrayOf(De.oneOfType([De.number,De.string])),De.number,De.object,De.string]),component:De.elementType,container:De.bool,direction:De.oneOfType([De.oneOf(["column-reverse","column","row-reverse","row"]),De.arrayOf(De.oneOf(["column-reverse","column","row-reverse","row"])),De.object]),item:De.bool,lg:De.oneOfType([De.oneOf(["auto"]),De.number,De.bool]),md:De.oneOfType([De.oneOf(["auto"]),De.number,De.bool]),rowSpacing:De.oneOfType([De.arrayOf(De.oneOfType([De.number,De.string])),De.number,De.object,De.string]),sm:De.oneOfType([De.oneOf(["auto"]),De.number,De.bool]),spacing:De.oneOfType([De.arrayOf(De.oneOfType([De.number,De.string])),De.number,De.object,De.string]),sx:De.oneOfType([De.arrayOf(De.oneOfType([De.func,De.object,De.bool])),De.func,De.object]),wrap:De.oneOf(["nowrap","wrap-reverse","wrap"]),xl:De.oneOfType([De.oneOf(["auto"]),De.number,De.bool]),xs:De.oneOfType([De.oneOf(["auto"]),De.number,De.bool]),zeroMinWidth:De.bool}),"production"!==process.env.NODE_ENV){const e=$e("Grid",hf);hf.propTypes=te({},hf.propTypes,{direction:e("container"),lg:e("item"),md:e("item"),sm:e("item"),spacing:e("container"),wrap:e("container"),xs:e("item"),zeroMinWidth:e("item")})}var gf=hf;function vf(e){return kt("MuiTypography",e)}var Af=Et("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const bf=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],yf=fo("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${Ze(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((({theme:e,ownerState:t})=>te({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16}))),xf={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},wf={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},zf=N.forwardRef((function(e,t){const n=co({props:e,name:"MuiTypography"}),r=(e=>wf[e]||e)(n.color),o=qn(te({},n,{color:r})),{align:a="inherit",className:i,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:p=xf}=o,f=It(o,bf),m=te({},o,{align:a,color:r,className:i,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:p}),h=s||(u?"p":p[d]||xf[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:a,classes:i}=e;return Dt({root:["root",a,"inherit"!==e.align&&`align${Ze(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]},vf,i)})(m);return Y.jsx(yf,te({as:h,ref:t,ownerState:m,className:Kn(g.root,i)},f))}));"production"!==process.env.NODE_ENV&&(zf.propTypes={align:De.oneOf(["center","inherit","justify","left","right"]),children:De.node,classes:De.object,className:De.string,component:De.elementType,gutterBottom:De.bool,noWrap:De.bool,paragraph:De.bool,sx:De.oneOfType([De.arrayOf(De.oneOfType([De.func,De.object,De.bool])),De.func,De.object]),variant:De.oneOfType([De.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),De.string]),variantMapping:De.object});var Of,Cf,jf=zf,Pf={exports:{}};Pf.exports=(Of={705:e=>{e.exports=function(e,t){const n=[];return 0===t.length?n.push({text:e,highlight:!1}):t[0][0]>0&&n.push({text:e.slice(0,t[0][0]),highlight:!1}),t.forEach(((r,o)=>{const a=r[0],i=r[1];n.push({text:e.slice(a,i),highlight:!0}),o===t.length-1?i<e.length&&n.push({text:e.slice(i,e.length),highlight:!1}):i<t[o+1][0]&&n.push({text:e.slice(i,t[o+1][0]),highlight:!1})})),n}}},Cf={},function e(t){var n=Cf[t];if(void 0!==n)return n.exports;var r=Cf[t]={exports:{}};return Of[t](r,r.exports,e),r.exports}(705));var Bf=W(Pf.exports);var Df=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},Mf="object"==typeof L&&L&&L.Object===Object&&L,Tf=Mf,Nf="object"==typeof self&&self&&self.Object===Object&&self,kf=Tf||Nf||Function("return this")(),Ef=kf,Lf=function(){return Ef.Date.now()},Wf=/\s/;var If=function(e){for(var t=e.length;t--&&Wf.test(e.charAt(t)););return t},Sf=/^\s+/;var Hf=function(e){return e?e.slice(0,If(e)+1).replace(Sf,""):e},Vf=kf.Symbol,Xf=Vf,Rf=Object.prototype,Yf=Rf.hasOwnProperty,Qf=Rf.toString,Ff=Xf?Xf.toStringTag:void 0;var Gf=function(e){var t=Yf.call(e,Ff),n=e[Ff];try{e[Ff]=void 0;var r=!0}catch(e){}var o=Qf.call(e);return r&&(t?e[Ff]=n:delete e[Ff]),o},Zf=Object.prototype.toString;var qf=Gf,Uf=function(e){return Zf.call(e)},Kf=Vf?Vf.toStringTag:void 0;var Jf=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Kf&&Kf in Object(e)?qf(e):Uf(e)};var _f=function(e){return null!=e&&"object"==typeof e},$f=Jf,em=_f;var tm=Hf,nm=Df,rm=function(e){return"symbol"==typeof e||em(e)&&"[object Symbol]"==$f(e)},om=/^[-+]0x[0-9a-f]+$/i,am=/^0b[01]+$/i,im=/^0o[0-7]+$/i,sm=parseInt;var lm=Df,cm=Lf,um=function(e){if("number"==typeof e)return e;if(rm(e))return NaN;if(nm(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=nm(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=tm(e);var n=am.test(e);return n||im.test(e)?sm(e.slice(2),n?2:8):om.test(e)?NaN:+e},dm=Math.max,pm=Math.min;var fm=function(e,t,n){var r,o,a,i,s,l,c=0,u=!1,d=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function f(t){var n=r,a=o;return r=o=void 0,c=t,i=e.apply(a,n)}function m(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=a}function h(){var e=cm();if(m(e))return g(e);s=setTimeout(h,function(e){var n=t-(e-l);return d?pm(n,a-(e-c)):n}(e))}function g(e){return s=void 0,p&&r?f(e):(r=o=void 0,i)}function v(){var e=cm(),n=m(e);if(r=arguments,o=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(h,t),u?f(e):i}(l);if(d)return clearTimeout(s),s=setTimeout(h,t),f(l)}return void 0===s&&(s=setTimeout(h,t)),i}return t=um(t)||0,lm(n)&&(u=!!n.leading,a=(d="maxWait"in n)?dm(um(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),v.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=o=s=void 0},v.flush=function(){return void 0===s?i:g(cm())},v},mm=fm,hm=Df;var gm=W((function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return hm(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),mm(e,t,{leading:r,maxWait:t,trailing:o})})),vm=process.env.REACT_APP_GOOGLE_MAP_KEY;var Am,bm,ym,xm,wm,zm={current:null},Om={current:null};function Cm(t){var n=t.name,r=t.address,o=t.placeholder,a=t.setLocation,i=t.selectLocation,s=F(t,["name","address","placeholder","setLocation","selectLocation"]),l=c.useFormContext().control,u=e.useState(null),d=u[0],p=u[1],f=e.useState(""),m=f[0],h=f[1],g=e.useState([]),v=g[0],A=g[1],b=e.useRef(!1);"undefined"==typeof window||b.current||(document.querySelector("#google-maps")||function(e,t,n){if(t){var r=document.createElement("script");r.setAttribute("async",""),r.setAttribute("id",n),r.src=e,t.appendChild(r)}}("https://maps.googleapis.com/maps/api/js?key=".concat(vm,"&libraries=places"),document.querySelector("head"),"google-maps"),b.current=!0);var y=N.useMemo((function(){return gm((function(e,t){zm.current.getPlacePredictions(e,t)}),200)}),[]);N.useEffect((function(){var e=!0;if(!zm.current&&window.google&&window.google.maps&&window.google.maps.places&&(zm.current=new window.google.maps.places.AutocompleteService),zm.current){if(!Om.current&&window.google&&window.google.maps&&window.google.maps.places&&(Om.current=new window.google.maps.places.PlacesService(new window.google.maps.Map(document.getElementById("google-maps")))),""!==m)return y({input:m},(function(t){if(e){var n=[];d&&(n=[d]),t&&(n=q(q([],n,!0),t,!0)),A(n)}})),function(){e=!1};A(d?[d]:[])}}),[d,m,y]);return Y.jsx(c.Controller,{name:"".concat(n,".description"),control:l,render:function(t){var l=t.field,c=t.fieldState.error;return Y.jsx(nf,{id:"".concat(n,".description"),getOptionLabel:function(e){return"string"==typeof e?e:e.description},filterOptions:function(e){return e},options:v,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,value:null!=r?r:l.value,onChange:function(e,t){A(t?q([t],v,!0):v),p(t),l.onChange(null==t?void 0:t.description),function(e){Om.current&&e&&e.place_id&&Om.current.getDetails({placeId:null==e?void 0:e.place_id},(function(t,r){if(r===window.google.maps.places.PlacesServiceStatus.OK){var o={placeId:null==e?void 0:e.place_id,description:null==e?void 0:e.description,location:{type:"Point",coordinates:[t.geometry.location.lng(),t.geometry.location.lat()]}};a&&a(o),i&&i(n,o)}}))}(t)},onInputChange:function(e,t){h(t)},renderInput:function(e){var t,n,r,a;return Y.jsx(Fd,Q({},e,s,{placeholder:o,fullWidth:!0,error:!!c,helperText:null!==(a=null!==(t=null==c?void 0:c.message)&&void 0!==t?t:null===(r=null===(n=Object(c))||void 0===n?void 0:n.id)||void 0===r?void 0:r.message)&&void 0!==a?a:""}))},renderOption:function(t,n){var r=n.structured_formatting.main_text_matched_substrings,o=[];return r&&(o=Bf(n.structured_formatting.main_text,r.map((function(e){return[e.offset,e.offset+e.length]})))),e.createElement("li",Q({},t,{key:n.description}),Y.jsxs(gf,{container:!0,alignItems:"center",children:[Y.jsx(gf,{item:!0,children:Y.jsx(bo,{sx:{color:"text.secondary",mr:2}})}),Y.jsxs(gf,{item:!0,xs:!0,children:[o.map((function(e,t){return Y.jsx("span",{style:{fontWeight:e.highlight?700:400},children:e.text},t)})),Y.jsx(jf,{variant:"body2",color:"text.secondary",children:n.structured_formatting.secondary_text})]})]}))}})}})}function jm(e,t,n,r,o){var a;switch(n[t]=void 0,e.type){case ym.STRING:case ym.PHONENUMBER:case ym.LOCALIZEDString:case ym.OBJECTID:n[t]=r&&r.get(t)?r.get(t):"",a=k.string().nullable();break;case ym.BOOLEAN:n[t]=!r||!1!==r.get(t)&&!0!==r.get(t)?void 0:r.get(t),a=k.boolean().nullable();break;case ym.REFERENCE:n[t]=r&&r.get(t+"-name")?{_id:r.get(t+"-id"),title:r.get(t+"-name")}:void 0,a=k.object().nullable();break;case ym.DATE:case ym.NUMBER:n[t]={from:"",to:""},n[t].from=r.get(t+"-from")?r.get(t+"-from"):"",n[t].to=r.get(t+"-to")?r.get(t+"-to"):"",a=k.object().nullable();break;case ym.ENUM:n[t]=r&&r.get(t)?r.get(t):void 0,a=k.string().nullable()}return a}!function(e){e.SHOW="SHOW",e.LIST="LIST",e.NEW="NEW",e.EDIT="EDIT"}(Am||(Am={})),function(e){e.RECORD="RECORD",e.Resource="RESOUCRE"}(bm||(bm={})),function(e){e.STRING="String",e.NUMBER="Number",e.ENUM="enum",e.REFERENCE="ref",e.DATE="Date",e.PASSWORD="password",e.BOOLEAN="Boolean",e.OBJECTID="ObjectID",e.NESTEDSCHEMA="nestedSchema",e.ARRAY="Array",e.IMAGE="image",e.LOCALIZEDString="localizedString",e.PHONENUMBER="phoneNumber",e.COLOR="color",e.TIMEPICKER="timePicker",e.FILE="File",e.LOCATION="LOCATION",e.RICH_TEXT_I="RICH_TEXT_I",e.RICH_TEXT_II="RICH_TEXT_II"}(ym||(ym={})),function(e){e.NORMAL="NORMAL",e.FILE_DOWNLOAD="FILE_DOWNLOAD",e.CUSTOM_COMPONENT="CUSTOM_COMPONENT"}(xm||(xm={})),function(e){e.ENGLISH="en",e.ARABIC="ar"}(wm||(wm={}));var Pm=function(){function e(){}return e.isEnglish=function(){switch(localStorage.getItem("i18nextLng")){case wm.ENGLISH:return!0;case wm.ARABIC:return!1;default:return!0}},e.getLocale=function(){return this.isEnglish()?wm.ENGLISH:wm.ARABIC},e.getLocalizedString=function(e){for(var t=this.getLocale(),n=e[0].value,r=0;r<e.length;r++){var o=e[r];if(o.key===t)return o.value?o.value:n}return n},e}(),Bm=y.create({withCredentials:!0}),Dm=function(){function e(){}return e.getReferenceImage=function(e,t){var n=void 0,r=require("lodash");if(e.properties.disableImageOnReference)return n;var o=e.properties.model;if(e.properties.imageOnReferencePath)n=r.get(t,e.properties.imageOnReferencePath);else{if(n=this.getDataFromPath(o,"image",t))return n;if(n=this.getDataFromPath(o,"logo",t))return n;if(n=this.getDataFromPath(o,"photo",t))return n}return n},e.getDataFromPath=function(e,t,n){var r=require("lodash");return n[t]&&"string"==typeof n[t]?n[t]:e[t]&&e[t].valuePath?r.get(n,e[t].valuePath):void 0},e}(),Mm=function(){function e(){}return e.getCartesianProduct=function(e){return e.reduce((function(e,t){return e.map((function(e){return t.map((function(t){return e.concat([t])}))})).reduce((function(e,t){return e.concat(t)}),[])}),[[]])},e.getReferenceValues=function(e){var t=e.referencedValues,n=e.value,r=e.loading,o=e.extraKey,a=e.fullKey,i=e.key,s=e.apiRoute,l=e.resources,c=e.pathRoute,u=e.schema,d=e.setLoading,p=e.setReferencedValues,f=e.adminPath;return G(this,void 0,void 0,(function(){var e,m,h,g,v,A,b,y,x,w,z,O,C,j;return Z(this,(function(P){switch(P.label){case 0:return t[i]||!n?[2]:((e=Q({},r))[a]=!0,d(e),[4,Bm.get(s||(u[i].apiRoute?u[i].apiRoute:"".concat(null!=f?f:"","/").concat(l[u[i].path].properties.modelName)))]);case 1:for(m=P.sent(),h=m.data.data.records,g=[],v=0;v<h.length;v++)A=h[v],b=l[c||u[i].path],y=b.properties.title,x=b.properties.model[y].type,w=A[y],z=Dm.getReferenceImage(b,A),x===ym.LOCALIZEDString&&(w=Pm.getLocalizedString(w)),O={title:w,_id:A._id,image:z},o&&(O[o]=A[o]),g.push(O);return(C=Q({},t))[i]=g,p(C),(j=Q({},r))[a]=!1,d(j),[2]}}))}))},e.onErrorAction=function(e){var t=e.data,n=e.error,r=e.reset,o=e.setErrorState;(0,e.setSubmitStatus)(!1),r(t),setTimeout((function(){o({state:!1})}),4e3),o({state:!0,message:JSON.parse(n).meta.message,severity:"error"})},e.convertCamelCaseToWord=function(e){var t=e.replace(/([A-Z])/g," $1");return t.charAt(0).toUpperCase()+t.slice(1)},e.checkLocalizedString=function(e,t,n){return e[t].properties.model[n].type===ym.LOCALIZEDString},e.stringifyTime=function(e){if(e){var t=e.hour(),n=e.minute(),r=t>=12?"PM":"AM";return(t=(t=(t%=12)||12)<10?"0"+t:t)+":"+(n=n<10?"0"+n:n)+" "+r}},e.convertToOriginal=function(e){var t=e.split(":"),n=t[0],r=t[1].split(" "),o=r[0],a="PM"===r[1]?parseInt(n)+12:parseInt(n);return b("2022-04-07").set("minutes",parseInt(o)).set("hours",a)},e.getRecordName=function(e,t,n){return n&&"string"!=typeof e&&n.properties.model[t].type===ym.LOCALIZEDString?Pm.getLocalizedString(e):e},e}(),Tm=fo("div")((function(){return{flexGrow:1,height:"100%",overflow:"hidden"}})),Nm=fo(x)((function(e){return{maxHeight:"100%","& .simplebar-scrollbar":{"&:before":{backgroundColor:gr(e.theme.palette.grey[600],.48)},"&.simplebar-visible:before":{opacity:1}},"& .simplebar-mask":{zIndex:"inherit"}}})),km=e.forwardRef((function(e,t){var n=e.children,r=e.sx,o=F(e,["children","sx"]),a="undefined"==typeof navigator?"SSR":navigator.userAgent;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)?Y.jsx(bo,Q({ref:t,sx:Q({overflow:"auto"},r)},o,{children:n})):Y.jsx(Tm,{children:Y.jsx(Nm,Q({scrollableNodeProps:{ref:t},clickOnTrack:!1,sx:r},o,{children:n}))})})),Em=e.memo(km);function Lm(e,t,n){return e.has(t)?e.set(t,n):e.append(t,n),e}function Wm(e,t,n,r,o,a,i){Object.keys(e).map((function(t){if(e[t]&&n[t].type===ym.DATE){if(e[t].from&&""!==e[t].from)try{e[t].from=e[t].from.toISOString().split("T")[0]}catch(e){}if(e[t].to&&""!==e[t].to)try{e[t].to=e[t].to.toISOString().split("T")[0]}catch(e){}}}));var s="";return Object.keys(e).map((function(t){a&&i&&"all"!==i&&a===t||e[t]&&""!==e[t]&&n[t].type&&(n[t].type===ym.NUMBER||n[t].type===ym.DATE?!e[t].from&&!e[t].to||""===e[t].from&&""===e[t].to?e[t]=void 0:(e[t].from&&""!==e[t].from&&(r=Lm(r,t+"-from",e[t].from)),e[t].to&&""!==e[t].to&&(r=Lm(r,t+"-to",e[t].to)),s=s+t+":from="+e[t].from+",to="+e[t].to+";;"+n[t].type+"^^"):n[t].type===ym.REFERENCE?e[t]._id&&(r=Lm(r,t+"-name",e[t].title),r=Lm(r,t+"-id",e[t]._id),s=s+t+"="+e[t]._id+";;"+n[t].type+"^^"):(r=Lm(r,t,e[t]),s=s+t+"="+e[t]+";;"+n[t].type+"^^"))})),t(),o(r),s}var Im=["true","false"];function Sm(e,t,r,o,a,i,s,l,c,u,d){if(r[t])switch(r[t].type){case ym.STRING:return Y.jsx(os,{name:i,size:e,label:r[t].value},t);case ym.PHONENUMBER:return Y.jsx(w,{defaultCountry:r[t].countryCodes?r[t].countryCodes[0]:"sa",onChange:function(e){return u(i,e)},onlyCountries:r[t].countryCodes?r[t].countryCodes:["eg","sa"],name:i,size:e,label:r[t].value,value:d(i)?d(i):"",variant:"outlined",fullWidth:!0},t);case ym.TIMEPICKER:case ym.LOCALIZEDString:case ym.OBJECTID:return Y.jsx(os,{name:i,size:e,label:r[t].value},t);case ym.NUMBER:return Y.jsxs(n.Card,{sx:{py:3,px:3},children:[Y.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:r[t].value},t),Y.jsxs(n.Stack,{direction:"row",spacing:2,children:[Y.jsx(os,{name:t+".from",style:{flex:1,width:90},size:e,label:s?"From":"من"}),Y.jsx(os,{name:t+".to",style:{flex:1,width:90},size:e,label:s?"To":"إلى"})]})]},t);case ym.DATE:return Y.jsxs(n.Card,{sx:{py:3,px:3},children:[Y.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:r[t].value},t),Y.jsxs(n.Grid,{container:!0,spacing:2,children:[Y.jsx(n.Grid,{item:!0,xs:12,children:Y.jsx(bs,{name:t+".from",size:e,label:s?"From":"من",fullWidth:!0},t)}),Y.jsx(n.Grid,{item:!0,xs:12,children:Y.jsx(bs,{name:t+".to",size:e,label:s?"To":"إلى",fullWidth:!0},t)})]})]},t);case ym.ENUM:return Y.jsx(as,{name:i,size:e,label:r[t].value,SelectProps:{native:!1,sx:{textTransform:"capitalize"}},children:r[t].enumValues.map((function(e){return Y.jsx(n.MenuItem,{value:e,sx:{mx:1,my:.5,borderRadius:.75,typography:"body2",textTransform:"capitalize"},children:e.includes("_")?e.split("_").map((function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()})).join(" "):e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},e)}))},t);case ym.BOOLEAN:return Y.jsx(as,{name:i,size:e,label:r[t].value,SelectProps:{native:!1,sx:{textTransform:"capitalize"}},children:Im.map((function(e){return Y.jsx(n.MenuItem,{value:e,sx:{mx:1,my:.5,borderRadius:.75,typography:"body2",textTransform:"capitalize"},children:e},e)}))},t);case ym.ARRAY:case ym.REFERENCE:return Y.jsx(As,{name:i,size:e,label:r[t].value,multiple:!1,onOptionChange:function(e){return c(e,t)},options:o[t]?o[t]:[],loading:a[i],onOpenChanged:function(e){return l(r[t].apiRoute,r[t].path,e,t,i)}},t);default:return}}var Hm,Vm=require("@mui/icons-material"),Xm=function(e){return Y.jsx(Rm,{src:e,sx:{width:1,height:1}})};function Rm(e){var t=e.src,r=e.sx,o=Y.jsx(n.Box,{component:"span",sx:Q({width:24,height:24,display:"inline-block",bgcolor:"currentColor",mask:"url(".concat(t,") no-repeat center / contain"),WebkitMask:"url(".concat(t,") no-repeat center / contain")},r)}),a=Y.jsx(n.Box,{sx:{display:"flex",gap:1},children:Y.jsx(n.SvgIcon,{component:Vm[t],color:"inherit"})});return void 0!==Vm[t]?a:o}function Ym(t){var r=this,o=t.schema,a=t.resources,i=t.filterProperties,s=t.searchParams,u=t.scopeKey,d=t.scopeValue,p=t.setParams,f=t.size;t.initialQueryParams;var m=t.isQuickFilter,h=t.quickFilterValues,g=t.onRefrenceChanged,v=t.setSearchParams,A=t.handleFilterDrawerClose,b=t.filterString,y=e.useState({}),x=y[0],w=y[1],z=e.useState({}),O=z[0],C=z[1],j=function(e,t,n,i,s){return G(r,void 0,void 0,(function(){return Z(this,(function(r){switch(r.label){case 0:return[4,Mm.getReferenceValues({apiRoute:e,referencedValues:O,value:n,loading:x,fullKey:s,key:i,pathRoute:t,resources:a,schema:o,setLoading:w,setReferencedValues:C})];case 1:return r.sent(),[2]}}))}))},P={},B={};i.map((function(e,t){"__v"!==e&&o[e]&&(P[e]=jm(o[e],e,B,s))}));var D=k.object().shape(P),M=Pm.isEnglish(),T=e.useMemo((function(){return B}),[]),E=c.useForm({resolver:Ci(D),defaultValues:T}),L=E.handleSubmit,W=E.reset,I=E.setValue,S=E.getValues,H=function(e){return G(r,void 0,void 0,(function(){var t,n;return Z(this,(function(r){return t=Q(Q({},e),h),n=Wm(t,A,o,s,v,u,d),b&&b(n,e),[2]}))}))};return m?Y.jsx(Ki,{methods:E,onSubmit:L(H),children:Y.jsxs(n.Stack,{direction:"row",spacing:2,justifyContent:"end",children:[i&&i.map((function(e,t){return Y.jsx(n.Grid,{minWidth:170,children:Sm(f,e,o,O,x,e,M,j,g,I,S)},e+t)})),Y.jsx(l.LoadingButton,{size:"small",type:"submit",variant:"outlined",children:M?"Filter":"التصفية"})]},"grid1")}):Y.jsx("div",{children:Y.jsx(N.Fragment,{children:Y.jsxs(Ki,{methods:E,onSubmit:L(H),children:[Y.jsx(Em,{children:Y.jsx(n.Grid,{container:!0,spacing:2,justifyContent:"end",style:{padding:"2rem"},children:i&&i.map((function(e,t){return Y.jsx(n.Grid,{item:!0,xs:12,children:Sm(f,e,o,O,x,e,M,j,g,I,S)},e+t)}))},"grid1")}),Y.jsx(bo,{sx:{marginTop:"2rem",paddingBottom:"2rem"},children:Y.jsx(n.Stack,{mt:2,ml:3,children:Y.jsxs(n.Grid,{flexDirection:"column",children:[Y.jsx(l.LoadingButton,{style:{flex:1,margin:8,width:150},type:"submit",variant:"contained",startIcon:Xm("FilterAlt"),children:M?"Filter":"التصفية"}),Y.jsx(l.LoadingButton,{style:{flex:1},type:"reset",variant:"outlined",color:"inherit",startIcon:Xm("RestartAlt"),onClick:function(){v({}),p((function(e){return Q(Q({},e),{filters:void 0})})),W(Q({},T)),A()},children:M?"Reset":"إلغاء"})]})})})]})})})}function Qm(e){var t=e.schema,r=e.resources,o=e.size,a=e.open,i=e.scopeKey,s=e.scopeValue,l=e.filterProperties,c=e.searchParams,u=e.setSearchParams,d=e.setParams,p=e.initialQueryParams,f=e.quickFilterValues,m=e.onRefrenceChanged,h=e.handleFilterDrawerClose,g=e.filterString,v=Pm.isEnglish();return Y.jsx("div",{children:Y.jsx(N.Fragment,{children:Y.jsxs(oi,{anchor:"right",open:a,onClose:h,children:[Y.jsxs(n.Stack,{direction:"row",alignItems:"center",style:{minWidth:"340px",padding:"1rem",width:"20vw"},justifyContent:"space-between",sx:{px:1,py:1},children:[Y.jsx(n.Typography,{variant:"h6",children:v?"Filters":"التصفية"}),Y.jsx(n.IconButton,{onClick:h,children:Y.jsx(xi,{})})]}),Y.jsx(pi,{}),Y.jsx(Em,{children:Y.jsx(Ym,{schema:t,size:o,resources:r,initialQueryParams:p,filterProperties:l,onRefrenceChanged:m,handleFilterDrawerClose:h,filterString:g,scopeKey:i,scopeValue:s,setParams:d,searchParams:c,setSearchParams:u,quickFilterValues:f})})]})})})}function Fm(e,t){var n=(e=new Date(e)).getMonth()+1,r=e.getDate(),o=Gm(n),a=Gm(r),i=e.getFullYear()+"-"+o+"-"+a;return t&&(i=i+" "+function(e,t){var n=e.getHours(),r=e.getMinutes(),o=n>=12?"pm":"am";return t===wm.ARABIC&&(o=function(e){switch(e){case"am":default:return"صباحاً";case"pm":return"مساءاً"}}(o)),(n=(n%=12)||12)+":"+(r=r<10?"0"+r:r)+" "+o}(e,wm.ENGLISH)),i}function Gm(e){return e%10===e?"0".concat(e.toString()):e.toString()}!function(e){e.ALL="ALL",e.IMAGE="IMAGE",e._3D="3D",e.PDF="PDF",e.EXCEL="EXCEL",e.WORD="WORD",e.VIDEO="VIDEO",e.TEXT="TEXT",e.ZIP="ZIP",e.POWER_POINT="POWER_POINT",e.AUDIO="AUDIO"}(Hm||(Hm={}));var Zm=["pdf"],qm=["txt"],Um=["psd"],Km=["doc","docx"],Jm=["xls","xlsx"],_m=["zip","rar","iso"],$m=["ai","esp"],eh=["ppt","pptx"],th=["wav","aif","mp3","aac"],nh=["jpg","jpeg","gif","bmp","png","svg","webp","avif","JPG"],rh=["m4v","avi","mpg","mp4","webm"],oh=["gltf","stl","glb"],ah=function(e){return"/assets/icons/files/".concat(e,".svg")};function ih(e){var t;switch(null==e?void 0:e.includes(lh(e))){case qm.includes(lh(e)):t="txt";break;case _m.includes(lh(e)):t="zip";break;case th.includes(lh(e)):t="audio";break;case nh.includes(lh(e)):t="image";break;case rh.includes(lh(e)):t="video";break;case Km.includes(lh(e)):t="word";break;case Jm.includes(lh(e)):t="excel";break;case eh.includes(lh(e)):t="powerpoint";break;case Zm.includes(lh(e)):t="pdf";break;case Um.includes(lh(e)):t="photoshop";break;case $m.includes(lh(e)):t="illustrator";break;default:t=lh(e)}return t}function sh(e){var t;switch(ih(e)){case"folder":t=ah("ic_folder");break;case"txt":t=ah("ic_txt");break;case"zip":t=ah("ic_zip");break;case"audio":t=ah("ic_audio");break;case"video":t=ah("ic_video");break;case"word":t=ah("ic_word");break;case"excel":t=ah("ic_excel");break;case"powerpoint":t=ah("ic_power_point");break;case"pdf":t=ah("ic_pdf");break;case"photoshop":t=ah("ic_pts");break;case"illustrator":t=ah("ic_ai");break;case"image":t=ah("ic_img");break;default:t=ah("ic_file")}return t}function lh(e){return void 0===e&&(e=""),e&&e.split(".").pop()||""}function ch(e,t){if(t!==Hm.ALL)return t;var n;switch(null==e?void 0:e.includes(lh(e))){case qm.includes(lh(e)):n=Hm.TEXT;break;case _m.includes(lh(e)):n=Hm.ZIP;break;case th.includes(lh(e)):n=Hm.AUDIO;break;case nh.includes(lh(e)):n=Hm.IMAGE;break;case rh.includes(lh(e)):n=Hm.VIDEO;break;case Km.includes(lh(e)):n=Hm.WORD;break;case Jm.includes(lh(e)):n=Hm.EXCEL;break;case eh.includes(lh(e)):n=Hm.POWER_POINT;break;case Zm.includes(lh(e)):n=Hm.PDF;break;case Um.includes(lh(e)):case $m.includes(lh(e)):n=Hm.IMAGE;break;case oh.includes(lh(e)):n=Hm._3D;break;default:n=Hm.IMAGE}return n}const uh=function(e={}){const{createStyledComponent:t=Pr,useThemeProps:n=Br,componentName:r="MuiStack"}=e,o=t(Tr),a=N.forwardRef((function(e,t){const a=qn(n(e)),{component:i="div",direction:s="column",spacing:l=0,divider:c,children:u,className:d,useFlexGap:p=!1}=a,f=It(a,Cr),m={direction:s,spacing:l,useFlexGap:p},h=Dt({root:["root"]},(e=>kt(r,e)),{});return Y.jsx(o,te({as:i,ownerState:m,ref:t,className:Kn(h.root,d)},f,{children:c?Dr(u,c):u}))}));return"production"!==process.env.NODE_ENV&&(a.propTypes={children:De.node,direction:De.oneOfType([De.oneOf(["column-reverse","column","row-reverse","row"]),De.arrayOf(De.oneOf(["column-reverse","column","row-reverse","row"])),De.object]),divider:De.node,spacing:De.oneOfType([De.arrayOf(De.oneOfType([De.number,De.string])),De.number,De.object,De.string]),sx:De.oneOfType([De.arrayOf(De.oneOfType([De.func,De.object,De.bool])),De.func,De.object])}),a}({createStyledComponent:fo("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>co({props:e,name:"MuiStack"})});"production"!==process.env.NODE_ENV&&(uh.propTypes={children:De.node,component:De.elementType,direction:De.oneOfType([De.oneOf(["column-reverse","column","row-reverse","row"]),De.arrayOf(De.oneOf(["column-reverse","column","row-reverse","row"])),De.object]),divider:De.node,spacing:De.oneOfType([De.arrayOf(De.oneOfType([De.number,De.string])),De.number,De.object,De.string]),sx:De.oneOfType([De.arrayOf(De.oneOfType([De.func,De.object,De.bool])),De.func,De.object]),useFlexGap:De.bool});var dh=uh;function ph(e){return kt("MuiTooltip",e)}var fh=Et("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);const mh=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];const hh=fo(Ud,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})((({theme:e,ownerState:t,open:n})=>te({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${fh.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${fh.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${fh.arrow}`]:te({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${fh.arrow}`]:te({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})}))),gh=fo("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Ze(n.placement.split("-")[0])}`]]}})((({theme:e,ownerState:t})=>{return te({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:gr(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:(n=16/14,Math.round(1e5*n)/1e5)+"em",fontWeight:e.typography.fontWeightRegular},{[`.${fh.popper}[data-popper-placement*="left"] &`]:te({transformOrigin:"right center"},t.isRtl?te({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):te({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${fh.popper}[data-popper-placement*="right"] &`]:te({transformOrigin:"left center"},t.isRtl?te({marginRight:"14px"},t.touch&&{marginRight:"24px"}):te({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${fh.popper}[data-popper-placement*="top"] &`]:te({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${fh.popper}[data-popper-placement*="bottom"] &`]:te({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})});var n})),vh=fo("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})((({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:gr(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let Ah=!1,bh=null,yh={x:0,y:0};function xh(e,t){return n=>{t&&t(n),e(n)}}const wh=N.forwardRef((function(e,t){var n,r,o,a,i,s,l,c,u,d,p,f,m,h,g,v,A,b,y;const x=co({props:e,name:"MuiTooltip"}),{arrow:w=!1,children:z,components:O={},componentsProps:C={},describeChild:j=!1,disableFocusListener:P=!1,disableHoverListener:B=!1,disableInteractive:D=!1,disableTouchListener:M=!1,enterDelay:T=100,enterNextDelay:k=0,enterTouchDelay:E=700,followCursor:L=!1,id:W,leaveDelay:I=0,leaveTouchDelay:S=1500,onClose:H,onOpen:V,open:X,placement:R="bottom",PopperComponent:Q,PopperProps:F={},slotProps:G={},slots:Z={},title:q,TransitionComponent:U=Ru,TransitionProps:K}=x,J=It(x,mh),_=N.isValidElement(z)?z:Y.jsx("span",{children:z}),$=lo(),ee="rtl"===$.direction,[ne,re]=N.useState(),[oe,ae]=N.useState(null),ie=N.useRef(!1),se=D||L,le=N.useRef(),ce=N.useRef(),ue=N.useRef(),de=N.useRef(),[pe,fe]=it({controlled:X,default:!1,name:"Tooltip",state:"open"});let me=pe;if("production"!==process.env.NODE_ENV){const{current:e}=N.useRef(void 0!==X);N.useEffect((()=>{ne&&ne.disabled&&!e&&""!==q&&"button"===ne.tagName.toLowerCase()&&console.error(["MUI: You are providing a disabled `button` child to the Tooltip component.","A disabled element does not fire events.","Tooltip needs to listen to the child element's events to display the title.","","Add a simple wrapper element, such as a `span`."].join("\n"))}),[q,ne,e])}const he=ot(W),ge=N.useRef(),ve=N.useCallback((()=>{void 0!==ge.current&&(document.body.style.WebkitUserSelect=ge.current,ge.current=void 0),clearTimeout(de.current)}),[]);N.useEffect((()=>()=>{clearTimeout(le.current),clearTimeout(ce.current),clearTimeout(ue.current),ve()}),[ve]);const Ae=e=>{clearTimeout(bh),Ah=!0,fe(!0),V&&!me&&V(e)},be=st((e=>{clearTimeout(bh),bh=setTimeout((()=>{Ah=!1}),800+I),fe(!1),H&&me&&H(e),clearTimeout(le.current),le.current=setTimeout((()=>{ie.current=!1}),$.transitions.duration.shortest)})),ye=e=>{ie.current&&"touchstart"!==e.type||(ne&&ne.removeAttribute("title"),clearTimeout(ce.current),clearTimeout(ue.current),T||Ah&&k?ce.current=setTimeout((()=>{Ae(e)}),Ah?k:T):Ae(e))},xe=e=>{clearTimeout(ce.current),clearTimeout(ue.current),ue.current=setTimeout((()=>{be(e)}),I)},{isFocusVisibleRef:we,onBlur:ze,onFocus:Oe,ref:Ce}=vt(),[,je]=N.useState(!1),Pe=e=>{ze(e),!1===we.current&&(je(!1),xe(e))},Be=e=>{ne||re(e.currentTarget),Oe(e),!0===we.current&&(je(!0),ye(e))},De=e=>{ie.current=!0;const t=_.props;t.onTouchStart&&t.onTouchStart(e)},Me=ye,Te=xe,Ne=e=>{De(e),clearTimeout(ue.current),clearTimeout(le.current),ve(),ge.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",de.current=setTimeout((()=>{document.body.style.WebkitUserSelect=ge.current,ye(e)}),E)},ke=e=>{_.props.onTouchEnd&&_.props.onTouchEnd(e),ve(),clearTimeout(ue.current),ue.current=setTimeout((()=>{be(e)}),S)};N.useEffect((()=>{if(me)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"!==e.key&&"Esc"!==e.key||be(e)}}),[be,me]);const Ee=lt(_.ref,Ce,re,t);q||0===q||(me=!1);const Le=N.useRef(),We={},Ie="string"==typeof q;j?(We.title=me||!Ie||B?null:q,We["aria-describedby"]=me?he:null):(We["aria-label"]=Ie?q:null,We["aria-labelledby"]=me&&!Ie?he:null);const Se=te({},We,J,_.props,{className:Kn(J.className,_.props.className),onTouchStart:De,ref:Ee},L?{onMouseMove:e=>{const t=_.props;t.onMouseMove&&t.onMouseMove(e),yh={x:e.clientX,y:e.clientY},Le.current&&Le.current.update()}}:{});"production"!==process.env.NODE_ENV&&(Se["data-mui-internal-clone-element"]=!0,N.useEffect((()=>{ne&&!ne.getAttribute("data-mui-internal-clone-element")&&console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.","Please make sure that props are spread on the same element that the ref is applied to."].join("\n"))}),[ne]));const He={};M||(Se.onTouchStart=Ne,Se.onTouchEnd=ke),B||(Se.onMouseOver=xh(Me,Se.onMouseOver),Se.onMouseLeave=xh(Te,Se.onMouseLeave),se||(He.onMouseOver=Me,He.onMouseLeave=Te)),P||(Se.onFocus=xh(Be,Se.onFocus),Se.onBlur=xh(Pe,Se.onBlur),se||(He.onFocus=Be,He.onBlur=Pe)),"production"!==process.env.NODE_ENV&&_.props.title&&console.error(["MUI: You have provided a `title` prop to the child of <Tooltip />.",`Remove this title prop \`${_.props.title}\` or the Tooltip component.`].join("\n"));const Ve=N.useMemo((()=>{var e;let t=[{name:"arrow",enabled:Boolean(oe),options:{element:oe,padding:4}}];return null!=(e=F.popperOptions)&&e.modifiers&&(t=t.concat(F.popperOptions.modifiers)),te({},F.popperOptions,{modifiers:t})}),[oe,F]),Xe=te({},x,{isRtl:ee,arrow:w,disableInteractive:se,placement:R,PopperComponentProp:Q,touch:ie.current}),Re=(e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:a}=e;return Dt({popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${Ze(a.split("-")[0])}`],arrow:["arrow"]},ph,t)})(Xe),Ye=null!=(n=null!=(r=Z.popper)?r:O.Popper)?n:hh,Qe=null!=(o=null!=(a=null!=(i=Z.transition)?i:O.Transition)?a:U)?o:Ru,Fe=null!=(s=null!=(l=Z.tooltip)?l:O.Tooltip)?s:gh,Ge=null!=(c=null!=(u=Z.arrow)?u:O.Arrow)?c:vh,qe=zo(Ye,te({},F,null!=(d=G.popper)?d:C.popper,{className:Kn(Re.popper,null==F?void 0:F.className,null==(p=null!=(f=G.popper)?f:C.popper)?void 0:p.className)}),Xe),Ue=zo(Qe,te({},K,null!=(m=G.transition)?m:C.transition),Xe),Ke=zo(Fe,te({},null!=(h=G.tooltip)?h:C.tooltip,{className:Kn(Re.tooltip,null==(g=null!=(v=G.tooltip)?v:C.tooltip)?void 0:g.className)}),Xe),Je=zo(Ge,te({},null!=(A=G.arrow)?A:C.arrow,{className:Kn(Re.arrow,null==(b=null!=(y=G.arrow)?y:C.arrow)?void 0:b.className)}),Xe);return Y.jsxs(N.Fragment,{children:[N.cloneElement(_,Se),Y.jsx(Ye,te({as:null!=Q?Q:Ud,placement:R,anchorEl:L?{getBoundingClientRect:()=>({top:yh.y,left:yh.x,right:yh.x,bottom:yh.y,width:0,height:0})}:ne,popperRef:Le,open:!!ne&&me,id:he,transition:!0},He,qe,{popperOptions:Ve,children:({TransitionProps:e})=>Y.jsx(Qe,te({timeout:$.transitions.duration.shorter},e,Ue,{children:Y.jsxs(Fe,te({},Ke,{children:[q,w?Y.jsx(Ge,te({},Je,{ref:ae})):null]}))}))}))]})}));"production"!==process.env.NODE_ENV&&(wh.propTypes={arrow:De.bool,children:Ne.isRequired,classes:De.object,className:De.string,components:De.shape({Arrow:De.elementType,Popper:De.elementType,Tooltip:De.elementType,Transition:De.elementType}),componentsProps:De.shape({arrow:De.object,popper:De.object,tooltip:De.object,transition:De.object}),describeChild:De.bool,disableFocusListener:De.bool,disableHoverListener:De.bool,disableInteractive:De.bool,disableTouchListener:De.bool,enterDelay:De.number,enterNextDelay:De.number,enterTouchDelay:De.number,followCursor:De.bool,id:De.string,leaveDelay:De.number,leaveTouchDelay:De.number,onClose:De.func,onOpen:De.func,open:De.bool,placement:De.oneOf(["bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:De.elementType,PopperProps:De.object,slotProps:De.shape({arrow:De.object,popper:De.object,tooltip:De.object,transition:De.object}),slots:De.shape({arrow:De.elementType,popper:De.elementType,tooltip:De.elementType,transition:De.elementType}),sx:De.oneOfType([De.arrayOf(De.oneOfType([De.func,De.object,De.bool])),De.func,De.object]),title:De.node,TransitionComponent:De.elementType,TransitionProps:De.object});var zh=wh;var Oh=Et("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);function Ch(e){return kt("MuiListItemIcon",e)}var jh=Et("MuiListItemIcon",["root","alignItemsFlexStart"]);const Ph=["className"],Bh=fo("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})((({theme:e,ownerState:t})=>te({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8}))),Dh=N.forwardRef((function(e,t){const n=co({props:e,name:"MuiListItemIcon"}),{className:r}=n,o=It(n,Ph),a=te({},n,{alignItems:N.useContext(zu).alignItems}),i=(e=>{const{alignItems:t,classes:n}=e;return Dt({root:["root","flex-start"===t&&"alignItemsFlexStart"]},Ch,n)})(a);return Y.jsx(Bh,te({className:Kn(i.root,r),ownerState:a,ref:t},o))}));"production"!==process.env.NODE_ENV&&(Dh.propTypes={children:De.node,classes:De.object,className:De.string,sx:De.oneOfType([De.arrayOf(De.oneOfType([De.func,De.object,De.bool])),De.func,De.object])});var Mh=Dh;function Th(e){return kt("MuiListItemText",e)}var Nh=Et("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);const kh=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],Eh=fo("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Nh.primary}`]:t.primary},{[`& .${Nh.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})((({ownerState:e})=>te({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56}))),Lh=N.forwardRef((function(e,t){const n=co({props:e,name:"MuiListItemText"}),{children:r,className:o,disableTypography:a=!1,inset:i=!1,primary:s,primaryTypographyProps:l,secondary:c,secondaryTypographyProps:u}=n,d=It(n,kh),{dense:p}=N.useContext(zu);let f=null!=s?s:r,m=c;const h=te({},n,{disableTypography:a,inset:i,primary:!!f,secondary:!!m,dense:p}),g=(e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:a}=e;return Dt({root:["root",n&&"inset",a&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},Th,t)})(h);return null==f||f.type===jf||a||(f=Y.jsx(jf,te({variant:p?"body2":"body1",className:g.primary,component:null!=l&&l.variant?void 0:"span",display:"block"},l,{children:f}))),null==m||m.type===jf||a||(m=Y.jsx(jf,te({variant:"body2",className:g.secondary,color:"text.secondary",display:"block"},u,{children:m}))),Y.jsxs(Eh,te({className:Kn(g.root,o),ownerState:h,ref:t},d,{children:[f,m]}))}));"production"!==process.env.NODE_ENV&&(Lh.propTypes={children:De.node,classes:De.object,className:De.string,disableTypography:De.bool,inset:De.bool,primary:De.node,primaryTypographyProps:De.object,secondary:De.node,secondaryTypographyProps:De.object,sx:De.oneOfType([De.arrayOf(De.oneOfType([De.func,De.object,De.bool])),De.func,De.object])});var Wh=Lh;function Ih(e){return kt("MuiMenuItem",e)}var Sh=Et("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);const Hh=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],Vh=fo(xp,{shouldForwardProp:e=>uo(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((({theme:e,ownerState:t})=>te({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Sh.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:gr(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Sh.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:gr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Sh.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:gr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:gr(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Sh.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Sh.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${ii.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${ii.inset}`]:{marginLeft:52},[`& .${Nh.root}`]:{marginTop:0,marginBottom:0},[`& .${Nh.inset}`]:{paddingLeft:36},[`& .${jh.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&te({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${jh.root} svg`]:{fontSize:"1.25rem"}})))),Xh=N.forwardRef((function(e,t){const n=co({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:o="li",dense:a=!1,divider:i=!1,disableGutters:s=!1,focusVisibleClassName:l,role:c="menuitem",tabIndex:u,className:d}=n,p=It(n,Hh),f=N.useContext(zu),m=N.useMemo((()=>({dense:a||f.dense||!1,disableGutters:s})),[f.dense,a,s]),h=N.useRef(null);tt((()=>{r&&(h.current?h.current.focus():"production"!==process.env.NODE_ENV&&console.error("MUI: Unable to set focus to a MenuItem whose component has not been rendered."))}),[r]);const g=te({},n,{dense:m.dense,divider:i,disableGutters:s}),v=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:a,classes:i}=e;return te({},i,Dt({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",a&&"selected"]},Ih,i))})(n),A=lt(h,t);let b;return n.disabled||(b=void 0!==u?u:-1),Y.jsx(zu.Provider,{value:m,children:Y.jsx(Vh,te({ref:A,role:c,tabIndex:b,component:o,focusVisibleClassName:Kn(v.focusVisible,l),className:Kn(v.root,d)},p,{ownerState:g,classes:v}))})}));"production"!==process.env.NODE_ENV&&(Xh.propTypes={autoFocus:De.bool,children:De.node,classes:De.object,className:De.string,component:De.elementType,dense:De.bool,disabled:De.bool,disableGutters:De.bool,divider:De.bool,focusVisibleClassName:De.string,role:De.string,selected:De.bool,sx:De.oneOfType([De.arrayOf(De.oneOfType([De.func,De.object,De.bool])),De.func,De.object]),tabIndex:De.number});var Rh=Xh,Yh=function(e){var t=e.theme,n=e.bgcolor,r=e.dropdown;return Q(Q(Q({},Fh(Q({blur:20,opacity:.9,color:t.palette.background.paper},!!n&&{color:n}))),{backgroundImage:"url(/assets/cyan-blur.png), url(/assets/red-blur.png)",backgroundRepeat:"no-repeat, no-repeat",backgroundPosition:"top right, left bottom",backgroundSize:"50%, 50%"}),r&&{padding:t.spacing(.5),boxShadow:t.customShadows.dropdown,borderRadius:1.25*t.shape.borderRadius})},Qh=function(e){var t;return Q(Q({},e.typography.body2),((t={padding:e.spacing(.75,1),borderRadius:.75*e.shape.borderRadius,"&:not(:last-of-type)":{marginBottom:4}})["&.".concat(Sh.selected)]={fontWeight:e.typography.fontWeightSemiBold,backgroundColor:e.palette.action.selected,"&:hover":{backgroundColor:e.palette.action.hover}},t["& .".concat(Oh.root)]={padding:e.spacing(.5),marginLeft:e.spacing(-.5),marginRight:e.spacing(.5)},t["&.".concat(Xp.option,'[aria-selected="true"]')]={backgroundColor:e.palette.action.selected,"&:hover":{backgroundColor:e.palette.action.hover}},t["&+.".concat(ii.root)]={margin:e.spacing(.5,0)},t))};function Fh(e){var t=(null==e?void 0:e.color)||"#000000",n=(null==e?void 0:e.blur)||6,r=(null==e?void 0:e.opacity)||.8,o=null==e?void 0:e.imgUrl;return o?{position:"relative",backgroundImage:"url(".concat(o,")"),"&:before":{position:"absolute",top:0,left:0,zIndex:9,content:'""',width:"100%",height:"100%",backdropFilter:"blur(".concat(n,"px)"),WebkitBackdropFilter:"blur(".concat(n,"px)"),backgroundColor:gr(t,r)}}:{backdropFilter:"blur(".concat(n,"px)"),WebkitBackdropFilter:"blur(".concat(n,"px)"),backgroundColor:gr(t,r)}}var Gh={x:{msOverflowStyle:"none",scrollbarWidth:"none",overflowX:"scroll","&::-webkit-scrollbar":{display:"none"}},y:{msOverflowStyle:"none",scrollbarWidth:"none",overflowY:"scroll","&::-webkit-scrollbar":{display:"none"}}};function Zh(e){var t=e.onDownload,n=lo();return Y.jsx(Pp,{onClick:t,sx:{p:0,top:0,right:0,width:1,height:1,zIndex:9,opacity:0,position:"absolute",borderRadius:"unset",justifyContent:"center",bgcolor:"grey.800",color:"common.white",transition:n.transitions.create(["opacity"]),"&:hover":Q({opacity:1},Fh({opacity:.64,color:n.palette.grey[900]}))},children:Y.jsx(yo,{icon:"eva:arrow-circle-down-fill",width:24})})}var qh,Uh=e.createContext({statusCode:null,dashbaordUrlPrefix:""});exports.RequestState=void 0,(qh=exports.RequestState||(exports.RequestState={})).IDLE="idle",qh.LOADING="loading",qh.SUCCEEDED="succeeded",qh.FAILED="failed";var Kh=function(){function e(e,t,n){this.data=e,this.state=t,this.error=n}return e.idle=function(t){var n=new e(t,exports.RequestState.IDLE);return Q({},n)},e.loading=function(t){var n=new e(t,exports.RequestState.LOADING);return Q({},n)},e.succeeded=function(t){var n=new e(t,exports.RequestState.SUCCEEDED);return Q({},n)},e.error=function(t,n){var r=new e(n,exports.RequestState.FAILED,t);return Q({},r)},e}();function Jh(){var t=e.useState(Kh.idle),n=t[0],r=t[1],o=e.useContext(Uh).dashbaordUrlPrefix,a=e.useCallback((function(e){r(Kh.loading()),Bm.get("".concat(o,"/").concat(e.url),Q(Q({},e.axiosRequestConfig),{params:e.query})).then((function(e){var t=e.data.data;r(Kh.succeeded(t))})).catch((function(e){var t,n=JSON.parse(null!==(t=e.message)&&void 0!==t?t:"{}");r(Kh.error(n))}))}),[]),i=e.useCallback((function(e){r(Kh.loading()),Bm.post("".concat(o,"/").concat(e.url),e.body,Q(Q({},e.axiosRequestConfig),{params:e.query})).then((function(e){var t=e.data.data;r(Kh.succeeded(t))})).catch((function(e){var t,n=JSON.parse(null!==(t=e.message)&&void 0!==t?t:"{}");r(Kh.error(n))}))}),[]),s=e.useCallback((function(e){r(Kh.loading()),Bm.patch("".concat(o,"/").concat(e.url),e.body,Q(Q({},e.axiosRequestConfig),{params:e.query})).then((function(e){var t=e.data.data;r(Kh.succeeded(t))})).catch((function(e){var t,n=JSON.parse(null!==(t=e.message)&&void 0!==t?t:"{}");r(Kh.error(n))}))}),[]),l=e.useCallback((function(e){r(Kh.loading()),Bm.delete("".concat(o,"/").concat(e.url),Q(Q({},e.axiosRequestConfig),{params:e.query})).then((function(e){var t=e.data.data;r(Kh.succeeded(t))})).catch((function(e){var t,n=JSON.parse(null!==(t=e.message)&&void 0!==t?t:"{}");r(Kh.error(n))}))}),[]);return{requestState:n,get:a,post:i,patch:s,remove:l}}function _h(){return O.configure({showSpinner:!1}),e.useMemo((function(){O.start()}),[]),e.useEffect((function(){O.done()}),[]),null}var $h=fo("div")((function(e){return{right:0,bottom:0,zIndex:99999,width:"100%",height:"100%",position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:e.theme.palette.background.default}}));function eg(e){var t=e.isDashboard,r=e.loadingLogo,o=e.logoSxProps,a=F(e,["isDashboard","loadingLogo","logoSxProps"]);return Y.jsxs(Y.Fragment,{children:[Y.jsx(_h,{}),!t&&Y.jsxs($h,Q({},a,{children:[Y.jsx(p.m.div,{animate:{scale:[1,.9,.9,1,1],opacity:[1,.48,.48,1,1]},transition:{duration:2,ease:"easeInOut",repeatDelay:1,repeat:1/0},children:Y.jsx(n.Box,{sx:Q({width:200},o),children:Y.jsx(Ti,{visibleByDefault:!0,disabledEffect:!0,src:r,alt:"logo"})})}),Y.jsx(n.Box,{component:p.m.div,animate:{scale:[1.2,1,1,1.2,1.2],rotate:[270,0,0,270,270],opacity:[.25,1,1,1,.25],borderRadius:["25%","25%","50%","50%","25%"]},transition:{ease:"linear",duration:3.2,repeat:1/0},sx:{width:100,height:100,borderRadius:"25%",position:"absolute",border:function(e){return"solid 3px ".concat(gr(e.palette.primary.dark,.24))}}}),Y.jsx(n.Box,{component:p.m.div,animate:{scale:[1,1.2,1.2,1,1],rotate:[0,270,270,0,0],opacity:[1,.25,.25,.25,1],borderRadius:["25%","25%","50%","50%","25%"]},transition:{ease:"linear",duration:3.2,repeat:1/0},sx:{width:120,height:120,borderRadius:"25%",position:"absolute",border:function(e){return"solid 8px ".concat(gr(e.palette.primary.dark,.24))}}})]}))]})}var tg=e.createContext({resources:null,getResources:function(){},state:exports.RequestState.IDLE}),ng=e.createContext({paths:{},root:"",home:""});function rg(e,t){return"".concat(e).concat(t)}var og=fo("span")((function(e){var t=e.arrow,n=e.theme,r=-6.5,o={top:r,transform:"rotate(135deg)"},a={bottom:r,transform:"rotate(-45deg)"},i={left:r,transform:"rotate(45deg)"},s={right:r,transform:"rotate(-135deg)"};return Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q({width:14,height:14,position:"absolute",borderBottomLeftRadius:3.5,clipPath:"polygon(0% 0%, 100% 100%, 0% 100%)",border:"solid 1px ".concat(gr("light"===n.palette.mode?n.palette.grey[500]:n.palette.common.black,.12))},Fh({color:n.palette.background.paper})),"top-left"===t&&Q(Q({},o),{left:20})),"top-center"===t&&Q(Q({},o),{left:0,right:0,margin:"auto"})),"top-right"===t&&Q(Q({},o),{right:20})),"bottom-left"===t&&Q(Q({},a),{left:20})),"bottom-center"===t&&Q(Q({},a),{left:0,right:0,margin:"auto"})),"bottom-right"===t&&Q(Q({},a),{right:20})),"left-top"===t&&Q(Q({},i),{top:20})),"left-center"===t&&Q(Q({},i),{top:0,bottom:0,margin:"auto"})),"left-bottom"===t&&Q(Q({},i),{bottom:20})),"right-top"===t&&Q(Q({},s),{top:20})),"right-center"===t&&Q(Q({},s),{top:0,bottom:0,margin:"auto"})),"right-bottom"===t&&Q(Q({},s),{bottom:20}))}));function ag(e){var t,n=e.open,r=e.children,o=e.arrow,a=void 0===o?"top-right":o,i=e.hiddenArrow,s=e.sx,l=F(e,["open","children","arrow","hiddenArrow","sx"]),c=function(e){var t;switch(e){case"top-left":t={style:{ml:-.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"top-center":t={style:{},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}};break;case"top-right":default:t={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"bottom-left":t={style:{ml:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"bottom-center":t={style:{},anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}};break;case"bottom-right":t={style:{ml:.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;case"left-top":t={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"left-center":t={anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}};break;case"left-bottom":t={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"right-top":t={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"right-center":t={anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}};break;case"right-bottom":t={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"right"}}}return t}(a),u=c.style,d=c.anchorOrigin,p=c.transformOrigin;return Y.jsxs(td,Q({open:Boolean(n),anchorEl:n,anchorOrigin:d,transformOrigin:p,PaperProps:{sx:Q(Q(Q({width:"auto",overflow:"inherit"},u),(t={},t["& .".concat(Sh.root)]={"& svg":{mr:2,flexShrink:0}},t)),s)}},l,{children:[!i&&Y.jsx(og,{arrow:a}),r]}))}function ig(e){var t=e.actions,r=e.open,o=e.onClose,a=e.onOpen;return Y.jsxs(Y.Fragment,{children:[Y.jsx(n.IconButton,{onClick:a,children:Y.jsx(yo,{icon:"eva:more-vertical-fill",width:20,height:20})}),Y.jsx(ag,{open:r,anchorEl:r,onClose:o,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"},arrow:"right-top",sx:{mt:-1,width:160,"& .MuiMenuItem-root":{px:1,typography:"body2",borderRadius:.75,"& svg":{mr:2,width:20,height:20}}},children:t})]})}function sg(){var t=e.useContext(tg).resources,n=e.useContext(ng).paths;if(!t)return[];var r=t.modelParents;return e.useMemo((function(){var e=[];for(var o in r){for(var a=[],i=r[o],s=t[i[0]].properties.parent,l=s.icon,c={title:s.value,icon:Xm(l),children:a},u=0;u<i.length;u++){var d=t[i[u]];a.push({title:d.properties.name,path:n[i[u]]?n[i[u]].list:""})}c.children=a,e.push(c)}return[{subheader:"",items:e||[]}]}),[t])}var lg=e.createContext({textFieldSize:"small",themeLayout:"vertical",defaultRowsPerPage:50,themeStretch:!0,loadingLoago:"",navBarLogo:"",miniNavBarLogo:""}),cg=e.createContext({identityPoolId:"",region:"",userPoolId:"",userPoolWebClientId:"",bucket:"",googleApiKey:"",bucketUrl:""}),ug=e.createContext({setAlert:function(e,t,n){},setErrorAlert:function(e,t){},setSuccessAlert:function(e,t){}});var dg=e.createContext({openDialog:function(e,t){}});var pg,fg=function(){return e.useContext(lg)},mg=function(){return e.useContext(tg)},hg=function(){return e.useContext(ug)},gg=function(){return e.useContext(ng)};function vg(e){var t=e.title,r=e.children,o=e.type;return Y.jsxs(n.Grid,{item:!0,xs:12,md:o===ym.NESTEDSCHEMA||o===ym.ARRAY?12:6,sx:{mb:3.5},children:[Y.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:t}),r]})}function Ag(e){var t=e.fieldschema;return Y.jsx(vg,Q({},e,{type:ym.ARRAY,children:Y.jsx(Ug,Q({},e,{type:ym.ARRAY,children:function(n,r){return Y.jsx(Ug,Q({},e,{type:t.arrayType,value:n}))}}))}))}function bg(e){return Y.jsx(vg,Q({},e,{children:Y.jsx(Ug,Q({type:ym.BOOLEAN},e))}))}function yg(e){return Y.jsx(vg,Q({},e,{children:Y.jsx(Ug,Q({type:ym.COLOR},e))}))}function xg(e){return Y.jsx(vg,Q({},e,{children:Y.jsx(Ug,Q({type:ym.DATE},e))}))}function wg(e){return Y.jsx(vg,Q({},e,{children:Y.jsx(Ug,Q({type:ym.ENUM},e))}))}function zg(e){return Y.jsx(vg,Q({},e,{children:Y.jsx(Ug,Q({type:ym.IMAGE},e))}))}function Og(e){return Y.jsx(vg,Q({},e,{children:Y.jsx(Ug,Q({type:ym.LOCALIZEDString},e))}))}function Cg(e){return Y.jsx(vg,Q({},e,{children:Y.jsx(Ug,Q({type:ym.LOCATION},e))}))}function jg(e){return Y.jsx(vg,Q({},e,{type:ym.NESTEDSCHEMA,children:Y.jsx(Ug,Q({type:ym.NESTEDSCHEMA},e))}))}function Pg(e){return Y.jsx(vg,Q({},e,{children:Y.jsx(Ug,Q({type:ym.REFERENCE},e))}))}function Bg(e){return Y.jsx(vg,Q({},e,{children:Y.jsx(Ug,Q({type:ym.STRING},e))}))}function Dg(e){return Y.jsx(vg,Q({},e,{children:Y.jsx(Ug,Q({type:ym.RICH_TEXT_I},e))}))}function Mg(e){var t,n=e.property,r=e.schema,o=e.record,a=e.userpath,i=e.resources,s=n.key,l=n.path,c=r[s],u=null==n?void 0:n.value,d=o[s],p={fieldkey:s,key:s,title:u,value:d,resources:i,userpath:a,path:l,fieldschema:c,color:"black",type:c.type};switch(c.type){case ym.STRING:return/^#[0-9A-F]{6}$/i.test(d)?Y.jsx(yg,Q({},p)):"object"==typeof d?Y.jsx(Bg,Q({},p,{title:u||qg,value:d[0]&&null!==(t=Pm.getLocalizedString(d))&&void 0!==t?t:qg})):Y.jsx(Bg,Q({},p));case ym.NUMBER:case ym.OBJECTID:case ym.PHONENUMBER:case ym.TIMEPICKER:return Y.jsx(Bg,Q({},p));case ym.DATE:return Y.jsx(xg,Q({},p));case ym.LOCATION:return Y.jsx(Cg,Q({},p,{value:{address:d.address,longitude:d.longitude,latitude:d.latitude}}));case ym.ENUM:return Y.jsx(wg,Q({},p,{enumvalues:c.enumValues}));case ym.IMAGE:return Y.jsx(zg,Q({},p));case ym.BOOLEAN:return Y.jsx(bg,Q({},p));case ym.NESTEDSCHEMA:return Y.jsx(jg,Q({},p,{fieldschema:r[s]}));case ym.LOCALIZEDString:return Y.jsx(Og,Q({},p));case ym.RICH_TEXT_I:return Y.jsx(Dg,Q({},p));case ym.ARRAY:return Y.jsx(Ag,Q({},p,{fieldschema:c,enumvalues:c.enumValues}));case ym.REFERENCE:return Y.jsx(Pg,Q({},p))}return Y.jsx(Y.Fragment,{})}function Tg(e){var t,r=e.fieldschema,o=e.value;return Y.jsx(n.Card,{sx:{py:3,px:3},children:Y.jsx(n.Grid,{container:!0,children:null===(t=null==r?void 0:r.keys)||void 0===t?void 0:t.map((function(t){var n;return(n=JSON.parse(JSON.stringify(null==r?void 0:r.schema[t]))).key=t,o&&Y.jsx(Mg,Q({},e,{property:n,schema:r.schema,record:o}),n.key)}))})})}function Ng(e){var t=e.value;return Y.jsx(n.Card,{sx:{py:3,px:3},children:Y.jsx(n.Stack,{direction:"column",spacing:2,children:t.map((function(e,t){return Y.jsxs(n.Stack,{direction:"row",spacing:1,children:[Y.jsx(Ti,{disabledEffect:!0,visibleByDefault:!0,alt:"empty content",src:kg(e.key),sx:{width:30,height:20}}),Y.jsx(n.Typography,{fontWeight:600,fontSize:14,children:e.value})]},t+e.key)}))})})}function kg(e){switch(e){case wm.ARABIC:return pg.ARABIC_FLAG;case wm.ENGLISH:default:return pg.ENGLISH_FLAG}}function Eg(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}!function(e){e.ENGLISH_FLAG="https://pngimg.com/uploads/flags/flags_PNG14592.png",e.ARABIC_FLAG="/assets/icons/flags/ic_flag_sa.svg"}(pg||(pg={}));var Lg={exports:{}};!function(e,t){e.exports=function(){var t,n;function r(){return t.apply(null,arguments)}function o(e){t=e}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(s(e,t))return!1;return!0}function c(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function p(e,t){var n,r=[],o=e.length;for(n=0;n<o;++n)r.push(t(e[n],n));return r}function f(e,t){for(var n in t)s(t,n)&&(e[n]=t[n]);return s(t,"toString")&&(e.toString=t.toString),s(t,"valueOf")&&(e.valueOf=t.valueOf),e}function m(e,t,n,r){return qn(e,t,n,r,!0).utc()}function h(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function g(e){return null==e._pf&&(e._pf=h()),e._pf}function v(e){if(null==e._isValid){var t=g(e),r=n.call(t.parsedDateParts,(function(e){return null!=e})),o=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r);if(e._strict&&(o=o&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return o;e._isValid=o}return e._isValid}function A(e){var t=m(NaN);return null!=e?f(g(t),e):g(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var b=r.momentProperties=[],y=!1;function x(e,t){var n,r,o,a=b.length;if(c(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),c(t._i)||(e._i=t._i),c(t._f)||(e._f=t._f),c(t._l)||(e._l=t._l),c(t._strict)||(e._strict=t._strict),c(t._tzm)||(e._tzm=t._tzm),c(t._isUTC)||(e._isUTC=t._isUTC),c(t._offset)||(e._offset=t._offset),c(t._pf)||(e._pf=g(t)),c(t._locale)||(e._locale=t._locale),a>0)for(n=0;n<a;n++)c(o=t[r=b[n]])||(e[r]=o);return e}function w(e){x(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===y&&(y=!0,r.updateOffset(this),y=!1)}function z(e){return e instanceof w||null!=e&&null!=e._isAMomentObject}function O(e){!1===r.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function C(e,t){var n=!0;return f((function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),n){var o,a,i,l=[],c=arguments.length;for(a=0;a<c;a++){if(o="","object"==typeof arguments[a]){for(i in o+="\n["+a+"] ",arguments[0])s(arguments[0],i)&&(o+=i+": "+arguments[0][i]+", ");o=o.slice(0,-2)}else o=arguments[a];l.push(o)}O(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var j,P={};function B(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),P[e]||(O(t),P[e]=!0)}function D(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function M(e){var t,n;for(n in e)s(e,n)&&(D(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function T(e,t){var n,r=f({},e);for(n in t)s(t,n)&&(i(e[n])&&i(t[n])?(r[n]={},f(r[n],e[n]),f(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)s(e,n)&&!s(t,n)&&i(e[n])&&(r[n]=f({},r[n]));return r}function N(e){null!=e&&this.set(e)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,j=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)s(e,t)&&n.push(t);return n};var k={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function E(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return D(r)?r.call(t,n):r}function L(e,t,n){var r=""+Math.abs(e),o=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}var W=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,I=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,S={},H={};function V(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(H[e]=o),t&&(H[t[0]]=function(){return L(o.apply(this,arguments),t[1],t[2])}),n&&(H[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function X(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function R(e){var t,n,r=e.match(W);for(t=0,n=r.length;t<n;t++)H[r[t]]?r[t]=H[r[t]]:r[t]=X(r[t]);return function(t){var o,a="";for(o=0;o<n;o++)a+=D(r[o])?r[o].call(t,e):r[o];return a}}function Y(e,t){return e.isValid()?(t=Q(t,e.localeData()),S[t]=S[t]||R(t),S[t](e)):e.localeData().invalidDate()}function Q(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(I.lastIndex=0;n>=0&&I.test(e);)e=e.replace(I,r),I.lastIndex=0,n-=1;return e}var F={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function G(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(W).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var Z="Invalid date";function q(){return this._invalidDate}var U="%d",K=/\d{1,2}/;function J(e){return this._ordinal.replace("%d",e)}var _={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function $(e,t,n,r){var o=this._relativeTime[n];return D(o)?o(e,t,n,r):o.replace(/%d/i,e)}function ee(e,t){var n=this._relativeTime[e>0?"future":"past"];return D(n)?n(t):n.replace(/%s/i,t)}var te={};function ne(e,t){var n=e.toLowerCase();te[n]=te[n+"s"]=te[t]=e}function re(e){return"string"==typeof e?te[e]||te[e.toLowerCase()]:void 0}function oe(e){var t,n,r={};for(n in e)s(e,n)&&(t=re(n))&&(r[t]=e[n]);return r}var ae={};function ie(e,t){ae[e]=t}function se(e){var t,n=[];for(t in e)s(e,t)&&n.push({unit:t,priority:ae[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}function le(e){return e%4==0&&e%100!=0||e%400==0}function ce(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function ue(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=ce(t)),n}function de(e,t){return function(n){return null!=n?(fe(this,e,n),r.updateOffset(this,t),this):pe(this,e)}}function pe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function fe(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&le(e.year())&&1===e.month()&&29===e.date()?(n=ue(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),$e(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function me(e){return D(this[e=re(e)])?this[e]():this}function he(e,t){if("object"==typeof e){var n,r=se(e=oe(e)),o=r.length;for(n=0;n<o;n++)this[r[n].unit](e[r[n].unit])}else if(D(this[e=re(e)]))return this[e](t);return this}var ge,ve=/\d/,Ae=/\d\d/,be=/\d{3}/,ye=/\d{4}/,xe=/[+-]?\d{6}/,we=/\d\d?/,ze=/\d\d\d\d?/,Oe=/\d\d\d\d\d\d?/,Ce=/\d{1,3}/,je=/\d{1,4}/,Pe=/[+-]?\d{1,6}/,Be=/\d+/,De=/[+-]?\d+/,Me=/Z|[+-]\d\d:?\d\d/gi,Te=/Z|[+-]\d\d(?::?\d\d)?/gi,Ne=/[+-]?\d+(\.\d{1,3})?/,ke=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function Ee(e,t,n){ge[e]=D(t)?t:function(e,r){return e&&n?n:t}}function Le(e,t){return s(ge,e)?ge[e](t._strict,t._locale):new RegExp(We(e))}function We(e){return Ie(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,o){return t||n||r||o})))}function Ie(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}ge={};var Se={};function He(e,t){var n,r,o=t;for("string"==typeof e&&(e=[e]),u(t)&&(o=function(e,n){n[t]=ue(e)}),r=e.length,n=0;n<r;n++)Se[e[n]]=o}function Ve(e,t){He(e,(function(e,n,r,o){r._w=r._w||{},t(e,r._w,r,o)}))}function Xe(e,t,n){null!=t&&s(Se,e)&&Se[e](t,n._a,n,e)}var Re,Ye=0,Qe=1,Fe=2,Ge=3,Ze=4,qe=5,Ue=6,Ke=7,Je=8;function _e(e,t){return(e%t+t)%t}function $e(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=_e(t,12);return e+=(t-n)/12,1===n?le(e)?29:28:31-n%7%2}Re=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},V("M",["MM",2],"Mo",(function(){return this.month()+1})),V("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),V("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),ne("month","M"),ie("month",8),Ee("M",we),Ee("MM",we,Ae),Ee("MMM",(function(e,t){return t.monthsShortRegex(e)})),Ee("MMMM",(function(e,t){return t.monthsRegex(e)})),He(["M","MM"],(function(e,t){t[Qe]=ue(e)-1})),He(["MMM","MMMM"],(function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);null!=o?t[Qe]=o:g(n).invalidMonth=e}));var et="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),tt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),nt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,rt=ke,ot=ke;function at(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||nt).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months.standalone}function it(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[nt.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function st(e,t,n){var r,o,a,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=m([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(o=Re.call(this._shortMonthsParse,i))?o:null:-1!==(o=Re.call(this._longMonthsParse,i))?o:null:"MMM"===t?-1!==(o=Re.call(this._shortMonthsParse,i))||-1!==(o=Re.call(this._longMonthsParse,i))?o:null:-1!==(o=Re.call(this._longMonthsParse,i))||-1!==(o=Re.call(this._shortMonthsParse,i))?o:null}function lt(e,t,n){var r,o,a;if(this._monthsParseExact)return st.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=m([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function ct(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=ue(t);else if(!u(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),$e(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function ut(e){return null!=e?(ct(this,e),r.updateOffset(this,!0),this):pe(this,"Month")}function dt(){return $e(this.year(),this.month())}function pt(e){return this._monthsParseExact?(s(this,"_monthsRegex")||mt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=rt),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function ft(e){return this._monthsParseExact?(s(this,"_monthsRegex")||mt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=ot),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function mt(){function e(e,t){return t.length-e.length}var t,n,r=[],o=[],a=[];for(t=0;t<12;t++)n=m([2e3,t]),r.push(this.monthsShort(n,"")),o.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(r.sort(e),o.sort(e),a.sort(e),t=0;t<12;t++)r[t]=Ie(r[t]),o[t]=Ie(o[t]);for(t=0;t<24;t++)a[t]=Ie(a[t]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function ht(e){return le(e)?366:365}V("Y",0,0,(function(){var e=this.year();return e<=9999?L(e,4):"+"+e})),V(0,["YY",2],0,(function(){return this.year()%100})),V(0,["YYYY",4],0,"year"),V(0,["YYYYY",5],0,"year"),V(0,["YYYYYY",6,!0],0,"year"),ne("year","y"),ie("year",1),Ee("Y",De),Ee("YY",we,Ae),Ee("YYYY",je,ye),Ee("YYYYY",Pe,xe),Ee("YYYYYY",Pe,xe),He(["YYYYY","YYYYYY"],Ye),He("YYYY",(function(e,t){t[Ye]=2===e.length?r.parseTwoDigitYear(e):ue(e)})),He("YY",(function(e,t){t[Ye]=r.parseTwoDigitYear(e)})),He("Y",(function(e,t){t[Ye]=parseInt(e,10)})),r.parseTwoDigitYear=function(e){return ue(e)+(ue(e)>68?1900:2e3)};var gt=de("FullYear",!0);function vt(){return le(this.year())}function At(e,t,n,r,o,a,i){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,o,a,i),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,o,a,i),s}function bt(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function yt(e,t,n){var r=7+t-n;return-(7+bt(e,0,r).getUTCDay()-t)%7+r-1}function xt(e,t,n,r,o){var a,i,s=1+7*(t-1)+(7+n-r)%7+yt(e,r,o);return s<=0?i=ht(a=e-1)+s:s>ht(e)?(a=e+1,i=s-ht(e)):(a=e,i=s),{year:a,dayOfYear:i}}function wt(e,t,n){var r,o,a=yt(e.year(),t,n),i=Math.floor((e.dayOfYear()-a-1)/7)+1;return i<1?r=i+zt(o=e.year()-1,t,n):i>zt(e.year(),t,n)?(r=i-zt(e.year(),t,n),o=e.year()+1):(o=e.year(),r=i),{week:r,year:o}}function zt(e,t,n){var r=yt(e,t,n),o=yt(e+1,t,n);return(ht(e)-r+o)/7}function Ot(e){return wt(e,this._week.dow,this._week.doy).week}V("w",["ww",2],"wo","week"),V("W",["WW",2],"Wo","isoWeek"),ne("week","w"),ne("isoWeek","W"),ie("week",5),ie("isoWeek",5),Ee("w",we),Ee("ww",we,Ae),Ee("W",we),Ee("WW",we,Ae),Ve(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=ue(e)}));var Ct={dow:0,doy:6};function jt(){return this._week.dow}function Pt(){return this._week.doy}function Bt(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Dt(e){var t=wt(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Mt(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Tt(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Nt(e,t){return e.slice(t,7).concat(e.slice(0,t))}V("d",0,"do","day"),V("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),V("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),V("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),V("e",0,0,"weekday"),V("E",0,0,"isoWeekday"),ne("day","d"),ne("weekday","e"),ne("isoWeekday","E"),ie("day",11),ie("weekday",11),ie("isoWeekday",11),Ee("d",we),Ee("e",we),Ee("E",we),Ee("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Ee("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Ee("dddd",(function(e,t){return t.weekdaysRegex(e)})),Ve(["dd","ddd","dddd"],(function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);null!=o?t.d=o:g(n).invalidWeekday=e})),Ve(["d","e","E"],(function(e,t,n,r){t[r]=ue(e)}));var kt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Et="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Lt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Wt=ke,It=ke,St=ke;function Ht(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Nt(n,this._week.dow):e?n[e.day()]:n}function Vt(e){return!0===e?Nt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Xt(e){return!0===e?Nt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Rt(e,t,n){var r,o,a,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=m([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(o=Re.call(this._weekdaysParse,i))?o:null:"ddd"===t?-1!==(o=Re.call(this._shortWeekdaysParse,i))?o:null:-1!==(o=Re.call(this._minWeekdaysParse,i))?o:null:"dddd"===t?-1!==(o=Re.call(this._weekdaysParse,i))||-1!==(o=Re.call(this._shortWeekdaysParse,i))||-1!==(o=Re.call(this._minWeekdaysParse,i))?o:null:"ddd"===t?-1!==(o=Re.call(this._shortWeekdaysParse,i))||-1!==(o=Re.call(this._weekdaysParse,i))||-1!==(o=Re.call(this._minWeekdaysParse,i))?o:null:-1!==(o=Re.call(this._minWeekdaysParse,i))||-1!==(o=Re.call(this._weekdaysParse,i))||-1!==(o=Re.call(this._shortWeekdaysParse,i))?o:null}function Yt(e,t,n){var r,o,a;if(this._weekdaysParseExact)return Rt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=m([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function Qt(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Mt(e,this.localeData()),this.add(e-t,"d")):t}function Ft(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Gt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Tt(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Zt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=Wt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function qt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=It),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Ut(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=St),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Kt(){function e(e,t){return t.length-e.length}var t,n,r,o,a,i=[],s=[],l=[],c=[];for(t=0;t<7;t++)n=m([2e3,1]).day(t),r=Ie(this.weekdaysMin(n,"")),o=Ie(this.weekdaysShort(n,"")),a=Ie(this.weekdays(n,"")),i.push(r),s.push(o),l.push(a),c.push(r),c.push(o),c.push(a);i.sort(e),s.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Jt(){return this.hours()%12||12}function _t(){return this.hours()||24}function $t(e,t){V(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function en(e,t){return t._meridiemParse}function tn(e){return"p"===(e+"").toLowerCase().charAt(0)}V("H",["HH",2],0,"hour"),V("h",["hh",2],0,Jt),V("k",["kk",2],0,_t),V("hmm",0,0,(function(){return""+Jt.apply(this)+L(this.minutes(),2)})),V("hmmss",0,0,(function(){return""+Jt.apply(this)+L(this.minutes(),2)+L(this.seconds(),2)})),V("Hmm",0,0,(function(){return""+this.hours()+L(this.minutes(),2)})),V("Hmmss",0,0,(function(){return""+this.hours()+L(this.minutes(),2)+L(this.seconds(),2)})),$t("a",!0),$t("A",!1),ne("hour","h"),ie("hour",13),Ee("a",en),Ee("A",en),Ee("H",we),Ee("h",we),Ee("k",we),Ee("HH",we,Ae),Ee("hh",we,Ae),Ee("kk",we,Ae),Ee("hmm",ze),Ee("hmmss",Oe),Ee("Hmm",ze),Ee("Hmmss",Oe),He(["H","HH"],Ge),He(["k","kk"],(function(e,t,n){var r=ue(e);t[Ge]=24===r?0:r})),He(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),He(["h","hh"],(function(e,t,n){t[Ge]=ue(e),g(n).bigHour=!0})),He("hmm",(function(e,t,n){var r=e.length-2;t[Ge]=ue(e.substr(0,r)),t[Ze]=ue(e.substr(r)),g(n).bigHour=!0})),He("hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[Ge]=ue(e.substr(0,r)),t[Ze]=ue(e.substr(r,2)),t[qe]=ue(e.substr(o)),g(n).bigHour=!0})),He("Hmm",(function(e,t,n){var r=e.length-2;t[Ge]=ue(e.substr(0,r)),t[Ze]=ue(e.substr(r))})),He("Hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[Ge]=ue(e.substr(0,r)),t[Ze]=ue(e.substr(r,2)),t[qe]=ue(e.substr(o))}));var nn=/[ap]\.?m?\.?/i,rn=de("Hours",!0);function on(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var an,sn={calendar:k,longDateFormat:F,invalidDate:Z,ordinal:U,dayOfMonthOrdinalParse:K,relativeTime:_,months:et,monthsShort:tt,week:Ct,weekdays:kt,weekdaysMin:Lt,weekdaysShort:Et,meridiemParse:nn},ln={},cn={};function un(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function dn(e){return e?e.toLowerCase().replace("_","-"):e}function pn(e){for(var t,n,r,o,a=0;a<e.length;){for(t=(o=dn(e[a]).split("-")).length,n=(n=dn(e[a+1]))?n.split("-"):null;t>0;){if(r=mn(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&un(o,n)>=t-1)break;t--}a++}return an}function fn(e){return null!=e.match("^[^/\\\\]*$")}function mn(t){var n=null;if(void 0===ln[t]&&e&&e.exports&&fn(t))try{n=an._abbr,Eg("./locale/"+t),hn(n)}catch(e){ln[t]=null}return ln[t]}function hn(e,t){var n;return e&&((n=c(t)?An(e):gn(e,t))?an=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),an._abbr}function gn(e,t){if(null!==t){var n,r=sn;if(t.abbr=e,null!=ln[e])B("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=ln[e]._config;else if(null!=t.parentLocale)if(null!=ln[t.parentLocale])r=ln[t.parentLocale]._config;else{if(null==(n=mn(t.parentLocale)))return cn[t.parentLocale]||(cn[t.parentLocale]=[]),cn[t.parentLocale].push({name:e,config:t}),null;r=n._config}return ln[e]=new N(T(r,t)),cn[e]&&cn[e].forEach((function(e){gn(e.name,e.config)})),hn(e),ln[e]}return delete ln[e],null}function vn(e,t){if(null!=t){var n,r,o=sn;null!=ln[e]&&null!=ln[e].parentLocale?ln[e].set(T(ln[e]._config,t)):(null!=(r=mn(e))&&(o=r._config),t=T(o,t),null==r&&(t.abbr=e),(n=new N(t)).parentLocale=ln[e],ln[e]=n),hn(e)}else null!=ln[e]&&(null!=ln[e].parentLocale?(ln[e]=ln[e].parentLocale,e===hn()&&hn(e)):null!=ln[e]&&delete ln[e]);return ln[e]}function An(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return an;if(!a(e)){if(t=mn(e))return t;e=[e]}return pn(e)}function bn(){return j(ln)}function yn(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[Qe]<0||n[Qe]>11?Qe:n[Fe]<1||n[Fe]>$e(n[Ye],n[Qe])?Fe:n[Ge]<0||n[Ge]>24||24===n[Ge]&&(0!==n[Ze]||0!==n[qe]||0!==n[Ue])?Ge:n[Ze]<0||n[Ze]>59?Ze:n[qe]<0||n[qe]>59?qe:n[Ue]<0||n[Ue]>999?Ue:-1,g(e)._overflowDayOfYear&&(t<Ye||t>Fe)&&(t=Fe),g(e)._overflowWeeks&&-1===t&&(t=Ke),g(e)._overflowWeekday&&-1===t&&(t=Je),g(e).overflow=t),e}var xn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,zn=/Z|[+-]\d\d(?::?\d\d)?/,On=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Cn=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],jn=/^\/?Date\((-?\d+)/i,Pn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Bn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Dn(e){var t,n,r,o,a,i,s=e._i,l=xn.exec(s)||wn.exec(s),c=On.length,u=Cn.length;if(l){for(g(e).iso=!0,t=0,n=c;t<n;t++)if(On[t][1].exec(l[1])){o=On[t][0],r=!1!==On[t][2];break}if(null==o)return void(e._isValid=!1);if(l[3]){for(t=0,n=u;t<n;t++)if(Cn[t][1].exec(l[3])){a=(l[2]||" ")+Cn[t][0];break}if(null==a)return void(e._isValid=!1)}if(!r&&null!=a)return void(e._isValid=!1);if(l[4]){if(!zn.exec(l[4]))return void(e._isValid=!1);i="Z"}e._f=o+(a||"")+(i||""),Xn(e)}else e._isValid=!1}function Mn(e,t,n,r,o,a){var i=[Tn(e),tt.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(o,10)];return a&&i.push(parseInt(a,10)),i}function Tn(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Nn(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function kn(e,t,n){return!e||Et.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(g(n).weekdayMismatch=!0,n._isValid=!1,!1)}function En(e,t,n){if(e)return Bn[e];if(t)return 0;var r=parseInt(n,10),o=r%100;return(r-o)/100*60+o}function Ln(e){var t,n=Pn.exec(Nn(e._i));if(n){if(t=Mn(n[4],n[3],n[2],n[5],n[6],n[7]),!kn(n[1],t,e))return;e._a=t,e._tzm=En(n[8],n[9],n[10]),e._d=bt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function Wn(e){var t=jn.exec(e._i);null===t?(Dn(e),!1===e._isValid&&(delete e._isValid,Ln(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:r.createFromInputFallback(e)))):e._d=new Date(+t[1])}function In(e,t,n){return null!=e?e:null!=t?t:n}function Sn(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Hn(e){var t,n,r,o,a,i=[];if(!e._d){for(r=Sn(e),e._w&&null==e._a[Fe]&&null==e._a[Qe]&&Vn(e),null!=e._dayOfYear&&(a=In(e._a[Ye],r[Ye]),(e._dayOfYear>ht(a)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=bt(a,0,e._dayOfYear),e._a[Qe]=n.getUTCMonth(),e._a[Fe]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=i[t]=r[t];for(;t<7;t++)e._a[t]=i[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ge]&&0===e._a[Ze]&&0===e._a[qe]&&0===e._a[Ue]&&(e._nextDay=!0,e._a[Ge]=0),e._d=(e._useUTC?bt:At).apply(null,i),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ge]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(g(e).weekdayMismatch=!0)}}function Vn(e){var t,n,r,o,a,i,s,l,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(a=1,i=4,n=In(t.GG,e._a[Ye],wt(Un(),1,4).year),r=In(t.W,1),((o=In(t.E,1))<1||o>7)&&(l=!0)):(a=e._locale._week.dow,i=e._locale._week.doy,c=wt(Un(),a,i),n=In(t.gg,e._a[Ye],c.year),r=In(t.w,c.week),null!=t.d?((o=t.d)<0||o>6)&&(l=!0):null!=t.e?(o=t.e+a,(t.e<0||t.e>6)&&(l=!0)):o=a),r<1||r>zt(n,a,i)?g(e)._overflowWeeks=!0:null!=l?g(e)._overflowWeekday=!0:(s=xt(n,r,o,a,i),e._a[Ye]=s.year,e._dayOfYear=s.dayOfYear)}function Xn(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],g(e).empty=!0;var t,n,o,a,i,s,l,c=""+e._i,u=c.length,d=0;for(l=(o=Q(e._f,e._locale).match(W)||[]).length,t=0;t<l;t++)a=o[t],(n=(c.match(Le(a,e))||[])[0])&&((i=c.substr(0,c.indexOf(n))).length>0&&g(e).unusedInput.push(i),c=c.slice(c.indexOf(n)+n.length),d+=n.length),H[a]?(n?g(e).empty=!1:g(e).unusedTokens.push(a),Xe(a,n,e)):e._strict&&!n&&g(e).unusedTokens.push(a);g(e).charsLeftOver=u-d,c.length>0&&g(e).unusedInput.push(c),e._a[Ge]<=12&&!0===g(e).bigHour&&e._a[Ge]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[Ge]=Rn(e._locale,e._a[Ge],e._meridiem),null!==(s=g(e).era)&&(e._a[Ye]=e._locale.erasConvertYear(s,e._a[Ye])),Hn(e),yn(e)}else Ln(e);else Dn(e)}function Rn(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function Yn(e){var t,n,r,o,a,i,s=!1,l=e._f.length;if(0===l)return g(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;o<l;o++)a=0,i=!1,t=x({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],Xn(t),v(t)&&(i=!0),a+=g(t).charsLeftOver,a+=10*g(t).unusedTokens.length,g(t).score=a,s?a<r&&(r=a,n=t):(null==r||a<r||i)&&(r=a,n=t,i&&(s=!0));f(e,n||t)}function Qn(e){if(!e._d){var t=oe(e._i),n=void 0===t.day?t.date:t.day;e._a=p([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),Hn(e)}}function Fn(e){var t=new w(yn(Gn(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Gn(e){var t=e._i,n=e._f;return e._locale=e._locale||An(e._l),null===t||void 0===n&&""===t?A({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),z(t)?new w(yn(t)):(d(t)?e._d=t:a(n)?Yn(e):n?Xn(e):Zn(e),v(e)||(e._d=null),e))}function Zn(e){var t=e._i;c(t)?e._d=new Date(r.now()):d(t)?e._d=new Date(t.valueOf()):"string"==typeof t?Wn(e):a(t)?(e._a=p(t.slice(0),(function(e){return parseInt(e,10)})),Hn(e)):i(t)?Qn(e):u(t)?e._d=new Date(t):r.createFromInputFallback(e)}function qn(e,t,n,r,o){var s={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(i(e)&&l(e)||a(e)&&0===e.length)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=o,s._l=n,s._i=e,s._f=t,s._strict=r,Fn(s)}function Un(e,t,n,r){return qn(e,t,n,r,!1)}r.createFromInputFallback=C("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),r.ISO_8601=function(){},r.RFC_2822=function(){};var Kn=C("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Un.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:A()})),Jn=C("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Un.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:A()}));function _n(e,t){var n,r;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return Un();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}function $n(){return _n("isBefore",[].slice.call(arguments,0))}function er(){return _n("isAfter",[].slice.call(arguments,0))}var tr=function(){return Date.now?Date.now():+new Date},nr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function rr(e){var t,n,r=!1,o=nr.length;for(t in e)if(s(e,t)&&(-1===Re.call(nr,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<o;++n)if(e[nr[n]]){if(r)return!1;parseFloat(e[nr[n]])!==ue(e[nr[n]])&&(r=!0)}return!0}function or(){return this._isValid}function ar(){return Br(NaN)}function ir(e){var t=oe(e),n=t.year||0,r=t.quarter||0,o=t.month||0,a=t.week||t.isoWeek||0,i=t.day||0,s=t.hour||0,l=t.minute||0,c=t.second||0,u=t.millisecond||0;this._isValid=rr(t),this._milliseconds=+u+1e3*c+6e4*l+1e3*s*60*60,this._days=+i+7*a,this._months=+o+3*r+12*n,this._data={},this._locale=An(),this._bubble()}function sr(e){return e instanceof ir}function lr(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function cr(e,t,n){var r,o=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),i=0;for(r=0;r<o;r++)(n&&e[r]!==t[r]||!n&&ue(e[r])!==ue(t[r]))&&i++;return i+a}function ur(e,t){V(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+L(~~(e/60),2)+t+L(~~e%60,2)}))}ur("Z",":"),ur("ZZ",""),Ee("Z",Te),Ee("ZZ",Te),He(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=pr(Te,e)}));var dr=/([\+\-]|\d\d)/gi;function pr(e,t){var n,r,o=(t||"").match(e);return null===o?null:0===(r=60*(n=((o[o.length-1]||[])+"").match(dr)||["-",0,0])[1]+ue(n[2]))?0:"+"===n[0]?r:-r}function fr(e,t){var n,o;return t._isUTC?(n=t.clone(),o=(z(e)||d(e)?e.valueOf():Un(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+o),r.updateOffset(n,!1),n):Un(e).local()}function mr(e){return-Math.round(e._d.getTimezoneOffset())}function hr(e,t,n){var o,a=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=pr(Te,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(o=mr(this)),this._offset=e,this._isUTC=!0,null!=o&&this.add(o,"m"),a!==e&&(!t||this._changeInProgress?kr(this,Br(e-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?a:mr(this)}function gr(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function vr(e){return this.utcOffset(0,e)}function Ar(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(mr(this),"m")),this}function br(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=pr(Me,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function yr(e){return!!this.isValid()&&(e=e?Un(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function xr(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function wr(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e,t={};return x(t,this),(t=Gn(t))._a?(e=t._isUTC?m(t._a):Un(t._a),this._isDSTShifted=this.isValid()&&cr(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function zr(){return!!this.isValid()&&!this._isUTC}function Or(){return!!this.isValid()&&this._isUTC}function Cr(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var jr=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Pr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Br(e,t){var n,r,o,a=e,i=null;return sr(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(a={},t?a[t]=+e:a.milliseconds=+e):(i=jr.exec(e))?(n="-"===i[1]?-1:1,a={y:0,d:ue(i[Fe])*n,h:ue(i[Ge])*n,m:ue(i[Ze])*n,s:ue(i[qe])*n,ms:ue(lr(1e3*i[Ue]))*n}):(i=Pr.exec(e))?(n="-"===i[1]?-1:1,a={y:Dr(i[2],n),M:Dr(i[3],n),w:Dr(i[4],n),d:Dr(i[5],n),h:Dr(i[6],n),m:Dr(i[7],n),s:Dr(i[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(o=Tr(Un(a.from),Un(a.to)),(a={}).ms=o.milliseconds,a.M=o.months),r=new ir(a),sr(e)&&s(e,"_locale")&&(r._locale=e._locale),sr(e)&&s(e,"_isValid")&&(r._isValid=e._isValid),r}function Dr(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Mr(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Tr(e,t){var n;return e.isValid()&&t.isValid()?(t=fr(t,e),e.isBefore(t)?n=Mr(e,t):((n=Mr(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Nr(e,t){return function(n,r){var o;return null===r||isNaN(+r)||(B(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),kr(this,Br(n,r),e),this}}function kr(e,t,n,o){var a=t._milliseconds,i=lr(t._days),s=lr(t._months);e.isValid()&&(o=null==o||o,s&&ct(e,pe(e,"Month")+s*n),i&&fe(e,"Date",pe(e,"Date")+i*n),a&&e._d.setTime(e._d.valueOf()+a*n),o&&r.updateOffset(e,i||s))}Br.fn=ir.prototype,Br.invalid=ar;var Er=Nr(1,"add"),Lr=Nr(-1,"subtract");function Wr(e){return"string"==typeof e||e instanceof String}function Ir(e){return z(e)||d(e)||Wr(e)||u(e)||Hr(e)||Sr(e)||null==e}function Sr(e){var t,n,r=i(e)&&!l(e),o=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],c=a.length;for(t=0;t<c;t+=1)n=a[t],o=o||s(e,n);return r&&o}function Hr(e){var t=a(e),n=!1;return t&&(n=0===e.filter((function(t){return!u(t)&&Wr(e)})).length),t&&n}function Vr(e){var t,n,r=i(e)&&!l(e),o=!1,a=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<a.length;t+=1)n=a[t],o=o||s(e,n);return r&&o}function Xr(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Rr(e,t){1===arguments.length&&(arguments[0]?Ir(arguments[0])?(e=arguments[0],t=void 0):Vr(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Un(),o=fr(n,this).startOf("day"),a=r.calendarFormat(this,o)||"sameElse",i=t&&(D(t[a])?t[a].call(this,n):t[a]);return this.format(i||this.localeData().calendar(a,this,Un(n)))}function Yr(){return new w(this)}function Qr(e,t){var n=z(e)?e:Un(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function Fr(e,t){var n=z(e)?e:Un(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function Gr(e,t,n,r){var o=z(e)?e:Un(e),a=z(t)?t:Un(t);return!!(this.isValid()&&o.isValid()&&a.isValid())&&("("===(r=r||"()")[0]?this.isAfter(o,n):!this.isBefore(o,n))&&(")"===r[1]?this.isBefore(a,n):!this.isAfter(a,n))}function Zr(e,t){var n,r=z(e)?e:Un(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function qr(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Ur(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Kr(e,t,n){var r,o,a;if(!this.isValid())return NaN;if(!(r=fr(e,this)).isValid())return NaN;switch(o=6e4*(r.utcOffset()-this.utcOffset()),t=re(t)){case"year":a=Jr(this,r)/12;break;case"month":a=Jr(this,r);break;case"quarter":a=Jr(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-o)/864e5;break;case"week":a=(this-r-o)/6048e5;break;default:a=this-r}return n?a:ce(a)}function Jr(e,t){if(e.date()<t.date())return-Jr(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function _r(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function $r(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?Y(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):D(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",Y(n,"Z")):Y(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function eo(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r,o="moment",a="";return this.isLocal()||(o=0===this.utcOffset()?"moment.utc":"moment.parseZone",a="Z"),e="["+o+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=a+'[")]',this.format(e+t+n+r)}function to(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=Y(this,e);return this.localeData().postformat(t)}function no(e,t){return this.isValid()&&(z(e)&&e.isValid()||Un(e).isValid())?Br({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ro(e){return this.from(Un(),e)}function oo(e,t){return this.isValid()&&(z(e)&&e.isValid()||Un(e).isValid())?Br({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ao(e){return this.to(Un(),e)}function io(e){var t;return void 0===e?this._locale._abbr:(null!=(t=An(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var so=C("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function lo(){return this._locale}var co=1e3,uo=60*co,po=60*uo,fo=3506328*po;function mo(e,t){return(e%t+t)%t}function ho(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-fo:new Date(e,t,n).valueOf()}function go(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-fo:Date.UTC(e,t,n)}function vo(e){var t,n;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?go:ho,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=mo(t+(this._isUTC?0:this.utcOffset()*uo),po);break;case"minute":t=this._d.valueOf(),t-=mo(t,uo);break;case"second":t=this._d.valueOf(),t-=mo(t,co)}return this._d.setTime(t),r.updateOffset(this,!0),this}function Ao(e){var t,n;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?go:ho,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=po-mo(t+(this._isUTC?0:this.utcOffset()*uo),po)-1;break;case"minute":t=this._d.valueOf(),t+=uo-mo(t,uo)-1;break;case"second":t=this._d.valueOf(),t+=co-mo(t,co)-1}return this._d.setTime(t),r.updateOffset(this,!0),this}function bo(){return this._d.valueOf()-6e4*(this._offset||0)}function yo(){return Math.floor(this.valueOf()/1e3)}function xo(){return new Date(this.valueOf())}function wo(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function zo(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Oo(){return this.isValid()?this.toISOString():null}function Co(){return v(this)}function jo(){return f({},g(this))}function Po(){return g(this).overflow}function Bo(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Do(e,t){var n,o,a,i=this._eras||An("en")._eras;for(n=0,o=i.length;n<o;++n)switch("string"==typeof i[n].since&&(a=r(i[n].since).startOf("day"),i[n].since=a.valueOf()),typeof i[n].until){case"undefined":i[n].until=1/0;break;case"string":a=r(i[n].until).startOf("day").valueOf(),i[n].until=a.valueOf()}return i}function Mo(e,t,n){var r,o,a,i,s,l=this.eras();for(e=e.toUpperCase(),r=0,o=l.length;r<o;++r)if(a=l[r].name.toUpperCase(),i=l[r].abbr.toUpperCase(),s=l[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(i===e)return l[r];break;case"NNNN":if(a===e)return l[r];break;case"NNNNN":if(s===e)return l[r]}else if([a,i,s].indexOf(e)>=0)return l[r]}function To(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n}function No(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""}function ko(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""}function Eo(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""}function Lo(){var e,t,n,o,a=this.localeData().eras();for(e=0,t=a.length;e<t;++e)if(n=a[e].since<=a[e].until?1:-1,o=this.clone().startOf("day").valueOf(),a[e].since<=o&&o<=a[e].until||a[e].until<=o&&o<=a[e].since)return(this.year()-r(a[e].since).year())*n+a[e].offset;return this.year()}function Wo(e){return s(this,"_erasNameRegex")||Yo.call(this),e?this._erasNameRegex:this._erasRegex}function Io(e){return s(this,"_erasAbbrRegex")||Yo.call(this),e?this._erasAbbrRegex:this._erasRegex}function So(e){return s(this,"_erasNarrowRegex")||Yo.call(this),e?this._erasNarrowRegex:this._erasRegex}function Ho(e,t){return t.erasAbbrRegex(e)}function Vo(e,t){return t.erasNameRegex(e)}function Xo(e,t){return t.erasNarrowRegex(e)}function Ro(e,t){return t._eraYearOrdinalRegex||Be}function Yo(){var e,t,n=[],r=[],o=[],a=[],i=this.eras();for(e=0,t=i.length;e<t;++e)r.push(Ie(i[e].name)),n.push(Ie(i[e].abbr)),o.push(Ie(i[e].narrow)),a.push(Ie(i[e].name)),a.push(Ie(i[e].abbr)),a.push(Ie(i[e].narrow));this._erasRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+r.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+o.join("|")+")","i")}function Qo(e,t){V(0,[e,e.length],0,t)}function Fo(e){return Jo.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Go(e){return Jo.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Zo(){return zt(this.year(),1,4)}function qo(){return zt(this.isoWeekYear(),1,4)}function Uo(){var e=this.localeData()._week;return zt(this.year(),e.dow,e.doy)}function Ko(){var e=this.localeData()._week;return zt(this.weekYear(),e.dow,e.doy)}function Jo(e,t,n,r,o){var a;return null==e?wt(this,r,o).year:(t>(a=zt(e,r,o))&&(t=a),_o.call(this,e,t,n,r,o))}function _o(e,t,n,r,o){var a=xt(e,t,n,r,o),i=bt(a.year,0,a.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}function $o(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}V("N",0,0,"eraAbbr"),V("NN",0,0,"eraAbbr"),V("NNN",0,0,"eraAbbr"),V("NNNN",0,0,"eraName"),V("NNNNN",0,0,"eraNarrow"),V("y",["y",1],"yo","eraYear"),V("y",["yy",2],0,"eraYear"),V("y",["yyy",3],0,"eraYear"),V("y",["yyyy",4],0,"eraYear"),Ee("N",Ho),Ee("NN",Ho),Ee("NNN",Ho),Ee("NNNN",Vo),Ee("NNNNN",Xo),He(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var o=n._locale.erasParse(e,r,n._strict);o?g(n).era=o:g(n).invalidEra=e})),Ee("y",Be),Ee("yy",Be),Ee("yyy",Be),Ee("yyyy",Be),Ee("yo",Ro),He(["y","yy","yyy","yyyy"],Ye),He(["yo"],(function(e,t,n,r){var o;n._locale._eraYearOrdinalRegex&&(o=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Ye]=n._locale.eraYearOrdinalParse(e,o):t[Ye]=parseInt(e,10)})),V(0,["gg",2],0,(function(){return this.weekYear()%100})),V(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Qo("gggg","weekYear"),Qo("ggggg","weekYear"),Qo("GGGG","isoWeekYear"),Qo("GGGGG","isoWeekYear"),ne("weekYear","gg"),ne("isoWeekYear","GG"),ie("weekYear",1),ie("isoWeekYear",1),Ee("G",De),Ee("g",De),Ee("GG",we,Ae),Ee("gg",we,Ae),Ee("GGGG",je,ye),Ee("gggg",je,ye),Ee("GGGGG",Pe,xe),Ee("ggggg",Pe,xe),Ve(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=ue(e)})),Ve(["gg","GG"],(function(e,t,n,o){t[o]=r.parseTwoDigitYear(e)})),V("Q",0,"Qo","quarter"),ne("quarter","Q"),ie("quarter",7),Ee("Q",ve),He("Q",(function(e,t){t[Qe]=3*(ue(e)-1)})),V("D",["DD",2],"Do","date"),ne("date","D"),ie("date",9),Ee("D",we),Ee("DD",we,Ae),Ee("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),He(["D","DD"],Fe),He("Do",(function(e,t){t[Fe]=ue(e.match(we)[0])}));var ea=de("Date",!0);function ta(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}V("DDD",["DDDD",3],"DDDo","dayOfYear"),ne("dayOfYear","DDD"),ie("dayOfYear",4),Ee("DDD",Ce),Ee("DDDD",be),He(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=ue(e)})),V("m",["mm",2],0,"minute"),ne("minute","m"),ie("minute",14),Ee("m",we),Ee("mm",we,Ae),He(["m","mm"],Ze);var na=de("Minutes",!1);V("s",["ss",2],0,"second"),ne("second","s"),ie("second",15),Ee("s",we),Ee("ss",we,Ae),He(["s","ss"],qe);var ra,oa,aa=de("Seconds",!1);for(V("S",0,0,(function(){return~~(this.millisecond()/100)})),V(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),V(0,["SSS",3],0,"millisecond"),V(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),V(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),V(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),V(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),V(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),V(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),ne("millisecond","ms"),ie("millisecond",16),Ee("S",Ce,ve),Ee("SS",Ce,Ae),Ee("SSS",Ce,be),ra="SSSS";ra.length<=9;ra+="S")Ee(ra,Be);function ia(e,t){t[Ue]=ue(1e3*("0."+e))}for(ra="S";ra.length<=9;ra+="S")He(ra,ia);function sa(){return this._isUTC?"UTC":""}function la(){return this._isUTC?"Coordinated Universal Time":""}oa=de("Milliseconds",!1),V("z",0,0,"zoneAbbr"),V("zz",0,0,"zoneName");var ca=w.prototype;function ua(e){return Un(1e3*e)}function da(){return Un.apply(null,arguments).parseZone()}function pa(e){return e}ca.add=Er,ca.calendar=Rr,ca.clone=Yr,ca.diff=Kr,ca.endOf=Ao,ca.format=to,ca.from=no,ca.fromNow=ro,ca.to=oo,ca.toNow=ao,ca.get=me,ca.invalidAt=Po,ca.isAfter=Qr,ca.isBefore=Fr,ca.isBetween=Gr,ca.isSame=Zr,ca.isSameOrAfter=qr,ca.isSameOrBefore=Ur,ca.isValid=Co,ca.lang=so,ca.locale=io,ca.localeData=lo,ca.max=Jn,ca.min=Kn,ca.parsingFlags=jo,ca.set=he,ca.startOf=vo,ca.subtract=Lr,ca.toArray=wo,ca.toObject=zo,ca.toDate=xo,ca.toISOString=$r,ca.inspect=eo,"undefined"!=typeof Symbol&&null!=Symbol.for&&(ca[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ca.toJSON=Oo,ca.toString=_r,ca.unix=yo,ca.valueOf=bo,ca.creationData=Bo,ca.eraName=No,ca.eraNarrow=ko,ca.eraAbbr=Eo,ca.eraYear=Lo,ca.year=gt,ca.isLeapYear=vt,ca.weekYear=Fo,ca.isoWeekYear=Go,ca.quarter=ca.quarters=$o,ca.month=ut,ca.daysInMonth=dt,ca.week=ca.weeks=Bt,ca.isoWeek=ca.isoWeeks=Dt,ca.weeksInYear=Uo,ca.weeksInWeekYear=Ko,ca.isoWeeksInYear=Zo,ca.isoWeeksInISOWeekYear=qo,ca.date=ea,ca.day=ca.days=Qt,ca.weekday=Ft,ca.isoWeekday=Gt,ca.dayOfYear=ta,ca.hour=ca.hours=rn,ca.minute=ca.minutes=na,ca.second=ca.seconds=aa,ca.millisecond=ca.milliseconds=oa,ca.utcOffset=hr,ca.utc=vr,ca.local=Ar,ca.parseZone=br,ca.hasAlignedHourOffset=yr,ca.isDST=xr,ca.isLocal=zr,ca.isUtcOffset=Or,ca.isUtc=Cr,ca.isUTC=Cr,ca.zoneAbbr=sa,ca.zoneName=la,ca.dates=C("dates accessor is deprecated. Use date instead.",ea),ca.months=C("months accessor is deprecated. Use month instead",ut),ca.years=C("years accessor is deprecated. Use year instead",gt),ca.zone=C("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gr),ca.isDSTShifted=C("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",wr);var fa=N.prototype;function ma(e,t,n,r){var o=An(),a=m().set(r,t);return o[n](a,e)}function ha(e,t,n){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return ma(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=ma(e,r,n,"month");return o}function ga(e,t,n,r){"boolean"==typeof e?(u(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,u(t)&&(n=t,t=void 0),t=t||"");var o,a=An(),i=e?a._week.dow:0,s=[];if(null!=n)return ma(t,(n+i)%7,r,"day");for(o=0;o<7;o++)s[o]=ma(t,(o+i)%7,r,"day");return s}function va(e,t){return ha(e,t,"months")}function Aa(e,t){return ha(e,t,"monthsShort")}function ba(e,t,n){return ga(e,t,n,"weekdays")}function ya(e,t,n){return ga(e,t,n,"weekdaysShort")}function xa(e,t,n){return ga(e,t,n,"weekdaysMin")}fa.calendar=E,fa.longDateFormat=G,fa.invalidDate=q,fa.ordinal=J,fa.preparse=pa,fa.postformat=pa,fa.relativeTime=$,fa.pastFuture=ee,fa.set=M,fa.eras=Do,fa.erasParse=Mo,fa.erasConvertYear=To,fa.erasAbbrRegex=Io,fa.erasNameRegex=Wo,fa.erasNarrowRegex=So,fa.months=at,fa.monthsShort=it,fa.monthsParse=lt,fa.monthsRegex=ft,fa.monthsShortRegex=pt,fa.week=Ot,fa.firstDayOfYear=Pt,fa.firstDayOfWeek=jt,fa.weekdays=Ht,fa.weekdaysMin=Xt,fa.weekdaysShort=Vt,fa.weekdaysParse=Yt,fa.weekdaysRegex=Zt,fa.weekdaysShortRegex=qt,fa.weekdaysMinRegex=Ut,fa.isPM=tn,fa.meridiem=on,hn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===ue(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=C("moment.lang is deprecated. Use moment.locale instead.",hn),r.langData=C("moment.langData is deprecated. Use moment.localeData instead.",An);var wa=Math.abs;function za(){var e=this._data;return this._milliseconds=wa(this._milliseconds),this._days=wa(this._days),this._months=wa(this._months),e.milliseconds=wa(e.milliseconds),e.seconds=wa(e.seconds),e.minutes=wa(e.minutes),e.hours=wa(e.hours),e.months=wa(e.months),e.years=wa(e.years),this}function Oa(e,t,n,r){var o=Br(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function Ca(e,t){return Oa(this,e,t,1)}function ja(e,t){return Oa(this,e,t,-1)}function Pa(e){return e<0?Math.floor(e):Math.ceil(e)}function Ba(){var e,t,n,r,o,a=this._milliseconds,i=this._days,s=this._months,l=this._data;return a>=0&&i>=0&&s>=0||a<=0&&i<=0&&s<=0||(a+=864e5*Pa(Ma(s)+i),i=0,s=0),l.milliseconds=a%1e3,e=ce(a/1e3),l.seconds=e%60,t=ce(e/60),l.minutes=t%60,n=ce(t/60),l.hours=n%24,i+=ce(n/24),s+=o=ce(Da(i)),i-=Pa(Ma(o)),r=ce(s/12),s%=12,l.days=i,l.months=s,l.years=r,this}function Da(e){return 4800*e/146097}function Ma(e){return 146097*e/4800}function Ta(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=re(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Da(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Ma(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function Na(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*ue(this._months/12):NaN}function ka(e){return function(){return this.as(e)}}var Ea=ka("ms"),La=ka("s"),Wa=ka("m"),Ia=ka("h"),Sa=ka("d"),Ha=ka("w"),Va=ka("M"),Xa=ka("Q"),Ra=ka("y");function Ya(){return Br(this)}function Qa(e){return e=re(e),this.isValid()?this[e+"s"]():NaN}function Fa(e){return function(){return this.isValid()?this._data[e]:NaN}}var Ga=Fa("milliseconds"),Za=Fa("seconds"),qa=Fa("minutes"),Ua=Fa("hours"),Ka=Fa("days"),Ja=Fa("months"),_a=Fa("years");function $a(){return ce(this.days()/7)}var ei=Math.round,ti={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ni(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}function ri(e,t,n,r){var o=Br(e).abs(),a=ei(o.as("s")),i=ei(o.as("m")),s=ei(o.as("h")),l=ei(o.as("d")),c=ei(o.as("M")),u=ei(o.as("w")),d=ei(o.as("y")),p=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||i<=1&&["m"]||i<n.m&&["mm",i]||s<=1&&["h"]||s<n.h&&["hh",s]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(p=p||u<=1&&["w"]||u<n.w&&["ww",u]),(p=p||c<=1&&["M"]||c<n.M&&["MM",c]||d<=1&&["y"]||["yy",d])[2]=t,p[3]=+e>0,p[4]=r,ni.apply(null,p)}function oi(e){return void 0===e?ei:"function"==typeof e&&(ei=e,!0)}function ai(e,t){return void 0!==ti[e]&&(void 0===t?ti[e]:(ti[e]=t,"s"===e&&(ti.ss=t-1),!0))}function ii(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,o=!1,a=ti;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(o=e),"object"==typeof t&&(a=Object.assign({},ti,t),null!=t.s&&null==t.ss&&(a.ss=t.s-1)),r=ri(this,!o,a,n=this.localeData()),o&&(r=n.pastFuture(+this,r)),n.postformat(r)}var si=Math.abs;function li(e){return(e>0)-(e<0)||+e}function ci(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,o,a,i,s,l=si(this._milliseconds)/1e3,c=si(this._days),u=si(this._months),d=this.asSeconds();return d?(e=ce(l/60),t=ce(e/60),l%=60,e%=60,n=ce(u/12),u%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",o=d<0?"-":"",a=li(this._months)!==li(d)?"-":"",i=li(this._days)!==li(d)?"-":"",s=li(this._milliseconds)!==li(d)?"-":"",o+"P"+(n?a+n+"Y":"")+(u?a+u+"M":"")+(c?i+c+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+r+"S":"")):"P0D"}var ui=ir.prototype;return ui.isValid=or,ui.abs=za,ui.add=Ca,ui.subtract=ja,ui.as=Ta,ui.asMilliseconds=Ea,ui.asSeconds=La,ui.asMinutes=Wa,ui.asHours=Ia,ui.asDays=Sa,ui.asWeeks=Ha,ui.asMonths=Va,ui.asQuarters=Xa,ui.asYears=Ra,ui.valueOf=Na,ui._bubble=Ba,ui.clone=Ya,ui.get=Qa,ui.milliseconds=Ga,ui.seconds=Za,ui.minutes=qa,ui.hours=Ua,ui.days=Ka,ui.weeks=$a,ui.months=Ja,ui.years=_a,ui.humanize=ii,ui.toISOString=ci,ui.toString=ci,ui.toJSON=ci,ui.locale=io,ui.localeData=lo,ui.toIsoString=C("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ci),ui.lang=so,V("X",0,0,"unix"),V("x",0,0,"valueOf"),Ee("x",De),Ee("X",Ne),He("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),He("x",(function(e,t,n){n._d=new Date(ue(e))})),
|
|
122
|
+
`),np.rippleVisible,cp,550,(({theme:e})=>e.transitions.easing.easeInOut),np.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),np.child,np.childLeaving,up,550,(({theme:e})=>e.transitions.easing.easeInOut),np.childPulsate,dp,(({theme:e})=>e.transitions.easing.easeInOut)),mp=N.forwardRef((function(e,t){const n=co({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:o={},className:a}=n,i=It(n,rp),[s,l]=N.useState([]),c=N.useRef(0),u=N.useRef(null);N.useEffect((()=>{u.current&&(u.current(),u.current=null)}),[s]);const d=N.useRef(!1),p=N.useRef(0),f=N.useRef(null),m=N.useRef(null);N.useEffect((()=>()=>{p.current&&clearTimeout(p.current)}),[]);const h=N.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:a,cb:i}=e;l((e=>[...e,Y.jsx(fp,{classes:{ripple:Kn(o.ripple,np.ripple),rippleVisible:Kn(o.rippleVisible,np.rippleVisible),ripplePulsate:Kn(o.ripplePulsate,np.ripplePulsate),child:Kn(o.child,np.child),childLeaving:Kn(o.childLeaving,np.childLeaving),childPulsate:Kn(o.childPulsate,np.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:a},c.current)])),c.current+=1,u.current=i}),[o]),g=N.useCallback(((e={},t={},n=(()=>{}))=>{const{pulsate:o=!1,center:a=r||t.pulsate,fakeElement:i=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&d.current)return void(d.current=!1);"touchstart"===(null==e?void 0:e.type)&&(d.current=!0);const s=i?null:m.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,g;if(a||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(a)g=Math.sqrt((2*l.width**2+l.height**2)/3),g%2==0&&(g+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;g=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===f.current&&(f.current=()=>{h({pulsate:o,rippleX:c,rippleY:u,rippleSize:g,cb:n})},p.current=setTimeout((()=>{f.current&&(f.current(),f.current=null)}),80)):h({pulsate:o,rippleX:c,rippleY:u,rippleSize:g,cb:n})}),[r,h]),v=N.useCallback((()=>{g({},{pulsate:!0})}),[g]),A=N.useCallback(((e,t)=>{if(clearTimeout(p.current),"touchend"===(null==e?void 0:e.type)&&f.current)return f.current(),f.current=null,void(p.current=setTimeout((()=>{A(e,t)})));f.current=null,l((e=>e.length>0?e.slice(1):e)),u.current=t}),[]);return N.useImperativeHandle(t,(()=>({pulsate:v,start:g,stop:A})),[v,g,A]),Y.jsx(pp,te({className:Kn(np.root,o.root,a),ref:m},i,{children:Y.jsx(da,{component:null,exit:!0,children:s})}))}));"production"!==process.env.NODE_ENV&&(mp.propTypes={center:De.bool,classes:De.object,className:De.string});var hp=mp;function gp(e){return kt("MuiButtonBase",e)}var vp=Et("MuiButtonBase",["root","disabled","focusVisible"]);const Ap=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],bp=fo("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${vp.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),yp=N.forwardRef((function(e,t){const n=co({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:o=!1,children:a,className:i,component:s="button",disabled:l=!1,disableRipple:c=!1,disableTouchRipple:u=!1,focusRipple:d=!1,LinkComponent:p="a",onBlur:f,onClick:m,onContextMenu:h,onDragLeave:g,onFocus:v,onFocusVisible:A,onKeyDown:b,onKeyUp:y,onMouseDown:x,onMouseLeave:w,onMouseUp:z,onTouchEnd:O,onTouchMove:C,onTouchStart:j,tabIndex:P=0,TouchRippleProps:B,touchRippleRef:D,type:M}=n,T=It(n,Ap),k=N.useRef(null),E=N.useRef(null),L=lt(E,D),{isFocusVisibleRef:W,onFocus:I,onBlur:S,ref:H}=vt(),[V,X]=N.useState(!1);l&&V&&X(!1),N.useImperativeHandle(r,(()=>({focusVisible:()=>{X(!0),k.current.focus()}})),[]);const[R,Q]=N.useState(!1);N.useEffect((()=>{Q(!0)}),[]);const F=R&&!c&&!l;function G(e,t,n=u){return st((r=>{t&&t(r);return!n&&E.current&&E.current[e](r),!0}))}N.useEffect((()=>{V&&d&&!c&&R&&E.current.pulsate()}),[c,d,V,R]);const Z=G("start",x),q=G("stop",h),U=G("stop",g),K=G("stop",z),J=G("stop",(e=>{V&&e.preventDefault(),w&&w(e)})),_=G("start",j),$=G("stop",O),ee=G("stop",C),ne=G("stop",(e=>{S(e),!1===W.current&&X(!1),f&&f(e)}),!1),re=st((e=>{k.current||(k.current=e.currentTarget),I(e),!0===W.current&&(X(!0),A&&A(e)),v&&v(e)})),oe=()=>{const e=k.current;return s&&"button"!==s&&!("A"===e.tagName&&e.href)},ae=N.useRef(!1),ie=st((e=>{d&&!ae.current&&V&&E.current&&" "===e.key&&(ae.current=!0,E.current.stop(e,(()=>{E.current.start(e)}))),e.target===e.currentTarget&&oe()&&" "===e.key&&e.preventDefault(),b&&b(e),e.target===e.currentTarget&&oe()&&"Enter"===e.key&&!l&&(e.preventDefault(),m&&m(e))})),se=st((e=>{d&&" "===e.key&&E.current&&V&&!e.defaultPrevented&&(ae.current=!1,E.current.stop(e,(()=>{E.current.pulsate(e)}))),y&&y(e),m&&e.target===e.currentTarget&&oe()&&" "===e.key&&!e.defaultPrevented&&m(e)}));let le=s;"button"===le&&(T.href||T.to)&&(le=p);const ce={};"button"===le?(ce.type=void 0===M?"button":M,ce.disabled=l):(T.href||T.to||(ce.role="button"),l&&(ce["aria-disabled"]=l));const ue=lt(t,H,k);"production"!==process.env.NODE_ENV&&N.useEffect((()=>{F&&!E.current&&console.error(["MUI: The `component` prop provided to ButtonBase is invalid.","Please make sure the children prop is rendered in this custom component."].join("\n"))}),[F]);const de=te({},n,{centerRipple:o,component:s,disabled:l,disableRipple:c,disableTouchRipple:u,focusRipple:d,tabIndex:P,focusVisible:V}),pe=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,a=Dt({root:["root",t&&"disabled",n&&"focusVisible"]},gp,o);return n&&r&&(a.root+=` ${r}`),a})(de);return Y.jsxs(bp,te({as:le,className:Kn(pe.root,i),ownerState:de,onBlur:ne,onClick:m,onContextMenu:q,onFocus:re,onKeyDown:ie,onKeyUp:se,onMouseDown:Z,onMouseLeave:J,onMouseUp:K,onDragLeave:U,onTouchEnd:$,onTouchMove:ee,onTouchStart:_,ref:ue,tabIndex:l?-1:P,type:M},ce,T,{children:[a,F?Y.jsx(hp,te({ref:L,center:o},B)):null]}))}));"production"!==process.env.NODE_ENV&&(yp.propTypes={action:Ge,centerRipple:De.bool,children:De.node,classes:De.object,className:De.string,component:ke,disabled:De.bool,disableRipple:De.bool,disableTouchRipple:De.bool,focusRipple:De.bool,focusVisibleClassName:De.string,href:De.any,LinkComponent:De.elementType,onBlur:De.func,onClick:De.func,onContextMenu:De.func,onDragLeave:De.func,onFocus:De.func,onFocusVisible:De.func,onKeyDown:De.func,onKeyUp:De.func,onMouseDown:De.func,onMouseLeave:De.func,onMouseUp:De.func,onTouchEnd:De.func,onTouchMove:De.func,onTouchStart:De.func,sx:De.oneOfType([De.arrayOf(De.oneOfType([De.func,De.object,De.bool])),De.func,De.object]),tabIndex:De.number,TouchRippleProps:De.object,touchRippleRef:De.oneOfType([De.func,De.shape({current:De.shape({pulsate:De.func.isRequired,start:De.func.isRequired,stop:De.func.isRequired})})]),type:De.oneOfType([De.oneOf(["button","reset","submit"]),De.string])});var xp=yp;function wp(e){return kt("MuiIconButton",e)}var zp=Et("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]);const Op=["edge","children","className","color","disabled","disableFocusRipple","size"],Cp=fo(xp,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t[`color${Ze(n.color)}`],n.edge&&t[`edge${Ze(n.edge)}`],t[`size${Ze(n.size)}`]]}})((({theme:e,ownerState:t})=>te({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:gr(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})),(({theme:e,ownerState:t})=>{var n;const r=null==(n=(e.vars||e).palette)?void 0:n[t.color];return te({},"inherit"===t.color&&{color:"inherit"},"inherit"!==t.color&&"default"!==t.color&&te({color:null==r?void 0:r.main},!t.disableRipple&&{"&:hover":te({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:gr(r.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===t.size&&{padding:5,fontSize:e.typography.pxToRem(18)},"large"===t.size&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${zp.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})})),jp=N.forwardRef((function(e,t){const n=co({props:e,name:"MuiIconButton"}),{edge:r=!1,children:o,className:a,color:i="default",disabled:s=!1,disableFocusRipple:l=!1,size:c="medium"}=n,u=It(n,Op),d=te({},n,{edge:r,color:i,disabled:s,disableFocusRipple:l,size:c}),p=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:a}=e;return Dt({root:["root",n&&"disabled","default"!==r&&`color${Ze(r)}`,o&&`edge${Ze(o)}`,`size${Ze(a)}`]},wp,t)})(d);return Y.jsx(Cp,te({className:Kn(p.root,a),centerRipple:!0,focusRipple:!l,disabled:s,ref:t,ownerState:d},u,{children:o}))}));"production"!==process.env.NODE_ENV&&(jp.propTypes={children:ee(De.node,(e=>N.Children.toArray(e.children).some((e=>N.isValidElement(e)&&e.props.onClick))?new Error(["MUI: You are providing an onClick event listener to a child of a button element.","Prefer applying it to the IconButton directly.","This guarantees that the whole <button> will be responsive to click events."].join("\n")):null)),classes:De.object,className:De.string,color:De.oneOfType([De.oneOf(["inherit","default","primary","secondary","error","info","success","warning"]),De.string]),disabled:De.bool,disableFocusRipple:De.bool,disableRipple:De.bool,edge:De.oneOf(["end","start",!1]),size:De.oneOfType([De.oneOf(["small","medium","large"]),De.string]),sx:De.oneOfType([De.arrayOf(De.oneOfType([De.func,De.object,De.bool])),De.func,De.object])});var Pp=jp,Bp=Ea(Y.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function Dp(e){return kt("MuiChip",e)}var Mp=Et("MuiChip",["root","sizeSmall","sizeMedium","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]);const Tp=["avatar","className","clickable","color","component","deleteIcon","disabled","icon","label","onClick","onDelete","onKeyDown","onKeyUp","size","variant","tabIndex","skipFocusWhenDisabled"],Np=fo("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:a,onDelete:i,size:s,variant:l}=n;return[{[`& .${Mp.avatar}`]:t.avatar},{[`& .${Mp.avatar}`]:t[`avatar${Ze(s)}`]},{[`& .${Mp.avatar}`]:t[`avatarColor${Ze(r)}`]},{[`& .${Mp.icon}`]:t.icon},{[`& .${Mp.icon}`]:t[`icon${Ze(s)}`]},{[`& .${Mp.icon}`]:t[`iconColor${Ze(o)}`]},{[`& .${Mp.deleteIcon}`]:t.deleteIcon},{[`& .${Mp.deleteIcon}`]:t[`deleteIcon${Ze(s)}`]},{[`& .${Mp.deleteIcon}`]:t[`deleteIconColor${Ze(r)}`]},{[`& .${Mp.deleteIcon}`]:t[`deleteIcon${Ze(l)}Color${Ze(r)}`]},t.root,t[`size${Ze(s)}`],t[`color${Ze(r)}`],a&&t.clickable,a&&"default"!==r&&t[`clickableColor${Ze(r)})`],i&&t.deletable,i&&"default"!==r&&t[`deletableColor${Ze(r)}`],t[l],t[`${l}${Ze(r)}`]]}})((({theme:e,ownerState:t})=>{const n="light"===e.palette.mode?e.palette.grey[700]:e.palette.grey[300];return te({maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:16,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${Mp.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Mp.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:n,fontSize:e.typography.pxToRem(12)},[`& .${Mp.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Mp.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Mp.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Mp.icon}`]:te({marginLeft:5,marginRight:-6},"small"===t.size&&{fontSize:18,marginLeft:4,marginRight:-4},t.iconColor===t.color&&te({color:e.vars?e.vars.palette.Chip.defaultIconColor:n},"default"!==t.color&&{color:"inherit"})),[`& .${Mp.deleteIcon}`]:te({WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:gr(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:gr(e.palette.text.primary,.4)}},"small"===t.size&&{fontSize:16,marginRight:4,marginLeft:-4},"default"!==t.color&&{color:e.vars?`rgba(${e.vars.palette[t.color].contrastTextChannel} / 0.7)`:gr(e.palette[t.color].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].contrastText}})},"small"===t.size&&{height:24},"default"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].main,color:(e.vars||e).palette[t.color].contrastText},t.onDelete&&{[`&.${Mp.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:gr(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},t.onDelete&&"default"!==t.color&&{[`&.${Mp.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})}),(({theme:e,ownerState:t})=>te({},t.clickable&&{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:gr(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${Mp.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:gr(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}},t.clickable&&"default"!==t.color&&{[`&:hover, &.${Mp.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t.color].dark}})),(({theme:e,ownerState:t})=>te({},"outlined"===t.variant&&{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${"light"===e.palette.mode?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Mp.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Mp.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Mp.avatar}`]:{marginLeft:4},[`& .${Mp.avatarSmall}`]:{marginLeft:2},[`& .${Mp.icon}`]:{marginLeft:4},[`& .${Mp.iconSmall}`]:{marginLeft:2},[`& .${Mp.deleteIcon}`]:{marginRight:5},[`& .${Mp.deleteIconSmall}`]:{marginRight:3}},"outlined"===t.variant&&"default"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:gr(e.palette[t.color].main,.7)}`,[`&.${Mp.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:gr(e.palette[t.color].main,e.palette.action.hoverOpacity)},[`&.${Mp.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.focusOpacity})`:gr(e.palette[t.color].main,e.palette.action.focusOpacity)},[`& .${Mp.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / 0.7)`:gr(e.palette[t.color].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[t.color].main}}}))),kp=fo("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${Ze(r)}`]]}})((({ownerState:e})=>te({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap"},"small"===e.size&&{paddingLeft:8,paddingRight:8})));function Ep(e){return"Backspace"===e.key||"Delete"===e.key}const Lp=N.forwardRef((function(e,t){const n=co({props:e,name:"MuiChip"}),{avatar:r,className:o,clickable:a,color:i="default",component:s,deleteIcon:l,disabled:c=!1,icon:u,label:d,onClick:p,onDelete:f,onKeyDown:m,onKeyUp:h,size:g="medium",variant:v="filled",tabIndex:A,skipFocusWhenDisabled:b=!1}=n,y=It(n,Tp),x=N.useRef(null),w=lt(x,t),z=e=>{e.stopPropagation(),f&&f(e)},O=!(!1===a||!p)||a,C=O||f?xp:s||"div",j=te({},n,{component:C,disabled:c,size:g,color:i,iconColor:N.isValidElement(u)&&u.props.color||i,onDelete:!!f,clickable:O,variant:v}),P=(e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:a,onDelete:i,clickable:s,variant:l}=e;return Dt({root:["root",l,n&&"disabled",`size${Ze(r)}`,`color${Ze(o)}`,s&&"clickable",s&&`clickableColor${Ze(o)}`,i&&"deletable",i&&`deletableColor${Ze(o)}`,`${l}${Ze(o)}`],label:["label",`label${Ze(r)}`],avatar:["avatar",`avatar${Ze(r)}`,`avatarColor${Ze(o)}`],icon:["icon",`icon${Ze(r)}`,`iconColor${Ze(a)}`],deleteIcon:["deleteIcon",`deleteIcon${Ze(r)}`,`deleteIconColor${Ze(o)}`,`deleteIcon${Ze(l)}Color${Ze(o)}`]},Dp,t)})(j),B=C===xp?te({component:s||"div",focusVisibleClassName:P.focusVisible},f&&{disableRipple:!0}):{};let D=null;f&&(D=l&&N.isValidElement(l)?N.cloneElement(l,{className:Kn(l.props.className,P.deleteIcon),onClick:z}):Y.jsx(Bp,{className:Kn(P.deleteIcon),onClick:z}));let M=null;r&&N.isValidElement(r)&&(M=N.cloneElement(r,{className:Kn(P.avatar,r.props.className)}));let T=null;return u&&N.isValidElement(u)&&(T=N.cloneElement(u,{className:Kn(P.icon,u.props.className)})),"production"!==process.env.NODE_ENV&&M&&T&&console.error("MUI: The Chip component can not handle the avatar and the icon prop at the same time. Pick one."),Y.jsxs(Np,te({as:C,className:Kn(P.root,o),disabled:!(!O||!c)||void 0,onClick:p,onKeyDown:e=>{e.currentTarget===e.target&&Ep(e)&&e.preventDefault(),m&&m(e)},onKeyUp:e=>{e.currentTarget===e.target&&(f&&Ep(e)?f(e):"Escape"===e.key&&x.current&&x.current.blur()),h&&h(e)},ref:w,tabIndex:b&&c?-1:A,ownerState:j},B,y,{children:[M||T,Y.jsx(kp,{className:Kn(P.label),ownerState:j,children:d}),D]}))}));"production"!==process.env.NODE_ENV&&(Lp.propTypes={avatar:De.element,children:at,classes:De.object,className:De.string,clickable:De.bool,color:De.oneOfType([De.oneOf(["default","primary","secondary","error","info","success","warning"]),De.string]),component:De.elementType,deleteIcon:De.element,disabled:De.bool,icon:De.element,label:De.node,onClick:De.func,onDelete:De.func,onKeyDown:De.func,onKeyUp:De.func,size:De.oneOfType([De.oneOf(["medium","small"]),De.string]),skipFocusWhenDisabled:De.bool,sx:De.oneOfType([De.arrayOf(De.oneOfType([De.func,De.object,De.bool])),De.func,De.object]),tabIndex:De.number,variant:De.oneOfType([De.oneOf(["filled","outlined"]),De.string])});var Wp=Lp,Ip=Ea(Y.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close");function Sp(e){return kt("MuiAutocomplete",e)}var Hp,Vp,Xp=Et("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);const Rp=["autoComplete","autoHighlight","autoSelect","blurOnSelect","ChipProps","className","clearIcon","clearOnBlur","clearOnEscape","clearText","closeText","componentsProps","defaultValue","disableClearable","disableCloseOnSelect","disabled","disabledItemsFocusable","disableListWrap","disablePortal","filterOptions","filterSelectedOptions","forcePopupIcon","freeSolo","fullWidth","getLimitTagsText","getOptionDisabled","getOptionLabel","isOptionEqualToValue","groupBy","handleHomeEndKeys","id","includeInputInList","inputValue","limitTags","ListboxComponent","ListboxProps","loading","loadingText","multiple","noOptionsText","onChange","onClose","onHighlightChange","onInputChange","onOpen","open","openOnFocus","openText","options","PaperComponent","PopperComponent","popupIcon","readOnly","renderGroup","renderInput","renderOption","renderTags","selectOnFocus","size","slotProps","value"],Yp=["ref"],Qp=fo("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:a,inputFocused:i,size:s}=n;return[{[`& .${Xp.tag}`]:t.tag},{[`& .${Xp.tag}`]:t[`tagSize${Ze(s)}`]},{[`& .${Xp.inputRoot}`]:t.inputRoot},{[`& .${Xp.input}`]:t.input},{[`& .${Xp.input}`]:i&&t.inputFocused},t.root,r&&t.fullWidth,a&&t.hasPopupIcon,o&&t.hasClearIcon]}})((({ownerState:e})=>te({[`&.${Xp.focused} .${Xp.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${Xp.clearIndicator}`]:{visibility:"visible"}}},e.fullWidth&&{width:"100%"},{[`& .${Xp.tag}`]:te({margin:3,maxWidth:"calc(100% - 6px)"},"small"===e.size&&{margin:2,maxWidth:"calc(100% - 4px)"}),[`& .${Xp.inputRoot}`]:{flexWrap:"wrap",[`.${Xp.hasPopupIcon}&, .${Xp.hasClearIcon}&`]:{paddingRight:30},[`.${Xp.hasPopupIcon}.${Xp.hasClearIcon}&`]:{paddingRight:56},[`& .${Xp.input}`]:{width:0,minWidth:30}},[`& .${bc.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${bc.root}.${cc.sizeSmall}`]:{[`& .${bc.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Sc.root}`]:{padding:9,[`.${Xp.hasPopupIcon}&, .${Xp.hasClearIcon}&`]:{paddingRight:39},[`.${Xp.hasPopupIcon}.${Xp.hasClearIcon}&`]:{paddingRight:65},[`& .${Xp.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${Xp.endAdornment}`]:{right:9}},[`& .${Sc.root}.${cc.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${Xp.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${jc.root}`]:{paddingTop:19,paddingLeft:8,[`.${Xp.hasPopupIcon}&, .${Xp.hasClearIcon}&`]:{paddingRight:39},[`.${Xp.hasPopupIcon}.${Xp.hasClearIcon}&`]:{paddingRight:65},[`& .${jc.input}`]:{padding:"7px 4px"},[`& .${Xp.endAdornment}`]:{right:9}},[`& .${jc.root}.${cc.sizeSmall}`]:{paddingBottom:1,[`& .${jc.input}`]:{padding:"2.5px 4px"}},[`& .${cc.hiddenLabel}`]:{paddingTop:8},[`& .${jc.root}.${cc.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${Xp.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${jc.root}.${cc.hiddenLabel}.${cc.sizeSmall}`]:{[`& .${Xp.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${Xp.input}`]:te({flexGrow:1,textOverflow:"ellipsis",opacity:0},e.inputFocused&&{opacity:1})}))),Fp=fo("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"calc(50% - 14px)"}),Gp=fo(Pp,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),Zp=fo(Pp,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:e},t)=>te({},t.popupIndicator,e.popupOpen&&t.popupIndicatorOpen)})((({ownerState:e})=>te({padding:2,marginRight:-2},e.popupOpen&&{transform:"rotate(180deg)"}))),qp=fo(Ud,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Xp.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})((({theme:e,ownerState:t})=>te({zIndex:(e.vars||e).zIndex.modal},t.disablePortal&&{position:"absolute"}))),Up=fo(Za,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})((({theme:e})=>te({},e.typography.body1,{overflow:"auto"}))),Kp=fo("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})((({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),Jp=fo("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})((({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),_p=fo("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})((({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${Xp.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${Xp.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${Xp.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:gr(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Xp.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:gr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${Xp.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:gr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}}))),$p=fo(ep,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})((({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),ef=fo("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${Xp.option}`]:{paddingLeft:24}}),tf=N.forwardRef((function(e,t){var n,r,o,a;const i=co({props:e,name:"MuiAutocomplete"}),{autoComplete:s=!1,autoHighlight:l=!1,autoSelect:c=!1,blurOnSelect:u=!1,ChipProps:d,className:p,clearIcon:f=Hp||(Hp=Y.jsx(Ip,{fontSize:"small"})),clearOnBlur:m=!i.freeSolo,clearOnEscape:h=!1,clearText:g="Clear",closeText:v="Close",componentsProps:A={},defaultValue:b=(i.multiple?[]:null),disableClearable:y=!1,disableCloseOnSelect:x=!1,disabled:w=!1,disabledItemsFocusable:z=!1,disableListWrap:O=!1,disablePortal:C=!1,filterSelectedOptions:j=!1,forcePopupIcon:P="auto",freeSolo:B=!1,fullWidth:D=!1,getLimitTagsText:M=(e=>`+${e}`),getOptionLabel:T,groupBy:k,handleHomeEndKeys:E=!i.freeSolo,includeInputInList:L=!1,limitTags:W=-1,ListboxComponent:I="ul",ListboxProps:S,loading:H=!1,loadingText:V="Loading…",multiple:X=!1,noOptionsText:R="No options",openOnFocus:Q=!1,openText:F="Open",PaperComponent:G=Za,PopperComponent:Z=Ud,popupIcon:q=Vp||(Vp=Y.jsx(Nd,{})),readOnly:U=!1,renderGroup:K,renderInput:J,renderOption:_,renderTags:$,selectOnFocus:ee=!i.freeSolo,size:ne="medium",slotProps:re={}}=i,oe=It(i,Rp),{getRootProps:ae,getInputProps:ie,getInputLabelProps:se,getPopupIndicatorProps:le,getClearProps:ce,getTagProps:ue,getListboxProps:de,getOptionProps:pe,value:fe,dirty:me,expanded:he,id:ge,popupOpen:ve,focused:Ae,focusedTag:be,anchorEl:ye,setAnchorEl:xe,inputValue:we,groupedOptions:ze}=ec(te({},i,{componentName:"Autocomplete"})),Oe=!y&&!w&&me&&!U,Ce=(!B||!0===P)&&!1!==P,{onMouseDown:je}=ie(),{ref:Pe}=null!=S?S:{},Be=de(),{ref:De}=Be,Me=It(Be,Yp),Te=lt(De,Pe),Ne=T||(e=>{var t;return null!=(t=e.label)?t:e}),ke=te({},i,{disablePortal:C,expanded:he,focused:Ae,fullWidth:D,getOptionLabel:Ne,hasClearIcon:Oe,hasPopupIcon:Ce,inputFocused:-1===be,popupOpen:ve,size:ne}),Ee=(e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:a,hasClearIcon:i,hasPopupIcon:s,inputFocused:l,popupOpen:c,size:u}=e;return Dt({root:["root",r&&"expanded",o&&"focused",a&&"fullWidth",i&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${Ze(u)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",c&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]},Sp,t)})(ke);let Le;if(X&&fe.length>0){const e=e=>te({className:Ee.tag,disabled:w},ue(e));Le=$?$(fe,e,ke):fe.map(((t,n)=>Y.jsx(Wp,te({label:Ne(t),size:ne},e({index:n}),d))))}if(W>-1&&Array.isArray(Le)){const e=Le.length-W;!Ae&&e>0&&(Le=Le.splice(0,W),Le.push(Y.jsx("span",{className:Ee.tag,children:M(e)},Le.length)))}const We=K||(e=>Y.jsxs("li",{children:[Y.jsx($p,{className:Ee.groupLabel,ownerState:ke,component:"div",children:e.group}),Y.jsx(ef,{className:Ee.groupUl,ownerState:ke,children:e.children})]},e.key)),Ie=_||((e,t)=>Y.jsx("li",te({},e,{children:Ne(t)}))),Se=(e,t)=>{const n=pe({option:e,index:t});return Ie(te({},n,{className:Ee.option}),e,{selected:n["aria-selected"],index:t,inputValue:we},ke)},He=null!=(n=re.clearIndicator)?n:A.clearIndicator,Ve=null!=(r=re.paper)?r:A.paper,Xe=null!=(o=re.popper)?o:A.popper,Re=null!=(a=re.popupIndicator)?a:A.popupIndicator;return Y.jsxs(N.Fragment,{children:[Y.jsx(Qp,te({ref:t,className:Kn(Ee.root,p),ownerState:ke},ae(oe),{children:J({id:ge,disabled:w,fullWidth:!0,size:"small"===ne?"small":void 0,InputLabelProps:se(),InputProps:te({ref:xe,className:Ee.inputRoot,startAdornment:Le,onClick:e=>{e.target===e.currentTarget&&je(e)}},(Oe||Ce)&&{endAdornment:Y.jsxs(Fp,{className:Ee.endAdornment,ownerState:ke,children:[Oe?Y.jsx(Gp,te({},ce(),{"aria-label":g,title:g,ownerState:ke},He,{className:Kn(Ee.clearIndicator,null==He?void 0:He.className),children:f})):null,Ce?Y.jsx(Zp,te({},le(),{disabled:w,"aria-label":ve?v:F,title:ve?v:F,ownerState:ke},Re,{className:Kn(Ee.popupIndicator,null==Re?void 0:Re.className),children:q})):null]})}),inputProps:te({className:Ee.input,disabled:w,readOnly:U},ie())})})),ye?Y.jsx(qp,te({as:Z,disablePortal:C,style:{width:ye?ye.clientWidth:null},ownerState:ke,role:"presentation",anchorEl:ye,open:ve},Xe,{className:Kn(Ee.popper,null==Xe?void 0:Xe.className),children:Y.jsxs(Up,te({ownerState:ke,as:G},Ve,{className:Kn(Ee.paper,null==Ve?void 0:Ve.className),children:[H&&0===ze.length?Y.jsx(Kp,{className:Ee.loading,ownerState:ke,children:V}):null,0!==ze.length||B||H?null:Y.jsx(Jp,{className:Ee.noOptions,ownerState:ke,role:"presentation",onMouseDown:e=>{e.preventDefault()},children:R}),ze.length>0?Y.jsx(_p,te({as:I,className:Ee.listbox,ownerState:ke},Me,S,{ref:Te,children:ze.map(((e,t)=>k?We({key:e.key,group:e.group,children:e.options.map(((t,n)=>Se(t,e.index+n)))}):Se(e,t)))})):null]}))})):null]})}));"production"!==process.env.NODE_ENV&&(tf.propTypes={autoComplete:De.bool,autoHighlight:De.bool,autoSelect:De.bool,blurOnSelect:De.oneOfType([De.oneOf(["mouse","touch"]),De.bool]),ChipProps:De.object,classes:De.object,className:De.string,clearIcon:De.node,clearOnBlur:De.bool,clearOnEscape:De.bool,clearText:De.string,closeText:De.string,componentsProps:De.shape({clearIndicator:De.object,paper:De.object,popper:De.object,popupIndicator:De.object}),defaultValue:ee(De.any,(e=>e.multiple&&void 0!==e.defaultValue&&!Array.isArray(e.defaultValue)?new Error(["MUI: The Autocomplete expects the `defaultValue` prop to be an array when `multiple={true}` or undefined.",`However, ${e.defaultValue} was provided.`].join("\n")):null)),disableClearable:De.bool,disableCloseOnSelect:De.bool,disabled:De.bool,disabledItemsFocusable:De.bool,disableListWrap:De.bool,disablePortal:De.bool,filterOptions:De.func,filterSelectedOptions:De.bool,forcePopupIcon:De.oneOfType([De.oneOf(["auto"]),De.bool]),freeSolo:De.bool,fullWidth:De.bool,getLimitTagsText:De.func,getOptionDisabled:De.func,getOptionLabel:De.func,groupBy:De.func,handleHomeEndKeys:De.bool,id:De.string,includeInputInList:De.bool,inputValue:De.string,isOptionEqualToValue:De.func,limitTags:Pt,ListboxComponent:De.elementType,ListboxProps:De.object,loading:De.bool,loadingText:De.node,multiple:De.bool,noOptionsText:De.node,onChange:De.func,onClose:De.func,onHighlightChange:De.func,onInputChange:De.func,onOpen:De.func,open:De.bool,openOnFocus:De.bool,openText:De.string,options:De.array.isRequired,PaperComponent:De.elementType,PopperComponent:De.elementType,popupIcon:De.node,readOnly:De.bool,renderGroup:De.func,renderInput:De.func.isRequired,renderOption:De.func,renderTags:De.func,selectOnFocus:De.bool,size:De.oneOfType([De.oneOf(["small","medium"]),De.string]),slotProps:De.shape({clearIndicator:De.object,paper:De.object,popper:De.object,popupIndicator:De.object}),sx:De.oneOfType([De.arrayOf(De.oneOfType([De.func,De.object,De.bool])),De.func,De.object]),value:ee(De.any,(e=>e.multiple&&void 0!==e.value&&!Array.isArray(e.value)?new Error(["MUI: The Autocomplete expects the `value` prop to be an array when `multiple={true}` or undefined.",`However, ${e.value} was provided.`].join("\n")):null))});var nf=tf;const rf=N.createContext();"production"!==process.env.NODE_ENV&&(rf.displayName="GridContext");var of=rf;function af(e){return kt("MuiGrid",e)}const sf=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],lf=Et("MuiGrid",["root","container","item","zeroMinWidth",...[0,1,2,3,4,5,6,7,8,9,10].map((e=>`spacing-xs-${e}`)),...["column-reverse","column","row-reverse","row"].map((e=>`direction-xs-${e}`)),...["nowrap","wrap-reverse","wrap"].map((e=>`wrap-xs-${e}`)),...sf.map((e=>`grid-xs-${e}`)),...sf.map((e=>`grid-sm-${e}`)),...sf.map((e=>`grid-md-${e}`)),...sf.map((e=>`grid-lg-${e}`)),...sf.map((e=>`grid-xl-${e}`))]);var cf=lf;const uf=["className","columns","columnSpacing","component","container","direction","item","rowSpacing","spacing","wrap","zeroMinWidth"];function df(e){const t=parseFloat(e);return`${t}${String(e).replace(String(t),"")||"px"}`}function pf({breakpoints:e,values:t}){let n="";Object.keys(t).forEach((e=>{""===n&&0!==t[e]&&(n=e)}));const r=Object.keys(e).sort(((t,n)=>e[t]-e[n]));return r.slice(0,r.indexOf(n))}const ff=fo("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:o,item:a,spacing:i,wrap:s,zeroMinWidth:l,breakpoints:c}=n;let u=[];r&&(u=function(e,t,n={}){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[n[`spacing-xs-${String(e)}`]];const r=[];return t.forEach((t=>{const o=e[t];Number(o)>0&&r.push(n[`spacing-${t}-${String(o)}`])})),r}(i,c,t));const d=[];return c.forEach((e=>{const r=n[e];r&&d.push(t[`grid-${e}-${String(r)}`])})),[t.root,r&&t.container,a&&t.item,l&&t.zeroMinWidth,...u,"row"!==o&&t[`direction-xs-${String(o)}`],"wrap"!==s&&t[`wrap-xs-${String(s)}`],...d]}})((({ownerState:e})=>te({boxSizing:"border-box"},e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},e.item&&{margin:0},e.zeroMinWidth&&{minWidth:0},"wrap"!==e.wrap&&{flexWrap:e.wrap})),(function({theme:e,ownerState:t}){return Ft({theme:e},qt({values:t.direction,breakpoints:e.breakpoints.values}),(e=>{const t={flexDirection:e};return 0===e.indexOf("column")&&(t[`& > .${cf.item}`]={maxWidth:"none"}),t}))}),(function({theme:e,ownerState:t}){const{container:n,rowSpacing:r}=t;let o={};if(n&&0!==r){const t=qt({values:r,breakpoints:e.breakpoints.values});let n;"object"==typeof t&&(n=pf({breakpoints:e.breakpoints.values,values:t})),o=Ft({theme:e},t,((t,r)=>{var o;const a=e.spacing(t);return"0px"!==a?{marginTop:`-${df(a)}`,[`& > .${cf.item}`]:{paddingTop:df(a)}}:null!=(o=n)&&o.includes(r)?{}:{marginTop:0,[`& > .${cf.item}`]:{paddingTop:0}}}))}return o}),(function({theme:e,ownerState:t}){const{container:n,columnSpacing:r}=t;let o={};if(n&&0!==r){const t=qt({values:r,breakpoints:e.breakpoints.values});let n;"object"==typeof t&&(n=pf({breakpoints:e.breakpoints.values,values:t})),o=Ft({theme:e},t,((t,r)=>{var o;const a=e.spacing(t);return"0px"!==a?{width:`calc(100% + ${df(a)})`,marginLeft:`-${df(a)}`,[`& > .${cf.item}`]:{paddingLeft:df(a)}}:null!=(o=n)&&o.includes(r)?{}:{width:"100%",marginLeft:0,[`& > .${cf.item}`]:{paddingLeft:0}}}))}return o}),(function({theme:e,ownerState:t}){let n;return e.breakpoints.keys.reduce(((r,o)=>{let a={};if(t[o]&&(n=t[o]),!n)return r;if(!0===n)a={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if("auto"===n)a={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const i=qt({values:t.columns,breakpoints:e.breakpoints.values}),s="object"==typeof i?i[o]:i;if(null==s)return r;const l=Math.round(n/s*1e8)/1e6+"%";let c={};if(t.container&&t.item&&0!==t.columnSpacing){const n=e.spacing(t.columnSpacing);if("0px"!==n){const e=`calc(${l} + ${df(n)})`;c={flexBasis:e,maxWidth:e}}}a=te({flexBasis:l,flexGrow:0,maxWidth:l},c)}return 0===e.breakpoints.values[o]?Object.assign(r,a):r[e.breakpoints.up(o)]=a,r}),{})}));const mf=e=>{const{classes:t,container:n,direction:r,item:o,spacing:a,wrap:i,zeroMinWidth:s,breakpoints:l}=e;let c=[];n&&(c=function(e,t){if(!e||e<=0)return[];if("string"==typeof e&&!Number.isNaN(Number(e))||"number"==typeof e)return[`spacing-xs-${String(e)}`];const n=[];return t.forEach((t=>{const r=e[t];if(Number(r)>0){const e=`spacing-${t}-${String(r)}`;n.push(e)}})),n}(a,l));const u=[];l.forEach((t=>{const n=e[t];n&&u.push(`grid-${t}-${String(n)}`)}));return Dt({root:["root",n&&"container",o&&"item",s&&"zeroMinWidth",...c,"row"!==r&&`direction-xs-${String(r)}`,"wrap"!==i&&`wrap-xs-${String(i)}`,...u]},af,t)},hf=N.forwardRef((function(e,t){const n=co({props:e,name:"MuiGrid"}),{breakpoints:r}=lo(),o=qn(n),{className:a,columns:i,columnSpacing:s,component:l="div",container:c=!1,direction:u="row",item:d=!1,rowSpacing:p,spacing:f=0,wrap:m="wrap",zeroMinWidth:h=!1}=o,g=It(o,uf),v=p||f,A=s||f,b=N.useContext(of),y=c?i||12:b,x={},w=te({},g);r.keys.forEach((e=>{null!=g[e]&&(x[e]=g[e],delete w[e])}));const z=te({},o,{columns:y,container:c,direction:u,item:d,rowSpacing:v,columnSpacing:A,wrap:m,zeroMinWidth:h,spacing:f},x,{breakpoints:r.keys}),O=mf(z);return Y.jsx(of.Provider,{value:y,children:Y.jsx(ff,te({ownerState:z,className:Kn(O.root,a),as:l,ref:t},w))})}));if("production"!==process.env.NODE_ENV&&(hf.propTypes={children:De.node,classes:De.object,className:De.string,columns:De.oneOfType([De.arrayOf(De.number),De.number,De.object]),columnSpacing:De.oneOfType([De.arrayOf(De.oneOfType([De.number,De.string])),De.number,De.object,De.string]),component:De.elementType,container:De.bool,direction:De.oneOfType([De.oneOf(["column-reverse","column","row-reverse","row"]),De.arrayOf(De.oneOf(["column-reverse","column","row-reverse","row"])),De.object]),item:De.bool,lg:De.oneOfType([De.oneOf(["auto"]),De.number,De.bool]),md:De.oneOfType([De.oneOf(["auto"]),De.number,De.bool]),rowSpacing:De.oneOfType([De.arrayOf(De.oneOfType([De.number,De.string])),De.number,De.object,De.string]),sm:De.oneOfType([De.oneOf(["auto"]),De.number,De.bool]),spacing:De.oneOfType([De.arrayOf(De.oneOfType([De.number,De.string])),De.number,De.object,De.string]),sx:De.oneOfType([De.arrayOf(De.oneOfType([De.func,De.object,De.bool])),De.func,De.object]),wrap:De.oneOf(["nowrap","wrap-reverse","wrap"]),xl:De.oneOfType([De.oneOf(["auto"]),De.number,De.bool]),xs:De.oneOfType([De.oneOf(["auto"]),De.number,De.bool]),zeroMinWidth:De.bool}),"production"!==process.env.NODE_ENV){const e=$e("Grid",hf);hf.propTypes=te({},hf.propTypes,{direction:e("container"),lg:e("item"),md:e("item"),sm:e("item"),spacing:e("container"),wrap:e("container"),xs:e("item"),zeroMinWidth:e("item")})}var gf=hf;function vf(e){return kt("MuiTypography",e)}var Af=Et("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const bf=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],yf=fo("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${Ze(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((({theme:e,ownerState:t})=>te({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16}))),xf={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},wf={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},zf=N.forwardRef((function(e,t){const n=co({props:e,name:"MuiTypography"}),r=(e=>wf[e]||e)(n.color),o=qn(te({},n,{color:r})),{align:a="inherit",className:i,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:p=xf}=o,f=It(o,bf),m=te({},o,{align:a,color:r,className:i,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:p}),h=s||(u?"p":p[d]||xf[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:a,classes:i}=e;return Dt({root:["root",a,"inherit"!==e.align&&`align${Ze(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]},vf,i)})(m);return Y.jsx(yf,te({as:h,ref:t,ownerState:m,className:Kn(g.root,i)},f))}));"production"!==process.env.NODE_ENV&&(zf.propTypes={align:De.oneOf(["center","inherit","justify","left","right"]),children:De.node,classes:De.object,className:De.string,component:De.elementType,gutterBottom:De.bool,noWrap:De.bool,paragraph:De.bool,sx:De.oneOfType([De.arrayOf(De.oneOfType([De.func,De.object,De.bool])),De.func,De.object]),variant:De.oneOfType([De.oneOf(["body1","body2","button","caption","h1","h2","h3","h4","h5","h6","inherit","overline","subtitle1","subtitle2"]),De.string]),variantMapping:De.object});var Of,Cf,jf=zf,Pf={exports:{}};Pf.exports=(Of={705:e=>{e.exports=function(e,t){const n=[];return 0===t.length?n.push({text:e,highlight:!1}):t[0][0]>0&&n.push({text:e.slice(0,t[0][0]),highlight:!1}),t.forEach(((r,o)=>{const a=r[0],i=r[1];n.push({text:e.slice(a,i),highlight:!0}),o===t.length-1?i<e.length&&n.push({text:e.slice(i,e.length),highlight:!1}):i<t[o+1][0]&&n.push({text:e.slice(i,t[o+1][0]),highlight:!1})})),n}}},Cf={},function e(t){var n=Cf[t];if(void 0!==n)return n.exports;var r=Cf[t]={exports:{}};return Of[t](r,r.exports,e),r.exports}(705));var Bf=W(Pf.exports);var Df=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},Mf="object"==typeof L&&L&&L.Object===Object&&L,Tf=Mf,Nf="object"==typeof self&&self&&self.Object===Object&&self,kf=Tf||Nf||Function("return this")(),Ef=kf,Lf=function(){return Ef.Date.now()},Wf=/\s/;var If=function(e){for(var t=e.length;t--&&Wf.test(e.charAt(t)););return t},Sf=/^\s+/;var Hf=function(e){return e?e.slice(0,If(e)+1).replace(Sf,""):e},Vf=kf.Symbol,Xf=Vf,Rf=Object.prototype,Yf=Rf.hasOwnProperty,Qf=Rf.toString,Ff=Xf?Xf.toStringTag:void 0;var Gf=function(e){var t=Yf.call(e,Ff),n=e[Ff];try{e[Ff]=void 0;var r=!0}catch(e){}var o=Qf.call(e);return r&&(t?e[Ff]=n:delete e[Ff]),o},Zf=Object.prototype.toString;var qf=Gf,Uf=function(e){return Zf.call(e)},Kf=Vf?Vf.toStringTag:void 0;var Jf=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Kf&&Kf in Object(e)?qf(e):Uf(e)};var _f=function(e){return null!=e&&"object"==typeof e},$f=Jf,em=_f;var tm=Hf,nm=Df,rm=function(e){return"symbol"==typeof e||em(e)&&"[object Symbol]"==$f(e)},om=/^[-+]0x[0-9a-f]+$/i,am=/^0b[01]+$/i,im=/^0o[0-7]+$/i,sm=parseInt;var lm=Df,cm=Lf,um=function(e){if("number"==typeof e)return e;if(rm(e))return NaN;if(nm(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=nm(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=tm(e);var n=am.test(e);return n||im.test(e)?sm(e.slice(2),n?2:8):om.test(e)?NaN:+e},dm=Math.max,pm=Math.min;var fm=function(e,t,n){var r,o,a,i,s,l,c=0,u=!1,d=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function f(t){var n=r,a=o;return r=o=void 0,c=t,i=e.apply(a,n)}function m(e){var n=e-l;return void 0===l||n>=t||n<0||d&&e-c>=a}function h(){var e=cm();if(m(e))return g(e);s=setTimeout(h,function(e){var n=t-(e-l);return d?pm(n,a-(e-c)):n}(e))}function g(e){return s=void 0,p&&r?f(e):(r=o=void 0,i)}function v(){var e=cm(),n=m(e);if(r=arguments,o=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(h,t),u?f(e):i}(l);if(d)return clearTimeout(s),s=setTimeout(h,t),f(l)}return void 0===s&&(s=setTimeout(h,t)),i}return t=um(t)||0,lm(n)&&(u=!!n.leading,a=(d="maxWait"in n)?dm(um(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),v.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=o=s=void 0},v.flush=function(){return void 0===s?i:g(cm())},v},mm=fm,hm=Df;var gm=W((function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return hm(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),mm(e,t,{leading:r,maxWait:t,trailing:o})})),vm=process.env.REACT_APP_GOOGLE_MAP_KEY;var Am,bm,ym,xm,wm,zm={current:null},Om={current:null};function Cm(t){var n=t.name,r=t.address,o=t.placeholder,a=t.setLocation,i=t.selectLocation,s=F(t,["name","address","placeholder","setLocation","selectLocation"]),l=c.useFormContext().control,u=e.useState(null),d=u[0],p=u[1],f=e.useState(""),m=f[0],h=f[1],g=e.useState([]),v=g[0],A=g[1],b=e.useRef(!1);"undefined"==typeof window||b.current||(document.querySelector("#google-maps")||function(e,t,n){if(t){var r=document.createElement("script");r.setAttribute("async",""),r.setAttribute("id",n),r.src=e,t.appendChild(r)}}("https://maps.googleapis.com/maps/api/js?key=".concat(vm,"&libraries=places"),document.querySelector("head"),"google-maps"),b.current=!0);var y=N.useMemo((function(){return gm((function(e,t){zm.current.getPlacePredictions(e,t)}),200)}),[]);N.useEffect((function(){var e=!0;if(!zm.current&&window.google&&window.google.maps&&window.google.maps.places&&(zm.current=new window.google.maps.places.AutocompleteService),zm.current){if(!Om.current&&window.google&&window.google.maps&&window.google.maps.places&&(Om.current=new window.google.maps.places.PlacesService(new window.google.maps.Map(document.getElementById("google-maps")))),""!==m)return y({input:m},(function(t){if(e){var n=[];d&&(n=[d]),t&&(n=q(q([],n,!0),t,!0)),A(n)}})),function(){e=!1};A(d?[d]:[])}}),[d,m,y]);return Y.jsx(c.Controller,{name:"".concat(n,".description"),control:l,render:function(t){var l=t.field,c=t.fieldState.error;return Y.jsx(nf,{id:"".concat(n,".description"),getOptionLabel:function(e){return"string"==typeof e?e:e.description},filterOptions:function(e){return e},options:v,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,value:null!=r?r:l.value,onChange:function(e,t){A(t?q([t],v,!0):v),p(t),l.onChange(null==t?void 0:t.description),function(e){Om.current&&e&&e.place_id&&Om.current.getDetails({placeId:null==e?void 0:e.place_id},(function(t,r){if(r===window.google.maps.places.PlacesServiceStatus.OK){var o={placeId:null==e?void 0:e.place_id,description:null==e?void 0:e.description,location:{type:"Point",coordinates:[t.geometry.location.lng(),t.geometry.location.lat()]}};a&&a(o),i&&i(n,o)}}))}(t)},onInputChange:function(e,t){h(t)},renderInput:function(e){var t,n,r,a;return Y.jsx(Fd,Q({},e,s,{placeholder:o,fullWidth:!0,error:!!c,helperText:null!==(a=null!==(t=null==c?void 0:c.message)&&void 0!==t?t:null===(r=null===(n=Object(c))||void 0===n?void 0:n.id)||void 0===r?void 0:r.message)&&void 0!==a?a:""}))},renderOption:function(t,n){var r=n.structured_formatting.main_text_matched_substrings,o=[];return r&&(o=Bf(n.structured_formatting.main_text,r.map((function(e){return[e.offset,e.offset+e.length]})))),e.createElement("li",Q({},t,{key:n.description}),Y.jsxs(gf,{container:!0,alignItems:"center",children:[Y.jsx(gf,{item:!0,children:Y.jsx(bo,{sx:{color:"text.secondary",mr:2}})}),Y.jsxs(gf,{item:!0,xs:!0,children:[o.map((function(e,t){return Y.jsx("span",{style:{fontWeight:e.highlight?700:400},children:e.text},t)})),Y.jsx(jf,{variant:"body2",color:"text.secondary",children:n.structured_formatting.secondary_text})]})]}))}})}})}function jm(e,t,n,r,o){var a;switch(n[t]=void 0,e.type){case ym.STRING:case ym.PHONENUMBER:case ym.LOCALIZEDString:case ym.OBJECTID:n[t]=r&&r.get(t)?r.get(t):"",a=k.string().nullable();break;case ym.BOOLEAN:n[t]=!r||!1!==r.get(t)&&!0!==r.get(t)?void 0:r.get(t),a=k.boolean().nullable();break;case ym.REFERENCE:n[t]=r&&r.get(t+"-name")?{_id:r.get(t+"-id"),title:r.get(t+"-name")}:void 0,a=k.object().nullable();break;case ym.DATE:case ym.NUMBER:n[t]={from:"",to:""},n[t].from=r.get(t+"-from")?r.get(t+"-from"):"",n[t].to=r.get(t+"-to")?r.get(t+"-to"):"",a=k.object().nullable();break;case ym.ENUM:n[t]=r&&r.get(t)?r.get(t):void 0,a=k.string().nullable()}return a}!function(e){e.SHOW="SHOW",e.LIST="LIST",e.NEW="NEW",e.EDIT="EDIT"}(Am||(Am={})),function(e){e.RECORD="RECORD",e.Resource="RESOUCRE"}(bm||(bm={})),function(e){e.STRING="String",e.NUMBER="Number",e.ENUM="enum",e.REFERENCE="ref",e.DATE="Date",e.PASSWORD="password",e.BOOLEAN="Boolean",e.OBJECTID="ObjectID",e.NESTEDSCHEMA="nestedSchema",e.ARRAY="Array",e.IMAGE="image",e.LOCALIZEDString="localizedString",e.PHONENUMBER="phoneNumber",e.COLOR="color",e.TIMEPICKER="timePicker",e.FILE="File",e.LOCATION="LOCATION",e.RICH_TEXT_I="RICH_TEXT_I",e.RICH_TEXT_II="RICH_TEXT_II"}(ym||(ym={})),function(e){e.NORMAL="NORMAL",e.FILE_DOWNLOAD="FILE_DOWNLOAD",e.CUSTOM_COMPONENT="CUSTOM_COMPONENT"}(xm||(xm={})),function(e){e.ENGLISH="en",e.ARABIC="ar"}(wm||(wm={}));var Pm=function(){function e(){}return e.isEnglish=function(){switch(localStorage.getItem("i18nextLng")){case wm.ENGLISH:return!0;case wm.ARABIC:return!1;default:return!0}},e.getLocale=function(){return this.isEnglish()?wm.ENGLISH:wm.ARABIC},e.getLocalizedString=function(e){for(var t=this.getLocale(),n=e[0].value,r=0;r<e.length;r++){var o=e[r];if(o.key===t)return o.value?o.value:n}return n},e}(),Bm=y.create({withCredentials:!0}),Dm=function(){function e(){}return e.getReferenceImage=function(e,t){var n=void 0,r=require("lodash");if(e.properties.disableImageOnReference)return n;var o=e.properties.model;if(e.properties.imageOnReferencePath)n=r.get(t,e.properties.imageOnReferencePath);else{if(n=this.getDataFromPath(o,"image",t))return n;if(n=this.getDataFromPath(o,"logo",t))return n;if(n=this.getDataFromPath(o,"photo",t))return n}return n},e.getDataFromPath=function(e,t,n){var r=require("lodash");return n[t]&&"string"==typeof n[t]?n[t]:e[t]&&e[t].valuePath?r.get(n,e[t].valuePath):void 0},e}(),Mm=function(){function e(){}return e.getCartesianProduct=function(e){return e.reduce((function(e,t){return e.map((function(e){return t.map((function(t){return e.concat([t])}))})).reduce((function(e,t){return e.concat(t)}),[])}),[[]])},e.getReferenceValues=function(e){var t=e.referencedValues,n=e.value,r=e.loading,o=e.extraKey,a=e.fullKey,i=e.key,s=e.apiRoute,l=e.resources,c=e.pathRoute,u=e.schema,d=e.setLoading,p=e.setReferencedValues,f=e.adminPath;return G(this,void 0,void 0,(function(){var e,m,h,g,v,A,b,y,x,w,z,O,C,j;return Z(this,(function(P){switch(P.label){case 0:return t[i]||!n?[2]:((e=Q({},r))[a]=!0,d(e),[4,Bm.get(s||(u[i].apiRoute?u[i].apiRoute:"".concat(null!=f?f:"","/").concat(l[u[i].path].properties.modelName)))]);case 1:for(m=P.sent(),h=m.data.data.records,g=[],v=0;v<h.length;v++)A=h[v],b=l[c||u[i].path],y=b.properties.title,x=b.properties.model[y].type,w=A[y],z=Dm.getReferenceImage(b,A),x===ym.LOCALIZEDString&&(w=Pm.getLocalizedString(w)),O={title:w,_id:A._id,image:z},o&&(O[o]=A[o]),g.push(O);return(C=Q({},t))[i]=g,p(C),(j=Q({},r))[a]=!1,d(j),[2]}}))}))},e.onErrorAction=function(e){var t=e.data,n=e.error,r=e.reset,o=e.setErrorState;(0,e.setSubmitStatus)(!1),r(t),setTimeout((function(){o({state:!1})}),4e3),o({state:!0,message:JSON.parse(n).meta.message,severity:"error"})},e.convertCamelCaseToWord=function(e){var t=e.replace(/([A-Z])/g," $1");return t.charAt(0).toUpperCase()+t.slice(1)},e.checkLocalizedString=function(e,t,n){return e[t].properties.model[n].type===ym.LOCALIZEDString},e.stringifyTime=function(e){if(e){var t=e.hour(),n=e.minute(),r=t>=12?"PM":"AM";return(t=(t=(t%=12)||12)<10?"0"+t:t)+":"+(n=n<10?"0"+n:n)+" "+r}},e.convertToOriginal=function(e){var t=e.split(":"),n=t[0],r=t[1].split(" "),o=r[0],a="PM"===r[1]?parseInt(n)+12:parseInt(n);return b("2022-04-07").set("minutes",parseInt(o)).set("hours",a)},e.getRecordName=function(e,t,n){return n&&"string"!=typeof e&&n.properties.model[t].type===ym.LOCALIZEDString?Pm.getLocalizedString(e):e},e}(),Tm=fo("div")((function(){return{flexGrow:1,height:"100%",overflow:"hidden"}})),Nm=fo(x)((function(e){return{maxHeight:"100%","& .simplebar-scrollbar":{"&:before":{backgroundColor:gr(e.theme.palette.grey[600],.48)},"&.simplebar-visible:before":{opacity:1}},"& .simplebar-mask":{zIndex:"inherit"}}})),km=e.forwardRef((function(e,t){var n=e.children,r=e.sx,o=F(e,["children","sx"]),a="undefined"==typeof navigator?"SSR":navigator.userAgent;return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)?Y.jsx(bo,Q({ref:t,sx:Q({overflow:"auto"},r)},o,{children:n})):Y.jsx(Tm,{children:Y.jsx(Nm,Q({scrollableNodeProps:{ref:t},clickOnTrack:!1,sx:r},o,{children:n}))})})),Em=e.memo(km);function Lm(e,t,n){return e.has(t)?e.set(t,n):e.append(t,n),e}function Wm(e,t,n,r,o,a,i){Object.keys(e).map((function(t){if(e[t]&&n[t].type===ym.DATE){if(e[t].from&&""!==e[t].from)try{e[t].from=e[t].from.toISOString().split("T")[0]}catch(e){}if(e[t].to&&""!==e[t].to)try{e[t].to=e[t].to.toISOString().split("T")[0]}catch(e){}}}));var s="";return Object.keys(e).map((function(t){a&&i&&"all"!==i&&a===t||e[t]&&""!==e[t]&&n[t].type&&(n[t].type===ym.NUMBER||n[t].type===ym.DATE?!e[t].from&&!e[t].to||""===e[t].from&&""===e[t].to?e[t]=void 0:(e[t].from&&""!==e[t].from&&(r=Lm(r,t+"-from",e[t].from)),e[t].to&&""!==e[t].to&&(r=Lm(r,t+"-to",e[t].to)),s=s+t+":from="+e[t].from+",to="+e[t].to+";;"+n[t].type+"^^"):n[t].type===ym.REFERENCE?e[t]._id&&(r=Lm(r,t+"-name",e[t].title),r=Lm(r,t+"-id",e[t]._id),s=s+t+"="+e[t]._id+";;"+n[t].type+"^^"):(r=Lm(r,t,e[t]),s=s+t+"="+e[t]+";;"+n[t].type+"^^"))})),t(),o(r),s}var Im=["true","false"];function Sm(e,t,r,o,a,i,s,l,c,u,d){if(r[t])switch(r[t].type){case ym.STRING:return Y.jsx(os,{name:i,size:e,label:r[t].value},t);case ym.PHONENUMBER:return Y.jsx(w,{defaultCountry:r[t].countryCodes?r[t].countryCodes[0]:"sa",onChange:function(e){return u(i,e)},onlyCountries:r[t].countryCodes?r[t].countryCodes:["eg","sa"],name:i,size:e,label:r[t].value,value:d(i)?d(i):"",variant:"outlined",fullWidth:!0},t);case ym.TIMEPICKER:case ym.LOCALIZEDString:case ym.OBJECTID:return Y.jsx(os,{name:i,size:e,label:r[t].value},t);case ym.NUMBER:return Y.jsxs(n.Card,{sx:{py:3,px:3},children:[Y.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:r[t].value},t),Y.jsxs(n.Stack,{direction:"row",spacing:2,children:[Y.jsx(os,{name:t+".from",style:{flex:1,width:90},size:e,label:s?"From":"من"}),Y.jsx(os,{name:t+".to",style:{flex:1,width:90},size:e,label:s?"To":"إلى"})]})]},t);case ym.DATE:return Y.jsxs(n.Card,{sx:{py:3,px:3},children:[Y.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:r[t].value},t),Y.jsxs(n.Grid,{container:!0,spacing:2,children:[Y.jsx(n.Grid,{item:!0,xs:12,children:Y.jsx(bs,{name:t+".from",size:e,label:s?"From":"من",fullWidth:!0},t)}),Y.jsx(n.Grid,{item:!0,xs:12,children:Y.jsx(bs,{name:t+".to",size:e,label:s?"To":"إلى",fullWidth:!0},t)})]})]},t);case ym.ENUM:return Y.jsx(as,{name:i,size:e,label:r[t].value,SelectProps:{native:!1,sx:{textTransform:"capitalize"}},children:r[t].enumValues.map((function(e){return Y.jsx(n.MenuItem,{value:e,sx:{mx:1,my:.5,borderRadius:.75,typography:"body2",textTransform:"capitalize"},children:e.includes("_")?e.split("_").map((function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()})).join(" "):e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},e)}))},t);case ym.BOOLEAN:return Y.jsx(as,{name:i,size:e,label:r[t].value,SelectProps:{native:!1,sx:{textTransform:"capitalize"}},children:Im.map((function(e){return Y.jsx(n.MenuItem,{value:e,sx:{mx:1,my:.5,borderRadius:.75,typography:"body2",textTransform:"capitalize"},children:e},e)}))},t);case ym.ARRAY:case ym.REFERENCE:return Y.jsx(As,{name:i,size:e,label:r[t].value,multiple:!1,onOptionChange:function(e){return c(e,t)},options:o[t]?o[t]:[],loading:a[i],onOpenChanged:function(e){return l(r[t].apiRoute,r[t].path,e,t,i)}},t);default:return}}var Hm,Vm=require("@mui/icons-material"),Xm=function(e){return Y.jsx(Rm,{src:e,sx:{width:1,height:1}})};function Rm(e){var t=e.src,r=e.sx,o=Y.jsx(n.Box,{component:"span",sx:Q({width:24,height:24,display:"inline-block",bgcolor:"currentColor",mask:"url(".concat(t,") no-repeat center / contain"),WebkitMask:"url(".concat(t,") no-repeat center / contain")},r)}),a=Y.jsx(n.Box,{sx:{display:"flex",gap:1},children:Y.jsx(n.SvgIcon,{component:Vm[t],color:"inherit"})});return void 0!==Vm[t]?a:o}function Ym(t){var r=this,o=t.schema,a=t.resources,i=t.filterProperties,s=t.searchParams,u=t.scopeKey,d=t.scopeValue,p=t.setParams,f=t.size;t.initialQueryParams;var m=t.isQuickFilter,h=t.quickFilterValues,g=t.onRefrenceChanged,v=t.setSearchParams,A=t.handleFilterDrawerClose,b=t.filterString,y=e.useState({}),x=y[0],w=y[1],z=e.useState({}),O=z[0],C=z[1],j=function(e,t,n,i,s){return G(r,void 0,void 0,(function(){return Z(this,(function(r){switch(r.label){case 0:return[4,Mm.getReferenceValues({apiRoute:e,referencedValues:O,value:n,loading:x,fullKey:s,key:i,pathRoute:t,resources:a,schema:o,setLoading:w,setReferencedValues:C})];case 1:return r.sent(),[2]}}))}))},P={},B={};i.map((function(e,t){"__v"!==e&&o[e]&&(P[e]=jm(o[e],e,B,s))}));var D=k.object().shape(P),M=Pm.isEnglish(),T=e.useMemo((function(){return B}),[]),E=c.useForm({resolver:Ci(D),defaultValues:T}),L=E.handleSubmit,W=E.reset,I=E.setValue,S=E.getValues,H=function(e){return G(r,void 0,void 0,(function(){var t,n;return Z(this,(function(r){return t=Q(Q({},e),h),n=Wm(t,A,o,s,v,u,d),b&&b(n,e),[2]}))}))};return m?Y.jsx(Ki,{methods:E,onSubmit:L(H),children:Y.jsxs(n.Stack,{direction:"row",spacing:2,justifyContent:"end",children:[i&&i.map((function(e,t){return Y.jsx(n.Grid,{minWidth:170,children:Sm(f,e,o,O,x,e,M,j,g,I,S)},e+t)})),Y.jsx(l.LoadingButton,{size:"small",type:"submit",variant:"outlined",children:M?"Filter":"التصفية"})]},"grid1")}):Y.jsx("div",{children:Y.jsx(N.Fragment,{children:Y.jsxs(Ki,{methods:E,onSubmit:L(H),children:[Y.jsx(Em,{children:Y.jsx(n.Grid,{container:!0,spacing:2,justifyContent:"end",style:{padding:"2rem"},children:i&&i.map((function(e,t){return Y.jsx(n.Grid,{item:!0,xs:12,children:Sm(f,e,o,O,x,e,M,j,g,I,S)},e+t)}))},"grid1")}),Y.jsx(bo,{sx:{marginTop:"2rem",paddingBottom:"2rem"},children:Y.jsx(n.Stack,{mt:2,ml:3,children:Y.jsxs(n.Grid,{flexDirection:"column",children:[Y.jsx(l.LoadingButton,{style:{flex:1,margin:8,width:150},type:"submit",variant:"contained",startIcon:Xm("FilterAlt"),children:M?"Filter":"التصفية"}),Y.jsx(l.LoadingButton,{style:{flex:1},type:"reset",variant:"outlined",color:"inherit",startIcon:Xm("RestartAlt"),onClick:function(){v({}),p((function(e){return Q(Q({},e),{filters:void 0})})),W(Q({},T)),A()},children:M?"Reset":"إلغاء"})]})})})]})})})}function Qm(e){var t=e.schema,r=e.resources,o=e.size,a=e.open,i=e.scopeKey,s=e.scopeValue,l=e.filterProperties,c=e.searchParams,u=e.setSearchParams,d=e.setParams,p=e.initialQueryParams,f=e.quickFilterValues,m=e.onRefrenceChanged,h=e.handleFilterDrawerClose,g=e.filterString,v=Pm.isEnglish();return Y.jsx("div",{children:Y.jsx(N.Fragment,{children:Y.jsxs(oi,{anchor:"right",open:a,onClose:h,children:[Y.jsxs(n.Stack,{direction:"row",alignItems:"center",style:{minWidth:"340px",padding:"1rem",width:"20vw"},justifyContent:"space-between",sx:{px:1,py:1},children:[Y.jsx(n.Typography,{variant:"h6",children:v?"Filters":"التصفية"}),Y.jsx(n.IconButton,{onClick:h,children:Y.jsx(xi,{})})]}),Y.jsx(pi,{}),Y.jsx(Em,{children:Y.jsx(Ym,{schema:t,size:o,resources:r,initialQueryParams:p,filterProperties:l,onRefrenceChanged:m,handleFilterDrawerClose:h,filterString:g,scopeKey:i,scopeValue:s,setParams:d,searchParams:c,setSearchParams:u,quickFilterValues:f})})]})})})}function Fm(e,t){var n=(e=new Date(e)).getMonth()+1,r=e.getDate(),o=Gm(n),a=Gm(r),i=e.getFullYear()+"-"+o+"-"+a;return t&&(i=i+" "+function(e,t){var n=e.getHours(),r=e.getMinutes(),o=n>=12?"pm":"am";return t===wm.ARABIC&&(o=function(e){switch(e){case"am":default:return"صباحاً";case"pm":return"مساءاً"}}(o)),(n=(n%=12)||12)+":"+(r=r<10?"0"+r:r)+" "+o}(e,wm.ENGLISH)),i}function Gm(e){return e%10===e?"0".concat(e.toString()):e.toString()}!function(e){e.ALL="ALL",e.IMAGE="IMAGE",e._3D="3D",e.PDF="PDF",e.EXCEL="EXCEL",e.WORD="WORD",e.VIDEO="VIDEO",e.TEXT="TEXT",e.ZIP="ZIP",e.POWER_POINT="POWER_POINT",e.AUDIO="AUDIO"}(Hm||(Hm={}));var Zm=["pdf"],qm=["txt"],Um=["psd"],Km=["doc","docx"],Jm=["xls","xlsx"],_m=["zip","rar","iso"],$m=["ai","esp"],eh=["ppt","pptx"],th=["wav","aif","mp3","aac"],nh=["jpg","jpeg","gif","bmp","png","svg","webp","avif","JPG"],rh=["m4v","avi","mpg","mp4","webm"],oh=["gltf","stl","glb"],ah=function(e){return"/assets/icons/files/".concat(e,".svg")};function ih(e){var t;switch(null==e?void 0:e.includes(lh(e))){case qm.includes(lh(e)):t="txt";break;case _m.includes(lh(e)):t="zip";break;case th.includes(lh(e)):t="audio";break;case nh.includes(lh(e)):t="image";break;case rh.includes(lh(e)):t="video";break;case Km.includes(lh(e)):t="word";break;case Jm.includes(lh(e)):t="excel";break;case eh.includes(lh(e)):t="powerpoint";break;case Zm.includes(lh(e)):t="pdf";break;case Um.includes(lh(e)):t="photoshop";break;case $m.includes(lh(e)):t="illustrator";break;default:t=lh(e)}return t}function sh(e){var t;switch(ih(e)){case"folder":t=ah("ic_folder");break;case"txt":t=ah("ic_txt");break;case"zip":t=ah("ic_zip");break;case"audio":t=ah("ic_audio");break;case"video":t=ah("ic_video");break;case"word":t=ah("ic_word");break;case"excel":t=ah("ic_excel");break;case"powerpoint":t=ah("ic_power_point");break;case"pdf":t=ah("ic_pdf");break;case"photoshop":t=ah("ic_pts");break;case"illustrator":t=ah("ic_ai");break;case"image":t=ah("ic_img");break;default:t=ah("ic_file")}return t}function lh(e){return void 0===e&&(e=""),e&&e.split(".").pop()||""}function ch(e,t){if(t!==Hm.ALL)return t;var n;switch(null==e?void 0:e.includes(lh(e))){case qm.includes(lh(e)):n=Hm.TEXT;break;case _m.includes(lh(e)):n=Hm.ZIP;break;case th.includes(lh(e)):n=Hm.AUDIO;break;case nh.includes(lh(e)):n=Hm.IMAGE;break;case rh.includes(lh(e)):n=Hm.VIDEO;break;case Km.includes(lh(e)):n=Hm.WORD;break;case Jm.includes(lh(e)):n=Hm.EXCEL;break;case eh.includes(lh(e)):n=Hm.POWER_POINT;break;case Zm.includes(lh(e)):n=Hm.PDF;break;case Um.includes(lh(e)):case $m.includes(lh(e)):n=Hm.IMAGE;break;case oh.includes(lh(e)):n=Hm._3D;break;default:n=Hm.IMAGE}return n}const uh=function(e={}){const{createStyledComponent:t=Pr,useThemeProps:n=Br,componentName:r="MuiStack"}=e,o=t(Tr),a=N.forwardRef((function(e,t){const a=qn(n(e)),{component:i="div",direction:s="column",spacing:l=0,divider:c,children:u,className:d,useFlexGap:p=!1}=a,f=It(a,Cr),m={direction:s,spacing:l,useFlexGap:p},h=Dt({root:["root"]},(e=>kt(r,e)),{});return Y.jsx(o,te({as:i,ownerState:m,ref:t,className:Kn(h.root,d)},f,{children:c?Dr(u,c):u}))}));return"production"!==process.env.NODE_ENV&&(a.propTypes={children:De.node,direction:De.oneOfType([De.oneOf(["column-reverse","column","row-reverse","row"]),De.arrayOf(De.oneOf(["column-reverse","column","row-reverse","row"])),De.object]),divider:De.node,spacing:De.oneOfType([De.arrayOf(De.oneOfType([De.number,De.string])),De.number,De.object,De.string]),sx:De.oneOfType([De.arrayOf(De.oneOfType([De.func,De.object,De.bool])),De.func,De.object])}),a}({createStyledComponent:fo("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>co({props:e,name:"MuiStack"})});"production"!==process.env.NODE_ENV&&(uh.propTypes={children:De.node,component:De.elementType,direction:De.oneOfType([De.oneOf(["column-reverse","column","row-reverse","row"]),De.arrayOf(De.oneOf(["column-reverse","column","row-reverse","row"])),De.object]),divider:De.node,spacing:De.oneOfType([De.arrayOf(De.oneOfType([De.number,De.string])),De.number,De.object,De.string]),sx:De.oneOfType([De.arrayOf(De.oneOfType([De.func,De.object,De.bool])),De.func,De.object]),useFlexGap:De.bool});var dh=uh;function ph(e){return kt("MuiTooltip",e)}var fh=Et("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);const mh=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];const hh=fo(Ud,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})((({theme:e,ownerState:t,open:n})=>te({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${fh.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${fh.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${fh.arrow}`]:te({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${fh.arrow}`]:te({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})}))),gh=fo("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Ze(n.placement.split("-")[0])}`]]}})((({theme:e,ownerState:t})=>{return te({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:gr(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:(n=16/14,Math.round(1e5*n)/1e5)+"em",fontWeight:e.typography.fontWeightRegular},{[`.${fh.popper}[data-popper-placement*="left"] &`]:te({transformOrigin:"right center"},t.isRtl?te({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):te({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${fh.popper}[data-popper-placement*="right"] &`]:te({transformOrigin:"left center"},t.isRtl?te({marginRight:"14px"},t.touch&&{marginRight:"24px"}):te({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${fh.popper}[data-popper-placement*="top"] &`]:te({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${fh.popper}[data-popper-placement*="bottom"] &`]:te({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})});var n})),vh=fo("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})((({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:gr(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let Ah=!1,bh=null,yh={x:0,y:0};function xh(e,t){return n=>{t&&t(n),e(n)}}const wh=N.forwardRef((function(e,t){var n,r,o,a,i,s,l,c,u,d,p,f,m,h,g,v,A,b,y;const x=co({props:e,name:"MuiTooltip"}),{arrow:w=!1,children:z,components:O={},componentsProps:C={},describeChild:j=!1,disableFocusListener:P=!1,disableHoverListener:B=!1,disableInteractive:D=!1,disableTouchListener:M=!1,enterDelay:T=100,enterNextDelay:k=0,enterTouchDelay:E=700,followCursor:L=!1,id:W,leaveDelay:I=0,leaveTouchDelay:S=1500,onClose:H,onOpen:V,open:X,placement:R="bottom",PopperComponent:Q,PopperProps:F={},slotProps:G={},slots:Z={},title:q,TransitionComponent:U=Ru,TransitionProps:K}=x,J=It(x,mh),_=N.isValidElement(z)?z:Y.jsx("span",{children:z}),$=lo(),ee="rtl"===$.direction,[ne,re]=N.useState(),[oe,ae]=N.useState(null),ie=N.useRef(!1),se=D||L,le=N.useRef(),ce=N.useRef(),ue=N.useRef(),de=N.useRef(),[pe,fe]=it({controlled:X,default:!1,name:"Tooltip",state:"open"});let me=pe;if("production"!==process.env.NODE_ENV){const{current:e}=N.useRef(void 0!==X);N.useEffect((()=>{ne&&ne.disabled&&!e&&""!==q&&"button"===ne.tagName.toLowerCase()&&console.error(["MUI: You are providing a disabled `button` child to the Tooltip component.","A disabled element does not fire events.","Tooltip needs to listen to the child element's events to display the title.","","Add a simple wrapper element, such as a `span`."].join("\n"))}),[q,ne,e])}const he=ot(W),ge=N.useRef(),ve=N.useCallback((()=>{void 0!==ge.current&&(document.body.style.WebkitUserSelect=ge.current,ge.current=void 0),clearTimeout(de.current)}),[]);N.useEffect((()=>()=>{clearTimeout(le.current),clearTimeout(ce.current),clearTimeout(ue.current),ve()}),[ve]);const Ae=e=>{clearTimeout(bh),Ah=!0,fe(!0),V&&!me&&V(e)},be=st((e=>{clearTimeout(bh),bh=setTimeout((()=>{Ah=!1}),800+I),fe(!1),H&&me&&H(e),clearTimeout(le.current),le.current=setTimeout((()=>{ie.current=!1}),$.transitions.duration.shortest)})),ye=e=>{ie.current&&"touchstart"!==e.type||(ne&&ne.removeAttribute("title"),clearTimeout(ce.current),clearTimeout(ue.current),T||Ah&&k?ce.current=setTimeout((()=>{Ae(e)}),Ah?k:T):Ae(e))},xe=e=>{clearTimeout(ce.current),clearTimeout(ue.current),ue.current=setTimeout((()=>{be(e)}),I)},{isFocusVisibleRef:we,onBlur:ze,onFocus:Oe,ref:Ce}=vt(),[,je]=N.useState(!1),Pe=e=>{ze(e),!1===we.current&&(je(!1),xe(e))},Be=e=>{ne||re(e.currentTarget),Oe(e),!0===we.current&&(je(!0),ye(e))},De=e=>{ie.current=!0;const t=_.props;t.onTouchStart&&t.onTouchStart(e)},Me=ye,Te=xe,Ne=e=>{De(e),clearTimeout(ue.current),clearTimeout(le.current),ve(),ge.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",de.current=setTimeout((()=>{document.body.style.WebkitUserSelect=ge.current,ye(e)}),E)},ke=e=>{_.props.onTouchEnd&&_.props.onTouchEnd(e),ve(),clearTimeout(ue.current),ue.current=setTimeout((()=>{be(e)}),S)};N.useEffect((()=>{if(me)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"!==e.key&&"Esc"!==e.key||be(e)}}),[be,me]);const Ee=lt(_.ref,Ce,re,t);q||0===q||(me=!1);const Le=N.useRef(),We={},Ie="string"==typeof q;j?(We.title=me||!Ie||B?null:q,We["aria-describedby"]=me?he:null):(We["aria-label"]=Ie?q:null,We["aria-labelledby"]=me&&!Ie?he:null);const Se=te({},We,J,_.props,{className:Kn(J.className,_.props.className),onTouchStart:De,ref:Ee},L?{onMouseMove:e=>{const t=_.props;t.onMouseMove&&t.onMouseMove(e),yh={x:e.clientX,y:e.clientY},Le.current&&Le.current.update()}}:{});"production"!==process.env.NODE_ENV&&(Se["data-mui-internal-clone-element"]=!0,N.useEffect((()=>{ne&&!ne.getAttribute("data-mui-internal-clone-element")&&console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.","Please make sure that props are spread on the same element that the ref is applied to."].join("\n"))}),[ne]));const He={};M||(Se.onTouchStart=Ne,Se.onTouchEnd=ke),B||(Se.onMouseOver=xh(Me,Se.onMouseOver),Se.onMouseLeave=xh(Te,Se.onMouseLeave),se||(He.onMouseOver=Me,He.onMouseLeave=Te)),P||(Se.onFocus=xh(Be,Se.onFocus),Se.onBlur=xh(Pe,Se.onBlur),se||(He.onFocus=Be,He.onBlur=Pe)),"production"!==process.env.NODE_ENV&&_.props.title&&console.error(["MUI: You have provided a `title` prop to the child of <Tooltip />.",`Remove this title prop \`${_.props.title}\` or the Tooltip component.`].join("\n"));const Ve=N.useMemo((()=>{var e;let t=[{name:"arrow",enabled:Boolean(oe),options:{element:oe,padding:4}}];return null!=(e=F.popperOptions)&&e.modifiers&&(t=t.concat(F.popperOptions.modifiers)),te({},F.popperOptions,{modifiers:t})}),[oe,F]),Xe=te({},x,{isRtl:ee,arrow:w,disableInteractive:se,placement:R,PopperComponentProp:Q,touch:ie.current}),Re=(e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:a}=e;return Dt({popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${Ze(a.split("-")[0])}`],arrow:["arrow"]},ph,t)})(Xe),Ye=null!=(n=null!=(r=Z.popper)?r:O.Popper)?n:hh,Qe=null!=(o=null!=(a=null!=(i=Z.transition)?i:O.Transition)?a:U)?o:Ru,Fe=null!=(s=null!=(l=Z.tooltip)?l:O.Tooltip)?s:gh,Ge=null!=(c=null!=(u=Z.arrow)?u:O.Arrow)?c:vh,qe=zo(Ye,te({},F,null!=(d=G.popper)?d:C.popper,{className:Kn(Re.popper,null==F?void 0:F.className,null==(p=null!=(f=G.popper)?f:C.popper)?void 0:p.className)}),Xe),Ue=zo(Qe,te({},K,null!=(m=G.transition)?m:C.transition),Xe),Ke=zo(Fe,te({},null!=(h=G.tooltip)?h:C.tooltip,{className:Kn(Re.tooltip,null==(g=null!=(v=G.tooltip)?v:C.tooltip)?void 0:g.className)}),Xe),Je=zo(Ge,te({},null!=(A=G.arrow)?A:C.arrow,{className:Kn(Re.arrow,null==(b=null!=(y=G.arrow)?y:C.arrow)?void 0:b.className)}),Xe);return Y.jsxs(N.Fragment,{children:[N.cloneElement(_,Se),Y.jsx(Ye,te({as:null!=Q?Q:Ud,placement:R,anchorEl:L?{getBoundingClientRect:()=>({top:yh.y,left:yh.x,right:yh.x,bottom:yh.y,width:0,height:0})}:ne,popperRef:Le,open:!!ne&&me,id:he,transition:!0},He,qe,{popperOptions:Ve,children:({TransitionProps:e})=>Y.jsx(Qe,te({timeout:$.transitions.duration.shorter},e,Ue,{children:Y.jsxs(Fe,te({},Ke,{children:[q,w?Y.jsx(Ge,te({},Je,{ref:ae})):null]}))}))}))]})}));"production"!==process.env.NODE_ENV&&(wh.propTypes={arrow:De.bool,children:Ne.isRequired,classes:De.object,className:De.string,components:De.shape({Arrow:De.elementType,Popper:De.elementType,Tooltip:De.elementType,Transition:De.elementType}),componentsProps:De.shape({arrow:De.object,popper:De.object,tooltip:De.object,transition:De.object}),describeChild:De.bool,disableFocusListener:De.bool,disableHoverListener:De.bool,disableInteractive:De.bool,disableTouchListener:De.bool,enterDelay:De.number,enterNextDelay:De.number,enterTouchDelay:De.number,followCursor:De.bool,id:De.string,leaveDelay:De.number,leaveTouchDelay:De.number,onClose:De.func,onOpen:De.func,open:De.bool,placement:De.oneOf(["bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:De.elementType,PopperProps:De.object,slotProps:De.shape({arrow:De.object,popper:De.object,tooltip:De.object,transition:De.object}),slots:De.shape({arrow:De.elementType,popper:De.elementType,tooltip:De.elementType,transition:De.elementType}),sx:De.oneOfType([De.arrayOf(De.oneOfType([De.func,De.object,De.bool])),De.func,De.object]),title:De.node,TransitionComponent:De.elementType,TransitionProps:De.object});var zh=wh;var Oh=Et("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]);function Ch(e){return kt("MuiListItemIcon",e)}var jh=Et("MuiListItemIcon",["root","alignItemsFlexStart"]);const Ph=["className"],Bh=fo("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})((({theme:e,ownerState:t})=>te({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8}))),Dh=N.forwardRef((function(e,t){const n=co({props:e,name:"MuiListItemIcon"}),{className:r}=n,o=It(n,Ph),a=te({},n,{alignItems:N.useContext(zu).alignItems}),i=(e=>{const{alignItems:t,classes:n}=e;return Dt({root:["root","flex-start"===t&&"alignItemsFlexStart"]},Ch,n)})(a);return Y.jsx(Bh,te({className:Kn(i.root,r),ownerState:a,ref:t},o))}));"production"!==process.env.NODE_ENV&&(Dh.propTypes={children:De.node,classes:De.object,className:De.string,sx:De.oneOfType([De.arrayOf(De.oneOfType([De.func,De.object,De.bool])),De.func,De.object])});var Mh=Dh;function Th(e){return kt("MuiListItemText",e)}var Nh=Et("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);const kh=["children","className","disableTypography","inset","primary","primaryTypographyProps","secondary","secondaryTypographyProps"],Eh=fo("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Nh.primary}`]:t.primary},{[`& .${Nh.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})((({ownerState:e})=>te({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56}))),Lh=N.forwardRef((function(e,t){const n=co({props:e,name:"MuiListItemText"}),{children:r,className:o,disableTypography:a=!1,inset:i=!1,primary:s,primaryTypographyProps:l,secondary:c,secondaryTypographyProps:u}=n,d=It(n,kh),{dense:p}=N.useContext(zu);let f=null!=s?s:r,m=c;const h=te({},n,{disableTypography:a,inset:i,primary:!!f,secondary:!!m,dense:p}),g=(e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:a}=e;return Dt({root:["root",n&&"inset",a&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},Th,t)})(h);return null==f||f.type===jf||a||(f=Y.jsx(jf,te({variant:p?"body2":"body1",className:g.primary,component:null!=l&&l.variant?void 0:"span",display:"block"},l,{children:f}))),null==m||m.type===jf||a||(m=Y.jsx(jf,te({variant:"body2",className:g.secondary,color:"text.secondary",display:"block"},u,{children:m}))),Y.jsxs(Eh,te({className:Kn(g.root,o),ownerState:h,ref:t},d,{children:[f,m]}))}));"production"!==process.env.NODE_ENV&&(Lh.propTypes={children:De.node,classes:De.object,className:De.string,disableTypography:De.bool,inset:De.bool,primary:De.node,primaryTypographyProps:De.object,secondary:De.node,secondaryTypographyProps:De.object,sx:De.oneOfType([De.arrayOf(De.oneOfType([De.func,De.object,De.bool])),De.func,De.object])});var Wh=Lh;function Ih(e){return kt("MuiMenuItem",e)}var Sh=Et("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);const Hh=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],Vh=fo(xp,{shouldForwardProp:e=>uo(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((({theme:e,ownerState:t})=>te({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Sh.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:gr(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Sh.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:gr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Sh.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:gr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:gr(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Sh.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Sh.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${ii.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${ii.inset}`]:{marginLeft:52},[`& .${Nh.root}`]:{marginTop:0,marginBottom:0},[`& .${Nh.inset}`]:{paddingLeft:36},[`& .${jh.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&te({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${jh.root} svg`]:{fontSize:"1.25rem"}})))),Xh=N.forwardRef((function(e,t){const n=co({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:o="li",dense:a=!1,divider:i=!1,disableGutters:s=!1,focusVisibleClassName:l,role:c="menuitem",tabIndex:u,className:d}=n,p=It(n,Hh),f=N.useContext(zu),m=N.useMemo((()=>({dense:a||f.dense||!1,disableGutters:s})),[f.dense,a,s]),h=N.useRef(null);tt((()=>{r&&(h.current?h.current.focus():"production"!==process.env.NODE_ENV&&console.error("MUI: Unable to set focus to a MenuItem whose component has not been rendered."))}),[r]);const g=te({},n,{dense:m.dense,divider:i,disableGutters:s}),v=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:a,classes:i}=e;return te({},i,Dt({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",a&&"selected"]},Ih,i))})(n),A=lt(h,t);let b;return n.disabled||(b=void 0!==u?u:-1),Y.jsx(zu.Provider,{value:m,children:Y.jsx(Vh,te({ref:A,role:c,tabIndex:b,component:o,focusVisibleClassName:Kn(v.focusVisible,l),className:Kn(v.root,d)},p,{ownerState:g,classes:v}))})}));"production"!==process.env.NODE_ENV&&(Xh.propTypes={autoFocus:De.bool,children:De.node,classes:De.object,className:De.string,component:De.elementType,dense:De.bool,disabled:De.bool,disableGutters:De.bool,divider:De.bool,focusVisibleClassName:De.string,role:De.string,selected:De.bool,sx:De.oneOfType([De.arrayOf(De.oneOfType([De.func,De.object,De.bool])),De.func,De.object]),tabIndex:De.number});var Rh=Xh,Yh=function(e){var t=e.theme,n=e.bgcolor,r=e.dropdown;return Q(Q(Q({},Fh(Q({blur:20,opacity:.9,color:t.palette.background.paper},!!n&&{color:n}))),{backgroundImage:"url(/assets/cyan-blur.png), url(/assets/red-blur.png)",backgroundRepeat:"no-repeat, no-repeat",backgroundPosition:"top right, left bottom",backgroundSize:"50%, 50%"}),r&&{padding:t.spacing(.5),boxShadow:t.customShadows.dropdown,borderRadius:1.25*t.shape.borderRadius})},Qh=function(e){var t;return Q(Q({},e.typography.body2),((t={padding:e.spacing(.75,1),borderRadius:.75*e.shape.borderRadius,"&:not(:last-of-type)":{marginBottom:4}})["&.".concat(Sh.selected)]={fontWeight:e.typography.fontWeightSemiBold,backgroundColor:e.palette.action.selected,"&:hover":{backgroundColor:e.palette.action.hover}},t["& .".concat(Oh.root)]={padding:e.spacing(.5),marginLeft:e.spacing(-.5),marginRight:e.spacing(.5)},t["&.".concat(Xp.option,'[aria-selected="true"]')]={backgroundColor:e.palette.action.selected,"&:hover":{backgroundColor:e.palette.action.hover}},t["&+.".concat(ii.root)]={margin:e.spacing(.5,0)},t))};function Fh(e){var t=(null==e?void 0:e.color)||"#000000",n=(null==e?void 0:e.blur)||6,r=(null==e?void 0:e.opacity)||.8,o=null==e?void 0:e.imgUrl;return o?{position:"relative",backgroundImage:"url(".concat(o,")"),"&:before":{position:"absolute",top:0,left:0,zIndex:9,content:'""',width:"100%",height:"100%",backdropFilter:"blur(".concat(n,"px)"),WebkitBackdropFilter:"blur(".concat(n,"px)"),backgroundColor:gr(t,r)}}:{backdropFilter:"blur(".concat(n,"px)"),WebkitBackdropFilter:"blur(".concat(n,"px)"),backgroundColor:gr(t,r)}}var Gh={x:{msOverflowStyle:"none",scrollbarWidth:"none",overflowX:"scroll","&::-webkit-scrollbar":{display:"none"}},y:{msOverflowStyle:"none",scrollbarWidth:"none",overflowY:"scroll","&::-webkit-scrollbar":{display:"none"}}};function Zh(e){var t=e.onDownload,n=lo();return Y.jsx(Pp,{onClick:t,sx:{p:0,top:0,right:0,width:1,height:1,zIndex:9,opacity:0,position:"absolute",borderRadius:"unset",justifyContent:"center",bgcolor:"grey.800",color:"common.white",transition:n.transitions.create(["opacity"]),"&:hover":Q({opacity:1},Fh({opacity:.64,color:n.palette.grey[900]}))},children:Y.jsx(yo,{icon:"eva:arrow-circle-down-fill",width:24})})}var qh,Uh=e.createContext({statusCode:null,dashbaordUrlPrefix:""});exports.RequestState=void 0,(qh=exports.RequestState||(exports.RequestState={})).IDLE="idle",qh.LOADING="loading",qh.SUCCEEDED="succeeded",qh.FAILED="failed";var Kh=function(){function e(e,t,n){this.data=e,this.state=t,this.error=n}return e.idle=function(t){var n=new e(t,exports.RequestState.IDLE);return Q({},n)},e.loading=function(t){var n=new e(t,exports.RequestState.LOADING);return Q({},n)},e.succeeded=function(t){var n=new e(t,exports.RequestState.SUCCEEDED);return Q({},n)},e.error=function(t,n){var r=new e(n,exports.RequestState.FAILED,t);return Q({},r)},e}();function Jh(){var t=e.useState(Kh.idle),n=t[0],r=t[1],o=e.useContext(Uh).dashbaordUrlPrefix,a=e.useCallback((function(e){r(Kh.loading()),Bm.get("".concat(o,"/").concat(e.url),Q(Q({},e.axiosRequestConfig),{params:e.query})).then((function(e){var t=e.data.data;r(Kh.succeeded(t))})).catch((function(e){var t,n=JSON.parse(null!==(t=e.message)&&void 0!==t?t:"{}");r(Kh.error(n))}))}),[]),i=e.useCallback((function(e){r(Kh.loading()),Bm.post("".concat(o,"/").concat(e.url),e.body,Q(Q({},e.axiosRequestConfig),{params:e.query})).then((function(e){var t=e.data.data;r(Kh.succeeded(t))})).catch((function(e){var t,n=JSON.parse(null!==(t=e.message)&&void 0!==t?t:"{}");r(Kh.error(n))}))}),[]),s=e.useCallback((function(e){r(Kh.loading()),Bm.patch("".concat(o,"/").concat(e.url),e.body,Q(Q({},e.axiosRequestConfig),{params:e.query})).then((function(e){var t=e.data.data;r(Kh.succeeded(t))})).catch((function(e){var t,n=JSON.parse(null!==(t=e.message)&&void 0!==t?t:"{}");r(Kh.error(n))}))}),[]),l=e.useCallback((function(e){r(Kh.loading()),Bm.delete("".concat(o,"/").concat(e.url),Q(Q({},e.axiosRequestConfig),{params:e.query})).then((function(e){var t=e.data.data;r(Kh.succeeded(t))})).catch((function(e){var t,n=JSON.parse(null!==(t=e.message)&&void 0!==t?t:"{}");r(Kh.error(n))}))}),[]);return{requestState:n,get:a,post:i,patch:s,remove:l}}function _h(){return O.configure({showSpinner:!1}),e.useMemo((function(){O.start()}),[]),e.useEffect((function(){O.done()}),[]),null}var $h=fo("div")((function(e){return{right:0,bottom:0,zIndex:99999,width:"100%",height:"100%",position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:e.theme.palette.background.default}}));function eg(e){var t=e.isDashboard,r=e.loadingLogo,o=e.logoSxProps,a=F(e,["isDashboard","loadingLogo","logoSxProps"]);return Y.jsxs(Y.Fragment,{children:[Y.jsx(_h,{}),!t&&Y.jsxs($h,Q({},a,{children:[Y.jsx(p.m.div,{animate:{scale:[1,.9,.9,1,1],opacity:[1,.48,.48,1,1]},transition:{duration:2,ease:"easeInOut",repeatDelay:1,repeat:1/0},children:Y.jsx(n.Box,{sx:Q({width:200},o),children:Y.jsx(Ti,{visibleByDefault:!0,disabledEffect:!0,src:r,alt:"logo"})})}),Y.jsx(n.Box,{component:p.m.div,animate:{scale:[1.2,1,1,1.2,1.2],rotate:[270,0,0,270,270],opacity:[.25,1,1,1,.25],borderRadius:["25%","25%","50%","50%","25%"]},transition:{ease:"linear",duration:3.2,repeat:1/0},sx:{width:100,height:100,borderRadius:"25%",position:"absolute",border:function(e){return"solid 3px ".concat(gr(e.palette.primary.dark,.24))}}}),Y.jsx(n.Box,{component:p.m.div,animate:{scale:[1,1.2,1.2,1,1],rotate:[0,270,270,0,0],opacity:[1,.25,.25,.25,1],borderRadius:["25%","25%","50%","50%","25%"]},transition:{ease:"linear",duration:3.2,repeat:1/0},sx:{width:120,height:120,borderRadius:"25%",position:"absolute",border:function(e){return"solid 8px ".concat(gr(e.palette.primary.dark,.24))}}})]}))]})}var tg=e.createContext({resources:null,getResources:function(){},state:exports.RequestState.IDLE}),ng=e.createContext({paths:{},root:"",home:""});function rg(e,t){return"".concat(e).concat(t)}var og=fo("span")((function(e){var t=e.arrow,n=e.theme,r=-6.5,o={top:r,transform:"rotate(135deg)"},a={bottom:r,transform:"rotate(-45deg)"},i={left:r,transform:"rotate(45deg)"},s={right:r,transform:"rotate(-135deg)"};return Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q(Q({width:14,height:14,position:"absolute",borderBottomLeftRadius:3.5,clipPath:"polygon(0% 0%, 100% 100%, 0% 100%)",border:"solid 1px ".concat(gr("light"===n.palette.mode?n.palette.grey[500]:n.palette.common.black,.12))},Fh({color:n.palette.background.paper})),"top-left"===t&&Q(Q({},o),{left:20})),"top-center"===t&&Q(Q({},o),{left:0,right:0,margin:"auto"})),"top-right"===t&&Q(Q({},o),{right:20})),"bottom-left"===t&&Q(Q({},a),{left:20})),"bottom-center"===t&&Q(Q({},a),{left:0,right:0,margin:"auto"})),"bottom-right"===t&&Q(Q({},a),{right:20})),"left-top"===t&&Q(Q({},i),{top:20})),"left-center"===t&&Q(Q({},i),{top:0,bottom:0,margin:"auto"})),"left-bottom"===t&&Q(Q({},i),{bottom:20})),"right-top"===t&&Q(Q({},s),{top:20})),"right-center"===t&&Q(Q({},s),{top:0,bottom:0,margin:"auto"})),"right-bottom"===t&&Q(Q({},s),{bottom:20}))}));function ag(e){var t,n=e.open,r=e.children,o=e.arrow,a=void 0===o?"top-right":o,i=e.hiddenArrow,s=e.sx,l=F(e,["open","children","arrow","hiddenArrow","sx"]),c=function(e){var t;switch(e){case"top-left":t={style:{ml:-.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"top-center":t={style:{},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}};break;case"top-right":default:t={style:{ml:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"bottom-left":t={style:{ml:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"bottom-center":t={style:{},anchorOrigin:{vertical:"top",horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"}};break;case"bottom-right":t={style:{ml:.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"right"}};break;case"left-top":t={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"}};break;case"left-center":t={anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"}};break;case"left-bottom":t={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"left"}};break;case"right-top":t={style:{mt:-.75},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"}};break;case"right-center":t={anchorOrigin:{vertical:"center",horizontal:"left"},transformOrigin:{vertical:"center",horizontal:"right"}};break;case"right-bottom":t={style:{mt:.75},anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"right"}}}return t}(a),u=c.style,d=c.anchorOrigin,p=c.transformOrigin;return Y.jsxs(td,Q({open:Boolean(n),anchorEl:n,anchorOrigin:d,transformOrigin:p,PaperProps:{sx:Q(Q(Q({width:"auto",overflow:"inherit"},u),(t={},t["& .".concat(Sh.root)]={"& svg":{mr:2,flexShrink:0}},t)),s)}},l,{children:[!i&&Y.jsx(og,{arrow:a}),r]}))}function ig(e){var t=e.actions,r=e.open,o=e.onClose,a=e.onOpen;return Y.jsxs(Y.Fragment,{children:[Y.jsx(n.IconButton,{onClick:a,children:Y.jsx(yo,{icon:"eva:more-vertical-fill",width:20,height:20})}),Y.jsx(ag,{open:r,anchorEl:r,onClose:o,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"},arrow:"right-top",sx:{mt:-1,width:160,"& .MuiMenuItem-root":{px:1,typography:"body2",borderRadius:.75,"& svg":{mr:2,width:20,height:20}}},children:t})]})}function sg(){var t=e.useContext(tg).resources,n=e.useContext(ng).paths;if(!t)return[];var r=t.modelParents;return e.useMemo((function(){var e=[];for(var o in r){for(var a=[],i=r[o],s=t[i[0]].properties.parent,l=s.icon,c={title:s.value,icon:Xm(l),children:a},u=0;u<i.length;u++){var d=t[i[u]];a.push({title:d.properties.name,path:n[i[u]]?n[i[u]].list:""})}c.children=a,e.push(c)}return[{subheader:"",items:e||[]}]}),[t])}var lg=e.createContext({textFieldSize:"small",themeLayout:"vertical",defaultRowsPerPage:50,themeStretch:!0,loadingLoago:"",navBarLogo:"",miniNavBarLogo:""}),cg=e.createContext({identityPoolId:"",region:"",userPoolId:"",userPoolWebClientId:"",bucket:"",googleApiKey:"",bucketUrl:""}),ug=e.createContext({setAlert:function(e,t,n){},setErrorAlert:function(e,t){},setSuccessAlert:function(e,t){}});var dg=e.createContext({openDialog:function(e,t){}});var pg,fg=function(){return e.useContext(lg)},mg=function(){return e.useContext(tg)},hg=function(){return e.useContext(ug)},gg=function(){return e.useContext(ng)};function vg(e){var t=e.title,r=e.children,o=e.type,a=o===ym.NESTEDSCHEMA||o===ym.ARRAY||o===ym.RICH_TEXT_I||o===ym.RICH_TEXT_II;return Y.jsxs(n.Grid,{item:!0,xs:12,md:a?12:6,sx:{mb:3.5},children:[Y.jsx(n.Typography,{paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:t}),r]})}function Ag(e){var t=e.fieldschema;return Y.jsx(vg,Q({},e,{type:ym.ARRAY,children:Y.jsx(Ug,Q({},e,{type:ym.ARRAY,children:function(n,r){return Y.jsx(Ug,Q({},e,{type:t.arrayType,value:n}))}}))}))}function bg(e){return Y.jsx(vg,Q({},e,{children:Y.jsx(Ug,Q({type:ym.BOOLEAN},e))}))}function yg(e){return Y.jsx(vg,Q({},e,{children:Y.jsx(Ug,Q({type:ym.COLOR},e))}))}function xg(e){return Y.jsx(vg,Q({},e,{children:Y.jsx(Ug,Q({type:ym.DATE},e))}))}function wg(e){return Y.jsx(vg,Q({},e,{children:Y.jsx(Ug,Q({type:ym.ENUM},e))}))}function zg(e){return Y.jsx(vg,Q({},e,{children:Y.jsx(Ug,Q({type:ym.IMAGE},e))}))}function Og(e){return Y.jsx(vg,Q({},e,{children:Y.jsx(Ug,Q({type:ym.LOCALIZEDString},e))}))}function Cg(e){return Y.jsx(vg,Q({},e,{children:Y.jsx(Ug,Q({type:ym.LOCATION},e))}))}function jg(e){return Y.jsx(vg,Q({},e,{type:ym.NESTEDSCHEMA,children:Y.jsx(Ug,Q({type:ym.NESTEDSCHEMA},e))}))}function Pg(e){return Y.jsx(vg,Q({},e,{children:Y.jsx(Ug,Q({type:ym.REFERENCE},e))}))}function Bg(e){return Y.jsx(vg,Q({},e,{children:Y.jsx(Ug,Q({type:ym.STRING},e))}))}function Dg(e){return Y.jsx(vg,Q({},e,{children:Y.jsx(Ug,Q({type:ym.RICH_TEXT_I},e))}))}function Mg(e){var t,n=e.property,r=e.schema,o=e.record,a=e.userpath,i=e.resources,s=n.key,l=n.path,c=r[s],u=null==n?void 0:n.value,d=o[s],p={fieldkey:s,key:s,title:u,value:d,resources:i,userpath:a,path:l,fieldschema:c,color:"black",type:c.type};switch(c.type){case ym.STRING:return/^#[0-9A-F]{6}$/i.test(d)?Y.jsx(yg,Q({},p)):"object"==typeof d?Y.jsx(Bg,Q({},p,{title:u||qg,value:d[0]&&null!==(t=Pm.getLocalizedString(d))&&void 0!==t?t:qg})):Y.jsx(Bg,Q({},p));case ym.NUMBER:case ym.OBJECTID:case ym.PHONENUMBER:case ym.TIMEPICKER:return Y.jsx(Bg,Q({},p));case ym.DATE:return Y.jsx(xg,Q({},p));case ym.LOCATION:return Y.jsx(Cg,Q({},p,{value:{address:d.address,longitude:d.longitude,latitude:d.latitude}}));case ym.ENUM:return Y.jsx(wg,Q({},p,{enumvalues:c.enumValues}));case ym.IMAGE:return Y.jsx(zg,Q({},p));case ym.BOOLEAN:return Y.jsx(bg,Q({},p));case ym.NESTEDSCHEMA:return Y.jsx(jg,Q({},p,{fieldschema:r[s]}));case ym.LOCALIZEDString:return Y.jsx(Og,Q({},p));case ym.RICH_TEXT_I:return Y.jsx(Dg,Q({},p));case ym.ARRAY:return Y.jsx(Ag,Q({},p,{fieldschema:c,enumvalues:c.enumValues}));case ym.REFERENCE:return Y.jsx(Pg,Q({},p))}return Y.jsx(Y.Fragment,{})}function Tg(e){var t,r=e.fieldschema,o=e.value;return Y.jsx(n.Card,{sx:{py:3,px:3},children:Y.jsx(n.Grid,{container:!0,children:null===(t=null==r?void 0:r.keys)||void 0===t?void 0:t.map((function(t){var n;return(n=JSON.parse(JSON.stringify(null==r?void 0:r.schema[t]))).key=t,o&&Y.jsx(Mg,Q({},e,{property:n,schema:r.schema,record:o}),n.key)}))})})}function Ng(e){var t=e.value;return Y.jsx(n.Card,{sx:{py:3,px:3},children:Y.jsx(n.Stack,{direction:"column",spacing:2,children:t.map((function(e,t){return Y.jsxs(n.Stack,{direction:"row",spacing:1,children:[Y.jsx(Ti,{disabledEffect:!0,visibleByDefault:!0,alt:"empty content",src:kg(e.key),sx:{width:30,height:20}}),Y.jsx(n.Typography,{fontWeight:600,fontSize:14,children:e.value})]},t+e.key)}))})})}function kg(e){switch(e){case wm.ARABIC:return pg.ARABIC_FLAG;case wm.ENGLISH:default:return pg.ENGLISH_FLAG}}function Eg(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}!function(e){e.ENGLISH_FLAG="https://pngimg.com/uploads/flags/flags_PNG14592.png",e.ARABIC_FLAG="/assets/icons/flags/ic_flag_sa.svg"}(pg||(pg={}));var Lg={exports:{}};!function(e,t){e.exports=function(){var t,n;function r(){return t.apply(null,arguments)}function o(e){t=e}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(s(e,t))return!1;return!0}function c(e){return void 0===e}function u(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function p(e,t){var n,r=[],o=e.length;for(n=0;n<o;++n)r.push(t(e[n],n));return r}function f(e,t){for(var n in t)s(t,n)&&(e[n]=t[n]);return s(t,"toString")&&(e.toString=t.toString),s(t,"valueOf")&&(e.valueOf=t.valueOf),e}function m(e,t,n,r){return qn(e,t,n,r,!0).utc()}function h(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function g(e){return null==e._pf&&(e._pf=h()),e._pf}function v(e){if(null==e._isValid){var t=g(e),r=n.call(t.parsedDateParts,(function(e){return null!=e})),o=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r);if(e._strict&&(o=o&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return o;e._isValid=o}return e._isValid}function A(e){var t=m(NaN);return null!=e?f(g(t),e):g(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var b=r.momentProperties=[],y=!1;function x(e,t){var n,r,o,a=b.length;if(c(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),c(t._i)||(e._i=t._i),c(t._f)||(e._f=t._f),c(t._l)||(e._l=t._l),c(t._strict)||(e._strict=t._strict),c(t._tzm)||(e._tzm=t._tzm),c(t._isUTC)||(e._isUTC=t._isUTC),c(t._offset)||(e._offset=t._offset),c(t._pf)||(e._pf=g(t)),c(t._locale)||(e._locale=t._locale),a>0)for(n=0;n<a;n++)c(o=t[r=b[n]])||(e[r]=o);return e}function w(e){x(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===y&&(y=!0,r.updateOffset(this),y=!1)}function z(e){return e instanceof w||null!=e&&null!=e._isAMomentObject}function O(e){!1===r.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function C(e,t){var n=!0;return f((function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),n){var o,a,i,l=[],c=arguments.length;for(a=0;a<c;a++){if(o="","object"==typeof arguments[a]){for(i in o+="\n["+a+"] ",arguments[0])s(arguments[0],i)&&(o+=i+": "+arguments[0][i]+", ");o=o.slice(0,-2)}else o=arguments[a];l.push(o)}O(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var j,P={};function B(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),P[e]||(O(t),P[e]=!0)}function D(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function M(e){var t,n;for(n in e)s(e,n)&&(D(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function T(e,t){var n,r=f({},e);for(n in t)s(t,n)&&(i(e[n])&&i(t[n])?(r[n]={},f(r[n],e[n]),f(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)s(e,n)&&!s(t,n)&&i(e[n])&&(r[n]=f({},r[n]));return r}function N(e){null!=e&&this.set(e)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,j=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)s(e,t)&&n.push(t);return n};var k={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function E(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return D(r)?r.call(t,n):r}function L(e,t,n){var r=""+Math.abs(e),o=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}var W=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,I=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,S={},H={};function V(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(H[e]=o),t&&(H[t[0]]=function(){return L(o.apply(this,arguments),t[1],t[2])}),n&&(H[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function X(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function R(e){var t,n,r=e.match(W);for(t=0,n=r.length;t<n;t++)H[r[t]]?r[t]=H[r[t]]:r[t]=X(r[t]);return function(t){var o,a="";for(o=0;o<n;o++)a+=D(r[o])?r[o].call(t,e):r[o];return a}}function Y(e,t){return e.isValid()?(t=Q(t,e.localeData()),S[t]=S[t]||R(t),S[t](e)):e.localeData().invalidDate()}function Q(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(I.lastIndex=0;n>=0&&I.test(e);)e=e.replace(I,r),I.lastIndex=0,n-=1;return e}var F={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function G(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(W).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var Z="Invalid date";function q(){return this._invalidDate}var U="%d",K=/\d{1,2}/;function J(e){return this._ordinal.replace("%d",e)}var _={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function $(e,t,n,r){var o=this._relativeTime[n];return D(o)?o(e,t,n,r):o.replace(/%d/i,e)}function ee(e,t){var n=this._relativeTime[e>0?"future":"past"];return D(n)?n(t):n.replace(/%s/i,t)}var te={};function ne(e,t){var n=e.toLowerCase();te[n]=te[n+"s"]=te[t]=e}function re(e){return"string"==typeof e?te[e]||te[e.toLowerCase()]:void 0}function oe(e){var t,n,r={};for(n in e)s(e,n)&&(t=re(n))&&(r[t]=e[n]);return r}var ae={};function ie(e,t){ae[e]=t}function se(e){var t,n=[];for(t in e)s(e,t)&&n.push({unit:t,priority:ae[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}function le(e){return e%4==0&&e%100!=0||e%400==0}function ce(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function ue(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=ce(t)),n}function de(e,t){return function(n){return null!=n?(fe(this,e,n),r.updateOffset(this,t),this):pe(this,e)}}function pe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function fe(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&le(e.year())&&1===e.month()&&29===e.date()?(n=ue(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),$e(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function me(e){return D(this[e=re(e)])?this[e]():this}function he(e,t){if("object"==typeof e){var n,r=se(e=oe(e)),o=r.length;for(n=0;n<o;n++)this[r[n].unit](e[r[n].unit])}else if(D(this[e=re(e)]))return this[e](t);return this}var ge,ve=/\d/,Ae=/\d\d/,be=/\d{3}/,ye=/\d{4}/,xe=/[+-]?\d{6}/,we=/\d\d?/,ze=/\d\d\d\d?/,Oe=/\d\d\d\d\d\d?/,Ce=/\d{1,3}/,je=/\d{1,4}/,Pe=/[+-]?\d{1,6}/,Be=/\d+/,De=/[+-]?\d+/,Me=/Z|[+-]\d\d:?\d\d/gi,Te=/Z|[+-]\d\d(?::?\d\d)?/gi,Ne=/[+-]?\d+(\.\d{1,3})?/,ke=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function Ee(e,t,n){ge[e]=D(t)?t:function(e,r){return e&&n?n:t}}function Le(e,t){return s(ge,e)?ge[e](t._strict,t._locale):new RegExp(We(e))}function We(e){return Ie(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,o){return t||n||r||o})))}function Ie(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}ge={};var Se={};function He(e,t){var n,r,o=t;for("string"==typeof e&&(e=[e]),u(t)&&(o=function(e,n){n[t]=ue(e)}),r=e.length,n=0;n<r;n++)Se[e[n]]=o}function Ve(e,t){He(e,(function(e,n,r,o){r._w=r._w||{},t(e,r._w,r,o)}))}function Xe(e,t,n){null!=t&&s(Se,e)&&Se[e](t,n._a,n,e)}var Re,Ye=0,Qe=1,Fe=2,Ge=3,Ze=4,qe=5,Ue=6,Ke=7,Je=8;function _e(e,t){return(e%t+t)%t}function $e(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=_e(t,12);return e+=(t-n)/12,1===n?le(e)?29:28:31-n%7%2}Re=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},V("M",["MM",2],"Mo",(function(){return this.month()+1})),V("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),V("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),ne("month","M"),ie("month",8),Ee("M",we),Ee("MM",we,Ae),Ee("MMM",(function(e,t){return t.monthsShortRegex(e)})),Ee("MMMM",(function(e,t){return t.monthsRegex(e)})),He(["M","MM"],(function(e,t){t[Qe]=ue(e)-1})),He(["MMM","MMMM"],(function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);null!=o?t[Qe]=o:g(n).invalidMonth=e}));var et="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),tt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),nt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,rt=ke,ot=ke;function at(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||nt).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months.standalone}function it(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[nt.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function st(e,t,n){var r,o,a,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=m([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(o=Re.call(this._shortMonthsParse,i))?o:null:-1!==(o=Re.call(this._longMonthsParse,i))?o:null:"MMM"===t?-1!==(o=Re.call(this._shortMonthsParse,i))||-1!==(o=Re.call(this._longMonthsParse,i))?o:null:-1!==(o=Re.call(this._longMonthsParse,i))||-1!==(o=Re.call(this._shortMonthsParse,i))?o:null}function lt(e,t,n){var r,o,a;if(this._monthsParseExact)return st.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=m([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function ct(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=ue(t);else if(!u(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),$e(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function ut(e){return null!=e?(ct(this,e),r.updateOffset(this,!0),this):pe(this,"Month")}function dt(){return $e(this.year(),this.month())}function pt(e){return this._monthsParseExact?(s(this,"_monthsRegex")||mt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=rt),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function ft(e){return this._monthsParseExact?(s(this,"_monthsRegex")||mt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=ot),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function mt(){function e(e,t){return t.length-e.length}var t,n,r=[],o=[],a=[];for(t=0;t<12;t++)n=m([2e3,t]),r.push(this.monthsShort(n,"")),o.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(r.sort(e),o.sort(e),a.sort(e),t=0;t<12;t++)r[t]=Ie(r[t]),o[t]=Ie(o[t]);for(t=0;t<24;t++)a[t]=Ie(a[t]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function ht(e){return le(e)?366:365}V("Y",0,0,(function(){var e=this.year();return e<=9999?L(e,4):"+"+e})),V(0,["YY",2],0,(function(){return this.year()%100})),V(0,["YYYY",4],0,"year"),V(0,["YYYYY",5],0,"year"),V(0,["YYYYYY",6,!0],0,"year"),ne("year","y"),ie("year",1),Ee("Y",De),Ee("YY",we,Ae),Ee("YYYY",je,ye),Ee("YYYYY",Pe,xe),Ee("YYYYYY",Pe,xe),He(["YYYYY","YYYYYY"],Ye),He("YYYY",(function(e,t){t[Ye]=2===e.length?r.parseTwoDigitYear(e):ue(e)})),He("YY",(function(e,t){t[Ye]=r.parseTwoDigitYear(e)})),He("Y",(function(e,t){t[Ye]=parseInt(e,10)})),r.parseTwoDigitYear=function(e){return ue(e)+(ue(e)>68?1900:2e3)};var gt=de("FullYear",!0);function vt(){return le(this.year())}function At(e,t,n,r,o,a,i){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,o,a,i),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,o,a,i),s}function bt(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function yt(e,t,n){var r=7+t-n;return-(7+bt(e,0,r).getUTCDay()-t)%7+r-1}function xt(e,t,n,r,o){var a,i,s=1+7*(t-1)+(7+n-r)%7+yt(e,r,o);return s<=0?i=ht(a=e-1)+s:s>ht(e)?(a=e+1,i=s-ht(e)):(a=e,i=s),{year:a,dayOfYear:i}}function wt(e,t,n){var r,o,a=yt(e.year(),t,n),i=Math.floor((e.dayOfYear()-a-1)/7)+1;return i<1?r=i+zt(o=e.year()-1,t,n):i>zt(e.year(),t,n)?(r=i-zt(e.year(),t,n),o=e.year()+1):(o=e.year(),r=i),{week:r,year:o}}function zt(e,t,n){var r=yt(e,t,n),o=yt(e+1,t,n);return(ht(e)-r+o)/7}function Ot(e){return wt(e,this._week.dow,this._week.doy).week}V("w",["ww",2],"wo","week"),V("W",["WW",2],"Wo","isoWeek"),ne("week","w"),ne("isoWeek","W"),ie("week",5),ie("isoWeek",5),Ee("w",we),Ee("ww",we,Ae),Ee("W",we),Ee("WW",we,Ae),Ve(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=ue(e)}));var Ct={dow:0,doy:6};function jt(){return this._week.dow}function Pt(){return this._week.doy}function Bt(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Dt(e){var t=wt(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Mt(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Tt(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Nt(e,t){return e.slice(t,7).concat(e.slice(0,t))}V("d",0,"do","day"),V("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),V("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),V("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),V("e",0,0,"weekday"),V("E",0,0,"isoWeekday"),ne("day","d"),ne("weekday","e"),ne("isoWeekday","E"),ie("day",11),ie("weekday",11),ie("isoWeekday",11),Ee("d",we),Ee("e",we),Ee("E",we),Ee("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Ee("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Ee("dddd",(function(e,t){return t.weekdaysRegex(e)})),Ve(["dd","ddd","dddd"],(function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);null!=o?t.d=o:g(n).invalidWeekday=e})),Ve(["d","e","E"],(function(e,t,n,r){t[r]=ue(e)}));var kt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Et="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Lt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Wt=ke,It=ke,St=ke;function Ht(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Nt(n,this._week.dow):e?n[e.day()]:n}function Vt(e){return!0===e?Nt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Xt(e){return!0===e?Nt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Rt(e,t,n){var r,o,a,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=m([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(o=Re.call(this._weekdaysParse,i))?o:null:"ddd"===t?-1!==(o=Re.call(this._shortWeekdaysParse,i))?o:null:-1!==(o=Re.call(this._minWeekdaysParse,i))?o:null:"dddd"===t?-1!==(o=Re.call(this._weekdaysParse,i))||-1!==(o=Re.call(this._shortWeekdaysParse,i))||-1!==(o=Re.call(this._minWeekdaysParse,i))?o:null:"ddd"===t?-1!==(o=Re.call(this._shortWeekdaysParse,i))||-1!==(o=Re.call(this._weekdaysParse,i))||-1!==(o=Re.call(this._minWeekdaysParse,i))?o:null:-1!==(o=Re.call(this._minWeekdaysParse,i))||-1!==(o=Re.call(this._weekdaysParse,i))||-1!==(o=Re.call(this._shortWeekdaysParse,i))?o:null}function Yt(e,t,n){var r,o,a;if(this._weekdaysParseExact)return Rt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=m([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function Qt(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=Mt(e,this.localeData()),this.add(e-t,"d")):t}function Ft(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Gt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Tt(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Zt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=Wt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function qt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=It),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Ut(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Kt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=St),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Kt(){function e(e,t){return t.length-e.length}var t,n,r,o,a,i=[],s=[],l=[],c=[];for(t=0;t<7;t++)n=m([2e3,1]).day(t),r=Ie(this.weekdaysMin(n,"")),o=Ie(this.weekdaysShort(n,"")),a=Ie(this.weekdays(n,"")),i.push(r),s.push(o),l.push(a),c.push(r),c.push(o),c.push(a);i.sort(e),s.sort(e),l.sort(e),c.sort(e),this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Jt(){return this.hours()%12||12}function _t(){return this.hours()||24}function $t(e,t){V(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function en(e,t){return t._meridiemParse}function tn(e){return"p"===(e+"").toLowerCase().charAt(0)}V("H",["HH",2],0,"hour"),V("h",["hh",2],0,Jt),V("k",["kk",2],0,_t),V("hmm",0,0,(function(){return""+Jt.apply(this)+L(this.minutes(),2)})),V("hmmss",0,0,(function(){return""+Jt.apply(this)+L(this.minutes(),2)+L(this.seconds(),2)})),V("Hmm",0,0,(function(){return""+this.hours()+L(this.minutes(),2)})),V("Hmmss",0,0,(function(){return""+this.hours()+L(this.minutes(),2)+L(this.seconds(),2)})),$t("a",!0),$t("A",!1),ne("hour","h"),ie("hour",13),Ee("a",en),Ee("A",en),Ee("H",we),Ee("h",we),Ee("k",we),Ee("HH",we,Ae),Ee("hh",we,Ae),Ee("kk",we,Ae),Ee("hmm",ze),Ee("hmmss",Oe),Ee("Hmm",ze),Ee("Hmmss",Oe),He(["H","HH"],Ge),He(["k","kk"],(function(e,t,n){var r=ue(e);t[Ge]=24===r?0:r})),He(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),He(["h","hh"],(function(e,t,n){t[Ge]=ue(e),g(n).bigHour=!0})),He("hmm",(function(e,t,n){var r=e.length-2;t[Ge]=ue(e.substr(0,r)),t[Ze]=ue(e.substr(r)),g(n).bigHour=!0})),He("hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[Ge]=ue(e.substr(0,r)),t[Ze]=ue(e.substr(r,2)),t[qe]=ue(e.substr(o)),g(n).bigHour=!0})),He("Hmm",(function(e,t,n){var r=e.length-2;t[Ge]=ue(e.substr(0,r)),t[Ze]=ue(e.substr(r))})),He("Hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[Ge]=ue(e.substr(0,r)),t[Ze]=ue(e.substr(r,2)),t[qe]=ue(e.substr(o))}));var nn=/[ap]\.?m?\.?/i,rn=de("Hours",!0);function on(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var an,sn={calendar:k,longDateFormat:F,invalidDate:Z,ordinal:U,dayOfMonthOrdinalParse:K,relativeTime:_,months:et,monthsShort:tt,week:Ct,weekdays:kt,weekdaysMin:Lt,weekdaysShort:Et,meridiemParse:nn},ln={},cn={};function un(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function dn(e){return e?e.toLowerCase().replace("_","-"):e}function pn(e){for(var t,n,r,o,a=0;a<e.length;){for(t=(o=dn(e[a]).split("-")).length,n=(n=dn(e[a+1]))?n.split("-"):null;t>0;){if(r=mn(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&un(o,n)>=t-1)break;t--}a++}return an}function fn(e){return null!=e.match("^[^/\\\\]*$")}function mn(t){var n=null;if(void 0===ln[t]&&e&&e.exports&&fn(t))try{n=an._abbr,Eg("./locale/"+t),hn(n)}catch(e){ln[t]=null}return ln[t]}function hn(e,t){var n;return e&&((n=c(t)?An(e):gn(e,t))?an=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),an._abbr}function gn(e,t){if(null!==t){var n,r=sn;if(t.abbr=e,null!=ln[e])B("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=ln[e]._config;else if(null!=t.parentLocale)if(null!=ln[t.parentLocale])r=ln[t.parentLocale]._config;else{if(null==(n=mn(t.parentLocale)))return cn[t.parentLocale]||(cn[t.parentLocale]=[]),cn[t.parentLocale].push({name:e,config:t}),null;r=n._config}return ln[e]=new N(T(r,t)),cn[e]&&cn[e].forEach((function(e){gn(e.name,e.config)})),hn(e),ln[e]}return delete ln[e],null}function vn(e,t){if(null!=t){var n,r,o=sn;null!=ln[e]&&null!=ln[e].parentLocale?ln[e].set(T(ln[e]._config,t)):(null!=(r=mn(e))&&(o=r._config),t=T(o,t),null==r&&(t.abbr=e),(n=new N(t)).parentLocale=ln[e],ln[e]=n),hn(e)}else null!=ln[e]&&(null!=ln[e].parentLocale?(ln[e]=ln[e].parentLocale,e===hn()&&hn(e)):null!=ln[e]&&delete ln[e]);return ln[e]}function An(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return an;if(!a(e)){if(t=mn(e))return t;e=[e]}return pn(e)}function bn(){return j(ln)}function yn(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[Qe]<0||n[Qe]>11?Qe:n[Fe]<1||n[Fe]>$e(n[Ye],n[Qe])?Fe:n[Ge]<0||n[Ge]>24||24===n[Ge]&&(0!==n[Ze]||0!==n[qe]||0!==n[Ue])?Ge:n[Ze]<0||n[Ze]>59?Ze:n[qe]<0||n[qe]>59?qe:n[Ue]<0||n[Ue]>999?Ue:-1,g(e)._overflowDayOfYear&&(t<Ye||t>Fe)&&(t=Fe),g(e)._overflowWeeks&&-1===t&&(t=Ke),g(e)._overflowWeekday&&-1===t&&(t=Je),g(e).overflow=t),e}var xn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,zn=/Z|[+-]\d\d(?::?\d\d)?/,On=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Cn=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],jn=/^\/?Date\((-?\d+)/i,Pn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Bn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Dn(e){var t,n,r,o,a,i,s=e._i,l=xn.exec(s)||wn.exec(s),c=On.length,u=Cn.length;if(l){for(g(e).iso=!0,t=0,n=c;t<n;t++)if(On[t][1].exec(l[1])){o=On[t][0],r=!1!==On[t][2];break}if(null==o)return void(e._isValid=!1);if(l[3]){for(t=0,n=u;t<n;t++)if(Cn[t][1].exec(l[3])){a=(l[2]||" ")+Cn[t][0];break}if(null==a)return void(e._isValid=!1)}if(!r&&null!=a)return void(e._isValid=!1);if(l[4]){if(!zn.exec(l[4]))return void(e._isValid=!1);i="Z"}e._f=o+(a||"")+(i||""),Xn(e)}else e._isValid=!1}function Mn(e,t,n,r,o,a){var i=[Tn(e),tt.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(o,10)];return a&&i.push(parseInt(a,10)),i}function Tn(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Nn(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function kn(e,t,n){return!e||Et.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(g(n).weekdayMismatch=!0,n._isValid=!1,!1)}function En(e,t,n){if(e)return Bn[e];if(t)return 0;var r=parseInt(n,10),o=r%100;return(r-o)/100*60+o}function Ln(e){var t,n=Pn.exec(Nn(e._i));if(n){if(t=Mn(n[4],n[3],n[2],n[5],n[6],n[7]),!kn(n[1],t,e))return;e._a=t,e._tzm=En(n[8],n[9],n[10]),e._d=bt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function Wn(e){var t=jn.exec(e._i);null===t?(Dn(e),!1===e._isValid&&(delete e._isValid,Ln(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:r.createFromInputFallback(e)))):e._d=new Date(+t[1])}function In(e,t,n){return null!=e?e:null!=t?t:n}function Sn(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Hn(e){var t,n,r,o,a,i=[];if(!e._d){for(r=Sn(e),e._w&&null==e._a[Fe]&&null==e._a[Qe]&&Vn(e),null!=e._dayOfYear&&(a=In(e._a[Ye],r[Ye]),(e._dayOfYear>ht(a)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=bt(a,0,e._dayOfYear),e._a[Qe]=n.getUTCMonth(),e._a[Fe]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=i[t]=r[t];for(;t<7;t++)e._a[t]=i[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ge]&&0===e._a[Ze]&&0===e._a[qe]&&0===e._a[Ue]&&(e._nextDay=!0,e._a[Ge]=0),e._d=(e._useUTC?bt:At).apply(null,i),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ge]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(g(e).weekdayMismatch=!0)}}function Vn(e){var t,n,r,o,a,i,s,l,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(a=1,i=4,n=In(t.GG,e._a[Ye],wt(Un(),1,4).year),r=In(t.W,1),((o=In(t.E,1))<1||o>7)&&(l=!0)):(a=e._locale._week.dow,i=e._locale._week.doy,c=wt(Un(),a,i),n=In(t.gg,e._a[Ye],c.year),r=In(t.w,c.week),null!=t.d?((o=t.d)<0||o>6)&&(l=!0):null!=t.e?(o=t.e+a,(t.e<0||t.e>6)&&(l=!0)):o=a),r<1||r>zt(n,a,i)?g(e)._overflowWeeks=!0:null!=l?g(e)._overflowWeekday=!0:(s=xt(n,r,o,a,i),e._a[Ye]=s.year,e._dayOfYear=s.dayOfYear)}function Xn(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],g(e).empty=!0;var t,n,o,a,i,s,l,c=""+e._i,u=c.length,d=0;for(l=(o=Q(e._f,e._locale).match(W)||[]).length,t=0;t<l;t++)a=o[t],(n=(c.match(Le(a,e))||[])[0])&&((i=c.substr(0,c.indexOf(n))).length>0&&g(e).unusedInput.push(i),c=c.slice(c.indexOf(n)+n.length),d+=n.length),H[a]?(n?g(e).empty=!1:g(e).unusedTokens.push(a),Xe(a,n,e)):e._strict&&!n&&g(e).unusedTokens.push(a);g(e).charsLeftOver=u-d,c.length>0&&g(e).unusedInput.push(c),e._a[Ge]<=12&&!0===g(e).bigHour&&e._a[Ge]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[Ge]=Rn(e._locale,e._a[Ge],e._meridiem),null!==(s=g(e).era)&&(e._a[Ye]=e._locale.erasConvertYear(s,e._a[Ye])),Hn(e),yn(e)}else Ln(e);else Dn(e)}function Rn(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function Yn(e){var t,n,r,o,a,i,s=!1,l=e._f.length;if(0===l)return g(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;o<l;o++)a=0,i=!1,t=x({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],Xn(t),v(t)&&(i=!0),a+=g(t).charsLeftOver,a+=10*g(t).unusedTokens.length,g(t).score=a,s?a<r&&(r=a,n=t):(null==r||a<r||i)&&(r=a,n=t,i&&(s=!0));f(e,n||t)}function Qn(e){if(!e._d){var t=oe(e._i),n=void 0===t.day?t.date:t.day;e._a=p([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),Hn(e)}}function Fn(e){var t=new w(yn(Gn(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Gn(e){var t=e._i,n=e._f;return e._locale=e._locale||An(e._l),null===t||void 0===n&&""===t?A({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),z(t)?new w(yn(t)):(d(t)?e._d=t:a(n)?Yn(e):n?Xn(e):Zn(e),v(e)||(e._d=null),e))}function Zn(e){var t=e._i;c(t)?e._d=new Date(r.now()):d(t)?e._d=new Date(t.valueOf()):"string"==typeof t?Wn(e):a(t)?(e._a=p(t.slice(0),(function(e){return parseInt(e,10)})),Hn(e)):i(t)?Qn(e):u(t)?e._d=new Date(t):r.createFromInputFallback(e)}function qn(e,t,n,r,o){var s={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(i(e)&&l(e)||a(e)&&0===e.length)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=o,s._l=n,s._i=e,s._f=t,s._strict=r,Fn(s)}function Un(e,t,n,r){return qn(e,t,n,r,!1)}r.createFromInputFallback=C("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),r.ISO_8601=function(){},r.RFC_2822=function(){};var Kn=C("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Un.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:A()})),Jn=C("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Un.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:A()}));function _n(e,t){var n,r;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return Un();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}function $n(){return _n("isBefore",[].slice.call(arguments,0))}function er(){return _n("isAfter",[].slice.call(arguments,0))}var tr=function(){return Date.now?Date.now():+new Date},nr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function rr(e){var t,n,r=!1,o=nr.length;for(t in e)if(s(e,t)&&(-1===Re.call(nr,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<o;++n)if(e[nr[n]]){if(r)return!1;parseFloat(e[nr[n]])!==ue(e[nr[n]])&&(r=!0)}return!0}function or(){return this._isValid}function ar(){return Br(NaN)}function ir(e){var t=oe(e),n=t.year||0,r=t.quarter||0,o=t.month||0,a=t.week||t.isoWeek||0,i=t.day||0,s=t.hour||0,l=t.minute||0,c=t.second||0,u=t.millisecond||0;this._isValid=rr(t),this._milliseconds=+u+1e3*c+6e4*l+1e3*s*60*60,this._days=+i+7*a,this._months=+o+3*r+12*n,this._data={},this._locale=An(),this._bubble()}function sr(e){return e instanceof ir}function lr(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function cr(e,t,n){var r,o=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),i=0;for(r=0;r<o;r++)(n&&e[r]!==t[r]||!n&&ue(e[r])!==ue(t[r]))&&i++;return i+a}function ur(e,t){V(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+L(~~(e/60),2)+t+L(~~e%60,2)}))}ur("Z",":"),ur("ZZ",""),Ee("Z",Te),Ee("ZZ",Te),He(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=pr(Te,e)}));var dr=/([\+\-]|\d\d)/gi;function pr(e,t){var n,r,o=(t||"").match(e);return null===o?null:0===(r=60*(n=((o[o.length-1]||[])+"").match(dr)||["-",0,0])[1]+ue(n[2]))?0:"+"===n[0]?r:-r}function fr(e,t){var n,o;return t._isUTC?(n=t.clone(),o=(z(e)||d(e)?e.valueOf():Un(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+o),r.updateOffset(n,!1),n):Un(e).local()}function mr(e){return-Math.round(e._d.getTimezoneOffset())}function hr(e,t,n){var o,a=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=pr(Te,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(o=mr(this)),this._offset=e,this._isUTC=!0,null!=o&&this.add(o,"m"),a!==e&&(!t||this._changeInProgress?kr(this,Br(e-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?a:mr(this)}function gr(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function vr(e){return this.utcOffset(0,e)}function Ar(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(mr(this),"m")),this}function br(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=pr(Me,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function yr(e){return!!this.isValid()&&(e=e?Un(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function xr(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function wr(){if(!c(this._isDSTShifted))return this._isDSTShifted;var e,t={};return x(t,this),(t=Gn(t))._a?(e=t._isUTC?m(t._a):Un(t._a),this._isDSTShifted=this.isValid()&&cr(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function zr(){return!!this.isValid()&&!this._isUTC}function Or(){return!!this.isValid()&&this._isUTC}function Cr(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var jr=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Pr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Br(e,t){var n,r,o,a=e,i=null;return sr(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(a={},t?a[t]=+e:a.milliseconds=+e):(i=jr.exec(e))?(n="-"===i[1]?-1:1,a={y:0,d:ue(i[Fe])*n,h:ue(i[Ge])*n,m:ue(i[Ze])*n,s:ue(i[qe])*n,ms:ue(lr(1e3*i[Ue]))*n}):(i=Pr.exec(e))?(n="-"===i[1]?-1:1,a={y:Dr(i[2],n),M:Dr(i[3],n),w:Dr(i[4],n),d:Dr(i[5],n),h:Dr(i[6],n),m:Dr(i[7],n),s:Dr(i[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(o=Tr(Un(a.from),Un(a.to)),(a={}).ms=o.milliseconds,a.M=o.months),r=new ir(a),sr(e)&&s(e,"_locale")&&(r._locale=e._locale),sr(e)&&s(e,"_isValid")&&(r._isValid=e._isValid),r}function Dr(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Mr(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Tr(e,t){var n;return e.isValid()&&t.isValid()?(t=fr(t,e),e.isBefore(t)?n=Mr(e,t):((n=Mr(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Nr(e,t){return function(n,r){var o;return null===r||isNaN(+r)||(B(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),kr(this,Br(n,r),e),this}}function kr(e,t,n,o){var a=t._milliseconds,i=lr(t._days),s=lr(t._months);e.isValid()&&(o=null==o||o,s&&ct(e,pe(e,"Month")+s*n),i&&fe(e,"Date",pe(e,"Date")+i*n),a&&e._d.setTime(e._d.valueOf()+a*n),o&&r.updateOffset(e,i||s))}Br.fn=ir.prototype,Br.invalid=ar;var Er=Nr(1,"add"),Lr=Nr(-1,"subtract");function Wr(e){return"string"==typeof e||e instanceof String}function Ir(e){return z(e)||d(e)||Wr(e)||u(e)||Hr(e)||Sr(e)||null==e}function Sr(e){var t,n,r=i(e)&&!l(e),o=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],c=a.length;for(t=0;t<c;t+=1)n=a[t],o=o||s(e,n);return r&&o}function Hr(e){var t=a(e),n=!1;return t&&(n=0===e.filter((function(t){return!u(t)&&Wr(e)})).length),t&&n}function Vr(e){var t,n,r=i(e)&&!l(e),o=!1,a=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<a.length;t+=1)n=a[t],o=o||s(e,n);return r&&o}function Xr(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Rr(e,t){1===arguments.length&&(arguments[0]?Ir(arguments[0])?(e=arguments[0],t=void 0):Vr(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Un(),o=fr(n,this).startOf("day"),a=r.calendarFormat(this,o)||"sameElse",i=t&&(D(t[a])?t[a].call(this,n):t[a]);return this.format(i||this.localeData().calendar(a,this,Un(n)))}function Yr(){return new w(this)}function Qr(e,t){var n=z(e)?e:Un(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function Fr(e,t){var n=z(e)?e:Un(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function Gr(e,t,n,r){var o=z(e)?e:Un(e),a=z(t)?t:Un(t);return!!(this.isValid()&&o.isValid()&&a.isValid())&&("("===(r=r||"()")[0]?this.isAfter(o,n):!this.isBefore(o,n))&&(")"===r[1]?this.isBefore(a,n):!this.isAfter(a,n))}function Zr(e,t){var n,r=z(e)?e:Un(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=re(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function qr(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Ur(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Kr(e,t,n){var r,o,a;if(!this.isValid())return NaN;if(!(r=fr(e,this)).isValid())return NaN;switch(o=6e4*(r.utcOffset()-this.utcOffset()),t=re(t)){case"year":a=Jr(this,r)/12;break;case"month":a=Jr(this,r);break;case"quarter":a=Jr(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-o)/864e5;break;case"week":a=(this-r-o)/6048e5;break;default:a=this-r}return n?a:ce(a)}function Jr(e,t){if(e.date()<t.date())return-Jr(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function _r(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function $r(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?Y(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):D(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",Y(n,"Z")):Y(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function eo(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r,o="moment",a="";return this.isLocal()||(o=0===this.utcOffset()?"moment.utc":"moment.parseZone",a="Z"),e="["+o+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=a+'[")]',this.format(e+t+n+r)}function to(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=Y(this,e);return this.localeData().postformat(t)}function no(e,t){return this.isValid()&&(z(e)&&e.isValid()||Un(e).isValid())?Br({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ro(e){return this.from(Un(),e)}function oo(e,t){return this.isValid()&&(z(e)&&e.isValid()||Un(e).isValid())?Br({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ao(e){return this.to(Un(),e)}function io(e){var t;return void 0===e?this._locale._abbr:(null!=(t=An(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var so=C("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function lo(){return this._locale}var co=1e3,uo=60*co,po=60*uo,fo=3506328*po;function mo(e,t){return(e%t+t)%t}function ho(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-fo:new Date(e,t,n).valueOf()}function go(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-fo:Date.UTC(e,t,n)}function vo(e){var t,n;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?go:ho,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=mo(t+(this._isUTC?0:this.utcOffset()*uo),po);break;case"minute":t=this._d.valueOf(),t-=mo(t,uo);break;case"second":t=this._d.valueOf(),t-=mo(t,co)}return this._d.setTime(t),r.updateOffset(this,!0),this}function Ao(e){var t,n;if(void 0===(e=re(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?go:ho,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=po-mo(t+(this._isUTC?0:this.utcOffset()*uo),po)-1;break;case"minute":t=this._d.valueOf(),t+=uo-mo(t,uo)-1;break;case"second":t=this._d.valueOf(),t+=co-mo(t,co)-1}return this._d.setTime(t),r.updateOffset(this,!0),this}function bo(){return this._d.valueOf()-6e4*(this._offset||0)}function yo(){return Math.floor(this.valueOf()/1e3)}function xo(){return new Date(this.valueOf())}function wo(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function zo(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Oo(){return this.isValid()?this.toISOString():null}function Co(){return v(this)}function jo(){return f({},g(this))}function Po(){return g(this).overflow}function Bo(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Do(e,t){var n,o,a,i=this._eras||An("en")._eras;for(n=0,o=i.length;n<o;++n)switch("string"==typeof i[n].since&&(a=r(i[n].since).startOf("day"),i[n].since=a.valueOf()),typeof i[n].until){case"undefined":i[n].until=1/0;break;case"string":a=r(i[n].until).startOf("day").valueOf(),i[n].until=a.valueOf()}return i}function Mo(e,t,n){var r,o,a,i,s,l=this.eras();for(e=e.toUpperCase(),r=0,o=l.length;r<o;++r)if(a=l[r].name.toUpperCase(),i=l[r].abbr.toUpperCase(),s=l[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(i===e)return l[r];break;case"NNNN":if(a===e)return l[r];break;case"NNNNN":if(s===e)return l[r]}else if([a,i,s].indexOf(e)>=0)return l[r]}function To(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n}function No(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""}function ko(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""}function Eo(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""}function Lo(){var e,t,n,o,a=this.localeData().eras();for(e=0,t=a.length;e<t;++e)if(n=a[e].since<=a[e].until?1:-1,o=this.clone().startOf("day").valueOf(),a[e].since<=o&&o<=a[e].until||a[e].until<=o&&o<=a[e].since)return(this.year()-r(a[e].since).year())*n+a[e].offset;return this.year()}function Wo(e){return s(this,"_erasNameRegex")||Yo.call(this),e?this._erasNameRegex:this._erasRegex}function Io(e){return s(this,"_erasAbbrRegex")||Yo.call(this),e?this._erasAbbrRegex:this._erasRegex}function So(e){return s(this,"_erasNarrowRegex")||Yo.call(this),e?this._erasNarrowRegex:this._erasRegex}function Ho(e,t){return t.erasAbbrRegex(e)}function Vo(e,t){return t.erasNameRegex(e)}function Xo(e,t){return t.erasNarrowRegex(e)}function Ro(e,t){return t._eraYearOrdinalRegex||Be}function Yo(){var e,t,n=[],r=[],o=[],a=[],i=this.eras();for(e=0,t=i.length;e<t;++e)r.push(Ie(i[e].name)),n.push(Ie(i[e].abbr)),o.push(Ie(i[e].narrow)),a.push(Ie(i[e].name)),a.push(Ie(i[e].abbr)),a.push(Ie(i[e].narrow));this._erasRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+r.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+o.join("|")+")","i")}function Qo(e,t){V(0,[e,e.length],0,t)}function Fo(e){return Jo.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Go(e){return Jo.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Zo(){return zt(this.year(),1,4)}function qo(){return zt(this.isoWeekYear(),1,4)}function Uo(){var e=this.localeData()._week;return zt(this.year(),e.dow,e.doy)}function Ko(){var e=this.localeData()._week;return zt(this.weekYear(),e.dow,e.doy)}function Jo(e,t,n,r,o){var a;return null==e?wt(this,r,o).year:(t>(a=zt(e,r,o))&&(t=a),_o.call(this,e,t,n,r,o))}function _o(e,t,n,r,o){var a=xt(e,t,n,r,o),i=bt(a.year,0,a.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}function $o(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}V("N",0,0,"eraAbbr"),V("NN",0,0,"eraAbbr"),V("NNN",0,0,"eraAbbr"),V("NNNN",0,0,"eraName"),V("NNNNN",0,0,"eraNarrow"),V("y",["y",1],"yo","eraYear"),V("y",["yy",2],0,"eraYear"),V("y",["yyy",3],0,"eraYear"),V("y",["yyyy",4],0,"eraYear"),Ee("N",Ho),Ee("NN",Ho),Ee("NNN",Ho),Ee("NNNN",Vo),Ee("NNNNN",Xo),He(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var o=n._locale.erasParse(e,r,n._strict);o?g(n).era=o:g(n).invalidEra=e})),Ee("y",Be),Ee("yy",Be),Ee("yyy",Be),Ee("yyyy",Be),Ee("yo",Ro),He(["y","yy","yyy","yyyy"],Ye),He(["yo"],(function(e,t,n,r){var o;n._locale._eraYearOrdinalRegex&&(o=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Ye]=n._locale.eraYearOrdinalParse(e,o):t[Ye]=parseInt(e,10)})),V(0,["gg",2],0,(function(){return this.weekYear()%100})),V(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Qo("gggg","weekYear"),Qo("ggggg","weekYear"),Qo("GGGG","isoWeekYear"),Qo("GGGGG","isoWeekYear"),ne("weekYear","gg"),ne("isoWeekYear","GG"),ie("weekYear",1),ie("isoWeekYear",1),Ee("G",De),Ee("g",De),Ee("GG",we,Ae),Ee("gg",we,Ae),Ee("GGGG",je,ye),Ee("gggg",je,ye),Ee("GGGGG",Pe,xe),Ee("ggggg",Pe,xe),Ve(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=ue(e)})),Ve(["gg","GG"],(function(e,t,n,o){t[o]=r.parseTwoDigitYear(e)})),V("Q",0,"Qo","quarter"),ne("quarter","Q"),ie("quarter",7),Ee("Q",ve),He("Q",(function(e,t){t[Qe]=3*(ue(e)-1)})),V("D",["DD",2],"Do","date"),ne("date","D"),ie("date",9),Ee("D",we),Ee("DD",we,Ae),Ee("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),He(["D","DD"],Fe),He("Do",(function(e,t){t[Fe]=ue(e.match(we)[0])}));var ea=de("Date",!0);function ta(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}V("DDD",["DDDD",3],"DDDo","dayOfYear"),ne("dayOfYear","DDD"),ie("dayOfYear",4),Ee("DDD",Ce),Ee("DDDD",be),He(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=ue(e)})),V("m",["mm",2],0,"minute"),ne("minute","m"),ie("minute",14),Ee("m",we),Ee("mm",we,Ae),He(["m","mm"],Ze);var na=de("Minutes",!1);V("s",["ss",2],0,"second"),ne("second","s"),ie("second",15),Ee("s",we),Ee("ss",we,Ae),He(["s","ss"],qe);var ra,oa,aa=de("Seconds",!1);for(V("S",0,0,(function(){return~~(this.millisecond()/100)})),V(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),V(0,["SSS",3],0,"millisecond"),V(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),V(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),V(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),V(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),V(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),V(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),ne("millisecond","ms"),ie("millisecond",16),Ee("S",Ce,ve),Ee("SS",Ce,Ae),Ee("SSS",Ce,be),ra="SSSS";ra.length<=9;ra+="S")Ee(ra,Be);function ia(e,t){t[Ue]=ue(1e3*("0."+e))}for(ra="S";ra.length<=9;ra+="S")He(ra,ia);function sa(){return this._isUTC?"UTC":""}function la(){return this._isUTC?"Coordinated Universal Time":""}oa=de("Milliseconds",!1),V("z",0,0,"zoneAbbr"),V("zz",0,0,"zoneName");var ca=w.prototype;function ua(e){return Un(1e3*e)}function da(){return Un.apply(null,arguments).parseZone()}function pa(e){return e}ca.add=Er,ca.calendar=Rr,ca.clone=Yr,ca.diff=Kr,ca.endOf=Ao,ca.format=to,ca.from=no,ca.fromNow=ro,ca.to=oo,ca.toNow=ao,ca.get=me,ca.invalidAt=Po,ca.isAfter=Qr,ca.isBefore=Fr,ca.isBetween=Gr,ca.isSame=Zr,ca.isSameOrAfter=qr,ca.isSameOrBefore=Ur,ca.isValid=Co,ca.lang=so,ca.locale=io,ca.localeData=lo,ca.max=Jn,ca.min=Kn,ca.parsingFlags=jo,ca.set=he,ca.startOf=vo,ca.subtract=Lr,ca.toArray=wo,ca.toObject=zo,ca.toDate=xo,ca.toISOString=$r,ca.inspect=eo,"undefined"!=typeof Symbol&&null!=Symbol.for&&(ca[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ca.toJSON=Oo,ca.toString=_r,ca.unix=yo,ca.valueOf=bo,ca.creationData=Bo,ca.eraName=No,ca.eraNarrow=ko,ca.eraAbbr=Eo,ca.eraYear=Lo,ca.year=gt,ca.isLeapYear=vt,ca.weekYear=Fo,ca.isoWeekYear=Go,ca.quarter=ca.quarters=$o,ca.month=ut,ca.daysInMonth=dt,ca.week=ca.weeks=Bt,ca.isoWeek=ca.isoWeeks=Dt,ca.weeksInYear=Uo,ca.weeksInWeekYear=Ko,ca.isoWeeksInYear=Zo,ca.isoWeeksInISOWeekYear=qo,ca.date=ea,ca.day=ca.days=Qt,ca.weekday=Ft,ca.isoWeekday=Gt,ca.dayOfYear=ta,ca.hour=ca.hours=rn,ca.minute=ca.minutes=na,ca.second=ca.seconds=aa,ca.millisecond=ca.milliseconds=oa,ca.utcOffset=hr,ca.utc=vr,ca.local=Ar,ca.parseZone=br,ca.hasAlignedHourOffset=yr,ca.isDST=xr,ca.isLocal=zr,ca.isUtcOffset=Or,ca.isUtc=Cr,ca.isUTC=Cr,ca.zoneAbbr=sa,ca.zoneName=la,ca.dates=C("dates accessor is deprecated. Use date instead.",ea),ca.months=C("months accessor is deprecated. Use month instead",ut),ca.years=C("years accessor is deprecated. Use year instead",gt),ca.zone=C("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gr),ca.isDSTShifted=C("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",wr);var fa=N.prototype;function ma(e,t,n,r){var o=An(),a=m().set(r,t);return o[n](a,e)}function ha(e,t,n){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return ma(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=ma(e,r,n,"month");return o}function ga(e,t,n,r){"boolean"==typeof e?(u(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,u(t)&&(n=t,t=void 0),t=t||"");var o,a=An(),i=e?a._week.dow:0,s=[];if(null!=n)return ma(t,(n+i)%7,r,"day");for(o=0;o<7;o++)s[o]=ma(t,(o+i)%7,r,"day");return s}function va(e,t){return ha(e,t,"months")}function Aa(e,t){return ha(e,t,"monthsShort")}function ba(e,t,n){return ga(e,t,n,"weekdays")}function ya(e,t,n){return ga(e,t,n,"weekdaysShort")}function xa(e,t,n){return ga(e,t,n,"weekdaysMin")}fa.calendar=E,fa.longDateFormat=G,fa.invalidDate=q,fa.ordinal=J,fa.preparse=pa,fa.postformat=pa,fa.relativeTime=$,fa.pastFuture=ee,fa.set=M,fa.eras=Do,fa.erasParse=Mo,fa.erasConvertYear=To,fa.erasAbbrRegex=Io,fa.erasNameRegex=Wo,fa.erasNarrowRegex=So,fa.months=at,fa.monthsShort=it,fa.monthsParse=lt,fa.monthsRegex=ft,fa.monthsShortRegex=pt,fa.week=Ot,fa.firstDayOfYear=Pt,fa.firstDayOfWeek=jt,fa.weekdays=Ht,fa.weekdaysMin=Xt,fa.weekdaysShort=Vt,fa.weekdaysParse=Yt,fa.weekdaysRegex=Zt,fa.weekdaysShortRegex=qt,fa.weekdaysMinRegex=Ut,fa.isPM=tn,fa.meridiem=on,hn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===ue(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=C("moment.lang is deprecated. Use moment.locale instead.",hn),r.langData=C("moment.langData is deprecated. Use moment.localeData instead.",An);var wa=Math.abs;function za(){var e=this._data;return this._milliseconds=wa(this._milliseconds),this._days=wa(this._days),this._months=wa(this._months),e.milliseconds=wa(e.milliseconds),e.seconds=wa(e.seconds),e.minutes=wa(e.minutes),e.hours=wa(e.hours),e.months=wa(e.months),e.years=wa(e.years),this}function Oa(e,t,n,r){var o=Br(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function Ca(e,t){return Oa(this,e,t,1)}function ja(e,t){return Oa(this,e,t,-1)}function Pa(e){return e<0?Math.floor(e):Math.ceil(e)}function Ba(){var e,t,n,r,o,a=this._milliseconds,i=this._days,s=this._months,l=this._data;return a>=0&&i>=0&&s>=0||a<=0&&i<=0&&s<=0||(a+=864e5*Pa(Ma(s)+i),i=0,s=0),l.milliseconds=a%1e3,e=ce(a/1e3),l.seconds=e%60,t=ce(e/60),l.minutes=t%60,n=ce(t/60),l.hours=n%24,i+=ce(n/24),s+=o=ce(Da(i)),i-=Pa(Ma(o)),r=ce(s/12),s%=12,l.days=i,l.months=s,l.years=r,this}function Da(e){return 4800*e/146097}function Ma(e){return 146097*e/4800}function Ta(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=re(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Da(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Ma(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function Na(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*ue(this._months/12):NaN}function ka(e){return function(){return this.as(e)}}var Ea=ka("ms"),La=ka("s"),Wa=ka("m"),Ia=ka("h"),Sa=ka("d"),Ha=ka("w"),Va=ka("M"),Xa=ka("Q"),Ra=ka("y");function Ya(){return Br(this)}function Qa(e){return e=re(e),this.isValid()?this[e+"s"]():NaN}function Fa(e){return function(){return this.isValid()?this._data[e]:NaN}}var Ga=Fa("milliseconds"),Za=Fa("seconds"),qa=Fa("minutes"),Ua=Fa("hours"),Ka=Fa("days"),Ja=Fa("months"),_a=Fa("years");function $a(){return ce(this.days()/7)}var ei=Math.round,ti={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ni(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}function ri(e,t,n,r){var o=Br(e).abs(),a=ei(o.as("s")),i=ei(o.as("m")),s=ei(o.as("h")),l=ei(o.as("d")),c=ei(o.as("M")),u=ei(o.as("w")),d=ei(o.as("y")),p=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||i<=1&&["m"]||i<n.m&&["mm",i]||s<=1&&["h"]||s<n.h&&["hh",s]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(p=p||u<=1&&["w"]||u<n.w&&["ww",u]),(p=p||c<=1&&["M"]||c<n.M&&["MM",c]||d<=1&&["y"]||["yy",d])[2]=t,p[3]=+e>0,p[4]=r,ni.apply(null,p)}function oi(e){return void 0===e?ei:"function"==typeof e&&(ei=e,!0)}function ai(e,t){return void 0!==ti[e]&&(void 0===t?ti[e]:(ti[e]=t,"s"===e&&(ti.ss=t-1),!0))}function ii(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,o=!1,a=ti;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(o=e),"object"==typeof t&&(a=Object.assign({},ti,t),null!=t.s&&null==t.ss&&(a.ss=t.s-1)),r=ri(this,!o,a,n=this.localeData()),o&&(r=n.pastFuture(+this,r)),n.postformat(r)}var si=Math.abs;function li(e){return(e>0)-(e<0)||+e}function ci(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,o,a,i,s,l=si(this._milliseconds)/1e3,c=si(this._days),u=si(this._months),d=this.asSeconds();return d?(e=ce(l/60),t=ce(e/60),l%=60,e%=60,n=ce(u/12),u%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",o=d<0?"-":"",a=li(this._months)!==li(d)?"-":"",i=li(this._days)!==li(d)?"-":"",s=li(this._milliseconds)!==li(d)?"-":"",o+"P"+(n?a+n+"Y":"")+(u?a+u+"M":"")+(c?i+c+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+r+"S":"")):"P0D"}var ui=ir.prototype;return ui.isValid=or,ui.abs=za,ui.add=Ca,ui.subtract=ja,ui.as=Ta,ui.asMilliseconds=Ea,ui.asSeconds=La,ui.asMinutes=Wa,ui.asHours=Ia,ui.asDays=Sa,ui.asWeeks=Ha,ui.asMonths=Va,ui.asQuarters=Xa,ui.asYears=Ra,ui.valueOf=Na,ui._bubble=Ba,ui.clone=Ya,ui.get=Qa,ui.milliseconds=Ga,ui.seconds=Za,ui.minutes=qa,ui.hours=Ua,ui.days=Ka,ui.weeks=$a,ui.months=Ja,ui.years=_a,ui.humanize=ii,ui.toISOString=ci,ui.toString=ci,ui.toJSON=ci,ui.locale=io,ui.localeData=lo,ui.toIsoString=C("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ci),ui.lang=so,V("X",0,0,"unix"),V("x",0,0,"valueOf"),Ee("x",De),Ee("X",Ne),He("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),He("x",(function(e,t,n){n._d=new Date(ue(e))})),
|
|
123
123
|
//! moment.js
|
|
124
|
-
r.version="2.29.4",o(Un),r.fn=ca,r.min=$n,r.max=er,r.now=tr,r.utc=m,r.unix=ua,r.months=va,r.isDate=d,r.locale=hn,r.invalid=A,r.duration=Br,r.isMoment=z,r.weekdays=ba,r.parseZone=da,r.localeData=An,r.isDuration=sr,r.monthsShort=Aa,r.weekdaysMin=xa,r.defineLocale=gn,r.updateLocale=vn,r.locales=bn,r.weekdaysShort=ya,r.normalizeUnits=re,r.relativeTimeRounding=oi,r.relativeTimeThreshold=ai,r.calendarFormat=Xr,r.prototype=ca,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()}(Lg);var Wg=W(Lg.exports);function Ig(e){var t=e.value;return Y.jsx(n.Typography,Q({style:{fontWeight:50},noWrap:!0},e,{children:Wg(new Date(t)).format("Do MMMM YYYY @ HH:MM")}))}function Sg(e){var t=e.value,r=e.enumvalues,o=r&&!r.includes(t)?"error":void 0,a=Kg.enhance(t);return Y.jsx(n.Chip,{label:a,color:o,size:"small"})}function Hg(e){var t=e.value;return Y.jsx(n.Typography,Q({},e,{noWrap:!0,children:t.longitude&&t.latitude?Y.jsx(n.Link,{align:"justify",style:{cursor:"pointer"},onClick:function(){return e=t.latitude,n=t.longitude,void window.open("https://maps.google.com?q="+e+","+n);var e,n},children:t.address}):Y.jsx(n.Typography,Q({style:{fontWeight:50}},e,{noWrap:!0,children:t.address}))}))}function Vg(e){var t=e.value,r=e.children;return F(e,["value","children"]),Y.jsx(n.Card,{sx:{py:3,px:3},children:Y.jsx(n.Grid,{children:t.map((function(e,t){return Y.jsxs(n.Grid,{item:!0,xs:12,sx:{mb:5},children:[Y.jsx(n.Typography,{color:"grey",fontSize:10,paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:"["+(t+1)+"]"}),r&&r(e,t)]},t)}))})})}function Xg(e){var t=e.navigateTo,o=e.value,a=r.useNavigate();return Y.jsx(n.Link,{align:"justify",style:{cursor:"pointer"},onClick:function(){return a(t)},children:o})}var Rg=require("pluralize");function Yg(e){var t,r=e.value,o=e.fieldkey,a=e.userpath,i=e.fieldschema,s=e.resources,l=e.path,c=null!=l?l:null==i?void 0:i.path,u=s[null!=c?c:""].properties,d=u.title,p=null===(t=u.actions.show)||void 0===t?void 0:t.isAccessible;function f(){return Mm.checkLocalizedString(s,null!=c?c:"",d)?Pm.getLocalizedString(r[d]):r[d]?r[d]:r._id?r._id:qg}return Y.jsx(n.Typography,Q({},e.props,{children:p?Y.jsx(Xg,{value:f(),navigateTo:a[c||Rg.singular(o)].show(r._id)}):Y.jsx(Ug,Q({type:ym.STRING},e,{value:f()}))}))}function Qg(e){var t,r,o,a=e.value,i=e.userpath,s=e.resources,l=e.path,c=e.fieldschema,u=s[null!==(t=null==c?void 0:c.path)&&void 0!==t?t:""].properties,d=null==u?void 0:u.title,p=null===(o=null===(r=null==u?void 0:u.actions)||void 0===r?void 0:r.show)||void 0===o?void 0:o.isAccessible;function f(){var e;return Mm.checkLocalizedString(s,null!==(e=null==c?void 0:c.path)&&void 0!==e?e:"",d)?Pm.getLocalizedString(a[d]):a[d]}if(a)return a.map((function(t){return Y.jsx(n.Typography,Q({},e.props,{children:p?Y.jsx(Xg,{value:f(),navigateTo:i[null!=l?l:""].show(t._id)}):Y.jsx(Ug,Q({type:ym.STRING},e,{value:f()}))}),t._id)}))}function Fg(e){var t=e.value,r=e.props;return null===t?Y.jsx(n.Typography,Q({},r,{children:qg})):"[object Array]"!==Object.prototype.toString.call(t)?Y.jsx(Yg,Q({},e)):t?Y.jsx(Qg,Q({},e)):Y.jsx(Y.Fragment,{})}function Gg(e){var t=e.htmlString;return Y.jsx("div",{children:Y.jsx(g,{value:t,readOnly:!0,theme:"bubble"})})}function Zg(e){var t=e.value;return Y.jsx(n.Card,{sx:{py:1,px:3},children:Y.jsx(Gg,{htmlString:t})})}var qg="---";function Ug(e){var t=e.value,r=e.fieldschema,o=e.type,a=e.enumvalues,i=e.children;if(null==t)return Y.jsx(n.Typography,Q({},e,{children:qg}));switch(o){case ym.STRING:case ym.NUMBER:case ym.OBJECTID:case ym.PHONENUMBER:case ym.TIMEPICKER:case ym.PASSWORD:return Y.jsx(n.Typography,Q({},e,{children:t}));case ym.NESTEDSCHEMA:return Y.jsx(Tg,Q({},e,{value:t,fieldschema:r}));case ym.LOCALIZEDString:return Y.jsx(Ng,{value:t});case ym.BOOLEAN:return Y.jsx(n.Chip,{label:t?t.toString():"false",variant:"outlined",size:"small"});case ym.COLOR:return Y.jsx(n.Typography,Q({},e,{color:t,children:t}));case ym.DATE:return Y.jsx(Ig,Q({},e));case ym.ENUM:return Y.jsx(Sg,Q({enumvalues:a},e));case ym.RICH_TEXT_I:return Y.jsx(Zg,Q({},e));case ym.LOCATION:return Y.jsx(Hg,Q({},e));case ym.IMAGE:return Y.jsx("img",{src:t,alt:"",height:70});case ym.ARRAY:return t&&t.length>0?Y.jsx(Vg,Q({},e,{value:t,children:i})):Y.jsx(n.Typography,Q({},e,{children:qg}));case ym.REFERENCE:return Y.jsx(Fg,Q({},e));default:return Y.jsx(Y.Fragment,{})}}var Kg=function(){function e(){}return e.enhance=function(e){var t=this;return e?e.includes("_")?e.split("_").map((function(e){return t.enhanceEnum(e)})).join(" "):this.enhanceEnum(e):qg},e.enhanceEnum=function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},e}(),Jg=require("lodash");function _g(e,t){var n,r,o,a,i,s,l,c,u,d,p=e.action,f=e.path,m=e.recordId;switch(p){case Am.LIST:return null!==(r=null===(n=t[f])||void 0===n?void 0:n.list)&&void 0!==r?r:f;case Am.NEW:return null!==(a=null===(o=t[f])||void 0===o?void 0:o.new)&&void 0!==a?a:f;case Am.SHOW:return null!==(s=null===(i=t[f])||void 0===i?void 0:i.show(m))&&void 0!==s?s:f;case Am.EDIT:return null!==(c=null===(l=t[f])||void 0===l?void 0:l.edit(m))&&void 0!==c?c:f;default:return null!==(d=null===(u=t[f])||void 0===u?void 0:u.list)&&void 0!==d?d:f}}function $g(t){var n=t.resourceName,o=t.params,a=t.resources,i=t.dialogState,s=t.paramsState,l=t.extras;s[0];var c=s[1],u=e.useContext(Uh).dashbaordUrlPrefix,d=e.useContext(ng).paths,p=hg(),f=p.setSuccessAlert,m=p.setErrorAlert,h=p.setAlert,g=e.useState(null),v=g[0],A=g[1],b=function(){A(null)},y=o.row,x=a[n].properties,w=x.actions,z=x.modelName,O=i[1],C=[],j=r.useNavigate();return w.delete.isAccessible&&C.push({onClick:function(e){O({title:w?w.delete.confirmationMessageTitle:"",message:w?w.delete.confirmationMessageBody:"",onClose:function(){O({open:!1})},onConfirm:function(){var e;O({open:!1}),f(null!==(e=null==l?void 0:l.afterDeleteSnackBarText)&&void 0!==e?e:"Deleted successfully"),c((function(e){return Q(Q({},e),{filters:void 0,filter:void 0})}))},action:function(){return Bm.delete("".concat(u,"/").concat(a[n].properties.path,"/").concat(e._id))},open:!0})},title:w.delete.value,icon:Y.jsx(yo,{icon:"eva:trash-2-outline"}),key:"delete",color:"error.main"}),w.edit.isAccessible&&C.push({onClick:function(e){j(d[n].edit(e._id))},title:w.edit.value,icon:Y.jsx(yo,{icon:"eva:edit-fill"}),key:"edit",color:"black"}),w.show.isAccessible&&C.push({onClick:function(e){j(d[n].show(e._id))},title:w.show.value,icon:Y.jsx(yo,{icon:"mdi:show-outline"}),key:"show",color:"black"}),y.extraActionKeys&&w.extras&&0!==y.extraActionKeys.length&&y.extraActionKeys.forEach((function(e){var t;w.extras.record[e]&&C.push({onClick:function(t){var n,r,o;w.extras.record[e].guard||Bm.post("".concat(u,"/actions/execute/").concat(e),{record:t,modelName:z}).then((function(t){var n,r,o=t.data.data.response;if(w.extras.record[e].handlerStrategy===xm.FILE_DOWNLOAD){var a=o.filePath;setTimeout((function(){window.open(a,"_blank")}))}else j(_g(o,d)),h(null!==(n=w.extras.record[e].message)&&void 0!==n?n:"Action executed Successfully",null!==(r=w.extras.record[e].severity)&&void 0!==r?r:"success")})).catch((function(){m("Error happened")})),O({title:null!==(r=null!==(n=w.extras.record[e].guardTitle)&&void 0!==n?n:w.extras.record[e].name)&&void 0!==r?r:"",message:null!==(o=w.extras.record[e].guard)&&void 0!==o?o:"Do you want to execute this action?",onClose:function(){O({open:!1})},onConfirm:function(t){var n,r,o,a;switch(O({open:!1}),w.extras.record[e].handlerStrategy){case xm.NORMAL:t.action===Am.LIST?(c((function(e){return Q(Q({},e),{page:pv.page})})),h(null!==(n=w.extras.record[e].message)&&void 0!==n?n:"Action executed Successfully",null!==(r=w.extras.record[e].severity)&&void 0!==r?r:"success")):j(_g(t,d));break;case xm.FILE_DOWNLOAD:var i=t.filePath;setTimeout((function(){window.open(i,"_blank")}));break;default:h(null!==(o=w.extras.record[e].message)&&void 0!==o?o:"Action executed Successfully",null!==(a=w.extras.record[e].severity)&&void 0!==a?a:"success")}},action:function(){return Bm.post("".concat(u,"/actions/execute/").concat(e),{record:t,modelName:z})},open:w.extras.record[e].guard})},title:w.extras.record[e].name,icon:iv(w.extras.record[e].icon),key:w.extras.record[e].name,color:null!==(t=w.extras.record[e].color)&&void 0!==t?t:"black"})})),Y.jsx(ig,{open:v,onOpen:function(e){A(e.currentTarget)},onClose:b,actions:nv(C,b,y)})}function ev(e,t,o,a,i,s,l,c,u,d,p,f){if(!(s&&s.hasOwnProperty(o.key)&&null!==s[o.key]||t.valuePath))return Y.jsx(n.Typography,Q({},i,{children:"--- "}));switch(t.type){case ym.STRING:if(/^#[0-9A-F]{6}$/i.test(a)){i.color=a,i.variant="body2";break}if(!s||!s.hasOwnProperty(o.key)||null===s[o.key]){e="---",i.variant="subtitle2";break}o.key===c&&l&&l.show.isAccessible&&(e=Y.jsx(n.Link,{align:"justify",component:r.Link,to:f[u].show(s._id),children:a}));break;case ym.OBJECTID:if(o.key===c&&l&&l.show.isAccessible){e=Y.jsx(n.Link,{align:"justify",component:r.Link,to:f[u].show(s._id),children:a});break}i.variant="subtitle2";break;case ym.NUMBER:case ym.PHONENUMBER:i.variant="subtitle2";break;case ym.DATE:var m=!(!p[o.key]||!p[o.key].withTime);i.variant="subtitle2",e=Fm(s[o.key],m);break;case ym.LOCALIZEDString:var h=s[o.key]&&s[o.key][0]?Pm.getLocalizedString(s[o.key]):"----";e=o.key===c&&l&&l.show.isAccessible?Y.jsx(n.Link,{align:"justify",component:r.Link,to:f[u].show(s._id),children:h}):h,i.variant="subtitle2";break;case ym.ENUM:return Y.jsx(n.Chip,{label:Kg.enhance(a),size:"small"});case ym.IMAGE:var g=ih(a);return Y.jsx("img",{src:"image"===g?a:sh(g),alt:a,height:80});case ym.BOOLEAN:return Y.jsx(n.Chip,{label:"".concat(a),variant:"outlined",size:"small",component:"div"});case ym.NESTEDSCHEMA:i.variant="caption",i.color="GrayText",e="Object {...}";break;case ym.ARRAY:i.variant="caption",i.color="GrayText",e="Length ["+s[o.key].length+"]";break;case ym.REFERENCE:if(!s[o.key])break;var v=s[o.key].pathOfTable?s[o.key].pathOfTable:o.path,A=d[v];if(!(A&&A.properties&&s[o.key]&&v)){i.variant="subtitle2",e=a._id;break}var b=A.properties.title,y=Mm.checkLocalizedString(d,v,b)?Pm.getLocalizedString(s[o.key][b]):s[o.key][b]?s[o.key][b]:s[o.key]._id;if(!A.properties.actions.show.isAccessible){e=a?y:s[o.key]?s[o.key]._id:"---";break}e=Y.jsx(n.Link,{align:"justify",href:f[v||o.key.toLowerCase()].show(a||s[o.key]&&s[o.key]._id?s[o.key]._id:""),children:a||s[o.key]._id?y:"---- "})}return Y.jsx(n.Typography,Q({},i,{children:e}))}function tv(e,t,o,a,i){var s=a[e].properties?a[e].properties.model:void 0,l=a[e].properties,c=l.title,u=l.actions,d=o.value,p=o.row,f={color:"black",noWrap:!1,sx:{fontWeight:50,wordWrap:"break-word",whiteSpace:"normal"},variant:"body1"},m=d;if(t.key.includes(".")){var h=t.key.split("."),g={key:h[h.length-1],value:t.value,path:t.path},v=av(t.key,p),A=ov(t.key,s),b=v?v[g.key]:null;return ev(b,A,g,b,f,v,u,c,e,a,s,i)}return p.hasOwnProperty(t.key)&&null!==p[t.key]?t.key===c?Y.jsx(n.Typography,{variant:"body2",color:"black",noWrap:!0,children:u.show.isAccessible?Y.jsx(n.Link,{align:"justify",component:r.Link,to:i[e].show(p._id),style:{cursor:"pointer"},children:s[t.key].type===ym.LOCALIZEDString?p[t.key][0]?Pm.getLocalizedString(p[t.key]):"---":"object"==typeof p[t.key]?Pm.getLocalizedString(p[t.key]):p[t.key]}):Y.jsx(n.Typography,Q({},f,{children:s[t.key].type===ym.LOCALIZEDString?Pm.getLocalizedString(p[t.key]):p[t.key]}))}):ev(m,s[t.key],t,d,f,p,u,c,e,a,s,i):s[t.key].valuePath?ev(m,s[t.key],t,Jg.get(p,s[t.key].valuePath),f,p,u,c,e,a,s,i):Y.jsx(n.Typography,Q({},f,{children:"--- "}))}function nv(e,t,r){return e.map((function(e){return Y.jsxs(n.MenuItem,{onClick:function(){e.onClick(r,e.key),t()},sx:{color:e.color},children:[e.icon,e.title]},e.key)}))}function rv(t){var o=t.resources,a=t.resourceName,i=t.selected,s=t.bulkActionsDialogState,l=t.setBulkActionsDialogState,c=t.setSelected,u=e.useContext(Uh).dashbaordUrlPrefix,d=e.useContext(ng).paths,p=o[a].properties,f=p.actions,m=p.modelName,h=t.dialogState[1],g=t.gridState[1],v=hg(),A=v.setErrorAlert,b=v.setAlert,y=r.useNavigate();return o[a].properties.actions.extras&&o[a].properties.actions.extras.resource?Y.jsx(Y.Fragment,{children:Object.keys(o[a].properties.actions.extras.resource).map((function(e){var t,r,o,a,p;if(!f.extras.resource[e])return Y.jsx(Y.Fragment,{});var v=null!==(t=f.extras.resource[e].message)&&void 0!==t?t:"Action executed Successfully",x=null!==(r=f.extras.resource[e].severity)&&void 0!==r?r:"success";return Y.jsx(n.Button,{size:null!==(o=f.extras.resource[e].size)&&void 0!==o?o:"small",color:null!==(a=f.extras.resource[e].color)&&void 0!==a?a:"inherit",variant:null!==(p=f.extras.resource[e].variant)&&void 0!==p?p:"contained",startIcon:iv(f.extras.resource[e].icon),onClick:function(t){var n,r,o,a;if(!f.extras.resource[e].guard)switch(f.extras.resource[e].handlerStrategy){case xm.NORMAL:Bm.post("".concat(u,"/actions/execute/").concat(e),{record:i,modelName:m}).then((function(e){var t=e.data.data.response;t.action===Am.LIST?(g((function(e){return Q(Q({},e),{page:pv.page})})),b(v,x)):y(_g(t,d))})).catch((function(){A("Error happened")}));break;case xm.FILE_DOWNLOAD:Bm.post("".concat(u,"/actions/execute/").concat(e),{record:i,modelName:m}).then((function(e){var t=e.data.data.response;setTimeout((function(){window.open(t.filePath,"_blank")}))})).catch((function(){}));break;case xm.CUSTOM_COMPONENT:var p=null!==(n=f.extras.resource[e].fullScreen)&&void 0!==n&&n;!function(e,t,n,r,o,a,i,c,u){var d=Q({},s);d[e]={state:t,modelName:n,saveLoadingState:r,fullScreen:a,setSelected:o,documentIds:null!=u?u:[],afterExecuteMessage:i,severity:c},l(d)}(e,!0,m,!1,c,p,v,x,i);break;default:b(v,x)}h({title:null!==(o=null!==(r=f.extras.resource[e].guardTitle)&&void 0!==r?r:f.extras.resource[e].name)&&void 0!==o?o:"",message:null!==(a=f.extras.resource[e].guard)&&void 0!==a?a:"Do you want to execute this action?",onClose:function(){h({open:!1})},onConfirm:function(t){switch(h({open:!1}),c((function(e){return[]})),f.extras.resource[e].handlerStrategy){case xm.NORMAL:t.action===Am.LIST?(g((function(e){return Q(Q({},e),{page:pv.page})})),b(v,x)):y(_g(t,d));break;case xm.FILE_DOWNLOAD:t.filePath,setTimeout((function(){window.open(t.filePath,"_blank")}));break;default:b(v,x)}},action:function(){return Bm.post("".concat(u,"/actions/execute/").concat(e),{record:i,modelName:m})},open:f.extras.resource[e].guard})},sx:{mr:1},children:f.extras.resource[e].name},e)}))}):Y.jsx(Y.Fragment,{})}function ov(e,t){var n=e.split("."),r=n[0];if(1===n.length)return t[r];for(var o="",a=1;a<n.length;a++)o+=n[a],a!==n.length-1&&(o+=".");return ov(o,t[r].schema)}function av(e,t){var n=e.split("."),r=n[0];if(1===n.length)return t;for(var o="",a=1;a<n.length;a++)o+=n[a],a!==n.length-1&&(o+=".");return av(o,t[r])}var iv=function(e){return Y.jsx(Rm,{src:e,sx:{width:1,height:1}})};function sv(e,t,n,r,o,a){if(!r||!t||!r.hasOwnProperty(t.key)||null===r[t.key])return"---";switch(e.type){case ym.STRING:if(!r.hasOwnProperty(t.key)||null===r[t.key])return"---";break;case ym.DATE:return Fm(n,!(!a[t.key]||!a[t.key].withTime));case ym.LOCALIZEDString:var i=r[t.key]&&r[t.key][0]?Pm.getLocalizedString(r[t.key]):"----";return i||"---";case ym.NESTEDSCHEMA:return"Object {...}";case ym.ARRAY:return"Length ["+n.length+"]";case ym.REFERENCE:if(!r[t.key])break;var s=o[t.path];if(!s||!s.properties||!r[t.key])return n._id;var l=o[t.path].properties.title,c=Mm.checkLocalizedString(o,t.path,l)?Pm.getLocalizedString(r[t.key][l]):r[t.key][l];return s.properties.actions.show.isAccessible?n?c:"---- ":n?c:"---"}return n}function lv(e){var t,r=e.params,o=e.props,a=e.resourceName,i=e.extras,s=gg().paths,l=mg().resources;if(!l)return Y.jsx(Y.Fragment,{});var c=null===(t=l[a].properties.model[o.key])||void 0===t?void 0:t.isClickable,u=null==i?void 0:i.onClickProperty;return c?Y.jsx(n.Button,{sx:{padding:0},onClick:function(){return u&&u[o.key]?u[o.key](o,a,r):void 0},children:tv(a,o,r,l,s)}):tv(a,o,r,l,s)}var cv=1,uv=[5,10,25,50,100],dv={currentPage:1,perPage:5,recordsCount:0},pv={page:cv,perPage:5};function fv(e,t,n,r,o,a,i){var s=e.map((function(e){return{field:e.key,headerName:e.value,align:"center",headerAlign:"center",flex:e.flex?e.flex:a?1:void 0,minWidth:a?void 0:150,valueGetter:function(r){return function(e,t,n,r){var o=r[e].properties?r[e].properties.model:void 0,a=r[e].properties,i=a.title;a.actions;var s=n.value,l=n.row;if(t.key.includes(".")){var c=t.key.split("."),u={key:c[c.length-1],value:t.value,path:t.path},d=av(t.key,l);return sv(ov(t.key,o),u,d?d[u.key]:null,d,r,o)}return l.hasOwnProperty(t.key)&&null!==l[t.key]?t.key===i?o[t.key].type===ym.LOCALIZEDString?Pm.getLocalizedString(l[t.key]):l[t.key]:sv(o[t.key],t,s,l,r,o):"---"}(n,e,r,t)},renderCell:function(t){return e.renderCell?e.renderCell(t):Y.jsx(lv,{resourceName:n,params:t,props:e,extras:i})}}})),l={field:"actions",headerName:"",type:"number",editable:!1,align:"center",headerAlign:"left",disableColumnMenu:!0,flex:a?1:void 0,minWidth:a?void 0:150,hideable:!1,sortable:!1,disableExport:!0,renderCell:function(e){return Y.jsx($g,{resources:t,params:e,resourceName:n,dialogState:r,paramsState:o,extras:i})}};return!(null==i?void 0:i.hideActions)&&s.push(l),s}var mv=e.forwardRef((function(e,t){return Y.jsx(n.Slide,Q({direction:"up",ref:t},e))}));function hv(t){var r,o,a=t.open,i=t.onClose,s=t.title,c=t.onConfirm,u=t.message,d=t.action,p=t.extras,f=e.useState(!1),m=f[0],h=f[1];return Y.jsxs(n.Dialog,{open:a,fullWidth:!0,keepMounted:!0,onClose:function(e,t){"backdropClick"!==t&&i&&i()},"aria-describedby":"alert-dialog-slide-description",disableEscapeKeyDown:!0,TransitionComponent:mv,children:[Y.jsx(n.DialogTitle,{children:s}),Y.jsx(n.DialogContent,{children:Y.jsx(n.DialogContentText,{id:"alert-dialog-slide-description",children:u})}),Y.jsxs(n.DialogActions,{children:[Y.jsx(n.Button,{color:"inherit",onClick:i,disabled:m,children:null!==(r=null==p?void 0:p.cancelText)&&void 0!==r?r:"Cancel"}),Y.jsx(l.LoadingButton,{variant:"contained",onClick:function(){d&&(h(!0),d().then((function(e){var t=e.data.data?e.data.data.response:e.data.meta;h(!1),c&&c(t)})).catch((function(e){i&&i(),console.log(e)})))},loading:m,children:null!==(o=null==p?void 0:p.confirmText)&&void 0!==o?o:"Confirm"})]})]})}var gv=n.styled("div")((function(e){var t=e.theme;return{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%","& .ant-empty-img-1":{fill:"light"===t.palette.mode?"#aeb8c2":"#262626"},"& .ant-empty-img-2":{fill:"light"===t.palette.mode?"#f5f5f7":"#595959"},"& .ant-empty-img-3":{fill:"light"===t.palette.mode?"#dce0e6":"#434343"},"& .ant-empty-img-4":{fill:"light"===t.palette.mode?"#fff":"#1c1c1c"},"& .ant-empty-img-5":{fillOpacity:"light"===t.palette.mode?"0.8":"0.08",fill:"light"===t.palette.mode?"#f5f5f5":"#fff"}}}));function vv(e){var t=e.checkBox,r=e.numberOfColumns,o=F(e,["checkBox","numberOfColumns"]),a=Array.apply(null,Array(r)).map((function(e,t){return t}));return Y.jsx(n.TableRow,Q({},o,{children:Y.jsx(n.TableCell,{children:Y.jsxs(n.Stack,{spacing:2,gridRow:"auto",direction:"row",justifyContent:"space-around",width:920,children:[t&&Y.jsx(n.Skeleton,{variant:"rectangular",width:20,height:20,sx:{borderRadius:1,flexShrink:0}}),a.map((function(e){return Y.jsx(n.Skeleton,{variant:"text",width:150,height:20},e)}))]})})}))}var Av=n.styled("div")((function(e){var t=e.theme;return{right:24,zIndex:9,bottom:40,display:"flex",position:"fixed",alignItems:"center",boxShadow:t.customShadows.z20,padding:t.spacing(1.5,1,1.5,2),borderRadius:t.shape.borderRadius,backgroundColor:t.palette.text.primary}}));function bv(e){var t,r=e.action,o=e.selected;e.rowCount,e.numSelected;var a=e.extras;e.onSelectAllItems;var i=e.sx,s=F(e,["action","selected","rowCount","numSelected","extras","onSelectAllItems","sx"]);return Y.jsx(n.Portal,{children:Y.jsxs(Av,Q({sx:i},s,{children:[Y.jsxs(n.Typography,{variant:"subtitle2",sx:{mr:2,color:function(e){return"light"===e.palette.mode?"common.white":"grey.800"}},children:[o&&o.length,Y.jsx(n.Box,{component:"span",sx:{ml:.5},children:null!==(t=null==a?void 0:a.itemsSelectedText)&&void 0!==t?t:"items selected"})]}),r&&r]}))})}function yv(){return Y.jsxs(z.GridToolbarContainer,{sx:{mt:2},children:[Y.jsx(z.GridToolbarColumnsButton,{}),Y.jsx(z.GridToolbarFilterButton,{}),Y.jsx(z.GridToolbarDensitySelector,{}),Y.jsx(z.GridToolbarExport,{})]})}function xv(e,t,n){return Y.jsx(Y.Fragment,{children:[1,2].map((function(e){return function(e,t,n){return Y.jsx(vv,{sx:{height:72},checkBox:t,numberOfColumns:n},e)}(e,t,n)}))})}function wv(t){var o,a,i=this,s=t.resources,c=t.resourceName,u=t.paramsState,d=t.bulkActionsDialogState,p=t.extras,f=t.setBulkActionsDialogState,m=e.useContext(Uh).dashbaordUrlPrefix;e.useContext(ng).paths;var h=e.useState([]),g=(h[0],h[1]),v=e.useState([]),A=v[0],b=v[1],y=e.useState(!0),x=y[0],w=y[1],O=e.useState(dv),C=O[0],j=O[1],P=u[0],B=u[1],D=e.useState(!1),M=D[0],T=D[1],N=s[c];if(p&&p.overridenResource){var k=p.overridenResource(N);N=Q(Q({},N),k)}var E=N.properties.actions,L=e.useState([]),W=L[0],I=L[1],S=Vi("up","lg"),H=r.useSearchParams(),V=H[0],X=H[1];e.useContext(lg).defaultRowsPerPage;var R,F=hg().setSuccessAlert,U=e.useState({open:!1,title:"",onClose:function(){},onConfirm:function(){}}),K=fv(N.listProperties,s,c,U,u,S,p);return e.useEffect((function(){!function(e){G(i,void 0,void 0,(function(){return Z(this,(function(t){return w(!0),Bm.get("".concat(m,"/").concat(N.properties.path),{params:e}).then((function(e){var t=e.data.data,n=t.pageInfo,r=t.records;g((function(e){return 1===n.currentPage?q([],r,!0):q(q([],e,!0),r,!0)})),b(r),j(n),w(!1)})),[2]}))}))}(P)}),[P,c,s,m]),Y.jsxs(Y.Fragment,{children:[Y.jsx(z.DataGrid,Q({rows:x?[]:A,columns:K,initialState:{sorting:{sortModel:[{sort:P.order,field:null!==(o=P.orderBy)&&void 0!==o?o:"_id"}]}},pageSizeOptions:uv,rowCount:null==C?void 0:C.recordsCount,checkboxSelection:!(null==p?void 0:p.hideBulkActions)&&(E.bulkDelete.isAccessible||E.extras&&E.extras.resource&&Object.keys(E.extras.resource).length>0),disableRowSelectionOnClick:!0,loading:x,slots:{loadingOverlay:function(){return xv(0,E.bulkDelete.isAccessible,N.listProperties.length)},noRowsOverlay:function(){return e=null==p?void 0:p.noRowsText,Y.jsxs(gv,{children:[Y.jsx("svg",{width:"120",height:"100",viewBox:"0 0 184 152","aria-hidden":!0,focusable:"false",children:Y.jsxs("g",{fill:"none",fillRule:"evenodd",children:[Y.jsxs("g",{transform:"translate(24 31.67)",children:[Y.jsx("ellipse",{className:"ant-empty-img-5",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),Y.jsx("path",{className:"ant-empty-img-1",d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"}),Y.jsx("path",{className:"ant-empty-img-2",d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"}),Y.jsx("path",{className:"ant-empty-img-3",d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"})]}),Y.jsx("path",{className:"ant-empty-img-3",d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"}),Y.jsxs("g",{className:"ant-empty-img-4",transform:"translate(149.65 15.383)",children:[Y.jsx("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),Y.jsx("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"})]})]})}),Y.jsx(n.Box,{sx:{mt:1},children:null!=e?e:"No Rows"})]});var e},toolbar:(null==p?void 0:p.hideToolbar)?null:yv},density:(null==p?void 0:p.density)?p.density:"comfortable",editMode:"row"},(R="server",{paginationMode:R,sortingMode:R,filterMode:R}),{pagination:!0,onPaginationModelChange:function(e,t){e.page!==C.currentPage-1&&(!function(e,t,n,r,o){var a=o[0];o[1];var i=t[1],s=e+1;a.perPage,a.perPage,a.perPage,i((function(e){return Q(Q({},e),{page:s})}))}(e.page,u,0,0,[C,j]),V.set("page",(e.page+1).toString()),X(V)),C.perPage!==e.pageSize&&(!function(e,t,n,r){if(e!==r.perPage){var o=t[1];n([]),o((function(t){return Q(Q({},t),{page:cv,perPage:e})}))}}(e.pageSize,u,g,C),V.set("perPage",e.pageSize.toString()),V.set("page","1"),X(V))},paginationModel:{page:C.currentPage-1,pageSize:C.perPage},keepNonExistentRowsSelected:!0,onRowSelectionModelChange:function(e){I(e)},onSortModelChange:function(e){!function(e,t,n){var r=n[1],o=e.map((function(e){return{order:e.sort,orderBy:e.field}}))[0];t([]),r((function(e){return Q(Q(Q({},e),o),{page:cv})}))}(e,g,u)},autoHeight:!0,getRowId:function(e){return e._id},disableColumnFilter:!0,rowSelectionModel:W})),Y.jsx(hv,Q({},U[0],{extras:p})),W.length>0&&!(null==p?void 0:p.hideBulkActions)&&Y.jsx(bv,{numSelected:W.length,rowCount:A.length,selected:W.map((function(e){return e.toString()})),extras:p,action:Y.jsxs(Y.Fragment,{children:[E.bulkDelete.isAccessible&&Y.jsx(l.LoadingButton,{size:"small",loading:M,color:"error",variant:"contained",startIcon:Y.jsx(yo,{icon:"eva:trash-2-outline"}),onClick:function(){return G(i,void 0,void 0,(function(){return Z(this,(function(e){switch(e.label){case 0:return T(!0),[4,Bm.delete("".concat(m,"/").concat(N.properties.path,"/all"),{data:W}).then((function(){T(!1),F(p&&p.afterBulkDeleteSnackBarText?p.afterBulkDeleteSnackBarText(W.length):"".concat(W.length," records are deleted successfully")),B((function(e){return Q(Q({},e),{page:pv.page,filters:void 0})})),E.bulkDelete.reloadAfterAction&&window.location.reload(),I((function(e){return[]}))}))];case 1:return e.sent(),[2]}}))}))},sx:{mr:1},children:null!==(a=null==p?void 0:p.bulkDeleteText)&&void 0!==a?a:"Delete"}),Y.jsx(rv,{resources:s,resourceName:c,dialogState:U,gridState:u,selected:W,setSelected:I,bulkActionsDialogState:d,setBulkActionsDialogState:f})]})})]})}var zv={exports:{}};
|
|
124
|
+
r.version="2.29.4",o(Un),r.fn=ca,r.min=$n,r.max=er,r.now=tr,r.utc=m,r.unix=ua,r.months=va,r.isDate=d,r.locale=hn,r.invalid=A,r.duration=Br,r.isMoment=z,r.weekdays=ba,r.parseZone=da,r.localeData=An,r.isDuration=sr,r.monthsShort=Aa,r.weekdaysMin=xa,r.defineLocale=gn,r.updateLocale=vn,r.locales=bn,r.weekdaysShort=ya,r.normalizeUnits=re,r.relativeTimeRounding=oi,r.relativeTimeThreshold=ai,r.calendarFormat=Xr,r.prototype=ca,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()}(Lg);var Wg=W(Lg.exports);function Ig(e){var t=e.value;return Y.jsx(n.Typography,Q({style:{fontWeight:50},noWrap:!0},e,{children:Wg(new Date(t)).format("Do MMMM YYYY @ HH:MM")}))}function Sg(e){var t=e.value,r=e.enumvalues,o=r&&!r.includes(t)?"error":void 0,a=Kg.enhance(t);return Y.jsx(n.Chip,{label:a,color:o,size:"small"})}function Hg(e){var t=e.value;return Y.jsx(n.Typography,Q({},e,{noWrap:!0,children:t.longitude&&t.latitude?Y.jsx(n.Link,{align:"justify",style:{cursor:"pointer"},onClick:function(){return e=t.latitude,n=t.longitude,void window.open("https://maps.google.com?q="+e+","+n);var e,n},children:t.address}):Y.jsx(n.Typography,Q({style:{fontWeight:50}},e,{noWrap:!0,children:t.address}))}))}function Vg(e){var t=e.value,r=e.children;return F(e,["value","children"]),Y.jsx(n.Card,{sx:{py:3,px:3},children:Y.jsx(n.Grid,{children:t.map((function(e,t){return Y.jsxs(n.Grid,{item:!0,xs:12,sx:{mb:5},children:[Y.jsx(n.Typography,{color:"grey",fontSize:10,paragraph:!0,variant:"overline",sx:{color:"text.disabled"},children:"["+(t+1)+"]"}),r&&r(e,t)]},t)}))})})}function Xg(e){var t=e.navigateTo,o=e.value,a=r.useNavigate();return Y.jsx(n.Link,{align:"justify",style:{cursor:"pointer"},onClick:function(){return a(t)},children:o})}var Rg=require("pluralize");function Yg(e){var t,r=e.value,o=e.fieldkey,a=e.userpath,i=e.fieldschema,s=e.resources,l=e.path,c=null!=l?l:null==i?void 0:i.path,u=s[null!=c?c:""].properties,d=u.title,p=null===(t=u.actions.show)||void 0===t?void 0:t.isAccessible;function f(){return Mm.checkLocalizedString(s,null!=c?c:"",d)?Pm.getLocalizedString(r[d]):r[d]?r[d]:r._id?r._id:qg}return Y.jsx(n.Typography,Q({},e.props,{children:p?Y.jsx(Xg,{value:f(),navigateTo:a[c||Rg.singular(o)].show(r._id)}):Y.jsx(Ug,Q({type:ym.STRING},e,{value:f()}))}))}function Qg(e){var t,r,o,a=e.value,i=e.userpath,s=e.resources,l=e.path,c=e.fieldschema,u=s[null!==(t=null==c?void 0:c.path)&&void 0!==t?t:""].properties,d=null==u?void 0:u.title,p=null===(o=null===(r=null==u?void 0:u.actions)||void 0===r?void 0:r.show)||void 0===o?void 0:o.isAccessible;function f(){var e;return Mm.checkLocalizedString(s,null!==(e=null==c?void 0:c.path)&&void 0!==e?e:"",d)?Pm.getLocalizedString(a[d]):a[d]}if(a)return a.map((function(t){return Y.jsx(n.Typography,Q({},e.props,{children:p?Y.jsx(Xg,{value:f(),navigateTo:i[null!=l?l:""].show(t._id)}):Y.jsx(Ug,Q({type:ym.STRING},e,{value:f()}))}),t._id)}))}function Fg(e){var t=e.value,r=e.props;return null===t?Y.jsx(n.Typography,Q({},r,{children:qg})):"[object Array]"!==Object.prototype.toString.call(t)?Y.jsx(Yg,Q({},e)):t?Y.jsx(Qg,Q({},e)):Y.jsx(Y.Fragment,{})}function Gg(e){var t=e.htmlString;return Y.jsx("div",{children:Y.jsx(g,{value:t,readOnly:!0,theme:"bubble"})})}function Zg(e){var t=e.value;return Y.jsx(n.Card,{sx:{py:1,px:3},children:Y.jsx(Gg,{htmlString:t})})}var qg="---";function Ug(e){var t=e.value,r=e.fieldschema,o=e.type,a=e.enumvalues,i=e.children;if(null==t)return Y.jsx(n.Typography,Q({},e,{children:qg}));switch(o){case ym.STRING:case ym.NUMBER:case ym.OBJECTID:case ym.PHONENUMBER:case ym.TIMEPICKER:case ym.PASSWORD:return Y.jsx(n.Typography,Q({},e,{children:t}));case ym.NESTEDSCHEMA:return Y.jsx(Tg,Q({},e,{value:t,fieldschema:r}));case ym.LOCALIZEDString:return Y.jsx(Ng,{value:t});case ym.BOOLEAN:return Y.jsx(n.Chip,{label:t?t.toString():"false",variant:"outlined",size:"small"});case ym.COLOR:return Y.jsx(n.Typography,Q({},e,{color:t,children:t}));case ym.DATE:return Y.jsx(Ig,Q({},e));case ym.ENUM:return Y.jsx(Sg,Q({enumvalues:a},e));case ym.RICH_TEXT_I:return Y.jsx(Zg,Q({},e));case ym.LOCATION:return Y.jsx(Hg,Q({},e));case ym.IMAGE:return Y.jsx("img",{src:t,alt:"",height:70});case ym.ARRAY:return t&&t.length>0?Y.jsx(Vg,Q({},e,{value:t,children:i})):Y.jsx(n.Typography,Q({},e,{children:qg}));case ym.REFERENCE:return Y.jsx(Fg,Q({},e));default:return Y.jsx(Y.Fragment,{})}}var Kg=function(){function e(){}return e.enhance=function(e){var t=this;return e?e.includes("_")?e.split("_").map((function(e){return t.enhanceEnum(e)})).join(" "):this.enhanceEnum(e):qg},e.enhanceEnum=function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},e}(),Jg=require("lodash");function _g(e,t){var n,r,o,a,i,s,l,c,u,d,p=e.action,f=e.path,m=e.recordId;switch(p){case Am.LIST:return null!==(r=null===(n=t[f])||void 0===n?void 0:n.list)&&void 0!==r?r:f;case Am.NEW:return null!==(a=null===(o=t[f])||void 0===o?void 0:o.new)&&void 0!==a?a:f;case Am.SHOW:return null!==(s=null===(i=t[f])||void 0===i?void 0:i.show(m))&&void 0!==s?s:f;case Am.EDIT:return null!==(c=null===(l=t[f])||void 0===l?void 0:l.edit(m))&&void 0!==c?c:f;default:return null!==(d=null===(u=t[f])||void 0===u?void 0:u.list)&&void 0!==d?d:f}}function $g(t){var n=t.resourceName,o=t.params,a=t.resources,i=t.dialogState,s=t.paramsState,l=t.extras;s[0];var c=s[1],u=e.useContext(Uh).dashbaordUrlPrefix,d=e.useContext(ng).paths,p=hg(),f=p.setSuccessAlert,m=p.setErrorAlert,h=p.setAlert,g=e.useState(null),v=g[0],A=g[1],b=function(){A(null)},y=o.row,x=a[n].properties,w=x.actions,z=x.modelName,O=i[1],C=[],j=r.useNavigate();return w.delete.isAccessible&&C.push({onClick:function(e){O({title:w?w.delete.confirmationMessageTitle:"",message:w?w.delete.confirmationMessageBody:"",onClose:function(){O({open:!1})},onConfirm:function(){var e;O({open:!1}),f(null!==(e=null==l?void 0:l.afterDeleteSnackBarText)&&void 0!==e?e:"Deleted successfully"),c((function(e){return Q(Q({},e),{filters:void 0,filter:void 0})}))},action:function(){return Bm.delete("".concat(u,"/").concat(a[n].properties.path,"/").concat(e._id))},open:!0})},title:w.delete.value,icon:Y.jsx(yo,{icon:"eva:trash-2-outline"}),key:"delete",color:"error.main"}),w.edit.isAccessible&&C.push({onClick:function(e){j(d[n].edit(e._id))},title:w.edit.value,icon:Y.jsx(yo,{icon:"eva:edit-fill"}),key:"edit",color:"black"}),w.show.isAccessible&&C.push({onClick:function(e){j(d[n].show(e._id))},title:w.show.value,icon:Y.jsx(yo,{icon:"mdi:show-outline"}),key:"show",color:"black"}),y.extraActionKeys&&w.extras&&0!==y.extraActionKeys.length&&y.extraActionKeys.forEach((function(e){var t;w.extras.record[e]&&C.push({onClick:function(t){var n,r,o;w.extras.record[e].guard||Bm.post("".concat(u,"/actions/execute/").concat(e),{record:t,modelName:z}).then((function(t){var n,r,o=t.data.data.response;if(w.extras.record[e].handlerStrategy===xm.FILE_DOWNLOAD){var a=o.filePath;setTimeout((function(){window.open(a,"_blank")}))}else j(_g(o,d)),h(null!==(n=w.extras.record[e].message)&&void 0!==n?n:"Action executed Successfully",null!==(r=w.extras.record[e].severity)&&void 0!==r?r:"success")})).catch((function(){m("Error happened")})),O({title:null!==(r=null!==(n=w.extras.record[e].guardTitle)&&void 0!==n?n:w.extras.record[e].name)&&void 0!==r?r:"",message:null!==(o=w.extras.record[e].guard)&&void 0!==o?o:"Do you want to execute this action?",onClose:function(){O({open:!1})},onConfirm:function(t){var n,r,o,a;switch(O({open:!1}),w.extras.record[e].handlerStrategy){case xm.NORMAL:t.action===Am.LIST?(c((function(e){return Q(Q({},e),{page:pv.page})})),h(null!==(n=w.extras.record[e].message)&&void 0!==n?n:"Action executed Successfully",null!==(r=w.extras.record[e].severity)&&void 0!==r?r:"success")):j(_g(t,d));break;case xm.FILE_DOWNLOAD:var i=t.filePath;setTimeout((function(){window.open(i,"_blank")}));break;default:h(null!==(o=w.extras.record[e].message)&&void 0!==o?o:"Action executed Successfully",null!==(a=w.extras.record[e].severity)&&void 0!==a?a:"success")}},action:function(){return Bm.post("".concat(u,"/actions/execute/").concat(e),{record:t,modelName:z})},open:w.extras.record[e].guard})},title:w.extras.record[e].name,icon:iv(w.extras.record[e].icon),key:w.extras.record[e].name,color:null!==(t=w.extras.record[e].color)&&void 0!==t?t:"black"})})),Y.jsx(ig,{open:v,onOpen:function(e){A(e.currentTarget)},onClose:b,actions:nv(C,b,y)})}function ev(e,t,o,a,i,s,l,c,u,d,p,f){if(!(s&&s.hasOwnProperty(o.key)&&null!==s[o.key]||t.valuePath))return Y.jsx(n.Typography,Q({},i,{children:"--- "}));switch(t.type){case ym.STRING:if(/^#[0-9A-F]{6}$/i.test(a)){i.color=a,i.variant="body2";break}if(!s||!s.hasOwnProperty(o.key)||null===s[o.key]){e="---",i.variant="subtitle2";break}o.key===c&&l&&l.show.isAccessible&&(e=Y.jsx(n.Link,{align:"justify",component:r.Link,to:f[u].show(s._id),children:a}));break;case ym.OBJECTID:if(o.key===c&&l&&l.show.isAccessible){e=Y.jsx(n.Link,{align:"justify",component:r.Link,to:f[u].show(s._id),children:a});break}i.variant="subtitle2";break;case ym.NUMBER:case ym.PHONENUMBER:i.variant="subtitle2";break;case ym.DATE:var m=!(!p[o.key]||!p[o.key].withTime);i.variant="subtitle2",e=Fm(s[o.key],m);break;case ym.LOCALIZEDString:var h=s[o.key]&&s[o.key][0]?Pm.getLocalizedString(s[o.key]):"----";e=o.key===c&&l&&l.show.isAccessible?Y.jsx(n.Link,{align:"justify",component:r.Link,to:f[u].show(s._id),children:h}):h,i.variant="subtitle2";break;case ym.ENUM:return Y.jsx(n.Chip,{label:Kg.enhance(a),size:"small"});case ym.IMAGE:var g=ih(a);return Y.jsx("img",{src:"image"===g?a:sh(g),alt:a,height:80});case ym.BOOLEAN:return Y.jsx(n.Chip,{label:"".concat(a),variant:"outlined",size:"small",component:"div"});case ym.NESTEDSCHEMA:i.variant="caption",i.color="GrayText",e="Object {...}";break;case ym.RICH_TEXT_I:case ym.RICH_TEXT_II:i.variant="caption",i.color="GrayText",e="<HTML... />";break;case ym.ARRAY:i.variant="caption",i.color="GrayText",e="Length ["+s[o.key].length+"]";break;case ym.REFERENCE:if(!s[o.key])break;var v=s[o.key].pathOfTable?s[o.key].pathOfTable:o.path,A=d[v];if(!(A&&A.properties&&s[o.key]&&v)){i.variant="subtitle2",e=a._id;break}var b=A.properties.title,y=Mm.checkLocalizedString(d,v,b)?Pm.getLocalizedString(s[o.key][b]):s[o.key][b]?s[o.key][b]:s[o.key]._id;if(!A.properties.actions.show.isAccessible){e=a?y:s[o.key]?s[o.key]._id:"---";break}e=Y.jsx(n.Link,{align:"justify",href:f[v||o.key.toLowerCase()].show(a||s[o.key]&&s[o.key]._id?s[o.key]._id:""),children:a||s[o.key]._id?y:"---- "})}return Y.jsx(n.Typography,Q({},i,{children:e}))}function tv(e,t,o,a,i){var s=a[e].properties?a[e].properties.model:void 0,l=a[e].properties,c=l.title,u=l.actions,d=o.value,p=o.row,f={color:"black",noWrap:!1,sx:{fontWeight:50,wordWrap:"break-word",whiteSpace:"normal"},variant:"body1"},m=d;if(t.key.includes(".")){var h=t.key.split("."),g={key:h[h.length-1],value:t.value,path:t.path},v=av(t.key,p),A=ov(t.key,s),b=v?v[g.key]:null;return ev(b,A,g,b,f,v,u,c,e,a,s,i)}return p.hasOwnProperty(t.key)&&null!==p[t.key]?t.key===c?Y.jsx(n.Typography,{variant:"body2",color:"black",noWrap:!0,children:u.show.isAccessible?Y.jsx(n.Link,{align:"justify",component:r.Link,to:i[e].show(p._id),style:{cursor:"pointer"},children:s[t.key].type===ym.LOCALIZEDString?p[t.key][0]?Pm.getLocalizedString(p[t.key]):"---":"object"==typeof p[t.key]?Pm.getLocalizedString(p[t.key]):p[t.key]}):Y.jsx(n.Typography,Q({},f,{children:s[t.key].type===ym.LOCALIZEDString?Pm.getLocalizedString(p[t.key]):p[t.key]}))}):ev(m,s[t.key],t,d,f,p,u,c,e,a,s,i):s[t.key].valuePath?ev(m,s[t.key],t,Jg.get(p,s[t.key].valuePath),f,p,u,c,e,a,s,i):Y.jsx(n.Typography,Q({},f,{children:"--- "}))}function nv(e,t,r){return e.map((function(e){return Y.jsxs(n.MenuItem,{onClick:function(){e.onClick(r,e.key),t()},sx:{color:e.color},children:[e.icon,e.title]},e.key)}))}function rv(t){var o=t.resources,a=t.resourceName,i=t.selected,s=t.bulkActionsDialogState,l=t.setBulkActionsDialogState,c=t.setSelected,u=e.useContext(Uh).dashbaordUrlPrefix,d=e.useContext(ng).paths,p=o[a].properties,f=p.actions,m=p.modelName,h=t.dialogState[1],g=t.gridState[1],v=hg(),A=v.setErrorAlert,b=v.setAlert,y=r.useNavigate();return o[a].properties.actions.extras&&o[a].properties.actions.extras.resource?Y.jsx(Y.Fragment,{children:Object.keys(o[a].properties.actions.extras.resource).map((function(e){var t,r,o,a,p;if(!f.extras.resource[e])return Y.jsx(Y.Fragment,{});var v=null!==(t=f.extras.resource[e].message)&&void 0!==t?t:"Action executed Successfully",x=null!==(r=f.extras.resource[e].severity)&&void 0!==r?r:"success";return Y.jsx(n.Button,{size:null!==(o=f.extras.resource[e].size)&&void 0!==o?o:"small",color:null!==(a=f.extras.resource[e].color)&&void 0!==a?a:"inherit",variant:null!==(p=f.extras.resource[e].variant)&&void 0!==p?p:"contained",startIcon:iv(f.extras.resource[e].icon),onClick:function(t){var n,r,o,a;if(!f.extras.resource[e].guard)switch(f.extras.resource[e].handlerStrategy){case xm.NORMAL:Bm.post("".concat(u,"/actions/execute/").concat(e),{record:i,modelName:m}).then((function(e){var t=e.data.data.response;t.action===Am.LIST?(g((function(e){return Q(Q({},e),{page:pv.page})})),b(v,x)):y(_g(t,d))})).catch((function(){A("Error happened")}));break;case xm.FILE_DOWNLOAD:Bm.post("".concat(u,"/actions/execute/").concat(e),{record:i,modelName:m}).then((function(e){var t=e.data.data.response;setTimeout((function(){window.open(t.filePath,"_blank")}))})).catch((function(){}));break;case xm.CUSTOM_COMPONENT:var p=null!==(n=f.extras.resource[e].fullScreen)&&void 0!==n&&n;!function(e,t,n,r,o,a,i,c,u){var d=Q({},s);d[e]={state:t,modelName:n,saveLoadingState:r,fullScreen:a,setSelected:o,documentIds:null!=u?u:[],afterExecuteMessage:i,severity:c},l(d)}(e,!0,m,!1,c,p,v,x,i);break;default:b(v,x)}h({title:null!==(o=null!==(r=f.extras.resource[e].guardTitle)&&void 0!==r?r:f.extras.resource[e].name)&&void 0!==o?o:"",message:null!==(a=f.extras.resource[e].guard)&&void 0!==a?a:"Do you want to execute this action?",onClose:function(){h({open:!1})},onConfirm:function(t){switch(h({open:!1}),c((function(e){return[]})),f.extras.resource[e].handlerStrategy){case xm.NORMAL:t.action===Am.LIST?(g((function(e){return Q(Q({},e),{page:pv.page})})),b(v,x)):y(_g(t,d));break;case xm.FILE_DOWNLOAD:t.filePath,setTimeout((function(){window.open(t.filePath,"_blank")}));break;default:b(v,x)}},action:function(){return Bm.post("".concat(u,"/actions/execute/").concat(e),{record:i,modelName:m})},open:f.extras.resource[e].guard})},sx:{mr:1},children:f.extras.resource[e].name},e)}))}):Y.jsx(Y.Fragment,{})}function ov(e,t){var n=e.split("."),r=n[0];if(1===n.length)return t[r];for(var o="",a=1;a<n.length;a++)o+=n[a],a!==n.length-1&&(o+=".");return ov(o,t[r].schema)}function av(e,t){var n=e.split("."),r=n[0];if(1===n.length)return t;for(var o="",a=1;a<n.length;a++)o+=n[a],a!==n.length-1&&(o+=".");return av(o,t[r])}var iv=function(e){return Y.jsx(Rm,{src:e,sx:{width:1,height:1}})};function sv(e,t,n,r,o,a){if(!r||!t||!r.hasOwnProperty(t.key)||null===r[t.key])return"---";switch(e.type){case ym.STRING:if(!r.hasOwnProperty(t.key)||null===r[t.key])return"---";break;case ym.DATE:return Fm(n,!(!a[t.key]||!a[t.key].withTime));case ym.LOCALIZEDString:var i=r[t.key]&&r[t.key][0]?Pm.getLocalizedString(r[t.key]):"----";return i||"---";case ym.NESTEDSCHEMA:return"Object {...}";case ym.ARRAY:return"Length ["+n.length+"]";case ym.REFERENCE:if(!r[t.key])break;var s=o[t.path];if(!s||!s.properties||!r[t.key])return n._id;var l=o[t.path].properties.title,c=Mm.checkLocalizedString(o,t.path,l)?Pm.getLocalizedString(r[t.key][l]):r[t.key][l];return s.properties.actions.show.isAccessible?n?c:"---- ":n?c:"---"}return n}function lv(e){var t,r=e.params,o=e.props,a=e.resourceName,i=e.extras,s=gg().paths,l=mg().resources;if(!l)return Y.jsx(Y.Fragment,{});var c=null===(t=l[a].properties.model[o.key])||void 0===t?void 0:t.isClickable,u=null==i?void 0:i.onClickProperty;return c?Y.jsx(n.Button,{sx:{padding:0},onClick:function(){return u&&u[o.key]?u[o.key](o,a,r):void 0},children:tv(a,o,r,l,s)}):tv(a,o,r,l,s)}var cv=1,uv=[5,10,25,50,100],dv={currentPage:1,perPage:5,recordsCount:0},pv={page:cv,perPage:5};function fv(e,t,n,r,o,a,i){var s=e.map((function(e){return{field:e.key,headerName:e.value,align:"center",headerAlign:"center",flex:e.flex?e.flex:a?1:void 0,minWidth:a?void 0:150,valueGetter:function(r){return function(e,t,n,r){var o=r[e].properties?r[e].properties.model:void 0,a=r[e].properties,i=a.title;a.actions;var s=n.value,l=n.row;if(t.key.includes(".")){var c=t.key.split("."),u={key:c[c.length-1],value:t.value,path:t.path},d=av(t.key,l);return sv(ov(t.key,o),u,d?d[u.key]:null,d,r,o)}return l.hasOwnProperty(t.key)&&null!==l[t.key]?t.key===i?o[t.key].type===ym.LOCALIZEDString?Pm.getLocalizedString(l[t.key]):l[t.key]:sv(o[t.key],t,s,l,r,o):"---"}(n,e,r,t)},renderCell:function(t){return e.renderCell?e.renderCell(t):Y.jsx(lv,{resourceName:n,params:t,props:e,extras:i})}}})),l={field:"actions",headerName:"",type:"number",editable:!1,align:"center",headerAlign:"left",disableColumnMenu:!0,flex:a?1:void 0,minWidth:a?void 0:150,hideable:!1,sortable:!1,disableExport:!0,renderCell:function(e){return Y.jsx($g,{resources:t,params:e,resourceName:n,dialogState:r,paramsState:o,extras:i})}};return!(null==i?void 0:i.hideActions)&&s.push(l),s}var mv=e.forwardRef((function(e,t){return Y.jsx(n.Slide,Q({direction:"up",ref:t},e))}));function hv(t){var r,o,a=t.open,i=t.onClose,s=t.title,c=t.onConfirm,u=t.message,d=t.action,p=t.extras,f=e.useState(!1),m=f[0],h=f[1];return Y.jsxs(n.Dialog,{open:a,fullWidth:!0,keepMounted:!0,onClose:function(e,t){"backdropClick"!==t&&i&&i()},"aria-describedby":"alert-dialog-slide-description",disableEscapeKeyDown:!0,TransitionComponent:mv,children:[Y.jsx(n.DialogTitle,{children:s}),Y.jsx(n.DialogContent,{children:Y.jsx(n.DialogContentText,{id:"alert-dialog-slide-description",children:u})}),Y.jsxs(n.DialogActions,{children:[Y.jsx(n.Button,{color:"inherit",onClick:i,disabled:m,children:null!==(r=null==p?void 0:p.cancelText)&&void 0!==r?r:"Cancel"}),Y.jsx(l.LoadingButton,{variant:"contained",onClick:function(){d&&(h(!0),d().then((function(e){var t=e.data.data?e.data.data.response:e.data.meta;h(!1),c&&c(t)})).catch((function(e){i&&i(),console.log(e)})))},loading:m,children:null!==(o=null==p?void 0:p.confirmText)&&void 0!==o?o:"Confirm"})]})]})}var gv=n.styled("div")((function(e){var t=e.theme;return{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%","& .ant-empty-img-1":{fill:"light"===t.palette.mode?"#aeb8c2":"#262626"},"& .ant-empty-img-2":{fill:"light"===t.palette.mode?"#f5f5f7":"#595959"},"& .ant-empty-img-3":{fill:"light"===t.palette.mode?"#dce0e6":"#434343"},"& .ant-empty-img-4":{fill:"light"===t.palette.mode?"#fff":"#1c1c1c"},"& .ant-empty-img-5":{fillOpacity:"light"===t.palette.mode?"0.8":"0.08",fill:"light"===t.palette.mode?"#f5f5f5":"#fff"}}}));function vv(e){var t=e.checkBox,r=e.numberOfColumns,o=F(e,["checkBox","numberOfColumns"]),a=Array.apply(null,Array(r)).map((function(e,t){return t}));return Y.jsx(n.TableRow,Q({},o,{children:Y.jsx(n.TableCell,{children:Y.jsxs(n.Stack,{spacing:2,gridRow:"auto",direction:"row",justifyContent:"space-around",width:920,children:[t&&Y.jsx(n.Skeleton,{variant:"rectangular",width:20,height:20,sx:{borderRadius:1,flexShrink:0}}),a.map((function(e){return Y.jsx(n.Skeleton,{variant:"text",width:150,height:20},e)}))]})})}))}var Av=n.styled("div")((function(e){var t=e.theme;return{right:24,zIndex:9,bottom:40,display:"flex",position:"fixed",alignItems:"center",boxShadow:t.customShadows.z20,padding:t.spacing(1.5,1,1.5,2),borderRadius:t.shape.borderRadius,backgroundColor:t.palette.text.primary}}));function bv(e){var t,r=e.action,o=e.selected;e.rowCount,e.numSelected;var a=e.extras;e.onSelectAllItems;var i=e.sx,s=F(e,["action","selected","rowCount","numSelected","extras","onSelectAllItems","sx"]);return Y.jsx(n.Portal,{children:Y.jsxs(Av,Q({sx:i},s,{children:[Y.jsxs(n.Typography,{variant:"subtitle2",sx:{mr:2,color:function(e){return"light"===e.palette.mode?"common.white":"grey.800"}},children:[o&&o.length,Y.jsx(n.Box,{component:"span",sx:{ml:.5},children:null!==(t=null==a?void 0:a.itemsSelectedText)&&void 0!==t?t:"items selected"})]}),r&&r]}))})}function yv(){return Y.jsxs(z.GridToolbarContainer,{sx:{mt:2},children:[Y.jsx(z.GridToolbarColumnsButton,{}),Y.jsx(z.GridToolbarFilterButton,{}),Y.jsx(z.GridToolbarDensitySelector,{}),Y.jsx(z.GridToolbarExport,{})]})}function xv(e,t,n){return Y.jsx(Y.Fragment,{children:[1,2].map((function(e){return function(e,t,n){return Y.jsx(vv,{sx:{height:72},checkBox:t,numberOfColumns:n},e)}(e,t,n)}))})}function wv(t){var o,a,i=this,s=t.resources,c=t.resourceName,u=t.paramsState,d=t.bulkActionsDialogState,p=t.extras,f=t.setBulkActionsDialogState,m=e.useContext(Uh).dashbaordUrlPrefix;e.useContext(ng).paths;var h=e.useState([]),g=(h[0],h[1]),v=e.useState([]),A=v[0],b=v[1],y=e.useState(!0),x=y[0],w=y[1],O=e.useState(dv),C=O[0],j=O[1],P=u[0],B=u[1],D=e.useState(!1),M=D[0],T=D[1],N=s[c];if(p&&p.overridenResource){var k=p.overridenResource(N);N=Q(Q({},N),k)}var E=N.properties.actions,L=e.useState([]),W=L[0],I=L[1],S=Vi("up","lg"),H=r.useSearchParams(),V=H[0],X=H[1];e.useContext(lg).defaultRowsPerPage;var R,F=hg().setSuccessAlert,U=e.useState({open:!1,title:"",onClose:function(){},onConfirm:function(){}}),K=fv(N.listProperties,s,c,U,u,S,p);return e.useEffect((function(){!function(e){G(i,void 0,void 0,(function(){return Z(this,(function(t){return w(!0),Bm.get("".concat(m,"/").concat(N.properties.path),{params:e}).then((function(e){var t=e.data.data,n=t.pageInfo,r=t.records;g((function(e){return 1===n.currentPage?q([],r,!0):q(q([],e,!0),r,!0)})),b(r),j(n),w(!1)})),[2]}))}))}(P)}),[P,c,s,m]),Y.jsxs(Y.Fragment,{children:[Y.jsx(z.DataGrid,Q({rows:x?[]:A,columns:K,initialState:{sorting:{sortModel:[{sort:P.order,field:null!==(o=P.orderBy)&&void 0!==o?o:"_id"}]}},pageSizeOptions:uv,rowCount:null==C?void 0:C.recordsCount,checkboxSelection:!(null==p?void 0:p.hideBulkActions)&&(E.bulkDelete.isAccessible||E.extras&&E.extras.resource&&Object.keys(E.extras.resource).length>0),disableRowSelectionOnClick:!0,loading:x,slots:{loadingOverlay:function(){return xv(0,E.bulkDelete.isAccessible,N.listProperties.length)},noRowsOverlay:function(){return e=null==p?void 0:p.noRowsText,Y.jsxs(gv,{children:[Y.jsx("svg",{width:"120",height:"100",viewBox:"0 0 184 152","aria-hidden":!0,focusable:"false",children:Y.jsxs("g",{fill:"none",fillRule:"evenodd",children:[Y.jsxs("g",{transform:"translate(24 31.67)",children:[Y.jsx("ellipse",{className:"ant-empty-img-5",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),Y.jsx("path",{className:"ant-empty-img-1",d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"}),Y.jsx("path",{className:"ant-empty-img-2",d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"}),Y.jsx("path",{className:"ant-empty-img-3",d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"})]}),Y.jsx("path",{className:"ant-empty-img-3",d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"}),Y.jsxs("g",{className:"ant-empty-img-4",transform:"translate(149.65 15.383)",children:[Y.jsx("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),Y.jsx("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"})]})]})}),Y.jsx(n.Box,{sx:{mt:1},children:null!=e?e:"No Rows"})]});var e},toolbar:(null==p?void 0:p.hideToolbar)?null:yv},density:(null==p?void 0:p.density)?p.density:"comfortable",editMode:"row"},(R="server",{paginationMode:R,sortingMode:R,filterMode:R}),{pagination:!0,onPaginationModelChange:function(e,t){e.page!==C.currentPage-1&&(!function(e,t,n,r,o){var a=o[0];o[1];var i=t[1],s=e+1;a.perPage,a.perPage,a.perPage,i((function(e){return Q(Q({},e),{page:s})}))}(e.page,u,0,0,[C,j]),V.set("page",(e.page+1).toString()),X(V)),C.perPage!==e.pageSize&&(!function(e,t,n,r){if(e!==r.perPage){var o=t[1];n([]),o((function(t){return Q(Q({},t),{page:cv,perPage:e})}))}}(e.pageSize,u,g,C),V.set("perPage",e.pageSize.toString()),V.set("page","1"),X(V))},paginationModel:{page:C.currentPage-1,pageSize:C.perPage},keepNonExistentRowsSelected:!0,onRowSelectionModelChange:function(e){I(e)},onSortModelChange:function(e){!function(e,t,n){var r=n[1],o=e.map((function(e){return{order:e.sort,orderBy:e.field}}))[0];t([]),r((function(e){return Q(Q(Q({},e),o),{page:cv})}))}(e,g,u)},autoHeight:!0,getRowId:function(e){return e._id},disableColumnFilter:!0,rowSelectionModel:W})),Y.jsx(hv,Q({},U[0],{extras:p})),W.length>0&&!(null==p?void 0:p.hideBulkActions)&&Y.jsx(bv,{numSelected:W.length,rowCount:A.length,selected:W.map((function(e){return e.toString()})),extras:p,action:Y.jsxs(Y.Fragment,{children:[E.bulkDelete.isAccessible&&Y.jsx(l.LoadingButton,{size:"small",loading:M,color:"error",variant:"contained",startIcon:Y.jsx(yo,{icon:"eva:trash-2-outline"}),onClick:function(){return G(i,void 0,void 0,(function(){return Z(this,(function(e){switch(e.label){case 0:return T(!0),[4,Bm.delete("".concat(m,"/").concat(N.properties.path,"/all"),{data:W}).then((function(){T(!1),F(p&&p.afterBulkDeleteSnackBarText?p.afterBulkDeleteSnackBarText(W.length):"".concat(W.length," records are deleted successfully")),B((function(e){return Q(Q({},e),{page:pv.page,filters:void 0})})),E.bulkDelete.reloadAfterAction&&window.location.reload(),I((function(e){return[]}))}))];case 1:return e.sent(),[2]}}))}))},sx:{mr:1},children:null!==(a=null==p?void 0:p.bulkDeleteText)&&void 0!==a?a:"Delete"}),Y.jsx(rv,{resources:s,resourceName:c,dialogState:U,gridState:u,selected:W,setSelected:I,bulkActionsDialogState:d,setBulkActionsDialogState:f})]})})]})}var zv={exports:{}};
|
|
125
125
|
/**
|
|
126
126
|
* @license
|
|
127
127
|
* Lodash <https://lodash.com/>
|