@3sc/common-component 0.0.209 → 0.0.211

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/index.umd.js CHANGED
@@ -325,7 +325,7 @@ const theme2 = createTheme({ palette: {
325
325
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(r=>o.set(r)),o}static accessor(t){const o=(this[d2]=this[d2]={accessors:{}}).accessors,r=this.prototype;function s(a){const l=sa(a);o[l]||(M6(r,a),o[l]=!0)}return oe.isArray(t)?t.forEach(s):s(t),this}};cn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),oe.reduceDescriptors(cn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}}),oe.freezeMethods(cn);function wf(e,t){const n=this||ia,o=t||n,r=cn.from(o.headers);let s=o.data;return oe.forEach(e,function(l){s=l.call(n,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function p2(e){return!!(e&&e.__CANCEL__)}function xi(e,t,n){$e.call(this,e??"canceled",$e.ERR_CANCELED,t,n),this.name="CanceledError"}oe.inherits(xi,$e,{__CANCEL__:!0});function f2(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new $e("Request failed with status code "+n.status,[$e.ERR_BAD_REQUEST,$e.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function k6(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function D6(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r=0,s=0,a;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),d=o[s];a||(a=u),n[r]=c,o[r]=u;let p=s,f=0;for(;p!==r;)f+=n[p++],p=p%e;if(r=(r+1)%e,r===s&&(s=(s+1)%e),u-a<t)return;const m=d&&u-d;return m?Math.round(f*1e3/m):void 0}}function N6(e,t){let n=0,o=1e3/t,r,s;const a=(u,d=Date.now())=>{n=d,r=null,s&&(clearTimeout(s),s=null),e.apply(null,u)};return[(...u)=>{const d=Date.now(),p=d-n;p>=o?a(u,d):(r=u,s||(s=setTimeout(()=>{s=null,a(r)},o-p)))},()=>r&&a(r)]}const fc=(e,t,n=3)=>{let o=0;const r=D6(50,250);return N6(s=>{const a=s.loaded,l=s.lengthComputable?s.total:void 0,c=a-o,u=r(c),d=a<=l;o=a;const p={loaded:a,total:l,progress:l?a/l:void 0,bytes:c,rate:u||void 0,estimated:u&&l&&d?(l-a)/u:void 0,event:s,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(p)},n)},h2=(e,t)=>{const n=e!=null;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},m2=e=>(...t)=>oe.asap(()=>e(...t)),j6=Zt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Zt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Zt.origin),Zt.navigator&&/(msie|trident)/i.test(Zt.navigator.userAgent)):()=>!0,F6=Zt.hasStandardBrowserEnv?{write(e,t,n,o,r,s){const a=[e+"="+encodeURIComponent(t)];oe.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),oe.isString(o)&&a.push("path="+o),oe.isString(r)&&a.push("domain="+r),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function B6(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function V6(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function g2(e,t,n){let o=!B6(t);return e&&(o||n==!1)?V6(e,t):t}const b2=e=>e instanceof cn?{...e}:e;function fr(e,t){t=t||{};const n={};function o(u,d,p,f){return oe.isPlainObject(u)&&oe.isPlainObject(d)?oe.merge.call({caseless:f},u,d):oe.isPlainObject(d)?oe.merge({},d):oe.isArray(d)?d.slice():d}function r(u,d,p,f){if(oe.isUndefined(d)){if(!oe.isUndefined(u))return o(void 0,u,p,f)}else return o(u,d,p,f)}function s(u,d){if(!oe.isUndefined(d))return o(void 0,d)}function a(u,d){if(oe.isUndefined(d)){if(!oe.isUndefined(u))return o(void 0,u)}else return o(void 0,d)}function l(u,d,p){if(p in t)return o(u,d);if(p in e)return o(void 0,u)}const c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l,headers:(u,d,p)=>r(b2(u),b2(d),p,!0)};return oe.forEach(Object.keys(Object.assign({},e,t)),function(d){const p=c[d]||r,f=p(e[d],t[d],d);oe.isUndefined(f)&&p!==l||(n[d]=f)}),n}const y2=e=>{const t=fr({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:s,headers:a,auth:l}=t;t.headers=a=cn.from(a),t.url=a2(g2(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let c;if(oe.isFormData(n)){if(Zt.hasStandardBrowserEnv||Zt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[u,...d]=c?c.split(";").map(p=>p.trim()).filter(Boolean):[];a.setContentType([u||"multipart/form-data",...d].join("; "))}}if(Zt.hasStandardBrowserEnv&&(o&&oe.isFunction(o)&&(o=o(t)),o||o!==!1&&j6(t.url))){const u=r&&s&&F6.read(s);u&&a.set(r,u)}return t},L6=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,o){const r=y2(e);let s=r.data;const a=cn.from(r.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:u}=r,d,p,f,m,b;function h(){m&&m(),b&&b(),r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let y=new XMLHttpRequest;y.open(r.method.toUpperCase(),r.url,!0),y.timeout=r.timeout;function v(){if(!y)return;const I=cn.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),S={data:!l||l==="text"||l==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:I,config:e,request:y};f2(function(R){n(R),h()},function(R){o(R),h()},S),y=null}"onloadend"in y?y.onloadend=v:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(v)},y.onabort=function(){y&&(o(new $e("Request aborted",$e.ECONNABORTED,e,y)),y=null)},y.onerror=function(){o(new $e("Network Error",$e.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let T=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const S=r.transitional||c2;r.timeoutErrorMessage&&(T=r.timeoutErrorMessage),o(new $e(T,S.clarifyTimeoutError?$e.ETIMEDOUT:$e.ECONNABORTED,e,y)),y=null},s===void 0&&a.setContentType(null),"setRequestHeader"in y&&oe.forEach(a.toJSON(),function(T,S){y.setRequestHeader(S,T)}),oe.isUndefined(r.withCredentials)||(y.withCredentials=!!r.withCredentials),l&&l!=="json"&&(y.responseType=r.responseType),u&&([f,b]=fc(u,!0),y.addEventListener("progress",f)),c&&y.upload&&([p,m]=fc(c),y.upload.addEventListener("progress",p),y.upload.addEventListener("loadend",m)),(r.cancelToken||r.signal)&&(d=I=>{y&&(o(!I||I.type?new xi(null,e,y):I),y.abort(),y=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const w=k6(r.url);if(w&&Zt.protocols.indexOf(w)===-1){o(new $e("Unsupported protocol "+w+":",$e.ERR_BAD_REQUEST,e));return}y.send(s||null)})},$6=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let o=new AbortController,r;const s=function(u){if(!r){r=!0,l();const d=u instanceof Error?u:this.reason;o.abort(d instanceof $e?d:new xi(d instanceof Error?d.message:d))}};let a=t&&setTimeout(()=>{a=null,s(new $e(`timeout ${t} of ms exceeded`,$e.ETIMEDOUT))},t);const l=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:c}=o;return c.unsubscribe=()=>oe.asap(l),c}},_6=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let o=0,r;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},W6=async function*(e,t){for await(const n of z6(e))yield*_6(n,t)},z6=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:o}=await t.read();if(n)break;yield o}}finally{await t.cancel()}},v2=(e,t,n,o)=>{const r=W6(e,t);let s=0,a,l=c=>{a||(a=!0,o&&o(c))};return new ReadableStream({async pull(c){try{const{done:u,value:d}=await r.next();if(u){l(),c.close();return}let p=d.byteLength;if(n){let f=s+=p;n(f)}c.enqueue(new Uint8Array(d))}catch(u){throw l(u),u}},cancel(c){return l(c),r.return()}},{highWaterMark:2})},hc=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",x2=hc&&typeof ReadableStream=="function",G6=hc&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),C2=(e,...t)=>{try{return!!e(...t)}catch{return!1}},H6=x2&&C2(()=>{let e=!1;const t=new Request(Zt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),S2=64*1024,If=x2&&C2(()=>oe.isReadableStream(new Response("").body)),mc={stream:If&&(e=>e.body)};hc&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!mc[t]&&(mc[t]=oe.isFunction(e[t])?n=>n[t]():(n,o)=>{throw new $e(`Response type '${t}' is not supported`,$e.ERR_NOT_SUPPORT,o)})})})(new Response);const U6=async e=>{if(e==null)return 0;if(oe.isBlob(e))return e.size;if(oe.isSpecCompliantForm(e))return(await new Request(Zt.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(oe.isArrayBufferView(e)||oe.isArrayBuffer(e))return e.byteLength;if(oe.isURLSearchParams(e)&&(e=e+""),oe.isString(e))return(await G6(e)).byteLength},Y6=async(e,t)=>{const n=oe.toFiniteNumber(e.getContentLength());return n??U6(t)},Tf={http:h6,xhr:L6,fetch:hc&&(async e=>{let{url:t,method:n,data:o,signal:r,cancelToken:s,timeout:a,onDownloadProgress:l,onUploadProgress:c,responseType:u,headers:d,withCredentials:p="same-origin",fetchOptions:f}=y2(e);u=u?(u+"").toLowerCase():"text";let m=$6([r,s&&s.toAbortSignal()],a),b;const h=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let y;try{if(c&&H6&&n!=="get"&&n!=="head"&&(y=await Y6(d,o))!==0){let S=new Request(t,{method:"POST",body:o,duplex:"half"}),E;if(oe.isFormData(o)&&(E=S.headers.get("content-type"))&&d.setContentType(E),S.body){const[R,A]=h2(y,fc(m2(c)));o=v2(S.body,S2,R,A)}}oe.isString(p)||(p=p?"include":"omit");const v="credentials"in Request.prototype;b=new Request(t,{...f,signal:m,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:o,duplex:"half",credentials:v?p:void 0});let w=await fetch(b);const I=If&&(u==="stream"||u==="response");if(If&&(l||I&&h)){const S={};["status","statusText","headers"].forEach(D=>{S[D]=w[D]});const E=oe.toFiniteNumber(w.headers.get("content-length")),[R,A]=l&&h2(E,fc(m2(l),!0))||[];w=new Response(v2(w.body,S2,R,()=>{A&&A(),h&&h()}),S)}u=u||"text";let T=await mc[oe.findKey(mc,u)||"text"](w,e);return!I&&h&&h(),await new Promise((S,E)=>{f2(S,E,{data:T,headers:cn.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:b})})}catch(v){throw h&&h(),v&&v.name==="TypeError"&&/fetch/i.test(v.message)?Object.assign(new $e("Network Error",$e.ERR_NETWORK,e,b),{cause:v.cause||v}):$e.from(v,v&&v.code,e,b)}})};oe.forEach(Tf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const w2=e=>`- ${e}`,X6=e=>oe.isFunction(e)||e===null||e===!1,I2={getAdapter:e=>{e=oe.isArray(e)?e:[e];const{length:t}=e;let n,o;const r={};for(let s=0;s<t;s++){n=e[s];let a;if(o=n,!X6(n)&&(o=Tf[(a=String(n)).toLowerCase()],o===void 0))throw new $e(`Unknown adapter '${a}'`);if(o)break;r[a||"#"+s]=o}if(!o){const s=Object.entries(r).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=t?s.length>1?`since :
326
326
  `+s.map(w2).join(`
327
327
  `):" "+w2(s[0]):"as no adapter specified";throw new $e("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o},adapters:Tf};function Ef(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new xi(null,e)}function T2(e){return Ef(e),e.headers=cn.from(e.headers),e.data=wf.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),I2.getAdapter(e.adapter||ia.adapter)(e).then(function(o){return Ef(e),o.data=wf.call(e,e.transformResponse,o),o.headers=cn.from(o.headers),o},function(o){return p2(o)||(Ef(e),o&&o.response&&(o.response.data=wf.call(e,e.transformResponse,o.response),o.response.headers=cn.from(o.response.headers))),Promise.reject(o)})}const E2="1.8.4",gc={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{gc[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const O2={};gc.transitional=function(t,n,o){function r(s,a){return"[Axios v"+E2+"] Transitional option '"+s+"'"+a+(o?". "+o:"")}return(s,a,l)=>{if(t===!1)throw new $e(r(a," has been removed"+(n?" in "+n:"")),$e.ERR_DEPRECATED);return n&&!O2[a]&&(O2[a]=!0,console.warn(r(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,a,l):!0}},gc.spelling=function(t){return(n,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function Z6(e,t,n){if(typeof e!="object")throw new $e("options must be an object",$e.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let r=o.length;for(;r-- >0;){const s=o[r],a=t[s];if(a){const l=e[s],c=l===void 0||a(l,s,e);if(c!==!0)throw new $e("option "+s+" must be "+c,$e.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new $e("Unknown option "+s,$e.ERR_BAD_OPTION)}}const bc={assertOptions:Z6,validators:gc},io=bc.validators;let hr=class{constructor(t){this.defaults=t,this.interceptors={request:new l2,response:new l2}}async request(t,n){try{return await this._request(t,n)}catch(o){if(o instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const s=r.stack?r.stack.replace(/^.+\n/,""):"";try{o.stack?s&&!String(o.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(o.stack+=`
328
- `+s):o.stack=s}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=fr(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:s}=n;o!==void 0&&bc.assertOptions(o,{silentJSONParsing:io.transitional(io.boolean),forcedJSONParsing:io.transitional(io.boolean),clarifyTimeoutError:io.transitional(io.boolean)},!1),r!=null&&(oe.isFunction(r)?n.paramsSerializer={serialize:r}:bc.assertOptions(r,{encode:io.function,serialize:io.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),bc.assertOptions(n,{baseUrl:io.spelling("baseURL"),withXsrfToken:io.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&oe.merge(s.common,s[n.method]);s&&oe.forEach(["delete","get","head","post","put","patch","common"],b=>{delete s[b]}),n.headers=cn.concat(a,s);const l=[];let c=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(c=c&&h.synchronous,l.unshift(h.fulfilled,h.rejected))});const u=[];this.interceptors.response.forEach(function(h){u.push(h.fulfilled,h.rejected)});let d,p=0,f;if(!c){const b=[T2.bind(this),void 0];for(b.unshift.apply(b,l),b.push.apply(b,u),f=b.length,d=Promise.resolve(n);p<f;)d=d.then(b[p++],b[p++]);return d}f=l.length;let m=n;for(p=0;p<f;){const b=l[p++],h=l[p++];try{m=b(m)}catch(y){h.call(this,y);break}}try{d=T2.call(this,m)}catch(b){return Promise.reject(b)}for(p=0,f=u.length;p<f;)d=d.then(u[p++],u[p++]);return d}getUri(t){t=fr(this.defaults,t);const n=g2(t.baseURL,t.url,t.allowAbsoluteUrls);return a2(n,t.params,t.paramsSerializer)}};oe.forEach(["delete","get","head","options"],function(t){hr.prototype[t]=function(n,o){return this.request(fr(o||{},{method:t,url:n,data:(o||{}).data}))}}),oe.forEach(["post","put","patch"],function(t){function n(o){return function(s,a,l){return this.request(fr(l||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}hr.prototype[t]=n(),hr.prototype[t+"Form"]=n(!0)});let J6=class lS{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const a=new Promise(l=>{o.subscribe(l),s=l}).then(r);return a.cancel=function(){o.unsubscribe(s)},a},t(function(s,a,l){o.reason||(o.reason=new xi(s,a,l),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new lS(function(r){t=r}),cancel:t}}};function q6(e){return function(n){return e.apply(null,n)}}function K6(e){return oe.isObject(e)&&e.isAxiosError===!0}const Of={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Of).forEach(([e,t])=>{Of[t]=e});function R2(e){const t=new hr(e),n=Y1(hr.prototype.request,t);return oe.extend(n,hr.prototype,t,{allOwnKeys:!0}),oe.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return R2(fr(e,r))},n}const yt=R2(ia);yt.Axios=hr,yt.CanceledError=xi,yt.CancelToken=J6,yt.isCancel=p2,yt.VERSION=E2,yt.toFormData=dc,yt.AxiosError=$e,yt.Cancel=yt.CanceledError,yt.all=function(t){return Promise.all(t)},yt.spread=q6,yt.isAxiosError=K6,yt.mergeConfig=fr,yt.AxiosHeaders=cn,yt.formToJSON=e=>u2(oe.isHTMLForm(e)?new FormData(e):e),yt.getAdapter=I2.getAdapter,yt.HttpStatusCode=Of,yt.default=yt;const{Axios:kz,AxiosError:Dz,CanceledError:Nz,isCancel:jz,CancelToken:Fz,VERSION:Bz,all:Vz,Cancel:Lz,isAxiosError:$z,spread:_z,toFormData:Wz,AxiosHeaders:zz,HttpStatusCode:Gz,formToJSON:Hz,getAdapter:Uz,mergeConfig:Yz}=yt,Rf={BASE_URL:"https://qa.3sc.ai/api",VERSION:"/v1"};/*! js-cookie v3.0.5 | MIT */function yc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)e[o]=n[o]}return e}var Q6={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Pf(e,t){function n(r,s,a){if(!(typeof document>"u")){a=yc({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),r=encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var c in a)a[c]&&(l+="; "+c,a[c]!==!0&&(l+="="+a[c].split(";")[0]));return document.cookie=r+"="+e.write(s,r)+l}}function o(r){if(!(typeof document>"u"||arguments.length&&!r)){for(var s=document.cookie?document.cookie.split("; "):[],a={},l=0;l<s.length;l++){var c=s[l].split("="),u=c.slice(1).join("=");try{var d=decodeURIComponent(c[0]);if(a[d]=e.read(u,d),r===d)break}catch{}}return r?a[r]:a}}return Object.create({set:n,get:o,remove:function(r,s){n(r,"",yc({},s,{expires:-1}))},withAttributes:function(r){return Pf(this.converter,yc({},this.attributes,r))},withConverter:function(r){return Pf(yc({},this.converter,r),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var e_=Pf(Q6,{path:"/"});const Vo={TOKEN:"token",USER:"user",SNOP:"snop",SELECTED_BU:"selected_business_unit",SETTINGS:"settings"},Af={BEARER:"Bearer",TENANT_ID:"tenant_id",BU_ID:"bu_id",SNOP_ID:"snop_id"},vc={REFRESH:"refresh",CLOSE:"close"},t_=Object.values({"SKU Name":"sku_name",Node:"node","Channel Name":"channel_name"}),P2=[10,25,50,100],A2={MARK_ALL_READ:"MARK_ALL_READ"},n_=P2.map(e=>({label:e,value:e})),M2={PRIMARY:"PRIMARY",SECONDARY:"SECONDARY"},Mf=ic(Vo.SNOP),kf=ic(Vo.SELECTED_BU),Df=ic(Vo.USER),o_=ic(Vo.SETTINGS),mr={BU_IDS:kf==null?void 0:kf.business_unit_id,TOKEN:JSON.parse(e_.get(Vo.TOKEN)||null),TENANT_IDS:Df==null?void 0:Df.tenant_id,SNOP_IDS:Mf==null?void 0:Mf.snop_id,GRID_SETTINGS:o_},aa={headers:{"Content-Type":"application/json",Authorization:`${Af.BEARER} ${mr.TOKEN}`}},k2=yt.create({baseURL:Rf.BASE_URL,axiosConfig:aa});k2.interceptors.request.use(function(e){return e},function(e){return Promise.reject(e)}),k2.interceptors.response.use(function(e){return e},function(e){return Promise.reject(e)});const xc={NOTIFICATION:"/notifications",SETTING:"/configuration/setting"},{TENANT_ID:r_,BU_ID:i_}=Af,{TENANT_IDS:s_,BU_IDS:a_}=mr,Cc=async({baseUrl:e,payload:t})=>{try{const n=`${e}${xc.SETTING}/v1?${r_}=${s_}&${i_}=${a_}`;return await yt.post(n,t,aa)}catch(n){return n}},l_=({columns:e,gridPath:t,baseUrl:n,isDefaultConfig:o,pageSize:r})=>{var b;let{definitions:s,defaultUserSettings:a,labels:l}=e;const c=t.split("/").filter(Boolean);let u=c.reduce((h,y)=>h==null?void 0:h[y],mr.GRID_SETTINGS)||null;o||!u&&!a&&(async()=>{try{a=D2({definitions:s});let h=mr.GRID_SETTINGS||{platform:{theme:"light"}};const y=(u==null?void 0:u.pageSize)??r;let v=h;for(let w=0;w<c.length;w++){const I=c[w];w===c.length-1?v[I]={columns:a,pageSize:y}:(v[I]=v[I]||{},v=v[I])}localStorage.setItem(Vo.SETTINGS,JSON.stringify(h)),await Cc({baseUrl:n,payload:h})}catch(h){console.error(h)}})(),a=(u==null?void 0:u.columns)??a??D2({definitions:s});const d=a.reduce((h,y)=>(h[y.id]=y,h),{}),p=l.reduce((h,y)=>(h[y.id]=y,h),{}),f=[];for(const h of s){const y=d[h.id]||{},v=p[h.id]||{};let w={...h,...y,...v};if((b=h.children)!=null&&b.length){const I=y.children||[],T=v.children||[];w.children=h.children.map((S,E)=>({...S,...I[E],...T[E]}))}f.push(w)}return f.sort((h,y)=>h.sequenceId-y.sequenceId)},c_=e=>e.sort((t,n)=>t.sequenceId-n.sequenceId),D2=({definitions:e})=>e.map((t,n)=>({id:t.id,key:t.key,sequenceId:t.id,isHidden:!1,style:t.style||{}}));class Nf extends _.Component{constructor(t){super(t),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.dragging=!1,this.mouseX=0,this.startPos=0,this.startWidthPrev=0,this.lastDraggedWidth=0,this.draggedCol=null,this.resizeRef=_.createRef()}startDrag(){if(!this.props.disabled&&(this.draggedCol=this.props.id,this.props.resizeStart&&this.draggedCol===this.props.id&&this.props.resizeStart(),this.dragging=!0,this.startPos=this.mouseX,this.startWidthPrev=0,this.resizeRef.current)){let t=this.resizeRef.current.previousSibling;t&&(this.startWidthPrev=t.clientWidth)}}endDrag(){this.props.disabled||(this.dragging=!1,this.props.resizeEnd&&this.draggedCol===this.props.id&&this.props.resizeEnd(this.lastDraggedWidth),this.draggedCol=null)}onMouseMove(t){if(this.props.disabled||(this.mouseX=t.touches?t.touches[0].screenX:t.screenX,!this.dragging))return;const n=this.resizeRef.current,o=this.startPos-this.mouseX;let r=this.startWidthPrev-o;(!this.props.minWidth||r>=this.props.minWidth)&&(!this.props.maxWidth||r<=this.props.maxWidth)&&(n.previousSibling.style.width=r+"px",n.previousSibling.style.minWidth=r+"px",n.previousSibling.style.maxWidth=r+"px",n.previousSibling.style.setProperty("--column_resize_before_width",r+"px"),this.lastDraggedWidth=r)}componentDidMount(){const t=this.resizeRef.current;if(t&&(this.props.defaultWidth?(t.previousSibling.style.minWidth=this.props.defaultWidth+"px",t.previousSibling.style.width=this.props.defaultWidth+"px",t.previousSibling.style.maxWidth=this.props.defaultWidth+"px",t.previousSibling.style.setProperty("--column_resize_before_width",this.props.defaultWidth+"px")):this.props.minWidth&&(t.previousSibling.style.minWidth=this.props.minWidth+"px",t.previousSibling.style.width=this.props.minWidth+"px",t.previousSibling.style.maxWidth=this.props.minWidth+"px",t.previousSibling.style.setProperty("--column_resize_before_width",this.props.minWidth+"px"))),this.props.disabled){this.props.defaultWidth&&t&&(t.previousSibling.style.minWidth=this.props.defaultWidth+"px",t.previousSibling.style.width=this.props.defaultWidth+"px",t.previousSibling.style.maxWidth=this.props.defaultWidth+"px",t.previousSibling.style.setProperty("--column_resize_before_width",this.props.defaultWidth+"px")),this.props.maxWidth&&t&&(t.previousSibling.style.maxWidth=this.props.maxWidth+"px");return}this.addEventListenersToDocument()}componentWillUnmount(){this.props.disabled||this.removeEventListenersFromDocument()}componentDidUpdate(t,n){t.disabled&&!this.props.disabled&&this.addEventListenersToDocument(),!t.disabled&&this.props.disabled&&this.removeEventListenersFromDocument()}addEventListenersToDocument(){document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("mouseup",this.endDrag),document.addEventListener("touchmove",this.onMouseMove),document.addEventListener("touchend",this.endDrag)}removeEventListenersFromDocument(){document.removeEventListener("mousemove",this.onMouseMove),document.removeEventListener("mouseup",this.endDrag),document.removeEventListener("touchmove",this.onMouseMove),document.removeEventListener("touchend",this.endDrag)}render(){var t={userSelect:"none"};return this.props.disabled||(t.cursor="ew-resize"),this.props.className===""&&(t.width="6px",t.backgroundColor="rgba(0, 0, 0, 0.1)"),_.createElement("th",{ref:this.resizeRef,style:t,disabled:this.props.disabled,rowSpan:this.props.rowSpan?this.props.rowSpan:1,colSpan:this.props.colSpan?this.props.colSpan:1,className:`column_resizer_own_class ${this.props.disabled?"disabled_column_resize":""} ${this.props.className}`,onMouseDown:this.props.disabled?null:this.startDrag,onTouchStart:this.props.disabled?null:this.startDrag})}}Nf.defaultProps={disabled:!1,minWidth:0,className:""},Nf.propTypes={disabled:"boolean",minWidth:"number",className:"string"};const u_=(e,t,n,o)=>{const[r,s]=_.useState({isOpen:!1,column:null}),a=(u,d)=>{s({isOpen:u.currentTarget,column:d})},l=()=>{s({isOpen:!1,column:null})};return{selectedColumn:r,handleMenuClick:a,handleClose:l,handleHideClick:async()=>{l();const u=e.map(p=>{var f;return p.id===((f=r==null?void 0:r.column)==null?void 0:f.id)?{...p,isHidden:!0}:p});t({type:Xe.SET_GRID_DATA,payload:{visibleGridColumns:u}});let d=mr.GRID_SETTINGS||{platform:{theme:"light"},grid:{}};d.grid=d.grid||{},d.grid[o]=u,localStorage.setItem(Vo.SETTINGS,JSON.stringify(d)),await Cc({baseUrl:n,payload:d})}}},N2=({pagination:e})=>{const{selectedPage:t,rowPerPage:n,totalRecords:o,onPageChange:r,onPageSizeChange:s}=e,a=ft();return g.jsxs(ge,{sx:{display:"flex",p:"1rem 2rem"},children:[g.jsxs(ge,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"0.5rem",width:"100%"},children:[g.jsx(tt,{sx:{fontSize:"1.1rem",color:a.palette.primary.notifyTextColor},children:`Showing ${(t-1)*n+1} to ${Math.min(t*n,o)} of ${o} rows`}),g.jsx(ge,{sx:{"& .MuiInputBase-input":{padding:"0rem 0.8rem!important"},width:"9%"},children:g.jsx(sc,{options:n_,value:n,onChange:s})}),g.jsx(tt,{sx:{fontSize:"1.1rem",color:a.palette.primary.notifyTextColor},children:"records per page"})]}),g.jsx(hd,{count:Math.ceil(o/n),page:t,onChange:(l,c)=>{r(c)},shape:"rounded",sx:{width:"100%","& .MuiPagination-ul":{width:"100%",display:"flex",justifyContent:"flex-end","& li:first-of-type":{border:`0.1rem solid ${a.palette.primary.notifyBorderColor}`,color:a.palette.primary.notifyActiveText,marginRight:"1.5rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex"},"& li:last-child":{border:`0.1rem solid ${a.palette.primary.notifyBorderColor}`,color:a.palette.primary.notifyActiveText,marginLeft:"1.5rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex"}},"& .MuiPaginationItem-root":{color:"#595959",fontSize:"1.1rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex","& .MuiSvgIcon-root":{fontSize:"2.2rem"}},"& .Mui-selected":{color:a.palette.primary.notifyActiveText,backgroundColor:`${a.palette.brandColor.paginationBc} !important`}}})]})};N2.propTypes={pagination:i.object.isRequired};function jf({isRenderCellContent:e,column:t,row:n,parent:o}){const r=n[t.key];return g.jsx(g.Fragment,{children:e?g.jsx(ge,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textTransform:"none",fontSize:"1.1rem"},component:"label",children:t==null?void 0:t.cellRenderer(n,{column:t,parent:o})}):g.jsx(X0,{title:(r==null?void 0:r.length)>20?r:"",arrow:!0,children:g.jsx(ge,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textTransform:"none",fontSize:"1.1rem"},component:"label",children:l$(r)})})})}jf.propTypes={isRenderCellContent:i.bool,column:i.object,row:i.object};const j2=({menuOpen:e,handleClose:t,onHideClick:n})=>{const o=ft();return g.jsx(yl,{open:!!e,anchorEl:e,onClose:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:g.jsx(ge,{sx:{p:"0.4rem 1rem",backgroundColor:o.palette.primary.notifyBackground,border:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,minHeight:"2.3rem",display:"flex",justifyContent:"center",alignItems:"center"},children:g.jsx(Fn,{onClick:n,sx:{textTransform:"none",fontSize:"1.1rem",p:0,minHeight:"unset",fontWeight:"500",color:o.palette.primary.notifyTextColor},children:"Hide Column"})})})};j2.propTypes={menuOpen:i.object,handleClose:i.func,onHideClick:i.func};const d_=Y(rd)(({theme:e})=>({"& .MuiPaper-root":{borderRadius:8,border:`1px solid ${e.palette.primary.notifyBorderColor}`,boxShadow:e.shadows[4],padding:"1rem 1rem 0rem 1rem",backgroundColor:e.palette.primary.notifyBackground}})),so=Y(tt)(({theme:e})=>({color:e.palette.primary.notifyTextColor})),p_=Y(Z0)(({theme:e})=>({width:28,height:16,padding:0,display:"flex","&:active":{"& .MuiSwitch-thumb":{width:15},"& .MuiSwitch-switchBase.Mui-checked":{transform:"translateX(9px)"}},"& .MuiSwitch-switchBase":{padding:2,"&.Mui-checked":{transform:"translateX(12px)",color:"#fff","& + .MuiSwitch-track":{opacity:1,backgroundColor:"#1890ff",...e.applyStyles("dark",{backgroundColor:"#177ddc"})}}},"& .MuiSwitch-thumb":{boxShadow:"0 2px 4px 0 rgb(0 35 11 / 20%)",width:12,height:12,borderRadius:6,transition:e.transitions.create(["width"],{duration:200})},"& .MuiSwitch-track":{borderRadius:16/2,opacity:1,backgroundColor:"rgba(0,0,0,.25)",boxSizing:"border-box",...e.applyStyles("dark",{backgroundColor:"rgba(255,255,255,.35)"})}})),f_=e=>{const{children:t,value:n,index:o,...r}=e;return g.jsx("div",{role:"tabpanel",hidden:n!==o,...r,children:n===o&&g.jsx(ge,{sx:{pl:"0.5rem",pb:"0.5rem"},children:t})})},h_=Y(ds)(({theme:e})=>({color:e.palette.primary.notifyTextColor,padding:"0.6rem 0",fontSize:"0.9rem",fontWeight:500,"&::before, &::after":{borderColor:`${e.palette.primary.notifyBorderColor}!important`}})),m_=Y(Ku)(({theme:e})=>({"& .MuiBadge-badge":{right:3.5,top:2.34,border:`0.1rem solid ${e.palette.primary.notifyBackground}`,padding:"0 1.3px",borderRadius:"50%",backgroundColor:"#D44E40",fontSize:"0.725rem",minWidth:"0.7rem",height:"0.7rem"}}));Y(Il)(({theme:e})=>({"& .MuiInputBase-root":{height:"3.52rem"},"& .MuiFormLabel-root":{color:`${e.palette.primary.notifyBorderColor} !important`,fontSize:"1rem",marginTop:"0.4rem"},"& label.Mui-focused":{color:e.palette.primary.notifyTextColor},"& .MuiInput-underline:after":{borderBottomColor:e.palette.primary.notifyBorderColor,borderBottomWidth:"0.1rem"},"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"},"&:hover fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"},"&.Mui-focused fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"}}}));const g_=Y(cb)(({theme:e})=>({"& .MuiTabs-indicator":{height:"0.1rem",backgroundColor:e.palette.primary.notifyActiveBorderColor}})),Ff=Y(J0)(({theme:e})=>({color:"gray","&.Mui-selected":{color:e.palette.primary.notifyActiveBorderColor,fontWeight:"bold"}})),F2=({sortKey:e,sortField:t,sortDir:n,handleSortClick:o})=>{const r=s=>g.jsx(ho,{onClick:o,sx:{padding:"0.5rem"},children:g.jsx(ge,{component:"img",src:s})});return g.jsx(g.Fragment,{children:r(t===e?n==="asc"?Je.AscSort:Je.DescSort:Je.Unsort)})};F2.propTypes={sortKey:i.string.isRequired,sortField:i.string,sortDir:i.string,handleSortClick:i.func};function B2({parent:e,column:t,sort:n,handleMenuClick:o,isManageable:r}){const s=t==null?void 0:t.isMandatory,a=t==null?void 0:t.label,l=t==null?void 0:t.isSortable,c=n==null?void 0:n.sortField,u=n==null?void 0:n.sortDir,d=n==null?void 0:n.onSort;return g.jsxs(ge,{sx:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.1rem",textAlign:"center",whiteSpace:"normal"},children:[a,g.jsxs(ge,{sx:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[l&&g.jsx(F2,{sortKey:e?`${e==null?void 0:e.key}|${t==null?void 0:t.key}`:t==null?void 0:t.key,sortField:c,sortDir:u,handleSortClick:()=>d({column:t,sortDir:u,sortField:c,parent:e})}),r&&!s&&g.jsx(ho,{onClick:p=>o(p,t),sx:{padding:"0.5rem"},children:g.jsx(ge,{component:"img",src:Je.Menu})})]})]})}B2.propTypes={column:i.object.isRequired,sort:i.object.isRequired,handleMenuClick:i.func,isManageable:i.bool};const b_=Y(Cd)(({theme:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"table-cell",[`&.${xd.head}`]:{color:e.palette.primary.notifyTextColor,backgroundColor:e.palette.primary.notifyBackground,borderColor:e.palette.primary.notifyBorderColor,padding:"0.3rem 1rem",textAlign:"center"},[`&.${xd.body}`]:{color:e.palette.primary.notifyTextColor,borderColor:e.palette.primary.notifyBorderColor,padding:"0.3rem 1rem",textAlign:"center"}}));function Ci({children:e,...t}){return g.jsx(b_,{...t,children:e})}Ci.propTypes={children:i.node};const y_=Y(vs)(()=>({"&:last-child td":{borderBottom:0}}));function Si({children:e,...t}){return g.jsx(y_,{...t,children:e})}Si.propTypes={children:i.node};function V2({rows:e,sort:t,data:n,pagination:o,columns:r,nested:s,baseUrl:a,gridPath:l}){var j;const c=ft(),{visibleGridColumns:u}=_.useContext(ta),d=_.useContext(na),{selectedColumn:p,handleMenuClick:f,handleClose:m,handleHideClick:b}=u_(u,d,a,l),h=r==null?void 0:r.isManageable,y=(n==null?void 0:n.length)>0,v=_.useRef(null),[w,I]=_.useState(null);let T=null;const S=_.useRef(0),E=c_(((j=s==null?void 0:s.column)==null?void 0:j.definitions)||[]),R=s==null?void 0:s.isNested,A=(s==null?void 0:s.data)||[],D=s==null?void 0:s.hashKey;if(!y)return g.jsx(so,{sx:{textAlign:"center"},children:_n.NRF});const B=(P,N)=>{I(N),P.dataTransfer.setData("colIndex",N)},$=P=>{P.preventDefault(),W(P)},k=async(P,N)=>{if(P.preventDefault(),clearInterval(T),w===null||w===N)return;const L=[...u],[H]=L.splice(w,1);L.splice(N,0,H);const Z=u.slice().sort((te,K)=>te.sequenceId-K.sequenceId).map(te=>te.sequenceId),U=L.map((te,K)=>({...te,sequenceId:Z[K]??te.sequenceId})),q={...mr.GRID_SETTINGS||{platform:{theme:"light"}}},X=l.split("/").filter(Boolean);let ee=q;for(let te=0;te<X.length;te++){const K=X[te];if(te===X.length-1){const ne=(o==null?void 0:o.rowPerPage)??null;ee[K]={columns:U,pageSize:ne}}else ee[K]=ee[K]||{},ee=ee[K]}localStorage.setItem(Vo.SETTINGS,JSON.stringify(q)),d({type:Xe.SET_GRID_DATA,payload:{visibleGridColumns:U}}),await Cc({baseUrl:a,payload:q}),I(null)},W=P=>{const N=v.current,{left:L,right:H}=N.getBoundingClientRect(),Z=50,U=P.clientX>H-Z?1:P.clientX<L+Z?-1:0;U!==0?(clearInterval(T),T=setInterval(()=>{N.scrollLeft+=U*10},50)):clearInterval(T)},V=(P,N,L,H)=>{var X,ee,te;const Z=(P==null?void 0:P.isMandatory)&&(P==null?void 0:P.isSticky),U=parseFloat((ee=(X=P==null?void 0:P.style)==null?void 0:X.minWidth)==null?void 0:ee.toString().replace("rem",""))||7.5;N===0&&(S.current=0);const q=Z?N===0?0:`${S.current}rem`:void 0;return Z&&(S.current+=U),g.jsx(Ci,{rowSpan:P!=null&&P.children?1:2,colSpan:(te=P==null?void 0:P.children)==null?void 0:te.length,style:P==null?void 0:P.style,draggable:L&&!H&&!(P!=null&&P.isMandatory),onDragStart:L?K=>B(K,N):void 0,onDragOver:L?$:void 0,onDrop:L?K=>k(K,N):void 0,sx:{...Z&&{borderRadius:"0rem!important",position:"sticky",left:q,zIndex:3},...P!=null&&P.children||H?{borderRadius:"0rem!important",borderRight:K=>`0.1rem solid ${K.palette.primary.notifyBorderColor}`}:{borderLeft:K=>(P==null?void 0:P.key)==="volume_value"&&`0.1rem solid ${K.palette.primary.notifyBorderColor}`,borderRight:K=>(P==null?void 0:P.key)==="volume_value"&&`0.1rem solid ${K.palette.primary.notifyBorderColor}`}},children:g.jsx(B2,{parent:H,column:P,sort:t,handleMenuClick:f,isManageable:L})},N)},M=(P,N,L,H)=>!(P!=null&&P.isMandatory)&&L?g.jsx(ge,{component:Nf,id:N,sx:{width:"4rem",maxWidth:"4rem",minWidth:"4rem",padding:0,position:"relative",borderBottom:`0.1rem solid ${c.palette.primary.notifyBorderColor}`,"&::after":{content:'""',position:"absolute",left:"50%",top:"50%",transform:"translate(0%, -50%)",width:"0.2rem",height:"50%",background:c.palette.primary.notifyBorderColor}},disabled:!L}):null,O=(P,N,L,H)=>{var X,ee,te;const Z=(P==null?void 0:P.isMandatory)&&(P==null?void 0:P.isSticky),U=parseFloat((ee=(X=P==null?void 0:P.style)==null?void 0:X.minWidth)==null?void 0:ee.toString().replace("rem",""))||7.5;L===0&&(S.current=0);const q=Z?L===0?0:`${S.current}rem`:void 0;return Z&&(S.current+=U),g.jsxs(Ci,{style:P==null?void 0:P.style,className:`${P==null?void 0:P.label}`,sx:{position:"relative",...Z&&{position:"sticky",left:q,zIndex:2,backgroundColor:K=>{var ne;return e&&((ne=e==null?void 0:e.selectedRow)==null?void 0:ne.fhi)===(N==null?void 0:N.fhi)||N!=null&&N.isHigh?K.palette.primary.appBackground:K.palette.primary.notifyBackground}},...H?{p:"0rem!important",borderRight:K=>`0.1rem solid ${K.palette.primary.notifyBorderColor}`}:{px:"0rem!important",borderLeft:K=>(P==null?void 0:P.key)==="volume_value"&&`0.1rem solid ${K.palette.primary.notifyBorderColor}`,borderRight:K=>(P==null?void 0:P.key)==="volume_value"&&`0.1rem solid ${K.palette.primary.notifyBorderColor}`}},children:[(e&&((te=e==null?void 0:e.selectedRow)==null?void 0:te.fhi)===(N==null?void 0:N.fhi)||(N==null?void 0:N.isHigh))&&g.jsx(ge,{sx:{position:"absolute",bottom:0,left:0,width:"100%",height:"0.05rem",background:"linear-gradient(#F9B16E, #F68080)"}}),g.jsx(jf,{isRenderCellContent:!!(P!=null&&P.cellRenderer),column:P,row:N,parent:H})]},L)},F=(P,N,L,H)=>!(P!=null&&P.isMandatory)&&L?g.jsx(Ci,{className:"column_resizer_body"},`resize-${N}`):null;return g.jsxs(g.Fragment,{children:[g.jsx(Q0,{sx:{maxHeight:"100%",whiteSpace:"nowrap",overflow:"auto",width:"100%",border:`0.1rem solid ${c.palette.primary.notifyBorderColor}`,borderRadius:"1.4rem"},children:g.jsxs(yd,{ref:v,stickyHeader:!0,"aria-label":"sticky table",sx:{backgroundColor:P=>P.palette.primary.notifyBackground},children:[g.jsxs(Sd,{children:[g.jsx(Si,{children:u.map((P,N)=>P!=null&&P.isHidden?null:g.jsxs(_.Fragment,{children:[V(P,N,h),(r==null?void 0:r.isResizable)&&M(P,N,h)]},N))}),g.jsx(Si,{children:u.flatMap((P,N)=>P!=null&&P.isHidden||!(P!=null&&P.children)?[]:P.children.map((L,H)=>g.jsxs(_.Fragment,{children:[V(L,H,h,P),(r==null?void 0:r.isResizable)&&M(L,H,h)]},`${N}-${H}`)))})]}),g.jsx(vd,{children:n.map((P,N)=>{const L=P[D],H=A==null?void 0:A[L],Z=(H==null?void 0:H.length)>0;return g.jsxs(_.Fragment,{children:[g.jsx(Si,{sx:{backgroundColor:U=>{var q;return e&&((q=e==null?void 0:e.selectedRow)==null?void 0:q.fhi)===(P==null?void 0:P.fhi)||P!=null&&P.isHigh?U.palette.primary.appBackground:U.palette.primary.notifyBackground}},onClick:()=>e==null?void 0:e.onRowClick(P),children:u.map((U,q)=>U!=null&&U.isHidden?null:U!=null&&U.children?U.children.map((X,ee)=>g.jsxs(_.Fragment,{children:[O(X,P,ee,U),(r==null?void 0:r.isResizable)&&F(X,ee,h)]},`${q}-${ee}`)):g.jsxs(_.Fragment,{children:[O(U,P,q),(r==null?void 0:r.isResizable)&&F(U,q,h)]},q))}),R&&H&&g.jsx(g.Fragment,{children:Z?H.map((U,q)=>g.jsx(Si,{children:E.map((X,ee)=>g.jsx(Ci,{style:X==null?void 0:X.style,children:g.jsx(jf,{isRenderCellContent:!!(X!=null&&X.cellRenderer),column:X,row:U})},ee))},`nested-${q}`)):g.jsx(Si,{children:g.jsx(Ci,{colSpan:E.length,children:g.jsx(so,{sx:{textAlign:"center"},children:_n.NRF})})})})]},N)})})]})}),o&&g.jsx(N2,{pagination:o}),g.jsx(j2,{menuOpen:p==null?void 0:p.isOpen,handleClose:m,onHideClick:b})]})}V2.propTypes={sort:i.object,data:i.array,pagination:i.object,columns:i.object,nested:i.object};function L2({tableProps:e,isDefaultConfig:t,gridPath:n,baseUrl:o}){var u;const{columns:r}=e,{visibleGridColumns:s=[]}=_.useContext(ta)??{},a=_.useContext(na),l=_.useMemo(()=>{var d;return l_({columns:r,gridPath:n,baseUrl:o,isDefaultConfig:t,pageSize:(d=e==null?void 0:e.pagination)==null?void 0:d.rowPerPage})},[r,n,o,t,(u=e==null?void 0:e.pagination)==null?void 0:u.rowPerPage]),c=_.useMemo(()=>{const d=new Map(l.map(p=>[p.id,p]));return s.map(p=>{const f=d.get(p.id),m={...p,label:(f==null?void 0:f.label)??"",...(f==null?void 0:f.cellRenderer)&&{cellRenderer:f.cellRenderer}};return console.log({mergedCol:f,latestCol:m,visibleCol:p}),m})},[l]);return _.useEffect(()=>{a({type:Xe.SET_GRID_DATA,payload:{visibleGridColumns:s.length?c:l}})},[l]),g.jsx(V2,{...e,gridPath:n,baseUrl:o})}L2.propTypes={tableProps:i.object.isRequired,mergedColumns:i.array.isRequired};const $2=({type:e})=>{const t=ft(),o=(t==null?void 0:t.mode)==="dark"?{bgcolor:"grey.800"}:{};return{grid:g.jsxs(ge,{sx:{borderRadius:2,overflow:"hidden"},children:[g.jsx(go,{variant:"text",width:"100%",height:60,sx:o}),Array.from({length:10}).map((s,a)=>g.jsx(ge,{sx:{display:"flex",alignItems:"center",padding:"0.5rem",gap:"3rem"},children:Array.from({length:5}).map((l,c)=>g.jsx(ge,{sx:{flex:1},children:g.jsx(go,{variant:"text",height:45,sx:o})},c))},a))]}),toolbar:g.jsx(g.Fragment,{children:g.jsxs(lt,{direction:"row",justifyContent:"space-between",sx:{display:"flex",gap:"1rem"},children:[g.jsxs(lt,{direction:"row",gap:"1rem",children:[g.jsx(go,{variant:"text",width:"10.2rem",height:"5rem",sx:o}),g.jsx(go,{variant:"text",width:"3.5rem",height:"5rem",sx:o}),g.jsx(go,{variant:"text",width:"15.2rem",height:"5rem",sx:o})]}),g.jsxs(lt,{direction:"row",gap:"1rem",children:[g.jsx(go,{variant:"text",width:"10.2rem",height:"5rem",sx:o}),g.jsx(go,{variant:"text",width:"3.5rem",height:"5rem",sx:o}),g.jsx(go,{variant:"text",width:"3.5rem",height:"5rem",sx:o})]})]})})}[e]},v_=e=>{if(!e)return null;const{options:t,...n}=e,o=t?"select":"button",r={button:s=>g.jsx(sr,{...s}),select:s=>{var a;return g.jsx(ge,{sx:{"& .MuiInputBase-input":{padding:"0rem!important"},width:(a=s.styles)==null?void 0:a.width},children:g.jsx(W1,{...s,options:t})})}};return r[o]?r[o](n):null},x_=({presentSetting:e,gridSetting:t,gridPath:n})=>{var a;if(!n)return e;const o=n.split("/").filter(Boolean),r=(a=t==null?void 0:t.grid)==null?void 0:a.map(({id:l,isHidden:c,isSortable:u,key:d,sequenceId:p})=>({id:l,isHidden:c,isSortable:u,key:d,sequenceId:p}));let s=e;for(let l=0;l<o.length;l++){const c=o[l];l===o.length-1?s[c]={columns:r,pageSize:(t==null?void 0:t.pageSize)??null}:(s[c]=s[c]||{},s=s[c])}return{settingObject:e,defaultUserSettings:r}},C_=async({baseUrl:e,gridSetting:t,gridPath:n})=>{try{const o=JSON.parse(localStorage.getItem("settings")),{settingObject:r,defaultUserSettings:s}=x_({presentSetting:o,gridSetting:t,gridPath:n});return localStorage.setItem("settings",JSON.stringify(r)),await Cc({baseUrl:e,payload:r}),s}catch(o){console.error(o)}},S_=({customTools:e})=>{var o,r;const t=(o=e==null?void 0:e.filter(s=>(s==null?void 0:s.type)===M2.PRIMARY))==null?void 0:o.sort((s,a)=>s.sequenceId-a.sequenceId),n=(r=e==null?void 0:e.filter(s=>(s==null?void 0:s.type)===M2.SECONDARY))==null?void 0:r.sort((s,a)=>s.sequenceId-a.sequenceId);return{primaryButtons:t,secondaryButtons:n}},_2=({customTools:e,isExpanded:t,setIsExpanded:n})=>{const{primaryButtons:o,secondaryButtons:r}=S_({customTools:e}),[s,a]=_.useState(o),l=(r==null?void 0:r.length)>0,c=d=>{d?a([...o,...r]):setTimeout(()=>{a(o)},100)},u=()=>{const d=!t;n(d),c(d)};return _.useEffect(()=>{c(t)},[e]),g.jsxs(g.Fragment,{children:[t&&g.jsx("div",{style:{position:"fixed",left:0,width:"100vw",height:"4rem",zIndex:998}}),g.jsxs(ge,{sx:{display:"flex",alignItems:"center",gap:"0.8rem",flexWrap:"nowrap",maxWidth:"100%",whiteSpace:"nowrap",zIndex:999},children:[g.jsx(M3,{mode:"popLayout",children:s.map(d=>g.jsx(Ws.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},layout:!0,children:g.jsx(ge,{sx:{flexShrink:0,minWidth:"fit-content"},children:v_(d)})},d.id))}),l&&g.jsx(ge,{sx:{paddingLeft:t?"0.5rem":0},children:g.jsx(sr,{label:t?"":"More Actions",styles:{icon:t?Je.CrossWhite:Je.More,colorType:t?"danger":""},onClick:u})})]})]})};_2.propTypes={customTools:i.array.isRequired};const W2=({defaultTools:e,isManageable:t,customTools:n,baseUrl:o,gridPath:r,managableColumns:s=[],pageSize:a})=>{var y,v,w,I,T,S;const l=_.useContext(na),{visibleGridColumns:c,triggerApi:u}=_.useContext(ta),[d,p]=_.useState([]),[f,m]=_.useState(!1);_.useEffect(()=>{if(s.length){const E=s.length?c.filter(R=>s.includes(R.id)):c;p(E)}},[s,c]);const b=async E=>{try{await C_({baseUrl:o,gridPath:r,gridSetting:{grid:E,pageSize:a}})}catch(R){console.error(R)}finally{l({type:Xe.HAS_SETTING_CHANGE,payload:{hasChange:!1}}),l({type:Xe.TRIGGER_API,payload:{triggerApi:!1}})}};_.useEffect(()=>{u&&b(c)},[u]);const h=E=>{const R=c.map(A=>d.some(B=>B.id===A.id)?{...A,isHidden:!E.some(B=>B.id===A.id)}:A);l({type:Xe.SET_GRID_DATA,payload:{visibleGridColumns:R}}),l({type:Xe.HAS_SETTING_CHANGE,payload:{hasChange:!0}})};return g.jsxs(ge,{sx:{margin:"1rem 0",position:"relative",zIndex:10,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:"0.6rem",width:"100%"},children:[g.jsxs(ge,{sx:{display:"flex",flexDirection:"row",gap:"0.6rem"},children:[((y=e==null?void 0:e.search)==null?void 0:y.isRequired)&&g.jsx(V1,{...e==null?void 0:e.search}),((v=e==null?void 0:e.groupBy)==null?void 0:v.isRequired)&&g.jsx(ge,{sx:{"& .MuiInputBase-input":{padding:"0rem!important"}},children:g.jsx(sc,{styles:{icon:Je.Group},...e.groupBy})}),((w=e==null?void 0:e.refresh)==null?void 0:w.isRequired)&&g.jsx(sr,{...e==null?void 0:e.refresh,styles:{variant:"filled",icon:Je.Refresh,colorType:"empty",width:"3.2rem",height:"3.2rem"}}),t&&g.jsx(ge,{sx:{"& .MuiInputBase-input":{padding:"0rem!important"}},children:g.jsx(sc,{placeholder:"Manage Columns",options:d,value:d.filter(E=>!E.isHidden),isMulti:!0,isDraggable:!0,showSearch:!0,onChange:h,styles:{icon:Je.Manage}})})]}),g.jsxs(ge,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-end",gap:"0.6rem"},children:[n&&g.jsx(_2,{customTools:n,setIsExpanded:m,isExpanded:f}),((I=e==null?void 0:e.save)==null?void 0:I.isRequired)&&g.jsx(ge,{sx:{px:"0.5rem"},children:g.jsx(sr,{label:f?"":"Save",styles:{icon:Je.Save,colorType:"empty"},...e==null?void 0:e.save})}),((T=e==null?void 0:e.upload)==null?void 0:T.isRequired)&&g.jsx(sr,{...e==null?void 0:e.upload,styles:{variant:f?"outlined":"filled",icon:f?Je.UploadDark:Je.Upload,colorType:"secondary",isAnimate:!0}}),((S=e==null?void 0:e.download)==null?void 0:S.isRequired)&&g.jsx(sr,{...e==null?void 0:e.download,styles:{variant:"outlined",icon:Je.Download,isAnimate:!0}})]})]})};W2.propTypes={defaultTools:i.object.isRequired,customTools:i.array,isManageable:i.bool,baseUrl:i.string,gridPath:i.gridPath};function z2({tableProps:e,toolbarProps:t,isDefaultConfig:n,isLoading:o}){var s,a;const r=(s=e.columns)==null?void 0:s.isManageable;return g.jsx($1,{children:o?g.jsxs(g.Fragment,{children:[g.jsx($2,{type:"toolbar"}),g.jsx($2,{type:"grid"})]}):g.jsxs(g.Fragment,{children:[t&&g.jsx(W2,{...t,isManageable:r,pageSize:(a=e==null?void 0:e.pagination)==null?void 0:a.rowPerPage}),g.jsx(L2,{tableProps:e,isDefaultConfig:n,gridPath:(t==null?void 0:t.gridPath)||"",baseUrl:(t==null?void 0:t.baseUrl)||""})]})})}z2.propTypes={tableProps:i.object.isRequired,toolbarProps:i.object,isDefaultConfig:i.bool};const G2=({list:e,handleLinkClick:t})=>{const n=ft(),o=({list:r})=>{var s;return(s=r==null?void 0:r.sort((a,l)=>a.order-l.order))==null?void 0:s.map((a,l)=>a!=null&&a.link?g.jsx(Po,{component:"h3",sx:{fontSize:"1rem",cursor:"pointer",color:l===(r==null?void 0:r.length)-1?n.palette.brandColor.orange:n.palette.primary.notifyTextColor},href:a==null?void 0:a.link,underline:"hover",onClick:()=>t(a),children:a==null?void 0:a.title},l):g.jsx(tt,{component:"h3",sx:{fontSize:"1rem",color:l===(r==null?void 0:r.length)-1?n.palette.brandColor.orange:n.palette.primary.notifyTextColor},children:a==null?void 0:a.title},l))};return g.jsx(n0,{separator:g.jsx(ge,{component:"img",src:Je.ArrowRight}),children:o({list:e})})};G2.propTypes={list:i.array.isRequired,handleLinkClick:i.func};const H2=({breadcrumbProps:e,switchProps:t,filterComponentProps:n})=>{var r,s,a,l,c,u;const o=ft();return g.jsxs(g.Fragment,{children:[g.jsxs(lt,{sx:{background:o.palette.primary.notifyBackground,borderBottom:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,height:"3rem",p:"0px 5.5rem 0 1.5rem",zIndex:4,position:"relative"},direction:"row",justifyContent:"space-between",alignItems:"center",children:[g.jsx(G2,{...e}),g.jsxs(lt,{direction:"row",gap:"1rem",alignItems:"center",children:[t&&g.jsx(U1,{...t}),(n==null?void 0:n.filterBtnProps)&&g.jsxs(lt,{direction:"row",children:[g.jsx(ds,{orientation:"vertical",flexItem:!0,sx:{mx:"1rem",height:"2rem!important",opacity:"1!important",borderColor:o.palette.primary.notifyBorderColor}}),g.jsxs(lt,{direction:"row",alignItems:"center",gap:"0.5rem",onClick:(r=n==null?void 0:n.filterBtnProps)==null?void 0:r.onFilterClick,sx:{cursor:"pointer"},children:[g.jsx(ge,{component:"img",src:o.icons.filter}),g.jsx(tt,{sx:{fontSize:"1.1rem",color:o.palette.primary.notifyActiveText},children:(s=n==null?void 0:n.filterBtnProps)==null?void 0:s.label})]})]})]})]}),g.jsx(Ws.div,{layout:!0,initial:{height:"0rem"},animate:{height:(a=n==null?void 0:n.filterBtnProps)!=null&&a.filterContainerVisible?"5rem":"0rem",opacity:(l=n==null?void 0:n.filterBtnProps)!=null&&l.filterContainerVisible?1:0},transition:{duration:.5,ease:"easeInOut"},style:{background:o.palette.primary.notifyBackground,borderBottom:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,padding:"0px 5.5rem 0 1.5rem",position:"relative",alignItems:"center",display:"flex",overflow:"hidden"},children:g.jsxs(lt,{sx:{background:o.palette.primary.appBackground,height:"3.8rem",p:"0 2rem",width:"100%",borderRadius:"0.7rem",overflow:"visible"},direction:"row",alignItems:"center",children:[g.jsx(tt,{sx:{fontSize:"1.2rem",fontWeight:"500",color:o.palette.primary.notifyActiveText},children:"Filters:"}),g.jsx(ge,{sx:{overflowX:"auto",overflowY:"visible",whiteSpace:"nowrap",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},margin:"0 1rem",padding:"0.5rem 0",flexGrow:1},children:g.jsx(lt,{direction:"row",gap:"1.2rem",sx:{overflow:"visible"},children:(c=n==null?void 0:n.filterItems)==null?void 0:c.map((d,p)=>g.jsx(g.Fragment,{children:g.jsxs(ge,{sx:{position:"relative",overflow:"visible",border:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,background:o.palette.primary.notifyBackground,borderRadius:"0.6rem",padding:"0.3rem 1.1rem",display:"inline-block"},children:[g.jsx(ge,{component:"img",src:Je.FilterClose,sx:{position:"absolute",top:"-0.4rem",right:"-0.6rem",cursor:"pointer"},onClick:()=>n==null?void 0:n.onFilterChipClose(d)}),g.jsx(tt,{sx:{fontSize:"1rem",color:o.palette.primary.notifyTextColor},children:d==null?void 0:d.filterLabel})]},p)}))})}),g.jsx(ge,{component:tt,sx:{fontSize:"1.1rem",fontWeight:"500",textDecoration:"underline",color:o.palette.brandColor.red,cursor:"pointer"},onClick:(u=n==null?void 0:n.filterContainerProps)==null?void 0:u.onClearClick,children:"Clear"})]})})]})};H2.propTypes={breadcrumbProps:i.object.isRequired,switchProps:i.object};function U2({headerProps:e}){return g.jsx(Bn,{children:g.jsx(H2,{...e})})}U2.propTypes={headerProps:i.object.isRequired};const Bf=_.createContext(null),Y2=_.createContext(null);function w_({children:e}){const[t,n]=_.useReducer(I_,T_);return g.jsx(Bf.Provider,{value:t,children:g.jsx(Y2.Provider,{value:n,children:e})})}function I_(e,t){var n;switch(t.type){case Xe.LOADING:return{...e,loading:t.loading};case Xe.SUCCESS:return{...e,data:(n=t.data)==null?void 0:n.sort((o,r)=>new Date(r.createdAt)-new Date(o.createdAt))};case Xe.MARK_ALL_AS_READ:return{...e,isMarkAllAsRead:t.isMarkAllAsRead};case Xe.ERROR:return{...e,error:t.error};default:throw new Error(`${_n.UNHANDLED}: ${t}`)}}const T_={loading:!1,data:[],error:"",isMarkAllAsRead:{count:0,boo:!1}},{TENANT_ID:Vf,BU_ID:Lf,SNOP_ID:X2}=Af,{TENANT_IDS:$f,BU_IDS:_f}=mr,E_=async e=>{try{const t=`${e}${xc.NOTIFICATION}/v1?${Vf}=${$f}&${Lf}=${_f}`;return await yt.get(t,aa)}catch(t){return t}},Z2=async(e,t,n)=>{try{const o=n===A2.MARK_ALL_READ?"":`&${X2}=${n}&`,r=`${e}${xc.NOTIFICATION}${Rf.VERSION}?${Vf}=${$f}&${Lf}=${_f}${o}`;return await yt.put(r,t,aa)}catch(o){return o}},O_=async({baseUrl:e,id:t,snopId:n})=>{try{const o=`${e}${xc.NOTIFICATION}${Rf.VERSION}?${Vf}=${$f}&${Lf}=${_f}&${X2}=${n}&id=${t}`;return await yt.get(o,aa)}catch(o){return o}},Sc={OK:200,CREATED:201,NO_CONTENT:204,BAD_REQUEST:400,UNAUTHORIZED:401,NOT_FOUND:404,INTERNAL_SERVER_ERROR:500};var J2,q2,K2,Q2;function Wf(){return Wf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Wf.apply(null,arguments)}var R_=function(t){return C.createElement("svg",Wf({xmlns:"http://www.w3.org/2000/svg",width:16,height:18,fill:"none"},t),J2||(J2=C.createElement("path",{stroke:"#666D80",strokeLinecap:"round",strokeMiterlimit:10,d:"M8.013 3.44c-2.206 0-4 1.793-4 4v1.927c0 .406-.173 1.026-.38 1.373l-.766 1.273c-.474.787-.147 1.66.72 1.954 2.873.96 5.973.96 8.846 0a1.335 1.335 0 0 0 .72-1.954l-.766-1.273c-.2-.347-.374-.967-.374-1.373V7.44c0-2.2-1.8-4-4-4Z"})),q2||(q2=C.createElement("path",{stroke:"#666D80",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,d:"M9.247 3.633a4.503 4.503 0 0 0-2.467 0 1.324 1.324 0 0 1 2.467 0"})),K2||(K2=C.createElement("path",{stroke:"#666D80",strokeMiterlimit:10,d:"M10.014 14.207c0 1.1-.9 2-2 2a2.007 2.007 0 0 1-2-2"})),Q2||(Q2=C.createElement("circle",{cx:12.266,cy:3,r:2.5,fill:"#E85353",stroke:"#F8FAFB"})))};const P_=({count:e})=>(ft(),g.jsxs(g.Fragment,{children:[g.jsx(ge,{sx:{gap:"0.5rem",display:"flex",justifyContent:"center",alignItems:"center"},className:"notify-icon-container",children:g.jsx(R_,{style:{scale:2}})}),g.jsx(m_,{badgeContent:e==0?"":null,color:"error"})]}));var eC;function zf(){return zf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},zf.apply(null,arguments)}var A_=function(t){return C.createElement("svg",zf({xmlns:"http://www.w3.org/2000/svg",width:13,height:8,fill:"none"},t),eC||(eC=C.createElement("path",{fill:"#A8A8A8",fillRule:"evenodd",d:"M8.954 1.004a.406.406 0 0 1 0 .575L3.537 6.996a.406.406 0 0 1-.574 0L.796 4.829a.406.406 0 1 1 .575-.575l1.879 1.88 5.13-5.13a.406.406 0 0 1 .574 0m3.25 0a.406.406 0 0 1 0 .575L6.787 6.996a.406.406 0 1 1-.574-.575l5.416-5.417a.406.406 0 0 1 .575 0",clipRule:"evenodd"})))};const tC=({title:e,subTitle:t,children:n,onRefresh:o,onClose:r,loading:s,handleShowAll:a,handleMarkAllAsRead:l,isMarkAllAsRead:c,width:u,headerIconType:d,isDialogActionShow:p,className:f,dialogType:m,data:b,toggleNotify:h,mode:y,isDetail:v=!1,tabValue:w,setTabValue:I,...T})=>{var A,D,B,$;console.log({tabValue:w});const S=ft(),E=(k,W)=>{I(W)},R=()=>{switch(d){case vc.REFRESH:return g.jsx(ge,{component:"img",src:Je.Refresh,alt:"refresh",onClick:o,sx:{cursor:"pointer"}});case vc.CLOSE:return g.jsx(ge,{component:"img",src:Je.Close,alt:"refresh",onClick:r,sx:{cursor:"pointer"}});default:return null}};return g.jsxs(d_,{maxWidth:v?"xs":"md",onClose:r,...T,className:["notification-dialog",f,m==="notifcation-dialog"?"notification-main-box":""].join(" "),dialogType:!0,children:[g.jsxs(ge,{sx:m==="notifcation-dialog"?{gap:1,display:"flex",width:"100%",justifyContent:"space-between",alignItems:"center"}:{gap:1,display:"flex",width:"100%",justifyContent:"space-between",paddingBottom:1.2},children:[g.jsxs(ge,{className:"title-container",children:[g.jsx(so,{variant:"h6",component:"h6",className:"title",children:e}),t&&g.jsx(so,{variant:"h6",className:"title sub-title",children:t})]}),R()]}),v?g.jsx(g.Fragment,{children:n}):g.jsxs(g.Fragment,{children:[g.jsx(ge,{sx:{borderBottom:1,borderColor:S.palette.primary.notifyBorderColor},className:"tab-panel",children:g.jsxs(g_,{value:w,onChange:E,children:[g.jsx(Ff,{label:g.jsxs(ge,{sx:{display:"flex",alignItems:"center",fontSize:"1rem",fontWeight:"500"},children:["All (",g.jsx(tt,{component:"span",sx:{fontWeight:"500",fontSize:"1rem"},children:((A=b==null?void 0:b.filter(k=>!(k!=null&&k.isRead)))==null?void 0:A.length)||0}),")"]})}),g.jsx(Ff,{label:g.jsxs(ge,{sx:{display:"flex",alignItems:"center",fontSize:"1rem",fontWeight:"500",color:S.palette.brandColor.blue},children:["Info (",g.jsx(tt,{component:"span",sx:{fontWeight:"500",fontSize:"1rem"},children:((D=b==null?void 0:b.filter(k=>(k==null?void 0:k.type)==="INFO"&&!(k!=null&&k.isRead)))==null?void 0:D.length)||0}),")"]})}),g.jsx(Ff,{label:g.jsxs(ge,{sx:{display:"flex",alignItems:"center",fontSize:"1rem",fontWeight:"500",color:S.palette.brandColor.red},children:["Error (",g.jsx(tt,{component:"span",sx:{fontWeight:"500",fontSize:"1rem"},children:((B=b==null?void 0:b.filter(k=>(k==null?void 0:k.type)==="ERROR"&&!(k!=null&&k.isRead)))==null?void 0:B.length)||0}),")"]})})]})}),g.jsx(f_,{value:w,index:0,children:n})]}),p&&g.jsxs(pl,{className:"dialog-action",sx:{px:"1rem"},children:[g.jsxs(lt,{direction:"row",gap:1,children:[g.jsx(so,{sx:{fontSize:"0.9rem"},children:"Only show unread"}),g.jsx(p_,{disabled:s,checked:y,onChange:h})]}),g.jsx(Fn,{variant:"outlined",className:"view-all",onClick:l,startIcon:g.jsx(A_,{}),disabled:!(($=b==null?void 0:b.filter(k=>!(k!=null&&k.isRead)))!=null&&$.length),style:{backgroundColor:"transparent"},sx:{p:0,color:S.palette.primary.notifyTextColor},children:"Mark all as read"})]})]})};var nC,oC;function Gf(){return Gf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Gf.apply(null,arguments)}var M_=function(t){return C.createElement("svg",Gf({xmlns:"http://www.w3.org/2000/svg",width:12,height:12,fill:"none"},t),nC||(nC=C.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M7.79 6c0 .99-.8 1.79-1.79 1.79S4.21 6.99 4.21 6 5.01 4.21 6 4.21s1.79.8 1.79 1.79"})),oC||(oC=C.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M6 10.135c1.765 0 3.41-1.04 4.555-2.84.45-.705.45-1.89 0-2.595C9.41 2.9 7.765 1.86 6 1.86S2.59 2.9 1.445 4.7c-.45.705-.45 1.89 0 2.595 1.145 1.8 2.79 2.84 4.555 2.84"})))},rC;function Hf(){return Hf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Hf.apply(null,arguments)}var k_=function(t){return C.createElement("svg",Hf({xmlns:"http://www.w3.org/2000/svg",width:9,height:8,fill:"none"},t),rC||(rC=C.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M8.277 1.004a.406.406 0 0 1 0 .575L2.86 6.996a.406.406 0 0 1-.574 0L.119 4.829a.406.406 0 1 1 .575-.575l1.879 1.88 5.13-5.13a.406.406 0 0 1 .574 0",clipRule:"evenodd"})))};const iC=({type:e,title:t,isRead:n,handleShowDetails:o,handleRead:r,isCheckBox:s,selectedAlert:a,id:l,handleCheckboxChange:c,clickId:u,product:d,createdAt:p,isShowVisible:f})=>{var h,y;const m=ft(),b=(y=(h=JSON.parse(localStorage.getItem("settings")))==null?void 0:h.platform)==null?void 0:y.theme;return g.jsxs(ge,{className:"cards",children:[g.jsxs(lt,{display:"flex",flexDirection:"row",alignItems:"start",justifyContent:"space-between",gap:1,children:[s&&g.jsx(td,{checked:!!a.includes(l),onChange:v=>c(v,l),disabled:n,sx:{padding:"4px 7px 0 7px"}}),g.jsx(Ku,{sx:{"& .MuiBadge-badge":{backgroundColor:"#6041EA"}},variant:"dot",className:"badge",invisible:n,children:g.jsx(so,{sx:{color:m.palette.primary.notifyActiveText},component:"p",className:["title-card",n&&"read"].join(" "),children:t})})]}),g.jsxs(lt,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",children:[g.jsxs(lt,{display:"flex",flexDirection:"row",justifyContent:"start",gap:1,sx:{p:"0.5rem 0"},children:[f&&g.jsx(nl,{icon:g.jsx(M_,{className:`${b==="light"?"chip-icon-light":"chip-icon-dark"}`}),disabled:u,onClick:o,label:u===l?g.jsx(as,{color:"primary",size:13}):"Show Details",component:"button",variant:"filled",clickable:!0,size:"small",sx:{height:"2rem",fontWeight:"300",fontSize:"0.9rem",color:m.palette.primary.notifyActiveText,borderColor:m.palette.primary.notifyBorderColor,background:m.palette.primary.notifyButtonBackground,borderRadius:"0.6rem",padding:"0.2rem"}}),!n&&g.jsx(nl,{icon:g.jsx(k_,{className:`${b==="light"?"chip-icon-light":"chip-icon-dark"}`}),disabled:u,onClick:r,label:"Acknowledge",component:"button",variant:"outlined",clickable:!0,size:"small",sx:{height:"2rem",fontSize:"0.9rem",fontWeight:"300",borderColor:m.palette.primary.notifyBorderColor,color:m.palette.primary.notifyActiveText,borderRadius:"0.6rem",padding:"0.2rem"}})]}),g.jsxs(lt,{display:"flex",justifyContent:"space-between",flexDirection:"row",alignItems:"center",gap:.35,children:[g.jsx(so,{sx:{fontSize:"0.9rem"},children:d}),g.jsx(so,{color:m.palette.primary.notifyTextColor,children:"•"}),g.jsx(so,{sx:{fontSize:"0.9rem"},children:o$(p)})]})]})]})};iC.propTypes={type:i.string,title:i.string,subTitle:i.string,isRead:i.bool,handleShowDetails:i.func,handleRead:i.func};const sC=({data:e,handleRead:t,handleShowDetails:n,clickId:o,mode:r,page:s,setPage:a})=>{const{isMarkAllAsRead:l}=_.useContext(Bf),c=new Date,u=new Intl.DateTimeFormat("en-US",{day:"numeric",month:"long",year:"numeric"}).format(c),[d,p]=_.useState([]),[f,m]=_.useState(!1),[b,h]=_.useState(!0),y=_.useRef(null),v=ft();return _.useEffect(()=>{p([...e])},[e]),_.useEffect(()=>{const w=new IntersectionObserver(I=>{I[0].isIntersecting&&!f&&b&&a(T=>T+1)},{threshold:1});return y.current&&w.observe(y.current),()=>{y.current&&w.unobserve(y.current)}},[f,b]),g.jsxs(ge,{sx:d.length?{py:"0.5rem"}:{py:"0.5rem",justifyContent:"center",alignItems:"center",display:"flex",height:"100%"},children:[Object.entries(a$(d)).map(([w,I])=>g.jsxs(_.Fragment,{children:[w!==u&&g.jsx(h_,{children:w}),I.map((T,S)=>g.jsx(iC,{type:"success",title:T.message,subTitle:T.createdAt,isRead:T.isRead,handleShowDetails:()=>n(T.id,T.snopId),handleRead:()=>t([T.id],T.snopId),clickId:o,id:T.id,product:T.product,createdAt:T.createdAt,isShowVisible:T==null?void 0:T.isNotificationDetails},T.id||S))]},w)),f&&s>1&&!!(d!=null&&d.length)&&g.jsx(ge,{sx:{display:"flex",justifyContent:"center",alignItems:"center",pl:"0.5rem",py:"0.3rem"},children:g.jsx(as,{size:20,className:"circular-loader"})}),!(d!=null&&d.length)&&g.jsx(tt,{sx:{fontSize:"1.1rem",color:v.palette.primary.notifyTextColor,textAlign:"center",px:"0.8rem"},children:"You don't have any unread notification here. Use the toggle to switch between read and unread notification."}),g.jsx(ge,{ref:y,style:{height:"0.1rem",backgroundColor:"transparent"}})]})};sC.propTypes={data:i.array,handleRead:i.func,handleShowDetails:i.func};function la(e,t,n){return(t=Ym(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function Me(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aC(Object(n),!0).forEach(function(o){la(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aC(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function D_(e){if(Array.isArray(e))return e}function N_(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var o,r,s,a,l=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=s.call(n)).done)&&(l.push(o.value),l.length!==t);c=!0);}catch(d){u=!0,r=d}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return l}}function Uf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function lC(e,t){if(e){if(typeof e=="string")return Uf(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Uf(e,t):void 0}}function j_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
328
+ `+s):o.stack=s}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=fr(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:s}=n;o!==void 0&&bc.assertOptions(o,{silentJSONParsing:io.transitional(io.boolean),forcedJSONParsing:io.transitional(io.boolean),clarifyTimeoutError:io.transitional(io.boolean)},!1),r!=null&&(oe.isFunction(r)?n.paramsSerializer={serialize:r}:bc.assertOptions(r,{encode:io.function,serialize:io.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),bc.assertOptions(n,{baseUrl:io.spelling("baseURL"),withXsrfToken:io.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&oe.merge(s.common,s[n.method]);s&&oe.forEach(["delete","get","head","post","put","patch","common"],b=>{delete s[b]}),n.headers=cn.concat(a,s);const l=[];let c=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(c=c&&h.synchronous,l.unshift(h.fulfilled,h.rejected))});const u=[];this.interceptors.response.forEach(function(h){u.push(h.fulfilled,h.rejected)});let d,p=0,f;if(!c){const b=[T2.bind(this),void 0];for(b.unshift.apply(b,l),b.push.apply(b,u),f=b.length,d=Promise.resolve(n);p<f;)d=d.then(b[p++],b[p++]);return d}f=l.length;let m=n;for(p=0;p<f;){const b=l[p++],h=l[p++];try{m=b(m)}catch(y){h.call(this,y);break}}try{d=T2.call(this,m)}catch(b){return Promise.reject(b)}for(p=0,f=u.length;p<f;)d=d.then(u[p++],u[p++]);return d}getUri(t){t=fr(this.defaults,t);const n=g2(t.baseURL,t.url,t.allowAbsoluteUrls);return a2(n,t.params,t.paramsSerializer)}};oe.forEach(["delete","get","head","options"],function(t){hr.prototype[t]=function(n,o){return this.request(fr(o||{},{method:t,url:n,data:(o||{}).data}))}}),oe.forEach(["post","put","patch"],function(t){function n(o){return function(s,a,l){return this.request(fr(l||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}hr.prototype[t]=n(),hr.prototype[t+"Form"]=n(!0)});let J6=class lS{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const o=this;this.promise.then(r=>{if(!o._listeners)return;let s=o._listeners.length;for(;s-- >0;)o._listeners[s](r);o._listeners=null}),this.promise.then=r=>{let s;const a=new Promise(l=>{o.subscribe(l),s=l}).then(r);return a.cancel=function(){o.unsubscribe(s)},a},t(function(s,a,l){o.reason||(o.reason=new xi(s,a,l),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new lS(function(r){t=r}),cancel:t}}};function q6(e){return function(n){return e.apply(null,n)}}function K6(e){return oe.isObject(e)&&e.isAxiosError===!0}const Of={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Of).forEach(([e,t])=>{Of[t]=e});function R2(e){const t=new hr(e),n=Y1(hr.prototype.request,t);return oe.extend(n,hr.prototype,t,{allOwnKeys:!0}),oe.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return R2(fr(e,r))},n}const yt=R2(ia);yt.Axios=hr,yt.CanceledError=xi,yt.CancelToken=J6,yt.isCancel=p2,yt.VERSION=E2,yt.toFormData=dc,yt.AxiosError=$e,yt.Cancel=yt.CanceledError,yt.all=function(t){return Promise.all(t)},yt.spread=q6,yt.isAxiosError=K6,yt.mergeConfig=fr,yt.AxiosHeaders=cn,yt.formToJSON=e=>u2(oe.isHTMLForm(e)?new FormData(e):e),yt.getAdapter=I2.getAdapter,yt.HttpStatusCode=Of,yt.default=yt;const{Axios:kz,AxiosError:Dz,CanceledError:Nz,isCancel:jz,CancelToken:Fz,VERSION:Bz,all:Vz,Cancel:Lz,isAxiosError:$z,spread:_z,toFormData:Wz,AxiosHeaders:zz,HttpStatusCode:Gz,formToJSON:Hz,getAdapter:Uz,mergeConfig:Yz}=yt,Rf={BASE_URL:"https://qa.3sc.ai/api",VERSION:"/v1"};/*! js-cookie v3.0.5 | MIT */function yc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)e[o]=n[o]}return e}var Q6={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Pf(e,t){function n(r,s,a){if(!(typeof document>"u")){a=yc({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),r=encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var c in a)a[c]&&(l+="; "+c,a[c]!==!0&&(l+="="+a[c].split(";")[0]));return document.cookie=r+"="+e.write(s,r)+l}}function o(r){if(!(typeof document>"u"||arguments.length&&!r)){for(var s=document.cookie?document.cookie.split("; "):[],a={},l=0;l<s.length;l++){var c=s[l].split("="),u=c.slice(1).join("=");try{var d=decodeURIComponent(c[0]);if(a[d]=e.read(u,d),r===d)break}catch{}}return r?a[r]:a}}return Object.create({set:n,get:o,remove:function(r,s){n(r,"",yc({},s,{expires:-1}))},withAttributes:function(r){return Pf(this.converter,yc({},this.attributes,r))},withConverter:function(r){return Pf(yc({},this.converter,r),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var e_=Pf(Q6,{path:"/"});const Vo={TOKEN:"token",USER:"user",SNOP:"snop",SELECTED_BU:"selected_business_unit",SETTINGS:"settings"},Af={BEARER:"Bearer",TENANT_ID:"tenant_id",BU_ID:"bu_id",SNOP_ID:"snop_id"},vc={REFRESH:"refresh",CLOSE:"close"},t_=Object.values({"SKU Name":"sku_name",Node:"node","Channel Name":"channel_name"}),P2=[10,25,50,100],A2={MARK_ALL_READ:"MARK_ALL_READ"},n_=P2.map(e=>({label:e,value:e})),M2={PRIMARY:"PRIMARY",SECONDARY:"SECONDARY"},Mf=ic(Vo.SNOP),kf=ic(Vo.SELECTED_BU),Df=ic(Vo.USER),o_=ic(Vo.SETTINGS),mr={BU_IDS:kf==null?void 0:kf.business_unit_id,TOKEN:JSON.parse(e_.get(Vo.TOKEN)||null),TENANT_IDS:Df==null?void 0:Df.tenant_id,SNOP_IDS:Mf==null?void 0:Mf.snop_id,GRID_SETTINGS:o_},aa={headers:{"Content-Type":"application/json",Authorization:`${Af.BEARER} ${mr.TOKEN}`}},k2=yt.create({baseURL:Rf.BASE_URL,axiosConfig:aa});k2.interceptors.request.use(function(e){return e},function(e){return Promise.reject(e)}),k2.interceptors.response.use(function(e){return e},function(e){return Promise.reject(e)});const xc={NOTIFICATION:"/notifications",SETTING:"/configuration/setting"},{TENANT_ID:r_,BU_ID:i_}=Af,{TENANT_IDS:s_,BU_IDS:a_}=mr,Cc=async({baseUrl:e,payload:t})=>{try{const n=`${e}${xc.SETTING}/v1?${r_}=${s_}&${i_}=${a_}`;return await yt.post(n,t,aa)}catch(n){return n}},l_=({columns:e,gridPath:t,baseUrl:n,isDefaultConfig:o,pageSize:r})=>{var b;let{definitions:s,defaultUserSettings:a,labels:l}=e;const c=t.split("/").filter(Boolean);let u=c.reduce((h,y)=>h==null?void 0:h[y],mr.GRID_SETTINGS)||null;o||!u&&!a&&(async()=>{try{a=D2({definitions:s});let h=mr.GRID_SETTINGS||{platform:{theme:"light"}};const y=(u==null?void 0:u.pageSize)??r;let v=h;for(let w=0;w<c.length;w++){const I=c[w];w===c.length-1?v[I]={columns:a,pageSize:y}:(v[I]=v[I]||{},v=v[I])}localStorage.setItem(Vo.SETTINGS,JSON.stringify(h)),await Cc({baseUrl:n,payload:h})}catch(h){console.error(h)}})(),a=(u==null?void 0:u.columns)??a??D2({definitions:s});const d=a.reduce((h,y)=>(h[y.id]=y,h),{}),p=l.reduce((h,y)=>(h[y.id]=y,h),{}),f=[];for(const h of s){const y=d[h.id]||{},v=p[h.id]||{};let w={...h,...y,...v};if((b=h.children)!=null&&b.length){const I=y.children||[],T=v.children||[];w.children=h.children.map((S,E)=>({...S,...I[E],...T[E]}))}f.push(w)}return f.sort((h,y)=>h.sequenceId-y.sequenceId)},c_=e=>e.sort((t,n)=>t.sequenceId-n.sequenceId),D2=({definitions:e})=>e.map((t,n)=>({id:t.id,key:t.key,sequenceId:t.id,isHidden:!1,style:t.style||{}}));class Nf extends _.Component{constructor(t){super(t),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.dragging=!1,this.mouseX=0,this.startPos=0,this.startWidthPrev=0,this.lastDraggedWidth=0,this.draggedCol=null,this.resizeRef=_.createRef()}startDrag(){if(!this.props.disabled&&(this.draggedCol=this.props.id,this.props.resizeStart&&this.draggedCol===this.props.id&&this.props.resizeStart(),this.dragging=!0,this.startPos=this.mouseX,this.startWidthPrev=0,this.resizeRef.current)){let t=this.resizeRef.current.previousSibling;t&&(this.startWidthPrev=t.clientWidth)}}endDrag(){this.props.disabled||(this.dragging=!1,this.props.resizeEnd&&this.draggedCol===this.props.id&&this.props.resizeEnd(this.lastDraggedWidth),this.draggedCol=null)}onMouseMove(t){if(this.props.disabled||(this.mouseX=t.touches?t.touches[0].screenX:t.screenX,!this.dragging))return;const n=this.resizeRef.current,o=this.startPos-this.mouseX;let r=this.startWidthPrev-o;(!this.props.minWidth||r>=this.props.minWidth)&&(!this.props.maxWidth||r<=this.props.maxWidth)&&(n.previousSibling.style.width=r+"px",n.previousSibling.style.minWidth=r+"px",n.previousSibling.style.maxWidth=r+"px",n.previousSibling.style.setProperty("--column_resize_before_width",r+"px"),this.lastDraggedWidth=r)}componentDidMount(){const t=this.resizeRef.current;if(t&&(this.props.defaultWidth?(t.previousSibling.style.minWidth=this.props.defaultWidth+"px",t.previousSibling.style.width=this.props.defaultWidth+"px",t.previousSibling.style.maxWidth=this.props.defaultWidth+"px",t.previousSibling.style.setProperty("--column_resize_before_width",this.props.defaultWidth+"px")):this.props.minWidth&&(t.previousSibling.style.minWidth=this.props.minWidth+"px",t.previousSibling.style.width=this.props.minWidth+"px",t.previousSibling.style.maxWidth=this.props.minWidth+"px",t.previousSibling.style.setProperty("--column_resize_before_width",this.props.minWidth+"px"))),this.props.disabled){this.props.defaultWidth&&t&&(t.previousSibling.style.minWidth=this.props.defaultWidth+"px",t.previousSibling.style.width=this.props.defaultWidth+"px",t.previousSibling.style.maxWidth=this.props.defaultWidth+"px",t.previousSibling.style.setProperty("--column_resize_before_width",this.props.defaultWidth+"px")),this.props.maxWidth&&t&&(t.previousSibling.style.maxWidth=this.props.maxWidth+"px");return}this.addEventListenersToDocument()}componentWillUnmount(){this.props.disabled||this.removeEventListenersFromDocument()}componentDidUpdate(t,n){t.disabled&&!this.props.disabled&&this.addEventListenersToDocument(),!t.disabled&&this.props.disabled&&this.removeEventListenersFromDocument()}addEventListenersToDocument(){document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("mouseup",this.endDrag),document.addEventListener("touchmove",this.onMouseMove),document.addEventListener("touchend",this.endDrag)}removeEventListenersFromDocument(){document.removeEventListener("mousemove",this.onMouseMove),document.removeEventListener("mouseup",this.endDrag),document.removeEventListener("touchmove",this.onMouseMove),document.removeEventListener("touchend",this.endDrag)}render(){var t={userSelect:"none"};return this.props.disabled||(t.cursor="ew-resize"),this.props.className===""&&(t.width="6px",t.backgroundColor="rgba(0, 0, 0, 0.1)"),_.createElement("th",{ref:this.resizeRef,style:t,disabled:this.props.disabled,rowSpan:this.props.rowSpan?this.props.rowSpan:1,colSpan:this.props.colSpan?this.props.colSpan:1,className:`column_resizer_own_class ${this.props.disabled?"disabled_column_resize":""} ${this.props.className}`,onMouseDown:this.props.disabled?null:this.startDrag,onTouchStart:this.props.disabled?null:this.startDrag})}}Nf.defaultProps={disabled:!1,minWidth:0,className:""},Nf.propTypes={disabled:"boolean",minWidth:"number",className:"string"};const u_=(e,t,n,o)=>{const[r,s]=_.useState({isOpen:!1,column:null}),a=(u,d)=>{s({isOpen:u.currentTarget,column:d})},l=()=>{s({isOpen:!1,column:null})};return{selectedColumn:r,handleMenuClick:a,handleClose:l,handleHideClick:async()=>{l();const u=e.map(p=>{var f;return p.id===((f=r==null?void 0:r.column)==null?void 0:f.id)?{...p,isHidden:!0}:p});t({type:Xe.SET_GRID_DATA,payload:{visibleGridColumns:u}});let d=mr.GRID_SETTINGS||{platform:{theme:"light"},grid:{}};d.grid=d.grid||{},d.grid[o]=u,localStorage.setItem(Vo.SETTINGS,JSON.stringify(d)),await Cc({baseUrl:n,payload:d})}}},N2=({pagination:e})=>{const{selectedPage:t,rowPerPage:n,totalRecords:o,onPageChange:r,onPageSizeChange:s}=e,a=ft();return g.jsxs(ge,{sx:{display:"flex",p:"1rem 2rem"},children:[g.jsxs(ge,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"0.5rem",width:"100%"},children:[g.jsx(tt,{sx:{fontSize:"1.1rem",color:a.palette.primary.notifyTextColor},children:`Showing ${(t-1)*n+1} to ${Math.min(t*n,o)} of ${o} rows`}),g.jsx(ge,{sx:{"& .MuiInputBase-input":{padding:"0rem 0.8rem!important"},width:"9%"},children:g.jsx(sc,{options:n_,value:n,onChange:s})}),g.jsx(tt,{sx:{fontSize:"1.1rem",color:a.palette.primary.notifyTextColor},children:"records per page"})]}),g.jsx(hd,{count:Math.ceil(o/n),page:t,onChange:(l,c)=>{r(c)},shape:"rounded",sx:{width:"100%","& .MuiPagination-ul":{width:"100%",display:"flex",justifyContent:"flex-end","& li:first-of-type":{border:`0.1rem solid ${a.palette.primary.notifyBorderColor}`,color:a.palette.primary.notifyActiveText,marginRight:"1.5rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex"},"& li:last-child":{border:`0.1rem solid ${a.palette.primary.notifyBorderColor}`,color:a.palette.primary.notifyActiveText,marginLeft:"1.5rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex"}},"& .MuiPaginationItem-root":{color:"#595959",fontSize:"1.1rem",borderRadius:"1rem",width:"3rem",height:"3rem",justifyContent:"center",alignItems:"center",display:"flex","& .MuiSvgIcon-root":{fontSize:"2.2rem"}},"& .Mui-selected":{color:a.palette.primary.notifyActiveText,backgroundColor:`${a.palette.brandColor.paginationBc} !important`}}})]})};N2.propTypes={pagination:i.object.isRequired};function jf({isRenderCellContent:e,column:t,row:n,parent:o}){const r=n[t.key];return g.jsx(g.Fragment,{children:e?g.jsx(ge,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textTransform:"none",fontSize:"1.1rem"},component:"label",children:t==null?void 0:t.cellRenderer(n,{column:t,parent:o})}):g.jsx(X0,{title:(r==null?void 0:r.length)>20?r:"",arrow:!0,children:g.jsx(ge,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",textTransform:"none",fontSize:"1.1rem"},component:"label",children:l$(r)})})})}jf.propTypes={isRenderCellContent:i.bool,column:i.object,row:i.object};const j2=({menuOpen:e,handleClose:t,onHideClick:n})=>{const o=ft();return g.jsx(yl,{open:!!e,anchorEl:e,onClose:t,anchorOrigin:{vertical:"bottom",horizontal:"left"},children:g.jsx(ge,{sx:{p:"0.4rem 1rem",backgroundColor:o.palette.primary.notifyBackground,border:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,minHeight:"2.3rem",display:"flex",justifyContent:"center",alignItems:"center"},children:g.jsx(Fn,{onClick:n,sx:{textTransform:"none",fontSize:"1.1rem",p:0,minHeight:"unset",fontWeight:"500",color:o.palette.primary.notifyTextColor},children:"Hide Column"})})})};j2.propTypes={menuOpen:i.object,handleClose:i.func,onHideClick:i.func};const d_=Y(rd)(({theme:e})=>({"& .MuiPaper-root":{borderRadius:8,border:`1px solid ${e.palette.primary.notifyBorderColor}`,boxShadow:e.shadows[4],padding:"1rem 1rem 0rem 1rem",backgroundColor:e.palette.primary.notifyBackground}})),so=Y(tt)(({theme:e})=>({color:e.palette.primary.notifyTextColor})),p_=Y(Z0)(({theme:e})=>({width:28,height:16,padding:0,display:"flex","&:active":{"& .MuiSwitch-thumb":{width:15},"& .MuiSwitch-switchBase.Mui-checked":{transform:"translateX(9px)"}},"& .MuiSwitch-switchBase":{padding:2,"&.Mui-checked":{transform:"translateX(12px)",color:"#fff","& + .MuiSwitch-track":{opacity:1,backgroundColor:"#1890ff",...e.applyStyles("dark",{backgroundColor:"#177ddc"})}}},"& .MuiSwitch-thumb":{boxShadow:"0 2px 4px 0 rgb(0 35 11 / 20%)",width:12,height:12,borderRadius:6,transition:e.transitions.create(["width"],{duration:200})},"& .MuiSwitch-track":{borderRadius:16/2,opacity:1,backgroundColor:"rgba(0,0,0,.25)",boxSizing:"border-box",...e.applyStyles("dark",{backgroundColor:"rgba(255,255,255,.35)"})}})),f_=e=>{const{children:t,value:n,index:o,...r}=e;return g.jsx("div",{role:"tabpanel",hidden:n!==o,...r,children:n===o&&g.jsx(ge,{sx:{pl:"0.5rem",pb:"0.5rem"},children:t})})},h_=Y(ds)(({theme:e})=>({color:e.palette.primary.notifyTextColor,padding:"0.6rem 0",fontSize:"0.9rem",fontWeight:500,"&::before, &::after":{borderColor:`${e.palette.primary.notifyBorderColor}!important`}})),m_=Y(Ku)(({theme:e})=>({"& .MuiBadge-badge":{right:3.5,top:2.34,border:`0.1rem solid ${e.palette.primary.notifyBackground}`,padding:"0 1.3px",borderRadius:"50%",backgroundColor:"#D44E40",fontSize:"0.725rem",minWidth:"0.7rem",height:"0.7rem"}}));Y(Il)(({theme:e})=>({"& .MuiInputBase-root":{height:"3.52rem"},"& .MuiFormLabel-root":{color:`${e.palette.primary.notifyBorderColor} !important`,fontSize:"1rem",marginTop:"0.4rem"},"& label.Mui-focused":{color:e.palette.primary.notifyTextColor},"& .MuiInput-underline:after":{borderBottomColor:e.palette.primary.notifyBorderColor,borderBottomWidth:"0.1rem"},"& .MuiOutlinedInput-root":{"& fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"},"&:hover fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"},"&.Mui-focused fieldset":{borderColor:e.palette.primary.notifyBorderColor,borderWidth:"0.1rem"}}}));const g_=Y(cb)(({theme:e})=>({"& .MuiTabs-indicator":{height:"0.1rem",backgroundColor:e.palette.primary.notifyActiveBorderColor}})),Ff=Y(J0)(({theme:e})=>({color:"gray","&.Mui-selected":{color:e.palette.primary.notifyActiveBorderColor,fontWeight:"bold"}})),F2=({sortKey:e,sortField:t,sortDir:n,handleSortClick:o})=>{const r=s=>g.jsx(ho,{onClick:o,sx:{padding:"0.5rem"},children:g.jsx(ge,{component:"img",src:s})});return g.jsx(g.Fragment,{children:r(t===e?n==="asc"?Je.AscSort:Je.DescSort:Je.Unsort)})};F2.propTypes={sortKey:i.string.isRequired,sortField:i.string,sortDir:i.string,handleSortClick:i.func};function B2({parent:e,column:t,sort:n,handleMenuClick:o,isManageable:r}){const s=t==null?void 0:t.isMandatory,a=t==null?void 0:t.label,l=t==null?void 0:t.isSortable,c=n==null?void 0:n.sortField,u=n==null?void 0:n.sortDir,d=n==null?void 0:n.onSort;return g.jsxs(ge,{sx:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:"1.1rem",textAlign:"center",whiteSpace:"normal"},children:[a,g.jsxs(ge,{sx:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[l&&g.jsx(F2,{sortKey:e?`${e==null?void 0:e.key}|${t==null?void 0:t.key}`:t==null?void 0:t.key,sortField:c,sortDir:u,handleSortClick:()=>d({column:t,sortDir:u,sortField:c,parent:e})}),r&&!s&&g.jsx(ho,{onClick:p=>o(p,t),sx:{padding:"0.5rem"},children:g.jsx(ge,{component:"img",src:Je.Menu})})]})]})}B2.propTypes={column:i.object.isRequired,sort:i.object.isRequired,handleMenuClick:i.func,isManageable:i.bool};const b_=Y(Cd)(({theme:e})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"table-cell",[`&.${xd.head}`]:{color:e.palette.primary.notifyTextColor,backgroundColor:e.palette.primary.notifyBackground,borderColor:e.palette.primary.notifyBorderColor,padding:"0.3rem 1rem",textAlign:"center"},[`&.${xd.body}`]:{color:e.palette.primary.notifyTextColor,borderColor:e.palette.primary.notifyBorderColor,padding:"0.3rem 1rem",textAlign:"center"}}));function Ci({children:e,...t}){return g.jsx(b_,{...t,children:e})}Ci.propTypes={children:i.node};const y_=Y(vs)(()=>({"&:last-child td":{borderBottom:0}}));function Si({children:e,...t}){return g.jsx(y_,{...t,children:e})}Si.propTypes={children:i.node};function V2({rows:e,sort:t,data:n,pagination:o,columns:r,nested:s,baseUrl:a,gridPath:l}){var j;const c=ft(),{visibleGridColumns:u}=_.useContext(ta),d=_.useContext(na),{selectedColumn:p,handleMenuClick:f,handleClose:m,handleHideClick:b}=u_(u,d,a,l),h=r==null?void 0:r.isManageable,y=(n==null?void 0:n.length)>0,v=_.useRef(null),[w,I]=_.useState(null);let T=null;const S=_.useRef(0),E=c_(((j=s==null?void 0:s.column)==null?void 0:j.definitions)||[]),R=s==null?void 0:s.isNested,A=(s==null?void 0:s.data)||[],D=s==null?void 0:s.hashKey;if(!y)return g.jsx(so,{sx:{textAlign:"center"},children:_n.NRF});const B=(P,N)=>{I(N),P.dataTransfer.setData("colIndex",N)},$=P=>{P.preventDefault(),W(P)},k=async(P,N)=>{if(P.preventDefault(),clearInterval(T),w===null||w===N)return;const L=[...u],[H]=L.splice(w,1);L.splice(N,0,H);const Z=u.slice().sort((te,K)=>te.sequenceId-K.sequenceId).map(te=>te.sequenceId),U=L.map((te,K)=>({...te,sequenceId:Z[K]??te.sequenceId})),q={...mr.GRID_SETTINGS||{platform:{theme:"light"}}},X=l.split("/").filter(Boolean);let ee=q;for(let te=0;te<X.length;te++){const K=X[te];if(te===X.length-1){const ne=(o==null?void 0:o.rowPerPage)??null;ee[K]={columns:U,pageSize:ne}}else ee[K]=ee[K]||{},ee=ee[K]}localStorage.setItem(Vo.SETTINGS,JSON.stringify(q)),d({type:Xe.SET_GRID_DATA,payload:{visibleGridColumns:U}}),await Cc({baseUrl:a,payload:q}),I(null)},W=P=>{const N=v.current,{left:L,right:H}=N.getBoundingClientRect(),Z=50,U=P.clientX>H-Z?1:P.clientX<L+Z?-1:0;U!==0?(clearInterval(T),T=setInterval(()=>{N.scrollLeft+=U*10},50)):clearInterval(T)},V=(P,N,L,H)=>{var X,ee,te;const Z=(P==null?void 0:P.isMandatory)&&(P==null?void 0:P.isSticky),U=parseFloat((ee=(X=P==null?void 0:P.style)==null?void 0:X.minWidth)==null?void 0:ee.toString().replace("rem",""))||7.5;N===0&&(S.current=0);const q=Z?N===0?0:`${S.current}rem`:void 0;return Z&&(S.current+=U),g.jsx(Ci,{rowSpan:P!=null&&P.children?1:2,colSpan:(te=P==null?void 0:P.children)==null?void 0:te.length,style:P==null?void 0:P.style,draggable:L&&!H&&!(P!=null&&P.isMandatory),onDragStart:L?K=>B(K,N):void 0,onDragOver:L?$:void 0,onDrop:L?K=>k(K,N):void 0,sx:{...Z&&{borderRadius:"0rem!important",position:"sticky",left:q,zIndex:3},...P!=null&&P.children||H?{borderRadius:"0rem!important",borderRight:K=>`0.1rem solid ${K.palette.primary.notifyBorderColor}`}:{borderLeft:K=>(P==null?void 0:P.key)==="volume_value"&&`0.1rem solid ${K.palette.primary.notifyBorderColor}`,borderRight:K=>(P==null?void 0:P.key)==="volume_value"&&`0.1rem solid ${K.palette.primary.notifyBorderColor}`}},children:g.jsx(B2,{parent:H,column:P,sort:t,handleMenuClick:f,isManageable:L})},N)},M=(P,N,L,H)=>!(P!=null&&P.isMandatory)&&L?g.jsx(ge,{component:Nf,id:N,sx:{width:"4rem",maxWidth:"4rem",minWidth:"4rem",padding:0,position:"relative",borderBottom:`0.1rem solid ${c.palette.primary.notifyBorderColor}`,"&::after":{content:'""',position:"absolute",left:"50%",top:"50%",transform:"translate(0%, -50%)",width:"0.2rem",height:"50%",background:c.palette.primary.notifyBorderColor}},disabled:!L}):null,O=(P,N,L,H)=>{var X,ee,te;const Z=(P==null?void 0:P.isMandatory)&&(P==null?void 0:P.isSticky),U=parseFloat((ee=(X=P==null?void 0:P.style)==null?void 0:X.minWidth)==null?void 0:ee.toString().replace("rem",""))||7.5;L===0&&(S.current=0);const q=Z?L===0?0:`${S.current}rem`:void 0;return Z&&(S.current+=U),g.jsxs(Ci,{style:P==null?void 0:P.style,className:`${P==null?void 0:P.label}`,sx:{position:"relative",...Z&&{position:"sticky",left:q,zIndex:2,backgroundColor:K=>{var ne;return e&&((ne=e==null?void 0:e.selectedRow)==null?void 0:ne.fhi)===(N==null?void 0:N.fhi)||N!=null&&N.isHigh?K.palette.primary.appBackground:K.palette.primary.notifyBackground}},...H?{p:"0rem!important",borderRight:K=>`0.1rem solid ${K.palette.primary.notifyBorderColor}`}:{px:"0rem!important",borderLeft:K=>(P==null?void 0:P.key)==="volume_value"&&`0.1rem solid ${K.palette.primary.notifyBorderColor}`,borderRight:K=>(P==null?void 0:P.key)==="volume_value"&&`0.1rem solid ${K.palette.primary.notifyBorderColor}`}},children:[(e&&((te=e==null?void 0:e.selectedRow)==null?void 0:te.fhi)===(N==null?void 0:N.fhi)||(N==null?void 0:N.isHigh))&&g.jsx(ge,{sx:{position:"absolute",bottom:0,left:0,width:"100%",height:"0.05rem",background:"linear-gradient(#F9B16E, #F68080)"}}),g.jsx(jf,{isRenderCellContent:!!(P!=null&&P.cellRenderer),column:P,row:N,parent:H})]},L)},F=(P,N,L,H)=>!(P!=null&&P.isMandatory)&&L?g.jsx(Ci,{className:"column_resizer_body"},`resize-${N}`):null;return g.jsxs(g.Fragment,{children:[g.jsx(Q0,{sx:{maxHeight:"100%",whiteSpace:"nowrap",overflow:"auto",width:"100%",border:`0.1rem solid ${c.palette.primary.notifyBorderColor}`,borderRadius:"1.4rem"},children:g.jsxs(yd,{ref:v,stickyHeader:!0,"aria-label":"sticky table",sx:{backgroundColor:P=>P.palette.primary.notifyBackground},children:[g.jsxs(Sd,{children:[g.jsx(Si,{children:u.map((P,N)=>P!=null&&P.isHidden?null:g.jsxs(_.Fragment,{children:[V(P,N,h),(r==null?void 0:r.isResizable)&&M(P,N,h)]},N))}),g.jsx(Si,{children:u.flatMap((P,N)=>P!=null&&P.isHidden||!(P!=null&&P.children)?[]:P.children.map((L,H)=>g.jsxs(_.Fragment,{children:[V(L,H,h,P),(r==null?void 0:r.isResizable)&&M(L,H,h)]},`${N}-${H}`)))})]}),g.jsx(vd,{children:n.map((P,N)=>{const L=P[D],H=A==null?void 0:A[L],Z=(H==null?void 0:H.length)>0;return g.jsxs(_.Fragment,{children:[g.jsx(Si,{sx:{backgroundColor:U=>{var q;return e&&((q=e==null?void 0:e.selectedRow)==null?void 0:q.fhi)===(P==null?void 0:P.fhi)||P!=null&&P.isHigh?U.palette.primary.appBackground:U.palette.primary.notifyBackground}},onClick:()=>e==null?void 0:e.onRowClick(P),children:u.map((U,q)=>U!=null&&U.isHidden?null:U!=null&&U.children?U.children.map((X,ee)=>g.jsxs(_.Fragment,{children:[O(X,P,ee,U),(r==null?void 0:r.isResizable)&&F(X,ee,h)]},`${q}-${ee}`)):g.jsxs(_.Fragment,{children:[O(U,P,q),(r==null?void 0:r.isResizable)&&F(U,q,h)]},q))}),R&&H&&g.jsx(g.Fragment,{children:Z?H.map((U,q)=>g.jsx(Si,{children:E.map((X,ee)=>g.jsx(Ci,{style:X==null?void 0:X.style,children:g.jsx(jf,{isRenderCellContent:!!(X!=null&&X.cellRenderer),column:X,row:U})},ee))},`nested-${q}`)):g.jsx(Si,{children:g.jsx(Ci,{colSpan:E.length,children:g.jsx(so,{sx:{textAlign:"center"},children:_n.NRF})})})})]},N)})})]})}),o&&g.jsx(N2,{pagination:o}),g.jsx(j2,{menuOpen:p==null?void 0:p.isOpen,handleClose:m,onHideClick:b})]})}V2.propTypes={sort:i.object,data:i.array,pagination:i.object,columns:i.object,nested:i.object};function L2({tableProps:e,isDefaultConfig:t,gridPath:n,baseUrl:o}){var u;const{columns:r}=e,{visibleGridColumns:s=[]}=_.useContext(ta)??{},a=_.useContext(na),l=_.useMemo(()=>{var d;return l_({columns:r,gridPath:n,baseUrl:o,isDefaultConfig:t,pageSize:(d=e==null?void 0:e.pagination)==null?void 0:d.rowPerPage})},[r,n,o,t,(u=e==null?void 0:e.pagination)==null?void 0:u.rowPerPage]),c=_.useMemo(()=>{const d=new Map(l.map(p=>[p.key,p]));return s.map(p=>{const f=d.get(p.key),m={...f,isHidden:p.isHidden,sequenceId:p.sequenceId};return console.log({mergedCol:f,latestCol:m,visibleCol:p}),m})},[l]);return _.useEffect(()=>{a({type:Xe.SET_GRID_DATA,payload:{visibleGridColumns:s.length?c:l}})},[l]),g.jsx(V2,{...e,gridPath:n,baseUrl:o})}L2.propTypes={tableProps:i.object.isRequired,mergedColumns:i.array.isRequired};const $2=({type:e})=>{const t=ft(),o=(t==null?void 0:t.mode)==="dark"?{bgcolor:"grey.800"}:{};return{grid:g.jsxs(ge,{sx:{borderRadius:2,overflow:"hidden"},children:[g.jsx(go,{variant:"text",width:"100%",height:60,sx:o}),Array.from({length:10}).map((s,a)=>g.jsx(ge,{sx:{display:"flex",alignItems:"center",padding:"0.5rem",gap:"3rem"},children:Array.from({length:5}).map((l,c)=>g.jsx(ge,{sx:{flex:1},children:g.jsx(go,{variant:"text",height:45,sx:o})},c))},a))]}),toolbar:g.jsx(g.Fragment,{children:g.jsxs(lt,{direction:"row",justifyContent:"space-between",sx:{display:"flex",gap:"1rem"},children:[g.jsxs(lt,{direction:"row",gap:"1rem",children:[g.jsx(go,{variant:"text",width:"10.2rem",height:"5rem",sx:o}),g.jsx(go,{variant:"text",width:"3.5rem",height:"5rem",sx:o}),g.jsx(go,{variant:"text",width:"15.2rem",height:"5rem",sx:o})]}),g.jsxs(lt,{direction:"row",gap:"1rem",children:[g.jsx(go,{variant:"text",width:"10.2rem",height:"5rem",sx:o}),g.jsx(go,{variant:"text",width:"3.5rem",height:"5rem",sx:o}),g.jsx(go,{variant:"text",width:"3.5rem",height:"5rem",sx:o})]})]})})}[e]},v_=e=>{if(!e)return null;const{options:t,...n}=e,o=t?"select":"button",r={button:s=>g.jsx(sr,{...s}),select:s=>{var a;return g.jsx(ge,{sx:{"& .MuiInputBase-input":{padding:"0rem!important"},width:(a=s.styles)==null?void 0:a.width},children:g.jsx(W1,{...s,options:t})})}};return r[o]?r[o](n):null},x_=({presentSetting:e,gridSetting:t,gridPath:n})=>{var a;if(!n)return e;const o=n.split("/").filter(Boolean),r=(a=t==null?void 0:t.grid)==null?void 0:a.map(({id:l,isHidden:c,isSortable:u,key:d,sequenceId:p})=>({id:l,isHidden:c,isSortable:u,key:d,sequenceId:p}));let s=e;for(let l=0;l<o.length;l++){const c=o[l];l===o.length-1?s[c]={columns:r,pageSize:(t==null?void 0:t.pageSize)??null}:(s[c]=s[c]||{},s=s[c])}return{settingObject:e,defaultUserSettings:r}},C_=async({baseUrl:e,gridSetting:t,gridPath:n})=>{try{const o=JSON.parse(localStorage.getItem("settings")),{settingObject:r,defaultUserSettings:s}=x_({presentSetting:o,gridSetting:t,gridPath:n});return localStorage.setItem("settings",JSON.stringify(r)),await Cc({baseUrl:e,payload:r}),s}catch(o){console.error(o)}},S_=({customTools:e})=>{var o,r;const t=(o=e==null?void 0:e.filter(s=>(s==null?void 0:s.type)===M2.PRIMARY))==null?void 0:o.sort((s,a)=>s.sequenceId-a.sequenceId),n=(r=e==null?void 0:e.filter(s=>(s==null?void 0:s.type)===M2.SECONDARY))==null?void 0:r.sort((s,a)=>s.sequenceId-a.sequenceId);return{primaryButtons:t,secondaryButtons:n}},_2=({customTools:e,isExpanded:t,setIsExpanded:n})=>{const{primaryButtons:o,secondaryButtons:r}=S_({customTools:e}),[s,a]=_.useState(o),l=(r==null?void 0:r.length)>0,c=d=>{d?a([...o,...r]):setTimeout(()=>{a(o)},100)},u=()=>{const d=!t;n(d),c(d)};return _.useEffect(()=>{c(t)},[e]),g.jsxs(g.Fragment,{children:[t&&g.jsx("div",{style:{position:"fixed",left:0,width:"100vw",height:"4rem",zIndex:998}}),g.jsxs(ge,{sx:{display:"flex",alignItems:"center",gap:"0.8rem",flexWrap:"nowrap",maxWidth:"100%",whiteSpace:"nowrap",zIndex:999},children:[g.jsx(M3,{mode:"popLayout",children:s.map(d=>g.jsx(Ws.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},layout:!0,children:g.jsx(ge,{sx:{flexShrink:0,minWidth:"fit-content"},children:v_(d)})},d.id))}),l&&g.jsx(ge,{sx:{paddingLeft:t?"0.5rem":0},children:g.jsx(sr,{label:t?"":"More Actions",styles:{icon:t?Je.CrossWhite:Je.More,colorType:t?"danger":""},onClick:u})})]})]})};_2.propTypes={customTools:i.array.isRequired};const W2=({defaultTools:e,isManageable:t,customTools:n,baseUrl:o,gridPath:r,managableColumns:s=[],pageSize:a})=>{var y,v,w,I,T,S;const l=_.useContext(na),{visibleGridColumns:c,triggerApi:u}=_.useContext(ta),[d,p]=_.useState([]),[f,m]=_.useState(!1);_.useEffect(()=>{if(s.length){const E=s.length?c.filter(R=>s.includes(R.id)):c;p(E)}},[s,c]);const b=async E=>{try{await C_({baseUrl:o,gridPath:r,gridSetting:{grid:E,pageSize:a}})}catch(R){console.error(R)}finally{l({type:Xe.HAS_SETTING_CHANGE,payload:{hasChange:!1}}),l({type:Xe.TRIGGER_API,payload:{triggerApi:!1}})}};_.useEffect(()=>{u&&b(c)},[u]);const h=E=>{const R=c.map(A=>d.some(B=>B.id===A.id)?{...A,isHidden:!E.some(B=>B.id===A.id)}:A);l({type:Xe.SET_GRID_DATA,payload:{visibleGridColumns:R}}),l({type:Xe.HAS_SETTING_CHANGE,payload:{hasChange:!0}})};return g.jsxs(ge,{sx:{margin:"1rem 0",position:"relative",zIndex:10,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:"0.6rem",width:"100%"},children:[g.jsxs(ge,{sx:{display:"flex",flexDirection:"row",gap:"0.6rem"},children:[((y=e==null?void 0:e.search)==null?void 0:y.isRequired)&&g.jsx(V1,{...e==null?void 0:e.search}),((v=e==null?void 0:e.groupBy)==null?void 0:v.isRequired)&&g.jsx(ge,{sx:{"& .MuiInputBase-input":{padding:"0rem!important"}},children:g.jsx(sc,{styles:{icon:Je.Group},...e.groupBy})}),((w=e==null?void 0:e.refresh)==null?void 0:w.isRequired)&&g.jsx(sr,{...e==null?void 0:e.refresh,styles:{variant:"filled",icon:Je.Refresh,colorType:"empty",width:"3.2rem",height:"3.2rem"}}),t&&g.jsx(ge,{sx:{"& .MuiInputBase-input":{padding:"0rem!important"}},children:g.jsx(sc,{placeholder:"Manage Columns",options:d,value:d.filter(E=>!E.isHidden),isMulti:!0,isDraggable:!0,showSearch:!0,onChange:h,styles:{icon:Je.Manage}})})]}),g.jsxs(ge,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-end",gap:"0.6rem"},children:[n&&g.jsx(_2,{customTools:n,setIsExpanded:m,isExpanded:f}),((I=e==null?void 0:e.save)==null?void 0:I.isRequired)&&g.jsx(ge,{sx:{px:"0.5rem"},children:g.jsx(sr,{label:f?"":"Save",styles:{icon:Je.Save,colorType:"empty"},...e==null?void 0:e.save})}),((T=e==null?void 0:e.upload)==null?void 0:T.isRequired)&&g.jsx(sr,{...e==null?void 0:e.upload,styles:{variant:f?"outlined":"filled",icon:f?Je.UploadDark:Je.Upload,colorType:"secondary",isAnimate:!0}}),((S=e==null?void 0:e.download)==null?void 0:S.isRequired)&&g.jsx(sr,{...e==null?void 0:e.download,styles:{variant:"outlined",icon:Je.Download,isAnimate:!0}})]})]})};W2.propTypes={defaultTools:i.object.isRequired,customTools:i.array,isManageable:i.bool,baseUrl:i.string,gridPath:i.gridPath};function z2({tableProps:e,toolbarProps:t,isDefaultConfig:n,isLoading:o}){var s,a;const r=(s=e.columns)==null?void 0:s.isManageable;return g.jsx($1,{children:o?g.jsxs(g.Fragment,{children:[g.jsx($2,{type:"toolbar"}),g.jsx($2,{type:"grid"})]}):g.jsxs(g.Fragment,{children:[t&&g.jsx(W2,{...t,isManageable:r,pageSize:(a=e==null?void 0:e.pagination)==null?void 0:a.rowPerPage}),g.jsx(L2,{tableProps:e,isDefaultConfig:n,gridPath:(t==null?void 0:t.gridPath)||"",baseUrl:(t==null?void 0:t.baseUrl)||""})]})})}z2.propTypes={tableProps:i.object.isRequired,toolbarProps:i.object,isDefaultConfig:i.bool};const G2=({list:e,handleLinkClick:t})=>{const n=ft(),o=({list:r})=>{var s;return(s=r==null?void 0:r.sort((a,l)=>a.order-l.order))==null?void 0:s.map((a,l)=>a!=null&&a.link?g.jsx(Po,{component:"h3",sx:{fontSize:"1rem",cursor:"pointer",color:l===(r==null?void 0:r.length)-1?n.palette.brandColor.orange:n.palette.primary.notifyTextColor},href:a==null?void 0:a.link,underline:"hover",onClick:()=>t(a),children:a==null?void 0:a.title},l):g.jsx(tt,{component:"h3",sx:{fontSize:"1rem",color:l===(r==null?void 0:r.length)-1?n.palette.brandColor.orange:n.palette.primary.notifyTextColor},children:a==null?void 0:a.title},l))};return g.jsx(n0,{separator:g.jsx(ge,{component:"img",src:Je.ArrowRight}),children:o({list:e})})};G2.propTypes={list:i.array.isRequired,handleLinkClick:i.func};const H2=({breadcrumbProps:e,switchProps:t,filterComponentProps:n})=>{var r,s,a,l,c,u;const o=ft();return g.jsxs(g.Fragment,{children:[g.jsxs(lt,{sx:{background:o.palette.primary.notifyBackground,borderBottom:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,height:"3rem",p:"0px 5.5rem 0 1.5rem",zIndex:4,position:"relative"},direction:"row",justifyContent:"space-between",alignItems:"center",children:[g.jsx(G2,{...e}),g.jsxs(lt,{direction:"row",gap:"1rem",alignItems:"center",children:[t&&g.jsx(U1,{...t}),(n==null?void 0:n.filterBtnProps)&&g.jsxs(lt,{direction:"row",children:[g.jsx(ds,{orientation:"vertical",flexItem:!0,sx:{mx:"1rem",height:"2rem!important",opacity:"1!important",borderColor:o.palette.primary.notifyBorderColor}}),g.jsxs(lt,{direction:"row",alignItems:"center",gap:"0.5rem",onClick:(r=n==null?void 0:n.filterBtnProps)==null?void 0:r.onFilterClick,sx:{cursor:"pointer"},children:[g.jsx(ge,{component:"img",src:o.icons.filter}),g.jsx(tt,{sx:{fontSize:"1.1rem",color:o.palette.primary.notifyActiveText},children:(s=n==null?void 0:n.filterBtnProps)==null?void 0:s.label})]})]})]})]}),g.jsx(Ws.div,{layout:!0,initial:{height:"0rem"},animate:{height:(a=n==null?void 0:n.filterBtnProps)!=null&&a.filterContainerVisible?"5rem":"0rem",opacity:(l=n==null?void 0:n.filterBtnProps)!=null&&l.filterContainerVisible?1:0},transition:{duration:.5,ease:"easeInOut"},style:{background:o.palette.primary.notifyBackground,borderBottom:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,padding:"0px 5.5rem 0 1.5rem",position:"relative",alignItems:"center",display:"flex",overflow:"hidden"},children:g.jsxs(lt,{sx:{background:o.palette.primary.appBackground,height:"3.8rem",p:"0 2rem",width:"100%",borderRadius:"0.7rem",overflow:"visible"},direction:"row",alignItems:"center",children:[g.jsx(tt,{sx:{fontSize:"1.2rem",fontWeight:"500",color:o.palette.primary.notifyActiveText},children:"Filters:"}),g.jsx(ge,{sx:{overflowX:"auto",overflowY:"visible",whiteSpace:"nowrap",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},margin:"0 1rem",padding:"0.5rem 0",flexGrow:1},children:g.jsx(lt,{direction:"row",gap:"1.2rem",sx:{overflow:"visible"},children:(c=n==null?void 0:n.filterItems)==null?void 0:c.map((d,p)=>g.jsx(g.Fragment,{children:g.jsxs(ge,{sx:{position:"relative",overflow:"visible",border:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,background:o.palette.primary.notifyBackground,borderRadius:"0.6rem",padding:"0.3rem 1.1rem",display:"inline-block"},children:[g.jsx(ge,{component:"img",src:Je.FilterClose,sx:{position:"absolute",top:"-0.4rem",right:"-0.6rem",cursor:"pointer"},onClick:()=>n==null?void 0:n.onFilterChipClose(d)}),g.jsx(tt,{sx:{fontSize:"1rem",color:o.palette.primary.notifyTextColor},children:d==null?void 0:d.filterLabel})]},p)}))})}),g.jsx(ge,{component:tt,sx:{fontSize:"1.1rem",fontWeight:"500",textDecoration:"underline",color:o.palette.brandColor.red,cursor:"pointer"},onClick:(u=n==null?void 0:n.filterContainerProps)==null?void 0:u.onClearClick,children:"Clear"})]})})]})};H2.propTypes={breadcrumbProps:i.object.isRequired,switchProps:i.object};function U2({headerProps:e}){return g.jsx(Bn,{children:g.jsx(H2,{...e})})}U2.propTypes={headerProps:i.object.isRequired};const Bf=_.createContext(null),Y2=_.createContext(null);function w_({children:e}){const[t,n]=_.useReducer(I_,T_);return g.jsx(Bf.Provider,{value:t,children:g.jsx(Y2.Provider,{value:n,children:e})})}function I_(e,t){var n;switch(t.type){case Xe.LOADING:return{...e,loading:t.loading};case Xe.SUCCESS:return{...e,data:(n=t.data)==null?void 0:n.sort((o,r)=>new Date(r.createdAt)-new Date(o.createdAt))};case Xe.MARK_ALL_AS_READ:return{...e,isMarkAllAsRead:t.isMarkAllAsRead};case Xe.ERROR:return{...e,error:t.error};default:throw new Error(`${_n.UNHANDLED}: ${t}`)}}const T_={loading:!1,data:[],error:"",isMarkAllAsRead:{count:0,boo:!1}},{TENANT_ID:Vf,BU_ID:Lf,SNOP_ID:X2}=Af,{TENANT_IDS:$f,BU_IDS:_f}=mr,E_=async e=>{try{const t=`${e}${xc.NOTIFICATION}/v1?${Vf}=${$f}&${Lf}=${_f}`;return await yt.get(t,aa)}catch(t){return t}},Z2=async(e,t,n)=>{try{const o=n===A2.MARK_ALL_READ?"":`&${X2}=${n}&`,r=`${e}${xc.NOTIFICATION}${Rf.VERSION}?${Vf}=${$f}&${Lf}=${_f}${o}`;return await yt.put(r,t,aa)}catch(o){return o}},O_=async({baseUrl:e,id:t,snopId:n})=>{try{const o=`${e}${xc.NOTIFICATION}${Rf.VERSION}?${Vf}=${$f}&${Lf}=${_f}&${X2}=${n}&id=${t}`;return await yt.get(o,aa)}catch(o){return o}},Sc={OK:200,CREATED:201,NO_CONTENT:204,BAD_REQUEST:400,UNAUTHORIZED:401,NOT_FOUND:404,INTERNAL_SERVER_ERROR:500};var J2,q2,K2,Q2;function Wf(){return Wf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Wf.apply(null,arguments)}var R_=function(t){return C.createElement("svg",Wf({xmlns:"http://www.w3.org/2000/svg",width:16,height:18,fill:"none"},t),J2||(J2=C.createElement("path",{stroke:"#666D80",strokeLinecap:"round",strokeMiterlimit:10,d:"M8.013 3.44c-2.206 0-4 1.793-4 4v1.927c0 .406-.173 1.026-.38 1.373l-.766 1.273c-.474.787-.147 1.66.72 1.954 2.873.96 5.973.96 8.846 0a1.335 1.335 0 0 0 .72-1.954l-.766-1.273c-.2-.347-.374-.967-.374-1.373V7.44c0-2.2-1.8-4-4-4Z"})),q2||(q2=C.createElement("path",{stroke:"#666D80",strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:10,d:"M9.247 3.633a4.503 4.503 0 0 0-2.467 0 1.324 1.324 0 0 1 2.467 0"})),K2||(K2=C.createElement("path",{stroke:"#666D80",strokeMiterlimit:10,d:"M10.014 14.207c0 1.1-.9 2-2 2a2.007 2.007 0 0 1-2-2"})),Q2||(Q2=C.createElement("circle",{cx:12.266,cy:3,r:2.5,fill:"#E85353",stroke:"#F8FAFB"})))};const P_=({count:e})=>(ft(),g.jsxs(g.Fragment,{children:[g.jsx(ge,{sx:{gap:"0.5rem",display:"flex",justifyContent:"center",alignItems:"center"},className:"notify-icon-container",children:g.jsx(R_,{style:{scale:2}})}),g.jsx(m_,{badgeContent:e==0?"":null,color:"error"})]}));var eC;function zf(){return zf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},zf.apply(null,arguments)}var A_=function(t){return C.createElement("svg",zf({xmlns:"http://www.w3.org/2000/svg",width:13,height:8,fill:"none"},t),eC||(eC=C.createElement("path",{fill:"#A8A8A8",fillRule:"evenodd",d:"M8.954 1.004a.406.406 0 0 1 0 .575L3.537 6.996a.406.406 0 0 1-.574 0L.796 4.829a.406.406 0 1 1 .575-.575l1.879 1.88 5.13-5.13a.406.406 0 0 1 .574 0m3.25 0a.406.406 0 0 1 0 .575L6.787 6.996a.406.406 0 1 1-.574-.575l5.416-5.417a.406.406 0 0 1 .575 0",clipRule:"evenodd"})))};const tC=({title:e,subTitle:t,children:n,onRefresh:o,onClose:r,loading:s,handleShowAll:a,handleMarkAllAsRead:l,isMarkAllAsRead:c,width:u,headerIconType:d,isDialogActionShow:p,className:f,dialogType:m,data:b,toggleNotify:h,mode:y,isDetail:v=!1,tabValue:w,setTabValue:I,...T})=>{var A,D,B,$;console.log({tabValue:w});const S=ft(),E=(k,W)=>{I(W)},R=()=>{switch(d){case vc.REFRESH:return g.jsx(ge,{component:"img",src:Je.Refresh,alt:"refresh",onClick:o,sx:{cursor:"pointer"}});case vc.CLOSE:return g.jsx(ge,{component:"img",src:Je.Close,alt:"refresh",onClick:r,sx:{cursor:"pointer"}});default:return null}};return g.jsxs(d_,{maxWidth:v?"xs":"md",onClose:r,...T,className:["notification-dialog",f,m==="notifcation-dialog"?"notification-main-box":""].join(" "),dialogType:!0,children:[g.jsxs(ge,{sx:m==="notifcation-dialog"?{gap:1,display:"flex",width:"100%",justifyContent:"space-between",alignItems:"center"}:{gap:1,display:"flex",width:"100%",justifyContent:"space-between",paddingBottom:1.2},children:[g.jsxs(ge,{className:"title-container",children:[g.jsx(so,{variant:"h6",component:"h6",className:"title",children:e}),t&&g.jsx(so,{variant:"h6",className:"title sub-title",children:t})]}),R()]}),v?g.jsx(g.Fragment,{children:n}):g.jsxs(g.Fragment,{children:[g.jsx(ge,{sx:{borderBottom:1,borderColor:S.palette.primary.notifyBorderColor},className:"tab-panel",children:g.jsxs(g_,{value:w,onChange:E,children:[g.jsx(Ff,{label:g.jsxs(ge,{sx:{display:"flex",alignItems:"center",fontSize:"1rem",fontWeight:"500"},children:["All (",g.jsx(tt,{component:"span",sx:{fontWeight:"500",fontSize:"1rem"},children:((A=b==null?void 0:b.filter(k=>!(k!=null&&k.isRead)))==null?void 0:A.length)||0}),")"]})}),g.jsx(Ff,{label:g.jsxs(ge,{sx:{display:"flex",alignItems:"center",fontSize:"1rem",fontWeight:"500",color:S.palette.brandColor.blue},children:["Info (",g.jsx(tt,{component:"span",sx:{fontWeight:"500",fontSize:"1rem"},children:((D=b==null?void 0:b.filter(k=>(k==null?void 0:k.type)==="INFO"&&!(k!=null&&k.isRead)))==null?void 0:D.length)||0}),")"]})}),g.jsx(Ff,{label:g.jsxs(ge,{sx:{display:"flex",alignItems:"center",fontSize:"1rem",fontWeight:"500",color:S.palette.brandColor.red},children:["Error (",g.jsx(tt,{component:"span",sx:{fontWeight:"500",fontSize:"1rem"},children:((B=b==null?void 0:b.filter(k=>(k==null?void 0:k.type)==="ERROR"&&!(k!=null&&k.isRead)))==null?void 0:B.length)||0}),")"]})})]})}),g.jsx(f_,{value:w,index:0,children:n})]}),p&&g.jsxs(pl,{className:"dialog-action",sx:{px:"1rem"},children:[g.jsxs(lt,{direction:"row",gap:1,children:[g.jsx(so,{sx:{fontSize:"0.9rem"},children:"Only show unread"}),g.jsx(p_,{disabled:s,checked:y,onChange:h})]}),g.jsx(Fn,{variant:"outlined",className:"view-all",onClick:l,startIcon:g.jsx(A_,{}),disabled:!(($=b==null?void 0:b.filter(k=>!(k!=null&&k.isRead)))!=null&&$.length),style:{backgroundColor:"transparent"},sx:{p:0,color:S.palette.primary.notifyTextColor},children:"Mark all as read"})]})]})};var nC,oC;function Gf(){return Gf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Gf.apply(null,arguments)}var M_=function(t){return C.createElement("svg",Gf({xmlns:"http://www.w3.org/2000/svg",width:12,height:12,fill:"none"},t),nC||(nC=C.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M7.79 6c0 .99-.8 1.79-1.79 1.79S4.21 6.99 4.21 6 5.01 4.21 6 4.21s1.79.8 1.79 1.79"})),oC||(oC=C.createElement("path",{stroke:"#fff",strokeLinecap:"round",strokeLinejoin:"round",d:"M6 10.135c1.765 0 3.41-1.04 4.555-2.84.45-.705.45-1.89 0-2.595C9.41 2.9 7.765 1.86 6 1.86S2.59 2.9 1.445 4.7c-.45.705-.45 1.89 0 2.595 1.145 1.8 2.79 2.84 4.555 2.84"})))},rC;function Hf(){return Hf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Hf.apply(null,arguments)}var k_=function(t){return C.createElement("svg",Hf({xmlns:"http://www.w3.org/2000/svg",width:9,height:8,fill:"none"},t),rC||(rC=C.createElement("path",{fill:"#fff",fillRule:"evenodd",d:"M8.277 1.004a.406.406 0 0 1 0 .575L2.86 6.996a.406.406 0 0 1-.574 0L.119 4.829a.406.406 0 1 1 .575-.575l1.879 1.88 5.13-5.13a.406.406 0 0 1 .574 0",clipRule:"evenodd"})))};const iC=({type:e,title:t,isRead:n,handleShowDetails:o,handleRead:r,isCheckBox:s,selectedAlert:a,id:l,handleCheckboxChange:c,clickId:u,product:d,createdAt:p,isShowVisible:f})=>{var h,y;const m=ft(),b=(y=(h=JSON.parse(localStorage.getItem("settings")))==null?void 0:h.platform)==null?void 0:y.theme;return g.jsxs(ge,{className:"cards",children:[g.jsxs(lt,{display:"flex",flexDirection:"row",alignItems:"start",justifyContent:"space-between",gap:1,children:[s&&g.jsx(td,{checked:!!a.includes(l),onChange:v=>c(v,l),disabled:n,sx:{padding:"4px 7px 0 7px"}}),g.jsx(Ku,{sx:{"& .MuiBadge-badge":{backgroundColor:"#6041EA"}},variant:"dot",className:"badge",invisible:n,children:g.jsx(so,{sx:{color:m.palette.primary.notifyActiveText},component:"p",className:["title-card",n&&"read"].join(" "),children:t})})]}),g.jsxs(lt,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",children:[g.jsxs(lt,{display:"flex",flexDirection:"row",justifyContent:"start",gap:1,sx:{p:"0.5rem 0"},children:[f&&g.jsx(nl,{icon:g.jsx(M_,{className:`${b==="light"?"chip-icon-light":"chip-icon-dark"}`}),disabled:u,onClick:o,label:u===l?g.jsx(as,{color:"primary",size:13}):"Show Details",component:"button",variant:"filled",clickable:!0,size:"small",sx:{height:"2rem",fontWeight:"300",fontSize:"0.9rem",color:m.palette.primary.notifyActiveText,borderColor:m.palette.primary.notifyBorderColor,background:m.palette.primary.notifyButtonBackground,borderRadius:"0.6rem",padding:"0.2rem"}}),!n&&g.jsx(nl,{icon:g.jsx(k_,{className:`${b==="light"?"chip-icon-light":"chip-icon-dark"}`}),disabled:u,onClick:r,label:"Acknowledge",component:"button",variant:"outlined",clickable:!0,size:"small",sx:{height:"2rem",fontSize:"0.9rem",fontWeight:"300",borderColor:m.palette.primary.notifyBorderColor,color:m.palette.primary.notifyActiveText,borderRadius:"0.6rem",padding:"0.2rem"}})]}),g.jsxs(lt,{display:"flex",justifyContent:"space-between",flexDirection:"row",alignItems:"center",gap:.35,children:[g.jsx(so,{sx:{fontSize:"0.9rem"},children:d}),g.jsx(so,{color:m.palette.primary.notifyTextColor,children:"•"}),g.jsx(so,{sx:{fontSize:"0.9rem"},children:o$(p)})]})]})]})};iC.propTypes={type:i.string,title:i.string,subTitle:i.string,isRead:i.bool,handleShowDetails:i.func,handleRead:i.func};const sC=({data:e,handleRead:t,handleShowDetails:n,clickId:o,mode:r,page:s,setPage:a})=>{const{isMarkAllAsRead:l}=_.useContext(Bf),c=new Date,u=new Intl.DateTimeFormat("en-US",{day:"numeric",month:"long",year:"numeric"}).format(c),[d,p]=_.useState([]),[f,m]=_.useState(!1),[b,h]=_.useState(!0),y=_.useRef(null),v=ft();return _.useEffect(()=>{p([...e])},[e]),_.useEffect(()=>{const w=new IntersectionObserver(I=>{I[0].isIntersecting&&!f&&b&&a(T=>T+1)},{threshold:1});return y.current&&w.observe(y.current),()=>{y.current&&w.unobserve(y.current)}},[f,b]),g.jsxs(ge,{sx:d.length?{py:"0.5rem"}:{py:"0.5rem",justifyContent:"center",alignItems:"center",display:"flex",height:"100%"},children:[Object.entries(a$(d)).map(([w,I])=>g.jsxs(_.Fragment,{children:[w!==u&&g.jsx(h_,{children:w}),I.map((T,S)=>g.jsx(iC,{type:"success",title:T.message,subTitle:T.createdAt,isRead:T.isRead,handleShowDetails:()=>n(T.id,T.snopId),handleRead:()=>t([T.id],T.snopId),clickId:o,id:T.id,product:T.product,createdAt:T.createdAt,isShowVisible:T==null?void 0:T.isNotificationDetails},T.id||S))]},w)),f&&s>1&&!!(d!=null&&d.length)&&g.jsx(ge,{sx:{display:"flex",justifyContent:"center",alignItems:"center",pl:"0.5rem",py:"0.3rem"},children:g.jsx(as,{size:20,className:"circular-loader"})}),!(d!=null&&d.length)&&g.jsx(tt,{sx:{fontSize:"1.1rem",color:v.palette.primary.notifyTextColor,textAlign:"center",px:"0.8rem"},children:"You don't have any unread notification here. Use the toggle to switch between read and unread notification."}),g.jsx(ge,{ref:y,style:{height:"0.1rem",backgroundColor:"transparent"}})]})};sC.propTypes={data:i.array,handleRead:i.func,handleShowDetails:i.func};function la(e,t,n){return(t=Ym(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function Me(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aC(Object(n),!0).forEach(function(o){la(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aC(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function D_(e){if(Array.isArray(e))return e}function N_(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var o,r,s,a,l=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(o=s.call(n)).done)&&(l.push(o.value),l.length!==t);c=!0);}catch(d){u=!0,r=d}finally{try{if(!c&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw r}}return l}}function Uf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function lC(e,t){if(e){if(typeof e=="string")return Uf(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Uf(e,t):void 0}}function j_(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
329
329
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vo(e,t){return D_(e)||N_(e,t)||lC(e,t)||j_()}function xo(e,t){if(e==null)return{};var n,o,r=re(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)n=s[o],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var F_=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function B_(e){var t=e.defaultInputValue,n=t===void 0?"":t,o=e.defaultMenuIsOpen,r=o===void 0?!1:o,s=e.defaultValue,a=s===void 0?null:s,l=e.inputValue,c=e.menuIsOpen,u=e.onChange,d=e.onInputChange,p=e.onMenuClose,f=e.onMenuOpen,m=e.value,b=xo(e,F_),h=_.useState(l!==void 0?l:n),y=vo(h,2),v=y[0],w=y[1],I=_.useState(c!==void 0?c:r),T=vo(I,2),S=T[0],E=T[1],R=_.useState(m!==void 0?m:a),A=vo(R,2),D=A[0],B=A[1],$=_.useCallback(function(j,P){typeof u=="function"&&u(j,P),B(j)},[u]),k=_.useCallback(function(j,P){var N;typeof d=="function"&&(N=d(j,P)),w(N!==void 0?N:j)},[d]),W=_.useCallback(function(){typeof f=="function"&&f(),E(!0)},[f]),V=_.useCallback(function(){typeof p=="function"&&p(),E(!1)},[p]),M=l!==void 0?l:v,O=c!==void 0?c:S,F=m!==void 0?m:D;return Me(Me({},b),{},{inputValue:M,menuIsOpen:O,onChange:$,onInputChange:k,onMenuClose:V,onMenuOpen:W,value:F})}function V_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cC(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Ym(o.key),o)}}function L_(e,t,n){return t&&cC(e.prototype,t),n&&cC(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function $_(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ua(e,t)}function wc(e){return wc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},wc(e)}function uC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(uC=function(){return!!e})()}function __(e,t){if(t&&(Uo(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xg(e)}function W_(e){var t=uC();return function(){var n,o=wc(e);if(t){var r=wc(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return __(this,n)}}function z_(e){if(Array.isArray(e))return Uf(e)}function G_(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function H_(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
330
330
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yf(e){return z_(e)||G_(e)||lC(e)||H_()}function U_(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const Y_=Math.min,X_=Math.max,Ic=Math.round,Tc=Math.floor,Ec=e=>({x:e,y:e});function Z_(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function Oc(){return typeof window<"u"}function dC(e){return fC(e)?(e.nodeName||"").toLowerCase():"#document"}function Co(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function pC(e){var t;return(t=(fC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fC(e){return Oc()?e instanceof Node||e instanceof Co(e).Node:!1}function J_(e){return Oc()?e instanceof Element||e instanceof Co(e).Element:!1}function Xf(e){return Oc()?e instanceof HTMLElement||e instanceof Co(e).HTMLElement:!1}function hC(e){return!Oc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Co(e).ShadowRoot}function mC(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Zf(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!["inline","contents"].includes(r)}function q_(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function K_(e){return["html","body","#document"].includes(dC(e))}function Zf(e){return Co(e).getComputedStyle(e)}function Q_(e){if(dC(e)==="html")return e;const t=e.assignedSlot||e.parentNode||hC(e)&&e.host||pC(e);return hC(t)?t.host:t}function gC(e){const t=Q_(e);return K_(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xf(t)&&mC(t)?t:gC(t)}function Rc(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=gC(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),a=Co(r);if(s){const l=Jf(a);return t.concat(a,a.visualViewport||[],mC(r)?r:[],l&&n?Rc(l):[])}return t.concat(r,Rc(r,[],n))}function Jf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function e7(e){const t=Zf(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Xf(e),s=r?e.offsetWidth:n,a=r?e.offsetHeight:o,l=Ic(n)!==s||Ic(o)!==a;return l&&(n=s,o=a),{width:n,height:o,$:l}}function qf(e){return J_(e)?e:e.contextElement}function bC(e){const t=qf(e);if(!Xf(t))return Ec(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=e7(t);let a=(s?Ic(n.width):n.width)/o,l=(s?Ic(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const t7=Ec(0);function n7(e){const t=Co(e);return!q_()||!t.visualViewport?t7:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function o7(e,t,n){return!1}function yC(e,t,n,o){t===void 0&&(t=!1);const r=e.getBoundingClientRect(),s=qf(e);let a=Ec(1);t&&(a=bC(e));const l=o7()?n7(s):Ec(0);let c=(r.left+l.x)/a.x,u=(r.top+l.y)/a.y,d=r.width/a.x,p=r.height/a.y;if(s){const f=Co(s),m=o;let b=f,h=Jf(b);for(;h&&o&&m!==b;){const y=bC(h),v=h.getBoundingClientRect(),w=Zf(h),I=v.left+(h.clientLeft+parseFloat(w.paddingLeft))*y.x,T=v.top+(h.clientTop+parseFloat(w.paddingTop))*y.y;c*=y.x,u*=y.y,d*=y.x,p*=y.y,c+=I,u+=T,b=Co(h),h=Jf(b)}}return Z_({width:d,height:p,x:c,y:u})}function vC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function r7(e,t){let n=null,o;const r=pC(e);function s(){var l;clearTimeout(o),(l=n)==null||l.disconnect(),n=null}function a(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const u=e.getBoundingClientRect(),{left:d,top:p,width:f,height:m}=u;if(l||t(),!f||!m)return;const b=Tc(p),h=Tc(r.clientWidth-(d+f)),y=Tc(r.clientHeight-(p+m)),v=Tc(d),I={rootMargin:-b+"px "+-h+"px "+-y+"px "+-v+"px",threshold:X_(0,Y_(1,c))||1};let T=!0;function S(E){const R=E[0].intersectionRatio;if(R!==c){if(!T)return a();R?a(!1,R):o=setTimeout(()=>{a(!1,1e-7)},1e3)}R===1&&!vC(u,e.getBoundingClientRect())&&a(),T=!1}try{n=new IntersectionObserver(S,{...I,root:r.ownerDocument})}catch{n=new IntersectionObserver(S,I)}n.observe(e)}return a(!0),s}function i7(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,u=qf(e),d=r||s?[...u?Rc(u):[],...Rc(t)]:[];d.forEach(v=>{r&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const p=u&&l?r7(u,n):null;let f=-1,m=null;a&&(m=new ResizeObserver(v=>{let[w]=v;w&&w.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var I;(I=m)==null||I.observe(t)})),n()}),u&&!c&&m.observe(u),m.observe(t));let b,h=c?yC(e):null;c&&y();function y(){const v=yC(e);h&&!vC(h,v)&&n(),h=v,b=requestAnimationFrame(y)}return n(),()=>{var v;d.forEach(w=>{r&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),p==null||p(),(v=m)==null||v.disconnect(),m=null,c&&cancelAnimationFrame(b)}}var Kf=_.useLayoutEffect,s7=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Pc=function(){};function a7(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function l7(e,t){for(var n=arguments.length,o=new Array(n>2?n-2:0),r=2;r<n;r++)o[r-2]=arguments[r];var s=[].concat(o);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&s.push("".concat(a7(e,a)));return s.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var xC=function(t){return b7(t)?t.filter(Boolean):Uo(t)==="object"&&t!==null?[t]:[]},CC=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=xo(t,s7);return Me({},n)},Rt=function(t,n,o){var r=t.cx,s=t.getStyles,a=t.getClassNames,l=t.className;return{css:s(n,t),className:r(o??{},a(n,t),l)}};function Ac(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function c7(e){return Ac(e)?window.innerHeight:e.clientHeight}function SC(e){return Ac(e)?window.pageYOffset:e.scrollTop}function Mc(e,t){if(Ac(e)){window.scrollTo(0,t);return}e.scrollTop=t}function u7(e){var t=getComputedStyle(e),n=t.position==="absolute",o=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var r=e;r=r.parentElement;)if(t=getComputedStyle(r),!(n&&t.position==="static")&&o.test(t.overflow+t.overflowY+t.overflowX))return r;return document.documentElement}function d7(e,t,n,o){return n*((e=e/o-1)*e*e+1)+t}function kc(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Pc,r=SC(e),s=t-r,a=10,l=0;function c(){l+=a;var u=d7(l,r,s,n);Mc(e,u),l<n?window.requestAnimationFrame(c):o(e)}c()}function wC(e,t){var n=e.getBoundingClientRect(),o=t.getBoundingClientRect(),r=t.offsetHeight/3;o.bottom+r>n.bottom?Mc(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+r,e.scrollHeight)):o.top-r<n.top&&Mc(e,Math.max(t.offsetTop-r,0))}function p7(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function IC(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function f7(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var TC=!1,h7={get passive(){return TC=!0}},Dc=typeof window<"u"?window:{};Dc.addEventListener&&Dc.removeEventListener&&(Dc.addEventListener("p",Pc,h7),Dc.removeEventListener("p",Pc,!1));var m7=TC;function g7(e){return e!=null}function b7(e){return Array.isArray(e)}function Nc(e,t,n){return e?t:n}function Zz(e){return e}function Jz(e){return e}var y7=function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];var s=Object.entries(t).filter(function(a){var l=vo(a,1),c=l[0];return!o.includes(c)});return s.reduce(function(a,l){var c=vo(l,2),u=c[0],d=c[1];return a[u]=d,a},{})},v7=["children","innerProps"],x7=["children","innerProps"];function C7(e){var t=e.maxHeight,n=e.menuEl,o=e.minHeight,r=e.placement,s=e.shouldScroll,a=e.isFixedPosition,l=e.controlHeight,c=u7(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var d=c.getBoundingClientRect(),p=d.height,f=n.getBoundingClientRect(),m=f.bottom,b=f.height,h=f.top,y=n.offsetParent.getBoundingClientRect(),v=y.top,w=a?window.innerHeight:c7(c),I=SC(c),T=parseInt(getComputedStyle(n).marginBottom,10),S=parseInt(getComputedStyle(n).marginTop,10),E=v-S,R=w-h,A=E+I,D=p-I-h,B=m-w+I+T,$=I+h-S,k=160;switch(r){case"auto":case"bottom":if(R>=b)return{placement:"bottom",maxHeight:t};if(D>=b&&!a)return s&&kc(c,B,k),{placement:"bottom",maxHeight:t};if(!a&&D>=o||a&&R>=o){s&&kc(c,B,k);var W=a?R-T:D-T;return{placement:"bottom",maxHeight:W}}if(r==="auto"||a){var V=t,M=a?E:A;return M>=o&&(V=Math.min(M-T-l,t)),{placement:"top",maxHeight:V}}if(r==="bottom")return s&&Mc(c,B),{placement:"bottom",maxHeight:t};break;case"top":if(E>=b)return{placement:"top",maxHeight:t};if(A>=b&&!a)return s&&kc(c,$,k),{placement:"top",maxHeight:t};if(!a&&A>=o||a&&E>=o){var O=t;return(!a&&A>=o||a&&E>=o)&&(O=a?E-S:A-S),s&&kc(c,$,k),{placement:"top",maxHeight:O}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(r,'".'))}return u}function S7(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var EC=function(t){return t==="auto"?"bottom":t},w7=function(t,n){var o,r=t.placement,s=t.theme,a=s.borderRadius,l=s.spacing,c=s.colors;return Me((o={label:"menu"},la(o,S7(r),"100%"),la(o,"position","absolute"),la(o,"width","100%"),la(o,"zIndex",1),o),n?{}:{backgroundColor:c.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:l.menuGutter,marginTop:l.menuGutter})},OC=_.createContext(null),I7=function(t){var n=t.children,o=t.minMenuHeight,r=t.maxMenuHeight,s=t.menuPlacement,a=t.menuPosition,l=t.menuShouldScrollIntoView,c=t.theme,u=_.useContext(OC)||{},d=u.setPortalPlacement,p=_.useRef(null),f=_.useState(r),m=vo(f,2),b=m[0],h=m[1],y=_.useState(null),v=vo(y,2),w=v[0],I=v[1],T=c.spacing.controlHeight;return Kf(function(){var S=p.current;if(S){var E=a==="fixed",R=l&&!E,A=C7({maxHeight:r,menuEl:S,minHeight:o,placement:s,shouldScroll:R,isFixedPosition:E,controlHeight:T});h(A.maxHeight),I(A.placement),d==null||d(A.placement)}},[r,s,a,l,o,d,T]),n({ref:p,placerProps:Me(Me({},t),{},{placement:w||EC(s),maxHeight:b})})},T7=function(t){var n=t.children,o=t.innerRef,r=t.innerProps;return Re("div",x({},Rt(t,"menu",{menu:!0}),{ref:o},r),n)},E7=T7,O7=function(t,n){var o=t.maxHeight,r=t.theme.spacing.baseUnit;return Me({maxHeight:o,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:r,paddingTop:r})},R7=function(t){var n=t.children,o=t.innerProps,r=t.innerRef,s=t.isMulti;return Re("div",x({},Rt(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:r},o),n)},RC=function(t,n){var o=t.theme,r=o.spacing.baseUnit,s=o.colors;return Me({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(r*2,"px ").concat(r*3,"px")})},P7=RC,A7=RC,M7=function(t){var n=t.children,o=n===void 0?"No options":n,r=t.innerProps,s=xo(t,v7);return Re("div",x({},Rt(Me(Me({},s),{},{children:o,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),o)},k7=function(t){var n=t.children,o=n===void 0?"Loading...":n,r=t.innerProps,s=xo(t,x7);return Re("div",x({},Rt(Me(Me({},s),{},{children:o,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),o)},D7=function(t){var n=t.rect,o=t.offset,r=t.position;return{left:n.left,position:r,top:o,width:n.width,zIndex:1}},N7=function(t){var n=t.appendTo,o=t.children,r=t.controlElement,s=t.innerProps,a=t.menuPlacement,l=t.menuPosition,c=_.useRef(null),u=_.useRef(null),d=_.useState(EC(a)),p=vo(d,2),f=p[0],m=p[1],b=_.useMemo(function(){return{setPortalPlacement:m}},[]),h=_.useState(null),y=vo(h,2),v=y[0],w=y[1],I=_.useCallback(function(){if(r){var R=p7(r),A=l==="fixed"?0:window.pageYOffset,D=R[f]+A;(D!==(v==null?void 0:v.offset)||R.left!==(v==null?void 0:v.rect.left)||R.width!==(v==null?void 0:v.rect.width))&&w({offset:D,rect:R})}},[r,l,f,v==null?void 0:v.offset,v==null?void 0:v.rect.left,v==null?void 0:v.rect.width]);Kf(function(){I()},[I]);var T=_.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),r&&c.current&&(u.current=i7(r,c.current,I,{elementResize:"ResizeObserver"in window}))},[r,I]);Kf(function(){T()},[T]);var S=_.useCallback(function(R){c.current=R,T()},[T]);if(!n&&l!=="fixed"||!v)return null;var E=Re("div",x({ref:S},Rt(Me(Me({},t),{},{offset:v.offset,position:l,rect:v.rect}),"menuPortal",{"menu-portal":!0}),s),o);return Re(OC.Provider,{value:b},n?jn.createPortal(E,n):E)},j7=function(t){var n=t.isDisabled,o=t.isRtl;return{label:"container",direction:o?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},F7=function(t){var n=t.children,o=t.innerProps,r=t.isDisabled,s=t.isRtl;return Re("div",x({},Rt(t,"container",{"--is-disabled":r,"--is-rtl":s}),o),n)},B7=function(t,n){var o=t.theme.spacing,r=t.isMulti,s=t.hasValue,a=t.selectProps.controlShouldRenderValue;return Me({alignItems:"center",display:r&&s&&a?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(o.baseUnit/2,"px ").concat(o.baseUnit*2,"px")})},V7=function(t){var n=t.children,o=t.innerProps,r=t.isMulti,s=t.hasValue;return Re("div",x({},Rt(t,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":s}),o),n)},L7=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},$7=function(t){var n=t.children,o=t.innerProps;return Re("div",x({},Rt(t,"indicatorsContainer",{indicators:!0}),o),n)},PC,_7=["size"],W7=["innerProps","isRtl","size"];function z7(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var G7=process.env.NODE_ENV==="production"?{name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"}:{name:"tj5bde-Svg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3Vycm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Z0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */",toString:z7},AC=function(t){var n=t.size,o=xo(t,_7);return Re("svg",x({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:G7},o))},Qf=function(t){return Re(AC,x({size:20},t),Re("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},MC=function(t){return Re(AC,x({size:20},t),Re("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},kC=function(t,n){var o=t.isFocused,r=t.theme,s=r.spacing.baseUnit,a=r.colors;return Me({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:o?a.neutral60:a.neutral20,padding:s*2,":hover":{color:o?a.neutral80:a.neutral40}})},H7=kC,U7=function(t){var n=t.children,o=t.innerProps;return Re("div",x({},Rt(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),o),n||Re(MC,null))},Y7=kC,X7=function(t){var n=t.children,o=t.innerProps;return Re("div",x({},Rt(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),o),n||Re(Qf,null))},Z7=function(t,n){var o=t.isDisabled,r=t.theme,s=r.spacing.baseUnit,a=r.colors;return Me({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:o?a.neutral10:a.neutral20,marginBottom:s*2,marginTop:s*2})},J7=function(t){var n=t.innerProps;return Re("span",x({},n,Rt(t,"indicatorSeparator",{"indicator-separator":!0})))},q7=Yn(PC||(PC=U_([`
331
331
  0%, 80%, 100% { opacity: 0; }