react-luminus-components 2.0.3-beta.r19-15 → 2.0.3-beta.r19-17

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,6 +1,9 @@
1
- import { CancelTokenStatic } from 'axios';
1
+ import { AxiosInstance, CancelTokenStatic } from 'axios';
2
2
 
3
3
  export declare const cancelToken: CancelTokenStatic;
4
+ type AxiosInstanceExtended = AxiosInstance & {
5
+ interceptorsUsed: boolean;
6
+ };
4
7
  type Config = {
5
8
  authenticated?: boolean;
6
9
  differentBaseUrl?: string;
@@ -9,5 +12,5 @@ type Config = {
9
12
  ignoreDelegation?: boolean;
10
13
  noToastOnStatus?: number[];
11
14
  };
12
- export declare const useAxios: (useAxiosConfig?: Config) => import('axios').AxiosInstance;
15
+ export declare const useAxios: (useAxiosConfig?: Config) => AxiosInstanceExtended;
13
16
  export {};
@@ -2,5 +2,5 @@ type UseGetDataBoundOptions = {
2
2
  customBaseUrl?: string;
3
3
  customToken?: string;
4
4
  };
5
- declare function useGetDataBound<T>(url: string, options?: UseGetDataBoundOptions): T;
5
+ declare function useGetDataBound<T>(url: string, options?: UseGetDataBoundOptions): T | null;
6
6
  export default useGetDataBound;
package/dist/hooks.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./nivo-bar-C5h-CRYO.cjs"),E=require("./useLocalStorageState-iaJubQoG.cjs"),I=require("@tanstack/react-query"),w=require("./useEmployeePhotoPath-Q0EhpWOh.cjs"),r=require("react");require("react/jsx-runtime");require("react-router");const T=require("react-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");function L(t,e){const a=u.useAxios({silent:!0,differentBaseUrl:e==null?void 0:e.customBaseUrl,customToken:e==null?void 0:e.customToken}),{isAuthenticated:n}=u.useAuth(),{data:s}=I.useSuspenseQuery({queryKey:[t,n],queryFn:()=>a.get(t).then(c=>c.data)});return s}const O=t=>e=>(window.addEventListener(`storage_${t}`,e),()=>window.removeEventListener(`storage_${t}`,e)),x=(t,e,a=localStorage)=>{const[n]=r.useState(e),s=r.useRef(JSON.stringify(e)),c=r.useRef(e),l=r.useCallback(()=>{const S=a.getItem(t);return S!==s.current&&(s.current=S,c.current=s.current?JSON.parse(s.current):n),c.current},[t,a,n]),i=r.useMemo(()=>O(t),[t]),d=r.useSyncExternalStore(i,l),o=r.useCallback(S=>{a.setItem(t,JSON.stringify(S)),window.dispatchEvent(new Event(`storage_${t}`))},[t,a]);return r.useMemo(()=>[d,o],[d,o])},R=(t,e,a)=>{let n="pending",s;const c=t.then(l=>{n="success",s=l},l=>{const i=l==null?void 0:l.response;(i==null?void 0:i.status)===404&&a?(n="error-404",s=l):(n="error",s=l)});return()=>{switch(n){case"pending":throw c;case"success":return s;case"error":if(s.code==="ERR_CANCELED")return null;throw s;case"error-404":throw new Error("404");default:throw new Error("Unknown status")}}},m={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},V=(t,{loadOnInit:e=m.loadOnInit,enabled:a=m.enabled,silent:n=m.silent,nullStateBeforeLoad:s=m.nullStateBeforeLoad,nullStateOnFail:c=m.nullStateOnFail,customApiUrl:l,customBearerToken:i,dataTransformer:d,errorBoundaryOn404:o}=m)=>{const f=u.useAxios({silent:n,customToken:i,differentBaseUrl:l,noToastOnStatus:o?[404]:void 0}),{startLoading:S,stopLoading:C}=r.useContext(u.LoadingContext),D=r.useRef(0),{isAuthenticated:b}=u.useAuth(),[A,p]=r.useState(null),v=r.useCallback(async(g,y)=>{if(!b()||a===!1)return;!n&&S(`loadData-${t}-${y}`),s&&p(null);const q=f.get(t,{signal:g}).then(P=>d?d(P.data):P.data).finally(()=>!n&&C(`loadData-${t}-${y}`));p(R(q,c??!1,o??!1))},[b,a,n,S,t,s,f,d,C,c,o]);return r.useEffect(()=>{if(e===!1)return;const g=new AbortController;return v(g.signal,++D.current),()=>{g.abort()}},[v,e]),{data:A,setData:p,reloadData:v}},B=()=>{const t=r.useRef({}).current;return r.useEffect(()=>{const e=document.createElement("div");return e.style.position="absolute",e.style.pointerEvents="none",e.style.top="0",e.style.width="100%",e.style.height="100%",t.elt=e,document.body.appendChild(e),()=>{document.body.removeChild(e)}},[t]),e=>(a,...n)=>{const s=e(a,...n);return a.draggableProps.style.position==="fixed"?T.createPortal(s,t.elt):s}},h={storageKey:"--tmp-scroll-save--",requiredHeight:100,retryInterval:50},N=(t,{storageKey:e=h.storageKey,requiredHeight:a=h.requiredHeight,retryInterval:n=h.retryInterval}=h)=>{const[s,c]=r.useState(!1),l=r.useRef(null),i=r.useCallback(()=>{const o=localStorage.getItem(e);return localStorage.removeItem(e),o===null?null:Number(o)},[e]),d=r.useCallback(o=>{localStorage.setItem(e,o)},[e]);return r.useEffect(()=>{const o=window.setInterval(()=>{if(!s&&t.current!==null&&t.current.getBoundingClientRect().height>a){c(!0);const f=i();f!==null&&t.current.scrollTo({top:f}),window.clearInterval(o)}},n);return()=>{window.clearTimeout(o)}},[s,a,i,n,t]),r.useEffect(()=>{var f;const o=new AbortController;return(f=t.current)==null||f.addEventListener("scrollend",()=>{var S;l.current=((S=t.current)==null?void 0:S.scrollTop)??0,d((l.current??0).toString())},{signal:o.signal}),()=>o.abort()},[d,t]),{saveValue:d,retrieveValue:i}};exports.cancelToken=u.cancelToken;exports.useAuth=u.useAuth;exports.useAxios=u.useAxios;exports.useClickOutside=u.useClickOutside;exports.useClipboard=u.useClipboard;exports.useConfirm=u.useConfirm;exports.useFormControlType=u.useFormControlType;exports.useKeyPress=u.useKeyPress;exports.useNotifications=u.useNotifications;exports.usePermissions=u.usePermissions;exports.usePrompt=u.usePrompt;exports.useWindowSize=u.useWindowSize;exports.useZodSchemaTypes=u.useZodSchemaTypes;exports.useGetApiData=E.useGetApiData;exports.useLocalStorageState=E.useLocalStorageState;exports.useEmployeePhotoPath=w.useEmployeePhotoPath;exports.useSearchQuery=w.useSearchQuery;exports.useSearchQueryState=w.useSearchQueryState;exports.useGetApiDataBound=V;exports.useGetDataBound=L;exports.usePersistentState=x;exports.useRenderDraggableInPortal=B;exports.useScrollSave=N;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./nivo-bar-DPUITZ23.cjs"),G=require("./useLocalStorageState-D4eANA1U.cjs"),d=require("react"),U=require("./useEmployeePhotoPath-Dt7LoR_b.cjs");require("react/jsx-runtime");require("react-router");const _=require("react-dom");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");const T=new Map;function H(t,r){const e=a.useAxios({silent:!0,differentBaseUrl:r==null?void 0:r.customBaseUrl,customToken:r==null?void 0:r.customToken});console.log("axios.interceptorsUsed",e.interceptorsUsed);const s=d.useRef(null);if(!e.interceptorsUsed)return null;if(console.log("cache",T),!T.has(t)){const f=e.get(t).then(n=>(T.set(t,{status:"success",data:n.data}),s.current=setTimeout(()=>{T.delete(t),s.current=null},1e4),n.data)).catch(n=>{throw T.set(t,{status:"error",error:n}),s.current=setTimeout(()=>{T.delete(t),s.current=null},1e3),n});throw T.set(t,{status:"pending"}),f}const o=T.get(t);if(console.log("cached",o),o.status==="pending")throw e.get(t);if(o.status==="error")throw o.error;return o.data}const Q=t=>r=>(window.addEventListener(`storage_${t}`,r),()=>window.removeEventListener(`storage_${t}`,r)),J=(t,r,e)=>{const s=a.compilerRuntimeExports.c(14),o=e===void 0?localStorage:e,[f]=d.useState(r);let n;s[0]!==r?(n=JSON.stringify(r),s[0]=r,s[1]=n):n=s[1];const l=d.useRef(n),w=d.useRef(r);let h;s[2]!==t||s[3]!==f||s[4]!==o?(h=()=>{const m=o.getItem(t);return m!==l.current&&(l.current=m,w.current=l.current?JSON.parse(l.current):f),w.current},s[2]=t,s[3]=f,s[4]=o,s[5]=h):h=s[5];const E=h;let g;s[6]!==t?(g=Q(t),s[6]=t,s[7]=g):g=s[7];const y=g,i=d.useSyncExternalStore(y,E);let u;s[8]!==t||s[9]!==o?(u=m=>{o.setItem(t,JSON.stringify(m)),window.dispatchEvent(new Event(`storage_${t}`))},s[8]=t,s[9]=o,s[10]=u):u=s[10];const c=u;let p;return s[11]!==c||s[12]!==i?(p=[i,c],s[11]=c,s[12]=i,s[13]=p):p=s[13],p},M=(t,r,e)=>{let s="pending",o;const f=t.then(n=>{s="success",o=n},n=>{const l=n==null?void 0:n.response;(l==null?void 0:l.status)===404&&e?(s="error-404",o=n):(s="error",o=n)});return()=>{switch(s){case"pending":throw f;case"success":return o;case"error":if(o.code==="ERR_CANCELED")return null;throw o;case"error-404":throw new Error("404");default:throw new Error("Unknown status")}}},b={loadOnInit:!0,silent:!1,enabled:!0,nullStateBeforeLoad:!0,nullStateOnFail:!1},W=(t,r)=>{const e=a.compilerRuntimeExports.c(26),{loadOnInit:s,enabled:o,silent:f,nullStateBeforeLoad:n,nullStateOnFail:l,customApiUrl:w,customBearerToken:h,dataTransformer:E,errorBoundaryOn404:g}=r===void 0?b:r,y=s===void 0?b.loadOnInit:s,i=o===void 0?b.enabled:o,u=f===void 0?b.silent:f,c=n===void 0?b.nullStateBeforeLoad:n,p=l===void 0?b.nullStateOnFail:l;let v;e[0]!==g?(v=g?[404]:void 0,e[0]=g,e[1]=v):v=e[1];let m;e[2]!==w||e[3]!==h||e[4]!==u||e[5]!==v?(m={silent:u,customToken:h,differentBaseUrl:w,noToastOnStatus:v},e[2]=w,e[3]=h,e[4]=u,e[5]=v,e[6]=m):m=e[6];const O=a.useAxios(m),{startLoading:P,stopLoading:S}=d.useContext(a.LoadingContext),C=d.useRef(0),{isAuthenticated:I}=a.useAuth(),[R,N]=d.useState(null);let A;e[7]!==O||e[8]!==E||e[9]!==i||e[10]!==g||e[11]!==I||e[12]!==c||e[13]!==p||e[14]!==u||e[15]!==P||e[16]!==S||e[17]!==t?(A=async(L,F)=>{if(!I()||i===!1)return;!u&&P(`loadData-${t}-${F}`),c&&N(null);const K=O.get(t,{signal:L}).then(V=>E?E(V.data):V.data).finally(()=>!u&&S(`loadData-${t}-${F}`));N(M(K,p??!1,g??!1))},e[7]=O,e[8]=E,e[9]=i,e[10]=g,e[11]=I,e[12]=c,e[13]=p,e[14]=u,e[15]=P,e[16]=S,e[17]=t,e[18]=A):A=e[18];const D=A;let q,B;e[19]!==D||e[20]!==y?(B=()=>{if(y===!1)return;const L=new AbortController;return D(L.signal,C.current=C.current+1),()=>{L.abort()}},q=[D,y],e[19]=D,e[20]=y,e[21]=q,e[22]=B):(q=e[21],B=e[22]),d.useEffect(B,q);let x;return e[23]!==R||e[24]!==D?(x={data:R,setData:N,reloadData:D},e[23]=R,e[24]=D,e[25]=x):x=e[25],x},z=()=>{const t=d.useRef({}).current;return d.useEffect(()=>{const r=document.createElement("div");return r.style.position="absolute",r.style.pointerEvents="none",r.style.top="0",r.style.width="100%",r.style.height="100%",t.elt=r,document.body.appendChild(r),()=>{document.body.removeChild(r)}},[t]),r=>(e,...s)=>{const o=r(e,...s);return e.draggableProps.style.position==="fixed"?_.createPortal(o,t.elt):o}},$={storageKey:"--tmp-scroll-save--",requiredHeight:100,retryInterval:50},Z=(t,r)=>{const e=a.compilerRuntimeExports.c(18),{storageKey:s,requiredHeight:o,retryInterval:f}=r===void 0?$:r,n=s===void 0?$.storageKey:s,l=o===void 0?$.requiredHeight:o,w=f===void 0?$.retryInterval:f,[h,E]=d.useState(!1),g=d.useRef(null);let y;e[0]!==n?(y=()=>{const S=localStorage.getItem(n);return localStorage.removeItem(n),S===null?null:Number(S)},e[0]=n,e[1]=y):y=e[1];const i=y;let u;e[2]!==n?(u=S=>{localStorage.setItem(n,S)},e[2]=n,e[3]=u):u=e[3];const c=u;let p,v;e[4]!==h||e[5]!==l||e[6]!==i||e[7]!==w||e[8]!==t?(p=()=>{const S=window.setInterval(()=>{if(!h&&t.current!==null&&t.current.getBoundingClientRect().height>l){E(!0);const C=i();C!==null&&t.current.scrollTo({top:C}),window.clearInterval(S)}},w);return()=>{window.clearTimeout(S)}},v=[h,l,i,w,t],e[4]=h,e[5]=l,e[6]=i,e[7]=w,e[8]=t,e[9]=p,e[10]=v):(p=e[9],v=e[10]),d.useEffect(p,v);let m,O;e[11]!==c||e[12]!==t?(m=()=>{var C;const S=new AbortController;return(C=t.current)==null||C.addEventListener("scrollend",()=>{var I;g.current=((I=t.current)==null?void 0:I.scrollTop)??0,c((g.current??0).toString())},{signal:S.signal}),()=>S.abort()},O=[c,t],e[11]=c,e[12]=t,e[13]=m,e[14]=O):(m=e[13],O=e[14]),d.useEffect(m,O);let P;return e[15]!==i||e[16]!==c?(P={saveValue:c,retrieveValue:i},e[15]=i,e[16]=c,e[17]=P):P=e[17],P};exports.cancelToken=a.cancelToken;exports.useAuth=a.useAuth;exports.useAxios=a.useAxios;exports.useClickOutside=a.useClickOutside;exports.useClipboard=a.useClipboard;exports.useConfirm=a.useConfirm;exports.useFormControlType=a.useFormControlType;exports.useKeyPress=a.useKeyPress;exports.useNotifications=a.useNotifications;exports.usePermissions=a.usePermissions;exports.usePrompt=a.usePrompt;exports.useWindowSize=a.useWindowSize;exports.useZodSchemaTypes=a.useZodSchemaTypes;exports.useGetApiData=G.useGetApiData;exports.useLocalStorageState=G.useLocalStorageState;exports.useEmployeePhotoPath=U.useEmployeePhotoPath;exports.useSearchQuery=U.useSearchQuery;exports.useSearchQueryState=U.useSearchQueryState;exports.useGetApiDataBound=W;exports.useGetDataBound=H;exports.usePersistentState=J;exports.useRenderDraggableInPortal=z;exports.useScrollSave=Z;
package/dist/hooks.es.js CHANGED
@@ -1,164 +1,240 @@
1
- import { an as I, bc as P, ap as V } from "./nivo-bar-FuUHRilH.js";
2
- import { bR as nt, aQ as st, bT as rt, am as at, bS as ot, b6 as ut, aq as lt, bv as ct, al as it, aF as dt, aT as mt } from "./nivo-bar-FuUHRilH.js";
3
- import { u as gt, a as pt } from "./useLocalStorageState-BWVTT0cO.js";
4
- import { useSuspenseQuery as O } from "@tanstack/react-query";
5
- import { b as ht, u as vt, a as wt } from "./useEmployeePhotoPath-DdMmh1qU.js";
6
- import { useState as b, useRef as f, useCallback as g, useMemo as x, useSyncExternalStore as $, useContext as N, useEffect as h } from "react";
1
+ import { ao as G, c as F, aq as J, bd as Q } from "./nivo-bar-BSVvzf0n.js";
2
+ import { bS as mt, aR as gt, bU as pt, an as ht, bT as vt, b7 as St, ar as wt, bw as bt, am as yt, aG as It, aU as Ot } from "./nivo-bar-BSVvzf0n.js";
3
+ import { u as Ct, a as Et } from "./useLocalStorageState-BUtohZHI.js";
4
+ import { useRef as x, useState as _, useSyncExternalStore as W, useContext as z, useEffect as A } from "react";
5
+ import { b as Dt, u as Bt, a as Lt } from "./useEmployeePhotoPath-DKGr9K80.js";
7
6
  import "react/jsx-runtime";
