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