@3sc/common-component 0.0.6 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.js +16 -18
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +2 -13
- package/dist/index.css.map +1 -0
- package/dist/index.esm.mjs +2 -0
- package/dist/index.esm.mjs.map +1 -0
- package/dist/index.js +2 -15
- package/dist/index.js.map +1 -0
- package/dist/index.modern.js +2 -0
- package/dist/index.modern.js.map +1 -0
- package/dist/index.modern.mjs +2 -0
- package/dist/index.modern.mjs.map +1 -0
- package/dist/index.module.js +2 -0
- package/dist/index.module.js.map +1 -0
- package/dist/index.umd.js +2 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/modules/common-component +2 -0
- package/dist/modules/common-component.cjs +2 -0
- package/dist/modules/common-component.cjs.map +1 -0
- package/dist/modules/common-component.css +2 -0
- package/dist/modules/common-component.css.map +1 -0
- package/dist/modules/common-component.map +1 -0
- package/dist/modules/common-component.modern.js +2 -0
- package/dist/modules/common-component.modern.js.map +1 -0
- package/dist/modules/common-component.umd.js +2 -0
- package/dist/modules/common-component.umd.js.map +1 -0
- package/package.json +6 -7
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import e,{useReducer as t,createContext as n,useState as r,useEffect as o,useContext as i,useCallback as a}from"react";import c from"react-dom/client";import{IconButton as u,Dialog as s,DialogTitle as l,Box as f,Typography as p,DialogActions as d,Button as y,Stack as m,Badge as v,Checkbox as g,Chip as b,TextField as S,DialogContent as w,CircularProgress as O,InputAdornment as R,createTheme as E,ThemeProvider as j}from"@mui/material";import A from"@mui/icons-material/NotificationsOutlined";import C from"@mui/material/Badge";import{styled as T}from"@mui/material/styles";import P from"@mui/icons-material/Refresh";import N from"@mui/icons-material/Close";import{grey as x,blue as I}from"@mui/material/colors";import k from"axios";import _ from"@mui/icons-material/Search";import D from"@mui/material/Pagination";import M from"react-select";var L="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function F(e){var t={exports:{}};return e(t,t.exports),t.exports}var $,U,B=function(e){return e&&e.Math===Math&&e},V=B("object"==typeof globalThis&&globalThis)||B("object"==typeof window&&window)||B("object"==typeof self&&self)||B("object"==typeof L&&L)||B("object"==typeof L&&L)||function(){return this}()||Function("return this")(),z={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},G="object"==typeof document&&document.all,W=void 0===G&&void 0!==G?function(e){return"function"==typeof e||e===G}:function(e){return"function"==typeof e},K=function(e){return"object"==typeof e?null!==e:W(e)},q=V.document,H=K(q)&&K(q.createElement),J=function(e){return H?q.createElement(e):{}},Y=J("span").classList,X=Y&&Y.constructor&&Y.constructor.prototype,Q=X===Object.prototype?void 0:X,Z=function(e){try{return!!e()}catch(e){return!0}},ee=!Z(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),te=Function.prototype,ne=te.call,re=ee&&te.bind.bind(ne,ne),oe=ee?re:function(e){return function(){return ne.apply(e,arguments)}},ie=oe({}.toString),ae=oe("".slice),ce=function(e){return ae(ie(e),8,-1)},ue=Object,se=oe("".split),le=Z(function(){return!ue("z").propertyIsEnumerable(0)})?function(e){return"String"===ce(e)?se(e,""):ue(e)}:ue,fe=function(e){return null==e},pe=TypeError,de=function(e){if(fe(e))throw new pe("Can't call method on "+e);return e},he=function(e){return le(de(e))},ye=Object.defineProperty,me=function(e,t){try{ye(V,e,{value:t,configurable:!0,writable:!0})}catch(n){V[e]=t}return t},ve="__core-js_shared__",ge=V[ve]||me(ve,{}),be=F(function(e){(e.exports=function(e,t){return ge[e]||(ge[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.35.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.35.0/LICENSE",source:"https://github.com/zloirock/core-js"})}),Se=Object,we=function(e){return Se(de(e))},Oe=oe({}.hasOwnProperty),Re=Object.hasOwn||function(e,t){return Oe(we(e),t)},Ee=0,je=Math.random(),Ae=oe(1..toString),Ce=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Ae(++Ee+je,36)},Te="undefined"!=typeof navigator&&String(navigator.userAgent)||"",Pe=V.process,Ne=V.Deno,xe=Pe&&Pe.versions||Ne&&Ne.version,Ie=xe&&xe.v8;Ie&&(U=($=Ie.split("."))[0]>0&&$[0]<4?1:+($[0]+$[1])),!U&&Te&&(!($=Te.match(/Edge\/(\d+)/))||$[1]>=74)&&($=Te.match(/Chrome\/(\d+)/))&&(U=+$[1]);var ke,_e=U,De=V.String,Me=!!Object.getOwnPropertySymbols&&!Z(function(){var e=Symbol("symbol detection");return!De(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&_e&&_e<41}),Le=Me&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Fe=V.Symbol,$e=be("wks"),Ue=Le?Fe.for||Fe:Fe&&Fe.withoutSetter||Ce,Be=function(e){return Re($e,e)||($e[e]=Me&&Re(Fe,e)?Fe[e]:Ue("Symbol."+e)),$e[e]},Ve=String,ze=TypeError,Ge=function(e){if(K(e))return e;throw new ze(Ve(e)+" is not an object")},We=!Z(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}),Ke=We&&Z(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),qe=!We&&!Z(function(){return 7!==Object.defineProperty(J("div"),"a",{get:function(){return 7}}).a}),He=Function.prototype.call,Je=ee?He.bind(He):function(){return He.apply(He,arguments)},Ye=function(e,t){return arguments.length<2?W(n=V[e])?n:void 0:V[e]&&V[e][t];var n},Xe=oe({}.isPrototypeOf),Qe=Object,Ze=Le?function(e){return"symbol"==typeof e}:function(e){var t=Ye("Symbol");return W(t)&&Xe(t.prototype,Qe(e))},et=String,tt=function(e){try{return et(e)}catch(e){return"Object"}},nt=TypeError,rt=function(e){if(W(e))return e;throw new nt(tt(e)+" is not a function")},ot=function(e,t){var n=e[t];return fe(n)?void 0:rt(n)},it=TypeError,at=TypeError,ct=Be("toPrimitive"),ut=function(e){var t=function(e,t){if(!K(e)||Ze(e))return e;var n,r=ot(e,ct);if(r){if(void 0===t&&(t="default"),n=Je(r,e,t),!K(n)||Ze(n))return n;throw new at("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var n,r;if("string"===t&&W(n=e.toString)&&!K(r=Je(n,e)))return r;if(W(n=e.valueOf)&&!K(r=Je(n,e)))return r;if("string"!==t&&W(n=e.toString)&&!K(r=Je(n,e)))return r;throw new it("Can't convert object to primitive value")}(e,t)}(e,"string");return Ze(t)?t:t+""},st=TypeError,lt=Object.defineProperty,ft=Object.getOwnPropertyDescriptor,pt="enumerable",dt="configurable",ht="writable",yt={f:We?Ke?function(e,t,n){if(Ge(e),t=ut(t),Ge(n),"function"==typeof e&&"prototype"===t&&"value"in n&&ht in n&&!n[ht]){var r=ft(e,t);r&&r[ht]&&(e[t]=n.value,n={configurable:dt in n?n[dt]:r[dt],enumerable:pt in n?n[pt]:r[pt],writable:!1})}return lt(e,t,n)}:lt:function(e,t,n){if(Ge(e),t=ut(t),Ge(n),qe)try{return lt(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new st("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},mt=Math.ceil,vt=Math.floor,gt=Math.trunc||function(e){var t=+e;return(t>0?vt:mt)(t)},bt=function(e){var t=+e;return t!=t||0===t?0:gt(t)},St=Math.max,wt=Math.min,Ot=Math.min,Rt=function(e){return(t=e.length)>0?Ot(bt(t),9007199254740991):0;var t},Et=function(e){return function(t,n,r){var o,i=he(t),a=Rt(i),c=function(e,t){var n=bt(e);return n<0?St(n+t,0):wt(n,t)}(r,a);if(e&&n!=n){for(;a>c;)if((o=i[c++])!=o)return!0}else for(;a>c;c++)if((e||c in i)&&i[c]===n)return e||c||0;return!e&&-1}},jt={includes:Et(!0),indexOf:Et(!1)},At={},Ct=jt.indexOf,Tt=oe([].push),Pt=function(e,t){var n,r=he(e),o=0,i=[];for(n in r)!Re(At,n)&&Re(r,n)&&Tt(i,n);for(;t.length>o;)Re(r,n=t[o++])&&(~Ct(i,n)||Tt(i,n));return i},Nt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],xt=Object.keys||function(e){return Pt(e,Nt)},It=We&&!Ke?Object.defineProperties:function(e,t){Ge(e);for(var n,r=he(t),o=xt(t),i=o.length,a=0;i>a;)yt.f(e,n=o[a++],r[n]);return e},kt={f:It},_t=Ye("document","documentElement"),Dt=be("keys"),Mt=function(e){return Dt[e]||(Dt[e]=Ce(e))},Lt="prototype",Ft="script",$t=Mt("IE_PROTO"),Ut=function(){},Bt=function(e){return"<"+Ft+">"+e+"</"+Ft+">"},Vt=function(e){e.write(Bt("")),e.close();var t=e.parentWindow.Object;return e=null,t},zt=function(){try{ke=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;zt="undefined"!=typeof document?document.domain&&ke?Vt(ke):(t=J("iframe"),n="java"+Ft+":",t.style.display="none",_t.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Bt("document.F=Object")),e.close(),e.F):Vt(ke);for(var r=Nt.length;r--;)delete zt[Lt][Nt[r]];return zt()};At[$t]=!0;var Gt=Object.create||function(e,t){var n;return null!==e?(Ut[Lt]=Ge(e),n=new Ut,Ut[Lt]=null,n[$t]=e):n=zt(),void 0===t?n:kt.f(n,t)},Wt=yt.f,Kt=Be("unscopables"),qt=Array.prototype;void 0===qt[Kt]&&Wt(qt,Kt,{configurable:!0,value:Gt(null)});var Ht,Jt,Yt,Xt=function(e){qt[Kt][e]=!0},Qt={},Zt=V.WeakMap,en=W(Zt)&&/native code/.test(String(Zt)),tn=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},nn=We?function(e,t,n){return yt.f(e,t,tn(1,n))}:function(e,t,n){return e[t]=n,e},rn="Object already initialized",on=V.TypeError;if(en||ge.state){var an=ge.state||(ge.state=new(0,V.WeakMap));an.get=an.get,an.has=an.has,an.set=an.set,Ht=function(e,t){if(an.has(e))throw new on(rn);return t.facade=e,an.set(e,t),t},Jt=function(e){return an.get(e)||{}},Yt=function(e){return an.has(e)}}else{var cn=Mt("state");At[cn]=!0,Ht=function(e,t){if(Re(e,cn))throw new on(rn);return t.facade=e,nn(e,cn,t),t},Jt=function(e){return Re(e,cn)?e[cn]:{}},Yt=function(e){return Re(e,cn)}}var un={set:Ht,get:Jt,has:Yt,enforce:function(e){return Yt(e)?Jt(e):Ht(e,{})},getterFor:function(e){return function(t){var n;if(!K(t)||(n=Jt(t)).type!==e)throw new on("Incompatible receiver, "+e+" required");return n}}},sn={}.propertyIsEnumerable,ln=Object.getOwnPropertyDescriptor,fn=ln&&!sn.call({1:2},1)?function(e){var t=ln(this,e);return!!t&&t.enumerable}:sn,pn={f:fn},dn=Object.getOwnPropertyDescriptor,hn={f:We?dn:function(e,t){if(e=he(e),t=ut(t),qe)try{return dn(e,t)}catch(e){}if(Re(e,t))return tn(!Je(pn.f,e,t),e[t])}},yn=Function.prototype,mn=We&&Object.getOwnPropertyDescriptor,vn=Re(yn,"name"),gn={EXISTS:vn,PROPER:vn&&"something"===function(){}.name,CONFIGURABLE:vn&&(!We||We&&mn(yn,"name").configurable)},bn=oe(Function.toString);W(ge.inspectSource)||(ge.inspectSource=function(e){return bn(e)});var Sn,wn,On,Rn=ge.inspectSource,En=F(function(e){var t=gn.CONFIGURABLE,n=un.enforce,r=un.get,o=String,i=Object.defineProperty,a=oe("".slice),c=oe("".replace),u=oe([].join),s=We&&!Z(function(){return 8!==i(function(){},"length",{value:8}).length}),l=String(String).split("String"),f=e.exports=function(e,r,f){"Symbol("===a(o(r),0,7)&&(r="["+c(o(r),/^Symbol\(([^)]*)\)/,"$1")+"]"),f&&f.getter&&(r="get "+r),f&&f.setter&&(r="set "+r),(!Re(e,"name")||t&&e.name!==r)&&(We?i(e,"name",{value:r,configurable:!0}):e.name=r),s&&f&&Re(f,"arity")&&e.length!==f.arity&&i(e,"length",{value:f.arity});try{f&&Re(f,"constructor")&&f.constructor?We&&i(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var p=n(e);return Re(p,"source")||(p.source=u(l,"string"==typeof r?r:"")),e};Function.prototype.toString=f(function(){return W(this)&&r(this).source||Rn(this)},"toString")}),jn=function(e,t,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:t;if(W(n)&&En(n,i,r),r.global)o?e[t]=n:me(t,n);else{try{r.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=n:yt.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},An=Nt.concat("length","prototype"),Cn={f:Object.getOwnPropertyNames||function(e){return Pt(e,An)}},Tn={f:Object.getOwnPropertySymbols},Pn=oe([].concat),Nn=Ye("Reflect","ownKeys")||function(e){var t=Cn.f(Ge(e)),n=Tn.f;return n?Pn(t,n(e)):t},xn=function(e,t,n){for(var r=Nn(t),o=yt.f,i=hn.f,a=0;a<r.length;a++){var c=r[a];Re(e,c)||n&&Re(n,c)||o(e,c,i(t,c))}},In=/#|\.prototype\./,kn=function(e,t){var n=Dn[_n(e)];return n===Ln||n!==Mn&&(W(t)?Z(t):!!t)},_n=kn.normalize=function(e){return String(e).replace(In,".").toLowerCase()},Dn=kn.data={},Mn=kn.NATIVE="N",Ln=kn.POLYFILL="P",Fn=kn,$n=hn.f,Un=function(e,t){var n,r,o,i,a,c=e.target,u=e.global,s=e.stat;if(n=u?V:s?V[c]||me(c,{}):(V[c]||{}).prototype)for(r in t){if(i=t[r],o=e.dontCallGetSet?(a=$n(n,r))&&a.value:n[r],!Fn(u?r:c+(s?".":"#")+r,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;xn(i,o)}(e.sham||o&&o.sham)&&nn(i,"sham",!0),jn(n,r,i,e)}},Bn=!Z(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Vn=Mt("IE_PROTO"),zn=Object,Gn=zn.prototype,Wn=Bn?zn.getPrototypeOf:function(e){var t=we(e);if(Re(t,Vn))return t[Vn];var n=t.constructor;return W(n)&&t instanceof n?n.prototype:t instanceof zn?Gn:null},Kn=Be("iterator"),qn=!1;[].keys&&("next"in(On=[].keys())?(wn=Wn(Wn(On)))!==Object.prototype&&(Sn=wn):qn=!0);var Hn=!K(Sn)||Z(function(){var e={};return Sn[Kn].call(e)!==e});Hn&&(Sn={}),W(Sn[Kn])||jn(Sn,Kn,function(){return this});var Jn={IteratorPrototype:Sn,BUGGY_SAFARI_ITERATORS:qn},Yn=yt.f,Xn=Be("toStringTag"),Qn=function(e,t,n){e&&!n&&(e=e.prototype),e&&!Re(e,Xn)&&Yn(e,Xn,{configurable:!0,value:t})},Zn=Jn.IteratorPrototype,er=function(){return this},tr=String,nr=TypeError,rr=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=function(e,t,n){try{return oe(rt(Object.getOwnPropertyDescriptor(e,"__proto__").set))}catch(e){}}(Object.prototype))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Ge(n),function(e){if(function(e){return K(e)||null===e}(e))return e;throw new nr("Can't set "+tr(e)+" as a prototype")}(r),t?e(n,r):n.__proto__=r,n}}():void 0),or=gn.PROPER,ir=gn.CONFIGURABLE,ar=Jn.IteratorPrototype,cr=Jn.BUGGY_SAFARI_ITERATORS,ur=Be("iterator"),sr="keys",lr="values",fr="entries",pr=function(){return this},dr=function(e,t){return{value:e,done:t}},hr=yt.f,yr="Array Iterator",mr=un.set,vr=un.getterFor(yr),gr=function(e,t,n,r,o,i,a){!function(e,t,n,r){var o=t+" Iterator";e.prototype=Gt(Zn,{next:tn(1,function(){var e=vr(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,dr(void 0,!0);switch(e.kind){case"keys":return dr(n,!1);case"values":return dr(t[n],!1)}return dr([n,t[n]],!1)})}),Qn(e,o,!1),Qt[o]=er}(n,t);var c,u,s,l=function(e){if(e===o&&y)return y;if(!cr&&e&&e in d)return d[e];switch(e){case sr:case lr:case fr:return function(){return new n(this,e)}}return function(){return new n(this)}},f=t+" Iterator",p=!1,d=e.prototype,h=d[ur]||d["@@iterator"]||o&&d[o],y=!cr&&h||l(o),m=d.entries||h;if(m&&(c=Wn(m.call(new e)))!==Object.prototype&&c.next&&(Wn(c)!==ar&&(rr?rr(c,ar):W(c[ur])||jn(c,ur,pr)),Qn(c,f,!0)),or&&h&&h.name!==lr&&(ir?nn(d,"name",lr):(p=!0,y=function(){return Je(h,this)})),o)if(void(u={values:l(lr),keys:l(sr),entries:l(fr)}))for(s in u)(cr||p||!(s in d))&&jn(d,s,u[s]);else Un({target:t,proto:!0,forced:cr||p},u);return d[ur]!==y&&jn(d,ur,y,{name:o}),Qt[t]=y,u}(Array,"Array",function(e,t){mr(this,{type:yr,target:he(e),index:0,kind:t})},0,"values"),br=Qt.Arguments=Qt.Array;if(Xt("keys"),Xt("values"),Xt("entries"),We&&"values"!==br.name)try{hr(br,"name",{value:"values"})}catch(e){}var Sr=Be("iterator"),wr=gr.values,Or=function(e,t){if(e){if(e[Sr]!==wr)try{nn(e,Sr,wr)}catch(t){e[Sr]=wr}if(Qn(e,t,!0),z[t])for(var n in gr)if(e[n]!==gr[n])try{nn(e,n,gr[n])}catch(t){e[n]=gr[n]}}};for(var Rr in z)Or(V[Rr]&&V[Rr].prototype,Rr);Or(Q,"DOMTokenList");var Er="process"===ce(V.process),jr=Be("species"),Ar=TypeError,Cr={};Cr[Be("toStringTag")]="z";var Tr="[object z]"===String(Cr),Pr=Be("toStringTag"),Nr=Object,xr="Arguments"===ce(function(){return arguments}()),Ir=Tr?ce:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Nr(e),Pr))?n:xr?ce(t):"Object"===(r=ce(t))&&W(t.callee)?"Arguments":r},kr=function(){},_r=[],Dr=Ye("Reflect","construct"),Mr=/^\s*(?:class|function)\b/,Lr=oe(Mr.exec),Fr=!Mr.test(kr),$r=function(e){if(!W(e))return!1;try{return Dr(kr,_r,e),!0}catch(e){return!1}},Ur=function(e){if(!W(e))return!1;switch(Ir(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Fr||!!Lr(Mr,Rn(e))}catch(e){return!0}};Ur.sham=!0;var Br,Vr,zr,Gr,Wr=!Dr||Z(function(){var e;return $r($r.call)||!$r(Object)||!$r(function(){e=!0})||e})?Ur:$r,Kr=TypeError,qr=Be("species"),Hr=Function.prototype,Jr=Hr.apply,Yr=Hr.call,Xr="object"==typeof Reflect&&Reflect.apply||(ee?Yr.bind(Jr):function(){return Yr.apply(Jr,arguments)}),Qr=function(e){if("Function"===ce(e))return oe(e)},Zr=Qr(Qr.bind),eo=function(e,t){return rt(e),void 0===t?e:ee?Zr(e,t):function(){return e.apply(t,arguments)}},to=oe([].slice),no=TypeError,ro=/(?:ipad|iphone|ipod).*applewebkit/i.test(Te),oo=V.setImmediate,io=V.clearImmediate,ao=V.process,co=V.Dispatch,uo=V.Function,so=V.MessageChannel,lo=V.String,fo=0,po={},ho="onreadystatechange";Z(function(){Br=V.location});var yo=function(e){if(Re(po,e)){var t=po[e];delete po[e],t()}},mo=function(e){return function(){yo(e)}},vo=function(e){yo(e.data)},go=function(e){V.postMessage(lo(e),Br.protocol+"//"+Br.host)};oo&&io||(oo=function(e){!function(e,t){if(e<1)throw new no("Not enough arguments")}(arguments.length);var t=W(e)?e:uo(e),n=to(arguments,1);return po[++fo]=function(){Xr(t,void 0,n)},Vr(fo),fo},io=function(e){delete po[e]},Er?Vr=function(e){ao.nextTick(mo(e))}:co&&co.now?Vr=function(e){co.now(mo(e))}:so&&!ro?(Gr=(zr=new so).port2,zr.port1.onmessage=vo,Vr=eo(Gr.postMessage,Gr)):V.addEventListener&&W(V.postMessage)&&!V.importScripts&&Br&&"file:"!==Br.protocol&&!Z(go)?(Vr=go,V.addEventListener("message",vo,!1)):Vr=ho in J("script")?function(e){_t.appendChild(J("script"))[ho]=function(){_t.removeChild(this),yo(e)}}:function(e){setTimeout(mo(e),0)});var bo={set:oo,clear:io},So=Object.getOwnPropertyDescriptor,wo=function(){this.head=null,this.tail=null};wo.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var Oo,Ro,Eo,jo,Ao,Co=wo,To=/ipad|iphone|ipod/i.test(Te)&&"undefined"!=typeof Pebble,Po=/web0s(?!.*chrome)/i.test(Te),No=bo.set,xo=V.MutationObserver||V.WebKitMutationObserver,Io=V.document,ko=V.process,_o=V.Promise,Do=function(e){if(!We)return V[e];var t=So(V,e);return t&&t.value}("queueMicrotask");if(!Do){var Mo=new Co,Lo=function(){var e,t;for(Er&&(e=ko.domain)&&e.exit();t=Mo.get();)try{t()}catch(e){throw Mo.head&&Oo(),e}e&&e.enter()};ro||Er||Po||!xo||!Io?!To&&_o&&_o.resolve?((jo=_o.resolve(void 0)).constructor=_o,Ao=eo(jo.then,jo),Oo=function(){Ao(Lo)}):Er?Oo=function(){ko.nextTick(Lo)}:(No=eo(No,V),Oo=function(){No(Lo)}):(Ro=!0,Eo=Io.createTextNode(""),new xo(Lo).observe(Eo,{characterData:!0}),Oo=function(){Eo.data=Ro=!Ro}),Do=function(e){Mo.head||Oo(),Mo.add(e)}}var Fo,$o,Uo,Bo,Vo,zo,Go,Wo=Do,Ko=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},qo=V.Promise,Ho="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Jo=!Ho&&!Er&&"object"==typeof window&&"object"==typeof document,Yo=Be("species"),Xo=!1,Qo=W(V.PromiseRejectionEvent),Zo=Fn("Promise",function(){var e=Rn(qo),t=e!==String(qo);if(!t&&66===_e)return!0;if(!_e||_e<51||!/native code/.test(e)){var n=new qo(function(e){e(1)}),r=function(e){e(function(){},function(){})};if((n.constructor={})[Yo]=r,!(Xo=n.then(function(){})instanceof r))return!0}return!t&&(Jo||Ho)&&!Qo}),ei={CONSTRUCTOR:Zo,REJECTION_EVENT:Qo,SUBCLASSING:Xo},ti=TypeError,ni=function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw new ti("Bad Promise constructor");t=e,n=r}),this.resolve=rt(t),this.reject=rt(n)},ri={f:function(e){return new ni(e)}},oi=bo.set,ii="Promise",ai=ei.CONSTRUCTOR,ci=ei.REJECTION_EVENT,ui=ei.SUBCLASSING,si=un.getterFor(ii),li=un.set,fi=qo&&qo.prototype,pi=qo,di=fi,hi=V.TypeError,yi=V.document,mi=V.process,vi=ri.f,gi=vi,bi=!!(yi&&yi.createEvent&&V.dispatchEvent),Si="unhandledrejection",wi=function(e){var t;return!(!K(e)||!W(t=e.then))&&t},Oi=function(e,t){var n,r,o,i=t.value,a=1===t.state,c=a?e.ok:e.fail,u=e.resolve,s=e.reject,l=e.domain;try{c?(a||(2===t.rejection&&Ci(t),t.rejection=1),!0===c?n=i:(l&&l.enter(),n=c(i),l&&(l.exit(),o=!0)),n===e.promise?s(new hi("Promise-chain cycle")):(r=wi(n))?Je(r,n,u,s):u(n)):s(i)}catch(e){l&&!o&&l.exit(),s(e)}},Ri=function(e,t){e.notified||(e.notified=!0,Wo(function(){for(var n,r=e.reactions;n=r.get();)Oi(n,e);e.notified=!1,t&&!e.rejection&&ji(e)}))},Ei=function(e,t,n){var r,o;bi?((r=yi.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),V.dispatchEvent(r)):r={promise:t,reason:n},!ci&&(o=V["on"+e])?o(r):e===Si&&function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}("Unhandled promise rejection",n)},ji=function(e){Je(oi,V,function(){var t,n=e.facade,r=e.value;if(Ai(e)&&(t=Ko(function(){Er?mi.emit("unhandledRejection",r,n):Ei(Si,n,r)}),e.rejection=Er||Ai(e)?2:1,t.error))throw t.value})},Ai=function(e){return 1!==e.rejection&&!e.parent},Ci=function(e){Je(oi,V,function(){var t=e.facade;Er?mi.emit("rejectionHandled",t):Ei("rejectionhandled",t,e.value)})},Ti=function(e,t,n){return function(r){e(t,r,n)}},Pi=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Ri(e,!0))},Ni=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new hi("Promise can't be resolved itself");var r=wi(t);r?Wo(function(){var n={done:!1};try{Je(r,t,Ti(Ni,n,e),Ti(Pi,n,e))}catch(t){Pi(n,t,e)}}):(e.value=t,e.state=1,Ri(e,!1))}catch(t){Pi({done:!1},t,e)}}};if(ai&&(pi=function(e){!function(e,t){if(Xe(di,e))return e;throw new Ar("Incorrect invocation")}(this),rt(e),Je(Fo,this);var t=si(this);try{e(Ti(Ni,t),Ti(Pi,t))}catch(e){Pi(t,e)}},(Fo=function(e){li(this,{type:ii,done:!1,notified:!1,parent:!1,reactions:new Co,rejection:!1,state:0,value:void 0})}).prototype=jn(di=pi.prototype,"then",function(e,t){var n,r,o,i=si(this),a=vi((n=pi,void 0===(o=Ge(this).constructor)||fe(r=Ge(o)[qr])?n:function(e){if(Wr(e))return e;throw new Kr(tt(e)+" is not a constructor")}(r)));return i.parent=!0,a.ok=!W(e)||e,a.fail=W(t)&&t,a.domain=Er?mi.domain:void 0,0===i.state?i.reactions.add(a):Wo(function(){Oi(a,i)}),a.promise}),$o=function(){var e=new Fo,t=si(e);this.promise=e,this.resolve=Ti(Ni,t),this.reject=Ti(Pi,t)},ri.f=vi=function(e){return e===pi||void 0===e?new $o(e):gi(e)},W(qo)&&fi!==Object.prototype)){Uo=fi.then,ui||jn(fi,"then",function(e,t){var n=this;return new pi(function(e,t){Je(Uo,n,e,t)}).then(e,t)},{unsafe:!0});try{delete fi.constructor}catch(e){}rr&&rr(fi,di)}Un({global:!0,constructor:!0,wrap:!0,forced:ai},{Promise:pi}),Qn(pi,ii,!1),Go=Ye(ii),We&&Go&&!Go[jr]&&(Bo=Go,Vo=jr,(zo={configurable:!0,get:function(){return this}}).get&&En(zo.get,Vo,{getter:!0}),zo.set&&En(zo.set,Vo,{setter:!0}),yt.f(Bo,Vo,zo));var xi=Be("iterator"),Ii=Array.prototype,ki=Be("iterator"),_i=function(e){if(!fe(e))return ot(e,ki)||ot(e,"@@iterator")||Qt[Ir(e)]},Di=TypeError,Mi=function(e,t,n){var r,o;Ge(e);try{if(!(r=ot(e,"return"))){if("throw"===t)throw n;return n}r=Je(r,e)}catch(e){o=!0,r=e}if("throw"===t)throw n;if(o)throw r;return Ge(r),n},Li=TypeError,Fi=function(e,t){this.stopped=e,this.result=t},$i=Fi.prototype,Ui=function(e,t,n){var r,o,i,a,c,u,s,l,f=!(!n||!n.AS_ENTRIES),p=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),h=!(!n||!n.INTERRUPTED),y=eo(t,n&&n.that),m=function(e){return r&&Mi(r,"normal",e),new Fi(!0,e)},v=function(e){return f?(Ge(e),h?y(e[0],e[1],m):y(e[0],e[1])):h?y(e,m):y(e)};if(p)r=e.iterator;else if(d)r=e;else{if(!(o=_i(e)))throw new Li(tt(e)+" is not iterable");if(void 0!==(l=o)&&(Qt.Array===l||Ii[xi]===l)){for(i=0,a=Rt(e);a>i;i++)if((c=v(e[i]))&&Xe($i,c))return c;return new Fi(!1)}r=function(e,t){var n=arguments.length<2?_i(e):t;if(rt(n))return Ge(Je(n,e));throw new Di(tt(e)+" is not iterable")}(e,o)}for(u=p?e.next:r.next;!(s=Je(u,r)).done;){try{c=v(s.value)}catch(e){Mi(r,"throw",e)}if("object"==typeof c&&c&&Xe($i,c))return c}return new Fi(!1)},Bi=Be("iterator"),Vi=!1;try{var zi=0,Gi={next:function(){return{done:!!zi++}},return:function(){Vi=!0}};Gi[Bi]=function(){return this},Array.from(Gi,function(){throw 2})}catch(e){}var Wi=ei.CONSTRUCTOR||!function(e,t){try{if(!Vi)return!1}catch(e){return!1}var n=!1;try{var r={};r[Bi]=function(){return{next:function(){return{done:n=!0}}}},qo.all(r).then(void 0,function(){})}catch(e){}return n}();Un({target:"Promise",stat:!0,forced:Wi},{all:function(e){var t=this,n=ri.f(t),r=n.resolve,o=n.reject,i=Ko(function(){var n=rt(t.resolve),i=[],a=0,c=1;Ui(e,function(e){var u=a++,s=!1;c++,Je(n,t,e).then(function(e){s||(s=!0,i[u]=e,--c||r(i))},o)}),--c||r(i)});return i.error&&o(i.value),n.promise}});var Ki=qo&&qo.prototype;if(Un({target:"Promise",proto:!0,forced:ei.CONSTRUCTOR,real:!0},{catch:function(e){return this.then(void 0,e)}}),W(qo)){var qi=Ye("Promise").prototype.catch;Ki.catch!==qi&&jn(Ki,"catch",qi,{unsafe:!0})}Un({target:"Promise",stat:!0,forced:Wi},{race:function(e){var t=this,n=ri.f(t),r=n.reject,o=Ko(function(){var o=rt(t.resolve);Ui(e,function(e){Je(o,t,e).then(n.resolve,r)})});return o.error&&r(o.value),n.promise}}),Un({target:"Promise",stat:!0,forced:ei.CONSTRUCTOR},{reject:function(e){var t=ri.f(this);return(0,t.reject)(e),t.promise}}),Un({target:"Promise",stat:!0,forced:ei.CONSTRUCTOR},{resolve:function(e){return function(e,t){if(Ge(e),K(t)&&t.constructor===e)return t;var n=ri.f(e);return(0,n.resolve)(t),n.promise}(this,e)}});var Hi=jt.includes,Ji=Z(function(){return!Array(1).includes()});Un({target:"Array",proto:!0,forced:Ji},{includes:function(e){return Hi(this,e,arguments.length>1?arguments[1]:void 0)}}),Xt("includes");var Yi=Be("match"),Xi=TypeError,Qi=String,Zi=function(e){if("Symbol"===Ir(e))throw new TypeError("Cannot convert a Symbol value to a string");return Qi(e)},ea=Be("match"),ta=oe("".indexOf);Un({target:"String",proto:!0,forced:!function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[ea]=!1,"/./"[e](t)}catch(e){}}return!1}("includes")},{includes:function(e){return!!~ta(Zi(de(this)),Zi(function(e){if(function(e){var t;return K(e)&&(void 0!==(t=e[Yi])?!!t:"RegExp"===ce(e))}(e))throw new Xi("The method doesn't accept regular expressions");return e}(e)),arguments.length>1?arguments[1]:void 0)}});var na=Object.assign,ra=Object.defineProperty,oa=oe([].concat),ia=!na||Z(function(){if(We&&1!==na({b:1},na(ra({},"a",{enumerable:!0,get:function(){ra(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol("assign detection"),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!==na({},e)[n]||xt(na({},t)).join("")!==r})?function(e,t){for(var n=we(e),r=arguments.length,o=1,i=Tn.f,a=pn.f;r>o;)for(var c,u=le(arguments[o++]),s=i?oa(xt(u),i(u)):xt(u),l=s.length,f=0;l>f;)c=s[f++],We&&!Je(a,u,c)||(n[c]=u[c]);return n}:na;function aa(){return aa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aa.apply(this,arguments)}function ca(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(o[n]=e[n]);return o}Un({target:"Object",stat:!0,arity:2,forced:Object.assign!==ia},{assign:ia});const ua=["count","handleClick"],sa=e=>{let{count:t,handleClick:n}=e,r=ca(e,ua);return h(u,{onClick:n},h(C,aa({},r,{badgeContent:t,overlap:"circular",color:"primary"}),h(A,{sx:Object.assign({fontSize:"3.5rem"},t>0?{color:"primary.main"}:{color:"secondary.main"})})))},la={BEARER:"Bearer",TENANT_ID:"tenant_id",BU_ID:"bu_id",SNOP_ID:"snop_id"},fa="refresh",pa="close",da=[{label:"Show 10 Rows",value:10},{label:"Show 20 Rows",value:20},{label:"Show 30 Rows",value:30}],ha={"SKU Name":"sku_name",Node:"node","Channel Name":"channel_name"},ya=Object.values(ha),ma=["message","sub_type"],va=e=>Object.assign({},e,{borderRadius:2,colors:Object.assign({},e.colors,{primary25:"#F2F2F2",primary:"#E94F1C"})}),ga=["title","subTitle","children","onRefresh","onClose","loading","handleShowAll","handleMarkAllAsRead","isMarkAllAsRead","width","headerIconType","isDialogActionShow","className"],ba=T(s)(e=>{let{theme:t}=e;return{"& .MuiPaper-root":{borderRadius:8,border:"1px solid "+x[50],boxShadow:t.shadows[5]},"& .MuiDialogContent-root":{padding:t.spacing(1)},"& .MuiDialogActions-root":{padding:t.spacing(.2)+" "+t.spacing(.5)+"}"}}}),Sa=e=>{let{title:t,subTitle:n,children:r,onRefresh:o,onClose:i,loading:a,handleShowAll:c,handleMarkAllAsRead:s,isMarkAllAsRead:m,headerIconType:v,isDialogActionShow:g,className:b}=e,S=ca(e,ga);return h(ba,aa({maxWidth:"md",onClose:i},S,{className:["notification-dialog",b].join(" ")}),h(l,{sx:{p:1,display:"flex"}},h(f,{sx:{gap:1,display:"flex"}},h(f,null,h(p,{variant:"h6",className:"title"},t),n&&h(p,{variant:"h6",className:"title sub-title"},n)),(()=>{switch(v){case fa:return h(u,{disabled:a,"aria-label":"close",sx:{position:"absolute",right:8,top:8,color:"primary.main"},onClick:o},h(P,{fontSize:"medium"}));case pa:return h(u,{"aria-label":"close",sx:{position:"absolute",right:8,top:8,color:"primary.main"},onClick:i},h(N,{fontSize:"medium"}));default:return null}})())),r,g&&h(d,{className:"dialog-action"},h(y,{onClick:c,className:"view-all"},"Show all"),m.boo&&h(y,{className:"view-all",onClick:s},"Mark all as read")))},wa={LOADING:"LOADING",SUCCESS:"SUCCESS",ERROR:"ERROR",MARK_ALL_AS_READ:"MARK_ALL_AS_READ"},Oa={SWR:"Something went wrong!",UNHANDLED:"Unhandled action type: ",INVALID:"Invalid action type: ",INVALID_ACTION:"Invalid action type: ",NRF:"Not record found!"},Ra=/*#__PURE__*/n(null),Ea=/*#__PURE__*/n(null);function ja(e){let{children:n}=e;const[r,o]=t(Aa,Ca);return h(Ra.Provider,{value:r},h(Ea.Provider,{value:o},n))}function Aa(e,t){switch(t.type){case wa.LOADING:return Object.assign({},e,{loading:t.loading});case wa.SUCCESS:return Object.assign({},e,{data:t.data});case wa.MARK_ALL_AS_READ:return Object.assign({},e,{isMarkAllAsRead:t.isMarkAllAsRead});case wa.ERROR:return Object.assign({},e,{error:t.error});default:throw new Error(Oa.UNHANDLED+": "+t)}}const Ca={loading:!1,data:[],error:"",isMarkAllAsRead:{count:0,boo:!1}};var Ta=TypeError,Pa=function(e,t){if(!delete e[t])throw new Ta("Cannot delete property "+tt(t)+" of "+tt(e))},Na=Math.floor,xa=function(e,t){var n=e.length;if(n<8)for(var r,o,i=1;i<n;){for(o=i,r=e[i];o&&t(e[o-1],r)>0;)e[o]=e[--o];o!==i++&&(e[o]=r)}else for(var a=Na(n/2),c=xa(to(e,0,a),t),u=xa(to(e,a),t),s=c.length,l=u.length,f=0,p=0;f<s||p<l;)e[f+p]=f<s&&p<l?t(c[f],u[p])<=0?c[f++]:u[p++]:f<s?c[f++]:u[p++];return e},Ia=xa,ka=Te.match(/firefox\/(\d+)/i),_a=!!ka&&+ka[1],Da=/MSIE|Trident/.test(Te),Ma=Te.match(/AppleWebKit\/(\d+)\./),La=!!Ma&&+Ma[1],Fa=[],$a=oe(Fa.sort),Ua=oe(Fa.push),Ba=Z(function(){Fa.sort(void 0)}),Va=Z(function(){Fa.sort(null)}),za=function(e,t){var n=[].sort;return!!n&&Z(function(){n.call(null,function(){return 1},1)})}(),Ga=!Z(function(){if(_e)return _e<70;if(!(_a&&_a>3)){if(Da)return!0;if(La)return La<603;var e,t,n,r,o="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)Fa.push({k:t+r,v:n})}for(Fa.sort(function(e,t){return t.v-e.v}),r=0;r<Fa.length;r++)t=Fa[r].k.charAt(0),o.charAt(o.length-1)!==t&&(o+=t);return"DGBEFHACIJK"!==o}});Un({target:"Array",proto:!0,forced:Ba||!Va||!za||!Ga},{sort:function(e){void 0!==e&&rt(e);var t=we(this);if(Ga)return void 0===e?$a(t):$a(t,e);var n,r,o=[],i=Rt(t);for(r=0;r<i;r++)r in t&&Ua(o,t[r]);for(Ia(o,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:Zi(t)>Zi(n)?1:-1}}(e)),n=Rt(o),r=0;r<n;)t[r]=o[r++];for(;r<i;)Pa(t,r++);return t}});var Wa,Ka="\t\n\v\f\r \u2028\u2029\ufeff",qa=oe("".replace),Ha=RegExp("^["+Ka+"]+"),Ja=RegExp("(^|[^"+Ka+"])["+Ka+"]+$"),Ya=function(e){return function(t){var n=Zi(de(t));return 1&e&&(n=qa(n,Ha,"")),2&e&&(n=qa(n,Ja,"$1")),n}},Xa={start:Ya(1),end:Ya(2),trim:Ya(3)},Qa=gn.PROPER,Za=Xa.trim;Un({target:"String",proto:!0,forced:(Wa="trim",Z(function(){return!!Ka[Wa]()||"
"!=="
"[Wa]()||Qa&&Ka[Wa].name!==Wa}))},{trim:function(){return Za(this)}});const ec=e=>{const t=localStorage.getItem(e);return t?JSON.parse(t):""},tc=e=>new Date(e).toLocaleString("en-US",{year:"numeric",month:"long",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!0}),nc=e=>{const t=e.sort((e,t)=>e.isRead===t.isRead?0:t.isRead?-1:1).slice(0,9);return t},rc=(e,t,n)=>e.filter(e=>t.some(t=>e[t].toLowerCase().includes(n.trim().toLowerCase()))),oc=(e,t,n)=>e.slice((t-1)*n,t*n),ic=ec("user"),ac=ec("snop"),cc={TOKEN:ec("token"),BU_IDS:null==ic?void 0:ic.business_unit_id,TENANT_IDS:null==ic?void 0:ic.tenant_id,SNOP_IDS:null==ac?void 0:ac.snop_id},uc=k.create({baseURL:"https://scai-qa-api.3sc.ai",headers:{"Content-Type":"application/json",Authorization:la.BEARER+" "+cc.TOKEN}});uc.interceptors.request.use(function(e){return e},function(e){return Promise.reject(e)}),uc.interceptors.response.use(function(e){return e},function(e){return Promise.reject(e)});const sc="/notification";function lc(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}const{TENANT_ID:fc,BU_ID:pc,SNOP_ID:dc}=la,{TENANT_IDS:hc,BU_IDS:yc,SNOP_IDS:mc}=cc,vc=function(e){return Promise.resolve(lc(function(){return Promise.resolve(uc.put(sc+"/v1?"+fc+"="+hc+"&"+pc+"="+yc+"&"+dc+"="+mc,e))},function(e){return e}))};var gc="function"==typeof Symbol&&Symbol.for,bc=gc?Symbol.for("react.element"):60103,Sc=gc?Symbol.for("react.portal"):60106,wc=gc?Symbol.for("react.fragment"):60107,Oc=gc?Symbol.for("react.strict_mode"):60108,Rc=gc?Symbol.for("react.profiler"):60114,Ec=gc?Symbol.for("react.provider"):60109,jc=gc?Symbol.for("react.context"):60110,Ac=gc?Symbol.for("react.async_mode"):60111,Cc=gc?Symbol.for("react.concurrent_mode"):60111,Tc=gc?Symbol.for("react.forward_ref"):60112,Pc=gc?Symbol.for("react.suspense"):60113,Nc=gc?Symbol.for("react.suspense_list"):60120,xc=gc?Symbol.for("react.memo"):60115,Ic=gc?Symbol.for("react.lazy"):60116,kc=gc?Symbol.for("react.block"):60121,_c=gc?Symbol.for("react.fundamental"):60117,Dc=gc?Symbol.for("react.responder"):60118,Mc=gc?Symbol.for("react.scope"):60119;function Lc(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case bc:switch(e=e.type){case Ac:case Cc:case wc:case Rc:case Oc:case Pc:return e;default:switch(e=e&&e.$$typeof){case jc:case Tc:case Ic:case xc:case Ec:return e;default:return t}}case Sc:return t}}}function Fc(e){return Lc(e)===Cc}var $c={AsyncMode:Ac,ConcurrentMode:Cc,ContextConsumer:jc,ContextProvider:Ec,Element:bc,ForwardRef:Tc,Fragment:wc,Lazy:Ic,Memo:xc,Portal:Sc,Profiler:Rc,StrictMode:Oc,Suspense:Pc,isAsyncMode:function(e){return Fc(e)||Lc(e)===Ac},isConcurrentMode:Fc,isContextConsumer:function(e){return Lc(e)===jc},isContextProvider:function(e){return Lc(e)===Ec},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===bc},isForwardRef:function(e){return Lc(e)===Tc},isFragment:function(e){return Lc(e)===wc},isLazy:function(e){return Lc(e)===Ic},isMemo:function(e){return Lc(e)===xc},isPortal:function(e){return Lc(e)===Sc},isProfiler:function(e){return Lc(e)===Rc},isStrictMode:function(e){return Lc(e)===Oc},isSuspense:function(e){return Lc(e)===Pc},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===wc||e===Cc||e===Rc||e===Oc||e===Pc||e===Nc||"object"==typeof e&&null!==e&&(e.$$typeof===Ic||e.$$typeof===xc||e.$$typeof===Ec||e.$$typeof===jc||e.$$typeof===Tc||e.$$typeof===_c||e.$$typeof===Dc||e.$$typeof===Mc||e.$$typeof===kc)},typeOf:Lc},Uc=F(function(e,t){"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,n=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function S(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:var d=e.type;switch(d){case s:case l:case o:case a:case i:case p:return d;default:var m=d&&d.$$typeof;switch(m){case u:case f:case y:case h:case c:return m;default:return t}}case r:return t}}}var w=l,O=u,R=c,E=n,j=f,A=o,C=y,T=h,P=r,N=a,x=i,I=p,k=!1;function _(e){return S(e)===l}t.AsyncMode=s,t.ConcurrentMode=w,t.ContextConsumer=O,t.ContextProvider=R,t.Element=E,t.ForwardRef=j,t.Fragment=A,t.Lazy=C,t.Memo=T,t.Portal=P,t.Profiler=N,t.StrictMode=x,t.Suspense=I,t.isAsyncMode=function(e){return k||(k=!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.")),_(e)||S(e)===s},t.isConcurrentMode=_,t.isContextConsumer=function(e){return S(e)===u},t.isContextProvider=function(e){return S(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return S(e)===f},t.isFragment=function(e){return S(e)===o},t.isLazy=function(e){return S(e)===y},t.isMemo=function(e){return S(e)===h},t.isPortal=function(e){return S(e)===r},t.isProfiler=function(e){return S(e)===a},t.isStrictMode=function(e){return S(e)===i},t.isSuspense=function(e){return S(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===l||e===a||e===i||e===p||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===h||e.$$typeof===c||e.$$typeof===u||e.$$typeof===f||e.$$typeof===v||e.$$typeof===g||e.$$typeof===b||e.$$typeof===m)},t.typeOf=S}()}),Bc=F(function(e){e.exports="production"===process.env.NODE_ENV?$c:Uc}),Vc=Object.getOwnPropertySymbols,zc=Object.prototype.hasOwnProperty,Gc=Object.prototype.propertyIsEnumerable,Wc=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,r,o=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),i=1;i<arguments.length;i++){for(var a in n=Object(arguments[i]))zc.call(n,a)&&(o[a]=n[a]);if(Vc){r=Vc(n);for(var c=0;c<r.length;c++)Gc.call(n,r[c])&&(o[r[c]]=n[r[c]])}}return o},Kc=Function.call.bind(Object.prototype.hasOwnProperty),qc="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Hc=Kc,Jc=function(){};if("production"!==process.env.NODE_ENV){var Yc=qc,Xc={},Qc=Hc;Jc=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function Zc(e,t,n,r,o){if("production"!==process.env.NODE_ENV)for(var i in e)if(Qc(e,i)){var a;try{if("function"!=typeof e[i]){var c=Error((r||"React class")+": "+n+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw c.name="Invariant Violation",c}a=e[i](t,i,r,n,null,Yc)}catch(e){a=e}if(!a||a instanceof Error||Jc((r||"React class")+": type specification of "+n+" `"+i+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof a+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),a instanceof Error&&!(a.message in Xc)){Xc[a.message]=!0;var u=o?o():"";Jc("Failed "+n+" type: "+a.message+(null!=u?u:""))}}}Zc.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(Xc={})};var eu=Zc,tu=function(){};function nu(){return null}function ru(){}function ou(){}"production"!==process.env.NODE_ENV&&(tu=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),ou.resetWarningCache=ru;var iu=F(function(e){e.exports="production"!==process.env.NODE_ENV?function(e,t){var n="function"==typeof Symbol&&Symbol.iterator,r="<<anonymous>>",o={array:u("array"),bigint:u("bigint"),bool:u("boolean"),func:u("function"),number:u("number"),object:u("object"),string:u("string"),symbol:u("symbol"),any:c(nu),arrayOf:function(e){return c(function(t,n,r,o,i){if("function"!=typeof e)return new a("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var c=t[n];if(!Array.isArray(c))return new a("Invalid "+o+" `"+i+"` of type `"+f(c)+"` supplied to `"+r+"`, expected an array.");for(var u=0;u<c.length;u++){var s=e(c,u,r,o,i+"["+u+"]",qc);if(s instanceof Error)return s}return null})},element:c(function(t,n,r,o,i){var c=t[n];return e(c)?null:new a("Invalid "+o+" `"+i+"` of type `"+f(c)+"` supplied to `"+r+"`, expected a single ReactElement.")}),elementType:c(function(e,t,n,r,o){var i=e[t];return Bc.isValidElementType(i)?null:new a("Invalid "+r+" `"+o+"` of type `"+f(i)+"` supplied to `"+n+"`, expected a single ReactElement type.")}),instanceOf:function(e){return c(function(t,n,o,i,c){return t[n]instanceof e?null:new a("Invalid "+i+" `"+c+"` of type `"+((u=t[n]).constructor&&u.constructor.name?u.constructor.name:r)+"` supplied to `"+o+"`, expected instance of `"+(e.name||r)+"`.");var u})},node:c(function(e,t,n,r,o){return l(e[t])?null:new a("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(e){return c(function(t,n,r,o,i){if("function"!=typeof e)return new a("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var c=t[n],u=f(c);if("object"!==u)return new a("Invalid "+o+" `"+i+"` of type `"+u+"` supplied to `"+r+"`, expected an object.");for(var s in c)if(Hc(c,s)){var l=e(c,s,r,o,i+"."+s,qc);if(l instanceof Error)return l}return null})},oneOf:function(e){return Array.isArray(e)?c(function(t,n,r,o,c){for(var u=t[n],s=0;s<e.length;s++)if(i(u,e[s]))return null;var l=JSON.stringify(e,function(e,t){return"symbol"===p(t)?String(t):t});return new a("Invalid "+o+" `"+c+"` of value `"+String(u)+"` supplied to `"+r+"`, expected one of "+l+".")}):("production"!==process.env.NODE_ENV&&tu(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),nu)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&tu("Invalid argument supplied to oneOfType, expected an instance of array."),nu;for(var t=0;t<e.length;t++){var n=e[t];if("function"!=typeof n)return tu("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+d(n)+" at index "+t+"."),nu}return c(function(t,n,r,o,i){for(var c=[],u=0;u<e.length;u++){var s=(0,e[u])(t,n,r,o,i,qc);if(null==s)return null;s.data&&Hc(s.data,"expectedType")&&c.push(s.data.expectedType)}return new a("Invalid "+o+" `"+i+"` supplied to `"+r+"`"+(c.length>0?", expected one of type ["+c.join(", ")+"]":"")+".")})},shape:function(e){return c(function(t,n,r,o,i){var c=t[n],u=f(c);if("object"!==u)return new a("Invalid "+o+" `"+i+"` of type `"+u+"` supplied to `"+r+"`, expected `object`.");for(var l in e){var d=e[l];if("function"!=typeof d)return s(r,o,i,l,p(d));var h=d(c,l,r,o,i+"."+l,qc);if(h)return h}return null})},exact:function(e){return c(function(t,n,r,o,i){var c=t[n],u=f(c);if("object"!==u)return new a("Invalid "+o+" `"+i+"` of type `"+u+"` supplied to `"+r+"`, expected `object`.");var l=Wc({},t[n],e);for(var d in l){var h=e[d];if(Hc(e,d)&&"function"!=typeof h)return s(r,o,i,d,p(h));if(!h)return new a("Invalid "+o+" `"+i+"` key `"+d+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var y=h(c,d,r,o,i+"."+d,qc);if(y)return y}return null})}};function i(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function a(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function c(e){if("production"!==process.env.NODE_ENV)var n={},o=0;function i(i,c,u,s,l,f,p){if(s=s||r,f=f||u,p!==qc){if(t){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var h=s+":"+u;!n[h]&&o<3&&(tu("You are manually calling a React.PropTypes validation function for the `"+f+"` prop on `"+s+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[h]=!0,o++)}}return null==c[u]?i?new a(null===c[u]?"The "+l+" `"+f+"` is marked as required in `"+s+"`, but its value is `null`.":"The "+l+" `"+f+"` is marked as required in `"+s+"`, but its value is `undefined`."):null:e(c,u,s,l,f)}var c=i.bind(null,!1);return c.isRequired=i.bind(null,!0),c}function u(e){return c(function(t,n,r,o,i,c){var u=t[n];return f(u)!==e?new a("Invalid "+o+" `"+i+"` of type `"+p(u)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null})}function s(e,t,n,r,o){return new a((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function l(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(l);if(null===t||e(t))return!0;var r=function(e){var t=e&&(n&&e[n]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(!r)return!1;var o,i=r.call(t);if(r!==t.entries){for(;!(o=i.next()).done;)if(!l(o.value))return!1}else for(;!(o=i.next()).done;){var a=o.value;if(a&&!l(a[1]))return!1}return!0;default:return!1}}function f(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function p(e){if(null==e)return""+e;var t=f(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function d(e){var t=p(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return a.prototype=Error.prototype,o.checkPropTypes=eu,o.resetWarningCache=eu.resetWarningCache,o.PropTypes=o,o}(Bc.isElement,!0):function(){function e(e,t,n,r,o,i){if(i!==qc){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ou,resetWarningCache:ru};return n.PropTypes=n,n}()});const au=e=>{let{type:t,title:n,subTitle:r,subType:o,isRead:i,handleShowDetails:a,handleRead:c,isCheckBox:u,isSubType:s,selectedAlert:l,id:d,handleCheckboxChange:y}=e;return h(f,{className:"card"},h(m,{display:"flex",flexDirection:"row",alignItems:"start",gap:1},t&&h(v,{color:t,variant:"dot",className:"badge"}),u&&h(g,{checked:!!l.includes(d),onChange:e=>y(e,d),disabled:i}),h(p,{variant:"h6",component:"span",className:["title-card",i&&"read"].join(" ")},n)),h(m,{display:"flex",justifyContent:"space-between",flexDirection:"row",alignItems:"start",gap:1},s&&h(b,{label:o,variant:"filled",size:"small",sx:{fontFamily:"Montserrat, sans-serif",fontWeight:"medium",color:"primary.main",ml:5}}),h(p,{variant:"body2",component:"div",className:["sub-title",i&&"read"].join(" ")},r)),h(m,{display:"flex",flexDirection:"row",justifyContent:"end",gap:1},h(b,{onClick:a,label:"Show Details",component:"button",variant:"filled",clickable:!0,size:"small",sx:{fontFamily:"Montserrat, sans-serif",fontWeight:"medium",color:I[500]}}),!i&&h(b,{onClick:c,label:"Mark as Read",component:"button",variant:"filled",clickable:!0,size:"small",sx:{fontFamily:"Montserrat, sans-serif",fontWeight:"medium",color:"primary.main"}})))};au.propTypes={type:iu.string,title:iu.string,subTitle:iu.string,isRead:iu.bool,handleShowDetails:iu.func,handleRead:iu.func};const cu=e=>{let{data:t,handleRead:n,handleShowDetails:r}=e;return h(f,null,t.map((e,t)=>h(au,{key:t,type:"success",title:e.message,subTitle:tc(e.createdAt),isRead:e.isRead,handleShowDetails:()=>r(e.id),handleRead:()=>n([e.id])})))};cu.propTypes={data:iu.array,handleRead:iu.func,handleShowDetails:iu.func};const uu=["adornmentIcon"],su=T(S)(e=>{let{theme:t}=e;return{"& .MuiInputBase-root":{height:"3.52rem"},"& .MuiFormLabel-root":{color:t.palette.input.border+" !important",fontSize:"1rem",marginTop:"0.4rem"},"& label.Mui-focused":{color:t.palette.input.color},"& .MuiInput-underline:after":{borderBottomColor:t.palette.input.border,borderBottomWidth:"0.1rem"},"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:t.palette.input.border,borderWidth:"0.1rem"},"&:hover fieldset":{borderColor:t.palette.input.border,borderWidth:"0.1rem"},"&.Mui-focused fieldset":{borderColor:t.palette.input.border,borderWidth:"0.1rem"}}}}),lu=e=>{let{adornmentIcon:t}=e,n=ca(e,uu);return h(su,aa({},n,{InputProps:Object.assign({},t||{})}))},fu=e=>{let{start:t,end:n,total:r}=e;return h(f,{component:"h1",sx:{fontSize:"1.5rem",fontWeight:500}},t," - ",n," of ",r," logs")},pu=e=>{let{page:t,rowPerPage:n,total:r,handleChangePage:o,isLogo:i,isMarkAllRead:a,selectedAlert:c,handleAllRead:u}=e;return h(Fragment,null,h(D,{count:Math.ceil(r/n),page:t,onChange:(e,t)=>{o(t)},sx:{margin:"1rem 0","& .MuiPaginationItem-root":{fontSize:"1.25rem","& .MuiSvgIcon-root":{fontSize:"2.2rem",color:"primary.main"}}},color:"primary",shape:"rounded",showFirstButton:!0,showLastButton:!0}),i&&h(fu,{start:t*n-n+1,end:t*n>r?r:t*n,total:r}),a&&h(y,{variant:"contained",className:"view-all",disabled:0===c.length,onClick:u},"Mark Read"))},du=["option","value","handleSelectChange"],hu=e=>{let{option:t,value:n,handleSelectChange:r}=e,o=ca(e,du);return h(M,aa({},o,{options:t,value:n,className:"custom-select-container",onChange:r,theme:va}))},yu=e=>{let{loading:t,isEmpty:n,data:i,handleShowDetails:a,handleRead:c,handleRefresh:s}=e;const[l,y]=r(""),[m,v]=r(1),[g,b]=r(10),[S,E]=r(0),[j,A]=r([]),[C,T]=r([]);o(()=>{if(l){const e=rc(i,ma,l);return A(oc(e,m,g)),void E(e.length)}A(oc(i,m,g)),E(i.length)},[l,i,m,g]);const N=(e,t)=>{T(e.target.checked?e=>[...e,t]:e=>e.filter(e=>e!==t))};return h(Fragment,null,h(w,{dividers:!0,sx:{pt:"0 !important"}},h(f,{sx:t||n?{display:"flex",justifyContent:"center",alignItems:"center",minHeight:320}:{}},t?h(O,null):n?h(p,{className:"no-record"},Oa.NRF):h(Fragment,null,h(f,{className:"sticky-input-select"},h(f,{sx:{display:"flex",gap:1}},h(lu,{value:l,onChange:e=>{const t=e.target.value;t&&v(1),y(t)},label:"Search",focused:!0,adornmentIcon:{startAdornment:h(R,{position:"start"},h(_,null))}}),h(hu,{value:{value:g,label:"Show "+g+" Rows"},option:da,handleSelectChange:e=>{v(1),b(e.value)}}),h(u,{color:"primary",onClick:s},h(P,{fontSize:"medium"}))),h(fu,{start:m*g-g+1,end:m*g>S?S:m*g,total:S})),0===j.length&&h(p,{className:"no-record"},Oa.NRF),j.map((e,t)=>h(au,{key:t,isCheckBox:!0,title:e.message,subTitle:tc(e.createdAt),isRead:e.isRead,handleShowDetails:()=>a(e.id),handleRead:()=>c([e.id]),subType:e.sub_type,isSubType:!0,selectedAlert:C,id:e.id,handleCheckboxChange:N}))))),!(t||n)&&h(d,{sx:{justifyContent:"space-between",gap:1},className:"action-show-all-dialog"},h(pu,{page:m,rowPerPage:g,total:S,handleChangePage:e=>{v(e)},isMarkAllRead:!0,selectedAlert:C,handleAllRead:()=>{c(C),T([])}})))},mu=e=>{let{sortKey:t,sortDir:n,column:r}=e;return h(Fragment,null,t===r?n?h("i",{className:"fa fa-arrow-down","aria-hidden":"true"}):h("i",{className:"fa fa-arrow-up","aria-hidden":"true"}):h(Fragment,null,h("i",{className:"fa fa-sort","aria-hidden":"true"})))},vu=e=>{var t;let{data:n,handleSort:r,sortDir:o,sortKey:i}=e;return h("table",{className:"table"},h("thead",null,h("tr",null,null==(t=Object.entries(ha))?void 0:t.map((e,t)=>{let[n,a]=e;return h("th",{key:t},h("span",{onClick:()=>r(a)},n,h(mu,{column:a,sortKey:i,sortDir:o})))}))),h("tbody",null,n.map((e,t)=>h("tr",{key:t},h("td",null,e.sku_name),h("td",null,e.node),h("td",null,e.channel_name)))))},gu=e=>{let{loading:t,isEmpty:n,data:i}=e;const[a,c]=r(""),[u,s]=r(1),[l,y]=r(10),[m,v]=r(0),[g,b]=r([]),[S,E]=r(!1),[j,A]=r("");return o(()=>{if(a||j){const e=rc(i,ya,a);if(j){const t=((e,t,n)=>{const r=e.sort((e,r)=>"asc"===n?e[t].toLowerCase().localeCompare(r[t].toLowerCase()):r[t].toLowerCase().localeCompare(e[t].toLowerCase()));return r})(e,j,S?"asc":"desc");return b(oc(t,u,l)),void v(t.length)}return b(oc(e,u,l)),void v(e.length)}b(oc(i,u,l)),v(i.length)},[a,i,u,l,S,j]),h(Fragment,null,h(w,{dividers:!0,sx:{pt:"0 !important"}},h(f,{sx:t||n?{display:"flex",justifyContent:"center",alignItems:"center",minHeight:320}:{}},t?h(O,null):n?h(p,{className:"no-record"},Oa.NRF):h(Fragment,null,h(f,{className:"sticky-input-select"},h(f,{sx:{display:"flex",gap:1}},h(lu,{value:a,onChange:e=>{const t=e.target.value;t&&s(1),c(t)},label:"Search",focused:!0,adornmentIcon:{startAdornment:h(R,{position:"start"},h(_,null))}}),h(hu,{value:{value:l,label:"Show "+l+" Rows"},option:da,handleSelectChange:e=>{s(1),y(e.value)}}))),0===g.length?h(p,{className:"no-record"},Oa.NRF):h(vu,{data:g,handleSort:e=>{E(!S),A(e)},sortDir:S,sortKey:j})))),!(t||n)&&h(d,{sx:{justifyContent:"space-between",gap:1},className:"action-show-all-dialog"},h(pu,{page:u,rowPerPage:l,total:m,handleChangePage:e=>{s(e)},isLogo:!0})))};function bu(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}const Su=()=>{const e=i(Ea),{loading:t,data:n,isMarkAllAsRead:c}=i(Ra),[u,s]=r(!1),[l,d]=r(!1),[y,m]=r(!1),[v,g]=r({}),b=0===n.length,S=a(function(){try{e({type:wa.LOADING,loading:!0}),e({type:wa.SUCCESS,data:[]}),e({type:wa.MARK_ALL_AS_READ,isMarkAllAsRead:{count:0,boo:!1}});const t=wu(function(){return bu(function(){return Promise.resolve(Promise.resolve(lc(function(){return Promise.resolve(uc.get(sc+"/v1?"+fc+"="+hc+"&"+pc+"="+yc+"&"+dc+"="+mc))},function(e){return e}))).then(function(t){if(200===t.status){var n,r;e({type:wa.SUCCESS,data:(null==(n=t.data)||null==(n=n.responseData)?void 0:n.response)||[]});const o=(e=>{let t=0;for(let n=0;n<e.length;n++)e[n].isRead||t++;return t})((null==(r=t.data)||null==(r=r.responseData)?void 0:r.response)||[]);e({type:wa.MARK_ALL_AS_READ,isMarkAllAsRead:{count:o,boo:o>0}})}})},function(){e({type:wa.ERROR,error:Oa.SWR})})},function(t,n){if(e({type:wa.LOADING,loading:!1}),t)throw n;return n});return Promise.resolve(t&&t.then?t.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},[e]);o(()=>{S()},[S]);const R=()=>{S()},E=e=>{const t=n.find(t=>t.id===e);g(t),m(!y)},j=function(t){try{if(0===t.length)return Promise.resolve();e({type:wa.LOADING,loading:!0});const r=wu(function(){return bu(function(){return Promise.resolve(vc(t)).then(function(r){if(200===r.status){let r=0;const o=n.map(e=>(e.isRead||r++,t.includes(e.id)?Object.assign({},e,{isRead:!0}):e));e({type:wa.MARK_ALL_AS_READ,isMarkAllAsRead:{count:r,boo:r>0}}),e({type:wa.SUCCESS,data:o})}})},function(){e({type:wa.ERROR,error:Oa.SWR})})},function(t,n){if(e({type:wa.LOADING,loading:!1}),t)throw n;return n});return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}};return h(f,null,h(f,{sx:{display:"flex",justifyContent:"center"}},h(sa,{count:c.count,handleClick:()=>s(!u)})),h(Sa,{title:"Alerts",open:u,loading:t,isMarkAllAsRead:c,onClose:()=>s(!u),onRefresh:R,handleShowAll:()=>{d(!l)},handleMarkAllAsRead:function(){try{const t=(e=>{const t=[];return e.forEach(e=>{e.isRead||t.push(e.id)}),t})(n);e({type:wa.LOADING,loading:!0});const r=wu(function(){return bu(function(){return Promise.resolve(vc(t)).then(function(t){if(200===t.status){const t=n.map(e=>Object.assign({},e,{isRead:!0}));e({type:wa.SUCCESS,data:t}),e({type:wa.MARK_ALL_AS_READ,isMarkAllAsRead:{count:0,boo:!1}})}})},function(){e({type:wa.ERROR,error:Oa.SWR})})},function(t,n){if(e({type:wa.LOADING,loading:!1}),t)throw n;return n});return Promise.resolve(r&&r.then?r.then(function(){}):void 0)}catch(e){return Promise.reject(e)}},headerIconType:fa,isDialogActionShow:!0,className:"alert-dialog-main"},h(w,{dividers:!0},h(f,{sx:t||b?{display:"flex",justifyContent:"center",alignItems:"center",height:320}:{height:320}},t?h(O,null):b?h(p,{className:"no-record"},Oa.NRF):h(cu,{data:nc(n),handleRead:j,handleShowDetails:E})))),h(Sa,{title:"Alerts",open:l,loading:t,onClose:()=>d(!l),onRefresh:R,headerIconType:pa,className:"alert-dialog"},h(yu,{loading:t,isEmpty:b,data:n,handleRefresh:R,handleShowDetails:E,handleRead:j})),h(Sa,{title:null==v?void 0:v.message,subTitle:null==v?void 0:v.remark,open:y,onClose:()=>m(!y),headerIconType:pa,className:"alert-dialog"},h(gu,{loading:t,isEmpty:b,data:(null==v?void 0:v.notificationDetails)||[]})))};function wu(e,t){try{var n=e()}catch(e){return t(!0,e)}return n&&n.then?n.then(t.bind(null,!1),t.bind(null,!0)):t(!1,n)}const Ou=E({palette:{primary:{main:"#E94F1C"},secondary:{main:"#1D1D1B"},input:{color:"rgba(0, 0, 0, 0.87)",border:"#ACB2BA"}}});function Ru(e){let{children:t}=e;return h(j,{theme:Ou},t)}const Eu=()=>h(Ru,null,h(ja,null,h(Su,null)));c.createRoot(document.getElementById("root")).render(h(e.StrictMode,null,h(function(){return h("div",{className:"App"},"hello",h(Eu,null))},null)));
|
|
2
|
+
//# sourceMappingURL=index.module.js.map
|