@hari_digitus/sms-ui-library 7.0.5 → 7.0.7

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.
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Fe;function pr(){if(Fe)return Q;Fe=1;var S=w,P=Symbol.for("react.element"),h=Symbol.for("react.fragment"),C=Object.prototype.hasOwnProperty,k=S.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,N={key:!0,ref:!0,__self:!0,__source:!0};function I(m,d,D){var x,E={},T=null,Y=null;D!==void 0&&(T=""+D),d.key!==void 0&&(T=""+d.key),d.ref!==void 0&&(Y=d.ref);for(x in d)C.call(d,x)&&!N.hasOwnProperty(x)&&(E[x]=d[x]);if(m&&m.defaultProps)for(x in d=m.defaultProps,d)E[x]===void 0&&(E[x]=d[x]);return{$$typeof:P,type:m,key:T,ref:Y,props:E,_owner:k.current}}return Q.Fragment=h,Q.jsx=I,Q.jsxs=I,Q}var ee={};/**
9
+ */var Fe;function pr(){if(Fe)return Q;Fe=1;var S=w,P=Symbol.for("react.element"),h=Symbol.for("react.fragment"),C=Object.prototype.hasOwnProperty,k=S.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,N={key:!0,ref:!0,__self:!0,__source:!0};function I(m,d,D){var x,E={},T=null,B=null;D!==void 0&&(T=""+D),d.key!==void 0&&(T=""+d.key),d.ref!==void 0&&(B=d.ref);for(x in d)C.call(d,x)&&!N.hasOwnProperty(x)&&(E[x]=d[x]);if(m&&m.defaultProps)for(x in d=m.defaultProps,d)E[x]===void 0&&(E[x]=d[x]);return{$$typeof:P,type:m,key:T,ref:B,props:E,_owner:k.current}}return Q.Fragment=h,Q.jsx=I,Q.jsxs=I,Q}var ee={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,17 +14,17 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Me;function vr(){return Me||(Me=1,process.env.NODE_ENV!=="production"&&(function(){var S=w,P=Symbol.for("react.element"),h=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),I=Symbol.for("react.provider"),m=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),Y=Symbol.for("react.offscreen"),y=Symbol.iterator,re="@@iterator";function B(e){if(e===null||typeof e!="object")return null;var r=y&&e[y]||e[re];return typeof r=="function"?r:null}var F=S.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function p(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];fe("error",e,t)}}function fe(e,r,t){{var a=F.ReactDebugCurrentFrame,s=a.getStackAddendum();s!==""&&(r+="%s",t=t.concat([s]));var u=t.map(function(o){return String(o)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var de=!1,ne=!1,pe=!1,te=!1,ae=!1,M;M=Symbol.for("react.module.reference");function q(e){return!!(typeof e=="string"||typeof e=="function"||e===C||e===N||ae||e===k||e===D||e===x||te||e===Y||de||ne||pe||typeof e=="object"&&e!==null&&(e.$$typeof===T||e.$$typeof===E||e.$$typeof===I||e.$$typeof===m||e.$$typeof===d||e.$$typeof===M||e.getModuleId!==void 0))}function ie(e,r,t){var a=e.displayName;if(a)return a;var s=r.displayName||r.name||"";return s!==""?t+"("+s+")":t}function J(e){return e.displayName||"Context"}function O(e){if(e==null)return null;if(typeof e.tag=="number"&&p("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case h:return"Portal";case N:return"Profiler";case k:return"StrictMode";case D:return"Suspense";case x:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case m:var r=e;return J(r)+".Consumer";case I:var t=e;return J(t._context)+".Provider";case d:return ie(e,e.render,"ForwardRef");case E:var a=e.displayName||null;return a!==null?a:O(e.type)||"Memo";case T:{var s=e,u=s._payload,o=s._init;try{return O(o(u))}catch{return null}}}return null}var A=Object.assign,$=0,v,_,L,l,H,K,G;function z(){}z.__reactDisabledLog=!0;function b(){{if($===0){v=console.log,_=console.info,L=console.warn,l=console.error,H=console.group,K=console.groupCollapsed,G=console.groupEnd;var e={configurable:!0,enumerable:!0,value:z,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}$++}}function ve(){{if($--,$===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},e,{value:v}),info:A({},e,{value:_}),warn:A({},e,{value:L}),error:A({},e,{value:l}),group:A({},e,{value:H}),groupCollapsed:A({},e,{value:K}),groupEnd:A({},e,{value:G})})}$<0&&p("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var X=F.ReactCurrentDispatcher,he;function oe(e,r,t){{if(he===void 0)try{throw Error()}catch(s){var a=s.stack.trim().match(/\n( *(at )?)/);he=a&&a[1]||""}return`
18
- `+he+e}}var me=!1,se;{var Be=typeof WeakMap=="function"?WeakMap:Map;se=new Be}function Ee(e,r){if(!e||me)return"";{var t=se.get(e);if(t!==void 0)return t}var a;me=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=X.current,X.current=null,b();try{if(r){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(j){a=j}Reflect.construct(e,[],o)}else{try{o.call()}catch(j){a=j}e.call(o.prototype)}}else{try{throw Error()}catch(j){a=j}e()}}catch(j){if(j&&a&&typeof j.stack=="string"){for(var i=j.stack.split(`
19
- `),g=a.stack.split(`
20
- `),c=i.length-1,f=g.length-1;c>=1&&f>=0&&i[c]!==g[f];)f--;for(;c>=1&&f>=0;c--,f--)if(i[c]!==g[f]){if(c!==1||f!==1)do if(c--,f--,f<0||i[c]!==g[f]){var R=`
21
- `+i[c].replace(" at new "," at ");return e.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",e.displayName)),typeof e=="function"&&se.set(e,R),R}while(c>=1&&f>=0);break}}}finally{me=!1,X.current=u,ve(),Error.prepareStackTrace=s}var V=e?e.displayName||e.name:"",W=V?oe(V):"";return typeof e=="function"&&se.set(e,W),W}function Ue(e,r,t){return Ee(e,!1)}function Ve(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function le(e,r,t){if(e==null)return"";if(typeof e=="function")return Ee(e,Ve(e));if(typeof e=="string")return oe(e);switch(e){case D:return oe("Suspense");case x:return oe("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case d:return Ue(e.render);case E:return le(e.type,r,t);case T:{var a=e,s=a._payload,u=a._init;try{return le(u(s),r,t)}catch{}}}return""}var Z=Object.prototype.hasOwnProperty,Re={},Ce=F.ReactDebugCurrentFrame;function ue(e){if(e){var r=e._owner,t=le(e.type,e._source,r?r.type:null);Ce.setExtraStackFrame(t)}else Ce.setExtraStackFrame(null)}function qe(e,r,t,a,s){{var u=Function.call.bind(Z);for(var o in e)if(u(e,o)){var i=void 0;try{if(typeof e[o]!="function"){var g=Error((a||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw g.name="Invariant Violation",g}i=e[o](r,o,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(c){i=c}i&&!(i instanceof Error)&&(ue(s),p("%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).",a||"React class",t,o,typeof i),ue(null)),i instanceof Error&&!(i.message in Re)&&(Re[i.message]=!0,ue(s),p("Failed %s type: %s",t,i.message),ue(null))}}}var Je=Array.isArray;function xe(e){return Je(e)}function He(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Ke(e){try{return _e(e),!1}catch{return!0}}function _e(e){return""+e}function we(e){if(Ke(e))return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",He(e)),_e(e)}var Se=F.ReactCurrentOwner,Ge={key:!0,ref:!0,__self:!0,__source:!0},Te,Oe;function ze(e){if(Z.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Xe(e){if(Z.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Ze(e,r){typeof e.ref=="string"&&Se.current}function Qe(e,r){{var t=function(){Te||(Te=!0,p("%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)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function er(e,r){{var t=function(){Oe||(Oe=!0,p("%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)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var rr=function(e,r,t,a,s,u,o){var i={$$typeof:P,type:e,key:r,ref:t,props:o,_owner:u};return i._store={},Object.defineProperty(i._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(i,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(i,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(i.props),Object.freeze(i)),i};function nr(e,r,t,a,s){{var u,o={},i=null,g=null;t!==void 0&&(we(t),i=""+t),Xe(r)&&(we(r.key),i=""+r.key),ze(r)&&(g=r.ref,Ze(r,s));for(u in r)Z.call(r,u)&&!Ge.hasOwnProperty(u)&&(o[u]=r[u]);if(e&&e.defaultProps){var c=e.defaultProps;for(u in c)o[u]===void 0&&(o[u]=c[u])}if(i||g){var f=typeof e=="function"?e.displayName||e.name||"Unknown":e;i&&Qe(o,f),g&&er(o,f)}return rr(e,i,g,s,a,Se.current,o)}}var be=F.ReactCurrentOwner,Pe=F.ReactDebugCurrentFrame;function U(e){if(e){var r=e._owner,t=le(e.type,e._source,r?r.type:null);Pe.setExtraStackFrame(t)}else Pe.setExtraStackFrame(null)}var ge;ge=!1;function je(e){return typeof e=="object"&&e!==null&&e.$$typeof===P}function ke(){{if(be.current){var e=O(be.current.type);if(e)return`
17
+ */var Me;function vr(){return Me||(Me=1,process.env.NODE_ENV!=="production"&&(function(){var S=w,P=Symbol.for("react.element"),h=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),I=Symbol.for("react.provider"),m=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),B=Symbol.for("react.offscreen"),b=Symbol.iterator,re="@@iterator";function Y(e){if(e===null||typeof e!="object")return null;var r=b&&e[b]||e[re];return typeof r=="function"?r:null}var F=S.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function p(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];fe("error",e,t)}}function fe(e,r,t){{var a=F.ReactDebugCurrentFrame,s=a.getStackAddendum();s!==""&&(r+="%s",t=t.concat([s]));var u=t.map(function(o){return String(o)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var de=!1,ne=!1,pe=!1,te=!1,ae=!1,M;M=Symbol.for("react.module.reference");function q(e){return!!(typeof e=="string"||typeof e=="function"||e===C||e===N||ae||e===k||e===D||e===x||te||e===B||de||ne||pe||typeof e=="object"&&e!==null&&(e.$$typeof===T||e.$$typeof===E||e.$$typeof===I||e.$$typeof===m||e.$$typeof===d||e.$$typeof===M||e.getModuleId!==void 0))}function ie(e,r,t){var a=e.displayName;if(a)return a;var s=r.displayName||r.name||"";return s!==""?t+"("+s+")":t}function J(e){return e.displayName||"Context"}function O(e){if(e==null)return null;if(typeof e.tag=="number"&&p("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case h:return"Portal";case N:return"Profiler";case k:return"StrictMode";case D:return"Suspense";case x:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case m:var r=e;return J(r)+".Consumer";case I:var t=e;return J(t._context)+".Provider";case d:return ie(e,e.render,"ForwardRef");case E:var a=e.displayName||null;return a!==null?a:O(e.type)||"Memo";case T:{var s=e,u=s._payload,o=s._init;try{return O(o(u))}catch{return null}}}return null}var A=Object.assign,$=0,v,_,L,l,H,K,G;function z(){}z.__reactDisabledLog=!0;function g(){{if($===0){v=console.log,_=console.info,L=console.warn,l=console.error,H=console.group,K=console.groupCollapsed,G=console.groupEnd;var e={configurable:!0,enumerable:!0,value:z,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}$++}}function ve(){{if($--,$===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:A({},e,{value:v}),info:A({},e,{value:_}),warn:A({},e,{value:L}),error:A({},e,{value:l}),group:A({},e,{value:H}),groupCollapsed:A({},e,{value:K}),groupEnd:A({},e,{value:G})})}$<0&&p("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var X=F.ReactCurrentDispatcher,he;function oe(e,r,t){{if(he===void 0)try{throw Error()}catch(s){var a=s.stack.trim().match(/\n( *(at )?)/);he=a&&a[1]||""}return`
18
+ `+he+e}}var me=!1,se;{var Ye=typeof WeakMap=="function"?WeakMap:Map;se=new Ye}function Ee(e,r){if(!e||me)return"";{var t=se.get(e);if(t!==void 0)return t}var a;me=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=X.current,X.current=null,g();try{if(r){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(y){a=y}Reflect.construct(e,[],o)}else{try{o.call()}catch(y){a=y}e.call(o.prototype)}}else{try{throw Error()}catch(y){a=y}e()}}catch(y){if(y&&a&&typeof y.stack=="string"){for(var i=y.stack.split(`
19
+ `),j=a.stack.split(`
20
+ `),c=i.length-1,f=j.length-1;c>=1&&f>=0&&i[c]!==j[f];)f--;for(;c>=1&&f>=0;c--,f--)if(i[c]!==j[f]){if(c!==1||f!==1)do if(c--,f--,f<0||i[c]!==j[f]){var R=`
21
+ `+i[c].replace(" at new "," at ");return e.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",e.displayName)),typeof e=="function"&&se.set(e,R),R}while(c>=1&&f>=0);break}}}finally{me=!1,X.current=u,ve(),Error.prepareStackTrace=s}var V=e?e.displayName||e.name:"",W=V?oe(V):"";return typeof e=="function"&&se.set(e,W),W}function Ue(e,r,t){return Ee(e,!1)}function Ve(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function le(e,r,t){if(e==null)return"";if(typeof e=="function")return Ee(e,Ve(e));if(typeof e=="string")return oe(e);switch(e){case D:return oe("Suspense");case x:return oe("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case d:return Ue(e.render);case E:return le(e.type,r,t);case T:{var a=e,s=a._payload,u=a._init;try{return le(u(s),r,t)}catch{}}}return""}var Z=Object.prototype.hasOwnProperty,Re={},Ce=F.ReactDebugCurrentFrame;function ue(e){if(e){var r=e._owner,t=le(e.type,e._source,r?r.type:null);Ce.setExtraStackFrame(t)}else Ce.setExtraStackFrame(null)}function qe(e,r,t,a,s){{var u=Function.call.bind(Z);for(var o in e)if(u(e,o)){var i=void 0;try{if(typeof e[o]!="function"){var j=Error((a||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw j.name="Invariant Violation",j}i=e[o](r,o,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(c){i=c}i&&!(i instanceof Error)&&(ue(s),p("%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).",a||"React class",t,o,typeof i),ue(null)),i instanceof Error&&!(i.message in Re)&&(Re[i.message]=!0,ue(s),p("Failed %s type: %s",t,i.message),ue(null))}}}var Je=Array.isArray;function xe(e){return Je(e)}function He(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Ke(e){try{return _e(e),!1}catch{return!0}}function _e(e){return""+e}function we(e){if(Ke(e))return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",He(e)),_e(e)}var Se=F.ReactCurrentOwner,Ge={key:!0,ref:!0,__self:!0,__source:!0},Te,Oe;function ze(e){if(Z.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Xe(e){if(Z.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Ze(e,r){typeof e.ref=="string"&&Se.current}function Qe(e,r){{var t=function(){Te||(Te=!0,p("%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)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function er(e,r){{var t=function(){Oe||(Oe=!0,p("%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)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var rr=function(e,r,t,a,s,u,o){var i={$$typeof:P,type:e,key:r,ref:t,props:o,_owner:u};return i._store={},Object.defineProperty(i._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(i,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(i,"_source",{configurable:!1,enumerable:!1,writable:!1,value:s}),Object.freeze&&(Object.freeze(i.props),Object.freeze(i)),i};function nr(e,r,t,a,s){{var u,o={},i=null,j=null;t!==void 0&&(we(t),i=""+t),Xe(r)&&(we(r.key),i=""+r.key),ze(r)&&(j=r.ref,Ze(r,s));for(u in r)Z.call(r,u)&&!Ge.hasOwnProperty(u)&&(o[u]=r[u]);if(e&&e.defaultProps){var c=e.defaultProps;for(u in c)o[u]===void 0&&(o[u]=c[u])}if(i||j){var f=typeof e=="function"?e.displayName||e.name||"Unknown":e;i&&Qe(o,f),j&&er(o,f)}return rr(e,i,j,s,a,Se.current,o)}}var be=F.ReactCurrentOwner,Pe=F.ReactDebugCurrentFrame;function U(e){if(e){var r=e._owner,t=le(e.type,e._source,r?r.type:null);Pe.setExtraStackFrame(t)}else Pe.setExtraStackFrame(null)}var ge;ge=!1;function je(e){return typeof e=="object"&&e!==null&&e.$$typeof===P}function ke(){{if(be.current){var e=O(be.current.type);if(e)return`
22
22
 
23
23
  Check the render method of \``+e+"`."}return""}}function tr(e){return""}var Ne={};function ar(e){{var r=ke();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
24
24
 
25
- Check the top-level render call using <`+t+">.")}return r}}function Ie(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=ar(r);if(Ne[t])return;Ne[t]=!0;var a="";e&&e._owner&&e._owner!==be.current&&(a=" It was passed a child from "+O(e._owner.type)+"."),U(e),p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,a),U(null)}}function De(e,r){{if(typeof e!="object")return;if(xe(e))for(var t=0;t<e.length;t++){var a=e[t];je(a)&&Ie(a,r)}else if(je(e))e._store&&(e._store.validated=!0);else if(e){var s=B(e);if(typeof s=="function"&&s!==e.entries)for(var u=s.call(e),o;!(o=u.next()).done;)je(o.value)&&Ie(o.value,r)}}}function ir(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===d||r.$$typeof===E))t=r.propTypes;else return;if(t){var a=O(r);qe(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!ge){ge=!0;var s=O(r);p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",s||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function or(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var a=r[t];if(a!=="children"&&a!=="key"){U(e),p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),U(null);break}}e.ref!==null&&(U(e),p("Invalid attribute `ref` supplied to `React.Fragment`."),U(null))}}var Ae={};function Le(e,r,t,a,s,u){{var o=q(e);if(!o){var i="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(i+=" 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 g=tr();g?i+=g:i+=ke();var c;e===null?c="null":xe(e)?c="array":e!==void 0&&e.$$typeof===P?(c="<"+(O(e.type)||"Unknown")+" />",i=" Did you accidentally export a JSX literal instead of a component?"):c=typeof e,p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",c,i)}var f=nr(e,r,t,s,u);if(f==null)return f;if(o){var R=r.children;if(R!==void 0)if(a)if(xe(R)){for(var V=0;V<R.length;V++)De(R[V],e);Object.freeze&&Object.freeze(R)}else p("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 De(R,e)}if(Z.call(r,"key")){var W=O(e),j=Object.keys(r).filter(function(dr){return dr!=="key"}),ye=j.length>0?"{key: someKey, "+j.join(": ..., ")+": ...}":"{key: someKey}";if(!Ae[W+ye]){var fr=j.length>0?"{"+j.join(": ..., ")+": ...}":"{}";p(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+t+">.")}return r}}function Ie(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=ar(r);if(Ne[t])return;Ne[t]=!0;var a="";e&&e._owner&&e._owner!==be.current&&(a=" It was passed a child from "+O(e._owner.type)+"."),U(e),p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,a),U(null)}}function De(e,r){{if(typeof e!="object")return;if(xe(e))for(var t=0;t<e.length;t++){var a=e[t];je(a)&&Ie(a,r)}else if(je(e))e._store&&(e._store.validated=!0);else if(e){var s=Y(e);if(typeof s=="function"&&s!==e.entries)for(var u=s.call(e),o;!(o=u.next()).done;)je(o.value)&&Ie(o.value,r)}}}function ir(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===d||r.$$typeof===E))t=r.propTypes;else return;if(t){var a=O(r);qe(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!ge){ge=!0;var s=O(r);p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",s||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function or(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var a=r[t];if(a!=="children"&&a!=="key"){U(e),p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),U(null);break}}e.ref!==null&&(U(e),p("Invalid attribute `ref` supplied to `React.Fragment`."),U(null))}}var Ae={};function Le(e,r,t,a,s,u){{var o=q(e);if(!o){var i="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(i+=" 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 j=tr();j?i+=j:i+=ke();var c;e===null?c="null":xe(e)?c="array":e!==void 0&&e.$$typeof===P?(c="<"+(O(e.type)||"Unknown")+" />",i=" Did you accidentally export a JSX literal instead of a component?"):c=typeof e,p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",c,i)}var f=nr(e,r,t,s,u);if(f==null)return f;if(o){var R=r.children;if(R!==void 0)if(a)if(xe(R)){for(var V=0;V<R.length;V++)De(R[V],e);Object.freeze&&Object.freeze(R)}else p("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 De(R,e)}if(Z.call(r,"key")){var W=O(e),y=Object.keys(r).filter(function(dr){return dr!=="key"}),ye=y.length>0?"{key: someKey, "+y.join(": ..., ")+": ...}":"{key: someKey}";if(!Ae[W+ye]){var fr=y.length>0?"{"+y.join(": ..., ")+": ...}":"{}";p(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,ye,W,fr,W),Ae[W+ye]=!0}}return e===C?or(f):ir(f),f}}function sr(e,r,t){return Le(e,r,t,!0)}function lr(e,r,t){return Le(e,r,t,!1)}var ur=lr,cr=sr;ee.Fragment=C,ee.jsx=ur,ee.jsxs=cr})()),ee}var $e;function hr(){return $e||($e=1,process.env.NODE_ENV==="production"?ce.exports=pr():ce.exports=vr()),ce.exports}var n=hr();const We=w.createContext(null),mr=({children:S})=>{const[P,h]=w.useState(!0),[C,k]=w.useState(null),N=()=>{h(m=>!m),k(null)},I=m=>{k(d=>d===m?null:m)};return n.jsx(We.Provider,{value:{isExpanded:P,toggleSidebar:N,openSubmenu:C,toggleSubmenu:I},children:S})},Ye=()=>{const S=w.useContext(We);if(!S)throw new Error("useSidebar must be used inside <SidebarProvider>");return S},xr=()=>n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[n.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20.3334 7C20.3334 7.55228 20.0072 8 19.6048 8L4.06194 8C3.65957 8 3.33337 7.55228 3.33337 7C3.33337 6.44772 3.65957 6 4.06194 6L19.6048 6C20.0072 6 20.3334 6.44772 20.3334 7Z",fill:"white"}),n.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20.3334 12C20.3334 12.5523 20.0072 13 19.6048 13L4.06194 13C3.65957 13 3.33337 12.5523 3.33337 12C3.33337 11.4477 3.65957 11 4.06194 11L19.6048 11C20.0072 11 20.3334 11.4477 20.3334 12Z",fill:"white"}),n.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20.3334 17C20.3334 17.5523 20.0072 18 19.6048 18L4.06194 18C3.65957 18 3.33337 17.5523 3.33337 17C3.33337 16.4477 3.65957 16 4.06194 16L19.6048 16C20.0072 16 20.3334 16.4477 20.3334 17Z",fill:"white"})]}),br=()=>n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),n.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),gr=()=>n.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),n.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),jr=()=>n.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",children:[n.jsx("rect",{width:"32",height:"32",rx:"8",fill:"currentColor",opacity:"0.15"}),n.jsx("circle",{cx:"16",cy:"16",r:"6",fill:"currentColor"})]}),yr=()=>n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}),n.jsx("polyline",{points:"16 17 21 12 16 7"}),n.jsx("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]}),Er=({config:S})=>{const{navItems:P,user:h,createButtonRoles:C,createButtonLabel:k="Create",createButtonPath:N,brandName:I="Amphenol",brandSubtitle:m="COMMUNICATION SOLUTIONS",logo:d,helpLabel:D="Help Center",helpIcon:x,onSignOut:E,onNavigate:T,className:Y=""}=S,{isExpanded:y,toggleSidebar:re,openSubmenu:B,toggleSubmenu:F}=Ye(),[p,fe]=w.useState(window.location.pathname),[de,ne]=w.useState(!1),[pe,te]=w.useState(!1),[ae,M]=w.useState(null);w.useEffect(()=>{const v=()=>fe(window.location.pathname);return window.addEventListener("popstate",v),()=>window.removeEventListener("popstate",v)},[]);const q=(v,_)=>{v.preventDefault(),_&&(T?T(_):(window.history.pushState({},"",_),window.dispatchEvent(new PopStateEvent("popstate"))))},ie=()=>h.email?h.email.split("@")[0]:"User",J=()=>h.email?h.email.charAt(0).toUpperCase():"U",O=()=>{E?E():window.location.href="/c/portal/logout"},A=!C||C.includes(h.role),$=P.reduce((v,_)=>{const L=_.section||"GENERAL";return v[L]||(v[L]=[]),v[L].push(_),v},{});return n.jsxs("aside",{style:{backgroundColor:"#0f172a",overflowY:"hidden"},className:`rdr-sidebar ${y?"expanded":"collapsed"} ${Y}`,children:[n.jsxs("div",{className:"sidebar-header ",style:{paddingTop:"10px"},children:[n.jsxs("div",{className:"logo-section",onClick:re,children:[n.jsx("span",{className:"logo-icon ",style:{color:"var(--sidebar-accent)",marginTop:"15px"},children:d??n.jsx(jr,{})}),y&&n.jsxs("div",{className:"brand-text",children:[n.jsx("h2",{children:I}),m&&n.jsx("span",{children:m})]})]}),y&&n.jsx("button",{className:"menu-toggle",onClick:re,"aria-label":"Collapse sidebar",children:n.jsx(xr,{})})]}),A&&N&&n.jsx("div",{className:"sidebar-actions",children:n.jsxs("button",{className:"sidebar-create-btn",style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",width:"100%",height:"44px",padding:"0 16px",borderRadius:"10px",border:"none",outline:"none",boxShadow:"none",cursor:"pointer",fontSize:"14px",fontWeight:600,color:"#fff",background:pe?"#149B6E":"#18B885",transition:"background-color 0.2s ease"},onMouseEnter:()=>te(!0),onMouseLeave:()=>te(!1),onClick:v=>q(v,N),children:[n.jsx(br,{}),y&&n.jsx("span",{children:k})]})}),n.jsx("div",{className:"sidebar-nav",children:Object.entries($).map(([v,_])=>{const L=_.filter(l=>!l.roles||l.roles.includes(h.role));return L.length?n.jsxs("div",{className:"nav-section",style:{listStyleType:"none"},children:[y&&n.jsx("h4",{className:"section-title",children:v}),n.jsx("ul",{className:"nav-items",children:L.map(l=>{var G,z;const H=(G=l.subItems)==null?void 0:G.some(b=>b.path&&p.includes(b.path)),K=l.path?p===l.path:!1;return n.jsx("li",{children:(z=l.subItems)!=null&&z.length?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:`nav-item ${B===l.name||H?"active":""}`,"data-label":l.name,onClick:()=>F(l.name),onMouseEnter:()=>M(l.name),onMouseLeave:()=>M(null),style:B===l.name||H||ae===l.name?{backgroundColor:"#10B981",border:"1px solid #10B981",borderRadius:"8px"}:{},children:[n.jsx("span",{className:"nav-icon",children:l.icon}),y&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"nav-text",children:l.name}),n.jsx("span",{className:"submenu-arrow",children:B===l.name?"−":"+"})]})]}),y&&B===l.name&&n.jsx("ul",{className:"submenu",children:l.subItems.map(b=>{const ve=b.path?p===b.path:!1;return n.jsx("li",{children:n.jsxs("a",{href:b.path||"/",onClick:X=>q(X,b.path),className:`submenu-item ${ve?"active-sub":""}`,children:[b.icon&&n.jsx("span",{className:"submenu-icon",children:b.icon}),n.jsx("span",{children:b.name})]})},b.name)})})]}):n.jsxs("a",{href:l.path||"/","data-label":l.name,onClick:b=>q(b,l.path),style:K||ae===l.name?{backgroundColor:"#10B981",border:"1px solid #10B981",borderRadius:"8px"}:{},onMouseEnter:()=>M(l.name),onMouseLeave:()=>M(null),className:`nav-item ${K?"active":""}`,children:[n.jsx("span",{className:"nav-icon",children:l.icon}),y&&n.jsx("span",{className:"nav-text",children:l.name})]})},l.name)})})]},v):null})}),n.jsxs("div",{className:"sidebar-footer",children:[n.jsxs("div",{className:"footer-link","data-label":D,children:[n.jsx("span",{children:x??n.jsx(gr,{})}),y&&n.jsx("span",{children:D})]}),n.jsxs("div",{className:"user-profile-wrapper",children:[n.jsxs("div",{className:"user-profile",onClick:()=>ne(v=>!v),children:[n.jsx("div",{className:"avatar",children:J()}),y&&n.jsxs("div",{className:"user-info",children:[n.jsx("div",{className:"user-name",children:ie()}),n.jsx("div",{className:"user-role",children:h.roleName})]})]}),de&&n.jsxs("div",{className:"profile-popup",children:[n.jsx("button",{className:"popup-close",onClick:()=>ne(!1),"aria-label":"Close",children:"✕"}),n.jsxs("div",{className:"popup-header",children:[n.jsx("div",{className:"popup-avatar",children:J()}),n.jsxs("div",{className:"popup-user-details",children:[n.jsx("div",{className:"popup-name",children:ie()}),n.jsx("div",{className:"popup-role",children:h.roleName}),n.jsx("div",{className:"popup-email",children:h.email})]})]}),n.jsx("div",{className:"popup-divider"}),n.jsxs("button",{className:"signout-btn",onClick:O,children:[n.jsx(yr,{}),n.jsx("span",{children:"Sign Out"})]})]})]})]})]})};exports.SideNavbar=Er;exports.SidebarProvider=mr;exports.useSidebar=Ye;
30
+ <%s key={someKey} {...props} />`,ye,W,fr,W),Ae[W+ye]=!0}}return e===C?or(f):ir(f),f}}function sr(e,r,t){return Le(e,r,t,!0)}function lr(e,r,t){return Le(e,r,t,!1)}var ur=lr,cr=sr;ee.Fragment=C,ee.jsx=ur,ee.jsxs=cr})()),ee}var $e;function hr(){return $e||($e=1,process.env.NODE_ENV==="production"?ce.exports=pr():ce.exports=vr()),ce.exports}var n=hr();const We=w.createContext(null),mr=({children:S})=>{const[P,h]=w.useState(!0),[C,k]=w.useState(null),N=()=>{h(m=>!m),k(null)},I=m=>{k(d=>d===m?null:m)};return n.jsx(We.Provider,{value:{isExpanded:P,toggleSidebar:N,openSubmenu:C,toggleSubmenu:I},children:S})},Be=()=>{const S=w.useContext(We);if(!S)throw new Error("useSidebar must be used inside <SidebarProvider>");return S},xr=()=>n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",children:[n.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20.3334 7C20.3334 7.55228 20.0072 8 19.6048 8L4.06194 8C3.65957 8 3.33337 7.55228 3.33337 7C3.33337 6.44772 3.65957 6 4.06194 6L19.6048 6C20.0072 6 20.3334 6.44772 20.3334 7Z",fill:"white"}),n.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20.3334 12C20.3334 12.5523 20.0072 13 19.6048 13L4.06194 13C3.65957 13 3.33337 12.5523 3.33337 12C3.33337 11.4477 3.65957 11 4.06194 11L19.6048 11C20.0072 11 20.3334 11.4477 20.3334 12Z",fill:"white"}),n.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20.3334 17C20.3334 17.5523 20.0072 18 19.6048 18L4.06194 18C3.65957 18 3.33337 17.5523 3.33337 17C3.33337 16.4477 3.65957 16 4.06194 16L19.6048 16C20.0072 16 20.3334 16.4477 20.3334 17Z",fill:"white"})]}),br=()=>n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),n.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),gr=()=>n.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("circle",{cx:"12",cy:"12",r:"10"}),n.jsx("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),n.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),jr=()=>n.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",children:[n.jsx("rect",{width:"32",height:"32",rx:"8",fill:"currentColor",opacity:"0.15"}),n.jsx("circle",{cx:"16",cy:"16",r:"6",fill:"currentColor"})]}),yr=()=>n.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[n.jsx("path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}),n.jsx("polyline",{points:"16 17 21 12 16 7"}),n.jsx("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]}),Er=({config:S})=>{const{navItems:P,user:h,createButtonRoles:C,createButtonLabel:k="Create",createButtonPath:N,brandName:I="Amphenol",brandSubtitle:m="COMMUNICATION SOLUTIONS",logo:d,helpLabel:D="Help Center",helpIcon:x,onSignOut:E,onNavigate:T,className:B=""}=S,{isExpanded:b,toggleSidebar:re,openSubmenu:Y,toggleSubmenu:F}=Be(),[p,fe]=w.useState(window.location.pathname),[de,ne]=w.useState(!1),[pe,te]=w.useState(!1),[ae,M]=w.useState(null);w.useEffect(()=>{const v=()=>fe(window.location.pathname);return window.addEventListener("popstate",v),()=>window.removeEventListener("popstate",v)},[]);const q=(v,_)=>{v.preventDefault(),_&&(T?T(_):(window.history.pushState({},"",_),window.dispatchEvent(new PopStateEvent("popstate"))))},ie=()=>h.email?h.email.split("@")[0]:"User",J=()=>h.email?h.email.charAt(0).toUpperCase():"U",O=()=>{E?E():window.location.href="/c/portal/logout"},A=!C||C.includes(h.role),$=P.reduce((v,_)=>{const L=_.section||"GENERAL";return v[L]||(v[L]=[]),v[L].push(_),v},{});return n.jsxs("aside",{style:{backgroundColor:"#0f172a"},className:`rdr-sidebar ${b?"expanded":"collapsed"} ${B}`,children:[n.jsxs("div",{className:"sidebar-header ",style:{paddingTop:"10px"},children:[n.jsxs("div",{className:"logo-section",onClick:re,children:[n.jsx("span",{className:"logo-icon ",style:{color:"var(--sidebar-accent)",marginTop:"15px"},children:d??n.jsx(jr,{})}),b&&n.jsxs("div",{className:"brand-text",children:[n.jsx("h2",{children:I}),m&&n.jsx("span",{children:m})]})]}),b&&n.jsx("button",{className:"menu-toggle",onClick:re,"aria-label":"Collapse sidebar",children:n.jsx(xr,{})})]}),A&&N&&n.jsx("div",{className:"sidebar-actions",children:n.jsxs("button",{className:"sidebar-create-btn",style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",width:b?"100%":"44px",height:"44px",padding:b?"0 16px":"0",borderRadius:"10px",border:"none",outline:"none",boxShadow:"none",cursor:"pointer",fontSize:"14px",fontWeight:600,color:"#fff",background:pe?"#149B6E":"#18B885",transition:"background-color 0.2s ease"},onMouseEnter:()=>te(!0),onMouseLeave:()=>te(!1),onClick:v=>q(v,N),children:[n.jsx(br,{}),b&&n.jsx("span",{children:k})]})}),n.jsx("div",{className:"sidebar-nav",children:Object.entries($).map(([v,_])=>{const L=_.filter(l=>!l.roles||l.roles.includes(h.role));return L.length?n.jsxs("div",{className:"nav-section",style:{listStyleType:"none"},children:[b&&n.jsx("h4",{className:"section-title",children:v}),n.jsx("ul",{className:"nav-items",children:L.map(l=>{var G,z;const H=(G=l.subItems)==null?void 0:G.some(g=>g.path&&p.includes(g.path)),K=l.path?p===l.path:!1;return n.jsx("li",{children:(z=l.subItems)!=null&&z.length?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:`nav-item ${Y===l.name||H?"active":""}`,"data-label":l.name,onClick:()=>F(l.name),onMouseEnter:()=>M(l.name),onMouseLeave:()=>M(null),style:Y===l.name||H||ae===l.name?{backgroundColor:"#10B981",border:"1px solid #10B981",borderRadius:"8px"}:{},children:[n.jsx("span",{className:"nav-icon",children:l.icon}),b&&n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"nav-text",children:l.name}),n.jsx("span",{className:"submenu-arrow",children:Y===l.name?"−":"+"})]})]}),b&&Y===l.name&&n.jsx("ul",{className:"submenu",children:l.subItems.map(g=>{const ve=g.path?p===g.path:!1;return n.jsx("li",{children:n.jsxs("a",{href:g.path||"/",onClick:X=>q(X,g.path),className:`submenu-item ${ve?"active-sub":""}`,children:[g.icon&&n.jsx("span",{className:"submenu-icon",children:g.icon}),n.jsx("span",{children:g.name})]})},g.name)})})]}):n.jsxs("a",{href:l.path||"/","data-label":l.name,onClick:g=>q(g,l.path),style:K||ae===l.name?{backgroundColor:"#10B981",border:"none",borderRadius:"8px",outline:"1px solid #10B981",outlineOffset:"0px"}:{border:"none"},onMouseEnter:()=>M(l.name),onMouseLeave:()=>M(null),className:`nav-item ${K?"active":""}`,children:[n.jsx("span",{className:"nav-icon",children:l.icon}),b&&n.jsx("span",{className:"nav-text",children:l.name})]})},l.name)})})]},v):null})}),n.jsxs("div",{className:"sidebar-footer",children:[n.jsxs("div",{className:"footer-link","data-label":D,children:[n.jsx("span",{children:x??n.jsx(gr,{})}),b&&n.jsx("span",{children:D})]}),n.jsxs("div",{className:"user-profile-wrapper",children:[n.jsxs("div",{className:"user-profile",onClick:()=>ne(v=>!v),children:[n.jsx("div",{className:"avatar",children:J()}),b&&n.jsxs("div",{className:"user-info",children:[n.jsx("div",{className:"user-name",children:ie()}),n.jsx("div",{className:"user-role",children:h.roleName})]})]}),de&&n.jsxs("div",{className:"profile-popup",children:[n.jsx("button",{className:"popup-close",onClick:()=>ne(!1),"aria-label":"Close",children:"✕"}),n.jsxs("div",{className:"popup-header",children:[n.jsx("div",{className:"popup-avatar",children:J()}),n.jsxs("div",{className:"popup-user-details",children:[n.jsx("div",{className:"popup-name",children:ie()}),n.jsx("div",{className:"popup-role",children:h.roleName}),n.jsx("div",{className:"popup-email",children:h.email})]})]}),n.jsx("div",{className:"popup-divider"}),n.jsxs("button",{className:"signout-btn",onClick:O,children:[n.jsx(yr,{}),n.jsx("span",{children:"Sign Out"})]})]})]})]})]})};exports.SideNavbar=Er;exports.SidebarProvider=mr;exports.useSidebar=Be;
@@ -36,11 +36,11 @@ var ee = {};
36
36
  var $e;
37
37
  function xr() {
38
38
  return $e || ($e = 1, process.env.NODE_ENV !== "production" && (function() {
39
- var w = We, O = Symbol.for("react.element"), h = Symbol.for("react.portal"), C = Symbol.for("react.fragment"), k = Symbol.for("react.strict_mode"), P = Symbol.for("react.profiler"), N = Symbol.for("react.provider"), m = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), I = Symbol.for("react.suspense"), x = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), W = Symbol.for("react.offscreen"), y = Symbol.iterator, re = "@@iterator";
40
- function Y(e) {
39
+ var w = We, O = Symbol.for("react.element"), h = Symbol.for("react.portal"), C = Symbol.for("react.fragment"), k = Symbol.for("react.strict_mode"), P = Symbol.for("react.profiler"), N = Symbol.for("react.provider"), m = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), I = Symbol.for("react.suspense"), x = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), W = Symbol.for("react.offscreen"), g = Symbol.iterator, re = "@@iterator";
40
+ function B(e) {
41
41
  if (e === null || typeof e != "object")
42
42
  return null;
43
- var r = y && e[y] || e[re];
43
+ var r = g && e[g] || e[re];
44
44
  return typeof r == "function" ? r : null;
45
45
  }
46
46
  var L = w.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
@@ -129,7 +129,7 @@ function xr() {
129
129
  function z() {
130
130
  }
131
131
  z.__reactDisabledLog = !0;
132
- function g() {
132
+ function b() {
133
133
  {
134
134
  if ($ === 0) {
135
135
  v = console.log, _ = console.info, A = console.warn, l = console.error, H = console.group, K = console.groupCollapsed, G = console.groupEnd;
@@ -203,8 +203,8 @@ function xr() {
203
203
  }
204
204
  var me = !1, se;
205
205
  {
206
- var Be = typeof WeakMap == "function" ? WeakMap : Map;
207
- se = new Be();
206
+ var Ye = typeof WeakMap == "function" ? WeakMap : Map;
207
+ se = new Ye();
208
208
  }
209
209
  function Ee(e, r) {
210
210
  if (!e || me)
@@ -219,7 +219,7 @@ function xr() {
219
219
  var s = Error.prepareStackTrace;
220
220
  Error.prepareStackTrace = void 0;
221
221
  var u;
222
- u = X.current, X.current = null, g();
222
+ u = X.current, X.current = null, b();
223
223
  try {
224
224
  if (r) {
225
225
  var o = function() {
@@ -232,37 +232,37 @@ function xr() {
232
232
  }), typeof Reflect == "object" && Reflect.construct) {
233
233
  try {
234
234
  Reflect.construct(o, []);
235
- } catch (j) {
236
- a = j;
235
+ } catch (y) {
236
+ a = y;
237
237
  }
238
238
  Reflect.construct(e, [], o);
239
239
  } else {
240
240
  try {
241
241
  o.call();
242
- } catch (j) {
243
- a = j;
242
+ } catch (y) {
243
+ a = y;
244
244
  }
245
245
  e.call(o.prototype);
246
246
  }
247
247
  } else {
248
248
  try {
249
249
  throw Error();
250
- } catch (j) {
251
- a = j;
250
+ } catch (y) {
251
+ a = y;
252
252
  }
253
253
  e();
254
254
  }
255
- } catch (j) {
256
- if (j && a && typeof j.stack == "string") {
257
- for (var i = j.stack.split(`
258
- `), b = a.stack.split(`
259
- `), c = i.length - 1, f = b.length - 1; c >= 1 && f >= 0 && i[c] !== b[f]; )
255
+ } catch (y) {
256
+ if (y && a && typeof y.stack == "string") {
257
+ for (var i = y.stack.split(`
258
+ `), j = a.stack.split(`
259
+ `), c = i.length - 1, f = j.length - 1; c >= 1 && f >= 0 && i[c] !== j[f]; )
260
260
  f--;
261
261
  for (; c >= 1 && f >= 0; c--, f--)
262
- if (i[c] !== b[f]) {
262
+ if (i[c] !== j[f]) {
263
263
  if (c !== 1 || f !== 1)
264
264
  do
265
- if (c--, f--, f < 0 || i[c] !== b[f]) {
265
+ if (c--, f--, f < 0 || i[c] !== j[f]) {
266
266
  var R = `
267
267
  ` + i[c].replace(" at new ", " at ");
268
268
  return e.displayName && R.includes("<anonymous>") && (R = R.replace("<anonymous>", e.displayName)), typeof e == "function" && se.set(e, R), R;
@@ -329,8 +329,8 @@ function xr() {
329
329
  var i = void 0;
330
330
  try {
331
331
  if (typeof e[o] != "function") {
332
- var b = Error((a || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
333
- throw b.name = "Invariant Violation", b;
332
+ var j = Error((a || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
333
+ throw j.name = "Invariant Violation", j;
334
334
  }
335
335
  i = e[o](r, o, a, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
336
336
  } catch (c) {
@@ -442,8 +442,8 @@ function xr() {
442
442
  };
443
443
  function nr(e, r, t, a, s) {
444
444
  {
445
- var u, o = {}, i = null, b = null;
446
- t !== void 0 && (we(t), i = "" + t), Xe(r) && (we(r.key), i = "" + r.key), ze(r) && (b = r.ref, Ze(r, s));
445
+ var u, o = {}, i = null, j = null;
446
+ t !== void 0 && (we(t), i = "" + t), Xe(r) && (we(r.key), i = "" + r.key), ze(r) && (j = r.ref, Ze(r, s));
447
447
  for (u in r)
448
448
  Z.call(r, u) && !Ge.hasOwnProperty(u) && (o[u] = r[u]);
449
449
  if (e && e.defaultProps) {
@@ -451,15 +451,15 @@ function xr() {
451
451
  for (u in c)
452
452
  o[u] === void 0 && (o[u] = c[u]);
453
453
  }
454
- if (i || b) {
454
+ if (i || j) {
455
455
  var f = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
456
- i && Qe(o, f), b && er(o, f);
456
+ i && Qe(o, f), j && er(o, f);
457
457
  }
458
- return rr(e, i, b, s, a, Se.current, o);
458
+ return rr(e, i, j, s, a, Se.current, o);
459
459
  }
460
460
  }
461
461
  var ge = L.ReactCurrentOwner, ke = L.ReactDebugCurrentFrame;
462
- function B(e) {
462
+ function Y(e) {
463
463
  if (e) {
464
464
  var r = e._owner, t = le(e.type, e._source, r ? r.type : null);
465
465
  ke.setExtraStackFrame(t);
@@ -509,7 +509,7 @@ Check the top-level render call using <` + t + ">.");
509
509
  return;
510
510
  Ne[t] = !0;
511
511
  var a = "";
512
- e && e._owner && e._owner !== ge.current && (a = " It was passed a child from " + T(e._owner.type) + "."), B(e), p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, a), B(null);
512
+ e && e._owner && e._owner !== ge.current && (a = " It was passed a child from " + T(e._owner.type) + "."), Y(e), p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, a), Y(null);
513
513
  }
514
514
  }
515
515
  function De(e, r) {
@@ -524,7 +524,7 @@ Check the top-level render call using <` + t + ">.");
524
524
  else if (je(e))
525
525
  e._store && (e._store.validated = !0);
526
526
  else if (e) {
527
- var s = Y(e);
527
+ var s = B(e);
528
528
  if (typeof s == "function" && s !== e.entries)
529
529
  for (var u = s.call(e), o; !(o = u.next()).done; )
530
530
  je(o.value) && Ie(o.value, r);
@@ -561,11 +561,11 @@ Check the top-level render call using <` + t + ">.");
561
561
  for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
562
562
  var a = r[t];
563
563
  if (a !== "children" && a !== "key") {
564
- B(e), p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), B(null);
564
+ Y(e), p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), Y(null);
565
565
  break;
566
566
  }
567
567
  }
568
- e.ref !== null && (B(e), p("Invalid attribute `ref` supplied to `React.Fragment`."), B(null));
568
+ e.ref !== null && (Y(e), p("Invalid attribute `ref` supplied to `React.Fragment`."), Y(null));
569
569
  }
570
570
  }
571
571
  var Ae = {};
@@ -575,8 +575,8 @@ Check the top-level render call using <` + t + ">.");
575
575
  if (!o) {
576
576
  var i = "";
577
577
  (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (i += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
578
- var b = tr();
579
- b ? i += b : i += Pe();
578
+ var j = tr();
579
+ j ? i += j : i += Pe();
580
580
  var c;
581
581
  e === null ? c = "null" : xe(e) ? c = "array" : e !== void 0 && e.$$typeof === O ? (c = "<" + (T(e.type) || "Unknown") + " />", i = " Did you accidentally export a JSX literal instead of a component?") : c = typeof e, p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", c, i);
582
582
  }
@@ -597,11 +597,11 @@ Check the top-level render call using <` + t + ">.");
597
597
  De(R, e);
598
598
  }
599
599
  if (Z.call(r, "key")) {
600
- var M = T(e), j = Object.keys(r).filter(function(dr) {
600
+ var M = T(e), y = Object.keys(r).filter(function(dr) {
601
601
  return dr !== "key";
602
- }), ye = j.length > 0 ? "{key: someKey, " + j.join(": ..., ") + ": ...}" : "{key: someKey}";
602
+ }), ye = y.length > 0 ? "{key: someKey, " + y.join(": ..., ") + ": ...}" : "{key: someKey}";
603
603
  if (!Ae[M + ye]) {
604
- var fr = j.length > 0 ? "{" + j.join(": ..., ") + ": ...}" : "{}";
604
+ var fr = y.length > 0 ? "{" + y.join(": ..., ") + ": ...}" : "{}";
605
605
  p(`A props object containing a "key" prop is being spread into JSX:
606
606
  let props = %s;
607
607
  <%s {...props} />
@@ -628,42 +628,115 @@ function gr() {
628
628
  return Me || (Me = 1, process.env.NODE_ENV === "production" ? ce.exports = mr() : ce.exports = xr()), ce.exports;
629
629
  }
630
630
  var n = gr();
631
- const Ye = pr(null), wr = ({ children: w }) => {
631
+ const Be = pr(null), wr = ({ children: w }) => {
632
632
  const [O, h] = V(!0), [C, k] = V(null), P = () => {
633
633
  h((m) => !m), k(null);
634
634
  }, N = (m) => {
635
635
  k((d) => d === m ? null : m);
636
636
  };
637
637
  return /* @__PURE__ */ n.jsx(
638
- Ye.Provider,
638
+ Be.Provider,
639
639
  {
640
640
  value: { isExpanded: O, toggleSidebar: P, openSubmenu: C, toggleSubmenu: N },
641
641
  children: w
642
642
  }
643
643
  );
644
644
  }, br = () => {
645
- const w = vr(Ye);
645
+ const w = vr(Be);
646
646
  if (!w) throw new Error("useSidebar must be used inside <SidebarProvider>");
647
647
  return w;
648
- }, jr = () => /* @__PURE__ */ n.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: [
649
- /* @__PURE__ */ n.jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M20.3334 7C20.3334 7.55228 20.0072 8 19.6048 8L4.06194 8C3.65957 8 3.33337 7.55228 3.33337 7C3.33337 6.44772 3.65957 6 4.06194 6L19.6048 6C20.0072 6 20.3334 6.44772 20.3334 7Z", fill: "white" }),
650
- /* @__PURE__ */ n.jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M20.3334 12C20.3334 12.5523 20.0072 13 19.6048 13L4.06194 13C3.65957 13 3.33337 12.5523 3.33337 12C3.33337 11.4477 3.65957 11 4.06194 11L19.6048 11C20.0072 11 20.3334 11.4477 20.3334 12Z", fill: "white" }),
651
- /* @__PURE__ */ n.jsx("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M20.3334 17C20.3334 17.5523 20.0072 18 19.6048 18L4.06194 18C3.65957 18 3.33337 17.5523 3.33337 17C3.33337 16.4477 3.65957 16 4.06194 16L19.6048 16C20.0072 16 20.3334 16.4477 20.3334 17Z", fill: "white" })
652
- ] }), yr = () => /* @__PURE__ */ n.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
653
- /* @__PURE__ */ n.jsx("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
654
- /* @__PURE__ */ n.jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
655
- ] }), Er = () => /* @__PURE__ */ n.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
656
- /* @__PURE__ */ n.jsx("circle", { cx: "12", cy: "12", r: "10" }),
657
- /* @__PURE__ */ n.jsx("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
658
- /* @__PURE__ */ n.jsx("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
659
- ] }), Rr = () => /* @__PURE__ */ n.jsxs("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", children: [
648
+ }, jr = () => /* @__PURE__ */ n.jsxs(
649
+ "svg",
650
+ {
651
+ xmlns: "http://www.w3.org/2000/svg",
652
+ width: "24",
653
+ height: "24",
654
+ viewBox: "0 0 24 24",
655
+ fill: "none",
656
+ children: [
657
+ /* @__PURE__ */ n.jsx(
658
+ "path",
659
+ {
660
+ "fill-rule": "evenodd",
661
+ "clip-rule": "evenodd",
662
+ d: "M20.3334 7C20.3334 7.55228 20.0072 8 19.6048 8L4.06194 8C3.65957 8 3.33337 7.55228 3.33337 7C3.33337 6.44772 3.65957 6 4.06194 6L19.6048 6C20.0072 6 20.3334 6.44772 20.3334 7Z",
663
+ fill: "white"
664
+ }
665
+ ),
666
+ /* @__PURE__ */ n.jsx(
667
+ "path",
668
+ {
669
+ "fill-rule": "evenodd",
670
+ "clip-rule": "evenodd",
671
+ d: "M20.3334 12C20.3334 12.5523 20.0072 13 19.6048 13L4.06194 13C3.65957 13 3.33337 12.5523 3.33337 12C3.33337 11.4477 3.65957 11 4.06194 11L19.6048 11C20.0072 11 20.3334 11.4477 20.3334 12Z",
672
+ fill: "white"
673
+ }
674
+ ),
675
+ /* @__PURE__ */ n.jsx(
676
+ "path",
677
+ {
678
+ "fill-rule": "evenodd",
679
+ "clip-rule": "evenodd",
680
+ d: "M20.3334 17C20.3334 17.5523 20.0072 18 19.6048 18L4.06194 18C3.65957 18 3.33337 17.5523 3.33337 17C3.33337 16.4477 3.65957 16 4.06194 16L19.6048 16C20.0072 16 20.3334 16.4477 20.3334 17Z",
681
+ fill: "white"
682
+ }
683
+ )
684
+ ]
685
+ }
686
+ ), yr = () => /* @__PURE__ */ n.jsxs(
687
+ "svg",
688
+ {
689
+ width: "16",
690
+ height: "16",
691
+ viewBox: "0 0 24 24",
692
+ fill: "none",
693
+ stroke: "currentColor",
694
+ strokeWidth: "2.5",
695
+ strokeLinecap: "round",
696
+ strokeLinejoin: "round",
697
+ children: [
698
+ /* @__PURE__ */ n.jsx("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
699
+ /* @__PURE__ */ n.jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
700
+ ]
701
+ }
702
+ ), Er = () => /* @__PURE__ */ n.jsxs(
703
+ "svg",
704
+ {
705
+ width: "18",
706
+ height: "18",
707
+ viewBox: "0 0 24 24",
708
+ fill: "none",
709
+ stroke: "currentColor",
710
+ strokeWidth: "2",
711
+ strokeLinecap: "round",
712
+ strokeLinejoin: "round",
713
+ children: [
714
+ /* @__PURE__ */ n.jsx("circle", { cx: "12", cy: "12", r: "10" }),
715
+ /* @__PURE__ */ n.jsx("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
716
+ /* @__PURE__ */ n.jsx("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
717
+ ]
718
+ }
719
+ ), Rr = () => /* @__PURE__ */ n.jsxs("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", children: [
660
720
  /* @__PURE__ */ n.jsx("rect", { width: "32", height: "32", rx: "8", fill: "currentColor", opacity: "0.15" }),
661
721
  /* @__PURE__ */ n.jsx("circle", { cx: "16", cy: "16", r: "6", fill: "currentColor" })
662
- ] }), Cr = () => /* @__PURE__ */ n.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
663
- /* @__PURE__ */ n.jsx("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }),
664
- /* @__PURE__ */ n.jsx("polyline", { points: "16 17 21 12 16 7" }),
665
- /* @__PURE__ */ n.jsx("line", { x1: "21", y1: "12", x2: "9", y2: "12" })
666
- ] }), Sr = ({ config: w }) => {
722
+ ] }), Cr = () => /* @__PURE__ */ n.jsxs(
723
+ "svg",
724
+ {
725
+ width: "16",
726
+ height: "16",
727
+ viewBox: "0 0 24 24",
728
+ fill: "none",
729
+ stroke: "currentColor",
730
+ strokeWidth: "2",
731
+ strokeLinecap: "round",
732
+ strokeLinejoin: "round",
733
+ children: [
734
+ /* @__PURE__ */ n.jsx("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }),
735
+ /* @__PURE__ */ n.jsx("polyline", { points: "16 17 21 12 16 7" }),
736
+ /* @__PURE__ */ n.jsx("line", { x1: "21", y1: "12", x2: "9", y2: "12" })
737
+ ]
738
+ }
739
+ ), Sr = ({ config: w }) => {
667
740
  const {
668
741
  navItems: O,
669
742
  user: h,
@@ -678,7 +751,7 @@ const Ye = pr(null), wr = ({ children: w }) => {
678
751
  onSignOut: E,
679
752
  onNavigate: S,
680
753
  className: W = ""
681
- } = w, { isExpanded: y, toggleSidebar: re, openSubmenu: Y, toggleSubmenu: L } = br(), [p, fe] = V(window.location.pathname), [de, ne] = V(!1), [pe, te] = V(!1), [ae, F] = V(null);
754
+ } = w, { isExpanded: g, toggleSidebar: re, openSubmenu: B, toggleSubmenu: L } = br(), [p, fe] = V(window.location.pathname), [de, ne] = V(!1), [pe, te] = V(!1), [ae, F] = V(null);
682
755
  hr(() => {
683
756
  const v = () => fe(window.location.pathname);
684
757
  return window.addEventListener("popstate", v), () => window.removeEventListener("popstate", v);
@@ -697,18 +770,25 @@ const Ye = pr(null), wr = ({ children: w }) => {
697
770
  return /* @__PURE__ */ n.jsxs(
698
771
  "aside",
699
772
  {
700
- style: { backgroundColor: "#0f172a", overflowY: "hidden" },
701
- className: `rdr-sidebar ${y ? "expanded" : "collapsed"} ${W}`,
773
+ style: { backgroundColor: "#0f172a" },
774
+ className: `rdr-sidebar ${g ? "expanded" : "collapsed"} ${W}`,
702
775
  children: [
703
776
  /* @__PURE__ */ n.jsxs("div", { className: "sidebar-header ", style: { paddingTop: "10px" }, children: [
704
777
  /* @__PURE__ */ n.jsxs("div", { className: "logo-section", onClick: re, children: [
705
- /* @__PURE__ */ n.jsx("span", { className: "logo-icon ", style: { color: "var(--sidebar-accent)", marginTop: "15px" }, children: d ?? /* @__PURE__ */ n.jsx(Rr, {}) }),
706
- y && /* @__PURE__ */ n.jsxs("div", { className: "brand-text", children: [
778
+ /* @__PURE__ */ n.jsx(
779
+ "span",
780
+ {
781
+ className: "logo-icon ",
782
+ style: { color: "var(--sidebar-accent)", marginTop: "15px" },
783
+ children: d ?? /* @__PURE__ */ n.jsx(Rr, {})
784
+ }
785
+ ),
786
+ g && /* @__PURE__ */ n.jsxs("div", { className: "brand-text", children: [
707
787
  /* @__PURE__ */ n.jsx("h2", { children: N }),
708
788
  m && /* @__PURE__ */ n.jsx("span", { children: m })
709
789
  ] })
710
790
  ] }),
711
- y && /* @__PURE__ */ n.jsx(
791
+ g && /* @__PURE__ */ n.jsx(
712
792
  "button",
713
793
  {
714
794
  className: "menu-toggle",
@@ -727,9 +807,9 @@ const Ye = pr(null), wr = ({ children: w }) => {
727
807
  alignItems: "center",
728
808
  justifyContent: "center",
729
809
  gap: "8px",
730
- width: "100%",
810
+ width: g ? "100%" : "44px",
731
811
  height: "44px",
732
- padding: "0 16px",
812
+ padding: g ? "0 16px" : "0",
733
813
  borderRadius: "10px",
734
814
  border: "none",
735
815
  outline: "none",
@@ -746,7 +826,7 @@ const Ye = pr(null), wr = ({ children: w }) => {
746
826
  onClick: (v) => J(v, P),
747
827
  children: [
748
828
  /* @__PURE__ */ n.jsx(yr, {}),
749
- y && /* @__PURE__ */ n.jsx("span", { children: k })
829
+ g && /* @__PURE__ */ n.jsx("span", { children: k })
750
830
  ]
751
831
  }
752
832
  ) }),
@@ -754,84 +834,98 @@ const Ye = pr(null), wr = ({ children: w }) => {
754
834
  const A = _.filter(
755
835
  (l) => !l.roles || l.roles.includes(h.role)
756
836
  );
757
- return A.length ? /* @__PURE__ */ n.jsxs("div", { className: "nav-section", style: { listStyleType: "none" }, children: [
758
- y && /* @__PURE__ */ n.jsx("h4", { className: "section-title", children: v }),
759
- /* @__PURE__ */ n.jsx("ul", { className: "nav-items", children: A.map((l) => {
760
- var G, z;
761
- const H = (G = l.subItems) == null ? void 0 : G.some(
762
- (g) => g.path && p.includes(g.path)
763
- ), K = l.path ? p === l.path : !1;
764
- return /* @__PURE__ */ n.jsx("li", { children: (z = l.subItems) != null && z.length ? (
765
- /* Parent with submenu */
766
- /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
767
- /* @__PURE__ */ n.jsxs(
768
- "div",
769
- {
770
- className: `nav-item ${Y === l.name || H ? "active" : ""}`,
771
- "data-label": l.name,
772
- onClick: () => L(l.name),
773
- onMouseEnter: () => F(l.name),
774
- onMouseLeave: () => F(null),
775
- style: Y === l.name || H || ae === l.name ? {
776
- backgroundColor: "#10B981",
777
- border: "1px solid #10B981",
778
- borderRadius: "8px"
779
- } : {},
780
- children: [
781
- /* @__PURE__ */ n.jsx("span", { className: "nav-icon", children: l.icon }),
782
- y && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
783
- /* @__PURE__ */ n.jsx("span", { className: "nav-text", children: l.name }),
784
- /* @__PURE__ */ n.jsx("span", { className: "submenu-arrow", children: Y === l.name ? "−" : "+" })
785
- ] })
786
- ]
787
- }
788
- ),
789
- y && Y === l.name && /* @__PURE__ */ n.jsx("ul", { className: "submenu", children: l.subItems.map((g) => {
790
- const ve = g.path ? p === g.path : !1;
791
- return /* @__PURE__ */ n.jsx("li", { children: /* @__PURE__ */ n.jsxs(
837
+ return A.length ? /* @__PURE__ */ n.jsxs(
838
+ "div",
839
+ {
840
+ className: "nav-section",
841
+ style: { listStyleType: "none" },
842
+ children: [
843
+ g && /* @__PURE__ */ n.jsx("h4", { className: "section-title", children: v }),
844
+ /* @__PURE__ */ n.jsx("ul", { className: "nav-items", children: A.map((l) => {
845
+ var G, z;
846
+ const H = (G = l.subItems) == null ? void 0 : G.some(
847
+ (b) => b.path && p.includes(b.path)
848
+ ), K = l.path ? p === l.path : !1;
849
+ return /* @__PURE__ */ n.jsx("li", { children: (z = l.subItems) != null && z.length ? (
850
+ /* Parent with submenu */
851
+ /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
852
+ /* @__PURE__ */ n.jsxs(
853
+ "div",
854
+ {
855
+ className: `nav-item ${B === l.name || H ? "active" : ""}`,
856
+ "data-label": l.name,
857
+ onClick: () => L(l.name),
858
+ onMouseEnter: () => F(l.name),
859
+ onMouseLeave: () => F(null),
860
+ style: B === l.name || H || ae === l.name ? {
861
+ backgroundColor: "#10B981",
862
+ border: "1px solid #10B981",
863
+ borderRadius: "8px"
864
+ } : {},
865
+ children: [
866
+ /* @__PURE__ */ n.jsx("span", { className: "nav-icon", children: l.icon }),
867
+ g && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
868
+ /* @__PURE__ */ n.jsx("span", { className: "nav-text", children: l.name }),
869
+ /* @__PURE__ */ n.jsx("span", { className: "submenu-arrow", children: B === l.name ? "−" : "+" })
870
+ ] })
871
+ ]
872
+ }
873
+ ),
874
+ g && B === l.name && /* @__PURE__ */ n.jsx("ul", { className: "submenu", children: l.subItems.map((b) => {
875
+ const ve = b.path ? p === b.path : !1;
876
+ return /* @__PURE__ */ n.jsx("li", { children: /* @__PURE__ */ n.jsxs(
877
+ "a",
878
+ {
879
+ href: b.path || "/",
880
+ onClick: (X) => J(X, b.path),
881
+ className: `submenu-item ${ve ? "active-sub" : ""}`,
882
+ children: [
883
+ b.icon && /* @__PURE__ */ n.jsx("span", { className: "submenu-icon", children: b.icon }),
884
+ /* @__PURE__ */ n.jsx("span", { children: b.name })
885
+ ]
886
+ }
887
+ ) }, b.name);
888
+ }) })
889
+ ] })
890
+ ) : (
891
+ /* Leaf nav item */
892
+ /* @__PURE__ */ n.jsxs(
792
893
  "a",
793
894
  {
794
- href: g.path || "/",
795
- onClick: (X) => J(X, g.path),
796
- className: `submenu-item ${ve ? "active-sub" : ""}`,
895
+ href: l.path || "/",
896
+ "data-label": l.name,
897
+ onClick: (b) => J(b, l.path),
898
+ style: K || ae === l.name ? {
899
+ backgroundColor: "#10B981",
900
+ border: "none",
901
+ // kill any CSS border including left strip
902
+ borderRadius: "8px",
903
+ outline: "1px solid #10B981",
904
+ outlineOffset: "0px"
905
+ } : {
906
+ border: "none"
907
+ // also reset on non-active to remove the strip
908
+ },
909
+ onMouseEnter: () => F(l.name),
910
+ onMouseLeave: () => F(null),
911
+ className: `nav-item ${K ? "active" : ""}`,
797
912
  children: [
798
- g.icon && /* @__PURE__ */ n.jsx("span", { className: "submenu-icon", children: g.icon }),
799
- /* @__PURE__ */ n.jsx("span", { children: g.name })
913
+ /* @__PURE__ */ n.jsx("span", { className: "nav-icon", children: l.icon }),
914
+ g && /* @__PURE__ */ n.jsx("span", { className: "nav-text", children: l.name })
800
915
  ]
801
916
  }
802
- ) }, g.name);
803
- }) })
804
- ] })
805
- ) : (
806
- /* Leaf nav item */
807
- /* @__PURE__ */ n.jsxs(
808
- "a",
809
- {
810
- href: l.path || "/",
811
- "data-label": l.name,
812
- onClick: (g) => J(g, l.path),
813
- style: K || ae === l.name ? {
814
- backgroundColor: "#10B981",
815
- border: "1px solid #10B981",
816
- borderRadius: "8px"
817
- } : {},
818
- onMouseEnter: () => F(l.name),
819
- onMouseLeave: () => F(null),
820
- className: `nav-item ${K ? "active" : ""}`,
821
- children: [
822
- /* @__PURE__ */ n.jsx("span", { className: "nav-icon", children: l.icon }),
823
- y && /* @__PURE__ */ n.jsx("span", { className: "nav-text", children: l.name })
824
- ]
825
- }
826
- )
827
- ) }, l.name);
828
- }) })
829
- ] }, v) : null;
917
+ )
918
+ ) }, l.name);
919
+ }) })
920
+ ]
921
+ },
922
+ v
923
+ ) : null;
830
924
  }) }),
831
925
  /* @__PURE__ */ n.jsxs("div", { className: "sidebar-footer", children: [
832
926
  /* @__PURE__ */ n.jsxs("div", { className: "footer-link", "data-label": I, children: [
833
927
  /* @__PURE__ */ n.jsx("span", { children: x ?? /* @__PURE__ */ n.jsx(Er, {}) }),
834
- y && /* @__PURE__ */ n.jsx("span", { children: I })
928
+ g && /* @__PURE__ */ n.jsx("span", { children: I })
835
929
  ] }),
836
930
  /* @__PURE__ */ n.jsxs("div", { className: "user-profile-wrapper", children: [
837
931
  /* @__PURE__ */ n.jsxs(
@@ -841,7 +935,7 @@ const Ye = pr(null), wr = ({ children: w }) => {
841
935
  onClick: () => ne((v) => !v),
842
936
  children: [
843
937
  /* @__PURE__ */ n.jsx("div", { className: "avatar", children: q() }),
844
- y && /* @__PURE__ */ n.jsxs("div", { className: "user-info", children: [
938
+ g && /* @__PURE__ */ n.jsxs("div", { className: "user-info", children: [
845
939
  /* @__PURE__ */ n.jsx("div", { className: "user-name", children: ie() }),
846
940
  /* @__PURE__ */ n.jsx("div", { className: "user-role", children: h.roleName })
847
941
  ] })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hari_digitus/sms-ui-library",
3
- "version": "7.0.5",
3
+ "version": "7.0.7",
4
4
  "main": "dist/SideNavBar.cjs.js",
5
5
  "module": "dist/SideNavBar.es.js",
6
6
  "types": "dist/types/index.d.ts",