@ukpc-lib/react 0.3.20 → 0.3.21

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.
@@ -106,4 +106,4 @@ const theme2 = createTheme({ palette: {
106
106
  primary: { main: green[500] },
107
107
  } });`:Ue(12,u?` (${u})`:"",JSON.stringify(l.main)));return qr(l,"light",_,n),qr(l,"dark",S,n),l.contrastText||(l.contrastText=m(l.main)),l},b={dark:zt,light:Ur};return process.env.NODE_ENV!=="production"&&(b[t]||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),le(p._extends({common:p._extends({},Ke),mode:t,primary:y({color:i,name:"primary"}),secondary:y({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:y({color:c,name:"error"}),warning:y({color:h,name:"warning"}),info:y({color:d,name:"info"}),success:y({color:f,name:"success"}),grey:Os,contrastThreshold:r,getContrastText:m,augmentColor:y,tonalOffset:n},b[t]),o)}const Bs=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Ws(e){return Math.round(e*1e5)/1e5}const Yr={textTransform:"uppercase"},Gr='"Roboto", "Helvetica", "Arial", sans-serif';function Us(e,t){const r=typeof t=="function"?t(e):t,{fontFamily:n=Gr,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:c=500,fontWeightBold:d=700,htmlFontSize:f=16,allVariants:h,pxToRem:m}=r,y=p._objectWithoutPropertiesLoose(r,Bs);process.env.NODE_ENV!=="production"&&(typeof o!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof f!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const b=o/14,v=m||(x=>`${x/f*b}rem`),l=(x,_,S,C,g)=>p._extends({fontFamily:n,fontWeight:x,fontSize:v(_),lineHeight:S},n===Gr?{letterSpacing:`${Ws(C/_)}em`}:{},g,h),u={h1:l(i,96,1.167,-1.5),h2:l(i,60,1.2,-.5),h3:l(a,48,1.167,0),h4:l(a,34,1.235,.25),h5:l(a,24,1.334,0),h6:l(c,20,1.6,.15),subtitle1:l(a,16,1.75,.15),subtitle2:l(c,14,1.57,.1),body1:l(a,16,1.5,.15),body2:l(a,14,1.43,.15),button:l(c,14,1.75,.4,Yr),caption:l(a,12,1.66,.4),overline:l(a,12,2.66,1,Yr),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return le(p._extends({htmlFontSize:f,pxToRem:v,fontFamily:n,fontSize:o,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:c,fontWeightBold:d},u),y,{clone:!1})}const qs=.2,Ys=.14,Gs=.12;function F(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${qs})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Ys})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Gs})`].join(",")}const Ks=["none",F(0,2,1,-1,0,1,1,0,0,1,3,0),F(0,3,1,-2,0,2,2,0,0,1,5,0),F(0,3,3,-2,0,3,4,0,0,1,8,0),F(0,2,4,-1,0,4,5,0,0,1,10,0),F(0,3,5,-1,0,5,8,0,0,1,14,0),F(0,3,5,-1,0,6,10,0,0,1,18,0),F(0,4,5,-2,0,7,10,1,0,2,16,1),F(0,5,5,-3,0,8,10,1,0,3,14,2),F(0,5,6,-3,0,9,12,1,0,3,16,2),F(0,6,6,-3,0,10,14,1,0,4,18,3),F(0,6,7,-4,0,11,15,1,0,4,20,3),F(0,7,8,-4,0,12,17,2,0,5,22,4),F(0,7,8,-4,0,13,19,2,0,5,24,4),F(0,7,9,-4,0,14,21,2,0,5,26,4),F(0,8,9,-5,0,15,22,2,0,6,28,5),F(0,8,10,-5,0,16,24,2,0,6,30,5),F(0,8,11,-5,0,17,26,2,0,6,32,5),F(0,9,11,-5,0,18,28,2,0,7,34,6),F(0,9,12,-6,0,19,29,2,0,7,36,6),F(0,10,13,-6,0,20,31,3,0,8,38,7),F(0,10,13,-6,0,21,33,3,0,8,40,7),F(0,10,14,-6,0,22,35,3,0,8,42,7),F(0,11,14,-7,0,23,36,3,0,9,44,8),F(0,11,15,-7,0,24,38,3,0,9,46,8)],Zs=Ks,Xs=["duration","easing","delay"],Js={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Qs={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Kr(e){return`${Math.round(e)}ms`}function e0(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function t0(e){const t=p._extends({},Js,e.easing),r=p._extends({},Qs,e.duration),n=(o=["all"],i={})=>{const{duration:a=r.standard,easing:c=t.easeInOut,delay:d=0}=i,f=p._objectWithoutPropertiesLoose(i,Xs);if(process.env.NODE_ENV!=="production"){const h=y=>typeof y=="string",m=y=>!isNaN(parseFloat(y));!h(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!m(a)&&!h(a)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${a}.`),h(c)||console.error('MUI: Argument "easing" must be a string.'),!m(d)&&!h(d)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof i!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
108
108
  `)),Object.keys(f).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(f).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(h=>`${h} ${typeof a=="string"?a:Kr(a)} ${c} ${typeof d=="string"?d:Kr(d)}`).join(",")};return p._extends({getAutoHeightDuration:e0,create:n},e,{easing:t,duration:r})}const r0={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},n0=r0,o0=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function i0(e={},...t){const{mixins:r={},palette:n={},transitions:o={},typography:i={}}=e,a=p._objectWithoutPropertiesLoose(e,o0);if(e.vars)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name.":Ue(18));const c=Hs(n),d=tr(e);let f=le(d,{mixins:ds(d.breakpoints,r),palette:c,shadows:Zs.slice(),typography:Us(c,i),transitions:t0(o),zIndex:p._extends({},n0)});if(f=le(f,a),f=t.reduce((h,m)=>le(h,m),f),process.env.NODE_ENV!=="production"){const h=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],m=(y,b)=>{let v;for(v in y){const l=y[v];if(h.indexOf(v)!==-1&&Object.keys(l).length>0){if(process.env.NODE_ENV!=="production"){const u=Xt("",v);console.error([`MUI: The \`${b}\` component increases the CSS specificity of the \`${v}\` internal state.`,"You can not override it like this: ",JSON.stringify(y,null,2),"",`Instead, you need to use the '&.${u}' syntax:`,JSON.stringify({root:{[`&.${u}`]:l}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
109
- `))}y[v]={}}}};Object.keys(f.components).forEach(y=>{const b=f.components[y].styleOverrides;b&&y.indexOf("Mui")===0&&m(b,y)})}return f.unstable_sxConfig=p._extends({},Je,a==null?void 0:a.unstable_sxConfig),f.unstable_sx=function(m){return er({sx:m,theme:this})},f}const a0=i0(),Bn=a0,Wn="$$material";function s0({props:e,name:t}){return as({props:e,name:t,defaultTheme:Bn,themeId:Wn})}var et={};const l0=p.getAugmentedNamespace(p._extends$1),c0=p.getAugmentedNamespace(p.objectWithoutPropertiesLoose),u0=p.getAugmentedNamespace(ts),d0=p.getAugmentedNamespace(Eo),f0=p.getAugmentedNamespace($o),h0=p.getAugmentedNamespace(ko),m0=p.getAugmentedNamespace(Di),p0=p.getAugmentedNamespace(us);var ze=Rn;Object.defineProperty(et,"__esModule",{value:!0});var g0=et.default=$0,y0=et.shouldForwardProp=st;et.systemDefaultTheme=void 0;var te=ze(l0),Yt=ze(c0),Zr=j0(u0),v0=d0,x0=ze(f0),b0=ze(h0),_0=ze(m0),S0=ze(p0);const w0=["ownerState"],E0=["variants"],C0=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function Un(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(Un=function(n){return n?r:t})(e)}function j0(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=Un(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}function T0(e){return Object.keys(e).length===0}function O0(e){return typeof e=="string"&&e.charCodeAt(0)>96}function st(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const N0=et.systemDefaultTheme=(0,_0.default)(),Xr=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function nt({defaultTheme:e,theme:t,themeId:r}){return T0(t)?e:t[r]||t}function k0(e){return e?(t,r)=>r[e]:null}function lt(e,t){let{ownerState:r}=t,n=(0,Yt.default)(t,w0);const o=typeof e=="function"?e((0,te.default)({ownerState:r},n)):e;if(Array.isArray(o))return o.flatMap(i=>lt(i,(0,te.default)({ownerState:r},n)));if(o&&typeof o=="object"&&Array.isArray(o.variants)){const{variants:i=[]}=o;let c=(0,Yt.default)(o,E0);return i.forEach(d=>{let f=!0;typeof d.props=="function"?f=d.props((0,te.default)({ownerState:r},n,r)):Object.keys(d.props).forEach(h=>{(r==null?void 0:r[h])!==d.props[h]&&n[h]!==d.props[h]&&(f=!1)}),f&&(Array.isArray(c)||(c=[c]),c.push(typeof d.style=="function"?d.style((0,te.default)({ownerState:r},n,r)):d.style))}),c}return o}function $0(e={}){const{themeId:t,defaultTheme:r=N0,rootShouldForwardProp:n=st,slotShouldForwardProp:o=st}=e,i=a=>(0,S0.default)((0,te.default)({},a,{theme:nt((0,te.default)({},a,{defaultTheme:r,themeId:t}))}));return i.__mui_systemSx=!0,(a,c={})=>{(0,Zr.internal_processStyles)(a,g=>g.filter(w=>!(w!=null&&w.__mui_systemSx)));const{name:d,slot:f,skipVariantsResolver:h,skipSx:m,overridesResolver:y=k0(Xr(f))}=c,b=(0,Yt.default)(c,C0),v=h!==void 0?h:f&&f!=="Root"&&f!=="root"||!1,l=m||!1;let u;process.env.NODE_ENV!=="production"&&d&&(u=`${d}-${Xr(f||"Root")}`);let x=st;f==="Root"||f==="root"?x=n:f?x=o:O0(a)&&(x=void 0);const _=(0,Zr.default)(a,(0,te.default)({shouldForwardProp:x,label:u},b)),S=g=>typeof g=="function"&&g.__emotion_real!==g||(0,v0.isPlainObject)(g)?w=>lt(g,(0,te.default)({},w,{theme:nt({theme:w.theme,defaultTheme:r,themeId:t})})):g,C=(g,...w)=>{let E=S(g);const M=w?w.map(S):[];d&&y&&M.push(z=>{const W=nt((0,te.default)({},z,{defaultTheme:r,themeId:t}));if(!W.components||!W.components[d]||!W.components[d].styleOverrides)return null;const G=W.components[d].styleOverrides,ae={};return Object.entries(G).forEach(([pe,ge])=>{ae[pe]=lt(ge,(0,te.default)({},z,{theme:W}))}),y(z,ae)}),d&&!v&&M.push(z=>{var W;const G=nt((0,te.default)({},z,{defaultTheme:r,themeId:t})),ae=G==null||(W=G.components)==null||(W=W[d])==null?void 0:W.variants;return lt({variants:ae},(0,te.default)({},z,{theme:G}))}),l||M.push(i);const P=M.length-w.length;if(Array.isArray(g)&&P>0){const z=new Array(P).fill("");E=[...g,...z],E.raw=[...g.raw,...z]}const B=_(E,...M);if(process.env.NODE_ENV!=="production"){let z;d&&(z=`${d}${(0,x0.default)(f||"")}`),z===void 0&&(z=`Styled(${(0,b0.default)(a)})`),B.displayName=z}return a.muiName&&(B.muiName=a.muiName),B};return _.withConfig&&(C.withConfig=_.withConfig),C}}const M0=e=>y0(e)&&e!=="classes",P0=g0({themeId:Wn,defaultTheme:Bn,rootShouldForwardProp:M0}),A0=P0;function I0(e){return Xt("MuiSvgIcon",e)}Do("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const R0=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],D0=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${ve(t)}`,`fontSize${ve(r)}`]};return Mo(o,I0,n)},z0=A0("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${ve(r.color)}`],t[`fontSize${ve(r.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var r,n,o,i,a,c,d,f,h,m,y,b,v;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(r=e.transitions)==null||(n=r.create)==null?void 0:n.call(r,"fill",{duration:(o=e.transitions)==null||(o=o.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((i=e.typography)==null||(a=i.pxToRem)==null?void 0:a.call(i,20))||"1.25rem",medium:((c=e.typography)==null||(d=c.pxToRem)==null?void 0:d.call(c,24))||"1.5rem",large:((f=e.typography)==null||(h=f.pxToRem)==null?void 0:h.call(f,35))||"2.1875rem"}[t.fontSize],color:(m=(y=(e.vars||e).palette)==null||(y=y[t.color])==null?void 0:y.main)!=null?m:{action:(b=(e.vars||e).palette)==null||(b=b.action)==null?void 0:b.active,disabled:(v=(e.vars||e).palette)==null||(v=v.action)==null?void 0:v.disabled,inherit:void 0}[t.color]}}),hr=L.forwardRef(function(t,r){const n=s0({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:c="svg",fontSize:d="medium",htmlColor:f,inheritViewBox:h=!1,titleAccess:m,viewBox:y="0 0 24 24"}=n,b=p._objectWithoutPropertiesLoose(n,R0),v=L.isValidElement(o)&&o.type==="svg",l=p._extends({},n,{color:a,component:c,fontSize:d,instanceFontSize:t.fontSize,inheritViewBox:h,viewBox:y,hasSvgAsChild:v}),u={};h||(u.viewBox=y);const x=D0(l);return s.jsxs(z0,p._extends({as:c,className:p.clsx(x.root,i),focusable:"false",color:f,"aria-hidden":m?void 0:!0,role:m?"img":void 0,ref:r},u,b,v&&o.props,{ownerState:l,children:[v?o.props.children:o,m?s.jsx("title",{children:m}):null]}))});process.env.NODE_ENV!=="production"&&(hr.propTypes={children:p.PropTypes.node,classes:p.PropTypes.object,className:p.PropTypes.string,color:p.PropTypes.oneOfType([p.PropTypes.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),p.PropTypes.string]),component:p.PropTypes.elementType,fontSize:p.PropTypes.oneOfType([p.PropTypes.oneOf(["inherit","large","medium","small"]),p.PropTypes.string]),htmlColor:p.PropTypes.string,inheritViewBox:p.PropTypes.bool,shapeRendering:p.PropTypes.string,sx:p.PropTypes.oneOfType([p.PropTypes.arrayOf(p.PropTypes.oneOfType([p.PropTypes.func,p.PropTypes.object,p.PropTypes.bool])),p.PropTypes.func,p.PropTypes.object]),titleAccess:p.PropTypes.string,viewBox:p.PropTypes.string});hr.muiName="SvgIcon";const Jr=hr;function L0(e,t){function r(n,o){return s.jsx(Jr,p._extends({"data-testid":`${t}Icon`,ref:o},n,{children:e}))}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=Jr.muiName,L.memo(L.forwardRef(r))}const F0=L0(s.jsx("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown");var Qr=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function V0(e,t){return!!(e===t||Qr(e)&&Qr(t))}function H0(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!V0(e[r],t[r]))return!1;return!0}function Lt(e,t){t===void 0&&(t=H0);var r,n=[],o,i=!1;function a(){for(var c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];return i&&r===this&&t(c,n)||(o=e.apply(this,c),i=!0,r=this,n=c),o}return a}var B0=typeof performance=="object"&&typeof performance.now=="function",en=B0?function(){return performance.now()}:function(){return Date.now()};function tn(e){cancelAnimationFrame(e.id)}function W0(e,t){var r=en();function n(){en()-r>=t?e.call(null):o.id=requestAnimationFrame(n)}var o={id:requestAnimationFrame(n)};return o}var Ft=-1;function rn(e){if(e===void 0&&(e=!1),Ft===-1||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(t),Ft=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Ft}var ke=null;function nn(e){if(e===void 0&&(e=!1),ke===null||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";var n=document.createElement("div"),o=n.style;return o.width="100px",o.height="100px",t.appendChild(n),document.body.appendChild(t),t.scrollLeft>0?ke="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?ke="negative":ke="positive-ascending"),document.body.removeChild(t),ke}return ke}process.env.NODE_ENV;var U0=150,q0=function(t,r){return t},ct=null,ut=null;process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof window.WeakSet<"u"&&(ct=new WeakSet,ut=new WeakSet);function Y0(e){var t,r=e.getItemOffset,n=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,c=e.getStopIndexForStartIndex,d=e.initInstanceProps,f=e.shouldResetStyleCacheOnItemSizeChange,h=e.validateProps;return t=function(m){p._inheritsLoose(y,m);function y(v){var l;return l=m.call(this,v)||this,l._instanceProps=d(l.props,p._assertThisInitialized(l)),l._outerRef=void 0,l._resetIsScrollingTimeoutId=null,l.state={instance:p._assertThisInitialized(l),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof l.props.initialScrollOffset=="number"?l.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},l._callOnItemsRendered=void 0,l._callOnItemsRendered=Lt(function(u,x,_,S){return l.props.onItemsRendered({overscanStartIndex:u,overscanStopIndex:x,visibleStartIndex:_,visibleStopIndex:S})}),l._callOnScroll=void 0,l._callOnScroll=Lt(function(u,x,_){return l.props.onScroll({scrollDirection:u,scrollOffset:x,scrollUpdateWasRequested:_})}),l._getItemStyle=void 0,l._getItemStyle=function(u){var x=l.props,_=x.direction,S=x.itemSize,C=x.layout,g=l._getItemStyleCache(f&&S,f&&C,f&&_),w;if(g.hasOwnProperty(u))w=g[u];else{var E=r(l.props,u,l._instanceProps),M=o(l.props,u,l._instanceProps),P=_==="horizontal"||C==="horizontal",B=_==="rtl",z=P?E:0;g[u]=w={position:"absolute",left:B?void 0:z,right:B?z:void 0,top:P?0:E,height:P?"100%":M,width:P?M:"100%"}}return w},l._getItemStyleCache=void 0,l._getItemStyleCache=Lt(function(u,x,_){return{}}),l._onScrollHorizontal=function(u){var x=u.currentTarget,_=x.clientWidth,S=x.scrollLeft,C=x.scrollWidth;l.setState(function(g){if(g.scrollOffset===S)return null;var w=l.props.direction,E=S;if(w==="rtl")switch(nn()){case"negative":E=-S;break;case"positive-descending":E=C-_-S;break}return E=Math.max(0,Math.min(E,C-_)),{isScrolling:!0,scrollDirection:g.scrollOffset<E?"forward":"backward",scrollOffset:E,scrollUpdateWasRequested:!1}},l._resetIsScrollingDebounced)},l._onScrollVertical=function(u){var x=u.currentTarget,_=x.clientHeight,S=x.scrollHeight,C=x.scrollTop;l.setState(function(g){if(g.scrollOffset===C)return null;var w=Math.max(0,Math.min(C,S-_));return{isScrolling:!0,scrollDirection:g.scrollOffset<w?"forward":"backward",scrollOffset:w,scrollUpdateWasRequested:!1}},l._resetIsScrollingDebounced)},l._outerRefSetter=function(u){var x=l.props.outerRef;l._outerRef=u,typeof x=="function"?x(u):x!=null&&typeof x=="object"&&x.hasOwnProperty("current")&&(x.current=u)},l._resetIsScrollingDebounced=function(){l._resetIsScrollingTimeoutId!==null&&tn(l._resetIsScrollingTimeoutId),l._resetIsScrollingTimeoutId=W0(l._resetIsScrolling,U0)},l._resetIsScrolling=function(){l._resetIsScrollingTimeoutId=null,l.setState({isScrolling:!1},function(){l._getItemStyleCache(-1,null)})},l}y.getDerivedStateFromProps=function(l,u){return G0(l,u),h(l),null};var b=y.prototype;return b.scrollTo=function(l){l=Math.max(0,l),this.setState(function(u){return u.scrollOffset===l?null:{scrollDirection:u.scrollOffset<l?"forward":"backward",scrollOffset:l,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},b.scrollToItem=function(l,u){u===void 0&&(u="auto");var x=this.props,_=x.itemCount,S=x.layout,C=this.state.scrollOffset;l=Math.max(0,Math.min(l,_-1));var g=0;if(this._outerRef){var w=this._outerRef;S==="vertical"?g=w.scrollWidth>w.clientWidth?rn():0:g=w.scrollHeight>w.clientHeight?rn():0}this.scrollTo(i(this.props,l,u,C,this._instanceProps,g))},b.componentDidMount=function(){var l=this.props,u=l.direction,x=l.initialScrollOffset,_=l.layout;if(typeof x=="number"&&this._outerRef!=null){var S=this._outerRef;u==="horizontal"||_==="horizontal"?S.scrollLeft=x:S.scrollTop=x}this._callPropsCallbacks()},b.componentDidUpdate=function(){var l=this.props,u=l.direction,x=l.layout,_=this.state,S=_.scrollOffset,C=_.scrollUpdateWasRequested;if(C&&this._outerRef!=null){var g=this._outerRef;if(u==="horizontal"||x==="horizontal")if(u==="rtl")switch(nn()){case"negative":g.scrollLeft=-S;break;case"positive-ascending":g.scrollLeft=S;break;default:var w=g.clientWidth,E=g.scrollWidth;g.scrollLeft=E-w-S;break}else g.scrollLeft=S;else g.scrollTop=S}this._callPropsCallbacks()},b.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&tn(this._resetIsScrollingTimeoutId)},b.render=function(){var l=this.props,u=l.children,x=l.className,_=l.direction,S=l.height,C=l.innerRef,g=l.innerElementType,w=l.innerTagName,E=l.itemCount,M=l.itemData,P=l.itemKey,B=P===void 0?q0:P,z=l.layout,W=l.outerElementType,G=l.outerTagName,ae=l.style,pe=l.useIsScrolling,ge=l.width,be=this.state.isScrolling,ue=_==="horizontal"||z==="horizontal",_e=ue?this._onScrollHorizontal:this._onScrollVertical,ye=this._getRangeToRender(),Le=ye[0],Fe=ye[1],Se=[];if(E>0)for(var de=Le;de<=Fe;de++)Se.push(j.createElement(u,{data:M,key:B(de,M),index:de,isScrolling:pe?be:void 0,style:this._getItemStyle(de)}));var we=n(this.props,this._instanceProps);return j.createElement(W||G||"div",{className:x,onScroll:_e,ref:this._outerRefSetter,style:p._extends({position:"relative",height:S,width:ge,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:_},ae)},j.createElement(g||w||"div",{children:Se,ref:C,style:{height:ue?"100%":we,pointerEvents:be?"none":void 0,width:ue?we:"100%"}}))},b._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var l=this.props.itemCount;if(l>0){var u=this._getRangeToRender(),x=u[0],_=u[1],S=u[2],C=u[3];this._callOnItemsRendered(x,_,S,C)}}if(typeof this.props.onScroll=="function"){var g=this.state,w=g.scrollDirection,E=g.scrollOffset,M=g.scrollUpdateWasRequested;this._callOnScroll(w,E,M)}},b._getRangeToRender=function(){var l=this.props,u=l.itemCount,x=l.overscanCount,_=this.state,S=_.isScrolling,C=_.scrollDirection,g=_.scrollOffset;if(u===0)return[0,0,0,0];var w=a(this.props,g,this._instanceProps),E=c(this.props,w,g,this._instanceProps),M=!S||C==="backward"?Math.max(1,x):1,P=!S||C==="forward"?Math.max(1,x):1;return[Math.max(0,w-M),Math.max(0,Math.min(u-1,E+P)),w,E]},y}(j.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var G0=function(t,r){var n=t.children,o=t.direction,i=t.height,a=t.layout,c=t.innerTagName,d=t.outerTagName,f=t.width,h=r.instance;if(process.env.NODE_ENV!=="production"){(c!=null||d!=null)&&ut&&!ut.has(h)&&(ut.add(h),console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead."));var m=o==="horizontal"||a==="horizontal";switch(o){case"horizontal":case"vertical":ct&&!ct.has(h)&&(ct.add(h),console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.'));break;case"ltr":case"rtl":break;default:throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". '+('"'+o+'" was specified.'))}switch(a){case"horizontal":case"vertical":break;default:throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". '+('"'+a+'" was specified.'))}if(n==null)throw Error('An invalid "children" prop has been specified. Value should be a React component. '+('"'+(n===null?"null":typeof n)+'" was specified.'));if(m&&typeof f!="number")throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. '+('"'+(f===null?"null":typeof f)+'" was specified.'));if(!m&&typeof i!="number")throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. '+('"'+(i===null?"null":typeof i)+'" was specified.'))}},K0=50,$e=function(t,r,n){var o=t,i=o.itemSize,a=n.itemMetadataMap,c=n.lastMeasuredIndex;if(r>c){var d=0;if(c>=0){var f=a[c];d=f.offset+f.size}for(var h=c+1;h<=r;h++){var m=i(h);a[h]={offset:d,size:m},d+=m}n.lastMeasuredIndex=r}return a[r]},Z0=function(t,r,n){var o=r.itemMetadataMap,i=r.lastMeasuredIndex,a=i>0?o[i].offset:0;return a>=n?qn(t,r,i,0,n):X0(t,r,Math.max(0,i),n)},qn=function(t,r,n,o,i){for(;o<=n;){var a=o+Math.floor((n-o)/2),c=$e(t,a,r).offset;if(c===i)return a;c<i?o=a+1:c>i&&(n=a-1)}return o>0?o-1:0},X0=function(t,r,n,o){for(var i=t.itemCount,a=1;n<i&&$e(t,n,r).offset<o;)n+=a,a*=2;return qn(t,r,Math.min(n,i-1),Math.floor(n/2),o)},on=function(t,r){var n=t.itemCount,o=r.itemMetadataMap,i=r.estimatedItemSize,a=r.lastMeasuredIndex,c=0;if(a>=n&&(a=n-1),a>=0){var d=o[a];c=d.offset+d.size}var f=n-a-1,h=f*i;return c+h},J0=Y0({getItemOffset:function(t,r,n){return $e(t,r,n).offset},getItemSize:function(t,r,n){return n.itemMetadataMap[r].size},getEstimatedTotalSize:on,getOffsetForIndexAndAlignment:function(t,r,n,o,i,a){var c=t.direction,d=t.height,f=t.layout,h=t.width,m=c==="horizontal"||f==="horizontal",y=m?h:d,b=$e(t,r,i),v=on(t,i),l=Math.max(0,Math.min(v-y,b.offset)),u=Math.max(0,b.offset-y+b.size+a);switch(n==="smart"&&(o>=u-y&&o<=l+y?n="auto":n="center"),n){case"start":return l;case"end":return u;case"center":return Math.round(u+(l-u)/2);case"auto":default:return o>=u&&o<=l?o:o<u?u:l}},getStartIndexForOffset:function(t,r,n){return Z0(t,n,r)},getStopIndexForStartIndex:function(t,r,n,o){for(var i=t.direction,a=t.height,c=t.itemCount,d=t.layout,f=t.width,h=i==="horizontal"||d==="horizontal",m=h?f:a,y=$e(t,r,o),b=n+m,v=y.offset+y.size,l=r;l<c-1&&v<b;)l++,v+=$e(t,l,o).size;return l},initInstanceProps:function(t,r){var n=t,o=n.estimatedItemSize,i={itemMetadataMap:{},estimatedItemSize:o||K0,lastMeasuredIndex:-1};return r.resetAfterIndex=function(a,c){c===void 0&&(c=!0),i.lastMeasuredIndex=Math.min(i.lastMeasuredIndex,a-1),r._getItemStyleCache(-1),c&&r.forceUpdate()},i},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(t){var r=t.itemSize;if(process.env.NODE_ENV!=="production"&&typeof r!="function")throw Error('An invalid "itemSize" prop has been specified. Value should be a function. '+('"'+(r===null?"null":typeof r)+'" was specified.'))}});function dt(e,t){return t?e:void 0}function Gt(e){return s.jsx(N.Stack,{sx:{cursor:"pointer"},onClick:t=>{var r;t.preventDefault(),t.stopPropagation(),(r=e.onClick)==null||r.call(e,e.option)},...e.stackProps,children:s.jsx(N.Stack,{sx:{p:1,transition:"0.2s",borderRadius:"5px",cursor:"pointer",...dt({backgroundColor:p.color.primary200},e.select),":hover":{backgroundColor:p.color.primary100,borderColor:"transparent"}},children:e.renderOption(e.option)})})}const gt=37,Q0=(e,t)=>{const a=document.createElement("p");a.innerText=t,a.style.width=`${e-16-16-4}px`,document.body.appendChild(a);const c=a.offsetHeight;return document.body.removeChild(a),c>21?gt+21:gt};function el(e){const[t,r]=j.useState(!1),[n,o]=j.useState(""),[i,a]=j.useState(""),[c,d]=j.useState(!1),{isRequired:f=!1}=e,h=j.useCallback(p._.debounce(w=>{var E;(E=e.handleChangeSearch)==null||E.call(e,w)},300),[e.handleChangeSearch]),m=()=>{r(!t)},y=()=>{r(!1),a(""),h("")};j.useEffect(()=>{o(e.value?e.getOptionLabel(e.value):"")},[e.value]),j.useEffect(()=>{t||o(e.value?e.getOptionLabel(e.value):"")},[t]),j.useEffect(()=>{d(e.searchLoading)},[e.paging.rows,e.searchLoading]);const b=e.paging.rows,{hasNextPage:v}=e,l=v?b.length+1:b.length,u=()=>e.isNextPageLoading?void 0:e.loadNextPage(i),x=w=>!v||w<b.length,_=w=>{o(w.target.value),t&&(a(w.target.value),h(w.target.value),d(!0))},S=j.useRef(null),C=j.useRef(null),g=j.useRef(null);return j.useEffect(()=>{var w,E,M,P;t?((w=C.current)==null||w.classList.add("Mui-focused"),(E=g.current)==null||E.classList.add("Mui-focused")):((M=C.current)==null||M.classList.remove("Mui-focused"),(P=g.current)==null||P.classList.remove("Mui-focused"))},[t]),s.jsx(N.ClickAwayListener,{onClickAway:y,mouseEvent:"onMouseDown",touchEvent:"onTouchEnd",children:s.jsx("div",{ref:S,style:{width:e.wrapperWidth??"auto"},children:s.jsxs(N.Stack,{sx:{position:"relative"},children:[s.jsx(N.TextField,{required:f,label:e.label,value:n,disabled:e.loading||e.disabled||e.readOnly,fullWidth:!0,error:e.error,helperText:e.helperText,onFocus:w=>{e.loading||e.disabled||e.readOnly||(w.preventDefault(),w.stopPropagation(),r(!0))},autoComplete:"off",onChange:_,placeholder:e.placeholder||"All options",sx:{"& input:not(:focus)":{"&::placeholder":{color:e.placeHolderColor||"#C5C5C5",opacity:1}}},InputLabelProps:{ref:C,shrink:!0},InputProps:{readOnly:e.readOnly,ref:g,endAdornment:s.jsx(N.IconButton,{size:"small",sx:{padding:"1px"},onClick:w=>{var E;w.preventDefault(),w.stopPropagation(),m(),(E=S.current)==null||E.focus()},disabled:e.loading||e.disabled||e.readOnly,children:e.loading?s.jsx(N.CircularProgress,{size:"16px"}):s.jsx(F0,{fontSize:"small",style:{transition:"0.3s"},className:t?"rotate":""})})}}),s.jsx(N.Fade,{in:t,timeout:0,unmountOnExit:!1,children:s.jsxs(N.Paper,{sx:{position:"absolute",top:"calc(100% + 2px)",zIndex:2,left:0,right:0,p:1},children:[!e.disabledAllOption&&s.jsx(N.Stack,{sx:{...dt({display:"none"},!!c)},children:s.jsx(N.Stack,{children:s.jsx(Gt,{option:void 0,select:!e.value,renderOption:()=>s.jsx(N.Typography,{children:e.placeholder||"All options"}),onClick:()=>{var w,E;y(),(w=e.onChange)==null||w.call(e,void 0),(E=e.handleChangeSearch)==null||E.call(e,"")}})})}),!c&&s.jsx(p.InfiniteLoader,{isItemLoaded:x,itemCount:l,loadMoreItems:u,threshold:5,children:({onItemsRendered:w,ref:E})=>s.jsx(J0,{ref:E,onItemsRendered:w,height:gt*Math.min(e.itemsNumber||6,l),itemCount:l,itemSize:M=>{var P;return Q0((P=S.current)==null?void 0:P.offsetWidth,b[M]?e.getOptionLabel(b[M]):"")},width:"100%",className:"styled-scroll",children:({index:M,style:P})=>{var z;const B=b[M];return x(M)?s.jsx(Gt,{stackProps:{style:P},option:B,renderOption:W=>{var G;return s.jsxs(N.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[s.jsx(N.Typography,{children:e.getOptionLabel(W)}),(G=e.renderOptionTooltip)==null?void 0:G.call(e,W)]})},onClick:W=>{var G;y(),(G=e.onChange)==null||G.call(e,W)},select:((z=e.isEqual)==null?void 0:z.call(e,B,e.value))??p._.isEqual(B,e.value)}):s.jsx(N.Stack,{style:P,sx:{height:gt,pl:1},justifyContent:"center",children:s.jsx(N.Typography,{children:"Loading..."})})}})}),s.jsx(N.Stack,{sx:{height:30,display:"flex",justifyContent:"center",paddingLeft:"5px",...dt({display:"none"},!c)},children:s.jsx(N.Typography,{color:"grayText",children:"Searching..."})}),s.jsx(N.Stack,{sx:{height:30,display:"flex",justifyContent:"center",paddingLeft:"5px",...dt({display:"none"},!!(b.length||e.loading||c))},children:s.jsx(N.Typography,{color:"grayText",children:"No options"})})]})})]})})})}function tl(e){var h;const{listProps:t}=e,[r,n]=j.useState({initLoading:!e.disabled,searchLoading:!1,hasNextPage:!1,isNextPageLoading:!1,paging:{page:1,pageSize:((h=e.listProps)==null?void 0:h.pageSize)||20,rows:[],total:0,totalPages:1}}),o=async(m,y)=>{var b,v;if(e.list)n(()=>{var x;const l=((x=m==null?void 0:m.search)==null?void 0:x.content)||"";return{hasNextPage:!1,isNextPageLoading:!1,paging:{page:1,pageSize:1e5,rows:e.list.options.filter(_=>e.list.searchOption?e.list.searchOption(_,l):p.search(_,l,e.list.searchFields)),total:e.list.options.length,totalPages:1},searchLoading:!1,initLoading:!1}});else{n(l=>({...l,isNextPageLoading:!0}));try{const l={page:1,pageSize:20,filter:{...t==null?void 0:t.filter,...m==null?void 0:m.filter},...p.lodashExports.omit(t,"filter"),...p.lodashExports.omit(m,"filter"),search:{fields:((b=t==null?void 0:t.search)==null?void 0:b.fields)??[],content:((v=m==null?void 0:m.search)==null?void 0:v.content)??""}};y&&(l.filter={},l.search&&(l.search.content=""),l.page=1);const u=await e.getList(l);n(x=>({initLoading:!1,searchLoading:!1,isNextPageLoading:!1,paging:{...u,rows:(m==null?void 0:m.page)===1?u.rows:x.paging.rows.concat(u.rows)},hasNextPage:u.page<u.totalPages}))}catch{}}},i=()=>(n(m=>({...m,initLoading:!0})),o(void 0,!0)),a=m=>(n(y=>({...y,initLoading:!0})),o(m)),c=m=>{o({page:r.paging.page+1,search:{content:m}})},d=m=>{n(y=>({...y,searchLoading:!0})),o({page:1,search:{content:m}})};j.useEffect(()=>{e.disabled||(n(m=>({...m,initLoading:!0})),o({page:1}))},[...e.dependencyList||[]]);const f=()=>{n(m=>({...m,initLoading:!m.initLoading}))};return{...e,loadNextPage:c,handleChangeSearch:d,paging:r.paging,hasNextPage:r.hasNextPage,isNextPageLoading:r.isNextPageLoading,searchLoading:r.searchLoading,loading:e.loading||r.initLoading,getList:a,reset:i,toggleLoading:f}}function rl(e){return s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[s.jsx("path",{d:"M12 3.16663H3.99998C2.80336 3.16663 1.83331 4.13668 1.83331 5.33329V12C1.83331 13.1966 2.80336 14.1666 3.99998 14.1666H12C13.1966 14.1666 14.1666 13.1966 14.1666 12V5.33329C14.1666 4.13668 13.1966 3.16663 12 3.16663Z",stroke:"#85858A"}),s.jsx("path",{d:"M4.5 1.83337V4.16671",stroke:"#85858A",strokeLinecap:"round"}),s.jsx("path",{d:"M2.5 6.16663H13.5",stroke:"#85858A",strokeLinecap:"round"}),s.jsx("path",{d:"M11.8333 1.83337V4.16671",stroke:"#85858A",strokeLinecap:"round"}),s.jsx("path",{d:"M5.5 9.33337C5.77614 9.33337 6 9.10952 6 8.83337C6 8.55723 5.77614 8.33337 5.5 8.33337C5.22386 8.33337 5 8.55723 5 8.83337C5 9.10952 5.22386 9.33337 5.5 9.33337Z",fill:"#85858A"}),s.jsx("path",{d:"M8.16669 9.33337C8.44283 9.33337 8.66669 9.10952 8.66669 8.83337C8.66669 8.55723 8.44283 8.33337 8.16669 8.33337C7.89054 8.33337 7.66669 8.55723 7.66669 8.83337C7.66669 9.10952 7.89054 9.33337 8.16669 9.33337Z",fill:"#85858A"}),s.jsx("path",{d:"M10.8333 9.33337C11.1095 9.33337 11.3333 9.10952 11.3333 8.83337C11.3333 8.55723 11.1095 8.33337 10.8333 8.33337C10.5572 8.33337 10.3333 8.55723 10.3333 8.83337C10.3333 9.10952 10.5572 9.33337 10.8333 9.33337Z",fill:"#85858A"}),s.jsx("path",{d:"M5.5 12C5.77614 12 6 11.7761 6 11.5C6 11.2239 5.77614 11 5.5 11C5.22386 11 5 11.2239 5 11.5C5 11.7761 5.22386 12 5.5 12Z",fill:"#85858A"}),s.jsx("path",{d:"M8.16669 12C8.44283 12 8.66669 11.7761 8.66669 11.5C8.66669 11.2239 8.44283 11 8.16669 11C7.89054 11 7.66669 11.2239 7.66669 11.5C7.66669 11.7761 7.89054 12 8.16669 12Z",fill:"#85858A"}),s.jsx("path",{d:"M10.8333 12C11.1095 12 11.3333 11.7761 11.3333 11.5C11.3333 11.2239 11.1095 11 10.8333 11C10.5572 11 10.3333 11.2239 10.3333 11.5C10.3333 11.7761 10.5572 12 10.8333 12Z",fill:"#85858A"})]})}const nl="Reset date";function ol(e){var c,d;const[t,r]=j.useState(e.value),n=!(t!=null&&t.startDate)||!(t!=null&&t.endDate)?"":K(t==null?void 0:t.startDate).format("DD/MM/YYYY")+" ~ "+K(t==null?void 0:t.endDate).format("DD/MM/YYYY");j.useEffect(()=>{r(e.value)},[e.value]);const o=j.useRef(null),i=j.useRef(null),a=j.useRef(null);return console.log("inputRef",o),console.log("labelRef",i),s.jsx(p.DateRangePicker,{initialSettings:{autoApply:!0,ranges:{Today:[K(),K()],Yesterday:[K().subtract(1,"days"),K().subtract(1,"days")],"Last 7 days":[K().subtract(6,"days"),K()],"Last 30 days":[K().subtract(29,"days"),K()],"This month":[K().startOf("month"),K().endOf("month")],"Last month":[K().subtract(1,"month").startOf("month"),K().subtract(1,"month").endOf("month")],"Reset date":[((c=e.dateReset)==null?void 0:c.startDate)??void 0,((d=e.dateReset)==null?void 0:d.endDate)??void 0]},alwaysShowCalendars:!0,startDate:(t==null?void 0:t.startDate)??void 0,endDate:(t==null?void 0:t.endDate)??void 0,opens:"left",maxDate:K(),...e.initialSettings},onApply:(f,h)=>{var u,x,_;const m=h.chosenLabel===nl,{startDate:y,endDate:b}=h,v=m?((u=e.dateReset)==null?void 0:u.startDate)??void 0:y.toDate(),l=m?((x=e.dateReset)==null?void 0:x.endDate)??void 0:b.toDate();r({startDate:v,endDate:l}),(_=e.onChange)==null||_.call(e,{startDate:v,endDate:l})},children:s.jsx(N.TextField,{inputRef:o,label:e.label??"Permit date",placeholder:"Select date range",value:n,InputLabelProps:{ref:i,shrink:!0},InputProps:{readOnly:!0,ref:a,endAdornment:s.jsx(rl,{onClick:()=>{var f;return(f=o.current)==null?void 0:f.focus()},width:24,height:24,color:"gray"})},fullWidth:!0,sx:{"& *":{cursor:"pointer"},display:"flex",justifyContent:"center",minWidth:"250px"}})})}function Yn(e){return s.jsx("svg",{...e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M16 2.75H8C5.10051 2.75 2.75 5.10051 2.75 8V16C2.75 18.8995 5.10051 21.25 8 21.25H16C18.8995 21.25 21.25 18.8995 21.25 16V8C21.25 5.10051 18.8995 2.75 16 2.75Z",stroke:"#85858A",strokeWidth:"1.5"})})}function Gn(e){return s.jsxs("svg",{...e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("path",{d:"M16 2.75H8C5.10051 2.75 2.75 5.10051 2.75 8V16C2.75 18.8995 5.10051 21.25 8 21.25H16C18.8995 21.25 21.25 18.8995 21.25 16V8C21.25 5.10051 18.8995 2.75 16 2.75Z",stroke:"currentColor",strokeWidth:"1.5"}),s.jsx("path",{d:"M9 12L11 14L15 10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function il(e){return s.jsx(N.Checkbox,{sx:{"& input:disabled ~ svg":{fill:"#ddd"}},color:"primary",icon:s.jsx(Yn,{fontSize:"small"}),checkedIcon:s.jsx(Gn,{fontSize:"small"}),style:{padding:0},...e})}const Kn=e=>{"serviceWorker"in navigator&&navigator.serviceWorker.register(e.path).then(function(t){console.log("Registration successful, scope is:",t.scope),console.log("initialize service worker props ",e);const r=p.getMessagingInWindow(p.initializeApp({apiKey:e.apiKey,authDomain:e.authDomain,projectId:e.projectId,storageBucket:e.storageBucket,messagingSenderId:e.messagingSenderId,appId:e.appId,measurementId:e.measurementId}));p.getToken(r,{serviceWorkerRegistration:t,vapidKey:e.vapidKey}).then(async n=>{var o,i;if(n){console.log("current token for client: ",n);try{const a="/notification-management/api/v1/notifications/registrations",c=e.baseUrl+a;await Kt.post(c,{deviceToken:n},{withCredentials:!0})}catch(a){console.log(a),p.pushError(((i=(o=a.response)==null?void 0:o.data)==null?void 0:i.errorMessage)||"Have error when get notification list")}}else console.log("No registration token available. Request permission to generate one.")}).catch(n=>{console.log("An error occurred while retrieving token. ",n)})}).catch(function(t){console.log("Service worker registration failed, error:",t)})},al=e=>{const t=new BroadcastChannel("my-channel");t.onmessage=r=>{console.log("Broadcast chanel message",r),r&&e(n=>({...n,unread:{...n.unread,total:n.unread.total+1}}))}},sl=e=>new Promise(t=>{const r=p.getMessagingInWindow(p.initializeApp({apiKey:e.apiKey,authDomain:e.authDomain,projectId:e.projectId,storageBucket:e.storageBucket,messagingSenderId:e.messagingSenderId,appId:e.appId,measurementId:e.measurementId}));p.onMessage(r,n=>{console.log("payload",n),t(n)})}),ll=["granted","denied"],cl=e=>{const[t,r]=j.useState(!1),n=()=>{Notification.requestPermission(function(i){i==="granted"&&Kn(e),ll.includes(i)&&r(!0)})},o=()=>{r(!0)};return s.jsx(s.Fragment,{children:t?"":s.jsx("div",{className:p.styles$1["subscription-diaglog"],children:s.jsxs("div",{className:p.styles$1["subscription-container"],children:[s.jsx("h4",{className:p.styles$1["subscription-title"],children:"Notification"}),s.jsx("p",{className:p.styles$1["subscription-text"],children:"Choice to receive notifications for the most recent updates. You have the flexibility to disable them whenever you prefer."}),s.jsxs("div",{className:p.styles$1["subscription-btn__container"],children:[s.jsx("button",{className:p.styles$1["btn-cancel"],onClick:o,children:"Not now"}),s.jsx("button",{className:p.styles$1["btn-success"],onClick:n,children:"Turn on"})]})]})})})},Zn=e=>{const[t,r]=j.useState({userName:"",message:"",context:""});console.log(t);const{setNotiData:n}=j.useContext(p.CustomOpenList);function o(){return s.jsx("div",{className:p.styles$2["notification-massage_container"],children:s.jsxs("div",{className:p.styles$2["notification-massage_content"],children:[s.jsx("h6",{className:p.styles$2["notification-name"],children:t==null?void 0:t.userName}),s.jsxs("div",{className:p.styles$2["notification-message_service"],children:[s.jsxs("span",{children:[`${t==null?void 0:t.message} `," "]}),s.jsx("span",{children:t==null?void 0:t.context})]})]})})}return j.useEffect(()=>{t&&Notification.permission==="granted"&&(t.userName||t.message||t.context)&&p.notify(s.jsx(o,{}))},[t]),j.useEffect(()=>{Notification.permission==="granted"&&Kn(e)},[Notification.permission]),j.useEffect(()=>{al(n)},[]),sl(e).then(i=>{var a,c,d;console.log("aaa",i),r({userName:(a=i==null?void 0:i.data)==null?void 0:a.userName,message:(c=i==null?void 0:i.data)==null?void 0:c.message,context:(d=i==null?void 0:i.data)==null?void 0:d.context}),n(f=>{var h;return{...f,unread:{...f.unread,total:((h=f.unread)==null?void 0:h.total)+1}}})}).catch(i=>console.log("failed: ",i)),s.jsx("div",{children:"Notification"in window&&Notification.permission==="default"?s.jsx(cl,{...e}):""})},ul=(e,t)=>j.cloneElement(t,{},e),dl=({children:e,providers:t})=>s.jsx(s.Fragment,{children:t.reduceRight(ul,e)});exports.GlobalMenu=p.GlobalMenu;exports.notify=p.notify;exports.pushError=p.pushError;exports.pushSuccess=p.pushSuccess;exports.pushWarning=p.pushWarning;exports.AutocompleteOption=Gt;exports.BaseCheckbox=il;exports.CheckedIcon=Gn;exports.MultiProvider=dl;exports.NoData=po;exports.NotificationBase=Zn;exports.PopUpBase=bo;exports.StyledAutocomplete=el;exports.StyledDateRangePicker=ol;exports.ToastConfig=eo;exports.ToastConfigNotification=to;exports.TopBar=fo;exports.UnauthorizedPage=So;exports.UncheckedIcon=Yn;exports.usePopUp=_o;exports.useStyledAutocomplete=tl;
109
+ `))}y[v]={}}}};Object.keys(f.components).forEach(y=>{const b=f.components[y].styleOverrides;b&&y.indexOf("Mui")===0&&m(b,y)})}return f.unstable_sxConfig=p._extends({},Je,a==null?void 0:a.unstable_sxConfig),f.unstable_sx=function(m){return er({sx:m,theme:this})},f}const a0=i0(),Bn=a0,Wn="$$material";function s0({props:e,name:t}){return as({props:e,name:t,defaultTheme:Bn,themeId:Wn})}var et={};const l0=p.getAugmentedNamespace(p._extends$1),c0=p.getAugmentedNamespace(p.objectWithoutPropertiesLoose),u0=p.getAugmentedNamespace(ts),d0=p.getAugmentedNamespace(Eo),f0=p.getAugmentedNamespace($o),h0=p.getAugmentedNamespace(ko),m0=p.getAugmentedNamespace(Di),p0=p.getAugmentedNamespace(us);var ze=Rn;Object.defineProperty(et,"__esModule",{value:!0});var g0=et.default=$0,y0=et.shouldForwardProp=st;et.systemDefaultTheme=void 0;var te=ze(l0),Yt=ze(c0),Zr=j0(u0),v0=d0,x0=ze(f0),b0=ze(h0),_0=ze(m0),S0=ze(p0);const w0=["ownerState"],E0=["variants"],C0=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function Un(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(Un=function(n){return n?r:t})(e)}function j0(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=Un(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)){var a=o?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}function T0(e){return Object.keys(e).length===0}function O0(e){return typeof e=="string"&&e.charCodeAt(0)>96}function st(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const N0=et.systemDefaultTheme=(0,_0.default)(),Xr=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function nt({defaultTheme:e,theme:t,themeId:r}){return T0(t)?e:t[r]||t}function k0(e){return e?(t,r)=>r[e]:null}function lt(e,t){let{ownerState:r}=t,n=(0,Yt.default)(t,w0);const o=typeof e=="function"?e((0,te.default)({ownerState:r},n)):e;if(Array.isArray(o))return o.flatMap(i=>lt(i,(0,te.default)({ownerState:r},n)));if(o&&typeof o=="object"&&Array.isArray(o.variants)){const{variants:i=[]}=o;let c=(0,Yt.default)(o,E0);return i.forEach(d=>{let f=!0;typeof d.props=="function"?f=d.props((0,te.default)({ownerState:r},n,r)):Object.keys(d.props).forEach(h=>{(r==null?void 0:r[h])!==d.props[h]&&n[h]!==d.props[h]&&(f=!1)}),f&&(Array.isArray(c)||(c=[c]),c.push(typeof d.style=="function"?d.style((0,te.default)({ownerState:r},n,r)):d.style))}),c}return o}function $0(e={}){const{themeId:t,defaultTheme:r=N0,rootShouldForwardProp:n=st,slotShouldForwardProp:o=st}=e,i=a=>(0,S0.default)((0,te.default)({},a,{theme:nt((0,te.default)({},a,{defaultTheme:r,themeId:t}))}));return i.__mui_systemSx=!0,(a,c={})=>{(0,Zr.internal_processStyles)(a,g=>g.filter(w=>!(w!=null&&w.__mui_systemSx)));const{name:d,slot:f,skipVariantsResolver:h,skipSx:m,overridesResolver:y=k0(Xr(f))}=c,b=(0,Yt.default)(c,C0),v=h!==void 0?h:f&&f!=="Root"&&f!=="root"||!1,l=m||!1;let u;process.env.NODE_ENV!=="production"&&d&&(u=`${d}-${Xr(f||"Root")}`);let x=st;f==="Root"||f==="root"?x=n:f?x=o:O0(a)&&(x=void 0);const _=(0,Zr.default)(a,(0,te.default)({shouldForwardProp:x,label:u},b)),S=g=>typeof g=="function"&&g.__emotion_real!==g||(0,v0.isPlainObject)(g)?w=>lt(g,(0,te.default)({},w,{theme:nt({theme:w.theme,defaultTheme:r,themeId:t})})):g,C=(g,...w)=>{let E=S(g);const M=w?w.map(S):[];d&&y&&M.push(z=>{const W=nt((0,te.default)({},z,{defaultTheme:r,themeId:t}));if(!W.components||!W.components[d]||!W.components[d].styleOverrides)return null;const G=W.components[d].styleOverrides,ae={};return Object.entries(G).forEach(([pe,ge])=>{ae[pe]=lt(ge,(0,te.default)({},z,{theme:W}))}),y(z,ae)}),d&&!v&&M.push(z=>{var W;const G=nt((0,te.default)({},z,{defaultTheme:r,themeId:t})),ae=G==null||(W=G.components)==null||(W=W[d])==null?void 0:W.variants;return lt({variants:ae},(0,te.default)({},z,{theme:G}))}),l||M.push(i);const P=M.length-w.length;if(Array.isArray(g)&&P>0){const z=new Array(P).fill("");E=[...g,...z],E.raw=[...g.raw,...z]}const B=_(E,...M);if(process.env.NODE_ENV!=="production"){let z;d&&(z=`${d}${(0,x0.default)(f||"")}`),z===void 0&&(z=`Styled(${(0,b0.default)(a)})`),B.displayName=z}return a.muiName&&(B.muiName=a.muiName),B};return _.withConfig&&(C.withConfig=_.withConfig),C}}const M0=e=>y0(e)&&e!=="classes",P0=g0({themeId:Wn,defaultTheme:Bn,rootShouldForwardProp:M0}),A0=P0;function I0(e){return Xt("MuiSvgIcon",e)}Do("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const R0=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],D0=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${ve(t)}`,`fontSize${ve(r)}`]};return Mo(o,I0,n)},z0=A0("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${ve(r.color)}`],t[`fontSize${ve(r.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var r,n,o,i,a,c,d,f,h,m,y,b,v;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(r=e.transitions)==null||(n=r.create)==null?void 0:n.call(r,"fill",{duration:(o=e.transitions)==null||(o=o.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((i=e.typography)==null||(a=i.pxToRem)==null?void 0:a.call(i,20))||"1.25rem",medium:((c=e.typography)==null||(d=c.pxToRem)==null?void 0:d.call(c,24))||"1.5rem",large:((f=e.typography)==null||(h=f.pxToRem)==null?void 0:h.call(f,35))||"2.1875rem"}[t.fontSize],color:(m=(y=(e.vars||e).palette)==null||(y=y[t.color])==null?void 0:y.main)!=null?m:{action:(b=(e.vars||e).palette)==null||(b=b.action)==null?void 0:b.active,disabled:(v=(e.vars||e).palette)==null||(v=v.action)==null?void 0:v.disabled,inherit:void 0}[t.color]}}),hr=L.forwardRef(function(t,r){const n=s0({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:c="svg",fontSize:d="medium",htmlColor:f,inheritViewBox:h=!1,titleAccess:m,viewBox:y="0 0 24 24"}=n,b=p._objectWithoutPropertiesLoose(n,R0),v=L.isValidElement(o)&&o.type==="svg",l=p._extends({},n,{color:a,component:c,fontSize:d,instanceFontSize:t.fontSize,inheritViewBox:h,viewBox:y,hasSvgAsChild:v}),u={};h||(u.viewBox=y);const x=D0(l);return s.jsxs(z0,p._extends({as:c,className:p.clsx(x.root,i),focusable:"false",color:f,"aria-hidden":m?void 0:!0,role:m?"img":void 0,ref:r},u,b,v&&o.props,{ownerState:l,children:[v?o.props.children:o,m?s.jsx("title",{children:m}):null]}))});process.env.NODE_ENV!=="production"&&(hr.propTypes={children:p.PropTypes.node,classes:p.PropTypes.object,className:p.PropTypes.string,color:p.PropTypes.oneOfType([p.PropTypes.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),p.PropTypes.string]),component:p.PropTypes.elementType,fontSize:p.PropTypes.oneOfType([p.PropTypes.oneOf(["inherit","large","medium","small"]),p.PropTypes.string]),htmlColor:p.PropTypes.string,inheritViewBox:p.PropTypes.bool,shapeRendering:p.PropTypes.string,sx:p.PropTypes.oneOfType([p.PropTypes.arrayOf(p.PropTypes.oneOfType([p.PropTypes.func,p.PropTypes.object,p.PropTypes.bool])),p.PropTypes.func,p.PropTypes.object]),titleAccess:p.PropTypes.string,viewBox:p.PropTypes.string});hr.muiName="SvgIcon";const Jr=hr;function L0(e,t){function r(n,o){return s.jsx(Jr,p._extends({"data-testid":`${t}Icon`,ref:o},n,{children:e}))}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=Jr.muiName,L.memo(L.forwardRef(r))}const F0=L0(s.jsx("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown");var Qr=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function V0(e,t){return!!(e===t||Qr(e)&&Qr(t))}function H0(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!V0(e[r],t[r]))return!1;return!0}function Lt(e,t){t===void 0&&(t=H0);var r,n=[],o,i=!1;function a(){for(var c=[],d=0;d<arguments.length;d++)c[d]=arguments[d];return i&&r===this&&t(c,n)||(o=e.apply(this,c),i=!0,r=this,n=c),o}return a}var B0=typeof performance=="object"&&typeof performance.now=="function",en=B0?function(){return performance.now()}:function(){return Date.now()};function tn(e){cancelAnimationFrame(e.id)}function W0(e,t){var r=en();function n(){en()-r>=t?e.call(null):o.id=requestAnimationFrame(n)}var o={id:requestAnimationFrame(n)};return o}var Ft=-1;function rn(e){if(e===void 0&&(e=!1),Ft===-1||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(t),Ft=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Ft}var ke=null;function nn(e){if(e===void 0&&(e=!1),ke===null||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";var n=document.createElement("div"),o=n.style;return o.width="100px",o.height="100px",t.appendChild(n),document.body.appendChild(t),t.scrollLeft>0?ke="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?ke="negative":ke="positive-ascending"),document.body.removeChild(t),ke}return ke}process.env.NODE_ENV;var U0=150,q0=function(t,r){return t},ct=null,ut=null;process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof window.WeakSet<"u"&&(ct=new WeakSet,ut=new WeakSet);function Y0(e){var t,r=e.getItemOffset,n=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,c=e.getStopIndexForStartIndex,d=e.initInstanceProps,f=e.shouldResetStyleCacheOnItemSizeChange,h=e.validateProps;return t=function(m){p._inheritsLoose(y,m);function y(v){var l;return l=m.call(this,v)||this,l._instanceProps=d(l.props,p._assertThisInitialized(l)),l._outerRef=void 0,l._resetIsScrollingTimeoutId=null,l.state={instance:p._assertThisInitialized(l),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof l.props.initialScrollOffset=="number"?l.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},l._callOnItemsRendered=void 0,l._callOnItemsRendered=Lt(function(u,x,_,S){return l.props.onItemsRendered({overscanStartIndex:u,overscanStopIndex:x,visibleStartIndex:_,visibleStopIndex:S})}),l._callOnScroll=void 0,l._callOnScroll=Lt(function(u,x,_){return l.props.onScroll({scrollDirection:u,scrollOffset:x,scrollUpdateWasRequested:_})}),l._getItemStyle=void 0,l._getItemStyle=function(u){var x=l.props,_=x.direction,S=x.itemSize,C=x.layout,g=l._getItemStyleCache(f&&S,f&&C,f&&_),w;if(g.hasOwnProperty(u))w=g[u];else{var E=r(l.props,u,l._instanceProps),M=o(l.props,u,l._instanceProps),P=_==="horizontal"||C==="horizontal",B=_==="rtl",z=P?E:0;g[u]=w={position:"absolute",left:B?void 0:z,right:B?z:void 0,top:P?0:E,height:P?"100%":M,width:P?M:"100%"}}return w},l._getItemStyleCache=void 0,l._getItemStyleCache=Lt(function(u,x,_){return{}}),l._onScrollHorizontal=function(u){var x=u.currentTarget,_=x.clientWidth,S=x.scrollLeft,C=x.scrollWidth;l.setState(function(g){if(g.scrollOffset===S)return null;var w=l.props.direction,E=S;if(w==="rtl")switch(nn()){case"negative":E=-S;break;case"positive-descending":E=C-_-S;break}return E=Math.max(0,Math.min(E,C-_)),{isScrolling:!0,scrollDirection:g.scrollOffset<E?"forward":"backward",scrollOffset:E,scrollUpdateWasRequested:!1}},l._resetIsScrollingDebounced)},l._onScrollVertical=function(u){var x=u.currentTarget,_=x.clientHeight,S=x.scrollHeight,C=x.scrollTop;l.setState(function(g){if(g.scrollOffset===C)return null;var w=Math.max(0,Math.min(C,S-_));return{isScrolling:!0,scrollDirection:g.scrollOffset<w?"forward":"backward",scrollOffset:w,scrollUpdateWasRequested:!1}},l._resetIsScrollingDebounced)},l._outerRefSetter=function(u){var x=l.props.outerRef;l._outerRef=u,typeof x=="function"?x(u):x!=null&&typeof x=="object"&&x.hasOwnProperty("current")&&(x.current=u)},l._resetIsScrollingDebounced=function(){l._resetIsScrollingTimeoutId!==null&&tn(l._resetIsScrollingTimeoutId),l._resetIsScrollingTimeoutId=W0(l._resetIsScrolling,U0)},l._resetIsScrolling=function(){l._resetIsScrollingTimeoutId=null,l.setState({isScrolling:!1},function(){l._getItemStyleCache(-1,null)})},l}y.getDerivedStateFromProps=function(l,u){return G0(l,u),h(l),null};var b=y.prototype;return b.scrollTo=function(l){l=Math.max(0,l),this.setState(function(u){return u.scrollOffset===l?null:{scrollDirection:u.scrollOffset<l?"forward":"backward",scrollOffset:l,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},b.scrollToItem=function(l,u){u===void 0&&(u="auto");var x=this.props,_=x.itemCount,S=x.layout,C=this.state.scrollOffset;l=Math.max(0,Math.min(l,_-1));var g=0;if(this._outerRef){var w=this._outerRef;S==="vertical"?g=w.scrollWidth>w.clientWidth?rn():0:g=w.scrollHeight>w.clientHeight?rn():0}this.scrollTo(i(this.props,l,u,C,this._instanceProps,g))},b.componentDidMount=function(){var l=this.props,u=l.direction,x=l.initialScrollOffset,_=l.layout;if(typeof x=="number"&&this._outerRef!=null){var S=this._outerRef;u==="horizontal"||_==="horizontal"?S.scrollLeft=x:S.scrollTop=x}this._callPropsCallbacks()},b.componentDidUpdate=function(){var l=this.props,u=l.direction,x=l.layout,_=this.state,S=_.scrollOffset,C=_.scrollUpdateWasRequested;if(C&&this._outerRef!=null){var g=this._outerRef;if(u==="horizontal"||x==="horizontal")if(u==="rtl")switch(nn()){case"negative":g.scrollLeft=-S;break;case"positive-ascending":g.scrollLeft=S;break;default:var w=g.clientWidth,E=g.scrollWidth;g.scrollLeft=E-w-S;break}else g.scrollLeft=S;else g.scrollTop=S}this._callPropsCallbacks()},b.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&tn(this._resetIsScrollingTimeoutId)},b.render=function(){var l=this.props,u=l.children,x=l.className,_=l.direction,S=l.height,C=l.innerRef,g=l.innerElementType,w=l.innerTagName,E=l.itemCount,M=l.itemData,P=l.itemKey,B=P===void 0?q0:P,z=l.layout,W=l.outerElementType,G=l.outerTagName,ae=l.style,pe=l.useIsScrolling,ge=l.width,be=this.state.isScrolling,ue=_==="horizontal"||z==="horizontal",_e=ue?this._onScrollHorizontal:this._onScrollVertical,ye=this._getRangeToRender(),Le=ye[0],Fe=ye[1],Se=[];if(E>0)for(var de=Le;de<=Fe;de++)Se.push(j.createElement(u,{data:M,key:B(de,M),index:de,isScrolling:pe?be:void 0,style:this._getItemStyle(de)}));var we=n(this.props,this._instanceProps);return j.createElement(W||G||"div",{className:x,onScroll:_e,ref:this._outerRefSetter,style:p._extends({position:"relative",height:S,width:ge,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:_},ae)},j.createElement(g||w||"div",{children:Se,ref:C,style:{height:ue?"100%":we,pointerEvents:be?"none":void 0,width:ue?we:"100%"}}))},b._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var l=this.props.itemCount;if(l>0){var u=this._getRangeToRender(),x=u[0],_=u[1],S=u[2],C=u[3];this._callOnItemsRendered(x,_,S,C)}}if(typeof this.props.onScroll=="function"){var g=this.state,w=g.scrollDirection,E=g.scrollOffset,M=g.scrollUpdateWasRequested;this._callOnScroll(w,E,M)}},b._getRangeToRender=function(){var l=this.props,u=l.itemCount,x=l.overscanCount,_=this.state,S=_.isScrolling,C=_.scrollDirection,g=_.scrollOffset;if(u===0)return[0,0,0,0];var w=a(this.props,g,this._instanceProps),E=c(this.props,w,g,this._instanceProps),M=!S||C==="backward"?Math.max(1,x):1,P=!S||C==="forward"?Math.max(1,x):1;return[Math.max(0,w-M),Math.max(0,Math.min(u-1,E+P)),w,E]},y}(j.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var G0=function(t,r){var n=t.children,o=t.direction,i=t.height,a=t.layout,c=t.innerTagName,d=t.outerTagName,f=t.width,h=r.instance;if(process.env.NODE_ENV!=="production"){(c!=null||d!=null)&&ut&&!ut.has(h)&&(ut.add(h),console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead."));var m=o==="horizontal"||a==="horizontal";switch(o){case"horizontal":case"vertical":ct&&!ct.has(h)&&(ct.add(h),console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.'));break;case"ltr":case"rtl":break;default:throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". '+('"'+o+'" was specified.'))}switch(a){case"horizontal":case"vertical":break;default:throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". '+('"'+a+'" was specified.'))}if(n==null)throw Error('An invalid "children" prop has been specified. Value should be a React component. '+('"'+(n===null?"null":typeof n)+'" was specified.'));if(m&&typeof f!="number")throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. '+('"'+(f===null?"null":typeof f)+'" was specified.'));if(!m&&typeof i!="number")throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. '+('"'+(i===null?"null":typeof i)+'" was specified.'))}},K0=50,$e=function(t,r,n){var o=t,i=o.itemSize,a=n.itemMetadataMap,c=n.lastMeasuredIndex;if(r>c){var d=0;if(c>=0){var f=a[c];d=f.offset+f.size}for(var h=c+1;h<=r;h++){var m=i(h);a[h]={offset:d,size:m},d+=m}n.lastMeasuredIndex=r}return a[r]},Z0=function(t,r,n){var o=r.itemMetadataMap,i=r.lastMeasuredIndex,a=i>0?o[i].offset:0;return a>=n?qn(t,r,i,0,n):X0(t,r,Math.max(0,i),n)},qn=function(t,r,n,o,i){for(;o<=n;){var a=o+Math.floor((n-o)/2),c=$e(t,a,r).offset;if(c===i)return a;c<i?o=a+1:c>i&&(n=a-1)}return o>0?o-1:0},X0=function(t,r,n,o){for(var i=t.itemCount,a=1;n<i&&$e(t,n,r).offset<o;)n+=a,a*=2;return qn(t,r,Math.min(n,i-1),Math.floor(n/2),o)},on=function(t,r){var n=t.itemCount,o=r.itemMetadataMap,i=r.estimatedItemSize,a=r.lastMeasuredIndex,c=0;if(a>=n&&(a=n-1),a>=0){var d=o[a];c=d.offset+d.size}var f=n-a-1,h=f*i;return c+h},J0=Y0({getItemOffset:function(t,r,n){return $e(t,r,n).offset},getItemSize:function(t,r,n){return n.itemMetadataMap[r].size},getEstimatedTotalSize:on,getOffsetForIndexAndAlignment:function(t,r,n,o,i,a){var c=t.direction,d=t.height,f=t.layout,h=t.width,m=c==="horizontal"||f==="horizontal",y=m?h:d,b=$e(t,r,i),v=on(t,i),l=Math.max(0,Math.min(v-y,b.offset)),u=Math.max(0,b.offset-y+b.size+a);switch(n==="smart"&&(o>=u-y&&o<=l+y?n="auto":n="center"),n){case"start":return l;case"end":return u;case"center":return Math.round(u+(l-u)/2);case"auto":default:return o>=u&&o<=l?o:o<u?u:l}},getStartIndexForOffset:function(t,r,n){return Z0(t,n,r)},getStopIndexForStartIndex:function(t,r,n,o){for(var i=t.direction,a=t.height,c=t.itemCount,d=t.layout,f=t.width,h=i==="horizontal"||d==="horizontal",m=h?f:a,y=$e(t,r,o),b=n+m,v=y.offset+y.size,l=r;l<c-1&&v<b;)l++,v+=$e(t,l,o).size;return l},initInstanceProps:function(t,r){var n=t,o=n.estimatedItemSize,i={itemMetadataMap:{},estimatedItemSize:o||K0,lastMeasuredIndex:-1};return r.resetAfterIndex=function(a,c){c===void 0&&(c=!0),i.lastMeasuredIndex=Math.min(i.lastMeasuredIndex,a-1),r._getItemStyleCache(-1),c&&r.forceUpdate()},i},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(t){var r=t.itemSize;if(process.env.NODE_ENV!=="production"&&typeof r!="function")throw Error('An invalid "itemSize" prop has been specified. Value should be a function. '+('"'+(r===null?"null":typeof r)+'" was specified.'))}});function dt(e,t){return t?e:void 0}function Gt(e){return s.jsx(N.Stack,{sx:{cursor:"pointer"},onClick:t=>{var r;t.preventDefault(),t.stopPropagation(),(r=e.onClick)==null||r.call(e,e.option)},...e.stackProps,children:s.jsx(N.Stack,{sx:{p:1,transition:"0.2s",borderRadius:"5px",cursor:"pointer",...dt({backgroundColor:p.color.primary200},e.select),":hover":{backgroundColor:"#eeeeee80",borderColor:"transparent"}},children:e.renderOption(e.option)})})}const gt=37,Q0=(e,t)=>{const a=document.createElement("p");a.innerText=t,a.style.width=`${e-16-16-4}px`,document.body.appendChild(a);const c=a.offsetHeight;return document.body.removeChild(a),c>21?gt+21:gt};function el(e){const[t,r]=j.useState(!1),[n,o]=j.useState(""),[i,a]=j.useState(""),[c,d]=j.useState(!1),{isRequired:f=!1}=e,h=j.useCallback(p._.debounce(w=>{var E;(E=e.handleChangeSearch)==null||E.call(e,w)},300),[e.handleChangeSearch]),m=()=>{r(!t)},y=()=>{r(!1),a(""),h("")};j.useEffect(()=>{o(e.value?e.getOptionLabel(e.value):"")},[e.value]),j.useEffect(()=>{t||o(e.value?e.getOptionLabel(e.value):"")},[t]),j.useEffect(()=>{d(e.searchLoading)},[e.paging.rows,e.searchLoading]);const b=e.paging.rows,{hasNextPage:v}=e,l=v?b.length+1:b.length,u=()=>e.isNextPageLoading?void 0:e.loadNextPage(i),x=w=>!v||w<b.length,_=w=>{o(w.target.value),t&&(a(w.target.value),h(w.target.value),d(!0))},S=j.useRef(null),C=j.useRef(null),g=j.useRef(null);return j.useEffect(()=>{var w,E,M,P;t?((w=C.current)==null||w.classList.add("Mui-focused"),(E=g.current)==null||E.classList.add("Mui-focused")):((M=C.current)==null||M.classList.remove("Mui-focused"),(P=g.current)==null||P.classList.remove("Mui-focused"))},[t]),s.jsx(N.ClickAwayListener,{onClickAway:y,mouseEvent:"onMouseDown",touchEvent:"onTouchEnd",children:s.jsx("div",{ref:S,style:{width:e.wrapperWidth??"auto"},children:s.jsxs(N.Stack,{sx:{position:"relative"},children:[s.jsx(N.TextField,{required:f,label:e.label,value:n,disabled:e.loading||e.disabled||e.readOnly,fullWidth:!0,error:e.error,helperText:e.helperText,onFocus:w=>{e.loading||e.disabled||e.readOnly||(w.preventDefault(),w.stopPropagation(),r(!0))},autoComplete:"off",onChange:_,placeholder:e.placeholder||"All options",sx:{"& input:not(:focus)":{"&::placeholder":{color:e.placeHolderColor||"#C5C5C5",opacity:1}}},InputLabelProps:{ref:C,shrink:!0},InputProps:{readOnly:e.readOnly,ref:g,endAdornment:s.jsx(N.IconButton,{size:"small",sx:{padding:"1px"},onClick:w=>{var E;w.preventDefault(),w.stopPropagation(),m(),(E=S.current)==null||E.focus()},disabled:e.loading||e.disabled||e.readOnly,children:e.loading?s.jsx(N.CircularProgress,{size:"16px"}):s.jsx(F0,{fontSize:"small",style:{transition:"0.3s"},className:t?"rotate":""})})}}),s.jsx(N.Fade,{in:t,timeout:0,unmountOnExit:!1,children:s.jsxs(N.Paper,{sx:{position:"absolute",top:"calc(100% + 2px)",zIndex:2,left:0,right:0,p:1},children:[!e.disabledAllOption&&s.jsx(N.Stack,{sx:{...dt({display:"none"},!!c)},children:s.jsx(N.Stack,{children:s.jsx(Gt,{option:void 0,select:!e.value,renderOption:()=>s.jsx(N.Typography,{children:e.placeholder||"All options"}),onClick:()=>{var w,E;y(),(w=e.onChange)==null||w.call(e,void 0),(E=e.handleChangeSearch)==null||E.call(e,"")}})})}),!c&&s.jsx(p.InfiniteLoader,{isItemLoaded:x,itemCount:l,loadMoreItems:u,threshold:5,children:({onItemsRendered:w,ref:E})=>s.jsx(J0,{ref:E,onItemsRendered:w,height:gt*Math.min(e.itemsNumber||6,l),itemCount:l,itemSize:M=>{var P;return Q0((P=S.current)==null?void 0:P.offsetWidth,b[M]?e.getOptionLabel(b[M]):"")},width:"100%",className:"styled-scroll",children:({index:M,style:P})=>{var z;const B=b[M];return x(M)?s.jsx(Gt,{stackProps:{style:P},option:B,renderOption:W=>{var G;return s.jsxs(N.Stack,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[s.jsx(N.Typography,{children:e.getOptionLabel(W)}),(G=e.renderOptionTooltip)==null?void 0:G.call(e,W)]})},onClick:W=>{var G;y(),(G=e.onChange)==null||G.call(e,W)},select:((z=e.isEqual)==null?void 0:z.call(e,B,e.value))??p._.isEqual(B,e.value)}):s.jsx(N.Stack,{style:P,sx:{height:gt,pl:1},justifyContent:"center",children:s.jsx(N.Typography,{children:"Loading..."})})}})}),s.jsx(N.Stack,{sx:{height:30,display:"flex",justifyContent:"center",paddingLeft:"5px",...dt({display:"none"},!c)},children:s.jsx(N.Typography,{color:"grayText",children:"Searching..."})}),s.jsx(N.Stack,{sx:{height:30,display:"flex",justifyContent:"center",paddingLeft:"5px",...dt({display:"none"},!!(b.length||e.loading||c))},children:s.jsx(N.Typography,{color:"grayText",children:"No options"})})]})})]})})})}function tl(e){var h;const{listProps:t}=e,[r,n]=j.useState({initLoading:!e.disabled,searchLoading:!1,hasNextPage:!1,isNextPageLoading:!1,paging:{page:1,pageSize:((h=e.listProps)==null?void 0:h.pageSize)||20,rows:[],total:0,totalPages:1}}),o=async(m,y)=>{var b,v;if(e.list)n(()=>{var x;const l=((x=m==null?void 0:m.search)==null?void 0:x.content)||"";return{hasNextPage:!1,isNextPageLoading:!1,paging:{page:1,pageSize:1e5,rows:e.list.options.filter(_=>e.list.searchOption?e.list.searchOption(_,l):p.search(_,l,e.list.searchFields)),total:e.list.options.length,totalPages:1},searchLoading:!1,initLoading:!1}});else{n(l=>({...l,isNextPageLoading:!0}));try{const l={page:1,pageSize:20,filter:{...t==null?void 0:t.filter,...m==null?void 0:m.filter},...p.lodashExports.omit(t,"filter"),...p.lodashExports.omit(m,"filter"),search:{fields:((b=t==null?void 0:t.search)==null?void 0:b.fields)??[],content:((v=m==null?void 0:m.search)==null?void 0:v.content)??""}};y&&(l.filter={},l.search&&(l.search.content=""),l.page=1);const u=await e.getList(l);n(x=>({initLoading:!1,searchLoading:!1,isNextPageLoading:!1,paging:{...u,rows:(m==null?void 0:m.page)===1?u.rows:x.paging.rows.concat(u.rows)},hasNextPage:u.page<u.totalPages}))}catch{}}},i=()=>(n(m=>({...m,initLoading:!0})),o(void 0,!0)),a=m=>(n(y=>({...y,initLoading:!0})),o(m)),c=m=>{o({page:r.paging.page+1,search:{content:m}})},d=m=>{n(y=>({...y,searchLoading:!0})),o({page:1,search:{content:m}})};j.useEffect(()=>{e.disabled||(n(m=>({...m,initLoading:!0})),o({page:1}))},[...e.dependencyList||[]]);const f=()=>{n(m=>({...m,initLoading:!m.initLoading}))};return{...e,loadNextPage:c,handleChangeSearch:d,paging:r.paging,hasNextPage:r.hasNextPage,isNextPageLoading:r.isNextPageLoading,searchLoading:r.searchLoading,loading:e.loading||r.initLoading,getList:a,reset:i,toggleLoading:f}}function rl(e){return s.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[s.jsx("path",{d:"M12 3.16663H3.99998C2.80336 3.16663 1.83331 4.13668 1.83331 5.33329V12C1.83331 13.1966 2.80336 14.1666 3.99998 14.1666H12C13.1966 14.1666 14.1666 13.1966 14.1666 12V5.33329C14.1666 4.13668 13.1966 3.16663 12 3.16663Z",stroke:"#85858A"}),s.jsx("path",{d:"M4.5 1.83337V4.16671",stroke:"#85858A",strokeLinecap:"round"}),s.jsx("path",{d:"M2.5 6.16663H13.5",stroke:"#85858A",strokeLinecap:"round"}),s.jsx("path",{d:"M11.8333 1.83337V4.16671",stroke:"#85858A",strokeLinecap:"round"}),s.jsx("path",{d:"M5.5 9.33337C5.77614 9.33337 6 9.10952 6 8.83337C6 8.55723 5.77614 8.33337 5.5 8.33337C5.22386 8.33337 5 8.55723 5 8.83337C5 9.10952 5.22386 9.33337 5.5 9.33337Z",fill:"#85858A"}),s.jsx("path",{d:"M8.16669 9.33337C8.44283 9.33337 8.66669 9.10952 8.66669 8.83337C8.66669 8.55723 8.44283 8.33337 8.16669 8.33337C7.89054 8.33337 7.66669 8.55723 7.66669 8.83337C7.66669 9.10952 7.89054 9.33337 8.16669 9.33337Z",fill:"#85858A"}),s.jsx("path",{d:"M10.8333 9.33337C11.1095 9.33337 11.3333 9.10952 11.3333 8.83337C11.3333 8.55723 11.1095 8.33337 10.8333 8.33337C10.5572 8.33337 10.3333 8.55723 10.3333 8.83337C10.3333 9.10952 10.5572 9.33337 10.8333 9.33337Z",fill:"#85858A"}),s.jsx("path",{d:"M5.5 12C5.77614 12 6 11.7761 6 11.5C6 11.2239 5.77614 11 5.5 11C5.22386 11 5 11.2239 5 11.5C5 11.7761 5.22386 12 5.5 12Z",fill:"#85858A"}),s.jsx("path",{d:"M8.16669 12C8.44283 12 8.66669 11.7761 8.66669 11.5C8.66669 11.2239 8.44283 11 8.16669 11C7.89054 11 7.66669 11.2239 7.66669 11.5C7.66669 11.7761 7.89054 12 8.16669 12Z",fill:"#85858A"}),s.jsx("path",{d:"M10.8333 12C11.1095 12 11.3333 11.7761 11.3333 11.5C11.3333 11.2239 11.1095 11 10.8333 11C10.5572 11 10.3333 11.2239 10.3333 11.5C10.3333 11.7761 10.5572 12 10.8333 12Z",fill:"#85858A"})]})}const nl="Reset date";function ol(e){var c,d;const[t,r]=j.useState(e.value),n=!(t!=null&&t.startDate)||!(t!=null&&t.endDate)?"":K(t==null?void 0:t.startDate).format("DD/MM/YYYY")+" ~ "+K(t==null?void 0:t.endDate).format("DD/MM/YYYY");j.useEffect(()=>{r(e.value)},[e.value]);const o=j.useRef(null),i=j.useRef(null),a=j.useRef(null);return console.log("inputRef",o),console.log("labelRef",i),s.jsx(p.DateRangePicker,{initialSettings:{autoApply:!0,ranges:{Today:[K(),K()],Yesterday:[K().subtract(1,"days"),K().subtract(1,"days")],"Last 7 days":[K().subtract(6,"days"),K()],"Last 30 days":[K().subtract(29,"days"),K()],"This month":[K().startOf("month"),K().endOf("month")],"Last month":[K().subtract(1,"month").startOf("month"),K().subtract(1,"month").endOf("month")],"Reset date":[((c=e.dateReset)==null?void 0:c.startDate)??void 0,((d=e.dateReset)==null?void 0:d.endDate)??void 0]},alwaysShowCalendars:!0,startDate:(t==null?void 0:t.startDate)??void 0,endDate:(t==null?void 0:t.endDate)??void 0,opens:"left",maxDate:K(),...e.initialSettings},onApply:(f,h)=>{var u,x,_;const m=h.chosenLabel===nl,{startDate:y,endDate:b}=h,v=m?((u=e.dateReset)==null?void 0:u.startDate)??void 0:y.toDate(),l=m?((x=e.dateReset)==null?void 0:x.endDate)??void 0:b.toDate();r({startDate:v,endDate:l}),(_=e.onChange)==null||_.call(e,{startDate:v,endDate:l})},children:s.jsx(N.TextField,{inputRef:o,label:e.label??"Permit date",placeholder:"Select date range",value:n,InputLabelProps:{ref:i,shrink:!0},InputProps:{readOnly:!0,ref:a,endAdornment:s.jsx(rl,{onClick:()=>{var f;return(f=o.current)==null?void 0:f.focus()},width:24,height:24,color:"gray"})},fullWidth:!0,sx:{"& *":{cursor:"pointer"},display:"flex",justifyContent:"center",minWidth:"250px"}})})}function Yn(e){return s.jsx("svg",{...e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("path",{d:"M16 2.75H8C5.10051 2.75 2.75 5.10051 2.75 8V16C2.75 18.8995 5.10051 21.25 8 21.25H16C18.8995 21.25 21.25 18.8995 21.25 16V8C21.25 5.10051 18.8995 2.75 16 2.75Z",stroke:"#85858A",strokeWidth:"1.5"})})}function Gn(e){return s.jsxs("svg",{...e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s.jsx("path",{d:"M16 2.75H8C5.10051 2.75 2.75 5.10051 2.75 8V16C2.75 18.8995 5.10051 21.25 8 21.25H16C18.8995 21.25 21.25 18.8995 21.25 16V8C21.25 5.10051 18.8995 2.75 16 2.75Z",stroke:"currentColor",strokeWidth:"1.5"}),s.jsx("path",{d:"M9 12L11 14L15 10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function il(e){return s.jsx(N.Checkbox,{sx:{"& input:disabled ~ svg":{fill:"#ddd"}},color:"primary",icon:s.jsx(Yn,{fontSize:"small"}),checkedIcon:s.jsx(Gn,{fontSize:"small"}),style:{padding:0},...e})}const Kn=e=>{"serviceWorker"in navigator&&navigator.serviceWorker.register(e.path).then(function(t){console.log("Registration successful, scope is:",t.scope),console.log("initialize service worker props ",e);const r=p.getMessagingInWindow(p.initializeApp({apiKey:e.apiKey,authDomain:e.authDomain,projectId:e.projectId,storageBucket:e.storageBucket,messagingSenderId:e.messagingSenderId,appId:e.appId,measurementId:e.measurementId}));p.getToken(r,{serviceWorkerRegistration:t,vapidKey:e.vapidKey}).then(async n=>{var o,i;if(n){console.log("current token for client: ",n);try{const a="/notification-management/api/v1/notifications/registrations",c=e.baseUrl+a;await Kt.post(c,{deviceToken:n},{withCredentials:!0})}catch(a){console.log(a),p.pushError(((i=(o=a.response)==null?void 0:o.data)==null?void 0:i.errorMessage)||"Have error when get notification list")}}else console.log("No registration token available. Request permission to generate one.")}).catch(n=>{console.log("An error occurred while retrieving token. ",n)})}).catch(function(t){console.log("Service worker registration failed, error:",t)})},al=e=>{const t=new BroadcastChannel("my-channel");t.onmessage=r=>{console.log("Broadcast chanel message",r),r&&e(n=>({...n,unread:{...n.unread,total:n.unread.total+1}}))}},sl=e=>new Promise(t=>{const r=p.getMessagingInWindow(p.initializeApp({apiKey:e.apiKey,authDomain:e.authDomain,projectId:e.projectId,storageBucket:e.storageBucket,messagingSenderId:e.messagingSenderId,appId:e.appId,measurementId:e.measurementId}));p.onMessage(r,n=>{console.log("payload",n),t(n)})}),ll=["granted","denied"],cl=e=>{const[t,r]=j.useState(!1),n=()=>{Notification.requestPermission(function(i){i==="granted"&&Kn(e),ll.includes(i)&&r(!0)})},o=()=>{r(!0)};return s.jsx(s.Fragment,{children:t?"":s.jsx("div",{className:p.styles$1["subscription-diaglog"],children:s.jsxs("div",{className:p.styles$1["subscription-container"],children:[s.jsx("h4",{className:p.styles$1["subscription-title"],children:"Notification"}),s.jsx("p",{className:p.styles$1["subscription-text"],children:"Choice to receive notifications for the most recent updates. You have the flexibility to disable them whenever you prefer."}),s.jsxs("div",{className:p.styles$1["subscription-btn__container"],children:[s.jsx("button",{className:p.styles$1["btn-cancel"],onClick:o,children:"Not now"}),s.jsx("button",{className:p.styles$1["btn-success"],onClick:n,children:"Turn on"})]})]})})})},Zn=e=>{const[t,r]=j.useState({userName:"",message:"",context:""});console.log(t);const{setNotiData:n}=j.useContext(p.CustomOpenList);function o(){return s.jsx("div",{className:p.styles$2["notification-massage_container"],children:s.jsxs("div",{className:p.styles$2["notification-massage_content"],children:[s.jsx("h6",{className:p.styles$2["notification-name"],children:t==null?void 0:t.userName}),s.jsxs("div",{className:p.styles$2["notification-message_service"],children:[s.jsxs("span",{children:[`${t==null?void 0:t.message} `," "]}),s.jsx("span",{children:t==null?void 0:t.context})]})]})})}return j.useEffect(()=>{t&&Notification.permission==="granted"&&(t.userName||t.message||t.context)&&p.notify(s.jsx(o,{}))},[t]),j.useEffect(()=>{Notification.permission==="granted"&&Kn(e)},[Notification.permission]),j.useEffect(()=>{al(n)},[]),sl(e).then(i=>{var a,c,d;console.log("aaa",i),r({userName:(a=i==null?void 0:i.data)==null?void 0:a.userName,message:(c=i==null?void 0:i.data)==null?void 0:c.message,context:(d=i==null?void 0:i.data)==null?void 0:d.context}),n(f=>{var h;return{...f,unread:{...f.unread,total:((h=f.unread)==null?void 0:h.total)+1}}})}).catch(i=>console.log("failed: ",i)),s.jsx("div",{children:"Notification"in window&&Notification.permission==="default"?s.jsx(cl,{...e}):""})},ul=(e,t)=>j.cloneElement(t,{},e),dl=({children:e,providers:t})=>s.jsx(s.Fragment,{children:t.reduceRight(ul,e)});exports.GlobalMenu=p.GlobalMenu;exports.notify=p.notify;exports.pushError=p.pushError;exports.pushSuccess=p.pushSuccess;exports.pushWarning=p.pushWarning;exports.AutocompleteOption=Gt;exports.BaseCheckbox=il;exports.CheckedIcon=Gn;exports.MultiProvider=dl;exports.NoData=po;exports.NotificationBase=Zn;exports.PopUpBase=bo;exports.StyledAutocomplete=el;exports.StyledDateRangePicker=ol;exports.ToastConfig=eo;exports.ToastConfigNotification=to;exports.TopBar=fo;exports.UnauthorizedPage=So;exports.UncheckedIcon=Yn;exports.usePopUp=_o;exports.useStyledAutocomplete=tl;
@@ -1,7 +1,7 @@
1
1
  import { jsxs as T, jsx as c, Fragment as Ye } from "react/jsx-runtime";
2
2
  import * as F from "react";
3
3
  import So, { useState as G, useContext as be, useEffect as Q, useRef as ve, useCallback as bt, forwardRef as Eo, createElement as er, PureComponent as Co } from "react";
4
- import { c as Te, Q as $n, C as Ne, p as At, u as fr, S as Oo, a as To, L as No, b as Ar, d as ko, e as mt, f as $o, s as pt, _ as z, g as xe, P as N, h as he, i as Mo, o as Io, j as Ao, k as Po, l as Pr, m as Rr, I as Ro, n as Do, q as Dr, D as zo, r as Mn, t as In, v as Lo, w as Fo, x as Ce, y as jo, z as gt } from "../index.module-9cc5e50f.js";
4
+ import { c as We, Q as $n, C as Te, p as At, u as fr, S as Oo, a as To, L as No, b as Ar, d as ko, e as mt, f as $o, s as pt, _ as z, g as xe, P as N, h as he, i as Mo, o as Io, j as Ao, k as Po, l as Pr, m as Rr, I as Ro, n as Do, q as Dr, D as zo, r as Mn, t as In, v as Lo, w as Fo, x as Ce, y as jo, z as gt } from "../index.module-9cc5e50f.js";
5
5
  import { G as S1, A as E1, B as C1 } from "../index.module-9cc5e50f.js";
6
6
  import Z from "moment";
7
7
  import hr from "axios";
@@ -110,7 +110,7 @@ const Jo = (e) => {
110
110
  display: "flex",
111
111
  width: "100%",
112
112
  height: "50px",
113
- borderBottom: `1px solid ${Te.grey200}`
113
+ borderBottom: `1px solid ${We.grey200}`
114
114
  },
115
115
  className: "tab-container__title",
116
116
  children: t.map((i, a) => /* @__PURE__ */ c(
@@ -165,9 +165,9 @@ const Jo = (e) => {
165
165
  id: e.id,
166
166
  isRead: e.isRead
167
167
  }), l = i.isRead === !1 ? "unread" : "read", u = {
168
- borderColor: i.isRead ? "#c5c5c5" : (o == null ? void 0 : o.primary500) || Te.primary500,
169
- backgroundColor: i.isRead ? "#c5c5c5" : (o == null ? void 0 : o.primary500) || Te.primary500
170
- }, { setNotiData: f } = be(Ne), h = fr({ baseUrl: t, notiPath: r, setNotiData: f }), m = async (y, s) => {
168
+ borderColor: i.isRead ? "#c5c5c5" : (o == null ? void 0 : o.primary500) || We.primary500,
169
+ backgroundColor: i.isRead ? "#c5c5c5" : (o == null ? void 0 : o.primary500) || We.primary500
170
+ }, { setNotiData: f } = be(Te), h = fr({ baseUrl: t, notiPath: r, setNotiData: f }), m = async (y, s) => {
171
171
  var d, v;
172
172
  try {
173
173
  const x = r || `/notification-management/api/v1/notifications/${y}`, _ = t + x;
@@ -267,7 +267,7 @@ const Jo = (e) => {
267
267
  }) => {
268
268
  const [o, i] = G(!1);
269
269
  console.log(o);
270
- const { setNotiData: a } = be(Ne), l = fr({ baseUrl: t, notiPath: r, setNotiData: a }), u = async () => {
270
+ const { setNotiData: a } = be(Te), l = fr({ baseUrl: t, notiPath: r, setNotiData: a }), u = async () => {
271
271
  var h, m;
272
272
  try {
273
273
  const b = t + (r || "/notification-management/api/v1/notifications");
@@ -303,7 +303,7 @@ const Jo = (e) => {
303
303
  brandColors: r
304
304
  }) => {
305
305
  var u, f, h, m;
306
- const { setShowModalFalse: n } = be(Ne), { notidata: o } = be(Ne);
306
+ const { setShowModalFalse: n } = be(Te), { notidata: o } = be(Te);
307
307
  console.log(o);
308
308
  const [i, a] = G("all"), l = [
309
309
  {
@@ -424,7 +424,7 @@ function ti({
424
424
  brandColors: n
425
425
  }) {
426
426
  var m, g;
427
- const { isOpen: o, toggleOpen: i, setShowModalFalse: a } = be(Ne), { notidata: l, setNotiData: u } = be(Ne), f = fr({ baseUrl: t, notiPath: r, setNotiData: u }), h = async () => {
427
+ const { isOpen: o, toggleOpen: i, setShowModalFalse: a } = be(Te), { notidata: l, setNotiData: u } = be(Te), f = fr({ baseUrl: t, notiPath: r, setNotiData: u }), h = async () => {
428
428
  var b, y;
429
429
  try {
430
430
  await f();
@@ -489,7 +489,7 @@ function ti({
489
489
  position: "absolute",
490
490
  top: "-9px",
491
491
  right: "-6px",
492
- background: `${Te}`,
492
+ background: `${We}`,
493
493
  width: "20px",
494
494
  height: "20px",
495
495
  border: "1px solid #fff",
@@ -499,7 +499,7 @@ function ti({
499
499
  display: "flex",
500
500
  alignItems: "center",
501
501
  justifyContent: "center",
502
- backgroundColor: Te.danger
502
+ backgroundColor: We.danger
503
503
  },
504
504
  className: "notification-badge",
505
505
  children: ((m = l == null ? void 0 : l.unread) == null ? void 0 : m.total) > 9 ? "9+" : `${(g = l == null ? void 0 : l.unread) == null ? void 0 : g.total}`
@@ -1473,8 +1473,8 @@ function bi() {
1473
1473
  }
1474
1474
  function p(O) {
1475
1475
  if (typeof O == "object" && O !== null) {
1476
- var Re = O.$$typeof;
1477
- switch (Re) {
1476
+ var Pe = O.$$typeof;
1477
+ switch (Pe) {
1478
1478
  case e:
1479
1479
  var ht = O.type;
1480
1480
  switch (ht) {
@@ -1495,31 +1495,31 @@ function bi() {
1495
1495
  case i:
1496
1496
  return Ir;
1497
1497
  default:
1498
- return Re;
1498
+ return Pe;
1499
1499
  }
1500
1500
  }
1501
1501
  case t:
1502
- return Re;
1502
+ return Pe;
1503
1503
  }
1504
1504
  }
1505
1505
  }
1506
- var w = a, S = i, M = e, I = u, B = r, L = g, W = m, K = t, ce = o, we = n, Se = f, Me = h, me = !1, Ie = !1;
1506
+ var w = a, S = i, M = e, I = u, B = r, L = g, W = m, K = t, ce = o, we = n, Se = f, $e = h, me = !1, Me = !1;
1507
1507
  function Ee(O) {
1508
1508
  return me || (me = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1;
1509
1509
  }
1510
1510
  function Xe(O) {
1511
- return Ie || (Ie = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1;
1511
+ return Me || (Me = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1;
1512
1512
  }
1513
1513
  function Je(O) {
1514
1514
  return p(O) === a;
1515
1515
  }
1516
- function Ae(O) {
1516
+ function Ie(O) {
1517
1517
  return p(O) === i;
1518
1518
  }
1519
1519
  function pe(O) {
1520
1520
  return typeof O == "object" && O !== null && O.$$typeof === e;
1521
1521
  }
1522
- function Pe(O) {
1522
+ function Ae(O) {
1523
1523
  return p(O) === u;
1524
1524
  }
1525
1525
  function Gt(O) {
@@ -1546,7 +1546,7 @@ function bi() {
1546
1546
  function Qe(O) {
1547
1547
  return p(O) === h;
1548
1548
  }
1549
- P.ContextConsumer = w, P.ContextProvider = S, P.Element = M, P.ForwardRef = I, P.Fragment = B, P.Lazy = L, P.Memo = W, P.Portal = K, P.Profiler = ce, P.StrictMode = we, P.Suspense = Se, P.SuspenseList = Me, P.isAsyncMode = Ee, P.isConcurrentMode = Xe, P.isContextConsumer = Je, P.isContextProvider = Ae, P.isElement = pe, P.isForwardRef = Pe, P.isFragment = Gt, P.isLazy = Kt, P.isMemo = Zt, P.isPortal = Xt, P.isProfiler = Jt, P.isStrictMode = Qt, P.isSuspense = C, P.isSuspenseList = Qe, P.isValidElementType = E, P.typeOf = p;
1549
+ P.ContextConsumer = w, P.ContextProvider = S, P.Element = M, P.ForwardRef = I, P.Fragment = B, P.Lazy = L, P.Memo = W, P.Portal = K, P.Profiler = ce, P.StrictMode = we, P.Suspense = Se, P.SuspenseList = $e, P.isAsyncMode = Ee, P.isConcurrentMode = Xe, P.isContextConsumer = Je, P.isContextProvider = Ie, P.isElement = pe, P.isForwardRef = Ae, P.isFragment = Gt, P.isLazy = Kt, P.isMemo = Zt, P.isPortal = Xt, P.isProfiler = Jt, P.isStrictMode = Qt, P.isSuspense = C, P.isSuspenseList = Qe, P.isValidElementType = E, P.typeOf = p;
1550
1550
  }()), P;
1551
1551
  }
1552
1552
  process.env.NODE_ENV === "production" ? ir.exports = yi() : ir.exports = bi();
@@ -1585,14 +1585,14 @@ const wi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1585
1585
  default: _i,
1586
1586
  getFunctionName: Rn
1587
1587
  }, Symbol.toStringTag, { value: "Module" }));
1588
- function ke(e) {
1588
+ function Ne(e) {
1589
1589
  if (typeof e != "string")
1590
1590
  throw new Error(process.env.NODE_ENV !== "production" ? "MUI: `capitalize(string)` expects a string argument." : nt(7));
1591
1591
  return e.charAt(0).toUpperCase() + e.slice(1);
1592
1592
  }
1593
1593
  const Si = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1594
1594
  __proto__: null,
1595
- default: ke
1595
+ default: Ne
1596
1596
  }, Symbol.toStringTag, { value: "Module" }));
1597
1597
  function zn(e, t) {
1598
1598
  const r = z({}, t);
@@ -1818,7 +1818,7 @@ function U(e) {
1818
1818
  const l = a[t], u = a.theme, f = Pt(u, n) || {};
1819
1819
  return ge(a, l, (m) => {
1820
1820
  let g = Nt(f, o, m);
1821
- return m === g && typeof m == "string" && (g = Nt(f, o, `${t}${m === "default" ? "" : ke(m)}`, m)), r === !1 ? g : {
1821
+ return m === g && typeof m == "string" && (g = Nt(f, o, `${t}${m === "default" ? "" : Ne(m)}`, m)), r === !1 ? g : {
1822
1822
  [r]: g
1823
1823
  };
1824
1824
  });
@@ -1997,22 +1997,22 @@ const aa = U({
1997
1997
  prop: "gridArea"
1998
1998
  });
1999
1999
  zt(Ft, jt, Vt, aa, sa, la, ca, da, ua, fa, ha, ma);
2000
- function Be(e, t) {
2000
+ function He(e, t) {
2001
2001
  return t === "grey" ? t : e;
2002
2002
  }
2003
2003
  const pa = U({
2004
2004
  prop: "color",
2005
2005
  themeKey: "palette",
2006
- transform: Be
2006
+ transform: He
2007
2007
  }), ga = U({
2008
2008
  prop: "bgcolor",
2009
2009
  cssProperty: "backgroundColor",
2010
2010
  themeKey: "palette",
2011
- transform: Be
2011
+ transform: He
2012
2012
  }), ya = U({
2013
2013
  prop: "backgroundColor",
2014
2014
  themeKey: "palette",
2015
- transform: Be
2015
+ transform: He
2016
2016
  });
2017
2017
  zt(pa, ga, ya);
2018
2018
  function te(e) {
@@ -2117,16 +2117,16 @@ const Ea = {
2117
2117
  // palette
2118
2118
  color: {
2119
2119
  themeKey: "palette",
2120
- transform: Be
2120
+ transform: He
2121
2121
  },
2122
2122
  bgcolor: {
2123
2123
  themeKey: "palette",
2124
2124
  cssProperty: "backgroundColor",
2125
- transform: Be
2125
+ transform: He
2126
2126
  },
2127
2127
  backgroundColor: {
2128
2128
  themeKey: "palette",
2129
- transform: Be
2129
+ transform: He
2130
2130
  },
2131
2131
  // spacing
2132
2132
  p: {
@@ -2383,7 +2383,7 @@ function Vn() {
2383
2383
  const g = Pt(o, f) || {};
2384
2384
  return m ? m(a) : ge(a, n, (y) => {
2385
2385
  let s = Nt(g, h, y);
2386
- return y === s && typeof y == "string" && (s = Nt(g, h, `${r}${y === "default" ? "" : ke(y)}`, y)), u === !1 ? s : {
2386
+ return y === s && typeof y == "string" && (s = Nt(g, h, `${r}${y === "default" ? "" : Ne(y)}`, y)), u === !1 ? s : {
2387
2387
  [u]: s
2388
2388
  };
2389
2389
  });
@@ -2773,7 +2773,7 @@ function Ga(e, t, r) {
2773
2773
  function Yr(e, t, r, n) {
2774
2774
  return Wt(e, t, r, wr, ot(e, 0, n), ot(e, n + 1, -1), n);
2775
2775
  }
2776
- function We(e, t) {
2776
+ function Be(e, t) {
2777
2777
  for (var r = "", n = Sr(e), o = 0; o < n; o++)
2778
2778
  r += t(e[o], o, e, t) || "";
2779
2779
  return r;
@@ -2789,11 +2789,11 @@ function Ka(e, t, r, n) {
2789
2789
  case xr:
2790
2790
  return "";
2791
2791
  case Un:
2792
- return e.return = e.value + "{" + We(e.children, n) + "}";
2792
+ return e.return = e.value + "{" + Be(e.children, n) + "}";
2793
2793
  case _r:
2794
2794
  e.value = e.props.join(",");
2795
2795
  }
2796
- return de(r = We(e.children, n)) ? e.return = e.value + "{" + r + "}" : "";
2796
+ return de(r = Be(e.children, n)) ? e.return = e.value + "{" + r + "}" : "";
2797
2797
  }
2798
2798
  function Za(e) {
2799
2799
  var t = Sr(e);
@@ -3014,7 +3014,7 @@ var ls = function(t, r, n, o) {
3014
3014
  t.return = Xn(t.value, t.length);
3015
3015
  break;
3016
3016
  case Un:
3017
- return We([et(t, {
3017
+ return Be([et(t, {
3018
3018
  value: $(t.value, "@", "@" + k)
3019
3019
  })], o);
3020
3020
  case _r:
@@ -3023,11 +3023,11 @@ var ls = function(t, r, n, o) {
3023
3023
  switch (Fa(i, /(::plac\w+|:read-\w+)/)) {
3024
3024
  case ":read-only":
3025
3025
  case ":read-write":
3026
- return We([et(t, {
3026
+ return Be([et(t, {
3027
3027
  props: [$(i, /:(read-\w+)/, ":" + kt + "$1")]
3028
3028
  })], o);
3029
3029
  case "::placeholder":
3030
- return We([et(t, {
3030
+ return Be([et(t, {
3031
3031
  props: [$(i, /:(plac\w+)/, ":" + k + "input-$1")]
3032
3032
  }), et(t, {
3033
3033
  props: [$(i, /:(plac\w+)/, ":" + kt + "$1")]
@@ -3076,7 +3076,7 @@ If multiple caches share the same key they might "fight" for each other's style
3076
3076
  } : Xa(function(s) {
3077
3077
  h.insert(s);
3078
3078
  })], g = Za(f.concat(o, m)), b = function(d) {
3079
- return We(Ya(d), g);
3079
+ return Be(Ya(d), g);
3080
3080
  };
3081
3081
  u = function(d, v, x, _) {
3082
3082
  h = x, process.env.NODE_ENV !== "production" && v.map !== void 0 && (h = {
@@ -3210,14 +3210,14 @@ function us() {
3210
3210
  case m:
3211
3211
  return O;
3212
3212
  default:
3213
- var Re = O && O.$$typeof;
3214
- switch (Re) {
3213
+ var Pe = O && O.$$typeof;
3214
+ switch (Pe) {
3215
3215
  case l:
3216
3216
  case h:
3217
3217
  case y:
3218
3218
  case b:
3219
3219
  case a:
3220
- return Re;
3220
+ return Pe;
3221
3221
  default:
3222
3222
  return Qe;
3223
3223
  }
@@ -3227,8 +3227,8 @@ function us() {
3227
3227
  }
3228
3228
  }
3229
3229
  }
3230
- var p = u, w = f, S = l, M = a, I = t, B = h, L = n, W = y, K = b, ce = r, we = i, Se = o, Me = m, me = !1;
3231
- function Ie(C) {
3230
+ var p = u, w = f, S = l, M = a, I = t, B = h, L = n, W = y, K = b, ce = r, we = i, Se = o, $e = m, me = !1;
3231
+ function Me(C) {
3232
3232
  return me || (me = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), Ee(C) || E(C) === u;
3233
3233
  }
3234
3234
  function Ee(C) {
@@ -3240,13 +3240,13 @@ function us() {
3240
3240
  function Je(C) {
3241
3241
  return E(C) === a;
3242
3242
  }
3243
- function Ae(C) {
3243
+ function Ie(C) {
3244
3244
  return typeof C == "object" && C !== null && C.$$typeof === t;
3245
3245
  }
3246
3246
  function pe(C) {
3247
3247
  return E(C) === h;
3248
3248
  }
3249
- function Pe(C) {
3249
+ function Ae(C) {
3250
3250
  return E(C) === n;
3251
3251
  }
3252
3252
  function Gt(C) {
@@ -3267,7 +3267,7 @@ function us() {
3267
3267
  function Qt(C) {
3268
3268
  return E(C) === m;
3269
3269
  }
3270
- D.AsyncMode = p, D.ConcurrentMode = w, D.ContextConsumer = S, D.ContextProvider = M, D.Element = I, D.ForwardRef = B, D.Fragment = L, D.Lazy = W, D.Memo = K, D.Portal = ce, D.Profiler = we, D.StrictMode = Se, D.Suspense = Me, D.isAsyncMode = Ie, D.isConcurrentMode = Ee, D.isContextConsumer = Xe, D.isContextProvider = Je, D.isElement = Ae, D.isForwardRef = pe, D.isFragment = Pe, D.isLazy = Gt, D.isMemo = Kt, D.isPortal = Zt, D.isProfiler = Xt, D.isStrictMode = Jt, D.isSuspense = Qt, D.isValidElementType = _, D.typeOf = E;
3270
+ D.AsyncMode = p, D.ConcurrentMode = w, D.ContextConsumer = S, D.ContextProvider = M, D.Element = I, D.ForwardRef = B, D.Fragment = L, D.Lazy = W, D.Memo = K, D.Portal = ce, D.Profiler = we, D.StrictMode = Se, D.Suspense = $e, D.isAsyncMode = Me, D.isConcurrentMode = Ee, D.isContextConsumer = Xe, D.isContextProvider = Je, D.isElement = Ie, D.isForwardRef = pe, D.isFragment = Ae, D.isLazy = Gt, D.isMemo = Kt, D.isPortal = Zt, D.isProfiler = Xt, D.isStrictMode = Jt, D.isSuspense = Qt, D.isValidElementType = _, D.typeOf = E;
3271
3271
  }()), D;
3272
3272
  }
3273
3273
  process.env.NODE_ENV === "production" ? lr.exports = ds() : lr.exports = us();
@@ -3562,8 +3562,8 @@ var Ns = Tr.Provider, Yt = function(t) {
3562
3562
  var o = be(Tr);
3563
3563
  return t(r, o, n);
3564
3564
  });
3565
- }, $e = /* @__PURE__ */ F.createContext({});
3566
- process.env.NODE_ENV !== "production" && ($e.displayName = "EmotionThemeContext");
3565
+ }, ke = /* @__PURE__ */ F.createContext({});
3566
+ process.env.NODE_ENV !== "production" && (ke.displayName = "EmotionThemeContext");
3567
3567
  var nn = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", on = "__EMOTION_LABEL_PLEASE_DO_NOT_USE__", ks = function(t) {
3568
3568
  var r = t.cache, n = t.serialized, o = t.isStringTag;
3569
3569
  return Ut(r, n, o), Or(function() {
@@ -3574,7 +3574,7 @@ var nn = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", on = "__EMOTION_LABEL_PLEASE_DO_N
3574
3574
  typeof n == "string" && t.registered[n] !== void 0 && (n = t.registered[n]);
3575
3575
  var o = e[nn], i = [n], a = "";
3576
3576
  typeof e.className == "string" ? a = Er(t.registered, i, e.className) : e.className != null && (a = e.className + " ");
3577
- var l = qe(i, void 0, F.useContext($e));
3577
+ var l = qe(i, void 0, F.useContext(ke));
3578
3578
  if (process.env.NODE_ENV !== "production" && l.name.indexOf("-") === -1) {
3579
3579
  var u = e[on];
3580
3580
  u && (l = qe([l, "label:" + u + ";"]));
@@ -3726,7 +3726,7 @@ var Ms = {
3726
3726
  // means it will be turned into a className prop
3727
3727
  // $FlowFixMe I don't really want to add it to the type since it shouldn't be used
3728
3728
  (e.className || e.css) && (console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?"), an = !0);
3729
- var r = e.styles, n = qe([r], void 0, F.useContext($e)), o = F.useRef();
3729
+ var r = e.styles, n = qe([r], void 0, F.useContext(ke)), o = F.useRef();
3730
3730
  return rn(function() {
3731
3731
  var i = t.key + "-global", a = new t.sheet.constructor({
3732
3732
  key: i,
@@ -3819,7 +3819,7 @@ var Rs = function(t) {
3819
3819
  }, a = {
3820
3820
  css: o,
3821
3821
  cx: i,
3822
- theme: F.useContext($e)
3822
+ theme: F.useContext(ke)
3823
3823
  }, l = e.children(a);
3824
3824
  return r = !0, /* @__PURE__ */ F.createElement(F.Fragment, null, /* @__PURE__ */ F.createElement(Rs, {
3825
3825
  cache: t,
@@ -3883,7 +3883,7 @@ You may have forgotten to import it.`);
3883
3883
  p = {};
3884
3884
  for (var w in s)
3885
3885
  p[w] = s[w];
3886
- p.theme = F.useContext($e);
3886
+ p.theme = F.useContext(ke);
3887
3887
  }
3888
3888
  typeof s.className == "string" ? _ = Er(d.registered, E, s.className) : s.className != null && (_ = s.className + " ");
3889
3889
  var S = qe(m.concat(E), d.registered, p);
@@ -4112,7 +4112,7 @@ const Us = (e, t) => {
4112
4112
  __proto__: null,
4113
4113
  GlobalStyles: lo,
4114
4114
  StyledEngineProvider: so,
4115
- ThemeContext: $e,
4115
+ ThemeContext: ke,
4116
4116
  css: ao,
4117
4117
  default: Ws,
4118
4118
  internal_processStyles: Us,
@@ -4122,7 +4122,7 @@ function Ys(e) {
4122
4122
  return Object.keys(e).length === 0;
4123
4123
  }
4124
4124
  function Gs(e = null) {
4125
- const t = F.useContext($e);
4125
+ const t = F.useContext(ke);
4126
4126
  return !t || Ys(t) ? e : t;
4127
4127
  }
4128
4128
  const Ks = br();
@@ -4403,7 +4403,7 @@ const y0 = {
4403
4403
  A200: "#e040fb",
4404
4404
  A400: "#d500f9",
4405
4405
  A700: "#aa00ff"
4406
- }, De = x0, _0 = {
4406
+ }, Re = x0, _0 = {
4407
4407
  50: "#ffebee",
4408
4408
  100: "#ffcdd2",
4409
4409
  200: "#ef9a9a",
@@ -4418,7 +4418,7 @@ const y0 = {
4418
4418
  A200: "#ff5252",
4419
4419
  A400: "#ff1744",
4420
4420
  A700: "#d50000"
4421
- }, ze = _0, w0 = {
4421
+ }, De = _0, w0 = {
4422
4422
  50: "#fff3e0",
4423
4423
  100: "#ffe0b2",
4424
4424
  200: "#ffcc80",
@@ -4448,7 +4448,7 @@ const y0 = {
4448
4448
  A200: "#448aff",
4449
4449
  A400: "#2979ff",
4450
4450
  A700: "#2962ff"
4451
- }, Le = S0, E0 = {
4451
+ }, ze = S0, E0 = {
4452
4452
  50: "#e1f5fe",
4453
4453
  100: "#b3e5fc",
4454
4454
  200: "#81d4fa",
@@ -4463,7 +4463,7 @@ const y0 = {
4463
4463
  A200: "#40c4ff",
4464
4464
  A400: "#00b0ff",
4465
4465
  A700: "#0091ea"
4466
- }, Fe = E0, C0 = {
4466
+ }, Le = E0, C0 = {
4467
4467
  50: "#e8f5e9",
4468
4468
  100: "#c8e6c9",
4469
4469
  200: "#a5d6a7",
@@ -4478,7 +4478,7 @@ const y0 = {
4478
4478
  A200: "#69f0ae",
4479
4479
  A400: "#00e676",
4480
4480
  A700: "#00c853"
4481
- }, je = C0, O0 = ["mode", "contrastThreshold", "tonalOffset"], pn = {
4481
+ }, Fe = C0, O0 = ["mode", "contrastThreshold", "tonalOffset"], pn = {
4482
4482
  // The colors used to style the text.
4483
4483
  text: {
4484
4484
  // The most important text.
@@ -4547,59 +4547,59 @@ function gn(e, t, r, n) {
4547
4547
  }
4548
4548
  function T0(e = "light") {
4549
4549
  return e === "dark" ? {
4550
- main: Le[200],
4551
- light: Le[50],
4552
- dark: Le[400]
4550
+ main: ze[200],
4551
+ light: ze[50],
4552
+ dark: ze[400]
4553
4553
  } : {
4554
- main: Le[700],
4555
- light: Le[400],
4556
- dark: Le[800]
4554
+ main: ze[700],
4555
+ light: ze[400],
4556
+ dark: ze[800]
4557
4557
  };
4558
4558
  }
4559
4559
  function N0(e = "light") {
4560
4560
  return e === "dark" ? {
4561
- main: De[200],
4562
- light: De[50],
4563
- dark: De[400]
4561
+ main: Re[200],
4562
+ light: Re[50],
4563
+ dark: Re[400]
4564
4564
  } : {
4565
+ main: Re[500],
4566
+ light: Re[300],
4567
+ dark: Re[700]
4568
+ };
4569
+ }
4570
+ function k0(e = "light") {
4571
+ return e === "dark" ? {
4565
4572
  main: De[500],
4566
4573
  light: De[300],
4567
4574
  dark: De[700]
4575
+ } : {
4576
+ main: De[700],
4577
+ light: De[400],
4578
+ dark: De[800]
4568
4579
  };
4569
4580
  }
4570
- function k0(e = "light") {
4581
+ function $0(e = "light") {
4571
4582
  return e === "dark" ? {
4572
- main: ze[500],
4573
- light: ze[300],
4574
- dark: ze[700]
4583
+ main: Le[400],
4584
+ light: Le[300],
4585
+ dark: Le[700]
4575
4586
  } : {
4576
- main: ze[700],
4577
- light: ze[400],
4578
- dark: ze[800]
4587
+ main: Le[700],
4588
+ light: Le[500],
4589
+ dark: Le[900]
4579
4590
  };
4580
4591
  }
4581
- function $0(e = "light") {
4592
+ function M0(e = "light") {
4582
4593
  return e === "dark" ? {
4583
4594
  main: Fe[400],
4584
4595
  light: Fe[300],
4585
4596
  dark: Fe[700]
4586
4597
  } : {
4587
- main: Fe[700],
4598
+ main: Fe[800],
4588
4599
  light: Fe[500],
4589
4600
  dark: Fe[900]
4590
4601
  };
4591
4602
  }
4592
- function M0(e = "light") {
4593
- return e === "dark" ? {
4594
- main: je[400],
4595
- light: je[300],
4596
- dark: je[700]
4597
- } : {
4598
- main: je[800],
4599
- light: je[500],
4600
- dark: je[900]
4601
- };
4602
- }
4603
4603
  function I0(e = "light") {
4604
4604
  return e === "dark" ? {
4605
4605
  main: tt[400],
@@ -5095,7 +5095,7 @@ const Tl = ["children", "className", "color", "component", "fontSize", "htmlColo
5095
5095
  fontSize: r,
5096
5096
  classes: n
5097
5097
  } = e, o = {
5098
- root: ["root", t !== "inherit" && `color${ke(t)}`, `fontSize${ke(r)}`]
5098
+ root: ["root", t !== "inherit" && `color${Ne(t)}`, `fontSize${Ne(r)}`]
5099
5099
  };
5100
5100
  return Ei(o, Ol, n);
5101
5101
  }, kl = Cl("svg", {
@@ -5105,7 +5105,7 @@ const Tl = ["children", "className", "color", "component", "fontSize", "htmlColo
5105
5105
  const {
5106
5106
  ownerState: r
5107
5107
  } = e;
5108
- return [t.root, r.color !== "inherit" && t[`color${ke(r.color)}`], t[`fontSize${ke(r.fontSize)}`]];
5108
+ return [t.root, r.color !== "inherit" && t[`color${Ne(r.color)}`], t[`fontSize${Ne(r.fontSize)}`]];
5109
5109
  }
5110
5110
  })(({
5111
5111
  theme: e,
@@ -5315,15 +5315,15 @@ function On(e) {
5315
5315
  }
5316
5316
  return or;
5317
5317
  }
5318
- var Ve = null;
5318
+ var je = null;
5319
5319
  function Tn(e) {
5320
- if (e === void 0 && (e = !1), Ve === null || e) {
5320
+ if (e === void 0 && (e = !1), je === null || e) {
5321
5321
  var t = document.createElement("div"), r = t.style;
5322
5322
  r.width = "50px", r.height = "50px", r.overflow = "scroll", r.direction = "rtl";
5323
5323
  var n = document.createElement("div"), o = n.style;
5324
- return o.width = "100px", o.height = "100px", t.appendChild(n), document.body.appendChild(t), t.scrollLeft > 0 ? Ve = "positive-descending" : (t.scrollLeft = 1, t.scrollLeft === 0 ? Ve = "negative" : Ve = "positive-ascending"), document.body.removeChild(t), Ve;
5324
+ return o.width = "100px", o.height = "100px", t.appendChild(n), document.body.appendChild(t), t.scrollLeft > 0 ? je = "positive-descending" : (t.scrollLeft = 1, t.scrollLeft === 0 ? je = "negative" : je = "positive-ascending"), document.body.removeChild(t), je;
5325
5325
  }
5326
- return Ve;
5326
+ return je;
5327
5327
  }
5328
5328
  process.env.NODE_ENV;
5329
5329
  var Dl = 150, zl = function(t, r) {
@@ -5477,20 +5477,20 @@ function Ll(e) {
5477
5477
  }, b.componentWillUnmount = function() {
5478
5478
  this._resetIsScrollingTimeoutId !== null && Cn(this._resetIsScrollingTimeoutId);
5479
5479
  }, b.render = function() {
5480
- var s = this.props, d = s.children, v = s.className, x = s.direction, _ = s.height, E = s.innerRef, p = s.innerElementType, w = s.innerTagName, S = s.itemCount, M = s.itemData, I = s.itemKey, B = I === void 0 ? zl : I, L = s.layout, W = s.outerElementType, K = s.outerTagName, ce = s.style, we = s.useIsScrolling, Se = s.width, Me = this.state.isScrolling, me = x === "horizontal" || L === "horizontal", Ie = me ? this._onScrollHorizontal : this._onScrollVertical, Ee = this._getRangeToRender(), Xe = Ee[0], Je = Ee[1], Ae = [];
5480
+ var s = this.props, d = s.children, v = s.className, x = s.direction, _ = s.height, E = s.innerRef, p = s.innerElementType, w = s.innerTagName, S = s.itemCount, M = s.itemData, I = s.itemKey, B = I === void 0 ? zl : I, L = s.layout, W = s.outerElementType, K = s.outerTagName, ce = s.style, we = s.useIsScrolling, Se = s.width, $e = this.state.isScrolling, me = x === "horizontal" || L === "horizontal", Me = me ? this._onScrollHorizontal : this._onScrollVertical, Ee = this._getRangeToRender(), Xe = Ee[0], Je = Ee[1], Ie = [];
5481
5481
  if (S > 0)
5482
5482
  for (var pe = Xe; pe <= Je; pe++)
5483
- Ae.push(er(d, {
5483
+ Ie.push(er(d, {
5484
5484
  data: M,
5485
5485
  key: B(pe, M),
5486
5486
  index: pe,
5487
- isScrolling: we ? Me : void 0,
5487
+ isScrolling: we ? $e : void 0,
5488
5488
  style: this._getItemStyle(pe)
5489
5489
  }));
5490
- var Pe = n(this.props, this._instanceProps);
5490
+ var Ae = n(this.props, this._instanceProps);
5491
5491
  return er(W || K || "div", {
5492
5492
  className: v,
5493
- onScroll: Ie,
5493
+ onScroll: Me,
5494
5494
  ref: this._outerRefSetter,
5495
5495
  style: z({
5496
5496
  position: "relative",
@@ -5502,12 +5502,12 @@ function Ll(e) {
5502
5502
  direction: x
5503
5503
  }, ce)
5504
5504
  }, er(p || w || "div", {
5505
- children: Ae,
5505
+ children: Ie,
5506
5506
  ref: E,
5507
5507
  style: {
5508
- height: me ? "100%" : Pe,
5509
- pointerEvents: Me ? "none" : void 0,
5510
- width: me ? Pe : "100%"
5508
+ height: me ? "100%" : Ae,
5509
+ pointerEvents: $e ? "none" : void 0,
5510
+ width: me ? Ae : "100%"
5511
5511
  }
5512
5512
  }));
5513
5513
  }, b._callPropsCallbacks = function() {
@@ -5567,7 +5567,7 @@ var Fl = function(t, r) {
5567
5567
  if (!m && typeof i != "number")
5568
5568
  throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. ' + ('"' + (i === null ? "null" : typeof i) + '" was specified.'));
5569
5569
  }
5570
- }, jl = 50, He = function(t, r, n) {
5570
+ }, jl = 50, Ve = function(t, r, n) {
5571
5571
  var o = t, i = o.itemSize, a = n.itemMetadataMap, l = n.lastMeasuredIndex;
5572
5572
  if (r > l) {
5573
5573
  var u = 0;
@@ -5590,14 +5590,14 @@ var Fl = function(t, r) {
5590
5590
  return a >= n ? _o(t, r, i, 0, n) : Hl(t, r, Math.max(0, i), n);
5591
5591
  }, _o = function(t, r, n, o, i) {
5592
5592
  for (; o <= n; ) {
5593
- var a = o + Math.floor((n - o) / 2), l = He(t, a, r).offset;
5593
+ var a = o + Math.floor((n - o) / 2), l = Ve(t, a, r).offset;
5594
5594
  if (l === i)
5595
5595
  return a;
5596
5596
  l < i ? o = a + 1 : l > i && (n = a - 1);
5597
5597
  }
5598
5598
  return o > 0 ? o - 1 : 0;
5599
5599
  }, Hl = function(t, r, n, o) {
5600
- for (var i = t.itemCount, a = 1; n < i && He(t, n, r).offset < o; )
5600
+ for (var i = t.itemCount, a = 1; n < i && Ve(t, n, r).offset < o; )
5601
5601
  n += a, a *= 2;
5602
5602
  return _o(t, r, Math.min(n, i - 1), Math.floor(n / 2), o);
5603
5603
  }, Nn = function(t, r) {
@@ -5610,14 +5610,14 @@ var Fl = function(t, r) {
5610
5610
  return l + h;
5611
5611
  }, Bl = /* @__PURE__ */ Ll({
5612
5612
  getItemOffset: function(t, r, n) {
5613
- return He(t, r, n).offset;
5613
+ return Ve(t, r, n).offset;
5614
5614
  },
5615
5615
  getItemSize: function(t, r, n) {
5616
5616
  return n.itemMetadataMap[r].size;
5617
5617
  },
5618
5618
  getEstimatedTotalSize: Nn,
5619
5619
  getOffsetForIndexAndAlignment: function(t, r, n, o, i, a) {
5620
- var l = t.direction, u = t.height, f = t.layout, h = t.width, m = l === "horizontal" || f === "horizontal", g = m ? h : u, b = He(t, r, i), y = Nn(t, i), s = Math.max(0, Math.min(y - g, b.offset)), d = Math.max(0, b.offset - g + b.size + a);
5620
+ var l = t.direction, u = t.height, f = t.layout, h = t.width, m = l === "horizontal" || f === "horizontal", g = m ? h : u, b = Ve(t, r, i), y = Nn(t, i), s = Math.max(0, Math.min(y - g, b.offset)), d = Math.max(0, b.offset - g + b.size + a);
5621
5621
  switch (n === "smart" && (o >= d - g && o <= s + g ? n = "auto" : n = "center"), n) {
5622
5622
  case "start":
5623
5623
  return s;
@@ -5634,8 +5634,8 @@ var Fl = function(t, r) {
5634
5634
  return Vl(t, n, r);
5635
5635
  },
5636
5636
  getStopIndexForStartIndex: function(t, r, n, o) {
5637
- for (var i = t.direction, a = t.height, l = t.itemCount, u = t.layout, f = t.width, h = i === "horizontal" || u === "horizontal", m = h ? f : a, g = He(t, r, o), b = n + m, y = g.offset + g.size, s = r; s < l - 1 && y < b; )
5638
- s++, y += He(t, s, o).size;
5637
+ for (var i = t.direction, a = t.height, l = t.itemCount, u = t.layout, f = t.width, h = i === "horizontal" || u === "horizontal", m = h ? f : a, g = Ve(t, r, o), b = n + m, y = g.offset + g.size, s = r; s < l - 1 && y < b; )
5638
+ s++, y += Ve(t, s, o).size;
5639
5639
  return s;
5640
5640
  },
5641
5641
  initInstanceProps: function(t, r) {
@@ -5677,9 +5677,9 @@ function kn(e) {
5677
5677
  transition: "0.2s",
5678
5678
  borderRadius: "5px",
5679
5679
  cursor: "pointer",
5680
- ...Tt({ backgroundColor: Te.primary200 }, e.select),
5680
+ ...Tt({ backgroundColor: We.primary200 }, e.select),
5681
5681
  ":hover": {
5682
- backgroundColor: Te.primary100,
5682
+ backgroundColor: "#eeeeee80",
5683
5683
  borderColor: "transparent"
5684
5684
  }
5685
5685
  },
@@ -6356,7 +6356,7 @@ const wo = (e) => {
6356
6356
  context: ""
6357
6357
  });
6358
6358
  console.log(t);
6359
- const { setNotiData: n } = be(Ne);
6359
+ const { setNotiData: n } = be(Te);
6360
6360
  function o() {
6361
6361
  return /* @__PURE__ */ c("div", { className: gt["notification-massage_container"], children: /* @__PURE__ */ T("div", { className: gt["notification-massage_content"], children: [
6362
6362
  /* @__PURE__ */ c("h6", { className: gt["notification-name"], children: t == null ? void 0 : t.userName }),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ukpc-lib/react",
3
3
  "private": false,
4
- "version": "0.3.20",
4
+ "version": "0.3.21",
5
5
  "type": "module",
6
6
  "main": "./dist/",
7
7
  "module": "./dist/",