@ukpc-lib/react 0.3.24 → 0.3.25

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.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),T=require("react"),p=require("../index.module-64089a88.cjs"),K=require("moment"),Kt=require("axios"),N=require("@mui/material");require("@r2wc/react-to-web-component");require("react-router-dom");function Xn(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 L=Xn(T),Jn=e=>{var n,o;const{tabs:t}=e,r=i=>{e.setCurrentTab(i.target.id)};return console.log("🚀 ~ brandColors:",e.currentTab),c.jsxs(c.Fragment,{children:[c.jsx("style",{children:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),T=require("react"),p=require("../index.module-e296aedb.cjs"),K=require("moment"),Kt=require("axios"),N=require("@mui/material");require("@r2wc/react-to-web-component");require("react-router-dom");function Xn(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 L=Xn(T),Jn=e=>{var n,o;const{tabs:t}=e,r=i=>{e.setCurrentTab(i.target.id)};return console.log("🚀 ~ brandColors:",e.currentTab),c.jsxs(c.Fragment,{children:[c.jsx("style",{children:`
2
2
  .tab-title {
3
3
  min-width: 90px;
4
4
  padding: 5px 16px;
@@ -1,8 +1,8 @@
1
1
  import { jsxs as T, Fragment as qe, jsx as c } from "react/jsx-runtime";
2
2
  import * as L from "react";
3
3
  import So, { useState as G, useContext as be, useEffect as Q, useRef as ve, useCallback as bt, forwardRef as Eo, createElement as er, PureComponent as Co } from "react";
4
- import { c as rt, Q as kn, C as Te, p as At, u as fr, S as Oo, a as To, L as No, b as Ar, d as $o, e as mt, f as ko, s as pt, _ as z, g as xe, P as N, h as he, i as Io, o as Mo, j as Ao, k as Po, l as Pr, m as Ro, n as Rr, I as Do, q as zo, r as Dr, D as Fo, t as In, v as Mn, w as Lo, x as jo, y as Ce, z as Vo, A as gt } from "../index.module-d2d48785.js";
5
- import { G as Sc, B as Ec, E as Cc } from "../index.module-d2d48785.js";
4
+ import { c as rt, Q as kn, C as Te, p as At, u as fr, S as Oo, a as To, L as No, b as Ar, d as $o, e as mt, f as ko, s as pt, _ as z, g as xe, P as N, h as he, i as Io, o as Mo, j as Ao, k as Po, l as Pr, m as Ro, n as Rr, I as Do, q as zo, r as Dr, D as Fo, t as In, v as Mn, w as Lo, x as jo, y as Ce, z as Vo, A as gt } from "../index.module-9c05f01a.js";
5
+ import { G as Sc, B as Ec, E as Cc } from "../index.module-9c05f01a.js";
6
6
  import Z from "moment";
7
7
  import hr from "axios";
8
8
  import { Stack as se, Dialog as Ho, DialogTitle as Bo, Typography as Oe, DialogContent as Wo, DialogActions as Uo, Button as zr, ClickAwayListener as qo, TextField as An, IconButton as Yo, CircularProgress as Go, Fade as Ko, Paper as Zo, Checkbox as Xo } from "@mui/material";
@@ -20648,7 +20648,7 @@ function LD(t) {
20648
20648
  className: "tooltip-item__content",
20649
20649
  style: {
20650
20650
  position: "fixed",
20651
- background: "#919196",
20651
+ background: "#85858A",
20652
20652
  borderRadius: "4px",
20653
20653
  color: "#fff",
20654
20654
  padding: "4px 8px",
@@ -131,7 +131,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
131
131
  * content-type
132
132
  * Copyright(c) 2015 Douglas Christopher Wilson
133
133
  * MIT Licensed
134
- */var ly=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,gD=/\\([\u000b\u0020-\u00ff])/g,mD=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,vD=yD;function yD(t){if(!t)throw new TypeError("argument string is required");var e=typeof t=="object"?bD(t):t;if(typeof e!="string")throw new TypeError("argument string is required to be a string");var n=e.indexOf(";"),i=n!==-1?e.slice(0,n).trim():e.trim();if(!mD.test(i))throw new TypeError("invalid media type");var r=new wD(i.toLowerCase());if(n!==-1){var s,u,g;for(ly.lastIndex=n;u=ly.exec(e);){if(u.index!==n)throw new TypeError("invalid parameter format");n+=u[0].length,s=u[1].toLowerCase(),g=u[2],g.charCodeAt(0)===34&&(g=g.slice(1,-1),g.indexOf("\\")!==-1&&(g=g.replace(gD,"$1"))),r.parameters[s]=g}if(n!==e.length)throw new TypeError("invalid parameter format")}return r}function bD(t){var e;if(typeof t.getHeader=="function"?e=t.getHeader("content-type"):typeof t.headers=="object"&&(e=t.headers&&t.headers["content-type"]),typeof e!="string")throw new TypeError("content-type header is missing from object");return e}function wD(t){this.parameters=Object.create(null),this.type=t}var vc=new Map,nw=function(e){return e.cloneNode(!0)},uy=function(){return window.location.protocol==="file:"},rw=function(e,n,i){var r=new XMLHttpRequest;r.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&r.readyState===2){var s=r.getResponseHeader("Content-Type");if(!s)throw new Error("Content type not found");var u=vD(s).type;if(!(u==="image/svg+xml"||u==="text/plain"))throw new Error("Invalid content type: ".concat(u))}if(r.readyState===4){if(r.status===404||r.responseXML===null)throw new Error(uy()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+e);if(r.status===200||uy()&&r.status===0)i(null,r);else throw new Error("There was a problem injecting the SVG: "+r.status+" "+r.statusText)}}catch(g){if(r.abort(),g instanceof Error)i(g,r);else throw g}},r.open("GET",e),r.withCredentials=n,r.overrideMimeType&&r.overrideMimeType("text/xml"),r.send()},jl={},cy=function(e,n){jl[e]=jl[e]||[],jl[e].push(n)},xD=function(e){for(var n=function(u,g){setTimeout(function(){if(Array.isArray(jl[e])){var p=vc.get(e),y=jl[e][u];p instanceof SVGSVGElement&&y(null,nw(p)),p instanceof Error&&y(p),u===jl[e].length-1&&delete jl[e]}},0)},i=0,r=jl[e].length;i<r;i++)n(i)},SD=function(e,n,i){if(vc.has(e)){var r=vc.get(e);if(r===void 0){cy(e,i);return}if(r instanceof SVGSVGElement){i(null,nw(r));return}}vc.set(e,void 0),cy(e,i),rw(e,n,function(s,u){var g;s?vc.set(e,s):((g=u.responseXML)===null||g===void 0?void 0:g.documentElement)instanceof SVGSVGElement&&vc.set(e,u.responseXML.documentElement),xD(e)})},CD=function(e,n,i){rw(e,n,function(r,s){var u;r?i(r):((u=s.responseXML)===null||u===void 0?void 0:u.documentElement)instanceof SVGSVGElement&&i(null,s.responseXML.documentElement)})},TD=0,ED=function(){return++TD},us=[],fy={},kD="http://www.w3.org/2000/svg",Eh="http://www.w3.org/1999/xlink",dy=function(e,n,i,r,s,u,g){var p=e.getAttribute("data-src")||e.getAttribute("src");if(!p){g(new Error("Invalid data-src or src attribute"));return}if(us.indexOf(e)!==-1){us.splice(us.indexOf(e),1),e=null;return}us.push(e),e.setAttribute("src","");var y=r?SD:CD;y(p,s,function(E,x){if(!x){us.splice(us.indexOf(e),1),e=null,g(E);return}var O=e.getAttribute("id");O&&x.setAttribute("id",O);var j=e.getAttribute("title");j&&x.setAttribute("title",j);var $=e.getAttribute("width");$&&x.setAttribute("width",$);var Y=e.getAttribute("height");Y&&x.setAttribute("height",Y);var z=Array.from(new Set(Th(Th(Th([],(x.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();x.setAttribute("class",z);var L=e.getAttribute("style");L&&x.setAttribute("style",L),x.setAttribute("data-src",p);var ne=[].filter.call(e.attributes,function(qe){return/^data-\w[\w-]*$/.test(qe.name)});if(Array.prototype.forEach.call(ne,function(qe){qe.name&&qe.value&&x.setAttribute(qe.name,qe.value)}),i){var te={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]},he,ie,xe,b,ke;Object.keys(te).forEach(function(qe){he=qe,xe=te[qe],ie=x.querySelectorAll(he+"[id]");for(var at=function(Ze,Qe){b=ie[Ze].id,ke=b+"-"+ED();var Je;Array.prototype.forEach.call(xe,function(Bt){Je=x.querySelectorAll("["+Bt+'*="'+b+'"]');for(var Ht=0,zn=Je.length;Ht<zn;Ht++){var hr=Je[Ht].getAttribute(Bt);hr&&!hr.match(new RegExp('url\\("?#'+b+'"?\\)'))||Je[Ht].setAttribute(Bt,"url(#"+ke+")")}});for(var Ke=x.querySelectorAll("[*|href]"),ht=[],wt=0,xt=Ke.length;wt<xt;wt++){var pt=Ke[wt].getAttributeNS(Eh,"href");pt&&pt.toString()==="#"+ie[Ze].id&&ht.push(Ke[wt])}for(var Tt=0,Xe=ht.length;Tt<Xe;Tt++)ht[Tt].setAttributeNS(Eh,"href","#"+ke);ie[Ze].id=ke},_e=0,Ae=ie.length;_e<Ae;_e++)at(_e)})}x.removeAttribute("xmlns:a");for(var ve=x.querySelectorAll("script"),nt=[],gt,tt,et=0,ft=ve.length;et<ft;et++)tt=ve[et].getAttribute("type"),(!tt||tt==="application/ecmascript"||tt==="application/javascript"||tt==="text/javascript")&&(gt=ve[et].innerText||ve[et].textContent,gt&&nt.push(gt),x.removeChild(ve[et]));if(nt.length>0&&(n==="always"||n==="once"&&!fy[p])){for(var me=0,Me=nt.length;me<Me;me++)new Function(nt[me])(window);fy[p]=!0}var ze=x.querySelectorAll("style");if(Array.prototype.forEach.call(ze,function(qe){qe.textContent+=""}),x.setAttribute("xmlns",kD),x.setAttribute("xmlns:xlink",Eh),u(x),!e.parentNode){us.splice(us.indexOf(e),1),e=null,g(new Error("Parent node is null"));return}e.parentNode.replaceChild(x,e),us.splice(us.indexOf(e),1),e=null,g(null,x)})},_D=function(e,n){var i=n===void 0?{}:n,r=i.afterAll,s=r===void 0?function(){}:r,u=i.afterEach,g=u===void 0?function(){}:u,p=i.beforeEach,y=p===void 0?function(){}:p,E=i.cacheRequests,x=E===void 0?!0:E,O=i.evalScripts,j=O===void 0?"never":O,$=i.httpRequestWithCredentials,Y=$===void 0?!1:$,z=i.renumerateIRIElements,L=z===void 0?!0:z;if(e&&"length"in e)for(var ne=0,te=0,he=e.length;te<he;te++)dy(e[te],j,L,x,Y,y,function(ie,xe){g(ie,xe),e&&"length"in e&&e.length===++ne&&s(ne)});else e?dy(e,j,L,x,Y,y,function(ie,xe){g(ie,xe),s(1),e=null}):s(0)},PD=function(e){var n=(e==null?void 0:e.ownerDocument)||document;return n.defaultView||window},RD=function(e,n){for(var i in e)if(!(i in n))return!0;for(var r in n)if(e[r]!==n[r])return!0;return!1},AD=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],Hf="http://www.w3.org/2000/svg",hy="http://www.w3.org/1999/xlink",Wp=function(t){tw(e,t);function e(){for(var i,r=arguments.length,s=new Array(r),u=0;u<r;u++)s[u]=arguments[u];return i=t.call.apply(t,[this].concat(s))||this,i.initialState={hasError:!1,isLoading:!0},i.state=i.initialState,i._isMounted=!1,i.reactWrapper=void 0,i.nonReactWrapper=void 0,i.refCallback=function(g){i.reactWrapper=g},i}var n=e.prototype;return n.renderSVG=function(){var r=this;if(this.reactWrapper instanceof PD(this.reactWrapper).Node){var s=this.props,u=s.desc,g=s.evalScripts,p=s.httpRequestWithCredentials,y=s.renumerateIRIElements,E=s.src,x=s.title,O=s.useRequestCache,j=this.props.onError,$=this.props.beforeInjection,Y=this.props.afterInjection,z=this.props.wrapper,L,ne;z==="svg"?(L=document.createElementNS(Hf,z),L.setAttribute("xmlns",Hf),L.setAttribute("xmlns:xlink",hy),ne=document.createElementNS(Hf,z)):(L=document.createElement(z),ne=document.createElement(z)),L.appendChild(ne),ne.dataset.src=E,this.nonReactWrapper=this.reactWrapper.appendChild(L);var te=function(b){if(r.removeSVG(),!r._isMounted){j(b);return}r.setState(function(){return{hasError:!0,isLoading:!1}},function(){j(b)})},he=function(b,ke){if(b){te(b);return}r._isMounted&&r.setState(function(){return{isLoading:!1}},function(){try{Y(ke)}catch(ve){te(ve)}})},ie=function(b){if(b.setAttribute("role","img"),u){var ke=b.querySelector(":scope > desc");ke&&b.removeChild(ke);var ve=document.createElement("desc");ve.innerHTML=u,b.prepend(ve)}if(x){var nt=b.querySelector(":scope > title");nt&&b.removeChild(nt);var gt=document.createElement("title");gt.innerHTML=x,b.prepend(gt)}try{$(b)}catch(tt){te(tt)}};_D(ne,{afterEach:he,beforeEach:ie,cacheRequests:O,evalScripts:g,httpRequestWithCredentials:p,renumerateIRIElements:y})}},n.removeSVG=function(){var r;(r=this.nonReactWrapper)!=null&&r.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},n.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},n.componentDidUpdate=function(r){var s=this;RD(kc({},r),this.props)&&this.setState(function(){return s.initialState},function(){s.removeSVG(),s.renderSVG()})},n.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},n.render=function(){var r=this.props;r.afterInjection,r.beforeInjection,r.desc,r.evalScripts;var s=r.fallback;r.httpRequestWithCredentials;var u=r.loading;r.renumerateIRIElements,r.src,r.title,r.useRequestCache;var g=r.wrapper,p=vp(r,AD),y=g;return kn.createElement(y,kc({},p,{ref:this.refCallback},g==="svg"?{xmlns:Hf,xmlnsXlink:hy}:{}),this.state.isLoading&&u&&kn.createElement(u,null),this.state.hasError&&s&&kn.createElement(s,null))},e}(kn.Component);Wp.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};Wp.propTypes={afterInjection:xr.func,beforeInjection:xr.func,desc:xr.string,evalScripts:xr.oneOf(["always","once","never"]),fallback:xr.oneOfType([xr.func,xr.object,xr.string]),httpRequestWithCredentials:xr.bool,loading:xr.oneOfType([xr.func,xr.object,xr.string]),onError:xr.func,renumerateIRIElements:xr.bool,src:xr.string.isRequired,title:xr.string,useRequestCache:xr.bool,wrapper:xr.oneOf(["div","span","svg"])};function OD(t){return ut.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...t,children:ut.jsx("path",{fill:"currenColor",d:"M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"})})}function DD(t){const{children:e,parentRef:n,onlyChild:i}=t,[r,s]=Pe.useState({top:0,left:0});return Pe.useLayoutEffect(()=>{if(n.current){const u=n.current.getBoundingClientRect();s({top:u.top,left:u.left+u.width})}},[n]),i?e:Ly.createPortal(ut.jsx("div",{style:{position:"fixed",top:r.top,left:r.left,zIndex:1200},children:e}),n.current)}function ID(t){const{children:e,title:n,hasTooltip:i}=t,r=Pe.useRef(),[s,u]=Pe.useState(!1),[g,p]=Pe.useState({top:0,left:0});return ut.jsxs("div",{className:"tooltip-item__wrapper",onMouseOver:()=>{if(u(!0),r.current){const y=r.current.getBoundingClientRect();p({top:y.top-20,left:y.left})}},onMouseLeave:()=>u(!1),ref:r,children:[ut.jsx("div",{children:e}),s&&i&&ut.jsx("div",{className:"tooltip-item__content",style:{position:"fixed",background:"#919196",borderRadius:"4px",color:"#fff",padding:"4px 8px",top:g.top,left:g.left,zIndex:1400,fontSize:10,transition:"all 0.2s ease-in-out",animation:"fadeIn 0.2s ease-in-out",pointerEvents:"none"},children:n})]})}function iw({item:t,level:e=0,...n}){var gt,tt,et,ft;const{isActive:i,isCollapsed:r,expanded:s,toggleExpand:u}=n,g=`level-${e}`,p=r?"collapsed":"expanded",y=i(t.id)?"active":"",E=(me,Me=g)=>`${me} ${Me} ${p} ${y}`,x=!!((gt=t.children)!=null&&gt.length),[O,j]=Pe.useState(!1),$=Pe.useRef(),Y=window.location.origin,z=t.path&&t.path.includes("http")?new URL(t.path):{origin:"",pathname:""},L=window.location.pathname.split("/")[1],ne=z.pathname.split("/")[1],te=n.ssr||!Y.includes("local")&&Y!==z.origin||ne!==L,he=x||e===0?"div":te?"a":My.Link,ie=t.path||"#",xe=e+1,b=x&&!(r&&xe>=2&&!O),ke=r||e===0?void 0:`${e}rem`;console.log("hasDropdown:",b);const ve=()=>{j(!0)},nt=()=>{j(!1)};return ut.jsxs("div",{ref:$,className:E("menu-item__wrapper"),onMouseOver:ve,onMouseOut:nt,children:[ut.jsx(ID,{hasTooltip:r&&e===1,children:ut.jsxs(he,{to:ie,href:ie,className:E("menu-item__link"),style:{paddingLeft:ke,transition:"all 0.3s",color:i(t.id)?((tt=n.brandColors)==null?void 0:tt.primary400)||vo.primary400:void 0,backgroundColor:i(t.id)&&e===1?(et=n.brandColors)==null?void 0:et.primary200:void 0},onClick:me=>{x&&(me.preventDefault(),r||u(t.id))},children:[e!==0&&ut.jsx(MD,{cls:E,item:t}),ut.jsx("span",{className:E("menu-item__label"),children:t.name}),x&&ut.jsx("div",{className:E("menu-item__icon-arrow__wrapper"),children:ut.jsx(OD,{className:E(`menu-item__icon-arrow__icon ${s(t.id)?"open":"close"}`)})})]}),title:t.name}),b&&ut.jsx(DD,{parentRef:$,onlyChild:!r||r&&xe<2,children:ut.jsx(hD.div,{className:E(`menu-item__dropdown ${s(t.id)?"menu-item__dropdown--open":"menu-item__dropdown--close"}`,`level-${xe}`),initial:{height:r||s(t.id)?"auto":0},animate:{height:r||s(t.id)?"auto":0},transition:{duration:.25},children:(ft=t.children)==null?void 0:ft.map(me=>Pe.createElement(iw,{...n,key:me.id,item:me,level:xe}))})})]})}function MD({item:t,cls:e}){var u,g;const[n,i]=Pe.useState(!t.icon),r=()=>{i(!0)},s=(u=t.icon)==null?void 0:u.endsWith(".svg");return ut.jsx("div",{className:e("menu-item__icon"),children:n?ut.jsx("div",{style:{width:24,height:24,backgroundColor:"#dadada",borderRadius:"5px",display:"flex",justifyContent:"center",alignItems:"center"},children:(g=t.name.trim().at(0))==null?void 0:g.toUpperCase()}):s?ut.jsx(Wp,{src:t.icon,beforeInjection:p=>{p.setAttribute("style","margin: 0 auto;"),p.querySelectorAll("path").forEach(E=>{E.hasAttribute("fill")&&E.setAttribute("fill","currentColor"),E.hasAttribute("stroke")&&E.setAttribute("stroke","currentColor")})}}):ut.jsx("img",{src:t.icon||"/",alt:" ",style:{height:24,maxHeight:24},onError:r})})}function LD(){return ut.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",children:ut.jsx("path",{d:"M21 18v2H3v-2h18zM6.596 3.903L8.01 5.318 4.828 8.5 8.01 11.68l-1.414 1.415L2 8.5l4.596-4.597zM21 11v2h-9v-2h9zm0-7v2h-9V4h9z"})})}function FD(){return ut.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",children:ut.jsx("path",{d:"M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"})})}function jD(t){return ut.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"20",fill:"none",viewBox:"0 0 18 20",...t,children:ut.jsx("path",{fill:"#E01B00",fillRule:"evenodd",d:"M.179 2.875A2.375 2.375 0 012.554.5h3.393a1.018 1.018 0 010 2.036H2.554a.34.34 0 00-.34.339v14.25c0 .187.152.34.34.34h3.393a1.018 1.018 0 110 2.035H2.554a2.375 2.375 0 01-2.375-2.375V2.875zm14.167 6.107h-7.72a1.018 1.018 0 000 2.036h7.72l-2.673 2.673a1.018 1.018 0 101.44 1.44l4.41-4.411a1.018 1.018 0 000-1.44l-4.41-4.41a1.018 1.018 0 10-1.44 1.439l2.673 2.673z",clipRule:"evenodd"})})}const BD=`.wrap-section{padding:0 8px;transition:all .3s}.wrap-section.collapsed{padding:0 4px}.side-bar{display:flex;flex-direction:column;max-width:18rem;height:calc(100vh - 64px);border-right:1px solid #ddd;background-color:#fafafa;transition:all .3s}.side-bar.expanded{width:17rem}.side-bar.collapsed{width:64px}.side-bar__wrap-btn-logout,.side-bar__btn-logout{margin:40px 0}.side-bar__logout-btn__text{margin-left:12px;font-size:.875rem;opacity:1}.side-bar__logout-btn__text.collapsed{opacity:0;transition:ease-in-out .2s;transition-delay:.15s}.side-bar__wrapper-toggle-btn{display:flex;flex-direction:row;justify-content:flex-end;transition:all .3s;margin-right:-8px;margin-top:40px}.side-bar__wrapper-toggle-btn.collapsed{justify-content:center;width:100%}.side-bar__toggle-btn{margin-top:-6px;color:#85858a}.side-bar__logout-btn{width:100%;text-align:left;display:flex;flex-direction:row;align-items:center;padding:8px 16px 8px 18.6665px;min-height:48px;border-radius:.375rem;overflow:hidden;transition:all .3s ease-in-out}.side-bar__logout-btn:hover{background-color:#919eab14}.side-bar__icon-logout{flex-shrink:0}.menu-item__wrapper{display:flex;flex-direction:column;position:relative;width:100%}.menu-item__link{display:flex;flex-direction:row;border-radius:.375rem;align-items:center;padding:.5rem;position:relative;height:48px;cursor:pointer;color:#85858a}.menu-item__link:hover{background-color:#919eab14}.menu-item__link.collapsed.level-1{padding-left:calc(.5rem + 7.665px)!important}.menu-item__link.active{background-color:#009d4f1a;color:inherit}.menu-item__link.active.level-2,.menu-item__link.active.level-3,.menu-item__link.active.level-4,.menu-item__link.active.level-5,.menu-item__link.active.level-6,.menu-item__link.active.level-7,.menu-item__link.active.level-8,.menu-item__link.active.level-9,.menu-item__link.active.level-10{background-color:inherit;color:inherit}.menu-item__link.active.level-2:hover,.menu-item__link.active.level-3:hover,.menu-item__link.active.level-4:hover,.menu-item__link.active.level-5:hover,.menu-item__link.active.level-6:hover,.menu-item__link.active.level-7:hover,.menu-item__link.active.level-8:hover,.menu-item__link.active.level-9:hover,.menu-item__link.active.level-10:hover{background-color:#919eab14}.menu-item__link.level-0{height:37px}.menu-item__link.menu-item__link.collapsed.level-0{padding:0;height:0;transition:all .15s}.menu-item__icon{width:1.5rem;height:1.5rem;flex-shrink:0;display:grid;place-items:center}.menu-item__icon.collapsed.level-1>*{margin:0 auto}.menu-item__label{font-size:.875rem;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%;flex-shrink:1;margin-left:12px;padding-right:12px;color:#292929;opacity:1}.menu-item__label.level-1.collapsed{text-overflow:unset}.menu-item__label.active{color:inherit}.menu-item__label.collapsed{margin-left:8px;font-size:.75rem;line-height:1rem}.menu-item__label.collapsed.level-0,.menu-item__label.collapsed.level-1{font-size:.875rem;opacity:0;transition-delay:.15s}.menu-item__label.level-0{color:#85858a;margin-left:0}.menu-item__icon-arrow__wrapper{display:grid;place-items:center;position:absolute;top:50%;transform:translateY(-50%);right:0}.menu-item__icon-arrow__wrapper.expanded{right:4px}.menu-item__icon-arrow__wrapper.level-0.collapsed{display:none}.menu-item__icon-arrow__icon{transition:all .3s!important;transform:rotate(-90deg)!important}.menu-item__icon-arrow__icon.active{color:inherit}.menu-item__icon-arrow__icon.expanded.open{transform:rotate(0)!important}.menu-item__dropdown.collapsed{background-color:#fafafa;border:1px solid #ddd;box-shadow:#0000001a 0 10px 15px -3px,#0000000d 0 4px 6px -2px;border-radius:4px;width:180px;max-width:180px;padding:4px;z-index:1200}.menu-item__dropdown,.menu-item__dropdown>*{margin-top:4px}.menu-item__dropdown.expanded.menu-item__dropdown--close{margin-top:0;transition:margin-top .3s}.menu-item__dropdown:first-of-type{margin-top:0}.menu-item__dropdown>*:first-child{margin-top:0}.menu-item__dropdown.collapsed .menu-item__link{height:40px}.menu-item__dropdown.collapsed .menu-item__link.level-1{height:48px}.menu-item__dropdown.collapsed.level-1{width:auto;max-width:unset;box-shadow:none;border:none;padding:0;background-color:unset}.menu-item__dropdown.expanded{overflow:hidden}.icon-btn{display:inline-flex;align-items:center;justify-content:center;padding:8px;border-radius:50%;background-color:transparent;transition:background-color .3s ease;border:none}.icon-btn:hover{background-color:var(--btn-bg-hover)}.simplebar-scrollbar:before{background-color:#0000002d}.side-bar__menu.collapsed .simplebar-track.simplebar-vertical{display:none}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}
134
+ */var ly=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,gD=/\\([\u000b\u0020-\u00ff])/g,mD=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,vD=yD;function yD(t){if(!t)throw new TypeError("argument string is required");var e=typeof t=="object"?bD(t):t;if(typeof e!="string")throw new TypeError("argument string is required to be a string");var n=e.indexOf(";"),i=n!==-1?e.slice(0,n).trim():e.trim();if(!mD.test(i))throw new TypeError("invalid media type");var r=new wD(i.toLowerCase());if(n!==-1){var s,u,g;for(ly.lastIndex=n;u=ly.exec(e);){if(u.index!==n)throw new TypeError("invalid parameter format");n+=u[0].length,s=u[1].toLowerCase(),g=u[2],g.charCodeAt(0)===34&&(g=g.slice(1,-1),g.indexOf("\\")!==-1&&(g=g.replace(gD,"$1"))),r.parameters[s]=g}if(n!==e.length)throw new TypeError("invalid parameter format")}return r}function bD(t){var e;if(typeof t.getHeader=="function"?e=t.getHeader("content-type"):typeof t.headers=="object"&&(e=t.headers&&t.headers["content-type"]),typeof e!="string")throw new TypeError("content-type header is missing from object");return e}function wD(t){this.parameters=Object.create(null),this.type=t}var vc=new Map,nw=function(e){return e.cloneNode(!0)},uy=function(){return window.location.protocol==="file:"},rw=function(e,n,i){var r=new XMLHttpRequest;r.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&r.readyState===2){var s=r.getResponseHeader("Content-Type");if(!s)throw new Error("Content type not found");var u=vD(s).type;if(!(u==="image/svg+xml"||u==="text/plain"))throw new Error("Invalid content type: ".concat(u))}if(r.readyState===4){if(r.status===404||r.responseXML===null)throw new Error(uy()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+e);if(r.status===200||uy()&&r.status===0)i(null,r);else throw new Error("There was a problem injecting the SVG: "+r.status+" "+r.statusText)}}catch(g){if(r.abort(),g instanceof Error)i(g,r);else throw g}},r.open("GET",e),r.withCredentials=n,r.overrideMimeType&&r.overrideMimeType("text/xml"),r.send()},jl={},cy=function(e,n){jl[e]=jl[e]||[],jl[e].push(n)},xD=function(e){for(var n=function(u,g){setTimeout(function(){if(Array.isArray(jl[e])){var p=vc.get(e),y=jl[e][u];p instanceof SVGSVGElement&&y(null,nw(p)),p instanceof Error&&y(p),u===jl[e].length-1&&delete jl[e]}},0)},i=0,r=jl[e].length;i<r;i++)n(i)},SD=function(e,n,i){if(vc.has(e)){var r=vc.get(e);if(r===void 0){cy(e,i);return}if(r instanceof SVGSVGElement){i(null,nw(r));return}}vc.set(e,void 0),cy(e,i),rw(e,n,function(s,u){var g;s?vc.set(e,s):((g=u.responseXML)===null||g===void 0?void 0:g.documentElement)instanceof SVGSVGElement&&vc.set(e,u.responseXML.documentElement),xD(e)})},CD=function(e,n,i){rw(e,n,function(r,s){var u;r?i(r):((u=s.responseXML)===null||u===void 0?void 0:u.documentElement)instanceof SVGSVGElement&&i(null,s.responseXML.documentElement)})},TD=0,ED=function(){return++TD},us=[],fy={},kD="http://www.w3.org/2000/svg",Eh="http://www.w3.org/1999/xlink",dy=function(e,n,i,r,s,u,g){var p=e.getAttribute("data-src")||e.getAttribute("src");if(!p){g(new Error("Invalid data-src or src attribute"));return}if(us.indexOf(e)!==-1){us.splice(us.indexOf(e),1),e=null;return}us.push(e),e.setAttribute("src","");var y=r?SD:CD;y(p,s,function(E,x){if(!x){us.splice(us.indexOf(e),1),e=null,g(E);return}var O=e.getAttribute("id");O&&x.setAttribute("id",O);var j=e.getAttribute("title");j&&x.setAttribute("title",j);var $=e.getAttribute("width");$&&x.setAttribute("width",$);var Y=e.getAttribute("height");Y&&x.setAttribute("height",Y);var z=Array.from(new Set(Th(Th(Th([],(x.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();x.setAttribute("class",z);var L=e.getAttribute("style");L&&x.setAttribute("style",L),x.setAttribute("data-src",p);var ne=[].filter.call(e.attributes,function(qe){return/^data-\w[\w-]*$/.test(qe.name)});if(Array.prototype.forEach.call(ne,function(qe){qe.name&&qe.value&&x.setAttribute(qe.name,qe.value)}),i){var te={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]},he,ie,xe,b,ke;Object.keys(te).forEach(function(qe){he=qe,xe=te[qe],ie=x.querySelectorAll(he+"[id]");for(var at=function(Ze,Qe){b=ie[Ze].id,ke=b+"-"+ED();var Je;Array.prototype.forEach.call(xe,function(Bt){Je=x.querySelectorAll("["+Bt+'*="'+b+'"]');for(var Ht=0,zn=Je.length;Ht<zn;Ht++){var hr=Je[Ht].getAttribute(Bt);hr&&!hr.match(new RegExp('url\\("?#'+b+'"?\\)'))||Je[Ht].setAttribute(Bt,"url(#"+ke+")")}});for(var Ke=x.querySelectorAll("[*|href]"),ht=[],wt=0,xt=Ke.length;wt<xt;wt++){var pt=Ke[wt].getAttributeNS(Eh,"href");pt&&pt.toString()==="#"+ie[Ze].id&&ht.push(Ke[wt])}for(var Tt=0,Xe=ht.length;Tt<Xe;Tt++)ht[Tt].setAttributeNS(Eh,"href","#"+ke);ie[Ze].id=ke},_e=0,Ae=ie.length;_e<Ae;_e++)at(_e)})}x.removeAttribute("xmlns:a");for(var ve=x.querySelectorAll("script"),nt=[],gt,tt,et=0,ft=ve.length;et<ft;et++)tt=ve[et].getAttribute("type"),(!tt||tt==="application/ecmascript"||tt==="application/javascript"||tt==="text/javascript")&&(gt=ve[et].innerText||ve[et].textContent,gt&&nt.push(gt),x.removeChild(ve[et]));if(nt.length>0&&(n==="always"||n==="once"&&!fy[p])){for(var me=0,Me=nt.length;me<Me;me++)new Function(nt[me])(window);fy[p]=!0}var ze=x.querySelectorAll("style");if(Array.prototype.forEach.call(ze,function(qe){qe.textContent+=""}),x.setAttribute("xmlns",kD),x.setAttribute("xmlns:xlink",Eh),u(x),!e.parentNode){us.splice(us.indexOf(e),1),e=null,g(new Error("Parent node is null"));return}e.parentNode.replaceChild(x,e),us.splice(us.indexOf(e),1),e=null,g(null,x)})},_D=function(e,n){var i=n===void 0?{}:n,r=i.afterAll,s=r===void 0?function(){}:r,u=i.afterEach,g=u===void 0?function(){}:u,p=i.beforeEach,y=p===void 0?function(){}:p,E=i.cacheRequests,x=E===void 0?!0:E,O=i.evalScripts,j=O===void 0?"never":O,$=i.httpRequestWithCredentials,Y=$===void 0?!1:$,z=i.renumerateIRIElements,L=z===void 0?!0:z;if(e&&"length"in e)for(var ne=0,te=0,he=e.length;te<he;te++)dy(e[te],j,L,x,Y,y,function(ie,xe){g(ie,xe),e&&"length"in e&&e.length===++ne&&s(ne)});else e?dy(e,j,L,x,Y,y,function(ie,xe){g(ie,xe),s(1),e=null}):s(0)},PD=function(e){var n=(e==null?void 0:e.ownerDocument)||document;return n.defaultView||window},RD=function(e,n){for(var i in e)if(!(i in n))return!0;for(var r in n)if(e[r]!==n[r])return!0;return!1},AD=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],Hf="http://www.w3.org/2000/svg",hy="http://www.w3.org/1999/xlink",Wp=function(t){tw(e,t);function e(){for(var i,r=arguments.length,s=new Array(r),u=0;u<r;u++)s[u]=arguments[u];return i=t.call.apply(t,[this].concat(s))||this,i.initialState={hasError:!1,isLoading:!0},i.state=i.initialState,i._isMounted=!1,i.reactWrapper=void 0,i.nonReactWrapper=void 0,i.refCallback=function(g){i.reactWrapper=g},i}var n=e.prototype;return n.renderSVG=function(){var r=this;if(this.reactWrapper instanceof PD(this.reactWrapper).Node){var s=this.props,u=s.desc,g=s.evalScripts,p=s.httpRequestWithCredentials,y=s.renumerateIRIElements,E=s.src,x=s.title,O=s.useRequestCache,j=this.props.onError,$=this.props.beforeInjection,Y=this.props.afterInjection,z=this.props.wrapper,L,ne;z==="svg"?(L=document.createElementNS(Hf,z),L.setAttribute("xmlns",Hf),L.setAttribute("xmlns:xlink",hy),ne=document.createElementNS(Hf,z)):(L=document.createElement(z),ne=document.createElement(z)),L.appendChild(ne),ne.dataset.src=E,this.nonReactWrapper=this.reactWrapper.appendChild(L);var te=function(b){if(r.removeSVG(),!r._isMounted){j(b);return}r.setState(function(){return{hasError:!0,isLoading:!1}},function(){j(b)})},he=function(b,ke){if(b){te(b);return}r._isMounted&&r.setState(function(){return{isLoading:!1}},function(){try{Y(ke)}catch(ve){te(ve)}})},ie=function(b){if(b.setAttribute("role","img"),u){var ke=b.querySelector(":scope > desc");ke&&b.removeChild(ke);var ve=document.createElement("desc");ve.innerHTML=u,b.prepend(ve)}if(x){var nt=b.querySelector(":scope > title");nt&&b.removeChild(nt);var gt=document.createElement("title");gt.innerHTML=x,b.prepend(gt)}try{$(b)}catch(tt){te(tt)}};_D(ne,{afterEach:he,beforeEach:ie,cacheRequests:O,evalScripts:g,httpRequestWithCredentials:p,renumerateIRIElements:y})}},n.removeSVG=function(){var r;(r=this.nonReactWrapper)!=null&&r.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},n.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},n.componentDidUpdate=function(r){var s=this;RD(kc({},r),this.props)&&this.setState(function(){return s.initialState},function(){s.removeSVG(),s.renderSVG()})},n.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},n.render=function(){var r=this.props;r.afterInjection,r.beforeInjection,r.desc,r.evalScripts;var s=r.fallback;r.httpRequestWithCredentials;var u=r.loading;r.renumerateIRIElements,r.src,r.title,r.useRequestCache;var g=r.wrapper,p=vp(r,AD),y=g;return kn.createElement(y,kc({},p,{ref:this.refCallback},g==="svg"?{xmlns:Hf,xmlnsXlink:hy}:{}),this.state.isLoading&&u&&kn.createElement(u,null),this.state.hasError&&s&&kn.createElement(s,null))},e}(kn.Component);Wp.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};Wp.propTypes={afterInjection:xr.func,beforeInjection:xr.func,desc:xr.string,evalScripts:xr.oneOf(["always","once","never"]),fallback:xr.oneOfType([xr.func,xr.object,xr.string]),httpRequestWithCredentials:xr.bool,loading:xr.oneOfType([xr.func,xr.object,xr.string]),onError:xr.func,renumerateIRIElements:xr.bool,src:xr.string.isRequired,title:xr.string,useRequestCache:xr.bool,wrapper:xr.oneOf(["div","span","svg"])};function OD(t){return ut.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...t,children:ut.jsx("path",{fill:"currenColor",d:"M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"})})}function DD(t){const{children:e,parentRef:n,onlyChild:i}=t,[r,s]=Pe.useState({top:0,left:0});return Pe.useLayoutEffect(()=>{if(n.current){const u=n.current.getBoundingClientRect();s({top:u.top,left:u.left+u.width})}},[n]),i?e:Ly.createPortal(ut.jsx("div",{style:{position:"fixed",top:r.top,left:r.left,zIndex:1200},children:e}),n.current)}function ID(t){const{children:e,title:n,hasTooltip:i}=t,r=Pe.useRef(),[s,u]=Pe.useState(!1),[g,p]=Pe.useState({top:0,left:0});return ut.jsxs("div",{className:"tooltip-item__wrapper",onMouseOver:()=>{if(u(!0),r.current){const y=r.current.getBoundingClientRect();p({top:y.top-20,left:y.left})}},onMouseLeave:()=>u(!1),ref:r,children:[ut.jsx("div",{children:e}),s&&i&&ut.jsx("div",{className:"tooltip-item__content",style:{position:"fixed",background:"#85858A",borderRadius:"4px",color:"#fff",padding:"4px 8px",top:g.top,left:g.left,zIndex:1400,fontSize:10,transition:"all 0.2s ease-in-out",animation:"fadeIn 0.2s ease-in-out",pointerEvents:"none"},children:n})]})}function iw({item:t,level:e=0,...n}){var gt,tt,et,ft;const{isActive:i,isCollapsed:r,expanded:s,toggleExpand:u}=n,g=`level-${e}`,p=r?"collapsed":"expanded",y=i(t.id)?"active":"",E=(me,Me=g)=>`${me} ${Me} ${p} ${y}`,x=!!((gt=t.children)!=null&&gt.length),[O,j]=Pe.useState(!1),$=Pe.useRef(),Y=window.location.origin,z=t.path&&t.path.includes("http")?new URL(t.path):{origin:"",pathname:""},L=window.location.pathname.split("/")[1],ne=z.pathname.split("/")[1],te=n.ssr||!Y.includes("local")&&Y!==z.origin||ne!==L,he=x||e===0?"div":te?"a":My.Link,ie=t.path||"#",xe=e+1,b=x&&!(r&&xe>=2&&!O),ke=r||e===0?void 0:`${e}rem`;console.log("hasDropdown:",b);const ve=()=>{j(!0)},nt=()=>{j(!1)};return ut.jsxs("div",{ref:$,className:E("menu-item__wrapper"),onMouseOver:ve,onMouseOut:nt,children:[ut.jsx(ID,{hasTooltip:r&&e===1,children:ut.jsxs(he,{to:ie,href:ie,className:E("menu-item__link"),style:{paddingLeft:ke,transition:"all 0.3s",color:i(t.id)?((tt=n.brandColors)==null?void 0:tt.primary400)||vo.primary400:void 0,backgroundColor:i(t.id)&&e===1?(et=n.brandColors)==null?void 0:et.primary200:void 0},onClick:me=>{x&&(me.preventDefault(),r||u(t.id))},children:[e!==0&&ut.jsx(MD,{cls:E,item:t}),ut.jsx("span",{className:E("menu-item__label"),children:t.name}),x&&ut.jsx("div",{className:E("menu-item__icon-arrow__wrapper"),children:ut.jsx(OD,{className:E(`menu-item__icon-arrow__icon ${s(t.id)?"open":"close"}`)})})]}),title:t.name}),b&&ut.jsx(DD,{parentRef:$,onlyChild:!r||r&&xe<2,children:ut.jsx(hD.div,{className:E(`menu-item__dropdown ${s(t.id)?"menu-item__dropdown--open":"menu-item__dropdown--close"}`,`level-${xe}`),initial:{height:r||s(t.id)?"auto":0},animate:{height:r||s(t.id)?"auto":0},transition:{duration:.25},children:(ft=t.children)==null?void 0:ft.map(me=>Pe.createElement(iw,{...n,key:me.id,item:me,level:xe}))})})]})}function MD({item:t,cls:e}){var u,g;const[n,i]=Pe.useState(!t.icon),r=()=>{i(!0)},s=(u=t.icon)==null?void 0:u.endsWith(".svg");return ut.jsx("div",{className:e("menu-item__icon"),children:n?ut.jsx("div",{style:{width:24,height:24,backgroundColor:"#dadada",borderRadius:"5px",display:"flex",justifyContent:"center",alignItems:"center"},children:(g=t.name.trim().at(0))==null?void 0:g.toUpperCase()}):s?ut.jsx(Wp,{src:t.icon,beforeInjection:p=>{p.setAttribute("style","margin: 0 auto;"),p.querySelectorAll("path").forEach(E=>{E.hasAttribute("fill")&&E.setAttribute("fill","currentColor"),E.hasAttribute("stroke")&&E.setAttribute("stroke","currentColor")})}}):ut.jsx("img",{src:t.icon||"/",alt:" ",style:{height:24,maxHeight:24},onError:r})})}function LD(){return ut.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",children:ut.jsx("path",{d:"M21 18v2H3v-2h18zM6.596 3.903L8.01 5.318 4.828 8.5 8.01 11.68l-1.414 1.415L2 8.5l4.596-4.597zM21 11v2h-9v-2h9zm0-7v2h-9V4h9z"})})}function FD(){return ut.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",children:ut.jsx("path",{d:"M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"})})}function jD(t){return ut.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"20",fill:"none",viewBox:"0 0 18 20",...t,children:ut.jsx("path",{fill:"#E01B00",fillRule:"evenodd",d:"M.179 2.875A2.375 2.375 0 012.554.5h3.393a1.018 1.018 0 010 2.036H2.554a.34.34 0 00-.34.339v14.25c0 .187.152.34.34.34h3.393a1.018 1.018 0 110 2.035H2.554a2.375 2.375 0 01-2.375-2.375V2.875zm14.167 6.107h-7.72a1.018 1.018 0 000 2.036h7.72l-2.673 2.673a1.018 1.018 0 101.44 1.44l4.41-4.411a1.018 1.018 0 000-1.44l-4.41-4.41a1.018 1.018 0 10-1.44 1.439l2.673 2.673z",clipRule:"evenodd"})})}const BD=`.wrap-section{padding:0 8px;transition:all .3s}.wrap-section.collapsed{padding:0 4px}.side-bar{display:flex;flex-direction:column;max-width:18rem;height:calc(100vh - 64px);border-right:1px solid #ddd;background-color:#fafafa;transition:all .3s}.side-bar.expanded{width:17rem}.side-bar.collapsed{width:64px}.side-bar__wrap-btn-logout,.side-bar__btn-logout{margin:40px 0}.side-bar__logout-btn__text{margin-left:12px;font-size:.875rem;opacity:1}.side-bar__logout-btn__text.collapsed{opacity:0;transition:ease-in-out .2s;transition-delay:.15s}.side-bar__wrapper-toggle-btn{display:flex;flex-direction:row;justify-content:flex-end;transition:all .3s;margin-right:-8px;margin-top:40px}.side-bar__wrapper-toggle-btn.collapsed{justify-content:center;width:100%}.side-bar__toggle-btn{margin-top:-6px;color:#85858a}.side-bar__logout-btn{width:100%;text-align:left;display:flex;flex-direction:row;align-items:center;padding:8px 16px 8px 18.6665px;min-height:48px;border-radius:.375rem;overflow:hidden;transition:all .3s ease-in-out}.side-bar__logout-btn:hover{background-color:#919eab14}.side-bar__icon-logout{flex-shrink:0}.menu-item__wrapper{display:flex;flex-direction:column;position:relative;width:100%}.menu-item__link{display:flex;flex-direction:row;border-radius:.375rem;align-items:center;padding:.5rem;position:relative;height:48px;cursor:pointer;color:#85858a}.menu-item__link:hover{background-color:#919eab14}.menu-item__link.collapsed.level-1{padding-left:calc(.5rem + 7.665px)!important}.menu-item__link.active{background-color:#009d4f1a;color:inherit}.menu-item__link.active.level-2,.menu-item__link.active.level-3,.menu-item__link.active.level-4,.menu-item__link.active.level-5,.menu-item__link.active.level-6,.menu-item__link.active.level-7,.menu-item__link.active.level-8,.menu-item__link.active.level-9,.menu-item__link.active.level-10{background-color:inherit;color:inherit}.menu-item__link.active.level-2:hover,.menu-item__link.active.level-3:hover,.menu-item__link.active.level-4:hover,.menu-item__link.active.level-5:hover,.menu-item__link.active.level-6:hover,.menu-item__link.active.level-7:hover,.menu-item__link.active.level-8:hover,.menu-item__link.active.level-9:hover,.menu-item__link.active.level-10:hover{background-color:#919eab14}.menu-item__link.level-0{height:37px}.menu-item__link.menu-item__link.collapsed.level-0{padding:0;height:0;transition:all .15s}.menu-item__icon{width:1.5rem;height:1.5rem;flex-shrink:0;display:grid;place-items:center}.menu-item__icon.collapsed.level-1>*{margin:0 auto}.menu-item__label{font-size:.875rem;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%;flex-shrink:1;margin-left:12px;padding-right:12px;color:#292929;opacity:1}.menu-item__label.level-1.collapsed{text-overflow:unset}.menu-item__label.active{color:inherit}.menu-item__label.collapsed{margin-left:8px;font-size:.75rem;line-height:1rem}.menu-item__label.collapsed.level-0,.menu-item__label.collapsed.level-1{font-size:.875rem;opacity:0;transition-delay:.15s}.menu-item__label.level-0{color:#85858a;margin-left:0}.menu-item__icon-arrow__wrapper{display:grid;place-items:center;position:absolute;top:50%;transform:translateY(-50%);right:0}.menu-item__icon-arrow__wrapper.expanded{right:4px}.menu-item__icon-arrow__wrapper.level-0.collapsed{display:none}.menu-item__icon-arrow__icon{transition:all .3s!important;transform:rotate(-90deg)!important}.menu-item__icon-arrow__icon.active{color:inherit}.menu-item__icon-arrow__icon.expanded.open{transform:rotate(0)!important}.menu-item__dropdown.collapsed{background-color:#fafafa;border:1px solid #ddd;box-shadow:#0000001a 0 10px 15px -3px,#0000000d 0 4px 6px -2px;border-radius:4px;width:180px;max-width:180px;padding:4px;z-index:1200}.menu-item__dropdown,.menu-item__dropdown>*{margin-top:4px}.menu-item__dropdown.expanded.menu-item__dropdown--close{margin-top:0;transition:margin-top .3s}.menu-item__dropdown:first-of-type{margin-top:0}.menu-item__dropdown>*:first-child{margin-top:0}.menu-item__dropdown.collapsed .menu-item__link{height:40px}.menu-item__dropdown.collapsed .menu-item__link.level-1{height:48px}.menu-item__dropdown.collapsed.level-1{width:auto;max-width:unset;box-shadow:none;border:none;padding:0;background-color:unset}.menu-item__dropdown.expanded{overflow:hidden}.icon-btn{display:inline-flex;align-items:center;justify-content:center;padding:8px;border-radius:50%;background-color:transparent;transition:background-color .3s ease;border:none}.icon-btn:hover{background-color:var(--btn-bg-hover)}.simplebar-scrollbar:before{background-color:#0000002d}.side-bar__menu.collapsed .simplebar-track.simplebar-vertical{display:none}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}
135
135
  `,py=localStorage.getItem("isCollapsed");function ND(t){const{baseUrl:e,menuPath:n}=t,i=My.useLocation(),[r,s]=Pe.useState([]),[u,g]=Pe.useState(py===null?!0:py==="true"),[p,y]=Pe.useState({}),E=Up(r),[x,O]=Pe.useState(window.location.href);Pe.useEffect(()=>{O(window.location.href)},[i]);const j=ow(E,x).filter(ie=>ie.parentKey!==0);console.log("matchPaths:",x,i,j);const $=ie=>{y({...p,[ie]:!p[ie]})},Y=()=>{g(!u),localStorage.setItem("isCollapsed",JSON.stringify(!u))};Pe.useLayoutEffect(()=>{(async()=>{var xe,b;try{const ve=e+(n||"/global-menu-config/api/v1/menu-items/user"),{data:nt}=await Iy.get(ve,{withCredentials:!0});let gt=nt.map(et=>({...et,parentKey:0}));gt=sw(gt),t.replacePath&&(gt=aw(gt,t.replacePath));const tt=WD(gt);y(tt),s(gt)}catch(ke){console.log(ke),gp(((b=(xe=ke.response)==null?void 0:xe.data)==null?void 0:b.errorMessage)||"Have error when get menu items")}})()},[e,n,t.replacePath]);const[z,L]=Pe.useState(!1),ne=u?"collapsed":"expanded",te=ie=>`${ie} ${ne}`,he=Pe.useRef(null);return ut.jsxs("div",{className:te("side-bar"),children:[ut.jsx("div",{className:te("wrap-section side-bar__wrapper-toggle-btn"),children:ut.jsx("button",{className:"icon-btn side-bar__toggle-btn",onClick:Y,children:u?ut.jsx(FD,{}):ut.jsx(LD,{})})}),ut.jsx(Ib,{ref:he,className:te("wrap-section side-bar__menu"),style:{marginTop:24,flex:1,overflow:"auto",height:"100%",overflowX:"hidden"},children:r.map(ie=>{const xe=b=>j.some(ke=>ke.id===b);return ut.jsx(iw,{item:ie,isActive:xe,isCollapsed:u,expanded:b=>p[b],toggleExpand:$,replacePath:t.replacePath,ssr:t.ssr,brandColors:t.brandColors},ie.id)})}),ut.jsxs("div",{className:te("wrap-section side-bar__wrap-btn-logout"),children:[ut.jsxs("button",{className:te("side-bar__logout-btn"),onClick:()=>L(!0),children:[ut.jsx(jD,{className:te("side-bar__icon-logout")}),ut.jsx("span",{className:te("side-bar__logout-btn__text"),children:"Logout"})]}),ut.jsx(Fy,{isOpen:z,onClose:()=>L(!1),onConfirm:()=>t.logout?t.logout():qT(t.baseUrl)})]})]})}function Up(t){let e=[];for(const n of t)e.push(n),n.children&&(e=e.concat(Up(n.children)));return e}function HD(t,e){const n=new URL(t).searchParams,i=new URL(e).searchParams;return Array.from(i).filter(([r,s])=>s===n.get(r)).length}function ow(t,e){const n=new URL(e),i=t.filter(u=>u.path&&u.path.includes("http")).map(u=>({item:u,itemUrl:new URL(u.path),matchingParamsCount:HD(e,u.path)})).sort((u,g)=>{const p=new URL(u.itemUrl).searchParams,y=new URL(g.itemUrl).searchParams;return Array.from(p).length-Array.from(y).length}).filter(({itemUrl:u})=>n.origin===u.origin).filter(({itemUrl:u})=>n.pathname===u.pathname).sort((u,g)=>g.matchingParamsCount-u.matchingParamsCount);let r=i.length>0?i[0].item:null;console.log("matchingItems:",i);let s=[];for(;r;)s=[r,...s],r=t.find(u=>u.id===(r==null?void 0:r.parentKey))||null;return s}function aw(t,e){return t.map(n=>(n.path&&(n.path=e(n.path)),n.children&&n.children.length>0&&(n.children=aw(n.children,e)),n))}function sw(t){return t.map(n=>n.path&&!n.path.includes("http")&&n.path.includes("/")?{...n,path:window.location.origin+n.path}:(n.children&&(n.children=sw(n.children)),n))}function WD(t){const e=Up(t),n=ow(e,window.location.href),i={};return n.forEach(r=>i[r.id]=!0),e.forEach(r=>{r.parentKey||(i[r.id]=!0)}),i}function UD(t){return ut.jsx(Cb,{styles:[nP,BD],style:{position:"sticky",zIndex:20},children:ut.jsx(ND,{...t})})}const VD={"page-container":"_page-container_1pwo1_1","page-main-content":"_page-main-content_1pwo1_8","page-title":"_page-title_1pwo1_19","text-base":"_text-base_1pwo1_26","mt-4":"_mt-4_1pwo1_33"};var ud={exports:{}};/**
136
136
  * @license
137
137
  * Lodash <https://lodash.com/>
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../index.module-64089a88.cjs"),c=require("axios"),u=require("react"),i=require("react/jsx-runtime");require("@r2wc/react-to-web-component");require("moment");require("@mui/material");const l=require("react-router-dom"),m=r=>{const[t,n]=u.useState([]);return u.useEffect(()=>{c.get(`${r}/user-management/api/v1/users/my-account/permissions`,{withCredentials:!0}).then(e=>n(e.data)).catch(e=>{console.error("Getting user permission error:",e)})},[r]),t},a=r=>(t,n)=>{const e=m(r);return n?t.every(o=>e==null?void 0:e.includes(o)):t.some(o=>e==null?void 0:e.includes(o))},P=({baseUrl:r,accessWith:t,requireAll:n,children:e})=>a(r)(t,n)?i.jsx(i.Fragment,{children:e}):null,h=({accessWith:r,requireAll:t,baseUrl:n,unAuthorizedPath:e,children:o})=>a(n)(r,t)?i.jsx(i.Fragment,{children:o}):i.jsx(l.Navigate,{to:e,replace:!0});exports.AuthProvider=s.AuthProvider;exports.SaasThemeProvider=s.SaasThemeProvider;exports.TranslationProvider=s.TranslationProvider;exports.color=s.color;exports.createCustomTheme=s.createCustomTheme;exports.getAxiosInstance=s.getAxiosInstance;exports.search=s.search;exports.translate=s.translate;exports.translationConfig=s.translationConfig;exports.useAuth=s.useAuth;exports.useCustomTranslation=s.useCustomTranslation;exports.useTheme=s.useTheme;exports.useTranslation=s.useTranslation$1;exports.HasPermission=P;exports.PermissionRoute=h;exports.getUseHasPermission=a;exports.useGetPermission=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../index.module-e296aedb.cjs"),c=require("axios"),u=require("react"),i=require("react/jsx-runtime");require("@r2wc/react-to-web-component");require("moment");require("@mui/material");const l=require("react-router-dom"),m=r=>{const[t,n]=u.useState([]);return u.useEffect(()=>{c.get(`${r}/user-management/api/v1/users/my-account/permissions`,{withCredentials:!0}).then(e=>n(e.data)).catch(e=>{console.error("Getting user permission error:",e)})},[r]),t},a=r=>(t,n)=>{const e=m(r);return n?t.every(o=>e==null?void 0:e.includes(o)):t.some(o=>e==null?void 0:e.includes(o))},P=({baseUrl:r,accessWith:t,requireAll:n,children:e})=>a(r)(t,n)?i.jsx(i.Fragment,{children:e}):null,h=({accessWith:r,requireAll:t,baseUrl:n,unAuthorizedPath:e,children:o})=>a(n)(r,t)?i.jsx(i.Fragment,{children:o}):i.jsx(l.Navigate,{to:e,replace:!0});exports.AuthProvider=s.AuthProvider;exports.SaasThemeProvider=s.SaasThemeProvider;exports.TranslationProvider=s.TranslationProvider;exports.color=s.color;exports.createCustomTheme=s.createCustomTheme;exports.getAxiosInstance=s.getAxiosInstance;exports.search=s.search;exports.translate=s.translate;exports.translationConfig=s.translationConfig;exports.useAuth=s.useAuth;exports.useCustomTranslation=s.useCustomTranslation;exports.useTheme=s.useTheme;exports.useTranslation=s.useTranslation$1;exports.HasPermission=P;exports.PermissionRoute=h;exports.getUseHasPermission=a;exports.useGetPermission=m;
@@ -1,4 +1,4 @@
1
- import { F, R as G, T as N, c as R, O as S, J as j, q, M as w, K as E, H as I, d as J, m as K, N as M } from "../index.module-d2d48785.js";
1
+ import { F, R as G, T as N, c as R, O as S, J as j, q, M as w, K as E, H as I, d as J, m as K, N as M } from "../index.module-9c05f01a.js";
2
2
  import m from "axios";
3
3
  import { useState as u, useEffect as c } from "react";
4
4
  import { jsx as n, Fragment as a } from "react/jsx-runtime";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ukpc-lib/react",
3
3
  "private": false,
4
- "version": "0.3.24",
4
+ "version": "0.3.25",
5
5
  "type": "module",
6
6
  "main": "./dist/",
7
7
  "module": "./dist/",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../react-to-web-component-3847ebf5.cjs");const e=require("../index-dd12df6a.cjs");exports.GlobalMenu=e.GlobalMenu;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../react-to-web-component-3847ebf5.cjs");const e=require("../index-17856103.cjs");exports.GlobalMenu=e.GlobalMenu;
@@ -1,5 +1,5 @@
1
1
  import "../react-to-web-component-469d91d4.js";
2
- import { G as e } from "../index-7da484ab.js";
2
+ import { G as e } from "../index-e5d0789b.js";
3
3
  export {
4
4
  e as GlobalMenu
5
5
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../react-to-web-component-3847ebf5.cjs");require("../index-dd12df6a.cjs");const e=require("../index-ed5d8e6c.cjs");require("../index-4327002b.cjs");exports.TopBar=e.TopBar;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../react-to-web-component-3847ebf5.cjs");require("../index-17856103.cjs");const e=require("../index-58e06113.cjs");require("../index-4327002b.cjs");exports.TopBar=e.TopBar;
@@ -1,6 +1,6 @@
1
1
  import "../react-to-web-component-469d91d4.js";
2
- import "../index-7da484ab.js";
3
- import { T as i } from "../index-a62fc33c.js";
2
+ import "../index-e5d0789b.js";
3
+ import { T as i } from "../index-bc45cafb.js";
4
4
  import "../index-b3659f2e.js";
5
5
  export {
6
6
  i as TopBar
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../react-to-web-component-3847ebf5.cjs");const e=require("../index-ed5d8e6c.cjs");require("../index-dd12df6a.cjs");require("../index-4327002b.cjs");exports.HasPermission=e.HasPermission;exports.getUseHasPermission=e.getUseHasPermission;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../react-to-web-component-3847ebf5.cjs");const e=require("../index-58e06113.cjs");require("../index-17856103.cjs");require("../index-4327002b.cjs");exports.HasPermission=e.HasPermission;exports.getUseHasPermission=e.getUseHasPermission;
@@ -1,6 +1,6 @@
1
1
  import "../react-to-web-component-469d91d4.js";
2
- import { H as e, g as t } from "../index-a62fc33c.js";
3
- import "../index-7da484ab.js";
2
+ import { H as e, g as t } from "../index-bc45cafb.js";
3
+ import "../index-e5d0789b.js";
4
4
  import "../index-b3659f2e.js";
5
5
  export {
6
6
  e as HasPermission,
@@ -63,5 +63,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
63
63
  * content-type
64
64
  * Copyright(c) 2015 Douglas Christopher Wilson
65
65
  * MIT Licensed
66
- */var wl=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,Rb=/\\([\u000b\u0020-\u00ff])/g,Ab=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,Ob=_b;function _b(e){if(!e)throw new TypeError("argument string is required");var t=typeof e=="object"?Mb(e):e;if(typeof t!="string")throw new TypeError("argument string is required to be a string");var n=t.indexOf(";"),r=n!==-1?t.slice(0,n).trim():t.trim();if(!Ab.test(r))throw new TypeError("invalid media type");var i=new jb(r.toLowerCase());if(n!==-1){var o,s,a;for(wl.lastIndex=n;s=wl.exec(t);){if(s.index!==n)throw new TypeError("invalid parameter format");n+=s[0].length,o=s[1].toLowerCase(),a=s[2],a.charCodeAt(0)===34&&(a=a.slice(1,-1),a.indexOf("\\")!==-1&&(a=a.replace(Rb,"$1"))),i.parameters[o]=a}if(n!==t.length)throw new TypeError("invalid parameter format")}return i}function Mb(e){var t;if(typeof e.getHeader=="function"?t=e.getHeader("content-type"):typeof e.headers=="object"&&(t=e.headers&&e.headers["content-type"]),typeof t!="string")throw new TypeError("content-type header is missing from object");return t}function jb(e){this.parameters=Object.create(null),this.type=e}var Rt=new Map,Gf=function(t){return t.cloneNode(!0)},Sl=function(){return window.location.protocol==="file:"},Xf=function(t,n,r){var i=new XMLHttpRequest;i.onreadystatechange=function(){try{if(!/\.svg/i.test(t)&&i.readyState===2){var o=i.getResponseHeader("Content-Type");if(!o)throw new Error("Content type not found");var s=Ob(o).type;if(!(s==="image/svg+xml"||s==="text/plain"))throw new Error("Invalid content type: ".concat(s))}if(i.readyState===4){if(i.status===404||i.responseXML===null)throw new Error(Sl()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+t);if(i.status===200||Sl()&&i.status===0)r(null,i);else throw new Error("There was a problem injecting the SVG: "+i.status+" "+i.statusText)}}catch(a){if(i.abort(),a instanceof Error)r(a,i);else throw a}},i.open("GET",t),i.withCredentials=n,i.overrideMimeType&&i.overrideMimeType("text/xml"),i.send()},Qe={},El=function(t,n){Qe[t]=Qe[t]||[],Qe[t].push(n)},Vb=function(t){for(var n=function(s,a){setTimeout(function(){if(Array.isArray(Qe[t])){var l=Rt.get(t),u=Qe[t][s];l instanceof SVGSVGElement&&u(null,Gf(l)),l instanceof Error&&u(l),s===Qe[t].length-1&&delete Qe[t]}},0)},r=0,i=Qe[t].length;r<i;r++)n(r)},Lb=function(t,n,r){if(Rt.has(t)){var i=Rt.get(t);if(i===void 0){El(t,r);return}if(i instanceof SVGSVGElement){r(null,Gf(i));return}}Rt.set(t,void 0),El(t,r),Xf(t,n,function(o,s){var a;o?Rt.set(t,o):((a=s.responseXML)===null||a===void 0?void 0:a.documentElement)instanceof SVGSVGElement&&Rt.set(t,s.responseXML.documentElement),Vb(t)})},Fb=function(t,n,r){Xf(t,n,function(i,o){var s;i?r(i):((s=o.responseXML)===null||s===void 0?void 0:s.documentElement)instanceof SVGSVGElement&&r(null,o.responseXML.documentElement)})},Db=0,Ib=function(){return++Db},Pe=[],Cl={},Nb="http://www.w3.org/2000/svg",wi="http://www.w3.org/1999/xlink",kl=function(t,n,r,i,o,s,a){var l=t.getAttribute("data-src")||t.getAttribute("src");if(!l){a(new Error("Invalid data-src or src attribute"));return}if(Pe.indexOf(t)!==-1){Pe.splice(Pe.indexOf(t),1),t=null;return}Pe.push(t),t.setAttribute("src","");var u=i?Lb:Fb;u(l,o,function(f,c){if(!c){Pe.splice(Pe.indexOf(t),1),t=null,a(f);return}var d=t.getAttribute("id");d&&c.setAttribute("id",d);var h=t.getAttribute("title");h&&c.setAttribute("title",h);var p=t.getAttribute("width");p&&c.setAttribute("width",p);var g=t.getAttribute("height");g&&c.setAttribute("height",g);var y=Array.from(new Set(bi(bi(bi([],(c.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(t.getAttribute("class")||"").split(" "),!0))).join(" ").trim();c.setAttribute("class",y);var v=t.getAttribute("style");v&&c.setAttribute("style",v),c.setAttribute("data-src",l);var b=[].filter.call(t.attributes,function(Q){return/^data-\w[\w-]*$/.test(Q.name)});if(Array.prototype.forEach.call(b,function(Q){Q.name&&Q.value&&c.setAttribute(Q.name,Q.value)}),r){var x={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]},S,E,k,T,P;Object.keys(x).forEach(function(Q){S=Q,k=x[Q],E=c.querySelectorAll(S+"[id]");for(var We=function(Et,Ur){T=E[Et].id,P=T+"-"+Ib();var at;Array.prototype.forEach.call(k,function(Wr){at=c.querySelectorAll("["+Wr+'*="'+T+'"]');for(var En=0,ed=at.length;En<ed;En++){var Qo=at[En].getAttribute(Wr);Qo&&!Qo.match(new RegExp('url\\("?#'+T+'"?\\)'))||at[En].setAttribute(Wr,"url(#"+P+")")}});for(var Le=c.querySelectorAll("[*|href]"),Ct=[],kt=0,Ut=Le.length;kt<Ut;kt++){var lt=Le[kt].getAttributeNS(wi,"href");lt&&lt.toString()==="#"+E[Et].id&&Ct.push(Le[kt])}for(var Ee=0,Zo=Ct.length;Ee<Zo;Ee++)Ct[Ee].setAttributeNS(wi,"href","#"+P);E[Et].id=P},wt=0,D=E.length;wt<D;wt++)We(wt)})}c.removeAttribute("xmlns:a");for(var _=c.querySelectorAll("script"),H=[],z,$,q=0,X=_.length;q<X;q++)$=_[q].getAttribute("type"),(!$||$==="application/ecmascript"||$==="application/javascript"||$==="text/javascript")&&(z=_[q].innerText||_[q].textContent,z&&H.push(z),c.removeChild(_[q]));if(H.length>0&&(n==="always"||n==="once"&&!Cl[l])){for(var Z=0,G=H.length;Z<G;Z++)new Function(H[Z])(window);Cl[l]=!0}var Te=c.querySelectorAll("style");if(Array.prototype.forEach.call(Te,function(Q){Q.textContent+=""}),c.setAttribute("xmlns",Nb),c.setAttribute("xmlns:xlink",wi),s(c),!t.parentNode){Pe.splice(Pe.indexOf(t),1),t=null,a(new Error("Parent node is null"));return}t.parentNode.replaceChild(c,t),Pe.splice(Pe.indexOf(t),1),t=null,a(null,c)})},Bb=function(t,n){var r=n===void 0?{}:n,i=r.afterAll,o=i===void 0?function(){}:i,s=r.afterEach,a=s===void 0?function(){}:s,l=r.beforeEach,u=l===void 0?function(){}:l,f=r.cacheRequests,c=f===void 0?!0:f,d=r.evalScripts,h=d===void 0?"never":d,p=r.httpRequestWithCredentials,g=p===void 0?!1:p,y=r.renumerateIRIElements,v=y===void 0?!0:y;if(t&&"length"in t)for(var b=0,x=0,S=t.length;x<S;x++)kl(t[x],h,v,c,g,u,function(E,k){a(E,k),t&&"length"in t&&t.length===++b&&o(b)});else t?kl(t,h,v,c,g,u,function(E,k){a(E,k),o(1),t=null}):o(0)},$b=function(t){var n=(t==null?void 0:t.ownerDocument)||document;return n.defaultView||window},zb=function(t,n){for(var r in t)if(!(r in n))return!0;for(var i in n)if(t[i]!==n[i])return!0;return!1},Ub=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],Vn="http://www.w3.org/2000/svg",Tl="http://www.w3.org/1999/xlink",Yo=function(e){qf(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o))||this,r.initialState={hasError:!1,isLoading:!0},r.state=r.initialState,r._isMounted=!1,r.reactWrapper=void 0,r.nonReactWrapper=void 0,r.refCallback=function(a){r.reactWrapper=a},r}var n=t.prototype;return n.renderSVG=function(){var i=this;if(this.reactWrapper instanceof $b(this.reactWrapper).Node){var o=this.props,s=o.desc,a=o.evalScripts,l=o.httpRequestWithCredentials,u=o.renumerateIRIElements,f=o.src,c=o.title,d=o.useRequestCache,h=this.props.onError,p=this.props.beforeInjection,g=this.props.afterInjection,y=this.props.wrapper,v,b;y==="svg"?(v=document.createElementNS(Vn,y),v.setAttribute("xmlns",Vn),v.setAttribute("xmlns:xlink",Tl),b=document.createElementNS(Vn,y)):(v=document.createElement(y),b=document.createElement(y)),v.appendChild(b),b.dataset.src=f,this.nonReactWrapper=this.reactWrapper.appendChild(v);var x=function(T){if(i.removeSVG(),!i._isMounted){h(T);return}i.setState(function(){return{hasError:!0,isLoading:!1}},function(){h(T)})},S=function(T,P){if(T){x(T);return}i._isMounted&&i.setState(function(){return{isLoading:!1}},function(){try{g(P)}catch(_){x(_)}})},E=function(T){if(T.setAttribute("role","img"),s){var P=T.querySelector(":scope > desc");P&&T.removeChild(P);var _=document.createElement("desc");_.innerHTML=s,T.prepend(_)}if(c){var H=T.querySelector(":scope > title");H&&T.removeChild(H);var z=document.createElement("title");z.innerHTML=c,T.prepend(z)}try{p(T)}catch($){x($)}};Bb(b,{afterEach:S,beforeEach:E,cacheRequests:d,evalScripts:a,httpRequestWithCredentials:l,renumerateIRIElements:u})}},n.removeSVG=function(){var i;(i=this.nonReactWrapper)!=null&&i.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},n.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},n.componentDidUpdate=function(i){var o=this;zb(It({},i),this.props)&&this.setState(function(){return o.initialState},function(){o.removeSVG(),o.renderSVG()})},n.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},n.render=function(){var i=this.props;i.afterInjection,i.beforeInjection,i.desc,i.evalScripts;var o=i.fallback;i.httpRequestWithCredentials;var s=i.loading;i.renumerateIRIElements,i.src,i.title,i.useRequestCache;var a=i.wrapper,l=Ko(i,Ub),u=a;return m.reactExports.createElement(u,It({},l,{ref:this.refCallback},a==="svg"?{xmlns:Vn,xmlnsXlink:Tl}:{}),this.state.isLoading&&s&&m.reactExports.createElement(s,null),this.state.hasError&&o&&m.reactExports.createElement(o,null))},t}(m.reactExports.Component);Yo.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};Yo.propTypes={afterInjection:K.func,beforeInjection:K.func,desc:K.string,evalScripts:K.oneOf(["always","once","never"]),fallback:K.oneOfType([K.func,K.object,K.string]),httpRequestWithCredentials:K.bool,loading:K.oneOfType([K.func,K.object,K.string]),onError:K.func,renumerateIRIElements:K.bool,src:K.string.isRequired,title:K.string,useRequestCache:K.bool,wrapper:K.oneOf(["div","span","svg"])};function Wb(e){return m.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...e,children:m.jsxRuntimeExports.jsx("path",{fill:"currenColor",d:"M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"})})}function Hb(e){const{children:t,parentRef:n,onlyChild:r}=e,[i,o]=m.reactExports.useState({top:0,left:0});return m.reactExports.useLayoutEffect(()=>{if(n.current){const s=n.current.getBoundingClientRect();o({top:s.top,left:s.left+s.width})}},[n]),r?t:m.reactDomExports.createPortal(m.jsxRuntimeExports.jsx("div",{style:{position:"fixed",top:i.top,left:i.left,zIndex:1200},children:t}),n.current)}function qb(e){const{children:t,title:n,hasTooltip:r}=e,i=m.reactExports.useRef(),[o,s]=m.reactExports.useState(!1),[a,l]=m.reactExports.useState({top:0,left:0});return m.jsxRuntimeExports.jsxs("div",{className:"tooltip-item__wrapper",onMouseOver:()=>{if(s(!0),i.current){const u=i.current.getBoundingClientRect();l({top:u.top-20,left:u.left})}},onMouseLeave:()=>s(!1),ref:i,children:[m.jsxRuntimeExports.jsx("div",{children:t}),o&&r&&m.jsxRuntimeExports.jsx("div",{className:"tooltip-item__content",style:{position:"fixed",background:"#919196",borderRadius:"4px",color:"#fff",padding:"4px 8px",top:a.top,left:a.left,zIndex:1400,fontSize:10,transition:"all 0.2s ease-in-out",animation:"fadeIn 0.2s ease-in-out",pointerEvents:"none"},children:n})]})}function Kf({item:e,level:t=0,...n}){var z,$,q,X;const{isActive:r,isCollapsed:i,expanded:o,toggleExpand:s}=n,a=`level-${t}`,l=i?"collapsed":"expanded",u=r(e.id)?"active":"",f=(Z,G=a)=>`${Z} ${G} ${l} ${u}`,c=!!((z=e.children)!=null&&z.length),[d,h]=m.reactExports.useState(!1),p=m.reactExports.useRef(),g=window.location.origin,y=e.path&&e.path.includes("http")?new URL(e.path):{origin:"",pathname:""},v=window.location.pathname.split("/")[1],b=y.pathname.split("/")[1],x=n.ssr||!g.includes("local")&&g!==y.origin||b!==v,S=c||t===0?"div":x?"a":Cb,E=e.path||"#",k=t+1,T=c&&!(i&&k>=2&&!d),P=i||t===0?void 0:`${t}rem`;console.log("hasDropdown:",T);const _=()=>{h(!0)},H=()=>{h(!1)};return m.jsxRuntimeExports.jsxs("div",{ref:p,className:f("menu-item__wrapper"),onMouseOver:_,onMouseOut:H,children:[m.jsxRuntimeExports.jsx(qb,{hasTooltip:i&&t===1,children:m.jsxRuntimeExports.jsxs(S,{to:E,href:E,className:f("menu-item__link"),style:{paddingLeft:P,transition:"all 0.3s",color:r(e.id)?(($=n.brandColors)==null?void 0:$.primary400)||Vt.primary400:void 0,backgroundColor:r(e.id)&&t===1?(q=n.brandColors)==null?void 0:q.primary200:void 0},onClick:Z=>{c&&(Z.preventDefault(),i||s(e.id))},children:[t!==0&&m.jsxRuntimeExports.jsx(Gb,{cls:f,item:e}),m.jsxRuntimeExports.jsx("span",{className:f("menu-item__label"),children:e.name}),c&&m.jsxRuntimeExports.jsx("div",{className:f("menu-item__icon-arrow__wrapper"),children:m.jsxRuntimeExports.jsx(Wb,{className:f(`menu-item__icon-arrow__icon ${o(e.id)?"open":"close"}`)})})]}),title:e.name}),T&&m.jsxRuntimeExports.jsx(Hb,{parentRef:p,onlyChild:!i||i&&k<2,children:m.jsxRuntimeExports.jsx(Jx.div,{className:f(`menu-item__dropdown ${o(e.id)?"menu-item__dropdown--open":"menu-item__dropdown--close"}`,`level-${k}`),initial:{height:i||o(e.id)?"auto":0},animate:{height:i||o(e.id)?"auto":0},transition:{duration:.25},children:(X=e.children)==null?void 0:X.map(Z=>m.reactExports.createElement(Kf,{...n,key:Z.id,item:Z,level:k}))})})]})}function Gb({item:e,cls:t}){var s,a;const[n,r]=m.reactExports.useState(!e.icon),i=()=>{r(!0)},o=(s=e.icon)==null?void 0:s.endsWith(".svg");return m.jsxRuntimeExports.jsx("div",{className:t("menu-item__icon"),children:n?m.jsxRuntimeExports.jsx("div",{style:{width:24,height:24,backgroundColor:"#dadada",borderRadius:"5px",display:"flex",justifyContent:"center",alignItems:"center"},children:(a=e.name.trim().at(0))==null?void 0:a.toUpperCase()}):o?m.jsxRuntimeExports.jsx(Yo,{src:e.icon,beforeInjection:l=>{l.setAttribute("style","margin: 0 auto;"),l.querySelectorAll("path").forEach(f=>{f.hasAttribute("fill")&&f.setAttribute("fill","currentColor"),f.hasAttribute("stroke")&&f.setAttribute("stroke","currentColor")})}}):m.jsxRuntimeExports.jsx("img",{src:e.icon||"/",alt:" ",style:{height:24,maxHeight:24},onError:i})})}function Xb(){return m.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",children:m.jsxRuntimeExports.jsx("path",{d:"M21 18v2H3v-2h18zM6.596 3.903L8.01 5.318 4.828 8.5 8.01 11.68l-1.414 1.415L2 8.5l4.596-4.597zM21 11v2h-9v-2h9zm0-7v2h-9V4h9z"})})}function Kb(){return m.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",children:m.jsxRuntimeExports.jsx("path",{d:"M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"})})}function Yb(e){return m.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"20",fill:"none",viewBox:"0 0 18 20",...e,children:m.jsxRuntimeExports.jsx("path",{fill:"#E01B00",fillRule:"evenodd",d:"M.179 2.875A2.375 2.375 0 012.554.5h3.393a1.018 1.018 0 010 2.036H2.554a.34.34 0 00-.34.339v14.25c0 .187.152.34.34.34h3.393a1.018 1.018 0 110 2.035H2.554a2.375 2.375 0 01-2.375-2.375V2.875zm14.167 6.107h-7.72a1.018 1.018 0 000 2.036h7.72l-2.673 2.673a1.018 1.018 0 101.44 1.44l4.41-4.411a1.018 1.018 0 000-1.44l-4.41-4.41a1.018 1.018 0 10-1.44 1.439l2.673 2.673z",clipRule:"evenodd"})})}const Jb=`.wrap-section{padding:0 8px;transition:all .3s}.wrap-section.collapsed{padding:0 4px}.side-bar{display:flex;flex-direction:column;max-width:18rem;height:calc(100vh - 64px);border-right:1px solid #ddd;background-color:#fafafa;transition:all .3s}.side-bar.expanded{width:17rem}.side-bar.collapsed{width:64px}.side-bar__wrap-btn-logout,.side-bar__btn-logout{margin:40px 0}.side-bar__logout-btn__text{margin-left:12px;font-size:.875rem;opacity:1}.side-bar__logout-btn__text.collapsed{opacity:0;transition:ease-in-out .2s;transition-delay:.15s}.side-bar__wrapper-toggle-btn{display:flex;flex-direction:row;justify-content:flex-end;transition:all .3s;margin-right:-8px;margin-top:40px}.side-bar__wrapper-toggle-btn.collapsed{justify-content:center;width:100%}.side-bar__toggle-btn{margin-top:-6px;color:#85858a}.side-bar__logout-btn{width:100%;text-align:left;display:flex;flex-direction:row;align-items:center;padding:8px 16px 8px 18.6665px;min-height:48px;border-radius:.375rem;overflow:hidden;transition:all .3s ease-in-out}.side-bar__logout-btn:hover{background-color:#919eab14}.side-bar__icon-logout{flex-shrink:0}.menu-item__wrapper{display:flex;flex-direction:column;position:relative;width:100%}.menu-item__link{display:flex;flex-direction:row;border-radius:.375rem;align-items:center;padding:.5rem;position:relative;height:48px;cursor:pointer;color:#85858a}.menu-item__link:hover{background-color:#919eab14}.menu-item__link.collapsed.level-1{padding-left:calc(.5rem + 7.665px)!important}.menu-item__link.active{background-color:#009d4f1a;color:inherit}.menu-item__link.active.level-2,.menu-item__link.active.level-3,.menu-item__link.active.level-4,.menu-item__link.active.level-5,.menu-item__link.active.level-6,.menu-item__link.active.level-7,.menu-item__link.active.level-8,.menu-item__link.active.level-9,.menu-item__link.active.level-10{background-color:inherit;color:inherit}.menu-item__link.active.level-2:hover,.menu-item__link.active.level-3:hover,.menu-item__link.active.level-4:hover,.menu-item__link.active.level-5:hover,.menu-item__link.active.level-6:hover,.menu-item__link.active.level-7:hover,.menu-item__link.active.level-8:hover,.menu-item__link.active.level-9:hover,.menu-item__link.active.level-10:hover{background-color:#919eab14}.menu-item__link.level-0{height:37px}.menu-item__link.menu-item__link.collapsed.level-0{padding:0;height:0;transition:all .15s}.menu-item__icon{width:1.5rem;height:1.5rem;flex-shrink:0;display:grid;place-items:center}.menu-item__icon.collapsed.level-1>*{margin:0 auto}.menu-item__label{font-size:.875rem;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%;flex-shrink:1;margin-left:12px;padding-right:12px;color:#292929;opacity:1}.menu-item__label.level-1.collapsed{text-overflow:unset}.menu-item__label.active{color:inherit}.menu-item__label.collapsed{margin-left:8px;font-size:.75rem;line-height:1rem}.menu-item__label.collapsed.level-0,.menu-item__label.collapsed.level-1{font-size:.875rem;opacity:0;transition-delay:.15s}.menu-item__label.level-0{color:#85858a;margin-left:0}.menu-item__icon-arrow__wrapper{display:grid;place-items:center;position:absolute;top:50%;transform:translateY(-50%);right:0}.menu-item__icon-arrow__wrapper.expanded{right:4px}.menu-item__icon-arrow__wrapper.level-0.collapsed{display:none}.menu-item__icon-arrow__icon{transition:all .3s!important;transform:rotate(-90deg)!important}.menu-item__icon-arrow__icon.active{color:inherit}.menu-item__icon-arrow__icon.expanded.open{transform:rotate(0)!important}.menu-item__dropdown.collapsed{background-color:#fafafa;border:1px solid #ddd;box-shadow:#0000001a 0 10px 15px -3px,#0000000d 0 4px 6px -2px;border-radius:4px;width:180px;max-width:180px;padding:4px;z-index:1200}.menu-item__dropdown,.menu-item__dropdown>*{margin-top:4px}.menu-item__dropdown.expanded.menu-item__dropdown--close{margin-top:0;transition:margin-top .3s}.menu-item__dropdown:first-of-type{margin-top:0}.menu-item__dropdown>*:first-child{margin-top:0}.menu-item__dropdown.collapsed .menu-item__link{height:40px}.menu-item__dropdown.collapsed .menu-item__link.level-1{height:48px}.menu-item__dropdown.collapsed.level-1{width:auto;max-width:unset;box-shadow:none;border:none;padding:0;background-color:unset}.menu-item__dropdown.expanded{overflow:hidden}.icon-btn{display:inline-flex;align-items:center;justify-content:center;padding:8px;border-radius:50%;background-color:transparent;transition:background-color .3s ease;border:none}.icon-btn:hover{background-color:var(--btn-bg-hover)}.simplebar-scrollbar:before{background-color:#0000002d}.side-bar__menu.collapsed .simplebar-track.simplebar-vertical{display:none}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}
66
+ */var wl=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,Rb=/\\([\u000b\u0020-\u00ff])/g,Ab=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,Ob=_b;function _b(e){if(!e)throw new TypeError("argument string is required");var t=typeof e=="object"?Mb(e):e;if(typeof t!="string")throw new TypeError("argument string is required to be a string");var n=t.indexOf(";"),r=n!==-1?t.slice(0,n).trim():t.trim();if(!Ab.test(r))throw new TypeError("invalid media type");var i=new jb(r.toLowerCase());if(n!==-1){var o,s,a;for(wl.lastIndex=n;s=wl.exec(t);){if(s.index!==n)throw new TypeError("invalid parameter format");n+=s[0].length,o=s[1].toLowerCase(),a=s[2],a.charCodeAt(0)===34&&(a=a.slice(1,-1),a.indexOf("\\")!==-1&&(a=a.replace(Rb,"$1"))),i.parameters[o]=a}if(n!==t.length)throw new TypeError("invalid parameter format")}return i}function Mb(e){var t;if(typeof e.getHeader=="function"?t=e.getHeader("content-type"):typeof e.headers=="object"&&(t=e.headers&&e.headers["content-type"]),typeof t!="string")throw new TypeError("content-type header is missing from object");return t}function jb(e){this.parameters=Object.create(null),this.type=e}var Rt=new Map,Gf=function(t){return t.cloneNode(!0)},Sl=function(){return window.location.protocol==="file:"},Xf=function(t,n,r){var i=new XMLHttpRequest;i.onreadystatechange=function(){try{if(!/\.svg/i.test(t)&&i.readyState===2){var o=i.getResponseHeader("Content-Type");if(!o)throw new Error("Content type not found");var s=Ob(o).type;if(!(s==="image/svg+xml"||s==="text/plain"))throw new Error("Invalid content type: ".concat(s))}if(i.readyState===4){if(i.status===404||i.responseXML===null)throw new Error(Sl()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+t);if(i.status===200||Sl()&&i.status===0)r(null,i);else throw new Error("There was a problem injecting the SVG: "+i.status+" "+i.statusText)}}catch(a){if(i.abort(),a instanceof Error)r(a,i);else throw a}},i.open("GET",t),i.withCredentials=n,i.overrideMimeType&&i.overrideMimeType("text/xml"),i.send()},Qe={},El=function(t,n){Qe[t]=Qe[t]||[],Qe[t].push(n)},Vb=function(t){for(var n=function(s,a){setTimeout(function(){if(Array.isArray(Qe[t])){var l=Rt.get(t),u=Qe[t][s];l instanceof SVGSVGElement&&u(null,Gf(l)),l instanceof Error&&u(l),s===Qe[t].length-1&&delete Qe[t]}},0)},r=0,i=Qe[t].length;r<i;r++)n(r)},Lb=function(t,n,r){if(Rt.has(t)){var i=Rt.get(t);if(i===void 0){El(t,r);return}if(i instanceof SVGSVGElement){r(null,Gf(i));return}}Rt.set(t,void 0),El(t,r),Xf(t,n,function(o,s){var a;o?Rt.set(t,o):((a=s.responseXML)===null||a===void 0?void 0:a.documentElement)instanceof SVGSVGElement&&Rt.set(t,s.responseXML.documentElement),Vb(t)})},Fb=function(t,n,r){Xf(t,n,function(i,o){var s;i?r(i):((s=o.responseXML)===null||s===void 0?void 0:s.documentElement)instanceof SVGSVGElement&&r(null,o.responseXML.documentElement)})},Db=0,Ib=function(){return++Db},Pe=[],Cl={},Nb="http://www.w3.org/2000/svg",wi="http://www.w3.org/1999/xlink",kl=function(t,n,r,i,o,s,a){var l=t.getAttribute("data-src")||t.getAttribute("src");if(!l){a(new Error("Invalid data-src or src attribute"));return}if(Pe.indexOf(t)!==-1){Pe.splice(Pe.indexOf(t),1),t=null;return}Pe.push(t),t.setAttribute("src","");var u=i?Lb:Fb;u(l,o,function(f,c){if(!c){Pe.splice(Pe.indexOf(t),1),t=null,a(f);return}var d=t.getAttribute("id");d&&c.setAttribute("id",d);var h=t.getAttribute("title");h&&c.setAttribute("title",h);var p=t.getAttribute("width");p&&c.setAttribute("width",p);var g=t.getAttribute("height");g&&c.setAttribute("height",g);var y=Array.from(new Set(bi(bi(bi([],(c.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(t.getAttribute("class")||"").split(" "),!0))).join(" ").trim();c.setAttribute("class",y);var v=t.getAttribute("style");v&&c.setAttribute("style",v),c.setAttribute("data-src",l);var b=[].filter.call(t.attributes,function(Q){return/^data-\w[\w-]*$/.test(Q.name)});if(Array.prototype.forEach.call(b,function(Q){Q.name&&Q.value&&c.setAttribute(Q.name,Q.value)}),r){var x={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]},S,E,k,T,P;Object.keys(x).forEach(function(Q){S=Q,k=x[Q],E=c.querySelectorAll(S+"[id]");for(var We=function(Et,Ur){T=E[Et].id,P=T+"-"+Ib();var at;Array.prototype.forEach.call(k,function(Wr){at=c.querySelectorAll("["+Wr+'*="'+T+'"]');for(var En=0,ed=at.length;En<ed;En++){var Qo=at[En].getAttribute(Wr);Qo&&!Qo.match(new RegExp('url\\("?#'+T+'"?\\)'))||at[En].setAttribute(Wr,"url(#"+P+")")}});for(var Le=c.querySelectorAll("[*|href]"),Ct=[],kt=0,Ut=Le.length;kt<Ut;kt++){var lt=Le[kt].getAttributeNS(wi,"href");lt&&lt.toString()==="#"+E[Et].id&&Ct.push(Le[kt])}for(var Ee=0,Zo=Ct.length;Ee<Zo;Ee++)Ct[Ee].setAttributeNS(wi,"href","#"+P);E[Et].id=P},wt=0,D=E.length;wt<D;wt++)We(wt)})}c.removeAttribute("xmlns:a");for(var _=c.querySelectorAll("script"),H=[],z,$,q=0,X=_.length;q<X;q++)$=_[q].getAttribute("type"),(!$||$==="application/ecmascript"||$==="application/javascript"||$==="text/javascript")&&(z=_[q].innerText||_[q].textContent,z&&H.push(z),c.removeChild(_[q]));if(H.length>0&&(n==="always"||n==="once"&&!Cl[l])){for(var Z=0,G=H.length;Z<G;Z++)new Function(H[Z])(window);Cl[l]=!0}var Te=c.querySelectorAll("style");if(Array.prototype.forEach.call(Te,function(Q){Q.textContent+=""}),c.setAttribute("xmlns",Nb),c.setAttribute("xmlns:xlink",wi),s(c),!t.parentNode){Pe.splice(Pe.indexOf(t),1),t=null,a(new Error("Parent node is null"));return}t.parentNode.replaceChild(c,t),Pe.splice(Pe.indexOf(t),1),t=null,a(null,c)})},Bb=function(t,n){var r=n===void 0?{}:n,i=r.afterAll,o=i===void 0?function(){}:i,s=r.afterEach,a=s===void 0?function(){}:s,l=r.beforeEach,u=l===void 0?function(){}:l,f=r.cacheRequests,c=f===void 0?!0:f,d=r.evalScripts,h=d===void 0?"never":d,p=r.httpRequestWithCredentials,g=p===void 0?!1:p,y=r.renumerateIRIElements,v=y===void 0?!0:y;if(t&&"length"in t)for(var b=0,x=0,S=t.length;x<S;x++)kl(t[x],h,v,c,g,u,function(E,k){a(E,k),t&&"length"in t&&t.length===++b&&o(b)});else t?kl(t,h,v,c,g,u,function(E,k){a(E,k),o(1),t=null}):o(0)},$b=function(t){var n=(t==null?void 0:t.ownerDocument)||document;return n.defaultView||window},zb=function(t,n){for(var r in t)if(!(r in n))return!0;for(var i in n)if(t[i]!==n[i])return!0;return!1},Ub=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],Vn="http://www.w3.org/2000/svg",Tl="http://www.w3.org/1999/xlink",Yo=function(e){qf(t,e);function t(){for(var r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=e.call.apply(e,[this].concat(o))||this,r.initialState={hasError:!1,isLoading:!0},r.state=r.initialState,r._isMounted=!1,r.reactWrapper=void 0,r.nonReactWrapper=void 0,r.refCallback=function(a){r.reactWrapper=a},r}var n=t.prototype;return n.renderSVG=function(){var i=this;if(this.reactWrapper instanceof $b(this.reactWrapper).Node){var o=this.props,s=o.desc,a=o.evalScripts,l=o.httpRequestWithCredentials,u=o.renumerateIRIElements,f=o.src,c=o.title,d=o.useRequestCache,h=this.props.onError,p=this.props.beforeInjection,g=this.props.afterInjection,y=this.props.wrapper,v,b;y==="svg"?(v=document.createElementNS(Vn,y),v.setAttribute("xmlns",Vn),v.setAttribute("xmlns:xlink",Tl),b=document.createElementNS(Vn,y)):(v=document.createElement(y),b=document.createElement(y)),v.appendChild(b),b.dataset.src=f,this.nonReactWrapper=this.reactWrapper.appendChild(v);var x=function(T){if(i.removeSVG(),!i._isMounted){h(T);return}i.setState(function(){return{hasError:!0,isLoading:!1}},function(){h(T)})},S=function(T,P){if(T){x(T);return}i._isMounted&&i.setState(function(){return{isLoading:!1}},function(){try{g(P)}catch(_){x(_)}})},E=function(T){if(T.setAttribute("role","img"),s){var P=T.querySelector(":scope > desc");P&&T.removeChild(P);var _=document.createElement("desc");_.innerHTML=s,T.prepend(_)}if(c){var H=T.querySelector(":scope > title");H&&T.removeChild(H);var z=document.createElement("title");z.innerHTML=c,T.prepend(z)}try{p(T)}catch($){x($)}};Bb(b,{afterEach:S,beforeEach:E,cacheRequests:d,evalScripts:a,httpRequestWithCredentials:l,renumerateIRIElements:u})}},n.removeSVG=function(){var i;(i=this.nonReactWrapper)!=null&&i.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},n.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},n.componentDidUpdate=function(i){var o=this;zb(It({},i),this.props)&&this.setState(function(){return o.initialState},function(){o.removeSVG(),o.renderSVG()})},n.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},n.render=function(){var i=this.props;i.afterInjection,i.beforeInjection,i.desc,i.evalScripts;var o=i.fallback;i.httpRequestWithCredentials;var s=i.loading;i.renumerateIRIElements,i.src,i.title,i.useRequestCache;var a=i.wrapper,l=Ko(i,Ub),u=a;return m.reactExports.createElement(u,It({},l,{ref:this.refCallback},a==="svg"?{xmlns:Vn,xmlnsXlink:Tl}:{}),this.state.isLoading&&s&&m.reactExports.createElement(s,null),this.state.hasError&&o&&m.reactExports.createElement(o,null))},t}(m.reactExports.Component);Yo.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};Yo.propTypes={afterInjection:K.func,beforeInjection:K.func,desc:K.string,evalScripts:K.oneOf(["always","once","never"]),fallback:K.oneOfType([K.func,K.object,K.string]),httpRequestWithCredentials:K.bool,loading:K.oneOfType([K.func,K.object,K.string]),onError:K.func,renumerateIRIElements:K.bool,src:K.string.isRequired,title:K.string,useRequestCache:K.bool,wrapper:K.oneOf(["div","span","svg"])};function Wb(e){return m.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...e,children:m.jsxRuntimeExports.jsx("path",{fill:"currenColor",d:"M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"})})}function Hb(e){const{children:t,parentRef:n,onlyChild:r}=e,[i,o]=m.reactExports.useState({top:0,left:0});return m.reactExports.useLayoutEffect(()=>{if(n.current){const s=n.current.getBoundingClientRect();o({top:s.top,left:s.left+s.width})}},[n]),r?t:m.reactDomExports.createPortal(m.jsxRuntimeExports.jsx("div",{style:{position:"fixed",top:i.top,left:i.left,zIndex:1200},children:t}),n.current)}function qb(e){const{children:t,title:n,hasTooltip:r}=e,i=m.reactExports.useRef(),[o,s]=m.reactExports.useState(!1),[a,l]=m.reactExports.useState({top:0,left:0});return m.jsxRuntimeExports.jsxs("div",{className:"tooltip-item__wrapper",onMouseOver:()=>{if(s(!0),i.current){const u=i.current.getBoundingClientRect();l({top:u.top-20,left:u.left})}},onMouseLeave:()=>s(!1),ref:i,children:[m.jsxRuntimeExports.jsx("div",{children:t}),o&&r&&m.jsxRuntimeExports.jsx("div",{className:"tooltip-item__content",style:{position:"fixed",background:"#85858A",borderRadius:"4px",color:"#fff",padding:"4px 8px",top:a.top,left:a.left,zIndex:1400,fontSize:10,transition:"all 0.2s ease-in-out",animation:"fadeIn 0.2s ease-in-out",pointerEvents:"none"},children:n})]})}function Kf({item:e,level:t=0,...n}){var z,$,q,X;const{isActive:r,isCollapsed:i,expanded:o,toggleExpand:s}=n,a=`level-${t}`,l=i?"collapsed":"expanded",u=r(e.id)?"active":"",f=(Z,G=a)=>`${Z} ${G} ${l} ${u}`,c=!!((z=e.children)!=null&&z.length),[d,h]=m.reactExports.useState(!1),p=m.reactExports.useRef(),g=window.location.origin,y=e.path&&e.path.includes("http")?new URL(e.path):{origin:"",pathname:""},v=window.location.pathname.split("/")[1],b=y.pathname.split("/")[1],x=n.ssr||!g.includes("local")&&g!==y.origin||b!==v,S=c||t===0?"div":x?"a":Cb,E=e.path||"#",k=t+1,T=c&&!(i&&k>=2&&!d),P=i||t===0?void 0:`${t}rem`;console.log("hasDropdown:",T);const _=()=>{h(!0)},H=()=>{h(!1)};return m.jsxRuntimeExports.jsxs("div",{ref:p,className:f("menu-item__wrapper"),onMouseOver:_,onMouseOut:H,children:[m.jsxRuntimeExports.jsx(qb,{hasTooltip:i&&t===1,children:m.jsxRuntimeExports.jsxs(S,{to:E,href:E,className:f("menu-item__link"),style:{paddingLeft:P,transition:"all 0.3s",color:r(e.id)?(($=n.brandColors)==null?void 0:$.primary400)||Vt.primary400:void 0,backgroundColor:r(e.id)&&t===1?(q=n.brandColors)==null?void 0:q.primary200:void 0},onClick:Z=>{c&&(Z.preventDefault(),i||s(e.id))},children:[t!==0&&m.jsxRuntimeExports.jsx(Gb,{cls:f,item:e}),m.jsxRuntimeExports.jsx("span",{className:f("menu-item__label"),children:e.name}),c&&m.jsxRuntimeExports.jsx("div",{className:f("menu-item__icon-arrow__wrapper"),children:m.jsxRuntimeExports.jsx(Wb,{className:f(`menu-item__icon-arrow__icon ${o(e.id)?"open":"close"}`)})})]}),title:e.name}),T&&m.jsxRuntimeExports.jsx(Hb,{parentRef:p,onlyChild:!i||i&&k<2,children:m.jsxRuntimeExports.jsx(Jx.div,{className:f(`menu-item__dropdown ${o(e.id)?"menu-item__dropdown--open":"menu-item__dropdown--close"}`,`level-${k}`),initial:{height:i||o(e.id)?"auto":0},animate:{height:i||o(e.id)?"auto":0},transition:{duration:.25},children:(X=e.children)==null?void 0:X.map(Z=>m.reactExports.createElement(Kf,{...n,key:Z.id,item:Z,level:k}))})})]})}function Gb({item:e,cls:t}){var s,a;const[n,r]=m.reactExports.useState(!e.icon),i=()=>{r(!0)},o=(s=e.icon)==null?void 0:s.endsWith(".svg");return m.jsxRuntimeExports.jsx("div",{className:t("menu-item__icon"),children:n?m.jsxRuntimeExports.jsx("div",{style:{width:24,height:24,backgroundColor:"#dadada",borderRadius:"5px",display:"flex",justifyContent:"center",alignItems:"center"},children:(a=e.name.trim().at(0))==null?void 0:a.toUpperCase()}):o?m.jsxRuntimeExports.jsx(Yo,{src:e.icon,beforeInjection:l=>{l.setAttribute("style","margin: 0 auto;"),l.querySelectorAll("path").forEach(f=>{f.hasAttribute("fill")&&f.setAttribute("fill","currentColor"),f.hasAttribute("stroke")&&f.setAttribute("stroke","currentColor")})}}):m.jsxRuntimeExports.jsx("img",{src:e.icon||"/",alt:" ",style:{height:24,maxHeight:24},onError:i})})}function Xb(){return m.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",children:m.jsxRuntimeExports.jsx("path",{d:"M21 18v2H3v-2h18zM6.596 3.903L8.01 5.318 4.828 8.5 8.01 11.68l-1.414 1.415L2 8.5l4.596-4.597zM21 11v2h-9v-2h9zm0-7v2h-9V4h9z"})})}function Kb(){return m.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",children:m.jsxRuntimeExports.jsx("path",{d:"M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"})})}function Yb(e){return m.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"20",fill:"none",viewBox:"0 0 18 20",...e,children:m.jsxRuntimeExports.jsx("path",{fill:"#E01B00",fillRule:"evenodd",d:"M.179 2.875A2.375 2.375 0 012.554.5h3.393a1.018 1.018 0 010 2.036H2.554a.34.34 0 00-.34.339v14.25c0 .187.152.34.34.34h3.393a1.018 1.018 0 110 2.035H2.554a2.375 2.375 0 01-2.375-2.375V2.875zm14.167 6.107h-7.72a1.018 1.018 0 000 2.036h7.72l-2.673 2.673a1.018 1.018 0 101.44 1.44l4.41-4.411a1.018 1.018 0 000-1.44l-4.41-4.41a1.018 1.018 0 10-1.44 1.439l2.673 2.673z",clipRule:"evenodd"})})}const Jb=`.wrap-section{padding:0 8px;transition:all .3s}.wrap-section.collapsed{padding:0 4px}.side-bar{display:flex;flex-direction:column;max-width:18rem;height:calc(100vh - 64px);border-right:1px solid #ddd;background-color:#fafafa;transition:all .3s}.side-bar.expanded{width:17rem}.side-bar.collapsed{width:64px}.side-bar__wrap-btn-logout,.side-bar__btn-logout{margin:40px 0}.side-bar__logout-btn__text{margin-left:12px;font-size:.875rem;opacity:1}.side-bar__logout-btn__text.collapsed{opacity:0;transition:ease-in-out .2s;transition-delay:.15s}.side-bar__wrapper-toggle-btn{display:flex;flex-direction:row;justify-content:flex-end;transition:all .3s;margin-right:-8px;margin-top:40px}.side-bar__wrapper-toggle-btn.collapsed{justify-content:center;width:100%}.side-bar__toggle-btn{margin-top:-6px;color:#85858a}.side-bar__logout-btn{width:100%;text-align:left;display:flex;flex-direction:row;align-items:center;padding:8px 16px 8px 18.6665px;min-height:48px;border-radius:.375rem;overflow:hidden;transition:all .3s ease-in-out}.side-bar__logout-btn:hover{background-color:#919eab14}.side-bar__icon-logout{flex-shrink:0}.menu-item__wrapper{display:flex;flex-direction:column;position:relative;width:100%}.menu-item__link{display:flex;flex-direction:row;border-radius:.375rem;align-items:center;padding:.5rem;position:relative;height:48px;cursor:pointer;color:#85858a}.menu-item__link:hover{background-color:#919eab14}.menu-item__link.collapsed.level-1{padding-left:calc(.5rem + 7.665px)!important}.menu-item__link.active{background-color:#009d4f1a;color:inherit}.menu-item__link.active.level-2,.menu-item__link.active.level-3,.menu-item__link.active.level-4,.menu-item__link.active.level-5,.menu-item__link.active.level-6,.menu-item__link.active.level-7,.menu-item__link.active.level-8,.menu-item__link.active.level-9,.menu-item__link.active.level-10{background-color:inherit;color:inherit}.menu-item__link.active.level-2:hover,.menu-item__link.active.level-3:hover,.menu-item__link.active.level-4:hover,.menu-item__link.active.level-5:hover,.menu-item__link.active.level-6:hover,.menu-item__link.active.level-7:hover,.menu-item__link.active.level-8:hover,.menu-item__link.active.level-9:hover,.menu-item__link.active.level-10:hover{background-color:#919eab14}.menu-item__link.level-0{height:37px}.menu-item__link.menu-item__link.collapsed.level-0{padding:0;height:0;transition:all .15s}.menu-item__icon{width:1.5rem;height:1.5rem;flex-shrink:0;display:grid;place-items:center}.menu-item__icon.collapsed.level-1>*{margin:0 auto}.menu-item__label{font-size:.875rem;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%;flex-shrink:1;margin-left:12px;padding-right:12px;color:#292929;opacity:1}.menu-item__label.level-1.collapsed{text-overflow:unset}.menu-item__label.active{color:inherit}.menu-item__label.collapsed{margin-left:8px;font-size:.75rem;line-height:1rem}.menu-item__label.collapsed.level-0,.menu-item__label.collapsed.level-1{font-size:.875rem;opacity:0;transition-delay:.15s}.menu-item__label.level-0{color:#85858a;margin-left:0}.menu-item__icon-arrow__wrapper{display:grid;place-items:center;position:absolute;top:50%;transform:translateY(-50%);right:0}.menu-item__icon-arrow__wrapper.expanded{right:4px}.menu-item__icon-arrow__wrapper.level-0.collapsed{display:none}.menu-item__icon-arrow__icon{transition:all .3s!important;transform:rotate(-90deg)!important}.menu-item__icon-arrow__icon.active{color:inherit}.menu-item__icon-arrow__icon.expanded.open{transform:rotate(0)!important}.menu-item__dropdown.collapsed{background-color:#fafafa;border:1px solid #ddd;box-shadow:#0000001a 0 10px 15px -3px,#0000000d 0 4px 6px -2px;border-radius:4px;width:180px;max-width:180px;padding:4px;z-index:1200}.menu-item__dropdown,.menu-item__dropdown>*{margin-top:4px}.menu-item__dropdown.expanded.menu-item__dropdown--close{margin-top:0;transition:margin-top .3s}.menu-item__dropdown:first-of-type{margin-top:0}.menu-item__dropdown>*:first-child{margin-top:0}.menu-item__dropdown.collapsed .menu-item__link{height:40px}.menu-item__dropdown.collapsed .menu-item__link.level-1{height:48px}.menu-item__dropdown.collapsed.level-1{width:auto;max-width:unset;box-shadow:none;border:none;padding:0;background-color:unset}.menu-item__dropdown.expanded{overflow:hidden}.icon-btn{display:inline-flex;align-items:center;justify-content:center;padding:8px;border-radius:50%;background-color:transparent;transition:background-color .3s ease;border:none}.icon-btn:hover{background-color:var(--btn-bg-hover)}.simplebar-scrollbar:before{background-color:#0000002d}.side-bar__menu.collapsed .simplebar-track.simplebar-vertical{display:none}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}
67
67
  `,Pl=localStorage.getItem("isCollapsed");function Zb(e){const{baseUrl:t,menuPath:n}=e,r=zr(),[i,o]=m.reactExports.useState([]),[s,a]=m.reactExports.useState(Pl===null?!0:Pl==="true"),[l,u]=m.reactExports.useState({}),f=Jo(i),[c,d]=m.reactExports.useState(window.location.href);m.reactExports.useEffect(()=>{d(window.location.href)},[r]);const h=Yf(f,c).filter(E=>E.parentKey!==0);console.log("matchPaths:",c,r,h);const p=E=>{u({...l,[E]:!l[E]})},g=()=>{a(!s),localStorage.setItem("isCollapsed",JSON.stringify(!s))};m.reactExports.useLayoutEffect(()=>{(async()=>{var k,T;try{const _=t+(n||"/global-menu-config/api/v1/menu-items/user"),{data:H}=await Kl.get(_,{withCredentials:!0});let z=H.map(q=>({...q,parentKey:0}));z=Zf(z),e.replacePath&&(z=Jf(z,e.replacePath));const $=ew(z);u($),o(z)}catch(P){console.log(P),hc(((T=(k=P.response)==null?void 0:k.data)==null?void 0:T.errorMessage)||"Have error when get menu items")}})()},[t,n,e.replacePath]);const[y,v]=m.reactExports.useState(!1),b=s?"collapsed":"expanded",x=E=>`${E} ${b}`,S=m.reactExports.useRef(null);return m.jsxRuntimeExports.jsxs("div",{className:x("side-bar"),children:[m.jsxRuntimeExports.jsx("div",{className:x("wrap-section side-bar__wrapper-toggle-btn"),children:m.jsxRuntimeExports.jsx("button",{className:"icon-btn side-bar__toggle-btn",onClick:g,children:s?m.jsxRuntimeExports.jsx(Kb,{}):m.jsxRuntimeExports.jsx(Xb,{})})}),m.jsxRuntimeExports.jsx(ou,{ref:S,className:x("wrap-section side-bar__menu"),style:{marginTop:24,flex:1,overflow:"auto",height:"100%",overflowX:"hidden"},children:i.map(E=>{const k=T=>h.some(P=>P.id===T);return m.jsxRuntimeExports.jsx(Kf,{item:E,isActive:k,isCollapsed:s,expanded:T=>l[T],toggleExpand:p,replacePath:e.replacePath,ssr:e.ssr,brandColors:e.brandColors},E.id)})}),m.jsxRuntimeExports.jsxs("div",{className:x("wrap-section side-bar__wrap-btn-logout"),children:[m.jsxRuntimeExports.jsxs("button",{className:x("side-bar__logout-btn"),onClick:()=>v(!0),children:[m.jsxRuntimeExports.jsx(Yb,{className:x("side-bar__icon-logout")}),m.jsxRuntimeExports.jsx("span",{className:x("side-bar__logout-btn__text"),children:"Logout"})]}),m.jsxRuntimeExports.jsx(su,{isOpen:y,onClose:()=>v(!1),onConfirm:()=>e.logout?e.logout():rp(e.baseUrl)})]})]})}function Jo(e){let t=[];for(const n of e)t.push(n),n.children&&(t=t.concat(Jo(n.children)));return t}function Qb(e,t){const n=new URL(e).searchParams,r=new URL(t).searchParams;return Array.from(r).filter(([i,o])=>o===n.get(i)).length}function Yf(e,t){const n=new URL(t),r=e.filter(s=>s.path&&s.path.includes("http")).map(s=>({item:s,itemUrl:new URL(s.path),matchingParamsCount:Qb(t,s.path)})).sort((s,a)=>{const l=new URL(s.itemUrl).searchParams,u=new URL(a.itemUrl).searchParams;return Array.from(l).length-Array.from(u).length}).filter(({itemUrl:s})=>n.origin===s.origin).filter(({itemUrl:s})=>n.pathname===s.pathname).sort((s,a)=>a.matchingParamsCount-s.matchingParamsCount);let i=r.length>0?r[0].item:null;console.log("matchingItems:",r);let o=[];for(;i;)o=[i,...o],i=e.find(s=>s.id===(i==null?void 0:i.parentKey))||null;return o}function Jf(e,t){return e.map(n=>(n.path&&(n.path=t(n.path)),n.children&&n.children.length>0&&(n.children=Jf(n.children,t)),n))}function Zf(e){return e.map(n=>n.path&&!n.path.includes("http")&&n.path.includes("/")?{...n,path:window.location.origin+n.path}:(n.children&&(n.children=Zf(n.children)),n))}function ew(e){const t=Jo(e),n=Yf(t,window.location.href),r={};return n.forEach(i=>r[i.id]=!0),t.forEach(i=>{i.parentKey||(r[i.id]=!0)}),r}function Qf(e){return m.jsxRuntimeExports.jsx(uc,{styles:[ep,Jb],style:{position:"sticky",zIndex:20},children:m.jsxRuntimeExports.jsx(Zb,{...e})})}function tw(e){return m.jsxRuntimeExports.jsx(wb,{children:m.jsxRuntimeExports.jsx(Qf,{...e,ssr:!0})})}{const e=m.s(tw,{props:{baseUrl:"string",menuPath:"string",logout:"function",replacePath:"function",ssr:"boolean",brandColors:"json"}});customElements.define("global-menu",e)}exports.ERROR_MESSAGE=tp;exports.GlobalMenu=Qf;exports.LogoutConfirmModal=su;exports.ShadowDomWrapper=uc;exports._extends=It;exports._extends$1=Pb;exports._inheritsLoose=qf;exports._objectWithoutPropertiesLoose=Ko;exports.axios=Kl;exports.color=Vt;exports.login=np;exports.notify=Ng;exports.objectWithoutPropertiesLoose=Tb;exports.pushError=hc;
@@ -1,4 +1,4 @@
1
- "use strict";const D=require("./react-to-web-component-3847ebf5.cjs"),se=require("./index-dd12df6a.cjs"),ps=require("./index-4327002b.cjs");function Vg(e){var t,r,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Vg(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}function Zn(){for(var e,t,r=0,s="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Vg(e))&&(s&&(s+=" "),s+=t);return s}const kw=e=>{var s,o;const{tabs:t}=e,r=c=>{e.setCurrentTab(c.target.id)};return console.log("🚀 ~ brandColors:",e.currentTab),D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx("style",{children:`
1
+ "use strict";const D=require("./react-to-web-component-3847ebf5.cjs"),se=require("./index-17856103.cjs"),ps=require("./index-4327002b.cjs");function Vg(e){var t,r,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Vg(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}function Zn(){for(var e,t,r=0,s="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Vg(e))&&(s&&(s+=" "),s+=t);return s}const kw=e=>{var s,o;const{tabs:t}=e,r=c=>{e.setCurrentTab(c.target.id)};return console.log("🚀 ~ brandColors:",e.currentTab),D.jsxRuntimeExports.jsxs(D.jsxRuntimeExports.Fragment,{children:[D.jsxRuntimeExports.jsx("style",{children:`
2
2
  .tab-title {
3
3
  min-width: 90px;
4
4
  padding: 5px 16px;
@@ -1,5 +1,5 @@
1
1
  import { j as z, r as Q, R as eg, g as _r, a as Js, c as ha, b as Ix, d as Rx, s as rm } from "./react-to-web-component-469d91d4.js";
2
- import { c as ns, _ as Le, a as nr, b as Px, o as Nx, d as Lx, e as ho, p as po, n as $x, l as tg, E as Fx, S as Yx, L as Bx } from "./index-7da484ab.js";
2
+ import { c as ns, _ as Le, a as nr, b as Px, o as Nx, d as Lx, e as ho, p as po, n as $x, l as tg, E as Fx, S as Yx, L as Bx } from "./index-e5d0789b.js";
3
3
  import { _ as Wx, t as jx, I as Hx, i as Ux, L as $f } from "./index-b3659f2e.js";
4
4
  function im(e) {
5
5
  var t, r, a = "";
@@ -10376,7 +10376,7 @@ function Gb(e) {
10376
10376
  className: "tooltip-item__content",
10377
10377
  style: {
10378
10378
  position: "fixed",
10379
- background: "#919196",
10379
+ background: "#85858A",
10380
10380
  borderRadius: "4px",
10381
10381
  color: "#fff",
10382
10382
  padding: "4px 8px",