8
7
  import "react-router";
9
- import { createPortal as B } from "react-dom";
8
+ import { createPortal as M } from "react-dom";
10
9
  import "react-hook-form";
11
10
  import "react-flexmonster";
12
11
  import "@azure/msal-browser";
13
12
  import "@azure/msal-react";
14
- function j(e, t) {
15
- const r = I({
13
+ const O = /* @__PURE__ */ new Map();
14
+ function at(e, n) {
15
+ const t = G({
16
16
  silent: !0,
17
- differentBaseUrl: t == null ? void 0 : t.customBaseUrl,
18
- customToken: t == null ? void 0 : t.customToken
19
- }), { isAuthenticated: s } = P(), { data: n } = O({
20
- queryKey: [e, s],
21
- queryFn: () => r.get(e).then((u) => u.data)
17
+ differentBaseUrl: n == null ? void 0 : n.customBaseUrl,
18
+ customToken: n == null ? void 0 : n.customToken
22
19
  });
23
- return n;
20
+ console.log("axios.interceptorsUsed", t.interceptorsUsed);
21
+ const s = x(null);
22
+ if (!t.interceptorsUsed)
23
+ return null;
24
+ if (console.log("cache", O), !O.has(e)) {
25
+ const c = t.get(e).then((r) => (O.set(e, {
26
+ status: "success",
27
+ data: r.data
28
+ }), s.current = setTimeout(() => {
29
+ O.delete(e), s.current = null;
30
+ }, 1e4), r.data)).catch((r) => {
31
+ throw O.set(e, {
32
+ status: "error",
33
+ error: r
34
+ }), s.current = setTimeout(() => {
35
+ O.delete(e), s.current = null;
36
+ }, 1e3), r;
37
+ });
38
+ throw O.set(e, {
39
+ status: "pending"
40
+ }), c;
41
+ }
42
+ const o = O.get(e);
43
+ if (console.log("cached", o), o.status === "pending")
44
+ throw t.get(e);
45
+ if (o.status === "error")
46
+ throw o.error;
47
+ return o.data;
24
48
  }
25
- const F = (e) => (t) => (window.addEventListener(`storage_${e}`, t), () => window.removeEventListener(`storage_${e}`, t)), K = (e, t, r = localStorage) => {
26
- const [s] = b(t), n = f(JSON.stringify(t)), u = f(t), o = g(() => {
27
- const i = r.getItem(e);
28
- return i !== n.current && (n.current = i, u.current = n.current ? JSON.parse(n.current) : s), u.current;
29
- }, [e, r, s]), l = x(() => F(e), [e]), c = $(l, o), a = g((i) => {
30
- r.setItem(e, JSON.stringify(i)), window.dispatchEvent(new Event(`storage_${e}`));
31
- }, [e, r]);
32
- return x(() => [c, a], [c, a]);
33
- }, q = (e, t, r) => {
34
- let s = "pending", n;
35
- const u = e.then((o) => {
36
- s = "success", n = o;
37
- }, (o) => {
38
- const l = o == null ? void 0 : o.response;
39
- (l == null ? void 0 : l.status) === 404 && r ? (s = "error-404", n = o) : (s = "error", n = o);
49
+ const R = (e) => (n) => (window.addEventListener(`storage_${e}`, n), () => window.removeEventListener(`storage_${e}`, n)), lt = (e, n, t) => {
50
+ const s = F.c(14), o = t === void 0 ? localStorage : t, [c] = _(n);
51
+ let r;
52
+ s[0] !== n ? (r = JSON.stringify(n), s[0] = n, s[1] = r) : r = s[1];
53
+ const l = x(r), v = x(n);
54
+ let g;
55
+ s[2] !== e || s[3] !== c || s[4] !== o ? (g = () => {
56
+ const f = o.getItem(e);
57
+ return f !== l.current && (l.current = f, v.current = l.current ? JSON.parse(l.current) : c), v.current;
58
+ }, s[2] = e, s[3] = c, s[4] = o, s[5] = g) : g = s[5];
59
+ const w = g;
60
+ let d;
61
+ s[6] !== e ? (d = R(e), s[6] = e, s[7] = d) : d = s[7];
62
+ const u = W(d, w);
63
+ let a;
64
+ s[8] !== e || s[9] !== o ? (a = (f) => {
65
+ o.setItem(e, JSON.stringify(f)), window.dispatchEvent(new Event(`storage_${e}`));
66
+ }, s[8] = e, s[9] = o, s[10] = a) : a = s[10];
67
+ const i = a;
68
+ let p;
69
+ return s[11] !== i || s[12] !== u ? (p = [u, i], s[11] = i, s[12] = u, s[13] = p) : p = s[13], p;
70
+ }, Z = (e, n, t) => {
71
+ let s = "pending", o;
72
+ const c = e.then((r) => {
73
+ s = "success", o = r;
74
+ }, (r) => {
75
+ const l = r == null ? void 0 : r.response;
76
+ (l == null ? void 0 : l.status) === 404 && t ? (s = "error-404", o = r) : (s = "error", o = r);
40
77
  });
41
78
  return () => {
42
79
  switch (s) {
43
80
  case "pending":
44
- throw u;
81
+ throw c;
45
82
  case "success":
46
- return n;
83
+ return o;
47
84
  case "error":
48
- if (n.code === "ERR_CANCELED")
49
- return null;
50
- throw n;
85
+ if (o.code === "ERR_CANCELED") return null;
86
+ throw o;
51
87
  case "error-404":
52
88
  throw new Error("404");
53
89
  default:
54
90
  throw new Error("Unknown status");
55
91
  }
56
92
  };
57
- }, m = {
93
+ }, E = {
58
94
  loadOnInit: !0,
59
95
  silent: !1,
60
96
  enabled: !0,
61
97
  nullStateBeforeLoad: !0,
62
98
  nullStateOnFail: !1
63
- }, X = (e, { loadOnInit: t = m.loadOnInit, enabled: r = m.enabled, silent: s = m.silent, nullStateBeforeLoad: n = m.nullStateBeforeLoad, nullStateOnFail: u = m.nullStateOnFail, customApiUrl: o, customBearerToken: l, dataTransformer: c, errorBoundaryOn404: a } = m) => {
64
- const d = I({
65
- silent: s,
66
- customToken: l,
67
- differentBaseUrl: o,
68
- noToastOnStatus: a ? [404] : void 0
69
- }), { startLoading: i, stopLoading: C } = N(V), T = f(0), { isAuthenticated: E } = P(), [A, v] = b(null), w = g(async (p, D) => {
70
- if (!E() || r === !1)
99
+ }, ut = (e, n) => {
100
+ const t = F.c(26), {
101
+ loadOnInit: s,
102
+ enabled: o,
103
+ silent: c,
104
+ nullStateBeforeLoad: r,
105
+ nullStateOnFail: l,
106
+ customApiUrl: v,
107
+ customBearerToken: g,
108
+ dataTransformer: w,
109
+ errorBoundaryOn404: d
110
+ } = n === void 0 ? E : n, S = s === void 0 ? E.loadOnInit : s, u = o === void 0 ? E.enabled : o, a = c === void 0 ? E.silent : c, i = r === void 0 ? E.nullStateBeforeLoad : r, p = l === void 0 ? E.nullStateOnFail : l;
111
+ let h;
112
+ t[0] !== d ? (h = d ? [404] : void 0, t[0] = d, t[1] = h) : h = t[1];
113
+ let f;
114
+ t[2] !== v || t[3] !== g || t[4] !== a || t[5] !== h ? (f = {
115
+ silent: a,
116
+ customToken: g,
117
+ differentBaseUrl: v,
118
+ noToastOnStatus: h
119
+ }, t[2] = v, t[3] = g, t[4] = a, t[5] = h, t[6] = f) : f = t[6];
120
+ const b = G(f), {
121
+ startLoading: y,
122
+ stopLoading: m
123
+ } = z(J), I = x(0), {
124
+ isAuthenticated: C
125
+ } = Q(), [N, V] = _(null);
126
+ let D;
127
+ t[7] !== b || t[8] !== w || t[9] !== u || t[10] !== d || t[11] !== C || t[12] !== i || t[13] !== p || t[14] !== a || t[15] !== y || t[16] !== m || t[17] !== e ? (D = async (P, q) => {
128
+ if (!C() || u === !1)
71
129
  return;
72
- !s && i(`loadData-${e}-${D}`), n && v(null);
73
- const L = d.get(e, {
74
- signal: p
75
- }).then((y) => c ? c(y.data) : y.data).finally(() => !s && C(`loadData-${e}-${D}`));
76
- v(q(L, u ?? !1, a ?? !1));
77
- }, [
78
- E,
79
- r,
80
- s,
81
- i,
82
- e,
83
- n,
84
- d,
85
- c,
86
- C,
87
- u,
88
- a
89
- ]);
90
- return h(() => {
91
- if (t === !1)
130
+ !a && y(`loadData-${e}-${q}`), i && V(null);
131
+ const H = b.get(e, {
132
+ signal: P
133
+ }).then((K) => w ? w(K.data) : K.data).finally(() => !a && m(`loadData-${e}-${q}`));
134
+ V(Z(H, p ?? !1, d ?? !1));
135
+ }, t[7] = b, t[8] = w, t[9] = u, t[10] = d, t[11] = C, t[12] = i, t[13] = p, t[14] = a, t[15] = y, t[16] = m, t[17] = e, t[18] = D) : D = t[18];
136
+ const T = D;
137
+ let B, L;
138
+ t[19] !== T || t[20] !== S ? (L = () => {
139
+ if (S === !1)
92
140
  return;
93
- const p = new AbortController();
94
- return w(p.signal, ++T.current), () => {
95
- p.abort();
141
+ const P = new AbortController();
142
+ return T(P.signal, I.current = I.current + 1), () => {
143
+ P.abort();
96
144
  };
97
- }, [w, t]), { data: A, setData: v, reloadData: w };
98
- }, Y = () => {
99
- const e = f({}).current;
100
- return h(() => {
101
- const t = document.createElement("div");
102
- return t.style.position = "absolute", t.style.pointerEvents = "none", t.style.top = "0", t.style.width = "100%", t.style.height = "100%", e.elt = t, document.body.appendChild(t), () => {
103
- document.body.removeChild(t);
145
+ }, B = [T, S], t[19] = T, t[20] = S, t[21] = B, t[22] = L) : (B = t[21], L = t[22]), A(L, B);
146
+ let $;
147
+ return t[23] !== N || t[24] !== T ? ($ = {
148
+ data: N,
149
+ setData: V,
150
+ reloadData: T
151
+ }, t[23] = N, t[24] = T, t[25] = $) : $ = t[25], $;
152
+ }, it = () => {
153
+ const e = x({}).current;
154
+ return A(() => {
155
+ const n = document.createElement("div");
156
+ return n.style.position = "absolute", n.style.pointerEvents = "none", n.style.top = "0", n.style.width = "100%", n.style.height = "100%", e.elt = n, document.body.appendChild(n), () => {
157
+ document.body.removeChild(n);
104
158
  };
105
- }, [e]), (t) => (r, ...s) => {
106
- const n = t(r, ...s);
107
- return r.draggableProps.style.position === "fixed" ? B(n, e.elt) : n;
159
+ }, [e]), (n) => (t, ...s) => {
160
+ const o = n(t, ...s);
161
+ return t.draggableProps.style.position === "fixed" ? M(o, e.elt) : o;
108
162
  };
109
- }, S = {
163
+ }, U = {
110
164
  storageKey: "--tmp-scroll-save--",
111
165
  requiredHeight: 100,
112
166
  retryInterval: 50
113
- }, k = (e, { storageKey: t = S.storageKey, requiredHeight: r = S.requiredHeight, retryInterval: s = S.retryInterval } = S) => {
114
- const [n, u] = b(!1), o = f(null), l = g(() => {
115
- const a = localStorage.getItem(t);
116
- return localStorage.removeItem(t), a === null ? null : Number(a);
117
- }, [t]), c = g((a) => {
118
- localStorage.setItem(t, a);
119
- }, [t]);
120
- return h(() => {
121
- const a = window.setInterval(() => {
122
- if (!n && e.current !== null && e.current.getBoundingClientRect().height > r) {
123
- u(!0);
124
- const d = l();
125
- d !== null && e.current.scrollTo({ top: d }), window.clearInterval(a);
167
+ }, ct = (e, n) => {
168
+ const t = F.c(18), {
169
+ storageKey: s,
170
+ requiredHeight: o,
171
+ retryInterval: c
172
+ } = n === void 0 ? U : n, r = s === void 0 ? U.storageKey : s, l = o === void 0 ? U.requiredHeight : o, v = c === void 0 ? U.retryInterval : c, [g, w] = _(!1), d = x(null);
173
+ let S;
174
+ t[0] !== r ? (S = () => {
175
+ const m = localStorage.getItem(r);
176
+ return localStorage.removeItem(r), m === null ? null : Number(m);
177
+ }, t[0] = r, t[1] = S) : S = t[1];
178
+ const u = S;
179
+ let a;
180
+ t[2] !== r ? (a = (m) => {
181
+ localStorage.setItem(r, m);
182
+ }, t[2] = r, t[3] = a) : a = t[3];
183
+ const i = a;
184
+ let p, h;
185
+ t[4] !== g || t[5] !== l || t[6] !== u || t[7] !== v || t[8] !== e ? (p = () => {
186
+ const m = window.setInterval(() => {
187
+ if (!g && e.current !== null && e.current.getBoundingClientRect().height > l) {
188
+ w(!0);
189
+ const I = u();
190
+ I !== null && e.current.scrollTo({
191
+ top: I
192
+ }), window.clearInterval(m);
126
193
  }
127
- }, s);
194
+ }, v);
128
195
  return () => {
129
- window.clearTimeout(a);
196
+ window.clearTimeout(m);
130
197
  };
131
- }, [n, r, l, s, e]), h(() => {
132
- var d;
133
- const a = new AbortController();
134
- return (d = e.current) == null || d.addEventListener("scrollend", () => {
135
- var i;
136
- o.current = ((i = e.current) == null ? void 0 : i.scrollTop) ?? 0, c((o.current ?? 0).toString());
137
- }, { signal: a.signal }), () => a.abort();
138
- }, [c, e]), { saveValue: c, retrieveValue: l };
198
+ }, h = [g, l, u, v, e], t[4] = g, t[5] = l, t[6] = u, t[7] = v, t[8] = e, t[9] = p, t[10] = h) : (p = t[9], h = t[10]), A(p, h);
199
+ let f, b;
200
+ t[11] !== i || t[12] !== e ? (f = () => {
201
+ var I;
202
+ const m = new AbortController();
203
+ return (I = e.current) == null || I.addEventListener("scrollend", () => {
204
+ var C;
205
+ d.current = ((C = e.current) == null ? void 0 : C.scrollTop) ?? 0, i((d.current ?? 0).toString());
206
+ }, {
207
+ signal: m.signal
208
+ }), () => m.abort();
209
+ }, b = [i, e], t[11] = i, t[12] = e, t[13] = f, t[14] = b) : (f = t[13], b = t[14]), A(f, b);
210
+ let y;
211
+ return t[15] !== u || t[16] !== i ? (y = {
212
+ saveValue: i,
213
+ retrieveValue: u
214
+ }, t[15] = u, t[16] = i, t[17] = y) : y = t[17], y;
139
215
  };
140
216
  export {
141
- nt as cancelToken,
142
- P as useAuth,
143
- I as useAxios,
144
- st as useClickOutside,
145
- rt as useClipboard,
146
- at as useConfirm,
147
- ht as useEmployeePhotoPath,
148
- ot as useFormControlType,
149
- gt as useGetApiData,
150
- X as useGetApiDataBound,
151
- j as useGetDataBound,
152
- ut as useKeyPress,
153
- pt as useLocalStorageState,
154
- lt as useNotifications,
155
- ct as usePermissions,
156
- K as usePersistentState,
157
- it as usePrompt,
158
- Y as useRenderDraggableInPortal,
159
- k as useScrollSave,
160
- vt as useSearchQuery,
161
- wt as useSearchQueryState,
162
- dt as useWindowSize,
163
- mt as useZodSchemaTypes
217
+ mt as cancelToken,
218
+ Q as useAuth,
219
+ G as useAxios,
220
+ gt as useClickOutside,
221
+ pt as useClipboard,
222
+ ht as useConfirm,
223
+ Dt as useEmployeePhotoPath,
224
+ vt as useFormControlType,
225
+ Ct as useGetApiData,
226
+ ut as useGetApiDataBound,
227
+ at as useGetDataBound,
228
+ St as useKeyPress,
229
+ Et as useLocalStorageState,
230
+ wt as useNotifications,
231
+ bt as usePermissions,
232
+ lt as usePersistentState,
233
+ yt as usePrompt,
234
+ it as useRenderDraggableInPortal,
235
+ ct as useScrollSave,
236
+ Bt as useSearchQuery,
237
+ Lt as useSearchQueryState,
238
+ It as useWindowSize,
239
+ Ot as useZodSchemaTypes
164
240
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("./nivo-bar-C5h-CRYO.cjs"),b=require("react"),f=require("react-router");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");require("@tanstack/react-query");require("react-dom");const q="_side-menu-item_o72rm_1",I="_disabled_o72rm_6",R="_hidden_o72rm_10",S="_nav-button_o72rm_13",L="_child_o72rm_21",O="_text_o72rm_26",A="_icon_o72rm_36",$="_collapse-icon_o72rm_42",K="_collapsed_o72rm_52",D="_collapse-icon-mini_o72rm_55",F="_expanded_o72rm_86",z="_children-container_o72rm_92",G="_visible_o72rm_100",H="_children_o72rm_92",U="_mobile_o72rm_112",i={sideMenuItem:q,disabled:I,hidden:R,navButton:S,child:L,text:O,icon:A,collapseIcon:$,collapsed:K,collapseIconMini:D,expanded:F,childrenContainer:z,visible:G,children:H,mobile:U},W=({item:n,menuExpanded:t,useTooltips:r,children:m})=>n.tooltip&&!t&&r?e.jsx(s.SimpleTooltip,{text:n.tooltip,placement:"top",delay:{show:1e3,hide:0},children:e.jsx("div",{children:m})}):m,w=({item:n,menuExpanded:t,collapsed:r,onCollapse:m,currentPath:x,useHover:c,useTooltips:N,isMobile:B,disableMode:d})=>{var j,y,k,g;const[P,p]=b.useState(!1),[v]=x.split("?"),M=n.linkTo===v||((j=n.children)==null?void 0:j.some(l=>l.linkTo===v)),u=b.useRef(null);return s.useClickOutside([u],()=>r&&m()),e.jsxs("li",{ref:u,className:s.classNames("luminus-side-menu-item",i.sideMenuItem,{[i.mobile]:B},{[i.expanded]:t},{active:P||M},{open:r&&n.children},{[d==="disable"?i.disabled:i.hidden]:n.disabled||n.notPermitted||((y=n.children)==null?void 0:y.every(l=>l.notPermitted||l.disabled))},{[d==="disable"?"disabled":"hidden"]:n.disabled||n.notPermitted||((k=n.children)==null?void 0:k.every(l=>l.notPermitted||l.disabled))}),onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),children:[e.jsx(W,{item:n,menuExpanded:t,useTooltips:N,children:n.children?e.jsx(e.Fragment,{children:e.jsxs("button",{type:"button",className:s.classNames("nav-link",i.navButton),onClick:()=>{m()},children:[e.jsx("div",{className:s.classNames("icon",i.icon),children:n.icon}),!c&&!t&&e.jsx("div",{className:s.classNames("collapse-icon-mini rounded",i.collapseIconMini,{[i.collapsed]:r}),children:e.jsx(s.MdOutlineKeyboardArrowRight,{})}),t&&e.jsx("div",{className:s.classNames("text",i.text,"text-nowrap"),children:n.title}),t&&e.jsx("div",{className:s.classNames("collapse-icon",i.collapseIcon,{[i.collapsed]:r}),children:e.jsx(s.MdOutlineKeyboardArrowRight,{})})]})}):e.jsxs(f.Link,{to:n.disabled||n.notPermitted?"/":n.linkTo??"/",className:s.classNames("nav-link",i.navButton),children:[e.jsx("div",{className:s.classNames("icon",i.icon),children:n.icon}),t&&e.jsx("div",{className:s.classNames("text",i.text,"text-nowrap"),children:n.title})]})}),e.jsx("div",{className:s.classNames("children-container",i.childrenContainer,{[i.visible]:r}),children:e.jsx("div",{className:s.classNames("shadow rounded children",i.children),children:(g=n.children)==null?void 0:g.map(l=>e.jsx(f.Link,{to:l.disabled||l.notPermitted?"/":l.linkTo??"/",className:s.classNames("nav-link child rounded",i.navButton,i.child,{[d==="disable"?i.disabled:i.hidden]:l.disabled||l.notPermitted},{[d==="disable"?"disabled":"hidden"]:l.disabled||l.notPermitted}),onClick:m,children:e.jsx("div",{className:s.classNames("text",i.text,"text-nowrap"),children:l.title})},l.linkTo))})})]})},E="_side-menu_12rky_1",J="_sidebar-header_12rky_15",Q="_side-menu-content_12rky_22",V="_no-top-margin_12rky_28",X="_expand_12rky_34",Y="_only-logo_12rky_38",Z="_mobile_12rky_41",ee="_divider_12rky_56",h={sideMenu:E,sidebarHeader:J,sideMenuContent:Q,noTopMargin:V,expand:X,onlyLogo:Y,mobile:Z,divider:ee},se=14,ne=({headerItem:n,searchItem:t,shortcutsItem:r,mainItems:m,secondaryItems:x,expanded:c,setExpanded:N,currentPath:B,useHover:d,useTooltips:P,disableMode:p="disable"})=>{const[v,M]=b.useState(-1),{checkUserHasPermissions:u}=s.usePermissions(),j=b.useMemo(()=>m.map(o=>{var a;return{...o,notPermitted:!u(o.permissions??[],"any"),children:(a=o.children)==null?void 0:a.map(_=>({..._,notPermitted:!u(_.permissions??[],"any"),disabled:o.disabled||_.disabled}))}}),[m,u]),y=b.useMemo(()=>x.map(o=>{var a;return{...o,notPermitted:!u(o.permissions??[],"any"),children:(a=o.children)==null?void 0:a.map(_=>({..._,notPermitted:!u(_.permissions??[],"any")}))}}),[x,u]),k=o=>{M(o===v?-1:o)};b.useEffect(()=>{c||M(-1)},[c]);const g=b.useRef(null);s.useClickOutside([g],()=>N(!1));const l=b.useMemo(()=>[...j,...y].filter(o=>{var a;return p==="hide"?!o.disabled&&!o.notPermitted&&(((a=o.children)==null?void 0:a.filter(_=>!_.disabled&&!_.notPermitted))??[]).length>0:!0}),[j,y,p]),{isMobile:C}=s.useWindowSize();return e.jsxs("section",{ref:g,className:s.classNames("luminus-side-menu shadow",h.sideMenu,{[h.mobile]:C},{[h.expand]:c},{expand:c}),onMouseEnter:()=>d&&N(!0),onMouseLeave:()=>d&&N(!1),children:[e.jsx("div",{className:s.classNames("sidebar-header",h.sidebarHeader,{[h.onlyLogo]:d}),role:d?void 0:"button",onClick:d?void 0:()=>N(!c),children:d?n:c?e.jsxs(e.Fragment,{children:[e.jsx(s.MdOutlineKeyboardDoubleArrowLeft,{}),n]}):e.jsx(s.MdOutlineMenu,{})}),c&&(t||r)?e.jsxs("div",{className:"mb-3 d-flex flex-column gap-3",children:[r&&c?r:null,t&&c?t:null]}):null,e.jsxs("ul",{className:s.classNames(h.sideMenuContent,{[h.noTopMargin]:l.length>se}),children:[j.map((o,a)=>e.jsx(w,{item:o,menuExpanded:c,collapsed:a===v,onCollapse:()=>k(a),currentPath:B,useHover:d,useTooltips:P,isMobile:C,disableMode:p},o.title)),e.jsx("hr",{className:s.classNames("divider",h.divider)}),y.map((o,a)=>e.jsx(w,{item:o,menuExpanded:c,collapsed:a===v,onCollapse:()=>k(a),currentPath:B,useHover:d,useTooltips:P,isMobile:C,disableMode:p},o.title))]})]})},ie="_top-bar_lnmq0_1",oe="_top-bar-brand_lnmq0_12",T={topBar:ie,topBarBrand:oe},le=({appName:n,leftOffset:t,leftContent:r,centerContent:m,rightContent:x})=>e.jsx("nav",{className:s.classNames("luminus-top-bar shadow",T.topBar),style:{width:t?`calc(100% - ${t}px)`:void 0,left:t?`${t}px`:void 0},children:e.jsxs("div",{className:"w-100 row g-0",children:[e.jsxs("div",{className:"col-4 d-flex gap-3 align-items-center",children:[e.jsx(f.Link,{to:"/",className:s.classNames("luminus-top-bar-brand",T.topBarBrand),children:n}),r]}),e.jsx("div",{className:"col-4 d-flex align-items-center",children:m??null}),e.jsx("div",{className:"col-4 d-flex justify-content-end align-items-center",children:x??null})]})});exports.PageContainer=s.PageContainer;exports.SideContentBar=s.SideContentBar;exports.SideMenu=ne;exports.TopBar=le;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("./nivo-bar-DPUITZ23.cjs"),F=require("react"),ee=require("react-router");require("react-hook-form");require("react-flexmonster");require("@azure/msal-browser");require("@azure/msal-react");require("@tanstack/react-query");require("react-dom");const ie="_side-menu-item_o72rm_1",oe="_disabled_o72rm_6",ae="_hidden_o72rm_10",re="_nav-button_o72rm_13",ce="_child_o72rm_21",de="_text_o72rm_26",me="_icon_o72rm_36",ue="_collapse-icon_o72rm_42",pe="_collapsed_o72rm_52",he="_collapse-icon-mini_o72rm_55",_e="_expanded_o72rm_86",fe="_children-container_o72rm_92",xe="_visible_o72rm_100",be="_children_o72rm_92",ve="_mobile_o72rm_112",d={sideMenuItem:ie,disabled:oe,hidden:ae,navButton:re,child:ce,text:de,icon:me,collapseIcon:ue,collapsed:pe,collapseIconMini:he,expanded:_e,childrenContainer:fe,visible:xe,children:be,mobile:ve},Ne=o=>{const e=l.compilerRuntimeExports.c(6),{item:u,menuExpanded:f,useTooltips:v,children:y}=o;if(u.tooltip&&!f&&v){let M;e[0]===Symbol.for("react.memo_cache_sentinel")?(M={show:1e3,hide:0},e[0]=M):M=e[0];let s;e[1]!==y?(s=t.jsx("div",{children:y}),e[1]=y,e[2]=s):s=e[2];let r;return e[3]!==u.tooltip||e[4]!==s?(r=t.jsx(l.SimpleTooltip,{text:u.tooltip,placement:"top",delay:M,children:s}),e[3]=u.tooltip,e[4]=s,e[5]=r):r=e[5],r}return y},te=({item:o,menuExpanded:e,collapsed:u,onCollapse:f,currentPath:v,useHover:y,useTooltips:M,isMobile:s,disableMode:r})=>{var m,N,p,b;const[x,n]=F.useState(!1),[h]=v.split("?"),g=o.linkTo===h||((m=o.children)==null?void 0:m.some(i=>i.linkTo===h)),c=F.useRef(null);return l.useClickOutside([c],()=>u&&f()),t.jsxs("li",{ref:c,className:l.classNames("luminus-side-menu-item",d.sideMenuItem,{[d.mobile]:s},{[d.expanded]:e},{active:x||g},{open:u&&o.children},{[r==="disable"?d.disabled:d.hidden]:o.disabled||o.notPermitted||((N=o.children)==null?void 0:N.every(i=>i.notPermitted||i.disabled))},{[r==="disable"?"disabled":"hidden"]:o.disabled||o.notPermitted||((p=o.children)==null?void 0:p.every(i=>i.notPermitted||i.disabled))}),onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),children:[t.jsx(Ne,{item:o,menuExpanded:e,useTooltips:M,children:o.children?t.jsx(t.Fragment,{children:t.jsxs("button",{type:"button",className:l.classNames("nav-link",d.navButton),onClick:()=>{f()},children:[t.jsx("div",{className:l.classNames("icon",d.icon),children:o.icon}),!y&&!e&&t.jsx("div",{className:l.classNames("collapse-icon-mini rounded",d.collapseIconMini,{[d.collapsed]:u}),children:t.jsx(l.MdOutlineKeyboardArrowRight,{})}),e&&t.jsx("div",{className:l.classNames("text",d.text,"text-nowrap"),children:o.title}),e&&t.jsx("div",{className:l.classNames("collapse-icon",d.collapseIcon,{[d.collapsed]:u}),children:t.jsx(l.MdOutlineKeyboardArrowRight,{})})]})}):t.jsxs(ee.Link,{to:o.disabled||o.notPermitted?"/":o.linkTo??"/",className:l.classNames("nav-link",d.navButton),children:[t.jsx("div",{className:l.classNames("icon",d.icon),children:o.icon}),e&&t.jsx("div",{className:l.classNames("text",d.text,"text-nowrap"),children:o.title})]})}),t.jsx("div",{className:l.classNames("children-container",d.childrenContainer,{[d.visible]:u}),children:t.jsx("div",{className:l.classNames("shadow rounded children",d.children),children:(b=o.children)==null?void 0:b.map(i=>t.jsx(ee.Link,{to:i.disabled||i.notPermitted?"/":i.linkTo??"/",className:l.classNames("nav-link child rounded",d.navButton,d.child,{[r==="disable"?d.disabled:d.hidden]:i.disabled||i.notPermitted},{[r==="disable"?"disabled":"hidden"]:i.disabled||i.notPermitted}),onClick:f,children:t.jsx("div",{className:l.classNames("text",d.text,"text-nowrap"),children:i.title})},i.linkTo))})})]})},je="_side-menu_12rky_1",ye="_sidebar-header_12rky_15",Me="_side-menu-content_12rky_22",ge="_no-top-margin_12rky_28",ke="_expand_12rky_34",Ie="_only-logo_12rky_38",Ce="_mobile_12rky_41",Pe="_divider_12rky_56",P={sideMenu:je,sidebarHeader:ye,sideMenuContent:Me,noTopMargin:ge,expand:ke,onlyLogo:Ie,mobile:Ce,divider:Pe},Be=14,Se=o=>{const e=l.compilerRuntimeExports.c(100),{headerItem:u,searchItem:f,shortcutsItem:v,mainItems:y,secondaryItems:M,expanded:s,setExpanded:r,currentPath:x,useHover:n,useTooltips:h,disableMode:g}=o,c=g===void 0?"disable":g,[m,N]=F.useState(-1),{checkUserHasPermissions:p}=l.usePermissions();let b;if(e[0]!==p||e[1]!==y){let a;e[3]!==p?(a=_=>{var k;return{..._,notPermitted:!p(_.permissions??[],"any"),children:(k=_.children)==null?void 0:k.map(D=>({...D,notPermitted:!p(D.permissions??[],"any"),disabled:_.disabled||D.disabled}))}},e[3]=p,e[4]=a):a=e[4],b=y.map(a),e[0]=p,e[1]=y,e[2]=b}else b=e[2];const i=b;let C;if(e[5]!==p||e[6]!==M){let a;e[8]!==p?(a=_=>{var k;return{..._,notPermitted:!p(_.permissions??[],"any"),children:(k=_.children)==null?void 0:k.map(D=>({...D,notPermitted:!p(D.permissions??[],"any")}))}},e[8]=p,e[9]=a):a=e[9],C=M.map(a),e[5]=p,e[6]=M,e[7]=C}else C=e[7];const B=C;let z;e[10]!==m?(z=a=>{N(a===m?-1:a)},e[10]=m,e[11]=z):z=e[11];const I=z;let G,U;e[12]!==s?(G=()=>{s||N(-1)},U=[s],e[12]=s,e[13]=G,e[14]=U):(G=e[13],U=e[14]),F.useEffect(G,U);const se=F.useRef(null);let W;e[15]===Symbol.for("react.memo_cache_sentinel")?(W=[se],e[15]=W):W=e[15];let J;e[16]!==r?(J=()=>r(!1),e[16]=r,e[17]=J):J=e[17],l.useClickOutside(W,J);let Q;e[18]!==c||e[19]!==i||e[20]!==B?(Q=[...i,...B].filter(a=>{var _;return c==="hide"?!a.disabled&&!a.notPermitted&&(((_=a.children)==null?void 0:_.filter(Te))??[]).length>0:!0}),e[18]=c,e[19]=i,e[20]=B,e[21]=Q):Q=e[21];const le=Q,{isMobile:j}=l.useWindowSize();let S;e[22]!==s||e[23]!==j?(S=l.classNames("luminus-side-menu shadow",P.sideMenu,{[P.mobile]:j},{[P.expand]:s},{expand:s}),e[22]=s,e[23]=j,e[24]=S):S=e[24];let T,R;e[25]!==r||e[26]!==n?(T=()=>n&&r(!0),R=()=>n&&r(!1),e[25]=r,e[26]=n,e[27]=T,e[28]=R):(T=e[27],R=e[28]);let w;e[29]!==n?(w=l.classNames("sidebar-header",P.sidebarHeader,{[P.onlyLogo]:n}),e[29]=n,e[30]=w):w=e[30];const Y=n?void 0:"button";let q;e[31]!==s||e[32]!==r||e[33]!==n?(q=n?void 0:()=>r(!s),e[31]=s,e[32]=r,e[33]=n,e[34]=q):q=e[34];let O;e[35]!==s||e[36]!==u||e[37]!==n?(O=n?u:s?t.jsxs(t.Fragment,{children:[t.jsx(l.MdOutlineKeyboardDoubleArrowLeft,{}),u]}):t.jsx(l.MdOutlineMenu,{}),e[35]=s,e[36]=u,e[37]=n,e[38]=O):O=e[38];let L;e[39]!==w||e[40]!==Y||e[41]!==q||e[42]!==O?(L=t.jsx("div",{className:w,role:Y,onClick:q,children:O}),e[39]=w,e[40]=Y,e[41]=q,e[42]=O,e[43]=L):L=e[43];let H;e[44]!==s||e[45]!==f||e[46]!==v?(H=s&&(f||v)?t.jsxs("div",{className:"mb-3 d-flex flex-column gap-3",children:[v&&s?v:null,f&&s?f:null]}):null,e[44]=s,e[45]=f,e[46]=v,e[47]=H):H=e[47];const Z=le.length>Be;let E;e[48]!==Z?(E=l.classNames(P.sideMenuContent,{[P.noTopMargin]:Z}),e[48]=Z,e[49]=E):E=e[49];let $;if(e[50]!==m||e[51]!==x||e[52]!==c||e[53]!==s||e[54]!==j||e[55]!==i||e[56]!==I||e[57]!==n||e[58]!==h){let a;e[60]!==m||e[61]!==x||e[62]!==c||e[63]!==s||e[64]!==j||e[65]!==I||e[66]!==n||e[67]!==h?(a=(_,k)=>t.jsx(te,{item:_,menuExpanded:s,collapsed:k===m,onCollapse:()=>I(k),currentPath:x,useHover:n,useTooltips:h,isMobile:j,disableMode:c},_.title),e[60]=m,e[61]=x,e[62]=c,e[63]=s,e[64]=j,e[65]=I,e[66]=n,e[67]=h,e[68]=a):a=e[68],$=i.map(a),e[50]=m,e[51]=x,e[52]=c,e[53]=s,e[54]=j,e[55]=i,e[56]=I,e[57]=n,e[58]=h,e[59]=$}else $=e[59];let V;e[69]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx("hr",{className:l.classNames("divider",P.divider)}),e[69]=V):V=e[69];let A;if(e[70]!==m||e[71]!==x||e[72]!==c||e[73]!==s||e[74]!==j||e[75]!==I||e[76]!==B||e[77]!==n||e[78]!==h){let a;e[80]!==m||e[81]!==x||e[82]!==c||e[83]!==s||e[84]!==j||e[85]!==I||e[86]!==n||e[87]!==h?(a=(_,k)=>t.jsx(te,{item:_,menuExpanded:s,collapsed:k===m,onCollapse:()=>I(k),currentPath:x,useHover:n,useTooltips:h,isMobile:j,disableMode:c},_.title),e[80]=m,e[81]=x,e[82]=c,e[83]=s,e[84]=j,e[85]=I,e[86]=n,e[87]=h,e[88]=a):a=e[88],A=B.map(a),e[70]=m,e[71]=x,e[72]=c,e[73]=s,e[74]=j,e[75]=I,e[76]=B,e[77]=n,e[78]=h,e[79]=A}else A=e[79];let K;e[89]!==E||e[90]!==$||e[91]!==A?(K=t.jsxs("ul",{className:E,children:[$,V,A]}),e[89]=E,e[90]=$,e[91]=A,e[92]=K):K=e[92];let X;return e[93]!==S||e[94]!==T||e[95]!==R||e[96]!==L||e[97]!==H||e[98]!==K?(X=t.jsxs("section",{ref:se,className:S,onMouseEnter:T,onMouseLeave:R,children:[L,H,K]}),e[93]=S,e[94]=T,e[95]=R,e[96]=L,e[97]=H,e[98]=K,e[99]=X):X=e[99],X};function Te(o){return!o.disabled&&!o.notPermitted}const Re="_top-bar_lnmq0_1",we="_top-bar-brand_lnmq0_12",ne={topBar:Re,topBarBrand:we},qe=o=>{const e=l.compilerRuntimeExports.c(21),{appName:u,leftOffset:f,leftContent:v,centerContent:y,rightContent:M}=o;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=l.classNames("luminus-top-bar shadow",ne.topBar),e[0]=s):s=e[0];const r=f?`calc(100% - ${f}px)`:void 0,x=f?`${f}px`:void 0;let n;e[1]!==r||e[2]!==x?(n={width:r,left:x},e[1]=r,e[2]=x,e[3]=n):n=e[3];let h;e[4]===Symbol.for("react.memo_cache_sentinel")?(h=l.classNames("luminus-top-bar-brand",ne.topBarBrand),e[4]=h):h=e[4];let g;e[5]!==u?(g=t.jsx(ee.Link,{to:"/",className:h,children:u}),e[5]=u,e[6]=g):g=e[6];let c;e[7]!==v||e[8]!==g?(c=t.jsxs("div",{className:"col-4 d-flex gap-3 align-items-center",children:[g,v]}),e[7]=v,e[8]=g,e[9]=c):c=e[9];const m=y??null;let N;e[10]!==m?(N=t.jsx("div",{className:"col-4 d-flex align-items-center",children:m}),e[10]=m,e[11]=N):N=e[11];const p=M??null;let b;e[12]!==p?(b=t.jsx("div",{className:"col-4 d-flex justify-content-end align-items-center",children:p}),e[12]=p,e[13]=b):b=e[13];let i;e[14]!==b||e[15]!==c||e[16]!==N?(i=t.jsxs("div",{className:"w-100 row g-0",children:[c,N,b]}),e[14]=b,e[15]=c,e[16]=N,e[17]=i):i=e[17];let C;return e[18]!==i||e[19]!==n?(C=t.jsx("nav",{className:s,style:n,children:i}),e[18]=i,e[19]=n,e[20]=C):C=e[20],C};exports.PageContainer=l.PageContainer;exports.SideContentBar=l.SideContentBar;exports.SideMenu=Se;exports.TopBar=qe;