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