@edusight/notification-widget 1.0.2 → 1.0.4
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.cjs.js +17 -17
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +726 -716
- package/dist/index.esm.js.map +1 -1
- package/dist/polyfills/process.d.ts +8 -0
- package/dist/polyfills/process.d.ts.map +1 -0
- package/package.json +4 -3
package/dist/index.cjs.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Z=require("react")
|
|
2
|
-
`+M+s}}var
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Z=require("react"),$=require("@mui/material"),Fe=require("@edusight/notification-sdk"),io=require("@emotion/styled");require("@emotion/react");function ao(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const $e=ao(Z),Or=typeof queueMicrotask=="function"?e=>queueMicrotask(e):e=>Promise.resolve().then(e),tt=globalThis.process;if(tt)tt.env||(tt.env={}),typeof tt.nextTick!="function"&&(tt.nextTick=Or);else{const e=globalThis;e.process={env:{},nextTick:Or}}function so(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mt={exports:{}},rt={};var _r;function co(){if(_r)return rt;_r=1;var e=Z,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function c(u,f,d){var m,p={},h=null,y=null;d!==void 0&&(h=""+d),f.key!==void 0&&(h=""+f.key),f.ref!==void 0&&(y=f.ref);for(m in f)n.call(f,m)&&!i.hasOwnProperty(m)&&(p[m]=f[m]);if(u&&u.defaultProps)for(m in f=u.defaultProps,f)p[m]===void 0&&(p[m]=f[m]);return{$$typeof:t,type:u,key:h,ref:y,props:p,_owner:o.current}}return rt.Fragment=r,rt.jsx=c,rt.jsxs=c,rt}var nt={};var Rr;function lo(){return Rr||(Rr=1,process.env.NODE_ENV!=="production"&&(function(){var e=Z,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen"),b=Symbol.iterator,l="@@iterator";function T(s){if(s===null||typeof s!="object")return null;var v=b&&s[b]||s[l];return typeof v=="function"?v:null}var S=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(s){{for(var v=arguments.length,R=new Array(v>1?v-1:0),I=1;I<v;I++)R[I-1]=arguments[I];k("error",s,R)}}function k(s,v,R){{var I=S.ReactDebugCurrentFrame,J=I.getStackAddendum();J!==""&&(v+="%s",R=R.concat([J]));var ne=R.map(function(U){return String(U)});ne.unshift("Warning: "+v),Function.prototype.apply.call(console[s],console,ne)}}var P=!1,E=!1,K=!1,ae=!1,re=!1,z;z=Symbol.for("react.module.reference");function a(s){return!!(typeof s=="string"||typeof s=="function"||s===n||s===i||re||s===o||s===d||s===m||ae||s===y||P||E||K||typeof s=="object"&&s!==null&&(s.$$typeof===h||s.$$typeof===p||s.$$typeof===c||s.$$typeof===u||s.$$typeof===f||s.$$typeof===z||s.getModuleId!==void 0))}function _(s,v,R){var I=s.displayName;if(I)return I;var J=v.displayName||v.name||"";return J!==""?R+"("+J+")":R}function q(s){return s.displayName||"Context"}function D(s){if(s==null)return null;if(typeof s.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case o:return"StrictMode";case d:return"Suspense";case m:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case u:var v=s;return q(v)+".Consumer";case c:var R=s;return q(R._context)+".Provider";case f:return _(s,s.render,"ForwardRef");case p:var I=s.displayName||null;return I!==null?I:D(s.type)||"Memo";case h:{var J=s,ne=J._payload,U=J._init;try{return D(U(ne))}catch{return null}}}return null}var fe=Object.assign,ce=0,he,ve,De,ze,C,A,F;function B(){}B.__reactDisabledLog=!0;function N(){{if(ce===0){he=console.log,ve=console.info,De=console.warn,ze=console.error,C=console.group,A=console.groupCollapsed,F=console.groupEnd;var s={configurable:!0,enumerable:!0,value:B,writable:!0};Object.defineProperties(console,{info:s,log:s,warn:s,error:s,group:s,groupCollapsed:s,groupEnd:s})}ce++}}function Y(){{if(ce--,ce===0){var s={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:fe({},s,{value:he}),info:fe({},s,{value:ve}),warn:fe({},s,{value:De}),error:fe({},s,{value:ze}),group:fe({},s,{value:C}),groupCollapsed:fe({},s,{value:A}),groupEnd:fe({},s,{value:F})})}ce<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var j=S.ReactCurrentDispatcher,M;function L(s,v,R){{if(M===void 0)try{throw Error()}catch(J){var I=J.stack.trim().match(/\n( *(at )?)/);M=I&&I[1]||""}return`
|
|
2
|
+
`+M+s}}var G=!1,V;{var ge=typeof WeakMap=="function"?WeakMap:Map;V=new ge}function O(s,v){if(!s||G)return"";{var R=V.get(s);if(R!==void 0)return R}var I;G=!0;var J=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ne;ne=j.current,j.current=null,N();try{if(v){var U=function(){throw Error()};if(Object.defineProperty(U.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(U,[])}catch(be){I=be}Reflect.construct(s,[],U)}else{try{U.call()}catch(be){I=be}s.call(U.prototype)}}else{try{throw Error()}catch(be){I=be}s()}}catch(be){if(be&&I&&typeof be.stack=="string"){for(var W=be.stack.split(`
|
|
3
3
|
`),ye=I.stack.split(`
|
|
4
4
|
`),de=W.length-1,me=ye.length-1;de>=1&&me>=0&&W[de]!==ye[me];)me--;for(;de>=1&&me>=0;de--,me--)if(W[de]!==ye[me]){if(de!==1||me!==1)do if(de--,me--,me<0||W[de]!==ye[me]){var xe=`
|
|
5
|
-
`+W[de].replace(" at new "," at ");return s.displayName&&xe.includes("<anonymous>")&&(xe=xe.replace("<anonymous>",s.displayName)),typeof s=="function"&&V.set(s,xe),xe}while(de>=1&&me>=0);break}}}finally{
|
|
5
|
+
`+W[de].replace(" at new "," at ");return s.displayName&&xe.includes("<anonymous>")&&(xe=xe.replace("<anonymous>",s.displayName)),typeof s=="function"&&V.set(s,xe),xe}while(de>=1&&me>=0);break}}}finally{G=!1,j.current=ne,Y(),Error.prepareStackTrace=J}var qe=s?s.displayName||s.name:"",Be=qe?L(qe):"";return typeof s=="function"&&V.set(s,Be),Be}function Ce(s,v,R){return O(s,!1)}function Ye(s){var v=s.prototype;return!!(v&&v.isReactComponent)}function Me(s,v,R){if(s==null)return"";if(typeof s=="function")return O(s,Ye(s));if(typeof s=="string")return L(s);switch(s){case d:return L("Suspense");case m:return L("SuspenseList")}if(typeof s=="object")switch(s.$$typeof){case f:return Ce(s.render);case p:return Me(s.type,v,R);case h:{var I=s,J=I._payload,ne=I._init;try{return Me(ne(J),v,R)}catch{}}}return""}var et=Object.prototype.hasOwnProperty,dr={},pr=S.ReactDebugCurrentFrame;function pt(s){if(s){var v=s._owner,R=Me(s.type,s._source,v?v.type:null);pr.setExtraStackFrame(R)}else pr.setExtraStackFrame(null)}function Mn(s,v,R,I,J){{var ne=Function.call.bind(et);for(var U in s)if(ne(s,U)){var W=void 0;try{if(typeof s[U]!="function"){var ye=Error((I||"React class")+": "+R+" type `"+U+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[U]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ye.name="Invariant Violation",ye}W=s[U](v,U,I,R,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(de){W=de}W&&!(W instanceof Error)&&(pt(J),w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",I||"React class",R,U,typeof W),pt(null)),W instanceof Error&&!(W.message in dr)&&(dr[W.message]=!0,pt(J),w("Failed %s type: %s",R,W.message),pt(null))}}}var Bn=Array.isArray;function Dt(s){return Bn(s)}function Fn(s){{var v=typeof Symbol=="function"&&Symbol.toStringTag,R=v&&s[Symbol.toStringTag]||s.constructor.name||"Object";return R}}function Ln(s){try{return mr(s),!1}catch{return!0}}function mr(s){return""+s}function hr(s){if(Ln(s))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Fn(s)),mr(s)}var gr=S.ReactCurrentOwner,Vn={key:!0,ref:!0,__self:!0,__source:!0},yr,br;function Wn(s){if(et.call(s,"ref")){var v=Object.getOwnPropertyDescriptor(s,"ref").get;if(v&&v.isReactWarning)return!1}return s.ref!==void 0}function zn(s){if(et.call(s,"key")){var v=Object.getOwnPropertyDescriptor(s,"key").get;if(v&&v.isReactWarning)return!1}return s.key!==void 0}function Yn(s,v){typeof s.ref=="string"&&gr.current}function Un(s,v){{var R=function(){yr||(yr=!0,w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",v))};R.isReactWarning=!0,Object.defineProperty(s,"key",{get:R,configurable:!0})}}function qn(s,v){{var R=function(){br||(br=!0,w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",v))};R.isReactWarning=!0,Object.defineProperty(s,"ref",{get:R,configurable:!0})}}var Gn=function(s,v,R,I,J,ne,U){var W={$$typeof:t,type:s,key:v,ref:R,props:U,_owner:ne};return W._store={},Object.defineProperty(W._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(W,"_self",{configurable:!1,enumerable:!1,writable:!1,value:I}),Object.defineProperty(W,"_source",{configurable:!1,enumerable:!1,writable:!1,value:J}),Object.freeze&&(Object.freeze(W.props),Object.freeze(W)),W};function Kn(s,v,R,I,J){{var ne,U={},W=null,ye=null;R!==void 0&&(hr(R),W=""+R),zn(v)&&(hr(v.key),W=""+v.key),Wn(v)&&(ye=v.ref,Yn(v,J));for(ne in v)et.call(v,ne)&&!Vn.hasOwnProperty(ne)&&(U[ne]=v[ne]);if(s&&s.defaultProps){var de=s.defaultProps;for(ne in de)U[ne]===void 0&&(U[ne]=de[ne])}if(W||ye){var me=typeof s=="function"?s.displayName||s.name||"Unknown":s;W&&Un(U,me),ye&&qn(U,me)}return Gn(s,W,ye,J,I,gr.current,U)}}var Mt=S.ReactCurrentOwner,vr=S.ReactDebugCurrentFrame;function Ue(s){if(s){var v=s._owner,R=Me(s.type,s._source,v?v.type:null);vr.setExtraStackFrame(R)}else vr.setExtraStackFrame(null)}var Bt;Bt=!1;function Ft(s){return typeof s=="object"&&s!==null&&s.$$typeof===t}function Sr(){{if(Mt.current){var s=D(Mt.current.type);if(s)return`
|
|
6
6
|
|
|
7
|
-
Check the render method of \``+s+"`."}return""}}function
|
|
7
|
+
Check the render method of \``+s+"`."}return""}}function Hn(s){return""}var Er={};function Jn(s){{var v=Sr();if(!v){var R=typeof s=="string"?s:s.displayName||s.name;R&&(v=`
|
|
8
8
|
|
|
9
|
-
Check the top-level render call using <`+R+">.")}return v}}function
|
|
9
|
+
Check the top-level render call using <`+R+">.")}return v}}function Cr(s,v){{if(!s._store||s._store.validated||s.key!=null)return;s._store.validated=!0;var R=Jn(v);if(Er[R])return;Er[R]=!0;var I="";s&&s._owner&&s._owner!==Mt.current&&(I=" It was passed a child from "+D(s._owner.type)+"."),Ue(s),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',R,I),Ue(null)}}function xr(s,v){{if(typeof s!="object")return;if(Dt(s))for(var R=0;R<s.length;R++){var I=s[R];Ft(I)&&Cr(I,v)}else if(Ft(s))s._store&&(s._store.validated=!0);else if(s){var J=T(s);if(typeof J=="function"&&J!==s.entries)for(var ne=J.call(s),U;!(U=ne.next()).done;)Ft(U.value)&&Cr(U.value,v)}}}function Xn(s){{var v=s.type;if(v==null||typeof v=="string")return;var R;if(typeof v=="function")R=v.propTypes;else if(typeof v=="object"&&(v.$$typeof===f||v.$$typeof===p))R=v.propTypes;else return;if(R){var I=D(v);Mn(R,s.props,"prop",I,s)}else if(v.PropTypes!==void 0&&!Bt){Bt=!0;var J=D(v);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",J||"Unknown")}typeof v.getDefaultProps=="function"&&!v.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Qn(s){{for(var v=Object.keys(s.props),R=0;R<v.length;R++){var I=v[R];if(I!=="children"&&I!=="key"){Ue(s),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",I),Ue(null);break}}s.ref!==null&&(Ue(s),w("Invalid attribute `ref` supplied to `React.Fragment`."),Ue(null))}}var Tr={};function wr(s,v,R,I,J,ne){{var U=a(s);if(!U){var W="";(s===void 0||typeof s=="object"&&s!==null&&Object.keys(s).length===0)&&(W+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ye=Hn();ye?W+=ye:W+=Sr();var de;s===null?de="null":Dt(s)?de="array":s!==void 0&&s.$$typeof===t?(de="<"+(D(s.type)||"Unknown")+" />",W=" Did you accidentally export a JSX literal instead of a component?"):de=typeof s,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",de,W)}var me=Kn(s,v,R,J,ne);if(me==null)return me;if(U){var xe=v.children;if(xe!==void 0)if(I)if(Dt(xe)){for(var qe=0;qe<xe.length;qe++)xr(xe[qe],s);Object.freeze&&Object.freeze(xe)}else w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else xr(xe,s)}if(et.call(v,"key")){var Be=D(s),be=Object.keys(v).filter(function(oo){return oo!=="key"}),Lt=be.length>0?"{key: someKey, "+be.join(": ..., ")+": ...}":"{key: someKey}";if(!Tr[Be+Lt]){var no=be.length>0?"{"+be.join(": ..., ")+": ...}":"{}";w(`A props object containing a "key" prop is being spread into JSX:
|
|
10
10
|
let props = %s;
|
|
11
11
|
<%s {...props} />
|
|
12
12
|
React keys must be passed directly to JSX without using spread:
|
|
13
13
|
let props = %s;
|
|
14
|
-
<%s key={someKey} {...props} />`,Ft,Be,to,Be),xr[Be+Ft]=!0}}return s===n?Jn(me):Hn(me),me}}function Xn(s,v,R){return Tr(s,v,R,!0)}function Qn(s,v,R){return Tr(s,v,R,!1)}var Zn=Qn,eo=Xn;rt.Fragment=n,rt.jsx=Zn,rt.jsxs=eo})()),rt}var _r;function co(){return _r||(_r=1,process.env.NODE_ENV==="production"?pt.exports=ao():pt.exports=so()),pt.exports}var x=co();function ln(e){const{client:t,tenantId:r,subscriberId:n,filters:o,pollInterval:i,autoFetch:c=!0}=e,[u,f]=Z.useState([]),[d,m]=Z.useState(c),[p,h]=Z.useState(null),y=Z.useCallback(async()=>{try{m(!0),h(null);const S={tenantId:r,subscriberId:n,limit:e?.maxNotifications,...o},w=await t.notifications.list(S);f(w.items||[])}catch(S){h(S instanceof Error?S:new Error("Failed to fetch notifications"))}finally{m(!1)}},[t,r,n,o,e?.maxNotifications]);Z.useEffect(()=>{c&&y()},[c]),Z.useEffect(()=>{if(i&&i>0){const S=setInterval(()=>{y()},i);return()=>clearInterval(S)}},[i,y]);const b=u.filter(S=>S.read!==!0).length,l=Z.useCallback(async S=>{try{await t.notifications.markAsRead(S,n),f(w=>w.map(A=>A.notificationId===S?{...A,read:!0}:A))}catch(w){console.error("Failed to mark notification as read",w)}},[t,n]),T=Z.useCallback(async S=>{try{await t.notifications.delete(S,n),f(w=>w.filter(A=>A.notificationId!==S))}catch(w){console.error("Failed to delete notification",w)}},[t,n]);return{notifications:u,loading:d,error:p,unreadCount:b,refresh:y,markAsRead:l,deleteNotification:T}}const lo="edusight:notification-widget:context";function uo(e){try{if(typeof window>"u"||!window.localStorage)return;window.localStorage.setItem(lo,JSON.stringify(e))}catch{}}class fo{constructor(t){this.listeners=new Map;const r={wsUrl:t.client.getWebSocketUrl(),tenantId:t.tenantId,subscriberId:t.subscriberId,environmentId:t.environmentId,namespace:t.namespace,autoAck:t.autoAck,transports:t.transports,reconnectionDelay:t.reconnectionDelay,reconnectionDelayMax:t.reconnectionDelayMax};this.config=t,this.context={tenantId:t.tenantId,subscriberId:t.subscriberId,environmentId:t.environmentId},this.socketClient=new Fe.NotificationSocketClient(r),this.socketClient.on("connect",()=>{uo({environmentId:t.environmentId,subscriberId:t.subscriberId,tenantId:t.tenantId}),this.emit("connect")}),this.socketClient.on("disconnect",n=>{this.emit("disconnect",n)}),this.socketClient.on("notification",n=>{this.emit("notification",this.normalizeNotification(n)),this.config.autoAck===!1&&this.ackNotification(n.notificationId)}),this.socketClient.on("ack",n=>{this.emit("ack",n)}),this.socketClient.on("error",n=>{this.emit("error",n)})}connect(){this.socketClient.connect()}disconnect(){this.socketClient.disconnect()}ackNotification(t){try{this.socketClient.ack(t)}catch(r){this.emit("error",r instanceof Error?r:new Error(String(r)))}}isConnected(){return this.socketClient.isConnected()}on(t,r){this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(r)}off(t,r){this.listeners.get(t)?.delete(r)}emit(t,...r){const n=this.listeners.get(t);n&&n.forEach(o=>{try{o(...r)}catch(i){console.warn(`Error in ${t} handler:`,i)}})}normalizeNotification(t){const r=new Date().toISOString(),n=t.channel||Fe.Channel.IN_APP,o=t.renderedContent||{inApp:{title:t.title,message:t.message,action:t.action,icon:t.icon}},i=t.category??Fe.NotificationCategory.REAL_TIME;return{notificationId:t.notificationId,tenantId:this.context.tenantId,subscriberId:this.context.subscriberId,templateId:t.templateId??"",type:t.type||Fe.NotificationType.CUSTOM,category:i,channels:[n],payload:t.data||{},renderedContent:o,status:Fe.NotificationStatus.PENDING,priority:Fe.Priority.MEDIUM,scheduledFor:void 0,sentAt:void 0,retryCount:void 0,batchId:t.batchId,metadata:t.data,createdAt:t.createdAt??r,updatedAt:r,feedId:t.feedId}}}function un(e){const{client:t,tenantId:r,subscriberId:n,environmentId:o,enabled:i=!0,autoAck:c=!1}=e,[u,f]=Z.useState(!1),[d,m]=Z.useState(null),p=Z.useRef(null);Z.useEffect(()=>{if(!i)return;const S=new fo({client:t,tenantId:r,subscriberId:n,environmentId:o,autoAck:c});return S.on("connect",()=>{f(!0),m(null)}),S.on("disconnect",()=>{f(!1)}),S.on("error",w=>{m(w)}),p.current=S,S.connect(),()=>{S.disconnect(),p.current=null,f(!1)}},[t,r,n,o,i,c]);const h=Z.useCallback(()=>{p.current?.connect()},[]),y=Z.useCallback(()=>{p.current?.disconnect()},[]),b=Z.useCallback(S=>{p.current?.ackNotification(S)},[]),l=Z.useCallback(S=>p.current?(p.current.on("notification",S),()=>{p.current?.off("notification",S)}):()=>{},[]),T=Z.useCallback(S=>p.current?(p.current.on("ack",S),()=>{p.current?.off("ack",S)}):()=>{},[]);return{connected:u,connect:h,disconnect:y,onNotification:l,onAck:T,ackNotification:b,error:d}}function fn(e){const{client:t,tenantId:r,subscriberId:n,environmentId:o,pollInterval:i,autoFetch:c,autoAck:u=!1}=e,f={client:t,tenantId:r,subscriberId:n,pollInterval:i,autoFetch:c},d={client:t,tenantId:r,subscriberId:n,environmentId:o,enabled:!0,autoAck:u},m=ln(f),p=un(d),[h,y]=Z.useState(m.notifications);return Z.useEffect(()=>{y(m.notifications)},[m.notifications]),Z.useEffect(()=>{const b=p.onNotification(T=>{y(S=>S.some(w=>w.notificationId===T.notificationId)?S:[T,...S]),p.ackNotification(T.notificationId)}),l=p.onAck(T=>{y(S=>S.map(w=>w.notificationId===T.notificationId?{...w,status:Fe.NotificationStatus.DELIVERED}:w))});return()=>{b(),l()}},[p]),{notifications:h,loading:m.loading,error:m.error,unreadCount:m.unreadCount,connected:p.connected,refresh:m.refresh,markAsRead:m.markAsRead,deleteNotification:m.deleteNotification}}var mt={exports:{}},ee={};var Rr;function po(){if(Rr)return ee;Rr=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),y=Symbol.for("react.client.reference");function b(l){if(typeof l=="object"&&l!==null){var T=l.$$typeof;switch(T){case e:switch(l=l.type,l){case r:case o:case n:case f:case d:case h:return l;default:switch(l=l&&l.$$typeof,l){case c:case u:case p:case m:return l;case i:return l;default:return T}}case t:return T}}}return ee.ContextConsumer=i,ee.ContextProvider=c,ee.Element=e,ee.ForwardRef=u,ee.Fragment=r,ee.Lazy=p,ee.Memo=m,ee.Portal=t,ee.Profiler=o,ee.StrictMode=n,ee.Suspense=f,ee.SuspenseList=d,ee.isContextConsumer=function(l){return b(l)===i},ee.isContextProvider=function(l){return b(l)===c},ee.isElement=function(l){return typeof l=="object"&&l!==null&&l.$$typeof===e},ee.isForwardRef=function(l){return b(l)===u},ee.isFragment=function(l){return b(l)===r},ee.isLazy=function(l){return b(l)===p},ee.isMemo=function(l){return b(l)===m},ee.isPortal=function(l){return b(l)===t},ee.isProfiler=function(l){return b(l)===o},ee.isStrictMode=function(l){return b(l)===n},ee.isSuspense=function(l){return b(l)===f},ee.isSuspenseList=function(l){return b(l)===d},ee.isValidElementType=function(l){return typeof l=="string"||typeof l=="function"||l===r||l===o||l===n||l===f||l===d||typeof l=="object"&&l!==null&&(l.$$typeof===p||l.$$typeof===m||l.$$typeof===c||l.$$typeof===i||l.$$typeof===u||l.$$typeof===y||l.getModuleId!==void 0)},ee.typeOf=b,ee}var te={};var Ar;function mo(){return Ar||(Ar=1,process.env.NODE_ENV!=="production"&&(function(){function e(l){if(typeof l=="object"&&l!==null){var T=l.$$typeof;switch(T){case t:switch(l=l.type,l){case n:case i:case o:case d:case m:case y:return l;default:switch(l=l&&l.$$typeof,l){case u:case f:case h:case p:return l;case c:return l;default:return T}}case r:return T}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),y=Symbol.for("react.view_transition"),b=Symbol.for("react.client.reference");te.ContextConsumer=c,te.ContextProvider=u,te.Element=t,te.ForwardRef=f,te.Fragment=n,te.Lazy=h,te.Memo=p,te.Portal=r,te.Profiler=i,te.StrictMode=o,te.Suspense=d,te.SuspenseList=m,te.isContextConsumer=function(l){return e(l)===c},te.isContextProvider=function(l){return e(l)===u},te.isElement=function(l){return typeof l=="object"&&l!==null&&l.$$typeof===t},te.isForwardRef=function(l){return e(l)===f},te.isFragment=function(l){return e(l)===n},te.isLazy=function(l){return e(l)===h},te.isMemo=function(l){return e(l)===p},te.isPortal=function(l){return e(l)===r},te.isProfiler=function(l){return e(l)===i},te.isStrictMode=function(l){return e(l)===o},te.isSuspense=function(l){return e(l)===d},te.isSuspenseList=function(l){return e(l)===m},te.isValidElementType=function(l){return typeof l=="string"||typeof l=="function"||l===n||l===i||l===o||l===d||l===m||typeof l=="object"&&l!==null&&(l.$$typeof===h||l.$$typeof===p||l.$$typeof===u||l.$$typeof===c||l.$$typeof===f||l.$$typeof===b||l.getModuleId!==void 0)},te.typeOf=e})()),te}var kr;function ho(){return kr||(kr=1,process.env.NODE_ENV==="production"?mt.exports=po():mt.exports=mo()),mt.exports}var St=ho();function Ae(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function dn(e){if(Pe.isValidElement(e)||St.isValidElementType(e)||!Ae(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=dn(e[r])}),t}function Ee(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return Ae(e)&&Ae(t)&&Object.keys(t).forEach(o=>{Pe.isValidElement(t[o])||St.isValidElementType(t[o])?n[o]=t[o]:Ae(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&Ae(e[o])?n[o]=Ee(e[o],t[o],r):r.clone?n[o]=Ae(t[o])?dn(t[o]):t[o]:n[o]=t[o]}),n}var ht={exports:{}},gt={exports:{}},X={};var $r;function go(){if($r)return X;$r=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,l=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function A(E){if(typeof E=="object"&&E!==null){var K=E.$$typeof;switch(K){case t:switch(E=E.type,E){case f:case d:case n:case i:case o:case p:return E;default:switch(E=E&&E.$$typeof,E){case u:case m:case b:case y:case c:return E;default:return K}}case r:return K}}}function $(E){return A(E)===d}return X.AsyncMode=f,X.ConcurrentMode=d,X.ContextConsumer=u,X.ContextProvider=c,X.Element=t,X.ForwardRef=m,X.Fragment=n,X.Lazy=b,X.Memo=y,X.Portal=r,X.Profiler=i,X.StrictMode=o,X.Suspense=p,X.isAsyncMode=function(E){return $(E)||A(E)===f},X.isConcurrentMode=$,X.isContextConsumer=function(E){return A(E)===u},X.isContextProvider=function(E){return A(E)===c},X.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},X.isForwardRef=function(E){return A(E)===m},X.isFragment=function(E){return A(E)===n},X.isLazy=function(E){return A(E)===b},X.isMemo=function(E){return A(E)===y},X.isPortal=function(E){return A(E)===r},X.isProfiler=function(E){return A(E)===i},X.isStrictMode=function(E){return A(E)===o},X.isSuspense=function(E){return A(E)===p},X.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===n||E===d||E===i||E===o||E===p||E===h||typeof E=="object"&&E!==null&&(E.$$typeof===b||E.$$typeof===y||E.$$typeof===c||E.$$typeof===u||E.$$typeof===m||E.$$typeof===T||E.$$typeof===S||E.$$typeof===w||E.$$typeof===l)},X.typeOf=A,X}var Q={};var Pr;function yo(){return Pr||(Pr=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,l=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function A(O){return typeof O=="string"||typeof O=="function"||O===n||O===d||O===i||O===o||O===p||O===h||typeof O=="object"&&O!==null&&(O.$$typeof===b||O.$$typeof===y||O.$$typeof===c||O.$$typeof===u||O.$$typeof===m||O.$$typeof===T||O.$$typeof===S||O.$$typeof===w||O.$$typeof===l)}function $(O){if(typeof O=="object"&&O!==null){var Ce=O.$$typeof;switch(Ce){case t:var Ye=O.type;switch(Ye){case f:case d:case n:case i:case o:case p:return Ye;default:var Me=Ye&&Ye.$$typeof;switch(Me){case u:case m:case b:case y:case c:return Me;default:return Ce}}case r:return Ce}}}var E=f,K=d,ae=u,re=c,z=t,a=m,_=n,G=b,D=y,fe=r,ce=i,he=o,ve=p,De=!1;function ze(O){return De||(De=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),C(O)||$(O)===f}function C(O){return $(O)===d}function k(O){return $(O)===u}function F(O){return $(O)===c}function B(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function N(O){return $(O)===m}function Y(O){return $(O)===n}function j(O){return $(O)===b}function M(O){return $(O)===y}function L(O){return $(O)===r}function q(O){return $(O)===i}function V(O){return $(O)===o}function ge(O){return $(O)===p}Q.AsyncMode=E,Q.ConcurrentMode=K,Q.ContextConsumer=ae,Q.ContextProvider=re,Q.Element=z,Q.ForwardRef=a,Q.Fragment=_,Q.Lazy=G,Q.Memo=D,Q.Portal=fe,Q.Profiler=ce,Q.StrictMode=he,Q.Suspense=ve,Q.isAsyncMode=ze,Q.isConcurrentMode=C,Q.isContextConsumer=k,Q.isContextProvider=F,Q.isElement=B,Q.isForwardRef=N,Q.isFragment=Y,Q.isLazy=j,Q.isMemo=M,Q.isPortal=L,Q.isProfiler=q,Q.isStrictMode=V,Q.isSuspense=ge,Q.isValidElementType=A,Q.typeOf=$})()),Q}var Ir;function pn(){return Ir||(Ir=1,process.env.NODE_ENV==="production"?gt.exports=go():gt.exports=yo()),gt.exports}var Lt,Nr;function bo(){if(Nr)return Lt;Nr=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var c={},u=0;u<10;u++)c["_"+String.fromCharCode(u)]=u;var f=Object.getOwnPropertyNames(c).map(function(m){return c[m]});if(f.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(m){d[m]=m}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Lt=o()?Object.assign:function(i,c){for(var u,f=n(i),d,m=1;m<arguments.length;m++){u=Object(arguments[m]);for(var p in u)t.call(u,p)&&(f[p]=u[p]);if(e){d=e(u);for(var h=0;h<d.length;h++)r.call(u,d[h])&&(f[d[h]]=u[d[h]])}}return f},Lt}var Vt,jr;function tr(){if(jr)return Vt;jr=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Vt=e,Vt}var Wt,Dr;function mn(){return Dr||(Dr=1,Wt=Function.call.bind(Object.prototype.hasOwnProperty)),Wt}var zt,Mr;function vo(){if(Mr)return zt;Mr=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=tr(),r={},n=mn();e=function(i){var c="Warning: "+i;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}}}function o(i,c,u,f,d){if(process.env.NODE_ENV!=="production"){for(var m in i)if(n(i,m)){var p;try{if(typeof i[m]!="function"){var h=Error((f||"React class")+": "+u+" type `"+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[m]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}p=i[m](c,m,f,u,null,t)}catch(b){p=b}if(p&&!(p instanceof Error)&&e((f||"React class")+": type specification of "+u+" `"+m+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in r)){r[p.message]=!0;var y=d?d():"";e("Failed "+u+" type: "+p.message+(y??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},zt=o,zt}var Yt,Br;function So(){if(Br)return Yt;Br=1;var e=pn(),t=bo(),r=tr(),n=mn(),o=vo(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(u){var f="Warning: "+u;typeof console<"u"&&console.error(f);try{throw new Error(f)}catch{}});function c(){return null}return Yt=function(u,f){var d=typeof Symbol=="function"&&Symbol.iterator,m="@@iterator";function p(C){var k=C&&(d&&C[d]||C[m]);if(typeof k=="function")return k}var h="<<anonymous>>",y={array:S("array"),bigint:S("bigint"),bool:S("boolean"),func:S("function"),number:S("number"),object:S("object"),string:S("string"),symbol:S("symbol"),any:w(),arrayOf:A,element:$(),elementType:E(),instanceOf:K,node:a(),objectOf:re,oneOf:ae,oneOfType:z,shape:G,exact:D};function b(C,k){return C===k?C!==0||1/C===1/k:C!==C&&k!==k}function l(C,k){this.message=C,this.data=k&&typeof k=="object"?k:{},this.stack=""}l.prototype=Error.prototype;function T(C){if(process.env.NODE_ENV!=="production")var k={},F=0;function B(Y,j,M,L,q,V,ge){if(L=L||h,V=V||M,ge!==r){if(f){var O=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw O.name="Invariant Violation",O}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ce=L+":"+M;!k[Ce]&&F<3&&(i("You are manually calling a React.PropTypes validation function for the `"+V+"` prop on `"+L+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),k[Ce]=!0,F++)}}return j[M]==null?Y?j[M]===null?new l("The "+q+" `"+V+"` is marked as required "+("in `"+L+"`, but its value is `null`.")):new l("The "+q+" `"+V+"` is marked as required in "+("`"+L+"`, but its value is `undefined`.")):null:C(j,M,L,q,V)}var N=B.bind(null,!1);return N.isRequired=B.bind(null,!0),N}function S(C){function k(F,B,N,Y,j,M){var L=F[B],q=he(L);if(q!==C){var V=ve(L);return new l("Invalid "+Y+" `"+j+"` of type "+("`"+V+"` supplied to `"+N+"`, expected ")+("`"+C+"`."),{expectedType:C})}return null}return T(k)}function w(){return T(c)}function A(C){function k(F,B,N,Y,j){if(typeof C!="function")return new l("Property `"+j+"` of component `"+N+"` has invalid PropType notation inside arrayOf.");var M=F[B];if(!Array.isArray(M)){var L=he(M);return new l("Invalid "+Y+" `"+j+"` of type "+("`"+L+"` supplied to `"+N+"`, expected an array."))}for(var q=0;q<M.length;q++){var V=C(M,q,N,Y,j+"["+q+"]",r);if(V instanceof Error)return V}return null}return T(k)}function $(){function C(k,F,B,N,Y){var j=k[F];if(!u(j)){var M=he(j);return new l("Invalid "+N+" `"+Y+"` of type "+("`"+M+"` supplied to `"+B+"`, expected a single ReactElement."))}return null}return T(C)}function E(){function C(k,F,B,N,Y){var j=k[F];if(!e.isValidElementType(j)){var M=he(j);return new l("Invalid "+N+" `"+Y+"` of type "+("`"+M+"` supplied to `"+B+"`, expected a single ReactElement type."))}return null}return T(C)}function K(C){function k(F,B,N,Y,j){if(!(F[B]instanceof C)){var M=C.name||h,L=ze(F[B]);return new l("Invalid "+Y+" `"+j+"` of type "+("`"+L+"` supplied to `"+N+"`, expected ")+("instance of `"+M+"`."))}return null}return T(k)}function ae(C){if(!Array.isArray(C))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),c;function k(F,B,N,Y,j){for(var M=F[B],L=0;L<C.length;L++)if(b(M,C[L]))return null;var q=JSON.stringify(C,function(ge,O){var Ce=ve(O);return Ce==="symbol"?String(O):O});return new l("Invalid "+Y+" `"+j+"` of value `"+String(M)+"` "+("supplied to `"+N+"`, expected one of "+q+"."))}return T(k)}function re(C){function k(F,B,N,Y,j){if(typeof C!="function")return new l("Property `"+j+"` of component `"+N+"` has invalid PropType notation inside objectOf.");var M=F[B],L=he(M);if(L!=="object")return new l("Invalid "+Y+" `"+j+"` of type "+("`"+L+"` supplied to `"+N+"`, expected an object."));for(var q in M)if(n(M,q)){var V=C(M,q,N,Y,j+"."+q,r);if(V instanceof Error)return V}return null}return T(k)}function z(C){if(!Array.isArray(C))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),c;for(var k=0;k<C.length;k++){var F=C[k];if(typeof F!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+De(F)+" at index "+k+"."),c}function B(N,Y,j,M,L){for(var q=[],V=0;V<C.length;V++){var ge=C[V],O=ge(N,Y,j,M,L,r);if(O==null)return null;O.data&&n(O.data,"expectedType")&&q.push(O.data.expectedType)}var Ce=q.length>0?", expected one of type ["+q.join(", ")+"]":"";return new l("Invalid "+M+" `"+L+"` supplied to "+("`"+j+"`"+Ce+"."))}return T(B)}function a(){function C(k,F,B,N,Y){return fe(k[F])?null:new l("Invalid "+N+" `"+Y+"` supplied to "+("`"+B+"`, expected a ReactNode."))}return T(C)}function _(C,k,F,B,N){return new l((C||"React class")+": "+k+" type `"+F+"."+B+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+N+"`.")}function G(C){function k(F,B,N,Y,j){var M=F[B],L=he(M);if(L!=="object")return new l("Invalid "+Y+" `"+j+"` of type `"+L+"` "+("supplied to `"+N+"`, expected `object`."));for(var q in C){var V=C[q];if(typeof V!="function")return _(N,Y,j,q,ve(V));var ge=V(M,q,N,Y,j+"."+q,r);if(ge)return ge}return null}return T(k)}function D(C){function k(F,B,N,Y,j){var M=F[B],L=he(M);if(L!=="object")return new l("Invalid "+Y+" `"+j+"` of type `"+L+"` "+("supplied to `"+N+"`, expected `object`."));var q=t({},F[B],C);for(var V in q){var ge=C[V];if(n(C,V)&&typeof ge!="function")return _(N,Y,j,V,ve(ge));if(!ge)return new l("Invalid "+Y+" `"+j+"` key `"+V+"` supplied to `"+N+"`.\nBad object: "+JSON.stringify(F[B],null," ")+`
|
|
15
|
-
Valid keys: `+JSON.stringify(Object.keys(C),null," "));var O=ge(M,V,N,Y,j+"."+V,r);if(O)return O}return null}return T(
|
|
16
|
-
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Ie(18,`(${t})`));return null}const[,n,o]=r,i=Number.isNaN(+n)?n||0:+n;return e.containerQueries(o).up(i)}function
|
|
14
|
+
<%s key={someKey} {...props} />`,Lt,Be,no,Be),Tr[Be+Lt]=!0}}return s===n?Qn(me):Xn(me),me}}function Zn(s,v,R){return wr(s,v,R,!0)}function eo(s,v,R){return wr(s,v,R,!1)}var to=eo,ro=Zn;nt.Fragment=n,nt.jsx=to,nt.jsxs=ro})()),nt}var kr;function uo(){return kr||(kr=1,process.env.NODE_ENV==="production"?mt.exports=co():mt.exports=lo()),mt.exports}var x=uo();function fn(e){const{client:t,tenantId:r,subscriberId:n,filters:o,pollInterval:i,autoFetch:c=!0}=e,[u,f]=Z.useState([]),[d,m]=Z.useState(c),[p,h]=Z.useState(null),y=Z.useCallback(async()=>{try{m(!0),h(null);const S={tenantId:r,subscriberId:n,limit:e?.maxNotifications,...o},w=await t.notifications.list(S);f(w.items||[])}catch(S){h(S instanceof Error?S:new Error("Failed to fetch notifications"))}finally{m(!1)}},[t,r,n,o,e?.maxNotifications]);Z.useEffect(()=>{c&&y()},[c]),Z.useEffect(()=>{if(i&&i>0){const S=setInterval(()=>{y()},i);return()=>clearInterval(S)}},[i,y]);const b=u.filter(S=>S.read!==!0).length,l=Z.useCallback(async S=>{try{await t.notifications.markAsRead(S,n),f(w=>w.map(k=>k.notificationId===S?{...k,read:!0}:k))}catch(w){console.error("Failed to mark notification as read",w)}},[t,n]),T=Z.useCallback(async S=>{try{await t.notifications.delete(S,n),f(w=>w.filter(k=>k.notificationId!==S))}catch(w){console.error("Failed to delete notification",w)}},[t,n]);return{notifications:u,loading:d,error:p,unreadCount:b,refresh:y,markAsRead:l,deleteNotification:T}}const fo="edusight:notification-widget:context";function po(e){try{if(typeof window>"u"||!window.localStorage)return;window.localStorage.setItem(fo,JSON.stringify(e))}catch{}}class mo{constructor(t){this.listeners=new Map;const r={wsUrl:t.client.getWebSocketUrl(),tenantId:t.tenantId,subscriberId:t.subscriberId,environmentId:t.environmentId,namespace:t.namespace,autoAck:t.autoAck,transports:t.transports,reconnectionDelay:t.reconnectionDelay,reconnectionDelayMax:t.reconnectionDelayMax};this.config=t,this.context={tenantId:t.tenantId,subscriberId:t.subscriberId,environmentId:t.environmentId},this.socketClient=new Fe.NotificationSocketClient(r),this.socketClient.on("connect",()=>{po({environmentId:t.environmentId,subscriberId:t.subscriberId,tenantId:t.tenantId}),this.emit("connect")}),this.socketClient.on("disconnect",n=>{this.emit("disconnect",n)}),this.socketClient.on("notification",n=>{this.emit("notification",this.normalizeNotification(n)),this.config.autoAck===!1&&this.ackNotification(n.notificationId)}),this.socketClient.on("ack",n=>{this.emit("ack",n)}),this.socketClient.on("error",n=>{this.emit("error",n)})}connect(){this.socketClient.connect()}disconnect(){this.socketClient.disconnect()}ackNotification(t){try{this.socketClient.ack(t)}catch(r){this.emit("error",r instanceof Error?r:new Error(String(r)))}}isConnected(){return this.socketClient.isConnected()}on(t,r){this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(r)}off(t,r){this.listeners.get(t)?.delete(r)}emit(t,...r){const n=this.listeners.get(t);n&&n.forEach(o=>{try{o(...r)}catch(i){console.warn(`Error in ${t} handler:`,i)}})}normalizeNotification(t){const r=new Date().toISOString(),n=t.channel||Fe.Channel.IN_APP,o=t.renderedContent||{inApp:{title:t.title,message:t.message,action:t.action,icon:t.icon}},i=t.category??Fe.NotificationCategory.REAL_TIME;return{notificationId:t.notificationId,tenantId:this.context.tenantId,subscriberId:this.context.subscriberId,templateId:t.templateId??"",type:t.type||Fe.NotificationType.CUSTOM,category:i,channels:[n],payload:t.data||{},renderedContent:o,status:Fe.NotificationStatus.PENDING,priority:Fe.Priority.MEDIUM,scheduledFor:void 0,sentAt:void 0,retryCount:void 0,batchId:t.batchId,metadata:t.data,createdAt:t.createdAt??r,updatedAt:r,feedId:t.feedId}}}function dn(e){const{client:t,tenantId:r,subscriberId:n,environmentId:o,enabled:i=!0,autoAck:c=!1}=e,[u,f]=Z.useState(!1),[d,m]=Z.useState(null),p=Z.useRef(null);Z.useEffect(()=>{if(!i)return;const S=new mo({client:t,tenantId:r,subscriberId:n,environmentId:o,autoAck:c});return S.on("connect",()=>{f(!0),m(null)}),S.on("disconnect",()=>{f(!1)}),S.on("error",w=>{m(w)}),p.current=S,S.connect(),()=>{S.disconnect(),p.current=null,f(!1)}},[t,r,n,o,i,c]);const h=Z.useCallback(()=>{p.current?.connect()},[]),y=Z.useCallback(()=>{p.current?.disconnect()},[]),b=Z.useCallback(S=>{p.current?.ackNotification(S)},[]),l=Z.useCallback(S=>p.current?(p.current.on("notification",S),()=>{p.current?.off("notification",S)}):()=>{},[]),T=Z.useCallback(S=>p.current?(p.current.on("ack",S),()=>{p.current?.off("ack",S)}):()=>{},[]);return{connected:u,connect:h,disconnect:y,onNotification:l,onAck:T,ackNotification:b,error:d}}function pn(e){const{client:t,tenantId:r,subscriberId:n,environmentId:o,pollInterval:i,autoFetch:c,autoAck:u=!1}=e,f={client:t,tenantId:r,subscriberId:n,pollInterval:i,autoFetch:c},d={client:t,tenantId:r,subscriberId:n,environmentId:o,enabled:!0,autoAck:u},m=fn(f),p=dn(d),[h,y]=Z.useState(m.notifications);return Z.useEffect(()=>{y(m.notifications)},[m.notifications]),Z.useEffect(()=>{const b=p.onNotification(T=>{y(S=>S.some(w=>w.notificationId===T.notificationId)?S:[T,...S]),p.ackNotification(T.notificationId)}),l=p.onAck(T=>{y(S=>S.map(w=>w.notificationId===T.notificationId?{...w,status:Fe.NotificationStatus.DELIVERED}:w))});return()=>{b(),l()}},[p]),{notifications:h,loading:m.loading,error:m.error,unreadCount:m.unreadCount,connected:p.connected,refresh:m.refresh,markAsRead:m.markAsRead,deleteNotification:m.deleteNotification}}var ht={exports:{}},ee={};var Ar;function ho(){if(Ar)return ee;Ar=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),y=Symbol.for("react.client.reference");function b(l){if(typeof l=="object"&&l!==null){var T=l.$$typeof;switch(T){case e:switch(l=l.type,l){case r:case o:case n:case f:case d:case h:return l;default:switch(l=l&&l.$$typeof,l){case c:case u:case p:case m:return l;case i:return l;default:return T}}case t:return T}}}return ee.ContextConsumer=i,ee.ContextProvider=c,ee.Element=e,ee.ForwardRef=u,ee.Fragment=r,ee.Lazy=p,ee.Memo=m,ee.Portal=t,ee.Profiler=o,ee.StrictMode=n,ee.Suspense=f,ee.SuspenseList=d,ee.isContextConsumer=function(l){return b(l)===i},ee.isContextProvider=function(l){return b(l)===c},ee.isElement=function(l){return typeof l=="object"&&l!==null&&l.$$typeof===e},ee.isForwardRef=function(l){return b(l)===u},ee.isFragment=function(l){return b(l)===r},ee.isLazy=function(l){return b(l)===p},ee.isMemo=function(l){return b(l)===m},ee.isPortal=function(l){return b(l)===t},ee.isProfiler=function(l){return b(l)===o},ee.isStrictMode=function(l){return b(l)===n},ee.isSuspense=function(l){return b(l)===f},ee.isSuspenseList=function(l){return b(l)===d},ee.isValidElementType=function(l){return typeof l=="string"||typeof l=="function"||l===r||l===o||l===n||l===f||l===d||typeof l=="object"&&l!==null&&(l.$$typeof===p||l.$$typeof===m||l.$$typeof===c||l.$$typeof===i||l.$$typeof===u||l.$$typeof===y||l.getModuleId!==void 0)},ee.typeOf=b,ee}var te={};var Pr;function go(){return Pr||(Pr=1,process.env.NODE_ENV!=="production"&&(function(){function e(l){if(typeof l=="object"&&l!==null){var T=l.$$typeof;switch(T){case t:switch(l=l.type,l){case n:case i:case o:case d:case m:case y:return l;default:switch(l=l&&l.$$typeof,l){case u:case f:case h:case p:return l;case c:return l;default:return T}}case r:return T}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),y=Symbol.for("react.view_transition"),b=Symbol.for("react.client.reference");te.ContextConsumer=c,te.ContextProvider=u,te.Element=t,te.ForwardRef=f,te.Fragment=n,te.Lazy=h,te.Memo=p,te.Portal=r,te.Profiler=i,te.StrictMode=o,te.Suspense=d,te.SuspenseList=m,te.isContextConsumer=function(l){return e(l)===c},te.isContextProvider=function(l){return e(l)===u},te.isElement=function(l){return typeof l=="object"&&l!==null&&l.$$typeof===t},te.isForwardRef=function(l){return e(l)===f},te.isFragment=function(l){return e(l)===n},te.isLazy=function(l){return e(l)===h},te.isMemo=function(l){return e(l)===p},te.isPortal=function(l){return e(l)===r},te.isProfiler=function(l){return e(l)===i},te.isStrictMode=function(l){return e(l)===o},te.isSuspense=function(l){return e(l)===d},te.isSuspenseList=function(l){return e(l)===m},te.isValidElementType=function(l){return typeof l=="string"||typeof l=="function"||l===n||l===i||l===o||l===d||l===m||typeof l=="object"&&l!==null&&(l.$$typeof===h||l.$$typeof===p||l.$$typeof===u||l.$$typeof===c||l.$$typeof===f||l.$$typeof===b||l.getModuleId!==void 0)},te.typeOf=e})()),te}var $r;function yo(){return $r||($r=1,process.env.NODE_ENV==="production"?ht.exports=ho():ht.exports=go()),ht.exports}var Et=yo();function ke(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function mn(e){if($e.isValidElement(e)||Et.isValidElementType(e)||!ke(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=mn(e[r])}),t}function Ee(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return ke(e)&&ke(t)&&Object.keys(t).forEach(o=>{$e.isValidElement(t[o])||Et.isValidElementType(t[o])?n[o]=t[o]:ke(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&ke(e[o])?n[o]=Ee(e[o],t[o],r):r.clone?n[o]=ke(t[o])?mn(t[o]):t[o]:n[o]=t[o]}),n}var gt={exports:{}},yt={exports:{}},X={};var Ir;function bo(){if(Ir)return X;Ir=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,l=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function k(E){if(typeof E=="object"&&E!==null){var K=E.$$typeof;switch(K){case t:switch(E=E.type,E){case f:case d:case n:case i:case o:case p:return E;default:switch(E=E&&E.$$typeof,E){case u:case m:case b:case y:case c:return E;default:return K}}case r:return K}}}function P(E){return k(E)===d}return X.AsyncMode=f,X.ConcurrentMode=d,X.ContextConsumer=u,X.ContextProvider=c,X.Element=t,X.ForwardRef=m,X.Fragment=n,X.Lazy=b,X.Memo=y,X.Portal=r,X.Profiler=i,X.StrictMode=o,X.Suspense=p,X.isAsyncMode=function(E){return P(E)||k(E)===f},X.isConcurrentMode=P,X.isContextConsumer=function(E){return k(E)===u},X.isContextProvider=function(E){return k(E)===c},X.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===t},X.isForwardRef=function(E){return k(E)===m},X.isFragment=function(E){return k(E)===n},X.isLazy=function(E){return k(E)===b},X.isMemo=function(E){return k(E)===y},X.isPortal=function(E){return k(E)===r},X.isProfiler=function(E){return k(E)===i},X.isStrictMode=function(E){return k(E)===o},X.isSuspense=function(E){return k(E)===p},X.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===n||E===d||E===i||E===o||E===p||E===h||typeof E=="object"&&E!==null&&(E.$$typeof===b||E.$$typeof===y||E.$$typeof===c||E.$$typeof===u||E.$$typeof===m||E.$$typeof===T||E.$$typeof===S||E.$$typeof===w||E.$$typeof===l)},X.typeOf=k,X}var Q={};var Nr;function vo(){return Nr||(Nr=1,process.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,d=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,b=e?Symbol.for("react.lazy"):60116,l=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,S=e?Symbol.for("react.responder"):60118,w=e?Symbol.for("react.scope"):60119;function k(O){return typeof O=="string"||typeof O=="function"||O===n||O===d||O===i||O===o||O===p||O===h||typeof O=="object"&&O!==null&&(O.$$typeof===b||O.$$typeof===y||O.$$typeof===c||O.$$typeof===u||O.$$typeof===m||O.$$typeof===T||O.$$typeof===S||O.$$typeof===w||O.$$typeof===l)}function P(O){if(typeof O=="object"&&O!==null){var Ce=O.$$typeof;switch(Ce){case t:var Ye=O.type;switch(Ye){case f:case d:case n:case i:case o:case p:return Ye;default:var Me=Ye&&Ye.$$typeof;switch(Me){case u:case m:case b:case y:case c:return Me;default:return Ce}}case r:return Ce}}}var E=f,K=d,ae=u,re=c,z=t,a=m,_=n,q=b,D=y,fe=r,ce=i,he=o,ve=p,De=!1;function ze(O){return De||(De=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),C(O)||P(O)===f}function C(O){return P(O)===d}function A(O){return P(O)===u}function F(O){return P(O)===c}function B(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function N(O){return P(O)===m}function Y(O){return P(O)===n}function j(O){return P(O)===b}function M(O){return P(O)===y}function L(O){return P(O)===r}function G(O){return P(O)===i}function V(O){return P(O)===o}function ge(O){return P(O)===p}Q.AsyncMode=E,Q.ConcurrentMode=K,Q.ContextConsumer=ae,Q.ContextProvider=re,Q.Element=z,Q.ForwardRef=a,Q.Fragment=_,Q.Lazy=q,Q.Memo=D,Q.Portal=fe,Q.Profiler=ce,Q.StrictMode=he,Q.Suspense=ve,Q.isAsyncMode=ze,Q.isConcurrentMode=C,Q.isContextConsumer=A,Q.isContextProvider=F,Q.isElement=B,Q.isForwardRef=N,Q.isFragment=Y,Q.isLazy=j,Q.isMemo=M,Q.isPortal=L,Q.isProfiler=G,Q.isStrictMode=V,Q.isSuspense=ge,Q.isValidElementType=k,Q.typeOf=P})()),Q}var jr;function hn(){return jr||(jr=1,process.env.NODE_ENV==="production"?yt.exports=bo():yt.exports=vo()),yt.exports}var Vt,Dr;function So(){if(Dr)return Vt;Dr=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var c={},u=0;u<10;u++)c["_"+String.fromCharCode(u)]=u;var f=Object.getOwnPropertyNames(c).map(function(m){return c[m]});if(f.join("")!=="0123456789")return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(m){d[m]=m}),Object.keys(Object.assign({},d)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Vt=o()?Object.assign:function(i,c){for(var u,f=n(i),d,m=1;m<arguments.length;m++){u=Object(arguments[m]);for(var p in u)t.call(u,p)&&(f[p]=u[p]);if(e){d=e(u);for(var h=0;h<d.length;h++)r.call(u,d[h])&&(f[d[h]]=u[d[h]])}}return f},Vt}var Wt,Mr;function rr(){if(Mr)return Wt;Mr=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Wt=e,Wt}var zt,Br;function gn(){return Br||(Br=1,zt=Function.call.bind(Object.prototype.hasOwnProperty)),zt}var Yt,Fr;function Eo(){if(Fr)return Yt;Fr=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=rr(),r={},n=gn();e=function(i){var c="Warning: "+i;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}}}function o(i,c,u,f,d){if(process.env.NODE_ENV!=="production"){for(var m in i)if(n(i,m)){var p;try{if(typeof i[m]!="function"){var h=Error((f||"React class")+": "+u+" type `"+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[m]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}p=i[m](c,m,f,u,null,t)}catch(b){p=b}if(p&&!(p instanceof Error)&&e((f||"React class")+": type specification of "+u+" `"+m+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof p+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),p instanceof Error&&!(p.message in r)){r[p.message]=!0;var y=d?d():"";e("Failed "+u+" type: "+p.message+(y??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Yt=o,Yt}var Ut,Lr;function Co(){if(Lr)return Ut;Lr=1;var e=hn(),t=So(),r=rr(),n=gn(),o=Eo(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(u){var f="Warning: "+u;typeof console<"u"&&console.error(f);try{throw new Error(f)}catch{}});function c(){return null}return Ut=function(u,f){var d=typeof Symbol=="function"&&Symbol.iterator,m="@@iterator";function p(C){var A=C&&(d&&C[d]||C[m]);if(typeof A=="function")return A}var h="<<anonymous>>",y={array:S("array"),bigint:S("bigint"),bool:S("boolean"),func:S("function"),number:S("number"),object:S("object"),string:S("string"),symbol:S("symbol"),any:w(),arrayOf:k,element:P(),elementType:E(),instanceOf:K,node:a(),objectOf:re,oneOf:ae,oneOfType:z,shape:q,exact:D};function b(C,A){return C===A?C!==0||1/C===1/A:C!==C&&A!==A}function l(C,A){this.message=C,this.data=A&&typeof A=="object"?A:{},this.stack=""}l.prototype=Error.prototype;function T(C){if(process.env.NODE_ENV!=="production")var A={},F=0;function B(Y,j,M,L,G,V,ge){if(L=L||h,V=V||M,ge!==r){if(f){var O=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw O.name="Invariant Violation",O}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ce=L+":"+M;!A[Ce]&&F<3&&(i("You are manually calling a React.PropTypes validation function for the `"+V+"` prop on `"+L+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),A[Ce]=!0,F++)}}return j[M]==null?Y?j[M]===null?new l("The "+G+" `"+V+"` is marked as required "+("in `"+L+"`, but its value is `null`.")):new l("The "+G+" `"+V+"` is marked as required in "+("`"+L+"`, but its value is `undefined`.")):null:C(j,M,L,G,V)}var N=B.bind(null,!1);return N.isRequired=B.bind(null,!0),N}function S(C){function A(F,B,N,Y,j,M){var L=F[B],G=he(L);if(G!==C){var V=ve(L);return new l("Invalid "+Y+" `"+j+"` of type "+("`"+V+"` supplied to `"+N+"`, expected ")+("`"+C+"`."),{expectedType:C})}return null}return T(A)}function w(){return T(c)}function k(C){function A(F,B,N,Y,j){if(typeof C!="function")return new l("Property `"+j+"` of component `"+N+"` has invalid PropType notation inside arrayOf.");var M=F[B];if(!Array.isArray(M)){var L=he(M);return new l("Invalid "+Y+" `"+j+"` of type "+("`"+L+"` supplied to `"+N+"`, expected an array."))}for(var G=0;G<M.length;G++){var V=C(M,G,N,Y,j+"["+G+"]",r);if(V instanceof Error)return V}return null}return T(A)}function P(){function C(A,F,B,N,Y){var j=A[F];if(!u(j)){var M=he(j);return new l("Invalid "+N+" `"+Y+"` of type "+("`"+M+"` supplied to `"+B+"`, expected a single ReactElement."))}return null}return T(C)}function E(){function C(A,F,B,N,Y){var j=A[F];if(!e.isValidElementType(j)){var M=he(j);return new l("Invalid "+N+" `"+Y+"` of type "+("`"+M+"` supplied to `"+B+"`, expected a single ReactElement type."))}return null}return T(C)}function K(C){function A(F,B,N,Y,j){if(!(F[B]instanceof C)){var M=C.name||h,L=ze(F[B]);return new l("Invalid "+Y+" `"+j+"` of type "+("`"+L+"` supplied to `"+N+"`, expected ")+("instance of `"+M+"`."))}return null}return T(A)}function ae(C){if(!Array.isArray(C))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),c;function A(F,B,N,Y,j){for(var M=F[B],L=0;L<C.length;L++)if(b(M,C[L]))return null;var G=JSON.stringify(C,function(ge,O){var Ce=ve(O);return Ce==="symbol"?String(O):O});return new l("Invalid "+Y+" `"+j+"` of value `"+String(M)+"` "+("supplied to `"+N+"`, expected one of "+G+"."))}return T(A)}function re(C){function A(F,B,N,Y,j){if(typeof C!="function")return new l("Property `"+j+"` of component `"+N+"` has invalid PropType notation inside objectOf.");var M=F[B],L=he(M);if(L!=="object")return new l("Invalid "+Y+" `"+j+"` of type "+("`"+L+"` supplied to `"+N+"`, expected an object."));for(var G in M)if(n(M,G)){var V=C(M,G,N,Y,j+"."+G,r);if(V instanceof Error)return V}return null}return T(A)}function z(C){if(!Array.isArray(C))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),c;for(var A=0;A<C.length;A++){var F=C[A];if(typeof F!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+De(F)+" at index "+A+"."),c}function B(N,Y,j,M,L){for(var G=[],V=0;V<C.length;V++){var ge=C[V],O=ge(N,Y,j,M,L,r);if(O==null)return null;O.data&&n(O.data,"expectedType")&&G.push(O.data.expectedType)}var Ce=G.length>0?", expected one of type ["+G.join(", ")+"]":"";return new l("Invalid "+M+" `"+L+"` supplied to "+("`"+j+"`"+Ce+"."))}return T(B)}function a(){function C(A,F,B,N,Y){return fe(A[F])?null:new l("Invalid "+N+" `"+Y+"` supplied to "+("`"+B+"`, expected a ReactNode."))}return T(C)}function _(C,A,F,B,N){return new l((C||"React class")+": "+A+" type `"+F+"."+B+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+N+"`.")}function q(C){function A(F,B,N,Y,j){var M=F[B],L=he(M);if(L!=="object")return new l("Invalid "+Y+" `"+j+"` of type `"+L+"` "+("supplied to `"+N+"`, expected `object`."));for(var G in C){var V=C[G];if(typeof V!="function")return _(N,Y,j,G,ve(V));var ge=V(M,G,N,Y,j+"."+G,r);if(ge)return ge}return null}return T(A)}function D(C){function A(F,B,N,Y,j){var M=F[B],L=he(M);if(L!=="object")return new l("Invalid "+Y+" `"+j+"` of type `"+L+"` "+("supplied to `"+N+"`, expected `object`."));var G=t({},F[B],C);for(var V in G){var ge=C[V];if(n(C,V)&&typeof ge!="function")return _(N,Y,j,V,ve(ge));if(!ge)return new l("Invalid "+Y+" `"+j+"` key `"+V+"` supplied to `"+N+"`.\nBad object: "+JSON.stringify(F[B],null," ")+`
|
|
15
|
+
Valid keys: `+JSON.stringify(Object.keys(C),null," "));var O=ge(M,V,N,Y,j+"."+V,r);if(O)return O}return null}return T(A)}function fe(C){switch(typeof C){case"number":case"string":case"undefined":return!0;case"boolean":return!C;case"object":if(Array.isArray(C))return C.every(fe);if(C===null||u(C))return!0;var A=p(C);if(A){var F=A.call(C),B;if(A!==C.entries){for(;!(B=F.next()).done;)if(!fe(B.value))return!1}else for(;!(B=F.next()).done;){var N=B.value;if(N&&!fe(N[1]))return!1}}else return!1;return!0;default:return!1}}function ce(C,A){return C==="symbol"?!0:A?A["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&A instanceof Symbol:!1}function he(C){var A=typeof C;return Array.isArray(C)?"array":C instanceof RegExp?"object":ce(A,C)?"symbol":A}function ve(C){if(typeof C>"u"||C===null)return""+C;var A=he(C);if(A==="object"){if(C instanceof Date)return"date";if(C instanceof RegExp)return"regexp"}return A}function De(C){var A=ve(C);switch(A){case"array":case"object":return"an "+A;case"boolean":case"date":case"regexp":return"a "+A;default:return A}}function ze(C){return!C.constructor||!C.constructor.name?h:C.constructor.name}return y.checkPropTypes=o,y.resetWarningCache=o.resetWarningCache,y.PropTypes=y,y},Ut}var qt,Vr;function xo(){if(Vr)return qt;Vr=1;var e=rr();function t(){}function r(){}return r.resetWarningCache=t,qt=function(){function n(c,u,f,d,m,p){if(p!==e){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}}n.isRequired=n;function o(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i},qt}var Wr;function To(){if(Wr)return gt.exports;if(Wr=1,process.env.NODE_ENV!=="production"){var e=hn(),t=!0;gt.exports=Co()(e.isElement,t)}else gt.exports=xo()();return gt.exports}var wo=To();const H=so(wo);function Ie(e,...t){const r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${e}; visit ${r} for the full message.`}function yn(e,t=""){return e.displayName||e.name||t}function zr(e,t,r){const n=yn(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function Oo(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return yn(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Et.ForwardRef:return zr(e,e.render,"ForwardRef");case Et.Memo:return zr(e,e.type,"memo");default:return}}}function We(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Ie(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Xt(e,t){const r={...t};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){const o=n;if(o==="components"||o==="slots")r[o]={...e[o],...r[o]};else if(o==="componentsProps"||o==="slotProps"){const i=e[o],c=t[o];if(!c)r[o]=i||{};else if(!i)r[o]=c;else{r[o]={...c};for(const u in i)if(Object.prototype.hasOwnProperty.call(i,u)){const f=u;r[o][f]=Xt(i[f],c[f])}}}else r[o]===void 0&&(r[o]=e[o])}return r}function _o(e,t,r=void 0){const n={};for(const o in e){const i=e[o];let c="",u=!0;for(let f=0;f<i.length;f+=1){const d=i[f];d&&(c+=(u===!0?"":" ")+t(d),u=!1,r&&r[d]&&(c+=" "+r[d]))}n[o]=c}return n}const Yr=e=>e,Ro=()=>{let e=Yr;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Yr}}},ko=Ro(),Ao={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function nr(e,t,r="Mui"){const n=Ao[t];return n?`${r}-${n}`:`${ko.generate(e)}-${t}`}function Po(e,t,r="Mui"){const n={};return t.forEach(o=>{n[o]=nr(e,o,r)}),n}function $o(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function bn(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=bn(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Io(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=bn(e))&&(n&&(n+=" "),n+=t);return n}function st(e,t){return t?Ee(e,t,{clone:!1}):e}const je=process.env.NODE_ENV!=="production"?H.oneOfType([H.number,H.string,H.object,H.array]):{};function Ur(e,t){if(!e.containerQueries)return t;const r=Object.keys(t).filter(n=>n.startsWith("@container")).sort((n,o)=>{const i=/min-width:\s*([0-9.]+)/;return+(n.match(i)?.[1]||0)-+(o.match(i)?.[1]||0)});return r.length?r.reduce((n,o)=>{const i=t[o];return delete n[o],n[o]=i,n},{...t}):t}function No(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function jo(e,t){const r=t.match(/^@([^/]+)?\/?(.+)?$/);if(!r){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
|
|
16
|
+
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Ie(18,`(${t})`));return null}const[,n,o]=r,i=Number.isNaN(+n)?n||0:+n;return e.containerQueries(o).up(i)}function Do(e){const t=(i,c)=>i.replace("@media",c?`@container ${c}`:"@container");function r(i,c){i.up=(...u)=>t(e.breakpoints.up(...u),c),i.down=(...u)=>t(e.breakpoints.down(...u),c),i.between=(...u)=>t(e.breakpoints.between(...u),c),i.only=(...u)=>t(e.breakpoints.only(...u),c),i.not=(...u)=>{const f=t(e.breakpoints.not(...u),c);return f.includes("not all and")?f.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):f}}const n={},o=i=>(r(n,i),n);return r(o),{...e,containerQueries:o}}const wt={xs:0,sm:600,md:900,lg:1200,xl:1536},qr={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${wt[e]}px)`},Mo={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:wt[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function Ae(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const i=n.breakpoints||qr;return t.reduce((c,u,f)=>(c[i.up(i.keys[f])]=r(t[f]),c),{})}if(typeof t=="object"){const i=n.breakpoints||qr;return Object.keys(t).reduce((c,u)=>{if(No(i.keys,u)){const f=jo(n.containerQueries?n:Mo,u);f&&(c[f]=r(t[u],u))}else if(Object.keys(i.values||wt).includes(u)){const f=i.up(u);c[f]=r(t[u],u)}else{const f=u;c[f]=t[f]}return c},{})}return r(t)}function Bo(e={}){return e.keys?.reduce((r,n)=>{const o=e.up(n);return r[o]={},r},{})||{}}function Gr(e,t){return e.reduce((r,n)=>{const o=r[n];return(!o||Object.keys(o).length===0)&&delete r[n],r},t)}function Ot(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(n!=null)return n}return t.split(".").reduce((n,o)=>n&&n[o]!=null?n[o]:null,e)}function Ct(e,t,r,n=r){let o;return typeof e=="function"?o=e(r):Array.isArray(e)?o=e[r]||n:o=Ot(e,r)||n,t&&(o=t(o,n,e)),o}function pe(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:o}=e,i=c=>{if(c[t]==null)return null;const u=c[t],f=c.theme,d=Ot(f,n)||{};return Ae(c,u,p=>{let h=Ct(d,o,p);return p===h&&typeof p=="string"&&(h=Ct(d,o,`${t}${p==="default"?"":We(p)}`,p)),r===!1?h:{[r]:h}})};return i.propTypes=process.env.NODE_ENV!=="production"?{[t]:je}:{},i.filterProps=[t],i}function Fo(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const Lo={m:"margin",p:"padding"},Vo={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Kr={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Wo=Fo(e=>{if(e.length>2)if(Kr[e])e=Kr[e];else return[e];const[t,r]=e.split(""),n=Lo[t],o=Vo[r]||"";return Array.isArray(o)?o.map(i=>n+i):[n+o]}),_t=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Rt=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],zo=[..._t,...Rt];function ut(e,t,r,n){const o=Ot(e,t,!0)??r;return typeof o=="number"||typeof o=="string"?i=>typeof i=="string"?i:(process.env.NODE_ENV!=="production"&&typeof i!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${i}.`),typeof o=="string"?`calc(${i} * ${o})`:o*i):Array.isArray(o)?i=>{if(typeof i=="string")return i;const c=Math.abs(i);process.env.NODE_ENV!=="production"&&(Number.isInteger(c)?c>o.length-1&&console.error([`MUI: The value provided (${c}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${c} > ${o.length-1}, you need to add the missing values.`].join(`
|
|
17
17
|
`)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
|
|
18
18
|
`)));const u=o[c];return i>=0?u:typeof u=="number"?-u:`-${u}`}:typeof o=="function"?o:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join(`
|
|
19
|
-
`)),()=>{})}function nr(e){return lt(e,"spacing",8,"spacing")}function ut(e,t){return typeof t=="string"||t==null?t:e(t)}function Wo(e,t){return r=>e.reduce((n,o)=>(n[o]=ut(t,r),n),{})}function zo(e,t,r,n){if(!t.includes(r))return null;const o=Lo(r),i=Wo(o,n),c=e[r];return ke(e,c,i)}function yn(e,t){const r=nr(e.theme);return Object.keys(e).map(n=>zo(e,t,n,r)).reduce(at,{})}function le(e){return yn(e,Ot)}le.propTypes=process.env.NODE_ENV!=="production"?Ot.reduce((e,t)=>(e[t]=je,e),{}):{};le.filterProps=Ot;function ue(e){return yn(e,_t)}ue.propTypes=process.env.NODE_ENV!=="production"?_t.reduce((e,t)=>(e[t]=je,e),{}):{};ue.filterProps=_t;process.env.NODE_ENV!=="production"&&Vo.reduce((e,t)=>(e[t]=je,e),{});function Rt(...e){const t=e.reduce((n,o)=>(o.filterProps.forEach(i=>{n[i]=o}),n),{}),r=n=>Object.keys(n).reduce((o,i)=>t[i]?at(o,t[i](n)):o,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,o)=>Object.assign(n,o.propTypes),{}):{},r.filterProps=e.reduce((n,o)=>n.concat(o.filterProps),[]),r}function Te(e){return typeof e!="number"?e:`${e}px solid`}function we(e,t){return pe({prop:e,themeKey:"borders",transform:t})}const Yo=we("border",Te),Uo=we("borderTop",Te),Go=we("borderRight",Te),qo=we("borderBottom",Te),Ko=we("borderLeft",Te),Ho=we("borderColor"),Jo=we("borderTopColor"),Xo=we("borderRightColor"),Qo=we("borderBottomColor"),Zo=we("borderLeftColor"),ei=we("outline",Te),ti=we("outlineColor"),At=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=lt(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:ut(t,n)});return ke(e,e.borderRadius,r)}return null};At.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:je}:{};At.filterProps=["borderRadius"];Rt(Yo,Uo,Go,qo,Ko,Ho,Jo,Xo,Qo,Zo,At,ei,ti);const kt=e=>{if(e.gap!==void 0&&e.gap!==null){const t=lt(e.theme,"spacing",8,"gap"),r=n=>({gap:ut(t,n)});return ke(e,e.gap,r)}return null};kt.propTypes=process.env.NODE_ENV!=="production"?{gap:je}:{};kt.filterProps=["gap"];const $t=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=lt(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:ut(t,n)});return ke(e,e.columnGap,r)}return null};$t.propTypes=process.env.NODE_ENV!=="production"?{columnGap:je}:{};$t.filterProps=["columnGap"];const Pt=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=lt(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:ut(t,n)});return ke(e,e.rowGap,r)}return null};Pt.propTypes=process.env.NODE_ENV!=="production"?{rowGap:je}:{};Pt.filterProps=["rowGap"];const ri=pe({prop:"gridColumn"}),ni=pe({prop:"gridRow"}),oi=pe({prop:"gridAutoFlow"}),ii=pe({prop:"gridAutoColumns"}),ai=pe({prop:"gridAutoRows"}),si=pe({prop:"gridTemplateColumns"}),ci=pe({prop:"gridTemplateRows"}),li=pe({prop:"gridTemplateAreas"}),ui=pe({prop:"gridArea"});Rt(kt,$t,Pt,ri,ni,oi,ii,ai,si,ci,li,ui);function Qe(e,t){return t==="grey"?t:e}const fi=pe({prop:"color",themeKey:"palette",transform:Qe}),di=pe({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Qe}),pi=pe({prop:"backgroundColor",themeKey:"palette",transform:Qe});Rt(fi,di,pi);function Se(e){return e<=1&&e!==0?`${e*100}%`:e}const mi=pe({prop:"width",transform:Se}),or=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{const n=e.theme?.breakpoints?.values?.[r]||Tt[r];return n?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:Se(r)}};return ke(e,e.maxWidth,t)}return null};or.filterProps=["maxWidth"];const hi=pe({prop:"minWidth",transform:Se}),gi=pe({prop:"height",transform:Se}),yi=pe({prop:"maxHeight",transform:Se}),bi=pe({prop:"minHeight",transform:Se});pe({prop:"size",cssProperty:"width",transform:Se});pe({prop:"size",cssProperty:"height",transform:Se});const vi=pe({prop:"boxSizing"});Rt(mi,or,hi,gi,yi,bi,vi);const It={border:{themeKey:"borders",transform:Te},borderTop:{themeKey:"borders",transform:Te},borderRight:{themeKey:"borders",transform:Te},borderBottom:{themeKey:"borders",transform:Te},borderLeft:{themeKey:"borders",transform:Te},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Te},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:At},color:{themeKey:"palette",transform:Qe},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Qe},backgroundColor:{themeKey:"palette",transform:Qe},p:{style:ue},pt:{style:ue},pr:{style:ue},pb:{style:ue},pl:{style:ue},px:{style:ue},py:{style:ue},padding:{style:ue},paddingTop:{style:ue},paddingRight:{style:ue},paddingBottom:{style:ue},paddingLeft:{style:ue},paddingX:{style:ue},paddingY:{style:ue},paddingInline:{style:ue},paddingInlineStart:{style:ue},paddingInlineEnd:{style:ue},paddingBlock:{style:ue},paddingBlockStart:{style:ue},paddingBlockEnd:{style:ue},m:{style:le},mt:{style:le},mr:{style:le},mb:{style:le},ml:{style:le},mx:{style:le},my:{style:le},margin:{style:le},marginTop:{style:le},marginRight:{style:le},marginBottom:{style:le},marginLeft:{style:le},marginX:{style:le},marginY:{style:le},marginInline:{style:le},marginInlineStart:{style:le},marginInlineEnd:{style:le},marginBlock:{style:le},marginBlockStart:{style:le},marginBlockEnd:{style:le},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:kt},rowGap:{style:Pt},columnGap:{style:$t},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Se},maxWidth:{style:or},minWidth:{transform:Se},height:{transform:Se},maxHeight:{transform:Se},minHeight:{transform:Se},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function Si(...e){const t=e.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function Ei(e,t){return typeof e=="function"?e(t):e}function Ci(){function e(r,n,o,i){const c={[r]:n,theme:o},u=i[r];if(!u)return{[r]:n};const{cssProperty:f=r,themeKey:d,transform:m,style:p}=u;if(n==null)return null;if(d==="typography"&&n==="inherit")return{[r]:n};const h=wt(o,d)||{};return p?p(c):ke(c,n,b=>{let l=Et(h,m,b);return b===l&&typeof b=="string"&&(l=Et(h,m,`${r}${b==="default"?"":We(b)}`,b)),f===!1?l:{[f]:l}})}function t(r){const{sx:n,theme:o={},nested:i}=r||{};if(!n)return null;const c=o.unstable_sxConfig??It;function u(f){let d=f;if(typeof f=="function")d=f(o);else if(typeof f!="object")return f;if(!d)return null;const m=Do(o.breakpoints),p=Object.keys(m);let h=m;return Object.keys(d).forEach(y=>{const b=Ei(d[y],o);if(b!=null)if(typeof b=="object")if(c[y])h=at(h,e(y,b,o,c));else{const l=ke({theme:o},b,T=>({[y]:T}));Si(l,b)?h[y]=t({sx:b,theme:o,nested:!0}):h=at(h,l)}else h=at(h,e(y,b,o,c))}),!i&&o.modularCssLayers?{"@layer sx":zr(o,Ur(p,h))}:zr(o,Ur(p,h))}return Array.isArray(n)?n.map(u):u(n)}return t}const Ze=Ci();Ze.filterProps=["sx"];function xi(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Ti={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function wi(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Oi=/[A-Z]|^ms/g,_i=/_EMO_([^_]+?)_([^]*?)_EMO_/g,bn=function(t){return t.charCodeAt(1)===45},qr=function(t){return t!=null&&typeof t!="boolean"},Gt=wi(function(e){return bn(e)?e:e.replace(Oi,"-$&").toLowerCase()}),Kr=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(_i,function(n,o,i){return $e={name:o,styles:i,next:$e},o})}return Ti[t]!==1&&!bn(t)&&typeof r=="number"&&r!==0?r+"px":r};function Ct(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var o=r;if(o.anim===1)return $e={name:o.name,styles:o.styles,next:$e},o.name;var i=r;if(i.styles!==void 0){var c=i.next;if(c!==void 0)for(;c!==void 0;)$e={name:c.name,styles:c.styles,next:$e},c=c.next;var u=i.styles+";";return u}return Ri(e,t,r)}}var f=r;return f}function Ri(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=Ct(e,t,r[o])+";";else for(var i in r){var c=r[i];if(typeof c!="object"){var u=c;qr(u)&&(n+=Gt(i)+":"+Kr(i,u)+";")}else if(Array.isArray(c)&&typeof c[0]=="string"&&t==null)for(var f=0;f<c.length;f++)qr(c[f])&&(n+=Gt(i)+":"+Kr(i,c[f])+";");else{var d=Ct(e,t,c);switch(i){case"animation":case"animationName":{n+=Gt(i)+":"+d+";";break}default:n+=i+"{"+d+"}"}}}return n}var Hr=/label:\s*([^\s;{]+)\s*(;|$)/g,$e;function Ai(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";$e=void 0;var i=e[0];if(i==null||i.raw===void 0)n=!1,o+=Ct(r,t,i);else{var c=i;o+=c[0]}for(var u=1;u<e.length;u++)if(o+=Ct(r,t,e[u]),n){var f=i;o+=f[u]}Hr.lastIndex=0;for(var d="",m;(m=Hr.exec(o))!==null;)d+="-"+m[1];var p=xi(o)+d;return{name:p,styles:o,next:$e}}function ki(e,t){const r=no(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const o=typeof e=="string"?`"${e}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
20
|
-
`)):n.some(i=>i===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),r(...n)}:r}function
|
|
19
|
+
`)),()=>{})}function or(e){return ut(e,"spacing",8,"spacing")}function ft(e,t){return typeof t=="string"||t==null?t:e(t)}function Yo(e,t){return r=>e.reduce((n,o)=>(n[o]=ft(t,r),n),{})}function Uo(e,t,r,n){if(!t.includes(r))return null;const o=Wo(r),i=Yo(o,n),c=e[r];return Ae(e,c,i)}function vn(e,t){const r=or(e.theme);return Object.keys(e).map(n=>Uo(e,t,n,r)).reduce(st,{})}function le(e){return vn(e,_t)}le.propTypes=process.env.NODE_ENV!=="production"?_t.reduce((e,t)=>(e[t]=je,e),{}):{};le.filterProps=_t;function ue(e){return vn(e,Rt)}ue.propTypes=process.env.NODE_ENV!=="production"?Rt.reduce((e,t)=>(e[t]=je,e),{}):{};ue.filterProps=Rt;process.env.NODE_ENV!=="production"&&zo.reduce((e,t)=>(e[t]=je,e),{});function kt(...e){const t=e.reduce((n,o)=>(o.filterProps.forEach(i=>{n[i]=o}),n),{}),r=n=>Object.keys(n).reduce((o,i)=>t[i]?st(o,t[i](n)):o,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,o)=>Object.assign(n,o.propTypes),{}):{},r.filterProps=e.reduce((n,o)=>n.concat(o.filterProps),[]),r}function Te(e){return typeof e!="number"?e:`${e}px solid`}function we(e,t){return pe({prop:e,themeKey:"borders",transform:t})}const qo=we("border",Te),Go=we("borderTop",Te),Ko=we("borderRight",Te),Ho=we("borderBottom",Te),Jo=we("borderLeft",Te),Xo=we("borderColor"),Qo=we("borderTopColor"),Zo=we("borderRightColor"),ei=we("borderBottomColor"),ti=we("borderLeftColor"),ri=we("outline",Te),ni=we("outlineColor"),At=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=ut(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:ft(t,n)});return Ae(e,e.borderRadius,r)}return null};At.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:je}:{};At.filterProps=["borderRadius"];kt(qo,Go,Ko,Ho,Jo,Xo,Qo,Zo,ei,ti,At,ri,ni);const Pt=e=>{if(e.gap!==void 0&&e.gap!==null){const t=ut(e.theme,"spacing",8,"gap"),r=n=>({gap:ft(t,n)});return Ae(e,e.gap,r)}return null};Pt.propTypes=process.env.NODE_ENV!=="production"?{gap:je}:{};Pt.filterProps=["gap"];const $t=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=ut(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:ft(t,n)});return Ae(e,e.columnGap,r)}return null};$t.propTypes=process.env.NODE_ENV!=="production"?{columnGap:je}:{};$t.filterProps=["columnGap"];const It=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=ut(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:ft(t,n)});return Ae(e,e.rowGap,r)}return null};It.propTypes=process.env.NODE_ENV!=="production"?{rowGap:je}:{};It.filterProps=["rowGap"];const oi=pe({prop:"gridColumn"}),ii=pe({prop:"gridRow"}),ai=pe({prop:"gridAutoFlow"}),si=pe({prop:"gridAutoColumns"}),ci=pe({prop:"gridAutoRows"}),li=pe({prop:"gridTemplateColumns"}),ui=pe({prop:"gridTemplateRows"}),fi=pe({prop:"gridTemplateAreas"}),di=pe({prop:"gridArea"});kt(Pt,$t,It,oi,ii,ai,si,ci,li,ui,fi,di);function Qe(e,t){return t==="grey"?t:e}const pi=pe({prop:"color",themeKey:"palette",transform:Qe}),mi=pe({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Qe}),hi=pe({prop:"backgroundColor",themeKey:"palette",transform:Qe});kt(pi,mi,hi);function Se(e){return e<=1&&e!==0?`${e*100}%`:e}const gi=pe({prop:"width",transform:Se}),ir=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{const n=e.theme?.breakpoints?.values?.[r]||wt[r];return n?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:Se(r)}};return Ae(e,e.maxWidth,t)}return null};ir.filterProps=["maxWidth"];const yi=pe({prop:"minWidth",transform:Se}),bi=pe({prop:"height",transform:Se}),vi=pe({prop:"maxHeight",transform:Se}),Si=pe({prop:"minHeight",transform:Se});pe({prop:"size",cssProperty:"width",transform:Se});pe({prop:"size",cssProperty:"height",transform:Se});const Ei=pe({prop:"boxSizing"});kt(gi,ir,yi,bi,vi,Si,Ei);const Nt={border:{themeKey:"borders",transform:Te},borderTop:{themeKey:"borders",transform:Te},borderRight:{themeKey:"borders",transform:Te},borderBottom:{themeKey:"borders",transform:Te},borderLeft:{themeKey:"borders",transform:Te},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Te},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:At},color:{themeKey:"palette",transform:Qe},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Qe},backgroundColor:{themeKey:"palette",transform:Qe},p:{style:ue},pt:{style:ue},pr:{style:ue},pb:{style:ue},pl:{style:ue},px:{style:ue},py:{style:ue},padding:{style:ue},paddingTop:{style:ue},paddingRight:{style:ue},paddingBottom:{style:ue},paddingLeft:{style:ue},paddingX:{style:ue},paddingY:{style:ue},paddingInline:{style:ue},paddingInlineStart:{style:ue},paddingInlineEnd:{style:ue},paddingBlock:{style:ue},paddingBlockStart:{style:ue},paddingBlockEnd:{style:ue},m:{style:le},mt:{style:le},mr:{style:le},mb:{style:le},ml:{style:le},mx:{style:le},my:{style:le},margin:{style:le},marginTop:{style:le},marginRight:{style:le},marginBottom:{style:le},marginLeft:{style:le},marginX:{style:le},marginY:{style:le},marginInline:{style:le},marginInlineStart:{style:le},marginInlineEnd:{style:le},marginBlock:{style:le},marginBlockStart:{style:le},marginBlockEnd:{style:le},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Pt},rowGap:{style:It},columnGap:{style:$t},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Se},maxWidth:{style:ir},minWidth:{transform:Se},height:{transform:Se},maxHeight:{transform:Se},minHeight:{transform:Se},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function Ci(...e){const t=e.reduce((n,o)=>n.concat(Object.keys(o)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function xi(e,t){return typeof e=="function"?e(t):e}function Ti(){function e(r,n,o,i){const c={[r]:n,theme:o},u=i[r];if(!u)return{[r]:n};const{cssProperty:f=r,themeKey:d,transform:m,style:p}=u;if(n==null)return null;if(d==="typography"&&n==="inherit")return{[r]:n};const h=Ot(o,d)||{};return p?p(c):Ae(c,n,b=>{let l=Ct(h,m,b);return b===l&&typeof b=="string"&&(l=Ct(h,m,`${r}${b==="default"?"":We(b)}`,b)),f===!1?l:{[f]:l}})}function t(r){const{sx:n,theme:o={},nested:i}=r||{};if(!n)return null;const c=o.unstable_sxConfig??Nt;function u(f){let d=f;if(typeof f=="function")d=f(o);else if(typeof f!="object")return f;if(!d)return null;const m=Bo(o.breakpoints),p=Object.keys(m);let h=m;return Object.keys(d).forEach(y=>{const b=xi(d[y],o);if(b!=null)if(typeof b=="object")if(c[y])h=st(h,e(y,b,o,c));else{const l=Ae({theme:o},b,T=>({[y]:T}));Ci(l,b)?h[y]=t({sx:b,theme:o,nested:!0}):h=st(h,l)}else h=st(h,e(y,b,o,c))}),!i&&o.modularCssLayers?{"@layer sx":Ur(o,Gr(p,h))}:Ur(o,Gr(p,h))}return Array.isArray(n)?n.map(u):u(n)}return t}const Ze=Ti();Ze.filterProps=["sx"];function wi(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Oi={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function _i(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Ri=/[A-Z]|^ms/g,ki=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Sn=function(t){return t.charCodeAt(1)===45},Hr=function(t){return t!=null&&typeof t!="boolean"},Gt=_i(function(e){return Sn(e)?e:e.replace(Ri,"-$&").toLowerCase()}),Jr=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(ki,function(n,o,i){return Pe={name:o,styles:i,next:Pe},o})}return Oi[t]!==1&&!Sn(t)&&typeof r=="number"&&r!==0?r+"px":r};function xt(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var o=r;if(o.anim===1)return Pe={name:o.name,styles:o.styles,next:Pe},o.name;var i=r;if(i.styles!==void 0){var c=i.next;if(c!==void 0)for(;c!==void 0;)Pe={name:c.name,styles:c.styles,next:Pe},c=c.next;var u=i.styles+";";return u}return Ai(e,t,r)}}var f=r;return f}function Ai(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=xt(e,t,r[o])+";";else for(var i in r){var c=r[i];if(typeof c!="object"){var u=c;Hr(u)&&(n+=Gt(i)+":"+Jr(i,u)+";")}else if(Array.isArray(c)&&typeof c[0]=="string"&&t==null)for(var f=0;f<c.length;f++)Hr(c[f])&&(n+=Gt(i)+":"+Jr(i,c[f])+";");else{var d=xt(e,t,c);switch(i){case"animation":case"animationName":{n+=Gt(i)+":"+d+";";break}default:n+=i+"{"+d+"}"}}}return n}var Xr=/label:\s*([^\s;{]+)\s*(;|$)/g,Pe;function Pi(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";Pe=void 0;var i=e[0];if(i==null||i.raw===void 0)n=!1,o+=xt(r,t,i);else{var c=i;o+=c[0]}for(var u=1;u<e.length;u++)if(o+=xt(r,t,e[u]),n){var f=i;o+=f[u]}Xr.lastIndex=0;for(var d="",m;(m=Xr.exec(o))!==null;)d+="-"+m[1];var p=wi(o)+d;return{name:p,styles:o,next:Pe}}function $i(e,t){const r=io(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const o=typeof e=="string"?`"${e}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${o})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
20
|
+
`)):n.some(i=>i===void 0)&&console.error(`MUI: the styled(${o})(...args) API requires all its args to be defined.`),r(...n)}:r}function Ii(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Qr=[];function Ve(e){return Qr[0]=e,Pi(Qr)}const Ni=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>({...r,[n.key]:n.val}),{})};function ji(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...o}=e,i=Ni(t),c=Object.keys(i);function u(h){return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${r})`}function f(h){return`@media (max-width:${(typeof t[h]=="number"?t[h]:h)-n/100}${r})`}function d(h,y){const b=c.indexOf(y);return`@media (min-width:${typeof t[h]=="number"?t[h]:h}${r}) and (max-width:${(b!==-1&&typeof t[c[b]]=="number"?t[c[b]]:y)-n/100}${r})`}function m(h){return c.indexOf(h)+1<c.length?d(h,c[c.indexOf(h)+1]):u(h)}function p(h){const y=c.indexOf(h);return y===0?u(c[1]):y===c.length-1?f(c[y]):d(h,c[c.indexOf(h)+1]).replace("@media","@media not all and")}return{keys:c,values:i,up:u,down:f,between:d,only:m,not:p,unit:r,...o}}const Di={borderRadius:4};function En(e=8,t=or({spacing:e})){if(e.mui)return e;const r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(i=>{const c=t(i);return typeof c=="number"?`${c}px`:c}).join(" "));return r.mui=!0,r}function Mi(e,t){const r=this;if(r.vars){if(!r.colorSchemes?.[e]||typeof r.getColorSchemeSelector!="function")return{};let n=r.getColorSchemeSelector(e);return n==="&"?t:((n.includes("data-")||n.includes("."))&&(n=`*:where(${n.replace(/\s*&$/,"")}) &`),{[n]:t})}return r.palette.mode===e?t:{}}function Cn(e={},...t){const{breakpoints:r={},palette:n={},spacing:o,shape:i={},...c}=e,u=ji(r),f=En(o);let d=Ee({breakpoints:u,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:f,shape:{...Di,...i}},c);return d=Do(d),d.applyStyles=Mi,d=t.reduce((m,p)=>Ee(m,p),d),d.unstable_sxConfig={...Nt,...c?.unstable_sxConfig},d.unstable_sx=function(p){return Ze({sx:p,theme:this})},d}function xn(e){const{variants:t,...r}=e,n={variants:t,style:Ve(r),isProcessed:!0};return n.style===r||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=Ve(o.style))}),n}const Bi=Cn();function Kt(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Le(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function Fi(e){return e?(t,r)=>r[e]:null}function Li(e,t,r){e.theme=Yi(e.theme)?r:e.theme[t]||e.theme}function St(e,t,r){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(o=>St(e,o,r));if(Array.isArray(n?.variants)){let o;if(n.isProcessed)o=r?Le(n.style,r):n.style;else{const{variants:i,...c}=n;o=r?Le(Ve(c),r):c}return Tn(e,n.variants,[o],r)}return n?.isProcessed?r?Le(Ve(n.style),r):n.style:r?Le(Ve(n),r):n}function Tn(e,t,r=[],n=void 0){let o;e:for(let i=0;i<t.length;i+=1){const c=t[i];if(typeof c.props=="function"){if(o??={...e,...e.ownerState,ownerState:e.ownerState},!c.props(o))continue}else for(const u in c.props)if(e[u]!==c.props[u]&&e.ownerState?.[u]!==c.props[u])continue e;typeof c.style=="function"?(o??={...e,...e.ownerState,ownerState:e.ownerState},r.push(n?Le(Ve(c.style(o)),n):c.style(o))):r.push(n?Le(Ve(c.style),n):c.style)}return r}function Vi(e={}){const{themeId:t,defaultTheme:r=Bi,rootShouldForwardProp:n=Kt,slotShouldForwardProp:o=Kt}=e;function i(u){Li(u,t,r)}return(u,f={})=>{Ii(u,K=>K.filter(ae=>ae!==Ze));const{name:d,slot:m,skipVariantsResolver:p,skipSx:h,overridesResolver:y=Fi(wn(m)),...b}=f,l=d&&d.startsWith("Mui")||m?"components":"custom",T=p!==void 0?p:m&&m!=="Root"&&m!=="root"||!1,S=h||!1;let w=Kt;m==="Root"||m==="root"?w=n:m?w=o:Ui(u)&&(w=void 0);const k=$i(u,{shouldForwardProp:w,label:zi(d,m),...b}),P=K=>{if(K.__emotion_real===K)return K;if(typeof K=="function")return function(re){return St(re,K,re.theme.modularCssLayers?l:void 0)};if(ke(K)){const ae=xn(K);return function(z){return ae.variants?St(z,ae,z.theme.modularCssLayers?l:void 0):z.theme.modularCssLayers?Le(ae.style,l):ae.style}}return K},E=(...K)=>{const ae=[],re=K.map(P),z=[];if(ae.push(i),d&&y&&z.push(function(D){const ce=D.theme.components?.[d]?.styleOverrides;if(!ce)return null;const he={};for(const ve in ce)he[ve]=St(D,ce[ve],D.theme.modularCssLayers?"theme":void 0);return y(D,he)}),d&&!T&&z.push(function(D){const ce=D.theme?.components?.[d]?.variants;return ce?Tn(D,ce,[],D.theme.modularCssLayers?"theme":void 0):null}),S||z.push(Ze),Array.isArray(re[0])){const q=re.shift(),D=new Array(ae.length).fill(""),fe=new Array(z.length).fill("");let ce;ce=[...D,...q,...fe],ce.raw=[...D,...q.raw,...fe],ae.unshift(ce)}const a=[...ae,...re,...z],_=k(...a);return u.muiName&&(_.muiName=u.muiName),process.env.NODE_ENV!=="production"&&(_.displayName=Wi(d,m,u)),_};return k.withConfig&&(E.withConfig=k.withConfig),E}}function Wi(e,t,r){return e?`${e}${We(t||"")}`:`Styled(${Oo(r)})`}function zi(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${wn(t||"Root")}`),r}function Yi(e){for(const t in e)return!1;return!0}function Ui(e){return typeof e=="string"&&e.charCodeAt(0)>96}function wn(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function ar(e,t=0,r=1){return process.env.NODE_ENV!=="production"&&(e<t||e>r)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${r}].`),$o(e,t,r)}function qi(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),r?`rgb${r.length===4?"a":""}(${r.map((n,o)=>o<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function Ne(e){if(e.type)return e;if(e.charAt(0)==="#")return Ne(qi(e));const t=e.indexOf("("),r=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
|
|
21
21
|
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Ie(9,e));let n=e.substring(t+1,e.length-1),o;if(r==="color"){if(n=n.split(" "),o=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${o}\` color space.
|
|
22
|
-
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Ie(10,o))}else n=n.split(",");return n=n.map(i=>parseFloat(i)),{type:r,values:n,colorSpace:o}}const
|
|
23
|
-
`))}return T}const h=({color:l,name:T,mainShade:S=500,lightShade:w=300,darkShade:
|
|
22
|
+
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Ie(10,o))}else n=n.split(",");return n=n.map(i=>parseFloat(i)),{type:r,values:n,colorSpace:o}}const Gi=e=>{const t=Ne(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},it=(e,t)=>{try{return Gi(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function jt(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((o,i)=>i<3?parseInt(o,10):o):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function On(e){e=Ne(e);const{values:t}=e,r=t[0],n=t[1]/100,o=t[2]/100,i=n*Math.min(o,1-o),c=(d,m=(d+r/30)%12)=>o-i*Math.max(Math.min(m-3,9-m,1),-1);let u="rgb";const f=[Math.round(c(0)*255),Math.round(c(8)*255),Math.round(c(4)*255)];return e.type==="hsla"&&(u+="a",f.push(t[3])),jt({type:u,values:f})}function Qt(e){e=Ne(e);let t=e.type==="hsl"||e.type==="hsla"?Ne(On(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Zr(e,t){const r=Qt(e),n=Qt(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function Ki(e,t){return e=Ne(e),t=ar(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,jt(e)}function bt(e,t,r){try{return Ki(e,t)}catch{return e}}function sr(e,t){if(e=Ne(e),t=ar(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return jt(e)}function oe(e,t,r){try{return sr(e,t)}catch{return e}}function cr(e,t){if(e=Ne(e),t=ar(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return jt(e)}function ie(e,t,r){try{return cr(e,t)}catch{return e}}function Hi(e,t=.15){return Qt(e)>.5?sr(e,t):cr(e,t)}function vt(e,t,r){try{return Hi(e,t)}catch{return e}}const Ji=$e.createContext(void 0);process.env.NODE_ENV!=="production"&&(H.node,H.object);function Xi(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const o=t.components[r];return o.defaultProps?Xt(o.defaultProps,n):!o.styleOverrides&&!o.variants?Xt(o,n):n}function Qi({props:e,name:t}){const r=$e.useContext(Ji);return Xi({props:e,name:t,theme:{components:r}})}const en={theme:void 0};function Zi(e){let t,r;return function(o){let i=t;return(i===void 0||o.theme!==r)&&(en.theme=o.theme,i=xn(e(en)),t=i,r=o.theme),i}}function ea(e=""){function t(...n){if(!n.length)return"";const o=n[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${o}${t(...n.slice(1))})`:`, ${o}`}return(n,...o)=>`var(--${e?`${e}-`:""}${n}${t(...o)})`}const tn=(e,t,r,n=[])=>{let o=e;t.forEach((i,c)=>{c===t.length-1?Array.isArray(o)?o[Number(i)]=r:o&&typeof o=="object"&&(o[i]=r):o&&typeof o=="object"&&(o[i]||(o[i]=n.includes(i)?[]:{}),o=o[i])})},ta=(e,t,r)=>{function n(o,i=[],c=[]){Object.entries(o).forEach(([u,f])=>{(!r||r&&!r([...i,u]))&&f!=null&&(typeof f=="object"&&Object.keys(f).length>0?n(f,[...i,u],Array.isArray(f)?[...c,u]:c):t([...i,u],f,c))})}n(e)},ra=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>e.includes(n))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Ht(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},o={},i={},c={};return ta(e,(u,f,d)=>{if((typeof f=="string"||typeof f=="number")&&(!n||!n(u,f))){const m=`--${r?`${r}-`:""}${u.join("-")}`,p=ra(u,f);Object.assign(o,{[m]:p}),tn(i,u,`var(${m})`,d),tn(c,u,`var(${m}, ${p})`,d)}},u=>u[0]==="vars"),{css:o,vars:i,varsWithDefaults:c}}function na(e,t={}){const{getSelector:r=T,disableCssColorScheme:n,colorSchemeSelector:o}=t,{colorSchemes:i={},components:c,defaultColorScheme:u="light",...f}=e,{vars:d,css:m,varsWithDefaults:p}=Ht(f,t);let h=p;const y={},{[u]:b,...l}=i;if(Object.entries(l||{}).forEach(([k,P])=>{const{vars:E,css:K,varsWithDefaults:ae}=Ht(P,t);h=Ee(h,ae),y[k]={css:K,vars:E}}),b){const{css:k,vars:P,varsWithDefaults:E}=Ht(b,t);h=Ee(h,E),y[u]={css:k,vars:P}}function T(k,P){let E=o;if(o==="class"&&(E=".%s"),o==="data"&&(E="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(E=`[${o}="%s"]`),k){if(E==="media")return e.defaultColorScheme===k?":root":{[`@media (prefers-color-scheme: ${i[k]?.palette?.mode||k})`]:{":root":P}};if(E)return e.defaultColorScheme===k?`:root, ${E.replace("%s",String(k))}`:E.replace("%s",String(k))}return":root"}return{vars:h,generateThemeVars:()=>{let k={...d};return Object.entries(y).forEach(([,{vars:P}])=>{k=Ee(k,P)}),k},generateStyleSheets:()=>{const k=[],P=e.defaultColorScheme||"light";function E(re,z){Object.keys(z).length&&k.push(typeof re=="string"?{[re]:{...z}}:re)}E(r(void 0,{...m}),m);const{[P]:K,...ae}=y;if(K){const{css:re}=K,z=i[P]?.palette?.mode,a=!n&&z?{colorScheme:z,...re}:{...re};E(r(P,{...a}),a)}return Object.entries(ae).forEach(([re,{css:z}])=>{const a=i[re]?.palette?.mode,_=!n&&a?{colorScheme:a,...z}:{...z};E(r(re,{..._}),_)}),k}}}function oa(e){return function(r){return e==="media"?(process.env.NODE_ENV!=="production"&&r!=="light"&&r!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${r}'.`),`@media (prefers-color-scheme: ${r})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${r}"] &`:e==="class"?`.${r} &`:e==="data"?`[data-${r}] &`:`${e.replace("%s",r)} &`:"&"}}const ct={black:"#000",white:"#fff"},ia={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Ge={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Ke={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},ot={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},He={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Je={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},Xe={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function _n(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:ct.white,default:ct.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const aa=_n();function Rn(){return{text:{primary:ct.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:ct.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const rn=Rn();function nn(e,t,r,n){const o=n.light||n,i=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=cr(e.main,o):t==="dark"&&(e.dark=sr(e.main,i)))}function sa(e="light"){return e==="dark"?{main:He[200],light:He[50],dark:He[400]}:{main:He[700],light:He[400],dark:He[800]}}function ca(e="light"){return e==="dark"?{main:Ge[200],light:Ge[50],dark:Ge[400]}:{main:Ge[500],light:Ge[300],dark:Ge[700]}}function la(e="light"){return e==="dark"?{main:Ke[500],light:Ke[300],dark:Ke[700]}:{main:Ke[700],light:Ke[400],dark:Ke[800]}}function ua(e="light"){return e==="dark"?{main:Je[400],light:Je[300],dark:Je[700]}:{main:Je[700],light:Je[500],dark:Je[900]}}function fa(e="light"){return e==="dark"?{main:Xe[400],light:Xe[300],dark:Xe[700]}:{main:Xe[800],light:Xe[500],dark:Xe[900]}}function da(e="light"){return e==="dark"?{main:ot[400],light:ot[300],dark:ot[700]}:{main:"#ed6c02",light:ot[500],dark:ot[900]}}function lr(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,...o}=e,i=e.primary||sa(t),c=e.secondary||ca(t),u=e.error||la(t),f=e.info||ua(t),d=e.success||fa(t),m=e.warning||da(t);function p(l){const T=Zr(l,rn.text.primary)>=r?rn.text.primary:aa.text.primary;if(process.env.NODE_ENV!=="production"){const S=Zr(l,T);S<3&&console.error([`MUI: The contrast ratio of ${S}:1 for ${T} on ${l}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
|
|
23
|
+
`))}return T}const h=({color:l,name:T,mainShade:S=500,lightShade:w=300,darkShade:k=700})=>{if(l={...l},!l.main&&l[S]&&(l.main=l[S]),!l.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${T?` (${T})`:""} provided to augmentColor(color) is invalid.
|
|
24
24
|
The color object needs to have a \`main\` property or a \`${S}\` property.`:Ie(11,T?` (${T})`:"",S));if(typeof l.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${T?` (${T})`:""} provided to augmentColor(color) is invalid.
|
|
25
25
|
\`color.main\` should be a string, but \`${JSON.stringify(l.main)}\` was provided instead.
|
|
26
26
|
|
|
@@ -34,15 +34,15 @@ const theme1 = createTheme({ palette: {
|
|
|
34
34
|
|
|
35
35
|
const theme2 = createTheme({ palette: {
|
|
36
36
|
primary: { main: green[500] },
|
|
37
|
-
} });`:Ie(12,T?` (${T})`:"",JSON.stringify(l.main)));return
|
|
38
|
-
`)),Object.keys(d).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(d).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(m=>`${m} ${typeof c=="string"?c:
|
|
37
|
+
} });`:Ie(12,T?` (${T})`:"",JSON.stringify(l.main)));return nn(l,"light",w,n),nn(l,"dark",k,n),l.contrastText||(l.contrastText=p(l.main)),l};let y;return t==="light"?y=_n():t==="dark"&&(y=Rn()),process.env.NODE_ENV!=="production"&&(y||console.error(`MUI: The palette mode \`${t}\` is not supported.`)),Ee({common:{...ct},mode:t,primary:h({color:i,name:"primary"}),secondary:h({color:c,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:h({color:u,name:"error"}),warning:h({color:m,name:"warning"}),info:h({color:f,name:"info"}),success:h({color:d,name:"success"}),grey:ia,contrastThreshold:r,getContrastText:p,augmentColor:h,tonalOffset:n,...y},o)}function pa(e){const t={};return Object.entries(e).forEach(n=>{const[o,i]=n;typeof i=="object"&&(t[o]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),t}function ma(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function ha(e){return Math.round(e*1e5)/1e5}const on={textTransform:"uppercase"},an='"Roboto", "Helvetica", "Arial", sans-serif';function ga(e,t){const{fontFamily:r=an,fontSize:n=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:c=500,fontWeightBold:u=700,htmlFontSize:f=16,allVariants:d,pxToRem:m,...p}=typeof t=="function"?t(e):t;process.env.NODE_ENV!=="production"&&(typeof n!="number"&&console.error("MUI: `fontSize` is required to be a number."),typeof f!="number"&&console.error("MUI: `htmlFontSize` is required to be a number."));const h=n/14,y=m||(T=>`${T/f*h}rem`),b=(T,S,w,k,P)=>({fontFamily:r,fontWeight:T,fontSize:y(S),lineHeight:w,...r===an?{letterSpacing:`${ha(k/S)}em`}:{},...P,...d}),l={h1:b(o,96,1.167,-1.5),h2:b(o,60,1.2,-.5),h3:b(i,48,1.167,0),h4:b(i,34,1.235,.25),h5:b(i,24,1.334,0),h6:b(c,20,1.6,.15),subtitle1:b(i,16,1.75,.15),subtitle2:b(c,14,1.57,.1),body1:b(i,16,1.5,.15),body2:b(i,14,1.43,.15),button:b(c,14,1.75,.4,on),caption:b(i,12,1.66,.4),overline:b(i,12,2.66,1,on),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Ee({htmlFontSize:f,pxToRem:y,fontFamily:r,fontSize:n,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:c,fontWeightBold:u,...l},p,{clone:!1})}const ya=.2,ba=.14,va=.12;function se(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${ya})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${ba})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${va})`].join(",")}const Sa=["none",se(0,2,1,-1,0,1,1,0,0,1,3,0),se(0,3,1,-2,0,2,2,0,0,1,5,0),se(0,3,3,-2,0,3,4,0,0,1,8,0),se(0,2,4,-1,0,4,5,0,0,1,10,0),se(0,3,5,-1,0,5,8,0,0,1,14,0),se(0,3,5,-1,0,6,10,0,0,1,18,0),se(0,4,5,-2,0,7,10,1,0,2,16,1),se(0,5,5,-3,0,8,10,1,0,3,14,2),se(0,5,6,-3,0,9,12,1,0,3,16,2),se(0,6,6,-3,0,10,14,1,0,4,18,3),se(0,6,7,-4,0,11,15,1,0,4,20,3),se(0,7,8,-4,0,12,17,2,0,5,22,4),se(0,7,8,-4,0,13,19,2,0,5,24,4),se(0,7,9,-4,0,14,21,2,0,5,26,4),se(0,8,9,-5,0,15,22,2,0,6,28,5),se(0,8,10,-5,0,16,24,2,0,6,30,5),se(0,8,11,-5,0,17,26,2,0,6,32,5),se(0,9,11,-5,0,18,28,2,0,7,34,6),se(0,9,12,-6,0,19,29,2,0,7,36,6),se(0,10,13,-6,0,20,31,3,0,8,38,7),se(0,10,13,-6,0,21,33,3,0,8,40,7),se(0,10,14,-6,0,22,35,3,0,8,42,7),se(0,11,14,-7,0,23,36,3,0,9,44,8),se(0,11,15,-7,0,24,38,3,0,9,46,8)],Ea={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Ca={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function sn(e){return`${Math.round(e)}ms`}function xa(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function Ta(e){const t={...Ea,...e.easing},r={...Ca,...e.duration};return{getAutoHeightDuration:xa,create:(o=["all"],i={})=>{const{duration:c=r.standard,easing:u=t.easeInOut,delay:f=0,...d}=i;if(process.env.NODE_ENV!=="production"){const m=h=>typeof h=="string",p=h=>!Number.isNaN(parseFloat(h));!m(o)&&!Array.isArray(o)&&console.error('MUI: Argument "props" must be a string or Array.'),!p(c)&&!m(c)&&console.error(`MUI: Argument "duration" must be a number or a string but found ${c}.`),m(u)||console.error('MUI: Argument "easing" must be a string.'),!p(f)&&!m(f)&&console.error('MUI: Argument "delay" must be a number or a string.'),typeof i!="object"&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join(`
|
|
38
|
+
`)),Object.keys(d).length!==0&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(d).join(",")}].`)}return(Array.isArray(o)?o:[o]).map(m=>`${m} ${typeof c=="string"?c:sn(c)} ${u} ${typeof f=="string"?f:sn(f)}`).join(",")},...e,easing:t,duration:r}}const wa={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Oa(e){return ke(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function kn(e={}){const t={...e};function r(n){const o=Object.entries(n);for(let i=0;i<o.length;i++){const[c,u]=o[i];!Oa(u)||c.startsWith("unstable_")?delete n[c]:ke(u)&&(n[c]={...u},r(n[c]))}}return r(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
39
39
|
|
|
40
40
|
const theme = ${JSON.stringify(t,null,2)};
|
|
41
41
|
|
|
42
42
|
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
43
43
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
44
44
|
|
|
45
|
-
export default theme;`}function
|
|
46
|
-
`))}l[S]={}}}};Object.keys(h.components).forEach(l=>{const T=h.components[l].styleOverrides;T&&l.startsWith("Mui")&&b(T,l)})}return h.unstable_sxConfig={...
|
|
47
|
-
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Pa(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const _e=e=>{try{return e()}catch{}},Ia=(e="mui")=>Qi(e);function Ht(e,t,r,n){if(!t)return;t=t===!0?{}:t;const o=n==="dark"?"dark":"light";if(!r){e[n]=_a({...t,palette:{mode:o,...t?.palette}});return}const{palette:i,...c}=Qt({...r,palette:{mode:o,...t?.palette}});return e[n]={...t,palette:i,opacity:{...Rn(o),...t?.opacity},overlays:t?.overlays||An(o)},c}function Na(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:c=Ra,colorSchemeSelector:u=r.light&&r.dark?"media":void 0,rootSelector:f=":root",...d}=e,m=Object.keys(r)[0],p=n||(r.light&&m!=="light"?"light":m),h=Ia(i),{[p]:y,light:b,dark:l,...T}=r,S={...T};let w=y;if((p==="dark"&&!("dark"in r)||p==="light"&&!("light"in r))&&(w=!0),!w)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${p}\` option is either missing or invalid.`:Ie(21,p));const A=Ht(S,w,d,p);b&&!S.light&&Ht(S,b,void 0,"light"),l&&!S.dark&&Ht(S,l,void 0,"dark");let $={defaultColorScheme:p,...A,cssVarPrefix:i,colorSchemeSelector:u,rootSelector:f,getCssVar:h,colorSchemes:S,font:{...fa(A.typography),...A.font},spacing:Pa(d.spacing)};Object.keys($.colorSchemes).forEach(z=>{const a=$.colorSchemes[z].palette,_=G=>{const D=G.split("-"),fe=D[1],ce=D[2];return h(G,a[fe][ce])};if(a.mode==="light"&&(g(a.common,"background","#fff"),g(a.common,"onBackground","#000")),a.mode==="dark"&&(g(a.common,"background","#000"),g(a.common,"onBackground","#fff")),$a(a,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),a.mode==="light"){g(a.Alert,"errorColor",oe(a.error.light,.6)),g(a.Alert,"infoColor",oe(a.info.light,.6)),g(a.Alert,"successColor",oe(a.success.light,.6)),g(a.Alert,"warningColor",oe(a.warning.light,.6)),g(a.Alert,"errorFilledBg",_("palette-error-main")),g(a.Alert,"infoFilledBg",_("palette-info-main")),g(a.Alert,"successFilledBg",_("palette-success-main")),g(a.Alert,"warningFilledBg",_("palette-warning-main")),g(a.Alert,"errorFilledColor",_e(()=>a.getContrastText(a.error.main))),g(a.Alert,"infoFilledColor",_e(()=>a.getContrastText(a.info.main))),g(a.Alert,"successFilledColor",_e(()=>a.getContrastText(a.success.main))),g(a.Alert,"warningFilledColor",_e(()=>a.getContrastText(a.warning.main))),g(a.Alert,"errorStandardBg",ie(a.error.light,.9)),g(a.Alert,"infoStandardBg",ie(a.info.light,.9)),g(a.Alert,"successStandardBg",ie(a.success.light,.9)),g(a.Alert,"warningStandardBg",ie(a.warning.light,.9)),g(a.Alert,"errorIconColor",_("palette-error-main")),g(a.Alert,"infoIconColor",_("palette-info-main")),g(a.Alert,"successIconColor",_("palette-success-main")),g(a.Alert,"warningIconColor",_("palette-warning-main")),g(a.AppBar,"defaultBg",_("palette-grey-100")),g(a.Avatar,"defaultBg",_("palette-grey-400")),g(a.Button,"inheritContainedBg",_("palette-grey-300")),g(a.Button,"inheritContainedHoverBg",_("palette-grey-A100")),g(a.Chip,"defaultBorder",_("palette-grey-400")),g(a.Chip,"defaultAvatarColor",_("palette-grey-700")),g(a.Chip,"defaultIconColor",_("palette-grey-700")),g(a.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),g(a.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),g(a.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),g(a.LinearProgress,"primaryBg",ie(a.primary.main,.62)),g(a.LinearProgress,"secondaryBg",ie(a.secondary.main,.62)),g(a.LinearProgress,"errorBg",ie(a.error.main,.62)),g(a.LinearProgress,"infoBg",ie(a.info.main,.62)),g(a.LinearProgress,"successBg",ie(a.success.main,.62)),g(a.LinearProgress,"warningBg",ie(a.warning.main,.62)),g(a.Skeleton,"bg",`rgba(${_("palette-text-primaryChannel")} / 0.11)`),g(a.Slider,"primaryTrack",ie(a.primary.main,.62)),g(a.Slider,"secondaryTrack",ie(a.secondary.main,.62)),g(a.Slider,"errorTrack",ie(a.error.main,.62)),g(a.Slider,"infoTrack",ie(a.info.main,.62)),g(a.Slider,"successTrack",ie(a.success.main,.62)),g(a.Slider,"warningTrack",ie(a.warning.main,.62));const G=bt(a.background.default,.8);g(a.SnackbarContent,"bg",G),g(a.SnackbarContent,"color",_e(()=>a.getContrastText(G))),g(a.SpeedDialAction,"fabHoverBg",bt(a.background.paper,.15)),g(a.StepConnector,"border",_("palette-grey-400")),g(a.StepContent,"border",_("palette-grey-400")),g(a.Switch,"defaultColor",_("palette-common-white")),g(a.Switch,"defaultDisabledColor",_("palette-grey-100")),g(a.Switch,"primaryDisabledColor",ie(a.primary.main,.62)),g(a.Switch,"secondaryDisabledColor",ie(a.secondary.main,.62)),g(a.Switch,"errorDisabledColor",ie(a.error.main,.62)),g(a.Switch,"infoDisabledColor",ie(a.info.main,.62)),g(a.Switch,"successDisabledColor",ie(a.success.main,.62)),g(a.Switch,"warningDisabledColor",ie(a.warning.main,.62)),g(a.TableCell,"border",ie(yt(a.divider,1),.88)),g(a.Tooltip,"bg",yt(a.grey[700],.92))}if(a.mode==="dark"){g(a.Alert,"errorColor",ie(a.error.light,.6)),g(a.Alert,"infoColor",ie(a.info.light,.6)),g(a.Alert,"successColor",ie(a.success.light,.6)),g(a.Alert,"warningColor",ie(a.warning.light,.6)),g(a.Alert,"errorFilledBg",_("palette-error-dark")),g(a.Alert,"infoFilledBg",_("palette-info-dark")),g(a.Alert,"successFilledBg",_("palette-success-dark")),g(a.Alert,"warningFilledBg",_("palette-warning-dark")),g(a.Alert,"errorFilledColor",_e(()=>a.getContrastText(a.error.dark))),g(a.Alert,"infoFilledColor",_e(()=>a.getContrastText(a.info.dark))),g(a.Alert,"successFilledColor",_e(()=>a.getContrastText(a.success.dark))),g(a.Alert,"warningFilledColor",_e(()=>a.getContrastText(a.warning.dark))),g(a.Alert,"errorStandardBg",oe(a.error.light,.9)),g(a.Alert,"infoStandardBg",oe(a.info.light,.9)),g(a.Alert,"successStandardBg",oe(a.success.light,.9)),g(a.Alert,"warningStandardBg",oe(a.warning.light,.9)),g(a.Alert,"errorIconColor",_("palette-error-main")),g(a.Alert,"infoIconColor",_("palette-info-main")),g(a.Alert,"successIconColor",_("palette-success-main")),g(a.Alert,"warningIconColor",_("palette-warning-main")),g(a.AppBar,"defaultBg",_("palette-grey-900")),g(a.AppBar,"darkBg",_("palette-background-paper")),g(a.AppBar,"darkColor",_("palette-text-primary")),g(a.Avatar,"defaultBg",_("palette-grey-600")),g(a.Button,"inheritContainedBg",_("palette-grey-800")),g(a.Button,"inheritContainedHoverBg",_("palette-grey-700")),g(a.Chip,"defaultBorder",_("palette-grey-700")),g(a.Chip,"defaultAvatarColor",_("palette-grey-300")),g(a.Chip,"defaultIconColor",_("palette-grey-300")),g(a.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),g(a.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),g(a.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),g(a.LinearProgress,"primaryBg",oe(a.primary.main,.5)),g(a.LinearProgress,"secondaryBg",oe(a.secondary.main,.5)),g(a.LinearProgress,"errorBg",oe(a.error.main,.5)),g(a.LinearProgress,"infoBg",oe(a.info.main,.5)),g(a.LinearProgress,"successBg",oe(a.success.main,.5)),g(a.LinearProgress,"warningBg",oe(a.warning.main,.5)),g(a.Skeleton,"bg",`rgba(${_("palette-text-primaryChannel")} / 0.13)`),g(a.Slider,"primaryTrack",oe(a.primary.main,.5)),g(a.Slider,"secondaryTrack",oe(a.secondary.main,.5)),g(a.Slider,"errorTrack",oe(a.error.main,.5)),g(a.Slider,"infoTrack",oe(a.info.main,.5)),g(a.Slider,"successTrack",oe(a.success.main,.5)),g(a.Slider,"warningTrack",oe(a.warning.main,.5));const G=bt(a.background.default,.98);g(a.SnackbarContent,"bg",G),g(a.SnackbarContent,"color",_e(()=>a.getContrastText(G))),g(a.SpeedDialAction,"fabHoverBg",bt(a.background.paper,.15)),g(a.StepConnector,"border",_("palette-grey-600")),g(a.StepContent,"border",_("palette-grey-600")),g(a.Switch,"defaultColor",_("palette-grey-300")),g(a.Switch,"defaultDisabledColor",_("palette-grey-600")),g(a.Switch,"primaryDisabledColor",oe(a.primary.main,.55)),g(a.Switch,"secondaryDisabledColor",oe(a.secondary.main,.55)),g(a.Switch,"errorDisabledColor",oe(a.error.main,.55)),g(a.Switch,"infoDisabledColor",oe(a.info.main,.55)),g(a.Switch,"successDisabledColor",oe(a.success.main,.55)),g(a.Switch,"warningDisabledColor",oe(a.warning.main,.55)),g(a.TableCell,"border",oe(yt(a.divider,1),.68)),g(a.Tooltip,"bg",yt(a.grey[700],.92))}Re(a.background,"default"),Re(a.background,"paper"),Re(a.common,"background"),Re(a.common,"onBackground"),Re(a,"divider"),Object.keys(a).forEach(G=>{const D=a[G];G!=="tonalOffset"&&D&&typeof D=="object"&&(D.main&&g(a[G],"mainChannel",ot(it(D.main))),D.light&&g(a[G],"lightChannel",ot(it(D.light))),D.dark&&g(a[G],"darkChannel",ot(it(D.dark))),D.contrastText&&g(a[G],"contrastTextChannel",ot(it(D.contrastText))),G==="text"&&(Re(a[G],"primary"),Re(a[G],"secondary")),G==="action"&&(D.active&&Re(a[G],"active"),D.selected&&Re(a[G],"selected")))})}),$=t.reduce((z,a)=>Ee(z,a),$);const E={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:c,getSelector:ka($)},{vars:K,generateThemeVars:ae,generateStyleSheets:re}=ta($,E);return $.vars=K,Object.entries($.colorSchemes[$.defaultColorScheme]).forEach(([z,a])=>{$[z]=a}),$.generateThemeVars=ae,$.generateStyleSheets=re,$.generateSpacing=function(){return vn(d.spacing,nr(this))},$.getColorSchemeSelector=ra(u),$.spacing=$.generateSpacing(),$.shouldSkipGeneratingVar=c,$.unstable_sxConfig={...It,...d?.unstable_sxConfig},$.unstable_sx=function(a){return Ze({sx:a,theme:this})},$.toRuntimeSource=_n,$}function an(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:cr({...r===!0?{}:r.palette,mode:t})})}function kn(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:o=r?void 0:{light:!0},defaultColorScheme:i=r?.mode,...c}=e,u=i||"light",f=o?.[u],d={...o,...r?{[u]:{...typeof f!="boolean"&&f,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return Qt(e,...t);let m=r;"palette"in e||d[u]&&(d[u]!==!0?m=d[u].palette:u==="dark"&&(m={mode:"dark"}));const p=Qt({...e,palette:m},...t);return p.defaultColorScheme=u,p.colorSchemes=d,p.palette.mode==="light"&&(p.colorSchemes.light={...d.light!==!0&&d.light,palette:p.palette},an(p,"dark",d.dark)),p.palette.mode==="dark"&&(p.colorSchemes.dark={...d.dark!==!0&&d.dark,palette:p.palette},an(p,"light",d.light)),p}return!r&&!("light"in d)&&u==="light"&&(d.light=!0),Na({...c,colorSchemes:d,defaultColorScheme:u,...typeof n!="boolean"&&n},...t)}const ja=kn(),Da="$$material";function Ma(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Ba=e=>Ma(e)&&e!=="classes",Fa=Fi({themeId:Da,defaultTheme:ja,rootShouldForwardProp:Ba}),La=Xi;process.env.NODE_ENV!=="production"&&(H.node,H.object.isRequired);function Va(e){return Ji(e)}function Wa(e){return rr("MuiSvgIcon",e)}Ao("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const za=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${We(t)}`,`fontSize${We(r)}`]};return wo(o,Wa,n)},Ya=Fa("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${We(r.color)}`],t[`fontSize${We(r.fontSize)}`]]}})(La(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),xt=Pe.forwardRef(function(t,r){const n=Va({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:c="inherit",component:u="svg",fontSize:f="medium",htmlColor:d,inheritViewBox:m=!1,titleAccess:p,viewBox:h="0 0 24 24",...y}=n,b=Pe.isValidElement(o)&&o.type==="svg",l={...n,color:c,component:u,fontSize:f,instanceFontSize:t.fontSize,inheritViewBox:m,viewBox:h,hasSvgAsChild:b},T={};m||(T.viewBox=h);const S=za(l);return x.jsxs(Ya,{as:u,className:$o(S.root,i),focusable:"false",color:d,"aria-hidden":p?void 0:!0,role:p?"img":void 0,ref:r,...T,...y,...b&&o.props,ownerState:l,children:[b?o.props.children:o,p?x.jsx("title",{children:p}):null]})});process.env.NODE_ENV!=="production"&&(xt.propTypes={children:H.node,classes:H.object,className:H.string,color:H.oneOfType([H.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),H.string]),component:H.elementType,fontSize:H.oneOfType([H.oneOf(["inherit","large","medium","small"]),H.string]),htmlColor:H.string,inheritViewBox:H.bool,shapeRendering:H.string,sx:H.oneOfType([H.arrayOf(H.oneOfType([H.func,H.object,H.bool])),H.func,H.object]),titleAccess:H.string,viewBox:H.string});xt.muiName="SvgIcon";function ft(e,t){function r(n,o){return x.jsx(xt,{"data-testid":`${t}Icon`,ref:o,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=xt.muiName,Pe.memo(Pe.forwardRef(r))}const Zt=ft(x.jsx("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2m6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1z"}),"Notifications"),$n=({unreadCount:e=0,onClick:t,showBadge:r=!0})=>x.jsx(P.IconButton,{onClick:t,color:"inherit",className:"relative",children:r&&e>0?x.jsx(P.Badge,{badgeContent:e>99?"99+":e,color:"error",children:x.jsx(Zt,{})}):x.jsx(Zt,{})}),Ua=ft(x.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),Ga=ft(x.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle"),qa=ft(x.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),lr=({notification:e,onMarkAsRead:t,onDelete:r,onClick:n})=>{const o=e.read!==!0,i=()=>{n&&n(e)},c=p=>{p.stopPropagation(),t&&t(e.notificationId)},u=p=>{p.stopPropagation(),r&&r(e.notificationId)},f=e.payload||{},d=e.renderedContent?.inApp?.title||e.renderedContent?.push?.title||f.title||f.message||"Notification",m=e.renderedContent?.inApp?.message||e.renderedContent?.push?.body||f.message||"";return x.jsxs(P.ListItem,{className:`cursor-pointer hover:bg-gray-50 ${o?"bg-blue-50":""}`,onClick:i,sx:{borderRadius:"8px",mb:.5,"&:hover":{backgroundColor:"action.hover"}},children:[x.jsx(P.Box,{className:"mr-2",children:x.jsx(Zt,{color:o?"primary":"disabled"})}),x.jsx(P.ListItemText,{primary:x.jsxs(P.Box,{className:"flex items-center gap-2",children:[x.jsx("span",{className:"font-medium",children:d}),o&&x.jsx(P.Chip,{label:"New",size:"small",color:"primary",className:"h-5 text-xs"})]}),secondary:m,primaryTypographyProps:{className:o?"font-semibold":""}}),x.jsx(P.ListItemSecondaryAction,{children:x.jsxs(P.Box,{className:"flex items-center gap-1",children:[o&&x.jsx(P.IconButton,{edge:"end",size:"small",onClick:c,title:"Mark as read",children:x.jsx(Ga,{fontSize:"small"})}),x.jsx(P.IconButton,{edge:"end",size:"small",onClick:u,title:"Delete",children:x.jsx(qa,{fontSize:"small"})})]})})]})},Ka=ft(x.jsx("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"}),"NotificationsNone"),Pn=({message:e="No notifications",icon:t})=>x.jsxs(P.Box,{className:"flex flex-col items-center justify-center p-8 text-center",sx:{minHeight:"200px"},children:[t||x.jsx(Ka,{sx:{fontSize:48,color:"text.secondary",mb:2}}),x.jsx(P.Typography,{variant:"body2",color:"text.secondary",children:e})]});function er(e){"@babel/helpers - typeof";return er=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},er(e)}function ur(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Oe(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function ct(e){Oe(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||er(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Ha(e,t){Oe(2,arguments);var r=ct(e),n=ur(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}var Ja={};function Xa(){return Ja}function sn(e,t){var r,n,o,i,c,u;Oe(1,arguments);var f=Xa(),d=ur((r=(n=(o=(i=void 0)!==null&&i!==void 0?i:void 0)!==null&&o!==void 0?o:f.weekStartsOn)!==null&&n!==void 0?n:(c=f.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=ct(e),p=m.getDay(),h=(p<d?7:0)+p-d;return m.setDate(m.getDate()-h),m.setHours(0,0,0,0),m}function cn(e){Oe(1,arguments);var t=ct(e);return t.setHours(0,0,0,0),t}function In(e,t){Oe(2,arguments);var r=cn(e),n=cn(t);return r.getTime()===n.getTime()}function Qa(e,t,r){Oe(2,arguments);var n=sn(e,r),o=sn(t,r);return n.getTime()===o.getTime()}function Za(e,t){Oe(2,arguments);var r=ct(e),n=ct(t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}function es(e){return Oe(1,arguments),Za(Date.now(),e)}function ts(e,t){return Oe(1,arguments),Qa(e,Date.now(),t)}function rs(e){return Oe(1,arguments),In(e,Date.now())}function ns(e,t){Oe(2,arguments);var r=ur(t);return Ha(e,-r)}function os(e){return Oe(1,arguments),In(e,ns(Date.now(),1))}const is=({groupLabel:e,notifications:t,onMarkAsRead:r,onDelete:n,onClick:o})=>t.length===0?null:x.jsxs(P.Box,{sx:{mb:2},children:[x.jsx(P.Typography,{variant:"caption",sx:{color:"text.secondary",px:2,py:1,display:"block"},children:e}),x.jsx(P.Divider,{sx:{mb:1}}),t.map(i=>x.jsx(lr,{notification:i,onMarkAsRead:r,onDelete:n,onClick:o},i.notificationId))]});function as(e){const t={today:[],yesterday:[],thisWeek:[],thisMonth:[],older:[]};return e.forEach(r=>{const n=r.createdAt?new Date(r.createdAt):new Date;rs(n)?t.today.push(r):os(n)?t.yesterday.push(r):ts(n)?t.thisWeek.push(r):es(n)?t.thisMonth.push(r):t.older.push(r)}),t}function ss(e){switch(e){case"today":return"Today";case"yesterday":return"Yesterday";case"thisWeek":return"This Week";case"thisMonth":return"This Month";case"older":return"Older";default:return e}}const cs=({client:e,subscriberId:t,tenantId:r,onClose:n})=>{const[o,i]=Z.useState({email:!0,push:!0,sms:!0,in_app:!0}),[c,u]=Z.useState({}),[f,d]=Z.useState(!1);Z.useEffect(()=>{m()},[]);const m=async()=>{try{const y=await e.preferences.get(r,t);i({email:y.emailEnabled,push:y.pushEnabled,sms:y.smsEnabled,in_app:y.inAppEnabled}),y.categories&&u(y.categories)}catch(y){console.error("Failed to load preferences:",y)}},p=async(y,b)=>{const l={...o,[y]:b};i(l);try{d(!0),await e.preferences.update(r,t,{emailEnabled:l.email,pushEnabled:l.push,smsEnabled:l.sms,inAppEnabled:l.in_app})}catch(T){console.error("Failed to update preferences:",T),i(S=>({...S,[y]:!b}))}finally{d(!1)}},h=async()=>{try{d(!0),await e.preferences.update(r,t,{emailEnabled:o.email,pushEnabled:o.push,smsEnabled:o.sms,inAppEnabled:o.in_app,categories:c}),n&&n()}catch(y){console.error("Failed to save preferences:",y)}finally{d(!1)}};return x.jsxs(P.Box,{sx:{p:3,minWidth:300},children:[x.jsx(P.Typography,{variant:"h6",gutterBottom:!0,children:"Notification Preferences"}),x.jsx(P.Divider,{sx:{my:2}}),x.jsx(P.Typography,{variant:"subtitle2",sx:{mb:2,fontWeight:"bold"},children:"Channels"}),x.jsx(P.FormControlLabel,{control:x.jsx(P.Switch,{checked:o.email,onChange:y=>p("email",y.target.checked),disabled:f}),label:"Email"}),x.jsx(P.FormControlLabel,{control:x.jsx(P.Switch,{checked:o.push,onChange:y=>p("push",y.target.checked),disabled:f}),label:"Push Notifications"}),x.jsx(P.FormControlLabel,{control:x.jsx(P.Switch,{checked:o.sms,onChange:y=>p("sms",y.target.checked),disabled:f}),label:"SMS"}),x.jsx(P.FormControlLabel,{control:x.jsx(P.Switch,{checked:o.in_app,onChange:y=>p("in_app",y.target.checked),disabled:f}),label:"In-App"}),x.jsxs(P.Box,{sx:{mt:3,display:"flex",justifyContent:"flex-end",gap:1},children:[n&&x.jsx(P.Button,{onClick:n,variant:"outlined",size:"small",children:"Cancel"}),x.jsx(P.Button,{onClick:h,variant:"contained",size:"small",disabled:f,children:"Save"})]})]})},Nn=({notifications:e,loading:t=!1,error:r=null,onNotificationClick:n,onMarkAsRead:o,onDelete:i,subscriberId:c,tenantId:u,client:f,groupByDate:d=!0})=>{const[m,p]=Z.useState("all"),[h,y]=Z.useState(null),b=m==="unread"?e.filter(w=>w.read!==!0):e;if(t)return x.jsx(P.Box,{className:"flex items-center justify-center p-8",children:x.jsx(P.CircularProgress,{size:40})});if(r)return x.jsx(P.Alert,{severity:"error",className:"m-4",children:r.message||"Failed to load notifications"});if(e.length===0)return x.jsx(Pn,{});const l=async w=>{o&&await o(w)},T=async w=>{i&&await i(w)},S=d?as(b):{all:b};return x.jsxs(P.Box,{children:[x.jsxs(P.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",px:2,py:1,borderBottom:1,borderColor:"divider"},children:[x.jsxs(P.Tabs,{value:m,onChange:(w,A)=>p(A),children:[x.jsx(P.Tab,{label:"All",value:"all"}),x.jsx(P.Tab,{label:"Unread",value:"unread"})]}),f&&c&&u&&x.jsxs(x.Fragment,{children:[x.jsx(P.IconButton,{size:"small",onClick:w=>y(w.currentTarget),title:"Preferences",children:x.jsx(Ua,{fontSize:"small"})}),x.jsx(P.Popover,{open:!!h,anchorEl:h,onClose:()=>y(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},children:x.jsx(cs,{client:f,subscriberId:c,tenantId:u,onClose:()=>y(null)})})]})]}),x.jsx(P.List,{className:"max-h-96 overflow-y-auto",sx:{padding:0},children:d?Object.entries(S).map(([w,A])=>x.jsx(is,{groupLabel:ss(w),notifications:A,onMarkAsRead:l,onDelete:T,onClick:n},w)):b.map(w=>x.jsx(lr,{notification:w,onMarkAsRead:l,onDelete:T,onClick:n},w.notificationId))})]})},ls=({client:e,tenantId:t,subscriberId:r,environmentId:n,position:o="top-right",maxNotifications:i=50,showUnreadBadge:c=!0,onNotificationClick:u,onMarkAsRead:f,onDelete:d,pollInterval:m})=>{const[p,h]=Z.useState(null),y=!!p,{notifications:b,loading:l,error:T,unreadCount:S,connected:w,markAsRead:A,deleteNotification:$}=fn({client:e,tenantId:t,subscriberId:r,environmentId:n,pollInterval:m}),E=_=>{h(_.currentTarget)},K=()=>{h(null)},ae=async _=>{await A(_),f&&await f(_)},re=async _=>{await $(_),d&&await d(_)},z=b.slice(0,i),a=()=>{const _={};return o.includes("top")?_.top="8px":_.bottom="8px",o.includes("right")?_.right="8px":_.left="8px",_};return x.jsxs(x.Fragment,{children:[x.jsx($n,{unreadCount:S,onClick:E,showBadge:c}),x.jsx(P.Popover,{open:y,anchorEl:p,onClose:K,anchorOrigin:{vertical:o.includes("bottom")?"bottom":"top",horizontal:o.includes("right")?"right":"left"},transformOrigin:{vertical:o.includes("bottom")?"top":"bottom",horizontal:o.includes("right")?"right":"left"},PaperProps:{sx:{width:400,maxWidth:"90vw",maxHeight:"80vh",...a()}},children:x.jsxs(P.Paper,{className:"notification-center",sx:{borderRadius:"15px",overflow:"hidden"},children:[x.jsx(P.Box,{className:"p-4 border-b border-gray-200",children:x.jsxs(P.Box,{className:"flex items-center justify-between",children:[x.jsx("h3",{className:"text-lg font-semibold",children:"Notifications"}),w&&x.jsxs(P.Box,{className:"flex items-center gap-2",children:[x.jsx(P.Box,{className:"w-2 h-2 bg-green-500 rounded-full",title:"Connected"}),x.jsx("span",{className:"text-xs text-gray-500",children:"Live"})]})]})}),x.jsx(Nn,{notifications:z,loading:l,error:T,onNotificationClick:u,onMarkAsRead:ae,onDelete:re,subscriberId:r,tenantId:t,client:e,groupByDate:!0})]})})]})},us=kn({palette:{primary:{main:"#1E3A8A"},secondary:{main:"rgba(30, 58, 138, 0.75)"}},components:{MuiPaper:{styleOverrides:{root:{boxShadow:"none",borderRadius:"15px"}}},MuiTableContainer:{styleOverrides:{root:{border:"1px solid #E9EAEB",borderRadius:"15px","&::-webkit-scrollbar":{width:"8px",height:"8px"},"&::-webkit-scrollbar-thumb":{backgroundColor:"darkgray",borderRadius:"4px"},"&::-webkit-scrollbar-track":{backgroundColor:"transparent"},scrollbarWidth:"thin",scrollbarColor:"darkgray transparent"}}},MuiList:{styleOverrides:{root:{padding:0}}},MuiListItem:{styleOverrides:{root:{borderRadius:"8px",marginBottom:"4px"}}}}});exports.EmptyState=Pn;exports.NotificationBell=$n;exports.NotificationCenter=ls;exports.NotificationItem=lr;exports.NotificationList=Nn;exports.notificationTheme=us;exports.useNotificationCenter=fn;exports.useNotifications=ln;exports.useWebSocket=un;
|
|
45
|
+
export default theme;`}function Zt(e={},...t){const{breakpoints:r,mixins:n={},spacing:o,palette:i={},transitions:c={},typography:u={},shape:f,...d}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":Ie(20));const m=lr(i),p=Cn(e);let h=Ee(p,{mixins:ma(p.breakpoints,n),palette:m,shadows:Sa.slice(),typography:ga(m,u),transitions:Ta(c),zIndex:{...wa}});if(h=Ee(h,d),h=t.reduce((y,b)=>Ee(y,b),h),process.env.NODE_ENV!=="production"){const y=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],b=(l,T)=>{let S;for(S in l){const w=l[S];if(y.includes(S)&&Object.keys(w).length>0){if(process.env.NODE_ENV!=="production"){const k=nr("",S);console.error([`MUI: The \`${T}\` component increases the CSS specificity of the \`${S}\` internal state.`,"You can not override it like this: ",JSON.stringify(l,null,2),"",`Instead, you need to use the '&.${k}' syntax:`,JSON.stringify({root:{[`&.${k}`]:w}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
46
|
+
`))}l[S]={}}}};Object.keys(h.components).forEach(l=>{const T=h.components[l].styleOverrides;T&&l.startsWith("Mui")&&b(T,l)})}return h.unstable_sxConfig={...Nt,...d?.unstable_sxConfig},h.unstable_sx=function(b){return Ze({sx:b,theme:this})},h.toRuntimeSource=kn,h}function _a(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const Ra=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=_a(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function An(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Pn(e){return e==="dark"?Ra:[]}function ka(e){const{palette:t={mode:"light"},opacity:r,overlays:n,...o}=e,i=lr(t);return{palette:i,opacity:{...An(i.mode),...r},overlays:n||Pn(i.mode),...o}}function Aa(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const Pa=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],$a=e=>(t,r)=>{const n=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if(o==="class"&&(i=".%s"),o==="data"&&(i="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const c={};return Pa(e.cssVarPrefix).forEach(u=>{c[u]=r[u],delete r[u]}),i==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:c}}:i?{[i.replace("%s",t)]:c,[`${n}, ${i.replace("%s",t)}`]:r}:{[n]:{...r,...c}}}if(i&&i!=="media")return`${n}, ${i.replace("%s",String(t))}`}else if(t){if(i==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(i)return i.replace("%s",String(t))}return n};function Ia(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function g(e,t,r){!e[t]&&r&&(e[t]=r)}function at(e){return typeof e!="string"||!e.startsWith("hsl")?e:On(e)}function Re(e,t){`${t}Channel`in e||(e[`${t}Channel`]=it(at(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
|
|
47
|
+
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Na(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const _e=e=>{try{return e()}catch{}},ja=(e="mui")=>ea(e);function Jt(e,t,r,n){if(!t)return;t=t===!0?{}:t;const o=n==="dark"?"dark":"light";if(!r){e[n]=ka({...t,palette:{mode:o,...t?.palette}});return}const{palette:i,...c}=Zt({...r,palette:{mode:o,...t?.palette}});return e[n]={...t,palette:i,opacity:{...An(o),...t?.opacity},overlays:t?.overlays||Pn(o)},c}function Da(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:c=Aa,colorSchemeSelector:u=r.light&&r.dark?"media":void 0,rootSelector:f=":root",...d}=e,m=Object.keys(r)[0],p=n||(r.light&&m!=="light"?"light":m),h=ja(i),{[p]:y,light:b,dark:l,...T}=r,S={...T};let w=y;if((p==="dark"&&!("dark"in r)||p==="light"&&!("light"in r))&&(w=!0),!w)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${p}\` option is either missing or invalid.`:Ie(21,p));const k=Jt(S,w,d,p);b&&!S.light&&Jt(S,b,void 0,"light"),l&&!S.dark&&Jt(S,l,void 0,"dark");let P={defaultColorScheme:p,...k,cssVarPrefix:i,colorSchemeSelector:u,rootSelector:f,getCssVar:h,colorSchemes:S,font:{...pa(k.typography),...k.font},spacing:Na(d.spacing)};Object.keys(P.colorSchemes).forEach(z=>{const a=P.colorSchemes[z].palette,_=q=>{const D=q.split("-"),fe=D[1],ce=D[2];return h(q,a[fe][ce])};if(a.mode==="light"&&(g(a.common,"background","#fff"),g(a.common,"onBackground","#000")),a.mode==="dark"&&(g(a.common,"background","#000"),g(a.common,"onBackground","#fff")),Ia(a,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),a.mode==="light"){g(a.Alert,"errorColor",oe(a.error.light,.6)),g(a.Alert,"infoColor",oe(a.info.light,.6)),g(a.Alert,"successColor",oe(a.success.light,.6)),g(a.Alert,"warningColor",oe(a.warning.light,.6)),g(a.Alert,"errorFilledBg",_("palette-error-main")),g(a.Alert,"infoFilledBg",_("palette-info-main")),g(a.Alert,"successFilledBg",_("palette-success-main")),g(a.Alert,"warningFilledBg",_("palette-warning-main")),g(a.Alert,"errorFilledColor",_e(()=>a.getContrastText(a.error.main))),g(a.Alert,"infoFilledColor",_e(()=>a.getContrastText(a.info.main))),g(a.Alert,"successFilledColor",_e(()=>a.getContrastText(a.success.main))),g(a.Alert,"warningFilledColor",_e(()=>a.getContrastText(a.warning.main))),g(a.Alert,"errorStandardBg",ie(a.error.light,.9)),g(a.Alert,"infoStandardBg",ie(a.info.light,.9)),g(a.Alert,"successStandardBg",ie(a.success.light,.9)),g(a.Alert,"warningStandardBg",ie(a.warning.light,.9)),g(a.Alert,"errorIconColor",_("palette-error-main")),g(a.Alert,"infoIconColor",_("palette-info-main")),g(a.Alert,"successIconColor",_("palette-success-main")),g(a.Alert,"warningIconColor",_("palette-warning-main")),g(a.AppBar,"defaultBg",_("palette-grey-100")),g(a.Avatar,"defaultBg",_("palette-grey-400")),g(a.Button,"inheritContainedBg",_("palette-grey-300")),g(a.Button,"inheritContainedHoverBg",_("palette-grey-A100")),g(a.Chip,"defaultBorder",_("palette-grey-400")),g(a.Chip,"defaultAvatarColor",_("palette-grey-700")),g(a.Chip,"defaultIconColor",_("palette-grey-700")),g(a.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),g(a.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),g(a.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),g(a.LinearProgress,"primaryBg",ie(a.primary.main,.62)),g(a.LinearProgress,"secondaryBg",ie(a.secondary.main,.62)),g(a.LinearProgress,"errorBg",ie(a.error.main,.62)),g(a.LinearProgress,"infoBg",ie(a.info.main,.62)),g(a.LinearProgress,"successBg",ie(a.success.main,.62)),g(a.LinearProgress,"warningBg",ie(a.warning.main,.62)),g(a.Skeleton,"bg",`rgba(${_("palette-text-primaryChannel")} / 0.11)`),g(a.Slider,"primaryTrack",ie(a.primary.main,.62)),g(a.Slider,"secondaryTrack",ie(a.secondary.main,.62)),g(a.Slider,"errorTrack",ie(a.error.main,.62)),g(a.Slider,"infoTrack",ie(a.info.main,.62)),g(a.Slider,"successTrack",ie(a.success.main,.62)),g(a.Slider,"warningTrack",ie(a.warning.main,.62));const q=vt(a.background.default,.8);g(a.SnackbarContent,"bg",q),g(a.SnackbarContent,"color",_e(()=>a.getContrastText(q))),g(a.SpeedDialAction,"fabHoverBg",vt(a.background.paper,.15)),g(a.StepConnector,"border",_("palette-grey-400")),g(a.StepContent,"border",_("palette-grey-400")),g(a.Switch,"defaultColor",_("palette-common-white")),g(a.Switch,"defaultDisabledColor",_("palette-grey-100")),g(a.Switch,"primaryDisabledColor",ie(a.primary.main,.62)),g(a.Switch,"secondaryDisabledColor",ie(a.secondary.main,.62)),g(a.Switch,"errorDisabledColor",ie(a.error.main,.62)),g(a.Switch,"infoDisabledColor",ie(a.info.main,.62)),g(a.Switch,"successDisabledColor",ie(a.success.main,.62)),g(a.Switch,"warningDisabledColor",ie(a.warning.main,.62)),g(a.TableCell,"border",ie(bt(a.divider,1),.88)),g(a.Tooltip,"bg",bt(a.grey[700],.92))}if(a.mode==="dark"){g(a.Alert,"errorColor",ie(a.error.light,.6)),g(a.Alert,"infoColor",ie(a.info.light,.6)),g(a.Alert,"successColor",ie(a.success.light,.6)),g(a.Alert,"warningColor",ie(a.warning.light,.6)),g(a.Alert,"errorFilledBg",_("palette-error-dark")),g(a.Alert,"infoFilledBg",_("palette-info-dark")),g(a.Alert,"successFilledBg",_("palette-success-dark")),g(a.Alert,"warningFilledBg",_("palette-warning-dark")),g(a.Alert,"errorFilledColor",_e(()=>a.getContrastText(a.error.dark))),g(a.Alert,"infoFilledColor",_e(()=>a.getContrastText(a.info.dark))),g(a.Alert,"successFilledColor",_e(()=>a.getContrastText(a.success.dark))),g(a.Alert,"warningFilledColor",_e(()=>a.getContrastText(a.warning.dark))),g(a.Alert,"errorStandardBg",oe(a.error.light,.9)),g(a.Alert,"infoStandardBg",oe(a.info.light,.9)),g(a.Alert,"successStandardBg",oe(a.success.light,.9)),g(a.Alert,"warningStandardBg",oe(a.warning.light,.9)),g(a.Alert,"errorIconColor",_("palette-error-main")),g(a.Alert,"infoIconColor",_("palette-info-main")),g(a.Alert,"successIconColor",_("palette-success-main")),g(a.Alert,"warningIconColor",_("palette-warning-main")),g(a.AppBar,"defaultBg",_("palette-grey-900")),g(a.AppBar,"darkBg",_("palette-background-paper")),g(a.AppBar,"darkColor",_("palette-text-primary")),g(a.Avatar,"defaultBg",_("palette-grey-600")),g(a.Button,"inheritContainedBg",_("palette-grey-800")),g(a.Button,"inheritContainedHoverBg",_("palette-grey-700")),g(a.Chip,"defaultBorder",_("palette-grey-700")),g(a.Chip,"defaultAvatarColor",_("palette-grey-300")),g(a.Chip,"defaultIconColor",_("palette-grey-300")),g(a.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),g(a.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),g(a.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),g(a.LinearProgress,"primaryBg",oe(a.primary.main,.5)),g(a.LinearProgress,"secondaryBg",oe(a.secondary.main,.5)),g(a.LinearProgress,"errorBg",oe(a.error.main,.5)),g(a.LinearProgress,"infoBg",oe(a.info.main,.5)),g(a.LinearProgress,"successBg",oe(a.success.main,.5)),g(a.LinearProgress,"warningBg",oe(a.warning.main,.5)),g(a.Skeleton,"bg",`rgba(${_("palette-text-primaryChannel")} / 0.13)`),g(a.Slider,"primaryTrack",oe(a.primary.main,.5)),g(a.Slider,"secondaryTrack",oe(a.secondary.main,.5)),g(a.Slider,"errorTrack",oe(a.error.main,.5)),g(a.Slider,"infoTrack",oe(a.info.main,.5)),g(a.Slider,"successTrack",oe(a.success.main,.5)),g(a.Slider,"warningTrack",oe(a.warning.main,.5));const q=vt(a.background.default,.98);g(a.SnackbarContent,"bg",q),g(a.SnackbarContent,"color",_e(()=>a.getContrastText(q))),g(a.SpeedDialAction,"fabHoverBg",vt(a.background.paper,.15)),g(a.StepConnector,"border",_("palette-grey-600")),g(a.StepContent,"border",_("palette-grey-600")),g(a.Switch,"defaultColor",_("palette-grey-300")),g(a.Switch,"defaultDisabledColor",_("palette-grey-600")),g(a.Switch,"primaryDisabledColor",oe(a.primary.main,.55)),g(a.Switch,"secondaryDisabledColor",oe(a.secondary.main,.55)),g(a.Switch,"errorDisabledColor",oe(a.error.main,.55)),g(a.Switch,"infoDisabledColor",oe(a.info.main,.55)),g(a.Switch,"successDisabledColor",oe(a.success.main,.55)),g(a.Switch,"warningDisabledColor",oe(a.warning.main,.55)),g(a.TableCell,"border",oe(bt(a.divider,1),.68)),g(a.Tooltip,"bg",bt(a.grey[700],.92))}Re(a.background,"default"),Re(a.background,"paper"),Re(a.common,"background"),Re(a.common,"onBackground"),Re(a,"divider"),Object.keys(a).forEach(q=>{const D=a[q];q!=="tonalOffset"&&D&&typeof D=="object"&&(D.main&&g(a[q],"mainChannel",it(at(D.main))),D.light&&g(a[q],"lightChannel",it(at(D.light))),D.dark&&g(a[q],"darkChannel",it(at(D.dark))),D.contrastText&&g(a[q],"contrastTextChannel",it(at(D.contrastText))),q==="text"&&(Re(a[q],"primary"),Re(a[q],"secondary")),q==="action"&&(D.active&&Re(a[q],"active"),D.selected&&Re(a[q],"selected")))})}),P=t.reduce((z,a)=>Ee(z,a),P);const E={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:c,getSelector:$a(P)},{vars:K,generateThemeVars:ae,generateStyleSheets:re}=na(P,E);return P.vars=K,Object.entries(P.colorSchemes[P.defaultColorScheme]).forEach(([z,a])=>{P[z]=a}),P.generateThemeVars=ae,P.generateStyleSheets=re,P.generateSpacing=function(){return En(d.spacing,or(this))},P.getColorSchemeSelector=oa(u),P.spacing=P.generateSpacing(),P.shouldSkipGeneratingVar=c,P.unstable_sxConfig={...Nt,...d?.unstable_sxConfig},P.unstable_sx=function(a){return Ze({sx:a,theme:this})},P.toRuntimeSource=kn,P}function cn(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:lr({...r===!0?{}:r.palette,mode:t})})}function $n(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:o=r?void 0:{light:!0},defaultColorScheme:i=r?.mode,...c}=e,u=i||"light",f=o?.[u],d={...o,...r?{[u]:{...typeof f!="boolean"&&f,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return Zt(e,...t);let m=r;"palette"in e||d[u]&&(d[u]!==!0?m=d[u].palette:u==="dark"&&(m={mode:"dark"}));const p=Zt({...e,palette:m},...t);return p.defaultColorScheme=u,p.colorSchemes=d,p.palette.mode==="light"&&(p.colorSchemes.light={...d.light!==!0&&d.light,palette:p.palette},cn(p,"dark",d.dark)),p.palette.mode==="dark"&&(p.colorSchemes.dark={...d.dark!==!0&&d.dark,palette:p.palette},cn(p,"light",d.light)),p}return!r&&!("light"in d)&&u==="light"&&(d.light=!0),Da({...c,colorSchemes:d,defaultColorScheme:u,...typeof n!="boolean"&&n},...t)}const Ma=$n(),Ba="$$material";function Fa(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const La=e=>Fa(e)&&e!=="classes",Va=Vi({themeId:Ba,defaultTheme:Ma,rootShouldForwardProp:La}),Wa=Zi;process.env.NODE_ENV!=="production"&&(H.node,H.object.isRequired);function za(e){return Qi(e)}function Ya(e){return nr("MuiSvgIcon",e)}Po("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Ua=e=>{const{color:t,fontSize:r,classes:n}=e,o={root:["root",t!=="inherit"&&`color${We(t)}`,`fontSize${We(r)}`]};return _o(o,Ya,n)},qa=Va("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${We(r.color)}`],t[`fontSize${We(r.fontSize)}`]]}})(Wa(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),Tt=$e.forwardRef(function(t,r){const n=za({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:c="inherit",component:u="svg",fontSize:f="medium",htmlColor:d,inheritViewBox:m=!1,titleAccess:p,viewBox:h="0 0 24 24",...y}=n,b=$e.isValidElement(o)&&o.type==="svg",l={...n,color:c,component:u,fontSize:f,instanceFontSize:t.fontSize,inheritViewBox:m,viewBox:h,hasSvgAsChild:b},T={};m||(T.viewBox=h);const S=Ua(l);return x.jsxs(qa,{as:u,className:Io(S.root,i),focusable:"false",color:d,"aria-hidden":p?void 0:!0,role:p?"img":void 0,ref:r,...T,...y,...b&&o.props,ownerState:l,children:[b?o.props.children:o,p?x.jsx("title",{children:p}):null]})});process.env.NODE_ENV!=="production"&&(Tt.propTypes={children:H.node,classes:H.object,className:H.string,color:H.oneOfType([H.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),H.string]),component:H.elementType,fontSize:H.oneOfType([H.oneOf(["inherit","large","medium","small"]),H.string]),htmlColor:H.string,inheritViewBox:H.bool,shapeRendering:H.string,sx:H.oneOfType([H.arrayOf(H.oneOfType([H.func,H.object,H.bool])),H.func,H.object]),titleAccess:H.string,viewBox:H.string});Tt.muiName="SvgIcon";function dt(e,t){function r(n,o){return x.jsx(Tt,{"data-testid":`${t}Icon`,ref:o,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=Tt.muiName,$e.memo($e.forwardRef(r))}const er=dt(x.jsx("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2m6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1z"}),"Notifications"),In=({unreadCount:e=0,onClick:t,showBadge:r=!0})=>x.jsx($.IconButton,{onClick:t,color:"inherit",className:"relative",children:r&&e>0?x.jsx($.Badge,{badgeContent:e>99?"99+":e,color:"error",children:x.jsx(er,{})}):x.jsx(er,{})}),Ga=dt(x.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),Ka=dt(x.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle"),Ha=dt(x.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),ur=({notification:e,onMarkAsRead:t,onDelete:r,onClick:n})=>{const o=e.read!==!0,i=()=>{n&&n(e)},c=p=>{p.stopPropagation(),t&&t(e.notificationId)},u=p=>{p.stopPropagation(),r&&r(e.notificationId)},f=e.payload||{},d=e.renderedContent?.inApp?.title||e.renderedContent?.push?.title||f.title||f.message||"Notification",m=e.renderedContent?.inApp?.message||e.renderedContent?.push?.body||f.message||"";return x.jsxs($.ListItem,{className:`cursor-pointer hover:bg-gray-50 ${o?"bg-blue-50":""}`,onClick:i,sx:{borderRadius:"8px",mb:.5,"&:hover":{backgroundColor:"action.hover"}},children:[x.jsx($.Box,{className:"mr-2",children:x.jsx(er,{color:o?"primary":"disabled"})}),x.jsx($.ListItemText,{primary:x.jsxs($.Box,{className:"flex items-center gap-2",children:[x.jsx("span",{className:"font-medium",children:d}),o&&x.jsx($.Chip,{label:"New",size:"small",color:"primary",className:"h-5 text-xs"})]}),secondary:m,primaryTypographyProps:{className:o?"font-semibold":""}}),x.jsx($.ListItemSecondaryAction,{children:x.jsxs($.Box,{className:"flex items-center gap-1",children:[o&&x.jsx($.IconButton,{edge:"end",size:"small",onClick:c,title:"Mark as read",children:x.jsx(Ka,{fontSize:"small"})}),x.jsx($.IconButton,{edge:"end",size:"small",onClick:u,title:"Delete",children:x.jsx(Ha,{fontSize:"small"})})]})})]})},Ja=dt(x.jsx("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"}),"NotificationsNone"),Nn=({message:e="No notifications",icon:t})=>x.jsxs($.Box,{className:"flex flex-col items-center justify-center p-8 text-center",sx:{minHeight:"200px"},children:[t||x.jsx(Ja,{sx:{fontSize:48,color:"text.secondary",mb:2}}),x.jsx($.Typography,{variant:"body2",color:"text.secondary",children:e})]});function tr(e){"@babel/helpers - typeof";return tr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tr(e)}function fr(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Oe(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function lt(e){Oe(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||tr(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Xa(e,t){Oe(2,arguments);var r=lt(e),n=fr(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}var Qa={};function Za(){return Qa}function ln(e,t){var r,n,o,i,c,u;Oe(1,arguments);var f=Za(),d=fr((r=(n=(o=(i=void 0)!==null&&i!==void 0?i:void 0)!==null&&o!==void 0?o:f.weekStartsOn)!==null&&n!==void 0?n:(c=f.locale)===null||c===void 0||(u=c.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=lt(e),p=m.getDay(),h=(p<d?7:0)+p-d;return m.setDate(m.getDate()-h),m.setHours(0,0,0,0),m}function un(e){Oe(1,arguments);var t=lt(e);return t.setHours(0,0,0,0),t}function jn(e,t){Oe(2,arguments);var r=un(e),n=un(t);return r.getTime()===n.getTime()}function es(e,t,r){Oe(2,arguments);var n=ln(e,r),o=ln(t,r);return n.getTime()===o.getTime()}function ts(e,t){Oe(2,arguments);var r=lt(e),n=lt(t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}function rs(e){return Oe(1,arguments),ts(Date.now(),e)}function ns(e,t){return Oe(1,arguments),es(e,Date.now(),t)}function os(e){return Oe(1,arguments),jn(e,Date.now())}function is(e,t){Oe(2,arguments);var r=fr(t);return Xa(e,-r)}function as(e){return Oe(1,arguments),jn(e,is(Date.now(),1))}const ss=({groupLabel:e,notifications:t,onMarkAsRead:r,onDelete:n,onClick:o})=>t.length===0?null:x.jsxs($.Box,{sx:{mb:2},children:[x.jsx($.Typography,{variant:"caption",sx:{color:"text.secondary",px:2,py:1,display:"block"},children:e}),x.jsx($.Divider,{sx:{mb:1}}),t.map(i=>x.jsx(ur,{notification:i,onMarkAsRead:r,onDelete:n,onClick:o},i.notificationId))]});function cs(e){const t={today:[],yesterday:[],thisWeek:[],thisMonth:[],older:[]};return e.forEach(r=>{const n=r.createdAt?new Date(r.createdAt):new Date;os(n)?t.today.push(r):as(n)?t.yesterday.push(r):ns(n)?t.thisWeek.push(r):rs(n)?t.thisMonth.push(r):t.older.push(r)}),t}function ls(e){switch(e){case"today":return"Today";case"yesterday":return"Yesterday";case"thisWeek":return"This Week";case"thisMonth":return"This Month";case"older":return"Older";default:return e}}const us=({client:e,subscriberId:t,tenantId:r,onClose:n})=>{const[o,i]=Z.useState({email:!0,push:!0,sms:!0,in_app:!0}),[c,u]=Z.useState({}),[f,d]=Z.useState(!1);Z.useEffect(()=>{m()},[]);const m=async()=>{try{const y=await e.preferences.get(r,t);i({email:y.emailEnabled,push:y.pushEnabled,sms:y.smsEnabled,in_app:y.inAppEnabled}),y.categories&&u(y.categories)}catch(y){console.error("Failed to load preferences:",y)}},p=async(y,b)=>{const l={...o,[y]:b};i(l);try{d(!0),await e.preferences.update(r,t,{emailEnabled:l.email,pushEnabled:l.push,smsEnabled:l.sms,inAppEnabled:l.in_app})}catch(T){console.error("Failed to update preferences:",T),i(S=>({...S,[y]:!b}))}finally{d(!1)}},h=async()=>{try{d(!0),await e.preferences.update(r,t,{emailEnabled:o.email,pushEnabled:o.push,smsEnabled:o.sms,inAppEnabled:o.in_app,categories:c}),n&&n()}catch(y){console.error("Failed to save preferences:",y)}finally{d(!1)}};return x.jsxs($.Box,{sx:{p:3,minWidth:300},children:[x.jsx($.Typography,{variant:"h6",gutterBottom:!0,children:"Notification Preferences"}),x.jsx($.Divider,{sx:{my:2}}),x.jsx($.Typography,{variant:"subtitle2",sx:{mb:2,fontWeight:"bold"},children:"Channels"}),x.jsx($.FormControlLabel,{control:x.jsx($.Switch,{checked:o.email,onChange:y=>p("email",y.target.checked),disabled:f}),label:"Email"}),x.jsx($.FormControlLabel,{control:x.jsx($.Switch,{checked:o.push,onChange:y=>p("push",y.target.checked),disabled:f}),label:"Push Notifications"}),x.jsx($.FormControlLabel,{control:x.jsx($.Switch,{checked:o.sms,onChange:y=>p("sms",y.target.checked),disabled:f}),label:"SMS"}),x.jsx($.FormControlLabel,{control:x.jsx($.Switch,{checked:o.in_app,onChange:y=>p("in_app",y.target.checked),disabled:f}),label:"In-App"}),x.jsxs($.Box,{sx:{mt:3,display:"flex",justifyContent:"flex-end",gap:1},children:[n&&x.jsx($.Button,{onClick:n,variant:"outlined",size:"small",children:"Cancel"}),x.jsx($.Button,{onClick:h,variant:"contained",size:"small",disabled:f,children:"Save"})]})]})},Dn=({notifications:e,loading:t=!1,error:r=null,onNotificationClick:n,onMarkAsRead:o,onDelete:i,subscriberId:c,tenantId:u,client:f,groupByDate:d=!0})=>{const[m,p]=Z.useState("all"),[h,y]=Z.useState(null),b=m==="unread"?e.filter(w=>w.read!==!0):e;if(t)return x.jsx($.Box,{className:"flex items-center justify-center p-8",children:x.jsx($.CircularProgress,{size:40})});if(r)return x.jsx($.Alert,{severity:"error",className:"m-4",children:r.message||"Failed to load notifications"});if(e.length===0)return x.jsx(Nn,{});const l=async w=>{o&&await o(w)},T=async w=>{i&&await i(w)},S=d?cs(b):{all:b};return x.jsxs($.Box,{children:[x.jsxs($.Box,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",px:2,py:1,borderBottom:1,borderColor:"divider"},children:[x.jsxs($.Tabs,{value:m,onChange:(w,k)=>p(k),children:[x.jsx($.Tab,{label:"All",value:"all"}),x.jsx($.Tab,{label:"Unread",value:"unread"})]}),f&&c&&u&&x.jsxs(x.Fragment,{children:[x.jsx($.IconButton,{size:"small",onClick:w=>y(w.currentTarget),title:"Preferences",children:x.jsx(Ga,{fontSize:"small"})}),x.jsx($.Popover,{open:!!h,anchorEl:h,onClose:()=>y(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},children:x.jsx(us,{client:f,subscriberId:c,tenantId:u,onClose:()=>y(null)})})]})]}),x.jsx($.List,{className:"max-h-96 overflow-y-auto",sx:{padding:0},children:d?Object.entries(S).map(([w,k])=>x.jsx(ss,{groupLabel:ls(w),notifications:k,onMarkAsRead:l,onDelete:T,onClick:n},w)):b.map(w=>x.jsx(ur,{notification:w,onMarkAsRead:l,onDelete:T,onClick:n},w.notificationId))})]})},fs=({client:e,tenantId:t,subscriberId:r,environmentId:n,position:o="top-right",maxNotifications:i=50,showUnreadBadge:c=!0,onNotificationClick:u,onMarkAsRead:f,onDelete:d,pollInterval:m})=>{const[p,h]=Z.useState(null),y=!!p,{notifications:b,loading:l,error:T,unreadCount:S,connected:w,markAsRead:k,deleteNotification:P}=pn({client:e,tenantId:t,subscriberId:r,environmentId:n,pollInterval:m}),E=_=>{h(_.currentTarget)},K=()=>{h(null)},ae=async _=>{await k(_),f&&await f(_)},re=async _=>{await P(_),d&&await d(_)},z=b.slice(0,i),a=()=>{const _={};return o.includes("top")?_.top="8px":_.bottom="8px",o.includes("right")?_.right="8px":_.left="8px",_};return x.jsxs(x.Fragment,{children:[x.jsx(In,{unreadCount:S,onClick:E,showBadge:c}),x.jsx($.Popover,{open:y,anchorEl:p,onClose:K,anchorOrigin:{vertical:o.includes("bottom")?"bottom":"top",horizontal:o.includes("right")?"right":"left"},transformOrigin:{vertical:o.includes("bottom")?"top":"bottom",horizontal:o.includes("right")?"right":"left"},PaperProps:{sx:{width:400,maxWidth:"90vw",maxHeight:"80vh",...a()}},children:x.jsxs($.Paper,{className:"notification-center",sx:{borderRadius:"15px",overflow:"hidden"},children:[x.jsx($.Box,{className:"p-4 border-b border-gray-200",children:x.jsxs($.Box,{className:"flex items-center justify-between",children:[x.jsx("h3",{className:"text-lg font-semibold",children:"Notifications"}),w&&x.jsxs($.Box,{className:"flex items-center gap-2",children:[x.jsx($.Box,{className:"w-2 h-2 bg-green-500 rounded-full",title:"Connected"}),x.jsx("span",{className:"text-xs text-gray-500",children:"Live"})]})]})}),x.jsx(Dn,{notifications:z,loading:l,error:T,onNotificationClick:u,onMarkAsRead:ae,onDelete:re,subscriberId:r,tenantId:t,client:e,groupByDate:!0})]})})]})},ds=$n({palette:{primary:{main:"#1E3A8A"},secondary:{main:"rgba(30, 58, 138, 0.75)"}},components:{MuiPaper:{styleOverrides:{root:{boxShadow:"none",borderRadius:"15px"}}},MuiTableContainer:{styleOverrides:{root:{border:"1px solid #E9EAEB",borderRadius:"15px","&::-webkit-scrollbar":{width:"8px",height:"8px"},"&::-webkit-scrollbar-thumb":{backgroundColor:"darkgray",borderRadius:"4px"},"&::-webkit-scrollbar-track":{backgroundColor:"transparent"},scrollbarWidth:"thin",scrollbarColor:"darkgray transparent"}}},MuiList:{styleOverrides:{root:{padding:0}}},MuiListItem:{styleOverrides:{root:{borderRadius:"8px",marginBottom:"4px"}}}}});exports.EmptyState=Nn;exports.NotificationBell=In;exports.NotificationCenter=fs;exports.NotificationItem=ur;exports.NotificationList=Dn;exports.notificationTheme=ds;exports.useNotificationCenter=pn;exports.useNotifications=fn;exports.useWebSocket=dn;
|
|
48
48
|
//# sourceMappingURL=index.cjs.js.map
|