this.max&&(this.field.value=String(this.max)),this.updateFieldSize(),this.disableButtonsIfNeeded(),this.updateLiveZone(),I.trigger(this.element,Z.EVENT.onchange,{value:this.valueAsNumber})}))}dispose(){I.off(this.decrementButton,Z.EVENT.click),I.off(this.incrementButton,Z.EVENT.click),I.off(this.field,"input"),T.removeData(this.element,Z.DATA_KEY),this.element=null}get valueAsNumber(){return Number(this.field.value)}get step(){return this.field.step?Number(this.field.step):1}get min(){return this.field.min?Number(this.field.min):null}get max(){return this.field.max?Number(this.field.max):null}updateFieldSize=()=>{this.field.style.setProperty("--nj-fc-field-characters-length",`${this.field.value.length||1}`)};disableButtonsIfNeeded(e=!0){const t=null!==this.max&&this.valueAsNumber>=this.max,n=null!==this.min&&this.valueAsNumber<=this.min;this.incrementButton.disabled=t,this.decrementButton.disabled=n,t&&e&&this.field.focus(),n&&e&&this.field.focus()}updateLiveZone(){this.liveZoneTimeoutId&&clearTimeout(this.liveZoneTimeoutId);const e=this.element.querySelector("label").textContent,t=this.element.dataset.liveZoneFormat??`${e} : {x}`;this.liveZone.innerHTML=`${t.replace("{x}",this.field.value)}
`,this.liveZoneTimeoutId=setTimeout((()=>{this.liveZone.innerHTML=null}),Z.LIVEZONE_TIMEOUT)}decrementValue=()=>{const e=Number(this.getClampedValue(this.valueAsNumber-this.step).toFixed(2));this.field.value=String(e),this.updateFieldSize(),this.disableButtonsIfNeeded(),this.updateLiveZone(),I.trigger(this.element,Z.EVENT.decrement,{value:e})};incrementValue=()=>{const e=Number(this.getClampedValue(this.valueAsNumber+this.step).toFixed(2));this.field.value=String(e),this.updateFieldSize(),this.disableButtonsIfNeeded(),this.updateLiveZone(),I.trigger(this.element,Z.EVENT.increment,{value:e})};getClampedValue(e){return null!==this.min&ðis.max&&(e=this.max),e}static init(e={}){return super.init(this,e,Z.SELECTOR.default)}}const Q=["top","right","bottom","left"],ee=Math.min,te=Math.max,ne=Math.round,ie=Math.floor,se=e=>({x:e,y:e}),ae={left:"right",right:"left",bottom:"top",top:"bottom"},re={start:"end",end:"start"};function oe(e,t,n){return te(e,ee(t,n))}function le(e,t){return"function"==typeof e?e(t):e}function ce(e){return e.split("-")[0]}function de(e){return e.split("-")[1]}function ue(e){return"x"===e?"y":"x"}function me(e){return"y"===e?"height":"width"}function he(e){return["top","bottom"].includes(ce(e))?"y":"x"}function pe(e){return ue(he(e))}function fe(e){return e.replace(/start|end/g,(e=>re[e]))}function Ee(e){return e.replace(/left|right|bottom|top/g,(e=>ae[e]))}function ge(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function be(e){const{x:t,y:n,width:i,height:s}=e;return{width:i,height:s,top:n,left:t,right:t+i,bottom:n+s,x:t,y:n}}function _e(e,t,n){let{reference:i,floating:s}=e;const a=he(t),r=pe(t),o=me(r),l=ce(t),c="y"===a,d=i.x+i.width/2-s.width/2,u=i.y+i.height/2-s.height/2,m=i[o]/2-s[o]/2;let h;switch(l){case"top":h={x:d,y:i.y-s.height};break;case"bottom":h={x:d,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:u};break;case"left":h={x:i.x-s.width,y:u};break;default:h={x:i.x,y:i.y}}switch(de(t)){case"start":h[r]-=m*(n&&c?-1:1);break;case"end":h[r]+=m*(n&&c?-1:1)}return h}async function ve(e,t){var n;void 0===t&&(t={});const{x:i,y:s,platform:a,rects:r,elements:o,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:h=0}=le(t,e),p=ge(h),f=o[m?"floating"===u?"reference":"floating":u],E=be(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(f)))||n?f:f.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(o.floating)),boundary:c,rootBoundary:d,strategy:l})),g="floating"===u?{x:i,y:s,width:r.floating.width,height:r.floating.height}:r.reference,b=await(null==a.getOffsetParent?void 0:a.getOffsetParent(o.floating)),_=await(null==a.isElement?void 0:a.isElement(b))&&await(null==a.getScale?void 0:a.getScale(b))||{x:1,y:1},v=be(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:b,strategy:l}):g);return{top:(E.top-v.top+p.top)/_.y,bottom:(v.bottom-E.bottom+p.bottom)/_.y,left:(E.left-v.left+p.left)/_.x,right:(v.right-E.right+p.right)/_.x}}function Ne(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ae(e){return Q.some((t=>e[t]>=0))}const Te=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:s,y:a,placement:r,middlewareData:o}=t,l=await async function(e,t){const{placement:n,platform:i,elements:s}=e,a=await(null==i.isRTL?void 0:i.isRTL(s.floating)),r=ce(n),o=de(n),l="y"===he(n),c=["left","top"].includes(r)?-1:1,d=a&&l?-1:1,u=le(t,e);let{mainAxis:m,crossAxis:h,alignmentAxis:p}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return o&&"number"==typeof p&&(h="end"===o?-1*p:p),l?{x:h*d,y:m*c}:{x:m*c,y:h*d}}(t,e);return r===(null==(n=o.offset)?void 0:n.placement)&&null!=(i=o.arrow)&&i.alignmentOffset?{}:{x:s+l.x,y:a+l.y,data:{...l,placement:r}}}}};function ye(e){return Ce(e)?(e.nodeName||"").toLowerCase():"#document"}function Se(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Le(e){var t;return null==(t=(Ce(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Ce(e){return e instanceof Node||e instanceof Se(e).Node}function we(e){return e instanceof Element||e instanceof Se(e).Element}function xe(e){return e instanceof HTMLElement||e instanceof Se(e).HTMLElement}function Re(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof Se(e).ShadowRoot)}function Ie(e){const{overflow:t,overflowX:n,overflowY:i,display:s}=Me(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!["inline","contents"].includes(s)}function ke(e){return["table","td","th"].includes(ye(e))}function Oe(e){const t=De(),n=Me(e);return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function De(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function je(e){return["html","body","#document"].includes(ye(e))}function Me(e){return Se(e).getComputedStyle(e)}function $e(e){return we(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Pe(e){if("html"===ye(e))return e;const t=e.assignedSlot||e.parentNode||Re(e)&&e.host||Le(e);return Re(t)?t.host:t}function Fe(e){const t=Pe(e);return je(t)?e.ownerDocument?e.ownerDocument.body:e.body:xe(t)&&Ie(t)?t:Fe(t)}function Ke(e,t,n){var i;void 0===t&&(t=[]),void 0===n&&(n=!0);const s=Fe(e),a=s===(null==(i=e.ownerDocument)?void 0:i.body),r=Se(s);return a?t.concat(r,r.visualViewport||[],Ie(s)?s:[],r.frameElement&&n?Ke(r.frameElement):[]):t.concat(s,Ke(s,[],n))}function Ye(e){const t=Me(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const s=xe(e),a=s?e.offsetWidth:n,r=s?e.offsetHeight:i,o=ne(n)!==a||ne(i)!==r;return o&&(n=a,i=r),{width:n,height:i,$:o}}function Ve(e){return we(e)?e:e.contextElement}function Be(e){const t=Ve(e);if(!xe(t))return se(1);const n=t.getBoundingClientRect(),{width:i,height:s,$:a}=Ye(t);let r=(a?ne(n.width):n.width)/i,o=(a?ne(n.height):n.height)/s;return r&&Number.isFinite(r)||(r=1),o&&Number.isFinite(o)||(o=1),{x:r,y:o}}const He=se(0);function qe(e){const t=Se(e);return De()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:He}function ze(e,t,n,i){void 0===t&&(t=!1),void 0===n&&(n=!1);const s=e.getBoundingClientRect(),a=Ve(e);let r=se(1);t&&(i?we(i)&&(r=Be(i)):r=Be(e));const o=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Se(e))&&t}(a,n,i)?qe(a):se(0);let l=(s.left+o.x)/r.x,c=(s.top+o.y)/r.y,d=s.width/r.x,u=s.height/r.y;if(a){const e=Se(a),t=i&&we(i)?Se(i):i;let n=e,s=n.frameElement;for(;s&&i&&t!==n;){const e=Be(s),t=s.getBoundingClientRect(),i=Me(s),a=t.left+(s.clientLeft+parseFloat(i.paddingLeft))*e.x,r=t.top+(s.clientTop+parseFloat(i.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,u*=e.y,l+=a,c+=r,n=Se(s),s=n.frameElement}}return be({width:d,height:u,x:l,y:c})}const Ue=[":popover-open",":modal"];function Ge(e){return Ue.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Xe(e){return ze(Le(e)).left+$e(e).scrollLeft}function Je(e,t,n){let i;if("viewport"===t)i=function(e,t){const n=Se(e),i=Le(e),s=n.visualViewport;let a=i.clientWidth,r=i.clientHeight,o=0,l=0;if(s){a=s.width,r=s.height;const e=De();(!e||e&&"fixed"===t)&&(o=s.offsetLeft,l=s.offsetTop)}return{width:a,height:r,x:o,y:l}}(e,n);else if("document"===t)i=function(e){const t=Le(e),n=$e(e),i=e.ownerDocument.body,s=te(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),a=te(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let r=-n.scrollLeft+Xe(e);const o=-n.scrollTop;return"rtl"===Me(i).direction&&(r+=te(t.clientWidth,i.clientWidth)-s),{width:s,height:a,x:r,y:o}}(Le(e));else if(we(t))i=function(e,t){const n=ze(e,!0,"fixed"===t),i=n.top+e.clientTop,s=n.left+e.clientLeft,a=xe(e)?Be(e):se(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:s*a.x,y:i*a.y}}(t,n);else{const n=qe(e);i={...t,x:t.x-n.x,y:t.y-n.y}}return be(i)}function We(e,t){const n=Pe(e);return!(n===t||!we(n)||je(n))&&("fixed"===Me(n).position||We(n,t))}function Ze(e,t,n){const i=xe(t),s=Le(t),a="fixed"===n,r=ze(e,!0,a,t);let o={scrollLeft:0,scrollTop:0};const l=se(0);if(i||!i&&!a)if(("body"!==ye(t)||Ie(s))&&(o=$e(t)),i){const e=ze(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else s&&(l.x=Xe(s));return{x:r.left+o.scrollLeft-l.x,y:r.top+o.scrollTop-l.y,width:r.width,height:r.height}}function Qe(e,t){return xe(e)&&"fixed"!==Me(e).position?t?t(e):e.offsetParent:null}function et(e,t){const n=Se(e);if(!xe(e)||Ge(e))return n;let i=Qe(e,t);for(;i&&ke(i)&&"static"===Me(i).position;)i=Qe(i,t);return i&&("html"===ye(i)||"body"===ye(i)&&"static"===Me(i).position&&!Oe(i))?n:i||function(e){let t=Pe(e);for(;xe(t)&&!je(t);){if(Oe(t))return t;t=Pe(t)}return null}(e)||n}const tt={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:i,strategy:s}=e;const a="fixed"===s,r=Le(i),o=!!t&&Ge(t.floating);if(i===r||o&&a)return n;let l={scrollLeft:0,scrollTop:0},c=se(1);const d=se(0),u=xe(i);if((u||!u&&!a)&&(("body"!==ye(i)||Ie(r))&&(l=$e(i)),xe(i))){const e=ze(i);c=Be(i),d.x=e.x+i.clientLeft,d.y=e.y+i.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x,y:n.y*c.y-l.scrollTop*c.y+d.y}},getDocumentElement:Le,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:i,strategy:s}=e;const a=[..."clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let i=Ke(e,[],!1).filter((e=>we(e)&&"body"!==ye(e))),s=null;const a="fixed"===Me(e).position;let r=a?Pe(e):e;for(;we(r)&&!je(r);){const t=Me(r),n=Oe(r);n||"fixed"!==t.position||(s=null),(a?!n&&!s:!n&&"static"===t.position&&s&&["absolute","fixed"].includes(s.position)||Ie(r)&&!n&&We(e,r))?i=i.filter((e=>e!==r)):s=t,r=Pe(r)}return t.set(e,i),i}(t,this._c):[].concat(n),i],r=a[0],o=a.reduce(((e,n)=>{const i=Je(t,n,s);return e.top=te(i.top,e.top),e.right=ee(i.right,e.right),e.bottom=ee(i.bottom,e.bottom),e.left=te(i.left,e.left),e}),Je(t,r,s));return{width:o.right-o.left,height:o.bottom-o.top,x:o.left,y:o.top}},getOffsetParent:et,getElementRects:async function(e){const t=this.getOffsetParent||et,n=this.getDimensions;return{reference:Ze(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Ye(e);return{width:t,height:n}},getScale:Be,isElement:we,isRTL:function(e){return"rtl"===Me(e).direction}};function nt(e,t,n,i){void 0===i&&(i={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:r="function"==typeof ResizeObserver,layoutShift:o="function"==typeof IntersectionObserver,animationFrame:l=!1}=i,c=Ve(e),d=s||a?[...c?Ke(c):[],...Ke(t)]:[];d.forEach((e=>{s&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)}));const u=c&&o?function(e,t){let n,i=null;const s=Le(e);function a(){var e;clearTimeout(n),null==(e=i)||e.disconnect(),i=null}return function r(o,l){void 0===o&&(o=!1),void 0===l&&(l=1),a();const{left:c,top:d,width:u,height:m}=e.getBoundingClientRect();if(o||t(),!u||!m)return;const h={rootMargin:-ie(d)+"px "+-ie(s.clientWidth-(c+u))+"px "+-ie(s.clientHeight-(d+m))+"px "+-ie(c)+"px",threshold:te(0,ee(1,l))||1};let p=!0;function f(e){const t=e[0].intersectionRatio;if(t!==l){if(!p)return r();t?r(!1,t):n=setTimeout((()=>{r(!1,1e-7)}),100)}p=!1}try{i=new IntersectionObserver(f,{...h,root:s.ownerDocument})}catch(e){i=new IntersectionObserver(f,h)}i.observe(e)}(!0),a}(c,n):null;let m,h=-1,p=null;r&&(p=new ResizeObserver((e=>{let[i]=e;i&&i.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),n()})),c&&!l&&p.observe(c),p.observe(t));let f=l?ze(e):null;return l&&function t(){const i=ze(e);!f||i.x===f.x&&i.y===f.y&&i.width===f.width&&i.height===f.height||n(),f=i,m=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach((e=>{s&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)})),null==u||u(),null==(e=p)||e.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const it=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:s}=t,{mainAxis:a=!0,crossAxis:r=!1,limiter:o={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=le(e,t),c={x:n,y:i},d=await ve(t,l),u=he(ce(s)),m=ue(u);let h=c[m],p=c[u];if(a){const e="y"===m?"bottom":"right";h=oe(h+d["y"===m?"top":"left"],h,h-d[e])}if(r){const e="y"===u?"bottom":"right";p=oe(p+d["y"===u?"top":"left"],p,p-d[e])}const f=o.fn({...t,[m]:h,[u]:p});return{...f,data:{x:f.x-n,y:f.y-i}}}}},st=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:s,middlewareData:a,rects:r,initialPlacement:o,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:f=!0,...E}=le(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const g=ce(s),b=ce(o)===o,_=await(null==l.isRTL?void 0:l.isRTL(c.floating)),v=m||(b||!f?[Ee(o)]:function(e){const t=Ee(e);return[fe(e),t,fe(t)]}(o));m||"none"===p||v.push(...function(e,t,n,i){const s=de(e);let a=function(e,t,n){const i=["left","right"],s=["right","left"],a=["top","bottom"],r=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:i:t?i:s;case"left":case"right":return t?a:r;default:return[]}}(ce(e),"start"===n,i);return s&&(a=a.map((e=>e+"-"+s)),t&&(a=a.concat(a.map(fe)))),a}(o,f,p,_));const N=[o,...v],A=await ve(t,E),T=[];let y=(null==(i=a.flip)?void 0:i.overflows)||[];if(d&&T.push(A[g]),u){const e=function(e,t,n){void 0===n&&(n=!1);const i=de(e),s=pe(e),a=me(s);let r="x"===s?i===(n?"end":"start")?"right":"left":"start"===i?"bottom":"top";return t.reference[a]>t.floating[a]&&(r=Ee(r)),[r,Ee(r)]}(s,r,_);T.push(A[e[0]],A[e[1]])}if(y=[...y,{placement:s,overflows:T}],!T.every((e=>e<=0))){var S,L;const e=((null==(S=a.flip)?void 0:S.index)||0)+1,t=N[e];if(t)return{data:{index:e,overflows:y},reset:{placement:t}};let n=null==(L=y.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:L.placement;if(!n)switch(h){case"bestFit":{var C;const e=null==(C=y.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:C[0];e&&(n=e);break}case"initialPlacement":n=o}if(s!==n)return{reset:{placement:n}}}return{}}}},at=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:i="referenceHidden",...s}=le(e,t);switch(i){case"referenceHidden":{const e=Ne(await ve(t,{...s,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ae(e)}}}case"escaped":{const e=Ne(await ve(t,{...s,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ae(e)}}}default:return{}}}}},rt=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:s,rects:a,platform:r,elements:o,middlewareData:l}=t,{element:c,padding:d=0}=le(e,t)||{};if(null==c)return{};const u=ge(d),m={x:n,y:i},h=pe(s),p=me(h),f=await r.getDimensions(c),E="y"===h,g=E?"top":"left",b=E?"bottom":"right",_=E?"clientHeight":"clientWidth",v=a.reference[p]+a.reference[h]-m[h]-a.floating[p],N=m[h]-a.reference[h],A=await(null==r.getOffsetParent?void 0:r.getOffsetParent(c));let T=A?A[_]:0;T&&await(null==r.isElement?void 0:r.isElement(A))||(T=o.floating[_]||a.floating[p]);const y=v/2-N/2,S=T/2-f[p]/2-1,L=ee(u[g],S),C=ee(u[b],S),w=L,x=T-f[p]-C,R=T/2-f[p]/2+y,I=oe(w,R,x),k=!l.arrow&&null!=de(s)&&R!==I&&a.reference[p]/2-(R{const i=new Map,s={platform:tt,...n},a={...s.platform,_c:i};return(async(e,t,n)=>{const{placement:i="bottom",strategy:s="absolute",middleware:a=[],platform:r}=n,o=a.filter(Boolean),l=await(null==r.isRTL?void 0:r.isRTL(t));let c=await r.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:u}=_e(c,i,l),m=i,h={},p=0;for(let n=0;n({x:e.x,y:e.y,top:e.y,left:e.x,bottom:e.y,right:e.x,width:0,height:0}),parentElement:document.body}:e,ct(s)&&(s.ariaExpanded="true");const a=(e=>{const t=document.createElement("div");return t.className="nj-menu",t.style.position="absolute",t.role="menu",t.appendChild(e),t})(t);let r=s.parentElement;"parent"!==n&&(r="string"==typeof n?document.getElementById(n)??r:n),r.appendChild(a);const o=nt(s,a,(()=>{ot(s,a,{...i,middleware:[i?.offsetOptions&&Te(i.offsetOptions),i?.flipOptions&&st(i.flipOptions),i?.shiftOptions&&it(i.shiftOptions),i?.hideOptions&&at(i.hideOptions)]}).then((({x:e,y:t,middlewareData:n})=>{Object.assign(a.style,{left:`${e}px`,top:`${t}px`}),i?.hideOptions?.strategy&&n.hide&&Object.assign(a.style,{visibility:n.hide[i.hideOptions.strategy]?"hidden":"visible"})}))}));return{menu:a,unmount:()=>{r.removeChild(a),o(),ct(s)&&(s.ariaExpanded="false")}}}const ct=e=>"tagName"in e,dt=['a[href]:not([tabindex^="-"]):not([data-trap-anchor])','area[href]:not([tabindex^="-"]):not([data-trap-anchor])','input:not([type="hidden"]):not([type="radio"]):not([disabled]):not([tabindex^="-"]):not([data-trap-anchor])','input[type="radio"]:not([disabled]):not([tabindex^="-"]):not([data-trap-anchor])','select:not([disabled]):not([tabindex^="-"]):not([data-trap-anchor])','textarea:not([disabled]):not([tabindex^="-"]):not([data-trap-anchor])','button:not([disabled]):not([tabindex^="-"]):not([data-trap-anchor])','iframe:not([tabindex^="-"]):not([data-trap-anchor])','audio[controls]:not([tabindex^="-"]):not([data-trap-anchor])','video[controls]:not([tabindex^="-"]):not([data-trap-anchor])','[contenteditable]:not([tabindex^="-"]):not([data-trap-anchor])','[tabindex]:not([tabindex^="-"]):not([data-trap-anchor])'];class ut extends y{static LOG_TAG=`${S.LIBRARY_LOG_TAG}[MODAL]`;static NAME=`${S.KEY_PREFIX}-modal`;static DATA_KEY=`${S.KEY_PREFIX}.modal`;static EVENT_KEY=`.${ut.DATA_KEY}`;static DATA_API_KEY=S.KEY_PREFIX;static ESCAPE_KEYCODE=27;static hasInit=!1;static CLASSNAME={backdrop:`${S.KEY_PREFIX}-modal__backdrop`,backdropFitViewport:`${S.KEY_PREFIX}-modal__backdrop--fit-viewport`,fade:"fade",show:"show",visible:`${ut.NAME}--visible`,fitViewport:`${ut.NAME}--fit-viewport`};static SELECTOR={default:`.${ut.NAME}`,dataDismiss:'[data-dismiss="modal"]',dataToggle:'[data-toggle="modal"]',dataAttributeToggleName:"data-toggle",dataAttributeToggleValue:"modal",modalBody:`.${S.KEY_PREFIX}-modal__body`,dialog:`.${S.KEY_PREFIX}-modal__dialog`};static EVENT={beforehide:`${C.beforehide}${ut.EVENT_KEY}`,show:`${C.show}${ut.EVENT_KEY}`,shown:`${C.shown}${ut.EVENT_KEY}`,focusin:`${C.focusin}${ut.EVENT_KEY}`,hide:`${C.hide}${ut.EVENT_KEY}`,hidden:`${C.hidden}${ut.EVENT_KEY}`,keydownDismiss:`${C.keydown}.dismiss${ut.EVENT_KEY}`,clickDismiss:`${C.click}.dismiss${ut.EVENT_KEY}`,clickDataApi:`${C.click}${ut.EVENT_KEY}${ut.DATA_API_KEY}`,mouseupDismiss:`${C.mouseup}.dismiss${ut.EVENT_KEY}`,mousedownDismiss:`${C.mousedown}.dismiss${ut.EVENT_KEY}`};static CAN_MOVE_ELEMENTS_IN_DOM=!0;static SHOULD_MANAGE_OPENING_STATE=!0;backdrop=null;dialog=null;ignoreBackdropClick=null;isShown=!1;isTransitioning=!1;triggerElement=null;constructor(e){super(ut,e),this.shouldManageOpeningState=ut.SHOULD_MANAGE_OPENING_STATE,this.dialog=this.element.querySelector(ut.SELECTOR.dialog);const{leadingFocusTrap:t,trailingFocusTrap:n}=this.createFocusElements();if(this.leadingFocusTrapAnchorElement=t,this.trailingFocusTrapAnchorElement=n,this.shouldFitViewportArea=this.element.classList.contains(ut.CLASSNAME.fitViewport),ut.CAN_MOVE_ELEMENTS_IN_DOM){this.targetedParentElement=this.element.parentElement;const e=this.element.dataset.appendto;if(e&&!this.shouldFitViewportArea){const t=document.querySelector(e);this.isNodeElement(t)?this.targetedParentElement=t:console.error(`${ut.LOG_TAG} Invalid element: Anchor element '${e}' is not a valid node element. Check your selector for [data-appendto]. Appended to parent element instead.`)}const t=this.isNodeElement(this.targetedParentElement);if(this.shouldFitViewportArea||!t){t||console.error(`${ut.LOG_TAG} Invalid element: Parent element is not a valid node element. Appended to body instead.`);const e=document.body;if(!this.isNodeElement(e))throw new Error(`${ut.LOG_TAG} No body element found. Unable to attach modal`);this.targetedParentElement=e}this.targetedParentElement!==this.element.parentElement&&this.targetedParentElement?.appendChild(this.element)}else{const e=this.element.parentElement;if(!this.isNodeElement(e))throw new Error(`${ut.LOG_TAG} Invalid modal's parent element. Unable to initialize modal`);this.targetedParentElement=e}T.setData(e,ut.DATA_KEY,this),this.shouldManageOpeningState&&!ut.hasInit&&(ut.hasInit=!0,this.registerEvents())}static init(e={}){return super.init(this,e,ut.SELECTOR.default)}static getInstance(e){return T.getData(e,ut.DATA_KEY)}isNodeElement(e){return e&&e.nodeType===Node.ELEMENT_NODE}createFocusElements(){function e(e){const t=document.createElement("div");return t.setAttribute("tabindex","0"),t.setAttribute("aria-hidden","true"),t.setAttribute("data-trap-anchor",""),t.addEventListener("focusin",e),t}return{leadingFocusTrap:e((()=>{const e=this.element.querySelector(dt.join(","));e?.focus()})),trailingFocusTrap:e((()=>{const e=Array.from(this.element.querySelectorAll(dt.join(","))).at(-1);e?.focus()}))}}addFocusTrapElements(){this.element.prepend(this.leadingFocusTrapAnchorElement),this.element.append(this.trailingFocusTrapAnchorElement)}removeFocusTrapElements(){this.element.removeChild(this.trailingFocusTrapAnchorElement),this.element.removeChild(this.leadingFocusTrapAnchorElement)}hideModal(){this.element&&(this.element.classList.remove(ut.CLASSNAME.visible),this.element.setAttribute("aria-hidden","true"),this.element.removeAttribute("aria-modal"),this.isTransitioning=!1,this.showBackdrop(),this.removeFocusTrapElements(),I.trigger(this.element,ut.EVENT.hidden))}removeBackdrop(){this.backdrop&&(this.backdrop.parentNode.removeChild(this.backdrop),this.backdrop=null)}setEscapeEvent(){this.isShown?I.on(this.element,ut.EVENT.keydownDismiss,(e=>{e.which===ut.ESCAPE_KEYCODE&&this.hide(e,"keyboard")})):I.off(this.element,ut.EVENT.keydownDismiss)}showBackdrop(e){if(!this.element)return;const t=this.element.classList.contains(ut.CLASSNAME.fade)?ut.CLASSNAME.fade:"";if(this.isShown){if(this.backdrop=document.createElement("div"),this.backdrop.className=ut.CLASSNAME.backdrop,this.shouldFitViewportArea&&this.backdrop.classList.add(ut.CLASSNAME.backdropFitViewport),t&&this.backdrop.classList.add(t),this.targetedParentElement?.appendChild(this.backdrop),I.on(this.element,ut.EVENT.clickDismiss,(e=>{this.ignoreBackdropClick?this.ignoreBackdropClick=!1:e.target===e.currentTarget&&this.hide(null,"backdrop")})),t&&M.reflow(this.backdrop),this.backdrop.classList.add(ut.CLASSNAME.show),!e)return;if(!t)return void e();const n=M.getTransitionDurationFromElement(this.backdrop);I.one(this.backdrop,M.TRANSITION_END,e),M.emulateTransitionEnd(this.backdrop,n)}else if(!this.isShown&&this.backdrop){this.backdrop.classList.remove(ut.CLASSNAME.show);const t=()=>{this.removeBackdrop(),e&&e()};if(this.element.classList.contains(ut.CLASSNAME.fade)){const e=M.getTransitionDurationFromElement(this.backdrop);I.one(this.backdrop,M.TRANSITION_END,t),M.emulateTransitionEnd(this.backdrop,e)}else t()}else e&&e()}showElement(){if(!this.element)return;I.trigger(this.element,ut.EVENT.show);const e=this.element.classList.contains(ut.CLASSNAME.fade);this.element.classList.add(ut.CLASSNAME.visible),this.element.removeAttribute("aria-hidden"),this.element.scrollTop=0,e&&M.reflow(this.element),this.element.classList.add(ut.CLASSNAME.show),document.activeElement&&(this.triggerElement=document.activeElement),this.addFocusTrapElements(),this.element.setAttribute("aria-modal","true");const t=()=>{const e=this.element.querySelector(dt.join(","));e?.focus(),this.isTransitioning=!1,I.trigger(this.element,ut.EVENT.shown)};if(e){const e=M.getTransitionDurationFromElement(this.dialog);I.one(this.dialog,M.TRANSITION_END,t),M.emulateTransitionEnd(this.dialog,e)}else t()}dispose(){this.removeBackdrop(),T.removeData(this.element,ut.DATA_KEY),I.off(document,ut.EVENT.focusin),this.element=null,this.dialog=null,this.backdrop=null,this.isShown=null,this.ignoreBackdropClick=null,this.isTransitioning=null}hide(e,t){if(e&&e.preventDefault(),!this.isShown||this.isTransitioning||!this.element)return;if(!this.shouldManageOpeningState&&t)return void I.trigger(this.element,ut.EVENT.beforehide,{source:t});I.trigger(this.element,ut.EVENT.hide),this.isShown=!1;const n=this.element.classList.contains(ut.CLASSNAME.fade);if(n&&(this.isTransitioning=!0),this.setEscapeEvent(),I.off(document,ut.EVENT.focusin),this.element.classList.remove(ut.CLASSNAME.show),I.off(this.element,ut.EVENT.clickDismiss),I.off(this.dialog,ut.EVENT.mousedownDismiss),n){const e=M.getTransitionDurationFromElement(this.element);I.one(this.element,M.TRANSITION_END,(()=>this.hideModal())),M.emulateTransitionEnd(this.element,e)}else this.hideModal();this.triggerElement&&this.triggerElement?.focus()}show(){this.isShown||this.isTransitioning||!this.element||(this.element.classList.contains(ut.CLASSNAME.fade)&&(this.isTransitioning=!0),this.isShown=!0,this.setEscapeEvent(),I.on(this.element,ut.EVENT.clickDismiss,ut.SELECTOR.dataDismiss,(e=>this.hide(e,"button"))),I.on(this.dialog,ut.EVENT.mousedownDismiss,(()=>{I.one(this.element,ut.EVENT.mouseupDismiss,(e=>{e.target.isEqualNode(this.element)&&(this.ignoreBackdropClick=!0)}))})),this.showBackdrop((()=>this.showElement())))}toggle(){this.isShown?this.hide():this.show()}registerEvents(){I.on(document,ut.EVENT.clickDataApi,ut.SELECTOR.dataToggle,(e=>{let t;const n=e.currentTarget;let i=e.target;i.getAttribute(ut.SELECTOR.dataAttributeToggleName)!==ut.SELECTOR.dataAttributeToggleValue&&(i=i.closest(ut.SELECTOR.dataToggle));const s=M.getSelectorFromElement(i);s&&(t=document.querySelector(s)),"A"!==n.tagName&&"AREA"!==n.tagName||e.preventDefault();const a=ut.getInstance(t);a&&a.toggle()}))}}class mt extends B{static NAME="collapseSearchBar";static DATA_KEY=`${S.KEY_PREFIX}.${mt.NAME}`;static SELECTOR={default:`.${S.KEY_PREFIX}-navbar__search`,formGroup:B.SELECTOR.formGroup,anyInput:"input, select, textarea",target:"data-target"};static DEFAULT_OPTIONS={njFormGroup:{required:!1}};constructor(e,t={}){super(mt,e,j.extend(!0,mt.DEFAULT_OPTIONS,t)),this.triggerElement=this.element.parentElement.querySelector(`[data-toggle="collapse"][${mt.SELECTOR.target}="#${this.element.id}"]`)||this.element.parentElement.querySelector(`[data-toggle="collapse"][href="#${this.element.id}"]`);const n=this.element.querySelector(`[data-dismiss="#${this.element.id}"]`);n&&n.addEventListener("click",this.dismissHandler.bind(this)),V.assert(e,!this.triggerElement,`Cannot find collapse trigger for ${V.describe(e)}`),V.assert(e,!this.element.classList.contains($.CLASS_NAME.collapse),`${V.describe(e)} is expected to have the '${$.CLASS_NAME.collapse}' class. It is being targeted by ${V.describe(e)}`),this.input=this.element.querySelector(mt.SELECTOR.anyInput),this.input&&(I.on(this.element,`${C.shown}.${$.DATA_KEY}`,(()=>{this.input.focus()})),I.on(this.input,"blur",(e=>{this.dismissHandler(e)})))}getElement(){return this.element}dispose(){T.removeData(this.element,mt.DATA_KEY),this.element=null}static init(e={}){return super.init(this,e,mt.SELECTOR.default)}static getInstance(e){return T.getData(e,mt.DATA_KEY)||$.getInstance(e)}dismissHandler(e){e.preventDefault(),(e.target.closest(`[data-dismiss="#${this.element.id}"]`)||e.target.closest(`[href="#${this.element.id}"]`))&&I.trigger(this.triggerElement,C.click)}}class ht extends y{static NAME=`${S.KEY_PREFIX}-navbar`;static DATA_KEY=`${S.KEY_PREFIX}.navbar`;static CLASS_NAME={shownCollapse:`${ht.NAME}--shown-collapse`};static SELECTOR={default:`.${ht.NAME}`};constructor(e){super(ht,e),this.collapseSearchBarInstances=mt.init(),this.registerEvents()}dispose(){this.collapseSearchBarInstances.length>0&&this.collapseSearchBarInstances.forEach((e=>{e.getElement()===this.element.querySelector(mt.SELECTOR.default)&&e.dispose()})),T.removeData(this.element,ht.DATA_KEY),this.element=null}handleCollapseShow(){this.element.classList.add(ht.CLASS_NAME.shownCollapse)}handleCollapseHide(){this.element.classList.remove(ht.CLASS_NAME.shownCollapse)}static getInstance(e){return T.getData(e,ht.DATA_KEY)}static init(e={}){return super.init(this,e,ht.SELECTOR.default)}registerEvents(){I.on(this.element,$.EVENT.show,(()=>{this.handleCollapseShow()})),I.on(this.element,$.EVENT.hidden,(()=>{this.handleCollapseHide()}))}}class pt extends y{static NAME=`${S.KEY_PREFIX}-form-item--password`;static DATA_KEY=`${S.KEY_PREFIX}.password-input`;static SELECTOR={default:`.${pt.NAME}`};static INPUT_CLASS=`${S.KEY_PREFIX}-form-item__field`;static TOGGLE_BTN_CLASS=`${S.KEY_PREFIX}-form-item__password-button`;static NOTICE_CLASS=`${S.KEY_PREFIX}-form-item__password-notice`;static VISIBILITY_CLASS=`${S.KEY_PREFIX}-form-item--visible`;static DEFAULT_OPTIONS={selector:pt.SELECTOR};constructor(e,t={}){super(pt,e,j.extend(!0,pt.DEFAULT_OPTIONS,t)),this.setListeners(),T.setData(e,pt.DATA_KEY,this)}static init(e={}){return super.init(this,e,pt.SELECTOR.default)}static getInstance(e){return T.getData(e,pt.DATA_KEY)}dispose(){T.removeData(this.element,pt.DATA_KEY),this.element=null}setListeners(){if(!this.element)return;const e=this.element.getElementsByClassName(pt.INPUT_CLASS)[0],t=this.element.getElementsByClassName(pt.TOGGLE_BTN_CLASS)[0],n=t.querySelector("span"),i=this.element.getElementsByClassName(pt.NOTICE_CLASS)[0],s=n.getAttribute("data-password-button-label-show"),a=n.getAttribute("data-password-button-label-hide"),r=i.getAttribute("data-password-notice-is-visible"),o=i.getAttribute("data-password-notice-is-hidden");s&&a&&r&&o||console.warn("[FLUID] Some of these required attributes are missing: [data-password-button-label-show], [data-password-button-label-hide], [data-password-notice-is-visible], [data-password-notice-is-hidden]"),n.innerHTML=s,this.element.classList.contains(pt.VISIBILITY_CLASS)&&(e.type="text",t.setAttribute("aria-pressed","false"),n.innerHTML=a,i.innerHTML=r),t?I.on(t,"click keydown",(l=>{"keydown"===l.type&&"key"in l&&"Enter"!==l.key&&" "!==l.key||(l.preventDefault(),"text"===e.type?(e.type="password",this.element.classList.remove(pt.VISIBILITY_CLASS),t.setAttribute("aria-pressed","false"),n.innerHTML=s,i.innerHTML=o):"password"===e.type&&(e.type="text",this.element.classList.add(pt.VISIBILITY_CLASS),t.setAttribute("aria-pressed","true"),n.innerHTML=a,i.innerHTML=r))})):console.warn("Toggle password icon not found")}}class ft extends y{static NAME=`${S.KEY_PREFIX}-search`;static DATA_KEY=`${S.KEY_PREFIX}.search`;static EVENT_KEY=`.${ft.DATA_KEY}`;static SELECTOR={default:`.${ft.NAME}`,field:`.${ft.NAME}__field`,clearButton:`.${ft.NAME}__clear-button`};constructor(e){super(ft,e),T.setData(e,ft.DATA_KEY,this),this.root=e,this.field=e.querySelector(ft.SELECTOR.field),this.clearButton=e.querySelector(ft.SELECTOR.clearButton),this.toggleClearButtonIfNeeded(),this.toggleInertAttribute(),this.setListeners()}static init(e={}){return super.init(this,e,ft.SELECTOR.default)}dispose(){I.off(this.clearButton,"click"),I.off(this.field,"input"),T.removeData(this.element,ft.DATA_KEY),this.element=null}static getInstance(e){return T.getData(e,ft.DATA_KEY)}setListeners(){I.on(this.clearButton,"click",(()=>{this.field.value=null,this.toggleClearButtonIfNeeded(),this.field.focus()})),I.on(this.field,"input",(()=>{this.toggleClearButtonIfNeeded()}))}toggleClearButtonIfNeeded(){const e=`${ft.NAME}__clear-button--hidden`;this.field.value&&0!==this.field.value.length?this.clearButton.classList.remove(e):this.clearButton.classList.add(e)}toggleInertAttribute(){this.root.inert=this.root.classList.contains(`${ft.NAME}--disabled`)||!0===this.field.disabled}}class Et extends y{static NAME=`${S.KEY_PREFIX}-segmented-control`;static DATA_KEY=`${S.KEY_PREFIX}.segmented-control`;static EVENT_KEY=`.${Et.DATA_KEY}`;static CLASS_NAME={component:`.${Et.NAME}`,button:`.${Et.NAME}-btn`,buttonSelected:`${Et.NAME}-btn--selected`};static SELECTOR={default:`.${Et.NAME}`};static EVENT={onchange:`${C.onchange}${Et.EVENT_KEY}`};constructor(e,t={}){super(Et,e,t),this.element=e,T.setData(e,Et.DATA_KEY,this),this.buttons=e.querySelectorAll(Et.CLASS_NAME.button),this.value=this.element.getAttribute("data-value"),setTimeout((()=>{this.buttons.forEach(((e,t)=>{const n=e.getAttribute("data-value");this.value&&this.value===n&&this.select(t),e.addEventListener("click",(()=>this.select(t)))}))}),100)}select=e=>{this.buttons.forEach(((t,n)=>{t&&(e===n?(t.classList.add(Et.CLASS_NAME.buttonSelected),this.value=t.getAttribute("data-value"),I.trigger(this.element,Et.EVENT.onchange,{value:this.value}),this.element.setAttribute("data-value",this.value),t.setAttribute("aria-pressed","true"),setTimeout((()=>{this.computeSelectedTransition(t)}))):(t.classList.remove(Et.CLASS_NAME.buttonSelected),t.setAttribute("aria-pressed","false")))}))};computeSelectedTransition=e=>{const t=e.getBoundingClientRect();if(this.element){const e=this.element.getBoundingClientRect(),n=this.element.style;n.setProperty("--nj-sc-btn-selected-width",`${t.width}px`),n.setProperty("--nj-sc-btn-selected-right",e.right-t.right+"px")}};dispose(){this.buttons.forEach(((e,t)=>{e.removeEventListener("click",(()=>this.select(t)))})),T.removeData(this.element,Et.DATA_KEY)}static getInstance(e){return T.getData(e,Et.DATA_KEY)}static init(e={}){return super.init(this,e,Et.SELECTOR.default)}}class gt extends H{static NAME=`${S.KEY_PREFIX}-select`;static DATA_KEY=`${S.KEY_PREFIX}.select`;static SELECTOR={default:"select.nj-form-control",formGroup:H.SELECTOR.formGroup};static DEFAULT_OPTIONS={requiredClasses:["form-control||custom-select"]};constructor(e,t={}){super(gt,e,j.extend(!0,gt.DEFAULT_OPTIONS,t)),this.addIsFilled(),T.setData(e,gt.DATA_KEY,this)}dispose(){T.removeData(this.element,gt.DATA_KEY),this.element=null}static init(e={}){return super.init(this,e,gt.SELECTOR.default)}static getInstance(e){return T.getData(e,gt.DATA_KEY)}static matches(e){return"SELECT"===e.tagName}}class bt extends y{static NAME=`${S.KEY_PREFIX}-form-item--custom-list`;static DATA_KEY=`${S.KEY_PREFIX}.custom-list`;static EVENT_KEY=`.${bt.DATA_KEY}`;static ESCAPE_KEYCODE=27;static ENTER_KEYCODE=13;static UP_KEYCODE=38;static DOWN_KEYCODE=40;static CLASS_NAME={isOpen:`${S.KEY_PREFIX}-form-item--open`};static ATTRIBUTE={value:"data-value"};static SELECTOR={default:`.${bt.NAME}`,label:`.${S.KEY_PREFIX}-form-item__label`,button:`.${S.KEY_PREFIX}-form-item__custom-list-button`,input:`.${S.KEY_PREFIX}-form-item__field`,options:`.${S.KEY_PREFIX}-form-item__list`,option:`.${S.KEY_PREFIX}-list-deprecated__item`};static EVENT={onchange:`${C.onchange}${bt.EVENT_KEY}`,open:`${C.show}${bt.EVENT_KEY}`,close:`${C.hide}${bt.EVENT_KEY}`};static getInstance(e){return T.getData(e,bt.DATA_KEY)}static init(e={}){return super.init(this,e,bt.SELECTOR.default)}constructor(e){super(bt,e),T.setData(e,bt.DATA_KEY,this),this.buttonEl=this.element.querySelector(bt.SELECTOR.button),this.labelEl=this.element.querySelector(bt.SELECTOR.label),this.listEl=this.element.querySelector(bt.SELECTOR.options),this.inputEl=this.element.querySelector(bt.SELECTOR.input),this.optionElements=Array.from(this.element.querySelectorAll(bt.SELECTOR.option)),this.addToggleEvent(),this.addEscapeEvent(),this.addBlurEvent(),this.addUpDownEvent(),this.addClickEvent(),this.addShortcutEvents()}updateOptionsAndListeners(){this.optionElements=Array.from(this.element.querySelectorAll(bt.SELECTOR.option)),this.addClickEvent()}get isOpen(){return!this.listEl.hasAttribute("hidden")}set isOpen(e){e?(this.listEl.removeAttribute("hidden"),this.buttonEl.setAttribute("aria-expanded","true"),this.buttonEl.setAttribute("tabindex","-1"),this.element.classList.add(bt.CLASS_NAME.isOpen),this.listEl.focus(),this.focusedIndex=this.selectedIndex,-1===this.focusedIndex&&this.listEl.scrollTo({top:0}),this.optionElements.forEach(((e,t)=>{const n="nj-list-deprecated__item--active";t===this.focusedIndex?e.classList.add(n):e.classList.remove(n)})),I.trigger(this.element,bt.EVENT.open)):(this.listEl.setAttribute("hidden","hidden"),this.buttonEl.setAttribute("aria-expanded","false"),this.buttonEl.removeAttribute("tabindex"),this.element.classList.remove(bt.CLASS_NAME.isOpen),this.focusedIndex=-1,I.trigger(this.element,bt.EVENT.close))}get selectedIndex(){return this.optionElements.findIndex((e=>"true"===e.getAttribute("aria-selected")))}set selectedIndex(e){this.optionElements.forEach(((t,n)=>{t.setAttribute("aria-selected",String(n===e))})),this.inputEl.value=this.selectedOptionLabel,this.buttonEl.setAttribute("aria-label",`${this.labelEl.textContent} - ${this.selectedOptionLabel}`),I.trigger(this.element,bt.EVENT.onchange,{value:this.selectedOptionLabel,option:this.optionElements[e]})}get focusedIndex(){return this.optionElements.findIndex((e=>document.activeElement===e))}set focusedIndex(e){-1!==e&&this.optionElements[e].focus()}get selectedOptionLabel(){return-1!==this.selectedIndex?this.optionElements[this.selectedIndex].textContent:""}get selectedOptionValue(){if(-1!==this.selectedIndex){const e=this.optionElements[this.selectedIndex];return e.getAttribute(bt.ATTRIBUTE.value)??e.textContent}return""}dispose(){T.removeData(this.element,bt.DATA_KEY),this.element=null}addToggleEvent(){I.on(this.buttonEl,C.click,(()=>{this.isOpen=!this.isOpen}))}addEscapeEvent(){I.on(this.listEl,C.keydown,(e=>{e.keyCode===bt.ESCAPE_KEYCODE&&(this.isOpen=!1,this.buttonEl.focus())}))}addBlurEvent(){I.on(this.element,C.focusout,(e=>{this.element.contains(e.relatedTarget)||(this.isOpen=!1)}))}addUpDownEvent(){I.on(this.listEl,C.keydown,(e=>{e.keyCode===bt.UP_KEYCODE&&(e.preventDefault(),this.focusedIndex=Math.max(0,this.focusedIndex-1)),e.keyCode===bt.DOWN_KEYCODE&&(e.preventDefault(),this.focusedIndex=Math.min(this.optionElements.length-1,this.focusedIndex+1))}))}addClickEvent(){this.optionElements.forEach(((e,t)=>{I.on(e,C.click,(()=>{this.selectedIndex=t,this.isOpen=!1,this.buttonEl.focus()})),I.on(e,C.keydown,(e=>{e.keyCode===bt.ENTER_KEYCODE&&(e.preventDefault(),this.selectedIndex=this.focusedIndex,this.isOpen=!1,this.buttonEl.focus())}))}))}addShortcutEvents(){const e=/^[\d\p{Letter}]$/u;I.on(this.listEl,C.keydown,(t=>{if(e.test(t.key)){const e=this.optionElements.findIndex((e=>e.textContent[0].toLowerCase()===t.key.toLowerCase()));-1!==e&&(this.focusedIndex=e)}}))}}class _t extends y{static NAME=`${S.KEY_PREFIX}-sidebar`;static DATA_KEY=`${S.KEY_PREFIX}.sidebar`;static EVENT_KEY=`.${_t.DATA_KEY}`;static DATA_API_KEY=S.KEY_PREFIX;static hasInit=!1;static CLASS_NAME={folding:`${S.KEY_PREFIX}-sidebar--folding`,folded:`${S.KEY_PREFIX}-sidebar--folded`};static EVENT={show:`${C.show}${_t.EVENT_KEY}`,shown:`${C.shown}${_t.EVENT_KEY}`,hide:`${C.hide}${_t.EVENT_KEY}`,hidden:`${C.hidden}${_t.EVENT_KEY}`,clickDataApi:`${C.click}${_t.EVENT_KEY}${_t.DATA_API_KEY}`};static DEFAULT_OPTIONS={folded:!1};static DEFAULT_TYPE={folded:"boolean"};static SELECTOR={default:`.${_t.NAME}`,actives:`.${_t.CLASS_NAME.folding}, .${_t.NAME}`,dataToggle:'[data-toggle="sidebar"]'};constructor(e,t={}){super(_t,e,_t.getOptions(t)),this.element=e,this.isTransitioning=!1,this.triggerArray=M.makeArray(document.querySelectorAll(`${_t.SELECTOR.dataToggle}[href="#${e.id}"],${_t.SELECTOR.dataToggle}[data-target="#${e.id}"]`));const n=M.makeArray(document.querySelectorAll(_t.SELECTOR.dataToggle));for(let t=0,i=n.length;tt===e));null!==s&&a.length&&(this.selector=s,this.triggerArray.push(i))}T.setData(e,_t.DATA_KEY,this),this.options.toggle&&this.toggle(),T.setData(e,_t.DATA_KEY,this),_t.hasInit||(_t.hasInit=!0,this.registerEvents()),"true"!==e.dataset.closeOnInteractOut&&e.dataset.closeOnInteractOut||(document.addEventListener("click",this.closeOnInteractOut),document.addEventListener("keydown",this.closeOnInteractOut))}toggle(){this.element.classList.contains(_t.CLASS_NAME.folded)?this.close():this.open()}open(){if(this.isTransitioning||this.element.classList.contains(_t.CLASS_NAME.folded))return;if(document.querySelector(this.selector),I.trigger(this.element,_t.EVENT.show).defaultPrevented)return;this.element.classList.remove(_t.CLASS_NAME.folded),this.element.classList.add(_t.CLASS_NAME.folding),this.triggerArray.length&&this.triggerArray.forEach((e=>{e.classList.remove(_t.CLASS_NAME.folded),e.setAttribute("aria-folded","true")})),this.setTransitioning(!0);const e=M.getTransitionDurationFromElement(this.element);I.one(this.element,M.TRANSITION_END,(()=>{this.element.classList.remove(_t.CLASS_NAME.folding),this.element.classList.add(_t.CLASS_NAME.folded),this.element.parentElement&&this.element.parentElement.tagName.toLowerCase()===_t.NAME&&this.element.parentElement.setAttribute("folded",""),this.setTransitioning(!1),I.trigger(this.element,_t.EVENT.shown)})),M.emulateTransitionEnd(this.element,e)}close(){if(this.isTransitioning||!this.element.classList.contains(_t.CLASS_NAME.folded))return;if(I.trigger(this.element,_t.EVENT.hide).defaultPrevented)return;M.reflow(this.element),this.element.classList.add(_t.CLASS_NAME.folding),this.element.classList.remove(_t.CLASS_NAME.folded);const e=this.triggerArray.length;if(e>0)for(let t=0;t{this.element.parentElement&&this.element.parentElement.tagName.toLowerCase()===_t.NAME&&this.element.parentElement.removeAttribute("folded"),this.setTransitioning(!1),this.element.classList.remove(_t.CLASS_NAME.folding),I.trigger(this.element,_t.EVENT.hidden)})),M.emulateTransitionEnd(this.element,t)}setTransitioning(e){this.isTransitioning=e}closeOnInteractOut=e=>{e.key&&"Escape"!==e.key||!e.key&&e.target.closest(_t.SELECTOR.default)||this.open()};dispose(){document.removeEventListener("click",this.closeOnInteractOut),document.removeEventListener("keydown",this.closeOnInteractOut),I.off(document,_t.EVENT.clickDataApi,_t.SELECTOR.dataToggle),T.removeData(this.element,_t.DATA_KEY),this.options=null,this.element=null,this.triggerArray=null,this.isTransitioning=null}addAriaAndExpandedClass(e,t){if(e){const n=e.classList.contains(_t.CLASS_NAME.folded);t.length&&t.forEach((e=>{n?e.classList.remove(_t.CLASS_NAME.folded):e.classList.add(_t.CLASS_NAME.folded),e.setAttribute("aria-folded",n)}))}}static getOptions(e){return(e={..._t.DEFAULT_OPTIONS,...e}).toggle=Boolean(e.toggle),M.typeCheckConfig(_t.NAME,e,_t.DEFAULT_TYPE),e}static getTargetFromElement(e){const t=M.getSelectorFromElement(e);return t?document.querySelector(t):null}static expandInterface(e,t){let n=T.getData(e,_t.DATA_KEY);const i={..._t.DEFAULT_OPTIONS,...j.getDataAttributes(e),..."object"==typeof t&&t?t:{}};if(!n&&i.toggle&&/show|hide/.test(t)&&(i.toggle=!1),n||(n=new _t(e,i)),"string"==typeof t){if(void 0===n[t])throw new Error(`No method named "${t}"`);n[t]()}}static getInstance(e){return T.getData(e,_t.DATA_KEY)}static init(e={}){return super.init(this,e,_t.SELECTOR.default)}registerEvents(){I.on(document,_t.EVENT.clickDataApi,_t.SELECTOR.dataToggle,(function(e){"A"===e.target.tagName&&e.preventDefault();const t=j.getDataAttributes(this),n=M.getSelectorFromElement(this);M.makeArray(document.querySelectorAll(n)).forEach((e=>{const n=_t.getInstance(e)?"toggle":t;_t.expandInterface(e,n)}))}))}}const vt={hasArrow:!0,isColorInverse:!1,placement:"top",isContentHtml:!1},Nt="nj-tooltip",At={withoutArrow:"nj-tooltip--without-arrow",inverse:"nj-tooltip--inverse",placed:e=>`nj-tooltip--${e}`},Tt="nj-tooltip__arrow",yt={center:"nj-tooltip__arrow--center"},St="nj-tooltip__inner";class Lt{_isDisplayed=!1;constructor(e,t,n){this.anchorElement=e,this.anchorParentElement=e.parentElement,this.createTooltipElement(),Object.defineProperty(this.anchorElement,"_njTooltip",{value:this,writable:!0});const i=t??e.dataset.tooltipContent;this.options=Object.assign({},vt,n??{},e.dataset?this.getOptionsFromDataset(e.dataset):{}),this.updateTooltipModifiers(this.options),this.setContent(i,this.options.isContentHtml),"string"==typeof e.dataset?.tooltipAlways&&this.show()}createTooltipElement(){const e=document.createElement("div");e.className=Nt,e.role="tooltip",e.id=M.getUID("tooltip-");const t=document.createElement("div");t.className=`${Tt} ${yt.center}`,t.ariaHidden="true";const n=document.createElement("div");n.className=St,e.appendChild(t),e.appendChild(n),this.tooltipElement=e,this.arrowElement=t,this.innerElement=n}getOptionsFromDataset(e){const t={};return"string"==typeof e.tooltipArrow&&(t.hasArrow="true"===e.tooltipArrow),"string"==typeof e.tooltipInverse&&(t.isColorInverse="true"===e.tooltipInverse),"string"==typeof e.tooltipPlacement&&(t.placement=e.tooltipPlacement),"string"==typeof e.tooltipHtml&&(t.isContentHtml="true"===e.tooltipHtml),t}updateTooltipModifiers(e){"boolean"==typeof e.hasArrow&&(e.hasArrow?this.tooltipElement.classList.remove(At.withoutArrow):this.tooltipElement.classList.add(At.withoutArrow)),"boolean"==typeof e.isColorInverse&&(e.isColorInverse?this.tooltipElement.classList.add(At.inverse):this.tooltipElement.classList.remove(At.inverse)),"string"==typeof e.placement&&(this.tooltipElement.classList.remove(At.placed("top")),this.tooltipElement.classList.remove(At.placed("right")),this.tooltipElement.classList.remove(At.placed("bottom")),this.tooltipElement.classList.remove(At.placed("left")),this.tooltipElement.classList.add(At.placed(e.placement)))}show(){this._isDisplayed||(this.anchorParentElement.appendChild(this.tooltipElement),this.anchorElement.setAttribute("aria-describedby",this.tooltipElement.id),this._isDisplayed=!0,this.cleanupFunction=nt(this.anchorElement,this.tooltipElement,(()=>{ot(this.anchorElement,this.tooltipElement,{placement:this.options.placement,middleware:[st(),this.options.hasArrow&&rt({element:this.arrowElement})]}).then((({x:e,y:t,placement:n})=>{Object.assign(this.tooltipElement.style,{left:`${e}px`,top:`${t}px`}),this.updateTooltipModifiers({placement:n})}))})))}hide(){this._isDisplayed&&(this.cleanupFunction?.(),this.cleanupFunction=null,this.anchorElement.parentElement?.removeChild(this.tooltipElement),this.anchorElement.removeAttribute("aria-describedby"),this._isDisplayed=!1)}setContent(e,t=vt.isContentHtml){"string"==typeof e?t?this.innerElement.innerHTML=e:this.innerElement.innerText=e:this.innerElement.appendChild(e)}updateOptions(e){this.options={...this.options,...e},this.updateTooltipModifiers(this.options)}}const Ct=(e,t,n)=>new Lt(e,t,n),wt=(e,t='[data-toggle="tooltip"]')=>{const n=e??document.body,i=[],s=[];return n.querySelectorAll(t).forEach((e=>{const t=e,n=Ct(t);"true"!==t.dataset.tooltipAlways&&s.push(xt(n)),i.push(n)})),{tooltips:i,unmount:()=>{s.forEach((e=>e()))}}},xt=(e,t)=>{const n=new AbortController,{signal:i}=n,s=t??e.anchorElement;return s.addEventListener("focusin",(()=>{e.show()}),{signal:i}),s.addEventListener("mouseenter",(()=>{e.show()}),{signal:i}),s.addEventListener("focusout",(()=>{e.hide()}),{signal:i}),s.addEventListener("mouseleave",(()=>{e.hide()}),{signal:i}),()=>{e.hide(),n.abort()}};class Rt extends y{static NAME=`${S.KEY_PREFIX}-slider`;static DATA_KEY=`${S.KEY_PREFIX}.slider`;static CLASS_NAME=`${S.KEY_PREFIX}-slider`;static SELECTOR={default:`.${Rt.CLASS_NAME}`,input:"input",label:"label"};static THUMB_WIDTH=16;static DEFAULT_TYPE={tooltip:"boolean"};static DEFAULT_OPTIONS={tooltip:!1};static PERCENT_CONV=100;static PSEUDO_ELEMS=["webkit-slider-runnable","moz-range","ms"];dataId=Number(String(Math.random()).slice(2))+Date.now();currentProgress=0;constructor(e,t={}){if(super(Rt,e,Rt.getOptions(e,t)),this.input=this.element.querySelector(Rt.SELECTOR.input),this.element.setAttribute("data-id",this.dataId.toString()),this.refreshProgressValue(),this.setListeners(),this.options.tooltip){const e=document.createElement("div");e.className="nj-slider__tooltip-anchor",this.element.appendChild(e);const t={parentElement:this.element,setAttribute:(e,t)=>{this.input.setAttribute(e,t)},removeAttribute:e=>{this.input.removeAttribute(e)},contextElement:e,getBoundingClientRect:()=>{const{x:e,y:t,width:n,height:i,top:s,left:a,right:r,bottom:o}=this.input.getBoundingClientRect(),l=this.currentProgress*(-1*Rt.THUMB_WIDTH);return{x:n*this.currentProgress+l+e,y:t,width:Rt.THUMB_WIDTH,height:i,top:s,left:n*this.currentProgress+l+a,right:r,bottom:o}}};this.tooltip=Ct(t,this.input.value,{hasArrow:!1,placement:"top"}),this.tooltip.show(),this.setTooltipListeners()}T.setData(e,Rt.DATA_KEY,this)}setListeners(){I.on(this.element,"input change keyup",(()=>{this.refreshProgressValue()}))}setTooltipListeners(){I.on(this.element,"input change keyup",(()=>{this.refreshTooltipValue()}));let e=!1;I.on(document,"resize",(()=>{e||(this.refreshTooltipValue(),e=!0,setTimeout((()=>{e=!1}),100))}))}refreshProgressValue(){const e=document.querySelector(`[data-id='${this.dataId}']`);if(e){const t=parseFloat(this.input.max)||Rt.PERCENT_CONV,n=parseFloat(this.input.min)||0,i=parseFloat(this.input.value);this.currentProgress=(i-n)/(t-n);const s=Rt.PERCENT_CONV*this.currentProgress;e.style.setProperty("--nj-slider-track-position",`${s}% 100%`),e.style.setProperty("--nj-slider-anchor-left",`calc(${s}% + ${this.currentProgress} * -20px + 10px)`)}}refreshTooltipValue(){this.tooltip.setContent(this.input.value)}static getOptions(e,t={}){return t={...Rt.DEFAULT_OPTIONS,...j.getDataAttributes(e),..."object"==typeof t&&t?t:{}},M.typeCheckConfig(Rt.NAME,t,Rt.DEFAULT_TYPE),t}dispose(){this.tooltip?.hide(),I.off(this.element,"input change keyup"),I.off(document,"resize"),T.removeData(this.element,Rt.DATA_KEY),this.element=null}static getInstance(e){return T.getData(e,Rt.DATA_KEY)}static init(e={}){return super.init(this,e,Rt.SELECTOR.default)}}class It extends y{static NAME=`${S.KEY_PREFIX}-tab`;static DATA_KEY=`${S.KEY_PREFIX}.tab`;static CLASS_NAME={component:`.${It.NAME}`,tabItem:`.${It.NAME}__item`,tabContent:`.${It.NAME}__content`,itemActive:`${It.NAME}__item--active`,contentActive:`${It.NAME}__content--active`};static SELECTOR={default:`.${It.NAME}`};currentIndex=null;constructor(e){super(It,e),this.element=e,T.setData(e,It.DATA_KEY,this),this.tabs=e.querySelectorAll(It.CLASS_NAME.tabItem),this.tabs.forEach(((e,t)=>{e.addEventListener("click",this.show),e.classList.contains(It.CLASS_NAME.itemActive)&&(this.currentIndex=t),e.addEventListener("keydown",this.onKeyDown)}))}show=e=>{const t=e.currentTarget;t.getAttribute("disabled")||(this.tabs.forEach(((e,n)=>{e===t&&(this.currentIndex=n),e.classList.remove(It.CLASS_NAME.itemActive),e.setAttribute("tabindex","-1"),e.setAttribute("aria-selected","false"),this.element.querySelectorAll(It.CLASS_NAME.tabContent)[n].classList.remove(It.CLASS_NAME.contentActive)})),t.classList.add(It.CLASS_NAME.itemActive),t.setAttribute("tabindex","0"),t.setAttribute("aria-selected","true"),this.element.querySelectorAll(It.CLASS_NAME.tabContent).length>this.currentIndex&&this.element.querySelectorAll(It.CLASS_NAME.tabContent)[this.currentIndex].classList.add(It.CLASS_NAME.contentActive))};focusNextFocusableTab(){const e=Array.from(this.tabs).filter((e=>!e.hasAttribute("disabled"))),t=e.findIndex((e=>document.activeElement===e));e.at((t+1)%e.length).focus()}focusPreviousFocusableTab(){const e=Array.from(this.tabs).filter((e=>!e.hasAttribute("disabled"))),t=e.findIndex((e=>document.activeElement===e));e.at(t-1).focus()}onKeyDown=e=>{switch(e.key){case"ArrowRight":e.preventDefault(),this.focusNextFocusableTab();break;case"ArrowLeft":e.preventDefault(),this.focusPreviousFocusableTab();break;case"Tab":const t=e.target;if("true"!==t.getAttribute("aria-selected"))return;const n=t.getAttribute("aria-controls"),i=this.element.querySelector(`[id=${n}]`);setTimeout((()=>{i.focus()}))}};dispose(){this.tabs.forEach((e=>{e.removeEventListener("click",this.show),e.removeEventListener("keydown",this.onKeyDown)})),T.removeData(this.element,It.DATA_KEY)}static getInstance(e){return T.getData(e,It.DATA_KEY)}static init(e={}){return super.init(this,e,It.SELECTOR.default)}}class kt extends y{static NAME=`${S.KEY_PREFIX}-tag`;static DATA_KEY=`${S.KEY_PREFIX}.tag`;static KEYFRAMES=[{opacity:1},{opacity:0}];static SELECTOR={default:`.${kt.NAME}:not(.disabled)`,close:`.${kt.NAME}__close`};constructor(e,t={}){super(kt,e,j.extend(!0,{},t)),I.on(e,C.click,this.handleClick.bind(this))}closeAndDestroy(){this.element.animate(kt.KEYFRAMES,{duration:200,delay:70,easing:"ease-out"}).onfinish=()=>{this.destroyElement()}}async close(e){this.element.animate(kt.KEYFRAMES,{duration:200,delay:70,easing:"ease-out"}),await new Promise((e=>setTimeout(e,270))),e()}destroyElement(){this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.dispose()}dispose(){T.removeData(this.element,kt.DATA_KEY),I.off(this.element,C.click,this.handleClick.bind(this)),this.element=null}handleClick(e){e.target.closest(kt.SELECTOR.close)&&(e.preventDefault(),this.closeAndDestroy())}static init(e={}){return super.init(this,e,kt.SELECTOR.default)}static getInstance(e){return T.getData(e,kt.DATA_KEY)}static getRootElement(e){return e.closest(kt.SELECTOR.default)}}class Ot{static AUTOINIT_COMPONENTS=[k,O,$,P,F,G,X,W,Z,ft,ut,ht,gt,_t,Rt,It,kt,pt,bt,D,Et];static Accordion=k;static Alert=O;static Collapse=$;static Dropdown=P;static Fab=F;static Form=G;static Header=X;static InlineMessage=W;static InputNumber=Z;static Search=ft;static Modal=ut;static Navbar=ht;static Select=gt;static Sidebar=_t;static Slider=Rt;static Tab=It;static Tag=kt;static njTooltip=Ct;static initAllTooltips=wt;static displayTooltipOnHoverAndFocus=xt;static Tooltip=Lt;static Password=pt;static SelectInput=bt;static AutocompleteInput=D;static openMenu=lt;static AutoInit(){try{for(let e=0,t=Ot.AUTOINIT_COMPONENTS.length;ei=>(e.useEffect((()=>{console.warn("[FLUID] Depreciation, WILL BE REMOVED NEXT VERSION:\n",n)}),[]),e.createElement(t,{...i},"children"in i&&i.children)),jt=Dt((({title:t,paragraph:n,variant:s="primary",iconName:a,iconSize:o="md",hasClose:l=!1,isVisible:c=!0,onClose:d,ariaLabelClose:u})=>{const[m,h]=e.useState(c),p=`nj-alert--${s||"primary"}`,f=e.useRef(null);let E;e.useEffect((()=>{if(l)return f.current&&(O.SELECTOR={default:`.${O.NAME}`,dismiss:`.${O.NAME}__close`},E=f.current,O.init(),O.getInstance(E).closeAndDestroy=()=>{}),()=>{E&&O.getInstance(E).dispose()}}),[l]);return e.createElement(e.Fragment,null,m&&e.createElement("div",{className:i.classNames("nj-alert",p),role:"alert",ref:f},l&&e.createElement("button",{type:"button",className:"nj-alert__close","aria-label":u,onClick:e=>{"function"==typeof d&&d(e),!f||!f.current||e.key&&"Enter"!==e.key||O.getInstance(f.current).close((()=>{h(!1)}))}},e.createElement(r,{name:"close",className:"nj-alert__close-icon",size:"sm"})),!!a&&e.createElement(r,{name:a,className:"nj-alert__icon",size:o}),e.createElement("div",null,e.createElement("span",{className:"nj-alert__title"},t),n)))}),"Alert component is deprecated, please use Toast component instead"),Mt=(()=>{const e={};return{get:t=>(void 0===e[t]&&(e[t]="_"+Math.random().toString(36).substr(2,9)),e[t])}})(),$t=function(e){return Mt.get(e)},Pt=e.forwardRef((({label:t,labelKind:n="static",placeholder:s,searchValue:a,data:o,ariaLabelledBy:l,onSelect:c,minLength:d,isRequired:u,autocomplete:m=!0,enableBrowserAutocomplete:h=!1,limit:p,listHeight:f="24rem",hasClear:E=!1,iconTitle:g,iconName:b,onInputFocus:_,onInputBlur:v,onInputChange:N,disableInput:A=!1,isDisabled:T=!1,className:y},S)=>{const L=e.useRef(null),C=e.useRef(),[w,x]=e.useState(!1),[R,I]=e.useState(!1),[k,O]=e.useState(a||""),D={autocomplete:m,limit:p},j=$t(void 0),M=$t(void 0+"input");let $;e.useEffect((()=>{if(L&&L.current){G.Autocomplete.SELECTOR={default:`.${G.Autocomplete.NAME}`,input:"input",list:`.${G.Autocomplete.NAME}__list`,listGroup:`.${G.Autocomplete.NAME}__list > :first-child`},G.Autocomplete.init();const e=G.Autocomplete.getInstance(L.current);e.data=o,e.list=e.data,e.onUserSelectItem=e=>{O(e.name),c?.(e)},$=L.current}return()=>{$&&G.Autocomplete.getInstance($)&&G.Autocomplete.getInstance($).dispose()}}),[]);const P=()=>{if(O(""),C&&C.current&&(C.current.value="",L&&L.current)){const e=G.Autocomplete.getInstance(L.current);e.data=o,e.list=e.data}"function"==typeof N&&N(null)};e.useEffect((()=>{I(!!k)}),[k]),e.useEffect((()=>{if(L&&L.current){const e=G.Autocomplete.getInstance(L.current);e.data=o,e.list=e.data}}),[o]);const F=i.classNames("nj-form-group","nj-form-input-search","nj-form-group--icon-right","nj-form-group--icon-right",{"is-focused":w,"is-filled":R||k});return e.createElement("div",{className:i.classNames("nj-form-autocomplete",y),"data-options":JSON.stringify(D),role:"combobox","aria-expanded":w,"aria-controls":j,"aria-haspopup":"listbox",ref:L,tabIndex:0},e.createElement("div",{className:F},e.createElement("label",{htmlFor:M,className:`nj-label-${n}`},t),e.createElement("input",{id:M,ref:i.mergeRefs([C,S]),className:"nj-form-control",type:"text",placeholder:s,onFocus:e=>{x(!0),"function"==typeof _&&_(e)},onBlur:e=>{x(!1),"function"==typeof v&&v(e)},"aria-autocomplete":"list","aria-controls":j,value:k,onInput:e=>{O(e.currentTarget.value),"function"==typeof N&&N(e)},minLength:d,required:u,disabled:T,readOnly:A,autoComplete:h?"on":"off"}),R&&E&&b||b&&!E?e.createElement(r,{name:b,onClick:E?P:void 0,onKeyPress:E?e=>{"Enter"===e.key&&P()}:void 0,ariaLabel:g}):"",e.createElement("div",{className:"nj-form-autocomplete__list nj-card",style:f?{maxHeight:f}:void 0},e.createElement("div",{className:"nj-list-deprecated nj-list-deprecated--no-border nj-list-deprecated--sm",role:"listbox",id:j,"aria-labelledby":l},e.createElement("button",{type:"button",className:"nj-list-deprecated__item","data-value":""})))))})),Ft=Dt(Pt,"NJAutocomplete component is deprecated, please use NJAutocompleteInput component instead"),Kt=e.forwardRef((({title:t,href:n,variant:s,hrefTarget:a,hrefRel:o,type:l,ariaPressed:c,ariaDescribedby:d,size:u,className:m,isDisabled:h,onClick:p,label:f,icon:E,children:g},b)=>{l=n?void 0:l||"button";const _=n?"a":"button",v=i.classNames("nj-icon-btn",{[`nj-icon-btn--${u}`]:u&&"xs"!==u,[`nj-icon-btn--${s}`]:s&&"primary"!==s,disabled:h},m);return e.createElement(_,{ref:b,title:t,href:n,target:a,rel:o,className:v,type:l,onClick:p,"aria-pressed":n?void 0:c,"aria-describedby":d,disabled:n?void 0:h},e.createElement("span",{className:"nj-sr-only"},f),g?(()=>{if(!g)return;const t=g,n=i.classNames(t.props.className,"nj-icon-btn__icon");return e.cloneElement(t,{className:n})})():E&&e.createElement(r,{name:E,size:"inherit",className:"nj-icon-btn__icon"}))})),Yt=["value","label","labelKind","className","wrapperClick","passwordButtonLabelShow","passwordButtonLabelHide","passwordNoticeIsVisible","passwordNoticeIsHidden","type","isDisabled","hasError","isRequired","subscriptMessage","iconName","iconClick","iconKeyPress","iconTitle","onChange","isMultiline","children","isSelect","wrapperKeyPress","wrapperKeyDown","iconClassName","labelClassName","size"],Vt=e.forwardRef(((t,n)=>{const{id:s,name:a,value:o,label:l,labelKind:c="static",className:d,onClick:u,onKeyPress:m,wrapperClick:h,title:p,ariaLabel:f,ariaLabelledBy:E,passwordButtonLabelShow:g,passwordButtonLabelHide:b,passwordNoticeIsVisible:_,passwordNoticeIsHidden:v,type:N="text",isDisabled:A,hasError:T,hasSuccess:y,autocomplete:S,isRequired:L,placeholder:C,subscriptMessage:w,iconName:x,iconClick:R,iconKeyPress:I,iconTitle:k,onChange:O,maxLength:D,minLength:j,readOnly:M,form:$,tabIndex:P,onFocus:F,onBlur:K,isMultiline:Y,rows:V,cols:B,wrap:H,children:q,isSelect:z,wrapperKeyPress:U,wrapperKeyDown:G,inputRef:X,iconClassName:J,labelClassName:W,size:Z}=t;let Q,ee;const[te,ne]=e.useState(o||""),[ie,se]=e.useState(!1),[ae,re]=e.useState(""),[oe,le]=e.useState("Afficher le mot de passe"),[ce,de]=e.useState(N),ue="password"===N;e.Children.forEach(q,(t=>{t&&e.isValidElement(t)&&("inputField"===t.props["data-child-name"]&&(Q=t),"additionalContent"!==t.props["data-child-name"]&&"additionalContent"!==t.key||(ee=t))}));const me=e=>{ne(e.currentTarget.value),O&&"function"==typeof O&&O(e)};e.useEffect((()=>{!ue||v&&_&&g&&b||console.warn("Some of these required props are missing: [passwordButtonLabelShow], [passwordButtonLabelHide], [passwordNoticeIsVisible], [passwordNoticeIsHidden]")}),[]),e.useEffect((()=>{ne(o||"")}),[o]);const he=i.classNames("nj-form-item",{"nj-form-item--static":"static"===c,[`nj-form-item--${Z}`]:Z&&"md"!==Z,"nj-form-item--disabled":A,"nj-form-item--error":T,"nj-form-item--success":y,"nj-form-item--textarea":Y,"nj-form-item--password":"password"===N,"nj-form-item--visible":"password"===N&&ie,"nj-form-item--select":z},d);let pe;if(Bt(t)){const n=i.omit(t,...Yt);pe=e.createElement("textarea",{...n,id:s,name:a,value:te??"",rows:V,cols:B,wrap:H,onClick:u,onChange:me,onBlur:K,onFocus:F,title:p,"aria-label":n["aria-label"]??f,"aria-labelledby":n["aria-labelledby"]??E,"aria-invalid":n["aria-invalid"]??(T?"true":void 0),"aria-describedby":n["aria-describedby"]??(w?`${s}-subscript`:void 0),disabled:n.disabled??A,autoComplete:n.autoComplete??S,required:n.required??L,placeholder:C,className:"nj-form-item__field",maxLength:D,minLength:j,readOnly:M,form:$,tabIndex:P,onKeyPress:m,ref:X})}else{const n=i.omit(t,...Yt);pe=e.createElement("input",{...n,type:ce,id:s,name:a,value:te??"",onClick:u,onChange:me,onBlur:K,onFocus:F,title:p,"aria-label":n["aria-label"]??f,"aria-labelledby":n["aria-labelledby"]??E,"aria-invalid":n["aria-invalid"]??(T?"true":void 0),"aria-describedby":n["aria-describedby"]??(w?`${s}-subscript`:void 0),disabled:n.disabled??A,autoComplete:n.autoComplete??S,required:n.required??L,placeholder:C,className:"nj-form-item__field",maxLength:D,minLength:j,readOnly:M,form:$,tabIndex:P,onKeyPress:m,ref:X})}const fe=i.classNames("nj-form-item__icon",J);return e.createElement("div",{className:he,ref:n},e.createElement("div",{className:"nj-form-item__field-wrapper",role:h?"button":void 0,onClick:h,onKeyPress:U,onKeyDown:G},Q?(()=>{if(!Q)return;const t=Q,n=i.classNames(t.props.className,"nj-form-item__field");return e.cloneElement(t,{className:n,id:s,...w?{"aria-describedby":`${s}-subscript`}:{},...T?{"aria-invalid":"true"}:{}})})():pe,e.createElement("label",{htmlFor:s,className:i.classNames("nj-form-item__label",W),"aria-hidden":function(){if(Q)return z&&"text"===Q.props.type}()?"true":void 0},l,L&&e.createElement("span",{className:"nj-form-item__required-asterisk"},"*")),ue&&e.createElement(Kt,{label:oe,size:"sm",icon:x||"visibility",ariaPressed:ie,variant:"tertiary",className:"nj-form-item__password-button",onClick:()=>{de(ie?"password":"text"),se(!ie),ie?(v&&re(v),g&&le(g)):(_&&re(_),b&&le(b))}}),!Y&&!ue&&x&&e.createElement(r,{name:x,onClick:e=>{R&&"function"==typeof R&&R(e)},onKeyPress:e=>{e.preventDefault(),I&&"function"==typeof I&&I(e)},ariaLabel:k,className:fe}),ee||null,ue&&e.createElement("p",{className:"nj-sr-only","aria-live":"polite","aria-atomic":"true"},ae)),w&&e.createElement("p",{className:"nj-form-item__subscript",id:`${s}-subscript`},T&&e.createElement(r,{className:"nj-form-item__subscript-icon",name:"warning",variant:"red"}),y&&!T&&e.createElement(r,{className:"nj-form-item__subscript-icon",name:"check",variant:"green"}),w))})),Bt=e=>!!e.isMultiline;Vt.defaultProps={placeholder:" ",labelKind:"floating",isMultiline:!1,size:"md"};const Ht={normal:"",dense:"nj-list-deprecated--sm"},qt=e.forwardRef((({children:t,density:n="normal",isBorderless:s=!1,hasSpaceBetweenItems:a=!1,className:r,isCustomSelectList:o=!1,ariaLabel:l,onKeydown:c,listId:d,isCheckboxList:u,isMultiSelect:m,...h},p)=>{const f=Ht[n||""],E=i.classNames("nj-list-deprecated",f,{"nj-list-deprecated--no-border":s,"nj-list-deprecated--clickable":o,"nj-list-deprecated--spaced-items":a,"nj-list-deprecated--checkbox":u},r);return e.createElement("ul",{...h,ref:p,id:d??h.id,className:E,role:o?"listbox":void 0,"aria-label":l??h["aria-label"],tabIndex:o?-1:void 0,onKeyDown:c??h.onKeyDown,"aria-multiselectable":m},t)})),zt=e.forwardRef((({inputId:t,name:n,label:s,value:a,size:o="md",isChecked:l=!1,ariaLabel:c,ariaLabelledBy:d,isDisabled:u=!1,tabIndex:m=0,isRequired:h=!1,hasError:p,hasSuccess:f,errorMessage:E,subscriptMessage:g,onChange:b,onBlur:_,children:v,isPresentational:N=!1,className:A,isIndeterminate:T=!1},y)=>{const S=e.useRef(null),L=e.useRef(null),[C,w]=e.useState(l);e.useEffect((()=>{w(l)}),[l]);const x=i.classNames("nj-checkbox",{"nj-checkbox--disabled":u,"nj-checkbox--presentational":N,"nj-checkbox--error":p,"nj-checkbox--success":f,[`nj-checkbox--${o}`]:"md"!==o},A),R=`${t}-subscript`,I=C?a:"",k=e.createElement("div",{className:"nj-checkbox__subscript",id:R},f?e.createElement(r,{variant:"inherit",name:"check",size:"sm"}):null,p?e.createElement(r,{variant:"inherit",name:"warning",size:"sm"}):null,E||g),O=e.createElement("input",{ref:i.mergeRefs([y,L]),type:"checkbox",checked:C,id:t,name:n,value:N?void 0:I,"aria-label":c,disabled:u,"aria-labelledby":d,"aria-invalid":p,"aria-describedby":g?R:void 0,onChange:e=>{const t=e.target.checked,n=t?a:"";b?.(e,t,n)},onBlur:_,onKeyDown:e=>{" "==e.key&&(e.preventDefault(),w(!C))},onClick:()=>{w(!C)},tabIndex:m,required:h});return e.useEffect((()=>{S?.current&&(S.current.inert=N)}),[N,S]),e.useEffect((()=>{L?.current&&(L.current.indeterminate=T)}),[T,L]),e.createElement("div",{ref:S,className:x},s||v?e.createElement("label",{htmlFor:t},O,e.createElement("span",{className:"nj-checkbox__label"},s??v,h?e.createElement("span",{"aria-hidden":"true",className:"nj-checkbox__required"},"*"):null)):O,(g||E)&&k)})),Ut=e.forwardRef((({listItemId:t,icon:n,children:s,isActive:a=!1,isDisabled:o=!1,isClickable:l,hasRightBorder:c,noActiveBorder:d,rightContent:u,value:m,type:h="list",className:p,href:f,target:E,onClick:g,ariaSelected:b,isCustomSelectItem:_=!1,isFolded:v=!1,checkboxContentId:N,isFocusVisible:A,...T},y)=>{const S="link"===h,L="button"===h,C="checkbox"===h,w=i.classNames("nj-list-deprecated__item",{"nj-list-deprecated__item--active":a,"nj-list-deprecated__item--focus-visible":A,"nj-list-deprecated__item--disabled":o,"nj-list-deprecated__item--right-border":c,"nj-list-deprecated__item--no-active-border":d,"nj-list-deprecated__item--clickable":S||L||C||l},p),x=i.classNames("nj-list-deprecated__item-icon",n?.className);let R=e.createElement(e.Fragment,null,n?e.createElement(r,{...n,className:x}):null,v?null:e.createElement("span",{className:"nj-list-deprecated__item-content"},s),u&&!v?e.cloneElement(u,{className:"nj-list-deprecated__item-right-content"}):null);return L?R=e.createElement("button",{type:"button",onClick:g},R):S?R=e.createElement("a",{href:f,target:E,onClick:g},R):C&&(R=e.createElement(zt,{isChecked:a,isPresentational:!0,inputId:N??$t("list-item-checkbox-content"),value:m},R)),e.createElement("li",{...T,ref:y,id:t??T.id,"data-value":m,className:w,"aria-current":f&&"link"==h&&a?"true":void 0,"aria-selected":b??T["aria-selected"],role:_?"option":void 0,tabIndex:_?-1:void 0,onClick:L||S?void 0:g},R)})),Gt=e.forwardRef(((t,n)=>{const{id:s,name:a,form:r,isRequired:o,isDisabled:l,onChange:c,onFocus:d,onBlur:u,onClick:m,onOptionSelect:h,iconName:p,value:f,searchLimit:E,resultsCountMessage:g,data:b,listId:_,listLabel:v,inputInstructions:N,showNumberOfResults:A=!0,showNoResultsMessage:T=!0,className:y}=t,S=b?.find((e=>e?.value===f))?.name,[L,C]=e.useState(S??""),[w,x]=e.useState(),[R,I]=e.useState(-1),[k,O]=e.useState(b??[]),[D,j]=e.useState(!1),[M,$]=e.useState(!1),[P,F]=e.useState(),K=e.useRef(null),Y=e.useRef(null),V=e.useRef(null),B=i.classNames("nj-form-item--select","nj-form-item--autocomplete",{"nj-form-item--open":D,"nj-form-item--static":"static"===t.labelKind},y),H=k.findIndex((e=>e.name===L))??-1;const q=e=>L?i.highlightTextAsHtml(e,L):e;function z(){j(!1),I(-1)}function U(e){const t=e??R;I(t<=0?k.length-1:t-1)}function G(e){K.current?.contains(e.relatedTarget)||(z(),u?.(e))}function X(e){const t=k[e];J(t),z(),W(t.name),$(!1),t&&h?.(t)}function J(e){x(e),C(e?.name??"")}function W(e,t=!1){const n=e?b?.filter((n=>!t||i.normalizeAndSearchInText(n?.name,e))).slice(0,E):b;O(n??[])}return e.useEffect((()=>{if(D){let e=-1!==H?H:0;-1!==R&&(e=R);const t=Y.current?.childNodes.item(e);t?.scrollIntoView({block:"nearest"})}}),[D]),e.useEffect((()=>{if(f){const e=b?.find((e=>e?.value===f));J(e)}}),[f]),e.useEffect((()=>{W(L);const e=b?.find((e=>e.value===w?.value));e&&C(e.name)}),[b]),e.useEffect((()=>{if(k.length&&Y?.current&&-1!==R){const e=A&&L&&M?R+1:R,t=Y.current.childNodes.item(e);t?.scrollIntoView({block:"nearest"}),F(t?.id)}else F(void 0)}),[R]),e.useLayoutEffect((()=>(K.current?.addEventListener("focusout",G),()=>{K.current?.removeEventListener("focusout",G)})),[K]),e.createElement(e.Fragment,null,e.createElement("p",{id:`${s}-instructions`,hidden:!0},N),e.createElement(Vt,{...t,isSelect:!0,className:B,iconName:p??"keyboard_arrow_down",iconClassName:"nj-form-item__icon",labelClassName:"nj-form-item__label",ref:K,wrapperKeyDown:function(e){switch(e.key){case"ArrowDown":if(e.preventDefault(),D||j(!0),-1==R)return void I(-1!==H?H:0);R>=k.length-1?I(0):I(R+1);break;case"ArrowUp":if(e.preventDefault(),D||j(!0),-1===R){return void U(-1!==H?H:0)}U();break;case"Enter":D&&-1!==R&&X(R);break;case"Escape":e.preventDefault(),D&&z();break;default:!(1!==e.key.length&&"Backspace"!==e.key||e.metaKey||e.altKey||e.ctrlKey)&&(I(-1),D||j(!0))}}},e.createElement("input",{"data-child-name":"inputField",type:"text",id:s,ref:i.mergeRefs([V,n]),name:a,disabled:l,required:o,placeholder:" ",role:"combobox","aria-describedby":`${s}-instructions`,"aria-autocomplete":"list","aria-expanded":D,"aria-controls":_,"aria-activedescendant":P,form:r,value:L,onChange:c,onClick:function(e){j(!D),m?.(e)},onFocus:d,onInput:function(e){const t=e.currentTarget.value;x(void 0),C(t),W(t,!0),$(!0),D||j(!0)},autoComplete:"off"}),e.createElement("div",{"data-child-name":"additionalContent"},e.createElement("div",{className:"nj-sr-only","aria-live":"polite","aria-atomic":"true"},e.createElement("p",null,D&&g(k.length))),D&&e.createElement(qt,{"data-child-name":"additionalContent",id:_,className:"nj-form-item__list nj-list-deprecated--clickable",density:"dense",isBorderless:!0,"aria-label":v,isCustomSelectList:!0,ref:Y},e.createElement(e.Fragment,null,M&&e.createElement(e.Fragment,null,A&&L&&k?.length>0&&e.createElement("li",{className:"nj-form-item__list-item-hint","aria-hidden":"true"},g(k.length)),T&&L&&!k?.length&&e.createElement("li",{className:"nj-form-item__list-item-hint","aria-hidden":"true"},g(k.length))),k?.map(((t,n)=>e.createElement(Ut,{id:`${s}-option-${n}`,value:t?.value,key:t?.value,isClickable:!0,isActive:H===n,isCustomSelectItem:!0,"aria-selected":R===n,onClick:()=>X(n)},M?e.createElement("span",{dangerouslySetInnerHTML:{__html:q(t?.name)}}):t?.name))))))))})),Xt=e.forwardRef((({variant:t,emphasis:n,isUppercase:s,children:a,size:o,capedValue:l,className:c,unitLabel:d,iconName:u,icon:m},h)=>{let p;"number"==typeof a?p=a:"string"==typeof a&&(p=Number.parseInt(a)),!i.isUndefinedOrNull(l)&&!i.isUndefinedOrNull(p)&&p>l&&(a=l<=0?"0":`${l}+`);const f=i.classNames("nj-badge",{[`nj-badge--${o}`]:o,[`nj-badge--${n}`]:n,[`nj-badge--${t}`]:t,"nj-badge--uppercase":s},c);return e.createElement("p",{ref:h,className:f},m?(()=>{if(!m)return;const t=m,n=i.classNames(t.props.className,"nj-badge__icon");return e.cloneElement(t,{className:n})})():u&&e.createElement(r,{name:u,className:"nj-badge__icon"}),a,d&&e.createElement("span",{className:"nj-sr-only"},d))})),Jt="nj-status-indicator",Wt=e.forwardRef((({children:t,size:n="md",status:s,title:a,className:r,hideLabel:o},l)=>{const c=n&&"md"!==n?`${Jt}--${n}`:"",d=s?`${Jt}--${s}`:"",u=i.classNames(Jt,{[c]:!i.isUndefinedOrNull(c)&&""!==c,[d]:!i.isUndefinedOrNull(d)&&""!==d},r);return e.createElement("div",{ref:l,className:u,title:a,"aria-hidden":t?void 0:"true"},e.createElement("div",{className:`${Jt}__svg`},t&&o&&e.createElement("span",{className:"nj-sr-only"},t)),t&&!o&&e.createElement("p",{className:`${Jt}__text`},t))})),Zt=e.forwardRef((({text:t,className:n,children:s,options:a,...r},o)=>{const l=e.useRef(),[c,d]=e.useState(),u=i.classNames("nj-tooltip-container",n);return e.useEffect((()=>{let e;if(l&&l.current){const n=Ct(l.current,t,a);e=xt(n),d(n)}return()=>{e?.()}}),[]),l.current&&c&&(c.setContent(t??"",a?.isContentHtml),c.updateOptions(a??{})),e.createElement("div",{...r,ref:i.mergeRefs([l,o]),className:u},s)})),Qt="nj-avatar",en=e.forwardRef((({initials:t,children:n,size:s="md",label:a,href:r,target:o,rel:l,isClickable:c,notification:d,status:u,statusTitle:m,notificationCapedValue:h,isRemainingCount:p,onClick:f,onMouseEnter:E,onMouseLeave:g,tooltipText:b,tooltipPosition:_="bottom",className:v,notificationUnitLabel:N="notifications"},A)=>{let T="div";r?T="a":c&&(T="button");const y=s&&"md"!==s?`${Qt}--${s}`:"",S=s&&"md"!==s?`${Qt}__tooltip--${s}`:"",L=i.classNames(Qt,{[y]:!i.isUndefinedOrNull(y)&&""!==y,[`${Qt}--default-icon`]:!t&&!n&&!p,[`${Qt}--clickable`]:c||p,[`${Qt}--remaining-count`]:p,[`${Qt}--initials`]:t||p,[`${Qt}--picture`]:n},v),C=i.classNames(`${Qt}__tooltip`,{[S]:!i.isUndefinedOrNull(s)&&"md"!==s});t&&t.length>=4&&(t=t.slice(0,3));const w=e.createElement(T,{href:r,target:o,rel:l,className:L,ref:A,onClick:f,onMouseEnter:E,onMouseLeave:g},t&&!n&&e.createElement("span",{className:`${Qt}__initials`,"aria-hidden":"true"},t),!n&&a&&e.createElement("p",{className:"nj-sr-only"},a),n&&(t=>{const n=t,s=i.classNames(n.props.className,`${Qt}__picture`);return e.cloneElement(n,{className:s,alt:a})})(n),d&&"sm"!==s&&e.createElement(Xt,{capedValue:h,variant:"information",size:"xl"===s?"lg":"md",unitLabel:N},d),!d&&u&&e.createElement(Wt,{status:u,title:m,size:(e=>{switch(e){case"sm":return"sm";case"xl":return"lg";default:return"md"}})(s),hideLabel:!0},m));return b?e.createElement(Zt,{text:b,options:{placement:_},className:C},w):w})),tn=e.forwardRef((({children:t,max:n=4,density:s="default",size:a,onClick:r,onMouseEnter:o,onMouseLeave:l,tooltipText:c,tooltipPosition:d="bottom",className:u,showMoreLabel:m},h)=>{const p=a&&"md"!==a?`nj-avatar__tooltip--${a}`:"",f=i.classNames("nj-avatar-list",{"nj-avatar-list--compact":"compact"===s},u),E=i.classNames("nj-avatar__tooltip",{[p]:!i.isUndefinedOrNull(a)&&"md"!==a}),g=t.length-n,b="function"==typeof m?m(g):m,_=e.createElement(en,{initials:`+ ${g}`,isClickable:!i.isUndefinedOrNull(r),onClick:r,onMouseEnter:o,onMouseLeave:l,isRemainingCount:!0,size:a,label:b}),v=t?e.Children.map(t,(t=>e.cloneElement(t,{size:a}))).slice(0,n):null;return e.createElement("div",{ref:h,className:f},v,t&&t.length>n&&c&&e.createElement(Zt,{text:c,options:{placement:d},className:E},_),t&&t.length>n&&!c&&_)})),nn=e.forwardRef((({children:t,isMinified:n,maximumItemsBeforeMinification:i=4,className:s,ariaLabel:a="Breadcrumbs",showMoreLabel:r="Show hidden items",...o},l)=>{const[c,d]=e.useState(n),u=e.Children.toArray(t),m=u?.length,h=c??m>i,[p]=e.useState(h),f=e.useRef(null),E=()=>{d(!1)};let g;if(e.useLayoutEffect((()=>{!h&&p&&f.current?.childNodes[1]?.querySelector("a")?.focus()}),[c,p]),!h||m<=i)g=t;else{const t=[...u].splice(0,1),n=u[m-1];g=e.createElement(e.Fragment,null,t,e.createElement("li",{className:"nj-breadcrumb__see-more"},e.createElement("button",{onClick:E},e.createElement("span",{className:"nj-sr-only"},r))),n)}return e.createElement("nav",{...o,ref:l,role:"navigation","aria-label":a,className:s},e.createElement("ol",{className:"nj-breadcrumb",ref:f},g))})),sn={grayed:"nj-link--grayed",contextual:"nj-link--contextual",high_contrast:"nj-link--high-contrast",inverse:"nj-link--inverse",default:""},an={after:"",before:"nj-link-icon--before"},rn={sm:"nj-link--sm",md:"nj-link--md"},on=e.forwardRef((({href:t,children:n,variant:s,target:a,rel:o,id:l,title:c,icon:d,iconPosition:u,size:m,isExternal:h,externalLabel:p,onClick:f},E)=>{const g=sn[s||"default"],b=an[u||"after"],_=rn[m||"md"],v=i.classNames("nj-link",{"nj-link-icon":d||h,[b]:d||h,[g]:s&&"default"!==s,[_]:m});let N=null;h&&(N=e.createElement(r,{name:"open_in_new"})),d&&(N=e.createElement(r,{name:d}));const A=e.createElement(e.Fragment,null,e.createElement("span",null,n),h&&e.createElement("span",{className:"nj-sr-only"}," ",p));return e.createElement("a",{ref:E,href:t,id:l,title:c,target:h?"_blank":a,rel:h?"noreferrer":o,className:v,onClick:f},"before"===u&&N,A,"before"!==u&&N)}));on.defaultProps={variant:"default"};const ln=e.forwardRef((({isActive:t=!1,href:n,target:s,rel:a,children:r,onClick:o,icon:l,iconPosition:c,className:d,label:u},m)=>{const h=i.classNames("nj-breadcrumb__item",d);return e.createElement("li",{ref:m,"aria-current":t?"page":void 0,className:h},t?r:e.createElement(on,{href:n,target:s,rel:a,onClick:o,size:"sm",variant:"grayed",icon:l,iconPosition:c},r??e.createElement("span",{className:"nj-sr-only"},u)))})),cn=e.forwardRef((({variant:t,customColor:n,size:s,className:a},r)=>{const o=i.classNames("nj-bullet",`nj-bullet--${t??"brand"}`,{[`nj-bullet--${s}`]:s},a);return e.createElement("div",{ref:r,className:o,style:n?{backgroundColor:n}:void 0})})),dn=e.forwardRef((({hasBottomBorder:t=!1,headerText:n,isHorizontal:s=!1,className:a,children:r,image:o,...l},c)=>{const d=i.classNames("nj-card",{"nj-card--border":t,"nj-card--horizontal":s},a);return e.createElement("div",{...l,ref:c,className:d},n&&e.createElement("div",{className:`${n} nj-card__header`},n),o&&e.createElement("div",{className:"nj-card__img-wrapper"},e.cloneElement(o,{className:"nj-card__img"})),r)})),un=e.forwardRef((({heading:t,headingElement:n="h4",paragraph:s,className:a,children:r,...o},l)=>{const c=i.classNames("nj-card__body",a);return e.createElement("div",{...o,ref:l,className:c},t&&e.createElement(n,{className:"nj-card__title"},t),s&&e.createElement("p",null,s),r)})),mn=e.forwardRef((({heading:t,paragraph:n,headingElement:s="h4",href:a,target:o,onClick:l,className:c,background:d,...u},m)=>{const h=i.classNames("nj-card","nj-card--cover",c);return e.createElement("a",{...u,ref:m,href:a,onClick:l,className:h,target:o,style:{backgroundImage:`url(${d})`}},e.createElement("div",{className:"nj-card__body"},e.createElement("div",{className:"nj-card__overlay"},e.createElement(s,{className:"nj-card__title"},t),e.createElement(r,{name:"arrow_forward",className:"nj-card__icon"}),n&&e.createElement("p",{className:"nj-card__description"},n))))})),hn=({data:t,onSelect:n,listHeight:i})=>{const[s,a]=e.useState(!1);return e.createElement(Ft,{label:"Select your country",labelKind:"floating",iconName:s?"keyboard_arrow_up":"keyboard_arrow_down",onInputFocus:()=>{a(!0)},onInputBlur:()=>{a(!1)},data:t,autocomplete:!1,onSelect:e=>{"function"==typeof n&&n(e)},disableInput:!0,className:"nj-form-dropdown",hasClear:!1,listHeight:i})},pn=Dt(hn,"Dropdown component is deprecated, please use component SelectInput instead"),fn=e.forwardRef((({size:t,isDisabled:n,noRotate:s,variant:a,icon:o,title:l,label:c,className:d,onClick:u},m)=>{const h=i.classNames("nj-fab",{"nj-fab--light":"light"===a,"nj-fab--sm":"sm"===t,disabled:n,"no-rotate":s},d),p=e.useRef();let f;return e.useEffect((()=>(p.current&&(F.SELECTOR={default:".nj-fab-menu",button:".nj-fab",item:".nj-fab__item"},F.OPEN_CLASS="active",F.init(),f=p.current),()=>{f&&F.getInstance(f)?.dispose()})),[]),e.createElement("button",{type:"button",title:l,ref:i.mergeRefs([p,m]),onClick:u,className:h,disabled:n},e.createElement(r,{name:o}),e.createElement("span",{className:"nj-sr-only"},c))})),En=e.forwardRef((({icon:t,size:n,isDisabled:s,noRotate:a,variant:r,title:o,label:l,onClick:c,children:d,dataPlacement:u,className:m},h)=>{const p=i.classNames("nj-fab-menu",m),f=i.classNames("nj-fab__actions",{"nj-fab__actions--sm":"sm"===n}),E=e.useRef(),g=e.useRef();let b,_;e.useEffect((()=>(E.current&&g.current&&(F.SELECTOR={default:".nj-fab-menu",button:".nj-fab",item:".nj-fab__item"},F.OPEN_CLASS="active",F.init(),b=E.current,_=E.current),()=>{b&&F.getInstance(b).dispose(),_&&F.getInstance(_).dispose()})),[]);const v=e.Children.map(d,((t,n)=>e.createElement("li",{className:"nj-fab__item",key:n},e.cloneElement(t))));return e.createElement("div",{ref:i.mergeRefs([E,h]),"data-placement":u,className:p},e.createElement(fn,{icon:t,variant:r,title:o,onClick:c,size:n,noRotate:a,isDisabled:s,label:l}),e.createElement("ul",{className:f},d&&v))}));En.defaultProps={icon:"add"};const gn=e.forwardRef((({logoPath:t,logoAlt:n,sloganText:i,links:s,menuLists:a,socialLinks:r},o)=>e.createElement("footer",{ref:o,className:"nj-footer",role:"contentinfo"},e.createElement("div",{className:"container"},e.createElement("div",{className:"nj-footer__baseline"},t&&e.createElement("img",{src:t,alt:n,className:"nj-footer__logo"}),e.createElement("p",null,i)),a&&e.createElement("div",{className:"nj-footer__menu"},a&&a.map((({title:t,items:n},i)=>e.createElement("div",{className:"nj-footer__menu-section",key:i},e.createElement("h2",{className:"nj-footer__links-list-title"},t),e.createElement("ul",{className:"nj-footer__links-list"},n&&n.map((({text:t,url:n},i)=>e.createElement("li",{key:i},e.createElement(on,{href:n||"#",variant:"contextual"},t))))))))),e.createElement("ul",{className:"nj-footer__links"},s&&s.map((({text:t,url:n},i)=>e.createElement("li",{key:i},e.createElement(on,{href:n||"#",variant:"contextual"},t))))),e.createElement("ul",{className:"nj-footer__social"},r&&r.map((({url:t,logo:n},i)=>e.createElement("li",{key:i},e.createElement("a",{href:t||"#",className:"nj-footer__social-link"},e.createElement("img",{src:n.path,alt:n.alt,className:"nj-footer__social-icon"}))))))))));gn.defaultProps={logoPath:"https://assets.design.digital.engie.com/brand/logo-engie-blue.svg",logoAlt:"Engie",sloganText:"L'énergie est notre avenir, économisons-la.",links:[],socialLinks:[]};const bn="nj-inline-message",_n=Dt((({id:t,name:n,value:s,label:a,labelKind:o="static",className:l,onClick:c,onKeyPress:d,title:u,ariaLabel:m,ariaLabelledBy:h,type:p="text",isDisabled:f,autocomplete:E,required:g,placeholder:b,helpText:_,iconName:v,iconPosition:N="left",iconClick:A,iconKeyPress:T,iconTitle:y,onChange:S,maxLength:L,minLength:C,readOnly:w,form:x,tabIndex:R,onFocus:I,onBlur:k})=>{const[O,D]=e.useState(!1),[j,M]=e.useState(!1),[$,P]=e.useState(s);e.useEffect((()=>{M(!!$)}),[$]),e.useEffect((()=>{P(s)}),[s]);const F=i.classNames("nj-form-group",{"is-focused":O,"is-filled":j,[`nj-form-group--icon-${N}`]:v},l);return e.createElement("div",{className:F},e.createElement("label",{htmlFor:t,className:`nj-label-${o}`},a),e.createElement("input",{type:p,id:t,name:n,value:$,onClick:c,onChange:e=>{P(e.currentTarget.value),S&&"function"==typeof S&&S(e)},onBlur:e=>{D(!1),k&&"function"==typeof k&&k(e)},onFocus:e=>{D(!0),I&&"function"==typeof I&&I(e)},title:u,"aria-label":m,"aria-labelledby":h,"aria-disabled":f,disabled:f,autoComplete:E,required:g,"aria-required":g,placeholder:b,className:"nj-form-control",maxLength:L,minLength:C,readOnly:w,form:x,tabIndex:R,onKeyPress:d}),v&&e.createElement(r,{name:v,onClick:A,onKeyPress:T,ariaLabel:y}),e.createElement("span",{className:"nj-help"},_))}),"Input is deprecated and should be replaced by FormItem component"),vn=e.forwardRef(((t,n)=>{const{onEnterKeyPress:s,onSearchChange:a,onChange:o,id:l,label:c,resetButtonTitle:d="clear",value:u,buttonOptions:m,scale:h,disabled:p=!1,...f}=t,[g,b]=e.useState(!1),[_,v]=e.useState(u??""),N=e.useRef(null);e.useEffect((()=>{u&&b("number"==typeof u||u.length>0),v(u??"")}),[u]);const A="nj-search",T=i.classNames(A,{[`${A}--${h}`]:!!h}),y=i.classNames(`${A}__button`,m?.className);return e.createElement("div",{className:T},e.createElement("div",{className:`${A}__field-wrapper`},e.createElement(r,{name:"search",ariaLabel:"searchIcon",className:`${A}__icon`}),e.createElement("label",{htmlFor:l,"aria-hidden":!0,className:"nj-sr-only"},c),e.createElement("input",{...f,className:`${A}__field`,type:"search",id:l,value:_,onChange:e=>{const t=e.currentTarget.value;v(t??""),b(t.length>0),a&&a(e,_),o?.(e)},ref:i.mergeRefs([N,n]),disabled:p,onKeyDown:e=>{"Enter"===e.key&&"function"==typeof s&&s(e,u),t.onKeyDown?.(e)}}),g&&e.createElement(Kt,{label:d,icon:"cancel",onClick:e=>{e.preventDefault(),b(!1),v(""),N?.current&&N?.current.focus()},className:`${A}__clear-button`})),m&&e.createElement(E,{...m,className:y,isDisabled:m.isDisabled||p}))})),Nn=e.forwardRef((({title:n,icon:s,iconVariant:a,id:o,footer:l,centeredFooter:c,className:d,isOpen:u,verticalCentered:m=!0,fade:h=!0,onClose:p,children:f,closeLabel:E="Close",role:g="dialog",shouldFitViewport:b=!0,appendTo:_},v)=>{const N=e.useRef();let A;function T(e){p?.(e.source)}e.useEffect((()=>(N.current&&(ut.CLASSNAME={backdrop:"nj-modal__backdrop",fade:"fade",show:"show",visible:"nj-modal--visible",backdropFitViewport:"nj-modal__backdrop--fit-viewport",fitViewport:"nj-modal--fit-viewport"},ut.SELECTOR={default:".nj-modal",dataDismiss:'[data-dismiss="modal"]',dataToggle:'[data-toggle="modal"]',dataAttributeToggleName:"data-toggle",dataAttributeToggleValue:"modal",modalBody:".nj-modal__body",dialog:".nj-modal__dialog"},ut.SHOULD_MANAGE_OPENING_STATE=!1,ut.CAN_MOVE_ELEMENTS_IN_DOM=!1,ut.init(),ut.SHOULD_MANAGE_OPENING_STATE=!0,ut.CAN_MOVE_ELEMENTS_IN_DOM=!0,A=N.current,A.addEventListener("beforehide.nj.modal",T)),()=>{A?.removeEventListener("beforehide.nj.modal",T),A&&ut.getInstance(A)&&ut.getInstance(A).dispose()})),[]),e.useEffect((()=>{if(N.current){const e=ut.getInstance(N.current);e&&(u?e.show():e.hide())}}),[u]);const y=i.classNames("nj-modal",{fade:h,"nj-modal--vertical-centered":m,"nj-modal--fit-viewport":b},d),S=`${o}-label`;const L=i.classNames("nj-modal__footer",{"nj-modal__footer--centered":c});return function(n){let i;if(b){const e=document.body;e?i=e:(console.error(`${ut.LOG_TAG} Invalid element: No body element found. Couldn't fit to viewport. Appended to parent element instead.`),b=!1,_=void 0)}else if(_){const e=document.querySelector(_);e?i=e:(console.error(`${ut.LOG_TAG} Invalid element: Anchor element '${_}' is not a valid node element. Check your appendTo property. Appended to parent element instead.`),_=void 0)}return i?e.createElement(e.Fragment,null,t.createPortal(n,i)):n}(e.createElement("div",{className:y,id:o,"aria-labelledby":S,role:g,ref:i.mergeRefs([N,v]),"data-appendto":_},e.createElement("div",{className:"nj-modal__dialog",role:"document"},e.createElement("div",{className:"nj-modal__content"},e.createElement("div",{className:"nj-modal__header"},e.createElement("h1",{className:"nj-modal__title",id:S},s&&e.createElement(r,{name:s,variant:a}),n),e.createElement(Kt,{type:"button",size:"sm",icon:"close",label:E,onClick:()=>p?.("button"),className:"nj-modal__close"})),u&&f,u&&l&&e.createElement("div",{className:L},l)))))})),An=({icon:t,iconVariant:n,children:i,title:s,isLoading:a,...o})=>e.createElement(Nn,{centeredFooter:!0,className:"nj-modal--information",...o},e.createElement("div",{className:"nj-modal__body"},e.createElement(p,{isLoading:a,className:"nj-modal__loading-spinner"}),!a&&e.createElement(r,{name:t||"info",size:"xxl",variant:n||void 0,className:"nj-modal__icon"}),s&&e.createElement("h4",{className:"nj-modal__title"},s),e.createElement("div",{className:"nj-modal__description"},i)));An.defaultProps={icon:"info",isLoading:!1};const Tn=e.forwardRef((({label:t,href:n,target:s,variant:a,isDisabled:o,onClick:l,hasClose:c=!1,size:d="md",closeAriaLabel:u,onClose:m,isVisible:h=!0,iconName:p,className:f},E)=>{let g=null;g=n?e.createElement("a",{className:"nj-tag__link",href:o?void 0:n,target:o?void 0:s,role:o?"link":void 0,"aria-disabled":o?"true":void 0,onClick:l},t):l?e.createElement("button",{className:"nj-tag__button",disabled:o,onClick:l},t):e.createElement("p",{className:"nj-tag__text"},t);const b=i.classNames("nj-tag",{[`nj-tag--${a}`]:a,[`nj-tag--${d}`]:d&&"md"!==d,"nj-tag--disabled":o},f);return h?e.createElement("div",{ref:E,className:b},g,p&&e.createElement(r,{name:p,className:"nj-tag__icon"}),c&&!o&&e.createElement(Kt,{icon:"close",className:"nj-tag__close",size:"2xs",onClick:m,label:u??"",type:"button"})):null})),yn=/^[\d\p{Letter}]$/u,Sn=e.forwardRef(((t,n)=>{const{id:s,name:a,placeholder:r,form:o,isRequired:l,isDisabled:c,iconName:d,onChange:u,onBlur:m,onClick:h,children:p,label:f,buttonDefaultValueLabel:E,listNavigationLabel:g,labelKind:b,tagColor:_="grey",size:v="md",displaySelectedItems:N=!0,maxTagsToDisplay:A,selectedText:T="selected",tagCloseLabel:y="Deselect",tagResetSelectionLabel:S="Deselect all",onOptionToggle:L,className:C}=t,[w,x]=e.useState(!1),[R,I]=e.useState(-1),[k,O]=e.useState([]),D=e.useRef(null),j=e.useRef(null),M=e.useRef(null),$=e.useRef(null);e.useEffect((()=>{if(w&&j.current){j.current.focus();const e=k?.[k?.length-1]??-1;I(e),-1===e&&j.current.scrollTo({top:0})}else I(-1)}),[w]),e.useEffect((()=>{-1!==R&&(j.current?.childNodes[R]).focus()}),[R]),e.useEffect((()=>(D.current&&D.current.addEventListener("focusout",q),()=>{D?.current?.removeEventListener("focusout",q)})),[D]),e.useEffect((()=>{const e=function(e){const t=F.reduce(((t,n,i)=>(e.includes(n)&&t.push(i),t)),[]);return k.length!==t.length||k.some((e=>!t.includes(e)))?t:void 0}(t.value??[]);e&&O(e)}),[t.value]);const P=i.classNames("nj-form-item--select","nj-form-item--custom-list","nj-form-item--multi-select",{"nj-form-item--static":"static"===b,"nj-form-item--open":w,[`nj-form-item--${v}`]:v&&"md"!==v},C),F=e.Children.map(p,(e=>e.props.value??e.props.children)),K=e.Children.map(p,(e=>e.props.children)),Y=(()=>{switch(v){case"xl":return"md";case"sm":return"xs";default:return"sm"}})(),V=e.Children.map(p,((t,n)=>{if(e.isValidElement(t))return e.cloneElement(t,{isActive:k.includes(n),type:"checkbox",isCustomSelectItem:!0,ariaSelected:k.includes(n),onClick:()=>{H(n)}})}));function B(e){x(!w),h&&"function"==typeof h&&h(e)}function H(e,t=!1,n,i){let s;s=k.includes(e)?[...k].filter((t=>t!==e)):[...k,e],L?.(F[e],s?.includes(e)),u?.(s?.map((e=>F[e]))),O(s);if(t&&0===i?.detail)if(s.length){const e=n===k.length-1?n-1:(n??0)+1,t=$?.current?.querySelectorAll("[class^=nj-tag--]")?.[e]?.querySelector("[class^=nj-icon-btn--]");t?.focus()}else M?.current?.focus()}function q(e){const t=e?.relatedTarget;t&&D?.current?.contains(t)||(x(!1),m?.(e))}const z=(t=>{const n=e.useRef(null);return e.useEffect((()=>{const e=e=>{n.current&&!n.current.contains(e.target)&&t(e)};return document.addEventListener("mouseup",e),document.addEventListener("touchend",e),()=>{document.removeEventListener("mouseup",e),document.removeEventListener("touchend",e)}}),[t]),n})((e=>{w&&(x(!1),m?.(e))})),U=JSON.parse(JSON.stringify(F)).filter(((e,t)=>k.includes(t))),G=k?.length,X=`${f} - ${t.value?.join(",")||E}`,J=e=>`${y} ${K?.[e]}`,W=A&&G>A?[...k].splice(0,A):[...k],Z=G-(A??G),Q=`+ ${Z}`,ee=W.map(((t,n)=>e.createElement(Tn,{key:t,variant:_,size:Y,label:K?.[t],hasClose:!0,closeAriaLabel:J(t),className:"nj-tag",onClose:e=>{e.stopPropagation(),H(t,!0,n,e)}}))),te=N?e.createElement(e.Fragment,null,ee,Z>0&&e.createElement(Tn,{variant:_,size:Y,label:Q,hasClose:!1,className:"nj-tag"})):(()=>{if(0===G)return null;const t=k[0];return 1===G?e.createElement(Tn,{variant:_,size:Y,label:K?.[t],hasClose:!0,closeAriaLabel:J(t),className:"nj-tag",onClose:e=>{e.stopPropagation(),H(t,!0,0)}}):e.createElement(Tn,{variant:_,size:Y,label:`${G} ${T}`,hasClose:!0,closeAriaLabel:S,className:"nj-tag",onClose:e=>{e.stopPropagation(),O([]),u?.([])}})})(),{value:ne,...ie}=t;return e.createElement(e.Fragment,null,e.createElement(Vt,{...ie,isSelect:!0,className:P,iconName:d??"keyboard_arrow_down",iconClassName:"nj-form-item__icon",labelClassName:"nj-form-item__label",size:v,ref:i.mergeRefs([D,z])},e.createElement("input",{"data-child-name":"inputField",type:"text",id:s,ref:n,name:a,value:U?.join(","),disabled:c,required:l,"aria-hidden":!0,placeholder:r||" ",form:o,tabIndex:-1,className:"nj-form-item__field",readOnly:!0}),e.createElement(e.Fragment,{key:"additionalContent"},e.createElement("p",{id:`${s}-instructions`,hidden:!0},g),e.createElement("button",{"aria-haspopup":"listbox","aria-expanded":w,"aria-describedby":`${s}-subscript ${s}-instructions`,role:"combobox",type:"button",className:"nj-form-item__custom-list-button","aria-label":X,tabIndex:w?-1:void 0,ref:M,onClick:B},e.createElement("span",{className:"nj-sr-only"},X)),e.createElement("div",{ref:$,className:"nj-form-item__selected-tags",onClick:B},G>0&&te),w&&e.createElement(qt,{className:"nj-form-item__list",density:"dense",isBorderless:!0,isCustomSelectList:!0,isCheckboxList:!0,ariaLabel:f,isMultiSelect:!0,ref:j,onKeydown:function(t){if("Escape"===t.code&&(x(!1),M.current?.focus()),"ArrowUp"===t.code&&(t.preventDefault(),I(Math.max(0,R-1))),"ArrowDown"===t.code&&(t.preventDefault(),I(Math.min(e.Children.count(p)-1,R+1))),"Enter"===t.code&&(t.preventDefault(),-1!==R&&H(R)),yn.test(t.key)){const e=F.findIndex((e=>e[0].toLowerCase()===t.key.toLowerCase()));-1!==e&&I(e)}}},V))))})),Ln=e.forwardRef((({activeItemId:t,hasShadow:n=!0,hasContainer:s=!1,breakpoint:a="md",logo:o,size:l="normal",isTransparent:c=!1,hasSearch:d=!1,onClickItem:u,className:m,searchPlaceholder:h,searchButtonLabel:p,onSearch:f,children:g},b)=>{const[_,v]=e.useState(t),[N,A]=e.useState(!1),T=$t("NJNavbar"),y=s?"div":e.Fragment,S={},L=e.useRef(null);e.useEffect((()=>{v(t)}),[t]),s&&(S.className="container");const C=(e,t)=>{"function"==typeof u&&u(e,t),v(e)},w=e=>{e.preventDefault(),N&&L.current?.focus(),A(!N)};e.useEffect((()=>{N&&L.current&&L.current.focus()}),[N]);const x=e.Children.map(g,(t=>e.cloneElement(t,{onClickItem:C,isActive:!!_&&t.props.id===_}))),R=i.classNames("nj-navbar",{"nj-navbar--shadow":n,[`nj-navbar--expand-${a}`]:a,"nj-navbar--expand":!a,"nj-navbar--sm":"small"===l,"nj-navbar--transparent":c},m),I=i.classNames("nj-navbar__brand",o?.className);return e.createElement("nav",{ref:b,className:R},e.createElement(y,{...S},e.createElement("a",{className:I,href:o?.href?o.href:"./",target:o?.target,onClick:o?.onClick},o?.image?o.image:e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",id:"logo-engie",viewBox:"0 0 319.13 113.38",className:"nj-navbar__logo"},e.createElement("title",null,"logo engie"),e.createElement("path",{d:"M319.13,45.82C276.37,17.27,220.59,0,159.57,0S42.76,17.27,0,45.82C42.53,31.68,92.25,22.91,159.57,22.91S276.61,31.68,319.13,45.82Z"}),e.createElement("path",{d:"M135.1,60.66c-3.14,0-4.75,2.54-5.16,5.65-.46,3.44-2.27,15.35-2.67,18.37-.24,1.82-.37,3.71-2.13,4.49s-3.9-.42-5.72-2L90.58,62.65a8.13,8.13,0,0,0-5.36-2c-4.08,0-8,2.53-8,8.72v38.35a4.62,4.62,0,0,0,4.63,4.9,4.88,4.88,0,0,0,5-4.55s3-18.27,3.33-20.31c.42-2.37.79-4.23,3.08-4.94,2.07-.64,4,.56,6.94,3.11s27.2,24.48,27.2,24.48a7.83,7.83,0,0,0,5.86,2.21c2.39,0,6.73-1,6.73-8.28V66.14C140,62.6,137.77,60.66,135.1,60.66Z"}),e.createElement("path",{d:"M309.11,101.53c-21.19,4.56-45.45-.31-45.45-15.31,0-11.33,10.51-15.94,18.79-16.61,8.69-.69,15.48,1.13,19,4.76,2.18,2.27,1.57,5.36-2.72,5.61-3.94.24-11.35.47-17.51.7-3.5.13-5.37,2-5.37,4.53,0,2,1.5,4.28,5.53,4.3,5.77,0,20.42.12,27.69.14,4.81,0,7.17-2.68,7.17-8.21,0-8.75-7.93-22-31.14-22-21,0-36.24,10.48-36.24,27.6,0,24.28,35.73,31.69,61.91,22.67,2.48-.85,4.73-2.64,4-5.41C314.13,101.81,312.12,100.88,309.11,101.53Z"}),e.createElement("path",{d:"M63.2,101.53c-21.2,4.56-45.45-.31-45.45-15.31,0-11.33,10.5-15.94,18.79-16.61,8.68-.69,15.47,1.13,19,4.76,2.18,2.27,1.57,5.36-2.71,5.61-3.95.24-11.36.47-17.52.7-3.5.13-5.37,2-5.37,4.53,0,2,1.5,4.28,5.53,4.3,5.77,0,20.43.12,27.7.14,4.8,0,7.17-2.68,7.17-8.21,0-8.75-7.94-22-31.15-22-21,0-36.24,10.48-36.24,27.6,0,24.28,35.73,31.69,61.92,22.67,2.48-.85,4.73-2.64,4-5.41C68.22,101.81,66.21,100.88,63.2,101.53Z"}),e.createElement("path",{d:"M227.37,78.18c.47,13.24,1.72,24.22,2.07,28.07.45,5,3,6.38,5.59,6.38s5.1-1.29,5.55-6.34C241,102.05,242.22,89,242.83,76a.77.77,0,0,0-1-.87l-13.8,2.23A.83.83,0,0,0,227.37,78.18Z"}),e.createElement("path",{d:"M235.07,59.41a7.63,7.63,0,0,0-8.1,8c0,.57.07,2.13.16,4.08a.85.85,0,0,0,1,.79l14.4-2.34a.83.83,0,0,0,.7-.79c0-.68,0-1.37.06-1.7A7.74,7.74,0,0,0,235.07,59.41Z"}),e.createElement("path",{d:"M213.91,80.52c-4.8,0-19.62.12-29.1.14-4.6,0-5.75,2.48-5.75,4.53,0,1.78,1.24,4.08,5.53,4.3,6.53.34,14.85.73,18.69.93,5.17.26,5.24,2.92,3.49,5.2-3.51,4.56-12.05,7.55-20.9,7.55-11.58,0-24.32-6.58-24.32-17,0-9.8,10.91-20.59,43.3-16,2.85.4,5.65-.11,6.35-2.75.75-2.8-1.08-4.6-4.76-5.57A78.15,78.15,0,0,0,186,59.41c-21.81,0-39.29,10.41-39.29,27.23,0,18,17.42,26.74,39.14,26.74,24.25,0,36.06-13.2,36.06-24.74C221.93,82.77,218.94,80.52,213.91,80.52Z"}))),e.createElement("button",{className:"nj-navbar__toggler",type:"button","data-toggle":"collapse","data-target":"#"+T},e.createElement(r,{name:"menu",className:"nj-navbar__toggler-icon"})),e.createElement("div",{className:"nj-navbar--collapse nj-collapse",id:T},e.createElement("ul",{className:"nj-navbar__nav",role:"menu"},x,d&&e.createElement("li",{className:"nj-navbar__nav-item"},e.createElement("a",{className:"nj-navbar__nav-link nj-navbar__nav-link--icon",href:"#"+$t(void 0+"search"),"aria-expanded":"false","aria-controls":$t(void 0+"search"),onClick:w},e.createElement(r,{name:"search",variant:"brand"})))),N&&e.createElement("form",{className:"nj-navbar__search show"},e.createElement("input",{className:"nj-form-control nj-navbar__search-input",type:"text",id:$t(void 0+"search-input"),placeholder:h,ref:L}),e.createElement(E,{className:"nj-navbar__search-button",label:p,type:"submit",onClick:e=>{e.preventDefault();const t=L&&L.current;if(!t||"function"!=typeof f)return!1;{const n=t.value;f(n,e),t.value="",A(!N)}}}),e.createElement("a",{href:"#",className:"nj-navbar__nav-link nj-navbar__nav-link--icon nj-collapse-inline__close","aria-label":"Close",onClick:w},e.createElement(r,{variant:"brand",name:"close"}))))))})),Cn=e.forwardRef((({id:t,href:n,title:s,target:a,onClickItem:r,className:o,isDisabled:l,isActive:c,children:d},u)=>{const m=i.classNames("nj-navbar__nav-link",{active:c,disabled:l});return e.createElement("li",{ref:u,className:i.classNames("nj-navbar__nav-item",o),id:t},e.createElement("a",{className:m,href:n,role:"menuitem",title:s,onClick:e=>{e.preventDefault(),"function"==typeof r&&r(t,e)},target:a},d))})),wn=e.forwardRef((({count:t,currentItem:n=1,ariaLabelPrevious:s,ariaLabelNext:a,onChange:o,...l},c)=>{const[d,u]=e.useState(n),m=Array(t).fill({}),h={left:!1,right:!1};if(t>6){let e=!1,n=!1;d>3&&(n=!0),d<=t-3&&(e=!0),h.right=e,h.left=n}e.useEffect((()=>{n<1?n=1:n>t&&(n=t),u(n)}),[n]);const p=(e,n)=>{e.preventDefault();const i=e.currentTarget;let s=d;n?.previous?(u((e=>e-1)),s=d-1):n?.next?(u((e=>e+1)),s=d+1):(s=parseInt(i.dataset.index??"0",10),u(s)),d<1?(u(1),s=1):d>t&&(u(t),s=t),d!=s&&"function"==typeof o&&o(s,e)};return e.createElement("nav",{...l,ref:c,"aria-label":"pagination navigation",role:"navigation"},e.createElement("ul",{className:"nj-pagination"},e.createElement("li",{className:"nj-pagination__item",key:"arrowLeft"},e.createElement(Kt,{size:"sm",icon:"chevron_left",label:s,onClick:e=>p(e,{previous:!0}),isDisabled:1===d})),m.map(((n,s)=>{if((e=>1===e||e===t||e===d||e>=d-1&&e<=d+1||e<6&&d<4||e>=t-6+2&&d>=t-2)(s+1))return e.createElement(e.Fragment,{key:s},s+1===t&&h.right&&e.createElement("li",{className:"nj-pagination__item",key:t+1},e.createElement(r,{name:"more_horiz",className:"nj-pagination__more"}),e.createElement("span",{className:"nj-sr-only"},"...")),e.createElement("li",{className:i.classNames("nj-pagination__item",{"nj-pagination__item--active":d===s+1}),key:s+1},e.createElement("button",{className:"nj-pagination__link","aria-label":`Page ${s+1}`,onClick:p,"data-index":s+1,"aria-current":d===s+1?"true":void 0},s+1)),s+1===1&&h.left&&e.createElement("li",{className:"nj-pagination__item",key:0},e.createElement(r,{name:"more_horiz",className:"nj-pagination__more"}),e.createElement("span",{className:"nj-sr-only"},"...")))})),e.createElement("li",{className:"nj-pagination__item",key:"arrowRight"},e.createElement(Kt,{size:"sm",icon:"chevron_right",label:a,onClick:e=>p(e,{next:!0}),isDisabled:d===t}))))})),xn=e.forwardRef((({value:t=0,min:n=0,max:s=100,descriptionPosition:a="none",hasTransition:r,decimalPrecision:o=0,className:l,"aria-label":c,...d},u)=>{const m=i.classNames("nj-progress",{"nj-progress--has-transition":r,"nj-progress--has-right-description":"right"===a},l),h=`${((e,t,n,i)=>en?"100":Number((((e,t,n)=>e>n?n:e{const u=i.classNames("nj-progress-deprecated",{"nj-progress-deprecated--has-transition":r},l),m={width:`${h(t,n,s,o)}%`};function h(e,t,n,i){return en?"100":Number((function(e,t,n){return e>n?n:e{const p=e.useContext(kn),f=i.classNames("nj-radio",{[`nj-radio--${n}`]:n,"nj-radio--disabled":d});return e.createElement("div",{className:f},e.createElement("label",{htmlFor:t},e.createElement("input",{ref:h,type:"radio",name:s,id:t,value:r,"aria-label":l,disabled:d,"aria-labelledby":c,onChange:e=>{p.change?.(t??"nj-radio",r,e),m?.(e)},checked:o??(t?p.value===t:void 0),required:u}),a))})),Dn=e.forwardRef((({checkedId:t,orientation:n="column",onChange:s,isDisabled:a,legend:o,hasError:l,errorMessage:c,className:d,children:u},m)=>{const[h,p]=e.useState(t);e.useEffect((()=>{p(t)}),[t]);const f=i.classNames("nj-radio-group",{"nj-radio-group--row":"row"===n,"nj-radio-group--has-error":l},d);return e.createElement(kn.Provider,{value:{change:(e,t,n)=>{p(e),s?.(e,t,n)},value:h}},e.createElement("fieldset",{ref:m,className:f,disabled:a},e.createElement("legend",{className:"nj-radio-group__legend"},o,c&&e.createElement(e.Fragment,null," ",e.createElement("p",{className:"nj-radio-group__error-message"},e.createElement(r,{name:"warning"}),c))),u))})),jn=e.createContext({onClick:void 0,selectedValue:void 0,setActiveButton:void 0}),Mn=e.forwardRef((({label:t,value:n,size:s="md",onChange:a,children:r,...o},l)=>{const c=e.useRef(),[d,u]=e.useState(n),m=i.classNames("nj-segmented-control",{[`nj-segmented-control--${s}`]:s&&"md"!==s}),h=e=>{if(!e)return;const t=c.current,n=e.getBoundingClientRect();if(t){const e=t.getBoundingClientRect(),i=t.style;i.setProperty("--nj-sc-btn-selected-width",`${n.width}px`),i.setProperty("--nj-sc-btn-selected-right",e.right-n.right+"px")}};return e.createElement(jn.Provider,{value:{onClick:(e,t)=>{const n=t?.currentTarget;h(n),u(e),"function"==typeof a&&a(e)},selectedValue:d,setActiveButton:h}},r&&e.createElement("div",{...o,className:m,role:"group",ref:i.mergeRefs([c,l]),"aria-label":t},r))})),$n=e.forwardRef((({label:t,isDisabled:n,onClick:s,iconName:a,value:o,iconClass:l,...c},d)=>{const u=e.useRef(),m=e.useContext(jn),[h,p]=e.useState(m.selectedValue===o),f=i.classNames("nj-segmented-control-btn",{"nj-segmented-control-btn--selected":h});return e.useEffect((()=>{m.selectedValue===o?(p(!0),u.current&&m.setActiveButton?.(u.current)):p(!1)}),[m.selectedValue,o]),e.createElement("button",{...c,className:f,type:"button","aria-pressed":h?"true":"false",disabled:n,"data-value":o,ref:i.mergeRefs([u,d]),onClick:e=>{"function"==typeof s&&s(o,t,e),m.onClick?.(o,e)}},a&&e.createElement(r,{name:a,size:"inherit",className:i.classNames("nj-segmented-control-btn__icon",l)}),e.createElement("span",null,t))})),Pn=Dt((({id:t,name:n,label:s,data:a,ariaLabel:o,ariaLabelledBy:l,form:c,defaultValue:d,placeholder:u,isRequired:m,isDisabled:h,className:p,onChange:f})=>(a||h||(h=!0),e.createElement("div",{className:i.classNames("nj-form-group",p)},e.createElement("select",{className:"nj-form-control",id:t,name:n,form:c,"aria-label":o,"aria-labelledby":l,disabled:h,required:m,defaultValue:d,onChange:f},a&&u&&e.createElement("option",{value:"default",disabled:!0},u),a&&a.map((t=>e.createElement("optgroup",{key:t.label,label:t.label},t.options.map((t=>e.createElement("option",{key:t.value,value:t.value,disabled:t.disabled,selected:t.selected},t.label))))))),e.createElement("label",{htmlFor:"exampleSelect",className:"nj-label-static"},s),e.createElement(r,{name:"keyboard_arrow_down"})))),"GroupSelect component is deprecated, please use FormItem component with native html as child"),Fn=Dt((({id:t,name:n,label:s,data:a,ariaLabel:o,ariaLabelledBy:l,form:c,defaultValue:d,placeholder:u,isRequired:m,isDisabled:h,className:p,onChange:f})=>(a||h||(h=!0),e.createElement("div",{className:i.classNames("nj-form-group",p)},e.createElement("select",{className:"nj-form-control",id:t,name:n,form:c,"aria-label":o,"aria-labelledby":l,disabled:h,required:m,defaultValue:d,onChange:f},a&&u&&e.createElement("option",{value:"default",disabled:!0},u),a&&a.map((t=>e.createElement("option",{key:t.value,value:t.value,disabled:t.disabled,selected:t.selected},t.label)))),e.createElement("label",{htmlFor:"exampleSelect",className:"nj-label-static"},s),e.createElement(r,{name:"keyboard_arrow_down"})))),"Select component is deprecated, please use FormItem component with native html as child"),Kn=/^[\d\p{Letter}]$/u,Yn=e.forwardRef(((t,n)=>{const{id:s,name:a,placeholder:r,form:o,isRequired:l,isDisabled:c,iconName:d,value:u,onChange:m,onBlur:h,onClick:p,children:f,label:E,buttonDefaultValueLabel:g,listNavigationLabel:b,shouldCloseOnSelect:_=!0,className:v}=t,[N,A]=e.useState(!1),[T,y]=e.useState(-1),S=e.useRef(null),L=e.useRef(null),C=e.useRef(null),w=i.classNames("static"===t.labelKind?"nj-form-item--static":null,"nj-form-item--select","nj-form-item--custom-list",{"nj-form-item--open":N},v),x=e.Children.map(f,(e=>e.props.value??e.props.children)),R=e.Children.map(f,(e=>e.props.children)),I=x.indexOf(u),k=e.Children.map(f,((t,n)=>{if(e.isValidElement(t))return e.cloneElement(t,{isActive:n===I,type:"list",isClickable:!0,isCustomSelectItem:!0,ariaSelected:n===I,onClick:()=>{m(x[n]),_&&(A(!1),C.current?.focus())}})}));function O(e){S.current?.contains(e.relatedTarget)||(A(!1),h?.(e))}return e.useLayoutEffect((()=>{N&&L.current?(L.current.focus(),y(I),-1===I&&L.current.scrollTo({top:0})):y(-1)}),[N]),e.useLayoutEffect((()=>{-1!==T&&(L.current?.childNodes[T]).focus()}),[T]),e.useLayoutEffect((()=>{S.current&&S.current.addEventListener("focusout",O)}),[S]),e.useEffect((()=>{S?.current&&(S.current.inert=t.readOnly??!1)}),[t.readOnly,S]),e.createElement(e.Fragment,null,e.createElement(Vt,{...t,isSelect:!0,className:w,iconName:d??"keyboard_arrow_down",iconClassName:"nj-form-item__icon",labelClassName:"nj-form-item__label",ref:S},e.createElement("input",{"data-child-name":"inputField",type:"text",id:s,ref:n,name:a,value:R[I]||"",disabled:c,required:l,"aria-hidden":!0,placeholder:r||" ",form:o,tabIndex:-1,className:"nj-form-item__field",readOnly:!0}),I,e.createElement("div",{"data-child-name":"additionalContent"},e.createElement("p",{id:`${s}-instructions`,hidden:!0},b),e.createElement("button",{"aria-haspopup":"listbox","aria-expanded":N,"aria-describedby":`${s}-subscript ${s}-instructions`,role:"combobox",type:"button",className:"nj-form-item__custom-list-button","aria-label":`${E} - ${u||g}`,tabIndex:N?-1:void 0,ref:C,onClick:function(e){A(!N),p&&"function"==typeof p&&p(e)}}),N&&e.createElement(qt,{className:"nj-form-item__list nj-list-deprecated--clickable",density:"dense",isBorderless:!0,isCustomSelectList:!0,ariaLabel:E,ref:L,onKeydown:function(t){if(27===t.keyCode&&(A(!1),C.current?.focus()),38===t.keyCode&&(t.preventDefault(),y(Math.max(0,T-1))),40===t.keyCode&&(t.preventDefault(),y(Math.min(e.Children.count(f)-1,T+1))),13===t.keyCode&&(t.preventDefault(),-1!==T&&m(x[T]),A(!1),C.current?.focus()),Kn.test(t.key)){const e=x.findIndex((e=>e[0].toLowerCase()===t.key.toLowerCase()));-1!==e&&y(e)}}},k))))})),Vn=e.forwardRef((({id:t,isFolded:n=!1,children:s,className:a},r)=>{const o=i.classNames("nj-sidebar",{"nj-sidebar--folded":n},a),l=s?e.Children.map(s,(t=>e.cloneElement(t,{isFolded:n}))):null;return e.createElement("div",{id:t,ref:r,className:o},l)})),Bn=e.forwardRef((({isFolded:t,isFooterNav:n,children:s,className:a},r)=>{const o=i.classNames("nj-sidebar__navigation",{"nj-sidebar__navigation--footer":n},a),l=s?e.Children.map(s,(n=>e.cloneElement(n,{isFolded:t}))):[];return e.createElement("nav",{ref:r,className:o},e.createElement(qt,{density:"dense",isBorderless:!0,hasSpaceBetweenItems:!0},l))})),Hn=e.forwardRef((({id:t,href:n,title:s,target:a,imageSrc:r,imageAlt:o,imageFoldedSrc:l,imageFoldedAlt:c,onClick:d,className:u},m)=>{const h=i.classNames("nj-sidebar__brand",u);return e.createElement("a",{ref:m,className:h,id:t,href:n,title:s,target:a,onClick:d},e.createElement("img",{className:"nj-sidebar__logo",src:r??"https://design.digital.engie.com/assets/brand/logo-engie-blue.svg",alt:o??"",width:"100px"}),e.createElement("img",{className:"nj-sidebar__logo--folded",src:l??"https://design.digital.engie.com/assets/brand/logo-engie-small-blue.svg",alt:c??"",width:"auto",height:"36"}))})),qn=e.forwardRef((({listItemId:t,type:n="link",onClickItem:i,icon:s,children:a,...r},o)=>e.createElement(Ut,{...r,ref:o,listItemId:t,hasRightBorder:!0,type:n,onClick:e=>{t&&i?.(t,e)},icon:s&&{...s,className:"nj-sidebar__item-icon"}},a))),zn=e.forwardRef((({className:t},n)=>{const s=i.classNames("nj-sidebar__divider",t);return e.createElement("div",{ref:n,className:s})})),Un=e.forwardRef((({isAboveContent:t=!1,children:n,className:s},a)=>{const r=i.classNames("nj-sidebar-content",{"nj-sidebar-content--nopush":t},s);return e.createElement("div",{ref:a,className:r},n)})),Gn=e.forwardRef((({id:t,onClick:n,isFolded:i,children:s,className:a},r)=>e.createElement(qt,{ref:r,density:"dense",isBorderless:!0,className:"nj-sidebar__collapse"},e.createElement(Ut,{listItemId:t,type:"button",onClick:n,noActiveBorder:!0,icon:{name:"chevron_left",className:"nj-sidebar__fold-btn"},isFolded:i,className:a},i?null:s||"Close")))),Xn=e.forwardRef((({header:t,children:n,footer:i},s)=>e.createElement("div",{ref:s,className:"nj-sidepanel"},t&&e.createElement("div",{className:"nj-sidepanel__header"},t),e.createElement("div",{className:"nj-sidepanel__content"},n),i&&e.createElement("div",{className:"nj-sidepanel__footer"},i)))),Jn=e.forwardRef((({title:t,children:n,hasCloseIcon:i=!0,onCloseIconClicked:s,closeIconLabel:a="Close",actions:r=[]},o)=>{const l=i||r?.length,c=t?e.createElement("span",{className:"nj-sidepanel-header__title"},t):e.createElement("div",{className:"nj-sidepanel-header__custom-title"},n);return e.createElement("div",{ref:o,className:"nj-sidepanel-header"},c,l&&e.createElement("div",{className:"nj-sidepanel-header__actions"},r,i&&e.createElement(Kt,{label:a,variant:"tertiary",icon:"close",onClick:s})))})),Wn=e.forwardRef((({isOpen:t=!1,isOverContent:n=!1,children:s,sidepanel:a},r)=>{const o=i.classNames("nj-sidepanel-layout",{"nj-sidepanel-layout--over-content":n});return e.createElement("div",{ref:r,className:o},e.createElement("div",{className:"nj-sidepanel-layout__content"},s),a&&t&&e.createElement("div",{className:"nj-sidepanel-layout__sidepanel"},a))})),Zn=e.forwardRef((({screenReaderLabel:t="Content is loading",children:n,className:s},a)=>{const r=i.classNames("nj-skeleton-container",s);return e.createElement("div",{ref:a,className:r},n,e.createElement("span",{className:"nj-sr-only"},t))})),Qn=e.forwardRef((({height:t,width:n,style:s,className:a},r)=>{const o=i.classNames("nj-skeleton",a),l={...s,...i.isUndefinedOrNull(t)&&i.isUndefinedOrNull(s?.height)?{}:{height:t??s?.height},...i.isUndefinedOrNull(n)&&i.isUndefinedOrNull(s?.width)?{}:{width:n??s?.width}};return e.createElement("div",{ref:r,"aria-hidden":"true",style:l,className:o})})),ei=e.forwardRef(((t,n)=>{const s=i.classNames(t.className,"nj-skeleton--rectangle",{[`nj-skeleton--${t.size}`]:t.size});return e.createElement(Qn,{ref:n,className:s,...t})})),ti=e.forwardRef(((t,n)=>{const s=i.classNames(t.className,"nj-skeleton--circle",{[`nj-skeleton--${t.variant}`]:t.variant});return e.createElement(Qn,{ref:n,className:s,...t})})),ni=e.forwardRef((({icon:t,height:n,width:s,children:a,style:o,className:l},c)=>{const d=i.classNames("nj-skeleton","nj-skeleton--area",l),u={...o,...i.isUndefinedOrNull(n)&&i.isUndefinedOrNull(o?.height)?{}:{height:n??o?.height},...i.isUndefinedOrNull(s)&&i.isUndefinedOrNull(o?.width)?{}:{width:s??o?.width}};return e.createElement("div",{ref:c,"aria-hidden":"true",style:u,className:d},a&&!t?(t=>{const n=i.classNames(t?.props.className,"nj-skeleton__icon");return e.cloneElement(t,{className:n})})(a):e.createElement(r,{name:t??"image",size:"xl",variant:"tertiary",className:"nj-skeleton__icon"}))})),ii=e.forwardRef((({id:t,label:n,name:s,min:a,max:r,value:o,step:l,hasTooltip:c=!1,onChange:d,className:u,isDisabled:m},h)=>{const[p,f]=e.useState(o),E=e.useRef(null);let g;e.useEffect((()=>(E.current&&(Rt.init(),g=E.current),()=>{g&&Rt.getInstance(g)?.dispose()})),[]),e.useEffect((()=>{d?.(p)}),[p]);const b=i.classNames("nj-slider",{"nj-slider--disabled":m},u);return e.createElement("div",{className:b,"data-tooltip":`${c}`,ref:E},t&&n&&e.createElement(e.Fragment,null,e.createElement("label",{htmlFor:t},n),e.createElement("input",{ref:h,min:a,max:r,step:l,type:"range",id:t,name:s,value:p,onChange:e=>{f(+e.target.value)},disabled:m})))})),si=e.forwardRef((({text:t,values:n,iconLeftProps:s,iconRightProps:a,isDisabled:o,isChecked:l=!1,variant:c,ariaLabel:d,ariaLabelledBy:u,id:m,name:h,title:p,className:f,onChange:E},g)=>{const[b,_]=e.useState(l),[v,N]=e.useState(l?n.right:n.left);e.useEffect((()=>{N(l?n.right:n.left),_(l)}),[l]);const A=i.classNames("nj-switch",{[`nj-switch--${c}`]:!!c&&"primary"!==c},f);return e.createElement("div",{className:A},e.createElement("label",null,e.createElement("input",{ref:g,type:"checkbox",checked:b,id:m,name:h,value:v.toString(),title:p,"aria-label":d,disabled:o,"aria-labelledby":u,onChange:e=>{const t=e.target.checked,i=t?n.right:n.left;_(t),N(i),E&&"function"==typeof E&&E(e,t,i)},onKeyDown:e=>{" "==e.key&&(e.preventDefault(),_(!b))},onClick:()=>{_(!b)}}),e.createElement("span",{className:"nj-switch__slider"},e.createElement("span",{className:"nj-switch__slider-left"},t&&t.left,s&&e.createElement(r,{...s})),e.createElement("span",{className:"nj-switch__slider-right"},t&&t.right,a&&e.createElement(r,{...a})))))})),ai=Dt(si,"Alert component is deprecated, please use Toast component instead"),ri=e.forwardRef((({id:t,label:n,isActive:s,isDisabled:a,ariaControls:r,onClick:o,badgeOptions:l,...c},d)=>{const u=i.classNames("nj-tab__item",{"nj-tab__item--active":s});return e.createElement("button",{...c,ref:d,className:u,id:t,role:"tab","aria-selected":s,tabIndex:s?0:-1,"aria-controls":r,disabled:a,onClick:e=>o?.(t,n,e)},n,l&&e.createElement(Xt,{...l,size:"md"}))})),oi=e.forwardRef((({id:t,ariaLabelledBy:n,isActive:s,children:a},r)=>{const o=i.classNames("nj-tab__content",{"nj-tab__content--active":s});return e.createElement("div",{ref:r,className:o,id:t,"aria-labelledby":n,role:"tabpanel",tabIndex:0},a)})),li=e.forwardRef((({label:t,activeTab:n,onClickTabItem:s,density:a,children:r,...o},l)=>{const[c,d]=e.useState(n),u=(e,t,n)=>{s?.(e,t,n),d(e)},m=e=>{const t=e.target;switch(e.key){case"ArrowRight":e.preventDefault(),t.nextElementSibling?.focus();break;case"ArrowLeft":e.preventDefault(),t.previousElementSibling?.focus();break;case"Enter":e.preventDefault(),t.click()}},h=e.Children.map(r,(t=>e.cloneElement(t,{onClick:u,isActive:!!c&&t.props.id===c,onKeyDown:m}))),p=i.classNames("nj-tab",{[`nj-tab--${a}`]:a&&"normal"!==a});return e.createElement("div",{...o,className:p,ref:l},e.createElement("div",{className:"nj-tab__items",role:"tablist","aria-label":t},h),e.createElement("div",null,e.Children.map(h,((t,n)=>e.createElement(oi,{id:`${t.props.ariaControls}`,ariaLabelledBy:t.props.id,key:n,isActive:t.props.isActive??!1},t.props.children)))))})),ci=Dt((({id:t,name:n,value:s="",label:a,labelKind:o="static",className:l,cols:c,rows:d=2,onClick:u,title:m,ariaLabel:h,ariaLabelledBy:p,isDisabled:f,autocomplete:E,required:g,placeholder:b,helpText:_,iconName:v,iconPosition:N="left",iconClick:A,onChange:T,maxLength:y,minLength:S,readOnly:L,form:C,tabIndex:w,wrap:x})=>{const[R,I]=e.useState(!1),[k,O]=e.useState(!1),[D,j]=e.useState(s);e.useEffect((()=>{O(!!D)}),[D]),e.useEffect((()=>{j(s)}),[s]);const M=i.classNames("nj-form-group",{"is-focused":R,"is-filled":k,[`nj-form-group--icon-${N}`]:v},l);return e.createElement("div",{className:M},e.createElement("label",{htmlFor:t,className:`nj-label-${o}`},a),e.createElement("textarea",{cols:c,rows:d,id:t,name:n,value:D,onClick:u,onChange:e=>{j(e.currentTarget.value),T&&"function"==typeof T&&T(e)},onBlur:()=>{I(!1)},onFocus:()=>{I(!0)},title:m,"aria-label":h,"aria-labelledby":p,"aria-disabled":f,disabled:f,autoComplete:E,required:g,"aria-required":g,placeholder:b,className:"nj-form-control",wrap:x,maxLength:y,minLength:S,readOnly:L,form:C,tabIndex:w}),v&&e.createElement(r,{name:v,onClick:A}),e.createElement("span",{className:"nj-help"},_))}),"Input is deprecated and should be replaced by FormItem component"),di=e.forwardRef((({id:t,iconName:n,title:s,children:a,isInverse:o,gaugeLabel:l,hasCloseIcon:c=!0,shouldDismiss:d=!0,dismissAfter:u=5e3,onClose:m,closeToast:h},p)=>{let f;e.useEffect((()=>(d&&(f=setTimeout((()=>{h?.(t)}),u)),()=>{d&&clearTimeout(f)})),[]);const E=i.classNames("nj-toast",{"nj-toast--inverse":o}),g=`toast-description-${t}`;return e.createElement("div",{ref:p,id:t,className:E},e.createElement("div",{className:"nj-toast__body"},n&&e.createElement(r,{name:n,className:"nj-toast__icon"}),e.createElement("div",{className:"nj-toast__content"},s&&e.createElement("p",{className:"nj-toast__title",id:g},s),e.isValidElement(a)?a:e.createElement("p",{className:"nj-toast__text",id:s?void 0:g},a))),c&&e.createElement("div",{className:"nj-toast__action"},e.createElement(Kt,{type:"button",variant:o?"primary":"inverse",size:"sm",icon:"close",label:"Close",ariaDescribedby:g,onClick:()=>m?.(t)})),d&&u>0&&e.createElement("div",{className:"nj-toast__gauge"},e.createElement("div",{className:"nj-toast__gauge-bar",style:{animationDuration:`${u}ms`}},e.createElement("p",{className:"nj-sr-only"},l))))})),ui=e.memo(di,(function(e,t){return e.id===t.id}));var mi;function hi(){return Math.random().toString(36).substring(2,18)}!function(e){e[e.ADD_TOAST=0]="ADD_TOAST",e[e.UPDATE_TOAST=1]="UPDATE_TOAST",e[e.UPSERT_TOAST=2]="UPSERT_TOAST",e[e.REMOVE_TOAST=3]="REMOVE_TOAST",e[e.REMOVE_ALL_TOAST=4]="REMOVE_ALL_TOAST"}(mi||(mi={}));const pi=()=>(e,t)=>{const n=((e,t)=>({id:t?.id||hi(),createdAt:Date.now(),children:e,hasCloseIcon:t?.hasCloseIcon??!0,shouldDismiss:t?.shouldDismiss??!0,dismissAfter:t?.dismissAfter??5e3,ariaProps:{role:"status","aria-live":"polite"},...t}))(e,t);return _i({type:mi.ADD_TOAST,toast:n}),n.id},fi=(e,t)=>pi()(e,t);fi.dismiss=e=>{_i({type:mi.REMOVE_TOAST,toastId:e})},fi.dismissAll=()=>{_i({type:mi.REMOVE_ALL_TOAST})};const Ei=(e,t)=>{switch(t.type){case mi.ADD_TOAST:return[...e,t.toast].slice(0,20);case mi.UPDATE_TOAST:return e.map((e=>e.id===t.toast.id?{...e,...t.toast}:e));case mi.UPSERT_TOAST:{const{toast:n}=t;return e.some((e=>e.id===n.id))?Ei(e,{type:mi.UPDATE_TOAST,toast:n}):Ei(e,{type:mi.ADD_TOAST,toast:n})}case mi.REMOVE_TOAST:{const{toastId:n}=t;return[...e].filter((e=>e.id!==n))}case mi.REMOVE_ALL_TOAST:return[];default:throw new Error("Action not allowed")}};let gi=[];const bi=[],_i=e=>{gi=Ei(gi,e),bi.forEach((e=>{e(gi)}))},vi=()=>{const[t,n]=e.useState(gi);return e.useEffect((()=>(bi.push(n),()=>{const e=bi.indexOf(n);e>-1&&bi.splice(e,1)})),[t]),t},Ni=e.forwardRef((({type:t="default"},n)=>{const s=vi(),a=i.classNames("nj-toast__container",{"nj-toast__container--full-width":"full-width"===t});return e.createElement("div",{ref:n,className:a,"aria-live":"polite","aria-atomic":"false"},s?.map((t=>e.createElement(ui,{key:t.id,closeToast:()=>fi.dismiss(t.id),onClose:()=>fi.dismiss(t.id),...t},t.children))))})),Ai=e.forwardRef((({id:t,name:n,label:s,size:a,values:r,isChecked:o=!1,ariaLabel:l,ariaLabelledBy:c,isDisabled:d,className:u,children:m,isColorInherited:h,onChange:p},f)=>{let E;const[g,b]=e.useState(o),[_,v]=e.useState(o?r.on:r.off);e.useEffect((()=>{v(o?r.on:r.off),b(o)}),[o]);const N=i.classNames("nj-toggle",{[`nj-toggle--${a}`]:a&&"md"!==a,"nj-toggle--disabled":d,"nj-toggle--inherit":h},u);void 0!==m&&e.Children.forEach(m,(t=>{t&&e.isValidElement(t)&&"njToggleIcon"===t.props["data-child-name"]&&(E=t)}));return e.createElement("div",{className:N},e.createElement("label",{htmlFor:t},e.createElement("input",{ref:f,type:"checkbox",checked:g,id:t,name:n,value:_.toString(),disabled:d,"aria-label":l,"aria-labelledby":c,role:"switch",onChange:e=>{const t=e.target.checked,n=t?r.on:r.off;b(t),v(n),p&&"function"==typeof p&&p(e,t,n)}}),e.createElement("span",{className:"nj-toggle__track"}),E?(()=>{if(!E)return;const t=E,n=i.classNames(t.props.className,"nj-toggle__icon");return e.cloneElement(t,{className:n})})():m,E?e.createElement("span",{className:"nj-sr-only"},s):s))}));exports.NJAccordion=a,exports.NJAccordionAction=g,exports.NJAccordionActions=b,exports.NJAccordionItem=_,exports.NJAccordionItemContent=v,exports.NJAccordionItemHeader=N,exports.NJAlert=jt,exports.NJAutocomplete=Ft,exports.NJAutocompleteInput=Gt,exports.NJAvatar=en,exports.NJAvatarList=tn,exports.NJBadge=Xt,exports.NJBreadcrumb=nn,exports.NJBreadcrumbItem=ln,exports.NJBullet=cn,exports.NJButton=E,exports.NJCard=dn,exports.NJCardBody=un,exports.NJCardCover=mn,exports.NJCheckbox=zt,exports.NJDropdown=pn,exports.NJFab=fn,exports.NJFabMenu=En,exports.NJFooter=gn,exports.NJFormItem=Vt,exports.NJGroupSelect=Pn,exports.NJIcon=r,exports.NJIconButton=Kt,exports.NJIconEngie=({name:t,variant:n,className:s,onClick:a,onKeyPress:r,ariaLabel:l})=>{const c=i.classNames("nj-icon",{[`nj-icon-${t}`]:t,[`nj-icon--${n}`]:n&&"default"!==n},s);return e.createElement(o,{isEngieIcon:!0,className:c,name:t,onClick:a,ariaLabel:l,onKeyPress:r})},exports.NJInlineMessage=({isClosable:t=!1,isVisible:n=!0,hasStatus:s=!0,onClose:a,ariaLabelClose:r="",children:o,...l})=>{const c="fatal_error"===l.variant?"fatal-error":l.variant??"error";let d,u;const[m,h]=e.useState(n),p=e.useRef(null);let f;e.useEffect((()=>{if(t)return p.current&&(W.SELECTOR={default:`.${W.NAME}`,dismiss:`.${W.NAME}__close`},f=p.current,W.init(),W.getInstance(f).closeAndDestroy=()=>{}),()=>{f&&W.getInstance(f).dispose()}}),[t]);const E=i.classNames(bn,{[`${bn}--${c}`]:c&&"error"!==c});return e.Children.forEach(o,(t=>{t&&e.isValidElement(t)&&("njInlineMessageTitle"===t.props["data-child-name"]?d=t:u?.length?u.push(t):u=[t])})),e.createElement(e.Fragment,null,m&&e.createElement("div",{className:E,ref:p},s&&"fatal-error"!==c&&e.createElement(Wt,{className:`${bn}__status`,status:c}),e.createElement("div",{className:`${bn}__content`},d&&e.createElement("h4",{className:`${bn}__title`},d),u&&e.createElement("div",{className:`${bn}__body`},u)),t&&e.createElement(Kt,{label:r,onClick:e=>{"function"==typeof a&&a(e),p&&p.current&&W.getInstance(p.current).close((()=>{h(!1)}))},className:`${bn}__close`,icon:"close",variant:"fatal-error"===c?"inverse":"primary"})))},exports.NJInput=_n,exports.NJInputSearch=vn,exports.NJLinearProgressDeprecated=In,exports.NJLink=on,exports.NJList=qt,exports.NJListItem=Ut,exports.NJMemoizedToast=ui,exports.NJModal=({children:t,...n})=>e.createElement(Nn,{...n},e.createElement("div",{className:"nj-modal__body"},t)),exports.NJModalInformation=An,exports.NJMultiSelect=Sn,exports.NJNavbar=Ln,exports.NJNavbarItem=Cn,exports.NJPagination=wn,exports.NJProgress=xn,exports.NJRadio=On,exports.NJRadioGroup=Dn,exports.NJSegmentedControl=Mn,exports.NJSegmentedControlButton=$n,exports.NJSelect=Fn,exports.NJSelectInput=Yn,exports.NJSidebar=Vn,exports.NJSidebarBrand=Hn,exports.NJSidebarClose=Gn,exports.NJSidebarContent=Un,exports.NJSidebarDivider=zn,exports.NJSidebarItem=qn,exports.NJSidebarMenu=Bn,exports.NJSidepanel=Xn,exports.NJSidepanelHeader=Jn,exports.NJSidepanelLayout=Wn,exports.NJSkeletonArea=ni,exports.NJSkeletonCircle=ti,exports.NJSkeletonContainer=Zn,exports.NJSkeletonRectangle=ei,exports.NJSlider=ii,exports.NJSpinner=p,exports.NJStatusIndicator=Wt,exports.NJSwitch=ai,exports.NJTab=ri,exports.NJTabPanel=oi,exports.NJTabs=li,exports.NJTag=Tn,exports.NJTextarea=ci,exports.NJToast=di,exports.NJToastContainer=Ni,exports.NJToastService=fi,exports.NJToggle=Ai,exports.NJTooltip=Zt,exports.deprecatedDropdown=hn,exports.deprecatedProgress=Rn,exports.dispatch=_i,exports.generateToastId=hi,exports.reducer=Ei,exports.switchStyleToCssClasses={primary:"nj-switch--primary",success:"nj-switch--success",warning:"nj-switch--warning",danger:"nj-switch--danger"},exports.useToastStore=vi;