@usex/mikrotik-mcp 4.5.0 → 4.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -74,87 +74,88 @@ Error generating stack: `+e.message+`
74
74
  `},yd=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},bd=function(){v.useEffect(function(){return document.body.setAttribute(_d,(yd()+1).toString()),function(){var e=yd()-1;e<=0?document.body.removeAttribute(_d):document.body.setAttribute(_d,e.toString())}},[])},xd=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;bd();var a=v.useMemo(function(){return hd(i)},[i]);return v.createElement(gd,{styles:vd(a,!t,i,n?``:`!important`)})},Sd=!1;if(typeof window<`u`)try{var Cd=Object.defineProperty({},"passive",{get:function(){return Sd=!0,!0}});window.addEventListener(`test`,Cd,Cd),window.removeEventListener(`test`,Cd,Cd)}catch{Sd=!1}var wd=Sd?{passive:!1}:!1,Td=function(e){return e.tagName===`TEXTAREA`},Ed=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Td(e)&&n[t]===`visible`)},Dd=function(e){return Ed(e,`overflowY`)},Od=function(e){return Ed(e,`overflowX`)},kd=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Md(e,r)){var i=Nd(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Ad=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},jd=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Md=function(e,t){return e===`v`?Dd(t):Od(t)},Nd=function(e,t){return e===`v`?Ad(t):jd(t)},Pd=function(e,t){return e===`h`&&t===`rtl`?-1:1},Fd=function(e,t,n,r,i){var a=Pd(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Nd(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Md(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Id=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ld=function(e){return[e.deltaX,e.deltaY]},Rd=function(e){return e&&`current`in e?e.current:e},zd=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Bd=function(e){return`
75
75
  .block-interactivity-${e} {pointer-events: none;}
76
76
  .allow-interactivity-${e} {pointer-events: all;}
77
- `},Vd=0,Hd=[];function Ud(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(Vd++)[0],a=v.useState(dd)[0],o=v.useRef(e);v.useEffect(function(){o.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Bu([e.lockRef.current],(e.shards||[]).map(Rd),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=v.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Id(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=kd(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=kd(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Fd(h,t,e,h===`h`?s:c,!0)},[]),c=v.useCallback(function(e){var n=e;if(!(!Hd.length||Hd[Hd.length-1]!==a)){var r=`deltaY`in n?Ld(n):Id(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&zd(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Rd).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=v.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Wd(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=v.useCallback(function(e){n.current=Id(e),r.current=void 0},[]),d=v.useCallback(function(t){l(t.type,Ld(t),t.target,s(t,e.lockRef.current))},[]),f=v.useCallback(function(t){l(t.type,Id(t),t.target,s(t,e.lockRef.current))},[]);v.useEffect(function(){return Hd.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,wd),document.addEventListener(`touchmove`,c,wd),document.addEventListener(`touchstart`,u,wd),function(){Hd=Hd.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,wd),document.removeEventListener(`touchmove`,c,wd),document.removeEventListener(`touchstart`,u,wd)}},[]);var p=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(a,{styles:Bd(i)}):null,p?v.createElement(xd,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Wd(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Gd=ed(td,Ud),Kd=v.forwardRef(function(e,t){return v.createElement(rd,Ru({},e,{ref:t,sideCar:Gd}))});Kd.classNames=rd.classNames;var qd=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Jd=new WeakMap,Yd=new WeakMap,Xd={},Zd=0,Qd=function(e){return e&&(e.host||Qd(e.parentNode))},$d=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Qd(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},ef=function(e,t,n,r){var i=$d(t,Array.isArray(e)?e:[e]);Xd[n]||(Xd[n]=new WeakMap);var a=Xd[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Jd.get(e)||0)+1,l=(a.get(e)||0)+1;Jd.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Yd.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Zd++,function(){o.forEach(function(e){var t=Jd.get(e)-1,i=a.get(e)-1;Jd.set(e,t),a.set(e,i),t||(Yd.has(e)||e.removeAttribute(r),Yd.delete(e)),i||e.removeAttribute(n)}),Zd--,Zd||(Jd=new WeakMap,Jd=new WeakMap,Yd=new WeakMap,Xd={})}},tf=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||qd(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),ef(r,i,n,`aria-hidden`)):function(){return null}},nf=`Dialog`,[rf,af]=Nl(nf),[of,sf]=rf(nf),cf=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=v.useRef(null),c=v.useRef(null),[l,u]=zl({prop:r,defaultProp:i??!1,onChange:a,caller:nf});return(0,K.jsx)(of,{scope:t,triggerRef:s,contentRef:c,contentId:Zl(),titleId:Zl(),descriptionId:Zl(),open:l,onOpenChange:u,onOpenToggle:v.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};cf.displayName=nf;var lf=`DialogTrigger`,uf=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=sf(lf,n),a=dl(t,i.triggerRef);return(0,K.jsx)(Ol.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Af(i.open),...r,ref:a,onClick:Il(e.onClick,i.onOpenToggle)})});uf.displayName=lf;var df=`DialogPortal`,[ff,pf]=rf(df,{forceMount:void 0}),mf=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=sf(df,t);return(0,K.jsx)(ff,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,K.jsx)(Ul,{present:n||a.open,children:(0,K.jsx)(Nu,{asChild:!0,container:i,children:e})}))})};mf.displayName=df;var hf=`DialogOverlay`,gf=v.forwardRef((e,t)=>{let n=pf(hf,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=sf(hf,e.__scopeDialog);return a.modal?(0,K.jsx)(Ul,{present:r||a.open,children:(0,K.jsx)(vf,{...i,ref:t})}):null});gf.displayName=hf;var _f=fl(`DialogOverlay.RemoveScroll`),vf=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=sf(hf,n),a=dl(t,uu());return(0,K.jsx)(Kd,{as:_f,allowPinchZoom:!0,shards:[i.contentRef],children:(0,K.jsx)(Ol.div,{"data-state":Af(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})}),yf=`DialogContent`,bf=v.forwardRef((e,t)=>{let n=pf(yf,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=sf(yf,e.__scopeDialog);return(0,K.jsx)(Ul,{present:r||a.open,children:a.modal?(0,K.jsx)(xf,{...i,ref:t}):(0,K.jsx)(Sf,{...i,ref:t})})});bf.displayName=yf;var xf=v.forwardRef((e,t)=>{let n=sf(yf,e.__scopeDialog),r=v.useRef(null),i=dl(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return tf(e)},[]),(0,K.jsx)(Cf,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:Il(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Il(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:Il(e.onFocusOutside,e=>e.preventDefault())})}),Sf=v.forwardRef((e,t)=>{let n=sf(yf,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return(0,K.jsx)(Cf,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),Cf=v.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=sf(yf,n);return Iu(),(0,K.jsx)(K.Fragment,{children:(0,K.jsx)(bu,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,K.jsx)(su,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Af(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})}),wf=`DialogTitle`,Tf=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=sf(wf,n);return(0,K.jsx)(Ol.h2,{id:i.titleId,...r,ref:t})});Tf.displayName=wf;var Ef=`DialogDescription`,Df=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=sf(Ef,n);return(0,K.jsx)(Ol.p,{id:i.descriptionId,...r,ref:t})});Df.displayName=Ef;var Of=`DialogClose`,kf=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=sf(Of,n);return(0,K.jsx)(Ol.button,{type:`button`,...r,ref:t,onClick:Il(e.onClick,()=>i.onOpenChange(!1))})});kf.displayName=Of;function Af(e){return e?`open`:`closed`}function jf(e){let t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Mf(e){let[t,n]=v.useState(void 0);return Ll(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var Nf=`Checkbox`,[Pf,Ff]=Nl(Nf),[If,Lf]=Pf(Nf);function Rf(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=zl({prop:n,defaultProp:i??!1,onChange:c,caller:Nf}),[m,h]=v.useState(null),[g,_]=v.useState(null),y=v.useRef(!1),b=m?!!o||!!m.closest(`form`):!0,x={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:y,required:l,defaultChecked:qf(i)?!1:i,isFormControl:b,bubbleInput:g,setBubbleInput:_};return(0,K.jsx)(If,{scope:t,...x,children:Kf(d)?d(x):r})}var zf=`CheckboxTrigger`,Bf=v.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=Lf(zf,e),h=dl(i,u),g=v.useRef(c);return v.useEffect(()=>{let e=a?.form;if(e){let t=()=>d(g.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,K.jsx)(Ol.button,{type:`button`,role:`checkbox`,"aria-checked":qf(c)?`mixed`:c,"aria-required":l,"data-state":Jf(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:h,onKeyDown:Il(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:Il(n,e=>{d(e=>qf(e)?!0:!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});Bf.displayName=zf;var Vf=v.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,K.jsx)(Rf,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Bf,{...d,ref:t,__scopeCheckbox:n}),e&&(0,K.jsx)(Gf,{__scopeCheckbox:n})]})})});Vf.displayName=Nf;var Hf=`CheckboxIndicator`,Uf=v.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=Lf(Hf,n);return(0,K.jsx)(Ul,{present:r||qf(a.checked)||a.checked===!0,children:(0,K.jsx)(Ol.span,{"data-state":Jf(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});Uf.displayName=Hf;var Wf=`CheckboxBubbleInput`,Gf=v.forwardRef(({__scopeCheckbox:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:s,disabled:c,name:l,value:u,form:d,bubbleInput:f,setBubbleInput:p}=Lf(Wf,e),m=dl(n,p),h=jf(a),g=Mf(r);v.useEffect(()=>{let e=f;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(h!==a&&n){let t=new Event(`click`,{bubbles:r});e.indeterminate=qf(a),n.call(e,qf(a)?!1:a),e.dispatchEvent(t)}},[f,h,a,i]);let _=v.useRef(qf(a)?!1:a);return(0,K.jsx)(Ol.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:o??_.current,required:s,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});Gf.displayName=Wf;function Kf(e){return typeof e==`function`}function qf(e){return e===`indeterminate`}function Jf(e){return qf(e)?`indeterminate`:e?`checked`:`unchecked`}var Yf=[`top`,`right`,`bottom`,`left`],Xf=Math.min,Zf=Math.max,Qf=Math.round,$f=Math.floor,ep=e=>({x:e,y:e}),tp={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function np(e,t,n){return Zf(e,Xf(t,n))}function rp(e,t){return typeof e==`function`?e(t):e}function ip(e){return e.split(`-`)[0]}function ap(e){return e.split(`-`)[1]}function op(e){return e===`x`?`y`:`x`}function sp(e){return e===`y`?`height`:`width`}function cp(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function lp(e){return op(cp(e))}function up(e,t,n){n===void 0&&(n=!1);let r=ap(e),i=lp(e),a=sp(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=yp(o)),[o,yp(o)]}function dp(e){let t=yp(e);return[fp(e),t,fp(t)]}function fp(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var pp=[`left`,`right`],mp=[`right`,`left`],hp=[`top`,`bottom`],gp=[`bottom`,`top`];function _p(e,t,n){switch(e){case`top`:case`bottom`:return n?t?mp:pp:t?pp:mp;case`left`:case`right`:return t?hp:gp;default:return[]}}function vp(e,t,n,r){let i=ap(e),a=_p(ip(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(fp)))),a}function yp(e){let t=ip(e);return tp[t]+e.slice(t.length)}function bp(e){return{top:0,right:0,bottom:0,left:0,...e}}function xp(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:bp(e)}function Sp(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Cp(e,t,n){let{reference:r,floating:i}=e,a=cp(t),o=lp(t),s=sp(o),c=ip(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(ap(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function wp(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=rp(t,e),p=xp(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Sp(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Sp(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Tp=50,Ep=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:wp},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Cp(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Tp&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Cp(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Dp=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=rp(e,t)||{};if(l==null)return{};let d=xp(u),f={x:n,y:r},p=lp(i),m=sp(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Xf(d[_],T),D=Xf(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=np(O,A,k),M=!c.arrow&&ap(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),Op=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=rp(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=ip(r),_=cp(o),v=ip(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[yp(o)]:dp(o)),x=p!==`none`;!d&&x&&b.push(...vp(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=up(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==cp(t))||T.every(e=>cp(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=cp(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function kp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ap(e){return Yf.some(t=>e[t]>=0)}var jp=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=rp(e,t);switch(i){case`referenceHidden`:{let e=kp(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ap(e)}}}case`escaped`:{let e=kp(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ap(e)}}}default:return{}}}}},Mp=new Set([`left`,`top`]);async function Np(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ip(n),s=ap(n),c=cp(n)===`y`,l=Mp.has(o)?-1:1,u=a&&c?-1:1,d=rp(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Pp=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Np(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Fp=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=rp(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=cp(ip(i)),p=op(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=np(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=np(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Ip=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=rp(e,t),u={x:n,y:r},d=cp(i),f=op(d),p=u[f],m=u[d],h=rp(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Mp.has(ip(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Lp=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=rp(e,t),u=await o.detectOverflow(t,l),d=ip(i),f=ap(i),p=cp(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Xf(h-u[g],v),x=Xf(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Zf(u.left,0),t=Zf(u.right,0),n=Zf(u.top,0),r=Zf(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Zf(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Zf(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Rp(){return typeof window<`u`}function zp(e){return Hp(e)?(e.nodeName||``).toLowerCase():`#document`}function Bp(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Vp(e){return((Hp(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Hp(e){return Rp()?e instanceof Node||e instanceof Bp(e).Node:!1}function Up(e){return Rp()?e instanceof Element||e instanceof Bp(e).Element:!1}function Wp(e){return Rp()?e instanceof HTMLElement||e instanceof Bp(e).HTMLElement:!1}function Gp(e){return!Rp()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Bp(e).ShadowRoot}function Kp(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=rm(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function qp(e){return/^(table|td|th)$/.test(zp(e))}function Jp(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Yp=/transform|translate|scale|rotate|perspective|filter/,Xp=/paint|layout|strict|content/,Zp=e=>!!e&&e!==`none`,Qp;function $p(e){let t=Up(e)?rm(e):e;return Zp(t.transform)||Zp(t.translate)||Zp(t.scale)||Zp(t.rotate)||Zp(t.perspective)||!tm()&&(Zp(t.backdropFilter)||Zp(t.filter))||Yp.test(t.willChange||``)||Xp.test(t.contain||``)}function em(e){let t=am(e);for(;Wp(t)&&!nm(t);){if($p(t))return t;if(Jp(t))return null;t=am(t)}return null}function tm(){return Qp??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Qp}function nm(e){return/^(html|body|#document)$/.test(zp(e))}function rm(e){return Bp(e).getComputedStyle(e)}function im(e){return Up(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function am(e){if(zp(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Gp(e)&&e.host||Vp(e);return Gp(t)?t.host:t}function om(e){let t=am(e);return nm(t)?e.ownerDocument?e.ownerDocument.body:e.body:Wp(t)&&Kp(t)?t:om(t)}function sm(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=om(e),i=r===e.ownerDocument?.body,a=Bp(r);if(i){let e=cm(a);return t.concat(a,a.visualViewport||[],Kp(r)?r:[],e&&n?sm(e):[])}else return t.concat(r,sm(r,[],n))}function cm(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function lm(e){let t=rm(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Wp(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Qf(n)!==a||Qf(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function um(e){return Up(e)?e:e.contextElement}function dm(e){let t=um(e);if(!Wp(t))return ep(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=lm(t),o=(a?Qf(n.width):n.width)/r,s=(a?Qf(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var fm=ep(0);function pm(e){let t=Bp(e);return!tm()||!t.visualViewport?fm:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function mm(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Bp(e)?!1:t}function hm(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=um(e),o=ep(1);t&&(r?Up(r)&&(o=dm(r)):o=dm(e));let s=mm(a,n,r)?pm(a):ep(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Bp(a),t=r&&Up(r)?Bp(r):r,n=e,i=cm(n);for(;i&&r&&t!==n;){let e=dm(i),t=i.getBoundingClientRect(),r=rm(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Bp(i),i=cm(n)}}return Sp({width:u,height:d,x:c,y:l})}function gm(e,t){let n=im(e).scrollLeft;return t?t.left+n:hm(Vp(e)).left+n}function _m(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-gm(e,n),y:n.top+t.scrollTop}}function vm(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Vp(r),s=t?Jp(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=ep(1),u=ep(0),d=Wp(r);if((d||!d&&!a)&&((zp(r)!==`body`||Kp(o))&&(c=im(r)),d)){let e=hm(r);l=dm(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?_m(o,c):ep(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ym(e){return Array.from(e.getClientRects())}function bm(e){let t=Vp(e),n=im(e),r=e.ownerDocument.body,i=Zf(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Zf(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+gm(e),s=-n.scrollTop;return rm(r).direction===`rtl`&&(o+=Zf(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var xm=25;function Sm(e,t){let n=Bp(e),r=Vp(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=tm();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=gm(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=xm&&(a-=o)}else l<=xm&&(a+=l);return{width:a,height:o,x:s,y:c}}function Cm(e,t){let n=hm(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Wp(e)?dm(e):ep(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function wm(e,t,n){let r;if(t===`viewport`)r=Sm(e,n);else if(t===`document`)r=bm(Vp(e));else if(Up(t))r=Cm(t,n);else{let n=pm(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Sp(r)}function Tm(e,t){let n=am(e);return n===t||!Up(n)||nm(n)?!1:rm(n).position===`fixed`||Tm(n,t)}function Em(e,t){let n=t.get(e);if(n)return n;let r=sm(e,[],!1).filter(e=>Up(e)&&zp(e)!==`body`),i=null,a=rm(e).position===`fixed`,o=a?am(e):e;for(;Up(o)&&!nm(o);){let t=rm(o),n=$p(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Kp(o)&&!n&&Tm(e,o))?r=r.filter(e=>e!==o):i=t,o=am(o)}return t.set(e,r),r}function Dm(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Jp(t)?[]:Em(t,this._c):[].concat(n),r],o=wm(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=wm(t,a[e],i);s=Zf(n.top,s),c=Xf(n.right,c),l=Xf(n.bottom,l),u=Zf(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Om(e){let{width:t,height:n}=lm(e);return{width:t,height:n}}function km(e,t,n){let r=Wp(t),i=Vp(t),a=n===`fixed`,o=hm(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=ep(0);function l(){c.x=gm(i)}if(r||!r&&!a)if((zp(t)!==`body`||Kp(i))&&(s=im(t)),r){let e=hm(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?_m(i,s):ep(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Am(e){return rm(e).position===`static`}function jm(e,t){if(!Wp(e)||rm(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Vp(e)===n&&(n=n.ownerDocument.body),n}function Mm(e,t){let n=Bp(e);if(Jp(e))return n;if(!Wp(e)){let t=am(e);for(;t&&!nm(t);){if(Up(t)&&!Am(t))return t;t=am(t)}return n}let r=jm(e,t);for(;r&&qp(r)&&Am(r);)r=jm(r,t);return r&&nm(r)&&Am(r)&&!$p(r)?n:r||em(e)||n}var Nm=async function(e){let t=this.getOffsetParent||Mm,n=this.getDimensions,r=await n(e.floating);return{reference:km(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Pm(e){return rm(e).direction===`rtl`}var Fm={convertOffsetParentRelativeRectToViewportRelativeRect:vm,getDocumentElement:Vp,getClippingRect:Dm,getOffsetParent:Mm,getElementRects:Nm,getClientRects:ym,getDimensions:Om,getScale:dm,isElement:Up,isRTL:Pm};function Im(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Lm(e,t){let n=null,r,i=Vp(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=$f(d),h=$f(i.clientWidth-(u+f)),g=$f(i.clientHeight-(d+p)),_=$f(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Zf(0,Xf(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Im(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Rm(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=um(e),u=i||a?[...l?sm(l):[],...t?sm(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Lm(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?hm(e):null;c&&g();function g(){let t=hm(e);h&&!Im(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var zm=Pp,Bm=Fp,Vm=Op,Hm=Lp,Um=jp,Wm=Dp,Gm=Ip,Km=(e,t,n)=>{let r=new Map,i={platform:Fm,...n},a={...i.platform,_c:r};return Ep(e,t,{...i,platform:a})},qm=typeof document<`u`?v.useLayoutEffect:function(){};function Jm(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Jm(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Jm(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Ym(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Xm(e,t){let n=Ym(e);return Math.round(t*n)/n}function Zm(e){let t=v.useRef(e);return qm(()=>{t.current=e}),t}function Qm(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=v.useState(r);Jm(f,r)||p(r);let[m,h]=v.useState(null),[g,_]=v.useState(null),y=v.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),b=v.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=a||m,S=o||g,C=v.useRef(null),w=v.useRef(null),T=v.useRef(u),E=c!=null,D=Zm(c),O=Zm(i),k=Zm(l),A=v.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Km(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!Jm(T.current,t)&&(T.current=t,Dl.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);qm(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=v.useRef(!1);qm(()=>(j.current=!0,()=>{j.current=!1}),[]),qm(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=v.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=v.useMemo(()=>({reference:x,floating:S}),[x,S]),P=v.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=Xm(N.floating,u.x),r=Xm(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Ym(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return v.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var $m=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Wm({element:r.current,padding:i}).fn(n):r?Wm({element:r,padding:i}).fn(n):{}}}},eh=(e,t)=>{let n=zm(e);return{name:n.name,fn:n.fn,options:[e,t]}},th=(e,t)=>{let n=Bm(e);return{name:n.name,fn:n.fn,options:[e,t]}},nh=(e,t)=>({fn:Gm(e).fn,options:[e,t]}),rh=(e,t)=>{let n=Vm(e);return{name:n.name,fn:n.fn,options:[e,t]}},ih=(e,t)=>{let n=Hm(e);return{name:n.name,fn:n.fn,options:[e,t]}},ah=(e,t)=>{let n=Um(e);return{name:n.name,fn:n.fn,options:[e,t]}},oh=(e,t)=>{let n=$m(e);return{name:n.name,fn:n.fn,options:[e,t]}},sh=`Arrow`,ch=v.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,K.jsx)(Ol.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,K.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});ch.displayName=sh;var lh=ch,uh=`Popper`,[dh,fh]=Nl(uh),[ph,mh]=dh(uh),hh=e=>{let{__scopePopper:t,children:n}=e,[r,i]=v.useState(null),[a,o]=v.useState(void 0);return(0,K.jsx)(ph,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};hh.displayName=uh;var gh=`PopperAnchor`,_h=v.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=mh(gh,n),o=v.useRef(null),s=a.onAnchorChange,c=dl(t,v.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=v.useRef(null);v.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&Dh(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,K.jsx)(Ol.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})});_h.displayName=gh;var vh=`PopperContent`,[yh,bh]=dh(vh),xh=v.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=mh(vh,n),[_,y]=v.useState(null),b=dl(t,y),[x,S]=v.useState(null),C=Mf(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],k=O.length>0,A={padding:D,boundary:O.filter(Th),altBoundary:k},{refs:j,floatingStyles:M,placement:N,isPositioned:P,middlewareData:F}=Qm({strategy:`fixed`,placement:E,whileElementsMounted:(...e)=>Rm(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[eh({mainAxis:i+T,alignmentAxis:o}),c&&th({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?nh():void 0,...A}),c&&rh({...A}),ih({...A,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),x&&oh({element:x,padding:s}),Eh({arrowWidth:w,arrowHeight:T}),f&&ah({strategy:`referenceHidden`,...A,boundary:k?A.boundary:void 0})]}),I=g.setPlacementState;Ll(()=>(I(N),()=>{I(void 0)}),[N,I]);let[L,R]=Dh(N),ee=eu(m);Ll(()=>{P&&ee?.()},[P,ee]);let te=F.arrow?.x,z=F.arrow?.y,B=F.arrow?.centerOffset!==0,[V,ne]=v.useState();return Ll(()=>{_&&ne(window.getComputedStyle(_).zIndex)},[_]),(0,K.jsx)(`div`,{ref:j.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:P?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:V,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(` `),...F.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,K.jsx)(yh,{scope:n,placedSide:L,placedAlign:R,onArrowChange:S,arrowX:te,arrowY:z,shouldHideArrow:B,children:(0,K.jsx)(Ol.div,{"data-side":L,"data-align":R,...h,ref:b,style:{...h.style,animation:P?void 0:`none`}})})})});xh.displayName=vh;var Sh=`PopperArrow`,Ch={top:`bottom`,right:`left`,bottom:`top`,left:`right`},wh=v.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=bh(Sh,n),a=Ch[i.placedSide];return(0,K.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,K.jsx)(lh,{...r,ref:t,style:{...r.style,display:`block`}})})});wh.displayName=Sh;function Th(e){return e!==null}var Eh=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Dh(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function Dh(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Oh=hh,kh=_h,Ah=xh,jh=wh,Mh=!1;function Nh(){let[e,t]=v.useState(Mh);return v.useEffect(()=>{Mh||(Mh=!0,t(!0))},[]),e}var Ph=v.useSyncExternalStore;function Fh(){return()=>{}}function Ih(){return Ph(Fh,()=>!0,()=>!1)}var Lh=typeof Ph==`function`?Ih:Nh,Rh=`rovingFocusGroup.onEntryFocus`,zh={bubbles:!1,cancelable:!0},Bh=`RovingFocusGroup`,[Vh,Hh,Uh]=Fl(Bh),[Wh,Gh]=Nl(Bh,[Uh]),[Kh,qh]=Wh(Bh),Jh=v.forwardRef((e,t)=>(0,K.jsx)(Vh.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,K.jsx)(Vh.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,K.jsx)(Yh,{...e,ref:t})})}));Jh.displayName=Bh;var Yh=v.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=v.useRef(null),p=dl(t,f),m=$l(a),[h,g]=zl({prop:o,defaultProp:s??null,onChange:c,caller:Bh}),[_,y]=v.useState(!1),b=eu(l),x=Hh(n),S=v.useRef(!1),[C,w]=v.useState(0);return v.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(Rh,b),()=>e.removeEventListener(Rh,b)},[b]),(0,K.jsx)(Kh,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:v.useCallback(e=>g(e),[g]),onItemShiftTab:v.useCallback(()=>y(!0),[]),onFocusableItemAdd:v.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:v.useCallback(()=>w(e=>e-1),[]),children:(0,K.jsx)(Ol.div,{tabIndex:_||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:Il(e.onMouseDown,()=>{S.current=!0}),onFocus:Il(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(Rh,zh);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);tg([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:Il(e.onBlur,()=>y(!1))})})}),Xh=`RovingFocusGroupItem`,Zh=v.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Zl(),l=a||c,u=qh(Xh,n),d=u.currentTabStopId===l,f=Hh(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u,g=Lh();return Ll(()=>{if(!(!g||!r))return p(),()=>m()},[g,r,p,m]),v.useEffect(()=>{if(!(g||!r))return p(),()=>m()},[g,r,p,m]),(0,K.jsx)(Vh.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,K.jsx)(Ol.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:Il(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:Il(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:Il(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=eg(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?ng(n,r+1):n.slice(r+1)}setTimeout(()=>tg(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});Zh.displayName=Xh;var Qh={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function $h(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function eg(e,t,n){let r=$h(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Qh[r]}function tg(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function ng(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var rg=Jh,ig=Zh,ag=`Label`,og=v.forwardRef((e,t)=>(0,K.jsx)(Ol.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));og.displayName=ag;var sg=og;function cg(e,[t,n]){return Math.min(n,Math.max(t,e))}var lg=[` `,`Enter`,`ArrowUp`,`ArrowDown`],ug=[` `,`Enter`],dg=`Select`,[fg,pg,mg]=Fl(dg),[hg,eee]=Nl(dg,[mg,fh]),gg=fh(),[_g,vg]=hg(dg),[yg,bg]=hg(dg),xg=`SelectProvider`;function Sg(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m,internal_do_not_use_render:h}=e,g=gg(t),[_,y]=v.useState(null),[b,x]=v.useState(null),[S,C]=v.useState(!1),w=$l(l),[T,E]=zl({prop:r,defaultProp:i??!1,onChange:a,caller:dg}),[D,O]=zl({prop:o,defaultProp:s,onChange:c,caller:dg}),k=v.useRef(null),A=v.useRef(D);v.useEffect(()=>{let e=m?_?.ownerDocument.getElementById(m):_?.form;if(e instanceof HTMLFormElement){let t=()=>O(A.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[m,_,O]);let j=_?!!m||!!_.closest(`form`):!0,[M,N]=v.useState(new Set),P=Zl(),F=Array.from(M).map(e=>e.props.value).join(`;`),I=v.useCallback(e=>{N(t=>new Set(t).add(e))},[]),L=v.useCallback(e=>{N(t=>{let n=new Set(t);return n.delete(e),n})},[]),R={required:p,trigger:_,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:P,value:D,onValueChange:O,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:k,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:M,nativeSelectKey:F,isFormControl:j};return(0,K.jsx)(Oh,{...g,children:(0,K.jsx)(_g,{scope:t,...R,children:(0,K.jsx)(fg.Provider,{scope:t,children:(0,K.jsx)(yg,{scope:t,onNativeOptionAdd:I,onNativeOptionRemove:L,children:S_(h)?h(R):n})})})})}Sg.displayName=xg;var Cg=e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,K.jsx)(Sg,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,K.jsxs)(K.Fragment,{children:[n,e?(0,K.jsx)(x_,{__scopeSelect:t}):null]})})};Cg.displayName=dg;var wg=`SelectTrigger`,Tg=v.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=gg(n),o=vg(wg,n),s=o.disabled||r,c=dl(t,o.onTriggerChange),l=pg(n),u=v.useRef(`touch`),[d,f,p]=w_(e=>{let t=l().filter(e=>!e.disabled),n=T_(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,K.jsx)(kh,{asChild:!0,...a,children:(0,K.jsx)(Ol.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":C_(o.value)?``:void 0,...i,ref:c,onClick:Il(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:Il(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:Il(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&lg.includes(e.key)&&(m(),e.preventDefault())})})})});Tg.displayName=wg;var Eg=`SelectValue`,Dg=v.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=vg(Eg,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=dl(t,c.onValueNodeChange);Ll(()=>{l(u)},[l,u]);let f=C_(c.value);return(0,K.jsx)(Ol.span,{...s,asChild:f?!1:s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,K.jsx)(v.Fragment,{children:f?o:a},f?`placeholder`:`value`)})});Dg.displayName=Eg;var Og=`SelectIcon`,kg=v.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,K.jsx)(Ol.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});kg.displayName=Og;var Ag=`SelectPortal`,[jg,Mg]=hg(Ag,{forceMount:void 0}),Ng=e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,K.jsx)(jg,{scope:e.__scopeSelect,forceMount:n,children:(0,K.jsx)(Nu,{asChild:!0,...r})})};Ng.displayName=Ag;var Pg=`SelectContent`,Fg=v.forwardRef((e,t)=>{let n=Mg(Pg,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=vg(Pg,e.__scopeSelect),[o,s]=v.useState();return Ll(()=>{s(new DocumentFragment)},[]),(0,K.jsx)(Ul,{present:r||a.open,children:({present:e})=>e?(0,K.jsx)(Hg,{...i,ref:t}):(0,K.jsx)(Ig,{...i,fragment:o})})});Fg.displayName=Pg;var Ig=v.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,fragment:i}=e;return i?Dl.createPortal((0,K.jsx)(Rg,{scope:n,children:(0,K.jsx)(fg.Slot,{scope:n,children:(0,K.jsx)(`div`,{ref:t,children:r})})}),i):null});Ig.displayName=`SelectContentFragment`;var Lg=10,[Rg,zg]=hg(Pg),Bg=`SelectContentImpl`,Vg=fl(`SelectContent.RemoveScroll`),Hg=v.forwardRef((e,t)=>{let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,y=vg(Pg,n),[b,x]=v.useState(null),[S,C]=v.useState(null),w=dl(t,x),[T,E]=v.useState(null),[D,O]=v.useState(null),k=pg(n),[A,j]=v.useState(!1),M=v.useRef(!1);v.useEffect(()=>{if(b)return tf(b)},[b]),Iu();let N=v.useCallback(e=>{let[t,...n]=k().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==i))return},[k,S]),P=v.useCallback(()=>N([T,b]),[N,T,b]);v.useEffect(()=>{A&&P()},[A,P]);let{onOpenChange:F,triggerPointerDownPosRef:I}=y;v.useEffect(()=>{if(b){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(I.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(I.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(b)||F(!1),document.removeEventListener(`pointermove`,t),I.current=null};return I.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[b,F,I]),v.useEffect(()=>{let e=()=>F(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[F]);let[L,R]=w_(e=>{let t=k().filter(e=>!e.disabled),n=T_(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),ee=v.useCallback((e,t,n)=>{let r=!M.current&&!n;(y.value!==void 0&&y.value===t||r)&&(E(e),r&&(M.current=!0))},[y.value]),te=v.useCallback(()=>b?.focus(),[b]),z=v.useCallback((e,t,n)=>{let r=!M.current&&!n;(y.value!==void 0&&y.value===t||r)&&O(e)},[y.value]),B=r===`popper`?Kg:Wg,V=B===Kg?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,K.jsx)(Rg,{scope:n,content:b,viewport:S,onViewportChange:C,itemRefCallback:ee,selectedItem:T,onItemLeave:te,itemTextRefCallback:z,focusSelectedItem:P,selectedItemText:D,position:r,isPositioned:A,searchRef:L,children:(0,K.jsx)(Kd,{as:Vg,allowPinchZoom:!0,children:(0,K.jsx)(bu,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Il(i,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,K.jsx)(su,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,K.jsx)(B,{role:`listbox`,id:y.contentId,"data-state":y.open?`open`:`closed`,dir:y.dir,onContextMenu:e=>e.preventDefault(),..._,...V,onPlaced:()=>j(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:Il(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&R(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=k().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>N(t)),e.preventDefault()}})})})})})})});Hg.displayName=Bg;var Ug=`SelectItemAlignedPosition`,Wg=v.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=vg(Pg,n),o=zg(Pg,n),[s,c]=v.useState(null),[l,u]=v.useState(null),d=dl(t,u),f=pg(n),p=v.useRef(!1),m=v.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:y}=o,b=v.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Lg,d=cg(a,[Lg,Math.max(Lg,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Lg,d=cg(a,[Lg,Math.max(Lg,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-Lg*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-Lg,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${Lg}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);Ll(()=>b(),[b]);let[x,S]=v.useState();return Ll(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]),(0,K.jsx)(qg,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:v.useCallback(e=>{e&&m.current===!0&&(b(),y?.(),m.current=!1)},[b,y]),children:(0,K.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,K.jsx)(Ol.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});Wg.displayName=Ug;var Gg=`SelectPopperPosition`,Kg=v.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=Lg,...a}=e,o=gg(n);return(0,K.jsx)(Ah,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});Kg.displayName=Gg;var[qg,Jg]=hg(Pg,{}),Yg=`SelectViewport`,Xg=v.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=zg(Yg,n),o=Jg(Yg,n),s=dl(t,a.onViewportChange),c=v.useRef(0);return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,K.jsx)(fg.Slot,{scope:n,children:(0,K.jsx)(Ol.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:Il(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-Lg*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})});Xg.displayName=Yg;var Zg=`SelectGroup`,[Qg,$g]=hg(Zg),e_=v.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Zl();return(0,K.jsx)(Qg,{scope:n,id:i,children:(0,K.jsx)(Ol.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});e_.displayName=Zg;var t_=`SelectLabel`,n_=v.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=$g(t_,n);return(0,K.jsx)(Ol.div,{id:i.id,...r,ref:t})});n_.displayName=t_;var r_=`SelectItem`,[i_,a_]=hg(r_),o_=v.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=vg(r_,n),c=zg(r_,n),l=s.value===r,[u,d]=v.useState(a??``),[f,p]=v.useState(!1),m=dl(t,eu(e=>c.itemRefCallback?.(e,r,i))),h=Zl(),g=v.useRef(`touch`),_=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};return(0,K.jsx)(i_,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:v.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,K.jsx)(fg.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,K.jsx)(Ol.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:Il(o.onFocus,()=>p(!0)),onBlur:Il(o.onBlur,()=>p(!1)),onClick:Il(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:Il(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:Il(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:Il(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Il(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Il(o.onKeyDown,e=>{i||e.target!==e.currentTarget||c.searchRef?.current!==``&&e.key===` `||(ug.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});o_.displayName=r_;var s_=`SelectItemText`,c_=v.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=vg(s_,n),s=zg(s_,n),c=a_(s_,n),l=bg(s_,n),[u,d]=v.useState(null),f=eu(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=dl(t,d,c.onItemTextChange,f),m=u?.textContent,h=v.useMemo(()=>(0,K.jsx)(`option`,{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return Ll(()=>(g(h),()=>_(h)),[g,_,h]),(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Ol.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!C_(o.value)?Dl.createPortal(a.children,o.valueNode):null]})});c_.displayName=s_;var l_=`SelectItemIndicator`,u_=v.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return a_(l_,n).isSelected?(0,K.jsx)(Ol.span,{"aria-hidden":!0,...r,ref:t}):null});u_.displayName=l_;var d_=`SelectScrollUpButton`,f_=v.forwardRef((e,t)=>{let n=zg(d_,e.__scopeSelect),r=Jg(d_,e.__scopeSelect),[i,a]=v.useState(!1),o=dl(t,r.onScrollButtonChange);return Ll(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,K.jsx)(h_,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});f_.displayName=d_;var p_=`SelectScrollDownButton`,m_=v.forwardRef((e,t)=>{let n=zg(p_,e.__scopeSelect),r=Jg(p_,e.__scopeSelect),[i,a]=v.useState(!1),o=dl(t,r.onScrollButtonChange);return Ll(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,K.jsx)(h_,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});m_.displayName=p_;var h_=v.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=zg(`SelectScrollButton`,n),o=v.useRef(null),s=pg(n),c=v.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return v.useEffect(()=>()=>c(),[c]),Ll(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,K.jsx)(Ol.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Il(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:Il(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:Il(i.onPointerLeave,()=>{c()})})}),g_=`SelectSeparator`,__=v.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,K.jsx)(Ol.div,{"aria-hidden":!0,...r,ref:t})});__.displayName=g_;var v_=`SelectArrow`,y_=v.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=gg(n);return zg(v_,n).position===`popper`?(0,K.jsx)(jh,{...i,...r,ref:t}):null});y_.displayName=v_;var b_=`SelectBubbleInput`,x_=v.forwardRef(({__scopeSelect:e,...t},n)=>{let r=vg(b_,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,p=v.useRef(null),m=dl(n,p),h=i??``,g=jf(h),_=Array.from(d).some(e=>(e.props.value??``)===``);return v.useEffect(()=>{let e=p.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(g!==h&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,h),e.dispatchEvent(t)}},[g,h]),(0,K.jsxs)(Ol.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...Al,...t.style},ref:m,defaultValue:h,children:[C_(i)&&!_?(0,K.jsx)(`option`,{value:``}):null,Array.from(d)]},f)});x_.displayName=b_;function S_(e){return typeof e==`function`}function C_(e){return e===``||e===void 0}function w_(e){let t=eu(e),n=v.useRef(``),r=v.useRef(0),i=v.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=v.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function T_(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=E_(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function E_(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var D_=`Separator`,O_=`horizontal`,k_=[`horizontal`,`vertical`],A_=v.forwardRef((e,t)=>{let{decorative:n,orientation:r=O_,...i}=e,a=j_(r)?r:O_,o=n?{role:`none`}:{"aria-orientation":a===`vertical`?a:void 0,role:`separator`};return(0,K.jsx)(Ol.div,{"data-orientation":a,...o,...i,ref:t})});A_.displayName=D_;function j_(e){return k_.includes(e)}var M_=A_,N_=`Switch`,[P_,tee]=Nl(N_),[F_,I_]=P_(N_);function L_(e){let{__scopeSwitch:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=zl({prop:n,defaultProp:i??!1,onChange:c,caller:N_}),[m,h]=v.useState(null),[g,_]=v.useState(null),y={checked:f,setChecked:p,disabled:a,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v.useRef(!1),required:l,defaultChecked:i,isFormControl:m?!!o||!!m.closest(`form`):!0,bubbleInput:g,setBubbleInput:_};return(0,K.jsx)(F_,{scope:t,...y,children:G_(d)?d(y):r})}var R_=`SwitchTrigger`,z_=v.forwardRef(({__scopeSwitch:e,onClick:t,...n},r)=>{let{control:i,form:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=I_(R_,e),h=dl(r,u),g=v.useRef(c);return v.useEffect(()=>{let e=a?i?.ownerDocument.getElementById(a):i?.form;if(e instanceof HTMLFormElement){let t=()=>d(g.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[i,a,d]),(0,K.jsx)(Ol.button,{type:`button`,role:`switch`,"aria-checked":c,"aria-required":l,"data-state":K_(c),"data-disabled":s?``:void 0,disabled:s,value:o,...n,ref:h,onClick:Il(t,e=>{d(e=>!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});z_.displayName=R_;var B_=v.forwardRef((e,t)=>{let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,K.jsx)(L_,{__scopeSwitch:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(z_,{...d,ref:t,__scopeSwitch:n}),e&&(0,K.jsx)(W_,{__scopeSwitch:n})]})})});B_.displayName=N_;var V_=`SwitchThumb`,H_=v.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,i=I_(V_,n);return(0,K.jsx)(Ol.span,{"data-state":K_(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})});H_.displayName=V_;var U_=`SwitchBubbleInput`,W_=v.forwardRef(({__scopeSwitch:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:s,disabled:c,name:l,value:u,form:d,bubbleInput:f,setBubbleInput:p}=I_(U_,e),m=dl(n,p),h=jf(a),g=Mf(r);v.useEffect(()=>{let e=f;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(h!==a&&n){let t=new Event(`click`,{bubbles:r});n.call(e,a),e.dispatchEvent(t)}},[f,h,a,i]);let _=v.useRef(a);return(0,K.jsx)(Ol.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:o??_.current,required:s,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});W_.displayName=U_;function G_(e){return typeof e==`function`}function K_(e){return e?`checked`:`unchecked`}var q_=`Tabs`,[J_,nee]=Nl(q_,[Gh]),Y_=Gh(),[X_,Z_]=J_(q_),Q_=v.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=$l(s),[d,f]=zl({prop:r,onChange:i,defaultProp:a??``,caller:q_});return(0,K.jsx)(X_,{scope:n,baseId:Zl(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,K.jsx)(Ol.div,{dir:u,"data-orientation":o,...l,ref:t})})});Q_.displayName=q_;var $_=`TabsList`,ev=v.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=Z_($_,n),o=Y_(n);return(0,K.jsx)(rg,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,K.jsx)(Ol.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});ev.displayName=$_;var tv=`TabsTrigger`,nv=v.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=Z_(tv,n),s=Y_(n),c=av(o.baseId,r),l=ov(o.baseId,r),u=r===o.value;return(0,K.jsx)(ig,{asChild:!0,...s,focusable:!i,active:u,children:(0,K.jsx)(Ol.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:Il(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:Il(e.onKeyDown,e=>{i||e.target!==e.currentTarget||[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:Il(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});nv.displayName=tv;var rv=`TabsContent`,iv=v.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=Z_(rv,n),c=av(s.baseId,r),l=ov(s.baseId,r),u=r===s.value,d=v.useRef(u);return v.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,K.jsx)(Ul,{present:i||u,children:({present:n})=>(0,K.jsx)(Ol.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})});iv.displayName=rv;function av(e,t){return`${e}-trigger-${t}`}function ov(e,t){return`${e}-content-${t}`}var sv=Q_,ree=ev,cv=nv,lv=iv;function uv(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=uv(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function dv(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=uv(e))&&(r&&(r+=` `),r+=t);return r}var fv=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},pv=(e,t)=>({classGroupId:e,validator:t}),mv=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),hv=`-`,gv=[],_v=`arbitrary..`,vv=e=>{let t=xv(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return bv(e);let n=e.split(hv);return yv(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?fv(i,t):t:i||gv}return n[e]||gv}}},yv=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=yv(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(hv):e.slice(t).join(hv),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},bv=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?_v+r:void 0})(),xv=e=>{let{theme:t,classGroups:n}=e;return Sv(n,t)},Sv=(e,t)=>{let n=mv();for(let r in e){let i=e[r];Cv(i,n,r,t)}return n},Cv=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];wv(i,t,n,r)}},wv=(e,t,n,r)=>{if(typeof e==`string`){Tv(e,t,n);return}if(typeof e==`function`){Ev(e,t,n,r);return}Dv(e,t,n,r)},Tv=(e,t,n)=>{let r=e===``?t:Ov(t,e);r.classGroupId=n},Ev=(e,t,n,r)=>{if(kv(e)){Cv(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(pv(n,e))},Dv=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Cv(o,Ov(t,a),n,r)}},Ov=(e,t)=>{let n=e,r=t.split(hv),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=mv(),n.nextPart.set(t,i)),n=i}return n},kv=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Av=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},jv=`!`,Mv=`:`,Nv=[],Pv=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Fv=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Mv){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(jv)?(c=s.slice(0,-1),l=!0):s.startsWith(jv)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Pv(t,l,c,u)};if(t){let e=t+Mv,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Pv(Nv,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Iv=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Lv=e=>({cache:Av(e.cacheSize),parseClassName:Fv(e),sortModifiers:Iv(e),postfixLookupClassGroupIds:Rv(e),...vv(e)}),Rv=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},zv=/\s+/,Bv=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(zv),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+jv:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Vv=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Hv(n))&&(i&&(i+=` `),i+=r);return i},Hv=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Hv(e[r]))&&(n&&(n+=` `),n+=t);return n},Uv=(e,...t)=>{let n,r,i,a,o=o=>(n=Lv(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Bv(e,n);return i(e,a),a};return a=o,(...e)=>a(Vv(...e))},Wv=[],Gv=e=>{let t=t=>t[e]||Wv;return t.isThemeGetter=!0,t},Kv=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,qv=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Jv=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Yv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xv=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Zv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Qv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$v=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ey=e=>Jv.test(e),ty=e=>!!e&&!Number.isNaN(Number(e)),ny=e=>!!e&&Number.isInteger(Number(e)),ry=e=>e.endsWith(`%`)&&ty(e.slice(0,-1)),iy=e=>Yv.test(e),ay=()=>!0,oy=e=>Xv.test(e)&&!Zv.test(e),sy=()=>!1,cy=e=>Qv.test(e),ly=e=>$v.test(e),uy=e=>!q(e)&&!J(e),dy=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),fy=e=>Dy(e,jy,sy),q=e=>Kv.test(e),py=e=>Dy(e,My,oy),my=e=>Dy(e,Ny,ty),hy=e=>Dy(e,Fy,ay),gy=e=>Dy(e,Py,sy),_y=e=>Dy(e,ky,sy),vy=e=>Dy(e,Ay,ly),yy=e=>Dy(e,Iy,cy),J=e=>qv.test(e),by=e=>Oy(e,My),xy=e=>Oy(e,Py),Sy=e=>Oy(e,ky),Cy=e=>Oy(e,jy),wy=e=>Oy(e,Ay),Ty=e=>Oy(e,Iy,!0),Ey=e=>Oy(e,Fy,!0),Dy=(e,t,n)=>{let r=Kv.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Oy=(e,t,n=!1)=>{let r=qv.exec(e);return r?r[1]?t(r[1]):n:!1},ky=e=>e===`position`||e===`percentage`,Ay=e=>e===`image`||e===`url`,jy=e=>e===`length`||e===`size`||e===`bg-size`,My=e=>e===`length`,Ny=e=>e===`number`,Py=e=>e===`family-name`,Fy=e=>e===`number`||e===`weight`,Iy=e=>e===`shadow`,Ly=Uv(()=>{let e=Gv(`color`),t=Gv(`font`),n=Gv(`text`),r=Gv(`font-weight`),i=Gv(`tracking`),a=Gv(`leading`),o=Gv(`breakpoint`),s=Gv(`container`),c=Gv(`spacing`),l=Gv(`radius`),u=Gv(`shadow`),d=Gv(`inset-shadow`),f=Gv(`text-shadow`),p=Gv(`drop-shadow`),m=Gv(`blur`),h=Gv(`perspective`),g=Gv(`aspect`),_=Gv(`ease`),v=Gv(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),J,q],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[J,q,c],T=()=>[ey,`full`,`auto`,...w()],E=()=>[ny,`none`,`subgrid`,J,q],D=()=>[`auto`,{span:[`full`,ny,J,q]},ny,J,q],O=()=>[ny,`auto`,J,q],k=()=>[`auto`,`min`,`max`,`fr`,J,q],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[ey,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[ey,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[ey,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,J,q],L=()=>[...b(),Sy,_y,{position:[J,q]}],R=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ee=()=>[`auto`,`cover`,`contain`,Cy,fy,{size:[J,q]}],te=()=>[ry,by,py],z=()=>[``,`none`,`full`,l,J,q],B=()=>[``,ty,by,py],V=()=>[`solid`,`dashed`,`dotted`,`double`],ne=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],re=()=>[ty,ry,Sy,_y],ie=()=>[``,`none`,m,J,q],ae=()=>[`none`,ty,J,q],oe=()=>[`none`,ty,J,q],se=()=>[ty,J,q],H=()=>[ey,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[iy],breakpoint:[iy],color:[ay],container:[iy],"drop-shadow":[iy],ease:[`in`,`out`,`in-out`],font:[uy],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[iy],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[iy],shadow:[iy],spacing:[`px`,ty],text:[iy],"text-shadow":[iy],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,ey,q,J,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,J,q]}],"container-named":[dy],columns:[{columns:[ty,q,J,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[ny,`auto`,J,q]}],basis:[{basis:[ey,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[ty,ey,`auto`,`initial`,`none`,q]}],grow:[{grow:[``,ty,J,q]}],shrink:[{shrink:[``,ty,J,q]}],order:[{order:[ny,`first`,`last`,`none`,J,q]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,by,py]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Ey,hy]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,ry,q]}],"font-family":[{font:[xy,gy,t]}],"font-features":[{"font-features":[q]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,J,q]}],"line-clamp":[{"line-clamp":[ty,`none`,J,my]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,J,q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,J,q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...V(),`wavy`]}],"text-decoration-thickness":[{decoration:[ty,`from-font`,`auto`,J,py]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[ty,`auto`,J,q]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[ny,J,q]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,J,q]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,J,q]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:ee()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},ny,J,q],radial:[``,J,q],conic:[ny,J,q]},wy,vy]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:te()}],"gradient-via-pos":[{via:te()}],"gradient-to-pos":[{to:te()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-bs":[{"border-bs":B()}],"border-w-be":[{"border-be":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":B()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...V(),`hidden`,`none`]}],"divide-style":[{divide:[...V(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...V(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[ty,J,q]}],"outline-w":[{outline:[``,ty,by,py]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`none`,u,Ty,yy]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,Ty,yy]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:B()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[ty,py]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,Ty,yy]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[ty,J,q]}],"mix-blend":[{"mix-blend":[...ne(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ne()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[ty]}],"mask-image-linear-from-pos":[{"mask-linear-from":re()}],"mask-image-linear-to-pos":[{"mask-linear-to":re()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":re()}],"mask-image-t-to-pos":[{"mask-t-to":re()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":re()}],"mask-image-r-to-pos":[{"mask-r-to":re()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":re()}],"mask-image-b-to-pos":[{"mask-b-to":re()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":re()}],"mask-image-l-to-pos":[{"mask-l-to":re()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":re()}],"mask-image-x-to-pos":[{"mask-x-to":re()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":re()}],"mask-image-y-to-pos":[{"mask-y-to":re()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[J,q]}],"mask-image-radial-from-pos":[{"mask-radial-from":re()}],"mask-image-radial-to-pos":[{"mask-radial-to":re()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[ty]}],"mask-image-conic-from-pos":[{"mask-conic-from":re()}],"mask-image-conic-to-pos":[{"mask-conic-to":re()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:ee()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,J,q]}],filter:[{filter:[``,`none`,J,q]}],blur:[{blur:ie()}],brightness:[{brightness:[ty,J,q]}],contrast:[{contrast:[ty,J,q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Ty,yy]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,ty,J,q]}],"hue-rotate":[{"hue-rotate":[ty,J,q]}],invert:[{invert:[``,ty,J,q]}],saturate:[{saturate:[ty,J,q]}],sepia:[{sepia:[``,ty,J,q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,J,q]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[ty,J,q]}],"backdrop-contrast":[{"backdrop-contrast":[ty,J,q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,ty,J,q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ty,J,q]}],"backdrop-invert":[{"backdrop-invert":[``,ty,J,q]}],"backdrop-opacity":[{"backdrop-opacity":[ty,J,q]}],"backdrop-saturate":[{"backdrop-saturate":[ty,J,q]}],"backdrop-sepia":[{"backdrop-sepia":[``,ty,J,q]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,J,q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[ty,`initial`,J,q]}],ease:[{ease:[`linear`,`initial`,_,J,q]}],delay:[{delay:[ty,J,q]}],animate:[{animate:[`none`,v,J,q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,J,q]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":[`scale-3d`],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[J,q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:H()}],"translate-x":[{"translate-x":H()}],"translate-y":[{"translate-y":H()}],"translate-z":[{"translate-z":H()}],"translate-none":[`translate-none`],zoom:[{zoom:[ny,J,q]}],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,J,q]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,J,q]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[ty,by,py,my]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function Y(...e){return Ly(dv(e))}function Ry({className:e,...t}){return(0,K.jsx)(Vf,{"data-slot":`checkbox`,className:Y(`peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary`,e),...t,children:(0,K.jsx)(Uf,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none`,children:(0,K.jsx)(kc,{className:`size-3.5`})})})}function zy({className:e,...t}){return(0,K.jsx)(sg,{"data-slot":`label`,className:Y(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}function By({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`table-container`,className:`relative w-full overflow-x-auto`,children:(0,K.jsx)(`table`,{"data-slot":`table`,className:Y(`w-full caption-bottom text-sm`,e),...t})})}function Vy({className:e,...t}){return(0,K.jsx)(`thead`,{"data-slot":`table-header`,className:Y(`[&_tr]:border-b`,e),...t})}function Hy({className:e,...t}){return(0,K.jsx)(`tbody`,{"data-slot":`table-body`,className:Y(`[&_tr:last-child]:border-0`,e),...t})}function Uy({className:e,...t}){return(0,K.jsx)(`tr`,{"data-slot":`table-row`,className:Y(`border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted`,e),...t})}function Wy({className:e,...t}){return(0,K.jsx)(`th`,{"data-slot":`table-head`,className:Y(`h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...t})}function Gy({className:e,...t}){return(0,K.jsx)(`td`,{"data-slot":`table-cell`,className:Y(`p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...t})}var Ky=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,qy=dv,Jy=(e,t)=>n=>{if(t?.variants==null)return qy(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Ky(t)||Ky(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return qy(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Yy=Jy(`inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,destructive:`bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,xs:`h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`,"icon-xs":`size-6 rounded-md [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}});function Xy({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){return(0,K.jsx)(r?pl:`button`,{"data-slot":`button`,"data-variant":t,"data-size":n,className:Y(Yy({variant:t,size:n,className:e})),...i})}function Zy({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`card`,className:Y(`flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm`,e),...t})}function Qy({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`card-header`,className:Y(`@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6`,e),...t})}function $y({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`card-title`,className:Y(`leading-none font-semibold`,e),...t})}function eb({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`card-content`,className:Y(`px-6`,e),...t})}function tb({title:e,extra:t,children:n,className:r}){return(0,K.jsxs)(Zy,{className:Y(`gap-0 py-5`,r),children:[e!=null&&(0,K.jsxs)(Qy,{className:`flex flex-row items-center gap-3 px-5 pb-3`,children:[(0,K.jsx)($y,{className:`text-base font-semibold`,children:e}),t!=null&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{className:`flex-1`}),t]})]}),(0,K.jsx)(eb,{className:`px-5`,children:n})]})}function nb({k:e,v:t,sub:n,cls:r}){return(0,K.jsxs)(Zy,{className:`gap-1 px-4 py-3`,children:[(0,K.jsx)(`p`,{className:`text-muted-foreground text-xs tracking-wide uppercase`,children:e}),(0,K.jsxs)(`div`,{className:Y(`text-2xl font-semibold tabular-nums`,r),children:[t,n!=null&&(0,K.jsxs)(`small`,{className:`text-muted-foreground ml-1 text-sm`,children:[` `,n]})]})]})}function rb({rows:e}){let t=Math.max(1,...e.map(e=>e.value));return(0,K.jsx)(`div`,{className:`flex flex-col gap-2`,children:e.map(e=>(0,K.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,7rem)_1fr_auto] items-center gap-3`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground truncate text-xs`,title:e.label,children:e.label}),(0,K.jsx)(`div`,{className:`bg-muted h-2 overflow-hidden rounded-full`,children:(0,K.jsx)(`div`,{className:Y(`h-full rounded-full`,!e.color&&`bg-brand`),style:{width:`${e.value/t*100}%`,background:e.color}})}),(0,K.jsx)(`span`,{className:`text-xs tabular-nums`,children:e.sub??String(e.value)})]},e.label))})}function ib({text:e,label:t=`Copy`,className:n,icon:r=!1,title:i}){let[a,o]=(0,v.useState)(!1),s=(0,v.useRef)(null);return(0,v.useEffect)(()=>()=>void(s.current&&clearTimeout(s.current)),[]),(0,K.jsxs)(Xy,{type:`button`,variant:`outline`,size:r?`icon-sm`:`sm`,className:n,onClick:()=>{navigator.clipboard?.writeText(e).then(()=>{o(!0),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>o(!1),1400)},()=>{})},title:i??`Copy to clipboard`,"aria-label":i??`Copy to clipboard`,children:[a?(0,K.jsx)(kc,{className:`text-success`}):r?(0,K.jsx)(Fc,{}):t,a&&(0,K.jsx)(`span`,{className:`sr-only`,role:`status`,"aria-live":`polite`,children:`Copied!`})]})}var ab=[50,100,200,500,1e3,2e3],ob=`mt-theme`;function sb(){try{return localStorage.getItem(ob)===`light`?`light`:`dark`}catch{return`dark`}}function cb(){let[e,t]=(0,v.useState)(sb);return(0,v.useEffect)(()=>{document.documentElement.classList.toggle(`dark`,e===`dark`)},[e]),[e,(0,v.useCallback)(e=>{t(e);try{localStorage.setItem(ob,e)}catch{}},[])]}function lb(){let[e,t]=cb(),n=e===`dark`?`light`:`dark`;return(0,K.jsx)(Xy,{variant:`ghost`,size:`icon-sm`,onClick:()=>t(n),title:`Switch to ${n} theme`,"aria-label":`Switch to ${n} theme`,children:e===`dark`?(0,K.jsx)(rl,{}):(0,K.jsx)(Uc,{})})}var ub=e=>e<1?`<1ms`:e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(2)}s`;function db(e){let t=[`B`,`KiB`,`MiB`,`GiB`],n=0,r=e;for(;r>=1024&&n<t.length-1;)r/=1024,n++;return`${r.toFixed(+!!n)} ${t[n]}`}var fb=e=>new Date(e).toLocaleTimeString(void 0,{hour12:!1}),pb=e=>e.toLocaleString(),mb=e=>e==null?`?`:typeof e==`string`?e:typeof e==`number`||typeof e==`boolean`?String(e):JSON.stringify(e),hb={cpu:`var(--chart-1)`,mem:`var(--chart-5)`,disk:`var(--chart-2)`,latency:`var(--chart-4)`},gb={READ:`var(--chart-3)`,WRITE:`var(--chart-1)`,WRITE_IDEMPOTENT:`var(--chart-2)`,DESTRUCTIVE:`var(--chart-4)`,DANGEROUS:`var(--destructive)`},_b={READ:`border-chart-3/40 text-chart-3`,WRITE:`border-chart-1/40 text-chart-1`,WRITE_IDEMPOTENT:`border-chart-2/40 text-chart-2`,DESTRUCTIVE:`border-chart-4/40 text-chart-4`,DANGEROUS:`border-destructive/40 text-destructive`},vb=[[`5m`,3e5],[`15m`,9e5],[`1h`,36e5],[`6h`,216e5],[`24h`,864e5]],yb=1e4,iee=Jy(`relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current`}},defaultVariants:{variant:`default`}});function aee({className:e,variant:t,...n}){return(0,K.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:Y(iee({variant:t}),e),...n})}function oee({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`alert-description`,className:Y(`col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed`,e),...t})}var bb=Jy(`inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3`,{variants:{variant:{default:`bg-primary text-primary-foreground [a&]:hover:bg-primary/90`,secondary:`bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90`,destructive:`bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90`,outline:`border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,ghost:`[a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,link:`text-primary underline-offset-4 [a&]:hover:underline`}},defaultVariants:{variant:`default`}});function xb({className:e,variant:t=`default`,asChild:n=!1,...r}){return(0,K.jsx)(n?pl:`span`,{"data-slot":`badge`,"data-variant":t,className:Y(bb({variant:t}),e),...r})}function Sb({className:e,type:t,...n}){return(0,K.jsx)(`input`,{type:t,"data-slot":`input`,className:Y(`h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30`,`focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40`,e),...n})}function Cb({...e}){return(0,K.jsx)(Cg,{"data-slot":`select`,...e})}function wb({...e}){return(0,K.jsx)(Dg,{"data-slot":`select-value`,...e})}function Tb({className:e,size:t=`default`,children:n,...r}){return(0,K.jsxs)(Tg,{"data-slot":`select-trigger`,"data-size":t,className:Y(`flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground`,e),...r,children:[n,(0,K.jsx)(kg,{asChild:!0,children:(0,K.jsx)(Ac,{className:`size-4 opacity-50`})})]})}function Eb({className:e,children:t,position:n=`item-aligned`,align:r=`center`,...i}){return(0,K.jsx)(Ng,{children:(0,K.jsxs)(Fg,{"data-slot":`select-content`,className:Y(`relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,align:r,...i,children:[(0,K.jsx)(Ob,{}),(0,K.jsx)(Xg,{className:Y(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children:t}),(0,K.jsx)(kb,{})]})})}function Db({className:e,children:t,...n}){return(0,K.jsxs)(o_,{"data-slot":`select-item`,className:Y(`relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,K.jsx)(`span`,{"data-slot":`select-item-indicator`,className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,K.jsx)(u_,{children:(0,K.jsx)(kc,{className:`size-4`})})}),(0,K.jsx)(c_,{children:t})]})}function Ob({className:e,...t}){return(0,K.jsx)(f_,{"data-slot":`select-scroll-up-button`,className:Y(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,K.jsx)(Mc,{className:`size-4`})})}function kb({className:e,...t}){return(0,K.jsx)(m_,{"data-slot":`select-scroll-down-button`,className:Y(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,K.jsx)(Ac,{className:`size-4`})})}var Ab={default:`default`,secondary:`secondary`,error:`destructive`,success:`ghost`,warning:`ghost`,accent:`ghost`},jb={default:``,secondary:``,error:``,success:`bg-success text-white hover:bg-success/90`,warning:`bg-warning text-white hover:bg-warning/90`,accent:`bg-brand text-brand-foreground hover:bg-brand/90`},Mb={default:`border bg-transparent text-foreground hover:bg-accent`,secondary:`border bg-transparent text-muted-foreground hover:bg-accent`,error:`border border-destructive/40 bg-transparent text-destructive hover:bg-destructive/10`,success:`border border-success/40 bg-transparent text-success hover:bg-success/10`,warning:`border border-warning/40 bg-transparent text-warning hover:bg-warning/10`,accent:`border border-brand/40 bg-transparent text-brand hover:bg-brand/10`};function X({type:e=`default`,size:t=`md`,ghost:n=!1,loading:r=!1,icon:i,className:a,children:o,disabled:s,...c}){return(0,K.jsxs)(Xy,{type:`button`,variant:n?`ghost`:Ab[e],size:t===`sm`?`sm`:`default`,className:Y(n?Mb[e]:jb[e],a),disabled:s||r,...c,children:[r?(0,K.jsx)(Bb,{small:!0}):i,o!=null&&(0,K.jsx)(`span`,{children:o})]})}var Nb={default:``,secondary:`text-muted-foreground`,success:`border-success/40 text-success`,warning:`border-warning/40 text-warning`,error:`border-destructive/40 text-destructive`,accent:`border-brand/40 text-brand`};function Pb({type:e=`default`,label:t,children:n,className:r}){let i=t===!1?null:t??e;return(0,K.jsx)(aee,{role:`note`,className:Y(Nb[e],r),children:(0,K.jsxs)(oee,{className:`text-current`,children:[i!=null&&(0,K.jsxs)(`b`,{className:`font-semibold`,children:[i,`:`]}),` `,n]})})}var Fb={default:`default`,secondary:`secondary`,error:`destructive`,success:`outline`,warning:`outline`,accent:`outline`},Ib={default:``,secondary:``,error:``,success:`border-success/40 text-success`,warning:`border-warning/40 text-warning`,accent:`border-brand/40 text-brand`};function Lb({type:e=`default`,children:t,className:n}){return(0,K.jsx)(xb,{variant:Fb[e],className:Y(`font-mono`,Ib[e],n),children:t})}var Rb={default:`bg-muted-foreground`,secondary:`bg-muted-foreground/60`,success:`bg-success`,warning:`bg-warning`,error:`bg-destructive`,accent:`bg-brand`};function zb({type:e=`default`,pulse:t=!1,color:n,className:r}){return(0,K.jsx)(`span`,{className:Y(`inline-block size-2 shrink-0 rounded-full`,!n&&Rb[e],t&&`animate-pulse`,r),style:n?{background:n}:void 0})}function Bb({small:e=!1}){return(0,K.jsx)(Vc,{className:Y(`animate-spin`,e?`size-3`:`size-4`),"aria-label":`loading`})}function Vb({className:e,...t}){return(0,K.jsx)(Sb,{className:Y(`font-mono`,e),...t})}var Hb=`\0empty`,Ub=e=>e===``?Hb:e,Wb=e=>e===Hb?``:e;function Gb({value:e,onValueChange:t,options:n,placeholder:r,className:i,disabled:a,size:o=`md`,"aria-label":s}){return(0,K.jsxs)(Cb,{value:Ub(e),onValueChange:e=>t(Wb(e)),disabled:a,children:[(0,K.jsx)(Tb,{size:o===`sm`?`sm`:`default`,"aria-label":s,className:Y(`font-mono`,i),children:(0,K.jsx)(wb,{placeholder:r})}),(0,K.jsx)(Eb,{children:n.map(e=>(0,K.jsx)(Db,{value:Ub(e.value),className:`font-mono`,children:e.label},e.value))})]})}function Kb({children:e,className:t,hoverable:n=!1}){return(0,K.jsx)(Zy,{className:Y(`gap-0 py-0`,n&&`transition-colors hover:border-brand/40`,t),children:e})}function qb(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)(``),[m,h]=(0,v.useState)(null),[g,_]=(0,v.useState)(null),[y,b]=(0,v.useState)(``),[x,S]=(0,v.useState)({show_sensitive:!1,verbose:!1,compact:!1,terse:!1}),C=(0,v.useRef)(null),w=(0,v.useCallback)(()=>{mc(`/api/backups`).then(e=>{t(e),p(t=>t||e.devices[0]||``)}).catch(()=>t({dir:``,devices:[],backups:[]}))},[]);(0,v.useEffect)(()=>w(),[w]);let T=(e,t)=>hc(e,t).catch(()=>({error:`request failed`})),E=async()=>{a(!0),r(`Capturing /export…`);let e=await hc(`/api/backups/create`,{device:f||void 0,label:y.trim()||void 0,show_sensitive:x.show_sensitive,verbose:x.verbose,compact:x.verbose?!1:x.compact,terse:x.terse}).catch(()=>({error:`request failed`}));a(!1),r(e.ok?`Created ${e.name} (${e.bytes} bytes)`:`Create failed: ${e.error}`),e.ok&&w()},D=e=>S(t=>({...t,[e]:!t[e]})),O=async e=>{let t=await e.text(),n=await T(`/api/backups/upload`,{name:e.name,content:t});r(n.ok?`Uploaded ${n.name}`:`Upload failed: ${n.error}`),n.ok&&w()},k=async e=>{s(null);let t=await T(`/api/backups/delete`,{name:e});r(t.ok?`Deleted ${e}`:`Delete failed: ${t.error}`),t.ok&&w()},A=async()=>{if(!u)return;let{name:e,value:t}=u;if(d(null),!t||t===e)return;let n=await T(`/api/backups/rename`,{name:e,new_name:t});r(n.ok?`Renamed to ${n.name}`:`Rename failed: ${n.error}`),n.ok&&w()},j=async e=>{if(!c)return;a(!0),r(e?`Restoring in Safe Mode…`:`Dry-run restore in Safe Mode…`);let t=await hc(`/api/backups/restore`,{name:c,device:f||void 0,confirm:e}).catch(()=>({ok:!1,message:`request failed`}));a(!1),r(t.ok?t.committed?`Restored ${c} → ${f}: ${t.message}`:`Dry-run OK (${t.applied} cmds, rolled back). Click “Restore (commit)” to apply for real.`:`Restore failed: ${t.message}`),t.ok&&e&&l(null)},M=e=>{mc(`/api/backups/get?name=${encodeURIComponent(e)}`).then(h).catch(()=>{})},N=async()=>{if(g===null)return;let t=g.trim();if(!t||t===e?.dir){_(null);return}a(!0);let n=await hc(`/api/backups/dir`,{dir:t}).catch(()=>({error:`request failed`}));a(!1),_(null),n.ok?r(n.persisted?`Backup path saved → ${n.dir}`:n.warning??`Path applied → ${n.dir}`):r(`Path change failed: ${n.error}`),n.ok&&w()};if(!e)return(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`loading backups…`});let P=e.devices.length===0?[{value:``,label:`no devices`}]:e.devices.map(e=>({value:e,label:e}));return(0,K.jsxs)(`section`,{className:`grid content-start gap-[18px]`,children:[(0,K.jsxs)(tb,{title:`Local backup vault`,className:`reveal`,extra:g===null?(0,K.jsxs)(`span`,{className:`inline-flex max-w-[min(60vw,520px)] items-center gap-2 text-muted-foreground text-[11px]`,children:[(0,K.jsx)(`span`,{className:`truncate`,title:e.dir,children:e.dir}),(0,K.jsxs)(`button`,{type:`button`,className:`inline-flex items-center gap-1 whitespace-nowrap text-brand hover:underline`,title:`Change backup directory`,onClick:()=>_(e.dir),children:[(0,K.jsx)(Kc,{className:`size-3`}),` edit path`]})]}):(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,K.jsx)(Vb,{className:`w-[min(48vw,380px)] text-xs`,value:g,autoFocus:!0,spellCheck:!1,placeholder:`~/.mikrotik-mcp/backups`,onChange:e=>_(e.target.value),onKeyDown:e=>{e.key===`Enter`&&N(),e.key===`Escape`&&_(null)}}),(0,K.jsx)(X,{type:`accent`,size:`sm`,onClick:()=>void N(),disabled:i,children:`Save path`}),(0,K.jsx)(X,{type:`secondary`,size:`sm`,ghost:!0,onClick:()=>_(null),children:`Cancel`})]}),children:[n&&(0,K.jsx)(`div`,{className:`mb-3 font-mono text-xs text-muted-foreground`,children:n}),(0,K.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(Gb,{value:f,onValueChange:p,"aria-label":`Device`,options:P}),(0,K.jsx)(X,{type:`accent`,size:`sm`,icon:(0,K.jsx)(Jc,{}),onClick:()=>void E(),disabled:i||!f,children:`Create backup`}),(0,K.jsx)(X,{size:`sm`,icon:(0,K.jsx)(ol,{}),onClick:()=>C.current?.click(),children:`Upload .rsc`}),(0,K.jsx)(`input`,{ref:C,type:`file`,accept:`.rsc,text/plain`,className:`hidden`,onChange:e=>{let t=e.target.files?.[0];t&&O(t),e.currentTarget.value=``}}),(0,K.jsx)(X,{size:`sm`,icon:(0,K.jsx)(Zc,{}),onClick:w,children:`Refresh`})]}),(0,K.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center gap-2.5`,children:[(0,K.jsx)(Vb,{className:`max-w-[200px] text-xs`,value:y,spellCheck:!1,placeholder:`label (optional), e.g. pre-upgrade`,onChange:e=>b(e.target.value)}),[[`show_sensitive`,`show-sensitive`,`Include secrets (keys/passwords)`],[`verbose`,`verbose`,`Include every parameter, even defaults`],[`compact`,`compact`,`Only non-default values (ignored if verbose)`],[`terse`,`terse`,`One machine-readable line per item`]].map(([e,t,n])=>{let r=e===`compact`&&x.verbose;return(0,K.jsxs)(`label`,{className:Y(`inline-flex cursor-pointer items-center gap-1.5 rounded-full border px-2.5 py-1.5 font-mono text-[11px] select-none`,x[e]?`border-brand/55 bg-brand/10 text-foreground`:`border-border bg-muted/40 text-muted-foreground`,r&&`cursor-not-allowed opacity-45`),title:n,children:[(0,K.jsx)(`input`,{type:`checkbox`,className:`accent-brand`,checked:x[e],disabled:r,onChange:()=>D(e)}),t]},e)})]}),c&&(0,K.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center gap-2 rounded-md border border-warning/45 bg-warning/10 px-3 py-2.5 text-xs`,children:[(0,K.jsxs)(`strong`,{children:[`Restore `,c]}),` onto`,` `,(0,K.jsx)(Gb,{value:f,onValueChange:p,size:`sm`,"aria-label":`Restore target device`,options:e.devices.map(e=>({value:e,label:e}))}),` `,`via Safe Mode (auto-reverts on lock-out).`,(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{type:`secondary`,size:`sm`,ghost:!0,onClick:()=>void j(!1),disabled:i,children:`Dry-run`}),(0,K.jsx)(X,{type:`accent`,size:`sm`,onClick:()=>void j(!0),disabled:i,children:`Restore (commit)`}),(0,K.jsx)(X,{type:`secondary`,size:`sm`,ghost:!0,onClick:()=>l(null),children:`Cancel`})]}),e.backups.length===0?(0,K.jsx)(`div`,{className:`p-3 text-muted-foreground text-[11px]`,children:"No backups yet. Click “Create backup” to capture this device’s config, or upload a `.rsc`."}):(0,K.jsx)(`div`,{className:`max-h-[60vh] overflow-auto rounded-lg border border-border`,children:(0,K.jsxs)(By,{className:`min-w-[980px] table-fixed`,children:[(0,K.jsx)(Vy,{className:`bg-card sticky top-0 z-10`,children:(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Wy,{children:`name`}),(0,K.jsx)(Wy,{className:`w-[130px]`,children:`device`}),(0,K.jsx)(Wy,{className:`w-[90px] text-right`,children:`size`}),(0,K.jsx)(Wy,{className:`w-[170px]`,children:`captured`}),(0,K.jsx)(Wy,{className:`w-[380px]`,children:`actions`})]})}),(0,K.jsx)(Hy,{children:e.backups.map(e=>(0,K.jsxs)(Uy,{"data-state":m?.name===e.name?`selected`:void 0,children:[(0,K.jsx)(Gy,{className:`truncate font-mono`,title:e.name,children:e.name}),(0,K.jsx)(Gy,{className:`truncate`,children:e.device??`—`}),(0,K.jsx)(Gy,{className:`text-right tabular-nums`,children:db(e.bytes)}),(0,K.jsx)(Gy,{className:`tabular-nums whitespace-nowrap`,children:new Date(e.modified).toLocaleString(void 0,{hour12:!1})}),(0,K.jsx)(Gy,{onClick:e=>e.stopPropagation(),children:(0,K.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,K.jsx)(X,{size:`sm`,onClick:()=>M(e.name),children:`view`}),(0,K.jsx)(`a`,{className:`inline-flex items-center rounded-md border border-border px-2 py-1 text-xs hover:bg-accent`,href:pc(`/api/backups/raw?name=${encodeURIComponent(e.name)}`),download:e.name,title:`Download`,children:(0,K.jsx)(Lc,{className:`size-3.5`})}),u?.name===e.name?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Vb,{className:`inline-block w-[120px] text-xs`,value:u.value,autoFocus:!0,onChange:t=>d({name:e.name,value:t.target.value}),onKeyDown:e=>e.key===`Enter`&&void A()}),(0,K.jsx)(X,{type:`accent`,size:`sm`,icon:(0,K.jsx)(kc,{}),onClick:()=>void A()}),(0,K.jsx)(X,{type:`secondary`,size:`sm`,ghost:!0,icon:(0,K.jsx)(cl,{}),onClick:()=>d(null)})]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(X,{size:`sm`,onClick:()=>d({name:e.name,value:e.name}),children:`rename`}),(0,K.jsx)(X,{type:`accent`,size:`sm`,onClick:()=>l(e.name),children:`restore`})]}),o===e.name?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(X,{type:`error`,size:`sm`,ghost:!0,icon:(0,K.jsx)(kc,{}),onClick:()=>void k(e.name)}),(0,K.jsx)(X,{type:`secondary`,size:`sm`,ghost:!0,icon:(0,K.jsx)(cl,{}),onClick:()=>s(null)})]}):(0,K.jsx)(X,{type:`error`,size:`sm`,ghost:!0,icon:(0,K.jsx)(il,{}),onClick:()=>s(e.name)})]})})]},e.name))})]})})]}),m&&(0,K.jsx)(tb,{title:`Backup · ${m.name}`,className:`reveal`,extra:(0,K.jsx)(X,{type:`secondary`,size:`sm`,icon:(0,K.jsx)(cl,{}),onClick:()=>h(null),children:`Close`}),children:(0,K.jsx)(`pre`,{className:`m-0 overflow-auto rounded border border-border bg-background p-3 font-mono text-xs break-words whitespace-pre-wrap`,style:{maxHeight:460},children:m.content||`(empty)`})})]})}function Jb({className:e,orientation:t=`horizontal`,...n}){return(0,K.jsx)(sv,{"data-slot":`tabs`,"data-orientation":t,orientation:t,className:Y(`group/tabs flex gap-2 data-[orientation=horizontal]:flex-col`,e),...n})}var Yb=Jy(`group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function Xb({className:e,variant:t=`default`,...n}){return(0,K.jsx)(ree,{"data-slot":`tabs-list`,"data-variant":t,className:Y(Yb({variant:t}),e),...n})}function Zb({className:e,...t}){return(0,K.jsx)(cv,{"data-slot":`tabs-trigger`,className:Y(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent`,`data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100`,e),...t})}function Qb({className:e,...t}){return(0,K.jsx)(lv,{"data-slot":`tabs-content`,className:Y(`flex-1 outline-none`,e),...t})}var $b=`http://www.w3.org/2000/svg`,ex=864e5,tx=e=>new Date(e).toISOString().slice(0,10);function nx(){let e=new Date;return Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())}function rx(e){return new Date(`${e}T00:00:00Z`).toLocaleDateString(void 0,{weekday:`short`,month:`short`,day:`numeric`,year:`numeric`,timeZone:`UTC`})}function ix({endpoint:e,days:t=90}){let[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(!0);(0,v.useEffect)(()=>{let t=!0;return a(!0),mc(e).then(e=>{t&&r(e)}).catch(()=>{t&&r(null)}).finally(()=>{t&&a(!1)}),()=>{t=!1}},[e]);let o=(0,v.useMemo)(()=>{let e=new Map((n?.series??[]).map(e=>[e.day,e])),r=nx(),i=[];for(let n=t-1;n>=0;n--){let t=tx(r-n*ex),a=e.get(t);i.push(a??{day:t,rx:0,tx:0})}return i},[n,t]);if(i)return(0,K.jsx)(`div`,{className:`px-1 py-4 text-[12.5px] text-muted-foreground`,children:`loading usage…`});if(!((n?.totalRx??0)+(n?.totalTx??0)>0))return(0,K.jsx)(`div`,{className:`px-1 py-4 text-[12.5px] text-muted-foreground`,children:`No usage recorded yet. The dashboard samples on a configurable interval (1 minute by default — see the RADIUS & UM Settings tab); history fills in over time (kept ~3 months).`});let s=Math.max(1,...o.flatMap(e=>[e.rx,e.tx])),c=e=>8+e*624/Math.max(1,o.length-1),l=e=>142-e/s*134,u=e=>o.map((t,n)=>`${c(n).toFixed(1)},${l(e(t)).toFixed(1)}`).join(` `),d=e=>{let t=c(0).toFixed(1),n=c(o.length-1).toFixed(1);return`${t},${142 .toFixed(1)} ${u(e)} ${n},${142 .toFixed(1)}`};return(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`mb-1.5 flex items-baseline gap-3.5 text-xs tabular-nums`,children:[(0,K.jsxs)(`span`,{className:`font-semibold text-chart-3`,children:[`↓ `,db(n?.totalRx??0),` down`]}),(0,K.jsxs)(`span`,{className:`font-semibold text-chart-4`,children:[`↑ `,db(n?.totalTx??0),` up`]}),(0,K.jsxs)(`span`,{className:`text-[11px] text-muted-foreground`,children:[`· peak/day `,db(s),` · last `,t,` days`]})]}),(0,K.jsxs)(`svg`,{className:`block h-40 w-full rounded-md border border-border bg-card`,viewBox:`0 0 640 150`,preserveAspectRatio:`none`,xmlns:$b,role:`img`,children:[(0,K.jsx)(`polygon`,{className:`fill-chart-3/20`,points:d(e=>e.rx)}),(0,K.jsx)(`polygon`,{className:`fill-chart-4/15`,points:d(e=>e.tx)}),(0,K.jsx)(`polyline`,{className:`fill-none stroke-chart-3 stroke-2 [vector-effect:non-scaling-stroke]`,points:u(e=>e.rx)}),(0,K.jsx)(`polyline`,{className:`fill-none stroke-chart-4 stroke-2 [vector-effect:non-scaling-stroke]`,points:u(e=>e.tx)})]})]})}var ax=53,ox=12,sx=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],cx=[`var(--muted)`,`color-mix(in srgb, var(--chart-3) 30%, var(--muted))`,`color-mix(in srgb, var(--chart-3) 50%, var(--muted))`,`color-mix(in srgb, var(--chart-3) 72%, transparent)`,`var(--chart-3)`];function lx({endpoint:e,label:t}){let[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),o=(0,v.useRef)(null);(0,v.useEffect)(()=>{let t=!0;return mc(e).then(e=>{t&&r(e)}).catch(()=>{t&&r({days:[],total:0,max:0})}),()=>{t=!1}},[e]);let{cells:s,monthLabels:c}=(0,v.useMemo)(()=>{let e=new Map((n?.days??[]).map(e=>[e.day,e.count])),t=nx(),r=t-(new Date(t).getUTCDay()+(ax-1)*7)*ex,i=[],a=[],o=-1;for(let n=0;n<ax*7;n++){let s=r+n*ex;if(s>t)break;let c=Math.floor(n/7),l=new Date(s).getUTCDay(),u=tx(s);if(i.push({day:u,count:e.get(u)??0,col:c,row:l,ms:s}),l===0){let e=new Date(s).getUTCMonth();e!==o&&(a.push({col:c,text:sx[e]}),o=e)}}return{cells:i,monthLabels:a}},[n]),l=Math.max(1,n?.max??1),u=e=>e<=0?0:Math.min(4,Math.ceil(e/l*4)),d=(e,t)=>{let n=o.current;if(!n)return;let r=e.currentTarget.getBoundingClientRect(),i=n.getBoundingClientRect();a({left:r.left-i.left+r.width/2,top:r.top-i.top,day:t.day,count:t.count,lvl:u(t.count)})};return(0,K.jsxs)(`div`,{className:`relative`,ref:o,children:[(0,K.jsxs)(`div`,{className:`mb-1.5 flex items-baseline gap-2.5`,children:[(0,K.jsx)(`span`,{className:`text-[12.5px] font-semibold`,children:t??`Connections`}),(0,K.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:n?`${n.total} total`:`…`})]}),(0,K.jsx)(`div`,{className:`overflow-x-auto pb-1`,onMouseLeave:()=>a(null),children:(0,K.jsxs)(`svg`,{className:`block`,viewBox:`0 0 823 121`,width:823,height:121,xmlns:$b,role:`img`,children:[c.map(e=>(0,K.jsx)(`text`,{className:`fill-muted-foreground text-[9px]`,x:28+e.col*15,y:11,children:e.text},`${e.col}-${e.text}`)),[`Mon`,`Wed`,`Fri`].map((e,t)=>(0,K.jsx)(`text`,{className:`fill-muted-foreground text-[9px]`,x:0,y:16+(t*2+1)*15+ox-2,children:e},e)),s.map(e=>(0,K.jsx)(`rect`,{className:`cursor-pointer stroke-1 [transition:stroke_0.1s_ease] ${i?.day===e.day?`stroke-foreground stroke-[1.5px]`:`stroke-border/60`}`,style:{fill:cx[u(e.count)]},x:28+e.col*15,y:16+e.row*15,width:ox,height:ox,rx:2,onMouseEnter:t=>d(t,e)},e.day))]})}),i&&(0,K.jsxs)(`div`,{className:`pointer-events-none absolute z-30 min-w-[150px] -translate-x-1/2 translate-y-[calc(-100%-9px)] rounded-[10px] border border-chart-3/35 bg-popover px-2.5 py-2 shadow-xl`,style:{left:i.left,top:i.top},role:`tooltip`,children:[(0,K.jsx)(`span`,{className:`absolute -bottom-1.5 left-1/2 size-[11px] -translate-x-1/2 rotate-45 border-r border-b border-chart-3/35 bg-popover`}),(0,K.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[13px]`,children:[(0,K.jsx)(`span`,{className:`inline-block size-[12px] rounded-[2px]`,style:{background:cx[i.lvl]}}),(0,K.jsx)(`b`,{className:`font-semibold`,children:i.count===0?`No connections`:`${i.count} connection${i.count===1?``:`s`}`})]}),(0,K.jsx)(`div`,{className:`mt-[3px] text-[11.5px] text-muted-foreground tabular-nums`,children:rx(i.day)})]}),(0,K.jsxs)(`div`,{className:`mt-2 flex items-center gap-1 text-[11px] text-muted-foreground`,children:[`Less`,[0,1,2,3,4].map(e=>(0,K.jsx)(`span`,{className:`inline-block size-[11px] rounded-[2px]`,style:{background:cx[e]}},e)),`More`]})]})}var ux=e=>(e.flags??``).includes(`X`)||e.disabled===`yes`;function dx(e,t){return e[t.idKey]||e.name||e.address||e.user||`(row)`}var fx=`mb-3.5 rounded-md border border-border bg-card p-3.5`,px=`mb-2.5 text-[13px] font-semibold`,mx=`grid grid-cols-[repeat(auto-fill,minmax(220px,1fr))] gap-x-3.5 gap-y-2.5`,hx=`mt-3.5 flex items-center gap-2.5`,gx=`flex flex-col gap-1`,_x=`text-[11.5px] text-muted-foreground`;function vx({config:e,device:t}){let[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(!1),[c,l]=(0,v.useState)(``),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)({}),m=(0,v.useCallback)(async()=>{try{let n=t?`?device=${encodeURIComponent(t)}`:``;r(await mc(`/api/aaa/list/${e.slug}${n}`)),a(null)}catch(e){a(e instanceof Error?e.message:String(e))}},[e.slug,t]);(0,v.useEffect)(()=>{r(null),d(null),m()},[m]);let h=(0,v.useCallback)(async(n,r)=>{s(!0),a(null);try{let i=await hc(`/api/aaa/${n}`,{device:t,slug:e.slug,...r});return i.ok?(await m(),!0):(a(i.message),!1)}catch(e){return a(e instanceof Error?e.message:String(e)),!1}finally{s(!1)}},[t,e.slug,m]),g=()=>{d(`new`),p({})},_=t=>{d(t[e.idKey]);let n={};for(let r of e.fields)r.type!==`password`&&(r.key===`disabled`?n.disabled=ux(t)?`yes`:`no`:t[r.key]!=null&&(n[r.key]=t[r.key]));p(n)},y=async()=>{(u===`new`?await h(`add`,{fields:f}):await h(`update`,{id:u,fields:f}))&&d(null)},b=(0,v.useMemo)(()=>{let t=n?.rows??[],r=c.trim().toLowerCase();return r?t.filter(t=>e.columns.some(e=>(t[e.key]??``).toLowerCase().includes(r))):t},[n,c,e.columns]);return n&&!n.available?(0,K.jsxs)(Pb,{type:`warning`,label:`User Manager not installed`,children:[`This device doesn't have the `,(0,K.jsx)(`code`,{children:`user-manager`}),` package. Install it (System → Packages) and reboot to manage the built-in RADIUS server here.`]}):(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`mb-3 flex items-center gap-2.5`,children:[(0,K.jsx)(Vb,{className:`w-[200px]`,placeholder:`Filter…`,value:c,onChange:e=>l(e.target.value)}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[b.length,` rows`]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,icon:(0,K.jsx)(Zc,{}),onClick:()=>void m(),children:`Refresh`}),(0,K.jsx)(X,{size:`sm`,type:`accent`,icon:(0,K.jsx)(Jc,{}),onClick:g,children:`Add`})]}),i&&(0,K.jsx)(Pb,{type:`error`,className:`mb-2.5`,children:i}),u&&(0,K.jsxs)(`div`,{className:fx,children:[(0,K.jsx)(`div`,{className:px,children:u===`new`?`New ${e.slug}`:`Edit ${u}`}),(0,K.jsx)(`div`,{className:mx,children:e.fields.map(e=>(0,K.jsxs)(`label`,{className:gx,children:[(0,K.jsxs)(`span`,{className:_x,children:[e.label,e.required&&u===`new`?` *`:``]}),e.type===`bool`?(0,K.jsx)(Gb,{value:f[e.key]??``,onValueChange:t=>p({...f,[e.key]:t}),options:[{value:``,label:`—`},{value:`no`,label:`no`},{value:`yes`,label:`yes`}]}):e.type===`select`?(0,K.jsx)(Gb,{value:f[e.key]??``,onValueChange:t=>p({...f,[e.key]:t}),options:[{value:``,label:`—`},...(e.options??[]).map(e=>({value:e,label:e}))]}):(0,K.jsx)(Vb,{type:e.type===`password`?`password`:e.type===`number`?`number`:`text`,placeholder:e.placeholder??(e.type===`password`?`(unchanged)`:``),value:f[e.key]??``,onChange:t=>p({...f,[e.key]:t.target.value})})]},e.key))}),(0,K.jsxs)(`div`,{className:hx,children:[(0,K.jsx)(X,{size:`sm`,type:`accent`,loading:o,onClick:()=>void y(),children:u===`new`?`Create`:`Save`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>d(null),children:`Cancel`})]})]}),n?b.length===0?(0,K.jsx)(`div`,{className:`px-1 py-5 text-muted-foreground text-[11px]`,children:e.empty??`Nothing here yet.`}):(0,K.jsxs)(By,{className:`text-[13px]`,children:[(0,K.jsx)(Vy,{children:(0,K.jsxs)(Uy,{children:[e.columns.map(e=>(0,K.jsx)(Wy,{children:e.label},e.key)),(0,K.jsx)(Wy,{className:`text-right`,children:`Actions`})]})}),(0,K.jsx)(Hy,{children:b.map(t=>{let n=t[e.idKey],r=ux(t);return(0,K.jsxs)(Uy,{children:[e.columns.map(e=>(0,K.jsx)(Gy,{className:Y(r&&`text-muted-foreground`),title:t[e.key]??``,children:e.key===`_status`?(0,K.jsx)(Lb,{type:r?`secondary`:`success`,children:r?`disabled`:`enabled`}):t[e.key]??``},e.key)),(0,K.jsx)(Gy,{className:`text-right`,children:(0,K.jsxs)(`span`,{className:`flex justify-end gap-1.5`,children:[e.toggle&&(0,K.jsx)(X,{size:`sm`,ghost:!0,disabled:o,onClick:()=>void h(`toggle`,{id:n,enable:r}),children:r?`Enable`:`Disable`}),!e.addOnly&&(0,K.jsx)(X,{size:`sm`,ghost:!0,disabled:o,onClick:()=>_(t),children:`Edit`}),(0,K.jsx)(X,{size:`sm`,type:`error`,ghost:!0,disabled:o,onClick:()=>void h(`remove`,{id:n}),children:`Remove`})]})})]},n||dx(t,e))})})]}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`loading…`})]})}var yx=[`user`,`calling-station-id`,`nas-ip-address`,`started`,`ended`,`uptime`,`download`,`upload`,`status`];function bx({device:e}){let[t,n]=(0,v.useState)(null),[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(``),s=(0,v.useCallback)(async()=>{try{let t=e?`?device=${encodeURIComponent(e)}`:``;n(await mc(`/api/aaa/list/um-sessions${t}`)),i(null)}catch(e){i(e instanceof Error?e.message:String(e))}},[e]);if((0,v.useEffect)(()=>{n(null),s();let e=setInterval(()=>void s(),1e4);return()=>clearInterval(e)},[s]),t&&!t.available)return(0,K.jsxs)(Pb,{type:`warning`,label:`User Manager not installed`,children:[`The `,(0,K.jsx)(`code`,{children:`user-manager`}),` package isn't installed on this device.`]});let c=(t?.rows??[]).filter(e=>!a.trim()||(e.user??``).toLowerCase().includes(a.trim().toLowerCase()));return(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`mb-3 flex items-center gap-2.5`,children:[(0,K.jsx)(Vb,{className:`w-[200px]`,placeholder:`Filter by user…`,value:a,onChange:e=>o(e.target.value)}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[c.length,` sessions`]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,icon:(0,K.jsx)(Zc,{}),onClick:()=>void s(),children:`Refresh`})]}),r&&(0,K.jsx)(Pb,{type:`error`,children:r}),t?c.length===0?(0,K.jsx)(`div`,{className:`px-1 py-5 text-muted-foreground text-[11px]`,children:`No accounting sessions recorded.`}):(0,K.jsxs)(By,{className:`text-[13px]`,children:[(0,K.jsx)(Vy,{children:(0,K.jsx)(Uy,{children:yx.map(e=>(0,K.jsx)(Wy,{children:e.replace(/-/g,` `)},e))})}),(0,K.jsx)(Hy,{children:c.map((e,t)=>(0,K.jsx)(Uy,{children:yx.map(t=>(0,K.jsx)(Gy,{title:e[t]??``,children:e[t]??``},t))},e[`.id`]||t))})]}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`loading…`})]})}function xx({device:e,getPath:t,setPath:n,fields:r,title:i,unwrap:a,extra:o}){let[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(!0),[d,f]=(0,v.useState)({}),[p,m]=(0,v.useState)(null),[h,g]=(0,v.useState)(!1),_=(0,v.useCallback)(async()=>{let{available:n,row:r}=a(await mc(`${t}${e?`?device=${encodeURIComponent(e)}`:``}`).catch(()=>null));u(n),c(r),f({})},[e,t,a]);(0,v.useEffect)(()=>{_()},[_]);let y=async()=>{g(!0),m(null);try{let t=await hc(n,{device:e,fields:d});m(t.message),t.ok&&await _()}finally{g(!1)}};return l?(0,K.jsxs)(`div`,{className:fx,children:[(0,K.jsx)(`div`,{className:px,children:i}),s&&(0,K.jsx)(`div`,{className:`mb-3 text-muted-foreground text-xs`,children:r.map(e=>`${e.label}: ${s[e.key]??`—`}`).join(` · `)}),(0,K.jsx)(`div`,{className:mx,children:r.map(e=>(0,K.jsxs)(`label`,{className:gx,children:[(0,K.jsx)(`span`,{className:_x,children:e.label}),e.type===`bool`?(0,K.jsx)(Gb,{value:d[e.key]??``,onValueChange:t=>f({...d,[e.key]:t}),options:[{value:``,label:`(unchanged)`},{value:`no`,label:`no`},{value:`yes`,label:`yes`}]}):(0,K.jsx)(Vb,{type:e.type===`number`?`number`:`text`,placeholder:e.placeholder??s?.[e.key]??``,value:d[e.key]??``,onChange:t=>f({...d,[e.key]:t.target.value})})]},e.key))}),(0,K.jsxs)(`div`,{className:hx,children:[(0,K.jsx)(X,{size:`sm`,type:`accent`,loading:h,onClick:()=>void y(),children:`Save`}),o,p&&(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:p})]})]}):(0,K.jsxs)(Pb,{type:`warning`,label:`Not available`,children:[i,` is not available on this device.`]})}var Sx={slug:`radius`,idKey:`.id`,toggle:!0,columns:[{key:`address`,label:`Address`},{key:`service`,label:`Service`},{key:`authentication-port`,label:`Auth`},{key:`accounting-port`,label:`Acct`},{key:`protocol`,label:`Proto`},{key:`_status`,label:`Status`}],empty:`No RADIUS servers configured.`,fields:[{key:`address`,label:`Address`,required:!0,placeholder:`1.2.3.4 or host`},{key:`secret`,label:`Secret`,type:`password`,required:!0},{key:`service`,label:`Service`,required:!0,placeholder:`login,ppp,hotspot,wireless,dhcp,ipsec,dot1x`},{key:`authentication-port`,label:`Auth port`,type:`number`,placeholder:`1812`},{key:`accounting-port`,label:`Acct port`,type:`number`,placeholder:`1813`},{key:`timeout`,label:`Timeout`,placeholder:`300ms`},{key:`src-address`,label:`Src address`},{key:`realm`,label:`Realm`},{key:`called-id`,label:`Called ID`},{key:`domain`,label:`Domain`},{key:`protocol`,label:`Protocol`,type:`select`,options:[`udp`,`radsec`]},{key:`certificate`,label:`Certificate`},{key:`accounting-backup`,label:`Acct backup`,type:`bool`},{key:`comment`,label:`Comment`},{key:`disabled`,label:`Disabled`,type:`bool`}]},Cx={slug:`um-users`,idKey:`name`,toggle:!0,columns:[{key:`name`,label:`Name`},{key:`group`,label:`Group`},{key:`shared-users`,label:`Shared`},{key:`caller-id`,label:`Caller ID`},{key:`comment`,label:`Comment`},{key:`_status`,label:`Status`}],empty:`No RADIUS users.`,fields:[{key:`name`,label:`Name`,required:!0},{key:`password`,label:`Password`,type:`password`,required:!0},{key:`group`,label:`Group`},{key:`shared-users`,label:`Shared users`,type:`number`,placeholder:`1`},{key:`attributes`,label:`RADIUS attributes`},{key:`caller-id`,label:`Caller ID (MAC)`},{key:`otp-secret`,label:`OTP secret`,type:`password`},{key:`comment`,label:`Comment`},{key:`disabled`,label:`Disabled`,type:`bool`}]},wx={slug:`um-profiles`,idKey:`name`,columns:[{key:`name`,label:`Name`},{key:`name-for-users`,label:`Display`},{key:`validity`,label:`Validity`},{key:`price`,label:`Price`},{key:`starts-when`,label:`Starts`}],empty:`No service profiles.`,fields:[{key:`name`,label:`Name`,required:!0},{key:`name-for-users`,label:`Display name`},{key:`validity`,label:`Validity`,placeholder:`30d`},{key:`price`,label:`Price`,type:`number`},{key:`starts-when`,label:`Starts when`,type:`select`,options:[`assigned`,`first-auth`]},{key:`override-shared-users`,label:`Override shared-users`},{key:`comment`,label:`Comment`}]},Tx={slug:`um-limitations`,idKey:`name`,columns:[{key:`name`,label:`Name`},{key:`rate-limit-rx`,label:`Rate ↓`},{key:`rate-limit-tx`,label:`Rate ↑`},{key:`transfer-limit`,label:`Transfer`},{key:`uptime-limit`,label:`Uptime`}],empty:`No limitation templates.`,fields:[{key:`name`,label:`Name`,required:!0},{key:`rate-limit-rx`,label:`Download rate`,placeholder:`10M`},{key:`rate-limit-tx`,label:`Upload rate`,placeholder:`10M`},{key:`rate-limit-min-rx`,label:`Min download (CIR)`,placeholder:`2M`},{key:`rate-limit-min-tx`,label:`Min upload (CIR)`,placeholder:`2M`},{key:`rate-limit-burst-rx`,label:`Burst download`,placeholder:`20M`},{key:`rate-limit-burst-tx`,label:`Burst upload`,placeholder:`20M`},{key:`rate-limit-burst-threshold-rx`,label:`Burst thr. ↓`},{key:`rate-limit-burst-threshold-tx`,label:`Burst thr. ↑`},{key:`rate-limit-burst-time-rx`,label:`Burst time ↓`,placeholder:`10s`},{key:`rate-limit-burst-time-tx`,label:`Burst time ↑`,placeholder:`10s`},{key:`rate-limit-priority`,label:`Priority (1-8)`,type:`number`},{key:`download-limit`,label:`Download cap`,placeholder:`5G`},{key:`upload-limit`,label:`Upload cap`,placeholder:`5G`},{key:`transfer-limit`,label:`Total transfer cap`,placeholder:`10G`},{key:`uptime-limit`,label:`Uptime cap`,placeholder:`1d`},{key:`reset-counters-interval`,label:`Reset interval`},{key:`reset-counters-start-time`,label:`Reset start time`},{key:`comment`,label:`Comment`}]},Ex={slug:`um-routers`,idKey:`name`,toggle:!0,columns:[{key:`name`,label:`Name`},{key:`address`,label:`Address`},{key:`coa-port`,label:`CoA port`},{key:`protocol`,label:`Proto`},{key:`comment`,label:`Comment`},{key:`_status`,label:`Status`}],empty:`No NAS clients registered.`,fields:[{key:`name`,label:`Name`,required:!0},{key:`address`,label:`Address`,required:!0,placeholder:`192.168.88.1`},{key:`shared-secret`,label:`Shared secret`,type:`password`,required:!0},{key:`coa-port`,label:`CoA port`,type:`number`},{key:`protocol`,label:`Protocol`,placeholder:`radius`},{key:`comment`,label:`Comment`},{key:`disabled`,label:`Disabled`,type:`bool`}]},Dx={slug:`um-user-profiles`,idKey:`.id`,addOnly:!0,columns:[{key:`user`,label:`User`},{key:`profile`,label:`Profile`},{key:`state`,label:`State`},{key:`end-time`,label:`Ends`}],empty:`No profile assignments.`,fields:[{key:`user`,label:`User`,required:!0},{key:`profile`,label:`Profile`,required:!0}]},Ox=[{id:`radius`,label:`RADIUS Servers`},{id:`users`,label:`Users`},{id:`profiles`,label:`Profiles`},{id:`limitations`,label:`Limitations`},{id:`nas`,label:`NAS Clients`},{id:`assignments`,label:`Assignments`},{id:`sessions`,label:`Sessions`},{id:`usage`,label:`Usage & Heatmap`},{id:`settings`,label:`Settings`}],kx=[{key:`accept`,label:`Accept CoA`,type:`bool`},{key:`port`,label:`CoA port`,type:`number`,placeholder:`3799`}],Ax=[{key:`enabled`,label:`Enabled`,type:`bool`},{key:`use-profiles`,label:`Use profiles`,type:`bool`},{key:`certificate`,label:`Certificate`},{key:`authentication-port`,label:`Auth port`,type:`number`},{key:`accounting-port`,label:`Acct port`,type:`number`}];function jx({device:e}){let[t,n]=(0,v.useState)(null),[r,i]=(0,v.useState)(``);(0,v.useEffect)(()=>{mc(`/api/usage/um-users${e?`?device=${encodeURIComponent(e)}`:``}`).then(e=>{n(e.users),i(t=>t||e.users[0]||``)}).catch(()=>n([]))},[e]);let a=e?`&device=${encodeURIComponent(e)}`:``;return(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`mb-3 flex items-center gap-2`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`User`}),(0,K.jsx)(Gb,{value:r,onValueChange:i,"aria-label":`User`,options:t&&t.length>0?t.map(e=>({value:e,label:e})):[{value:``,label:`— no sessions recorded yet —`}]})]}),t&&t.length===0?(0,K.jsx)(Pb,{type:`secondary`,label:`No data yet`,children:`No User Manager sessions have been recorded yet. The dashboard ingests sessions on a configurable interval (1 minute by default — change it under the Settings tab) and keeps them forever, so usage and the heatmap fill in over time.`}):r&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`mt-4`,children:[(0,K.jsx)(`div`,{className:`mb-2 text-xs font-semibold text-muted-foreground`,children:`Download / upload · last 3 months`}),(0,K.jsx)(ix,{endpoint:`/api/usage/um-user?user=${encodeURIComponent(r)}${a}&days=90`,days:90})]}),(0,K.jsxs)(`div`,{className:`mt-4`,children:[(0,K.jsxs)(`div`,{className:`mb-2 text-xs font-semibold text-muted-foreground`,children:[`Connection heatmap · `,r]}),(0,K.jsx)(lx,{endpoint:`/api/usage/heatmap?user=${encodeURIComponent(r)}${a}&days=371`,label:`${r} — connections`})]}),(0,K.jsxs)(`div`,{className:`mt-4`,children:[(0,K.jsx)(`div`,{className:`mb-2 text-xs font-semibold text-muted-foreground`,children:`All users · connections`}),(0,K.jsx)(lx,{endpoint:`/api/usage/heatmap?days=371${a}`,label:`All users`})]})]})]})}function Mx(){let[e,t]=(0,v.useState)(``),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(null),c=(0,v.useCallback)(async()=>{try{let e=await mc(`/api/usage/sampler`);r(e.intervalMs)}catch{r(null)}},[]);(0,v.useEffect)(()=>{c()},[c]);let l=async()=>{let n=Number(e);if(!Number.isFinite(n)||n<=0){s(`Enter a positive number of minutes.`);return}a(!0),s(null);try{let e=await hc(`/api/usage/sampler`,{intervalMs:Math.round(n*6e4)});r(e.intervalMs),t(``),s(`Now sampling every ${Nx(e.intervalMs)}.`)}catch(e){s(e instanceof Error?e.message:String(e))}finally{a(!1)}};return(0,K.jsxs)(`div`,{className:`rounded-md border border-border bg-card p-3.5`,children:[(0,K.jsx)(`div`,{className:px,children:`Usage sampling`}),(0,K.jsxs)(`div`,{className:`mb-3 text-muted-foreground text-xs`,children:[`How often client traffic + User Manager sessions are recorded into the usage history. Current: `,n==null?`…`:Nx(n),` · default 1 minute · range 30s–6h.`]}),(0,K.jsx)(`div`,{className:mx,children:(0,K.jsxs)(`label`,{className:gx,children:[(0,K.jsx)(`span`,{className:_x,children:`Interval (minutes)`}),(0,K.jsx)(Vb,{type:`number`,step:`0.5`,min:`0.5`,placeholder:n?String(n/6e4):`1`,value:e,onChange:e=>t(e.target.value)})]})}),(0,K.jsxs)(`div`,{className:hx,children:[(0,K.jsx)(X,{size:`sm`,type:`accent`,loading:i,onClick:()=>void l(),children:`Save`}),[1,5,10,30].map(e=>(0,K.jsxs)(X,{size:`sm`,ghost:!0,onClick:()=>{t(String(e))},children:[e,`m`]},e)),o&&(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:o})]})]})}function Nx(e){if(e<6e4)return`${Math.round(e/1e3)}s`;let t=e/6e4;return`${Number.isInteger(t)?t:t.toFixed(1)} min`}function Px(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)(`radius`);(0,v.useEffect)(()=>{mc(`/api/devices`).then(e=>{t(e),r(t=>t||e.defaultDevice||e.devices[0]?.name||``)}).catch(()=>t({server:``,defaultDevice:``,devices:[]}))},[]);let o=e?.devices??[];return(0,K.jsx)(`section`,{className:`grid content-start gap-[18px]`,children:(0,K.jsx)(tb,{title:`RADIUS & User Manager`,className:`reveal`,extra:o.length>1?(0,K.jsx)(Gb,{value:n,onValueChange:r,"aria-label":`Router`,options:o.map(e=>({value:e.name,label:`${e.name}${e.isDefault?` (default)`:``}`}))}):void 0,children:(0,K.jsxs)(Jb,{value:i,onValueChange:e=>a(e),children:[(0,K.jsx)(Xb,{variant:`line`,className:`mb-3.5 h-auto w-full flex-wrap justify-start border-b border-border`,children:Ox.map(e=>(0,K.jsx)(Zb,{value:e.id,children:e.label},e.id))}),(0,K.jsx)(Qb,{value:`radius`,children:(0,K.jsx)(vx,{config:Sx,device:n})}),(0,K.jsx)(Qb,{value:`users`,children:(0,K.jsx)(vx,{config:Cx,device:n})}),(0,K.jsx)(Qb,{value:`profiles`,children:(0,K.jsx)(vx,{config:wx,device:n})}),(0,K.jsx)(Qb,{value:`limitations`,children:(0,K.jsx)(vx,{config:Tx,device:n})}),(0,K.jsx)(Qb,{value:`nas`,children:(0,K.jsx)(vx,{config:Ex,device:n})}),(0,K.jsx)(Qb,{value:`assignments`,children:(0,K.jsx)(vx,{config:Dx,device:n})}),(0,K.jsx)(Qb,{value:`sessions`,children:(0,K.jsx)(bx,{device:n})}),(0,K.jsx)(Qb,{value:`usage`,children:(0,K.jsx)(jx,{device:n})}),(0,K.jsx)(Qb,{value:`settings`,children:(0,K.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,K.jsx)(xx,{device:n,getPath:`/api/aaa/radius-incoming`,setPath:`/api/aaa/radius-incoming`,title:`RADIUS Incoming (CoA listener)`,fields:kx,unwrap:e=>({available:!0,row:e??{}}),extra:(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>void hc(`/api/aaa/radius-reset-counters`,{device:n}),children:`Reset RADIUS counters`})}),(0,K.jsx)(xx,{device:n,getPath:`/api/aaa/um-settings`,setPath:`/api/aaa/um-settings`,title:`User Manager (built-in RADIUS server)`,fields:Ax,unwrap:e=>{let t=e??{};return{available:t.available!==!1,row:t.settings??{}}}}),(0,K.jsx)(Mx,{})]})})]})})})}function Fx({className:e,...t}){return(0,K.jsx)(`textarea`,{"data-slot":`textarea`,className:Y(`flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40`,e),...t})}var Ix={add:`+`,set:`~`,remove:`−`,enable:`▲`,disable:`▽`,move:`⇅`},Lx={high:`border-l-destructive`,medium:`border-l-warning`,low:`border-l-success`};function Rx(){let[e,t]=(0,v.useState)(``),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(!1),c=async()=>{s(!0),a(null);let t=await hc(`/api/plan`,{script:e}).catch(()=>({error:`request failed`}));if(s(!1),t.error||!t.plan){a(t.error??`no plan produced`),r(null);return}r({plan:t.plan,text:t.text??``})},l=n?.plan.grade??``,u=l===`critical`||l===`high`;return(0,K.jsxs)(`section`,{className:`grid content-start gap-[18px]`,children:[(0,K.jsxs)(tb,{title:`Change plan — dry-run`,className:`reveal`,extra:(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`terraform-style preview · pure analysis, never touches a device`}),children:[(0,K.jsx)(Fx,{className:`min-h-40 resize-y font-mono text-xs leading-relaxed`,spellCheck:!1,placeholder:`Paste intended RouterOS commands, one per line, e.g.
77
+ `},Vd=0,Hd=[];function Ud(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(Vd++)[0],a=v.useState(dd)[0],o=v.useRef(e);v.useEffect(function(){o.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Bu([e.lockRef.current],(e.shards||[]).map(Rd),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=v.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Id(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=kd(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=kd(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Fd(h,t,e,h===`h`?s:c,!0)},[]),c=v.useCallback(function(e){var n=e;if(!(!Hd.length||Hd[Hd.length-1]!==a)){var r=`deltaY`in n?Ld(n):Id(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&zd(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Rd).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=v.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Wd(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=v.useCallback(function(e){n.current=Id(e),r.current=void 0},[]),d=v.useCallback(function(t){l(t.type,Ld(t),t.target,s(t,e.lockRef.current))},[]),f=v.useCallback(function(t){l(t.type,Id(t),t.target,s(t,e.lockRef.current))},[]);v.useEffect(function(){return Hd.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,wd),document.addEventListener(`touchmove`,c,wd),document.addEventListener(`touchstart`,u,wd),function(){Hd=Hd.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,wd),document.removeEventListener(`touchmove`,c,wd),document.removeEventListener(`touchstart`,u,wd)}},[]);var p=e.removeScrollBar,m=e.inert;return v.createElement(v.Fragment,null,m?v.createElement(a,{styles:Bd(i)}):null,p?v.createElement(xd,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Wd(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Gd=ed(td,Ud),Kd=v.forwardRef(function(e,t){return v.createElement(rd,Ru({},e,{ref:t,sideCar:Gd}))});Kd.classNames=rd.classNames;var qd=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Jd=new WeakMap,Yd=new WeakMap,Xd={},Zd=0,Qd=function(e){return e&&(e.host||Qd(e.parentNode))},$d=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Qd(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},ef=function(e,t,n,r){var i=$d(t,Array.isArray(e)?e:[e]);Xd[n]||(Xd[n]=new WeakMap);var a=Xd[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Jd.get(e)||0)+1,l=(a.get(e)||0)+1;Jd.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Yd.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Zd++,function(){o.forEach(function(e){var t=Jd.get(e)-1,i=a.get(e)-1;Jd.set(e,t),a.set(e,i),t||(Yd.has(e)||e.removeAttribute(r),Yd.delete(e)),i||e.removeAttribute(n)}),Zd--,Zd||(Jd=new WeakMap,Jd=new WeakMap,Yd=new WeakMap,Xd={})}},tf=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||qd(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),ef(r,i,n,`aria-hidden`)):function(){return null}},nf=`Dialog`,[rf,af]=Nl(nf),[of,sf]=rf(nf),cf=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=v.useRef(null),c=v.useRef(null),[l,u]=zl({prop:r,defaultProp:i??!1,onChange:a,caller:nf});return(0,K.jsx)(of,{scope:t,triggerRef:s,contentRef:c,contentId:Zl(),titleId:Zl(),descriptionId:Zl(),open:l,onOpenChange:u,onOpenToggle:v.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};cf.displayName=nf;var lf=`DialogTrigger`,uf=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=sf(lf,n),a=dl(t,i.triggerRef);return(0,K.jsx)(Ol.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Af(i.open),...r,ref:a,onClick:Il(e.onClick,i.onOpenToggle)})});uf.displayName=lf;var df=`DialogPortal`,[ff,pf]=rf(df,{forceMount:void 0}),mf=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=sf(df,t);return(0,K.jsx)(ff,{scope:t,forceMount:n,children:v.Children.map(r,e=>(0,K.jsx)(Ul,{present:n||a.open,children:(0,K.jsx)(Nu,{asChild:!0,container:i,children:e})}))})};mf.displayName=df;var hf=`DialogOverlay`,gf=v.forwardRef((e,t)=>{let n=pf(hf,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=sf(hf,e.__scopeDialog);return a.modal?(0,K.jsx)(Ul,{present:r||a.open,children:(0,K.jsx)(vf,{...i,ref:t})}):null});gf.displayName=hf;var _f=fl(`DialogOverlay.RemoveScroll`),vf=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=sf(hf,n),a=dl(t,uu());return(0,K.jsx)(Kd,{as:_f,allowPinchZoom:!0,shards:[i.contentRef],children:(0,K.jsx)(Ol.div,{"data-state":Af(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})}),yf=`DialogContent`,bf=v.forwardRef((e,t)=>{let n=pf(yf,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=sf(yf,e.__scopeDialog);return(0,K.jsx)(Ul,{present:r||a.open,children:a.modal?(0,K.jsx)(xf,{...i,ref:t}):(0,K.jsx)(Sf,{...i,ref:t})})});bf.displayName=yf;var xf=v.forwardRef((e,t)=>{let n=sf(yf,e.__scopeDialog),r=v.useRef(null),i=dl(t,n.contentRef,r);return v.useEffect(()=>{let e=r.current;if(e)return tf(e)},[]),(0,K.jsx)(Cf,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:Il(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Il(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:Il(e.onFocusOutside,e=>e.preventDefault())})}),Sf=v.forwardRef((e,t)=>{let n=sf(yf,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return(0,K.jsx)(Cf,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),Cf=v.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=sf(yf,n);return Iu(),(0,K.jsx)(K.Fragment,{children:(0,K.jsx)(bu,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,K.jsx)(su,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Af(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})}),wf=`DialogTitle`,Tf=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=sf(wf,n);return(0,K.jsx)(Ol.h2,{id:i.titleId,...r,ref:t})});Tf.displayName=wf;var Ef=`DialogDescription`,Df=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=sf(Ef,n);return(0,K.jsx)(Ol.p,{id:i.descriptionId,...r,ref:t})});Df.displayName=Ef;var Of=`DialogClose`,kf=v.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=sf(Of,n);return(0,K.jsx)(Ol.button,{type:`button`,...r,ref:t,onClick:Il(e.onClick,()=>i.onOpenChange(!1))})});kf.displayName=Of;function Af(e){return e?`open`:`closed`}function jf(e){let t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Mf(e){let[t,n]=v.useState(void 0);return Ll(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var Nf=`Checkbox`,[Pf,Ff]=Nl(Nf),[If,Lf]=Pf(Nf);function Rf(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=zl({prop:n,defaultProp:i??!1,onChange:c,caller:Nf}),[m,h]=v.useState(null),[g,_]=v.useState(null),y=v.useRef(!1),b=m?!!o||!!m.closest(`form`):!0,x={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:y,required:l,defaultChecked:qf(i)?!1:i,isFormControl:b,bubbleInput:g,setBubbleInput:_};return(0,K.jsx)(If,{scope:t,...x,children:Kf(d)?d(x):r})}var zf=`CheckboxTrigger`,Bf=v.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=Lf(zf,e),h=dl(i,u),g=v.useRef(c);return v.useEffect(()=>{let e=a?.form;if(e){let t=()=>d(g.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,K.jsx)(Ol.button,{type:`button`,role:`checkbox`,"aria-checked":qf(c)?`mixed`:c,"aria-required":l,"data-state":Jf(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:h,onKeyDown:Il(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:Il(n,e=>{d(e=>qf(e)?!0:!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});Bf.displayName=zf;var Vf=v.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,K.jsx)(Rf,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Bf,{...d,ref:t,__scopeCheckbox:n}),e&&(0,K.jsx)(Gf,{__scopeCheckbox:n})]})})});Vf.displayName=Nf;var Hf=`CheckboxIndicator`,Uf=v.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=Lf(Hf,n);return(0,K.jsx)(Ul,{present:r||qf(a.checked)||a.checked===!0,children:(0,K.jsx)(Ol.span,{"data-state":Jf(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});Uf.displayName=Hf;var Wf=`CheckboxBubbleInput`,Gf=v.forwardRef(({__scopeCheckbox:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:s,disabled:c,name:l,value:u,form:d,bubbleInput:f,setBubbleInput:p}=Lf(Wf,e),m=dl(n,p),h=jf(a),g=Mf(r);v.useEffect(()=>{let e=f;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(h!==a&&n){let t=new Event(`click`,{bubbles:r});e.indeterminate=qf(a),n.call(e,qf(a)?!1:a),e.dispatchEvent(t)}},[f,h,a,i]);let _=v.useRef(qf(a)?!1:a);return(0,K.jsx)(Ol.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:o??_.current,required:s,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});Gf.displayName=Wf;function Kf(e){return typeof e==`function`}function qf(e){return e===`indeterminate`}function Jf(e){return qf(e)?`indeterminate`:e?`checked`:`unchecked`}var Yf=[`top`,`right`,`bottom`,`left`],Xf=Math.min,Zf=Math.max,Qf=Math.round,$f=Math.floor,ep=e=>({x:e,y:e}),tp={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function np(e,t,n){return Zf(e,Xf(t,n))}function rp(e,t){return typeof e==`function`?e(t):e}function ip(e){return e.split(`-`)[0]}function ap(e){return e.split(`-`)[1]}function op(e){return e===`x`?`y`:`x`}function sp(e){return e===`y`?`height`:`width`}function cp(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function lp(e){return op(cp(e))}function up(e,t,n){n===void 0&&(n=!1);let r=ap(e),i=lp(e),a=sp(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=yp(o)),[o,yp(o)]}function dp(e){let t=yp(e);return[fp(e),t,fp(t)]}function fp(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var pp=[`left`,`right`],mp=[`right`,`left`],hp=[`top`,`bottom`],gp=[`bottom`,`top`];function _p(e,t,n){switch(e){case`top`:case`bottom`:return n?t?mp:pp:t?pp:mp;case`left`:case`right`:return t?hp:gp;default:return[]}}function vp(e,t,n,r){let i=ap(e),a=_p(ip(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(fp)))),a}function yp(e){let t=ip(e);return tp[t]+e.slice(t.length)}function bp(e){return{top:0,right:0,bottom:0,left:0,...e}}function xp(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:bp(e)}function Sp(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Cp(e,t,n){let{reference:r,floating:i}=e,a=cp(t),o=lp(t),s=sp(o),c=ip(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(ap(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function wp(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=rp(t,e),p=xp(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Sp(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Sp(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Tp=50,Ep=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:wp},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Cp(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Tp&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Cp(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Dp=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=rp(e,t)||{};if(l==null)return{};let d=xp(u),f={x:n,y:r},p=lp(i),m=sp(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Xf(d[_],T),D=Xf(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=np(O,A,k),M=!c.arrow&&ap(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),Op=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=rp(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=ip(r),_=cp(o),v=ip(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[yp(o)]:dp(o)),x=p!==`none`;!d&&x&&b.push(...vp(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=up(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==cp(t))||T.every(e=>cp(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=cp(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function kp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ap(e){return Yf.some(t=>e[t]>=0)}var jp=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=rp(e,t);switch(i){case`referenceHidden`:{let e=kp(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ap(e)}}}case`escaped`:{let e=kp(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ap(e)}}}default:return{}}}}},Mp=new Set([`left`,`top`]);async function Np(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=ip(n),s=ap(n),c=cp(n)===`y`,l=Mp.has(o)?-1:1,u=a&&c?-1:1,d=rp(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Pp=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Np(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Fp=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=rp(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=cp(ip(i)),p=op(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=np(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=np(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Ip=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=rp(e,t),u={x:n,y:r},d=cp(i),f=op(d),p=u[f],m=u[d],h=rp(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Mp.has(ip(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Lp=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=rp(e,t),u=await o.detectOverflow(t,l),d=ip(i),f=ap(i),p=cp(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Xf(h-u[g],v),x=Xf(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Zf(u.left,0),t=Zf(u.right,0),n=Zf(u.top,0),r=Zf(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Zf(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Zf(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Rp(){return typeof window<`u`}function zp(e){return Hp(e)?(e.nodeName||``).toLowerCase():`#document`}function Bp(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Vp(e){return((Hp(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Hp(e){return Rp()?e instanceof Node||e instanceof Bp(e).Node:!1}function Up(e){return Rp()?e instanceof Element||e instanceof Bp(e).Element:!1}function Wp(e){return Rp()?e instanceof HTMLElement||e instanceof Bp(e).HTMLElement:!1}function Gp(e){return!Rp()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Bp(e).ShadowRoot}function Kp(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=rm(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function qp(e){return/^(table|td|th)$/.test(zp(e))}function Jp(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Yp=/transform|translate|scale|rotate|perspective|filter/,Xp=/paint|layout|strict|content/,Zp=e=>!!e&&e!==`none`,Qp;function $p(e){let t=Up(e)?rm(e):e;return Zp(t.transform)||Zp(t.translate)||Zp(t.scale)||Zp(t.rotate)||Zp(t.perspective)||!tm()&&(Zp(t.backdropFilter)||Zp(t.filter))||Yp.test(t.willChange||``)||Xp.test(t.contain||``)}function em(e){let t=am(e);for(;Wp(t)&&!nm(t);){if($p(t))return t;if(Jp(t))return null;t=am(t)}return null}function tm(){return Qp??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Qp}function nm(e){return/^(html|body|#document)$/.test(zp(e))}function rm(e){return Bp(e).getComputedStyle(e)}function im(e){return Up(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function am(e){if(zp(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Gp(e)&&e.host||Vp(e);return Gp(t)?t.host:t}function om(e){let t=am(e);return nm(t)?e.ownerDocument?e.ownerDocument.body:e.body:Wp(t)&&Kp(t)?t:om(t)}function sm(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=om(e),i=r===e.ownerDocument?.body,a=Bp(r);if(i){let e=cm(a);return t.concat(a,a.visualViewport||[],Kp(r)?r:[],e&&n?sm(e):[])}else return t.concat(r,sm(r,[],n))}function cm(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function lm(e){let t=rm(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Wp(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Qf(n)!==a||Qf(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function um(e){return Up(e)?e:e.contextElement}function dm(e){let t=um(e);if(!Wp(t))return ep(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=lm(t),o=(a?Qf(n.width):n.width)/r,s=(a?Qf(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var fm=ep(0);function pm(e){let t=Bp(e);return!tm()||!t.visualViewport?fm:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function mm(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Bp(e)?!1:t}function hm(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=um(e),o=ep(1);t&&(r?Up(r)&&(o=dm(r)):o=dm(e));let s=mm(a,n,r)?pm(a):ep(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Bp(a),t=r&&Up(r)?Bp(r):r,n=e,i=cm(n);for(;i&&r&&t!==n;){let e=dm(i),t=i.getBoundingClientRect(),r=rm(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Bp(i),i=cm(n)}}return Sp({width:u,height:d,x:c,y:l})}function gm(e,t){let n=im(e).scrollLeft;return t?t.left+n:hm(Vp(e)).left+n}function _m(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-gm(e,n),y:n.top+t.scrollTop}}function vm(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Vp(r),s=t?Jp(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=ep(1),u=ep(0),d=Wp(r);if((d||!d&&!a)&&((zp(r)!==`body`||Kp(o))&&(c=im(r)),d)){let e=hm(r);l=dm(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?_m(o,c):ep(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ym(e){return Array.from(e.getClientRects())}function bm(e){let t=Vp(e),n=im(e),r=e.ownerDocument.body,i=Zf(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Zf(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+gm(e),s=-n.scrollTop;return rm(r).direction===`rtl`&&(o+=Zf(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var xm=25;function Sm(e,t){let n=Bp(e),r=Vp(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=tm();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=gm(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=xm&&(a-=o)}else l<=xm&&(a+=l);return{width:a,height:o,x:s,y:c}}function Cm(e,t){let n=hm(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Wp(e)?dm(e):ep(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function wm(e,t,n){let r;if(t===`viewport`)r=Sm(e,n);else if(t===`document`)r=bm(Vp(e));else if(Up(t))r=Cm(t,n);else{let n=pm(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Sp(r)}function Tm(e,t){let n=am(e);return n===t||!Up(n)||nm(n)?!1:rm(n).position===`fixed`||Tm(n,t)}function Em(e,t){let n=t.get(e);if(n)return n;let r=sm(e,[],!1).filter(e=>Up(e)&&zp(e)!==`body`),i=null,a=rm(e).position===`fixed`,o=a?am(e):e;for(;Up(o)&&!nm(o);){let t=rm(o),n=$p(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Kp(o)&&!n&&Tm(e,o))?r=r.filter(e=>e!==o):i=t,o=am(o)}return t.set(e,r),r}function Dm(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Jp(t)?[]:Em(t,this._c):[].concat(n),r],o=wm(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=wm(t,a[e],i);s=Zf(n.top,s),c=Xf(n.right,c),l=Xf(n.bottom,l),u=Zf(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Om(e){let{width:t,height:n}=lm(e);return{width:t,height:n}}function km(e,t,n){let r=Wp(t),i=Vp(t),a=n===`fixed`,o=hm(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=ep(0);function l(){c.x=gm(i)}if(r||!r&&!a)if((zp(t)!==`body`||Kp(i))&&(s=im(t)),r){let e=hm(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?_m(i,s):ep(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Am(e){return rm(e).position===`static`}function jm(e,t){if(!Wp(e)||rm(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Vp(e)===n&&(n=n.ownerDocument.body),n}function Mm(e,t){let n=Bp(e);if(Jp(e))return n;if(!Wp(e)){let t=am(e);for(;t&&!nm(t);){if(Up(t)&&!Am(t))return t;t=am(t)}return n}let r=jm(e,t);for(;r&&qp(r)&&Am(r);)r=jm(r,t);return r&&nm(r)&&Am(r)&&!$p(r)?n:r||em(e)||n}var Nm=async function(e){let t=this.getOffsetParent||Mm,n=this.getDimensions,r=await n(e.floating);return{reference:km(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Pm(e){return rm(e).direction===`rtl`}var Fm={convertOffsetParentRelativeRectToViewportRelativeRect:vm,getDocumentElement:Vp,getClippingRect:Dm,getOffsetParent:Mm,getElementRects:Nm,getClientRects:ym,getDimensions:Om,getScale:dm,isElement:Up,isRTL:Pm};function Im(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Lm(e,t){let n=null,r,i=Vp(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=$f(d),h=$f(i.clientWidth-(u+f)),g=$f(i.clientHeight-(d+p)),_=$f(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Zf(0,Xf(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Im(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Rm(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=um(e),u=i||a?[...l?sm(l):[],...t?sm(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Lm(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?hm(e):null;c&&g();function g(){let t=hm(e);h&&!Im(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var zm=Pp,Bm=Fp,Vm=Op,Hm=Lp,Um=jp,Wm=Dp,Gm=Ip,Km=(e,t,n)=>{let r=new Map,i={platform:Fm,...n},a={...i.platform,_c:r};return Ep(e,t,{...i,platform:a})},qm=typeof document<`u`?v.useLayoutEffect:function(){};function Jm(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Jm(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Jm(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Ym(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Xm(e,t){let n=Ym(e);return Math.round(t*n)/n}function Zm(e){let t=v.useRef(e);return qm(()=>{t.current=e}),t}function Qm(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=v.useState(r);Jm(f,r)||p(r);let[m,h]=v.useState(null),[g,_]=v.useState(null),y=v.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),b=v.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=a||m,S=o||g,C=v.useRef(null),w=v.useRef(null),T=v.useRef(u),E=c!=null,D=Zm(c),O=Zm(i),k=Zm(l),A=v.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Km(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!Jm(T.current,t)&&(T.current=t,Dl.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);qm(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=v.useRef(!1);qm(()=>(j.current=!0,()=>{j.current=!1}),[]),qm(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=v.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=v.useMemo(()=>({reference:x,floating:S}),[x,S]),P=v.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=Xm(N.floating,u.x),r=Xm(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Ym(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return v.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var $m=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Wm({element:r.current,padding:i}).fn(n):r?Wm({element:r,padding:i}).fn(n):{}}}},eh=(e,t)=>{let n=zm(e);return{name:n.name,fn:n.fn,options:[e,t]}},th=(e,t)=>{let n=Bm(e);return{name:n.name,fn:n.fn,options:[e,t]}},nh=(e,t)=>({fn:Gm(e).fn,options:[e,t]}),rh=(e,t)=>{let n=Vm(e);return{name:n.name,fn:n.fn,options:[e,t]}},ih=(e,t)=>{let n=Hm(e);return{name:n.name,fn:n.fn,options:[e,t]}},ah=(e,t)=>{let n=Um(e);return{name:n.name,fn:n.fn,options:[e,t]}},oh=(e,t)=>{let n=$m(e);return{name:n.name,fn:n.fn,options:[e,t]}},sh=`Arrow`,ch=v.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,K.jsx)(Ol.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,K.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});ch.displayName=sh;var lh=ch,uh=`Popper`,[dh,fh]=Nl(uh),[ph,mh]=dh(uh),hh=e=>{let{__scopePopper:t,children:n}=e,[r,i]=v.useState(null),[a,o]=v.useState(void 0);return(0,K.jsx)(ph,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})};hh.displayName=uh;var gh=`PopperAnchor`,_h=v.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=mh(gh,n),o=v.useRef(null),s=a.onAnchorChange,c=dl(t,v.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=v.useRef(null);v.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&Dh(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,K.jsx)(Ol.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})});_h.displayName=gh;var vh=`PopperContent`,[yh,bh]=dh(vh),xh=v.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=mh(vh,n),[_,y]=v.useState(null),b=dl(t,y),[x,S]=v.useState(null),C=Mf(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],k=O.length>0,A={padding:D,boundary:O.filter(Th),altBoundary:k},{refs:j,floatingStyles:M,placement:N,isPositioned:P,middlewareData:F}=Qm({strategy:`fixed`,placement:E,whileElementsMounted:(...e)=>Rm(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[eh({mainAxis:i+T,alignmentAxis:o}),c&&th({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?nh():void 0,...A}),c&&rh({...A}),ih({...A,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),x&&oh({element:x,padding:s}),Eh({arrowWidth:w,arrowHeight:T}),f&&ah({strategy:`referenceHidden`,...A,boundary:k?A.boundary:void 0})]}),I=g.setPlacementState;Ll(()=>(I(N),()=>{I(void 0)}),[N,I]);let[L,R]=Dh(N),ee=eu(m);Ll(()=>{P&&ee?.()},[P,ee]);let te=F.arrow?.x,z=F.arrow?.y,B=F.arrow?.centerOffset!==0,[V,ne]=v.useState();return Ll(()=>{_&&ne(window.getComputedStyle(_).zIndex)},[_]),(0,K.jsx)(`div`,{ref:j.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:P?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:V,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(` `),...F.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,K.jsx)(yh,{scope:n,placedSide:L,placedAlign:R,onArrowChange:S,arrowX:te,arrowY:z,shouldHideArrow:B,children:(0,K.jsx)(Ol.div,{"data-side":L,"data-align":R,...h,ref:b,style:{...h.style,animation:P?void 0:`none`}})})})});xh.displayName=vh;var Sh=`PopperArrow`,Ch={top:`bottom`,right:`left`,bottom:`top`,left:`right`},wh=v.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=bh(Sh,n),a=Ch[i.placedSide];return(0,K.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,K.jsx)(lh,{...r,ref:t,style:{...r.style,display:`block`}})})});wh.displayName=Sh;function Th(e){return e!==null}var Eh=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Dh(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function Dh(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var Oh=hh,kh=_h,Ah=xh,jh=wh,Mh=!1;function Nh(){let[e,t]=v.useState(Mh);return v.useEffect(()=>{Mh||(Mh=!0,t(!0))},[]),e}var Ph=v.useSyncExternalStore;function Fh(){return()=>{}}function Ih(){return Ph(Fh,()=>!0,()=>!1)}var Lh=typeof Ph==`function`?Ih:Nh,Rh=`rovingFocusGroup.onEntryFocus`,zh={bubbles:!1,cancelable:!0},Bh=`RovingFocusGroup`,[Vh,Hh,Uh]=Fl(Bh),[Wh,Gh]=Nl(Bh,[Uh]),[Kh,qh]=Wh(Bh),Jh=v.forwardRef((e,t)=>(0,K.jsx)(Vh.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,K.jsx)(Vh.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,K.jsx)(Yh,{...e,ref:t})})}));Jh.displayName=Bh;var Yh=v.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=v.useRef(null),p=dl(t,f),m=$l(a),[h,g]=zl({prop:o,defaultProp:s??null,onChange:c,caller:Bh}),[_,y]=v.useState(!1),b=eu(l),x=Hh(n),S=v.useRef(!1),[C,w]=v.useState(0);return v.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(Rh,b),()=>e.removeEventListener(Rh,b)},[b]),(0,K.jsx)(Kh,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:v.useCallback(e=>g(e),[g]),onItemShiftTab:v.useCallback(()=>y(!0),[]),onFocusableItemAdd:v.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:v.useCallback(()=>w(e=>e-1),[]),children:(0,K.jsx)(Ol.div,{tabIndex:_||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:Il(e.onMouseDown,()=>{S.current=!0}),onFocus:Il(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(Rh,zh);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);tg([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:Il(e.onBlur,()=>y(!1))})})}),Xh=`RovingFocusGroupItem`,Zh=v.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Zl(),l=a||c,u=qh(Xh,n),d=u.currentTabStopId===l,f=Hh(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u,g=Lh();return Ll(()=>{if(!(!g||!r))return p(),()=>m()},[g,r,p,m]),v.useEffect(()=>{if(!(g||!r))return p(),()=>m()},[g,r,p,m]),(0,K.jsx)(Vh.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,K.jsx)(Ol.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:Il(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:Il(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:Il(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=eg(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?ng(n,r+1):n.slice(r+1)}setTimeout(()=>tg(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});Zh.displayName=Xh;var Qh={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function $h(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function eg(e,t,n){let r=$h(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Qh[r]}function tg(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function ng(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var rg=Jh,ig=Zh,ag=`Label`,og=v.forwardRef((e,t)=>(0,K.jsx)(Ol.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));og.displayName=ag;var sg=og;function cg(e,[t,n]){return Math.min(n,Math.max(t,e))}var lg=[` `,`Enter`,`ArrowUp`,`ArrowDown`],ug=[` `,`Enter`],dg=`Select`,[fg,pg,mg]=Fl(dg),[hg,eee]=Nl(dg,[mg,fh]),gg=fh(),[tee,_g]=hg(dg),[vg,yg]=hg(dg),bg=`SelectProvider`;function xg(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m,internal_do_not_use_render:h}=e,g=gg(t),[_,y]=v.useState(null),[b,x]=v.useState(null),[S,C]=v.useState(!1),w=$l(l),[T,E]=zl({prop:r,defaultProp:i??!1,onChange:a,caller:dg}),[D,O]=zl({prop:o,defaultProp:s,onChange:c,caller:dg}),k=v.useRef(null),A=v.useRef(D);v.useEffect(()=>{let e=m?_?.ownerDocument.getElementById(m):_?.form;if(e instanceof HTMLFormElement){let t=()=>O(A.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[m,_,O]);let j=_?!!m||!!_.closest(`form`):!0,[M,N]=v.useState(new Set),P=Zl(),F=Array.from(M).map(e=>e.props.value).join(`;`),I=v.useCallback(e=>{N(t=>new Set(t).add(e))},[]),L=v.useCallback(e=>{N(t=>{let n=new Set(t);return n.delete(e),n})},[]),R={required:p,trigger:_,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:P,value:D,onValueChange:O,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:k,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:M,nativeSelectKey:F,isFormControl:j};return(0,K.jsx)(Oh,{...g,children:(0,K.jsx)(tee,{scope:t,...R,children:(0,K.jsx)(fg.Provider,{scope:t,children:(0,K.jsx)(vg,{scope:t,onNativeOptionAdd:I,onNativeOptionRemove:L,children:x_(h)?h(R):n})})})})}xg.displayName=bg;var Sg=e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,K.jsx)(xg,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,K.jsxs)(K.Fragment,{children:[n,e?(0,K.jsx)(b_,{__scopeSelect:t}):null]})})};Sg.displayName=dg;var Cg=`SelectTrigger`,wg=v.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=gg(n),o=_g(Cg,n),s=o.disabled||r,c=dl(t,o.onTriggerChange),l=pg(n),u=v.useRef(`touch`),[d,f,p]=C_(e=>{let t=l().filter(e=>!e.disabled),n=w_(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,K.jsx)(kh,{asChild:!0,...a,children:(0,K.jsx)(Ol.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":S_(o.value)?``:void 0,...i,ref:c,onClick:Il(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:Il(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:Il(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&lg.includes(e.key)&&(m(),e.preventDefault())})})})});wg.displayName=Cg;var Tg=`SelectValue`,Eg=v.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=_g(Tg,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=dl(t,c.onValueNodeChange);Ll(()=>{l(u)},[l,u]);let f=S_(c.value);return(0,K.jsx)(Ol.span,{...s,asChild:f?!1:s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,K.jsx)(v.Fragment,{children:f?o:a},f?`placeholder`:`value`)})});Eg.displayName=Tg;var Dg=`SelectIcon`,Og=v.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,K.jsx)(Ol.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});Og.displayName=Dg;var kg=`SelectPortal`,[Ag,jg]=hg(kg,{forceMount:void 0}),Mg=e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,K.jsx)(Ag,{scope:e.__scopeSelect,forceMount:n,children:(0,K.jsx)(Nu,{asChild:!0,...r})})};Mg.displayName=kg;var Ng=`SelectContent`,Pg=v.forwardRef((e,t)=>{let n=jg(Ng,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=_g(Ng,e.__scopeSelect),[o,s]=v.useState();return Ll(()=>{s(new DocumentFragment)},[]),(0,K.jsx)(Ul,{present:r||a.open,children:({present:e})=>e?(0,K.jsx)(Vg,{...i,ref:t}):(0,K.jsx)(Fg,{...i,fragment:o})})});Pg.displayName=Ng;var Fg=v.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,fragment:i}=e;return i?Dl.createPortal((0,K.jsx)(Lg,{scope:n,children:(0,K.jsx)(fg.Slot,{scope:n,children:(0,K.jsx)(`div`,{ref:t,children:r})})}),i):null});Fg.displayName=`SelectContentFragment`;var Ig=10,[Lg,Rg]=hg(Ng),zg=`SelectContentImpl`,Bg=fl(`SelectContent.RemoveScroll`),Vg=v.forwardRef((e,t)=>{let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,y=_g(Ng,n),[b,x]=v.useState(null),[S,C]=v.useState(null),w=dl(t,x),[T,E]=v.useState(null),[D,O]=v.useState(null),k=pg(n),[A,j]=v.useState(!1),M=v.useRef(!1);v.useEffect(()=>{if(b)return tf(b)},[b]),Iu();let N=v.useCallback(e=>{let[t,...n]=k().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==i))return},[k,S]),P=v.useCallback(()=>N([T,b]),[N,T,b]);v.useEffect(()=>{A&&P()},[A,P]);let{onOpenChange:F,triggerPointerDownPosRef:I}=y;v.useEffect(()=>{if(b){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(I.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(I.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(b)||F(!1),document.removeEventListener(`pointermove`,t),I.current=null};return I.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[b,F,I]),v.useEffect(()=>{let e=()=>F(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[F]);let[L,R]=C_(e=>{let t=k().filter(e=>!e.disabled),n=w_(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),ee=v.useCallback((e,t,n)=>{let r=!M.current&&!n;(y.value!==void 0&&y.value===t||r)&&(E(e),r&&(M.current=!0))},[y.value]),te=v.useCallback(()=>b?.focus(),[b]),z=v.useCallback((e,t,n)=>{let r=!M.current&&!n;(y.value!==void 0&&y.value===t||r)&&O(e)},[y.value]),B=r===`popper`?Gg:Ug,V=B===Gg?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,K.jsx)(Lg,{scope:n,content:b,viewport:S,onViewportChange:C,itemRefCallback:ee,selectedItem:T,onItemLeave:te,itemTextRefCallback:z,focusSelectedItem:P,selectedItemText:D,position:r,isPositioned:A,searchRef:L,children:(0,K.jsx)(Kd,{as:Bg,allowPinchZoom:!0,children:(0,K.jsx)(bu,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Il(i,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,K.jsx)(su,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,K.jsx)(B,{role:`listbox`,id:y.contentId,"data-state":y.open?`open`:`closed`,dir:y.dir,onContextMenu:e=>e.preventDefault(),..._,...V,onPlaced:()=>j(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:Il(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&R(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=k().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>N(t)),e.preventDefault()}})})})})})})});Vg.displayName=zg;var Hg=`SelectItemAlignedPosition`,Ug=v.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=_g(Ng,n),o=Rg(Ng,n),[s,c]=v.useState(null),[l,u]=v.useState(null),d=dl(t,u),f=pg(n),p=v.useRef(!1),m=v.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:y}=o,b=v.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Ig,d=cg(a,[Ig,Math.max(Ig,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-Ig,d=cg(a,[Ig,Math.max(Ig,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-Ig*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-Ig,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${Ig}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);Ll(()=>b(),[b]);let[x,S]=v.useState();return Ll(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]),(0,K.jsx)(Kg,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:v.useCallback(e=>{e&&m.current===!0&&(b(),y?.(),m.current=!1)},[b,y]),children:(0,K.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,K.jsx)(Ol.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});Ug.displayName=Hg;var Wg=`SelectPopperPosition`,Gg=v.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=Ig,...a}=e,o=gg(n);return(0,K.jsx)(Ah,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});Gg.displayName=Wg;var[Kg,qg]=hg(Ng,{}),Jg=`SelectViewport`,Yg=v.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=Rg(Jg,n),o=qg(Jg,n),s=dl(t,a.onViewportChange),c=v.useRef(0);return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,K.jsx)(fg.Slot,{scope:n,children:(0,K.jsx)(Ol.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:Il(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-Ig*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})});Yg.displayName=Jg;var Xg=`SelectGroup`,[Zg,Qg]=hg(Xg),$g=v.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Zl();return(0,K.jsx)(Zg,{scope:n,id:i,children:(0,K.jsx)(Ol.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});$g.displayName=Xg;var e_=`SelectLabel`,t_=v.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=Qg(e_,n);return(0,K.jsx)(Ol.div,{id:i.id,...r,ref:t})});t_.displayName=e_;var n_=`SelectItem`,[r_,i_]=hg(n_),a_=v.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=_g(n_,n),c=Rg(n_,n),l=s.value===r,[u,d]=v.useState(a??``),[f,p]=v.useState(!1),m=dl(t,eu(e=>c.itemRefCallback?.(e,r,i))),h=Zl(),g=v.useRef(`touch`),_=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};return(0,K.jsx)(r_,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:v.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,K.jsx)(fg.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,K.jsx)(Ol.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:Il(o.onFocus,()=>p(!0)),onBlur:Il(o.onBlur,()=>p(!1)),onClick:Il(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:Il(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:Il(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:Il(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Il(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Il(o.onKeyDown,e=>{i||e.target!==e.currentTarget||c.searchRef?.current!==``&&e.key===` `||(ug.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});a_.displayName=n_;var o_=`SelectItemText`,s_=v.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=_g(o_,n),s=Rg(o_,n),c=i_(o_,n),l=yg(o_,n),[u,d]=v.useState(null),f=eu(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=dl(t,d,c.onItemTextChange,f),m=u?.textContent,h=v.useMemo(()=>(0,K.jsx)(`option`,{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return Ll(()=>(g(h),()=>_(h)),[g,_,h]),(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Ol.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!S_(o.value)?Dl.createPortal(a.children,o.valueNode):null]})});s_.displayName=o_;var c_=`SelectItemIndicator`,l_=v.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return i_(c_,n).isSelected?(0,K.jsx)(Ol.span,{"aria-hidden":!0,...r,ref:t}):null});l_.displayName=c_;var u_=`SelectScrollUpButton`,d_=v.forwardRef((e,t)=>{let n=Rg(u_,e.__scopeSelect),r=qg(u_,e.__scopeSelect),[i,a]=v.useState(!1),o=dl(t,r.onScrollButtonChange);return Ll(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,K.jsx)(m_,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});d_.displayName=u_;var f_=`SelectScrollDownButton`,p_=v.forwardRef((e,t)=>{let n=Rg(f_,e.__scopeSelect),r=qg(f_,e.__scopeSelect),[i,a]=v.useState(!1),o=dl(t,r.onScrollButtonChange);return Ll(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,K.jsx)(m_,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});p_.displayName=f_;var m_=v.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=Rg(`SelectScrollButton`,n),o=v.useRef(null),s=pg(n),c=v.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return v.useEffect(()=>()=>c(),[c]),Ll(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,K.jsx)(Ol.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Il(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:Il(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:Il(i.onPointerLeave,()=>{c()})})}),h_=`SelectSeparator`,g_=v.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,K.jsx)(Ol.div,{"aria-hidden":!0,...r,ref:t})});g_.displayName=h_;var __=`SelectArrow`,v_=v.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=gg(n);return Rg(__,n).position===`popper`?(0,K.jsx)(jh,{...i,...r,ref:t}):null});v_.displayName=__;var y_=`SelectBubbleInput`,b_=v.forwardRef(({__scopeSelect:e,...t},n)=>{let r=_g(y_,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,p=v.useRef(null),m=dl(n,p),h=i??``,g=jf(h),_=Array.from(d).some(e=>(e.props.value??``)===``);return v.useEffect(()=>{let e=p.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(g!==h&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,h),e.dispatchEvent(t)}},[g,h]),(0,K.jsxs)(Ol.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...Al,...t.style},ref:m,defaultValue:h,children:[S_(i)&&!_?(0,K.jsx)(`option`,{value:``}):null,Array.from(d)]},f)});b_.displayName=y_;function x_(e){return typeof e==`function`}function S_(e){return e===``||e===void 0}function C_(e){let t=eu(e),n=v.useRef(``),r=v.useRef(0),i=v.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=v.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function w_(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=T_(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function T_(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var E_=`Separator`,D_=`horizontal`,O_=[`horizontal`,`vertical`],k_=v.forwardRef((e,t)=>{let{decorative:n,orientation:r=D_,...i}=e,a=A_(r)?r:D_,o=n?{role:`none`}:{"aria-orientation":a===`vertical`?a:void 0,role:`separator`};return(0,K.jsx)(Ol.div,{"data-orientation":a,...o,...i,ref:t})});k_.displayName=E_;function A_(e){return O_.includes(e)}var j_=k_,M_=`Switch`,[N_,nee]=Nl(M_),[P_,F_]=N_(M_);function I_(e){let{__scopeSwitch:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=zl({prop:n,defaultProp:i??!1,onChange:c,caller:M_}),[m,h]=v.useState(null),[g,_]=v.useState(null),y={checked:f,setChecked:p,disabled:a,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v.useRef(!1),required:l,defaultChecked:i,isFormControl:m?!!o||!!m.closest(`form`):!0,bubbleInput:g,setBubbleInput:_};return(0,K.jsx)(P_,{scope:t,...y,children:W_(d)?d(y):r})}var L_=`SwitchTrigger`,R_=v.forwardRef(({__scopeSwitch:e,onClick:t,...n},r)=>{let{control:i,form:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=F_(L_,e),h=dl(r,u),g=v.useRef(c);return v.useEffect(()=>{let e=a?i?.ownerDocument.getElementById(a):i?.form;if(e instanceof HTMLFormElement){let t=()=>d(g.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[i,a,d]),(0,K.jsx)(Ol.button,{type:`button`,role:`switch`,"aria-checked":c,"aria-required":l,"data-state":G_(c),"data-disabled":s?``:void 0,disabled:s,value:o,...n,ref:h,onClick:Il(t,e=>{d(e=>!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});R_.displayName=L_;var z_=v.forwardRef((e,t)=>{let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,K.jsx)(I_,{__scopeSwitch:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(R_,{...d,ref:t,__scopeSwitch:n}),e&&(0,K.jsx)(U_,{__scopeSwitch:n})]})})});z_.displayName=M_;var B_=`SwitchThumb`,V_=v.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,i=F_(B_,n);return(0,K.jsx)(Ol.span,{"data-state":G_(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})});V_.displayName=B_;var H_=`SwitchBubbleInput`,U_=v.forwardRef(({__scopeSwitch:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:s,disabled:c,name:l,value:u,form:d,bubbleInput:f,setBubbleInput:p}=F_(H_,e),m=dl(n,p),h=jf(a),g=Mf(r);v.useEffect(()=>{let e=f;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(h!==a&&n){let t=new Event(`click`,{bubbles:r});n.call(e,a),e.dispatchEvent(t)}},[f,h,a,i]);let _=v.useRef(a);return(0,K.jsx)(Ol.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:o??_.current,required:s,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});U_.displayName=H_;function W_(e){return typeof e==`function`}function G_(e){return e?`checked`:`unchecked`}var K_=`Tabs`,[q_,ree]=Nl(K_,[Gh]),J_=Gh(),[Y_,X_]=q_(K_),Z_=v.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=$l(s),[d,f]=zl({prop:r,onChange:i,defaultProp:a??``,caller:K_});return(0,K.jsx)(Y_,{scope:n,baseId:Zl(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,K.jsx)(Ol.div,{dir:u,"data-orientation":o,...l,ref:t})})});Z_.displayName=K_;var Q_=`TabsList`,$_=v.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=X_(Q_,n),o=J_(n);return(0,K.jsx)(rg,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,K.jsx)(Ol.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});$_.displayName=Q_;var ev=`TabsTrigger`,tv=v.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=X_(ev,n),s=J_(n),c=iv(o.baseId,r),l=av(o.baseId,r),u=r===o.value;return(0,K.jsx)(ig,{asChild:!0,...s,focusable:!i,active:u,children:(0,K.jsx)(Ol.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:Il(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:Il(e.onKeyDown,e=>{i||e.target!==e.currentTarget||[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:Il(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});tv.displayName=ev;var nv=`TabsContent`,rv=v.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=X_(nv,n),c=iv(s.baseId,r),l=av(s.baseId,r),u=r===s.value,d=v.useRef(u);return v.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,K.jsx)(Ul,{present:i||u,children:({present:n})=>(0,K.jsx)(Ol.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})});rv.displayName=nv;function iv(e,t){return`${e}-trigger-${t}`}function av(e,t){return`${e}-content-${t}`}var ov=Z_,sv=$_,cv=tv,lv=rv;function uv(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=uv(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function dv(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=uv(e))&&(r&&(r+=` `),r+=t);return r}var fv=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},pv=(e,t)=>({classGroupId:e,validator:t}),mv=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),hv=`-`,gv=[],_v=`arbitrary..`,vv=e=>{let t=xv(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return bv(e);let n=e.split(hv);return yv(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?fv(i,t):t:i||gv}return n[e]||gv}}},yv=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=yv(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(hv):e.slice(t).join(hv),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},bv=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?_v+r:void 0})(),xv=e=>{let{theme:t,classGroups:n}=e;return Sv(n,t)},Sv=(e,t)=>{let n=mv();for(let r in e){let i=e[r];Cv(i,n,r,t)}return n},Cv=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];wv(i,t,n,r)}},wv=(e,t,n,r)=>{if(typeof e==`string`){Tv(e,t,n);return}if(typeof e==`function`){Ev(e,t,n,r);return}Dv(e,t,n,r)},Tv=(e,t,n)=>{let r=e===``?t:Ov(t,e);r.classGroupId=n},Ev=(e,t,n,r)=>{if(kv(e)){Cv(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(pv(n,e))},Dv=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Cv(o,Ov(t,a),n,r)}},Ov=(e,t)=>{let n=e,r=t.split(hv),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=mv(),n.nextPart.set(t,i)),n=i}return n},kv=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Av=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},jv=`!`,Mv=`:`,Nv=[],Pv=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Fv=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Mv){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(jv)?(c=s.slice(0,-1),l=!0):s.startsWith(jv)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Pv(t,l,c,u)};if(t){let e=t+Mv,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Pv(Nv,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Iv=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Lv=e=>({cache:Av(e.cacheSize),parseClassName:Fv(e),sortModifiers:Iv(e),postfixLookupClassGroupIds:Rv(e),...vv(e)}),Rv=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},zv=/\s+/,Bv=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(zv),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+jv:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Vv=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Hv(n))&&(i&&(i+=` `),i+=r);return i},Hv=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Hv(e[r]))&&(n&&(n+=` `),n+=t);return n},Uv=(e,...t)=>{let n,r,i,a,o=o=>(n=Lv(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Bv(e,n);return i(e,a),a};return a=o,(...e)=>a(Vv(...e))},Wv=[],Gv=e=>{let t=t=>t[e]||Wv;return t.isThemeGetter=!0,t},Kv=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,qv=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Jv=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Yv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xv=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Zv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Qv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$v=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ey=e=>Jv.test(e),ty=e=>!!e&&!Number.isNaN(Number(e)),ny=e=>!!e&&Number.isInteger(Number(e)),ry=e=>e.endsWith(`%`)&&ty(e.slice(0,-1)),iy=e=>Yv.test(e),ay=()=>!0,oy=e=>Xv.test(e)&&!Zv.test(e),sy=()=>!1,cy=e=>Qv.test(e),ly=e=>$v.test(e),uy=e=>!q(e)&&!J(e),dy=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),fy=e=>Dy(e,jy,sy),q=e=>Kv.test(e),py=e=>Dy(e,My,oy),my=e=>Dy(e,Ny,ty),hy=e=>Dy(e,Fy,ay),gy=e=>Dy(e,Py,sy),_y=e=>Dy(e,ky,sy),vy=e=>Dy(e,Ay,ly),yy=e=>Dy(e,Iy,cy),J=e=>qv.test(e),by=e=>Oy(e,My),xy=e=>Oy(e,Py),Sy=e=>Oy(e,ky),Cy=e=>Oy(e,jy),wy=e=>Oy(e,Ay),Ty=e=>Oy(e,Iy,!0),Ey=e=>Oy(e,Fy,!0),Dy=(e,t,n)=>{let r=Kv.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Oy=(e,t,n=!1)=>{let r=qv.exec(e);return r?r[1]?t(r[1]):n:!1},ky=e=>e===`position`||e===`percentage`,Ay=e=>e===`image`||e===`url`,jy=e=>e===`length`||e===`size`||e===`bg-size`,My=e=>e===`length`,Ny=e=>e===`number`,Py=e=>e===`family-name`,Fy=e=>e===`number`||e===`weight`,Iy=e=>e===`shadow`,Ly=Uv(()=>{let e=Gv(`color`),t=Gv(`font`),n=Gv(`text`),r=Gv(`font-weight`),i=Gv(`tracking`),a=Gv(`leading`),o=Gv(`breakpoint`),s=Gv(`container`),c=Gv(`spacing`),l=Gv(`radius`),u=Gv(`shadow`),d=Gv(`inset-shadow`),f=Gv(`text-shadow`),p=Gv(`drop-shadow`),m=Gv(`blur`),h=Gv(`perspective`),g=Gv(`aspect`),_=Gv(`ease`),v=Gv(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),J,q],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[J,q,c],T=()=>[ey,`full`,`auto`,...w()],E=()=>[ny,`none`,`subgrid`,J,q],D=()=>[`auto`,{span:[`full`,ny,J,q]},ny,J,q],O=()=>[ny,`auto`,J,q],k=()=>[`auto`,`min`,`max`,`fr`,J,q],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[ey,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[ey,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[ey,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,J,q],L=()=>[...b(),Sy,_y,{position:[J,q]}],R=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ee=()=>[`auto`,`cover`,`contain`,Cy,fy,{size:[J,q]}],te=()=>[ry,by,py],z=()=>[``,`none`,`full`,l,J,q],B=()=>[``,ty,by,py],V=()=>[`solid`,`dashed`,`dotted`,`double`],ne=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],re=()=>[ty,ry,Sy,_y],ie=()=>[``,`none`,m,J,q],ae=()=>[`none`,ty,J,q],oe=()=>[`none`,ty,J,q],se=()=>[ty,J,q],H=()=>[ey,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[iy],breakpoint:[iy],color:[ay],container:[iy],"drop-shadow":[iy],ease:[`in`,`out`,`in-out`],font:[uy],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[iy],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[iy],shadow:[iy],spacing:[`px`,ty],text:[iy],"text-shadow":[iy],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,ey,q,J,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,J,q]}],"container-named":[dy],columns:[{columns:[ty,q,J,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[ny,`auto`,J,q]}],basis:[{basis:[ey,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[ty,ey,`auto`,`initial`,`none`,q]}],grow:[{grow:[``,ty,J,q]}],shrink:[{shrink:[``,ty,J,q]}],order:[{order:[ny,`first`,`last`,`none`,J,q]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,by,py]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Ey,hy]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,ry,q]}],"font-family":[{font:[xy,gy,t]}],"font-features":[{"font-features":[q]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,J,q]}],"line-clamp":[{"line-clamp":[ty,`none`,J,my]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,J,q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,J,q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...V(),`wavy`]}],"text-decoration-thickness":[{decoration:[ty,`from-font`,`auto`,J,py]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[ty,`auto`,J,q]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[ny,J,q]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,J,q]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,J,q]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:ee()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},ny,J,q],radial:[``,J,q],conic:[ny,J,q]},wy,vy]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:te()}],"gradient-via-pos":[{via:te()}],"gradient-to-pos":[{to:te()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-bs":[{"border-bs":B()}],"border-w-be":[{"border-be":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":B()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...V(),`hidden`,`none`]}],"divide-style":[{divide:[...V(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...V(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[ty,J,q]}],"outline-w":[{outline:[``,ty,by,py]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`none`,u,Ty,yy]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,Ty,yy]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:B()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[ty,py]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,Ty,yy]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[ty,J,q]}],"mix-blend":[{"mix-blend":[...ne(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ne()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[ty]}],"mask-image-linear-from-pos":[{"mask-linear-from":re()}],"mask-image-linear-to-pos":[{"mask-linear-to":re()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":re()}],"mask-image-t-to-pos":[{"mask-t-to":re()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":re()}],"mask-image-r-to-pos":[{"mask-r-to":re()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":re()}],"mask-image-b-to-pos":[{"mask-b-to":re()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":re()}],"mask-image-l-to-pos":[{"mask-l-to":re()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":re()}],"mask-image-x-to-pos":[{"mask-x-to":re()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":re()}],"mask-image-y-to-pos":[{"mask-y-to":re()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[J,q]}],"mask-image-radial-from-pos":[{"mask-radial-from":re()}],"mask-image-radial-to-pos":[{"mask-radial-to":re()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[ty]}],"mask-image-conic-from-pos":[{"mask-conic-from":re()}],"mask-image-conic-to-pos":[{"mask-conic-to":re()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:ee()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,J,q]}],filter:[{filter:[``,`none`,J,q]}],blur:[{blur:ie()}],brightness:[{brightness:[ty,J,q]}],contrast:[{contrast:[ty,J,q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Ty,yy]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,ty,J,q]}],"hue-rotate":[{"hue-rotate":[ty,J,q]}],invert:[{invert:[``,ty,J,q]}],saturate:[{saturate:[ty,J,q]}],sepia:[{sepia:[``,ty,J,q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,J,q]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[ty,J,q]}],"backdrop-contrast":[{"backdrop-contrast":[ty,J,q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,ty,J,q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ty,J,q]}],"backdrop-invert":[{"backdrop-invert":[``,ty,J,q]}],"backdrop-opacity":[{"backdrop-opacity":[ty,J,q]}],"backdrop-saturate":[{"backdrop-saturate":[ty,J,q]}],"backdrop-sepia":[{"backdrop-sepia":[``,ty,J,q]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,J,q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[ty,`initial`,J,q]}],ease:[{ease:[`linear`,`initial`,_,J,q]}],delay:[{delay:[ty,J,q]}],animate:[{animate:[`none`,v,J,q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,J,q]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":[`scale-3d`],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[J,q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:H()}],"translate-x":[{"translate-x":H()}],"translate-y":[{"translate-y":H()}],"translate-z":[{"translate-z":H()}],"translate-none":[`translate-none`],zoom:[{zoom:[ny,J,q]}],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,J,q]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,J,q]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[ty,by,py,my]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function Y(...e){return Ly(dv(e))}function Ry({className:e,...t}){return(0,K.jsx)(Vf,{"data-slot":`checkbox`,className:Y(`peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary`,e),...t,children:(0,K.jsx)(Uf,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none`,children:(0,K.jsx)(kc,{className:`size-3.5`})})})}function zy({className:e,...t}){return(0,K.jsx)(sg,{"data-slot":`label`,className:Y(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}function By({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`table-container`,className:`relative w-full overflow-x-auto`,children:(0,K.jsx)(`table`,{"data-slot":`table`,className:Y(`w-full caption-bottom text-sm`,e),...t})})}function Vy({className:e,...t}){return(0,K.jsx)(`thead`,{"data-slot":`table-header`,className:Y(`[&_tr]:border-b`,e),...t})}function Hy({className:e,...t}){return(0,K.jsx)(`tbody`,{"data-slot":`table-body`,className:Y(`[&_tr:last-child]:border-0`,e),...t})}function Uy({className:e,...t}){return(0,K.jsx)(`tr`,{"data-slot":`table-row`,className:Y(`border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted`,e),...t})}function Wy({className:e,...t}){return(0,K.jsx)(`th`,{"data-slot":`table-head`,className:Y(`h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...t})}function Gy({className:e,...t}){return(0,K.jsx)(`td`,{"data-slot":`table-cell`,className:Y(`p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...t})}var Ky=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,qy=dv,Jy=(e,t)=>n=>{if(t?.variants==null)return qy(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Ky(t)||Ky(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return qy(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Yy=Jy(`inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,destructive:`bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40`,outline:`border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,xs:`h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`,"icon-xs":`size-6 rounded-md [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}});function Xy({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){return(0,K.jsx)(r?pl:`button`,{"data-slot":`button`,"data-variant":t,"data-size":n,className:Y(Yy({variant:t,size:n,className:e})),...i})}function Zy({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`card`,className:Y(`flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm`,e),...t})}function Qy({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`card-header`,className:Y(`@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6`,e),...t})}function $y({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`card-title`,className:Y(`leading-none font-semibold`,e),...t})}function eb({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`card-content`,className:Y(`px-6`,e),...t})}function tb({title:e,extra:t,children:n,className:r}){return(0,K.jsxs)(Zy,{className:Y(`gap-0 py-5`,r),children:[e!=null&&(0,K.jsxs)(Qy,{className:`flex flex-row items-center gap-3 px-5 pb-3`,children:[(0,K.jsx)($y,{className:`text-base font-semibold`,children:e}),t!=null&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{className:`flex-1`}),t]})]}),(0,K.jsx)(eb,{className:`px-5`,children:n})]})}function nb({k:e,v:t,sub:n,cls:r}){return(0,K.jsxs)(Zy,{className:`gap-1 px-4 py-3`,children:[(0,K.jsx)(`p`,{className:`text-muted-foreground text-xs tracking-wide uppercase`,children:e}),(0,K.jsxs)(`div`,{className:Y(`text-2xl font-semibold tabular-nums`,r),children:[t,n!=null&&(0,K.jsxs)(`small`,{className:`text-muted-foreground ml-1 text-sm`,children:[` `,n]})]})]})}function rb({rows:e}){let t=Math.max(1,...e.map(e=>e.value));return(0,K.jsx)(`div`,{className:`flex flex-col gap-2`,children:e.map(e=>(0,K.jsxs)(`div`,{className:`grid grid-cols-[minmax(0,7rem)_1fr_auto] items-center gap-3`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground truncate text-xs`,title:e.label,children:e.label}),(0,K.jsx)(`div`,{className:`bg-muted h-2 overflow-hidden rounded-full`,children:(0,K.jsx)(`div`,{className:Y(`h-full rounded-full`,!e.color&&`bg-brand`),style:{width:`${e.value/t*100}%`,background:e.color}})}),(0,K.jsx)(`span`,{className:`text-xs tabular-nums`,children:e.sub??String(e.value)})]},e.label))})}function ib({text:e,label:t=`Copy`,className:n,icon:r=!1,title:i}){let[a,o]=(0,v.useState)(!1),s=(0,v.useRef)(null);return(0,v.useEffect)(()=>()=>void(s.current&&clearTimeout(s.current)),[]),(0,K.jsxs)(Xy,{type:`button`,variant:`outline`,size:r?`icon-sm`:`sm`,className:n,onClick:()=>{navigator.clipboard?.writeText(e).then(()=>{o(!0),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>o(!1),1400)},()=>{})},title:i??`Copy to clipboard`,"aria-label":i??`Copy to clipboard`,children:[a?(0,K.jsx)(kc,{className:`text-success`}):r?(0,K.jsx)(Fc,{}):t,a&&(0,K.jsx)(`span`,{className:`sr-only`,role:`status`,"aria-live":`polite`,children:`Copied!`})]})}var ab=[50,100,200,500,1e3,2e3],ob=`mt-theme`;function sb(){try{return localStorage.getItem(ob)===`light`?`light`:`dark`}catch{return`dark`}}function cb(){let[e,t]=(0,v.useState)(sb);return(0,v.useEffect)(()=>{document.documentElement.classList.toggle(`dark`,e===`dark`)},[e]),[e,(0,v.useCallback)(e=>{t(e);try{localStorage.setItem(ob,e)}catch{}},[])]}function lb(){let[e,t]=cb(),n=e===`dark`?`light`:`dark`;return(0,K.jsx)(Xy,{variant:`ghost`,size:`icon-sm`,onClick:()=>t(n),title:`Switch to ${n} theme`,"aria-label":`Switch to ${n} theme`,children:e===`dark`?(0,K.jsx)(rl,{}):(0,K.jsx)(Uc,{})})}var ub=e=>e<1?`<1ms`:e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(2)}s`;function db(e){let t=[`B`,`KiB`,`MiB`,`GiB`],n=0,r=e;for(;r>=1024&&n<t.length-1;)r/=1024,n++;return`${r.toFixed(+!!n)} ${t[n]}`}var fb=e=>new Date(e).toLocaleTimeString(void 0,{hour12:!1}),pb=e=>e.toLocaleString(),mb=e=>e==null?`?`:typeof e==`string`?e:typeof e==`number`||typeof e==`boolean`?String(e):JSON.stringify(e),hb={cpu:`var(--chart-1)`,mem:`var(--chart-5)`,disk:`var(--chart-2)`,latency:`var(--chart-4)`},gb={READ:`var(--chart-3)`,WRITE:`var(--chart-1)`,WRITE_IDEMPOTENT:`var(--chart-2)`,DESTRUCTIVE:`var(--chart-4)`,DANGEROUS:`var(--destructive)`},_b={READ:`border-chart-3/40 text-chart-3`,WRITE:`border-chart-1/40 text-chart-1`,WRITE_IDEMPOTENT:`border-chart-2/40 text-chart-2`,DESTRUCTIVE:`border-chart-4/40 text-chart-4`,DANGEROUS:`border-destructive/40 text-destructive`},vb=[[`5m`,3e5],[`15m`,9e5],[`1h`,36e5],[`6h`,216e5],[`24h`,864e5]],yb=1e4,iee=Jy(`relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current`}},defaultVariants:{variant:`default`}});function aee({className:e,variant:t,...n}){return(0,K.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:Y(iee({variant:t}),e),...n})}function oee({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`alert-description`,className:Y(`col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed`,e),...t})}var bb=Jy(`inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3`,{variants:{variant:{default:`bg-primary text-primary-foreground [a&]:hover:bg-primary/90`,secondary:`bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90`,destructive:`bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90`,outline:`border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,ghost:`[a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,link:`text-primary underline-offset-4 [a&]:hover:underline`}},defaultVariants:{variant:`default`}});function xb({className:e,variant:t=`default`,asChild:n=!1,...r}){return(0,K.jsx)(n?pl:`span`,{"data-slot":`badge`,"data-variant":t,className:Y(bb({variant:t}),e),...r})}function Sb({className:e,type:t,...n}){return(0,K.jsx)(`input`,{type:t,"data-slot":`input`,className:Y(`h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30`,`focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40`,e),...n})}function Cb({...e}){return(0,K.jsx)(Sg,{"data-slot":`select`,...e})}function wb({...e}){return(0,K.jsx)(Eg,{"data-slot":`select-value`,...e})}function Tb({className:e,size:t=`default`,children:n,...r}){return(0,K.jsxs)(wg,{"data-slot":`select-trigger`,"data-size":t,className:Y(`flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground`,e),...r,children:[n,(0,K.jsx)(Og,{asChild:!0,children:(0,K.jsx)(Ac,{className:`size-4 opacity-50`})})]})}function Eb({className:e,children:t,position:n=`item-aligned`,align:r=`center`,...i}){return(0,K.jsx)(Mg,{children:(0,K.jsxs)(Pg,{"data-slot":`select-content`,className:Y(`relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,align:r,...i,children:[(0,K.jsx)(Ob,{}),(0,K.jsx)(Yg,{className:Y(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children:t}),(0,K.jsx)(kb,{})]})})}function Db({className:e,children:t,...n}){return(0,K.jsxs)(a_,{"data-slot":`select-item`,className:Y(`relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,K.jsx)(`span`,{"data-slot":`select-item-indicator`,className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,K.jsx)(l_,{children:(0,K.jsx)(kc,{className:`size-4`})})}),(0,K.jsx)(s_,{children:t})]})}function Ob({className:e,...t}){return(0,K.jsx)(d_,{"data-slot":`select-scroll-up-button`,className:Y(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,K.jsx)(Mc,{className:`size-4`})})}function kb({className:e,...t}){return(0,K.jsx)(p_,{"data-slot":`select-scroll-down-button`,className:Y(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,K.jsx)(Ac,{className:`size-4`})})}var Ab={default:`default`,secondary:`secondary`,error:`destructive`,success:`ghost`,warning:`ghost`,accent:`ghost`},jb={default:``,secondary:``,error:``,success:`bg-success text-white hover:bg-success/90`,warning:`bg-warning text-white hover:bg-warning/90`,accent:`bg-brand text-brand-foreground hover:bg-brand/90`},Mb={default:`border bg-transparent text-foreground hover:bg-accent`,secondary:`border bg-transparent text-muted-foreground hover:bg-accent`,error:`border border-destructive/40 bg-transparent text-destructive hover:bg-destructive/10`,success:`border border-success/40 bg-transparent text-success hover:bg-success/10`,warning:`border border-warning/40 bg-transparent text-warning hover:bg-warning/10`,accent:`border border-brand/40 bg-transparent text-brand hover:bg-brand/10`};function X({type:e=`default`,size:t=`md`,ghost:n=!1,loading:r=!1,icon:i,className:a,children:o,disabled:s,...c}){return(0,K.jsxs)(Xy,{type:`button`,variant:n?`ghost`:Ab[e],size:t===`sm`?`sm`:`default`,className:Y(n?Mb[e]:jb[e],a),disabled:s||r,...c,children:[r?(0,K.jsx)(Bb,{small:!0}):i,o!=null&&(0,K.jsx)(`span`,{children:o})]})}var Nb={default:``,secondary:`text-muted-foreground`,success:`border-success/40 text-success`,warning:`border-warning/40 text-warning`,error:`border-destructive/40 text-destructive`,accent:`border-brand/40 text-brand`};function Pb({type:e=`default`,label:t,children:n,className:r}){let i=t===!1?null:t??e;return(0,K.jsx)(aee,{role:`note`,className:Y(Nb[e],r),children:(0,K.jsxs)(oee,{className:`text-current`,children:[i!=null&&(0,K.jsxs)(`b`,{className:`font-semibold`,children:[i,`:`]}),` `,n]})})}var Fb={default:`default`,secondary:`secondary`,error:`destructive`,success:`outline`,warning:`outline`,accent:`outline`},Ib={default:``,secondary:``,error:``,success:`border-success/40 text-success`,warning:`border-warning/40 text-warning`,accent:`border-brand/40 text-brand`};function Lb({type:e=`default`,children:t,className:n}){return(0,K.jsx)(xb,{variant:Fb[e],className:Y(`font-mono`,Ib[e],n),children:t})}var Rb={default:`bg-muted-foreground`,secondary:`bg-muted-foreground/60`,success:`bg-success`,warning:`bg-warning`,error:`bg-destructive`,accent:`bg-brand`};function zb({type:e=`default`,pulse:t=!1,color:n,className:r}){return(0,K.jsx)(`span`,{className:Y(`inline-block size-2 shrink-0 rounded-full`,!n&&Rb[e],t&&`animate-pulse`,r),style:n?{background:n}:void 0})}function Bb({small:e=!1}){return(0,K.jsx)(Vc,{className:Y(`animate-spin`,e?`size-3`:`size-4`),"aria-label":`loading`})}function Vb({className:e,...t}){return(0,K.jsx)(Sb,{className:Y(`font-mono`,e),...t})}var Hb=`\0empty`,Ub=e=>e===``?Hb:e,Wb=e=>e===Hb?``:e;function Gb({value:e,onValueChange:t,options:n,placeholder:r,className:i,disabled:a,size:o=`md`,"aria-label":s}){return(0,K.jsxs)(Cb,{value:Ub(e),onValueChange:e=>t(Wb(e)),disabled:a,children:[(0,K.jsx)(Tb,{size:o===`sm`?`sm`:`default`,"aria-label":s,className:Y(`font-mono`,i),children:(0,K.jsx)(wb,{placeholder:r})}),(0,K.jsx)(Eb,{children:n.map(e=>(0,K.jsx)(Db,{value:Ub(e.value),className:`font-mono`,children:e.label},e.value))})]})}function Kb({children:e,className:t,hoverable:n=!1}){return(0,K.jsx)(Zy,{className:Y(`gap-0 py-0`,n&&`transition-colors hover:border-brand/40`,t),children:e})}function qb(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)(``),[m,h]=(0,v.useState)(null),[g,_]=(0,v.useState)(null),[y,b]=(0,v.useState)(``),[x,S]=(0,v.useState)({show_sensitive:!1,verbose:!1,compact:!1,terse:!1}),C=(0,v.useRef)(null),w=(0,v.useCallback)(()=>{mc(`/api/backups`).then(e=>{t(e),p(t=>t||e.devices[0]||``)}).catch(()=>t({dir:``,devices:[],backups:[]}))},[]);(0,v.useEffect)(()=>w(),[w]);let T=(e,t)=>hc(e,t).catch(()=>({error:`request failed`})),E=async()=>{a(!0),r(`Capturing /export…`);let e=await hc(`/api/backups/create`,{device:f||void 0,label:y.trim()||void 0,show_sensitive:x.show_sensitive,verbose:x.verbose,compact:x.verbose?!1:x.compact,terse:x.terse}).catch(()=>({error:`request failed`}));a(!1),r(e.ok?`Created ${e.name} (${e.bytes} bytes)`:`Create failed: ${e.error}`),e.ok&&w()},D=e=>S(t=>({...t,[e]:!t[e]})),O=async e=>{let t=await e.text(),n=await T(`/api/backups/upload`,{name:e.name,content:t});r(n.ok?`Uploaded ${n.name}`:`Upload failed: ${n.error}`),n.ok&&w()},k=async e=>{s(null);let t=await T(`/api/backups/delete`,{name:e});r(t.ok?`Deleted ${e}`:`Delete failed: ${t.error}`),t.ok&&w()},A=async()=>{if(!u)return;let{name:e,value:t}=u;if(d(null),!t||t===e)return;let n=await T(`/api/backups/rename`,{name:e,new_name:t});r(n.ok?`Renamed to ${n.name}`:`Rename failed: ${n.error}`),n.ok&&w()},j=async e=>{if(!c)return;a(!0),r(e?`Restoring in Safe Mode…`:`Dry-run restore in Safe Mode…`);let t=await hc(`/api/backups/restore`,{name:c,device:f||void 0,confirm:e}).catch(()=>({ok:!1,message:`request failed`}));a(!1),r(t.ok?t.committed?`Restored ${c} → ${f}: ${t.message}`:`Dry-run OK (${t.applied} cmds, rolled back). Click “Restore (commit)” to apply for real.`:`Restore failed: ${t.message}`),t.ok&&e&&l(null)},M=e=>{mc(`/api/backups/get?name=${encodeURIComponent(e)}`).then(h).catch(()=>{})},N=async()=>{if(g===null)return;let t=g.trim();if(!t||t===e?.dir){_(null);return}a(!0);let n=await hc(`/api/backups/dir`,{dir:t}).catch(()=>({error:`request failed`}));a(!1),_(null),n.ok?r(n.persisted?`Backup path saved → ${n.dir}`:n.warning??`Path applied → ${n.dir}`):r(`Path change failed: ${n.error}`),n.ok&&w()};if(!e)return(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`loading backups…`});let P=e.devices.length===0?[{value:``,label:`no devices`}]:e.devices.map(e=>({value:e,label:e}));return(0,K.jsxs)(`section`,{className:`grid content-start gap-[18px]`,children:[(0,K.jsxs)(tb,{title:`Local backup vault`,className:`reveal`,extra:g===null?(0,K.jsxs)(`span`,{className:`inline-flex max-w-[min(60vw,520px)] items-center gap-2 text-muted-foreground text-[11px]`,children:[(0,K.jsx)(`span`,{className:`truncate`,title:e.dir,children:e.dir}),(0,K.jsxs)(`button`,{type:`button`,className:`inline-flex items-center gap-1 whitespace-nowrap text-brand hover:underline`,title:`Change backup directory`,onClick:()=>_(e.dir),children:[(0,K.jsx)(Kc,{className:`size-3`}),` edit path`]})]}):(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,K.jsx)(Vb,{className:`w-[min(48vw,380px)] text-xs`,value:g,autoFocus:!0,spellCheck:!1,placeholder:`~/.mikrotik-mcp/backups`,onChange:e=>_(e.target.value),onKeyDown:e=>{e.key===`Enter`&&N(),e.key===`Escape`&&_(null)}}),(0,K.jsx)(X,{type:`accent`,size:`sm`,onClick:()=>void N(),disabled:i,children:`Save path`}),(0,K.jsx)(X,{type:`secondary`,size:`sm`,ghost:!0,onClick:()=>_(null),children:`Cancel`})]}),children:[n&&(0,K.jsx)(`div`,{className:`mb-3 font-mono text-xs text-muted-foreground`,children:n}),(0,K.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(Gb,{value:f,onValueChange:p,"aria-label":`Device`,options:P}),(0,K.jsx)(X,{type:`accent`,size:`sm`,icon:(0,K.jsx)(Jc,{}),onClick:()=>void E(),disabled:i||!f,children:`Create backup`}),(0,K.jsx)(X,{size:`sm`,icon:(0,K.jsx)(ol,{}),onClick:()=>C.current?.click(),children:`Upload .rsc`}),(0,K.jsx)(`input`,{ref:C,type:`file`,accept:`.rsc,text/plain`,className:`hidden`,onChange:e=>{let t=e.target.files?.[0];t&&O(t),e.currentTarget.value=``}}),(0,K.jsx)(X,{size:`sm`,icon:(0,K.jsx)(Zc,{}),onClick:w,children:`Refresh`})]}),(0,K.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center gap-2.5`,children:[(0,K.jsx)(Vb,{className:`max-w-[200px] text-xs`,value:y,spellCheck:!1,placeholder:`label (optional), e.g. pre-upgrade`,onChange:e=>b(e.target.value)}),[[`show_sensitive`,`show-sensitive`,`Include secrets (keys/passwords)`],[`verbose`,`verbose`,`Include every parameter, even defaults`],[`compact`,`compact`,`Only non-default values (ignored if verbose)`],[`terse`,`terse`,`One machine-readable line per item`]].map(([e,t,n])=>{let r=e===`compact`&&x.verbose;return(0,K.jsxs)(`label`,{className:Y(`inline-flex cursor-pointer items-center gap-1.5 rounded-full border px-2.5 py-1.5 font-mono text-[11px] select-none`,x[e]?`border-brand/55 bg-brand/10 text-foreground`:`border-border bg-muted/40 text-muted-foreground`,r&&`cursor-not-allowed opacity-45`),title:n,children:[(0,K.jsx)(`input`,{type:`checkbox`,className:`accent-brand`,checked:x[e],disabled:r,onChange:()=>D(e)}),t]},e)})]}),c&&(0,K.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center gap-2 rounded-md border border-warning/45 bg-warning/10 px-3 py-2.5 text-xs`,children:[(0,K.jsxs)(`strong`,{children:[`Restore `,c]}),` onto`,` `,(0,K.jsx)(Gb,{value:f,onValueChange:p,size:`sm`,"aria-label":`Restore target device`,options:e.devices.map(e=>({value:e,label:e}))}),` `,`via Safe Mode (auto-reverts on lock-out).`,(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{type:`secondary`,size:`sm`,ghost:!0,onClick:()=>void j(!1),disabled:i,children:`Dry-run`}),(0,K.jsx)(X,{type:`accent`,size:`sm`,onClick:()=>void j(!0),disabled:i,children:`Restore (commit)`}),(0,K.jsx)(X,{type:`secondary`,size:`sm`,ghost:!0,onClick:()=>l(null),children:`Cancel`})]}),e.backups.length===0?(0,K.jsx)(`div`,{className:`p-3 text-muted-foreground text-[11px]`,children:"No backups yet. Click “Create backup” to capture this device’s config, or upload a `.rsc`."}):(0,K.jsx)(`div`,{className:`max-h-[60vh] overflow-auto rounded-lg border border-border`,children:(0,K.jsxs)(By,{className:`min-w-[980px] table-fixed`,children:[(0,K.jsx)(Vy,{className:`bg-card sticky top-0 z-10`,children:(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Wy,{children:`name`}),(0,K.jsx)(Wy,{className:`w-[130px]`,children:`device`}),(0,K.jsx)(Wy,{className:`w-[90px] text-right`,children:`size`}),(0,K.jsx)(Wy,{className:`w-[170px]`,children:`captured`}),(0,K.jsx)(Wy,{className:`w-[380px]`,children:`actions`})]})}),(0,K.jsx)(Hy,{children:e.backups.map(e=>(0,K.jsxs)(Uy,{"data-state":m?.name===e.name?`selected`:void 0,children:[(0,K.jsx)(Gy,{className:`truncate font-mono`,title:e.name,children:e.name}),(0,K.jsx)(Gy,{className:`truncate`,children:e.device??`—`}),(0,K.jsx)(Gy,{className:`text-right tabular-nums`,children:db(e.bytes)}),(0,K.jsx)(Gy,{className:`tabular-nums whitespace-nowrap`,children:new Date(e.modified).toLocaleString(void 0,{hour12:!1})}),(0,K.jsx)(Gy,{onClick:e=>e.stopPropagation(),children:(0,K.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,K.jsx)(X,{size:`sm`,onClick:()=>M(e.name),children:`view`}),(0,K.jsx)(`a`,{className:`inline-flex items-center rounded-md border border-border px-2 py-1 text-xs hover:bg-accent`,href:pc(`/api/backups/raw?name=${encodeURIComponent(e.name)}`),download:e.name,title:`Download`,children:(0,K.jsx)(Lc,{className:`size-3.5`})}),u?.name===e.name?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Vb,{className:`inline-block w-[120px] text-xs`,value:u.value,autoFocus:!0,onChange:t=>d({name:e.name,value:t.target.value}),onKeyDown:e=>e.key===`Enter`&&void A()}),(0,K.jsx)(X,{type:`accent`,size:`sm`,icon:(0,K.jsx)(kc,{}),onClick:()=>void A()}),(0,K.jsx)(X,{type:`secondary`,size:`sm`,ghost:!0,icon:(0,K.jsx)(cl,{}),onClick:()=>d(null)})]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(X,{size:`sm`,onClick:()=>d({name:e.name,value:e.name}),children:`rename`}),(0,K.jsx)(X,{type:`accent`,size:`sm`,onClick:()=>l(e.name),children:`restore`})]}),o===e.name?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(X,{type:`error`,size:`sm`,ghost:!0,icon:(0,K.jsx)(kc,{}),onClick:()=>void k(e.name)}),(0,K.jsx)(X,{type:`secondary`,size:`sm`,ghost:!0,icon:(0,K.jsx)(cl,{}),onClick:()=>s(null)})]}):(0,K.jsx)(X,{type:`error`,size:`sm`,ghost:!0,icon:(0,K.jsx)(il,{}),onClick:()=>s(e.name)})]})})]},e.name))})]})})]}),m&&(0,K.jsx)(tb,{title:`Backup · ${m.name}`,className:`reveal`,extra:(0,K.jsx)(X,{type:`secondary`,size:`sm`,icon:(0,K.jsx)(cl,{}),onClick:()=>h(null),children:`Close`}),children:(0,K.jsx)(`pre`,{className:`m-0 overflow-auto rounded border border-border bg-background p-3 font-mono text-xs break-words whitespace-pre-wrap`,style:{maxHeight:460},children:m.content||`(empty)`})})]})}function Jb({className:e,orientation:t=`horizontal`,...n}){return(0,K.jsx)(ov,{"data-slot":`tabs`,"data-orientation":t,orientation:t,className:Y(`group/tabs flex gap-2 data-[orientation=horizontal]:flex-col`,e),...n})}var Yb=Jy(`group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function Xb({className:e,variant:t=`default`,...n}){return(0,K.jsx)(sv,{"data-slot":`tabs-list`,"data-variant":t,className:Y(Yb({variant:t}),e),...n})}function Zb({className:e,...t}){return(0,K.jsx)(cv,{"data-slot":`tabs-trigger`,className:Y(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent`,`data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100`,e),...t})}function Qb({className:e,...t}){return(0,K.jsx)(lv,{"data-slot":`tabs-content`,className:Y(`flex-1 outline-none`,e),...t})}var $b=`http://www.w3.org/2000/svg`,ex=864e5,tx=e=>new Date(e).toISOString().slice(0,10);function nx(){let e=new Date;return Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())}function rx(e){return new Date(`${e}T00:00:00Z`).toLocaleDateString(void 0,{weekday:`short`,month:`short`,day:`numeric`,year:`numeric`,timeZone:`UTC`})}function ix({endpoint:e,days:t=90}){let[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(!0);(0,v.useEffect)(()=>{let t=!0;return a(!0),mc(e).then(e=>{t&&r(e)}).catch(()=>{t&&r(null)}).finally(()=>{t&&a(!1)}),()=>{t=!1}},[e]);let o=(0,v.useMemo)(()=>{let e=new Map((n?.series??[]).map(e=>[e.day,e])),r=nx(),i=[];for(let n=t-1;n>=0;n--){let t=tx(r-n*ex),a=e.get(t);i.push(a??{day:t,rx:0,tx:0})}return i},[n,t]);if(i)return(0,K.jsx)(`div`,{className:`px-1 py-4 text-[12.5px] text-muted-foreground`,children:`loading usage…`});if(!((n?.totalRx??0)+(n?.totalTx??0)>0))return(0,K.jsx)(`div`,{className:`px-1 py-4 text-[12.5px] text-muted-foreground`,children:`No usage recorded yet. The dashboard samples on a configurable interval (1 minute by default — see the RADIUS & UM Settings tab); history fills in over time (kept ~3 months).`});let s=Math.max(1,...o.flatMap(e=>[e.rx,e.tx])),c=e=>8+e*624/Math.max(1,o.length-1),l=e=>142-e/s*134,u=e=>o.map((t,n)=>`${c(n).toFixed(1)},${l(e(t)).toFixed(1)}`).join(` `),d=e=>{let t=c(0).toFixed(1),n=c(o.length-1).toFixed(1);return`${t},${142 .toFixed(1)} ${u(e)} ${n},${142 .toFixed(1)}`};return(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`mb-1.5 flex items-baseline gap-3.5 text-xs tabular-nums`,children:[(0,K.jsxs)(`span`,{className:`font-semibold text-chart-3`,children:[`↓ `,db(n?.totalRx??0),` down`]}),(0,K.jsxs)(`span`,{className:`font-semibold text-chart-4`,children:[`↑ `,db(n?.totalTx??0),` up`]}),(0,K.jsxs)(`span`,{className:`text-[11px] text-muted-foreground`,children:[`· peak/day `,db(s),` · last `,t,` days`]})]}),(0,K.jsxs)(`svg`,{className:`block h-40 w-full rounded-md border border-border bg-card`,viewBox:`0 0 640 150`,preserveAspectRatio:`none`,xmlns:$b,role:`img`,children:[(0,K.jsx)(`polygon`,{className:`fill-chart-3/20`,points:d(e=>e.rx)}),(0,K.jsx)(`polygon`,{className:`fill-chart-4/15`,points:d(e=>e.tx)}),(0,K.jsx)(`polyline`,{className:`fill-none stroke-chart-3 stroke-2 [vector-effect:non-scaling-stroke]`,points:u(e=>e.rx)}),(0,K.jsx)(`polyline`,{className:`fill-none stroke-chart-4 stroke-2 [vector-effect:non-scaling-stroke]`,points:u(e=>e.tx)})]})]})}var ax=53,ox=12,sx=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],cx=[`var(--muted)`,`color-mix(in srgb, var(--chart-3) 30%, var(--muted))`,`color-mix(in srgb, var(--chart-3) 50%, var(--muted))`,`color-mix(in srgb, var(--chart-3) 72%, transparent)`,`var(--chart-3)`];function lx({endpoint:e,label:t}){let[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),o=(0,v.useRef)(null);(0,v.useEffect)(()=>{let t=!0;return mc(e).then(e=>{t&&r(e)}).catch(()=>{t&&r({days:[],total:0,max:0})}),()=>{t=!1}},[e]);let{cells:s,monthLabels:c}=(0,v.useMemo)(()=>{let e=new Map((n?.days??[]).map(e=>[e.day,e.count])),t=nx(),r=t-(new Date(t).getUTCDay()+(ax-1)*7)*ex,i=[],a=[],o=-1;for(let n=0;n<ax*7;n++){let s=r+n*ex;if(s>t)break;let c=Math.floor(n/7),l=new Date(s).getUTCDay(),u=tx(s);if(i.push({day:u,count:e.get(u)??0,col:c,row:l,ms:s}),l===0){let e=new Date(s).getUTCMonth();e!==o&&(a.push({col:c,text:sx[e]}),o=e)}}return{cells:i,monthLabels:a}},[n]),l=Math.max(1,n?.max??1),u=e=>e<=0?0:Math.min(4,Math.ceil(e/l*4)),d=(e,t)=>{let n=o.current;if(!n)return;let r=e.currentTarget.getBoundingClientRect(),i=n.getBoundingClientRect();a({left:r.left-i.left+r.width/2,top:r.top-i.top,day:t.day,count:t.count,lvl:u(t.count)})};return(0,K.jsxs)(`div`,{className:`relative`,ref:o,children:[(0,K.jsxs)(`div`,{className:`mb-1.5 flex items-baseline gap-2.5`,children:[(0,K.jsx)(`span`,{className:`text-[12.5px] font-semibold`,children:t??`Connections`}),(0,K.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:n?`${n.total} total`:`…`})]}),(0,K.jsx)(`div`,{className:`overflow-x-auto pb-1`,onMouseLeave:()=>a(null),children:(0,K.jsxs)(`svg`,{className:`block`,viewBox:`0 0 823 121`,width:823,height:121,xmlns:$b,role:`img`,children:[c.map(e=>(0,K.jsx)(`text`,{className:`fill-muted-foreground text-[9px]`,x:28+e.col*15,y:11,children:e.text},`${e.col}-${e.text}`)),[`Mon`,`Wed`,`Fri`].map((e,t)=>(0,K.jsx)(`text`,{className:`fill-muted-foreground text-[9px]`,x:0,y:16+(t*2+1)*15+ox-2,children:e},e)),s.map(e=>(0,K.jsx)(`rect`,{className:`cursor-pointer stroke-1 [transition:stroke_0.1s_ease] ${i?.day===e.day?`stroke-foreground stroke-[1.5px]`:`stroke-border/60`}`,style:{fill:cx[u(e.count)]},x:28+e.col*15,y:16+e.row*15,width:ox,height:ox,rx:2,onMouseEnter:t=>d(t,e)},e.day))]})}),i&&(0,K.jsxs)(`div`,{className:`pointer-events-none absolute z-30 min-w-[150px] -translate-x-1/2 translate-y-[calc(-100%-9px)] rounded-[10px] border border-chart-3/35 bg-popover px-2.5 py-2 shadow-xl`,style:{left:i.left,top:i.top},role:`tooltip`,children:[(0,K.jsx)(`span`,{className:`absolute -bottom-1.5 left-1/2 size-[11px] -translate-x-1/2 rotate-45 border-r border-b border-chart-3/35 bg-popover`}),(0,K.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[13px]`,children:[(0,K.jsx)(`span`,{className:`inline-block size-[12px] rounded-[2px]`,style:{background:cx[i.lvl]}}),(0,K.jsx)(`b`,{className:`font-semibold`,children:i.count===0?`No connections`:`${i.count} connection${i.count===1?``:`s`}`})]}),(0,K.jsx)(`div`,{className:`mt-[3px] text-[11.5px] text-muted-foreground tabular-nums`,children:rx(i.day)})]}),(0,K.jsxs)(`div`,{className:`mt-2 flex items-center gap-1 text-[11px] text-muted-foreground`,children:[`Less`,[0,1,2,3,4].map(e=>(0,K.jsx)(`span`,{className:`inline-block size-[11px] rounded-[2px]`,style:{background:cx[e]}},e)),`More`]})]})}var ux=e=>(e.flags??``).includes(`X`)||e.disabled===`yes`;function dx(e,t){return e[t.idKey]||e.name||e.address||e.user||`(row)`}var fx=`mb-3.5 rounded-md border border-border bg-card p-3.5`,px=`mb-2.5 text-[13px] font-semibold`,mx=`grid grid-cols-[repeat(auto-fill,minmax(220px,1fr))] gap-x-3.5 gap-y-2.5`,hx=`mt-3.5 flex items-center gap-2.5`,gx=`flex flex-col gap-1`,_x=`text-[11.5px] text-muted-foreground`;function vx({config:e,device:t}){let[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(!1),[c,l]=(0,v.useState)(``),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)({}),m=(0,v.useCallback)(async()=>{try{let n=t?`?device=${encodeURIComponent(t)}`:``;r(await mc(`/api/aaa/list/${e.slug}${n}`)),a(null)}catch(e){a(e instanceof Error?e.message:String(e))}},[e.slug,t]);(0,v.useEffect)(()=>{r(null),d(null),m()},[m]);let h=(0,v.useCallback)(async(n,r)=>{s(!0),a(null);try{let i=await hc(`/api/aaa/${n}`,{device:t,slug:e.slug,...r});return i.ok?(await m(),!0):(a(i.message),!1)}catch(e){return a(e instanceof Error?e.message:String(e)),!1}finally{s(!1)}},[t,e.slug,m]),g=()=>{d(`new`),p({})},_=t=>{d(t[e.idKey]);let n={};for(let r of e.fields)r.type!==`password`&&(r.key===`disabled`?n.disabled=ux(t)?`yes`:`no`:t[r.key]!=null&&(n[r.key]=t[r.key]));p(n)},y=async()=>{(u===`new`?await h(`add`,{fields:f}):await h(`update`,{id:u,fields:f}))&&d(null)},b=(0,v.useMemo)(()=>{let t=n?.rows??[],r=c.trim().toLowerCase();return r?t.filter(t=>e.columns.some(e=>(t[e.key]??``).toLowerCase().includes(r))):t},[n,c,e.columns]);return n&&!n.available?(0,K.jsxs)(Pb,{type:`warning`,label:`User Manager not installed`,children:[`This device doesn't have the `,(0,K.jsx)(`code`,{children:`user-manager`}),` package. Install it (System → Packages) and reboot to manage the built-in RADIUS server here.`]}):(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`mb-3 flex items-center gap-2.5`,children:[(0,K.jsx)(Vb,{className:`w-[200px]`,placeholder:`Filter…`,value:c,onChange:e=>l(e.target.value)}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[b.length,` rows`]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,icon:(0,K.jsx)(Zc,{}),onClick:()=>void m(),children:`Refresh`}),(0,K.jsx)(X,{size:`sm`,type:`accent`,icon:(0,K.jsx)(Jc,{}),onClick:g,children:`Add`})]}),i&&(0,K.jsx)(Pb,{type:`error`,className:`mb-2.5`,children:i}),u&&(0,K.jsxs)(`div`,{className:fx,children:[(0,K.jsx)(`div`,{className:px,children:u===`new`?`New ${e.slug}`:`Edit ${u}`}),(0,K.jsx)(`div`,{className:mx,children:e.fields.map(e=>(0,K.jsxs)(`label`,{className:gx,children:[(0,K.jsxs)(`span`,{className:_x,children:[e.label,e.required&&u===`new`?` *`:``]}),e.type===`bool`?(0,K.jsx)(Gb,{value:f[e.key]??``,onValueChange:t=>p({...f,[e.key]:t}),options:[{value:``,label:`—`},{value:`no`,label:`no`},{value:`yes`,label:`yes`}]}):e.type===`select`?(0,K.jsx)(Gb,{value:f[e.key]??``,onValueChange:t=>p({...f,[e.key]:t}),options:[{value:``,label:`—`},...(e.options??[]).map(e=>({value:e,label:e}))]}):(0,K.jsx)(Vb,{type:e.type===`password`?`password`:e.type===`number`?`number`:`text`,placeholder:e.placeholder??(e.type===`password`?`(unchanged)`:``),value:f[e.key]??``,onChange:t=>p({...f,[e.key]:t.target.value})})]},e.key))}),(0,K.jsxs)(`div`,{className:hx,children:[(0,K.jsx)(X,{size:`sm`,type:`accent`,loading:o,onClick:()=>void y(),children:u===`new`?`Create`:`Save`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>d(null),children:`Cancel`})]})]}),n?b.length===0?(0,K.jsx)(`div`,{className:`px-1 py-5 text-muted-foreground text-[11px]`,children:e.empty??`Nothing here yet.`}):(0,K.jsxs)(By,{className:`text-[13px]`,children:[(0,K.jsx)(Vy,{children:(0,K.jsxs)(Uy,{children:[e.columns.map(e=>(0,K.jsx)(Wy,{children:e.label},e.key)),(0,K.jsx)(Wy,{className:`text-right`,children:`Actions`})]})}),(0,K.jsx)(Hy,{children:b.map(t=>{let n=t[e.idKey],r=ux(t);return(0,K.jsxs)(Uy,{children:[e.columns.map(e=>(0,K.jsx)(Gy,{className:Y(r&&`text-muted-foreground`),title:t[e.key]??``,children:e.key===`_status`?(0,K.jsx)(Lb,{type:r?`secondary`:`success`,children:r?`disabled`:`enabled`}):t[e.key]??``},e.key)),(0,K.jsx)(Gy,{className:`text-right`,children:(0,K.jsxs)(`span`,{className:`flex justify-end gap-1.5`,children:[e.toggle&&(0,K.jsx)(X,{size:`sm`,ghost:!0,disabled:o,onClick:()=>void h(`toggle`,{id:n,enable:r}),children:r?`Enable`:`Disable`}),!e.addOnly&&(0,K.jsx)(X,{size:`sm`,ghost:!0,disabled:o,onClick:()=>_(t),children:`Edit`}),(0,K.jsx)(X,{size:`sm`,type:`error`,ghost:!0,disabled:o,onClick:()=>void h(`remove`,{id:n}),children:`Remove`})]})})]},n||dx(t,e))})})]}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`loading…`})]})}var yx=[`user`,`calling-station-id`,`nas-ip-address`,`started`,`ended`,`uptime`,`download`,`upload`,`status`];function bx({device:e}){let[t,n]=(0,v.useState)(null),[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(``),s=(0,v.useCallback)(async()=>{try{let t=e?`?device=${encodeURIComponent(e)}`:``;n(await mc(`/api/aaa/list/um-sessions${t}`)),i(null)}catch(e){i(e instanceof Error?e.message:String(e))}},[e]);if((0,v.useEffect)(()=>{n(null),s();let e=setInterval(()=>void s(),1e4);return()=>clearInterval(e)},[s]),t&&!t.available)return(0,K.jsxs)(Pb,{type:`warning`,label:`User Manager not installed`,children:[`The `,(0,K.jsx)(`code`,{children:`user-manager`}),` package isn't installed on this device.`]});let c=(t?.rows??[]).filter(e=>!a.trim()||(e.user??``).toLowerCase().includes(a.trim().toLowerCase()));return(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`mb-3 flex items-center gap-2.5`,children:[(0,K.jsx)(Vb,{className:`w-[200px]`,placeholder:`Filter by user…`,value:a,onChange:e=>o(e.target.value)}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[c.length,` sessions`]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,icon:(0,K.jsx)(Zc,{}),onClick:()=>void s(),children:`Refresh`})]}),r&&(0,K.jsx)(Pb,{type:`error`,children:r}),t?c.length===0?(0,K.jsx)(`div`,{className:`px-1 py-5 text-muted-foreground text-[11px]`,children:`No accounting sessions recorded.`}):(0,K.jsxs)(By,{className:`text-[13px]`,children:[(0,K.jsx)(Vy,{children:(0,K.jsx)(Uy,{children:yx.map(e=>(0,K.jsx)(Wy,{children:e.replace(/-/g,` `)},e))})}),(0,K.jsx)(Hy,{children:c.map((e,t)=>(0,K.jsx)(Uy,{children:yx.map(t=>(0,K.jsx)(Gy,{title:e[t]??``,children:e[t]??``},t))},e[`.id`]||t))})]}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`loading…`})]})}function xx({device:e,getPath:t,setPath:n,fields:r,title:i,unwrap:a,extra:o}){let[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(!0),[d,f]=(0,v.useState)({}),[p,m]=(0,v.useState)(null),[h,g]=(0,v.useState)(!1),_=(0,v.useCallback)(async()=>{let{available:n,row:r}=a(await mc(`${t}${e?`?device=${encodeURIComponent(e)}`:``}`).catch(()=>null));u(n),c(r),f({})},[e,t,a]);(0,v.useEffect)(()=>{_()},[_]);let y=async()=>{g(!0),m(null);try{let t=await hc(n,{device:e,fields:d});m(t.message),t.ok&&await _()}finally{g(!1)}};return l?(0,K.jsxs)(`div`,{className:fx,children:[(0,K.jsx)(`div`,{className:px,children:i}),s&&(0,K.jsx)(`div`,{className:`mb-3 text-muted-foreground text-xs`,children:r.map(e=>`${e.label}: ${s[e.key]??`—`}`).join(` · `)}),(0,K.jsx)(`div`,{className:mx,children:r.map(e=>(0,K.jsxs)(`label`,{className:gx,children:[(0,K.jsx)(`span`,{className:_x,children:e.label}),e.type===`bool`?(0,K.jsx)(Gb,{value:d[e.key]??``,onValueChange:t=>f({...d,[e.key]:t}),options:[{value:``,label:`(unchanged)`},{value:`no`,label:`no`},{value:`yes`,label:`yes`}]}):(0,K.jsx)(Vb,{type:e.type===`number`?`number`:`text`,placeholder:e.placeholder??s?.[e.key]??``,value:d[e.key]??``,onChange:t=>f({...d,[e.key]:t.target.value})})]},e.key))}),(0,K.jsxs)(`div`,{className:hx,children:[(0,K.jsx)(X,{size:`sm`,type:`accent`,loading:h,onClick:()=>void y(),children:`Save`}),o,p&&(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:p})]})]}):(0,K.jsxs)(Pb,{type:`warning`,label:`Not available`,children:[i,` is not available on this device.`]})}var Sx={slug:`radius`,idKey:`.id`,toggle:!0,columns:[{key:`address`,label:`Address`},{key:`service`,label:`Service`},{key:`authentication-port`,label:`Auth`},{key:`accounting-port`,label:`Acct`},{key:`protocol`,label:`Proto`},{key:`_status`,label:`Status`}],empty:`No RADIUS servers configured.`,fields:[{key:`address`,label:`Address`,required:!0,placeholder:`1.2.3.4 or host`},{key:`secret`,label:`Secret`,type:`password`,required:!0},{key:`service`,label:`Service`,required:!0,placeholder:`login,ppp,hotspot,wireless,dhcp,ipsec,dot1x`},{key:`authentication-port`,label:`Auth port`,type:`number`,placeholder:`1812`},{key:`accounting-port`,label:`Acct port`,type:`number`,placeholder:`1813`},{key:`timeout`,label:`Timeout`,placeholder:`300ms`},{key:`src-address`,label:`Src address`},{key:`realm`,label:`Realm`},{key:`called-id`,label:`Called ID`},{key:`domain`,label:`Domain`},{key:`protocol`,label:`Protocol`,type:`select`,options:[`udp`,`radsec`]},{key:`certificate`,label:`Certificate`},{key:`accounting-backup`,label:`Acct backup`,type:`bool`},{key:`comment`,label:`Comment`},{key:`disabled`,label:`Disabled`,type:`bool`}]},Cx={slug:`um-users`,idKey:`name`,toggle:!0,columns:[{key:`name`,label:`Name`},{key:`group`,label:`Group`},{key:`shared-users`,label:`Shared`},{key:`caller-id`,label:`Caller ID`},{key:`comment`,label:`Comment`},{key:`_status`,label:`Status`}],empty:`No RADIUS users.`,fields:[{key:`name`,label:`Name`,required:!0},{key:`password`,label:`Password`,type:`password`,required:!0},{key:`group`,label:`Group`},{key:`shared-users`,label:`Shared users`,type:`number`,placeholder:`1`},{key:`attributes`,label:`RADIUS attributes`},{key:`caller-id`,label:`Caller ID (MAC)`},{key:`otp-secret`,label:`OTP secret`,type:`password`},{key:`comment`,label:`Comment`},{key:`disabled`,label:`Disabled`,type:`bool`}]},wx={slug:`um-profiles`,idKey:`name`,columns:[{key:`name`,label:`Name`},{key:`name-for-users`,label:`Display`},{key:`validity`,label:`Validity`},{key:`price`,label:`Price`},{key:`starts-when`,label:`Starts`}],empty:`No service profiles.`,fields:[{key:`name`,label:`Name`,required:!0},{key:`name-for-users`,label:`Display name`},{key:`validity`,label:`Validity`,placeholder:`30d`},{key:`price`,label:`Price`,type:`number`},{key:`starts-when`,label:`Starts when`,type:`select`,options:[`assigned`,`first-auth`]},{key:`override-shared-users`,label:`Override shared-users`},{key:`comment`,label:`Comment`}]},Tx={slug:`um-limitations`,idKey:`name`,columns:[{key:`name`,label:`Name`},{key:`rate-limit-rx`,label:`Rate ↓`},{key:`rate-limit-tx`,label:`Rate ↑`},{key:`transfer-limit`,label:`Transfer`},{key:`uptime-limit`,label:`Uptime`}],empty:`No limitation templates.`,fields:[{key:`name`,label:`Name`,required:!0},{key:`rate-limit-rx`,label:`Download rate`,placeholder:`10M`},{key:`rate-limit-tx`,label:`Upload rate`,placeholder:`10M`},{key:`rate-limit-min-rx`,label:`Min download (CIR)`,placeholder:`2M`},{key:`rate-limit-min-tx`,label:`Min upload (CIR)`,placeholder:`2M`},{key:`rate-limit-burst-rx`,label:`Burst download`,placeholder:`20M`},{key:`rate-limit-burst-tx`,label:`Burst upload`,placeholder:`20M`},{key:`rate-limit-burst-threshold-rx`,label:`Burst thr. ↓`},{key:`rate-limit-burst-threshold-tx`,label:`Burst thr. ↑`},{key:`rate-limit-burst-time-rx`,label:`Burst time ↓`,placeholder:`10s`},{key:`rate-limit-burst-time-tx`,label:`Burst time ↑`,placeholder:`10s`},{key:`rate-limit-priority`,label:`Priority (1-8)`,type:`number`},{key:`download-limit`,label:`Download cap`,placeholder:`5G`},{key:`upload-limit`,label:`Upload cap`,placeholder:`5G`},{key:`transfer-limit`,label:`Total transfer cap`,placeholder:`10G`},{key:`uptime-limit`,label:`Uptime cap`,placeholder:`1d`},{key:`reset-counters-interval`,label:`Reset interval`},{key:`reset-counters-start-time`,label:`Reset start time`},{key:`comment`,label:`Comment`}]},Ex={slug:`um-routers`,idKey:`name`,toggle:!0,columns:[{key:`name`,label:`Name`},{key:`address`,label:`Address`},{key:`coa-port`,label:`CoA port`},{key:`protocol`,label:`Proto`},{key:`comment`,label:`Comment`},{key:`_status`,label:`Status`}],empty:`No NAS clients registered.`,fields:[{key:`name`,label:`Name`,required:!0},{key:`address`,label:`Address`,required:!0,placeholder:`192.168.88.1`},{key:`shared-secret`,label:`Shared secret`,type:`password`,required:!0},{key:`coa-port`,label:`CoA port`,type:`number`},{key:`protocol`,label:`Protocol`,placeholder:`radius`},{key:`comment`,label:`Comment`},{key:`disabled`,label:`Disabled`,type:`bool`}]},Dx={slug:`um-user-profiles`,idKey:`.id`,addOnly:!0,columns:[{key:`user`,label:`User`},{key:`profile`,label:`Profile`},{key:`state`,label:`State`},{key:`end-time`,label:`Ends`}],empty:`No profile assignments.`,fields:[{key:`user`,label:`User`,required:!0},{key:`profile`,label:`Profile`,required:!0}]},Ox=[{id:`radius`,label:`RADIUS Servers`},{id:`users`,label:`Users`},{id:`profiles`,label:`Profiles`},{id:`limitations`,label:`Limitations`},{id:`nas`,label:`NAS Clients`},{id:`assignments`,label:`Assignments`},{id:`sessions`,label:`Sessions`},{id:`usage`,label:`Usage & Heatmap`},{id:`settings`,label:`Settings`}],kx=[{key:`accept`,label:`Accept CoA`,type:`bool`},{key:`port`,label:`CoA port`,type:`number`,placeholder:`3799`}],Ax=[{key:`enabled`,label:`Enabled`,type:`bool`},{key:`use-profiles`,label:`Use profiles`,type:`bool`},{key:`certificate`,label:`Certificate`},{key:`authentication-port`,label:`Auth port`,type:`number`},{key:`accounting-port`,label:`Acct port`,type:`number`}];function jx({device:e}){let[t,n]=(0,v.useState)(null),[r,i]=(0,v.useState)(``);(0,v.useEffect)(()=>{mc(`/api/usage/um-users${e?`?device=${encodeURIComponent(e)}`:``}`).then(e=>{n(e.users),i(t=>t||e.users[0]||``)}).catch(()=>n([]))},[e]);let a=e?`&device=${encodeURIComponent(e)}`:``;return(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`mb-3 flex items-center gap-2`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`User`}),(0,K.jsx)(Gb,{value:r,onValueChange:i,"aria-label":`User`,options:t&&t.length>0?t.map(e=>({value:e,label:e})):[{value:``,label:`— no sessions recorded yet —`}]})]}),t&&t.length===0?(0,K.jsx)(Pb,{type:`secondary`,label:`No data yet`,children:`No User Manager sessions have been recorded yet. The dashboard ingests sessions on a configurable interval (1 minute by default — change it under the Settings tab) and keeps them forever, so usage and the heatmap fill in over time.`}):r&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`mt-4`,children:[(0,K.jsx)(`div`,{className:`mb-2 text-xs font-semibold text-muted-foreground`,children:`Download / upload · last 3 months`}),(0,K.jsx)(ix,{endpoint:`/api/usage/um-user?user=${encodeURIComponent(r)}${a}&days=90`,days:90})]}),(0,K.jsxs)(`div`,{className:`mt-4`,children:[(0,K.jsxs)(`div`,{className:`mb-2 text-xs font-semibold text-muted-foreground`,children:[`Connection heatmap · `,r]}),(0,K.jsx)(lx,{endpoint:`/api/usage/heatmap?user=${encodeURIComponent(r)}${a}&days=371`,label:`${r} — connections`})]}),(0,K.jsxs)(`div`,{className:`mt-4`,children:[(0,K.jsx)(`div`,{className:`mb-2 text-xs font-semibold text-muted-foreground`,children:`All users · connections`}),(0,K.jsx)(lx,{endpoint:`/api/usage/heatmap?days=371${a}`,label:`All users`})]})]})]})}function Mx(){let[e,t]=(0,v.useState)(``),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(null),c=(0,v.useCallback)(async()=>{try{let e=await mc(`/api/usage/sampler`);r(e.intervalMs)}catch{r(null)}},[]);(0,v.useEffect)(()=>{c()},[c]);let l=async()=>{let n=Number(e);if(!Number.isFinite(n)||n<=0){s(`Enter a positive number of minutes.`);return}a(!0),s(null);try{let e=await hc(`/api/usage/sampler`,{intervalMs:Math.round(n*6e4)});r(e.intervalMs),t(``),s(`Now sampling every ${Nx(e.intervalMs)}.`)}catch(e){s(e instanceof Error?e.message:String(e))}finally{a(!1)}};return(0,K.jsxs)(`div`,{className:`rounded-md border border-border bg-card p-3.5`,children:[(0,K.jsx)(`div`,{className:px,children:`Usage sampling`}),(0,K.jsxs)(`div`,{className:`mb-3 text-muted-foreground text-xs`,children:[`How often client traffic + User Manager sessions are recorded into the usage history. Current: `,n==null?`…`:Nx(n),` · default 1 minute · range 30s–6h.`]}),(0,K.jsx)(`div`,{className:mx,children:(0,K.jsxs)(`label`,{className:gx,children:[(0,K.jsx)(`span`,{className:_x,children:`Interval (minutes)`}),(0,K.jsx)(Vb,{type:`number`,step:`0.5`,min:`0.5`,placeholder:n?String(n/6e4):`1`,value:e,onChange:e=>t(e.target.value)})]})}),(0,K.jsxs)(`div`,{className:hx,children:[(0,K.jsx)(X,{size:`sm`,type:`accent`,loading:i,onClick:()=>void l(),children:`Save`}),[1,5,10,30].map(e=>(0,K.jsxs)(X,{size:`sm`,ghost:!0,onClick:()=>{t(String(e))},children:[e,`m`]},e)),o&&(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:o})]})]})}function Nx(e){if(e<6e4)return`${Math.round(e/1e3)}s`;let t=e/6e4;return`${Number.isInteger(t)?t:t.toFixed(1)} min`}function Px(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)(`radius`);(0,v.useEffect)(()=>{mc(`/api/devices`).then(e=>{t(e),r(t=>t||e.defaultDevice||e.devices[0]?.name||``)}).catch(()=>t({server:``,defaultDevice:``,devices:[]}))},[]);let o=e?.devices??[];return(0,K.jsx)(`section`,{className:`grid content-start gap-[18px]`,children:(0,K.jsx)(tb,{title:`RADIUS & User Manager`,className:`reveal`,extra:o.length>1?(0,K.jsx)(Gb,{value:n,onValueChange:r,"aria-label":`Router`,options:o.map(e=>({value:e.name,label:`${e.name}${e.isDefault?` (default)`:``}`}))}):void 0,children:(0,K.jsxs)(Jb,{value:i,onValueChange:e=>a(e),children:[(0,K.jsx)(Xb,{variant:`line`,className:`mb-3.5 h-auto w-full flex-wrap justify-start border-b border-border`,children:Ox.map(e=>(0,K.jsx)(Zb,{value:e.id,children:e.label},e.id))}),(0,K.jsx)(Qb,{value:`radius`,children:(0,K.jsx)(vx,{config:Sx,device:n})}),(0,K.jsx)(Qb,{value:`users`,children:(0,K.jsx)(vx,{config:Cx,device:n})}),(0,K.jsx)(Qb,{value:`profiles`,children:(0,K.jsx)(vx,{config:wx,device:n})}),(0,K.jsx)(Qb,{value:`limitations`,children:(0,K.jsx)(vx,{config:Tx,device:n})}),(0,K.jsx)(Qb,{value:`nas`,children:(0,K.jsx)(vx,{config:Ex,device:n})}),(0,K.jsx)(Qb,{value:`assignments`,children:(0,K.jsx)(vx,{config:Dx,device:n})}),(0,K.jsx)(Qb,{value:`sessions`,children:(0,K.jsx)(bx,{device:n})}),(0,K.jsx)(Qb,{value:`usage`,children:(0,K.jsx)(jx,{device:n})}),(0,K.jsx)(Qb,{value:`settings`,children:(0,K.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,K.jsx)(xx,{device:n,getPath:`/api/aaa/radius-incoming`,setPath:`/api/aaa/radius-incoming`,title:`RADIUS Incoming (CoA listener)`,fields:kx,unwrap:e=>({available:!0,row:e??{}}),extra:(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>void hc(`/api/aaa/radius-reset-counters`,{device:n}),children:`Reset RADIUS counters`})}),(0,K.jsx)(xx,{device:n,getPath:`/api/aaa/um-settings`,setPath:`/api/aaa/um-settings`,title:`User Manager (built-in RADIUS server)`,fields:Ax,unwrap:e=>{let t=e??{};return{available:t.available!==!1,row:t.settings??{}}}}),(0,K.jsx)(Mx,{})]})})]})})})}function Fx({className:e,...t}){return(0,K.jsx)(`textarea`,{"data-slot":`textarea`,className:Y(`flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40`,e),...t})}var Ix={add:`+`,set:`~`,remove:`−`,enable:`▲`,disable:`▽`,move:`⇅`},Lx={high:`border-l-destructive`,medium:`border-l-warning`,low:`border-l-success`};function Rx(){let[e,t]=(0,v.useState)(``),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(!1),c=async()=>{s(!0),a(null);let t=await hc(`/api/plan`,{script:e}).catch(()=>({error:`request failed`}));if(s(!1),t.error||!t.plan){a(t.error??`no plan produced`),r(null);return}r({plan:t.plan,text:t.text??``})},l=n?.plan.grade??``,u=l===`critical`||l===`high`;return(0,K.jsxs)(`section`,{className:`grid content-start gap-[18px]`,children:[(0,K.jsxs)(tb,{title:`Change plan — dry-run`,className:`reveal`,extra:(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`terraform-style preview · pure analysis, never touches a device`}),children:[(0,K.jsx)(Fx,{className:`min-h-40 resize-y font-mono text-xs leading-relaxed`,spellCheck:!1,placeholder:`Paste intended RouterOS commands, one per line, e.g.
78
78
  /ip firewall filter add chain=input action=drop in-interface=WAN
79
79
  /ip address add address=10.0.0.1/24 interface=ether1
80
- /ip address remove [find address=192.168.88.1/24]`,value:e,onChange:e=>t(e.target.value)}),(0,K.jsxs)(`div`,{className:`mt-2.5 flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(X,{type:`accent`,size:`sm`,icon:(0,K.jsx)(qc,{}),loading:o,onClick:()=>void c(),disabled:o||!e.trim(),children:o?`Planning…`:`Plan`}),i&&(0,K.jsx)(`span`,{className:`text-destructive text-xs`,children:i})]})]}),n&&(0,K.jsxs)(tb,{title:`Plan`,className:`reveal`,extra:(0,K.jsxs)(`span`,{className:Y(`rounded-full border px-2.5 py-1 font-mono text-[11px]`,u?`border-destructive/45 bg-destructive/10 text-destructive`:`border-success/45 bg-success/10 text-success`),children:[`risk `,n.plan.riskScore,` · `,l]}),children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-3 font-mono text-[11px] text-muted-foreground`,children:[(0,K.jsxs)(`span`,{children:[`+`,n.plan.counts.add,` to add`]}),(0,K.jsxs)(`span`,{children:[`~`,n.plan.counts.modify,` to modify`]}),(0,K.jsxs)(`span`,{children:[`-`,n.plan.counts.remove,` to remove`]}),n.plan.reordered&&(0,K.jsx)(`span`,{children:`· reordered into a safe sequence`})]}),n.plan.warnings.length>0&&(0,K.jsx)(`div`,{className:`my-2.5 grid gap-1`,children:n.plan.warnings.map((e,t)=>(0,K.jsxs)(`div`,{className:`flex items-center gap-1.5 text-warning text-xs`,children:[(0,K.jsx)(al,{className:`size-3.5 shrink-0`}),` `,e]},t))}),(0,K.jsx)(`div`,{className:`mt-3 flex flex-col gap-1.5`,children:n.plan.steps.map(e=>(0,K.jsxs)(`div`,{className:Y(`flex items-center gap-2.5 rounded-md border border-border border-l-[3px] bg-muted/40 px-3 py-2 font-mono text-xs`,Lx[e.risk]??`border-l-border`),children:[(0,K.jsx)(`span`,{className:`grid size-[18px] flex-none place-items-center rounded bg-brand/15 font-bold text-brand`,children:Ix[e.op]??`•`}),(0,K.jsx)(`code`,{className:`flex-1 [overflow-wrap:anywhere] text-foreground`,children:e.command}),e.lockoutRisk&&(0,K.jsx)(`span`,{className:`rounded-full border border-destructive/45 px-1.5 py-px text-[10px] text-destructive`,children:`⚠ lock-out`}),(0,K.jsx)(`span`,{className:`text-[10px] tracking-wide text-muted-foreground uppercase`,children:e.risk})]},e.index))})]})]})}var zx=`dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture`.split(`.`);function Bx(e){return typeof e==`string`?zx.includes(e):!1}var Vx=new Set(`aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle`.split(`.`));function Hx(e){return typeof e==`string`?Vx.has(e):!1}function Ux(e){return typeof e==`string`&&e.startsWith(`data-`)}function Wx(e){if(typeof e!=`object`||!e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Hx(n)||Ux(n))&&(t[n]=e[n]);return t}function Gx(e){if(e==null)return null;if((0,v.isValidElement)(e)&&typeof e.props==`object`&&e.props!==null){var t=e.props;return Wx(t)}return typeof e==`object`&&!Array.isArray(e)?Wx(e):null}function Kx(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Hx(n)||Ux(n)||Bx(n))&&(t[n]=e[n]);return t}function qx(e){return e==null?null:(0,v.isValidElement)(e)?Kx(e.props):typeof e==`object`&&!Array.isArray(e)?Kx(e):null}var Jx=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function Yx(){return Yx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yx.apply(null,arguments)}function Xx(e,t){if(e==null)return{};var n,r,i=Zx(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Zx(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Qx=(0,v.forwardRef)((e,t)=>{var n=e.children,r=e.width,i=e.height,a=e.viewBox,o=e.className,s=e.style,c=e.title,l=e.desc,u=Xx(e,Jx),d=a||{width:r,height:i,x:0,y:0},f=dv(`recharts-surface`,o);return v.createElement(`svg`,Yx({},Kx(u),{className:f,width:r,height:i,style:s,viewBox:`${d.x} ${d.y} ${d.width} ${d.height}`,ref:t}),v.createElement(`title`,null,c),v.createElement(`desc`,null,l),n)}),$x=[`children`,`className`];function eS(){return eS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},eS.apply(null,arguments)}function tS(e,t){if(e==null)return{};var n,r,i=nS(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function nS(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var rS=v.forwardRef((e,t)=>{var n=e.children,r=e.className,i=tS(e,$x),a=dv(`recharts-layer`,r);return v.createElement(`g`,eS({className:a},Kx(i),{ref:t}),n)}),iS=(0,v.createContext)(null);function aS(e){return function(){return e}}var oS=Math.PI,sS=2*oS,cS=1e-6,lS=sS-cS;function uS(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function dS(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return uS;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var fS=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?uS:dS(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>cS)if(!(Math.abs(u*s-c*l)>cS)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((oS-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>cS&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>cS||Math.abs(this._y1-l)>cS)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%sS+sS),d>lS?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>cS&&this._append`A${n},${n},0,${+(d>=oS)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function pS(){return new fS}pS.prototype=fS.prototype;function mS(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new fS(t)}Array.prototype.slice;function hS(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function gS(e){this._context=e}gS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function _S(e){return new gS(e)}function vS(e){return e[0]}function yS(e){return e[1]}function bS(e,t){var n=aS(!0),r=null,i=_S,a=null,o=mS(s);e=typeof e==`function`?e:e===void 0?vS:aS(e),t=typeof t==`function`?t:t===void 0?yS:aS(t);function s(s){var c,l=(s=hS(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:aS(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:aS(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:aS(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function xS(e,t,n){var r=null,i=aS(!0),a=null,o=_S,s=null,c=mS(l);e=typeof e==`function`?e:e===void 0?vS:aS(+e),t=typeof t==`function`?t:aS(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?yS:aS(+n);function l(l){var u,d,f,p=(l=hS(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h)if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return bS().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:aS(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:aS(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:aS(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:aS(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:aS(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:aS(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:aS(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var SS=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function CS(e){return new SS(e,!0)}function wS(e){return new SS(e,!1)}function TS(){}function ES(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function DS(e){this._context=e}DS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ES(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ES(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function OS(e){return new DS(e)}function kS(e){this._context=e}kS.prototype={areaStart:TS,areaEnd:TS,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:ES(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function AS(e){return new kS(e)}function jS(e){this._context=e}jS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:ES(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function MS(e){return new jS(e)}function NS(e){this._context=e}NS.prototype={areaStart:TS,areaEnd:TS,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function PS(e){return new NS(e)}function FS(e){return e<0?-1:1}function IS(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(FS(a)+FS(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function LS(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function RS(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function zS(e){this._context=e}zS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:RS(this,this._t0,LS(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,RS(this,LS(this,n=IS(this,e,t)),n);break;default:RS(this,this._t0,n=IS(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function BS(e){this._context=new VS(e)}(BS.prototype=Object.create(zS.prototype)).point=function(e,t){zS.prototype.point.call(this,t,e)};function VS(e){this._context=e}VS.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function HS(e){return new zS(e)}function US(e){return new BS(e)}function WS(e){this._context=e}WS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=GS(e),i=GS(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function GS(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function KS(e){return new WS(e)}function qS(e,t){this._context=e,this._t=t}qS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function JS(e){return new qS(e,.5)}function YS(e){return new qS(e,0)}function XS(e){return new qS(e,1)}function ZS(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function QS(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function $S(e,t){return e[t]}function eC(e){let t=[];return t.key=e,t}function tC(){var e=aS([]),t=QS,n=ZS,r=$S;function i(i){var a=Array.from(e.apply(this,arguments),eC),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=hS(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:aS(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:aS(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?QS:typeof e==`function`?e:aS(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??ZS,i):n},i}function nC(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}ZS(e,t)}}function rC(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}ZS(e,t)}}function iC(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=(d-(u[r-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]],h=m[r][1]||0,g=m[r-1][1]||0;f+=h-g}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,ZS(e,t)}}function aC(e){return e===`__proto__`}function oC(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e.includes(`.`)||e.includes(`[`)||e.includes(`]`)}}function sC(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function cC(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(cC).join(`,`);let t=String(e);return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function lC(e){if(Array.isArray(e))return e.map(sC);if(typeof e==`symbol`)return[e];e=cC(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1;for(e.charCodeAt(0)===46&&t.push(``);r<n;){let s=e[r];if(a)s===`\\`&&r+1<n?(r++,i+=e[r]):s===a?a=``:i+=s;else if(o)s===`"`||s===`'`?a=s:s===`]`?(o=!1,t.push(i),i=``):i+=s;else if(s===`[`)o=!0,i&&=(t.push(i),``);else if(s===`.`){i&&=(t.push(i),``);let n=e[r+1];(n===void 0||n===`.`)&&t.push(``)}else i+=s;r++}return i&&t.push(i),t}function uC(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(aC(t))return n;let r=e[t];return r===void 0?oC(t)?uC(e,lC(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=sC(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return dC(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),aC(t))return n;let r=e[t];return r===void 0?n:r}}}function dC(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||aC(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}var fC=4;function pC(e){var t=10**(arguments.length>1&&arguments[1]!==void 0?arguments[1]:fC),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function mC(e){var t=[...arguments].slice(1);return e.reduce((e,n,r)=>{var i=t[r-1];return typeof i==`string`?e+i+n:i===void 0?e+n:e+pC(i)+n},``)}var hC=e=>e===0?0:e>0?1:-1,gC=e=>typeof e==`number`&&e!=+e,_C=e=>typeof e==`string`&&e.length>1&&e.indexOf(`%`)===e.length-1,Z=e=>(typeof e==`number`||e instanceof Number)&&!gC(e),vC=e=>Z(e)||typeof e==`string`,yC=0,bC=e=>{var t=++yC;return`${e||``}${t}`},xC=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Z(e)&&typeof e!=`string`)return n;var i;if(_C(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return gC(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},SC=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function CC(e,t,n){return Z(e)&&Z(t)?pC(e+n*(t-e)):t}function wC(e,t,n){if(!(!e||!e.length))return e.find(e=>e&&(typeof t==`function`?t(e):uC(e,t))===n)}var TC=e=>e==null,EC=e=>TC(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function DC(e){return e!=null}function OC(){}var kC=e=>`radius`in e&&`startAngle`in e&&`endAngle`in e,AC=(e,t)=>{if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if((0,v.isValidElement)(e)&&(n=e.props),typeof n!=`object`&&typeof n!=`function`)return null;var r={};return Object.keys(n).forEach(e=>{Bx(e)&&typeof n[e]==`function`&&(r[e]=t||(t=>n[e](n,t)))}),r},jC=(e,t,n)=>r=>(e(t,n,r),null),MC=(e,t,n)=>{if(e===null||typeof e!=`object`&&typeof e!=`function`)return null;var r=null;return Object.keys(e).forEach(i=>{var a=e[i];Bx(i)&&typeof a==`function`&&(r||={},r[i]=jC(a,t,n))}),r};function NC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function PC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?NC(Object(n),!0).forEach(function(t){FC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function FC(e,t,n){return(t=IC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IC(e){var t=LC(e,`string`);return typeof t==`symbol`?t:t+``}function LC(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function RC(e,t){var n=PC({},e),r=t;return Object.keys(t).reduce((e,t)=>(e[t]===void 0&&r[t]!==void 0&&(e[t]=r[t]),e),n)}function zC(e,t){let n=new Map;for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);n.has(a)||n.set(a,i)}return Array.from(n.values())}function BC(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}function VC(e){return e}function HC(e){return function(t){return uC(t,e)}}function UC(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function WC(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function GC(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function KC(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var qC=`[object RegExp]`,JC=`[object String]`,YC=`[object Number]`,XC=`[object Boolean]`,ZC=`[object Arguments]`,QC=`[object Symbol]`,$C=`[object Date]`,ew=`[object Map]`,tw=`[object Set]`,nw=`[object Array]`,rw=`[object ArrayBuffer]`,iw=`[object Object]`,aw=`[object DataView]`,ow=`[object Uint8Array]`,sw=`[object Uint8ClampedArray]`,cw=`[object Uint16Array]`,lw=`[object Uint32Array]`,uw=`[object Int8Array]`,dw=`[object Int16Array]`,fw=`[object Int32Array]`,pw=`[object Float32Array]`,mw=`[object Float64Array]`,hw=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function gw(e){return hw.Buffer!==void 0&&hw.Buffer.isBuffer(e)}function _w(e,t){return vw(e,void 0,e,new Map,t)}function vw(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(UC(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=vw(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,vw(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(vw(a,void 0,n,r,i));return t}if(gw(e))return e.subarray();if(WC(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=vw(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),yw(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),yw(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),yw(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,yw(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),yw(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),yw(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),yw(t,e,n,r,i),t}if(typeof e==`object`&&bw(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),yw(t,e,n,r,i),t}return e}function yw(e,t,n=e,r,i){let a=[...Object.keys(t),...GC(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=vw(t[s],s,n,r,i))}}function bw(e){switch(KC(e)){case ZC:case nw:case rw:case aw:case XC:case $C:case pw:case mw:case uw:case dw:case fw:case ew:case YC:case iw:case qC:case tw:case JC:case QC:case ow:case sw:case cw:case lw:return!0;default:return!1}}function xw(e){return vw(e,void 0,e,new Map,void 0)}function Sw(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function Cw(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function ww(e,t,n){return typeof n==`function`?Tw(e,t,function e(t,r,i,a,o,s){let c=n(t,r,i,a,o,s);return c===void 0?Tw(t,r,e,s,!1):!!c},new Map,!0):ww(e,t,()=>void 0)}function Tw(e,t,n,r,i=!1){if(t===e)return!0;switch(typeof t){case`object`:return Ew(e,t,n,r);case`function`:return Object.keys(t).length>0?Tw(e,{...t},n,r,i):Sw(e,t);default:return Cw(e)&&i?typeof t==`string`?t===``:!0:Sw(e,t)}}function Ew(e,t,n,r){if(t==null)return!0;if(Array.isArray(t))return Ow(e,t,n,r);if(t instanceof Map)return Dw(e,t,n,r);if(t instanceof Set)return kw(e,t,n,r);let i=Object.keys(t);if(e==null||UC(e))return i.length===0;if(i.length===0)return!0;if(r?.has(t))return r.get(t)===e;r?.set(t,e);try{for(let a=0;a<i.length;a++){let o=i[a];if(!UC(e)&&!(o in e)||t[o]===void 0&&e[o]!==void 0||t[o]===null&&e[o]!==null||!n(e[o],t[o],o,e,t,r))return!1}return!0}finally{r?.delete(t)}}function Dw(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[i,a]of t.entries())if(n(e.get(i),a,i,e,t,r)===!1)return!1;return!0}function Ow(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let a=0;a<t.length;a++){let o=t[a],s=!1;for(let c=0;c<e.length;c++){if(i.has(c))continue;let l=e[c],u=!1;if(n(l,o,a,e,t,r)&&(u=!0),u){i.add(c),s=!0;break}}if(!s)return!1}return!0}function kw(e,t,n,r){return t.size===0?!0:e instanceof Set?Ow([...e],[...t],n,r):!1}function Aw(e,t){return ww(e,t,()=>void 0)}function jw(e){return e=xw(e),t=>Aw(t,e)}function Mw(e,t){return _w(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(KC(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),yw(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case YC:case JC:case XC:{let t=new e.constructor(e?.valueOf());return yw(t,e),t}case ZC:{let t={};return yw(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function Nw(e){return Mw(e)}var Pw=/^(?:0|[1-9]\d*)$/;function Fw(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<t;case`symbol`:return!1;case`string`:return Pw.test(e)}}function Iw(e){return typeof e==`object`&&!!e&&KC(e)===`[object Arguments]`}function Lw(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&oC(t)&&e?.[t]==null?lC(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=n[e];if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||Iw(r))&&Fw(t)&&t<r.length))return!1;r=r[t]}return!0}function Rw(e,t){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=sC(e);break}return t=Nw(t),function(n){let r=uC(n,e);return r===void 0?Lw(n,e):t===void 0?r===void 0:Aw(r,t)}}function zw(e){if(e==null)return VC;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?Rw(e[0],e[1]):jw(e);case`string`:case`symbol`:case`number`:return HC(e)}}function Bw(e){return Number.isSafeInteger(e)&&e>=0}function Vw(e){return e!=null&&typeof e!=`function`&&Bw(e.length)}function Hw(e){return typeof e==`object`&&!!e}function Uw(e){return Hw(e)&&Vw(e)}function Ww(e,t=VC){return Uw(e)?zC(Array.from(e),BC(zw(t),1)):[]}function Gw(e,t,n){return t===!0?Ww(e,n):typeof t==`function`?Ww(e,t):e}var Kw=o((e=>{var t=d();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),qw=o(((e,t)=>{t.exports=Kw()})),Jw=o((e=>{var t=d(),n=qw();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Yw=o(((e,t)=>{t.exports=Jw()})),Xw=(0,v.createContext)(null),Zw=Yw(),Qw=e=>e,$w=()=>{var e=(0,v.useContext)(Xw);return e?e.store.dispatch:Qw},eT=()=>{},tT=()=>eT,nT=(e,t)=>e===t;function Q(e){var t=(0,v.useContext)(Xw),n=(0,v.useMemo)(()=>t?t=>{if(t!=null)return e(t)}:eT,[t,e]);return(0,Zw.useSyncExternalStoreWithSelector)(t?t.subscription.addNestedSub:tT,t?t.store.getState:eT,t?t.store.getState:eT,n,nT)}function rT(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function iT(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var aT=e=>Array.isArray(e)?e:[e];function oT(e){let t=Array.isArray(e[0])?e[0]:e;return iT(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function sT(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var cT=class{constructor(e){this.value=e}deref(){return this.value}},lT=typeof WeakRef>`u`?cT:WeakRef,uT=0,dT=1;function fT(){return{s:uT,v:void 0,o:null,p:null}}function pT(e){return e instanceof lT?e.deref():e}function mT(e,t={}){let n=fT(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=fT(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=fT(),e.set(n,t)):t=r}}let s=t,c;if(t.s===dT)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=pT(i);e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new lT(c):c}return s.s=dT,s.v=c,c}return o.clearCache=()=>{n=fT(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function hT(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),rT(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=mT,argsMemoizeOptions:u=[]}={...n,...a},d=aT(c),f=aT(u),p=oT(e),m=s(function(){return t++,o.apply(null,arguments)},...d),h=l(function(){r++;let e=sT(p,arguments);return i=m.apply(null,e),i},...f);return Object.assign(h,{resultFunc:o,memoizedResultFunc:m,dependencies:p,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var $=hT(mT);function gT(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];Array.isArray(o)&&t<r?i(o,t+1):n.push(o)}};return i(e,0),n}function _T(e,t,n){return Cw(n)&&(typeof t==`number`&&Vw(n)&&Fw(t)&&t<n.length||typeof t==`string`&&t in n)?Sw(n[t],e):!1}function vT(e){return typeof e==`symbol`?1:e===null?2:e===void 0?3:e===e?0:4}var yT=(e,t,n)=>{if(e!==t){let r=vT(e),i=vT(t);if(r===i&&r===0){if(e<t)return n===`desc`?1:-1;if(e>t)return n===`desc`?-1:1}return n===`desc`?i-r:r-i}return 0};function bT(e){return typeof e==`symbol`||e instanceof Symbol}var xT=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ST=/^\w*$/;function CT(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||bT(e)?!0:typeof e==`string`&&(ST.test(e)||!xT.test(e))||t!=null&&Object.hasOwn(t,e)}function wT(e,t,n,r){if(e==null)return[];n=r?void 0:n,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(n)||(n=n==null?[]:[n]),n=n.map(e=>String(e));let i=(e,t)=>{let n=e;for(let e=0;e<t.length&&n!=null;++e)n=n[t[e]];return n},a=(e,t)=>t==null||e==null?t:typeof e==`object`&&`key`in e?Object.hasOwn(t,e.key)?t[e.key]:i(t,e.path):typeof e==`function`?e(t):Array.isArray(e)?i(t,e):typeof t==`object`?t[e]:t,o=t.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||CT(e)?e:{key:e,path:lC(e)}));return e.map(e=>({original:e,criteria:o.map(t=>a(t,e))})).slice().sort((e,t)=>{for(let r=0;r<o.length;r++){let i=yT(e.criteria[r],t.criteria[r],n[r]);if(i!==0)return i}return 0}).map(e=>e.original)}function TT(e,...t){let n=t.length;return n>1&&_T(e,t[0],t[1])?t=[]:n>2&&_T(t[0],t[1],t[2])&&(t=[t[0]]),wT(e,gT(t),[`asc`])}var ET=e=>e.legend.settings,see=e=>e.legend.size;$([e=>e.legend.payload,ET],(e,t)=>{var n=t.itemSorter,r=e.flat(1);return n?TT(r,n):r});function cee(e,t){return OT(e)||dee(e,t)||uee(e,t)||lee()}function lee(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
81
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uee(e,t){if(e){if(typeof e==`string`)return DT(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?DT(e,t):void 0}}function DT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function dee(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function OT(e){if(Array.isArray(e))return e}var kT=1;function AT(e,t){return Math.abs(e.height-t.height)>kT||Math.abs(e.left-t.left)>kT||Math.abs(e.top-t.top)>kT||Math.abs(e.width-t.width)>kT}function jT(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function MT(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=cee((0,v.useState)({height:0,left:0,top:0,width:0}),2),n=t[0],r=t[1],i=(0,v.useRef)(null),a=(0,v.useRef)(n);a.current=n;var o=(0,v.useCallback)(e=>{if(i.current!=null&&(i.current.disconnect(),i.current=null),e!=null){var t=jT(e);if(AT(t,a.current)&&r(t),typeof ResizeObserver<`u`){var n=new ResizeObserver(()=>{var t=jT(e);AT(t,a.current)&&r(t)});n.observe(e),i.current=n}}},[...e]);return(0,v.useEffect)(()=>()=>{var e;(e=i.current)==null||e.disconnect()},[]),[n,o]}function NT(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var PT=typeof Symbol==`function`&&Symbol.observable||`@@observable`,FT=()=>Math.random().toString(36).substring(7).split(``).join(`.`),IT={INIT:`@@redux/INIT${FT()}`,REPLACE:`@@redux/REPLACE${FT()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${FT()}`};function LT(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function RT(e,t,n){if(typeof e!=`function`)throw Error(NT(2));if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(NT(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(NT(1));return n(RT)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,c=!1;function l(){o===a&&(o=new Map,a.forEach((e,t)=>{o.set(t,e)}))}function u(){if(c)throw Error(NT(3));return i}function d(e){if(typeof e!=`function`)throw Error(NT(4));if(c)throw Error(NT(5));let t=!0;l();let n=s++;return o.set(n,e),function(){if(t){if(c)throw Error(NT(6));t=!1,l(),o.delete(n),a=null}}}function f(e){if(!LT(e))throw Error(NT(7));if(e.type===void 0)throw Error(NT(8));if(typeof e.type!=`string`)throw Error(NT(17));if(c)throw Error(NT(9));try{c=!0,i=r(i,e)}finally{c=!1}return(a=o).forEach(e=>{e()}),e}function p(e){if(typeof e!=`function`)throw Error(NT(10));r=e,f({type:IT.REPLACE})}function m(){let e=d;return{subscribe(t){if(typeof t!=`object`||!t)throw Error(NT(11));function n(){let e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[PT](){return this}}}return f({type:IT.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[PT]:m}}function zT(e){Object.keys(e).forEach(t=>{let n=e[t];if(n(void 0,{type:IT.INIT})===void 0)throw Error(NT(12));if(n(void 0,{type:IT.PROBE_UNKNOWN_ACTION()})===void 0)throw Error(NT(13))})}function BT(e){let t=Object.keys(e),n={};for(let r=0;r<t.length;r++){let i=t[r];typeof e[i]==`function`&&(n[i]=e[i])}let r=Object.keys(n),i;try{zT(n)}catch(e){i=e}return function(e={},t){if(i)throw i;let a=!1,o={};for(let i=0;i<r.length;i++){let s=r[i],c=n[s],l=e[s],u=c(l,t);if(u===void 0)throw t&&t.type,Error(NT(14));o[s]=u,a||=u!==l}return a||=r.length!==Object.keys(e).length,a?o:e}}function VT(...e){return e.length===0?e=>e:e.length===1?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function HT(...e){return t=>(n,r)=>{let i=t(n,r),a=()=>{throw Error(NT(15))},o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)};return a=VT(...e.map(e=>e(o)))(i.dispatch),{...i,dispatch:a}}}function UT(e){return LT(e)&&`type`in e&&typeof e.type==`string`}var WT=Symbol.for(`immer-nothing`),GT=Symbol.for(`immer-draftable`),KT=Symbol.for(`immer-state`);function qT(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var JT=Object,YT=JT.getPrototypeOf,XT=`constructor`,ZT=`prototype`,QT=`configurable`,$T=`enumerable`,eE=`writable`,tE=`value`,nE=e=>!!e&&!!e[KT];function rE(e){return e?oE(e)||pE(e)||!!e[GT]||!!e[XT]?.[GT]||mE(e)||hE(e):!1}var iE=JT[ZT][XT].toString(),aE=new WeakMap;function oE(e){if(!e||!gE(e))return!1;let t=YT(e);if(t===null||t===JT[ZT])return!0;let n=JT.hasOwnProperty.call(t,XT)&&t[XT];if(n===Object)return!0;if(!_E(n))return!1;let r=aE.get(n);return r===void 0&&(r=Function.toString.call(n),aE.set(n,r)),r===iE}function sE(e,t,n=!0){cE(e)===0?(n?Reflect.ownKeys(e):JT.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function cE(e){let t=e[KT];return t?t.type_:pE(e)?1:mE(e)?2:hE(e)?3:0}var lE=(e,t,n=cE(e))=>n===2?e.has(t):JT[ZT].hasOwnProperty.call(e,t),uE=(e,t,n=cE(e))=>n===2?e.get(t):e[t],dE=(e,t,n,r=cE(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function fE(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var pE=Array.isArray,mE=e=>e instanceof Map,hE=e=>e instanceof Set,gE=e=>typeof e==`object`,_E=e=>typeof e==`function`,vE=e=>typeof e==`boolean`;function yE(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var bE=e=>e.copy_||e.base_,xE=e=>e.modified_?e.copy_:e.base_;function SE(e,t){if(mE(e))return new Map(e);if(hE(e))return new Set(e);if(pE(e))return Array[ZT].slice.call(e);let n=oE(e);if(t===!0||t===`class_only`&&!n){let t=JT.getOwnPropertyDescriptors(e);delete t[KT];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[eE]===!1&&(a[eE]=!0,a[QT]=!0),(a.get||a.set)&&(t[i]={[QT]:!0,[eE]:!0,[$T]:a[$T],[tE]:e[i]})}return JT.create(YT(e),t)}else{let t=YT(e);if(t!==null&&n)return{...e};let r=JT.create(t);return JT.assign(r,e)}}function CE(e,t=!1){return EE(e)||nE(e)||!rE(e)?e:(cE(e)>1&&JT.defineProperties(e,{set:TE,add:TE,clear:TE,delete:TE}),JT.freeze(e),t&&sE(e,(e,t)=>{CE(t,!0)},!1),e)}function wE(){qT(2)}var TE={[tE]:wE};function EE(e){return e===null||!gE(e)?!0:JT.isFrozen(e)}var DE=`MapSet`,OE=`Patches`,kE=`ArrayMethods`,AE={};function jE(e){let t=AE[e];return t||qT(0,e),t}var ME=e=>!!AE[e],NE,PE=()=>NE,FE=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:ME(DE)?jE(DE):void 0,arrayMethodsPlugin_:ME(kE)?jE(kE):void 0});function IE(e,t){t&&(e.patchPlugin_=jE(OE),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function LE(e){RE(e),e.drafts_.forEach(BE),e.drafts_=null}function RE(e){e===NE&&(NE=e.parent_)}var zE=e=>NE=FE(NE,e);function BE(e){let t=e[KT];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function VE(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[KT].modified_&&(LE(t),qT(4)),rE(e)&&(e=HE(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[KT].base_,e,t)}else e=HE(t,n);return UE(t,e,!0),LE(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===WT?void 0:e}function HE(e,t){if(EE(t))return t;let n=t[KT];if(!n)return ZE(t,e.handledSet_,e);if(!GE(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);YE(n,e)}return n.copy_}function UE(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&CE(t,n)}function WE(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var GE=(e,t)=>e.scope_===t,KE=[];function qE(e,t,n,r){let i=bE(e),a=e.type_;if(r!==void 0&&uE(i,r,a)===t){dE(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;sE(i,(e,n)=>{if(nE(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??KE;for(let e of o)dE(i,e,n,a)}function JE(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!GE(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=xE(i);qE(e,i.draft_??i,a,n),YE(i,r)})}function YE(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}WE(e)}}function XE(e,t,n){let{scope_:r}=e;if(nE(n)){let i=n[KT];GE(i,r)&&i.callbacks_.push(function(){aD(e),qE(e,n,xE(i),t)})}else rE(n)&&e.callbacks_.push(function(){let i=bE(e);e.type_===3?i.has(n)&&ZE(n,r.handledSet_,r):uE(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&ZE(uE(e.copy_,t,e.type_),r.handledSet_,r)})}function ZE(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||nE(e)||t.has(e)||!rE(e)||EE(e)?e:(t.add(e),sE(e,(r,i)=>{if(nE(i)){let t=i[KT];GE(t,n)&&(dE(e,r,xE(t),e.type_),WE(t))}else rE(i)&&ZE(i,t,n)}),e)}function QE(e,t){let n=pE(e),r={type_:+!!n,scope_:t?t.scope_:PE(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=$E;n&&(i=[r],a=eD);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var $E={get(e,t){if(t===KT)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=bE(e);if(!lE(i,t,e.type_))return nD(e,i,t);let a=i[t];if(e.finalized_||!rE(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&yE(t))return a;if(a===tD(e.base_,t)){aD(e);let n=e.type_===1?+t:t,r=sD(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in bE(e)},ownKeys(e){return Reflect.ownKeys(bE(e))},set(e,t,n){let r=rD(bE(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=tD(bE(e),t),i=r?.[KT];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(fE(n,r)&&(n!==void 0||lE(e.base_,t,e.type_)))return!0;aD(e),iD(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),XE(e,t,n),!0)},deleteProperty(e,t){return aD(e),tD(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),iD(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=bE(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[eE]:!0,[QT]:e.type_!==1||t!==`length`,[$T]:r[$T],[tE]:n[t]}},defineProperty(){qT(11)},getPrototypeOf(e){return YT(e.base_)},setPrototypeOf(){qT(12)}},eD={};for(let e in $E){let t=$E[e];eD[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}eD.deleteProperty=function(e,t){return eD.set.call(this,e,t,void 0)},eD.set=function(e,t,n){return $E.set.call(this,e[0],t,n,e[0])};function tD(e,t){let n=e[KT];return(n?bE(n):e)[t]}function nD(e,t,n){let r=rD(t,n);return r?tE in r?r[tE]:r.get?.call(e.draft_):void 0}function rD(e,t){if(!(t in e))return;let n=YT(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=YT(n)}}function iD(e){e.modified_||(e.modified_=!0,e.parent_&&iD(e.parent_))}function aD(e){e.copy_||=(e.assigned_=new Map,SE(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var oD=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(_E(e)&&!_E(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}_E(t)||qT(6),n!==void 0&&!_E(n)&&qT(7);let r;if(rE(e)){let i=zE(this),a=sD(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?LE(i):RE(i)}return IE(i,n),VE(r,i)}else if(!e||!gE(e)){if(r=t(e),r===void 0&&(r=e),r===WT&&(r=void 0),this.autoFreeze_&&CE(r,!0),n){let t=[],i=[];jE(OE).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}else qT(1,e)},this.produceWithPatches=(e,t)=>{if(_E(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},vE(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),vE(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),vE(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){rE(e)||qT(8),nE(e)&&(e=cD(e));let t=zE(this),n=sD(t,e,void 0);return n[KT].isManual_=!0,RE(t),n}finishDraft(e,t){let n=e&&e[KT];(!n||!n.isManual_)&&qT(9);let{scope_:r}=n;return IE(r,t),VE(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=jE(OE).applyPatches_;return nE(e)?r(e,t):this.produce(e,e=>r(e,t))}};function sD(e,t,n,r){let[i,a]=mE(t)?jE(DE).proxyMap_(t,n):hE(t)?jE(DE).proxySet_(t,n):QE(t,n);return(n?.scope_??PE()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?JE(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function cD(e){return nE(e)||qT(10,e),lD(e)}function lD(e){if(!rE(e)||EE(e))return e;let t=e[KT],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=SE(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=SE(e,!0);return sE(n,(e,t)=>{dE(n,e,lD(t))},r),t&&(t.finalized_=!1),n}var uD=new oD().produce;function dD(e){return({dispatch:t,getState:n})=>r=>i=>typeof i==`function`?i(t,n,e):r(i)}var fD=dD(),pD=dD,mD=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]==`object`?VT:VT.apply(null,arguments)};typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function hD(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw Error(wO(0));return{type:e,payload:r.payload,...`meta`in r&&{meta:r.meta},...`error`in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>UT(t)&&t.type===e,n}var gD=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function _D(e){return rE(e)?uD(e,()=>{}):e}function vD(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function yD(e){return typeof e==`boolean`}var bD=()=>function(e){let{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{},a=new gD;return t&&(yD(t)?a.push(fD):a.push(pD(t.extraArgument))),a},xD=`RTK_autoBatch`,SD=()=>e=>({payload:e,meta:{[xD]:!0}}),CD=e=>t=>{setTimeout(t,e)},wD=(e,t)=>n=>{let r=!1,i=()=>{r||(r=!0,cancelAnimationFrame(a),clearTimeout(o),n())},a=e(i),o=setTimeout(i,t)},TD=(e={type:`raf`})=>t=>(...n)=>{let r=t(...n),i=!0,a=!1,o=!1,s=new Set,c=e.type===`tick`?queueMicrotask:e.type===`raf`?typeof window<`u`&&window.requestAnimationFrame?wD(window.requestAnimationFrame,100):CD(10):e.type===`callback`?e.queueNotification:CD(e.timeout),l=()=>{o=!1,a&&(a=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){let t=r.subscribe(()=>i&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return i=!e?.meta?.[xD],a=!i,a&&(o||(o=!0,c(l))),r.dispatch(e)}finally{i=!0}}})},ED=e=>function(t){let{autoBatch:n=!0}=t??{},r=new gD(e);return n&&r.push(TD(typeof n==`object`?n:void 0)),r};function DD(e){let t=bD(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{},c;if(typeof n==`function`)c=n;else if(LT(n))c=BT(n);else throw Error(wO(1));let l;l=typeof r==`function`?r(t):t();let u=VT;i&&(u=mD({trace:!1,...typeof i==`object`&&i}));let d=ED(HT(...l)),f=typeof s==`function`?s(d):d(),p=u(...f);return RT(c,o,p)}function OD(e){let t={},n=[],r,i={addCase(e,n){let r=typeof e==`string`?e:e.type;if(!r)throw Error(wO(28));if(r in t)throw Error(wO(29));return t[r]=n,i},addAsyncThunk(e,r){return r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),i},addMatcher(e,t){return n.push({matcher:e,reducer:t}),i},addDefaultCase(e){return r=e,i}};return e(i),[t,n,r]}function kD(e){return typeof e==`function`}function AD(e,t){let[n,r,i]=OD(t),a;if(kD(e))a=()=>_D(e());else{let t=_D(e);a=()=>t}function o(e=a(),t){let o=[n[t.type],...r.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return o.filter(e=>!!e).length===0&&(o=[i]),o.reduce((e,n)=>{if(n)if(nE(e)){let r=n(e,t);return r===void 0?e:r}else if(rE(e))return uD(e,e=>n(e,t));else{let r=n(e,t);if(r===void 0){if(e===null)return e;throw Error(`A case reducer on a non-draftable value must not return undefined`)}return r}return e},e)}return o.getInitialState=a,o}var jD=`ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW`,MD=(e=21)=>{let t=``,n=e;for(;n--;)t+=jD[Math.random()*64|0];return t},ND=Symbol.for(`rtk-slice-createasyncthunk`);function PD(e,t){return`${e}/${t}`}function FD({creators:e}={}){let t=e?.asyncThunk?.[ND];return function(e){let{name:n,reducerPath:r=n}=e;if(!n)throw Error(wO(11));let i=(typeof e.reducers==`function`?e.reducers(RD()):e.reducers)||{},a=Object.keys(i),o={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){let n=typeof e==`string`?e:e.type;if(!n)throw Error(wO(12));if(n in o.sliceCaseReducersByType)throw Error(wO(13));return o.sliceCaseReducersByType[n]=t,s},addMatcher(e,t){return o.sliceMatchers.push({matcher:e,reducer:t}),s},exposeAction(e,t){return o.actionCreators[e]=t,s},exposeCaseReducer(e,t){return o.sliceCaseReducersByName[e]=t,s}};a.forEach(r=>{let a=i[r],o={reducerName:r,type:PD(n,r),createNotation:typeof e.reducers==`function`};BD(a)?HD(o,a,s,t):zD(o,a,s)});function c(){let[t={},n=[],r=void 0]=typeof e.extraReducers==`function`?OD(e.extraReducers):[e.extraReducers],i={...t,...o.sliceCaseReducersByType};return AD(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of o.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}let l=e=>e,u=new Map,d=new WeakMap,f;function p(e,t){return f||=c(),f(e,t)}function m(){return f||=c(),f.getInitialState()}function h(t,n=!1){function r(e){let i=e[t];return i===void 0&&n&&(i=vD(d,r,m)),i}function i(t=l){return vD(vD(u,n,()=>new WeakMap),t,()=>{let r={};for(let[i,a]of Object.entries(e.selectors??{}))r[i]=ID(a,t,()=>vD(d,t,m),n);return r})}return{reducerPath:t,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}let g={name:n,reducer:p,actions:o.actionCreators,caseReducers:o.sliceCaseReducersByName,getInitialState:m,...h(r),injectInto(e,{reducerPath:t,...n}={}){let i=t??r;return e.inject({reducerPath:i,reducer:p},n),{...g,...h(i,!0)}}};return g}}function ID(e,t,n,r){function i(i,...a){let o=t(i);return o===void 0&&r&&(o=n()),e(o,...a)}return i.unwrapped=e,i}var LD=FD();function RD(){function e(e,t){return{_reducerDefinitionType:`asyncThunk`,payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer(e){return Object.assign({[e.name](...t){return e(...t)}}[e.name],{_reducerDefinitionType:`reducer`})},preparedReducer(e,t){return{_reducerDefinitionType:`reducerWithPrepare`,prepare:e,reducer:t}},asyncThunk:e}}function zD({type:e,reducerName:t,createNotation:n},r,i){let a,o;if(`reducer`in r){if(n&&!VD(r))throw Error(wO(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?hD(e,o):hD(e))}function BD(e){return e._reducerDefinitionType===`asyncThunk`}function VD(e){return e._reducerDefinitionType===`reducerWithPrepare`}function HD({type:e,reducerName:t},n,r,i){if(!i)throw Error(wO(18));let{payloadCreator:a,fulfilled:o,pending:s,rejected:c,settled:l,options:u}=n,d=i(e,a,u);r.exposeAction(t,d),o&&r.addCase(d.fulfilled,o),s&&r.addCase(d.pending,s),c&&r.addCase(d.rejected,c),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:o||UD,pending:s||UD,rejected:c||UD,settled:l||UD})}function UD(){}var WD=`task`,GD=`listener`,KD=`completed`,qD=`cancelled`,JD=`task-${qD}`,YD=`task-${KD}`,XD=`${GD}-${qD}`,ZD=`${GD}-${KD}`,QD=class{constructor(e){this.code=e,this.message=`${WD} ${qD} (reason: ${e})`}code;name=`TaskAbortError`;message},$D=(e,t)=>{if(typeof e!=`function`)throw TypeError(wO(32))},eO=()=>{},tO=(e,t=eO)=>(e.catch(t),e),nO=(e,t)=>(e.addEventListener(`abort`,t,{once:!0}),()=>e.removeEventListener(`abort`,t)),rO=e=>{if(e.aborted)throw new QD(e.reason)};function iO(e,t){let n=eO;return new Promise((r,i)=>{let a=()=>i(new QD(e.reason));if(e.aborted){a();return}n=nO(e,a),t.finally(()=>n()).then(r,i)}).finally(()=>{n=eO})}var aO=async(e,t)=>{try{return await Promise.resolve(),{status:`ok`,value:await e()}}catch(e){return{status:e instanceof QD?`cancelled`:`rejected`,error:e}}finally{t?.()}},oO=e=>t=>tO(iO(e,t).then(t=>(rO(e),t))),sO=e=>{let t=oO(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:cO}=Object,lO={},uO=`listenerMiddleware`,dO=(e,t)=>{let n=t=>nO(e,()=>t.abort(e.reason));return(r,i)=>{$D(r,`taskExecutor`);let a=new AbortController;n(a);let o=aO(async()=>{rO(e),rO(a.signal);let t=await r({pause:oO(a.signal),delay:sO(a.signal),signal:a.signal});return rO(a.signal),t},()=>a.abort(YD));return i?.autoJoin&&t.push(o.catch(eO)),{result:oO(e)(o),cancel(){a.abort(JD)}}}},fO=(e,t)=>{let n=async(n,r)=>{rO(t);let i=()=>{},a=[new Promise((t,r)=>{let a=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});i=()=>{a(),r()}})];r!=null&&a.push(new Promise(e=>setTimeout(e,r,null)));try{let e=await iO(t,Promise.race(a));return rO(t),e}finally{i()}};return((e,t)=>tO(n(e,t)))},pO=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:a}=e;if(t)i=hD(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw Error(wO(21));return $D(a,`options.listener`),{predicate:i,type:t,effect:a}},mO=cO(e=>{let{type:t,predicate:n,effect:r}=pO(e);return{id:MD(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw Error(wO(22))}}},{withTypes:()=>mO}),hO=(e,t)=>{let{type:n,effect:r,predicate:i}=pO(t);return Array.from(e.values()).find(e=>(typeof n==`string`?e.type===n:e.predicate===i)&&e.effect===r)},gO=e=>{e.pending.forEach(e=>{e.abort(XD)})},_O=(e,t)=>()=>{for(let e of t.keys())gO(e);e.clear()},vO=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout(()=>{throw e},0)}},yO=cO(hD(`${uO}/add`),{withTypes:()=>yO}),bO=hD(`${uO}/removeAll`),xO=cO(hD(`${uO}/remove`),{withTypes:()=>xO}),SO=(...e)=>{console.error(`${uO}/error`,...e)},CO=(e={})=>{let t=new Map,n=new Map,r=e=>{let t=n.get(e)??0;n.set(e,t+1)},i=e=>{let t=n.get(e)??1;t===1?n.delete(e):n.set(e,t-1)},{extra:a,onError:o=SO}=e;$D(o,`onError`);let s=e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&gO(e)}),c=(e=>{let n=hO(t,e)??mO(e);return s(n)});cO(c,{withTypes:()=>c});let l=e=>{let n=hO(t,e);return n&&(n.unsubscribe(),e.cancelActive&&gO(n)),!!n};cO(l,{withTypes:()=>l});let u=async(e,n,s,l)=>{let u=new AbortController,d=fO(c,u.signal),f=[];try{e.pending.add(u),r(e),await Promise.resolve(e.effect(n,cO({},s,{getOriginalState:l,condition:(e,t)=>d(e,t).then(Boolean),take:d,delay:sO(u.signal),pause:oO(u.signal),extra:a,signal:u.signal,fork:dO(u.signal,f),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==u&&(e.abort(XD),n.delete(e))})},cancel:()=>{u.abort(XD),e.pending.delete(u)},throwIfCancelled:()=>{rO(u.signal)}})))}catch(e){e instanceof QD||vO(o,e,{raisedBy:`effect`})}finally{await Promise.all(f),u.abort(ZD),i(e),e.pending.delete(u)}},d=_O(t,n);return{middleware:e=>n=>r=>{if(!UT(r))return n(r);if(yO.match(r))return c(r.payload);if(bO.match(r)){d();return}if(xO.match(r))return l(r.payload);let i=e.getState(),a=()=>{if(i===lO)throw Error(wO(23));return i},s;try{if(s=n(r),t.size>0){let n=e.getState(),s=Array.from(t.values());for(let t of s){let s=!1;try{s=t.predicate(r,n,i)}catch(e){s=!1,vO(o,e,{raisedBy:`predicate`})}s&&u(t,r,e,a)}}}finally{i=lO}return s},startListening:c,stopListening:l,clearListeners:d}};function wO(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var TO=LD({name:`chartLayout`,initialState:{layoutType:`horizontal`,width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){e.margin.top=t.payload.top??0,e.margin.right=t.payload.right??0,e.margin.bottom=t.payload.bottom??0,e.margin.left=t.payload.left??0},setScale(e,t){e.scale=t.payload}}}),EO=TO.actions,DO=EO.setMargin,OO=EO.setLayout,kO=EO.setChartSize,AO=EO.setScale,jO=TO.reducer;function MO(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function NO(e){return Number.isFinite(e)}function PO(e){return typeof e==`number`&&e>0&&Number.isFinite(e)}function FO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function IO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?FO(Object(n),!0).forEach(function(t){LO(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function LO(e,t,n){return(t=RO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RO(e){var t=zO(e,`string`);return typeof t==`symbol`?t:t+``}function zO(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function BO(e,t,n){return TC(e)||TC(t)?n:vC(t)?uC(e,t,n):typeof t==`function`?t(e):n}var VO=(e,t,n)=>{if(t&&n){var r=n.width,i=n.height,a=t.align,o=t.verticalAlign,s=t.layout;if((s===`vertical`||s===`horizontal`&&o===`middle`)&&a!==`center`&&Z(e[a]))return IO(IO({},e),{},{[a]:e[a]+(r||0)});if((s===`horizontal`||s===`vertical`&&a===`center`)&&o!==`middle`&&Z(e[o]))return IO(IO({},e),{},{[o]:e[o]+(i||0)})}return e},HO=(e,t)=>e===`horizontal`&&t===`xAxis`||e===`vertical`&&t===`yAxis`||e===`centric`&&t===`angleAxis`||e===`radial`&&t===`radiusAxis`,UO=(e,t,n,r)=>{if(r)return e.map(e=>e.coordinate);var i,a,o=e.map(e=>(e.coordinate===t&&(i=!0),e.coordinate===n&&(a=!0),e.coordinate));return i||o.push(t),a||o.push(n),o},WO=(e,t,n)=>{if(!e)return null;var r=e.duplicateDomain,i=e.type,a=e.range,o=e.scale,s=e.realScaleType,c=e.isCategorical,l=e.categoricalDomain,u=e.tickCount,d=e.ticks,f=e.niceTicks,p=e.axisType;if(!o)return null;var m=s===`scaleBand`&&o.bandwidth?o.bandwidth()/2:2,h=(t||n)&&i===`category`&&o.bandwidth?o.bandwidth()/m:0;return h=p===`angleAxis`&&a&&a.length>=2?hC(a[0]-a[1])*2*h:h,t&&(d||f)?(d||f||[]).map((e,t)=>{var n=r?r.indexOf(e):e,i=o.map(n);return NO(i)?{coordinate:i+h,value:e,offset:h,index:t}:null}).filter(DC):c&&l?l.map((e,t)=>{var n=o.map(e);return NO(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(DC):o.ticks&&!n&&u!=null?o.ticks(u).map((e,t)=>{var n=o.map(e);return NO(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(DC):o.domain().map((e,t)=>{var n=o.map(e);return NO(n)?{coordinate:n+h,value:r?r[e]:e,index:t,offset:h}:null}).filter(DC)},GO=(e,t)=>{if(!t||t.length!==2||!Z(t[0])||!Z(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!Z(e[0])||e[0]<n)&&(i[0]=n),(!Z(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i},KO={sign:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0,o=0;o<t;++o){var s=e[o]?.[r];if(s!=null){var c=s[1],l=s[0],u=gC(c)?l:c;u>=0?(s[0]=i,i+=u,s[1]=i):(s[0]=a,a+=u,s[1]=a)}}}},expand:nC,none:ZS,silhouette:rC,wiggle:iC,positive:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0;a<t;++a){var o=e[a]?.[r];if(o!=null){var s=gC(o[1])?o[0]:o[1];s>=0?(o[0]=i,i+=s,o[1]=i):(o[0]=0,o[1]=0)}}}}},qO=(e,t,n)=>{var r=KO[n]??ZS,i=tC().keys(t).value((e,t)=>Number(BO(e,t,0))).order(QS).offset(r)(e);return i.forEach((n,r)=>{n.forEach((n,i)=>{var a=BO(e[i],t[r],0);Array.isArray(a)&&a.length===2&&Z(a[0])&&Z(a[1])&&(n[0]=a[0],n[1]=a[1])})}),i};function JO(e){return e==null?void 0:String(e)}function YO(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type===`category`){if(!t.allowDuplicatedCategory&&t.dataKey&&!TC(i[t.dataKey])){var s=wC(n,`value`,i[t.dataKey]);if(s)return s.coordinate+r/2}return n!=null&&n[a]?n[a].coordinate+r/2:null}var c=BO(i,TC(o)?t.dataKey:o),l=t.scale.map(c);return Z(l)?l:null}var XO=e=>{var t=e.axis,n=e.ticks,r=e.offset,i=e.bandSize,a=e.entry,o=e.index;if(t.type===`category`)return n[o]?n[o].coordinate+r:null;var s=BO(a,t.dataKey,t.scale.domain()[o]);if(TC(s))return null;var c=t.scale.map(s);return Z(c)?c-i/2+r:null},ZO=e=>{var t=e.numericAxis,n=t.scale.domain();if(t.type===`number`){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]},QO=e=>{var t=e.flat(2).filter(Z);return[Math.min(...t),Math.max(...t)]},$O=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],ek=(e,t,n)=>{if(!(e==null||Object.keys(e).length===0))return $O(Object.keys(e).reduce((r,i)=>{var a=e[i];if(!a)return r;var o=a.stackedData.reduce((e,r)=>{var i=QO(MO(r,t,n));return!NO(i[0])||!NO(i[1])?e:[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(o[0],r[0]),Math.max(o[1],r[1])]},[1/0,-1/0]))},tk=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,nk=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,rk=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=TT(t,e=>e.coordinate),a=1/0,o=1,s=i.length;o<s;o++){var c=i[o],l=i[o-1];a=Math.min((c?.coordinate||0)-(l?.coordinate||0),a)}return a===1/0?0:a}return n?void 0:0};function ik(e){var t=e.tooltipEntrySettings,n=e.dataKey,r=e.payload,i=e.value,a=e.name;return IO(IO({},t),{},{dataKey:n,payload:r,value:i,name:a})}function ak(e,t){if(e!=null)return String(e);if(typeof t==`string`)return t}var ok=(e,t)=>{if(t===`horizontal`)return e.relativeX;if(t===`vertical`)return e.relativeY},sk=(e,t)=>t===`centric`?e.angle:e.radius,ck=e=>e.layout.width,lk=e=>e.layout.height,uk=e=>e.layout.scale,dk=e=>e.layout.margin,fk=$(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),pk=$(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),mk=`data-recharts-item-index`,hk=`data-recharts-item-id`;function gk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _k(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?gk(Object(n),!0).forEach(function(t){vk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function vk(e,t,n){return(t=yk(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yk(e){var t=bk(e,`string`);return typeof t==`symbol`?t:t+``}function bk(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var xk=e=>e.brush.height;function Sk(e){return pk(e).reduce((e,t)=>t.orientation===`left`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function Ck(e){return pk(e).reduce((e,t)=>t.orientation===`right`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function wk(e){return fk(e).reduce((e,t)=>t.orientation===`top`&&!t.mirror&&!t.hide?e+t.height:e,0)}function Tk(e){return fk(e).reduce((e,t)=>t.orientation===`bottom`&&!t.mirror&&!t.hide?e+t.height:e,0)}var Ek=$([ck,lk,dk,xk,Sk,Ck,wk,Tk,ET,see],(e,t,n,r,i,a,o,s,c,l)=>{var u={left:(n.left||0)+i,right:(n.right||0)+a},d=_k(_k({},{top:(n.top||0)+o,bottom:(n.bottom||0)+s}),u),f=d.bottom;d.bottom+=r,d=VO(d,c,l);var p=e-d.left-d.right,m=t-d.top-d.bottom;return _k(_k({brushBottom:f},d),{},{width:Math.max(p,0),height:Math.max(m,0)})}),Dk=$(Ek,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),Ok=$(ck,lk,(e,t)=>({x:0,y:0,width:e,height:t})),kk=(0,v.createContext)(null),Ak=()=>(0,v.useContext)(kk)!=null,jk=e=>e.brush,Mk=$([jk,Ek,dk],(e,t,n)=>({height:e.height,x:Z(e.x)?e.x:t.left,y:Z(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:Z(e.width)?e.width:t.width}));function Nk(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}function Pk(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,c=null,l=Nk(function(...t){s=e.apply(this,t),c=null},t,{edges:o}),u=function(...t){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?(s=e.apply(this,t),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}function Fk(e,t=0,n={}){let{leading:r=!0,trailing:i=!0}=n;return Pk(e,t,{leading:r,maxWait:t,trailing:i})}var Ik=function(e,t){var n=[...arguments].slice(2);if(typeof console<`u`&&console.warn&&(t===void 0&&console.warn(`LogUtils requires an error message argument`),!e))if(t===void 0)console.warn(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var r=0;console.warn(t.replace(/%s/g,()=>n[r++]))}},Lk={width:`100%`,height:`100%`,debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},Rk=(e,t,n)=>{var r=n.width,i=r===void 0?Lk.width:r,a=n.height,o=a===void 0?Lk.height:a,s=n.aspect,c=n.maxHeight,l=_C(i)?e:Number(i),u=_C(o)?t:Number(o);return s&&s>0&&(l?u=l/s:u&&(l=u*s),c&&u!=null&&u>c&&(u=c)),{calculatedWidth:l,calculatedHeight:u}},zk={width:0,height:0,overflow:`visible`},Bk={width:0,overflowX:`visible`},Vk={height:0,overflowY:`visible`},Hk={},Uk=e=>{var t=e.width,n=e.height,r=_C(t),i=_C(n);return r&&i?zk:r?Bk:i?Vk:Hk};function Wk(e){var t=e.width,n=e.height,r=e.aspect,i=t,a=n;return i===void 0&&a===void 0?(i=Lk.width,a=Lk.height):i===void 0?i=r&&r>0?void 0:Lk.width:a===void 0&&(a=r&&r>0?void 0:Lk.height),{width:i,height:a}}var Gk=[`aspect`,`initialDimension`,`width`,`height`,`minWidth`,`minHeight`,`maxHeight`,`children`,`debounce`,`id`,`className`,`onResize`,`style`];function Kk(){return Kk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kk.apply(null,arguments)}function qk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Jk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?qk(Object(n),!0).forEach(function(t){Yk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Yk(e,t,n){return(t=Xk(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xk(e){var t=Zk(e,`string`);return typeof t==`symbol`?t:t+``}function Zk(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Qk(e,t){return rA(e)||nA(e,t)||eA(e,t)||$k()}function $k(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
82
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eA(e,t){if(e){if(typeof e==`string`)return tA(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tA(e,t):void 0}}function tA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function nA(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function rA(e){if(Array.isArray(e))return e}function iA(e,t){if(e==null)return{};var n,r,i=aA(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function aA(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var oA=(0,v.createContext)(Lk.initialDimension);function sA(e){return PO(e.width)&&PO(e.height)}function cA(e){var t=e.children,n=e.width,r=e.height,i=(0,v.useMemo)(()=>({width:n,height:r}),[n,r]);return sA(i)?v.createElement(oA.Provider,{value:i},t):null}var lA=()=>(0,v.useContext)(oA),uA=(0,v.forwardRef)((e,t)=>{var n=e.aspect,r=e.initialDimension,i=r===void 0?Lk.initialDimension:r,a=e.width,o=e.height,s=e.minWidth,c=s===void 0?Lk.minWidth:s,l=e.minHeight,u=e.maxHeight,d=e.children,f=e.debounce,p=f===void 0?Lk.debounce:f,m=e.id,h=e.className,g=e.onResize,_=e.style,y=_===void 0?{}:_,b=iA(e,Gk),x=(0,v.useRef)(null),S=(0,v.useRef)();S.current=g,(0,v.useImperativeHandle)(t,()=>x.current);var C=Qk((0,v.useState)({containerWidth:i.width,containerHeight:i.height}),2),w=C[0],T=C[1],E=(0,v.useCallback)((e,t)=>{T(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);(0,v.useEffect)(()=>{if(x.current==null||typeof ResizeObserver>`u`)return OC;var e=e=>{var t,n=e[0];if(n!=null){var r=n.contentRect,i=r.width,a=r.height;E(i,a),(t=S.current)==null||t.call(S,i,a)}};p>0&&(e=Fk(e,p,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=x.current.getBoundingClientRect(),r=n.width,i=n.height;return E(r,i),t.observe(x.current),()=>{t.disconnect()}},[E,p]);var D=w.containerWidth,O=w.containerHeight;Ik(!n||n>0,`The aspect(%s) must be greater than zero.`,n);var k=Rk(D,O,{width:a,height:o,aspect:n,maxHeight:u}),A=k.calculatedWidth,j=k.calculatedHeight;return Ik(D<0||O<0||A!=null&&A>0||j!=null&&j>0,`The width(%s) and height(%s) of chart should be greater than 0,
80
+ /ip address remove [find address=192.168.88.1/24]`,value:e,onChange:e=>t(e.target.value)}),(0,K.jsxs)(`div`,{className:`mt-2.5 flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(X,{type:`accent`,size:`sm`,icon:(0,K.jsx)(qc,{}),loading:o,onClick:()=>void c(),disabled:o||!e.trim(),children:o?`Planning…`:`Plan`}),i&&(0,K.jsx)(`span`,{className:`text-destructive text-xs`,children:i})]})]}),n&&(0,K.jsxs)(tb,{title:`Plan`,className:`reveal`,extra:(0,K.jsxs)(`span`,{className:Y(`rounded-full border px-2.5 py-1 font-mono text-[11px]`,u?`border-destructive/45 bg-destructive/10 text-destructive`:`border-success/45 bg-success/10 text-success`),children:[`risk `,n.plan.riskScore,` · `,l]}),children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-3 font-mono text-[11px] text-muted-foreground`,children:[(0,K.jsxs)(`span`,{children:[`+`,n.plan.counts.add,` to add`]}),(0,K.jsxs)(`span`,{children:[`~`,n.plan.counts.modify,` to modify`]}),(0,K.jsxs)(`span`,{children:[`-`,n.plan.counts.remove,` to remove`]}),n.plan.reordered&&(0,K.jsx)(`span`,{children:`· reordered into a safe sequence`})]}),n.plan.warnings.length>0&&(0,K.jsx)(`div`,{className:`my-2.5 grid gap-1`,children:n.plan.warnings.map((e,t)=>(0,K.jsxs)(`div`,{className:`flex items-center gap-1.5 text-warning text-xs`,children:[(0,K.jsx)(al,{className:`size-3.5 shrink-0`}),` `,e]},t))}),(0,K.jsx)(`div`,{className:`mt-3 flex flex-col gap-1.5`,children:n.plan.steps.map(e=>(0,K.jsxs)(`div`,{className:Y(`flex items-center gap-2.5 rounded-md border border-border border-l-[3px] bg-muted/40 px-3 py-2 font-mono text-xs`,Lx[e.risk]??`border-l-border`),children:[(0,K.jsx)(`span`,{className:`grid size-[18px] flex-none place-items-center rounded bg-brand/15 font-bold text-brand`,children:Ix[e.op]??`•`}),(0,K.jsx)(`code`,{className:`flex-1 [overflow-wrap:anywhere] text-foreground`,children:e.command}),e.lockoutRisk&&(0,K.jsx)(`span`,{className:`rounded-full border border-destructive/45 px-1.5 py-px text-[10px] text-destructive`,children:`⚠ lock-out`}),(0,K.jsx)(`span`,{className:`text-[10px] tracking-wide text-muted-foreground uppercase`,children:e.risk})]},e.index))})]})]})}var zx=`dangerouslySetInnerHTML.onCopy.onCopyCapture.onCut.onCutCapture.onPaste.onPasteCapture.onCompositionEnd.onCompositionEndCapture.onCompositionStart.onCompositionStartCapture.onCompositionUpdate.onCompositionUpdateCapture.onFocus.onFocusCapture.onBlur.onBlurCapture.onChange.onChangeCapture.onBeforeInput.onBeforeInputCapture.onInput.onInputCapture.onReset.onResetCapture.onSubmit.onSubmitCapture.onInvalid.onInvalidCapture.onLoad.onLoadCapture.onError.onErrorCapture.onKeyDown.onKeyDownCapture.onKeyPress.onKeyPressCapture.onKeyUp.onKeyUpCapture.onAbort.onAbortCapture.onCanPlay.onCanPlayCapture.onCanPlayThrough.onCanPlayThroughCapture.onDurationChange.onDurationChangeCapture.onEmptied.onEmptiedCapture.onEncrypted.onEncryptedCapture.onEnded.onEndedCapture.onLoadedData.onLoadedDataCapture.onLoadedMetadata.onLoadedMetadataCapture.onLoadStart.onLoadStartCapture.onPause.onPauseCapture.onPlay.onPlayCapture.onPlaying.onPlayingCapture.onProgress.onProgressCapture.onRateChange.onRateChangeCapture.onSeeked.onSeekedCapture.onSeeking.onSeekingCapture.onStalled.onStalledCapture.onSuspend.onSuspendCapture.onTimeUpdate.onTimeUpdateCapture.onVolumeChange.onVolumeChangeCapture.onWaiting.onWaitingCapture.onAuxClick.onAuxClickCapture.onClick.onClickCapture.onContextMenu.onContextMenuCapture.onDoubleClick.onDoubleClickCapture.onDrag.onDragCapture.onDragEnd.onDragEndCapture.onDragEnter.onDragEnterCapture.onDragExit.onDragExitCapture.onDragLeave.onDragLeaveCapture.onDragOver.onDragOverCapture.onDragStart.onDragStartCapture.onDrop.onDropCapture.onMouseDown.onMouseDownCapture.onMouseEnter.onMouseLeave.onMouseMove.onMouseMoveCapture.onMouseOut.onMouseOutCapture.onMouseOver.onMouseOverCapture.onMouseUp.onMouseUpCapture.onSelect.onSelectCapture.onTouchCancel.onTouchCancelCapture.onTouchEnd.onTouchEndCapture.onTouchMove.onTouchMoveCapture.onTouchStart.onTouchStartCapture.onPointerDown.onPointerDownCapture.onPointerMove.onPointerMoveCapture.onPointerUp.onPointerUpCapture.onPointerCancel.onPointerCancelCapture.onPointerEnter.onPointerEnterCapture.onPointerLeave.onPointerLeaveCapture.onPointerOver.onPointerOverCapture.onPointerOut.onPointerOutCapture.onGotPointerCapture.onGotPointerCaptureCapture.onLostPointerCapture.onLostPointerCaptureCapture.onScroll.onScrollCapture.onWheel.onWheelCapture.onAnimationStart.onAnimationStartCapture.onAnimationEnd.onAnimationEndCapture.onAnimationIteration.onAnimationIterationCapture.onTransitionEnd.onTransitionEndCapture`.split(`.`);function Bx(e){return typeof e==`string`?zx.includes(e):!1}var Vx=new Set(`aria-activedescendant.aria-atomic.aria-autocomplete.aria-busy.aria-checked.aria-colcount.aria-colindex.aria-colspan.aria-controls.aria-current.aria-describedby.aria-details.aria-disabled.aria-errormessage.aria-expanded.aria-flowto.aria-haspopup.aria-hidden.aria-invalid.aria-keyshortcuts.aria-label.aria-labelledby.aria-level.aria-live.aria-modal.aria-multiline.aria-multiselectable.aria-orientation.aria-owns.aria-placeholder.aria-posinset.aria-pressed.aria-readonly.aria-relevant.aria-required.aria-roledescription.aria-rowcount.aria-rowindex.aria-rowspan.aria-selected.aria-setsize.aria-sort.aria-valuemax.aria-valuemin.aria-valuenow.aria-valuetext.className.color.height.id.lang.max.media.method.min.name.style.target.width.role.tabIndex.accentHeight.accumulate.additive.alignmentBaseline.allowReorder.alphabetic.amplitude.arabicForm.ascent.attributeName.attributeType.autoReverse.azimuth.baseFrequency.baselineShift.baseProfile.bbox.begin.bias.by.calcMode.capHeight.clip.clipPath.clipPathUnits.clipRule.colorInterpolation.colorInterpolationFilters.colorProfile.colorRendering.contentScriptType.contentStyleType.cursor.cx.cy.d.decelerate.descent.diffuseConstant.direction.display.divisor.dominantBaseline.dur.dx.dy.edgeMode.elevation.enableBackground.end.exponent.externalResourcesRequired.fill.fillOpacity.fillRule.filter.filterRes.filterUnits.floodColor.floodOpacity.focusable.fontFamily.fontSize.fontSizeAdjust.fontStretch.fontStyle.fontVariant.fontWeight.format.from.fx.fy.g1.g2.glyphName.glyphOrientationHorizontal.glyphOrientationVertical.glyphRef.gradientTransform.gradientUnits.hanging.horizAdvX.horizOriginX.href.ideographic.imageRendering.in2.in.intercept.k1.k2.k3.k4.k.kernelMatrix.kernelUnitLength.kerning.keyPoints.keySplines.keyTimes.lengthAdjust.letterSpacing.lightingColor.limitingConeAngle.local.markerEnd.markerHeight.markerMid.markerStart.markerUnits.markerWidth.mask.maskContentUnits.maskUnits.mathematical.mode.numOctaves.offset.opacity.operator.order.orient.orientation.origin.overflow.overlinePosition.overlineThickness.paintOrder.panose1.pathLength.patternContentUnits.patternTransform.patternUnits.pointerEvents.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.r.radius.refX.refY.renderingIntent.repeatCount.repeatDur.requiredExtensions.requiredFeatures.restart.result.rotate.rx.ry.seed.shapeRendering.slope.spacing.specularConstant.specularExponent.speed.spreadMethod.startOffset.stdDeviation.stemh.stemv.stitchTiles.stopColor.stopOpacity.strikethroughPosition.strikethroughThickness.string.stroke.strokeDasharray.strokeDashoffset.strokeLinecap.strokeLinejoin.strokeMiterlimit.strokeOpacity.strokeWidth.surfaceScale.systemLanguage.tableValues.targetX.targetY.textAnchor.textDecoration.textLength.textRendering.to.transform.u1.u2.underlinePosition.underlineThickness.unicode.unicodeBidi.unicodeRange.unitsPerEm.vAlphabetic.values.vectorEffect.version.vertAdvY.vertOriginX.vertOriginY.vHanging.vIdeographic.viewTarget.visibility.vMathematical.widths.wordSpacing.writingMode.x1.x2.x.xChannelSelector.xHeight.xlinkActuate.xlinkArcrole.xlinkHref.xlinkRole.xlinkShow.xlinkTitle.xlinkType.xmlBase.xmlLang.xmlns.xmlnsXlink.xmlSpace.y1.y2.y.yChannelSelector.z.zoomAndPan.ref.key.angle`.split(`.`));function Hx(e){return typeof e==`string`?Vx.has(e):!1}function Ux(e){return typeof e==`string`&&e.startsWith(`data-`)}function Wx(e){if(typeof e!=`object`||!e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Hx(n)||Ux(n))&&(t[n]=e[n]);return t}function Gx(e){if(e==null)return null;if((0,v.isValidElement)(e)&&typeof e.props==`object`&&e.props!==null){var t=e.props;return Wx(t)}return typeof e==`object`&&!Array.isArray(e)?Wx(e):null}function Kx(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Hx(n)||Ux(n)||Bx(n))&&(t[n]=e[n]);return t}function qx(e){return e==null?null:(0,v.isValidElement)(e)?Kx(e.props):typeof e==`object`&&!Array.isArray(e)?Kx(e):null}var Jx=[`children`,`width`,`height`,`viewBox`,`className`,`style`,`title`,`desc`];function Yx(){return Yx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yx.apply(null,arguments)}function Xx(e,t){if(e==null)return{};var n,r,i=Zx(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Zx(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Qx=(0,v.forwardRef)((e,t)=>{var n=e.children,r=e.width,i=e.height,a=e.viewBox,o=e.className,s=e.style,c=e.title,l=e.desc,u=Xx(e,Jx),d=a||{width:r,height:i,x:0,y:0},f=dv(`recharts-surface`,o);return v.createElement(`svg`,Yx({},Kx(u),{className:f,width:r,height:i,style:s,viewBox:`${d.x} ${d.y} ${d.width} ${d.height}`,ref:t}),v.createElement(`title`,null,c),v.createElement(`desc`,null,l),n)}),$x=[`children`,`className`];function eS(){return eS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},eS.apply(null,arguments)}function tS(e,t){if(e==null)return{};var n,r,i=nS(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function nS(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var rS=v.forwardRef((e,t)=>{var n=e.children,r=e.className,i=tS(e,$x),a=dv(`recharts-layer`,r);return v.createElement(`g`,eS({className:a},Kx(i),{ref:t}),n)}),iS=(0,v.createContext)(null);function aS(e){return function(){return e}}var oS=Math.PI,sS=2*oS,cS=1e-6,lS=sS-cS;function uS(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function dS(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return uS;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var fS=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?uS:dS(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>cS)if(!(Math.abs(u*s-c*l)>cS)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((oS-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>cS&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>cS||Math.abs(this._y1-l)>cS)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%sS+sS),d>lS?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>cS&&this._append`A${n},${n},0,${+(d>=oS)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function pS(){return new fS}pS.prototype=fS.prototype;function mS(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new fS(t)}Array.prototype.slice;function hS(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function gS(e){this._context=e}gS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function _S(e){return new gS(e)}function vS(e){return e[0]}function yS(e){return e[1]}function bS(e,t){var n=aS(!0),r=null,i=_S,a=null,o=mS(s);e=typeof e==`function`?e:e===void 0?vS:aS(e),t=typeof t==`function`?t:t===void 0?yS:aS(t);function s(s){var c,l=(s=hS(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:aS(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:aS(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:aS(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}function xS(e,t,n){var r=null,i=aS(!0),a=null,o=_S,s=null,c=mS(l);e=typeof e==`function`?e:e===void 0?vS:aS(+e),t=typeof t==`function`?t:aS(t===void 0?0:+t),n=typeof n==`function`?n:n===void 0?yS:aS(+n);function l(l){var u,d,f,p=(l=hS(l)).length,m,h=!1,g,_=Array(p),v=Array(p);for(a??(s=o(g=c())),u=0;u<=p;++u){if(!(u<p&&i(m=l[u],u,l))===h)if(h=!h)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return bS().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:aS(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:aS(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:aS(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:aS(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:aS(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:aS(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:aS(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}var SS=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function CS(e){return new SS(e,!0)}function wS(e){return new SS(e,!1)}function TS(){}function ES(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function DS(e){this._context=e}DS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ES(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ES(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function OS(e){return new DS(e)}function kS(e){this._context=e}kS.prototype={areaStart:TS,areaEnd:TS,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:ES(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function AS(e){return new kS(e)}function jS(e){this._context=e}jS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:ES(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function MS(e){return new jS(e)}function NS(e){this._context=e}NS.prototype={areaStart:TS,areaEnd:TS,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function PS(e){return new NS(e)}function FS(e){return e<0?-1:1}function IS(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(FS(a)+FS(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function LS(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function RS(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function zS(e){this._context=e}zS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:RS(this,this._t0,LS(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,RS(this,LS(this,n=IS(this,e,t)),n);break;default:RS(this,this._t0,n=IS(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function BS(e){this._context=new VS(e)}(BS.prototype=Object.create(zS.prototype)).point=function(e,t){zS.prototype.point.call(this,t,e)};function VS(e){this._context=e}VS.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function HS(e){return new zS(e)}function US(e){return new BS(e)}function WS(e){this._context=e}WS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=GS(e),i=GS(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function GS(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function KS(e){return new WS(e)}function qS(e,t){this._context=e,this._t=t}qS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function JS(e){return new qS(e,.5)}function YS(e){return new qS(e,0)}function XS(e){return new qS(e,1)}function ZS(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function QS(e){for(var t=e.length,n=Array(t);--t>=0;)n[t]=t;return n}function $S(e,t){return e[t]}function eC(e){let t=[];return t.key=e,t}function tC(){var e=aS([]),t=QS,n=ZS,r=$S;function i(i){var a=Array.from(e.apply(this,arguments),eC),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o<s;++o)(a[o][c]=[0,+r(e,a[o].key,c,i)]).data=e;for(o=0,l=hS(t(a));o<s;++o)a[l[o]].index=o;return n(a,l),a}return i.keys=function(t){return arguments.length?(e=typeof t==`function`?t:aS(Array.from(t)),i):e},i.value=function(e){return arguments.length?(r=typeof e==`function`?e:aS(+e),i):r},i.order=function(e){return arguments.length?(t=e==null?QS:typeof e==`function`?e:aS(Array.from(e)),i):t},i.offset=function(e){return arguments.length?(n=e??ZS,i):n},i}function nC(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}ZS(e,t)}}function rC(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,s=0;o<i;++o)s+=e[o][n][1]||0;r[n][1]+=r[n][0]=-s/2}ZS(e,t)}}function iC(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var s=0,c=0,l=0;s<o;++s){for(var u=e[t[s]],d=u[r][1]||0,f=(d-(u[r-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]],h=m[r][1]||0,g=m[r-1][1]||0;f+=h-g}c+=d,l+=f*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=l/c)}i[r-1][1]+=i[r-1][0]=n,ZS(e,t)}}function aC(e){return e===`__proto__`}function oC(e){switch(typeof e){case`number`:case`symbol`:return!1;case`string`:return e.includes(`.`)||e.includes(`[`)||e.includes(`]`)}}function sC(e){return typeof e==`string`||typeof e==`symbol`?e:Object.is(e?.valueOf?.(),-0)?`-0`:String(e)}function cC(e){if(e==null)return``;if(typeof e==`string`)return e;if(Array.isArray(e))return e.map(cC).join(`,`);let t=String(e);return t===`0`&&Object.is(Number(e),-0)?`-0`:t}function lC(e){if(Array.isArray(e))return e.map(sC);if(typeof e==`symbol`)return[e];e=cC(e);let t=[],n=e.length;if(n===0)return t;let r=0,i=``,a=``,o=!1;for(e.charCodeAt(0)===46&&t.push(``);r<n;){let s=e[r];if(a)s===`\\`&&r+1<n?(r++,i+=e[r]):s===a?a=``:i+=s;else if(o)s===`"`||s===`'`?a=s:s===`]`?(o=!1,t.push(i),i=``):i+=s;else if(s===`[`)o=!0,i&&=(t.push(i),``);else if(s===`.`){i&&=(t.push(i),``);let n=e[r+1];(n===void 0||n===`.`)&&t.push(``)}else i+=s;r++}return i&&t.push(i),t}function uC(e,t,n){if(e==null)return n;switch(typeof t){case`string`:{if(aC(t))return n;let r=e[t];return r===void 0?oC(t)?uC(e,lC(t),n):n:r}case`number`:case`symbol`:{typeof t==`number`&&(t=sC(t));let r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return dC(e,t,n);if(t=Object.is(t?.valueOf(),-0)?`-0`:String(t),aC(t))return n;let r=e[t];return r===void 0?n:r}}}function dC(e,t,n){if(t.length===0)return n;let r=e;for(let e=0;e<t.length;e++){if(r==null||aC(t[e]))return n;r=r[t[e]]}return r===void 0?n:r}var fC=4;function pC(e){var t=10**(arguments.length>1&&arguments[1]!==void 0?arguments[1]:fC),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function mC(e){var t=[...arguments].slice(1);return e.reduce((e,n,r)=>{var i=t[r-1];return typeof i==`string`?e+i+n:i===void 0?e+n:e+pC(i)+n},``)}var hC=e=>e===0?0:e>0?1:-1,gC=e=>typeof e==`number`&&e!=+e,_C=e=>typeof e==`string`&&e.length>1&&e.indexOf(`%`)===e.length-1,Z=e=>(typeof e==`number`||e instanceof Number)&&!gC(e),vC=e=>Z(e)||typeof e==`string`,yC=0,bC=e=>{var t=++yC;return`${e||``}${t}`},xC=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Z(e)&&typeof e!=`string`)return n;var i;if(_C(e)){if(t==null)return n;var a=e.indexOf(`%`);i=t*parseFloat(e.slice(0,a))/100}else i=+e;return gC(i)&&(i=n),r&&t!=null&&i>t&&(i=t),i},SC=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[String(e[r])])n[String(e[r])]=!0;else return!0;return!1};function CC(e,t,n){return Z(e)&&Z(t)?pC(e+n*(t-e)):t}function wC(e,t,n){if(!(!e||!e.length))return e.find(e=>e&&(typeof t==`function`?t(e):uC(e,t))===n)}var TC=e=>e==null,EC=e=>TC(e)?e:`${e.charAt(0).toUpperCase()}${e.slice(1)}`;function DC(e){return e!=null}function OC(){}var kC=e=>`radius`in e&&`startAngle`in e&&`endAngle`in e,AC=(e,t)=>{if(!e||typeof e==`function`||typeof e==`boolean`)return null;var n=e;if((0,v.isValidElement)(e)&&(n=e.props),typeof n!=`object`&&typeof n!=`function`)return null;var r={};return Object.keys(n).forEach(e=>{Bx(e)&&typeof n[e]==`function`&&(r[e]=t||(t=>n[e](n,t)))}),r},jC=(e,t,n)=>r=>(e(t,n,r),null),MC=(e,t,n)=>{if(e===null||typeof e!=`object`&&typeof e!=`function`)return null;var r=null;return Object.keys(e).forEach(i=>{var a=e[i];Bx(i)&&typeof a==`function`&&(r||={},r[i]=jC(a,t,n))}),r};function NC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function PC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?NC(Object(n),!0).forEach(function(t){FC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function FC(e,t,n){return(t=IC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IC(e){var t=LC(e,`string`);return typeof t==`symbol`?t:t+``}function LC(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function RC(e,t){var n=PC({},e),r=t;return Object.keys(t).reduce((e,t)=>(e[t]===void 0&&r[t]!==void 0&&(e[t]=r[t]),e),n)}function zC(e,t){let n=new Map;for(let r=0;r<e.length;r++){let i=e[r],a=t(i,r,e);n.has(a)||n.set(a,i)}return Array.from(n.values())}function BC(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}function VC(e){return e}function HC(e){return function(t){return uC(t,e)}}function UC(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function WC(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function GC(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function KC(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var qC=`[object RegExp]`,JC=`[object String]`,YC=`[object Number]`,XC=`[object Boolean]`,ZC=`[object Arguments]`,QC=`[object Symbol]`,$C=`[object Date]`,ew=`[object Map]`,tw=`[object Set]`,nw=`[object Array]`,rw=`[object ArrayBuffer]`,iw=`[object Object]`,aw=`[object DataView]`,ow=`[object Uint8Array]`,sw=`[object Uint8ClampedArray]`,cw=`[object Uint16Array]`,lw=`[object Uint32Array]`,uw=`[object Int8Array]`,dw=`[object Int16Array]`,fw=`[object Int32Array]`,pw=`[object Float32Array]`,mw=`[object Float64Array]`,hw=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function gw(e){return hw.Buffer!==void 0&&hw.Buffer.isBuffer(e)}function _w(e,t){return vw(e,void 0,e,new Map,t)}function vw(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(UC(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=vw(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,vw(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(vw(a,void 0,n,r,i));return t}if(gw(e))return e.subarray();if(WC(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=vw(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),yw(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),yw(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),yw(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,yw(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),yw(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),yw(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),yw(t,e,n,r,i),t}if(typeof e==`object`&&bw(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),yw(t,e,n,r,i),t}return e}function yw(e,t,n=e,r,i){let a=[...Object.keys(t),...GC(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=vw(t[s],s,n,r,i))}}function bw(e){switch(KC(e)){case ZC:case nw:case rw:case aw:case XC:case $C:case pw:case mw:case uw:case dw:case fw:case ew:case YC:case iw:case qC:case tw:case JC:case QC:case ow:case sw:case cw:case lw:return!0;default:return!1}}function xw(e){return vw(e,void 0,e,new Map,void 0)}function Sw(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function Cw(e){return e!==null&&(typeof e==`object`||typeof e==`function`)}function ww(e,t,n){return typeof n==`function`?Tw(e,t,function e(t,r,i,a,o,s){let c=n(t,r,i,a,o,s);return c===void 0?Tw(t,r,e,s,!1):!!c},new Map,!0):ww(e,t,()=>void 0)}function Tw(e,t,n,r,i=!1){if(t===e)return!0;switch(typeof t){case`object`:return Ew(e,t,n,r);case`function`:return Object.keys(t).length>0?Tw(e,{...t},n,r,i):Sw(e,t);default:return Cw(e)&&i?typeof t==`string`?t===``:!0:Sw(e,t)}}function Ew(e,t,n,r){if(t==null)return!0;if(Array.isArray(t))return Ow(e,t,n,r);if(t instanceof Map)return Dw(e,t,n,r);if(t instanceof Set)return kw(e,t,n,r);let i=Object.keys(t);if(e==null||UC(e))return i.length===0;if(i.length===0)return!0;if(r?.has(t))return r.get(t)===e;r?.set(t,e);try{for(let a=0;a<i.length;a++){let o=i[a];if(!UC(e)&&!(o in e)||t[o]===void 0&&e[o]!==void 0||t[o]===null&&e[o]!==null||!n(e[o],t[o],o,e,t,r))return!1}return!0}finally{r?.delete(t)}}function Dw(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[i,a]of t.entries())if(n(e.get(i),a,i,e,t,r)===!1)return!1;return!0}function Ow(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let i=new Set;for(let a=0;a<t.length;a++){let o=t[a],s=!1;for(let c=0;c<e.length;c++){if(i.has(c))continue;let l=e[c],u=!1;if(n(l,o,a,e,t,r)&&(u=!0),u){i.add(c),s=!0;break}}if(!s)return!1}return!0}function kw(e,t,n,r){return t.size===0?!0:e instanceof Set?Ow([...e],[...t],n,r):!1}function Aw(e,t){return ww(e,t,()=>void 0)}function jw(e){return e=xw(e),t=>Aw(t,e)}function Mw(e,t){return _w(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(KC(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),yw(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case YC:case JC:case XC:{let t=new e.constructor(e?.valueOf());return yw(t,e),t}case ZC:{let t={};return yw(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function Nw(e){return Mw(e)}var Pw=/^(?:0|[1-9]\d*)$/;function Fw(e,t=2**53-1){switch(typeof e){case`number`:return Number.isInteger(e)&&e>=0&&e<t;case`symbol`:return!1;case`string`:return Pw.test(e)}}function Iw(e){return typeof e==`object`&&!!e&&KC(e)===`[object Arguments]`}function Lw(e,t){let n;if(n=Array.isArray(t)?t:typeof t==`string`&&oC(t)&&e?.[t]==null?lC(t):[t],n.length===0)return!1;let r=e;for(let e=0;e<n.length;e++){let t=n[e];if((r==null||!Object.hasOwn(r,t))&&!((Array.isArray(r)||Iw(r))&&Fw(t)&&t<r.length))return!1;r=r[t]}return!0}function Rw(e,t){switch(typeof e){case`object`:Object.is(e?.valueOf(),-0)&&(e=`-0`);break;case`number`:e=sC(e);break}return t=Nw(t),function(n){let r=uC(n,e);return r===void 0?Lw(n,e):t===void 0?r===void 0:Aw(r,t)}}function zw(e){if(e==null)return VC;switch(typeof e){case`function`:return e;case`object`:return Array.isArray(e)&&e.length===2?Rw(e[0],e[1]):jw(e);case`string`:case`symbol`:case`number`:return HC(e)}}function Bw(e){return Number.isSafeInteger(e)&&e>=0}function Vw(e){return e!=null&&typeof e!=`function`&&Bw(e.length)}function Hw(e){return typeof e==`object`&&!!e}function Uw(e){return Hw(e)&&Vw(e)}function Ww(e,t=VC){return Uw(e)?zC(Array.from(e),BC(zw(t),1)):[]}function Gw(e,t,n){return t===!0?Ww(e,n):typeof t==`function`?Ww(e,t):e}var Kw=o((e=>{var t=d();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),qw=o(((e,t)=>{t.exports=Kw()})),Jw=o((e=>{var t=d(),n=qw();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Yw=o(((e,t)=>{t.exports=Jw()})),Xw=(0,v.createContext)(null),Zw=Yw(),Qw=e=>e,$w=()=>{var e=(0,v.useContext)(Xw);return e?e.store.dispatch:Qw},eT=()=>{},tT=()=>eT,nT=(e,t)=>e===t;function Q(e){var t=(0,v.useContext)(Xw),n=(0,v.useMemo)(()=>t?t=>{if(t!=null)return e(t)}:eT,[t,e]);return(0,Zw.useSyncExternalStoreWithSelector)(t?t.subscription.addNestedSub:tT,t?t.store.getState:eT,t?t.store.getState:eT,n,nT)}function rT(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!=`function`)throw TypeError(t)}function iT(e,t=`expected all items to be functions, instead received the following types: `){if(!e.every(e=>typeof e==`function`)){let n=e.map(e=>typeof e==`function`?`function ${e.name||`unnamed`}()`:typeof e).join(`, `);throw TypeError(`${t}[${n}]`)}}var aT=e=>Array.isArray(e)?e:[e];function oT(e){let t=Array.isArray(e[0])?e[0]:e;return iT(t,`createSelector expects all input-selectors to be functions, but received the following types: `),t}function sT(e,t){let n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var cT=class{constructor(e){this.value=e}deref(){return this.value}},lT=typeof WeakRef>`u`?cT:WeakRef,uT=0,dT=1;function fT(){return{s:uT,v:void 0,o:null,p:null}}function pT(e){return e instanceof lT?e.deref():e}function mT(e,t={}){let n=fT(),{resultEqualityCheck:r}=t,i,a=0;function o(){let t=n,{length:o}=arguments;for(let e=0,n=o;e<n;e++){let n=arguments[e];if(typeof n==`function`||typeof n==`object`&&n){let e=t.o;e===null&&(t.o=e=new WeakMap);let r=e.get(n);r===void 0?(t=fT(),e.set(n,t)):t=r}else{let e=t.p;e===null&&(t.p=e=new Map);let r=e.get(n);r===void 0?(t=fT(),e.set(n,t)):t=r}}let s=t,c;if(t.s===dT)c=t.v;else if(c=e.apply(null,arguments),a++,r){let e=pT(i);e!=null&&r(e,c)&&(c=e,a!==0&&a--),i=typeof c==`object`&&c||typeof c==`function`?new lT(c):c}return s.s=dT,s.v=c,c}return o.clearCache=()=>{n=fT(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function hT(e,...t){let n=typeof e==`function`?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t=0,r=0,i,a={},o=e.pop();typeof o==`object`&&(a=o,o=e.pop()),rT(o,`createSelector expects an output function after the inputs, but received: [${typeof o}]`);let{memoize:s,memoizeOptions:c=[],argsMemoize:l=mT,argsMemoizeOptions:u=[]}={...n,...a},d=aT(c),f=aT(u),p=oT(e),m=s(function(){return t++,o.apply(null,arguments)},...d),h=l(function(){r++;let e=sT(p,arguments);return i=m.apply(null,e),i},...f);return Object.assign(h,{resultFunc:o,memoizedResultFunc:m,dependencies:p,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>i,recomputations:()=>t,resetRecomputations:()=>{t=0},memoize:s,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var $=hT(mT);function gT(e,t=1){let n=[],r=Math.floor(t),i=(e,t)=>{for(let a=0;a<e.length;a++){let o=e[a];Array.isArray(o)&&t<r?i(o,t+1):n.push(o)}};return i(e,0),n}function _T(e,t,n){return Cw(n)&&(typeof t==`number`&&Vw(n)&&Fw(t)&&t<n.length||typeof t==`string`&&t in n)?Sw(n[t],e):!1}function vT(e){return typeof e==`symbol`?1:e===null?2:e===void 0?3:e===e?0:4}var yT=(e,t,n)=>{if(e!==t){let r=vT(e),i=vT(t);if(r===i&&r===0){if(e<t)return n===`desc`?1:-1;if(e>t)return n===`desc`?-1:1}return n===`desc`?i-r:r-i}return 0};function bT(e){return typeof e==`symbol`||e instanceof Symbol}var xT=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ST=/^\w*$/;function CT(e,t){return Array.isArray(e)?!1:typeof e==`number`||typeof e==`boolean`||e==null||bT(e)?!0:typeof e==`string`&&(ST.test(e)||!xT.test(e))||t!=null&&Object.hasOwn(t,e)}function wT(e,t,n,r){if(e==null)return[];n=r?void 0:n,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(n)||(n=n==null?[]:[n]),n=n.map(e=>String(e));let i=(e,t)=>{let n=e;for(let e=0;e<t.length&&n!=null;++e)n=n[t[e]];return n},a=(e,t)=>t==null||e==null?t:typeof e==`object`&&`key`in e?Object.hasOwn(t,e.key)?t[e.key]:i(t,e.path):typeof e==`function`?e(t):Array.isArray(e)?i(t,e):typeof t==`object`?t[e]:t,o=t.map(e=>(Array.isArray(e)&&e.length===1&&(e=e[0]),e==null||typeof e==`function`||Array.isArray(e)||CT(e)?e:{key:e,path:lC(e)}));return e.map(e=>({original:e,criteria:o.map(t=>a(t,e))})).slice().sort((e,t)=>{for(let r=0;r<o.length;r++){let i=yT(e.criteria[r],t.criteria[r],n[r]);if(i!==0)return i}return 0}).map(e=>e.original)}function TT(e,...t){let n=t.length;return n>1&&_T(e,t[0],t[1])?t=[]:n>2&&_T(t[0],t[1],t[2])&&(t=[t[0]]),wT(e,gT(t),[`asc`])}var ET=e=>e.legend.settings,see=e=>e.legend.size;$([e=>e.legend.payload,ET],(e,t)=>{var n=t.itemSorter,r=e.flat(1);return n?TT(r,n):r});function cee(e,t){return fee(e)||dee(e,t)||uee(e,t)||lee()}function lee(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
81
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uee(e,t){if(e){if(typeof e==`string`)return DT(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?DT(e,t):void 0}}function DT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function dee(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function fee(e){if(Array.isArray(e))return e}var OT=1;function kT(e,t){return Math.abs(e.height-t.height)>OT||Math.abs(e.left-t.left)>OT||Math.abs(e.top-t.top)>OT||Math.abs(e.width-t.width)>OT}function AT(e){var t=e.getBoundingClientRect();return{height:t.height,left:t.left,top:t.top,width:t.width}}function jT(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=cee((0,v.useState)({height:0,left:0,top:0,width:0}),2),n=t[0],r=t[1],i=(0,v.useRef)(null),a=(0,v.useRef)(n);a.current=n;var o=(0,v.useCallback)(e=>{if(i.current!=null&&(i.current.disconnect(),i.current=null),e!=null){var t=AT(e);if(kT(t,a.current)&&r(t),typeof ResizeObserver<`u`){var n=new ResizeObserver(()=>{var t=AT(e);kT(t,a.current)&&r(t)});n.observe(e),i.current=n}}},[...e]);return(0,v.useEffect)(()=>()=>{var e;(e=i.current)==null||e.disconnect()},[]),[n,o]}function MT(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var NT=typeof Symbol==`function`&&Symbol.observable||`@@observable`,PT=()=>Math.random().toString(36).substring(7).split(``).join(`.`),FT={INIT:`@@redux/INIT${PT()}`,REPLACE:`@@redux/REPLACE${PT()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${PT()}`};function IT(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function LT(e,t,n){if(typeof e!=`function`)throw Error(MT(2));if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(MT(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(MT(1));return n(LT)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,c=!1;function l(){o===a&&(o=new Map,a.forEach((e,t)=>{o.set(t,e)}))}function u(){if(c)throw Error(MT(3));return i}function d(e){if(typeof e!=`function`)throw Error(MT(4));if(c)throw Error(MT(5));let t=!0;l();let n=s++;return o.set(n,e),function(){if(t){if(c)throw Error(MT(6));t=!1,l(),o.delete(n),a=null}}}function f(e){if(!IT(e))throw Error(MT(7));if(e.type===void 0)throw Error(MT(8));if(typeof e.type!=`string`)throw Error(MT(17));if(c)throw Error(MT(9));try{c=!0,i=r(i,e)}finally{c=!1}return(a=o).forEach(e=>{e()}),e}function p(e){if(typeof e!=`function`)throw Error(MT(10));r=e,f({type:FT.REPLACE})}function m(){let e=d;return{subscribe(t){if(typeof t!=`object`||!t)throw Error(MT(11));function n(){let e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[NT](){return this}}}return f({type:FT.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[NT]:m}}function RT(e){Object.keys(e).forEach(t=>{let n=e[t];if(n(void 0,{type:FT.INIT})===void 0)throw Error(MT(12));if(n(void 0,{type:FT.PROBE_UNKNOWN_ACTION()})===void 0)throw Error(MT(13))})}function zT(e){let t=Object.keys(e),n={};for(let r=0;r<t.length;r++){let i=t[r];typeof e[i]==`function`&&(n[i]=e[i])}let r=Object.keys(n),i;try{RT(n)}catch(e){i=e}return function(e={},t){if(i)throw i;let a=!1,o={};for(let i=0;i<r.length;i++){let s=r[i],c=n[s],l=e[s],u=c(l,t);if(u===void 0)throw t&&t.type,Error(MT(14));o[s]=u,a||=u!==l}return a||=r.length!==Object.keys(e).length,a?o:e}}function BT(...e){return e.length===0?e=>e:e.length===1?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function VT(...e){return t=>(n,r)=>{let i=t(n,r),a=()=>{throw Error(MT(15))},o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)};return a=BT(...e.map(e=>e(o)))(i.dispatch),{...i,dispatch:a}}}function HT(e){return IT(e)&&`type`in e&&typeof e.type==`string`}var UT=Symbol.for(`immer-nothing`),WT=Symbol.for(`immer-draftable`),GT=Symbol.for(`immer-state`);function KT(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var qT=Object,JT=qT.getPrototypeOf,YT=`constructor`,XT=`prototype`,ZT=`configurable`,QT=`enumerable`,$T=`writable`,eE=`value`,tE=e=>!!e&&!!e[GT];function nE(e){return e?aE(e)||fE(e)||!!e[WT]||!!e[YT]?.[WT]||pE(e)||mE(e):!1}var rE=qT[XT][YT].toString(),iE=new WeakMap;function aE(e){if(!e||!hE(e))return!1;let t=JT(e);if(t===null||t===qT[XT])return!0;let n=qT.hasOwnProperty.call(t,YT)&&t[YT];if(n===Object)return!0;if(!gE(n))return!1;let r=iE.get(n);return r===void 0&&(r=Function.toString.call(n),iE.set(n,r)),r===rE}function oE(e,t,n=!0){sE(e)===0?(n?Reflect.ownKeys(e):qT.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function sE(e){let t=e[GT];return t?t.type_:fE(e)?1:pE(e)?2:mE(e)?3:0}var cE=(e,t,n=sE(e))=>n===2?e.has(t):qT[XT].hasOwnProperty.call(e,t),lE=(e,t,n=sE(e))=>n===2?e.get(t):e[t],uE=(e,t,n,r=sE(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function dE(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var fE=Array.isArray,pE=e=>e instanceof Map,mE=e=>e instanceof Set,hE=e=>typeof e==`object`,gE=e=>typeof e==`function`,_E=e=>typeof e==`boolean`;function vE(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var yE=e=>e.copy_||e.base_,bE=e=>e.modified_?e.copy_:e.base_;function xE(e,t){if(pE(e))return new Map(e);if(mE(e))return new Set(e);if(fE(e))return Array[XT].slice.call(e);let n=aE(e);if(t===!0||t===`class_only`&&!n){let t=qT.getOwnPropertyDescriptors(e);delete t[GT];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[$T]===!1&&(a[$T]=!0,a[ZT]=!0),(a.get||a.set)&&(t[i]={[ZT]:!0,[$T]:!0,[QT]:a[QT],[eE]:e[i]})}return qT.create(JT(e),t)}else{let t=JT(e);if(t!==null&&n)return{...e};let r=qT.create(t);return qT.assign(r,e)}}function SE(e,t=!1){return TE(e)||tE(e)||!nE(e)?e:(sE(e)>1&&qT.defineProperties(e,{set:wE,add:wE,clear:wE,delete:wE}),qT.freeze(e),t&&oE(e,(e,t)=>{SE(t,!0)},!1),e)}function CE(){KT(2)}var wE={[eE]:CE};function TE(e){return e===null||!hE(e)?!0:qT.isFrozen(e)}var EE=`MapSet`,DE=`Patches`,OE=`ArrayMethods`,kE={};function AE(e){let t=kE[e];return t||KT(0,e),t}var jE=e=>!!kE[e],ME,NE=()=>ME,PE=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:jE(EE)?AE(EE):void 0,arrayMethodsPlugin_:jE(OE)?AE(OE):void 0});function FE(e,t){t&&(e.patchPlugin_=AE(DE),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function IE(e){LE(e),e.drafts_.forEach(zE),e.drafts_=null}function LE(e){e===ME&&(ME=e.parent_)}var RE=e=>ME=PE(ME,e);function zE(e){let t=e[GT];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function BE(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[GT].modified_&&(IE(t),KT(4)),nE(e)&&(e=VE(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[GT].base_,e,t)}else e=VE(t,n);return HE(t,e,!0),IE(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===UT?void 0:e}function VE(e,t){if(TE(t))return t;let n=t[GT];if(!n)return XE(t,e.handledSet_,e);if(!WE(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);JE(n,e)}return n.copy_}function HE(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&SE(t,n)}function UE(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var WE=(e,t)=>e.scope_===t,GE=[];function KE(e,t,n,r){let i=yE(e),a=e.type_;if(r!==void 0&&lE(i,r,a)===t){uE(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;oE(i,(e,n)=>{if(tE(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??GE;for(let e of o)uE(i,e,n,a)}function qE(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!WE(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=bE(i);KE(e,i.draft_??i,a,n),JE(i,r)})}function JE(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}UE(e)}}function YE(e,t,n){let{scope_:r}=e;if(tE(n)){let i=n[GT];WE(i,r)&&i.callbacks_.push(function(){iD(e),KE(e,n,bE(i),t)})}else nE(n)&&e.callbacks_.push(function(){let i=yE(e);e.type_===3?i.has(n)&&XE(n,r.handledSet_,r):lE(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&XE(lE(e.copy_,t,e.type_),r.handledSet_,r)})}function XE(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||tE(e)||t.has(e)||!nE(e)||TE(e)?e:(t.add(e),oE(e,(r,i)=>{if(tE(i)){let t=i[GT];WE(t,n)&&(uE(e,r,bE(t),e.type_),UE(t))}else nE(i)&&XE(i,t,n)}),e)}function ZE(e,t){let n=fE(e),r={type_:+!!n,scope_:t?t.scope_:NE(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=QE;n&&(i=[r],a=$E);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var QE={get(e,t){if(t===GT)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=yE(e);if(!cE(i,t,e.type_))return tD(e,i,t);let a=i[t];if(e.finalized_||!nE(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&vE(t))return a;if(a===eD(e.base_,t)){iD(e);let n=e.type_===1?+t:t,r=oD(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in yE(e)},ownKeys(e){return Reflect.ownKeys(yE(e))},set(e,t,n){let r=nD(yE(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=eD(yE(e),t),i=r?.[GT];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(dE(n,r)&&(n!==void 0||cE(e.base_,t,e.type_)))return!0;iD(e),rD(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),YE(e,t,n),!0)},deleteProperty(e,t){return iD(e),eD(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),rD(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=yE(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[$T]:!0,[ZT]:e.type_!==1||t!==`length`,[QT]:r[QT],[eE]:n[t]}},defineProperty(){KT(11)},getPrototypeOf(e){return JT(e.base_)},setPrototypeOf(){KT(12)}},$E={};for(let e in QE){let t=QE[e];$E[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}$E.deleteProperty=function(e,t){return $E.set.call(this,e,t,void 0)},$E.set=function(e,t,n){return QE.set.call(this,e[0],t,n,e[0])};function eD(e,t){let n=e[GT];return(n?yE(n):e)[t]}function tD(e,t,n){let r=nD(t,n);return r?eE in r?r[eE]:r.get?.call(e.draft_):void 0}function nD(e,t){if(!(t in e))return;let n=JT(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=JT(n)}}function rD(e){e.modified_||(e.modified_=!0,e.parent_&&rD(e.parent_))}function iD(e){e.copy_||=(e.assigned_=new Map,xE(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var aD=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(gE(e)&&!gE(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}gE(t)||KT(6),n!==void 0&&!gE(n)&&KT(7);let r;if(nE(e)){let i=RE(this),a=oD(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?IE(i):LE(i)}return FE(i,n),BE(r,i)}else if(!e||!hE(e)){if(r=t(e),r===void 0&&(r=e),r===UT&&(r=void 0),this.autoFreeze_&&SE(r,!0),n){let t=[],i=[];AE(DE).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}else KT(1,e)},this.produceWithPatches=(e,t)=>{if(gE(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},_E(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),_E(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),_E(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){nE(e)||KT(8),tE(e)&&(e=sD(e));let t=RE(this),n=oD(t,e,void 0);return n[GT].isManual_=!0,LE(t),n}finishDraft(e,t){let n=e&&e[GT];(!n||!n.isManual_)&&KT(9);let{scope_:r}=n;return FE(r,t),BE(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=AE(DE).applyPatches_;return tE(e)?r(e,t):this.produce(e,e=>r(e,t))}};function oD(e,t,n,r){let[i,a]=pE(t)?AE(EE).proxyMap_(t,n):mE(t)?AE(EE).proxySet_(t,n):ZE(t,n);return(n?.scope_??NE()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?qE(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function sD(e){return tE(e)||KT(10,e),cD(e)}function cD(e){if(!nE(e)||TE(e))return e;let t=e[GT],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=xE(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=xE(e,!0);return oE(n,(e,t)=>{uE(n,e,cD(t))},r),t&&(t.finalized_=!1),n}var lD=new aD().produce;function uD(e){return({dispatch:t,getState:n})=>r=>i=>typeof i==`function`?i(t,n,e):r(i)}var dD=uD(),fD=uD,pD=typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]==`object`?BT:BT.apply(null,arguments)};typeof window<`u`&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;function mD(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw Error(CO(0));return{type:e,payload:r.payload,...`meta`in r&&{meta:r.meta},...`error`in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>HT(t)&&t.type===e,n}var hD=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function gD(e){return nE(e)?lD(e,()=>{}):e}function _D(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function vD(e){return typeof e==`boolean`}var yD=()=>function(e){let{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:i=!0}=e??{},a=new hD;return t&&(vD(t)?a.push(dD):a.push(fD(t.extraArgument))),a},bD=`RTK_autoBatch`,xD=()=>e=>({payload:e,meta:{[bD]:!0}}),SD=e=>t=>{setTimeout(t,e)},CD=(e,t)=>n=>{let r=!1,i=()=>{r||(r=!0,cancelAnimationFrame(a),clearTimeout(o),n())},a=e(i),o=setTimeout(i,t)},wD=(e={type:`raf`})=>t=>(...n)=>{let r=t(...n),i=!0,a=!1,o=!1,s=new Set,c=e.type===`tick`?queueMicrotask:e.type===`raf`?typeof window<`u`&&window.requestAnimationFrame?CD(window.requestAnimationFrame,100):SD(10):e.type===`callback`?e.queueNotification:SD(e.timeout),l=()=>{o=!1,a&&(a=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){let t=r.subscribe(()=>i&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return i=!e?.meta?.[bD],a=!i,a&&(o||(o=!0,c(l))),r.dispatch(e)}finally{i=!0}}})},TD=e=>function(t){let{autoBatch:n=!0}=t??{},r=new hD(e);return n&&r.push(wD(typeof n==`object`?n:void 0)),r};function ED(e){let t=yD(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{},c;if(typeof n==`function`)c=n;else if(IT(n))c=zT(n);else throw Error(CO(1));let l;l=typeof r==`function`?r(t):t();let u=BT;i&&(u=pD({trace:!1,...typeof i==`object`&&i}));let d=TD(VT(...l)),f=typeof s==`function`?s(d):d(),p=u(...f);return LT(c,o,p)}function DD(e){let t={},n=[],r,i={addCase(e,n){let r=typeof e==`string`?e:e.type;if(!r)throw Error(CO(28));if(r in t)throw Error(CO(29));return t[r]=n,i},addAsyncThunk(e,r){return r.pending&&(t[e.pending.type]=r.pending),r.rejected&&(t[e.rejected.type]=r.rejected),r.fulfilled&&(t[e.fulfilled.type]=r.fulfilled),r.settled&&n.push({matcher:e.settled,reducer:r.settled}),i},addMatcher(e,t){return n.push({matcher:e,reducer:t}),i},addDefaultCase(e){return r=e,i}};return e(i),[t,n,r]}function OD(e){return typeof e==`function`}function kD(e,t){let[n,r,i]=DD(t),a;if(OD(e))a=()=>gD(e());else{let t=gD(e);a=()=>t}function o(e=a(),t){let o=[n[t.type],...r.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return o.filter(e=>!!e).length===0&&(o=[i]),o.reduce((e,n)=>{if(n)if(tE(e)){let r=n(e,t);return r===void 0?e:r}else if(nE(e))return lD(e,e=>n(e,t));else{let r=n(e,t);if(r===void 0){if(e===null)return e;throw Error(`A case reducer on a non-draftable value must not return undefined`)}return r}return e},e)}return o.getInitialState=a,o}var AD=`ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW`,jD=(e=21)=>{let t=``,n=e;for(;n--;)t+=AD[Math.random()*64|0];return t},MD=Symbol.for(`rtk-slice-createasyncthunk`);function ND(e,t){return`${e}/${t}`}function PD({creators:e}={}){let t=e?.asyncThunk?.[MD];return function(e){let{name:n,reducerPath:r=n}=e;if(!n)throw Error(CO(11));let i=(typeof e.reducers==`function`?e.reducers(LD()):e.reducers)||{},a=Object.keys(i),o={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){let n=typeof e==`string`?e:e.type;if(!n)throw Error(CO(12));if(n in o.sliceCaseReducersByType)throw Error(CO(13));return o.sliceCaseReducersByType[n]=t,s},addMatcher(e,t){return o.sliceMatchers.push({matcher:e,reducer:t}),s},exposeAction(e,t){return o.actionCreators[e]=t,s},exposeCaseReducer(e,t){return o.sliceCaseReducersByName[e]=t,s}};a.forEach(r=>{let a=i[r],o={reducerName:r,type:ND(n,r),createNotation:typeof e.reducers==`function`};zD(a)?VD(o,a,s,t):RD(o,a,s)});function c(){let[t={},n=[],r=void 0]=typeof e.extraReducers==`function`?DD(e.extraReducers):[e.extraReducers],i={...t,...o.sliceCaseReducersByType};return kD(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of o.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}let l=e=>e,u=new Map,d=new WeakMap,f;function p(e,t){return f||=c(),f(e,t)}function m(){return f||=c(),f.getInitialState()}function h(t,n=!1){function r(e){let i=e[t];return i===void 0&&n&&(i=_D(d,r,m)),i}function i(t=l){return _D(_D(u,n,()=>new WeakMap),t,()=>{let r={};for(let[i,a]of Object.entries(e.selectors??{}))r[i]=FD(a,t,()=>_D(d,t,m),n);return r})}return{reducerPath:t,getSelectors:i,get selectors(){return i(r)},selectSlice:r}}let g={name:n,reducer:p,actions:o.actionCreators,caseReducers:o.sliceCaseReducersByName,getInitialState:m,...h(r),injectInto(e,{reducerPath:t,...n}={}){let i=t??r;return e.inject({reducerPath:i,reducer:p},n),{...g,...h(i,!0)}}};return g}}function FD(e,t,n,r){function i(i,...a){let o=t(i);return o===void 0&&r&&(o=n()),e(o,...a)}return i.unwrapped=e,i}var ID=PD();function LD(){function e(e,t){return{_reducerDefinitionType:`asyncThunk`,payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer(e){return Object.assign({[e.name](...t){return e(...t)}}[e.name],{_reducerDefinitionType:`reducer`})},preparedReducer(e,t){return{_reducerDefinitionType:`reducerWithPrepare`,prepare:e,reducer:t}},asyncThunk:e}}function RD({type:e,reducerName:t,createNotation:n},r,i){let a,o;if(`reducer`in r){if(n&&!BD(r))throw Error(CO(17));a=r.reducer,o=r.prepare}else a=r;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?mD(e,o):mD(e))}function zD(e){return e._reducerDefinitionType===`asyncThunk`}function BD(e){return e._reducerDefinitionType===`reducerWithPrepare`}function VD({type:e,reducerName:t},n,r,i){if(!i)throw Error(CO(18));let{payloadCreator:a,fulfilled:o,pending:s,rejected:c,settled:l,options:u}=n,d=i(e,a,u);r.exposeAction(t,d),o&&r.addCase(d.fulfilled,o),s&&r.addCase(d.pending,s),c&&r.addCase(d.rejected,c),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:o||HD,pending:s||HD,rejected:c||HD,settled:l||HD})}function HD(){}var UD=`task`,WD=`listener`,GD=`completed`,KD=`cancelled`,qD=`task-${KD}`,JD=`task-${GD}`,YD=`${WD}-${KD}`,XD=`${WD}-${GD}`,ZD=class{constructor(e){this.code=e,this.message=`${UD} ${KD} (reason: ${e})`}code;name=`TaskAbortError`;message},QD=(e,t)=>{if(typeof e!=`function`)throw TypeError(CO(32))},$D=()=>{},eO=(e,t=$D)=>(e.catch(t),e),tO=(e,t)=>(e.addEventListener(`abort`,t,{once:!0}),()=>e.removeEventListener(`abort`,t)),nO=e=>{if(e.aborted)throw new ZD(e.reason)};function rO(e,t){let n=$D;return new Promise((r,i)=>{let a=()=>i(new ZD(e.reason));if(e.aborted){a();return}n=tO(e,a),t.finally(()=>n()).then(r,i)}).finally(()=>{n=$D})}var iO=async(e,t)=>{try{return await Promise.resolve(),{status:`ok`,value:await e()}}catch(e){return{status:e instanceof ZD?`cancelled`:`rejected`,error:e}}finally{t?.()}},aO=e=>t=>eO(rO(e,t).then(t=>(nO(e),t))),oO=e=>{let t=aO(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:sO}=Object,cO={},lO=`listenerMiddleware`,uO=(e,t)=>{let n=t=>tO(e,()=>t.abort(e.reason));return(r,i)=>{QD(r,`taskExecutor`);let a=new AbortController;n(a);let o=iO(async()=>{nO(e),nO(a.signal);let t=await r({pause:aO(a.signal),delay:oO(a.signal),signal:a.signal});return nO(a.signal),t},()=>a.abort(JD));return i?.autoJoin&&t.push(o.catch($D)),{result:aO(e)(o),cancel(){a.abort(qD)}}}},dO=(e,t)=>{let n=async(n,r)=>{nO(t);let i=()=>{},a=[new Promise((t,r)=>{let a=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});i=()=>{a(),r()}})];r!=null&&a.push(new Promise(e=>setTimeout(e,r,null)));try{let e=await rO(t,Promise.race(a));return nO(t),e}finally{i()}};return((e,t)=>eO(n(e,t)))},fO=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:a}=e;if(t)i=mD(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw Error(CO(21));return QD(a,`options.listener`),{predicate:i,type:t,effect:a}},pO=sO(e=>{let{type:t,predicate:n,effect:r}=fO(e);return{id:jD(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw Error(CO(22))}}},{withTypes:()=>pO}),mO=(e,t)=>{let{type:n,effect:r,predicate:i}=fO(t);return Array.from(e.values()).find(e=>(typeof n==`string`?e.type===n:e.predicate===i)&&e.effect===r)},hO=e=>{e.pending.forEach(e=>{e.abort(YD)})},gO=(e,t)=>()=>{for(let e of t.keys())hO(e);e.clear()},_O=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout(()=>{throw e},0)}},vO=sO(mD(`${lO}/add`),{withTypes:()=>vO}),yO=mD(`${lO}/removeAll`),bO=sO(mD(`${lO}/remove`),{withTypes:()=>bO}),xO=(...e)=>{console.error(`${lO}/error`,...e)},SO=(e={})=>{let t=new Map,n=new Map,r=e=>{let t=n.get(e)??0;n.set(e,t+1)},i=e=>{let t=n.get(e)??1;t===1?n.delete(e):n.set(e,t-1)},{extra:a,onError:o=xO}=e;QD(o,`onError`);let s=e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&hO(e)}),c=(e=>{let n=mO(t,e)??pO(e);return s(n)});sO(c,{withTypes:()=>c});let l=e=>{let n=mO(t,e);return n&&(n.unsubscribe(),e.cancelActive&&hO(n)),!!n};sO(l,{withTypes:()=>l});let u=async(e,n,s,l)=>{let u=new AbortController,d=dO(c,u.signal),f=[];try{e.pending.add(u),r(e),await Promise.resolve(e.effect(n,sO({},s,{getOriginalState:l,condition:(e,t)=>d(e,t).then(Boolean),take:d,delay:oO(u.signal),pause:aO(u.signal),extra:a,signal:u.signal,fork:uO(u.signal,f),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==u&&(e.abort(YD),n.delete(e))})},cancel:()=>{u.abort(YD),e.pending.delete(u)},throwIfCancelled:()=>{nO(u.signal)}})))}catch(e){e instanceof ZD||_O(o,e,{raisedBy:`effect`})}finally{await Promise.all(f),u.abort(XD),i(e),e.pending.delete(u)}},d=gO(t,n);return{middleware:e=>n=>r=>{if(!HT(r))return n(r);if(vO.match(r))return c(r.payload);if(yO.match(r)){d();return}if(bO.match(r))return l(r.payload);let i=e.getState(),a=()=>{if(i===cO)throw Error(CO(23));return i},s;try{if(s=n(r),t.size>0){let n=e.getState(),s=Array.from(t.values());for(let t of s){let s=!1;try{s=t.predicate(r,n,i)}catch(e){s=!1,_O(o,e,{raisedBy:`predicate`})}s&&u(t,r,e,a)}}}finally{i=cO}return s},startListening:c,stopListening:l,clearListeners:d}};function CO(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var wO=ID({name:`chartLayout`,initialState:{layoutType:`horizontal`,width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){e.margin.top=t.payload.top??0,e.margin.right=t.payload.right??0,e.margin.bottom=t.payload.bottom??0,e.margin.left=t.payload.left??0},setScale(e,t){e.scale=t.payload}}}),TO=wO.actions,EO=TO.setMargin,DO=TO.setLayout,OO=TO.setChartSize,kO=TO.setScale,AO=wO.reducer;function jO(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function MO(e){return Number.isFinite(e)}function NO(e){return typeof e==`number`&&e>0&&Number.isFinite(e)}function PO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function FO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?PO(Object(n),!0).forEach(function(t){IO(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function IO(e,t,n){return(t=LO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LO(e){var t=RO(e,`string`);return typeof t==`symbol`?t:t+``}function RO(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function zO(e,t,n){return TC(e)||TC(t)?n:vC(t)?uC(e,t,n):typeof t==`function`?t(e):n}var BO=(e,t,n)=>{if(t&&n){var r=n.width,i=n.height,a=t.align,o=t.verticalAlign,s=t.layout;if((s===`vertical`||s===`horizontal`&&o===`middle`)&&a!==`center`&&Z(e[a]))return FO(FO({},e),{},{[a]:e[a]+(r||0)});if((s===`horizontal`||s===`vertical`&&a===`center`)&&o!==`middle`&&Z(e[o]))return FO(FO({},e),{},{[o]:e[o]+(i||0)})}return e},VO=(e,t)=>e===`horizontal`&&t===`xAxis`||e===`vertical`&&t===`yAxis`||e===`centric`&&t===`angleAxis`||e===`radial`&&t===`radiusAxis`,HO=(e,t,n,r)=>{if(r)return e.map(e=>e.coordinate);var i,a,o=e.map(e=>(e.coordinate===t&&(i=!0),e.coordinate===n&&(a=!0),e.coordinate));return i||o.push(t),a||o.push(n),o},UO=(e,t,n)=>{if(!e)return null;var r=e.duplicateDomain,i=e.type,a=e.range,o=e.scale,s=e.realScaleType,c=e.isCategorical,l=e.categoricalDomain,u=e.tickCount,d=e.ticks,f=e.niceTicks,p=e.axisType;if(!o)return null;var m=s===`scaleBand`&&o.bandwidth?o.bandwidth()/2:2,h=(t||n)&&i===`category`&&o.bandwidth?o.bandwidth()/m:0;return h=p===`angleAxis`&&a&&a.length>=2?hC(a[0]-a[1])*2*h:h,t&&(d||f)?(d||f||[]).map((e,t)=>{var n=r?r.indexOf(e):e,i=o.map(n);return MO(i)?{coordinate:i+h,value:e,offset:h,index:t}:null}).filter(DC):c&&l?l.map((e,t)=>{var n=o.map(e);return MO(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(DC):o.ticks&&!n&&u!=null?o.ticks(u).map((e,t)=>{var n=o.map(e);return MO(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(DC):o.domain().map((e,t)=>{var n=o.map(e);return MO(n)?{coordinate:n+h,value:r?r[e]:e,index:t,offset:h}:null}).filter(DC)},WO=(e,t)=>{if(!t||t.length!==2||!Z(t[0])||!Z(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!Z(e[0])||e[0]<n)&&(i[0]=n),(!Z(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i},GO={sign:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0,o=0;o<t;++o){var s=e[o]?.[r];if(s!=null){var c=s[1],l=s[0],u=gC(c)?l:c;u>=0?(s[0]=i,i+=u,s[1]=i):(s[0]=a,a+=u,s[1]=a)}}}},expand:nC,none:ZS,silhouette:rC,wiggle:iC,positive:e=>{var t=e.length;if(!(t<=0)){var n=e[0]?.length;if(!(n==null||n<=0))for(var r=0;r<n;++r)for(var i=0,a=0;a<t;++a){var o=e[a]?.[r];if(o!=null){var s=gC(o[1])?o[0]:o[1];s>=0?(o[0]=i,i+=s,o[1]=i):(o[0]=0,o[1]=0)}}}}},KO=(e,t,n)=>{var r=GO[n]??ZS,i=tC().keys(t).value((e,t)=>Number(zO(e,t,0))).order(QS).offset(r)(e);return i.forEach((n,r)=>{n.forEach((n,i)=>{var a=zO(e[i],t[r],0);Array.isArray(a)&&a.length===2&&Z(a[0])&&Z(a[1])&&(n[0]=a[0],n[1]=a[1])})}),i};function qO(e){return e==null?void 0:String(e)}function JO(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type===`category`){if(!t.allowDuplicatedCategory&&t.dataKey&&!TC(i[t.dataKey])){var s=wC(n,`value`,i[t.dataKey]);if(s)return s.coordinate+r/2}return n!=null&&n[a]?n[a].coordinate+r/2:null}var c=zO(i,TC(o)?t.dataKey:o),l=t.scale.map(c);return Z(l)?l:null}var YO=e=>{var t=e.axis,n=e.ticks,r=e.offset,i=e.bandSize,a=e.entry,o=e.index;if(t.type===`category`)return n[o]?n[o].coordinate+r:null;var s=zO(a,t.dataKey,t.scale.domain()[o]);if(TC(s))return null;var c=t.scale.map(s);return Z(c)?c-i/2+r:null},XO=e=>{var t=e.numericAxis,n=t.scale.domain();if(t.type===`number`){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]},ZO=e=>{var t=e.flat(2).filter(Z);return[Math.min(...t),Math.max(...t)]},QO=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],$O=(e,t,n)=>{if(!(e==null||Object.keys(e).length===0))return QO(Object.keys(e).reduce((r,i)=>{var a=e[i];if(!a)return r;var o=a.stackedData.reduce((e,r)=>{var i=ZO(jO(r,t,n));return!MO(i[0])||!MO(i[1])?e:[Math.min(e[0],i[0]),Math.max(e[1],i[1])]},[1/0,-1/0]);return[Math.min(o[0],r[0]),Math.max(o[1],r[1])]},[1/0,-1/0]))},ek=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,tk=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,nk=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=TT(t,e=>e.coordinate),a=1/0,o=1,s=i.length;o<s;o++){var c=i[o],l=i[o-1];a=Math.min((c?.coordinate||0)-(l?.coordinate||0),a)}return a===1/0?0:a}return n?void 0:0};function rk(e){var t=e.tooltipEntrySettings,n=e.dataKey,r=e.payload,i=e.value,a=e.name;return FO(FO({},t),{},{dataKey:n,payload:r,value:i,name:a})}function ik(e,t){if(e!=null)return String(e);if(typeof t==`string`)return t}var ak=(e,t)=>{if(t===`horizontal`)return e.relativeX;if(t===`vertical`)return e.relativeY},ok=(e,t)=>t===`centric`?e.angle:e.radius,sk=e=>e.layout.width,ck=e=>e.layout.height,lk=e=>e.layout.scale,uk=e=>e.layout.margin,dk=$(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),fk=$(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),pk=`data-recharts-item-index`,mk=`data-recharts-item-id`;function hk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?hk(Object(n),!0).forEach(function(t){_k(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _k(e,t,n){return(t=vk(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vk(e){var t=yk(e,`string`);return typeof t==`symbol`?t:t+``}function yk(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var bk=e=>e.brush.height;function xk(e){return fk(e).reduce((e,t)=>t.orientation===`left`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function Sk(e){return fk(e).reduce((e,t)=>t.orientation===`right`&&!t.mirror&&!t.hide?e+(typeof t.width==`number`?t.width:60):e,0)}function Ck(e){return dk(e).reduce((e,t)=>t.orientation===`top`&&!t.mirror&&!t.hide?e+t.height:e,0)}function wk(e){return dk(e).reduce((e,t)=>t.orientation===`bottom`&&!t.mirror&&!t.hide?e+t.height:e,0)}var Tk=$([sk,ck,uk,bk,xk,Sk,Ck,wk,ET,see],(e,t,n,r,i,a,o,s,c,l)=>{var u={left:(n.left||0)+i,right:(n.right||0)+a},d=gk(gk({},{top:(n.top||0)+o,bottom:(n.bottom||0)+s}),u),f=d.bottom;d.bottom+=r,d=BO(d,c,l);var p=e-d.left-d.right,m=t-d.top-d.bottom;return gk(gk({brushBottom:f},d),{},{width:Math.max(p,0),height:Math.max(m,0)})}),Ek=$(Tk,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),Dk=$(sk,ck,(e,t)=>({x:0,y:0,width:e,height:t})),Ok=(0,v.createContext)(null),kk=()=>(0,v.useContext)(Ok)!=null,Ak=e=>e.brush,jk=$([Ak,Tk,uk],(e,t,n)=>({height:e.height,x:Z(e.x)?e.x:t.left,y:Z(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:Z(e.width)?e.width:t.width}));function Mk(e,t,{signal:n,edges:r}={}){let i,a=null,o=r!=null&&r.includes(`leading`),s=r==null||r.includes(`trailing`),c=()=>{a!==null&&(e.apply(i,a),i=void 0,a=null)},l=()=>{s&&c(),p()},u=null,d=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,l()},t)},f=()=>{u!==null&&(clearTimeout(u),u=null)},p=()=>{f(),i=void 0,a=null},m=()=>{c()},h=function(...e){if(n?.aborted)return;i=this,a=e;let t=u==null;d(),o&&t&&c()};return h.schedule=d,h.cancel=p,h.flush=m,n?.addEventListener(`abort`,p,{once:!0}),h}function Nk(e,t=0,n={}){typeof n!=`object`&&(n={});let{leading:r=!1,trailing:i=!0,maxWait:a}=n,o=[,,];r&&(o[0]=`leading`),i&&(o[1]=`trailing`);let s,c=null,l=Mk(function(...t){s=e.apply(this,t),c=null},t,{edges:o}),u=function(...t){return a!=null&&(c===null&&(c=Date.now()),Date.now()-c>=a)?(s=e.apply(this,t),c=Date.now(),l.cancel(),l.schedule(),s):(l.apply(this,t),s)};return u.cancel=l.cancel,u.flush=()=>(l.flush(),s),u}function Pk(e,t=0,n={}){let{leading:r=!0,trailing:i=!0}=n;return Nk(e,t,{leading:r,maxWait:t,trailing:i})}var Fk=function(e,t){var n=[...arguments].slice(2);if(typeof console<`u`&&console.warn&&(t===void 0&&console.warn(`LogUtils requires an error message argument`),!e))if(t===void 0)console.warn(`Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.`);else{var r=0;console.warn(t.replace(/%s/g,()=>n[r++]))}},Ik={width:`100%`,height:`100%`,debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},Lk=(e,t,n)=>{var r=n.width,i=r===void 0?Ik.width:r,a=n.height,o=a===void 0?Ik.height:a,s=n.aspect,c=n.maxHeight,l=_C(i)?e:Number(i),u=_C(o)?t:Number(o);return s&&s>0&&(l?u=l/s:u&&(l=u*s),c&&u!=null&&u>c&&(u=c)),{calculatedWidth:l,calculatedHeight:u}},Rk={width:0,height:0,overflow:`visible`},zk={width:0,overflowX:`visible`},Bk={height:0,overflowY:`visible`},Vk={},Hk=e=>{var t=e.width,n=e.height,r=_C(t),i=_C(n);return r&&i?Rk:r?zk:i?Bk:Vk};function Uk(e){var t=e.width,n=e.height,r=e.aspect,i=t,a=n;return i===void 0&&a===void 0?(i=Ik.width,a=Ik.height):i===void 0?i=r&&r>0?void 0:Ik.width:a===void 0&&(a=r&&r>0?void 0:Ik.height),{width:i,height:a}}var Wk=[`aspect`,`initialDimension`,`width`,`height`,`minWidth`,`minHeight`,`maxHeight`,`children`,`debounce`,`id`,`className`,`onResize`,`style`];function Gk(){return Gk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gk.apply(null,arguments)}function Kk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Kk(Object(n),!0).forEach(function(t){Jk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Jk(e,t,n){return(t=Yk(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yk(e){var t=Xk(e,`string`);return typeof t==`symbol`?t:t+``}function Xk(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Zk(e,t){return nA(e)||tA(e,t)||$k(e,t)||Qk()}function Qk(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
82
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $k(e,t){if(e){if(typeof e==`string`)return eA(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?eA(e,t):void 0}}function eA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tA(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function nA(e){if(Array.isArray(e))return e}function rA(e,t){if(e==null)return{};var n,r,i=iA(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function iA(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var aA=(0,v.createContext)(Ik.initialDimension);function oA(e){return NO(e.width)&&NO(e.height)}function sA(e){var t=e.children,n=e.width,r=e.height,i=(0,v.useMemo)(()=>({width:n,height:r}),[n,r]);return oA(i)?v.createElement(aA.Provider,{value:i},t):null}var cA=()=>(0,v.useContext)(aA),lA=(0,v.forwardRef)((e,t)=>{var n=e.aspect,r=e.initialDimension,i=r===void 0?Ik.initialDimension:r,a=e.width,o=e.height,s=e.minWidth,c=s===void 0?Ik.minWidth:s,l=e.minHeight,u=e.maxHeight,d=e.children,f=e.debounce,p=f===void 0?Ik.debounce:f,m=e.id,h=e.className,g=e.onResize,_=e.style,y=_===void 0?{}:_,b=rA(e,Wk),x=(0,v.useRef)(null),S=(0,v.useRef)();S.current=g,(0,v.useImperativeHandle)(t,()=>x.current);var C=Zk((0,v.useState)({containerWidth:i.width,containerHeight:i.height}),2),w=C[0],T=C[1],E=(0,v.useCallback)((e,t)=>{T(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]);(0,v.useEffect)(()=>{if(x.current==null||typeof ResizeObserver>`u`)return OC;var e=e=>{var t,n=e[0];if(n!=null){var r=n.contentRect,i=r.width,a=r.height;E(i,a),(t=S.current)==null||t.call(S,i,a)}};p>0&&(e=Pk(e,p,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=x.current.getBoundingClientRect(),r=n.width,i=n.height;return E(r,i),t.observe(x.current),()=>{t.disconnect()}},[E,p]);var D=w.containerWidth,O=w.containerHeight;Fk(!n||n>0,`The aspect(%s) must be greater than zero.`,n);var k=Lk(D,O,{width:a,height:o,aspect:n,maxHeight:u}),A=k.calculatedWidth,j=k.calculatedHeight;return Fk(D<0||O<0||A!=null&&A>0||j!=null&&j>0,`The width(%s) and height(%s) of chart should be greater than 0,
83
83
  please check the style of container, or the props width(%s) and height(%s),
84
84
  or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
85
- height and width.`,A,j,a,o,c,l,n),v.createElement(`div`,Kk({id:m?`${m}`:void 0,className:dv(`recharts-responsive-container`,h),style:Jk(Jk({},y),{},{width:a,height:o,minWidth:c,minHeight:l,maxHeight:u}),ref:x},b),v.createElement(`div`,{style:Uk({width:a,height:o})},v.createElement(cA,{width:A,height:j},d)))}),dA=(0,v.forwardRef)((e,t)=>{var n=lA();if(PO(n.width)&&PO(n.height))return e.children;var r=Wk({width:e.width,height:e.height,aspect:e.aspect}),i=r.width,a=r.height,o=Rk(void 0,void 0,{width:i,height:a,aspect:e.aspect,maxHeight:e.maxHeight}),s=o.calculatedWidth,c=o.calculatedHeight;return Z(s)&&Z(c)?v.createElement(cA,{width:s,height:c},e.children):v.createElement(uA,Kk({},e,{width:i,height:a,ref:t}))});function fA(e){if(e)return{x:e.x,y:e.y,upperWidth:`upperWidth`in e?e.upperWidth:e.width,lowerWidth:`lowerWidth`in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var pA=()=>{var e=Ak(),t=Q(Dk),n=Q(Mk),r=Q(jk)?.padding;return!e||!n||!r?t:{width:n.width-r.left-r.right,height:n.height-r.top-r.bottom,x:r.left,y:r.top}},mA={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},hA=()=>Q(Ek)??mA,gA=()=>Q(ck),_A=()=>Q(lk),vA=e=>e.layout.layoutType,yA=()=>Q(vA),bA=()=>{var e=yA();if(e===`horizontal`||e===`vertical`)return e},xA=e=>{var t=e.layout.layoutType;if(t===`centric`||t===`radial`)return t},SA=()=>Q(xA),CA=()=>yA()!==void 0,wA=e=>{var t=$w(),n=Ak(),r=e.width,i=e.height,a=lA(),o=r,s=i;return a&&(o=a.width>0?a.width:r,s=a.height>0?a.height:i),(0,v.useEffect)(()=>{!n&&PO(o)&&PO(s)&&t(kO({width:o,height:s}))},[t,n,o,s]),null},TA=Symbol.for(`immer-nothing`),EA=Symbol.for(`immer-draftable`),DA=Symbol.for(`immer-state`);function OA(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var kA=Object,AA=kA.getPrototypeOf,jA=`constructor`,MA=`prototype`,NA=`configurable`,PA=`enumerable`,FA=`writable`,IA=`value`,LA=e=>!!e&&!!e[DA];function RA(e){return e?BA(e)||qA(e)||!!e[EA]||!!e[jA]?.[EA]||JA(e)||YA(e):!1}var fee=kA[MA][jA].toString(),zA=new WeakMap;function BA(e){if(!e||!XA(e))return!1;let t=AA(e);if(t===null||t===kA[MA])return!0;let n=kA.hasOwnProperty.call(t,jA)&&t[jA];if(n===Object)return!0;if(!ZA(n))return!1;let r=zA.get(n);return r===void 0&&(r=Function.toString.call(n),zA.set(n,r)),r===fee}function VA(e,t,n=!0){HA(e)===0?(n?Reflect.ownKeys(e):kA.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function HA(e){let t=e[DA];return t?t.type_:qA(e)?1:JA(e)?2:YA(e)?3:0}var UA=(e,t,n=HA(e))=>n===2?e.has(t):kA[MA].hasOwnProperty.call(e,t),WA=(e,t,n=HA(e))=>n===2?e.get(t):e[t],GA=(e,t,n,r=HA(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function KA(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var qA=Array.isArray,JA=e=>e instanceof Map,YA=e=>e instanceof Set,XA=e=>typeof e==`object`,ZA=e=>typeof e==`function`,QA=e=>typeof e==`boolean`;function $A(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var ej=e=>e.copy_||e.base_,tj=e=>e.modified_?e.copy_:e.base_;function nj(e,t){if(JA(e))return new Map(e);if(YA(e))return new Set(e);if(qA(e))return Array[MA].slice.call(e);let n=BA(e);if(t===!0||t===`class_only`&&!n){let t=kA.getOwnPropertyDescriptors(e);delete t[DA];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[FA]===!1&&(a[FA]=!0,a[NA]=!0),(a.get||a.set)&&(t[i]={[NA]:!0,[FA]:!0,[PA]:a[PA],[IA]:e[i]})}return kA.create(AA(e),t)}else{let t=AA(e);if(t!==null&&n)return{...e};let r=kA.create(t);return kA.assign(r,e)}}function rj(e,t=!1){return oj(e)||LA(e)||!RA(e)?e:(HA(e)>1&&kA.defineProperties(e,{set:aj,add:aj,clear:aj,delete:aj}),kA.freeze(e),t&&VA(e,(e,t)=>{rj(t,!0)},!1),e)}function ij(){OA(2)}var aj={[IA]:ij};function oj(e){return e===null||!XA(e)?!0:kA.isFrozen(e)}var sj=`MapSet`,cj=`Patches`,lj=`ArrayMethods`,uj={};function dj(e){let t=uj[e];return t||OA(0,e),t}var fj=e=>!!uj[e],pj,mj=()=>pj,hj=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:fj(sj)?dj(sj):void 0,arrayMethodsPlugin_:fj(lj)?dj(lj):void 0});function gj(e,t){t&&(e.patchPlugin_=dj(cj),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function _j(e){vj(e),e.drafts_.forEach(bj),e.drafts_=null}function vj(e){e===pj&&(pj=e.parent_)}var yj=e=>pj=hj(pj,e);function bj(e){let t=e[DA];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function xj(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[DA].modified_&&(_j(t),OA(4)),RA(e)&&(e=Sj(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[DA].base_,e,t)}else e=Sj(t,n);return Cj(t,e,!0),_j(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===TA?void 0:e}function Sj(e,t){if(oj(t))return t;let n=t[DA];if(!n)return jj(t,e.handledSet_,e);if(!Tj(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);kj(n,e)}return n.copy_}function Cj(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&rj(t,n)}function wj(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Tj=(e,t)=>e.scope_===t,Ej=[];function Dj(e,t,n,r){let i=ej(e),a=e.type_;if(r!==void 0&&WA(i,r,a)===t){GA(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;VA(i,(e,n)=>{if(LA(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??Ej;for(let e of o)GA(i,e,n,a)}function Oj(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!Tj(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=tj(i);Dj(e,i.draft_??i,a,n),kj(i,r)})}function kj(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}wj(e)}}function Aj(e,t,n){let{scope_:r}=e;if(LA(n)){let i=n[DA];Tj(i,r)&&i.callbacks_.push(function(){zj(e),Dj(e,n,tj(i),t)})}else RA(n)&&e.callbacks_.push(function(){let i=ej(e);e.type_===3?i.has(n)&&jj(n,r.handledSet_,r):WA(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&jj(WA(e.copy_,t,e.type_),r.handledSet_,r)})}function jj(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||LA(e)||t.has(e)||!RA(e)||oj(e)?e:(t.add(e),VA(e,(r,i)=>{if(LA(i)){let t=i[DA];Tj(t,n)&&(GA(e,r,tj(t),e.type_),wj(t))}else RA(i)&&jj(i,t,n)}),e)}function Mj(e,t){let n=qA(e),r={type_:+!!n,scope_:t?t.scope_:mj(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=Nj;n&&(i=[r],a=Pj);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var Nj={get(e,t){if(t===DA)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=ej(e);if(!UA(i,t,e.type_))return Ij(e,i,t);let a=i[t];if(e.finalized_||!RA(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&$A(t))return a;if(a===Fj(e.base_,t)){zj(e);let n=e.type_===1?+t:t,r=Vj(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in ej(e)},ownKeys(e){return Reflect.ownKeys(ej(e))},set(e,t,n){let r=Lj(ej(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=Fj(ej(e),t),i=r?.[DA];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(KA(n,r)&&(n!==void 0||UA(e.base_,t,e.type_)))return!0;zj(e),Rj(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),Aj(e,t,n),!0)},deleteProperty(e,t){return zj(e),Fj(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Rj(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=ej(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[FA]:!0,[NA]:e.type_!==1||t!==`length`,[PA]:r[PA],[IA]:n[t]}},defineProperty(){OA(11)},getPrototypeOf(e){return AA(e.base_)},setPrototypeOf(){OA(12)}},Pj={};for(let e in Nj){let t=Nj[e];Pj[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}Pj.deleteProperty=function(e,t){return Pj.set.call(this,e,t,void 0)},Pj.set=function(e,t,n){return Nj.set.call(this,e[0],t,n,e[0])};function Fj(e,t){let n=e[DA];return(n?ej(n):e)[t]}function Ij(e,t,n){let r=Lj(t,n);return r?IA in r?r[IA]:r.get?.call(e.draft_):void 0}function Lj(e,t){if(!(t in e))return;let n=AA(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=AA(n)}}function Rj(e){e.modified_||(e.modified_=!0,e.parent_&&Rj(e.parent_))}function zj(e){e.copy_||=(e.assigned_=new Map,nj(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Bj=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(ZA(e)&&!ZA(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}ZA(t)||OA(6),n!==void 0&&!ZA(n)&&OA(7);let r;if(RA(e)){let i=yj(this),a=Vj(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?_j(i):vj(i)}return gj(i,n),xj(r,i)}else if(!e||!XA(e)){if(r=t(e),r===void 0&&(r=e),r===TA&&(r=void 0),this.autoFreeze_&&rj(r,!0),n){let t=[],i=[];dj(cj).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}else OA(1,e)},this.produceWithPatches=(e,t)=>{if(ZA(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},QA(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),QA(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),QA(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){RA(e)||OA(8),LA(e)&&(e=Hj(e));let t=yj(this),n=Vj(t,e,void 0);return n[DA].isManual_=!0,vj(t),n}finishDraft(e,t){let n=e&&e[DA];(!n||!n.isManual_)&&OA(9);let{scope_:r}=n;return gj(r,t),xj(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=dj(cj).applyPatches_;return LA(e)?r(e,t):this.produce(e,e=>r(e,t))}};function Vj(e,t,n,r){let[i,a]=JA(t)?dj(sj).proxyMap_(t,n):YA(t)?dj(sj).proxySet_(t,n):Mj(t,n);return(n?.scope_??mj()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?Oj(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function Hj(e){return LA(e)||OA(10,e),Uj(e)}function Uj(e){if(!RA(e)||oj(e))return e;let t=e[DA],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=nj(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=nj(e,!0);return VA(n,(e,t)=>{GA(n,e,Uj(t))},r),t&&(t.finalized_=!1),n}new Bj().produce;var Wj=e=>e,Gj=LD({name:`legend`,initialState:{settings:{layout:`horizontal`,align:`center`,verticalAlign:`bottom`,itemSorter:`value`},size:{width:0,height:0},payload:[]},reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(Wj(t.payload))},prepare:SD()},replaceLegendPayload:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next,a=cD(e).payload.indexOf(Wj(r));a>-1&&(e.payload[a]=Wj(i))},prepare:SD()},removeLegendPayload:{reducer(e,t){var n=cD(e).payload.indexOf(Wj(t.payload));n>-1&&e.payload.splice(n,1)},prepare:SD()}}}),Kj=Gj.actions;Kj.setLegendSize,Kj.setLegendSettings;var qj=Kj.addLegendPayload,Jj=Kj.replaceLegendPayload,Yj=Kj.removeLegendPayload,Xj=Gj.reducer,Zj=o((e=>{var t=d();t.useSyncExternalStore,t.useRef,t.useEffect,t.useMemo,t.useDebugValue}));o(((e,t)=>{t.exports=Zj()}))();function Qj(e){e()}function $j(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Qj(()=>{let t=e;for(;t;)t.callback(),t=t.next})},get(){let t=[],n=e;for(;n;)t.push(n),n=n.next;return t},subscribe(n){let r=!0,i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var eM={notify(){},get:()=>[]};function tM(e,t){let n,r=eM,i=0,a=!1;function o(e){u();let t=r.subscribe(e),n=!1;return()=>{n||(n=!0,t(),d())}}function s(){r.notify()}function c(){m.onStateChange&&m.onStateChange()}function l(){return a}function u(){i++,n||(n=t?t.addNestedSub(c):e.subscribe(c),r=$j())}function d(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=eM)}function f(){a||(a=!0,u())}function p(){a&&(a=!1,d())}let m={addNestedSub:o,notifyNestedSubs:s,handleChangeWrapper:c,isSubscribed:l,trySubscribe:f,tryUnsubscribe:p,getListeners:()=>r};return m}var nM=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,rM=typeof navigator<`u`&&navigator.product===`ReactNative`,iM=nM||rM?v.useLayoutEffect:v.useEffect;function aM(e,t){return e===t?e!==0||t!==0||1/e==1/t:e!==e&&t!==t}function oM(e,t){if(aM(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!aM(e[n[r]],t[n[r]]))return!1;return!0}var sM=Symbol.for(`react-redux-context`),cM=typeof globalThis<`u`?globalThis:{};function lM(){if(!v.createContext)return{};let e=cM[sM]??=new Map,t=e.get(v.createContext);return t||(t=v.createContext(null),e.set(v.createContext,t)),t}var uM=lM();function dM(e){let{children:t,context:n,serverState:r,store:i}=e,a=v.useMemo(()=>{let e=tM(i);return{store:i,subscription:e,getServerState:r?()=>r:void 0}},[i,r]),o=v.useMemo(()=>i.getState(),[i]);iM(()=>{let{subscription:e}=a;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),o!==i.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[a,o]);let s=n||uM;return v.createElement(s.Provider,{value:a},t)}var fM=dM,pM=new Set([`axisLine`,`tickLine`,`activeBar`,`activeDot`,`activeLabel`,`activeShape`,`allowEscapeViewBox`,`background`,`cursor`,`dot`,`label`,`line`,`margin`,`padding`,`position`,`shape`,`style`,`tick`,`wrapperStyle`,`radius`,`throttledEvents`]);function mM(e,t){return e==null&&t==null?!0:typeof e==`number`&&typeof t==`number`?e===t||e!==e&&t!==t:e===t}function hM(e,t){for(var n of new Set([...Object.keys(e),...Object.keys(t)]))if(pM.has(n)){if(e[n]==null&&t[n]==null)continue;if(!oM(e[n],t[n]))return!1}else if(!mM(e[n],t[n]))return!1;return!0}function gM(){return gM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gM.apply(null,arguments)}function _M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function vM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?_M(Object(n),!0).forEach(function(t){yM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_M(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function yM(e,t,n){return(t=bM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bM(e){var t=xM(e,`string`);return typeof t==`symbol`?t:t+``}function xM(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function SM(e,t){return DM(e)||EM(e,t)||wM(e,t)||CM()}function CM(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
86
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wM(e,t){if(e){if(typeof e==`string`)return TM(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?TM(e,t):void 0}}function TM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function EM(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function DM(e){if(Array.isArray(e))return e}function OM(e){return Array.isArray(e)&&vC(e[0])&&vC(e[1])?e.join(` ~ `):e}var kM={separator:` : `,contentStyle:{margin:0,padding:10,backgroundColor:`#fff`,border:`1px solid #ccc`,whiteSpace:`nowrap`},itemStyle:{display:`block`,paddingTop:4,paddingBottom:4,color:`#000`},labelStyle:{},accessibilityLayer:!1};function AM(e,t){return t==null?e:TT(e,t)}var jM=e=>{var t=e.separator,n=t===void 0?kM.separator:t,r=e.contentStyle,i=e.itemStyle,a=e.labelStyle,o=a===void 0?kM.labelStyle:a,s=e.payload,c=e.formatter,l=e.itemSorter,u=e.wrapperClassName,d=e.labelClassName,f=e.label,p=e.labelFormatter,m=e.accessibilityLayer,h=m===void 0?kM.accessibilityLayer:m,g=()=>{if(s&&s.length){var e={padding:0,margin:0},t=AM(s,l).map((e,t)=>{if(!e||e.type===`none`)return null;var r=e.formatter||c||OM,a=e.value,o=e.name,l=a,u=o;if(r){var d=r(a,o,e,t,s);if(Array.isArray(d)){var f=SM(d,2);l=f[0],u=f[1]}else if(d!=null)l=d;else return null}var p=vM(vM({},kM.itemStyle),{},{color:e.color||kM.itemStyle.color},i);return v.createElement(`li`,{className:`recharts-tooltip-item`,key:`tooltip-item-${t}`,style:p},vC(u)?v.createElement(`span`,{className:`recharts-tooltip-item-name`},u):null,vC(u)?v.createElement(`span`,{className:`recharts-tooltip-item-separator`},n):null,v.createElement(`span`,{className:`recharts-tooltip-item-value`},l),v.createElement(`span`,{className:`recharts-tooltip-item-unit`},e.unit||``))});return v.createElement(`ul`,{className:`recharts-tooltip-item-list`,style:e},t)}return null},_=vM(vM({},kM.contentStyle),r),y=vM({margin:0},o),b=!TC(f),x=b?f:``,S=dv(`recharts-default-tooltip`,u),C=dv(`recharts-tooltip-label`,d);b&&p&&s!=null&&(x=p(f,s));var w=h?{role:`status`,"aria-live":`assertive`}:{};return v.createElement(`div`,gM({className:S,style:_},w),v.createElement(`p`,{className:C,style:y},v.isValidElement(x)?x:`${x}`),g())},MM=`recharts-tooltip-wrapper`,NM={visibility:`hidden`};function PM(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return dv(MM,{[`${MM}-right`]:Z(n)&&t&&Z(t.x)&&n>=t.x,[`${MM}-left`]:Z(n)&&t&&Z(t.x)&&n<t.x,[`${MM}-bottom`]:Z(r)&&t&&Z(t.y)&&r>=t.y,[`${MM}-top`]:Z(r)&&t&&Z(t.y)&&r<t.y})}function FM(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offset,a=e.position,o=e.reverseDirection,s=e.tooltipDimension,c=e.viewBox,l=e.viewBoxDimension;if(a&&Z(a[r]))return a[r];var u=n[r]-s-(i>0?i:0),d=n[r]+i;if(t[r])return o[r]?u:d;var f=c[r];return f==null?0:o[r]?Math.max(u<f?d:u,f):l==null?0:d+s>f+l?Math.max(u,f):Math.max(d,f)}function IM(e){var t=e.translateX,n=e.translateY;return{transform:e.useTranslate3d?`translate3d(${t}px, ${n}px, 0)`:`translate(${t}px, ${n}px)`}}function LM(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTop,i=e.offsetLeft,a=e.position,o=e.reverseDirection,s=e.tooltipBox,c=e.useTranslate3d,l=e.viewBox,u,d,f;return s.height>0&&s.width>0&&n?(d=FM({allowEscapeViewBox:t,coordinate:n,key:`x`,offset:i,position:a,reverseDirection:o,tooltipDimension:s.width,viewBox:l,viewBoxDimension:l.width}),f=FM({allowEscapeViewBox:t,coordinate:n,key:`y`,offset:r,position:a,reverseDirection:o,tooltipDimension:s.height,viewBox:l,viewBoxDimension:l.height}),u=IM({translateX:d,translateY:f,useTranslate3d:c})):u=NM,{cssProperties:u,cssClasses:PM({translateX:d,translateY:f,coordinate:n})}}var RM={devToolsEnabled:!0,isSsr:!(typeof window<`u`&&window.document&&window.document.createElement&&window.setTimeout)};function zM(e,t){return WM(e)||UM(e,t)||VM(e,t)||BM()}function BM(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
87
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VM(e,t){if(e){if(typeof e==`string`)return HM(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?HM(e,t):void 0}}function HM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function UM(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function WM(e){if(Array.isArray(e))return e}function GM(){var e=zM((0,v.useState)(()=>RM.isSsr||!window.matchMedia?!1:window.matchMedia(`(prefers-reduced-motion: reduce)`).matches),2),t=e[0],n=e[1];return(0,v.useEffect)(()=>{if(window.matchMedia){var e=window.matchMedia(`(prefers-reduced-motion: reduce)`),t=()=>{n(e.matches)};return e.addEventListener(`change`,t),()=>{e.removeEventListener(`change`,t)}}},[]),t}function KM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?KM(Object(n),!0).forEach(function(t){JM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function JM(e,t,n){return(t=YM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YM(e){var t=XM(e,`string`);return typeof t==`symbol`?t:t+``}function XM(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ZM(e,t){return nN(e)||tN(e,t)||$M(e,t)||QM()}function QM(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
88
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $M(e,t){if(e){if(typeof e==`string`)return eN(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?eN(e,t):void 0}}function eN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function tN(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function nN(e){if(Array.isArray(e))return e}function rN(e){if(!(e.prefersReducedMotion&&e.isAnimationActive===`auto`)&&e.isAnimationActive&&e.active){var t=typeof e.animationEasing==`string`?e.animationEasing:`ease`;return`transform ${e.animationDuration}ms ${t}`}}function iN(e){var t=GM(),n=ZM(v.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})),2),r=n[0],i=n[1];v.useEffect(()=>{var t=t=>{t.key===`Escape`&&i({dismissed:!0,dismissedAtCoordinate:{x:e.coordinate?.x??0,y:e.coordinate?.y??0}})};return document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`keydown`,t)}},[e.coordinate?.x,e.coordinate?.y]),r.dismissed&&((e.coordinate?.x??0)!==r.dismissedAtCoordinate.x||(e.coordinate?.y??0)!==r.dismissedAtCoordinate.y)&&i(qM(qM({},r),{},{dismissed:!1}));var a=LM({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset==`number`?e.offset:e.offset.x,offsetTop:typeof e.offset==`number`?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),o=a.cssClasses,s=a.cssProperties,c=qM(qM({},e.hasPortalFromProps?{}:qM(qM({transition:rN({prefersReducedMotion:t,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},s),{},{pointerEvents:`none`,position:`absolute`,top:0,left:0})),{},{visibility:!r.dismissed&&e.active&&e.hasPayload?`visible`:`hidden`},e.wrapperStyle);return v.createElement(`div`,{xmlns:`http://www.w3.org/1999/xhtml`,tabIndex:-1,className:o,style:c,ref:e.innerRef},e.children)}var aN=v.memo(iN),oN=()=>Q(e=>e.rootProps.accessibilityLayer)??!0;function sN(){return sN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sN.apply(null,arguments)}function cN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?cN(Object(n),!0).forEach(function(t){uN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function uN(e,t,n){return(t=dN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dN(e){var t=fN(e,`string`);return typeof t==`symbol`?t:t+``}function fN(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var pN={curveBasisClosed:AS,curveBasisOpen:MS,curveBasis:OS,curveBumpX:CS,curveBumpY:wS,curveLinearClosed:PS,curveLinear:_S,curveMonotoneX:HS,curveMonotoneY:US,curveNatural:KS,curveStep:JS,curveStepAfter:XS,curveStepBefore:YS},mN=e=>NO(e.x)&&NO(e.y),hN=e=>e.base!=null&&mN(e.base)&&mN(e),gN=e=>e.x,_N=e=>e.y,vN=(e,t)=>{if(typeof e==`function`)return e;var n=`curve${EC(e)}`;if((n===`curveMonotone`||n===`curveBump`)&&t){var r=pN[`${n}${t===`vertical`?`Y`:`X`}`];if(r)return r}return pN[n]||_S},yN={connectNulls:!1,type:`linear`},bN=e=>{var t=e.type,n=t===void 0?yN.type:t,r=e.points,i=r===void 0?[]:r,a=e.baseLine,o=e.layout,s=e.connectNulls,c=s===void 0?yN.connectNulls:s,l=vN(n,o),u=c?i.filter(mN):i;if(Array.isArray(a)){var d,f=i.map((e,t)=>lN(lN({},e),{},{base:a[t]}));return d=o===`vertical`?xS().y(_N).x1(gN).x0(e=>e.base.x):xS().x(gN).y1(_N).y0(e=>e.base.y),d.defined(hN).curve(l)(c?f.filter(hN):f)}return(o===`vertical`&&Z(a)?xS().y(_N).x1(gN).x0(a):Z(a)?xS().x(gN).y1(_N).y0(a):bS().x(gN).y(_N)).defined(mN).curve(l)(u)},xN=e=>{var t=e.className,n=e.points,r=e.path,i=e.pathRef,a=yA();if((!n||!n.length)&&!r)return null;var o={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||a,connectNulls:e.connectNulls},s=n&&n.length?bN(o):r;return v.createElement(`path`,sN({},Wx(e),AC(e),{className:dv(`recharts-curve`,t),d:s===null?void 0:s,ref:i}))},SN=[`x`,`y`,`top`,`left`,`width`,`height`,`className`];function CN(){return CN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},CN.apply(null,arguments)}function wN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function TN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?wN(Object(n),!0).forEach(function(t){EN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function EN(e,t,n){return(t=DN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DN(e){var t=ON(e,`string`);return typeof t==`symbol`?t:t+``}function ON(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function kN(e,t){if(e==null)return{};var n,r,i=AN(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function AN(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var jN=(e,t,n,r,i,a)=>`M${e},${i}v${r}M${a},${t}h${n}`,MN=e=>{var t=e.x,n=t===void 0?0:t,r=e.y,i=r===void 0?0:r,a=e.top,o=a===void 0?0:a,s=e.left,c=s===void 0?0:s,l=e.width,u=l===void 0?0:l,d=e.height,f=d===void 0?0:d,p=e.className,m=kN(e,SN),h=TN({x:n,y:i,top:o,left:c,width:u,height:f},m);return!Z(n)||!Z(i)||!Z(u)||!Z(f)||!Z(o)||!Z(c)?null:v.createElement(`path`,CN({},Kx(h),{className:dv(`recharts-cross`,p),d:jN(n,i,u,f,o,c)}))};function NN(e,t,n,r){var i=r/2;return{stroke:`none`,fill:`#ccc`,x:e===`horizontal`?t.x-i:n.left+.5,y:e===`horizontal`?n.top+.5:t.y-i,width:e===`horizontal`?r:n.width-1,height:e===`horizontal`?n.height-1:r}}var PN=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],FN=(e,t)=>e.map((e,n)=>e*t**n).reduce((e,t)=>e+t),IN=(e,t)=>n=>FN(PN(e,t),n),LN=(e,t)=>n=>FN([...PN(e,t).map((e,t)=>e*t).slice(1),0],n),RN=e=>{var t,n=e.split(`(`);if(n.length!==2||n[0]!==`cubic-bezier`)return null;var r=(t=n[1])==null||(t=t.split(`)`)[0])==null?void 0:t.split(`,`);if(r==null||r.length!==4)return null;var i=r.map(e=>parseFloat(e));return[i[0],i[1],i[2],i[3]]},zN=function(){var e=[...arguments];if(e.length===1)switch(e[0]){case`linear`:return[0,0,1,1];case`ease`:return[.25,.1,.25,1];case`ease-in`:return[.42,0,1,1];case`ease-out`:return[.42,0,.58,1];case`ease-in-out`:return[0,0,.58,1];default:var t=RN(e[0]);if(t)return t}return e.length===4?e:[0,0,1,1]},BN=(e,t,n,r)=>{var i=IN(e,n),a=IN(t,r),o=LN(e,n),s=e=>e>1?1:e<0?0:e,c=e=>{for(var t=e>1?1:e,n=t,r=0;r<8;++r){var c=i(n)-t,l=o(n);if(Math.abs(c-t)<1e-4||l<1e-4)return a(n);n=s(n-c/l)}return a(n)};return c.isStepper=!1,c},VN=function(){return BN(...zN(...arguments))},HN=function(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.stiff,n=t===void 0?100:t,r=e.damping,i=r===void 0?8:r,a=e.dt,o=a===void 0?16.67:a,s=1,c=[0],l=0,u=0,d=1e4,f=0;f<d;){var p=-(l-s)*n,m=u*i;if(u+=(p-m)*o/1e3,l+=u*o/1e3,c.push(l),Math.abs(l-s)<1e-4&&Math.abs(u)<1e-4)break;f++}c[c.length-1]=s;var h=c.length-1;return e=>{if(e<=0)return 0;if(e>=1)return s;var t=e*h,n=Math.floor(t),r=t-n;return(c[n]??0)+((c[n+1]??0)-(c[n]??0))*r}},UN=e=>{if(typeof e==`string`)switch(e){case`ease`:case`ease-in-out`:case`ease-out`:case`ease-in`:case`linear`:return VN(e);case`spring`:return HN();default:if(e.split(`(`)[0]===`cubic-bezier`)return VN(e)}return typeof e==`function`?e:null},WN=(0,v.createContext)((e,t,n)=>{var r,i=a=>{var o=t.tick(a);if(t.getState()===`active`){if(n(t.getInterpolated()),t.getProgress()===1){t.complete(),r=void 0;return}r=e.setTimeout(i,o);return}r=e.setTimeout(i,o)};return r=e.setTimeout(i,0),()=>r?.()});WN.Provider;function GN(e){var t=(0,v.useContext)(WN);return(0,v.useMemo)(()=>e??t,[e,t])}function KN(e,t,n){return(t=qN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qN(e){var t=JN(e,`string`);return typeof t==`symbol`?t:t+``}function JN(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var YN=`init`,XN=`pending`,ZN=`active`,QN=`completed`;function $N(e){return Math.max(0,e)}var eP=class{getAnimationStartedTime(){return this.animationStartedTime}getBeginStartedTime(){return this.beginStartedTime}constructor(e){var t;KN(this,`state`,YN),this.animationId=e.animationId,this.onAnimationEnd=e.onAnimationEnd,this.animationDuration=$N(e.animationDuration),this.animationBegin=$N(e.animationBegin),this.progress=0,this.from=e.from,this.to=e.to,this.easing=e.easing,(t=e.onAnimationStart)==null||t.call(e)}getState(){return this.state}getEasing(){return this.easing}getAnimationDuration(){return this.animationDuration}tick(e){if(this.getState()===YN)return this.state=XN,this.beginStartedTime=e,this.animationBegin;if(this.getState()===XN){if(this.beginStartedTime==null)throw Error();var t=e-this.beginStartedTime;return t>=this.animationBegin?(this.state=ZN,this.animationStartedTime=e,this.nextAnimationUpdate(0)):$N(this.animationBegin-t)}if(this.getState()===ZN){if(this.animationStartedTime==null)throw Error();var n=e-this.animationStartedTime;return this.setProgress(n/this.animationDuration),this.nextAnimationUpdate(n)}return 0}setProgress(e){this.progress=Math.min(1,Math.max(0,e))}getProgress(){return this.progress}complete(){if(this.progress=1,this.state===`active`){var e;(e=this.onAnimationEnd)==null||e.call(this)}this.state=QN}getFrom(){return this.from}getTo(){return this.to}getAnimationId(){return this.animationId}getAnimationBegin(){return this.animationBegin}},tP=class extends eP{nextAnimationUpdate(){return 0}getInterpolated(){return this.easing(CC(this.getFrom(),this.getTo(),this.getProgress()))}},nP=class{setTimeout(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),r=null,i=a=>{a-n>=t?e(a):r=requestAnimationFrame(i)};return r=requestAnimationFrame(i),()=>{r!=null&&cancelAnimationFrame(r)}}};function rP(e,t){return cP(e)||sP(e,t)||aP(e,t)||iP()}function iP(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
89
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aP(e,t){if(e){if(typeof e==`string`)return oP(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oP(e,t):void 0}}function oP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function sP(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function cP(e){if(Array.isArray(e))return e}var lP={begin:0,duration:1e3,easing:`ease`,isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},uP=0,dP=1;function fP(e){var t=RC(e,lP),n=t.animationId,r=t.isActive,i=t.canBegin,a=t.duration,o=t.easing,s=t.begin,c=t.onAnimationEnd,l=t.onAnimationStart,u=t.children,d=GM(),f=r===`auto`?!RM.isSsr&&!d:r,p=GN(t.animationController),m=rP((0,v.useState)(f?uP:dP),2),h=m[0],g=m[1];return(0,v.useEffect)(()=>{f||g(dP)},[f]),(0,v.useEffect)(()=>{var e=UN(o);return!f||!i||e==null?OC:p(new nP,new tP({animationId:n,easing:e,animationDuration:a,animationBegin:s,onAnimationStart:l,onAnimationEnd:c,from:uP,to:dP}),g)},[p,n,f,i,a,o,s,l,c]),u(Number(h))}function pP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`animation-`,n=(0,v.useRef)(bC(t)),r=(0,v.useRef)(e);return r.current!==e&&(n.current=bC(t),r.current=e),n.current}var mP=e=>e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`),hP=(e,t,n)=>e.map(e=>`${mP(e)} ${t}ms ${n}`).join(`,`),gP=[`radius`],_P=[`radius`],vP,yP,bP,xP,SP,CP,wP,TP,EP,DP;function OP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?OP(Object(n),!0).forEach(function(t){AP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function AP(e,t,n){return(t=jP(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jP(e){var t=MP(e,`string`);return typeof t==`symbol`?t:t+``}function MP(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function NP(){return NP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},NP.apply(null,arguments)}function PP(e,t){if(e==null)return{};var n,r,i=FP(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function FP(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function IP(e,t){return VP(e)||BP(e,t)||RP(e,t)||LP()}function LP(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
90
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RP(e,t){if(e){if(typeof e==`string`)return zP(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zP(e,t):void 0}}function zP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function BP(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function VP(e){if(Array.isArray(e))return e}function HP(e,t){return t||=e.slice(0),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var UP=(e,t,n,r,i)=>{var a=pC(n),o=pC(r),s=Math.min(Math.abs(a)/2,Math.abs(o)/2),c=o>=0?1:-1,l=a>=0?1:-1,u=+(o>=0&&a>=0||o<0&&a<0),d;if(s>0&&Array.isArray(i)){for(var f=[0,0,0,0],p=0,m=4;p<m;p++){var h=i[p]??0;f[p]=h>s?s:h}d=mC(vP||=HP([`M`,`,`,``]),e,t+c*f[0]),f[0]>0&&(d+=mC(yP||=HP([`A `,`,`,`,0,0,`,`,`,`,`,``]),f[0],f[0],u,e+l*f[0],t)),d+=mC(bP||=HP([`L `,`,`,``]),e+n-l*f[1],t),f[1]>0&&(d+=mC(xP||=HP([`A `,`,`,`,0,0,`,`,
91
- `,`,`,``]),f[1],f[1],u,e+n,t+c*f[1])),d+=mC(SP||=HP([`L `,`,`,``]),e+n,t+r-c*f[2]),f[2]>0&&(d+=mC(CP||=HP([`A `,`,`,`,0,0,`,`,
92
- `,`,`,``]),f[2],f[2],u,e+n-l*f[2],t+r)),d+=mC(wP||=HP([`L `,`,`,``]),e+l*f[3],t+r),f[3]>0&&(d+=mC(TP||=HP([`A `,`,`,`,0,0,`,`,
93
- `,`,`,``]),f[3],f[3],u,e,t+r-c*f[3])),d+=`Z`}else if(s>0&&i===+i&&i>0){var g=Math.min(s,i);d=mC(EP||=HP(`M .,.
85
+ height and width.`,A,j,a,o,c,l,n),v.createElement(`div`,Gk({id:m?`${m}`:void 0,className:dv(`recharts-responsive-container`,h),style:qk(qk({},y),{},{width:a,height:o,minWidth:c,minHeight:l,maxHeight:u}),ref:x},b),v.createElement(`div`,{style:Hk({width:a,height:o})},v.createElement(sA,{width:A,height:j},d)))}),uA=(0,v.forwardRef)((e,t)=>{var n=cA();if(NO(n.width)&&NO(n.height))return e.children;var r=Uk({width:e.width,height:e.height,aspect:e.aspect}),i=r.width,a=r.height,o=Lk(void 0,void 0,{width:i,height:a,aspect:e.aspect,maxHeight:e.maxHeight}),s=o.calculatedWidth,c=o.calculatedHeight;return Z(s)&&Z(c)?v.createElement(sA,{width:s,height:c},e.children):v.createElement(lA,Gk({},e,{width:i,height:a,ref:t}))});function dA(e){if(e)return{x:e.x,y:e.y,upperWidth:`upperWidth`in e?e.upperWidth:e.width,lowerWidth:`lowerWidth`in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var fA=()=>{var e=kk(),t=Q(Ek),n=Q(jk),r=Q(Ak)?.padding;return!e||!n||!r?t:{width:n.width-r.left-r.right,height:n.height-r.top-r.bottom,x:r.left,y:r.top}},pA={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},mA=()=>Q(Tk)??pA,hA=()=>Q(sk),gA=()=>Q(ck),_A=e=>e.layout.layoutType,vA=()=>Q(_A),yA=()=>{var e=vA();if(e===`horizontal`||e===`vertical`)return e},bA=e=>{var t=e.layout.layoutType;if(t===`centric`||t===`radial`)return t},xA=()=>Q(bA),SA=()=>vA()!==void 0,CA=e=>{var t=$w(),n=kk(),r=e.width,i=e.height,a=cA(),o=r,s=i;return a&&(o=a.width>0?a.width:r,s=a.height>0?a.height:i),(0,v.useEffect)(()=>{!n&&NO(o)&&NO(s)&&t(OO({width:o,height:s}))},[t,n,o,s]),null},wA=Symbol.for(`immer-nothing`),TA=Symbol.for(`immer-draftable`),EA=Symbol.for(`immer-state`);function DA(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var OA=Object,kA=OA.getPrototypeOf,AA=`constructor`,jA=`prototype`,MA=`configurable`,NA=`enumerable`,PA=`writable`,FA=`value`,IA=e=>!!e&&!!e[EA];function LA(e){return e?zA(e)||KA(e)||!!e[TA]||!!e[AA]?.[TA]||qA(e)||JA(e):!1}var pee=OA[jA][AA].toString(),RA=new WeakMap;function zA(e){if(!e||!YA(e))return!1;let t=kA(e);if(t===null||t===OA[jA])return!0;let n=OA.hasOwnProperty.call(t,AA)&&t[AA];if(n===Object)return!0;if(!XA(n))return!1;let r=RA.get(n);return r===void 0&&(r=Function.toString.call(n),RA.set(n,r)),r===pee}function BA(e,t,n=!0){VA(e)===0?(n?Reflect.ownKeys(e):OA.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function VA(e){let t=e[EA];return t?t.type_:KA(e)?1:qA(e)?2:JA(e)?3:0}var HA=(e,t,n=VA(e))=>n===2?e.has(t):OA[jA].hasOwnProperty.call(e,t),UA=(e,t,n=VA(e))=>n===2?e.get(t):e[t],WA=(e,t,n,r=VA(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function GA(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var KA=Array.isArray,qA=e=>e instanceof Map,JA=e=>e instanceof Set,YA=e=>typeof e==`object`,XA=e=>typeof e==`function`,ZA=e=>typeof e==`boolean`;function QA(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var $A=e=>e.copy_||e.base_,ej=e=>e.modified_?e.copy_:e.base_;function tj(e,t){if(qA(e))return new Map(e);if(JA(e))return new Set(e);if(KA(e))return Array[jA].slice.call(e);let n=zA(e);if(t===!0||t===`class_only`&&!n){let t=OA.getOwnPropertyDescriptors(e);delete t[EA];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[PA]===!1&&(a[PA]=!0,a[MA]=!0),(a.get||a.set)&&(t[i]={[MA]:!0,[PA]:!0,[NA]:a[NA],[FA]:e[i]})}return OA.create(kA(e),t)}else{let t=kA(e);if(t!==null&&n)return{...e};let r=OA.create(t);return OA.assign(r,e)}}function nj(e,t=!1){return aj(e)||IA(e)||!LA(e)?e:(VA(e)>1&&OA.defineProperties(e,{set:ij,add:ij,clear:ij,delete:ij}),OA.freeze(e),t&&BA(e,(e,t)=>{nj(t,!0)},!1),e)}function rj(){DA(2)}var ij={[FA]:rj};function aj(e){return e===null||!YA(e)?!0:OA.isFrozen(e)}var oj=`MapSet`,sj=`Patches`,cj=`ArrayMethods`,lj={};function uj(e){let t=lj[e];return t||DA(0,e),t}var dj=e=>!!lj[e],fj,pj=()=>fj,mj=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:dj(oj)?uj(oj):void 0,arrayMethodsPlugin_:dj(cj)?uj(cj):void 0});function hj(e,t){t&&(e.patchPlugin_=uj(sj),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function gj(e){_j(e),e.drafts_.forEach(yj),e.drafts_=null}function _j(e){e===fj&&(fj=e.parent_)}var vj=e=>fj=mj(fj,e);function yj(e){let t=e[EA];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function bj(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[EA].modified_&&(gj(t),DA(4)),LA(e)&&(e=xj(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[EA].base_,e,t)}else e=xj(t,n);return Sj(t,e,!0),gj(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===wA?void 0:e}function xj(e,t){if(aj(t))return t;let n=t[EA];if(!n)return Aj(t,e.handledSet_,e);if(!wj(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);Oj(n,e)}return n.copy_}function Sj(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&nj(t,n)}function Cj(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var wj=(e,t)=>e.scope_===t,Tj=[];function Ej(e,t,n,r){let i=$A(e),a=e.type_;if(r!==void 0&&UA(i,r,a)===t){WA(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;BA(i,(e,n)=>{if(IA(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??Tj;for(let e of o)WA(i,e,n,a)}function Dj(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!wj(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=ej(i);Ej(e,i.draft_??i,a,n),Oj(i,r)})}function Oj(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}Cj(e)}}function kj(e,t,n){let{scope_:r}=e;if(IA(n)){let i=n[EA];wj(i,r)&&i.callbacks_.push(function(){Rj(e),Ej(e,n,ej(i),t)})}else LA(n)&&e.callbacks_.push(function(){let i=$A(e);e.type_===3?i.has(n)&&Aj(n,r.handledSet_,r):UA(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Aj(UA(e.copy_,t,e.type_),r.handledSet_,r)})}function Aj(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||IA(e)||t.has(e)||!LA(e)||aj(e)?e:(t.add(e),BA(e,(r,i)=>{if(IA(i)){let t=i[EA];wj(t,n)&&(WA(e,r,ej(t),e.type_),Cj(t))}else LA(i)&&Aj(i,t,n)}),e)}function jj(e,t){let n=KA(e),r={type_:+!!n,scope_:t?t.scope_:pj(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=Mj;n&&(i=[r],a=Nj);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var Mj={get(e,t){if(t===EA)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=$A(e);if(!HA(i,t,e.type_))return Fj(e,i,t);let a=i[t];if(e.finalized_||!LA(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&QA(t))return a;if(a===Pj(e.base_,t)){Rj(e);let n=e.type_===1?+t:t,r=Bj(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in $A(e)},ownKeys(e){return Reflect.ownKeys($A(e))},set(e,t,n){let r=Ij($A(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=Pj($A(e),t),i=r?.[EA];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(GA(n,r)&&(n!==void 0||HA(e.base_,t,e.type_)))return!0;Rj(e),Lj(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),kj(e,t,n),!0)},deleteProperty(e,t){return Rj(e),Pj(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Lj(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=$A(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[PA]:!0,[MA]:e.type_!==1||t!==`length`,[NA]:r[NA],[FA]:n[t]}},defineProperty(){DA(11)},getPrototypeOf(e){return kA(e.base_)},setPrototypeOf(){DA(12)}},Nj={};for(let e in Mj){let t=Mj[e];Nj[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}Nj.deleteProperty=function(e,t){return Nj.set.call(this,e,t,void 0)},Nj.set=function(e,t,n){return Mj.set.call(this,e[0],t,n,e[0])};function Pj(e,t){let n=e[EA];return(n?$A(n):e)[t]}function Fj(e,t,n){let r=Ij(t,n);return r?FA in r?r[FA]:r.get?.call(e.draft_):void 0}function Ij(e,t){if(!(t in e))return;let n=kA(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=kA(n)}}function Lj(e){e.modified_||(e.modified_=!0,e.parent_&&Lj(e.parent_))}function Rj(e){e.copy_||=(e.assigned_=new Map,tj(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var zj=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(XA(e)&&!XA(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}XA(t)||DA(6),n!==void 0&&!XA(n)&&DA(7);let r;if(LA(e)){let i=vj(this),a=Bj(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?gj(i):_j(i)}return hj(i,n),bj(r,i)}else if(!e||!YA(e)){if(r=t(e),r===void 0&&(r=e),r===wA&&(r=void 0),this.autoFreeze_&&nj(r,!0),n){let t=[],i=[];uj(sj).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}else DA(1,e)},this.produceWithPatches=(e,t)=>{if(XA(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},ZA(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),ZA(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),ZA(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){LA(e)||DA(8),IA(e)&&(e=Vj(e));let t=vj(this),n=Bj(t,e,void 0);return n[EA].isManual_=!0,_j(t),n}finishDraft(e,t){let n=e&&e[EA];(!n||!n.isManual_)&&DA(9);let{scope_:r}=n;return hj(r,t),bj(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=uj(sj).applyPatches_;return IA(e)?r(e,t):this.produce(e,e=>r(e,t))}};function Bj(e,t,n,r){let[i,a]=qA(t)?uj(oj).proxyMap_(t,n):JA(t)?uj(oj).proxySet_(t,n):jj(t,n);return(n?.scope_??pj()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?Dj(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function Vj(e){return IA(e)||DA(10,e),Hj(e)}function Hj(e){if(!LA(e)||aj(e))return e;let t=e[EA],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=tj(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=tj(e,!0);return BA(n,(e,t)=>{WA(n,e,Hj(t))},r),t&&(t.finalized_=!1),n}new zj().produce;var Uj=e=>e,Wj=ID({name:`legend`,initialState:{settings:{layout:`horizontal`,align:`center`,verticalAlign:`bottom`,itemSorter:`value`},size:{width:0,height:0},payload:[]},reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(Uj(t.payload))},prepare:xD()},replaceLegendPayload:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next,a=sD(e).payload.indexOf(Uj(r));a>-1&&(e.payload[a]=Uj(i))},prepare:xD()},removeLegendPayload:{reducer(e,t){var n=sD(e).payload.indexOf(Uj(t.payload));n>-1&&e.payload.splice(n,1)},prepare:xD()}}}),Gj=Wj.actions;Gj.setLegendSize,Gj.setLegendSettings;var Kj=Gj.addLegendPayload,qj=Gj.replaceLegendPayload,Jj=Gj.removeLegendPayload,Yj=Wj.reducer,Xj=o((e=>{var t=d();t.useSyncExternalStore,t.useRef,t.useEffect,t.useMemo,t.useDebugValue}));o(((e,t)=>{t.exports=Xj()}))();function Zj(e){e()}function Qj(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Zj(()=>{let t=e;for(;t;)t.callback(),t=t.next})},get(){let t=[],n=e;for(;n;)t.push(n),n=n.next;return t},subscribe(n){let r=!0,i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var $j={notify(){},get:()=>[]};function eM(e,t){let n,r=$j,i=0,a=!1;function o(e){u();let t=r.subscribe(e),n=!1;return()=>{n||(n=!0,t(),d())}}function s(){r.notify()}function c(){m.onStateChange&&m.onStateChange()}function l(){return a}function u(){i++,n||(n=t?t.addNestedSub(c):e.subscribe(c),r=Qj())}function d(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=$j)}function f(){a||(a=!0,u())}function p(){a&&(a=!1,d())}let m={addNestedSub:o,notifyNestedSubs:s,handleChangeWrapper:c,isSubscribed:l,trySubscribe:f,tryUnsubscribe:p,getListeners:()=>r};return m}var tM=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,nM=typeof navigator<`u`&&navigator.product===`ReactNative`,rM=tM||nM?v.useLayoutEffect:v.useEffect;function iM(e,t){return e===t?e!==0||t!==0||1/e==1/t:e!==e&&t!==t}function aM(e,t){if(iM(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!iM(e[n[r]],t[n[r]]))return!1;return!0}var oM=Symbol.for(`react-redux-context`),sM=typeof globalThis<`u`?globalThis:{};function cM(){if(!v.createContext)return{};let e=sM[oM]??=new Map,t=e.get(v.createContext);return t||(t=v.createContext(null),e.set(v.createContext,t)),t}var lM=cM();function uM(e){let{children:t,context:n,serverState:r,store:i}=e,a=v.useMemo(()=>{let e=eM(i);return{store:i,subscription:e,getServerState:r?()=>r:void 0}},[i,r]),o=v.useMemo(()=>i.getState(),[i]);rM(()=>{let{subscription:e}=a;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),o!==i.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[a,o]);let s=n||lM;return v.createElement(s.Provider,{value:a},t)}var dM=uM,fM=new Set([`axisLine`,`tickLine`,`activeBar`,`activeDot`,`activeLabel`,`activeShape`,`allowEscapeViewBox`,`background`,`cursor`,`dot`,`label`,`line`,`margin`,`padding`,`position`,`shape`,`style`,`tick`,`wrapperStyle`,`radius`,`throttledEvents`]);function pM(e,t){return e==null&&t==null?!0:typeof e==`number`&&typeof t==`number`?e===t||e!==e&&t!==t:e===t}function mM(e,t){for(var n of new Set([...Object.keys(e),...Object.keys(t)]))if(fM.has(n)){if(e[n]==null&&t[n]==null)continue;if(!aM(e[n],t[n]))return!1}else if(!pM(e[n],t[n]))return!1;return!0}function hM(){return hM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hM.apply(null,arguments)}function gM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _M(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?gM(Object(n),!0).forEach(function(t){vM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function vM(e,t,n){return(t=yM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yM(e){var t=bM(e,`string`);return typeof t==`symbol`?t:t+``}function bM(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function xM(e,t){return EM(e)||TM(e,t)||CM(e,t)||SM()}function SM(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
86
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function CM(e,t){if(e){if(typeof e==`string`)return wM(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wM(e,t):void 0}}function wM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function TM(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function EM(e){if(Array.isArray(e))return e}function DM(e){return Array.isArray(e)&&vC(e[0])&&vC(e[1])?e.join(` ~ `):e}var OM={separator:` : `,contentStyle:{margin:0,padding:10,backgroundColor:`#fff`,border:`1px solid #ccc`,whiteSpace:`nowrap`},itemStyle:{display:`block`,paddingTop:4,paddingBottom:4,color:`#000`},labelStyle:{},accessibilityLayer:!1};function kM(e,t){return t==null?e:TT(e,t)}var AM=e=>{var t=e.separator,n=t===void 0?OM.separator:t,r=e.contentStyle,i=e.itemStyle,a=e.labelStyle,o=a===void 0?OM.labelStyle:a,s=e.payload,c=e.formatter,l=e.itemSorter,u=e.wrapperClassName,d=e.labelClassName,f=e.label,p=e.labelFormatter,m=e.accessibilityLayer,h=m===void 0?OM.accessibilityLayer:m,g=()=>{if(s&&s.length){var e={padding:0,margin:0},t=kM(s,l).map((e,t)=>{if(!e||e.type===`none`)return null;var r=e.formatter||c||DM,a=e.value,o=e.name,l=a,u=o;if(r){var d=r(a,o,e,t,s);if(Array.isArray(d)){var f=xM(d,2);l=f[0],u=f[1]}else if(d!=null)l=d;else return null}var p=_M(_M({},OM.itemStyle),{},{color:e.color||OM.itemStyle.color},i);return v.createElement(`li`,{className:`recharts-tooltip-item`,key:`tooltip-item-${t}`,style:p},vC(u)?v.createElement(`span`,{className:`recharts-tooltip-item-name`},u):null,vC(u)?v.createElement(`span`,{className:`recharts-tooltip-item-separator`},n):null,v.createElement(`span`,{className:`recharts-tooltip-item-value`},l),v.createElement(`span`,{className:`recharts-tooltip-item-unit`},e.unit||``))});return v.createElement(`ul`,{className:`recharts-tooltip-item-list`,style:e},t)}return null},_=_M(_M({},OM.contentStyle),r),y=_M({margin:0},o),b=!TC(f),x=b?f:``,S=dv(`recharts-default-tooltip`,u),C=dv(`recharts-tooltip-label`,d);b&&p&&s!=null&&(x=p(f,s));var w=h?{role:`status`,"aria-live":`assertive`}:{};return v.createElement(`div`,hM({className:S,style:_},w),v.createElement(`p`,{className:C,style:y},v.isValidElement(x)?x:`${x}`),g())},jM=`recharts-tooltip-wrapper`,MM={visibility:`hidden`};function NM(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return dv(jM,{[`${jM}-right`]:Z(n)&&t&&Z(t.x)&&n>=t.x,[`${jM}-left`]:Z(n)&&t&&Z(t.x)&&n<t.x,[`${jM}-bottom`]:Z(r)&&t&&Z(t.y)&&r>=t.y,[`${jM}-top`]:Z(r)&&t&&Z(t.y)&&r<t.y})}function PM(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offset,a=e.position,o=e.reverseDirection,s=e.tooltipDimension,c=e.viewBox,l=e.viewBoxDimension;if(a&&Z(a[r]))return a[r];var u=n[r]-s-(i>0?i:0),d=n[r]+i;if(t[r])return o[r]?u:d;var f=c[r];return f==null?0:o[r]?Math.max(u<f?d:u,f):l==null?0:d+s>f+l?Math.max(u,f):Math.max(d,f)}function FM(e){var t=e.translateX,n=e.translateY;return{transform:e.useTranslate3d?`translate3d(${t}px, ${n}px, 0)`:`translate(${t}px, ${n}px)`}}function IM(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTop,i=e.offsetLeft,a=e.position,o=e.reverseDirection,s=e.tooltipBox,c=e.useTranslate3d,l=e.viewBox,u,d,f;return s.height>0&&s.width>0&&n?(d=PM({allowEscapeViewBox:t,coordinate:n,key:`x`,offset:i,position:a,reverseDirection:o,tooltipDimension:s.width,viewBox:l,viewBoxDimension:l.width}),f=PM({allowEscapeViewBox:t,coordinate:n,key:`y`,offset:r,position:a,reverseDirection:o,tooltipDimension:s.height,viewBox:l,viewBoxDimension:l.height}),u=FM({translateX:d,translateY:f,useTranslate3d:c})):u=MM,{cssProperties:u,cssClasses:NM({translateX:d,translateY:f,coordinate:n})}}var LM={devToolsEnabled:!0,isSsr:!(typeof window<`u`&&window.document&&window.document.createElement&&window.setTimeout)};function RM(e,t){return UM(e)||HM(e,t)||BM(e,t)||zM()}function zM(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
87
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BM(e,t){if(e){if(typeof e==`string`)return VM(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?VM(e,t):void 0}}function VM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function HM(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function UM(e){if(Array.isArray(e))return e}function WM(){var e=RM((0,v.useState)(()=>LM.isSsr||!window.matchMedia?!1:window.matchMedia(`(prefers-reduced-motion: reduce)`).matches),2),t=e[0],n=e[1];return(0,v.useEffect)(()=>{if(window.matchMedia){var e=window.matchMedia(`(prefers-reduced-motion: reduce)`),t=()=>{n(e.matches)};return e.addEventListener(`change`,t),()=>{e.removeEventListener(`change`,t)}}},[]),t}function GM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function KM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?GM(Object(n),!0).forEach(function(t){qM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qM(e,t,n){return(t=JM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JM(e){var t=YM(e,`string`);return typeof t==`symbol`?t:t+``}function YM(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function XM(e,t){return tN(e)||eN(e,t)||QM(e,t)||ZM()}function ZM(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
88
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QM(e,t){if(e){if(typeof e==`string`)return $M(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$M(e,t):void 0}}function $M(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function eN(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function tN(e){if(Array.isArray(e))return e}function nN(e){if(!(e.prefersReducedMotion&&e.isAnimationActive===`auto`)&&e.isAnimationActive&&e.active){var t=typeof e.animationEasing==`string`?e.animationEasing:`ease`;return`transform ${e.animationDuration}ms ${t}`}}function rN(e){var t=WM(),n=XM(v.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}})),2),r=n[0],i=n[1];v.useEffect(()=>{var t=t=>{t.key===`Escape`&&i({dismissed:!0,dismissedAtCoordinate:{x:e.coordinate?.x??0,y:e.coordinate?.y??0}})};return document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`keydown`,t)}},[e.coordinate?.x,e.coordinate?.y]),r.dismissed&&((e.coordinate?.x??0)!==r.dismissedAtCoordinate.x||(e.coordinate?.y??0)!==r.dismissedAtCoordinate.y)&&i(KM(KM({},r),{},{dismissed:!1}));var a=IM({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset==`number`?e.offset:e.offset.x,offsetTop:typeof e.offset==`number`?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),o=a.cssClasses,s=a.cssProperties,c=KM(KM({},e.hasPortalFromProps?{}:KM(KM({transition:nN({prefersReducedMotion:t,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},s),{},{pointerEvents:`none`,position:`absolute`,top:0,left:0})),{},{visibility:!r.dismissed&&e.active&&e.hasPayload?`visible`:`hidden`},e.wrapperStyle);return v.createElement(`div`,{xmlns:`http://www.w3.org/1999/xhtml`,tabIndex:-1,className:o,style:c,ref:e.innerRef},e.children)}var iN=v.memo(rN),aN=()=>Q(e=>e.rootProps.accessibilityLayer)??!0;function oN(){return oN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oN.apply(null,arguments)}function sN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?sN(Object(n),!0).forEach(function(t){lN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lN(e,t,n){return(t=uN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uN(e){var t=dN(e,`string`);return typeof t==`symbol`?t:t+``}function dN(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var fN={curveBasisClosed:AS,curveBasisOpen:MS,curveBasis:OS,curveBumpX:CS,curveBumpY:wS,curveLinearClosed:PS,curveLinear:_S,curveMonotoneX:HS,curveMonotoneY:US,curveNatural:KS,curveStep:JS,curveStepAfter:XS,curveStepBefore:YS},pN=e=>MO(e.x)&&MO(e.y),mN=e=>e.base!=null&&pN(e.base)&&pN(e),hN=e=>e.x,gN=e=>e.y,_N=(e,t)=>{if(typeof e==`function`)return e;var n=`curve${EC(e)}`;if((n===`curveMonotone`||n===`curveBump`)&&t){var r=fN[`${n}${t===`vertical`?`Y`:`X`}`];if(r)return r}return fN[n]||_S},vN={connectNulls:!1,type:`linear`},yN=e=>{var t=e.type,n=t===void 0?vN.type:t,r=e.points,i=r===void 0?[]:r,a=e.baseLine,o=e.layout,s=e.connectNulls,c=s===void 0?vN.connectNulls:s,l=_N(n,o),u=c?i.filter(pN):i;if(Array.isArray(a)){var d,f=i.map((e,t)=>cN(cN({},e),{},{base:a[t]}));return d=o===`vertical`?xS().y(gN).x1(hN).x0(e=>e.base.x):xS().x(hN).y1(gN).y0(e=>e.base.y),d.defined(mN).curve(l)(c?f.filter(mN):f)}return(o===`vertical`&&Z(a)?xS().y(gN).x1(hN).x0(a):Z(a)?xS().x(hN).y1(gN).y0(a):bS().x(hN).y(gN)).defined(pN).curve(l)(u)},bN=e=>{var t=e.className,n=e.points,r=e.path,i=e.pathRef,a=vA();if((!n||!n.length)&&!r)return null;var o={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||a,connectNulls:e.connectNulls},s=n&&n.length?yN(o):r;return v.createElement(`path`,oN({},Wx(e),AC(e),{className:dv(`recharts-curve`,t),d:s===null?void 0:s,ref:i}))},xN=[`x`,`y`,`top`,`left`,`width`,`height`,`className`];function SN(){return SN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},SN.apply(null,arguments)}function CN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?CN(Object(n),!0).forEach(function(t){TN(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CN(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function TN(e,t,n){return(t=EN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EN(e){var t=DN(e,`string`);return typeof t==`symbol`?t:t+``}function DN(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function ON(e,t){if(e==null)return{};var n,r,i=kN(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function kN(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var AN=(e,t,n,r,i,a)=>`M${e},${i}v${r}M${a},${t}h${n}`,jN=e=>{var t=e.x,n=t===void 0?0:t,r=e.y,i=r===void 0?0:r,a=e.top,o=a===void 0?0:a,s=e.left,c=s===void 0?0:s,l=e.width,u=l===void 0?0:l,d=e.height,f=d===void 0?0:d,p=e.className,m=ON(e,xN),h=wN({x:n,y:i,top:o,left:c,width:u,height:f},m);return!Z(n)||!Z(i)||!Z(u)||!Z(f)||!Z(o)||!Z(c)?null:v.createElement(`path`,SN({},Kx(h),{className:dv(`recharts-cross`,p),d:AN(n,i,u,f,o,c)}))};function MN(e,t,n,r){var i=r/2;return{stroke:`none`,fill:`#ccc`,x:e===`horizontal`?t.x-i:n.left+.5,y:e===`horizontal`?n.top+.5:t.y-i,width:e===`horizontal`?r:n.width-1,height:e===`horizontal`?n.height-1:r}}var NN=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],PN=(e,t)=>e.map((e,n)=>e*t**n).reduce((e,t)=>e+t),FN=(e,t)=>n=>PN(NN(e,t),n),IN=(e,t)=>n=>PN([...NN(e,t).map((e,t)=>e*t).slice(1),0],n),LN=e=>{var t,n=e.split(`(`);if(n.length!==2||n[0]!==`cubic-bezier`)return null;var r=(t=n[1])==null||(t=t.split(`)`)[0])==null?void 0:t.split(`,`);if(r==null||r.length!==4)return null;var i=r.map(e=>parseFloat(e));return[i[0],i[1],i[2],i[3]]},RN=function(){var e=[...arguments];if(e.length===1)switch(e[0]){case`linear`:return[0,0,1,1];case`ease`:return[.25,.1,.25,1];case`ease-in`:return[.42,0,1,1];case`ease-out`:return[.42,0,.58,1];case`ease-in-out`:return[0,0,.58,1];default:var t=LN(e[0]);if(t)return t}return e.length===4?e:[0,0,1,1]},zN=(e,t,n,r)=>{var i=FN(e,n),a=FN(t,r),o=IN(e,n),s=e=>e>1?1:e<0?0:e,c=e=>{for(var t=e>1?1:e,n=t,r=0;r<8;++r){var c=i(n)-t,l=o(n);if(Math.abs(c-t)<1e-4||l<1e-4)return a(n);n=s(n-c/l)}return a(n)};return c.isStepper=!1,c},BN=function(){return zN(...RN(...arguments))},VN=function(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.stiff,n=t===void 0?100:t,r=e.damping,i=r===void 0?8:r,a=e.dt,o=a===void 0?16.67:a,s=1,c=[0],l=0,u=0,d=1e4,f=0;f<d;){var p=-(l-s)*n,m=u*i;if(u+=(p-m)*o/1e3,l+=u*o/1e3,c.push(l),Math.abs(l-s)<1e-4&&Math.abs(u)<1e-4)break;f++}c[c.length-1]=s;var h=c.length-1;return e=>{if(e<=0)return 0;if(e>=1)return s;var t=e*h,n=Math.floor(t),r=t-n;return(c[n]??0)+((c[n+1]??0)-(c[n]??0))*r}},HN=e=>{if(typeof e==`string`)switch(e){case`ease`:case`ease-in-out`:case`ease-out`:case`ease-in`:case`linear`:return BN(e);case`spring`:return VN();default:if(e.split(`(`)[0]===`cubic-bezier`)return BN(e)}return typeof e==`function`?e:null},UN=(0,v.createContext)((e,t,n)=>{var r,i=a=>{var o=t.tick(a);if(t.getState()===`active`){if(n(t.getInterpolated()),t.getProgress()===1){t.complete(),r=void 0;return}r=e.setTimeout(i,o);return}r=e.setTimeout(i,o)};return r=e.setTimeout(i,0),()=>r?.()});UN.Provider;function WN(e){var t=(0,v.useContext)(UN);return(0,v.useMemo)(()=>e??t,[e,t])}function GN(e,t,n){return(t=KN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KN(e){var t=qN(e,`string`);return typeof t==`symbol`?t:t+``}function qN(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var JN=`init`,YN=`pending`,XN=`active`,ZN=`completed`;function QN(e){return Math.max(0,e)}var $N=class{getAnimationStartedTime(){return this.animationStartedTime}getBeginStartedTime(){return this.beginStartedTime}constructor(e){var t;GN(this,`state`,JN),this.animationId=e.animationId,this.onAnimationEnd=e.onAnimationEnd,this.animationDuration=QN(e.animationDuration),this.animationBegin=QN(e.animationBegin),this.progress=0,this.from=e.from,this.to=e.to,this.easing=e.easing,(t=e.onAnimationStart)==null||t.call(e)}getState(){return this.state}getEasing(){return this.easing}getAnimationDuration(){return this.animationDuration}tick(e){if(this.getState()===JN)return this.state=YN,this.beginStartedTime=e,this.animationBegin;if(this.getState()===YN){if(this.beginStartedTime==null)throw Error();var t=e-this.beginStartedTime;return t>=this.animationBegin?(this.state=XN,this.animationStartedTime=e,this.nextAnimationUpdate(0)):QN(this.animationBegin-t)}if(this.getState()===XN){if(this.animationStartedTime==null)throw Error();var n=e-this.animationStartedTime;return this.setProgress(n/this.animationDuration),this.nextAnimationUpdate(n)}return 0}setProgress(e){this.progress=Math.min(1,Math.max(0,e))}getProgress(){return this.progress}complete(){if(this.progress=1,this.state===`active`){var e;(e=this.onAnimationEnd)==null||e.call(this)}this.state=ZN}getFrom(){return this.from}getTo(){return this.to}getAnimationId(){return this.animationId}getAnimationBegin(){return this.animationBegin}},eP=class extends $N{nextAnimationUpdate(){return 0}getInterpolated(){return this.easing(CC(this.getFrom(),this.getTo(),this.getProgress()))}},tP=class{setTimeout(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),r=null,i=a=>{a-n>=t?e(a):r=requestAnimationFrame(i)};return r=requestAnimationFrame(i),()=>{r!=null&&cancelAnimationFrame(r)}}};function nP(e,t){return sP(e)||oP(e,t)||iP(e,t)||rP()}function rP(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
89
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iP(e,t){if(e){if(typeof e==`string`)return aP(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?aP(e,t):void 0}}function aP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function oP(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function sP(e){if(Array.isArray(e))return e}var cP={begin:0,duration:1e3,easing:`ease`,isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},lP=0,uP=1;function dP(e){var t=RC(e,cP),n=t.animationId,r=t.isActive,i=t.canBegin,a=t.duration,o=t.easing,s=t.begin,c=t.onAnimationEnd,l=t.onAnimationStart,u=t.children,d=WM(),f=r===`auto`?!LM.isSsr&&!d:r,p=WN(t.animationController),m=nP((0,v.useState)(f?lP:uP),2),h=m[0],g=m[1];return(0,v.useEffect)(()=>{f||g(uP)},[f]),(0,v.useEffect)(()=>{var e=HN(o);return!f||!i||e==null?OC:p(new tP,new eP({animationId:n,easing:e,animationDuration:a,animationBegin:s,onAnimationStart:l,onAnimationEnd:c,from:lP,to:uP}),g)},[p,n,f,i,a,o,s,l,c]),u(Number(h))}function fP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`animation-`,n=(0,v.useRef)(bC(t)),r=(0,v.useRef)(e);return r.current!==e&&(n.current=bC(t),r.current=e),n.current}var pP=e=>e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`),mP=(e,t,n)=>e.map(e=>`${pP(e)} ${t}ms ${n}`).join(`,`),hP=[`radius`],gP=[`radius`],_P,vP,yP,bP,xP,SP,CP,wP,TP,EP;function DP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function OP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?DP(Object(n),!0).forEach(function(t){kP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kP(e,t,n){return(t=AP(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AP(e){var t=jP(e,`string`);return typeof t==`symbol`?t:t+``}function jP(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function MP(){return MP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},MP.apply(null,arguments)}function NP(e,t){if(e==null)return{};var n,r,i=PP(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function PP(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function FP(e,t){return BP(e)||zP(e,t)||LP(e,t)||IP()}function IP(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
90
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LP(e,t){if(e){if(typeof e==`string`)return RP(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?RP(e,t):void 0}}function RP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function zP(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function BP(e){if(Array.isArray(e))return e}function VP(e,t){return t||=e.slice(0),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var HP=(e,t,n,r,i)=>{var a=pC(n),o=pC(r),s=Math.min(Math.abs(a)/2,Math.abs(o)/2),c=o>=0?1:-1,l=a>=0?1:-1,u=+(o>=0&&a>=0||o<0&&a<0),d;if(s>0&&Array.isArray(i)){for(var f=[0,0,0,0],p=0,m=4;p<m;p++){var h=i[p]??0;f[p]=h>s?s:h}d=mC(_P||=VP([`M`,`,`,``]),e,t+c*f[0]),f[0]>0&&(d+=mC(vP||=VP([`A `,`,`,`,0,0,`,`,`,`,`,``]),f[0],f[0],u,e+l*f[0],t)),d+=mC(yP||=VP([`L `,`,`,``]),e+n-l*f[1],t),f[1]>0&&(d+=mC(bP||=VP([`A `,`,`,`,0,0,`,`,
91
+ `,`,`,``]),f[1],f[1],u,e+n,t+c*f[1])),d+=mC(xP||=VP([`L `,`,`,``]),e+n,t+r-c*f[2]),f[2]>0&&(d+=mC(SP||=VP([`A `,`,`,`,0,0,`,`,
92
+ `,`,`,``]),f[2],f[2],u,e+n-l*f[2],t+r)),d+=mC(CP||=VP([`L `,`,`,``]),e+l*f[3],t+r),f[3]>0&&(d+=mC(wP||=VP([`A `,`,`,`,0,0,`,`,
93
+ `,`,`,``]),f[3],f[3],u,e,t+r-c*f[3])),d+=`Z`}else if(s>0&&i===+i&&i>0){var g=Math.min(s,i);d=mC(TP||=VP(`M .,.
94
94
  A .,.,0,0,.,.,.
95
95
  L .,.
96
96
  A .,.,0,0,.,.,.
97
97
  L .,.
98
98
  A .,.,0,0,.,.,.
99
99
  L .,.
100
- A .,.,0,0,.,.,. Z`.split(`.`)),e,t+c*g,g,g,u,e+l*g,t,e+n-l*g,t,g,g,u,e+n,t+c*g,e+n,t+r-c*g,g,g,u,e+n-l*g,t+r,e+l*g,t+r,g,g,u,e,t+r-c*g)}else d=mC(DP||=HP([`M `,`,`,` h `,` v `,` h `,` Z`]),e,t,n,r,-n);return d},WP={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:`ease`},GP=e=>{var t=RC(e,WP),n=(0,v.useRef)(null),r=IP((0,v.useState)(-1),2),i=r[0],a=r[1];(0,v.useEffect)(()=>{if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&a(e)}catch{}},[]);var o=t.x,s=t.y,c=t.width,l=t.height,u=t.radius,d=t.className,f=t.animationEasing,p=t.animationDuration,m=t.animationBegin,h=t.isAnimationActive,g=t.isUpdateAnimationActive,_=(0,v.useRef)(c),y=(0,v.useRef)(l),b=(0,v.useRef)(o),x=(0,v.useRef)(s),S=pP((0,v.useMemo)(()=>({x:o,y:s,width:c,height:l,radius:u}),[o,s,c,l,u]),`rectangle-`);if(o!==+o||s!==+s||c!==+c||l!==+l||c===0||l===0)return null;var C=dv(`recharts-rectangle`,d);if(!g){var w=Kx(t);w.radius;var T=PP(w,gP);return v.createElement(`path`,NP({},T,{x:pC(o),y:pC(s),width:pC(c),height:pC(l),radius:typeof u==`number`?u:void 0,className:C,d:UP(o,s,c,l,u)}))}var E=_.current,D=y.current,O=b.current,k=x.current,A=`0px ${i===-1?1:i}px`,j=`${i}px ${i}px`,M=hP([`strokeDasharray`],p,typeof f==`string`?f:WP.animationEasing);return v.createElement(fP,{animationId:S,key:S,canBegin:i>0,duration:p,easing:f,isActive:g,begin:m},e=>{var r=CC(E,c,e),i=CC(D,l,e),a=CC(O,o,e),d=CC(k,s,e);n.current&&(_.current=r,y.current=i,b.current=a,x.current=d);var f=h?e>0?{transition:M,strokeDasharray:j}:{strokeDasharray:A}:{strokeDasharray:j},p=Kx(t);p.radius;var m=PP(p,_P);return v.createElement(`path`,NP({},m,{radius:typeof u==`number`?u:void 0,className:C,d:UP(a,d,r,i,u),ref:n,style:kP(kP({},f),t.style)}))})};function KP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?KP(Object(n),!0).forEach(function(t){JP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function JP(e,t,n){return(t=YP(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YP(e){var t=XP(e,`string`);return typeof t==`symbol`?t:t+``}function XP(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var ZP=Math.PI/180,QP=e=>e*Math.PI/180,$P=e=>e*180/Math.PI,eF=(e,t,n,r)=>({x:e+Math.cos(-ZP*r)*n,y:t+Math.sin(-ZP*r)*n}),tF=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0,width:0,height:0,brushBottom:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(t-(n.top||0)-(n.bottom||0)))/2},nF=(e,t)=>{var n=e.x,r=e.y,i=t.x,a=t.y;return Math.sqrt((n-i)**2+(r-a)**2)},rF=(e,t)=>{var n=e.x,r=e.y,i=t.cx,a=t.cy,o=nF({x:n,y:r},{x:i,y:a});if(o<=0)return{radius:o,angle:0};var s=(n-i)/o,c=Math.acos(s);return r>a&&(c=2*Math.PI-c),{radius:o,angle:$P(c),angleInRadian:c}},iF=e=>{var t=e.startAngle,n=e.endAngle,r=Math.floor(t/360),i=Math.floor(n/360),a=Math.min(r,i);return{startAngle:t-a*360,endAngle:n-a*360}},aF=(e,t)=>{var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),a=Math.floor(r/360);return e+Math.min(i,a)*360},oF=(e,t)=>{var n=e.relativeX,r=e.relativeY,i=rF({x:n,y:r},t),a=i.radius,o=i.angle,s=t.innerRadius,c=t.outerRadius;if(a<s||a>c||a===0)return null;var l=iF(t),u=l.startAngle,d=l.endAngle,f=o,p;if(u<=d){for(;f>d;)f-=360;for(;f<u;)f+=360;p=f>=u&&f<=d}else{for(;f>u;)f-=360;for(;f<d;)f+=360;p=f>=d&&f<=u}return p?qP(qP({},t),{},{radius:a,angle:aF(f,t)}):null};function sF(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,a=e.endAngle;return{points:[eF(t,n,r,i),eF(t,n,r,a)],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}var cF,lF,uF,dF,fF,pF,mF;function hF(){return hF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hF.apply(null,arguments)}function gF(e,t){return t||=e.slice(0),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var _F=(e,t)=>hC(t-e)*Math.min(Math.abs(t-e),359.999),vF=e=>{var t=e.cx,n=e.cy,r=e.radius,i=e.angle,a=e.sign,o=e.isExternal,s=e.cornerRadius,c=e.cornerIsExternal,l=s*(o?1:-1)+r,u=Math.asin(s/l)/ZP,d=c?i:i+a*u,f=eF(t,n,l,d),p=eF(t,n,r,d),m=c?i-a*u:i;return{center:f,circleTangency:p,lineTangency:eF(t,n,l*Math.cos(u*ZP),m),theta:u}},yF=e=>{var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,a=e.startAngle,o=e.endAngle,s=_F(a,o),c=a+s,l=eF(t,n,i,a),u=eF(t,n,i,c),d=mC(cF||=gF([`M `,`,`,`
100
+ A .,.,0,0,.,.,. Z`.split(`.`)),e,t+c*g,g,g,u,e+l*g,t,e+n-l*g,t,g,g,u,e+n,t+c*g,e+n,t+r-c*g,g,g,u,e+n-l*g,t+r,e+l*g,t+r,g,g,u,e,t+r-c*g)}else d=mC(EP||=VP([`M `,`,`,` h `,` v `,` h `,` Z`]),e,t,n,r,-n);return d},UP={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:`ease`},WP=e=>{var t=RC(e,UP),n=(0,v.useRef)(null),r=FP((0,v.useState)(-1),2),i=r[0],a=r[1];(0,v.useEffect)(()=>{if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&a(e)}catch{}},[]);var o=t.x,s=t.y,c=t.width,l=t.height,u=t.radius,d=t.className,f=t.animationEasing,p=t.animationDuration,m=t.animationBegin,h=t.isAnimationActive,g=t.isUpdateAnimationActive,_=(0,v.useRef)(c),y=(0,v.useRef)(l),b=(0,v.useRef)(o),x=(0,v.useRef)(s),S=fP((0,v.useMemo)(()=>({x:o,y:s,width:c,height:l,radius:u}),[o,s,c,l,u]),`rectangle-`);if(o!==+o||s!==+s||c!==+c||l!==+l||c===0||l===0)return null;var C=dv(`recharts-rectangle`,d);if(!g){var w=Kx(t);w.radius;var T=NP(w,hP);return v.createElement(`path`,MP({},T,{x:pC(o),y:pC(s),width:pC(c),height:pC(l),radius:typeof u==`number`?u:void 0,className:C,d:HP(o,s,c,l,u)}))}var E=_.current,D=y.current,O=b.current,k=x.current,A=`0px ${i===-1?1:i}px`,j=`${i}px ${i}px`,M=mP([`strokeDasharray`],p,typeof f==`string`?f:UP.animationEasing);return v.createElement(dP,{animationId:S,key:S,canBegin:i>0,duration:p,easing:f,isActive:g,begin:m},e=>{var r=CC(E,c,e),i=CC(D,l,e),a=CC(O,o,e),d=CC(k,s,e);n.current&&(_.current=r,y.current=i,b.current=a,x.current=d);var f=h?e>0?{transition:M,strokeDasharray:j}:{strokeDasharray:A}:{strokeDasharray:j},p=Kx(t);p.radius;var m=NP(p,gP);return v.createElement(`path`,MP({},m,{radius:typeof u==`number`?u:void 0,className:C,d:HP(a,d,r,i,u),ref:n,style:OP(OP({},f),t.style)}))})};function GP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function KP(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?GP(Object(n),!0).forEach(function(t){qP(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qP(e,t,n){return(t=JP(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JP(e){var t=YP(e,`string`);return typeof t==`symbol`?t:t+``}function YP(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var XP=Math.PI/180,ZP=e=>e*Math.PI/180,QP=e=>e*180/Math.PI,$P=(e,t,n,r)=>({x:e+Math.cos(-XP*r)*n,y:t+Math.sin(-XP*r)*n}),eF=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0,width:0,height:0,brushBottom:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(t-(n.top||0)-(n.bottom||0)))/2},tF=(e,t)=>{var n=e.x,r=e.y,i=t.x,a=t.y;return Math.sqrt((n-i)**2+(r-a)**2)},nF=(e,t)=>{var n=e.x,r=e.y,i=t.cx,a=t.cy,o=tF({x:n,y:r},{x:i,y:a});if(o<=0)return{radius:o,angle:0};var s=(n-i)/o,c=Math.acos(s);return r>a&&(c=2*Math.PI-c),{radius:o,angle:QP(c),angleInRadian:c}},rF=e=>{var t=e.startAngle,n=e.endAngle,r=Math.floor(t/360),i=Math.floor(n/360),a=Math.min(r,i);return{startAngle:t-a*360,endAngle:n-a*360}},iF=(e,t)=>{var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),a=Math.floor(r/360);return e+Math.min(i,a)*360},aF=(e,t)=>{var n=e.relativeX,r=e.relativeY,i=nF({x:n,y:r},t),a=i.radius,o=i.angle,s=t.innerRadius,c=t.outerRadius;if(a<s||a>c||a===0)return null;var l=rF(t),u=l.startAngle,d=l.endAngle,f=o,p;if(u<=d){for(;f>d;)f-=360;for(;f<u;)f+=360;p=f>=u&&f<=d}else{for(;f>u;)f-=360;for(;f<d;)f+=360;p=f>=d&&f<=u}return p?KP(KP({},t),{},{radius:a,angle:iF(f,t)}):null};function oF(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,a=e.endAngle;return{points:[$P(t,n,r,i),$P(t,n,r,a)],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}var sF,cF,lF,uF,dF,fF,pF;function mF(){return mF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mF.apply(null,arguments)}function hF(e,t){return t||=e.slice(0),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var gF=(e,t)=>hC(t-e)*Math.min(Math.abs(t-e),359.999),_F=e=>{var t=e.cx,n=e.cy,r=e.radius,i=e.angle,a=e.sign,o=e.isExternal,s=e.cornerRadius,c=e.cornerIsExternal,l=s*(o?1:-1)+r,u=Math.asin(s/l)/XP,d=c?i:i+a*u,f=$P(t,n,l,d),p=$P(t,n,r,d),m=c?i-a*u:i;return{center:f,circleTangency:p,lineTangency:$P(t,n,l*Math.cos(u*XP),m),theta:u}},vF=e=>{var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,a=e.startAngle,o=e.endAngle,s=gF(a,o),c=a+s,l=$P(t,n,i,a),u=$P(t,n,i,c),d=mC(sF||=hF([`M `,`,`,`
101
101
  A `,`,`,`,0,
102
102
  `,`,`,`,
103
103
  `,`,`,`
104
- `]),l.x,l.y,i,i,+(Math.abs(s)>180),+(a>c),u.x,u.y);if(r>0){var f=eF(t,n,r,a),p=eF(t,n,r,c);d+=mC(lF||=gF([`L `,`,`,`
104
+ `]),l.x,l.y,i,i,+(Math.abs(s)>180),+(a>c),u.x,u.y);if(r>0){var f=$P(t,n,r,a),p=$P(t,n,r,c);d+=mC(cF||=hF([`L `,`,`,`
105
105
  A `,`,`,`,0,
106
106
  `,`,`,`,
107
- `,`,`,` Z`]),p.x,p.y,r,r,+(Math.abs(s)>180),+(a<=c),f.x,f.y)}else d+=mC(uF||=gF([`L `,`,`,` Z`]),t,n);return d},bF=e=>{var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,a=e.cornerRadius,o=e.forceCornerRadius,s=e.cornerIsExternal,c=e.startAngle,l=e.endAngle,u=hC(l-c),d=vF({cx:t,cy:n,radius:i,angle:c,sign:u,cornerRadius:a,cornerIsExternal:s}),f=d.circleTangency,p=d.lineTangency,m=d.theta,h=vF({cx:t,cy:n,radius:i,angle:l,sign:-u,cornerRadius:a,cornerIsExternal:s}),g=h.circleTangency,_=h.lineTangency,v=h.theta,y=s?Math.abs(c-l):Math.abs(c-l)-m-v;if(y<0)return o?mC(dF||=gF([`M `,`,`,`
107
+ `,`,`,` Z`]),p.x,p.y,r,r,+(Math.abs(s)>180),+(a<=c),f.x,f.y)}else d+=mC(lF||=hF([`L `,`,`,` Z`]),t,n);return d},yF=e=>{var t=e.cx,n=e.cy,r=e.innerRadius,i=e.outerRadius,a=e.cornerRadius,o=e.forceCornerRadius,s=e.cornerIsExternal,c=e.startAngle,l=e.endAngle,u=hC(l-c),d=_F({cx:t,cy:n,radius:i,angle:c,sign:u,cornerRadius:a,cornerIsExternal:s}),f=d.circleTangency,p=d.lineTangency,m=d.theta,h=_F({cx:t,cy:n,radius:i,angle:l,sign:-u,cornerRadius:a,cornerIsExternal:s}),g=h.circleTangency,_=h.lineTangency,v=h.theta,y=s?Math.abs(c-l):Math.abs(c-l)-m-v;if(y<0)return o?mC(uF||=hF([`M `,`,`,`
108
108
  a`,`,`,`,0,0,1,`,`,0
109
109
  a`,`,`,`,0,0,1,`,`,0
110
- `]),p.x,p.y,a,a,a*2,a,a,-a*2):yF({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:c,endAngle:l});var b=mC(fF||=gF([`M `,`,`,`
110
+ `]),p.x,p.y,a,a,a*2,a,a,-a*2):vF({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:c,endAngle:l});var b=mC(dF||=hF([`M `,`,`,`
111
111
  A`,`,`,`,0,0,`,`,`,`,`,`
112
112
  A`,`,`,`,0,`,`,`,`,`,`,`,`
113
113
  A`,`,`,`,0,0,`,`,`,`,`,`
114
- `]),p.x,p.y,a,a,+(u<0),f.x,f.y,i,i,+(y>180),+(u<0),g.x,g.y,a,a,+(u<0),_.x,_.y);if(r>0){var x=vF({cx:t,cy:n,radius:r,angle:c,sign:u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),S=x.circleTangency,C=x.lineTangency,w=x.theta,T=vF({cx:t,cy:n,radius:r,angle:l,sign:-u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),E=T.circleTangency,D=T.lineTangency,O=T.theta,k=s?Math.abs(c-l):Math.abs(c-l)-w-O;if(k<0&&a===0)return`${b}L${t},${n}Z`;b+=mC(pF||=gF([`L`,`,`,`
114
+ `]),p.x,p.y,a,a,+(u<0),f.x,f.y,i,i,+(y>180),+(u<0),g.x,g.y,a,a,+(u<0),_.x,_.y);if(r>0){var x=_F({cx:t,cy:n,radius:r,angle:c,sign:u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),S=x.circleTangency,C=x.lineTangency,w=x.theta,T=_F({cx:t,cy:n,radius:r,angle:l,sign:-u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),E=T.circleTangency,D=T.lineTangency,O=T.theta,k=s?Math.abs(c-l):Math.abs(c-l)-w-O;if(k<0&&a===0)return`${b}L${t},${n}Z`;b+=mC(fF||=hF([`L`,`,`,`
115
115
  A`,`,`,`,0,0,`,`,`,`,`,`
116
116
  A`,`,`,`,0,`,`,`,`,`,`,`,`
117
- A`,`,`,`,0,0,`,`,`,`,`,`Z`]),D.x,D.y,a,a,+(u<0),E.x,E.y,r,r,+(k>180),+(u>0),S.x,S.y,a,a,+(u<0),C.x,C.y)}else b+=mC(mF||=gF([`L`,`,`,`Z`]),t,n);return b},xF={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},SF=e=>{var t=RC(e,xF),n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,c=t.cornerIsExternal,l=t.startAngle,u=t.endAngle,d=t.className;if(a<i||l===u)return null;var f=dv(`recharts-sector`,d),p=a-i,m=xC(o,p,0,!0),h=m>0&&Math.abs(l-u)<360?bF({cx:n,cy:r,innerRadius:i,outerRadius:a,cornerRadius:Math.min(m,p/2),forceCornerRadius:s,cornerIsExternal:c,startAngle:l,endAngle:u}):yF({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:l,endAngle:u});return v.createElement(`path`,hF({},Kx(t),{className:f,d:h}))};function CF(e,t,n){if(e===`horizontal`)return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if(e===`vertical`)return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(kC(t)){if(e===`centric`){var r=t.cx,i=t.cy,a=t.innerRadius,o=t.outerRadius,s=t.angle,c=eF(r,i,a,s),l=eF(r,i,o,s);return[{x:c.x,y:c.y},{x:l.x,y:l.y}]}return sF(t)}}function wF(e){return bT(e)?NaN:Number(e)}function TF(e){return e?(e=wF(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function EF(e,t,n){n&&typeof n!=`number`&&_T(e,t,n)&&(t=n=void 0),e=TF(e),t===void 0?(t=e,e=0):t=TF(t),n=n===void 0?e<t?1:-1:TF(n);let r=Math.max(Math.ceil((t-e)/(n||1)),0),i=Array(r);for(let t=0;t<r;t++)i[t]=e,e+=n;return i}var DF=e=>e.chartData,OF=$([DF],e=>{var t=e.chartData==null?0:e.chartData.length-1;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),kF=(e,t,n,r)=>r?OF(e):DF(e),AF=(e,t,n)=>n?OF(e):DF(e),jF=$([kF],e=>{var t=e.chartData,n=e.dataStartIndex,r=e.dataEndIndex;return t==null?[]:t.slice(n,r+1)}),MF=$([OF],e=>{var t=e.chartData,n=e.dataStartIndex,r=e.dataEndIndex;return t==null?[]:t.slice(n,r+1)}),NF=$([DF],e=>{var t=e.chartData,n=e.dataStartIndex,r=e.dataEndIndex;return t==null?[]:t.slice(n,r+1)});function PF(e,t){return zF(e)||RF(e,t)||IF(e,t)||FF()}function FF(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
118
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IF(e,t){if(e){if(typeof e==`string`)return LF(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?LF(e,t):void 0}}function LF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function RF(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function zF(e){if(Array.isArray(e))return e}function BF(e){if(Array.isArray(e)&&e.length===2){var t=PF(e,2),n=t[0],r=t[1];if(NO(n)&&NO(r))return!0}return!1}function VF(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function HF(e,t){if(t&&typeof e!=`function`&&Array.isArray(e)&&e.length===2){var n=PF(e,2),r=n[0],i=n[1],a,o;if(NO(r))a=r;else if(typeof r==`function`)return;if(NO(i))o=i;else if(typeof i==`function`)return;var s=[a,o];if(BF(s))return s}}function UF(e,t,n){if(!(!n&&t==null)){if(typeof e==`function`&&t!=null)try{var r=e(t,n);if(BF(r))return VF(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var i=PF(e,2),a=i[0],o=i[1],s,c;if(a===`auto`)t!=null&&(s=Math.min(...t));else if(Z(a))s=a;else if(typeof a==`function`)try{t!=null&&(s=a(t?.[0]))}catch{}else if(typeof a==`string`&&tk.test(a)){var l=tk.exec(a);if(l==null||l[1]==null||t==null)s=void 0;else{var u=+l[1];s=t[0]-u}}else s=t?.[0];if(o===`auto`)t!=null&&(c=Math.max(...t));else if(Z(o))c=o;else if(typeof o==`function`)try{t!=null&&(c=o(t?.[1]))}catch{}else if(typeof o==`string`&&nk.test(o)){var d=nk.exec(o);if(d==null||d[1]==null||t==null)c=void 0;else{var f=+d[1];c=t[1]+f}}else c=t?.[1];var p=[s,c];if(BF(p))return t==null?p:VF(p,t,n)}}}var WF=l(o(((e,t)=>{(function(e){var n=1e9,r={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:`2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286`},i=!0,a=`[DecimalError] `,o=a+`Invalid argument: `,s=a+`Exponent out of range: `,c=Math.floor,l=Math.pow,u=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,d,f=1e7,p=7,m=9007199254740991,h=c(m/p),g={};g.absoluteValue=g.abs=function(){var e=new this.constructor(this);return e.s&&=1,e},g.comparedTo=g.cmp=function(e){var t,n,r,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1},g.decimalPlaces=g.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*p;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n},g.dividedBy=g.div=function(e){return b(this,new this.constructor(e))},g.dividedToIntegerBy=g.idiv=function(e){var t=this,n=t.constructor;return D(b(t,new n(e),0,1),n.precision)},g.equals=g.eq=function(e){return!this.cmp(e)},g.exponent=function(){return S(this)},g.greaterThan=g.gt=function(e){return this.cmp(e)>0},g.greaterThanOrEqualTo=g.gte=function(e){return this.cmp(e)>=0},g.isInteger=g.isint=function(){return this.e>this.d.length-2},g.isNegative=g.isneg=function(){return this.s<0},g.isPositive=g.ispos=function(){return this.s>0},g.isZero=function(){return this.s===0},g.lessThan=g.lt=function(e){return this.cmp(e)<0},g.lessThanOrEqualTo=g.lte=function(e){return this.cmp(e)<1},g.logarithm=g.log=function(e){var t,n=this,r=n.constructor,o=r.precision,s=o+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(d))throw Error(a+`NaN`);if(n.s<1)throw Error(a+(n.s?`NaN`:`-Infinity`));return n.eq(d)?new r(0):(i=!1,t=b(T(n,s),T(e,s),s),i=!0,D(t,o))},g.minus=g.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?O(t,e):_(t,(e.s=-e.s,e))},g.modulo=g.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(e=new r(e),!e.s)throw Error(a+`NaN`);return n.s?(i=!1,t=b(n,e,0,1).times(e),i=!0,n.minus(t)):D(new r(n),o)},g.naturalExponential=g.exp=function(){return x(this)},g.naturalLogarithm=g.ln=function(){return T(this)},g.negated=g.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},g.plus=g.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?_(t,e):O(t,(e.s=-e.s,e))},g.precision=g.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(o+e);if(t=S(i)+1,r=i.d.length-1,n=r*p+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},g.squareRoot=g.sqrt=function(){var e,t,n,r,o,s,l,u=this,d=u.constructor;if(u.s<1){if(!u.s)return new d(0);throw Error(a+`NaN`)}for(e=S(u),i=!1,o=Math.sqrt(+u),o==0||o==1/0?(t=y(u.d),(t.length+e)%2==0&&(t+=`0`),o=Math.sqrt(t),e=c((e+1)/2)-(e<0||e%2),o==1/0?t=`5e`+e:(t=o.toExponential(),t=t.slice(0,t.indexOf(`e`)+1)+e),r=new d(t)):r=new d(o.toString()),n=d.precision,o=l=n+3;;)if(s=r,r=s.plus(b(u,s,l+2)).times(.5),y(s.d).slice(0,l)===(t=y(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),o==l&&t==`4999`){if(D(s,n+1,0),s.times(s).eq(u)){r=s;break}}else if(t!=`9999`)break;l+=4}return i=!0,D(r,n)},g.times=g.mul=function(e){var t,n,r,a,o,s,c,l,u,d=this,p=d.constructor,m=d.d,h=(e=new p(e)).d;if(!d.s||!e.s)return new p(0);for(e.s*=d.s,n=d.e+e.e,l=m.length,u=h.length,l<u&&(o=m,m=h,h=o,s=l,l=u,u=s),o=[],s=l+u,r=s;r--;)o.push(0);for(r=u;--r>=0;){for(t=0,a=l+r;a>r;)c=o[a]+h[r]*m[a-r-1]+t,o[a--]=c%f|0,t=c/f|0;o[a]=(o[a]+t)%f|0}for(;!o[--s];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,i?D(e,p.precision):e},g.toDecimalPlaces=g.todp=function(e,t){var r=this,i=r.constructor;return r=new i(r),e===void 0?r:(v(e,0,n),t===void 0?t=i.rounding:v(t,0,8),D(r,e+S(r)+1,t))},g.toExponential=function(e,t){var r,i=this,a=i.constructor;return e===void 0?r=k(i,!0):(v(e,0,n),t===void 0?t=a.rounding:v(t,0,8),i=D(new a(i),e+1,t),r=k(i,!0,e+1)),r},g.toFixed=function(e,t){var r,i,a=this,o=a.constructor;return e===void 0?k(a):(v(e,0,n),t===void 0?t=o.rounding:v(t,0,8),i=D(new o(a),e+S(a)+1,t),r=k(i.abs(),!1,e+S(i)+1),a.isneg()&&!a.isZero()?`-`+r:r)},g.toInteger=g.toint=function(){var e=this,t=e.constructor;return D(new t(e),S(e)+1,t.rounding)},g.toNumber=function(){return+this},g.toPower=g.pow=function(e){var t,n,r,o,s,l,u=this,f=u.constructor,h=12,g=+(e=new f(e));if(!e.s)return new f(d);if(u=new f(u),!u.s){if(e.s<1)throw Error(a+`Infinity`);return u}if(u.eq(d))return u;if(r=f.precision,e.eq(d))return D(u,r);if(t=e.e,n=e.d.length-1,l=t>=n,s=u.s,!l){if(s<0)throw Error(a+`NaN`)}else if((n=g<0?-g:g)<=m){for(o=new f(d),t=Math.ceil(r/p+4),i=!1;n%2&&(o=o.times(u),A(o.d,t)),n=c(n/2),n!==0;)u=u.times(u),A(u.d,t);return i=!0,e.s<0?new f(d).div(o):D(o,r)}return s=s<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,i=!1,o=e.times(T(u,r+h)),i=!0,o=x(o),o.s=s,o},g.toPrecision=function(e,t){var r,i,a=this,o=a.constructor;return e===void 0?(r=S(a),i=k(a,r<=o.toExpNeg||r>=o.toExpPos)):(v(e,1,n),t===void 0?t=o.rounding:v(t,0,8),a=D(new o(a),e,t),r=S(a),i=k(a,e<=r||r<=o.toExpNeg,e)),i},g.toSignificantDigits=g.tosd=function(e,t){var r=this,i=r.constructor;return e===void 0?(e=i.precision,t=i.rounding):(v(e,1,n),t===void 0?t=i.rounding:v(t,0,8)),D(new i(r),e,t)},g.toString=g.valueOf=g.val=g.toJSON=function(){var e=this,t=S(e),n=e.constructor;return k(e,t<=n.toExpNeg||t>=n.toExpPos)};function _(e,t){var n,r,a,o,s,c,l,u,d=e.constructor,m=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),i?D(t,m):t;if(l=e.d,u=t.d,s=e.e,a=t.e,l=l.slice(),o=s-a,o){for(o<0?(r=l,o=-o,c=u.length):(r=u,a=s,c=l.length),s=Math.ceil(m/p),c=s>c?s+1:c+1,o>c&&(o=c,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(c=l.length,o=u.length,c-o<0&&(o=c,r=u,u=l,l=r),n=0;o;)n=(l[--o]=l[o]+u[o]+n)/f|0,l[o]%=f;for(n&&(l.unshift(n),++a),c=l.length;l[--c]==0;)l.pop();return t.d=l,t.e=a,i?D(t,m):t}function v(e,t,n){if(e!==~~e||e<t||e>n)throw Error(o+e)}function y(e){var t,n,r,i=e.length-1,a=``,o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)r=e[t]+``,n=p-r.length,n&&(a+=w(n)),a+=r;o=e[t],r=o+``,n=p-r.length,n&&(a+=w(n))}else if(o===0)return`0`;for(;o%10==0;)o/=10;return a+o}var b=(function(){function e(e,t){var n,r=0,i=e.length;for(e=e.slice();i--;)n=e[i]*t+r,e[i]=n%f|0,r=n/f|0;return r&&e.unshift(r),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=+(e[n]<t[n]),e[n]=r*f+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,s){var c,l,u,d,m,h,g,_,v,y,b,x,C,w,T,E,O,k,A=r.constructor,j=r.s==i.s?1:-1,M=r.d,N=i.d;if(!r.s)return new A(r);if(!i.s)throw Error(a+`Division by zero`);for(l=r.e-i.e,O=N.length,T=M.length,g=new A(j),_=g.d=[],u=0;N[u]==(M[u]||0);)++u;if(N[u]>(M[u]||0)&&--l,x=o==null?o=A.precision:s?o+(S(r)-S(i))+1:o,x<0)return new A(0);if(x=x/p+2|0,u=0,O==1)for(d=0,N=N[0],x++;(u<T||d)&&x--;u++)C=d*f+(M[u]||0),_[u]=C/N|0,d=C%N|0;else{for(d=f/(N[0]+1)|0,d>1&&(N=e(N,d),M=e(M,d),O=N.length,T=M.length),w=O,v=M.slice(0,O),y=v.length;y<O;)v[y++]=0;k=N.slice(),k.unshift(0),E=N[0],N[1]>=f/2&&++E;do d=0,c=t(N,v,O,y),c<0?(b=v[0],O!=y&&(b=b*f+(v[1]||0)),d=b/E|0,d>1?(d>=f&&(d=f-1),m=e(N,d),h=m.length,y=v.length,c=t(m,v,h,y),c==1&&(d--,n(m,O<h?k:N,h))):(d==0&&(c=d=1),m=N.slice()),h=m.length,h<y&&m.unshift(0),n(v,m,y),c==-1&&(y=v.length,c=t(N,v,O,y),c<1&&(d++,n(v,O<y?k:N,y))),y=v.length):c===0&&(d++,v=[0]),_[u++]=d,c&&v[0]?v[y++]=M[w]||0:(v=[M[w]],y=1);while((w++<T||v[0]!==void 0)&&x--)}return _[0]||_.shift(),g.e=l,D(g,s?o+S(g)+1:o)}})();function x(e,t){var n,r,a,o,c,u,f=0,p=0,m=e.constructor,h=m.precision;if(S(e)>16)throw Error(s+S(e));if(!e.s)return new m(d);for(t==null?(i=!1,u=h):u=t,c=new m(.03125);e.abs().gte(.1);)e=e.times(c),p+=5;for(r=Math.log(l(2,p))/Math.LN10*2+5|0,u+=r,n=a=o=new m(d),m.precision=u;;){if(a=D(a.times(e),u),n=n.times(++f),c=o.plus(b(a,n,u)),y(c.d).slice(0,u)===y(o.d).slice(0,u)){for(;p--;)o=D(o.times(o),u);return m.precision=h,t==null?(i=!0,D(o,h)):o}o=c}}function S(e){for(var t=e.e*p,n=e.d[0];n>=10;n/=10)t++;return t}function C(e,t,n){if(t>e.LN10.sd())throw i=!0,n&&(e.precision=n),Error(a+`LN10 precision limit exceeded`);return D(new e(e.LN10),t)}function w(e){for(var t=``;e--;)t+=`0`;return t}function T(e,t){var n,r,o,s,c,l,u,f,p,m=1,h=10,g=e,_=g.d,v=g.constructor,x=v.precision;if(g.s<1)throw Error(a+(g.s?`NaN`:`-Infinity`));if(g.eq(d))return new v(0);if(t==null?(i=!1,f=x):f=t,g.eq(10))return t??(i=!0),C(v,f);if(f+=h,v.precision=f,n=y(_),r=n.charAt(0),s=S(g),Math.abs(s)<0x5543df729c000){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)g=g.times(e),n=y(g.d),r=n.charAt(0),m++;s=S(g),r>1?(g=new v(`0.`+n),s++):g=new v(r+`.`+n.slice(1))}else return u=C(v,f+2,x).times(s+``),g=T(new v(r+`.`+n.slice(1)),f-h).plus(u),v.precision=x,t==null?(i=!0,D(g,x)):g;for(l=c=g=b(g.minus(d),g.plus(d),f),p=D(g.times(g),f),o=3;;){if(c=D(c.times(p),f),u=l.plus(b(c,new v(o),f)),y(u.d).slice(0,f)===y(l.d).slice(0,f))return l=l.times(2),s!==0&&(l=l.plus(C(v,f+2,x).times(s+``))),l=b(l,new v(m),f),v.precision=x,t==null?(i=!0,D(l,x)):l;l=u,o+=2}}function E(e,t){var n,r,a;for((n=t.indexOf(`.`))>-1&&(t=t.replace(`.`,``)),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=c(n/p),e.d=[],r=(n+1)%p,n<0&&(r+=p),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=p;r<a;)e.d.push(+t.slice(r,r+=p));t=t.slice(r),r=p-t.length}else r-=a;for(;r--;)t+=`0`;if(e.d.push(+t),i&&(e.e>h||e.e<-h))throw Error(s+n)}else e.s=0,e.e=0,e.d=[0];return e}function D(e,t,n){var r,a,o,u,d,m,g,_,v=e.d;for(u=1,o=v[0];o>=10;o/=10)u++;if(r=t-u,r<0)r+=p,a=t,g=v[_=0];else{if(_=Math.ceil((r+1)/p),o=v.length,_>=o)return e;for(g=o=v[_],u=1;o>=10;o/=10)u++;r%=p,a=r-p+u}if(n!==void 0&&(o=l(10,u-a-1),d=g/o%10|0,m=t<0||v[_+1]!==void 0||g%o,m=n<4?(d||m)&&(n==0||n==(e.s<0?3:2)):d>5||d==5&&(n==4||m||n==6&&(r>0?a>0?g/l(10,u-a):0:v[_-1])%10&1||n==(e.s<0?8:7))),t<1||!v[0])return m?(o=S(e),v.length=1,t=t-o-1,v[0]=l(10,(p-t%p)%p),e.e=c(-t/p)||0):(v.length=1,v[0]=e.e=e.s=0),e;if(r==0?(v.length=_,o=1,_--):(v.length=_+1,o=l(10,p-r),v[_]=a>0?(g/l(10,u-a)%l(10,a)|0)*o:0),m)for(;;)if(_==0){(v[0]+=o)==f&&(v[0]=1,++e.e);break}else{if(v[_]+=o,v[_]!=f)break;v[_--]=0,o=1}for(r=v.length;v[--r]===0;)v.pop();if(i&&(e.e>h||e.e<-h))throw Error(s+S(e));return e}function O(e,t){var n,r,a,o,s,c,l,u,d,m,h=e.constructor,g=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),i?D(t,g):t;if(l=e.d,m=t.d,r=t.e,u=e.e,l=l.slice(),s=u-r,s){for(d=s<0,d?(n=l,s=-s,c=m.length):(n=m,r=u,c=l.length),a=Math.max(Math.ceil(g/p),c)+2,s>a&&(s=a,n.length=1),n.reverse(),a=s;a--;)n.push(0);n.reverse()}else{for(a=l.length,c=m.length,d=a<c,d&&(c=a),a=0;a<c;a++)if(l[a]!=m[a]){d=l[a]<m[a];break}s=0}for(d&&(n=l,l=m,m=n,t.s=-t.s),c=l.length,a=m.length-c;a>0;--a)l[c++]=0;for(a=m.length;a>s;){if(l[--a]<m[a]){for(o=a;o&&l[--o]===0;)l[o]=f-1;--l[o],l[a]+=f}l[a]-=m[a]}for(;l[--c]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,i?D(t,g):t):new h(0)}function k(e,t,n){var r,i=S(e),a=y(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+`.`+a.slice(1)+w(r):o>1&&(a=a.charAt(0)+`.`+a.slice(1)),a=a+(i<0?`e`:`e+`)+i):i<0?(a=`0.`+w(-i-1)+a,n&&(r=n-o)>0&&(a+=w(r))):i>=o?(a+=w(i+1-o),n&&(r=n-i-1)>0&&(a=a+`.`+w(r))):((r=i+1)<o&&(a=a.slice(0,r)+`.`+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+=`.`),a+=w(r))),e.s<0?`-`+a:a}function A(e,t){if(e.length>t)return e.length=t,!0}function j(e){var t,n,r;function i(e){var t=this;if(!(t instanceof i))return new i(e);if(t.constructor=i,e instanceof i){t.s=e.s,t.e=e.e,t.d=(e=e.d)?e.slice():e;return}if(typeof e==`number`){if(e*0!=0)throw Error(o+e);if(e>0)t.s=1;else if(e<0)e=-e,t.s=-1;else{t.s=0,t.e=0,t.d=[0];return}if(e===~~e&&e<1e7){t.e=0,t.d=[e];return}return E(t,e.toString())}else if(typeof e!=`string`)throw Error(o+e);if(e.charCodeAt(0)===45?(e=e.slice(1),t.s=-1):t.s=1,u.test(e))E(t,e);else throw Error(o+e)}if(i.prototype=g,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=j,i.config=i.set=M,e===void 0&&(e={}),e)for(r=[`precision`,`rounding`,`toExpNeg`,`toExpPos`,`LN10`],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function M(e){if(!e||typeof e!=`object`)throw Error(a+`Object expected`);var t,r,i,s=[`precision`,1,n,`rounding`,0,8,`toExpNeg`,-1/0,0,`toExpPos`,0,1/0];for(t=0;t<s.length;t+=3)if((i=e[r=s[t]])!==void 0)if(c(i)===i&&i>=s[t+1]&&i<=s[t+2])this[r]=i;else throw Error(o+r+`: `+i);if((i=e[r=`LN10`])!==void 0)if(i==Math.LN10)this[r]=new this(i);else throw Error(o+r+`: `+i);return this}r=j(r),r.default=r.Decimal=r,d=new r(1),typeof define==`function`&&define.amd?define(function(){return r}):t!==void 0&&t.exports?t.exports=r:(e||=typeof self<`u`&&self&&self.self==self?self:Function(`return this`)(),e.Decimal=r)})(e)}))());function GF(e){return e===0?1:Math.floor(new WF.default(e).abs().log(10).toNumber())+1}function KF(e,t,n){for(var r=new WF.default(e),i=0,a=[];r.lt(t)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}function qF(e,t){return QF(e)||ZF(e,t)||YF(e,t)||JF()}function JF(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
119
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YF(e,t){if(e){if(typeof e==`string`)return XF(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?XF(e,t):void 0}}function XF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ZF(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function QF(e){if(Array.isArray(e))return e}var $F=e=>{var t=qF(e,2),n=t[0],r=t[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]},eI=(e,t,n)=>{if(e.lte(0))return new WF.default(0);var r=GF(e.toNumber()),i=new WF.default(10).pow(r),a=e.div(i),o=r===1?.1:.05,s=new WF.default(Math.ceil(a.div(o).toNumber())).add(n).mul(o).mul(i);return t?new WF.default(s.toNumber()):new WF.default(Math.ceil(s.toNumber()))},tI=(e,t,n)=>{if(e.lte(0))return new WF.default(0);var r=[1,2,2.5,5],i=e.toNumber(),a=Math.floor(new WF.default(i).abs().log(10).toNumber()),o=new WF.default(10).pow(a),s=e.div(o).toNumber(),c=r.findIndex(e=>e>=s-1e-10);if(c===-1&&(o=o.mul(10),c=0),c+=n,c>=r.length){var l=Math.floor(c/r.length);c%=r.length,o=o.mul(new WF.default(10).pow(l))}var u=new WF.default(r[c]??1).mul(o);return t?u:new WF.default(Math.ceil(u.toNumber()))},nI=(e,t,n)=>{var r=new WF.default(1),i=new WF.default(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new WF.default(10).pow(GF(e)-1),i=new WF.default(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new WF.default(Math.floor(e)))}else e===0?i=new WF.default(Math.floor((t-1)/2)):n||(i=new WF.default(Math.floor(e)));for(var o=Math.floor((t-1)/2),s=[],c=0;c<t;c++)s.push(i.add(new WF.default(c-o).mul(r)).toNumber());return s},rI=function(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:eI;if(!Number.isFinite((t-e)/(n-1)))return{step:new WF.default(0),tickMin:new WF.default(0),tickMax:new WF.default(0)};var o=a(new WF.default(t).sub(e).div(n-1),r,i),s;e<=0&&t>=0?s=new WF.default(0):(s=new WF.default(e).add(t).div(2),s=s.sub(new WF.default(s).mod(o)));var c=Math.ceil(s.sub(e).div(o).toNumber()),l=Math.ceil(new WF.default(t).sub(s).div(o).toNumber()),u=c+l+1;return u>n?rI(e,t,n,r,i+1,a):(u<n&&(l=t>0?l+(n-u):l,c=t>0?c:c+(n-u)),{step:o,tickMin:s.sub(new WF.default(c).mul(o)),tickMax:s.add(new WF.default(l).mul(o))})},iI=function(e){var t=qF(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`auto`,s=Math.max(i,2),c=qF($F([n,r]),2),l=c[0],u=c[1];if(l===-1/0||u===1/0){var d=u===1/0?[l,...Array(i-1).fill(1/0)]:[...Array(i-1).fill(-1/0),u];return n>r?d.reverse():d}if(l===u)return nI(l,i,a);var f=rI(l,u,s,a,0,o===`snap125`?tI:eI),p=f.step,m=f.tickMin,h=f.tickMax,g=KF(m,h.add(new WF.default(.1).mul(p)),p);return n>r?g.reverse():g},aI=function(e,t){var n=qF(e,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`auto`,s=qF($F([r,i]),2),c=s[0],l=s[1];if(c===-1/0||l===1/0)return[r,i];if(c===l)return[c];var u=o===`snap125`?tI:eI,d=Math.max(t,2),f=u(new WF.default(l).sub(c).div(d-1),a,0),p=[...KF(new WF.default(c),new WF.default(l),f),l];if(a===!1){p=p.map(e=>Math.round(e));var m=p.length-1;m>0&&p[m]===p[m-1]&&(p=p.slice(0,m))}return r>i?p.reverse():p},oI=e=>e.rootProps.maxBarSize,sI=e=>e.rootProps.barGap,cI=e=>e.rootProps.barCategoryGap,lI=e=>e.rootProps.barSize,uI=e=>e.rootProps.stackOffset,dI=e=>e.rootProps.reverseStackOrder,fI=e=>e.options.chartName,pI=e=>e.rootProps.syncId,mI=e=>e.rootProps.syncMethod,hI=e=>e.options.eventEmitter,gI=e=>e.rootProps.baseValue,_I={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},vI={allowDecimals:!1,allowDuplicatedCategory:!0,allowDataOverflow:!1,angle:0,angleAxisId:0,axisLine:!0,axisLineType:`polygon`,cx:0,cy:0,hide:!1,includeHidden:!1,label:!1,niceTicks:`auto`,orientation:`outer`,reversed:!1,scale:`auto`,tick:!0,tickLine:!0,tickSize:8,type:`auto`,zIndex:_I.axis},yI={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,angle:0,axisLine:!0,includeHidden:!1,hide:!1,niceTicks:`auto`,label:!1,orientation:`right`,radiusAxisId:0,reversed:!1,scale:`auto`,stroke:`#ccc`,tick:!0,tickCount:5,tickLine:!0,type:`auto`,zIndex:_I.axis},bI=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function xI(e,t,n){if(n!==`auto`)return n;if(e!=null)return HO(e,t)?`category`:`number`}function SI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function CI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?SI(Object(n),!0).forEach(function(t){wI(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SI(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function wI(e,t,n){return(t=TI(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TI(e){var t=EI(e,`string`);return typeof t==`symbol`?t:t+``}function EI(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var DI={allowDataOverflow:vI.allowDataOverflow,allowDecimals:vI.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:vI.angleAxisId,includeHidden:!1,name:void 0,reversed:vI.reversed,scale:vI.scale,tick:vI.tick,tickCount:void 0,ticks:void 0,type:vI.type,unit:void 0,niceTicks:`auto`},OI={allowDataOverflow:yI.allowDataOverflow,allowDecimals:yI.allowDecimals,allowDuplicatedCategory:yI.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:yI.radiusAxisId,includeHidden:yI.includeHidden,name:void 0,reversed:yI.reversed,scale:yI.scale,tick:yI.tick,tickCount:yI.tickCount,ticks:void 0,type:yI.type,unit:void 0,niceTicks:`auto`},kI=$([(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},xA],(e,t)=>{if(e!=null)return e;var n=xI(t,`angleAxis`,DI.type)??`category`;return CI(CI({},DI),{},{type:n})}),AI=$([(e,t)=>e.polarAxis.radiusAxis[t],xA],(e,t)=>{if(e!=null)return e;var n=xI(t,`radiusAxis`,OI.type)??`category`;return CI(CI({},OI),{},{type:n})}),jI=e=>e.polarOptions,MI=$([ck,lk,Ek],tF),NI=$([jI,MI],(e,t)=>{if(e!=null)return xC(e.innerRadius,t,0)}),PI=$([jI,MI],(e,t)=>{if(e!=null)return xC(e.outerRadius,t,t*.8)}),FI=$([jI],e=>e==null?[0,0]:[e.startAngle,e.endAngle]),II=$([kI,FI],bI),LI=$([MI,NI,PI],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]}),RI=$([AI,LI],bI),zI=$([vA,jI,NI,PI,ck,lk],(e,t,n,r,i,a)=>{if(!(e!==`centric`&&e!==`radial`||t==null||n==null||r==null)){var o=t.cx,s=t.cy,c=t.startAngle,l=t.endAngle;return{cx:xC(o,i,i/2),cy:xC(s,a,a/2),innerRadius:n,outerRadius:r,startAngle:c,endAngle:l,clockWise:!1}}}),BI=(e,t)=>t,VI=(e,t,n)=>n;function HI(e){return e?.id}function UI(e,t,n){var r=t.chartData,i=r===void 0?[]:r,a=n.allowDuplicatedCategory,o=n.dataKey,s=new Map;return e.forEach(e=>{var t=e.data??i;if(!(t==null||t.length===0)){var n=HI(e);t.forEach((t,r)=>{var i=o==null||a?r:String(BO(t,o,null)),c=BO(t,e.dataKey,0),l=s.has(i)?s.get(i):{};Object.assign(l,{[n]:c}),s.set(i,l)})}}),Array.from(s.values())}function WI(e){return`stackId`in e&&e.stackId!=null&&e.dataKey!=null}var GI=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function KI(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function qI(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return!1}var JI=e=>{var t=vA(e);return t===`horizontal`?`xAxis`:t===`vertical`?`yAxis`:t===`centric`?`angleAxis`:`radiusAxis`},YI=e=>e.tooltip.settings.axisId;function XI(e){if(e!=null){var t=e.ticks,n=e.bandwidth,r=e.range(),i=[Math.min(...r),Math.max(...r)];return{domain:()=>e.domain(),range:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(e){var t=i[0],n=i[1];return t<=n?e>=t&&e<=n:e>=n&&e<=t},bandwidth:n?()=>n.call(e):void 0,ticks:t?n=>t.call(e,n):void 0,map:(t,n)=>{var r=e(t);if(r!=null){if(e.bandwidth&&n!=null&&n.position){var i=e.bandwidth();switch(n.position){case`middle`:r+=i/2;break;case`end`:r+=i;break;default:break}}return r}}}}}var ZI=(e,t)=>{if(t!=null)switch(e){case`linear`:if(!BF(t)){for(var n,r,i=0;i<t.length;i++){var a=t[i];NO(a)&&((n===void 0||a<n)&&(n=a),(r===void 0||a>r)&&(r=a))}return n!==void 0&&r!==void 0?[n,r]:void 0}return t;default:return t}};function QI(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function $I(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function eL(e){let t,n,r;e.length===2?(t=e===QI||e===$I?e:tL,n=e,r=e):(t=QI,n=(t,n)=>QI(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function tL(){return 0}function nL(e){return e===null?NaN:+e}function*rL(e,t){if(t===void 0)for(let t of e)t!=null&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}var iL=eL(QI),aL=iL.right;iL.left,eL(nL).center;var oL=class extends Map{constructor(e,t=uL){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(sL(this,e))}has(e){return super.has(sL(this,e))}set(e,t){return super.set(cL(this,e),t)}delete(e){return super.delete(lL(this,e))}};function sL({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function cL({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function lL({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function uL(e){return typeof e==`object`&&e?e.valueOf():e}function dL(e=QI){if(e===QI)return fL;if(typeof e!=`function`)throw TypeError(`compare is not a function`);return(t,n)=>{let r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function fL(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:+(e>t))}var pL=Math.sqrt(50),mL=Math.sqrt(10),hL=Math.sqrt(2);function gL(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=pL?10:a>=mL?5:a>=hL?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?gL(e,t,n*2):[s,c,l]}function _L(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?gL(t,e,n):gL(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function vL(e,t,n){return t=+t,e=+e,n=+n,gL(e,t,n)[2]}function yL(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?vL(t,e,n):vL(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function bL(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function xL(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function SL(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?fL:dL(i);r>n;){if(r-n>600){let a=r-n+1,o=t-n+1,s=Math.log(a),c=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*c*(a-c)/a)*(o-a/2<0?-1:1),u=Math.max(n,Math.floor(t-o*c/a+l)),d=Math.min(r,Math.floor(t+(a-o)*c/a+l));SL(e,t,u,d,i)}let a=e[t],o=n,s=r;for(CL(e,n,t),i(e[r],a)>0&&CL(e,n,r);o<s;){for(CL(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[n],a)===0?CL(e,n,s):(++s,CL(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function CL(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}function wL(e,t,n){if(e=Float64Array.from(rL(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return xL(e);if(t>=1)return bL(e);var r,i=(r-1)*t,a=Math.floor(i),o=bL(SL(e,a).subarray(0,a+1));return o+(xL(e.subarray(a+1))-o)*(i-a)}}function TL(e,t,n=nL){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e);return o+(+n(e[a+1],a+1,e)-o)*(i-a)}}function EL(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}function DL(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function OL(e,t){switch(arguments.length){case 0:break;case 1:typeof e==`function`?this.interpolator(e):this.range(e);break;default:this.domain(e),typeof t==`function`?this.interpolator(t):this.range(t);break}return this}var kL=Symbol(`implicit`);function AL(){var e=new oL,t=[],n=[],r=kL;function i(i){let a=e.get(i);if(a===void 0){if(r!==kL)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new oL;for(let r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return AL(t,n).unknown(r)},DL.apply(i,arguments),i}function jL(){var e=AL().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var e=t().length,d=i<r,f=d?i:r,p=d?r:i;a=(p-f)/Math.max(1,e-c+l*2),s&&(a=Math.floor(a)),f+=(p-f-a*(e-c))*u,o=a*(1-c),s&&(f=Math.round(f),o=Math.round(o));var m=EL(e).map(function(e){return f+a*e});return n(d?m.reverse():m)}return e.domain=function(e){return arguments.length?(t(e),d()):t()},e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,d()):s},e.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},e.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},e.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},e.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},e.copy=function(){return jL(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},DL.apply(d(),arguments)}function ML(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return ML(t())},e}function NL(){return ML(jL.apply(null,arguments).paddingInner(1))}function PL(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function FL(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function IL(){}var LL=.7,RL=1/LL,zL=`\\s*([+-]?\\d+)\\s*`,BL=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,VL=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,HL=/^#([0-9a-f]{3,8})$/,UL=RegExp(`^rgb\\(${zL},${zL},${zL}\\)$`),WL=RegExp(`^rgb\\(${VL},${VL},${VL}\\)$`),GL=RegExp(`^rgba\\(${zL},${zL},${zL},${BL}\\)$`),KL=RegExp(`^rgba\\(${VL},${VL},${VL},${BL}\\)$`),qL=RegExp(`^hsl\\(${BL},${VL},${VL}\\)$`),JL=RegExp(`^hsla\\(${BL},${VL},${VL},${BL}\\)$`),YL={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};PL(IL,eR,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:XL,formatHex:XL,formatHex8:ZL,formatHsl:QL,formatRgb:$L,toString:$L});function XL(){return this.rgb().formatHex()}function ZL(){return this.rgb().formatHex8()}function QL(){return pR(this).formatHsl()}function $L(){return this.rgb().formatRgb()}function eR(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=HL.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?tR(t):n===3?new aR(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?nR(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?nR(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=UL.exec(e))?new aR(t[1],t[2],t[3],1):(t=WL.exec(e))?new aR(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=GL.exec(e))?nR(t[1],t[2],t[3],t[4]):(t=KL.exec(e))?nR(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=qL.exec(e))?fR(t[1],t[2]/100,t[3]/100,1):(t=JL.exec(e))?fR(t[1],t[2]/100,t[3]/100,t[4]):YL.hasOwnProperty(e)?tR(YL[e]):e===`transparent`?new aR(NaN,NaN,NaN,0):null}function tR(e){return new aR(e>>16&255,e>>8&255,e&255,1)}function nR(e,t,n,r){return r<=0&&(e=t=n=NaN),new aR(e,t,n,r)}function rR(e){return e instanceof IL||(e=eR(e)),e?(e=e.rgb(),new aR(e.r,e.g,e.b,e.opacity)):new aR}function iR(e,t,n,r){return arguments.length===1?rR(e):new aR(e,t,n,r??1)}function aR(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}PL(aR,iR,FL(IL,{brighter(e){return e=e==null?RL:RL**+e,new aR(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?LL:LL**+e,new aR(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new aR(uR(this.r),uR(this.g),uR(this.b),lR(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:oR,formatHex:oR,formatHex8:sR,formatRgb:cR,toString:cR}));function oR(){return`#${dR(this.r)}${dR(this.g)}${dR(this.b)}`}function sR(){return`#${dR(this.r)}${dR(this.g)}${dR(this.b)}${dR((isNaN(this.opacity)?1:this.opacity)*255)}`}function cR(){let e=lR(this.opacity);return`${e===1?`rgb(`:`rgba(`}${uR(this.r)}, ${uR(this.g)}, ${uR(this.b)}${e===1?`)`:`, ${e})`}`}function lR(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function uR(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function dR(e){return e=uR(e),(e<16?`0`:``)+e.toString(16)}function fR(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new hR(e,t,n,r)}function pR(e){if(e instanceof hR)return new hR(e.h,e.s,e.l,e.opacity);if(e instanceof IL||(e=eR(e)),!e)return new hR;if(e instanceof hR)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new hR(o,s,c,e.opacity)}function mR(e,t,n,r){return arguments.length===1?pR(e):new hR(e,t,n,r??1)}function hR(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}PL(hR,mR,FL(IL,{brighter(e){return e=e==null?RL:RL**+e,new hR(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?LL:LL**+e,new hR(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new aR(vR(e>=240?e-240:e+120,i,r),vR(e,i,r),vR(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new hR(gR(this.h),_R(this.s),_R(this.l),lR(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=lR(this.opacity);return`${e===1?`hsl(`:`hsla(`}${gR(this.h)}, ${_R(this.s)*100}%, ${_R(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function gR(e){return e=(e||0)%360,e<0?e+360:e}function _R(e){return Math.max(0,Math.min(1,e||0))}function vR(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var yR=e=>()=>e;function bR(e,t){return function(n){return e+n*t}}function pee(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function mee(e){return(e=+e)==1?xR:function(t,n){return n-t?pee(t,n,e):yR(isNaN(t)?n:t)}}function xR(e,t){var n=t-e;return n?bR(e,n):yR(isNaN(e)?t:e)}var SR=(function e(t){var n=mee(t);function r(e,t){var r=n((e=iR(e)).r,(t=iR(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=xR(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function hee(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function gee(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function _ee(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=ER(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function vee(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function CR(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function yee(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=ER(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var wR=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,TR=new RegExp(wR.source,`g`);function bee(e){return function(){return e}}function xee(e){return function(t){return e(t)+``}}function See(e,t){var n=wR.lastIndex=TR.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=wR.exec(e))&&(i=TR.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:CR(r,i)})),n=TR.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?xee(c[0].x):bee(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function ER(e,t){var n=typeof t,r;return t==null||n===`boolean`?yR(t):(n===`number`?CR:n===`string`?(r=eR(t))?(t=r,SR):See:t instanceof eR?SR:t instanceof Date?vee:gee(t)?hee:Array.isArray(t)?_ee:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?yee:CR)(e,t)}function DR(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function OR(e,t){t===void 0&&(t=e,e=ER);for(var n=0,r=t.length-1,i=t[0],a=Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return a[t](e-t)}}function kR(e){return function(){return e}}function AR(e){return+e}var jR=[0,1];function MR(e){return e}function NR(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:kR(isNaN(t)?NaN:.5)}function PR(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function FR(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=NR(i,r),a=n(o,a)):(r=NR(r,i),a=n(a,o)),function(e){return a(r(e))}}function IR(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=NR(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=aL(e,t,1,r)-1;return a[n](i[n](t))}}function LR(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function RR(){var e=jR,t=jR,n=ER,r,i,a,o=MR,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==MR&&(o=PR(e[0],e[n-1])),s=n>2?IR:FR,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||=s(e.map(r),t,n))(r(o(i)))}return d.invert=function(n){return o(i((l||=s(t,e.map(r),CR))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,AR),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=DR,u()},d.clamp=function(e){return arguments.length?(o=e?!0:MR,u()):o!==MR},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function zR(){return RR()(MR,MR)}function BR(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function VR(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function HR(e){return e=VR(Math.abs(e)),e?e[1]:NaN}function UR(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function WR(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var GR=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function KR(e){if(!(t=GR.exec(e)))throw Error(`invalid format: `+e);var t;return new qR({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}KR.prototype=qR.prototype;function qR(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}qR.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function JR(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var YR;function XR(e,t){var n=VR(e,t);if(!n)return YR=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(YR=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+VR(e,Math.max(0,t+a-1))[0]}function ZR(e,t){var n=VR(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var QR={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:BR,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>ZR(e*100,t),r:ZR,s:XR,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function $R(e){return e}var ez=Array.prototype.map,tz=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function nz(e){var t=e.grouping===void 0||e.thousands===void 0?$R:UR(ez.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?$R:WR(ez.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e,l){e=KR(e);var u=e.fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,_=e.precision,v=e.trim,y=e.type;y===`n`?(g=!0,y=`g`):QR[y]||(_===void 0&&(_=12),v=!0,y=`g`),(m||u===`0`&&d===`=`)&&(m=!0,u=`0`,d=`=`);var b=(l&&l.prefix!==void 0?l.prefix:``)+(p===`$`?n:p===`#`&&/[boxX]/.test(y)?`0`+y.toLowerCase():``),x=(p===`$`?r:/[%p]/.test(y)?o:``)+(l&&l.suffix!==void 0?l.suffix:``),S=QR[y],C=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function w(e){var n=b,r=x,o,l,p;if(y===`c`)r=S(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),_),v&&(e=JR(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&&YR!==void 0?tz[8+YR/3]:``)+r+(w&&f===`(`?`)`:``),C){for(o=-1,l=e.length;++o<l;)if(p=e.charCodeAt(o),48>p||p>57){r=(p===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}g&&!m&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<h?Array(h-T+1).join(u):``;switch(g&&m&&(e=t(E+e,E.length?h-r.length:1/0),E=``),d){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r;break}return a(e)}return w.toString=function(){return e+``},w}function u(e,t){var n=Math.max(-8,Math.min(8,Math.floor(HR(t)/3)))*3,r=10**-n,i=l((e=KR(e),e.type=`f`,e),{suffix:tz[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var rz,iz,az;oz({thousands:`,`,grouping:[3],currency:[`$`,``]});function oz(e){return rz=nz(e),iz=rz.format,az=rz.formatPrefix,rz}function sz(e){return Math.max(0,-HR(Math.abs(e)))}function cz(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(HR(t)/3)))*3-HR(Math.abs(e)))}function lz(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,HR(t)-HR(e))+1}function uz(e,t,n,r){var i=yL(e,t,n),a;switch(r=KR(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=cz(i,o))&&(r.precision=a),az(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=lz(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=sz(i))&&(r.precision=a-(r.type===`%`)*2);break}return iz(r)}function dz(e){var t=e.domain;return e.ticks=function(e){var n=t();return _L(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return uz(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-->0;){if(l=vL(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function fz(){var e=zR();return e.copy=function(){return LR(e,fz())},DL.apply(e,arguments),dz(e)}function pz(e){var t;function n(e){return e==null||isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Array.from(t,AR),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return pz(e).unknown(t)},e=arguments.length?Array.from(e,AR):[0,1],dz(n)}function mz(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function hz(e){return Math.log(e)}function gz(e){return Math.exp(e)}function _z(e){return-Math.log(-e)}function vz(e){return-Math.exp(-e)}function yz(e){return isFinite(e)?+(`1e`+e):e<0?0:e}function bz(e){return e===10?yz:e===Math.E?Math.exp:t=>e**+t}function xz(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Sz(e){return(t,n)=>-e(-t,n)}function Cz(e){let t=e(hz,gz),n=t.domain,r=10,i,a;function o(){return i=xz(r),a=bz(r),n()[0]<0?(i=Sz(i),a=Sz(a),e(_z,vz)):e(hz,gz),t}return t.base=function(e){return arguments.length?(r=+e,o()):r},t.domain=function(e){return arguments.length?(n(e),o()):n()},t.ticks=e=>{let t=n(),o=t[0],s=t[t.length-1],c=s<o;c&&([o,s]=[s,o]);let l=i(o),u=i(s),d,f,p=e==null?10:+e,m=[];if(!(r%1)&&u-l<p){if(l=Math.floor(l),u=Math.ceil(u),o>0){for(;l<=u;++l)for(d=1;d<r;++d)if(f=l<0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}}else for(;l<=u;++l)for(d=r-1;d>=1;--d)if(f=l>0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}m.length*2<p&&(m=_L(o,s,p))}else m=_L(l,u,Math.min(u-l,p)).map(a);return c?m.reverse():m},t.tickFormat=(e,n)=>{if(e??=10,n??=r===10?`s`:`,`,typeof n!=`function`&&(!(r%1)&&(n=KR(n)).precision==null&&(n.trim=!0),n=iz(n)),e===1/0)return n;let o=Math.max(1,r*e/t.ticks().length);return e=>{let t=e/a(Math.round(i(e)));return t*r<r-.5&&(t*=r),t<=o?n(e):``}},t.nice=()=>n(mz(n(),{floor:e=>a(Math.floor(i(e))),ceil:e=>a(Math.ceil(i(e)))})),t}function wz(){let e=Cz(RR()).domain([1,10]);return e.copy=()=>LR(e,wz()).base(e.base()),DL.apply(e,arguments),e}function Tz(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Ez(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Dz(e){var t=1,n=e(Tz(t),Ez(t));return n.constant=function(n){return arguments.length?e(Tz(t=+n),Ez(t)):t},dz(n)}function Oz(){var e=Dz(RR());return e.copy=function(){return LR(e,Oz()).constant(e.constant())},DL.apply(e,arguments)}function kz(e){return function(t){return t<0?-((-t)**+e):t**+e}}function Az(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function jz(e){return e<0?-e*e:e*e}function Mz(e){var t=e(MR,MR),n=1;function r(){return n===1?e(MR,MR):n===.5?e(Az,jz):e(kz(n),kz(1/n))}return t.exponent=function(e){return arguments.length?(n=+e,r()):n},dz(t)}function Nz(){var e=Mz(RR());return e.copy=function(){return LR(e,Nz()).exponent(e.exponent())},DL.apply(e,arguments),e}function Pz(){return Nz.apply(null,arguments).exponent(.5)}function Fz(e){return Math.sign(e)*e*e}function Iz(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Lz(){var e=zR(),t=[0,1],n=!1,r;function i(t){var i=Iz(e(t));return isNaN(i)?r:n?Math.round(i):i}return i.invert=function(t){return e.invert(Fz(t))},i.domain=function(t){return arguments.length?(e.domain(t),i):e.domain()},i.range=function(n){return arguments.length?(e.range((t=Array.from(n,AR)).map(Fz)),i):t.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(n=!!e,i):n},i.clamp=function(t){return arguments.length?(e.clamp(t),i):e.clamp()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return Lz(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},DL.apply(i,arguments),dz(i)}function Rz(){var e=[],t=[],n=[],r;function i(){var r=0,i=Math.max(1,t.length);for(n=Array(i-1);++r<i;)n[r-1]=TL(e,r/i);return a}function a(e){return e==null||isNaN(e=+e)?r:t[aL(n,e)]}return a.invertExtent=function(r){var i=t.indexOf(r);return i<0?[NaN,NaN]:[i>0?n[i-1]:e[0],i<n.length?n[i]:e[e.length-1]]},a.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(QI),i()},a.range=function(e){return arguments.length?(t=Array.from(e),i()):t.slice()},a.unknown=function(e){return arguments.length?(r=e,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return Rz().domain(e).range(t).unknown(r)},DL.apply(a,arguments)}function zz(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(e){return e!=null&&e<=e?i[aL(r,e,0,n)]:a}function s(){var i=-1;for(r=Array(n);++i<n;)r[i]=((i+1)*t-(i-n)*e)/(n+1);return o}return o.domain=function(n){return arguments.length?([e,t]=n,e=+e,t=+t,s()):[e,t]},o.range=function(e){return arguments.length?(n=(i=Array.from(e)).length-1,s()):i.slice()},o.invertExtent=function(a){var o=i.indexOf(a);return o<0?[NaN,NaN]:o<1?[e,r[0]]:o>=n?[r[n-1],t]:[r[o-1],r[o]]},o.unknown=function(e){return arguments.length&&(a=e),o},o.thresholds=function(){return r.slice()},o.copy=function(){return zz().domain([e,t]).range(i).unknown(a)},DL.apply(dz(o),arguments)}function Bz(){var e=[.5],t=[0,1],n,r=1;function i(i){return i!=null&&i<=i?t[aL(e,i,0,r)]:n}return i.domain=function(n){return arguments.length?(e=Array.from(n),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(n){return arguments.length?(t=Array.from(n),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(n){var r=t.indexOf(n);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(n=e,i):n},i.copy=function(){return Bz().domain(e).range(t).unknown(n)},DL.apply(i,arguments)}var Vz=new Date,Hz=new Date;function Uz(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>Uz(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(Vz.setTime(+t),Hz.setTime(+r),e(Vz),e(Hz),Math.floor(n(Vz,Hz))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var Wz=Uz(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Wz.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Uz(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Wz),Wz.range;var Gz=1e3,Kz=Gz*60,qz=Kz*60,Jz=qz*24,Yz=Jz*7,Xz=Jz*30,Zz=Jz*365,Qz=Uz(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Gz)},(e,t)=>(t-e)/Gz,e=>e.getUTCSeconds());Qz.range;var $z=Uz(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Gz)},(e,t)=>{e.setTime(+e+t*Kz)},(e,t)=>(t-e)/Kz,e=>e.getMinutes());$z.range;var eB=Uz(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Kz)},(e,t)=>(t-e)/Kz,e=>e.getUTCMinutes());eB.range;var tB=Uz(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Gz-e.getMinutes()*Kz)},(e,t)=>{e.setTime(+e+t*qz)},(e,t)=>(t-e)/qz,e=>e.getHours());tB.range;var nB=Uz(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*qz)},(e,t)=>(t-e)/qz,e=>e.getUTCHours());nB.range;var rB=Uz(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Kz)/Jz,e=>e.getDate()-1);rB.range;var iB=Uz(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Jz,e=>e.getUTCDate()-1);iB.range;var aB=Uz(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Jz,e=>Math.floor(e/Jz));aB.range;function oB(e){return Uz(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Kz)/Yz)}var sB=oB(0),cB=oB(1),lB=oB(2),uB=oB(3),dB=oB(4),fB=oB(5),pB=oB(6);sB.range,cB.range,lB.range,uB.range,dB.range,fB.range,pB.range;function mB(e){return Uz(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/Yz)}var hB=mB(0),gB=mB(1),_B=mB(2),vB=mB(3),yB=mB(4),bB=mB(5),xB=mB(6);hB.range,gB.range,_B.range,vB.range,yB.range,bB.range,xB.range;var SB=Uz(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());SB.range;var CB=Uz(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());CB.range;var wB=Uz(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());wB.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Uz(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),wB.range;var TB=Uz(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());TB.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Uz(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),TB.range;function EB(e,t,n,r,i,a){let o=[[Qz,1,Gz],[Qz,5,5*Gz],[Qz,15,15*Gz],[Qz,30,30*Gz],[a,1,Kz],[a,5,5*Kz],[a,15,15*Kz],[a,30,30*Kz],[i,1,qz],[i,3,3*qz],[i,6,6*qz],[i,12,12*qz],[r,1,Jz],[r,2,2*Jz],[n,1,Yz],[t,1,Xz],[t,3,3*Xz],[e,1,Zz]];function s(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:c(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function c(t,n,r){let i=Math.abs(n-t)/r,a=eL(([,,e])=>e).right(o,i);if(a===o.length)return e.every(yL(t/Zz,n/Zz,r));if(a===0)return Wz.every(Math.max(yL(t,n,r),1));let[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[s,c]}var[DB,OB]=EB(TB,CB,hB,aB,nB,eB),[kB,AB]=EB(wB,SB,sB,rB,tB,$z);function jB(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function MB(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function NB(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function PB(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=VB(i),u=HB(i),d=VB(a),f=HB(a),p=VB(o),m=HB(o),h=VB(s),g=HB(s),_=VB(c),v=HB(c),y={a:N,A:P,b:F,B:I,c:null,d:lV,e:lV,f:mV,g:TV,G:DV,H:uV,I:dV,j:fV,L:pV,m:hV,M:gV,p:L,q:R,Q:XV,s:ZV,S:_V,u:vV,U:yV,V:xV,w:SV,W:CV,x:null,X:null,y:wV,Y:EV,Z:OV,"%":YV},b={a:ee,A:te,b:z,B,c:null,d:kV,e:kV,f:PV,g:GV,G:qV,H:AV,I:jV,j:MV,L:NV,m:FV,M:IV,p:V,q:ne,Q:XV,s:ZV,S:LV,u:RV,U:zV,V:VV,w:HV,W:UV,x:null,X:null,y:WV,Y:KV,Z:JV,"%":YV},x={a:E,A:D,b:O,B:k,c:A,d:$B,e:$B,f:aV,g:YB,G:JB,H:tV,I:tV,j:eV,L:iV,m:QB,M:nV,p:T,q:ZB,Q:sV,s:cV,S:rV,u:WB,U:GB,V:KB,w:UB,W:qB,x:j,X:M,y:YB,Y:JB,Z:XB,"%":oV};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=FB[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=NB(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=MB(NB(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?gB.ceil(a):gB(a),a=iB.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=jB(NB(r.y,0,1)),o=a.getDay(),a=o>4||o===0?cB.ceil(a):cB(a),a=rB.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else(`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?MB(NB(r.y,0,1)).getUTCDay():jB(NB(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,MB(r)):jB(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in FB?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function A(e,n,r){return w(e,t,n,r)}function j(e,t,r){return w(e,n,t,r)}function M(e,t,n){return w(e,r,t,n)}function N(e){return o[e.getDay()]}function P(e){return a[e.getDay()]}function F(e){return c[e.getMonth()]}function I(e){return s[e.getMonth()]}function L(e){return i[+(e.getHours()>=12)]}function R(e){return 1+~~(e.getMonth()/3)}function ee(e){return o[e.getUTCDay()]}function te(e){return a[e.getUTCDay()]}function z(e){return c[e.getUTCMonth()]}function B(e){return s[e.getUTCMonth()]}function V(e){return i[+(e.getUTCHours()>=12)]}function ne(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var FB={"-":``,_:` `,0:`0`},IB=/^\s*\d+/,LB=/^%/,RB=/[\\^$*+?|[\]().{}]/g;function zB(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function BB(e){return e.replace(RB,`\\$&`)}function VB(e){return RegExp(`^(?:`+e.map(BB).join(`|`)+`)`,`i`)}function HB(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function UB(e,t,n){var r=IB.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function WB(e,t,n){var r=IB.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function GB(e,t,n){var r=IB.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function KB(e,t,n){var r=IB.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function qB(e,t,n){var r=IB.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function JB(e,t,n){var r=IB.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function YB(e,t,n){var r=IB.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function XB(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function ZB(e,t,n){var r=IB.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function QB(e,t,n){var r=IB.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function $B(e,t,n){var r=IB.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function eV(e,t,n){var r=IB.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function tV(e,t,n){var r=IB.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function nV(e,t,n){var r=IB.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function rV(e,t,n){var r=IB.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function iV(e,t,n){var r=IB.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function aV(e,t,n){var r=IB.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function oV(e,t,n){var r=LB.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function sV(e,t,n){var r=IB.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function cV(e,t,n){var r=IB.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function lV(e,t){return zB(e.getDate(),t,2)}function uV(e,t){return zB(e.getHours(),t,2)}function dV(e,t){return zB(e.getHours()%12||12,t,2)}function fV(e,t){return zB(1+rB.count(wB(e),e),t,3)}function pV(e,t){return zB(e.getMilliseconds(),t,3)}function mV(e,t){return pV(e,t)+`000`}function hV(e,t){return zB(e.getMonth()+1,t,2)}function gV(e,t){return zB(e.getMinutes(),t,2)}function _V(e,t){return zB(e.getSeconds(),t,2)}function vV(e){var t=e.getDay();return t===0?7:t}function yV(e,t){return zB(sB.count(wB(e)-1,e),t,2)}function bV(e){var t=e.getDay();return t>=4||t===0?dB(e):dB.ceil(e)}function xV(e,t){return e=bV(e),zB(dB.count(wB(e),e)+(wB(e).getDay()===4),t,2)}function SV(e){return e.getDay()}function CV(e,t){return zB(cB.count(wB(e)-1,e),t,2)}function wV(e,t){return zB(e.getFullYear()%100,t,2)}function TV(e,t){return e=bV(e),zB(e.getFullYear()%100,t,2)}function EV(e,t){return zB(e.getFullYear()%1e4,t,4)}function DV(e,t){var n=e.getDay();return e=n>=4||n===0?dB(e):dB.ceil(e),zB(e.getFullYear()%1e4,t,4)}function OV(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+zB(t/60|0,`0`,2)+zB(t%60,`0`,2)}function kV(e,t){return zB(e.getUTCDate(),t,2)}function AV(e,t){return zB(e.getUTCHours(),t,2)}function jV(e,t){return zB(e.getUTCHours()%12||12,t,2)}function MV(e,t){return zB(1+iB.count(TB(e),e),t,3)}function NV(e,t){return zB(e.getUTCMilliseconds(),t,3)}function PV(e,t){return NV(e,t)+`000`}function FV(e,t){return zB(e.getUTCMonth()+1,t,2)}function IV(e,t){return zB(e.getUTCMinutes(),t,2)}function LV(e,t){return zB(e.getUTCSeconds(),t,2)}function RV(e){var t=e.getUTCDay();return t===0?7:t}function zV(e,t){return zB(hB.count(TB(e)-1,e),t,2)}function BV(e){var t=e.getUTCDay();return t>=4||t===0?yB(e):yB.ceil(e)}function VV(e,t){return e=BV(e),zB(yB.count(TB(e),e)+(TB(e).getUTCDay()===4),t,2)}function HV(e){return e.getUTCDay()}function UV(e,t){return zB(gB.count(TB(e)-1,e),t,2)}function WV(e,t){return zB(e.getUTCFullYear()%100,t,2)}function GV(e,t){return e=BV(e),zB(e.getUTCFullYear()%100,t,2)}function KV(e,t){return zB(e.getUTCFullYear()%1e4,t,4)}function qV(e,t){var n=e.getUTCDay();return e=n>=4||n===0?yB(e):yB.ceil(e),zB(e.getUTCFullYear()%1e4,t,4)}function JV(){return`+0000`}function YV(){return`%`}function XV(e){return+e}function ZV(e){return Math.floor(e/1e3)}var QV,$V,eH;tH({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function tH(e){return QV=PB(e),$V=QV.format,QV.parse,eH=QV.utcFormat,QV.utcParse,QV}function nH(e){return new Date(e)}function rH(e){return e instanceof Date?+e:+new Date(+e)}function iH(e,t,n,r,i,a,o,s,c,l){var u=zR(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e)<e?p:s(e)<e?m:o(e)<e?h:a(e)<e?g:r(e)<e?i(e)<e?_:v:n(e)<e?y:b)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,rH)):f().map(nH)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return t==null?x:l(t)},u.nice=function(e){var n=f();return(!e||typeof e.range!=`function`)&&(e=t(n[0],n[n.length-1],e??10)),e?f(mz(n,e)):u},u.copy=function(){return LR(u,iH(e,t,n,r,i,a,o,s,c,l))},u}function aH(){return DL.apply(iH(kB,AB,wB,SB,sB,rB,tB,$z,Qz,$V).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function oH(){return DL.apply(iH(DB,OB,TB,CB,hB,iB,nB,eB,Qz,eH).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function sH(){var e=0,t=1,n,r,i,a,o=MR,s=!1,c;function l(e){return e==null||isNaN(e=+e)?c:o(i===0?.5:(e=(a(e)-n)*i,s?Math.max(0,Math.min(1,e)):e))}l.domain=function(o){return arguments.length?([e,t]=o,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),l):[e,t]},l.clamp=function(e){return arguments.length?(s=!!e,l):s},l.interpolator=function(e){return arguments.length?(o=e,l):o};function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,o=e(n,r),l):[o(0),o(1)]}}return l.range=u(ER),l.rangeRound=u(DR),l.unknown=function(e){return arguments.length?(c=e,l):c},function(o){return a=o,n=o(e),r=o(t),i=n===r?0:1/(r-n),l}}function cH(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function lH(){var e=dz(sH()(MR));return e.copy=function(){return cH(e,lH())},OL.apply(e,arguments)}function uH(){var e=Cz(sH()).domain([1,10]);return e.copy=function(){return cH(e,uH()).base(e.base())},OL.apply(e,arguments)}function dH(){var e=Dz(sH());return e.copy=function(){return cH(e,dH()).constant(e.constant())},OL.apply(e,arguments)}function fH(){var e=Mz(sH());return e.copy=function(){return cH(e,fH()).exponent(e.exponent())},OL.apply(e,arguments)}function pH(){return fH.apply(null,arguments).exponent(.5)}function mH(){var e=[],t=MR;function n(n){if(n!=null&&!isNaN(n=+n))return t((aL(e,n,1)-1)/(e.length-1))}return n.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(QI),n},n.interpolator=function(e){return arguments.length?(t=e,n):t},n.range=function(){return e.map((n,r)=>t(r/(e.length-1)))},n.quantiles=function(t){return Array.from({length:t+1},(n,r)=>wL(e,r/t))},n.copy=function(){return mH(t).domain(e)},OL.apply(n,arguments)}function hH(){var e=0,t=.5,n=1,r=1,i,a,o,s,c,l=MR,u,d=!1,f;function p(e){return isNaN(e=+e)?f:(e=.5+((e=+u(e))-a)*(r*e<r*a?s:c),l(d?Math.max(0,Math.min(1,e)):e))}p.domain=function(l){return arguments.length?([e,t,n]=l,i=u(e=+e),a=u(t=+t),o=u(n=+n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p):[e,t,n]},p.clamp=function(e){return arguments.length?(d=!!e,p):d},p.interpolator=function(e){return arguments.length?(l=e,p):l};function m(e){return function(t){var n,r,i;return arguments.length?([n,r,i]=t,l=OR(e,[n,r,i]),p):[l(0),l(.5),l(1)]}}return p.range=m(ER),p.rangeRound=m(DR),p.unknown=function(e){return arguments.length?(f=e,p):f},function(l){return u=l,i=l(e),a=l(t),o=l(n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p}}function gH(){var e=dz(hH()(MR));return e.copy=function(){return cH(e,gH())},OL.apply(e,arguments)}function _H(){var e=Cz(hH()).domain([.1,1,10]);return e.copy=function(){return cH(e,_H()).base(e.base())},OL.apply(e,arguments)}function vH(){var e=Dz(hH());return e.copy=function(){return cH(e,vH()).constant(e.constant())},OL.apply(e,arguments)}function yH(){var e=Mz(hH());return e.copy=function(){return cH(e,yH()).exponent(e.exponent())},OL.apply(e,arguments)}function bH(){return yH.apply(null,arguments).exponent(.5)}var xH=s({scaleBand:()=>jL,scaleDiverging:()=>gH,scaleDivergingLog:()=>_H,scaleDivergingPow:()=>yH,scaleDivergingSqrt:()=>bH,scaleDivergingSymlog:()=>vH,scaleIdentity:()=>pz,scaleImplicit:()=>kL,scaleLinear:()=>fz,scaleLog:()=>wz,scaleOrdinal:()=>AL,scalePoint:()=>NL,scalePow:()=>Nz,scaleQuantile:()=>Rz,scaleQuantize:()=>zz,scaleRadial:()=>Lz,scaleSequential:()=>lH,scaleSequentialLog:()=>uH,scaleSequentialPow:()=>fH,scaleSequentialQuantile:()=>mH,scaleSequentialSqrt:()=>pH,scaleSequentialSymlog:()=>dH,scaleSqrt:()=>Pz,scaleSymlog:()=>Oz,scaleThreshold:()=>Bz,scaleTime:()=>aH,scaleUtc:()=>oH,tickFormat:()=>uz});function SH(e){var t=xH;if(e in t&&typeof t[e]==`function`)return t[e]();var n=`scale${EC(e)}`;if(n in t&&typeof t[n]==`function`)return t[n]()}function CH(e,t,n){if(typeof e==`function`)return e.copy().domain(t).range(n);if(e!=null){var r=SH(e);if(r!=null)return r.domain(t).range(n),r}}function wH(e,t,n,r){if(!(n==null||r==null))return typeof e.scale==`function`?CH(e.scale,n,r):CH(t,n,r)}function TH(e){return`scale${EC(e)}`}function EH(e){return TH(e)in xH}var DH=(e,t,n)=>{if(e!=null){var r=e.scale,i=e.type;if(r===`auto`)return i===`category`&&n&&(n.indexOf(`LineChart`)>=0||n.indexOf(`AreaChart`)>=0||n.indexOf(`ComposedChart`)>=0&&!t)?`point`:i===`category`?`band`:`linear`;if(typeof r==`string`)return EH(r)?r:`point`}};function OH(e,t){for(var n=0,r=e.length,i=e[0]<e[e.length-1];n<r;){var a=Math.floor((n+r)/2);(i?e[a]<t:e[a]>t)?n=a+1:r=a}return n}function kH(e,t){if(e){var n=t??e.domain(),r=n.map(t=>e(t)??0),i=e.range();if(!(n.length===0||i.length<2))return e=>{var t=OH(r,e);if(t<=0)return n[0];if(t>=n.length)return n[n.length-1];var i=r[t-1]??0,a=r[t]??0;return Math.abs(e-i)<=Math.abs(e-a)?n[t-1]:n[t]}}}function AH(e){if(e!=null)return`invert`in e&&typeof e.invert==`function`?e.invert.bind(e):kH(e,void 0)}function jH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function MH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?jH(Object(n),!0).forEach(function(t){NH(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jH(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function NH(e,t,n){return(t=PH(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PH(e){var t=FH(e,`string`);return typeof t==`symbol`?t:t+``}function FH(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function IH(e,t){return VH(e)||BH(e,t)||RH(e,t)||LH()}function LH(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
120
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RH(e,t){if(e){if(typeof e==`string`)return zH(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zH(e,t):void 0}}function zH(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function BH(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function VH(e){if(Array.isArray(e))return e}var HH=[0,`auto`],UH={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:`preserveEnd`,minTickGap:5,mirror:!1,name:void 0,orientation:`bottom`,padding:{left:0,right:0},reversed:!1,scale:`auto`,tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:`category`,unit:void 0,niceTicks:`auto`},WH=(e,t)=>e.cartesianAxis.xAxis[t],GH=(e,t)=>WH(e,t)??UH,KH={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:HH,hide:!0,id:0,includeHidden:!1,interval:`preserveEnd`,minTickGap:5,mirror:!1,name:void 0,orientation:`left`,padding:{top:0,bottom:0},reversed:!1,scale:`auto`,tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:`number`,unit:void 0,niceTicks:`auto`,width:60},qH=(e,t)=>e.cartesianAxis.yAxis[t],JH=(e,t)=>qH(e,t)??KH,YH={domain:[0,`auto`],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:``,range:[64,64],scale:`auto`,type:`number`,unit:``},XH=(e,t)=>e.cartesianAxis.zAxis[t]??YH,ZH=(e,t,n)=>{switch(t){case`xAxis`:return GH(e,n);case`yAxis`:return JH(e,n);case`zAxis`:return XH(e,n);case`angleAxis`:return kI(e,n);case`radiusAxis`:return AI(e,n);default:throw Error(`Unexpected axis type: ${t}`)}},QH=(e,t,n)=>{switch(t){case`xAxis`:return GH(e,n);case`yAxis`:return JH(e,n);default:throw Error(`Unexpected axis type: ${t}`)}},$H=(e,t,n)=>{switch(t){case`xAxis`:return GH(e,n);case`yAxis`:return JH(e,n);case`angleAxis`:return kI(e,n);case`radiusAxis`:return AI(e,n);default:throw Error(`Unexpected axis type: ${t}`)}},eU=e=>e.graphicalItems.cartesianItems.some(e=>e.type===`bar`)||e.graphicalItems.polarItems.some(e=>e.type===`radialBar`);function tU(e,t){return n=>{switch(e){case`xAxis`:return`xAxisId`in n&&n.xAxisId===t;case`yAxis`:return`yAxisId`in n&&n.yAxisId===t;case`zAxis`:return`zAxisId`in n&&n.zAxisId===t;case`angleAxis`:return`angleAxisId`in n&&n.angleAxisId===t;case`radiusAxis`:return`radiusAxisId`in n&&n.radiusAxisId===t;default:return!1}}}var nU=e=>e.graphicalItems.cartesianItems,rU=$([BI,VI],tU),iU=(e,t,n)=>e.filter(n).filter(e=>t?.includeHidden===!0?!0:!e.hide),aU=$([nU,ZH,rU],iU,{memoizeOptions:{resultEqualityCheck:KI}}),oU=$([aU],e=>e.filter(e=>e.type===`area`||e.type===`bar`).filter(WI)),sU=e=>e.filter(e=>!(`stackId`in e)||e.stackId===void 0),cU=$([aU],sU),lU=e=>e.map(e=>e.data).filter(Boolean).flat(1),uU=$([aU],e=>e.some(e=>!e.data)),dU=$([aU],lU,{memoizeOptions:{resultEqualityCheck:KI}}),fU=(e,t)=>{var n=t.chartData,r=n===void 0?[]:n,i=t.dataStartIndex,a=t.dataEndIndex;return e.length>0?e:r.slice(i,a+1)},pU=$([dU,kF],fU),mU=(e,t,n)=>t?.dataKey==null?n.length>0?n.map(e=>e.dataKey).flatMap(t=>e.map(e=>({value:BO(e,t)}))):e.map(e=>({value:e})):e.map(e=>({value:BO(e,t.dataKey)})),hU=(e,t,n,r,i,a)=>{var o=r.chartData,s=o===void 0?[]:o,c=r.dataStartIndex,l=r.dataEndIndex,u=mU(e,t,n);return i&&t?.dataKey!=null&&a.length>0?[...s.slice(c,l+1).map(e=>({value:BO(e,t.dataKey)})).filter(e=>e.value!=null),...u]:u},gU=$([pU,ZH,aU,kF,uU,dU],hU);function _U(e){if(vC(e)||e instanceof Date){var t=Number(e);if(NO(t))return t}}function vU(e){if(Array.isArray(e)){var t=[_U(e[0]),_U(e[1])];return BF(t)?t:void 0}var n=_U(e);if(n!=null)return[n,n]}function yU(e){return e.map(_U).filter(DC)}function bU(e,t){var n=_U(e),r=_U(t);return n==null&&r==null?0:n==null?-1:r==null?1:n-r}var xU=$([gU],e=>e?.map(e=>e.value).sort(bU));function SU(e,t){switch(e){case`xAxis`:return t.direction===`x`;case`yAxis`:return t.direction===`y`;default:return!1}}function CU(e,t,n){if(!n||!n.length)return[];var r;if(typeof t==`number`&&!gC(t))r=t;else if(Array.isArray(t)){var i=yU(t);i.length>0&&(r=Math.max(...i))}return r==null?[]:yU(n.flatMap(t=>{var n=BO(e,t.dataKey),i,a;if(Array.isArray(n)){var o=IH(n,2);i=o[0],a=o[1]}else i=a=n;if(!(!NO(i)||!NO(a)))return[r-i,r+a]}))}var wU=e=>$H(e,JI(e),YI(e)),TU=$([wU],e=>e?.dataKey),EU=$([oU,kF,wU],UI),DU=(e,t,n,r)=>{var i=t.reduce((e,t)=>{if(t.stackId==null)return e;var n=e[t.stackId];return n??=[],n.push(t),e[t.stackId]=n,e},{});return Object.fromEntries(Object.entries(i).map(t=>{var i=IH(t,2),a=i[0],o=i[1],s=r?[...o].reverse():o;return[a,{stackedData:qO(e,s.map(HI),n),graphicalItems:s}]}))},OU=$([EU,oU,uI,dI],DU),kU=(e,t,n,r)=>{var i=t.dataStartIndex,a=t.dataEndIndex;if(r==null&&n!==`zAxis`)return ek(e,i,a)},AU=$([ZH],e=>e.allowDataOverflow),jU=e=>{if(e==null||!(`domain`in e))return HH;if(e.domain!=null)return e.domain;if(`ticks`in e&&e.ticks!=null){if(e.type===`number`){var t=yU(e.ticks);return[Math.min(...t),Math.max(...t)]}if(e.type===`category`)return e.ticks.map(String)}return e?.domain??HH},MU=$([ZH],jU),NU=$([MU,AU],HF),PU=$([OU,DF,BI,NU],kU,{memoizeOptions:{resultEqualityCheck:GI}}),FU=e=>e.errorBars,IU=(e,t,n)=>e.flatMap(e=>t[e.id]).filter(Boolean).filter(e=>SU(n,e)),LU=function(){var e=[...arguments].filter(Boolean);if(e.length!==0){var t=e.flat();return[Math.min(...t),Math.max(...t)]}},RU=function(e,t,n,r,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],o,s;if(n.length>0&&n.forEach(e=>{var n=e.data==null?a:[...e.data],c=r[e.id]?.filter(e=>SU(i,e));n.forEach(n=>{var r=BO(n,t.dataKey??e.dataKey),i=CU(n,r,c);if(i.length>=2){var a=Math.min(...i),l=Math.max(...i);(o==null||a<o)&&(o=a),(s==null||l>s)&&(s=l)}var u=vU(r);u!=null&&(o=o==null?u[0]:Math.min(o,u[0]),s=s==null?u[1]:Math.max(s,u[1]))})}),t?.dataKey!=null&&n.length===0&&e.forEach(e=>{var n=vU(BO(e,t.dataKey));n!=null&&(o=o==null?n[0]:Math.min(o,n[0]),s=s==null?n[1]:Math.max(s,n[1]))}),NO(o)&&NO(s))return[o,s]},zU=$([pU,ZH,cU,FU,BI,jF],RU,{memoizeOptions:{resultEqualityCheck:GI}});function BU(e){var t=e.value;if(vC(t)||t instanceof Date)return t}var VU=(e,t,n)=>{var r=e.map(BU).filter(e=>e!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&SC(r))?EF(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},HU=e=>e.referenceElements.dots,UU=(e,t,n)=>e.filter(e=>e.ifOverflow===`extendDomain`).filter(e=>t===`xAxis`?e.xAxisId===n:e.yAxisId===n),WU=$([HU,BI,VI],UU),GU=e=>e.referenceElements.areas,KU=$([GU,BI,VI],UU),qU=e=>e.referenceElements.lines,JU=$([qU,BI,VI],UU),YU=(e,t)=>{if(e!=null){var n=yU(e.map(e=>t===`xAxis`?e.x:e.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},XU=$(WU,BI,YU),ZU=(e,t)=>{if(e!=null){var n=yU(e.flatMap(e=>[t===`xAxis`?e.x1:e.y1,t===`xAxis`?e.x2:e.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},QU=$([KU,BI],ZU);function $U(e){if(e.x!=null)return yU([e.x]);var t=e.segment?.map(e=>e.x);return t==null||t.length===0?[]:yU(t)}function eW(e){if(e.y!=null)return yU([e.y]);var t=e.segment?.map(e=>e.y);return t==null||t.length===0?[]:yU(t)}var tW=(e,t)=>{if(e!=null){var n=e.flatMap(e=>t===`xAxis`?$U(e):eW(e));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},nW=$(XU,$([JU,BI],tW),QU,(e,t,n)=>LU(e,n,t)),rW=(e,t,n,r,i,a,o,s,c)=>{if(n!=null)return n;var l=o===`vertical`&&s===`xAxis`||o===`horizontal`&&s===`yAxis`?LU(r,a,i):LU(a,i),u=UF(t,l,e.allowDataOverflow);return u==null&&e.allowDataOverflow&&l==null&&c!=null?c:u},iW=$([ZH,MU,NU,PU,zU,nW,vA,BI,$([ZH],e=>{if(!(e==null||e.type!==`number`||!(`ticks`in e)||e.ticks==null)){var t=yU(e.ticks);if(t.length!==0)return[Math.min(...t),Math.max(...t)]}},{memoizeOptions:{resultEqualityCheck:GI}})],rW,{memoizeOptions:{resultEqualityCheck:GI}}),aW=[0,1],oW=(e,t,n,r,i,a,o)=>{if(!((e==null||n==null||n.length===0)&&o===void 0)){var s=e.dataKey,c=e.type,l=HO(t,a);return l&&s==null?EF(0,n?.length??0):c===`category`?VU(r,e,l):i===`expand`&&!l?aW:o}},sW=$([ZH,vA,pU,gU,uI,BI,iW],oW),cW=$([ZH,eU,fI],DH),lW=(e,t,n)=>{var r=t.niceTicks;if(r!==`none`){var i=jU(t),a=Array.isArray(i)&&(i[0]===`auto`||i[1]===`auto`);if((r===`snap125`||r===`adaptive`)&&t!=null&&t.tickCount&&BF(e)){if(a)return iI(e,t.tickCount,t.allowDecimals,r);if(t.type===`number`)return aI(e,t.tickCount,t.allowDecimals,r)}if(r===`auto`&&n===`linear`&&t!=null&&t.tickCount){if(a&&BF(e))return iI(e,t.tickCount,t.allowDecimals,`adaptive`);if(t.type===`number`&&BF(e))return aI(e,t.tickCount,t.allowDecimals,`adaptive`)}}},uW=$([sW,$H,cW],lW),dW=(e,t,n,r)=>{if(r!==`angleAxis`&&e?.type===`number`&&BF(t)&&Array.isArray(n)&&n.length>0){var i=t[0],a=n[0]??0,o=t[1],s=n[n.length-1]??0;return[Math.min(i,a),Math.max(o,s)]}return t},fW=$([ZH,sW,uW,BI],dW),pW=$($(gU,ZH,(e,t)=>{if(!(!t||t.type!==`number`)){var n=1/0,r=Array.from(yU(e.map(e=>e.value))).sort((e,t)=>e-t),i=r[0],a=r[r.length-1];if(i==null||a==null)return 1/0;var o=a-i;if(o===0)return 1/0;for(var s=0;s<r.length-1;s++){var c=r[s],l=r[s+1];if(!(c==null||l==null)){var u=l-c;n=Math.min(n,u)}}return n/o}}),vA,cI,Ek,(e,t,n,r,i)=>i,(e,t,n,r,i)=>{if(!NO(e))return 0;var a=t===`vertical`?r.height:r.width;if(i===`gap`)return e*a/2;if(i===`no-gap`){var o=xC(n,e*a),s=e*a/2;return s-o-(s-o)/a*o}return 0}),mW=(e,t,n)=>{var r=GH(e,t);return r==null||typeof r.padding!=`string`?0:pW(e,`xAxis`,t,n,r.padding)},hW=(e,t,n)=>{var r=JH(e,t);return r==null||typeof r.padding!=`string`?0:pW(e,`yAxis`,t,n,r.padding)},gW=$(GH,mW,(e,t)=>{if(e==null)return{left:0,right:0};var n=e.padding;return typeof n==`string`?{left:t,right:t}:{left:(n.left??0)+t,right:(n.right??0)+t}}),_W=$(JH,hW,(e,t)=>{if(e==null)return{top:0,bottom:0};var n=e.padding;return typeof n==`string`?{top:t,bottom:t}:{top:(n.top??0)+t,bottom:(n.bottom??0)+t}}),vW=$([Ek,gW,Mk,jk,(e,t,n)=>n],(e,t,n,r,i)=>{var a=r.padding;return i?[a.left,n.width-a.right]:[e.left+t.left,e.left+e.width-t.right]}),yW=$([Ek,vA,_W,Mk,jk,(e,t,n)=>n],(e,t,n,r,i,a)=>{var o=i.padding;return a?[r.height-o.bottom,o.top]:t===`horizontal`?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),bW=(e,t,n,r)=>{switch(t){case`xAxis`:return vW(e,n,r);case`yAxis`:return yW(e,n,r);case`zAxis`:return XH(e,n)?.range;case`angleAxis`:return FI(e);case`radiusAxis`:return LI(e,n);default:return}},xW=$([ZH,bW],bI),SW=$([ZH,cW,$([cW,fW],ZI),xW],wH),CW=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var i=n.type,a=n.scale;if(HO(e,r)&&(i===`number`||a!==`auto`))return t.map(e=>e.value)}},wW=$([vA,gU,$H,BI],CW),TW=$([SW],XI);$([SW],AH),$([SW,xU],kH),$([aU,FU,BI],IU);function EW(e,t){return e.id<t.id?-1:+(e.id>t.id)}var DW=(e,t)=>t,OW=(e,t,n)=>n,kW=$(fk,DW,OW,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(EW)),AW=$(pk,DW,OW,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(EW)),jW=(e,t)=>({width:e.width,height:t.height}),MW=(e,t)=>({width:typeof t.width==`number`?t.width:60,height:e.height}),NW=$(Ek,GH,jW),PW=(e,t,n)=>{switch(t){case`top`:return e.top;case`bottom`:return n-e.bottom;default:return 0}},FW=(e,t,n)=>{switch(t){case`left`:return e.left;case`right`:return n-e.right;default:return 0}},IW=$(lk,Ek,kW,DW,OW,(e,t,n,r,i)=>{var a={},o;return n.forEach(n=>{var s=jW(t,n);o??=PW(t,r,e);var c=r===`top`&&!i||r===`bottom`&&i;a[n.id]=o-Number(c)*s.height,o+=(c?-1:1)*s.height}),a}),LW=$(ck,Ek,AW,DW,OW,(e,t,n,r,i)=>{var a={},o;return n.forEach(n=>{var s=MW(t,n);o??=FW(t,r,e);var c=r===`left`&&!i||r===`right`&&i;a[n.id]=o-Number(c)*s.width,o+=(c?-1:1)*s.width}),a}),RW=$([Ek,GH,(e,t)=>{var n=GH(e,t);if(n!=null)return IW(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),zW=$([Ek,JH,(e,t)=>{var n=JH(e,t);if(n!=null)return LW(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),BW=$(Ek,JH,(e,t)=>({width:typeof t.width==`number`?t.width:60,height:e.height})),VW=(e,t,n,r)=>{if(n!=null){var i=n.allowDuplicatedCategory,a=n.type,o=n.dataKey,s=HO(e,r),c=t.map(e=>e.value),l=c.filter(e=>e!=null);if(o&&s&&a===`category`&&i&&SC(l))return c}},HW=$([vA,gU,ZH,BI],VW),UW=$([vA,QH,cW,TW,HW,wW,bW,uW,BI],(e,t,n,r,i,a,o,s,c)=>{if(t!=null){var l=HO(e,c);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:c,categoricalDomain:a,duplicateDomain:i,isCategorical:l,niceTicks:s,range:o,realScaleType:n,scale:r}}}),WW=(e,t,n,r,i,a,o,s,c)=>{if(!(t==null||r==null)){var l=HO(e,c),u=t.type,d=t.ticks,f=t.tickCount,p=n===`scaleBand`&&typeof r.bandwidth==`function`?r.bandwidth()/2:2,m=u===`category`&&r.bandwidth?r.bandwidth()/p:0;m=c===`angleAxis`&&a!=null&&a.length>=2?hC(a[0]-a[1])*2*m:m;var h=d||i;return h?h.map((e,t)=>{var n=o?o.indexOf(e):e,i=r.map(n);return NO(i)?{index:t,coordinate:i+m,value:e,offset:m}:null}).filter(DC):l&&s?s.map((e,t)=>{var n=r.map(e);return NO(n)?{coordinate:n+m,value:e,index:t,offset:m}:null}).filter(DC):r.ticks?r.ticks(f).map((e,t)=>{var n=r.map(e);return NO(n)?{coordinate:n+m,value:e,index:t,offset:m}:null}).filter(DC):r.domain().map((e,t)=>{var n=r.map(e);return NO(n)?{coordinate:n+m,value:o?o[e]:e,index:t,offset:m}:null}).filter(DC)}},GW=$([vA,$H,cW,TW,uW,bW,HW,wW,BI],WW),KW=(e,t,n,r,i,a,o)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var s=HO(e,o),c=t.tickCount,l=0;return l=o===`angleAxis`&&r?.length>=2?hC(r[0]-r[1])*2*l:l,s&&a?a.map((e,t)=>{var r=n.map(e);return NO(r)?{coordinate:r+l,value:e,index:t,offset:l}:null}).filter(DC):n.ticks?n.ticks(c).map((e,t)=>{var r=n.map(e);return NO(r)?{coordinate:r+l,value:e,index:t,offset:l}:null}).filter(DC):n.domain().map((e,t)=>{var r=n.map(e);return NO(r)?{coordinate:r+l,value:i?i[e]:e,index:t,offset:l}:null}).filter(DC)}},qW=$([vA,$H,TW,bW,HW,wW,BI],KW),JW=$(ZH,TW,(e,t)=>{if(!(e==null||t==null))return MH(MH({},e),{},{scale:t})});$((e,t,n)=>XH(e,n),$([$([ZH,cW,sW,xW],wH)],XI),(e,t)=>{if(!(e==null||t==null))return MH(MH({},e),{},{scale:t})});var YW=$([vA,fk,pk],(e,t,n)=>{switch(e){case`horizontal`:return t.some(e=>e.reversed)?`right-to-left`:`left-to-right`;case`vertical`:return n.some(e=>e.reversed)?`bottom-to-top`:`top-to-bottom`;case`centric`:case`radial`:return`left-to-right`;default:return}});$([(e,t,n)=>e.renderedTicks[t]?.[n]],e=>{if(!(!e||e.length===0))return t=>{var n=1/0,r=e[0];for(var i of e){var a=Math.abs(i.coordinate-t);a<n&&(n=a,r=i)}return r?.value}});var XW=e=>e.options.defaultTooltipEventType,ZW=e=>e.options.validateTooltipEventTypes;function QW(e,t,n){if(e==null)return t;var r=e?`axis`:`item`;return n==null?t:n.includes(r)?r:t}function $W(e,t){return QW(t,XW(e),ZW(e))}function eG(e){return Q(t=>$W(t,e))}var tG=(e,t)=>{var n,r=Number(t);if(!(gC(r)||t==null))return r>=0?e==null||(n=e[r])==null?void 0:n.value:void 0},nG=e=>e.tooltip.settings,rG={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},iG=LD({name:`tooltip`,initialState:{itemInteraction:{click:rG,hover:rG},axisInteraction:{click:rG,hover:rG},keyboardInteraction:rG,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:`hover`,axisId:0,active:!1,defaultIndex:void 0}},reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(Wj(t.payload))},prepare:SD()},replaceTooltipEntrySettings:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next,a=cD(e).tooltipItemPayloads.indexOf(Wj(r));a>-1&&(e.tooltipItemPayloads[a]=Wj(i))},prepare:SD()},removeTooltipEntrySettings:{reducer(e,t){var n=cD(e).tooltipItemPayloads.indexOf(Wj(t.payload));n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:SD()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),aG=iG.actions,oG=aG.addTooltipEntrySettings,sG=aG.replaceTooltipEntrySettings,cG=aG.removeTooltipEntrySettings,lG=aG.setTooltipSettingsState,uG=aG.setActiveMouseOverItemIndex,dG=aG.mouseLeaveItem,fG=aG.mouseLeaveChart,pG=aG.setActiveClickItemIndex,mG=aG.setMouseOverAxisIndex,hG=aG.setMouseClickAxisIndex,gG=aG.setSyncInteraction,_G=aG.setKeyboardInteraction,vG=iG.reducer;function yG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bG(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?yG(Object(n),!0).forEach(function(t){xG(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yG(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xG(e,t,n){return(t=SG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SG(e){var t=CG(e,`string`);return typeof t==`symbol`?t:t+``}function CG(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function wG(e,t,n){return t===`axis`?n===`click`?e.axisInteraction.click:e.axisInteraction.hover:n===`click`?e.itemInteraction.click:e.itemInteraction.hover}function TG(e){return e.index!=null}var EG=(e,t,n,r)=>{if(t==null)return rG;var i=wG(e,t,n);if(i==null)return rG;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var a=e.settings.active===!0;if(TG(i)){if(a)return bG(bG({},i),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return bG(bG({},rG),{},{coordinate:i.coordinate})};function DG(e){if(typeof e==`number`)return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}function OG(e,t){var n=DG(e),r=t[0],i=t[1];return n===void 0?!1:n>=Math.min(r,i)&&n<=Math.max(r,i)}function kG(e,t,n){if(n==null||t==null)return!0;var r=BO(e,t);return r==null||!BF(n)?!0:OG(r,n)}var AG=(e,t,n,r)=>{var i=e?.index;if(i==null)return null;var a=Number(i);if(!NO(a))return i;var o=0,s=1/0;t.length>0&&(s=t.length-1);var c=Math.max(o,Math.min(a,s)),l=t[c];return l==null||kG(l,n,r)?String(c):null},jG=(e,t,n,r,i,a,o)=>{if(a!=null){var s=o[0]?.getPosition(a);if(s!=null)return s;var c=i?.[Number(a)];if(c)switch(n){case`horizontal`:return{x:c.coordinate,y:(r.top+t)/2};default:return{x:(r.left+e)/2,y:c.coordinate}}}},MG=(e,t,n,r)=>{if(t===`axis`)return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i=n===`hover`?e.itemInteraction.hover.graphicalItemId:e.itemInteraction.click.graphicalItemId;if(e.syncInteraction.active&&i==null)return e.tooltipItemPayloads;if(i==null&&(r!=null||e.keyboardInteraction.active)){var a=e.tooltipItemPayloads[0];return a==null?[]:[a]}return e.tooltipItemPayloads.filter(e=>e.settings?.graphicalItemId===i)},NG=e=>e.options.tooltipPayloadSearcher,PG=e=>e.tooltip;function FG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function IG(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?FG(Object(n),!0).forEach(function(t){LG(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FG(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function LG(e,t,n){return(t=RG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RG(e){var t=zG(e,`string`);return typeof t==`symbol`?t:t+``}function zG(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function BG(e){if(typeof e==`string`||typeof e==`number`)return e}function VG(e){if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return e}function HG(e){if(typeof e==`string`||typeof e==`number`)return e;if(typeof e==`function`)return t=>e(t)}function UG(e){if(typeof e==`string`)return e}function WG(e){if(!(typeof e!=`object`||!e))return{name:`name`in e?BG(e.name):void 0,unit:`unit`in e?VG(e.unit):void 0,dataKey:`dataKey`in e?HG(e.dataKey):void 0,payload:`payload`in e?e.payload:void 0,color:`color`in e?UG(e.color):void 0,fill:`fill`in e?UG(e.fill):void 0}}function GG(e,t){return e??t}var KG=(e,t,n,r,i,a,o)=>{if(!(t==null||a==null)){var s=n.chartData,c=n.computedData,l=n.dataStartIndex,u=n.dataEndIndex;return e.reduce((e,n)=>{var d=n.dataDefinedOnItem,f=n.settings,p=GG(d,s),m=Array.isArray(p)?MO(p,l,u):p,h=f?.dataKey??r,g=f?.nameKey,_=r&&Array.isArray(m)&&!Array.isArray(m[0])&&o===`axis`?wC(m,r,i):a(m,t,c,g);return Array.isArray(_)?_.forEach(t=>{var n=WG(t),r=n?.name,i=n?.dataKey,a=n?.payload,o=IG(IG({},f),{},{name:r,unit:n?.unit,color:n?.color??f?.color,fill:n?.fill??f?.fill});e.push(ik({tooltipEntrySettings:o,dataKey:i,payload:a,value:BO(a,i),name:r==null?void 0:String(r)}))}):e.push(ik({tooltipEntrySettings:f,dataKey:h,payload:_,value:BO(_,h),name:BO(_,g)??f?.name})),e},[])}},qG=$([wU,eU,fI],DH),JG=$([$([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),wU,$([JI,YI],tU)],iU,{memoizeOptions:{resultEqualityCheck:KI}}),YG=$([JG],e=>e.filter(WI)),XG=$([JG],lU,{memoizeOptions:{resultEqualityCheck:KI}}),ZG=$([JG],e=>e.some(e=>!e.data)),QG=$([XG,DF],fU),$G=$([YG,DF,wU],UI),eK=$([QG,wU,JG,DF,ZG,XG],hU),tK=$([wU],jU),nK=$([tK,$([wU],e=>e.allowDataOverflow)],HF),rK=$([$([$G,$([JG],e=>e.filter(WI)),uI,dI],DU),DF,JI,nK],kU),iK=$([QG,wU,$([JG],sU),FU,JI,NF],RU,{memoizeOptions:{resultEqualityCheck:GI}}),aK=$([$([HU,JI,YI],UU),JI],YU),oK=$([$([GU,JI,YI],UU),JI],ZU),sK=$([wU,vA,QG,eK,uI,JI,$([wU,tK,nK,rK,iK,$([aK,$([$([qU,JI,YI],UU),JI],tW),oK],LU),vA,JI],rW)],oW),cK=$([wU,sK,$([sK,wU,qG],lW),JI],dW),lK=e=>bW(e,JI(e),YI(e),!1),uK=$([wU,lK],bI),dK=$([$([wU,qG,cK,uK],wH)],XI),fK=$([vA,wU,qG,dK,lK,$([vA,eK,wU,JI],VW),$([vA,eK,wU,JI],CW),JI],(e,t,n,r,i,a,o,s)=>{if(t){var c=t.type,l=HO(e,s);if(r){var u=n===`scaleBand`&&r.bandwidth?r.bandwidth()/2:2,d=c===`category`&&r.bandwidth?r.bandwidth()/u:0;return d=s===`angleAxis`&&i!=null&&i?.length>=2?hC(i[0]-i[1])*2*d:d,l&&o?o.map((e,t)=>{var n=r.map(e);return NO(n)?{coordinate:n+d,value:e,index:t,offset:d}:null}).filter(DC):r.domain().map((e,t)=>{var n=r.map(e);return NO(n)?{coordinate:n+d,value:a?a[e]:e,index:t,offset:d}:null}).filter(DC)}}}),pK=$([XW,ZW,nG],(e,t,n)=>QW(n.shared,e,t)),mK=e=>e.tooltip.settings.trigger,hK=e=>e.tooltip.settings.defaultIndex,gK=$([PG,pK,mK,hK],EG),_K=$([gK,QG,TU,sK],AG),vK=$([fK,_K],tG),yK=$([gK],e=>{if(e)return e.dataKey}),bK=$([gK],e=>{if(e)return e.graphicalItemId}),xK=$([PG,pK,mK,hK],MG),SK=$([gK,$([ck,lk,vA,Ek,fK,hK,xK],jG)],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),CK=$([gK],e=>e?.active??!1),wK=$([$([xK,_K,DF,TU,vK,NG,pK],KG)],e=>{if(e!=null){var t=e.map(e=>e.payload).filter(e=>e!=null);return Array.from(new Set(t))}});function TK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function EK(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?TK(Object(n),!0).forEach(function(t){DK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function DK(e,t,n){return(t=OK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OK(e){var t=kK(e,`string`);return typeof t==`symbol`?t:t+``}function kK(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var AK=()=>Q(wU),jK=()=>{var e=AK(),t=Q(fK),n=Q(dK);return rk(!e||!n?void 0:EK(EK({},e),{},{scale:n}),t)};function MK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function NK(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?MK(Object(n),!0).forEach(function(t){PK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function PK(e,t,n){return(t=FK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FK(e){var t=IK(e,`string`);return typeof t==`symbol`?t:t+``}function IK(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var LK=(e,t,n,r)=>{var i=t.find(e=>e&&e.index===n);if(i){if(e===`horizontal`)return{x:i.coordinate,y:r.relativeY};if(e===`vertical`)return{x:r.relativeX,y:i.coordinate}}return{x:0,y:0}},RK=(e,t,n,r)=>{var i=t.find(e=>e&&e.index===n);if(i){if(e===`centric`){var a=i.coordinate,o=r.radius;return NK(NK(NK({},r),eF(r.cx,r.cy,o,a)),{},{angle:a,radius:o})}var s=i.coordinate,c=r.angle;return NK(NK(NK({},r),eF(r.cx,r.cy,s,c)),{},{angle:c,radius:s})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function zK(e,t){var n=e.relativeX,r=e.relativeY;return n>=t.left&&n<=t.left+t.width&&r>=t.top&&r<=t.top+t.height}var BK=(e,t,n,r,i)=>{var a=t?.length??0;if(a<=1||e==null)return 0;if(r===`angleAxis`&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var o=0;o<a;o++){var s=o>0?n[o-1]?.coordinate:n[a-1]?.coordinate,c=n[o]?.coordinate,l=o>=a-1?n[0]?.coordinate:n[o+1]?.coordinate,u=void 0;if(!(s==null||c==null||l==null))if(hC(c-s)!==hC(l-c)){var d=[];if(hC(l-c)===hC(i[1]-i[0])){u=l;var f=c+i[1]-i[0];d[0]=Math.min(f,(f+s)/2),d[1]=Math.max(f,(f+s)/2)}else{u=s;var p=l+i[1]-i[0];d[0]=Math.min(c,(p+c)/2),d[1]=Math.max(c,(p+c)/2)}var m=[Math.min(c,(u+c)/2),Math.max(c,(u+c)/2)];if(e>m[0]&&e<=m[1]||e>=d[0]&&e<=d[1])return n[o]?.index}else{var h=Math.min(s,l),g=Math.max(s,l);if(e>(h+c)/2&&e<=(g+c)/2)return n[o]?.index}}else if(t)for(var _=0;_<a;_++){var v=t[_];if(v!=null){var y=t[_+1],b=t[_-1];if(_===0&&y!=null&&e<=(v.coordinate+y.coordinate)/2||_===a-1&&b!=null&&e>(v.coordinate+b.coordinate)/2||_>0&&_<a-1&&b!=null&&y!=null&&e>(v.coordinate+b.coordinate)/2&&e<=(v.coordinate+y.coordinate)/2)return v.index}}return-1},VK=()=>Q(fI),HK=(e,t)=>t,UK=(e,t,n)=>n,WK=(e,t,n,r)=>r,GK=$(fK,e=>TT(e,e=>e.coordinate)),KK=$([PG,HK,UK,WK],EG),qK=$([KK,QG,TU,sK],AG),JK=(e,t,n)=>{if(t!=null){var r=PG(e);return t===`axis`?n===`hover`?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n===`hover`?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},YK=$([PG,HK,UK,WK],MG),XK=$([ck,lk,vA,Ek,fK,WK,YK],jG),ZK=$([KK,XK],(e,t)=>e.coordinate??t),QK=$([fK,qK],tG),$K=$([YK,qK,DF,TU,QK,NG,HK],KG),eq=$([KK,qK],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),tq=(e,t,n,r,i,a,o)=>{if(!(!e||!n||!r||!i)&&zK(e,o)){var s=BK(ok(e,t),a,i,n,r),c=LK(t,i,s,e);return{activeIndex:String(s),activeCoordinate:c}}},nq=(e,t,n,r,i,a,o)=>{if(!(!e||!r||!i||!a||!n)){var s=oF(e,n);if(s){var c=BK(sk(s,t),o,a,r,i),l=RK(t,a,c,s);return{activeIndex:String(c),activeCoordinate:l}}}},rq=(e,t,n,r,i,a,o,s)=>{if(!(!e||!t||!r||!i||!a))return t===`horizontal`||t===`vertical`?tq(e,t,r,i,a,o,s):nq(e,t,n,r,i,a,o)},iq=$(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(t!=null){var r=e[t];if(r!=null)return n?r.panoramaElement:r.element}}),aq=$(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(e=>parseInt(e,10)).concat(Object.values(_I));return Array.from(new Set(t)).sort((e,t)=>e-t)},{memoizeOptions:{resultEqualityCheck:qI}});function oq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function sq(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?oq(Object(n),!0).forEach(function(t){cq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cq(e,t,n){return(t=lq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lq(e){var t=uq(e,`string`);return typeof t==`symbol`?t:t+``}function uq(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var dq={zIndexMap:Object.values(_I).reduce((e,t)=>sq(sq({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),{})},fq=new Set(Object.values(_I));function pq(e){return fq.has(e)}var mq=LD({name:`zIndex`,initialState:dq,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var n=t.payload.zIndex;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:SD()},unregisterZIndexPortal:{reducer:(e,t)=>{var n=t.payload.zIndex;e.zIndexMap[n]&&(--e.zIndexMap[n].consumers,e.zIndexMap[n].consumers<=0&&!pq(n)&&delete e.zIndexMap[n])},prepare:SD()},registerZIndexPortalElement:{reducer:(e,t)=>{var n=t.payload,r=n.zIndex,i=n.element,a=n.isPanorama;e.zIndexMap[r]?a?e.zIndexMap[r].panoramaElement=Wj(i):e.zIndexMap[r].element=Wj(i):e.zIndexMap[r]={consumers:0,element:a?void 0:Wj(i),panoramaElement:a?Wj(i):void 0}},prepare:SD()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var n=t.payload.zIndex;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:SD()}}}),hq=mq.actions,gq=hq.registerZIndexPortal,_q=hq.unregisterZIndexPortal,vq=hq.registerZIndexPortalElement,yq=hq.unregisterZIndexPortalElement,bq=mq.reducer;function xq(e){var t=e.zIndex,n=e.children,r=CA()&&t!==void 0&&t!==0,i=Ak(),a=(0,v.useRef)(void 0),o=(0,v.useRef)(new Set),s=$w(),c=Q(e=>iq(e,t,i));if((0,v.useLayoutEffect)(()=>{if(!r){var e=o.current;e.forEach(e=>{s(_q({zIndex:e}))}),e.clear(),a.current=void 0;return}if(o.current.has(t)||(s(gq({zIndex:t})),o.current.add(t)),c){a.current=c;var n=o.current;n.forEach(e=>{e!==t&&(s(_q({zIndex:e})),n.delete(e))})}},[s,t,r,c]),(0,v.useLayoutEffect)(()=>{var e=o.current;return()=>{e.forEach(e=>{s(_q({zIndex:e}))}),e.clear()}},[s]),!r)return n;var l=c??a.current;return l?(0,Dl.createPortal)(n,l):null}function Sq(){return Sq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sq.apply(null,arguments)}function Cq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wq(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Cq(Object(n),!0).forEach(function(t){Tq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Tq(e,t,n){return(t=Eq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Eq(e){var t=Dq(e,`string`);return typeof t==`symbol`?t:t+``}function Dq(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Oq(e){var t=e.cursor,n=e.cursorComp,r=e.cursorProps;return(0,v.isValidElement)(t)?(0,v.cloneElement)(t,r):(0,v.createElement)(n,r)}function kq(e){var t=e.coordinate,n=e.payload,r=e.index,i=e.offset,a=e.tooltipAxisBandSize,o=e.layout,s=e.cursor,c=e.tooltipEventType,l=e.chartName,u=t,d=n,f=r;if(!s||!u||l!==`ScatterChart`&&c!==`axis`)return null;var p,m,h;if(l===`ScatterChart`)p=u,m=MN,h=_I.cursorLine;else if(l===`BarChart`)p=NN(o,u,i,a),m=GP,h=_I.cursorRectangle;else if(o===`radial`&&kC(u)){var g=sF(u),_=g.cx,y=g.cy,b=g.radius;p={cx:_,cy:y,startAngle:g.startAngle,endAngle:g.endAngle,innerRadius:b,outerRadius:b},m=SF,h=_I.cursorLine}else p={points:CF(o,u,i)},m=xN,h=_I.cursorLine;var x=typeof s==`object`&&`className`in s?s.className:void 0,S=wq(wq(wq(wq({stroke:`#ccc`,pointerEvents:`none`},i),p),Gx(s)),{},{payload:d,payloadIndex:f,className:dv(`recharts-tooltip-cursor`,x)});return v.createElement(xq,{zIndex:e.zIndex??h},v.createElement(Oq,{cursor:s,cursorComp:m,cursorProps:S}))}function Aq(e){var t=jK(),n=hA(),r=yA(),i=VK();return t==null||n==null||r==null||i==null?null:v.createElement(kq,Sq({},e,{offset:n,layout:r,tooltipAxisBandSize:t,chartName:i}))}var jq=(0,v.createContext)(null),Mq=()=>(0,v.useContext)(jq),Nq=l(o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},c.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var c=this._events[s],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(d=1,u=Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,p;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(p=1,u=Array(l-1);p<l;p++)u[p-1]=arguments[p];c[d].fn.apply(c[d].context,u)}}return!0},c.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn===t&&(!i||o.once)&&(!n||o.context===n)&&s(this,a);else{for(var c=0,l=[],u=o.length;c<u;c++)(o[c].fn!==t||i&&!o[c].once||n&&o[c].context!==n)&&l.push(o[c]);l.length?this._events[a]=l.length===1?l[0]:l:s(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,t!==void 0&&(t.exports=c)}))(),1).default,Pq=new Nq,Fq=`recharts.syncEvent.tooltip`,Iq=`recharts.syncEvent.brush`,Lq=(e,t)=>{if(t&&Array.isArray(e)){var n=Number.parseInt(t,10);if(!gC(n))return e[n]}},Rq=LD({name:`options`,initialState:{chartName:``,tooltipPayloadSearcher:()=>void 0,eventEmitter:void 0,defaultTooltipEventType:`axis`},reducers:{createEventEmitter:e=>{e.eventEmitter??=Symbol(`rechartsEventEmitter`)}}}),zq=Rq.reducer,Bq=Rq.actions.createEventEmitter;function Vq(e){return e.tooltip.syncInteraction}var Hq=LD({name:`chartData`,initialState:{chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},reducers:{setChartData(e,t){if(e.chartData=Wj(t.payload),t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var n=t.payload,r=n.startIndex,i=n.endIndex;r!=null&&(e.dataStartIndex=r),i!=null&&(e.dataEndIndex=i)}}}),Uq=Hq.actions,Wq=Uq.setChartData,Gq=Uq.setDataStartEndIndexes;Uq.setComputedData;var Kq=Hq.reducer,qq=[`x`,`y`];function Jq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Yq(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Jq(Object(n),!0).forEach(function(t){Xq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Xq(e,t,n){return(t=Zq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zq(e){var t=Qq(e,`string`);return typeof t==`symbol`?t:t+``}function Qq(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function $q(e,t){if(e==null)return{};var n,r,i=eJ(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function eJ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function tJ(){var e=Q(pI),t=Q(hI),n=$w(),r=Q(mI),i=Q(fK),a=yA(),o=pA();(0,v.useEffect)(()=>{if(e==null)return OC;var s=(s,c,l)=>{if(t!==l&&e===s){if(c.payload.active===!1){n(gG({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(r===`index`){var u;if(o&&c!=null&&(u=c.payload)!=null&&u.coordinate&&c.payload.sourceViewBox){var d=c.payload.coordinate,f=d.x,p=d.y,m=$q(d,qq),h=c.payload.sourceViewBox,g=h.x,_=h.y,v=h.width,y=h.height,b=Yq(Yq({},m),{},{x:o.x+(v?(f-g)/v:0)*o.width,y:o.y+(y?(p-_)/y:0)*o.height});n(Yq(Yq({},c),{},{payload:Yq(Yq({},c.payload),{},{coordinate:b})}))}else n(c);return}if(i!=null){var x;typeof r==`function`?x=i[r(i,{activeTooltipIndex:c.payload.index==null?void 0:Number(c.payload.index),isTooltipActive:c.payload.active,activeIndex:c.payload.index==null?void 0:Number(c.payload.index),activeLabel:c.payload.label,activeDataKey:c.payload.dataKey,activeCoordinate:c.payload.coordinate})]:r===`value`&&(x=i.find(e=>String(e.value)===c.payload.label));var S=c.payload.coordinate;if(S==null||o==null){n(gG({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(x==null){n(gG({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:c.payload.sourceViewBox,graphicalItemId:void 0}));return}var C=S.x,w=S.y,T=Math.min(C,o.x+o.width),E=Math.min(w,o.y+o.height),D={x:a===`horizontal`?x.coordinate:T,y:a===`horizontal`?E:x.coordinate};n(gG({active:c.payload.active,coordinate:D,dataKey:c.payload.dataKey,index:String(x.index),label:c.payload.label,sourceViewBox:c.payload.sourceViewBox,graphicalItemId:c.payload.graphicalItemId}))}}};return Pq.on(Fq,s),()=>{Pq.off(Fq,s)}},[Q(e=>e.rootProps.className),n,t,e,r,i,a,o])}function nJ(){var e=Q(pI),t=Q(hI),n=$w();(0,v.useEffect)(()=>{if(e==null)return OC;var r=(r,i,a)=>{t!==a&&e===r&&n(Gq(i))};return Pq.on(Iq,r),()=>{Pq.off(Iq,r)}},[n,t,e])}function rJ(){var e=$w();(0,v.useEffect)(()=>{e(Bq())},[e]),tJ(),nJ()}function iJ(e,t,n,r,i,a){var o=Q(n=>JK(n,e,t)),s=Q(bK),c=Q(hI),l=Q(pI),u=Q(mI),d=Q(Vq)?.sourceViewBox!=null,f=pA();(0,v.useEffect)(()=>{if(!d&&l!=null&&c!=null){var e=gG({active:a,coordinate:n,dataKey:o,index:i,label:typeof r==`number`?String(r):r,sourceViewBox:f,graphicalItemId:s});Pq.emit(Fq,l,e,c)}},[d,n,o,s,i,r,c,l,u,a,f])}function aJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oJ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?aJ(Object(n),!0).forEach(function(t){sJ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aJ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function sJ(e,t,n){return(t=cJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cJ(e){var t=lJ(e,`string`);return typeof t==`symbol`?t:t+``}function lJ(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function uJ(e,t){return hJ(e)||mJ(e,t)||fJ(e,t)||dJ()}function dJ(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
121
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fJ(e,t){if(e){if(typeof e==`string`)return pJ(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pJ(e,t):void 0}}function pJ(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function mJ(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function hJ(e){if(Array.isArray(e))return e}function gJ(e){return e.dataKey}function _J(e,t){return v.isValidElement(e)?v.cloneElement(e,t):typeof e==`function`?v.createElement(e,t):v.createElement(jM,t)}var vJ=[],yJ={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:`ease`,axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:`auto`,itemSorter:`name`,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:` : `,trigger:`hover`,useTranslate3d:!1,wrapperStyle:{}};function bJ(e){var t=RC(e,yJ),n=t.active,r=t.allowEscapeViewBox,i=t.animationDuration,a=t.animationEasing,o=t.content,s=t.filterNull,c=t.isAnimationActive,l=t.offset,u=t.payloadUniqBy,d=t.position,f=t.reverseDirection,p=t.useTranslate3d,m=t.wrapperStyle,h=t.cursor,g=t.shared,_=t.trigger,y=t.defaultIndex,b=t.portal,x=t.axisId,S=$w(),C=typeof y==`number`?String(y):y;(0,v.useEffect)(()=>{S(lG({shared:g,trigger:_,axisId:x,active:n,defaultIndex:C}))},[S,g,_,x,n,C]);var w=pA(),T=oN(),E=eG(g),D=Q(e=>eq(e,E,_,C))??{},O=D.activeIndex,k=D.isActive,A=Q(e=>$K(e,E,_,C)),j=Q(e=>QK(e,E,_,C)),M=Q(e=>ZK(e,E,_,C)),N=A,P=Mq(),F=n??k??!1,I=uJ(MT([N,F]),2),L=I[0],R=I[1],ee=E===`axis`?j:void 0;iJ(E,_,M,ee,O,F);var te=b??P;if(te==null||w==null||E==null)return null;var z=N??vJ;F||(z=vJ),s&&z.length&&(z=Gw(z.filter(e=>e.value!=null&&(e.hide!==!0||t.includeHidden)),u,gJ));var B=z.length>0,V=oJ(oJ({},t),{},{payload:z,label:ee,active:F,activeIndex:O,coordinate:M,accessibilityLayer:T}),ne=v.createElement(aN,{allowEscapeViewBox:r,animationDuration:i,animationEasing:a,isAnimationActive:c,active:F,coordinate:M,hasPayload:B,offset:l,position:d,reverseDirection:f,useTranslate3d:p,viewBox:w,wrapperStyle:m,lastBoundingBox:L,innerRef:R,hasPortalFromProps:!!b},_J(o,V));return v.createElement(v.Fragment,null,(0,Dl.createPortal)(ne,te),F&&v.createElement(Aq,{cursor:h,tooltipEventType:E,coordinate:M,payload:z,index:O}))}var xJ=e=>null;xJ.displayName=`Cell`;function SJ(e,t,n){return(t=CJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CJ(e){var t=wJ(e,`string`);return typeof t==`symbol`?t:t+``}function wJ(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var TJ=class{constructor(e){SJ(this,`cache`,new Map),this.maxSize=e}get(e){var t=this.cache.get(e);return t!==void 0&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;n!=null&&this.cache.delete(n)}this.cache.set(e,t)}clear(){this.cache.clear()}size(){return this.cache.size}};function EJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function DJ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?EJ(Object(n),!0).forEach(function(t){OJ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EJ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function OJ(e,t,n){return(t=kJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kJ(e){var t=AJ(e,`string`);return typeof t==`symbol`?t:t+``}function AJ(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var jJ=DJ({},{cacheSize:2e3,enableCache:!0}),MJ=new TJ(jJ.cacheSize),NJ={position:`absolute`,top:`-20000px`,left:0,padding:0,margin:0,border:`none`,whiteSpace:`pre`},PJ=`recharts_measurement_span`;function FJ(e,t){return`${e}|${t.fontSize||``}|${t.fontFamily||``}|${t.fontWeight||``}|${t.fontStyle||``}|${t.letterSpacing||``}|${t.textTransform||``}`}var IJ=(e,t)=>{try{var n=document.getElementById(PJ);n||(n=document.createElement(`span`),n.setAttribute(`id`,PJ),n.setAttribute(`aria-hidden`,`true`),document.body.appendChild(n)),Object.assign(n.style,NJ,t),n.textContent=`${e}`;var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch{return{width:0,height:0}}},LJ=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e==null||RM.isSsr)return{width:0,height:0};if(!jJ.enableCache)return IJ(e,t);var n=FJ(e,t),r=MJ.get(n);if(r)return r;var i=IJ(e,t);return MJ.set(n,i),i},RJ;function zJ(e,t){return WJ(e)||UJ(e,t)||VJ(e,t)||BJ()}function BJ(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
122
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VJ(e,t){if(e){if(typeof e==`string`)return HJ(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?HJ(e,t):void 0}}function HJ(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function UJ(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function WJ(e){if(Array.isArray(e))return e}function GJ(e,t,n){return(t=KJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KJ(e){var t=qJ(e,`string`);return typeof t==`symbol`?t:t+``}function qJ(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var JJ=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,YJ=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,XJ=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,ZJ=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,QJ={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},$J=[`cm`,`mm`,`pt`,`pc`,`in`,`Q`,`px`];function eY(e){return $J.includes(e)}var tY=`NaN`;function nY(e,t){return e*QJ[t]}var rY=class e{static parse(t){var n=zJ(ZJ.exec(t)??[],3),r=n[1],i=n[2];return r==null?e.NaN:new e(parseFloat(r),i??``)}constructor(e,t){this.num=e,this.unit=t,this.num=e,this.unit=t,gC(e)&&(this.unit=``),t!==``&&!XJ.test(t)&&(this.num=NaN,this.unit=``),eY(t)&&(this.num=nY(e,t),this.unit=`px`)}add(t){return this.unit===t.unit?new e(this.num+t.num,this.unit):new e(NaN,``)}subtract(t){return this.unit===t.unit?new e(this.num-t.num,this.unit):new e(NaN,``)}multiply(t){return this.unit!==``&&t.unit!==``&&this.unit!==t.unit?new e(NaN,``):new e(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==``&&t.unit!==``&&this.unit!==t.unit?new e(NaN,``):new e(this.num/t.num,this.unit||t.unit)}toString(){return`${this.num}${this.unit}`}isNaN(){return gC(this.num)}};RJ=rY,GJ(rY,`NaN`,new RJ(NaN,``));function iY(e){if(e==null||e.includes(tY))return tY;for(var t=e;t.includes(`*`)||t.includes(`/`);){var n=zJ(JJ.exec(t)??[],4),r=n[1],i=n[2],a=n[3],o=rY.parse(r??``),s=rY.parse(a??``),c=i===`*`?o.multiply(s):o.divide(s);if(c.isNaN())return tY;t=t.replace(JJ,c.toString())}for(;t.includes(`+`)||/.-\d+(?:\.\d+)?/.test(t);){var l=zJ(YJ.exec(t)??[],4),u=l[1],d=l[2],f=l[3],p=rY.parse(u??``),m=rY.parse(f??``),h=d===`+`?p.add(m):p.subtract(m);if(h.isNaN())return tY;t=t.replace(YJ,h.toString())}return t}var aY=/\(([^()]*)\)/;function oY(e){for(var t=e,n;(n=aY.exec(t))!=null;){var r=zJ(n,2)[1];t=t.replace(aY,iY(r))}return t}function sY(e){var t=e.replace(/\s+/g,``);return t=oY(t),t=iY(t),t}function cY(e){try{return sY(e)}catch{return tY}}function lY(e){var t=cY(e.slice(5,-1));return t===tY?``:t}var uY=[`x`,`y`,`lineHeight`,`capHeight`,`fill`,`scaleToFit`,`textAnchor`,`verticalAnchor`],dY=[`dx`,`dy`,`angle`,`className`,`breakAll`];function fY(){return fY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fY.apply(null,arguments)}function pY(e,t){if(e==null)return{};var n,r,i=mY(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function mY(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function hY(e,t){return bY(e)||yY(e,t)||_Y(e,t)||gY()}function gY(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
123
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _Y(e,t){if(e){if(typeof e==`string`)return vY(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vY(e,t):void 0}}function vY(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function yY(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function bY(e){if(Array.isArray(e))return e}var xY=/[ \f\n\r\t\v\u2028\u2029]+/,SY=e=>{var t=e.children,n=e.breakAll,r=e.style;try{var i=[];return TC(t)||(i=n?t.toString().split(``):t.toString().split(xY)),{wordsWithComputedWidth:i.map(e=>({word:e,width:LJ(e,r).width})),spaceWidth:n?0:LJ(`\xA0`,r).width}}catch{return null}};function CY(e){return e===`start`||e===`middle`||e===`end`||e===`inherit`}function wY(e){return TC(e)||typeof e==`string`||typeof e==`number`||typeof e==`boolean`}var TY=(e,t,n,r)=>e.reduce((e,i)=>{var a=i.word,o=i.width,s=e[e.length-1];if(s&&o!=null&&(t==null||r||s.width+o+n<Number(t)))s.words.push(a),s.width+=o+n;else{var c={words:[a],width:o};e.push(c)}return e},[]),EY=e=>e.reduce((e,t)=>e.width>t.width?e:t),DY=`…`,OY=(e,t,n,r,i,a,o,s)=>{var c=SY({breakAll:n,style:r,children:e.slice(0,t)+DY});if(!c)return[!1,[]];var l=TY(c.wordsWithComputedWidth,a,o,s);return[l.length>i||EY(l).width>Number(a),l]},kY=(e,t,n,r,i)=>{var a=e.maxLines,o=e.children,s=e.style,c=e.breakAll,l=Z(a),u=String(o),d=TY(t,r,n,i);if(!l||i||!(d.length>a||EY(d).width>Number(r)))return d;for(var f=0,p=u.length-1,m=0,h;f<=p&&m<=u.length-1;){var g=Math.floor((f+p)/2),_=hY(OY(u,g-1,c,s,a,r,n,i),2),v=_[0],y=_[1],b=hY(OY(u,g,c,s,a,r,n,i),1)[0];if(!v&&!b&&(f=g+1),v&&b&&(p=g-1),!v&&b){h=y;break}m++}return h||d},AY=e=>[{words:TC(e)?[]:e.toString().split(xY),width:void 0}],jY=e=>{var t=e.width,n=e.scaleToFit,r=e.children,i=e.style,a=e.breakAll,o=e.maxLines;if((t||n)&&!RM.isSsr){var s,c,l=SY({breakAll:a,children:r,style:i});if(l){var u=l.wordsWithComputedWidth,d=l.spaceWidth;s=u,c=d}else return AY(r);return kY({breakAll:a,children:r,maxLines:o,style:i},s,c,t,!!n)}return AY(r)},MY=`#808080`,NY={angle:0,breakAll:!1,capHeight:`0.71em`,fill:MY,lineHeight:`1em`,scaleToFit:!1,textAnchor:`start`,verticalAnchor:`end`,x:0,y:0},PY=(0,v.forwardRef)((e,t)=>{var n=RC(e,NY),r=n.x,i=n.y,a=n.lineHeight,o=n.capHeight,s=n.fill,c=n.scaleToFit,l=n.textAnchor,u=n.verticalAnchor,d=pY(n,uY),f=(0,v.useMemo)(()=>jY({breakAll:d.breakAll,children:d.children,maxLines:d.maxLines,scaleToFit:c,style:d.style,width:d.width}),[d.breakAll,d.children,d.maxLines,c,d.style,d.width]),p=d.dx,m=d.dy,h=d.angle,g=d.className,_=d.breakAll,y=pY(d,dY);if(!vC(r)||!vC(i)||f.length===0)return null;var b=Number(r)+(Z(p)?p:0),x=Number(i)+(Z(m)?m:0);if(!NO(b)||!NO(x))return null;var S;switch(u){case`start`:S=lY(`calc(${o})`);break;case`middle`:S=lY(`calc(${(f.length-1)/2} * -${a} + (${o} / 2))`);break;default:S=lY(`calc(${f.length-1} * -${a})`);break}var C=[],w=f[0];if(c&&w!=null){var T=w.width,E=d.width;C.push(`scale(${Z(E)&&Z(T)?E/T:1})`)}return h&&C.push(`rotate(${h}, ${b}, ${x})`),C.length&&(y.transform=C.join(` `)),v.createElement(`text`,fY({},Kx(y),{ref:t,x:b,y:x,className:dv(`recharts-text`,g),textAnchor:l,fill:s.includes(`url`)?MY:s}),f.map((e,t)=>{var n=e.words.join(_?``:` `);return v.createElement(`tspan`,{x:b,dy:t===0?S:a,key:`${n}-${t}`},n)}))});PY.displayName=`Text`;function FY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function IY(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?FY(Object(n),!0).forEach(function(t){LY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function LY(e,t,n){return(t=RY(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RY(e){var t=zY(e,`string`);return typeof t==`symbol`?t:t+``}function zY(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var BY=e=>{var t=e.viewBox,n=e.position,r=e.offset,i=r===void 0?0:r,a=e.parentViewBox,o=e.clamp,s=fA(t),c=s.x,l=s.y,u=s.height,d=s.upperWidth,f=s.lowerWidth,p=c,m=c+(d-f)/2,h=(p+m)/2,g=(d+f)/2,_=p+d/2,v=u>=0?1:-1,y=v*i,b=v>0?`end`:`start`,x=v>0?`start`:`end`,S=d>=0?1:-1,C=S*i,w=S>0?`end`:`start`,T=S>0?`start`:`end`,E=a;if(n===`top`){var D={x:p+d/2,y:l-y,horizontalAnchor:`middle`,verticalAnchor:b};return o&&E&&(D.height=Math.max(l-E.y,0),D.width=d),D}if(n===`bottom`){var O={x:m+f/2,y:l+u+y,horizontalAnchor:`middle`,verticalAnchor:x};return o&&E&&(O.height=Math.max(E.y+E.height-(l+u),0),O.width=f),O}if(n===`left`){var k={x:h-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`};return o&&E&&(k.width=Math.max(k.x-E.x,0),k.height=u),k}if(n===`right`){var A={x:h+g+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`};return o&&E&&(A.width=Math.max(E.x+E.width-A.x,0),A.height=u),A}var j=o&&E?{width:g,height:u}:{};return n===`insideLeft`?IY({x:h+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`},j):n===`insideRight`?IY({x:h+g-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`},j):n===`insideTop`?IY({x:p+d/2,y:l+y,horizontalAnchor:`middle`,verticalAnchor:x},j):n===`insideBottom`?IY({x:m+f/2,y:l+u-y,horizontalAnchor:`middle`,verticalAnchor:b},j):n===`insideTopLeft`?IY({x:p+C,y:l+y,horizontalAnchor:T,verticalAnchor:x},j):n===`insideTopRight`?IY({x:p+d-C,y:l+y,horizontalAnchor:w,verticalAnchor:x},j):n===`insideBottomLeft`?IY({x:m+C,y:l+u-y,horizontalAnchor:T,verticalAnchor:b},j):n===`insideBottomRight`?IY({x:m+f-C,y:l+u-y,horizontalAnchor:w,verticalAnchor:b},j):n&&typeof n==`object`&&(Z(n.x)||_C(n.x))&&(Z(n.y)||_C(n.y))?IY({x:c+xC(n.x,g),y:l+xC(n.y,u),horizontalAnchor:`end`,verticalAnchor:`end`},j):IY({x:_,y:l+u/2,horizontalAnchor:`middle`,verticalAnchor:`middle`},j)},VY=[`labelRef`],HY=[`content`];function UY(e,t){if(e==null)return{};var n,r,i=WY(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function WY(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function GY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function KY(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?GY(Object(n),!0).forEach(function(t){qY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qY(e,t,n){return(t=JY(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JY(e){var t=YY(e,`string`);return typeof t==`symbol`?t:t+``}function YY(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function XY(){return XY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},XY.apply(null,arguments)}var ZY=(0,v.createContext)(null),QY=e=>{var t=e.x,n=e.y,r=e.upperWidth,i=e.lowerWidth,a=e.width,o=e.height,s=e.children,c=(0,v.useMemo)(()=>({x:t,y:n,upperWidth:r,lowerWidth:i,width:a,height:o}),[t,n,r,i,a,o]);return v.createElement(ZY.Provider,{value:c},s)},$Y=()=>{var e=(0,v.useContext)(ZY),t=pA();return e||(t?fA(t):void 0)},eX=(0,v.createContext)(null),tX=()=>{var e=(0,v.useContext)(eX),t=Q(zI);return e||t},nX=e=>{var t=e.value,n=e.formatter,r=TC(e.children)?t:e.children;return typeof n==`function`?n(r):r},rX=e=>e!=null&&typeof e==`function`,iX=(e,t)=>hC(t-e)*Math.min(Math.abs(t-e),360),aX=(e,t,n,r,i)=>{var a=e.offset,o=e.className,s=i.cx,c=i.cy,l=i.innerRadius,u=i.outerRadius,d=i.startAngle,f=i.endAngle,p=i.clockWise,m=(l+u)/2,h=iX(d,f),g=h>=0?1:-1,_,y;switch(t){case`insideStart`:_=d+g*a,y=p;break;case`insideEnd`:_=f-g*a,y=!p;break;case`end`:_=f+g*a,y=p;break;default:throw Error(`Unsupported position ${t}`)}y=h<=0?y:!y;var b=eF(s,c,m,_),x=eF(s,c,m,_+(y?1:-1)*359),S=`M${b.x},${b.y}
117
+ A`,`,`,`,0,0,`,`,`,`,`,`Z`]),D.x,D.y,a,a,+(u<0),E.x,E.y,r,r,+(k>180),+(u>0),S.x,S.y,a,a,+(u<0),C.x,C.y)}else b+=mC(pF||=hF([`L`,`,`,`Z`]),t,n);return b},bF={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},xF=e=>{var t=RC(e,bF),n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,c=t.cornerIsExternal,l=t.startAngle,u=t.endAngle,d=t.className;if(a<i||l===u)return null;var f=dv(`recharts-sector`,d),p=a-i,m=xC(o,p,0,!0),h=m>0&&Math.abs(l-u)<360?yF({cx:n,cy:r,innerRadius:i,outerRadius:a,cornerRadius:Math.min(m,p/2),forceCornerRadius:s,cornerIsExternal:c,startAngle:l,endAngle:u}):vF({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:l,endAngle:u});return v.createElement(`path`,mF({},Kx(t),{className:f,d:h}))};function SF(e,t,n){if(e===`horizontal`)return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if(e===`vertical`)return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(kC(t)){if(e===`centric`){var r=t.cx,i=t.cy,a=t.innerRadius,o=t.outerRadius,s=t.angle,c=$P(r,i,a,s),l=$P(r,i,o,s);return[{x:c.x,y:c.y},{x:l.x,y:l.y}]}return oF(t)}}function CF(e){return bT(e)?NaN:Number(e)}function wF(e){return e?(e=CF(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function TF(e,t,n){n&&typeof n!=`number`&&_T(e,t,n)&&(t=n=void 0),e=wF(e),t===void 0?(t=e,e=0):t=wF(t),n=n===void 0?e<t?1:-1:wF(n);let r=Math.max(Math.ceil((t-e)/(n||1)),0),i=Array(r);for(let t=0;t<r;t++)i[t]=e,e+=n;return i}var EF=e=>e.chartData,DF=$([EF],e=>{var t=e.chartData==null?0:e.chartData.length-1;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),OF=(e,t,n,r)=>r?DF(e):EF(e),kF=(e,t,n)=>n?DF(e):EF(e),AF=$([OF],e=>{var t=e.chartData,n=e.dataStartIndex,r=e.dataEndIndex;return t==null?[]:t.slice(n,r+1)}),jF=$([DF],e=>{var t=e.chartData,n=e.dataStartIndex,r=e.dataEndIndex;return t==null?[]:t.slice(n,r+1)}),MF=$([EF],e=>{var t=e.chartData,n=e.dataStartIndex,r=e.dataEndIndex;return t==null?[]:t.slice(n,r+1)});function NF(e,t){return RF(e)||LF(e,t)||FF(e,t)||PF()}function PF(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
118
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FF(e,t){if(e){if(typeof e==`string`)return IF(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?IF(e,t):void 0}}function IF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function LF(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function RF(e){if(Array.isArray(e))return e}function zF(e){if(Array.isArray(e)&&e.length===2){var t=NF(e,2),n=t[0],r=t[1];if(MO(n)&&MO(r))return!0}return!1}function BF(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function VF(e,t){if(t&&typeof e!=`function`&&Array.isArray(e)&&e.length===2){var n=NF(e,2),r=n[0],i=n[1],a,o;if(MO(r))a=r;else if(typeof r==`function`)return;if(MO(i))o=i;else if(typeof i==`function`)return;var s=[a,o];if(zF(s))return s}}function HF(e,t,n){if(!(!n&&t==null)){if(typeof e==`function`&&t!=null)try{var r=e(t,n);if(zF(r))return BF(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var i=NF(e,2),a=i[0],o=i[1],s,c;if(a===`auto`)t!=null&&(s=Math.min(...t));else if(Z(a))s=a;else if(typeof a==`function`)try{t!=null&&(s=a(t?.[0]))}catch{}else if(typeof a==`string`&&ek.test(a)){var l=ek.exec(a);if(l==null||l[1]==null||t==null)s=void 0;else{var u=+l[1];s=t[0]-u}}else s=t?.[0];if(o===`auto`)t!=null&&(c=Math.max(...t));else if(Z(o))c=o;else if(typeof o==`function`)try{t!=null&&(c=o(t?.[1]))}catch{}else if(typeof o==`string`&&tk.test(o)){var d=tk.exec(o);if(d==null||d[1]==null||t==null)c=void 0;else{var f=+d[1];c=t[1]+f}}else c=t?.[1];var p=[s,c];if(zF(p))return t==null?p:BF(p,t,n)}}}var UF=l(o(((e,t)=>{(function(e){var n=1e9,r={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:`2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286`},i=!0,a=`[DecimalError] `,o=a+`Invalid argument: `,s=a+`Exponent out of range: `,c=Math.floor,l=Math.pow,u=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,d,f=1e7,p=7,m=9007199254740991,h=c(m/p),g={};g.absoluteValue=g.abs=function(){var e=new this.constructor(this);return e.s&&=1,e},g.comparedTo=g.cmp=function(e){var t,n,r,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1},g.decimalPlaces=g.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*p;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n},g.dividedBy=g.div=function(e){return b(this,new this.constructor(e))},g.dividedToIntegerBy=g.idiv=function(e){var t=this,n=t.constructor;return D(b(t,new n(e),0,1),n.precision)},g.equals=g.eq=function(e){return!this.cmp(e)},g.exponent=function(){return S(this)},g.greaterThan=g.gt=function(e){return this.cmp(e)>0},g.greaterThanOrEqualTo=g.gte=function(e){return this.cmp(e)>=0},g.isInteger=g.isint=function(){return this.e>this.d.length-2},g.isNegative=g.isneg=function(){return this.s<0},g.isPositive=g.ispos=function(){return this.s>0},g.isZero=function(){return this.s===0},g.lessThan=g.lt=function(e){return this.cmp(e)<0},g.lessThanOrEqualTo=g.lte=function(e){return this.cmp(e)<1},g.logarithm=g.log=function(e){var t,n=this,r=n.constructor,o=r.precision,s=o+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(d))throw Error(a+`NaN`);if(n.s<1)throw Error(a+(n.s?`NaN`:`-Infinity`));return n.eq(d)?new r(0):(i=!1,t=b(T(n,s),T(e,s),s),i=!0,D(t,o))},g.minus=g.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?O(t,e):_(t,(e.s=-e.s,e))},g.modulo=g.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(e=new r(e),!e.s)throw Error(a+`NaN`);return n.s?(i=!1,t=b(n,e,0,1).times(e),i=!0,n.minus(t)):D(new r(n),o)},g.naturalExponential=g.exp=function(){return x(this)},g.naturalLogarithm=g.ln=function(){return T(this)},g.negated=g.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},g.plus=g.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?_(t,e):O(t,(e.s=-e.s,e))},g.precision=g.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(o+e);if(t=S(i)+1,r=i.d.length-1,n=r*p+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},g.squareRoot=g.sqrt=function(){var e,t,n,r,o,s,l,u=this,d=u.constructor;if(u.s<1){if(!u.s)return new d(0);throw Error(a+`NaN`)}for(e=S(u),i=!1,o=Math.sqrt(+u),o==0||o==1/0?(t=y(u.d),(t.length+e)%2==0&&(t+=`0`),o=Math.sqrt(t),e=c((e+1)/2)-(e<0||e%2),o==1/0?t=`5e`+e:(t=o.toExponential(),t=t.slice(0,t.indexOf(`e`)+1)+e),r=new d(t)):r=new d(o.toString()),n=d.precision,o=l=n+3;;)if(s=r,r=s.plus(b(u,s,l+2)).times(.5),y(s.d).slice(0,l)===(t=y(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),o==l&&t==`4999`){if(D(s,n+1,0),s.times(s).eq(u)){r=s;break}}else if(t!=`9999`)break;l+=4}return i=!0,D(r,n)},g.times=g.mul=function(e){var t,n,r,a,o,s,c,l,u,d=this,p=d.constructor,m=d.d,h=(e=new p(e)).d;if(!d.s||!e.s)return new p(0);for(e.s*=d.s,n=d.e+e.e,l=m.length,u=h.length,l<u&&(o=m,m=h,h=o,s=l,l=u,u=s),o=[],s=l+u,r=s;r--;)o.push(0);for(r=u;--r>=0;){for(t=0,a=l+r;a>r;)c=o[a]+h[r]*m[a-r-1]+t,o[a--]=c%f|0,t=c/f|0;o[a]=(o[a]+t)%f|0}for(;!o[--s];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,i?D(e,p.precision):e},g.toDecimalPlaces=g.todp=function(e,t){var r=this,i=r.constructor;return r=new i(r),e===void 0?r:(v(e,0,n),t===void 0?t=i.rounding:v(t,0,8),D(r,e+S(r)+1,t))},g.toExponential=function(e,t){var r,i=this,a=i.constructor;return e===void 0?r=k(i,!0):(v(e,0,n),t===void 0?t=a.rounding:v(t,0,8),i=D(new a(i),e+1,t),r=k(i,!0,e+1)),r},g.toFixed=function(e,t){var r,i,a=this,o=a.constructor;return e===void 0?k(a):(v(e,0,n),t===void 0?t=o.rounding:v(t,0,8),i=D(new o(a),e+S(a)+1,t),r=k(i.abs(),!1,e+S(i)+1),a.isneg()&&!a.isZero()?`-`+r:r)},g.toInteger=g.toint=function(){var e=this,t=e.constructor;return D(new t(e),S(e)+1,t.rounding)},g.toNumber=function(){return+this},g.toPower=g.pow=function(e){var t,n,r,o,s,l,u=this,f=u.constructor,h=12,g=+(e=new f(e));if(!e.s)return new f(d);if(u=new f(u),!u.s){if(e.s<1)throw Error(a+`Infinity`);return u}if(u.eq(d))return u;if(r=f.precision,e.eq(d))return D(u,r);if(t=e.e,n=e.d.length-1,l=t>=n,s=u.s,!l){if(s<0)throw Error(a+`NaN`)}else if((n=g<0?-g:g)<=m){for(o=new f(d),t=Math.ceil(r/p+4),i=!1;n%2&&(o=o.times(u),A(o.d,t)),n=c(n/2),n!==0;)u=u.times(u),A(u.d,t);return i=!0,e.s<0?new f(d).div(o):D(o,r)}return s=s<0&&e.d[Math.max(t,n)]&1?-1:1,u.s=1,i=!1,o=e.times(T(u,r+h)),i=!0,o=x(o),o.s=s,o},g.toPrecision=function(e,t){var r,i,a=this,o=a.constructor;return e===void 0?(r=S(a),i=k(a,r<=o.toExpNeg||r>=o.toExpPos)):(v(e,1,n),t===void 0?t=o.rounding:v(t,0,8),a=D(new o(a),e,t),r=S(a),i=k(a,e<=r||r<=o.toExpNeg,e)),i},g.toSignificantDigits=g.tosd=function(e,t){var r=this,i=r.constructor;return e===void 0?(e=i.precision,t=i.rounding):(v(e,1,n),t===void 0?t=i.rounding:v(t,0,8)),D(new i(r),e,t)},g.toString=g.valueOf=g.val=g.toJSON=function(){var e=this,t=S(e),n=e.constructor;return k(e,t<=n.toExpNeg||t>=n.toExpPos)};function _(e,t){var n,r,a,o,s,c,l,u,d=e.constructor,m=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),i?D(t,m):t;if(l=e.d,u=t.d,s=e.e,a=t.e,l=l.slice(),o=s-a,o){for(o<0?(r=l,o=-o,c=u.length):(r=u,a=s,c=l.length),s=Math.ceil(m/p),c=s>c?s+1:c+1,o>c&&(o=c,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(c=l.length,o=u.length,c-o<0&&(o=c,r=u,u=l,l=r),n=0;o;)n=(l[--o]=l[o]+u[o]+n)/f|0,l[o]%=f;for(n&&(l.unshift(n),++a),c=l.length;l[--c]==0;)l.pop();return t.d=l,t.e=a,i?D(t,m):t}function v(e,t,n){if(e!==~~e||e<t||e>n)throw Error(o+e)}function y(e){var t,n,r,i=e.length-1,a=``,o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)r=e[t]+``,n=p-r.length,n&&(a+=w(n)),a+=r;o=e[t],r=o+``,n=p-r.length,n&&(a+=w(n))}else if(o===0)return`0`;for(;o%10==0;)o/=10;return a+o}var b=(function(){function e(e,t){var n,r=0,i=e.length;for(e=e.slice();i--;)n=e[i]*t+r,e[i]=n%f|0,r=n/f|0;return r&&e.unshift(r),e}function t(e,t,n,r){var i,a;if(n!=r)a=n>r?1:-1;else for(i=a=0;i<n;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=+(e[n]<t[n]),e[n]=r*f+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,i,o,s){var c,l,u,d,m,h,g,_,v,y,b,x,C,w,T,E,O,k,A=r.constructor,j=r.s==i.s?1:-1,M=r.d,N=i.d;if(!r.s)return new A(r);if(!i.s)throw Error(a+`Division by zero`);for(l=r.e-i.e,O=N.length,T=M.length,g=new A(j),_=g.d=[],u=0;N[u]==(M[u]||0);)++u;if(N[u]>(M[u]||0)&&--l,x=o==null?o=A.precision:s?o+(S(r)-S(i))+1:o,x<0)return new A(0);if(x=x/p+2|0,u=0,O==1)for(d=0,N=N[0],x++;(u<T||d)&&x--;u++)C=d*f+(M[u]||0),_[u]=C/N|0,d=C%N|0;else{for(d=f/(N[0]+1)|0,d>1&&(N=e(N,d),M=e(M,d),O=N.length,T=M.length),w=O,v=M.slice(0,O),y=v.length;y<O;)v[y++]=0;k=N.slice(),k.unshift(0),E=N[0],N[1]>=f/2&&++E;do d=0,c=t(N,v,O,y),c<0?(b=v[0],O!=y&&(b=b*f+(v[1]||0)),d=b/E|0,d>1?(d>=f&&(d=f-1),m=e(N,d),h=m.length,y=v.length,c=t(m,v,h,y),c==1&&(d--,n(m,O<h?k:N,h))):(d==0&&(c=d=1),m=N.slice()),h=m.length,h<y&&m.unshift(0),n(v,m,y),c==-1&&(y=v.length,c=t(N,v,O,y),c<1&&(d++,n(v,O<y?k:N,y))),y=v.length):c===0&&(d++,v=[0]),_[u++]=d,c&&v[0]?v[y++]=M[w]||0:(v=[M[w]],y=1);while((w++<T||v[0]!==void 0)&&x--)}return _[0]||_.shift(),g.e=l,D(g,s?o+S(g)+1:o)}})();function x(e,t){var n,r,a,o,c,u,f=0,p=0,m=e.constructor,h=m.precision;if(S(e)>16)throw Error(s+S(e));if(!e.s)return new m(d);for(t==null?(i=!1,u=h):u=t,c=new m(.03125);e.abs().gte(.1);)e=e.times(c),p+=5;for(r=Math.log(l(2,p))/Math.LN10*2+5|0,u+=r,n=a=o=new m(d),m.precision=u;;){if(a=D(a.times(e),u),n=n.times(++f),c=o.plus(b(a,n,u)),y(c.d).slice(0,u)===y(o.d).slice(0,u)){for(;p--;)o=D(o.times(o),u);return m.precision=h,t==null?(i=!0,D(o,h)):o}o=c}}function S(e){for(var t=e.e*p,n=e.d[0];n>=10;n/=10)t++;return t}function C(e,t,n){if(t>e.LN10.sd())throw i=!0,n&&(e.precision=n),Error(a+`LN10 precision limit exceeded`);return D(new e(e.LN10),t)}function w(e){for(var t=``;e--;)t+=`0`;return t}function T(e,t){var n,r,o,s,c,l,u,f,p,m=1,h=10,g=e,_=g.d,v=g.constructor,x=v.precision;if(g.s<1)throw Error(a+(g.s?`NaN`:`-Infinity`));if(g.eq(d))return new v(0);if(t==null?(i=!1,f=x):f=t,g.eq(10))return t??(i=!0),C(v,f);if(f+=h,v.precision=f,n=y(_),r=n.charAt(0),s=S(g),Math.abs(s)<0x5543df729c000){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)g=g.times(e),n=y(g.d),r=n.charAt(0),m++;s=S(g),r>1?(g=new v(`0.`+n),s++):g=new v(r+`.`+n.slice(1))}else return u=C(v,f+2,x).times(s+``),g=T(new v(r+`.`+n.slice(1)),f-h).plus(u),v.precision=x,t==null?(i=!0,D(g,x)):g;for(l=c=g=b(g.minus(d),g.plus(d),f),p=D(g.times(g),f),o=3;;){if(c=D(c.times(p),f),u=l.plus(b(c,new v(o),f)),y(u.d).slice(0,f)===y(l.d).slice(0,f))return l=l.times(2),s!==0&&(l=l.plus(C(v,f+2,x).times(s+``))),l=b(l,new v(m),f),v.precision=x,t==null?(i=!0,D(l,x)):l;l=u,o+=2}}function E(e,t){var n,r,a;for((n=t.indexOf(`.`))>-1&&(t=t.replace(`.`,``)),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(r,a),t){if(a-=r,n=n-r-1,e.e=c(n/p),e.d=[],r=(n+1)%p,n<0&&(r+=p),r<a){for(r&&e.d.push(+t.slice(0,r)),a-=p;r<a;)e.d.push(+t.slice(r,r+=p));t=t.slice(r),r=p-t.length}else r-=a;for(;r--;)t+=`0`;if(e.d.push(+t),i&&(e.e>h||e.e<-h))throw Error(s+n)}else e.s=0,e.e=0,e.d=[0];return e}function D(e,t,n){var r,a,o,u,d,m,g,_,v=e.d;for(u=1,o=v[0];o>=10;o/=10)u++;if(r=t-u,r<0)r+=p,a=t,g=v[_=0];else{if(_=Math.ceil((r+1)/p),o=v.length,_>=o)return e;for(g=o=v[_],u=1;o>=10;o/=10)u++;r%=p,a=r-p+u}if(n!==void 0&&(o=l(10,u-a-1),d=g/o%10|0,m=t<0||v[_+1]!==void 0||g%o,m=n<4?(d||m)&&(n==0||n==(e.s<0?3:2)):d>5||d==5&&(n==4||m||n==6&&(r>0?a>0?g/l(10,u-a):0:v[_-1])%10&1||n==(e.s<0?8:7))),t<1||!v[0])return m?(o=S(e),v.length=1,t=t-o-1,v[0]=l(10,(p-t%p)%p),e.e=c(-t/p)||0):(v.length=1,v[0]=e.e=e.s=0),e;if(r==0?(v.length=_,o=1,_--):(v.length=_+1,o=l(10,p-r),v[_]=a>0?(g/l(10,u-a)%l(10,a)|0)*o:0),m)for(;;)if(_==0){(v[0]+=o)==f&&(v[0]=1,++e.e);break}else{if(v[_]+=o,v[_]!=f)break;v[_--]=0,o=1}for(r=v.length;v[--r]===0;)v.pop();if(i&&(e.e>h||e.e<-h))throw Error(s+S(e));return e}function O(e,t){var n,r,a,o,s,c,l,u,d,m,h=e.constructor,g=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),i?D(t,g):t;if(l=e.d,m=t.d,r=t.e,u=e.e,l=l.slice(),s=u-r,s){for(d=s<0,d?(n=l,s=-s,c=m.length):(n=m,r=u,c=l.length),a=Math.max(Math.ceil(g/p),c)+2,s>a&&(s=a,n.length=1),n.reverse(),a=s;a--;)n.push(0);n.reverse()}else{for(a=l.length,c=m.length,d=a<c,d&&(c=a),a=0;a<c;a++)if(l[a]!=m[a]){d=l[a]<m[a];break}s=0}for(d&&(n=l,l=m,m=n,t.s=-t.s),c=l.length,a=m.length-c;a>0;--a)l[c++]=0;for(a=m.length;a>s;){if(l[--a]<m[a]){for(o=a;o&&l[--o]===0;)l[o]=f-1;--l[o],l[a]+=f}l[a]-=m[a]}for(;l[--c]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,i?D(t,g):t):new h(0)}function k(e,t,n){var r,i=S(e),a=y(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+`.`+a.slice(1)+w(r):o>1&&(a=a.charAt(0)+`.`+a.slice(1)),a=a+(i<0?`e`:`e+`)+i):i<0?(a=`0.`+w(-i-1)+a,n&&(r=n-o)>0&&(a+=w(r))):i>=o?(a+=w(i+1-o),n&&(r=n-i-1)>0&&(a=a+`.`+w(r))):((r=i+1)<o&&(a=a.slice(0,r)+`.`+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+=`.`),a+=w(r))),e.s<0?`-`+a:a}function A(e,t){if(e.length>t)return e.length=t,!0}function j(e){var t,n,r;function i(e){var t=this;if(!(t instanceof i))return new i(e);if(t.constructor=i,e instanceof i){t.s=e.s,t.e=e.e,t.d=(e=e.d)?e.slice():e;return}if(typeof e==`number`){if(e*0!=0)throw Error(o+e);if(e>0)t.s=1;else if(e<0)e=-e,t.s=-1;else{t.s=0,t.e=0,t.d=[0];return}if(e===~~e&&e<1e7){t.e=0,t.d=[e];return}return E(t,e.toString())}else if(typeof e!=`string`)throw Error(o+e);if(e.charCodeAt(0)===45?(e=e.slice(1),t.s=-1):t.s=1,u.test(e))E(t,e);else throw Error(o+e)}if(i.prototype=g,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=j,i.config=i.set=M,e===void 0&&(e={}),e)for(r=[`precision`,`rounding`,`toExpNeg`,`toExpPos`,`LN10`],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function M(e){if(!e||typeof e!=`object`)throw Error(a+`Object expected`);var t,r,i,s=[`precision`,1,n,`rounding`,0,8,`toExpNeg`,-1/0,0,`toExpPos`,0,1/0];for(t=0;t<s.length;t+=3)if((i=e[r=s[t]])!==void 0)if(c(i)===i&&i>=s[t+1]&&i<=s[t+2])this[r]=i;else throw Error(o+r+`: `+i);if((i=e[r=`LN10`])!==void 0)if(i==Math.LN10)this[r]=new this(i);else throw Error(o+r+`: `+i);return this}r=j(r),r.default=r.Decimal=r,d=new r(1),typeof define==`function`&&define.amd?define(function(){return r}):t!==void 0&&t.exports?t.exports=r:(e||=typeof self<`u`&&self&&self.self==self?self:Function(`return this`)(),e.Decimal=r)})(e)}))());function WF(e){return e===0?1:Math.floor(new UF.default(e).abs().log(10).toNumber())+1}function GF(e,t,n){for(var r=new UF.default(e),i=0,a=[];r.lt(t)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}function KF(e,t){return ZF(e)||XF(e,t)||JF(e,t)||qF()}function qF(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
119
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function JF(e,t){if(e){if(typeof e==`string`)return YF(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?YF(e,t):void 0}}function YF(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function XF(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function ZF(e){if(Array.isArray(e))return e}var QF=e=>{var t=KF(e,2),n=t[0],r=t[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]},$F=(e,t,n)=>{if(e.lte(0))return new UF.default(0);var r=WF(e.toNumber()),i=new UF.default(10).pow(r),a=e.div(i),o=r===1?.1:.05,s=new UF.default(Math.ceil(a.div(o).toNumber())).add(n).mul(o).mul(i);return t?new UF.default(s.toNumber()):new UF.default(Math.ceil(s.toNumber()))},eI=(e,t,n)=>{if(e.lte(0))return new UF.default(0);var r=[1,2,2.5,5],i=e.toNumber(),a=Math.floor(new UF.default(i).abs().log(10).toNumber()),o=new UF.default(10).pow(a),s=e.div(o).toNumber(),c=r.findIndex(e=>e>=s-1e-10);if(c===-1&&(o=o.mul(10),c=0),c+=n,c>=r.length){var l=Math.floor(c/r.length);c%=r.length,o=o.mul(new UF.default(10).pow(l))}var u=new UF.default(r[c]??1).mul(o);return t?u:new UF.default(Math.ceil(u.toNumber()))},tI=(e,t,n)=>{var r=new UF.default(1),i=new UF.default(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new UF.default(10).pow(WF(e)-1),i=new UF.default(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new UF.default(Math.floor(e)))}else e===0?i=new UF.default(Math.floor((t-1)/2)):n||(i=new UF.default(Math.floor(e)));for(var o=Math.floor((t-1)/2),s=[],c=0;c<t;c++)s.push(i.add(new UF.default(c-o).mul(r)).toNumber());return s},nI=function(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:$F;if(!Number.isFinite((t-e)/(n-1)))return{step:new UF.default(0),tickMin:new UF.default(0),tickMax:new UF.default(0)};var o=a(new UF.default(t).sub(e).div(n-1),r,i),s;e<=0&&t>=0?s=new UF.default(0):(s=new UF.default(e).add(t).div(2),s=s.sub(new UF.default(s).mod(o)));var c=Math.ceil(s.sub(e).div(o).toNumber()),l=Math.ceil(new UF.default(t).sub(s).div(o).toNumber()),u=c+l+1;return u>n?nI(e,t,n,r,i+1,a):(u<n&&(l=t>0?l+(n-u):l,c=t>0?c:c+(n-u)),{step:o,tickMin:s.sub(new UF.default(c).mul(o)),tickMax:s.add(new UF.default(l).mul(o))})},rI=function(e){var t=KF(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`auto`,s=Math.max(i,2),c=KF(QF([n,r]),2),l=c[0],u=c[1];if(l===-1/0||u===1/0){var d=u===1/0?[l,...Array(i-1).fill(1/0)]:[...Array(i-1).fill(-1/0),u];return n>r?d.reverse():d}if(l===u)return tI(l,i,a);var f=nI(l,u,s,a,0,o===`snap125`?eI:$F),p=f.step,m=f.tickMin,h=f.tickMax,g=GF(m,h.add(new UF.default(.1).mul(p)),p);return n>r?g.reverse():g},iI=function(e,t){var n=KF(e,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:`auto`,s=KF(QF([r,i]),2),c=s[0],l=s[1];if(c===-1/0||l===1/0)return[r,i];if(c===l)return[c];var u=o===`snap125`?eI:$F,d=Math.max(t,2),f=u(new UF.default(l).sub(c).div(d-1),a,0),p=[...GF(new UF.default(c),new UF.default(l),f),l];if(a===!1){p=p.map(e=>Math.round(e));var m=p.length-1;m>0&&p[m]===p[m-1]&&(p=p.slice(0,m))}return r>i?p.reverse():p},aI=e=>e.rootProps.maxBarSize,oI=e=>e.rootProps.barGap,sI=e=>e.rootProps.barCategoryGap,cI=e=>e.rootProps.barSize,lI=e=>e.rootProps.stackOffset,uI=e=>e.rootProps.reverseStackOrder,dI=e=>e.options.chartName,fI=e=>e.rootProps.syncId,pI=e=>e.rootProps.syncMethod,mI=e=>e.options.eventEmitter,hI=e=>e.rootProps.baseValue,gI={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},_I={allowDecimals:!1,allowDuplicatedCategory:!0,allowDataOverflow:!1,angle:0,angleAxisId:0,axisLine:!0,axisLineType:`polygon`,cx:0,cy:0,hide:!1,includeHidden:!1,label:!1,niceTicks:`auto`,orientation:`outer`,reversed:!1,scale:`auto`,tick:!0,tickLine:!0,tickSize:8,type:`auto`,zIndex:gI.axis},vI={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,angle:0,axisLine:!0,includeHidden:!1,hide:!1,niceTicks:`auto`,label:!1,orientation:`right`,radiusAxisId:0,reversed:!1,scale:`auto`,stroke:`#ccc`,tick:!0,tickCount:5,tickLine:!0,type:`auto`,zIndex:gI.axis},yI=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function bI(e,t,n){if(n!==`auto`)return n;if(e!=null)return VO(e,t)?`category`:`number`}function xI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function SI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?xI(Object(n),!0).forEach(function(t){CI(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xI(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function CI(e,t,n){return(t=wI(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wI(e){var t=TI(e,`string`);return typeof t==`symbol`?t:t+``}function TI(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var EI={allowDataOverflow:_I.allowDataOverflow,allowDecimals:_I.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:_I.angleAxisId,includeHidden:!1,name:void 0,reversed:_I.reversed,scale:_I.scale,tick:_I.tick,tickCount:void 0,ticks:void 0,type:_I.type,unit:void 0,niceTicks:`auto`},DI={allowDataOverflow:vI.allowDataOverflow,allowDecimals:vI.allowDecimals,allowDuplicatedCategory:vI.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:vI.radiusAxisId,includeHidden:vI.includeHidden,name:void 0,reversed:vI.reversed,scale:vI.scale,tick:vI.tick,tickCount:vI.tickCount,ticks:void 0,type:vI.type,unit:void 0,niceTicks:`auto`},OI=$([(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},bA],(e,t)=>{if(e!=null)return e;var n=bI(t,`angleAxis`,EI.type)??`category`;return SI(SI({},EI),{},{type:n})}),kI=$([(e,t)=>e.polarAxis.radiusAxis[t],bA],(e,t)=>{if(e!=null)return e;var n=bI(t,`radiusAxis`,DI.type)??`category`;return SI(SI({},DI),{},{type:n})}),AI=e=>e.polarOptions,jI=$([sk,ck,Tk],eF),MI=$([AI,jI],(e,t)=>{if(e!=null)return xC(e.innerRadius,t,0)}),NI=$([AI,jI],(e,t)=>{if(e!=null)return xC(e.outerRadius,t,t*.8)}),PI=$([AI],e=>e==null?[0,0]:[e.startAngle,e.endAngle]),FI=$([OI,PI],yI),II=$([jI,MI,NI],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]}),LI=$([kI,II],yI),RI=$([_A,AI,MI,NI,sk,ck],(e,t,n,r,i,a)=>{if(!(e!==`centric`&&e!==`radial`||t==null||n==null||r==null)){var o=t.cx,s=t.cy,c=t.startAngle,l=t.endAngle;return{cx:xC(o,i,i/2),cy:xC(s,a,a/2),innerRadius:n,outerRadius:r,startAngle:c,endAngle:l,clockWise:!1}}}),zI=(e,t)=>t,BI=(e,t,n)=>n;function VI(e){return e?.id}function HI(e,t,n){var r=t.chartData,i=r===void 0?[]:r,a=n.allowDuplicatedCategory,o=n.dataKey,s=new Map;return e.forEach(e=>{var t=e.data??i;if(!(t==null||t.length===0)){var n=VI(e);t.forEach((t,r)=>{var i=o==null||a?r:String(zO(t,o,null)),c=zO(t,e.dataKey,0),l=s.has(i)?s.get(i):{};Object.assign(l,{[n]:c}),s.set(i,l)})}}),Array.from(s.values())}function UI(e){return`stackId`in e&&e.stackId!=null&&e.dataKey!=null}var WI=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function GI(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function KI(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return!1}var qI=e=>{var t=_A(e);return t===`horizontal`?`xAxis`:t===`vertical`?`yAxis`:t===`centric`?`angleAxis`:`radiusAxis`},JI=e=>e.tooltip.settings.axisId;function YI(e){if(e!=null){var t=e.ticks,n=e.bandwidth,r=e.range(),i=[Math.min(...r),Math.max(...r)];return{domain:()=>e.domain(),range:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(e){var t=i[0],n=i[1];return t<=n?e>=t&&e<=n:e>=n&&e<=t},bandwidth:n?()=>n.call(e):void 0,ticks:t?n=>t.call(e,n):void 0,map:(t,n)=>{var r=e(t);if(r!=null){if(e.bandwidth&&n!=null&&n.position){var i=e.bandwidth();switch(n.position){case`middle`:r+=i/2;break;case`end`:r+=i;break;default:break}}return r}}}}}var XI=(e,t)=>{if(t!=null)switch(e){case`linear`:if(!zF(t)){for(var n,r,i=0;i<t.length;i++){var a=t[i];MO(a)&&((n===void 0||a<n)&&(n=a),(r===void 0||a>r)&&(r=a))}return n!==void 0&&r!==void 0?[n,r]:void 0}return t;default:return t}};function ZI(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function QI(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function $I(e){let t,n,r;e.length===2?(t=e===ZI||e===QI?e:eL,n=e,r=e):(t=ZI,n=(t,n)=>ZI(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function eL(){return 0}function tL(e){return e===null?NaN:+e}function*nL(e,t){if(t===void 0)for(let t of e)t!=null&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)(r=t(r,++n,e))!=null&&(r=+r)>=r&&(yield r)}}var rL=$I(ZI),iL=rL.right;rL.left,$I(tL).center;var aL=class extends Map{constructor(e,t=lL){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(oL(this,e))}has(e){return super.has(oL(this,e))}set(e,t){return super.set(sL(this,e),t)}delete(e){return super.delete(cL(this,e))}};function oL({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function sL({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function cL({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function lL(e){return typeof e==`object`&&e?e.valueOf():e}function uL(e=ZI){if(e===ZI)return dL;if(typeof e!=`function`)throw TypeError(`compare is not a function`);return(t,n)=>{let r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function dL(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:+(e>t))}var fL=Math.sqrt(50),pL=Math.sqrt(10),mL=Math.sqrt(2);function hL(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=fL?10:a>=pL?5:a>=mL?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?hL(e,t,n*2):[s,c,l]}function gL(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?hL(t,e,n):hL(e,t,n);if(!(a>=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;e<s;++e)c[e]=(a-e)/-o;else for(let e=0;e<s;++e)c[e]=(a-e)*o;else if(o<0)for(let e=0;e<s;++e)c[e]=(i+e)/-o;else for(let e=0;e<s;++e)c[e]=(i+e)*o;return c}function _L(e,t,n){return t=+t,e=+e,n=+n,hL(e,t,n)[2]}function vL(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?_L(t,e,n):_L(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function yL(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function bL(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function xL(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?dL:uL(i);r>n;){if(r-n>600){let a=r-n+1,o=t-n+1,s=Math.log(a),c=.5*Math.exp(2*s/3),l=.5*Math.sqrt(s*c*(a-c)/a)*(o-a/2<0?-1:1),u=Math.max(n,Math.floor(t-o*c/a+l)),d=Math.min(r,Math.floor(t+(a-o)*c/a+l));xL(e,t,u,d,i)}let a=e[t],o=n,s=r;for(SL(e,n,t),i(e[r],a)>0&&SL(e,n,r);o<s;){for(SL(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[n],a)===0?SL(e,n,s):(++s,SL(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function SL(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}function CL(e,t,n){if(e=Float64Array.from(nL(e,n)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return bL(e);if(t>=1)return yL(e);var r,i=(r-1)*t,a=Math.floor(i),o=yL(xL(e,a).subarray(0,a+1));return o+(bL(e.subarray(a+1))-o)*(i-a)}}function wL(e,t,n=tL){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e);return o+(+n(e[a+1],a+1,e)-o)*(i-a)}}function TL(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}function EL(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function DL(e,t){switch(arguments.length){case 0:break;case 1:typeof e==`function`?this.interpolator(e):this.range(e);break;default:this.domain(e),typeof t==`function`?this.interpolator(t):this.range(t);break}return this}var OL=Symbol(`implicit`);function kL(){var e=new aL,t=[],n=[],r=OL;function i(i){let a=e.get(i);if(a===void 0){if(r!==OL)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new aL;for(let r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return kL(t,n).unknown(r)},EL.apply(i,arguments),i}function AL(){var e=kL().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var e=t().length,d=i<r,f=d?i:r,p=d?r:i;a=(p-f)/Math.max(1,e-c+l*2),s&&(a=Math.floor(a)),f+=(p-f-a*(e-c))*u,o=a*(1-c),s&&(f=Math.round(f),o=Math.round(o));var m=TL(e).map(function(e){return f+a*e});return n(d?m.reverse():m)}return e.domain=function(e){return arguments.length?(t(e),d()):t()},e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,d()):s},e.padding=function(e){return arguments.length?(c=Math.min(1,l=+e),d()):c},e.paddingInner=function(e){return arguments.length?(c=Math.min(1,e),d()):c},e.paddingOuter=function(e){return arguments.length?(l=+e,d()):l},e.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},e.copy=function(){return AL(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},EL.apply(d(),arguments)}function jL(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return jL(t())},e}function ML(){return jL(AL.apply(null,arguments).paddingInner(1))}function NL(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function PL(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function FL(){}var IL=.7,LL=1/IL,RL=`\\s*([+-]?\\d+)\\s*`,zL=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,BL=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,VL=/^#([0-9a-f]{3,8})$/,HL=RegExp(`^rgb\\(${RL},${RL},${RL}\\)$`),UL=RegExp(`^rgb\\(${BL},${BL},${BL}\\)$`),WL=RegExp(`^rgba\\(${RL},${RL},${RL},${zL}\\)$`),GL=RegExp(`^rgba\\(${BL},${BL},${BL},${zL}\\)$`),KL=RegExp(`^hsl\\(${zL},${BL},${BL}\\)$`),qL=RegExp(`^hsla\\(${zL},${BL},${BL},${zL}\\)$`),JL={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};NL(FL,$L,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:YL,formatHex:YL,formatHex8:XL,formatHsl:ZL,formatRgb:QL,toString:QL});function YL(){return this.rgb().formatHex()}function XL(){return this.rgb().formatHex8()}function ZL(){return fR(this).formatHsl()}function QL(){return this.rgb().formatRgb()}function $L(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=VL.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?eR(t):n===3?new iR(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?tR(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?tR(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=HL.exec(e))?new iR(t[1],t[2],t[3],1):(t=UL.exec(e))?new iR(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=WL.exec(e))?tR(t[1],t[2],t[3],t[4]):(t=GL.exec(e))?tR(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=KL.exec(e))?dR(t[1],t[2]/100,t[3]/100,1):(t=qL.exec(e))?dR(t[1],t[2]/100,t[3]/100,t[4]):JL.hasOwnProperty(e)?eR(JL[e]):e===`transparent`?new iR(NaN,NaN,NaN,0):null}function eR(e){return new iR(e>>16&255,e>>8&255,e&255,1)}function tR(e,t,n,r){return r<=0&&(e=t=n=NaN),new iR(e,t,n,r)}function nR(e){return e instanceof FL||(e=$L(e)),e?(e=e.rgb(),new iR(e.r,e.g,e.b,e.opacity)):new iR}function rR(e,t,n,r){return arguments.length===1?nR(e):new iR(e,t,n,r??1)}function iR(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}NL(iR,rR,PL(FL,{brighter(e){return e=e==null?LL:LL**+e,new iR(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?IL:IL**+e,new iR(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new iR(lR(this.r),lR(this.g),lR(this.b),cR(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:aR,formatHex:aR,formatHex8:oR,formatRgb:sR,toString:sR}));function aR(){return`#${uR(this.r)}${uR(this.g)}${uR(this.b)}`}function oR(){return`#${uR(this.r)}${uR(this.g)}${uR(this.b)}${uR((isNaN(this.opacity)?1:this.opacity)*255)}`}function sR(){let e=cR(this.opacity);return`${e===1?`rgb(`:`rgba(`}${lR(this.r)}, ${lR(this.g)}, ${lR(this.b)}${e===1?`)`:`, ${e})`}`}function cR(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function lR(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function uR(e){return e=lR(e),(e<16?`0`:``)+e.toString(16)}function dR(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new mR(e,t,n,r)}function fR(e){if(e instanceof mR)return new mR(e.h,e.s,e.l,e.opacity);if(e instanceof FL||(e=$L(e)),!e)return new mR;if(e instanceof mR)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new mR(o,s,c,e.opacity)}function pR(e,t,n,r){return arguments.length===1?fR(e):new mR(e,t,n,r??1)}function mR(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}NL(mR,pR,PL(FL,{brighter(e){return e=e==null?LL:LL**+e,new mR(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?IL:IL**+e,new mR(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new iR(_R(e>=240?e-240:e+120,i,r),_R(e,i,r),_R(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new mR(hR(this.h),gR(this.s),gR(this.l),cR(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=cR(this.opacity);return`${e===1?`hsl(`:`hsla(`}${hR(this.h)}, ${gR(this.s)*100}%, ${gR(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function hR(e){return e=(e||0)%360,e<0?e+360:e}function gR(e){return Math.max(0,Math.min(1,e||0))}function _R(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var vR=e=>()=>e;function yR(e,t){return function(n){return e+n*t}}function mee(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function hee(e){return(e=+e)==1?bR:function(t,n){return n-t?mee(t,n,e):vR(isNaN(t)?n:t)}}function bR(e,t){var n=t-e;return n?yR(e,n):vR(isNaN(e)?t:e)}var xR=(function e(t){var n=hee(t);function r(e,t){var r=n((e=rR(e)).r,(t=rR(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=bR(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function gee(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function _ee(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function vee(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=TR(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}function yee(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function SR(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function bee(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=TR(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var CR=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,wR=new RegExp(CR.source,`g`);function xee(e){return function(){return e}}function See(e){return function(t){return e(t)+``}}function Cee(e,t){var n=CR.lastIndex=wR.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=CR.exec(e))&&(i=wR.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:SR(r,i)})),n=wR.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?See(c[0].x):xee(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}function TR(e,t){var n=typeof t,r;return t==null||n===`boolean`?vR(t):(n===`number`?SR:n===`string`?(r=$L(t))?(t=r,xR):Cee:t instanceof $L?xR:t instanceof Date?yee:_ee(t)?gee:Array.isArray(t)?vee:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?bee:SR)(e,t)}function ER(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function DR(e,t){t===void 0&&(t=e,e=TR);for(var n=0,r=t.length-1,i=t[0],a=Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return a[t](e-t)}}function OR(e){return function(){return e}}function kR(e){return+e}var AR=[0,1];function jR(e){return e}function MR(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:OR(isNaN(t)?NaN:.5)}function NR(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function PR(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=MR(i,r),a=n(o,a)):(r=MR(r,i),a=n(a,o)),function(e){return a(r(e))}}function FR(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=MR(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=iL(e,t,1,r)-1;return a[n](i[n](t))}}function IR(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function LR(){var e=AR,t=AR,n=TR,r,i,a,o=jR,s,c,l;function u(){var n=Math.min(e.length,t.length);return o!==jR&&(o=NR(e[0],e[n-1])),s=n>2?FR:PR,c=l=null,d}function d(i){return i==null||isNaN(i=+i)?a:(c||=s(e.map(r),t,n))(r(o(i)))}return d.invert=function(n){return o(i((l||=s(t,e.map(r),SR))(n)))},d.domain=function(t){return arguments.length?(e=Array.from(t,kR),u()):e.slice()},d.range=function(e){return arguments.length?(t=Array.from(e),u()):t.slice()},d.rangeRound=function(e){return t=Array.from(e),n=ER,u()},d.clamp=function(e){return arguments.length?(o=e?!0:jR,u()):o!==jR},d.interpolate=function(e){return arguments.length?(n=e,u()):n},d.unknown=function(e){return arguments.length?(a=e,d):a},function(e,t){return r=e,i=t,u()}}function RR(){return LR()(jR,jR)}function zR(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function BR(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function VR(e){return e=BR(Math.abs(e)),e?e[1]:NaN}function HR(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function UR(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var WR=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function GR(e){if(!(t=WR.exec(e)))throw Error(`invalid format: `+e);var t;return new KR({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}GR.prototype=KR.prototype;function KR(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}KR.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function qR(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var JR;function YR(e,t){var n=BR(e,t);if(!n)return JR=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(JR=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+BR(e,Math.max(0,t+a-1))[0]}function XR(e,t){var n=BR(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var ZR={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:zR,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>XR(e*100,t),r:XR,s:YR,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function QR(e){return e}var $R=Array.prototype.map,ez=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function tz(e){var t=e.grouping===void 0||e.thousands===void 0?QR:HR($R.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?QR:UR($R.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,c=e.nan===void 0?`NaN`:e.nan+``;function l(e,l){e=GR(e);var u=e.fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,_=e.precision,v=e.trim,y=e.type;y===`n`?(g=!0,y=`g`):ZR[y]||(_===void 0&&(_=12),v=!0,y=`g`),(m||u===`0`&&d===`=`)&&(m=!0,u=`0`,d=`=`);var b=(l&&l.prefix!==void 0?l.prefix:``)+(p===`$`?n:p===`#`&&/[boxX]/.test(y)?`0`+y.toLowerCase():``),x=(p===`$`?r:/[%p]/.test(y)?o:``)+(l&&l.suffix!==void 0?l.suffix:``),S=ZR[y],C=/[defgprs%]/.test(y);_=_===void 0?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function w(e){var n=b,r=x,o,l,p;if(y===`c`)r=S(e)+r,e=``;else{e=+e;var w=e<0||1/e<0;if(e=isNaN(e)?c:S(Math.abs(e),_),v&&(e=qR(e)),w&&+e==0&&f!==`+`&&(w=!1),n=(w?f===`(`?f:s:f===`-`||f===`(`?``:f)+n,r=(y===`s`&&!isNaN(e)&&JR!==void 0?ez[8+JR/3]:``)+r+(w&&f===`(`?`)`:``),C){for(o=-1,l=e.length;++o<l;)if(p=e.charCodeAt(o),48>p||p>57){r=(p===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}g&&!m&&(e=t(e,1/0));var T=n.length+e.length+r.length,E=T<h?Array(h-T+1).join(u):``;switch(g&&m&&(e=t(E+e,E.length?h-r.length:1/0),E=``),d){case`<`:e=n+e+r+E;break;case`=`:e=n+E+e+r;break;case`^`:e=E.slice(0,T=E.length>>1)+n+e+r+E.slice(T);break;default:e=E+n+e+r;break}return a(e)}return w.toString=function(){return e+``},w}function u(e,t){var n=Math.max(-8,Math.min(8,Math.floor(VR(t)/3)))*3,r=10**-n,i=l((e=GR(e),e.type=`f`,e),{suffix:ez[8+n/3]});return function(e){return i(r*e)}}return{format:l,formatPrefix:u}}var nz,rz,iz;az({thousands:`,`,grouping:[3],currency:[`$`,``]});function az(e){return nz=tz(e),rz=nz.format,iz=nz.formatPrefix,nz}function oz(e){return Math.max(0,-VR(Math.abs(e)))}function sz(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(VR(t)/3)))*3-VR(Math.abs(e)))}function cz(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,VR(t)-VR(e))+1}function lz(e,t,n,r){var i=vL(e,t,n),a;switch(r=GR(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=sz(i,o))&&(r.precision=a),iz(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=cz(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=oz(i))&&(r.precision=a-(r.type===`%`)*2);break}return rz(r)}function uz(e){var t=e.domain;return e.ticks=function(e){var n=t();return gL(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return lz(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-->0;){if(l=_L(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function dz(){var e=RR();return e.copy=function(){return IR(e,dz())},EL.apply(e,arguments),uz(e)}function fz(e){var t;function n(e){return e==null||isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Array.from(t,kR),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return fz(e).unknown(t)},e=arguments.length?Array.from(e,kR):[0,1],uz(n)}function pz(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function mz(e){return Math.log(e)}function hz(e){return Math.exp(e)}function gz(e){return-Math.log(-e)}function _z(e){return-Math.exp(-e)}function vz(e){return isFinite(e)?+(`1e`+e):e<0?0:e}function yz(e){return e===10?vz:e===Math.E?Math.exp:t=>e**+t}function bz(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function xz(e){return(t,n)=>-e(-t,n)}function Sz(e){let t=e(mz,hz),n=t.domain,r=10,i,a;function o(){return i=bz(r),a=yz(r),n()[0]<0?(i=xz(i),a=xz(a),e(gz,_z)):e(mz,hz),t}return t.base=function(e){return arguments.length?(r=+e,o()):r},t.domain=function(e){return arguments.length?(n(e),o()):n()},t.ticks=e=>{let t=n(),o=t[0],s=t[t.length-1],c=s<o;c&&([o,s]=[s,o]);let l=i(o),u=i(s),d,f,p=e==null?10:+e,m=[];if(!(r%1)&&u-l<p){if(l=Math.floor(l),u=Math.ceil(u),o>0){for(;l<=u;++l)for(d=1;d<r;++d)if(f=l<0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}}else for(;l<=u;++l)for(d=r-1;d>=1;--d)if(f=l>0?d/a(-l):d*a(l),!(f<o)){if(f>s)break;m.push(f)}m.length*2<p&&(m=gL(o,s,p))}else m=gL(l,u,Math.min(u-l,p)).map(a);return c?m.reverse():m},t.tickFormat=(e,n)=>{if(e??=10,n??=r===10?`s`:`,`,typeof n!=`function`&&(!(r%1)&&(n=GR(n)).precision==null&&(n.trim=!0),n=rz(n)),e===1/0)return n;let o=Math.max(1,r*e/t.ticks().length);return e=>{let t=e/a(Math.round(i(e)));return t*r<r-.5&&(t*=r),t<=o?n(e):``}},t.nice=()=>n(pz(n(),{floor:e=>a(Math.floor(i(e))),ceil:e=>a(Math.ceil(i(e)))})),t}function Cz(){let e=Sz(LR()).domain([1,10]);return e.copy=()=>IR(e,Cz()).base(e.base()),EL.apply(e,arguments),e}function wz(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Tz(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Ez(e){var t=1,n=e(wz(t),Tz(t));return n.constant=function(n){return arguments.length?e(wz(t=+n),Tz(t)):t},uz(n)}function Dz(){var e=Ez(LR());return e.copy=function(){return IR(e,Dz()).constant(e.constant())},EL.apply(e,arguments)}function Oz(e){return function(t){return t<0?-((-t)**+e):t**+e}}function kz(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Az(e){return e<0?-e*e:e*e}function jz(e){var t=e(jR,jR),n=1;function r(){return n===1?e(jR,jR):n===.5?e(kz,Az):e(Oz(n),Oz(1/n))}return t.exponent=function(e){return arguments.length?(n=+e,r()):n},uz(t)}function Mz(){var e=jz(LR());return e.copy=function(){return IR(e,Mz()).exponent(e.exponent())},EL.apply(e,arguments),e}function Nz(){return Mz.apply(null,arguments).exponent(.5)}function Pz(e){return Math.sign(e)*e*e}function Fz(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Iz(){var e=RR(),t=[0,1],n=!1,r;function i(t){var i=Fz(e(t));return isNaN(i)?r:n?Math.round(i):i}return i.invert=function(t){return e.invert(Pz(t))},i.domain=function(t){return arguments.length?(e.domain(t),i):e.domain()},i.range=function(n){return arguments.length?(e.range((t=Array.from(n,kR)).map(Pz)),i):t.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(n=!!e,i):n},i.clamp=function(t){return arguments.length?(e.clamp(t),i):e.clamp()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return Iz(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},EL.apply(i,arguments),uz(i)}function Lz(){var e=[],t=[],n=[],r;function i(){var r=0,i=Math.max(1,t.length);for(n=Array(i-1);++r<i;)n[r-1]=wL(e,r/i);return a}function a(e){return e==null||isNaN(e=+e)?r:t[iL(n,e)]}return a.invertExtent=function(r){var i=t.indexOf(r);return i<0?[NaN,NaN]:[i>0?n[i-1]:e[0],i<n.length?n[i]:e[e.length-1]]},a.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(ZI),i()},a.range=function(e){return arguments.length?(t=Array.from(e),i()):t.slice()},a.unknown=function(e){return arguments.length?(r=e,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return Lz().domain(e).range(t).unknown(r)},EL.apply(a,arguments)}function Rz(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(e){return e!=null&&e<=e?i[iL(r,e,0,n)]:a}function s(){var i=-1;for(r=Array(n);++i<n;)r[i]=((i+1)*t-(i-n)*e)/(n+1);return o}return o.domain=function(n){return arguments.length?([e,t]=n,e=+e,t=+t,s()):[e,t]},o.range=function(e){return arguments.length?(n=(i=Array.from(e)).length-1,s()):i.slice()},o.invertExtent=function(a){var o=i.indexOf(a);return o<0?[NaN,NaN]:o<1?[e,r[0]]:o>=n?[r[n-1],t]:[r[o-1],r[o]]},o.unknown=function(e){return arguments.length&&(a=e),o},o.thresholds=function(){return r.slice()},o.copy=function(){return Rz().domain([e,t]).range(i).unknown(a)},EL.apply(uz(o),arguments)}function zz(){var e=[.5],t=[0,1],n,r=1;function i(i){return i!=null&&i<=i?t[iL(e,i,0,r)]:n}return i.domain=function(n){return arguments.length?(e=Array.from(n),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(n){return arguments.length?(t=Array.from(n),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(n){var r=t.indexOf(n);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(n=e,i):n},i.copy=function(){return zz().domain(e).range(t).unknown(n)},EL.apply(i,arguments)}var Bz=new Date,Vz=new Date;function Hz(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>Hz(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(Bz.setTime(+t),Vz.setTime(+r),e(Bz),e(Vz),Math.floor(n(Bz,Vz))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var Uz=Hz(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Uz.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Hz(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Uz),Uz.range;var Wz=1e3,Gz=Wz*60,Kz=Gz*60,qz=Kz*24,Jz=qz*7,Yz=qz*30,Xz=qz*365,Zz=Hz(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Wz)},(e,t)=>(t-e)/Wz,e=>e.getUTCSeconds());Zz.range;var Qz=Hz(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Wz)},(e,t)=>{e.setTime(+e+t*Gz)},(e,t)=>(t-e)/Gz,e=>e.getMinutes());Qz.range;var $z=Hz(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Gz)},(e,t)=>(t-e)/Gz,e=>e.getUTCMinutes());$z.range;var eB=Hz(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Wz-e.getMinutes()*Gz)},(e,t)=>{e.setTime(+e+t*Kz)},(e,t)=>(t-e)/Kz,e=>e.getHours());eB.range;var tB=Hz(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Kz)},(e,t)=>(t-e)/Kz,e=>e.getUTCHours());tB.range;var nB=Hz(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Gz)/qz,e=>e.getDate()-1);nB.range;var rB=Hz(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/qz,e=>e.getUTCDate()-1);rB.range;var iB=Hz(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/qz,e=>Math.floor(e/qz));iB.range;function aB(e){return Hz(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Gz)/Jz)}var oB=aB(0),sB=aB(1),cB=aB(2),lB=aB(3),uB=aB(4),dB=aB(5),fB=aB(6);oB.range,sB.range,cB.range,lB.range,uB.range,dB.range,fB.range;function pB(e){return Hz(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/Jz)}var mB=pB(0),hB=pB(1),gB=pB(2),_B=pB(3),vB=pB(4),yB=pB(5),bB=pB(6);mB.range,hB.range,gB.range,_B.range,vB.range,yB.range,bB.range;var xB=Hz(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());xB.range;var SB=Hz(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());SB.range;var CB=Hz(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());CB.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Hz(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),CB.range;var wB=Hz(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());wB.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Hz(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),wB.range;function TB(e,t,n,r,i,a){let o=[[Zz,1,Wz],[Zz,5,5*Wz],[Zz,15,15*Wz],[Zz,30,30*Wz],[a,1,Gz],[a,5,5*Gz],[a,15,15*Gz],[a,30,30*Gz],[i,1,Kz],[i,3,3*Kz],[i,6,6*Kz],[i,12,12*Kz],[r,1,qz],[r,2,2*qz],[n,1,Jz],[t,1,Yz],[t,3,3*Yz],[e,1,Xz]];function s(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:c(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function c(t,n,r){let i=Math.abs(n-t)/r,a=$I(([,,e])=>e).right(o,i);if(a===o.length)return e.every(vL(t/Xz,n/Xz,r));if(a===0)return Uz.every(Math.max(vL(t,n,r),1));let[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[s,c]}var[EB,DB]=TB(wB,SB,mB,iB,tB,$z),[OB,kB]=TB(CB,xB,oB,nB,eB,Qz);function AB(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function jB(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function MB(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function NB(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=BB(i),u=VB(i),d=BB(a),f=VB(a),p=BB(o),m=VB(o),h=BB(s),g=VB(s),_=BB(c),v=VB(c),y={a:N,A:P,b:F,B:I,c:null,d:cV,e:cV,f:pV,g:wV,G:EV,H:lV,I:uV,j:dV,L:fV,m:mV,M:hV,p:L,q:R,Q:YV,s:XV,S:gV,u:_V,U:vV,V:bV,w:xV,W:SV,x:null,X:null,y:CV,Y:TV,Z:DV,"%":JV},b={a:ee,A:te,b:z,B,c:null,d:OV,e:OV,f:NV,g:WV,G:KV,H:kV,I:AV,j:jV,L:MV,m:PV,M:FV,p:V,q:ne,Q:YV,s:XV,S:IV,u:LV,U:RV,V:BV,w:VV,W:HV,x:null,X:null,y:UV,Y:GV,Z:qV,"%":JV},x={a:E,A:D,b:O,B:k,c:A,d:QB,e:QB,f:iV,g:JB,G:qB,H:eV,I:eV,j:$B,L:rV,m:ZB,M:tV,p:T,q:XB,Q:oV,s:sV,S:nV,u:UB,U:WB,V:GB,w:HB,W:KB,x:j,X:M,y:JB,Y:qB,Z:YB,"%":aV};y.x=S(n,y),y.X=S(r,y),y.c=S(t,y),b.x=S(n,b),b.X=S(r,b),b.c=S(t,b);function S(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,c,l;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(c=PB[s=e.charAt(++i)])==null?c=s===`e`?` `:`0`:s=e.charAt(++i),(l=t[s])&&(s=l(n,c)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function C(e,t){return function(n){var r=MB(1900,void 0,1),i=w(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=jB(MB(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?hB.ceil(a):hB(a),a=rB.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=AB(MB(r.y,0,1)),o=a.getDay(),a=o>4||o===0?sB.ceil(a):sB(a),a=nB.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else(`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?jB(MB(r.y,0,1)).getUTCDay():AB(MB(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,jB(r)):AB(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in PB?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function A(e,n,r){return w(e,t,n,r)}function j(e,t,r){return w(e,n,t,r)}function M(e,t,n){return w(e,r,t,n)}function N(e){return o[e.getDay()]}function P(e){return a[e.getDay()]}function F(e){return c[e.getMonth()]}function I(e){return s[e.getMonth()]}function L(e){return i[+(e.getHours()>=12)]}function R(e){return 1+~~(e.getMonth()/3)}function ee(e){return o[e.getUTCDay()]}function te(e){return a[e.getUTCDay()]}function z(e){return c[e.getUTCMonth()]}function B(e){return s[e.getUTCMonth()]}function V(e){return i[+(e.getUTCHours()>=12)]}function ne(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var PB={"-":``,_:` `,0:`0`},FB=/^\s*\d+/,IB=/^%/,LB=/[\\^$*+?|[\]().{}]/g;function RB(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function zB(e){return e.replace(LB,`\\$&`)}function BB(e){return RegExp(`^(?:`+e.map(zB).join(`|`)+`)`,`i`)}function VB(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function HB(e,t,n){var r=FB.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function UB(e,t,n){var r=FB.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function WB(e,t,n){var r=FB.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function GB(e,t,n){var r=FB.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function KB(e,t,n){var r=FB.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function qB(e,t,n){var r=FB.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function JB(e,t,n){var r=FB.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function YB(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function XB(e,t,n){var r=FB.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function ZB(e,t,n){var r=FB.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function QB(e,t,n){var r=FB.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function $B(e,t,n){var r=FB.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function eV(e,t,n){var r=FB.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function tV(e,t,n){var r=FB.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function nV(e,t,n){var r=FB.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function rV(e,t,n){var r=FB.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function iV(e,t,n){var r=FB.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function aV(e,t,n){var r=IB.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function oV(e,t,n){var r=FB.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function sV(e,t,n){var r=FB.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function cV(e,t){return RB(e.getDate(),t,2)}function lV(e,t){return RB(e.getHours(),t,2)}function uV(e,t){return RB(e.getHours()%12||12,t,2)}function dV(e,t){return RB(1+nB.count(CB(e),e),t,3)}function fV(e,t){return RB(e.getMilliseconds(),t,3)}function pV(e,t){return fV(e,t)+`000`}function mV(e,t){return RB(e.getMonth()+1,t,2)}function hV(e,t){return RB(e.getMinutes(),t,2)}function gV(e,t){return RB(e.getSeconds(),t,2)}function _V(e){var t=e.getDay();return t===0?7:t}function vV(e,t){return RB(oB.count(CB(e)-1,e),t,2)}function yV(e){var t=e.getDay();return t>=4||t===0?uB(e):uB.ceil(e)}function bV(e,t){return e=yV(e),RB(uB.count(CB(e),e)+(CB(e).getDay()===4),t,2)}function xV(e){return e.getDay()}function SV(e,t){return RB(sB.count(CB(e)-1,e),t,2)}function CV(e,t){return RB(e.getFullYear()%100,t,2)}function wV(e,t){return e=yV(e),RB(e.getFullYear()%100,t,2)}function TV(e,t){return RB(e.getFullYear()%1e4,t,4)}function EV(e,t){var n=e.getDay();return e=n>=4||n===0?uB(e):uB.ceil(e),RB(e.getFullYear()%1e4,t,4)}function DV(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+RB(t/60|0,`0`,2)+RB(t%60,`0`,2)}function OV(e,t){return RB(e.getUTCDate(),t,2)}function kV(e,t){return RB(e.getUTCHours(),t,2)}function AV(e,t){return RB(e.getUTCHours()%12||12,t,2)}function jV(e,t){return RB(1+rB.count(wB(e),e),t,3)}function MV(e,t){return RB(e.getUTCMilliseconds(),t,3)}function NV(e,t){return MV(e,t)+`000`}function PV(e,t){return RB(e.getUTCMonth()+1,t,2)}function FV(e,t){return RB(e.getUTCMinutes(),t,2)}function IV(e,t){return RB(e.getUTCSeconds(),t,2)}function LV(e){var t=e.getUTCDay();return t===0?7:t}function RV(e,t){return RB(mB.count(wB(e)-1,e),t,2)}function zV(e){var t=e.getUTCDay();return t>=4||t===0?vB(e):vB.ceil(e)}function BV(e,t){return e=zV(e),RB(vB.count(wB(e),e)+(wB(e).getUTCDay()===4),t,2)}function VV(e){return e.getUTCDay()}function HV(e,t){return RB(hB.count(wB(e)-1,e),t,2)}function UV(e,t){return RB(e.getUTCFullYear()%100,t,2)}function WV(e,t){return e=zV(e),RB(e.getUTCFullYear()%100,t,2)}function GV(e,t){return RB(e.getUTCFullYear()%1e4,t,4)}function KV(e,t){var n=e.getUTCDay();return e=n>=4||n===0?vB(e):vB.ceil(e),RB(e.getUTCFullYear()%1e4,t,4)}function qV(){return`+0000`}function JV(){return`%`}function YV(e){return+e}function XV(e){return Math.floor(e/1e3)}var ZV,QV,$V;eH({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function eH(e){return ZV=NB(e),QV=ZV.format,ZV.parse,$V=ZV.utcFormat,ZV.utcParse,ZV}function tH(e){return new Date(e)}function nH(e){return e instanceof Date?+e:+new Date(+e)}function rH(e,t,n,r,i,a,o,s,c,l){var u=RR(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e)<e?p:s(e)<e?m:o(e)<e?h:a(e)<e?g:r(e)<e?i(e)<e?_:v:n(e)<e?y:b)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,nH)):f().map(tH)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return t==null?x:l(t)},u.nice=function(e){var n=f();return(!e||typeof e.range!=`function`)&&(e=t(n[0],n[n.length-1],e??10)),e?f(pz(n,e)):u},u.copy=function(){return IR(u,rH(e,t,n,r,i,a,o,s,c,l))},u}function iH(){return EL.apply(rH(OB,kB,CB,xB,oB,nB,eB,Qz,Zz,QV).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function aH(){return EL.apply(rH(EB,DB,wB,SB,mB,rB,tB,$z,Zz,$V).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function oH(){var e=0,t=1,n,r,i,a,o=jR,s=!1,c;function l(e){return e==null||isNaN(e=+e)?c:o(i===0?.5:(e=(a(e)-n)*i,s?Math.max(0,Math.min(1,e)):e))}l.domain=function(o){return arguments.length?([e,t]=o,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),l):[e,t]},l.clamp=function(e){return arguments.length?(s=!!e,l):s},l.interpolator=function(e){return arguments.length?(o=e,l):o};function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,o=e(n,r),l):[o(0),o(1)]}}return l.range=u(TR),l.rangeRound=u(ER),l.unknown=function(e){return arguments.length?(c=e,l):c},function(o){return a=o,n=o(e),r=o(t),i=n===r?0:1/(r-n),l}}function sH(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function cH(){var e=uz(oH()(jR));return e.copy=function(){return sH(e,cH())},DL.apply(e,arguments)}function lH(){var e=Sz(oH()).domain([1,10]);return e.copy=function(){return sH(e,lH()).base(e.base())},DL.apply(e,arguments)}function uH(){var e=Ez(oH());return e.copy=function(){return sH(e,uH()).constant(e.constant())},DL.apply(e,arguments)}function dH(){var e=jz(oH());return e.copy=function(){return sH(e,dH()).exponent(e.exponent())},DL.apply(e,arguments)}function fH(){return dH.apply(null,arguments).exponent(.5)}function pH(){var e=[],t=jR;function n(n){if(n!=null&&!isNaN(n=+n))return t((iL(e,n,1)-1)/(e.length-1))}return n.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(ZI),n},n.interpolator=function(e){return arguments.length?(t=e,n):t},n.range=function(){return e.map((n,r)=>t(r/(e.length-1)))},n.quantiles=function(t){return Array.from({length:t+1},(n,r)=>CL(e,r/t))},n.copy=function(){return pH(t).domain(e)},DL.apply(n,arguments)}function mH(){var e=0,t=.5,n=1,r=1,i,a,o,s,c,l=jR,u,d=!1,f;function p(e){return isNaN(e=+e)?f:(e=.5+((e=+u(e))-a)*(r*e<r*a?s:c),l(d?Math.max(0,Math.min(1,e)):e))}p.domain=function(l){return arguments.length?([e,t,n]=l,i=u(e=+e),a=u(t=+t),o=u(n=+n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p):[e,t,n]},p.clamp=function(e){return arguments.length?(d=!!e,p):d},p.interpolator=function(e){return arguments.length?(l=e,p):l};function m(e){return function(t){var n,r,i;return arguments.length?([n,r,i]=t,l=DR(e,[n,r,i]),p):[l(0),l(.5),l(1)]}}return p.range=m(TR),p.rangeRound=m(ER),p.unknown=function(e){return arguments.length?(f=e,p):f},function(l){return u=l,i=l(e),a=l(t),o=l(n),s=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,p}}function hH(){var e=uz(mH()(jR));return e.copy=function(){return sH(e,hH())},DL.apply(e,arguments)}function gH(){var e=Sz(mH()).domain([.1,1,10]);return e.copy=function(){return sH(e,gH()).base(e.base())},DL.apply(e,arguments)}function _H(){var e=Ez(mH());return e.copy=function(){return sH(e,_H()).constant(e.constant())},DL.apply(e,arguments)}function vH(){var e=jz(mH());return e.copy=function(){return sH(e,vH()).exponent(e.exponent())},DL.apply(e,arguments)}function yH(){return vH.apply(null,arguments).exponent(.5)}var bH=s({scaleBand:()=>AL,scaleDiverging:()=>hH,scaleDivergingLog:()=>gH,scaleDivergingPow:()=>vH,scaleDivergingSqrt:()=>yH,scaleDivergingSymlog:()=>_H,scaleIdentity:()=>fz,scaleImplicit:()=>OL,scaleLinear:()=>dz,scaleLog:()=>Cz,scaleOrdinal:()=>kL,scalePoint:()=>ML,scalePow:()=>Mz,scaleQuantile:()=>Lz,scaleQuantize:()=>Rz,scaleRadial:()=>Iz,scaleSequential:()=>cH,scaleSequentialLog:()=>lH,scaleSequentialPow:()=>dH,scaleSequentialQuantile:()=>pH,scaleSequentialSqrt:()=>fH,scaleSequentialSymlog:()=>uH,scaleSqrt:()=>Nz,scaleSymlog:()=>Dz,scaleThreshold:()=>zz,scaleTime:()=>iH,scaleUtc:()=>aH,tickFormat:()=>lz});function xH(e){var t=bH;if(e in t&&typeof t[e]==`function`)return t[e]();var n=`scale${EC(e)}`;if(n in t&&typeof t[n]==`function`)return t[n]()}function SH(e,t,n){if(typeof e==`function`)return e.copy().domain(t).range(n);if(e!=null){var r=xH(e);if(r!=null)return r.domain(t).range(n),r}}function CH(e,t,n,r){if(!(n==null||r==null))return typeof e.scale==`function`?SH(e.scale,n,r):SH(t,n,r)}function wH(e){return`scale${EC(e)}`}function TH(e){return wH(e)in bH}var EH=(e,t,n)=>{if(e!=null){var r=e.scale,i=e.type;if(r===`auto`)return i===`category`&&n&&(n.indexOf(`LineChart`)>=0||n.indexOf(`AreaChart`)>=0||n.indexOf(`ComposedChart`)>=0&&!t)?`point`:i===`category`?`band`:`linear`;if(typeof r==`string`)return TH(r)?r:`point`}};function DH(e,t){for(var n=0,r=e.length,i=e[0]<e[e.length-1];n<r;){var a=Math.floor((n+r)/2);(i?e[a]<t:e[a]>t)?n=a+1:r=a}return n}function OH(e,t){if(e){var n=t??e.domain(),r=n.map(t=>e(t)??0),i=e.range();if(!(n.length===0||i.length<2))return e=>{var t=DH(r,e);if(t<=0)return n[0];if(t>=n.length)return n[n.length-1];var i=r[t-1]??0,a=r[t]??0;return Math.abs(e-i)<=Math.abs(e-a)?n[t-1]:n[t]}}}function kH(e){if(e!=null)return`invert`in e&&typeof e.invert==`function`?e.invert.bind(e):OH(e,void 0)}function AH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?AH(Object(n),!0).forEach(function(t){MH(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AH(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function MH(e,t,n){return(t=NH(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NH(e){var t=PH(e,`string`);return typeof t==`symbol`?t:t+``}function PH(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function FH(e,t){return BH(e)||zH(e,t)||LH(e,t)||IH()}function IH(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
120
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LH(e,t){if(e){if(typeof e==`string`)return RH(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?RH(e,t):void 0}}function RH(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function zH(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function BH(e){if(Array.isArray(e))return e}var VH=[0,`auto`],HH={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:`preserveEnd`,minTickGap:5,mirror:!1,name:void 0,orientation:`bottom`,padding:{left:0,right:0},reversed:!1,scale:`auto`,tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:`category`,unit:void 0,niceTicks:`auto`},UH=(e,t)=>e.cartesianAxis.xAxis[t],WH=(e,t)=>UH(e,t)??HH,GH={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:VH,hide:!0,id:0,includeHidden:!1,interval:`preserveEnd`,minTickGap:5,mirror:!1,name:void 0,orientation:`left`,padding:{top:0,bottom:0},reversed:!1,scale:`auto`,tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:`number`,unit:void 0,niceTicks:`auto`,width:60},KH=(e,t)=>e.cartesianAxis.yAxis[t],qH=(e,t)=>KH(e,t)??GH,JH={domain:[0,`auto`],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:``,range:[64,64],scale:`auto`,type:`number`,unit:``},YH=(e,t)=>e.cartesianAxis.zAxis[t]??JH,XH=(e,t,n)=>{switch(t){case`xAxis`:return WH(e,n);case`yAxis`:return qH(e,n);case`zAxis`:return YH(e,n);case`angleAxis`:return OI(e,n);case`radiusAxis`:return kI(e,n);default:throw Error(`Unexpected axis type: ${t}`)}},ZH=(e,t,n)=>{switch(t){case`xAxis`:return WH(e,n);case`yAxis`:return qH(e,n);default:throw Error(`Unexpected axis type: ${t}`)}},QH=(e,t,n)=>{switch(t){case`xAxis`:return WH(e,n);case`yAxis`:return qH(e,n);case`angleAxis`:return OI(e,n);case`radiusAxis`:return kI(e,n);default:throw Error(`Unexpected axis type: ${t}`)}},$H=e=>e.graphicalItems.cartesianItems.some(e=>e.type===`bar`)||e.graphicalItems.polarItems.some(e=>e.type===`radialBar`);function eU(e,t){return n=>{switch(e){case`xAxis`:return`xAxisId`in n&&n.xAxisId===t;case`yAxis`:return`yAxisId`in n&&n.yAxisId===t;case`zAxis`:return`zAxisId`in n&&n.zAxisId===t;case`angleAxis`:return`angleAxisId`in n&&n.angleAxisId===t;case`radiusAxis`:return`radiusAxisId`in n&&n.radiusAxisId===t;default:return!1}}}var tU=e=>e.graphicalItems.cartesianItems,nU=$([zI,BI],eU),rU=(e,t,n)=>e.filter(n).filter(e=>t?.includeHidden===!0?!0:!e.hide),iU=$([tU,XH,nU],rU,{memoizeOptions:{resultEqualityCheck:GI}}),aU=$([iU],e=>e.filter(e=>e.type===`area`||e.type===`bar`).filter(UI)),oU=e=>e.filter(e=>!(`stackId`in e)||e.stackId===void 0),sU=$([iU],oU),cU=e=>e.map(e=>e.data).filter(Boolean).flat(1),lU=$([iU],e=>e.some(e=>!e.data)),uU=$([iU],cU,{memoizeOptions:{resultEqualityCheck:GI}}),dU=(e,t)=>{var n=t.chartData,r=n===void 0?[]:n,i=t.dataStartIndex,a=t.dataEndIndex;return e.length>0?e:r.slice(i,a+1)},fU=$([uU,OF],dU),pU=(e,t,n)=>t?.dataKey==null?n.length>0?n.map(e=>e.dataKey).flatMap(t=>e.map(e=>({value:zO(e,t)}))):e.map(e=>({value:e})):e.map(e=>({value:zO(e,t.dataKey)})),mU=(e,t,n,r,i,a)=>{var o=r.chartData,s=o===void 0?[]:o,c=r.dataStartIndex,l=r.dataEndIndex,u=pU(e,t,n);return i&&t?.dataKey!=null&&a.length>0?[...s.slice(c,l+1).map(e=>({value:zO(e,t.dataKey)})).filter(e=>e.value!=null),...u]:u},hU=$([fU,XH,iU,OF,lU,uU],mU);function gU(e){if(vC(e)||e instanceof Date){var t=Number(e);if(MO(t))return t}}function _U(e){if(Array.isArray(e)){var t=[gU(e[0]),gU(e[1])];return zF(t)?t:void 0}var n=gU(e);if(n!=null)return[n,n]}function vU(e){return e.map(gU).filter(DC)}function yU(e,t){var n=gU(e),r=gU(t);return n==null&&r==null?0:n==null?-1:r==null?1:n-r}var bU=$([hU],e=>e?.map(e=>e.value).sort(yU));function xU(e,t){switch(e){case`xAxis`:return t.direction===`x`;case`yAxis`:return t.direction===`y`;default:return!1}}function SU(e,t,n){if(!n||!n.length)return[];var r;if(typeof t==`number`&&!gC(t))r=t;else if(Array.isArray(t)){var i=vU(t);i.length>0&&(r=Math.max(...i))}return r==null?[]:vU(n.flatMap(t=>{var n=zO(e,t.dataKey),i,a;if(Array.isArray(n)){var o=FH(n,2);i=o[0],a=o[1]}else i=a=n;if(!(!MO(i)||!MO(a)))return[r-i,r+a]}))}var CU=e=>QH(e,qI(e),JI(e)),wU=$([CU],e=>e?.dataKey),TU=$([aU,OF,CU],HI),EU=(e,t,n,r)=>{var i=t.reduce((e,t)=>{if(t.stackId==null)return e;var n=e[t.stackId];return n??=[],n.push(t),e[t.stackId]=n,e},{});return Object.fromEntries(Object.entries(i).map(t=>{var i=FH(t,2),a=i[0],o=i[1],s=r?[...o].reverse():o;return[a,{stackedData:KO(e,s.map(VI),n),graphicalItems:s}]}))},DU=$([TU,aU,lI,uI],EU),OU=(e,t,n,r)=>{var i=t.dataStartIndex,a=t.dataEndIndex;if(r==null&&n!==`zAxis`)return $O(e,i,a)},kU=$([XH],e=>e.allowDataOverflow),AU=e=>{if(e==null||!(`domain`in e))return VH;if(e.domain!=null)return e.domain;if(`ticks`in e&&e.ticks!=null){if(e.type===`number`){var t=vU(e.ticks);return[Math.min(...t),Math.max(...t)]}if(e.type===`category`)return e.ticks.map(String)}return e?.domain??VH},jU=$([XH],AU),MU=$([jU,kU],VF),NU=$([DU,EF,zI,MU],OU,{memoizeOptions:{resultEqualityCheck:WI}}),PU=e=>e.errorBars,FU=(e,t,n)=>e.flatMap(e=>t[e.id]).filter(Boolean).filter(e=>xU(n,e)),IU=function(){var e=[...arguments].filter(Boolean);if(e.length!==0){var t=e.flat();return[Math.min(...t),Math.max(...t)]}},LU=function(e,t,n,r,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],o,s;if(n.length>0&&n.forEach(e=>{var n=e.data==null?a:[...e.data],c=r[e.id]?.filter(e=>xU(i,e));n.forEach(n=>{var r=zO(n,t.dataKey??e.dataKey),i=SU(n,r,c);if(i.length>=2){var a=Math.min(...i),l=Math.max(...i);(o==null||a<o)&&(o=a),(s==null||l>s)&&(s=l)}var u=_U(r);u!=null&&(o=o==null?u[0]:Math.min(o,u[0]),s=s==null?u[1]:Math.max(s,u[1]))})}),t?.dataKey!=null&&n.length===0&&e.forEach(e=>{var n=_U(zO(e,t.dataKey));n!=null&&(o=o==null?n[0]:Math.min(o,n[0]),s=s==null?n[1]:Math.max(s,n[1]))}),MO(o)&&MO(s))return[o,s]},RU=$([fU,XH,sU,PU,zI,AF],LU,{memoizeOptions:{resultEqualityCheck:WI}});function zU(e){var t=e.value;if(vC(t)||t instanceof Date)return t}var BU=(e,t,n)=>{var r=e.map(zU).filter(e=>e!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&SC(r))?TF(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},VU=e=>e.referenceElements.dots,HU=(e,t,n)=>e.filter(e=>e.ifOverflow===`extendDomain`).filter(e=>t===`xAxis`?e.xAxisId===n:e.yAxisId===n),UU=$([VU,zI,BI],HU),WU=e=>e.referenceElements.areas,GU=$([WU,zI,BI],HU),KU=e=>e.referenceElements.lines,qU=$([KU,zI,BI],HU),JU=(e,t)=>{if(e!=null){var n=vU(e.map(e=>t===`xAxis`?e.x:e.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},YU=$(UU,zI,JU),XU=(e,t)=>{if(e!=null){var n=vU(e.flatMap(e=>[t===`xAxis`?e.x1:e.y1,t===`xAxis`?e.x2:e.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},ZU=$([GU,zI],XU);function QU(e){if(e.x!=null)return vU([e.x]);var t=e.segment?.map(e=>e.x);return t==null||t.length===0?[]:vU(t)}function $U(e){if(e.y!=null)return vU([e.y]);var t=e.segment?.map(e=>e.y);return t==null||t.length===0?[]:vU(t)}var eW=(e,t)=>{if(e!=null){var n=e.flatMap(e=>t===`xAxis`?QU(e):$U(e));if(n.length!==0)return[Math.min(...n),Math.max(...n)]}},tW=$(YU,$([qU,zI],eW),ZU,(e,t,n)=>IU(e,n,t)),nW=(e,t,n,r,i,a,o,s,c)=>{if(n!=null)return n;var l=o===`vertical`&&s===`xAxis`||o===`horizontal`&&s===`yAxis`?IU(r,a,i):IU(a,i),u=HF(t,l,e.allowDataOverflow);return u==null&&e.allowDataOverflow&&l==null&&c!=null?c:u},rW=$([XH,jU,MU,NU,RU,tW,_A,zI,$([XH],e=>{if(!(e==null||e.type!==`number`||!(`ticks`in e)||e.ticks==null)){var t=vU(e.ticks);if(t.length!==0)return[Math.min(...t),Math.max(...t)]}},{memoizeOptions:{resultEqualityCheck:WI}})],nW,{memoizeOptions:{resultEqualityCheck:WI}}),iW=[0,1],aW=(e,t,n,r,i,a,o)=>{if(!((e==null||n==null||n.length===0)&&o===void 0)){var s=e.dataKey,c=e.type,l=VO(t,a);return l&&s==null?TF(0,n?.length??0):c===`category`?BU(r,e,l):i===`expand`&&!l?iW:o}},oW=$([XH,_A,fU,hU,lI,zI,rW],aW),sW=$([XH,$H,dI],EH),cW=(e,t,n)=>{var r=t.niceTicks;if(r!==`none`){var i=AU(t),a=Array.isArray(i)&&(i[0]===`auto`||i[1]===`auto`);if((r===`snap125`||r===`adaptive`)&&t!=null&&t.tickCount&&zF(e)){if(a)return rI(e,t.tickCount,t.allowDecimals,r);if(t.type===`number`)return iI(e,t.tickCount,t.allowDecimals,r)}if(r===`auto`&&n===`linear`&&t!=null&&t.tickCount){if(a&&zF(e))return rI(e,t.tickCount,t.allowDecimals,`adaptive`);if(t.type===`number`&&zF(e))return iI(e,t.tickCount,t.allowDecimals,`adaptive`)}}},lW=$([oW,QH,sW],cW),uW=(e,t,n,r)=>{if(r!==`angleAxis`&&e?.type===`number`&&zF(t)&&Array.isArray(n)&&n.length>0){var i=t[0],a=n[0]??0,o=t[1],s=n[n.length-1]??0;return[Math.min(i,a),Math.max(o,s)]}return t},dW=$([XH,oW,lW,zI],uW),fW=$($(hU,XH,(e,t)=>{if(!(!t||t.type!==`number`)){var n=1/0,r=Array.from(vU(e.map(e=>e.value))).sort((e,t)=>e-t),i=r[0],a=r[r.length-1];if(i==null||a==null)return 1/0;var o=a-i;if(o===0)return 1/0;for(var s=0;s<r.length-1;s++){var c=r[s],l=r[s+1];if(!(c==null||l==null)){var u=l-c;n=Math.min(n,u)}}return n/o}}),_A,sI,Tk,(e,t,n,r,i)=>i,(e,t,n,r,i)=>{if(!MO(e))return 0;var a=t===`vertical`?r.height:r.width;if(i===`gap`)return e*a/2;if(i===`no-gap`){var o=xC(n,e*a),s=e*a/2;return s-o-(s-o)/a*o}return 0}),pW=(e,t,n)=>{var r=WH(e,t);return r==null||typeof r.padding!=`string`?0:fW(e,`xAxis`,t,n,r.padding)},mW=(e,t,n)=>{var r=qH(e,t);return r==null||typeof r.padding!=`string`?0:fW(e,`yAxis`,t,n,r.padding)},hW=$(WH,pW,(e,t)=>{if(e==null)return{left:0,right:0};var n=e.padding;return typeof n==`string`?{left:t,right:t}:{left:(n.left??0)+t,right:(n.right??0)+t}}),gW=$(qH,mW,(e,t)=>{if(e==null)return{top:0,bottom:0};var n=e.padding;return typeof n==`string`?{top:t,bottom:t}:{top:(n.top??0)+t,bottom:(n.bottom??0)+t}}),_W=$([Tk,hW,jk,Ak,(e,t,n)=>n],(e,t,n,r,i)=>{var a=r.padding;return i?[a.left,n.width-a.right]:[e.left+t.left,e.left+e.width-t.right]}),vW=$([Tk,_A,gW,jk,Ak,(e,t,n)=>n],(e,t,n,r,i,a)=>{var o=i.padding;return a?[r.height-o.bottom,o.top]:t===`horizontal`?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),yW=(e,t,n,r)=>{switch(t){case`xAxis`:return _W(e,n,r);case`yAxis`:return vW(e,n,r);case`zAxis`:return YH(e,n)?.range;case`angleAxis`:return PI(e);case`radiusAxis`:return II(e,n);default:return}},bW=$([XH,yW],yI),xW=$([XH,sW,$([sW,dW],XI),bW],CH),SW=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var i=n.type,a=n.scale;if(VO(e,r)&&(i===`number`||a!==`auto`))return t.map(e=>e.value)}},CW=$([_A,hU,QH,zI],SW),wW=$([xW],YI);$([xW],kH),$([xW,bU],OH),$([iU,PU,zI],FU);function TW(e,t){return e.id<t.id?-1:+(e.id>t.id)}var EW=(e,t)=>t,DW=(e,t,n)=>n,OW=$(dk,EW,DW,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(TW)),kW=$(fk,EW,DW,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(TW)),AW=(e,t)=>({width:e.width,height:t.height}),jW=(e,t)=>({width:typeof t.width==`number`?t.width:60,height:e.height}),MW=$(Tk,WH,AW),NW=(e,t,n)=>{switch(t){case`top`:return e.top;case`bottom`:return n-e.bottom;default:return 0}},PW=(e,t,n)=>{switch(t){case`left`:return e.left;case`right`:return n-e.right;default:return 0}},FW=$(ck,Tk,OW,EW,DW,(e,t,n,r,i)=>{var a={},o;return n.forEach(n=>{var s=AW(t,n);o??=NW(t,r,e);var c=r===`top`&&!i||r===`bottom`&&i;a[n.id]=o-Number(c)*s.height,o+=(c?-1:1)*s.height}),a}),IW=$(sk,Tk,kW,EW,DW,(e,t,n,r,i)=>{var a={},o;return n.forEach(n=>{var s=jW(t,n);o??=PW(t,r,e);var c=r===`left`&&!i||r===`right`&&i;a[n.id]=o-Number(c)*s.width,o+=(c?-1:1)*s.width}),a}),LW=$([Tk,WH,(e,t)=>{var n=WH(e,t);if(n!=null)return FW(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),RW=$([Tk,qH,(e,t)=>{var n=qH(e,t);if(n!=null)return IW(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),zW=$(Tk,qH,(e,t)=>({width:typeof t.width==`number`?t.width:60,height:e.height})),BW=(e,t,n,r)=>{if(n!=null){var i=n.allowDuplicatedCategory,a=n.type,o=n.dataKey,s=VO(e,r),c=t.map(e=>e.value),l=c.filter(e=>e!=null);if(o&&s&&a===`category`&&i&&SC(l))return c}},VW=$([_A,hU,XH,zI],BW),HW=$([_A,ZH,sW,wW,VW,CW,yW,lW,zI],(e,t,n,r,i,a,o,s,c)=>{if(t!=null){var l=VO(e,c);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:c,categoricalDomain:a,duplicateDomain:i,isCategorical:l,niceTicks:s,range:o,realScaleType:n,scale:r}}}),UW=(e,t,n,r,i,a,o,s,c)=>{if(!(t==null||r==null)){var l=VO(e,c),u=t.type,d=t.ticks,f=t.tickCount,p=n===`scaleBand`&&typeof r.bandwidth==`function`?r.bandwidth()/2:2,m=u===`category`&&r.bandwidth?r.bandwidth()/p:0;m=c===`angleAxis`&&a!=null&&a.length>=2?hC(a[0]-a[1])*2*m:m;var h=d||i;return h?h.map((e,t)=>{var n=o?o.indexOf(e):e,i=r.map(n);return MO(i)?{index:t,coordinate:i+m,value:e,offset:m}:null}).filter(DC):l&&s?s.map((e,t)=>{var n=r.map(e);return MO(n)?{coordinate:n+m,value:e,index:t,offset:m}:null}).filter(DC):r.ticks?r.ticks(f).map((e,t)=>{var n=r.map(e);return MO(n)?{coordinate:n+m,value:e,index:t,offset:m}:null}).filter(DC):r.domain().map((e,t)=>{var n=r.map(e);return MO(n)?{coordinate:n+m,value:o?o[e]:e,index:t,offset:m}:null}).filter(DC)}},WW=$([_A,QH,sW,wW,lW,yW,VW,CW,zI],UW),GW=(e,t,n,r,i,a,o)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var s=VO(e,o),c=t.tickCount,l=0;return l=o===`angleAxis`&&r?.length>=2?hC(r[0]-r[1])*2*l:l,s&&a?a.map((e,t)=>{var r=n.map(e);return MO(r)?{coordinate:r+l,value:e,index:t,offset:l}:null}).filter(DC):n.ticks?n.ticks(c).map((e,t)=>{var r=n.map(e);return MO(r)?{coordinate:r+l,value:e,index:t,offset:l}:null}).filter(DC):n.domain().map((e,t)=>{var r=n.map(e);return MO(r)?{coordinate:r+l,value:i?i[e]:e,index:t,offset:l}:null}).filter(DC)}},KW=$([_A,QH,wW,yW,VW,CW,zI],GW),qW=$(XH,wW,(e,t)=>{if(!(e==null||t==null))return jH(jH({},e),{},{scale:t})});$((e,t,n)=>YH(e,n),$([$([XH,sW,oW,bW],CH)],YI),(e,t)=>{if(!(e==null||t==null))return jH(jH({},e),{},{scale:t})});var JW=$([_A,dk,fk],(e,t,n)=>{switch(e){case`horizontal`:return t.some(e=>e.reversed)?`right-to-left`:`left-to-right`;case`vertical`:return n.some(e=>e.reversed)?`bottom-to-top`:`top-to-bottom`;case`centric`:case`radial`:return`left-to-right`;default:return}});$([(e,t,n)=>e.renderedTicks[t]?.[n]],e=>{if(!(!e||e.length===0))return t=>{var n=1/0,r=e[0];for(var i of e){var a=Math.abs(i.coordinate-t);a<n&&(n=a,r=i)}return r?.value}});var YW=e=>e.options.defaultTooltipEventType,XW=e=>e.options.validateTooltipEventTypes;function ZW(e,t,n){if(e==null)return t;var r=e?`axis`:`item`;return n==null?t:n.includes(r)?r:t}function QW(e,t){return ZW(t,YW(e),XW(e))}function $W(e){return Q(t=>QW(t,e))}var eG=(e,t)=>{var n,r=Number(t);if(!(gC(r)||t==null))return r>=0?e==null||(n=e[r])==null?void 0:n.value:void 0},tG=e=>e.tooltip.settings,nG={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},rG=ID({name:`tooltip`,initialState:{itemInteraction:{click:nG,hover:nG},axisInteraction:{click:nG,hover:nG},keyboardInteraction:nG,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:`hover`,axisId:0,active:!1,defaultIndex:void 0}},reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(Uj(t.payload))},prepare:xD()},replaceTooltipEntrySettings:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next,a=sD(e).tooltipItemPayloads.indexOf(Uj(r));a>-1&&(e.tooltipItemPayloads[a]=Uj(i))},prepare:xD()},removeTooltipEntrySettings:{reducer(e,t){var n=sD(e).tooltipItemPayloads.indexOf(Uj(t.payload));n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:xD()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),iG=rG.actions,aG=iG.addTooltipEntrySettings,oG=iG.replaceTooltipEntrySettings,sG=iG.removeTooltipEntrySettings,cG=iG.setTooltipSettingsState,lG=iG.setActiveMouseOverItemIndex,uG=iG.mouseLeaveItem,dG=iG.mouseLeaveChart,fG=iG.setActiveClickItemIndex,pG=iG.setMouseOverAxisIndex,mG=iG.setMouseClickAxisIndex,hG=iG.setSyncInteraction,gG=iG.setKeyboardInteraction,_G=rG.reducer;function vG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yG(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?vG(Object(n),!0).forEach(function(t){bG(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vG(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function bG(e,t,n){return(t=xG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xG(e){var t=SG(e,`string`);return typeof t==`symbol`?t:t+``}function SG(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function CG(e,t,n){return t===`axis`?n===`click`?e.axisInteraction.click:e.axisInteraction.hover:n===`click`?e.itemInteraction.click:e.itemInteraction.hover}function wG(e){return e.index!=null}var TG=(e,t,n,r)=>{if(t==null)return nG;var i=CG(e,t,n);if(i==null)return nG;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var a=e.settings.active===!0;if(wG(i)){if(a)return yG(yG({},i),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return yG(yG({},nG),{},{coordinate:i.coordinate})};function EG(e){if(typeof e==`number`)return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}function DG(e,t){var n=EG(e),r=t[0],i=t[1];return n===void 0?!1:n>=Math.min(r,i)&&n<=Math.max(r,i)}function OG(e,t,n){if(n==null||t==null)return!0;var r=zO(e,t);return r==null||!zF(n)?!0:DG(r,n)}var kG=(e,t,n,r)=>{var i=e?.index;if(i==null)return null;var a=Number(i);if(!MO(a))return i;var o=0,s=1/0;t.length>0&&(s=t.length-1);var c=Math.max(o,Math.min(a,s)),l=t[c];return l==null||OG(l,n,r)?String(c):null},AG=(e,t,n,r,i,a,o)=>{if(a!=null){var s=o[0]?.getPosition(a);if(s!=null)return s;var c=i?.[Number(a)];if(c)switch(n){case`horizontal`:return{x:c.coordinate,y:(r.top+t)/2};default:return{x:(r.left+e)/2,y:c.coordinate}}}},jG=(e,t,n,r)=>{if(t===`axis`)return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i=n===`hover`?e.itemInteraction.hover.graphicalItemId:e.itemInteraction.click.graphicalItemId;if(e.syncInteraction.active&&i==null)return e.tooltipItemPayloads;if(i==null&&(r!=null||e.keyboardInteraction.active)){var a=e.tooltipItemPayloads[0];return a==null?[]:[a]}return e.tooltipItemPayloads.filter(e=>e.settings?.graphicalItemId===i)},MG=e=>e.options.tooltipPayloadSearcher,NG=e=>e.tooltip;function PG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function FG(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?PG(Object(n),!0).forEach(function(t){IG(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PG(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function IG(e,t,n){return(t=LG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LG(e){var t=RG(e,`string`);return typeof t==`symbol`?t:t+``}function RG(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function zG(e){if(typeof e==`string`||typeof e==`number`)return e}function BG(e){if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return e}function VG(e){if(typeof e==`string`||typeof e==`number`)return e;if(typeof e==`function`)return t=>e(t)}function HG(e){if(typeof e==`string`)return e}function UG(e){if(!(typeof e!=`object`||!e))return{name:`name`in e?zG(e.name):void 0,unit:`unit`in e?BG(e.unit):void 0,dataKey:`dataKey`in e?VG(e.dataKey):void 0,payload:`payload`in e?e.payload:void 0,color:`color`in e?HG(e.color):void 0,fill:`fill`in e?HG(e.fill):void 0}}function WG(e,t){return e??t}var GG=(e,t,n,r,i,a,o)=>{if(!(t==null||a==null)){var s=n.chartData,c=n.computedData,l=n.dataStartIndex,u=n.dataEndIndex;return e.reduce((e,n)=>{var d=n.dataDefinedOnItem,f=n.settings,p=WG(d,s),m=Array.isArray(p)?jO(p,l,u):p,h=f?.dataKey??r,g=f?.nameKey,_=r&&Array.isArray(m)&&!Array.isArray(m[0])&&o===`axis`?wC(m,r,i):a(m,t,c,g);return Array.isArray(_)?_.forEach(t=>{var n=UG(t),r=n?.name,i=n?.dataKey,a=n?.payload,o=FG(FG({},f),{},{name:r,unit:n?.unit,color:n?.color??f?.color,fill:n?.fill??f?.fill});e.push(rk({tooltipEntrySettings:o,dataKey:i,payload:a,value:zO(a,i),name:r==null?void 0:String(r)}))}):e.push(rk({tooltipEntrySettings:f,dataKey:h,payload:_,value:zO(_,h),name:zO(_,g)??f?.name})),e},[])}},KG=$([CU,$H,dI],EH),qG=$([$([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),CU,$([qI,JI],eU)],rU,{memoizeOptions:{resultEqualityCheck:GI}}),JG=$([qG],e=>e.filter(UI)),YG=$([qG],cU,{memoizeOptions:{resultEqualityCheck:GI}}),XG=$([qG],e=>e.some(e=>!e.data)),ZG=$([YG,EF],dU),QG=$([JG,EF,CU],HI),$G=$([ZG,CU,qG,EF,XG,YG],mU),eK=$([CU],AU),tK=$([eK,$([CU],e=>e.allowDataOverflow)],VF),nK=$([$([QG,$([qG],e=>e.filter(UI)),lI,uI],EU),EF,qI,tK],OU),rK=$([ZG,CU,$([qG],oU),PU,qI,MF],LU,{memoizeOptions:{resultEqualityCheck:WI}}),iK=$([$([VU,qI,JI],HU),qI],JU),aK=$([$([WU,qI,JI],HU),qI],XU),oK=$([CU,_A,ZG,$G,lI,qI,$([CU,eK,tK,nK,rK,$([iK,$([$([KU,qI,JI],HU),qI],eW),aK],IU),_A,qI],nW)],aW),sK=$([CU,oK,$([oK,CU,KG],cW),qI],uW),cK=e=>yW(e,qI(e),JI(e),!1),lK=$([CU,cK],yI),uK=$([$([CU,KG,sK,lK],CH)],YI),dK=$([_A,CU,KG,uK,cK,$([_A,$G,CU,qI],BW),$([_A,$G,CU,qI],SW),qI],(e,t,n,r,i,a,o,s)=>{if(t){var c=t.type,l=VO(e,s);if(r){var u=n===`scaleBand`&&r.bandwidth?r.bandwidth()/2:2,d=c===`category`&&r.bandwidth?r.bandwidth()/u:0;return d=s===`angleAxis`&&i!=null&&i?.length>=2?hC(i[0]-i[1])*2*d:d,l&&o?o.map((e,t)=>{var n=r.map(e);return MO(n)?{coordinate:n+d,value:e,index:t,offset:d}:null}).filter(DC):r.domain().map((e,t)=>{var n=r.map(e);return MO(n)?{coordinate:n+d,value:a?a[e]:e,index:t,offset:d}:null}).filter(DC)}}}),fK=$([YW,XW,tG],(e,t,n)=>ZW(n.shared,e,t)),pK=e=>e.tooltip.settings.trigger,mK=e=>e.tooltip.settings.defaultIndex,hK=$([NG,fK,pK,mK],TG),gK=$([hK,ZG,wU,oK],kG),_K=$([dK,gK],eG),vK=$([hK],e=>{if(e)return e.dataKey}),yK=$([hK],e=>{if(e)return e.graphicalItemId}),bK=$([NG,fK,pK,mK],jG),xK=$([hK,$([sk,ck,_A,Tk,dK,mK,bK],AG)],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),SK=$([hK],e=>e?.active??!1),CK=$([$([bK,gK,EF,wU,_K,MG,fK],GG)],e=>{if(e!=null){var t=e.map(e=>e.payload).filter(e=>e!=null);return Array.from(new Set(t))}});function wK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function TK(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?wK(Object(n),!0).forEach(function(t){EK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function EK(e,t,n){return(t=DK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DK(e){var t=OK(e,`string`);return typeof t==`symbol`?t:t+``}function OK(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var kK=()=>Q(CU),AK=()=>{var e=kK(),t=Q(dK),n=Q(uK);return nk(!e||!n?void 0:TK(TK({},e),{},{scale:n}),t)};function jK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function MK(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?jK(Object(n),!0).forEach(function(t){NK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function NK(e,t,n){return(t=PK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PK(e){var t=FK(e,`string`);return typeof t==`symbol`?t:t+``}function FK(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var IK=(e,t,n,r)=>{var i=t.find(e=>e&&e.index===n);if(i){if(e===`horizontal`)return{x:i.coordinate,y:r.relativeY};if(e===`vertical`)return{x:r.relativeX,y:i.coordinate}}return{x:0,y:0}},LK=(e,t,n,r)=>{var i=t.find(e=>e&&e.index===n);if(i){if(e===`centric`){var a=i.coordinate,o=r.radius;return MK(MK(MK({},r),$P(r.cx,r.cy,o,a)),{},{angle:a,radius:o})}var s=i.coordinate,c=r.angle;return MK(MK(MK({},r),$P(r.cx,r.cy,s,c)),{},{angle:c,radius:s})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function RK(e,t){var n=e.relativeX,r=e.relativeY;return n>=t.left&&n<=t.left+t.width&&r>=t.top&&r<=t.top+t.height}var zK=(e,t,n,r,i)=>{var a=t?.length??0;if(a<=1||e==null)return 0;if(r===`angleAxis`&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var o=0;o<a;o++){var s=o>0?n[o-1]?.coordinate:n[a-1]?.coordinate,c=n[o]?.coordinate,l=o>=a-1?n[0]?.coordinate:n[o+1]?.coordinate,u=void 0;if(!(s==null||c==null||l==null))if(hC(c-s)!==hC(l-c)){var d=[];if(hC(l-c)===hC(i[1]-i[0])){u=l;var f=c+i[1]-i[0];d[0]=Math.min(f,(f+s)/2),d[1]=Math.max(f,(f+s)/2)}else{u=s;var p=l+i[1]-i[0];d[0]=Math.min(c,(p+c)/2),d[1]=Math.max(c,(p+c)/2)}var m=[Math.min(c,(u+c)/2),Math.max(c,(u+c)/2)];if(e>m[0]&&e<=m[1]||e>=d[0]&&e<=d[1])return n[o]?.index}else{var h=Math.min(s,l),g=Math.max(s,l);if(e>(h+c)/2&&e<=(g+c)/2)return n[o]?.index}}else if(t)for(var _=0;_<a;_++){var v=t[_];if(v!=null){var y=t[_+1],b=t[_-1];if(_===0&&y!=null&&e<=(v.coordinate+y.coordinate)/2||_===a-1&&b!=null&&e>(v.coordinate+b.coordinate)/2||_>0&&_<a-1&&b!=null&&y!=null&&e>(v.coordinate+b.coordinate)/2&&e<=(v.coordinate+y.coordinate)/2)return v.index}}return-1},BK=()=>Q(dI),VK=(e,t)=>t,HK=(e,t,n)=>n,UK=(e,t,n,r)=>r,WK=$(dK,e=>TT(e,e=>e.coordinate)),GK=$([NG,VK,HK,UK],TG),KK=$([GK,ZG,wU,oK],kG),qK=(e,t,n)=>{if(t!=null){var r=NG(e);return t===`axis`?n===`hover`?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n===`hover`?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},JK=$([NG,VK,HK,UK],jG),YK=$([sk,ck,_A,Tk,dK,UK,JK],AG),XK=$([GK,YK],(e,t)=>e.coordinate??t),ZK=$([dK,KK],eG),QK=$([JK,KK,EF,wU,ZK,MG,VK],GG),$K=$([GK,KK],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),eq=(e,t,n,r,i,a,o)=>{if(!(!e||!n||!r||!i)&&RK(e,o)){var s=zK(ak(e,t),a,i,n,r),c=IK(t,i,s,e);return{activeIndex:String(s),activeCoordinate:c}}},tq=(e,t,n,r,i,a,o)=>{if(!(!e||!r||!i||!a||!n)){var s=aF(e,n);if(s){var c=zK(ok(s,t),o,a,r,i),l=LK(t,a,c,s);return{activeIndex:String(c),activeCoordinate:l}}}},nq=(e,t,n,r,i,a,o,s)=>{if(!(!e||!t||!r||!i||!a))return t===`horizontal`||t===`vertical`?eq(e,t,r,i,a,o,s):tq(e,t,n,r,i,a,o)},rq=$(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(t!=null){var r=e[t];if(r!=null)return n?r.panoramaElement:r.element}}),iq=$(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(e=>parseInt(e,10)).concat(Object.values(gI));return Array.from(new Set(t)).sort((e,t)=>e-t)},{memoizeOptions:{resultEqualityCheck:KI}});function aq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oq(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?aq(Object(n),!0).forEach(function(t){sq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function sq(e,t,n){return(t=cq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cq(e){var t=lq(e,`string`);return typeof t==`symbol`?t:t+``}function lq(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var uq={zIndexMap:Object.values(gI).reduce((e,t)=>oq(oq({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),{})},dq=new Set(Object.values(gI));function fq(e){return dq.has(e)}var pq=ID({name:`zIndex`,initialState:uq,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var n=t.payload.zIndex;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:xD()},unregisterZIndexPortal:{reducer:(e,t)=>{var n=t.payload.zIndex;e.zIndexMap[n]&&(--e.zIndexMap[n].consumers,e.zIndexMap[n].consumers<=0&&!fq(n)&&delete e.zIndexMap[n])},prepare:xD()},registerZIndexPortalElement:{reducer:(e,t)=>{var n=t.payload,r=n.zIndex,i=n.element,a=n.isPanorama;e.zIndexMap[r]?a?e.zIndexMap[r].panoramaElement=Uj(i):e.zIndexMap[r].element=Uj(i):e.zIndexMap[r]={consumers:0,element:a?void 0:Uj(i),panoramaElement:a?Uj(i):void 0}},prepare:xD()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var n=t.payload.zIndex;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:xD()}}}),mq=pq.actions,hq=mq.registerZIndexPortal,gq=mq.unregisterZIndexPortal,_q=mq.registerZIndexPortalElement,vq=mq.unregisterZIndexPortalElement,yq=pq.reducer;function bq(e){var t=e.zIndex,n=e.children,r=SA()&&t!==void 0&&t!==0,i=kk(),a=(0,v.useRef)(void 0),o=(0,v.useRef)(new Set),s=$w(),c=Q(e=>rq(e,t,i));if((0,v.useLayoutEffect)(()=>{if(!r){var e=o.current;e.forEach(e=>{s(gq({zIndex:e}))}),e.clear(),a.current=void 0;return}if(o.current.has(t)||(s(hq({zIndex:t})),o.current.add(t)),c){a.current=c;var n=o.current;n.forEach(e=>{e!==t&&(s(gq({zIndex:e})),n.delete(e))})}},[s,t,r,c]),(0,v.useLayoutEffect)(()=>{var e=o.current;return()=>{e.forEach(e=>{s(gq({zIndex:e}))}),e.clear()}},[s]),!r)return n;var l=c??a.current;return l?(0,Dl.createPortal)(n,l):null}function xq(){return xq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xq.apply(null,arguments)}function Sq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Cq(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Sq(Object(n),!0).forEach(function(t){wq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function wq(e,t,n){return(t=Tq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tq(e){var t=Eq(e,`string`);return typeof t==`symbol`?t:t+``}function Eq(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Dq(e){var t=e.cursor,n=e.cursorComp,r=e.cursorProps;return(0,v.isValidElement)(t)?(0,v.cloneElement)(t,r):(0,v.createElement)(n,r)}function Oq(e){var t=e.coordinate,n=e.payload,r=e.index,i=e.offset,a=e.tooltipAxisBandSize,o=e.layout,s=e.cursor,c=e.tooltipEventType,l=e.chartName,u=t,d=n,f=r;if(!s||!u||l!==`ScatterChart`&&c!==`axis`)return null;var p,m,h;if(l===`ScatterChart`)p=u,m=jN,h=gI.cursorLine;else if(l===`BarChart`)p=MN(o,u,i,a),m=WP,h=gI.cursorRectangle;else if(o===`radial`&&kC(u)){var g=oF(u),_=g.cx,y=g.cy,b=g.radius;p={cx:_,cy:y,startAngle:g.startAngle,endAngle:g.endAngle,innerRadius:b,outerRadius:b},m=xF,h=gI.cursorLine}else p={points:SF(o,u,i)},m=bN,h=gI.cursorLine;var x=typeof s==`object`&&`className`in s?s.className:void 0,S=Cq(Cq(Cq(Cq({stroke:`#ccc`,pointerEvents:`none`},i),p),Gx(s)),{},{payload:d,payloadIndex:f,className:dv(`recharts-tooltip-cursor`,x)});return v.createElement(bq,{zIndex:e.zIndex??h},v.createElement(Dq,{cursor:s,cursorComp:m,cursorProps:S}))}function kq(e){var t=AK(),n=mA(),r=vA(),i=BK();return t==null||n==null||r==null||i==null?null:v.createElement(Oq,xq({},e,{offset:n,layout:r,tooltipAxisBandSize:t,chartName:i}))}var Aq=(0,v.createContext)(null),jq=()=>(0,v.useContext)(Aq),Mq=l(o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},c.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var c=this._events[s],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(d=1,u=Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,p;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(p=1,u=Array(l-1);p<l;p++)u[p-1]=arguments[p];c[d].fn.apply(c[d].context,u)}}return!0},c.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn===t&&(!i||o.once)&&(!n||o.context===n)&&s(this,a);else{for(var c=0,l=[],u=o.length;c<u;c++)(o[c].fn!==t||i&&!o[c].once||n&&o[c].context!==n)&&l.push(o[c]);l.length?this._events[a]=l.length===1?l[0]:l:s(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,t!==void 0&&(t.exports=c)}))(),1).default,Nq=new Mq,Pq=`recharts.syncEvent.tooltip`,Fq=`recharts.syncEvent.brush`,Iq=(e,t)=>{if(t&&Array.isArray(e)){var n=Number.parseInt(t,10);if(!gC(n))return e[n]}},Lq=ID({name:`options`,initialState:{chartName:``,tooltipPayloadSearcher:()=>void 0,eventEmitter:void 0,defaultTooltipEventType:`axis`},reducers:{createEventEmitter:e=>{e.eventEmitter??=Symbol(`rechartsEventEmitter`)}}}),Rq=Lq.reducer,zq=Lq.actions.createEventEmitter;function Bq(e){return e.tooltip.syncInteraction}var Vq=ID({name:`chartData`,initialState:{chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},reducers:{setChartData(e,t){if(e.chartData=Uj(t.payload),t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var n=t.payload,r=n.startIndex,i=n.endIndex;r!=null&&(e.dataStartIndex=r),i!=null&&(e.dataEndIndex=i)}}}),Hq=Vq.actions,Uq=Hq.setChartData,Wq=Hq.setDataStartEndIndexes;Hq.setComputedData;var Gq=Vq.reducer,Kq=[`x`,`y`];function qq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Jq(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?qq(Object(n),!0).forEach(function(t){Yq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Yq(e,t,n){return(t=Xq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xq(e){var t=Zq(e,`string`);return typeof t==`symbol`?t:t+``}function Zq(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Qq(e,t){if(e==null)return{};var n,r,i=$q(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function $q(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function eJ(){var e=Q(fI),t=Q(mI),n=$w(),r=Q(pI),i=Q(dK),a=vA(),o=fA();(0,v.useEffect)(()=>{if(e==null)return OC;var s=(s,c,l)=>{if(t!==l&&e===s){if(c.payload.active===!1){n(hG({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(r===`index`){var u;if(o&&c!=null&&(u=c.payload)!=null&&u.coordinate&&c.payload.sourceViewBox){var d=c.payload.coordinate,f=d.x,p=d.y,m=Qq(d,Kq),h=c.payload.sourceViewBox,g=h.x,_=h.y,v=h.width,y=h.height,b=Jq(Jq({},m),{},{x:o.x+(v?(f-g)/v:0)*o.width,y:o.y+(y?(p-_)/y:0)*o.height});n(Jq(Jq({},c),{},{payload:Jq(Jq({},c.payload),{},{coordinate:b})}))}else n(c);return}if(i!=null){var x;typeof r==`function`?x=i[r(i,{activeTooltipIndex:c.payload.index==null?void 0:Number(c.payload.index),isTooltipActive:c.payload.active,activeIndex:c.payload.index==null?void 0:Number(c.payload.index),activeLabel:c.payload.label,activeDataKey:c.payload.dataKey,activeCoordinate:c.payload.coordinate})]:r===`value`&&(x=i.find(e=>String(e.value)===c.payload.label));var S=c.payload.coordinate;if(S==null||o==null){n(hG({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(x==null){n(hG({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:c.payload.sourceViewBox,graphicalItemId:void 0}));return}var C=S.x,w=S.y,T=Math.min(C,o.x+o.width),E=Math.min(w,o.y+o.height),D={x:a===`horizontal`?x.coordinate:T,y:a===`horizontal`?E:x.coordinate};n(hG({active:c.payload.active,coordinate:D,dataKey:c.payload.dataKey,index:String(x.index),label:c.payload.label,sourceViewBox:c.payload.sourceViewBox,graphicalItemId:c.payload.graphicalItemId}))}}};return Nq.on(Pq,s),()=>{Nq.off(Pq,s)}},[Q(e=>e.rootProps.className),n,t,e,r,i,a,o])}function tJ(){var e=Q(fI),t=Q(mI),n=$w();(0,v.useEffect)(()=>{if(e==null)return OC;var r=(r,i,a)=>{t!==a&&e===r&&n(Wq(i))};return Nq.on(Fq,r),()=>{Nq.off(Fq,r)}},[n,t,e])}function nJ(){var e=$w();(0,v.useEffect)(()=>{e(zq())},[e]),eJ(),tJ()}function rJ(e,t,n,r,i,a){var o=Q(n=>qK(n,e,t)),s=Q(yK),c=Q(mI),l=Q(fI),u=Q(pI),d=Q(Bq)?.sourceViewBox!=null,f=fA();(0,v.useEffect)(()=>{if(!d&&l!=null&&c!=null){var e=hG({active:a,coordinate:n,dataKey:o,index:i,label:typeof r==`number`?String(r):r,sourceViewBox:f,graphicalItemId:s});Nq.emit(Pq,l,e,c)}},[d,n,o,s,i,r,c,l,u,a,f])}function iJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function aJ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?iJ(Object(n),!0).forEach(function(t){oJ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iJ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function oJ(e,t,n){return(t=sJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sJ(e){var t=cJ(e,`string`);return typeof t==`symbol`?t:t+``}function cJ(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function lJ(e,t){return mJ(e)||pJ(e,t)||dJ(e,t)||uJ()}function uJ(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
121
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dJ(e,t){if(e){if(typeof e==`string`)return fJ(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fJ(e,t):void 0}}function fJ(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function pJ(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function mJ(e){if(Array.isArray(e))return e}function hJ(e){return e.dataKey}function gJ(e,t){return v.isValidElement(e)?v.cloneElement(e,t):typeof e==`function`?v.createElement(e,t):v.createElement(AM,t)}var _J=[],vJ={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:`ease`,axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:`auto`,itemSorter:`name`,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:` : `,trigger:`hover`,useTranslate3d:!1,wrapperStyle:{}};function yJ(e){var t=RC(e,vJ),n=t.active,r=t.allowEscapeViewBox,i=t.animationDuration,a=t.animationEasing,o=t.content,s=t.filterNull,c=t.isAnimationActive,l=t.offset,u=t.payloadUniqBy,d=t.position,f=t.reverseDirection,p=t.useTranslate3d,m=t.wrapperStyle,h=t.cursor,g=t.shared,_=t.trigger,y=t.defaultIndex,b=t.portal,x=t.axisId,S=$w(),C=typeof y==`number`?String(y):y;(0,v.useEffect)(()=>{S(cG({shared:g,trigger:_,axisId:x,active:n,defaultIndex:C}))},[S,g,_,x,n,C]);var w=fA(),T=aN(),E=$W(g),D=Q(e=>$K(e,E,_,C))??{},O=D.activeIndex,k=D.isActive,A=Q(e=>QK(e,E,_,C)),j=Q(e=>ZK(e,E,_,C)),M=Q(e=>XK(e,E,_,C)),N=A,P=jq(),F=n??k??!1,I=lJ(jT([N,F]),2),L=I[0],R=I[1],ee=E===`axis`?j:void 0;rJ(E,_,M,ee,O,F);var te=b??P;if(te==null||w==null||E==null)return null;var z=N??_J;F||(z=_J),s&&z.length&&(z=Gw(z.filter(e=>e.value!=null&&(e.hide!==!0||t.includeHidden)),u,hJ));var B=z.length>0,V=aJ(aJ({},t),{},{payload:z,label:ee,active:F,activeIndex:O,coordinate:M,accessibilityLayer:T}),ne=v.createElement(iN,{allowEscapeViewBox:r,animationDuration:i,animationEasing:a,isAnimationActive:c,active:F,coordinate:M,hasPayload:B,offset:l,position:d,reverseDirection:f,useTranslate3d:p,viewBox:w,wrapperStyle:m,lastBoundingBox:L,innerRef:R,hasPortalFromProps:!!b},gJ(o,V));return v.createElement(v.Fragment,null,(0,Dl.createPortal)(ne,te),F&&v.createElement(kq,{cursor:h,tooltipEventType:E,coordinate:M,payload:z,index:O}))}var bJ=e=>null;bJ.displayName=`Cell`;function xJ(e,t,n){return(t=SJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SJ(e){var t=CJ(e,`string`);return typeof t==`symbol`?t:t+``}function CJ(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var wJ=class{constructor(e){xJ(this,`cache`,new Map),this.maxSize=e}get(e){var t=this.cache.get(e);return t!==void 0&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;n!=null&&this.cache.delete(n)}this.cache.set(e,t)}clear(){this.cache.clear()}size(){return this.cache.size}};function TJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function EJ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?TJ(Object(n),!0).forEach(function(t){DJ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TJ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function DJ(e,t,n){return(t=OJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OJ(e){var t=kJ(e,`string`);return typeof t==`symbol`?t:t+``}function kJ(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var AJ=EJ({},{cacheSize:2e3,enableCache:!0}),jJ=new wJ(AJ.cacheSize),MJ={position:`absolute`,top:`-20000px`,left:0,padding:0,margin:0,border:`none`,whiteSpace:`pre`},NJ=`recharts_measurement_span`;function PJ(e,t){return`${e}|${t.fontSize||``}|${t.fontFamily||``}|${t.fontWeight||``}|${t.fontStyle||``}|${t.letterSpacing||``}|${t.textTransform||``}`}var FJ=(e,t)=>{try{var n=document.getElementById(NJ);n||(n=document.createElement(`span`),n.setAttribute(`id`,NJ),n.setAttribute(`aria-hidden`,`true`),document.body.appendChild(n)),Object.assign(n.style,MJ,t),n.textContent=`${e}`;var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch{return{width:0,height:0}}},IJ=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(e==null||LM.isSsr)return{width:0,height:0};if(!AJ.enableCache)return FJ(e,t);var n=PJ(e,t),r=jJ.get(n);if(r)return r;var i=FJ(e,t);return jJ.set(n,i),i},LJ;function RJ(e,t){return UJ(e)||HJ(e,t)||BJ(e,t)||zJ()}function zJ(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
122
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BJ(e,t){if(e){if(typeof e==`string`)return VJ(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?VJ(e,t):void 0}}function VJ(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function HJ(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function UJ(e){if(Array.isArray(e))return e}function WJ(e,t,n){return(t=GJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GJ(e){var t=KJ(e,`string`);return typeof t==`symbol`?t:t+``}function KJ(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var qJ=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,JJ=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,YJ=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,XJ=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,ZJ={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},QJ=[`cm`,`mm`,`pt`,`pc`,`in`,`Q`,`px`];function $J(e){return QJ.includes(e)}var eY=`NaN`;function tY(e,t){return e*ZJ[t]}var nY=class e{static parse(t){var n=RJ(XJ.exec(t)??[],3),r=n[1],i=n[2];return r==null?e.NaN:new e(parseFloat(r),i??``)}constructor(e,t){this.num=e,this.unit=t,this.num=e,this.unit=t,gC(e)&&(this.unit=``),t!==``&&!YJ.test(t)&&(this.num=NaN,this.unit=``),$J(t)&&(this.num=tY(e,t),this.unit=`px`)}add(t){return this.unit===t.unit?new e(this.num+t.num,this.unit):new e(NaN,``)}subtract(t){return this.unit===t.unit?new e(this.num-t.num,this.unit):new e(NaN,``)}multiply(t){return this.unit!==``&&t.unit!==``&&this.unit!==t.unit?new e(NaN,``):new e(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==``&&t.unit!==``&&this.unit!==t.unit?new e(NaN,``):new e(this.num/t.num,this.unit||t.unit)}toString(){return`${this.num}${this.unit}`}isNaN(){return gC(this.num)}};LJ=nY,WJ(nY,`NaN`,new LJ(NaN,``));function rY(e){if(e==null||e.includes(eY))return eY;for(var t=e;t.includes(`*`)||t.includes(`/`);){var n=RJ(qJ.exec(t)??[],4),r=n[1],i=n[2],a=n[3],o=nY.parse(r??``),s=nY.parse(a??``),c=i===`*`?o.multiply(s):o.divide(s);if(c.isNaN())return eY;t=t.replace(qJ,c.toString())}for(;t.includes(`+`)||/.-\d+(?:\.\d+)?/.test(t);){var l=RJ(JJ.exec(t)??[],4),u=l[1],d=l[2],f=l[3],p=nY.parse(u??``),m=nY.parse(f??``),h=d===`+`?p.add(m):p.subtract(m);if(h.isNaN())return eY;t=t.replace(JJ,h.toString())}return t}var iY=/\(([^()]*)\)/;function aY(e){for(var t=e,n;(n=iY.exec(t))!=null;){var r=RJ(n,2)[1];t=t.replace(iY,rY(r))}return t}function oY(e){var t=e.replace(/\s+/g,``);return t=aY(t),t=rY(t),t}function sY(e){try{return oY(e)}catch{return eY}}function cY(e){var t=sY(e.slice(5,-1));return t===eY?``:t}var lY=[`x`,`y`,`lineHeight`,`capHeight`,`fill`,`scaleToFit`,`textAnchor`,`verticalAnchor`],uY=[`dx`,`dy`,`angle`,`className`,`breakAll`];function dY(){return dY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dY.apply(null,arguments)}function fY(e,t){if(e==null)return{};var n,r,i=pY(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function pY(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function mY(e,t){return yY(e)||vY(e,t)||gY(e,t)||hY()}function hY(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
123
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gY(e,t){if(e){if(typeof e==`string`)return _Y(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_Y(e,t):void 0}}function _Y(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function vY(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function yY(e){if(Array.isArray(e))return e}var bY=/[ \f\n\r\t\v\u2028\u2029]+/,xY=e=>{var t=e.children,n=e.breakAll,r=e.style;try{var i=[];return TC(t)||(i=n?t.toString().split(``):t.toString().split(bY)),{wordsWithComputedWidth:i.map(e=>({word:e,width:IJ(e,r).width})),spaceWidth:n?0:IJ(`\xA0`,r).width}}catch{return null}};function SY(e){return e===`start`||e===`middle`||e===`end`||e===`inherit`}function CY(e){return TC(e)||typeof e==`string`||typeof e==`number`||typeof e==`boolean`}var wY=(e,t,n,r)=>e.reduce((e,i)=>{var a=i.word,o=i.width,s=e[e.length-1];if(s&&o!=null&&(t==null||r||s.width+o+n<Number(t)))s.words.push(a),s.width+=o+n;else{var c={words:[a],width:o};e.push(c)}return e},[]),TY=e=>e.reduce((e,t)=>e.width>t.width?e:t),EY=`…`,DY=(e,t,n,r,i,a,o,s)=>{var c=xY({breakAll:n,style:r,children:e.slice(0,t)+EY});if(!c)return[!1,[]];var l=wY(c.wordsWithComputedWidth,a,o,s);return[l.length>i||TY(l).width>Number(a),l]},OY=(e,t,n,r,i)=>{var a=e.maxLines,o=e.children,s=e.style,c=e.breakAll,l=Z(a),u=String(o),d=wY(t,r,n,i);if(!l||i||!(d.length>a||TY(d).width>Number(r)))return d;for(var f=0,p=u.length-1,m=0,h;f<=p&&m<=u.length-1;){var g=Math.floor((f+p)/2),_=mY(DY(u,g-1,c,s,a,r,n,i),2),v=_[0],y=_[1],b=mY(DY(u,g,c,s,a,r,n,i),1)[0];if(!v&&!b&&(f=g+1),v&&b&&(p=g-1),!v&&b){h=y;break}m++}return h||d},kY=e=>[{words:TC(e)?[]:e.toString().split(bY),width:void 0}],AY=e=>{var t=e.width,n=e.scaleToFit,r=e.children,i=e.style,a=e.breakAll,o=e.maxLines;if((t||n)&&!LM.isSsr){var s,c,l=xY({breakAll:a,children:r,style:i});if(l){var u=l.wordsWithComputedWidth,d=l.spaceWidth;s=u,c=d}else return kY(r);return OY({breakAll:a,children:r,maxLines:o,style:i},s,c,t,!!n)}return kY(r)},jY=`#808080`,MY={angle:0,breakAll:!1,capHeight:`0.71em`,fill:jY,lineHeight:`1em`,scaleToFit:!1,textAnchor:`start`,verticalAnchor:`end`,x:0,y:0},NY=(0,v.forwardRef)((e,t)=>{var n=RC(e,MY),r=n.x,i=n.y,a=n.lineHeight,o=n.capHeight,s=n.fill,c=n.scaleToFit,l=n.textAnchor,u=n.verticalAnchor,d=fY(n,lY),f=(0,v.useMemo)(()=>AY({breakAll:d.breakAll,children:d.children,maxLines:d.maxLines,scaleToFit:c,style:d.style,width:d.width}),[d.breakAll,d.children,d.maxLines,c,d.style,d.width]),p=d.dx,m=d.dy,h=d.angle,g=d.className,_=d.breakAll,y=fY(d,uY);if(!vC(r)||!vC(i)||f.length===0)return null;var b=Number(r)+(Z(p)?p:0),x=Number(i)+(Z(m)?m:0);if(!MO(b)||!MO(x))return null;var S;switch(u){case`start`:S=cY(`calc(${o})`);break;case`middle`:S=cY(`calc(${(f.length-1)/2} * -${a} + (${o} / 2))`);break;default:S=cY(`calc(${f.length-1} * -${a})`);break}var C=[],w=f[0];if(c&&w!=null){var T=w.width,E=d.width;C.push(`scale(${Z(E)&&Z(T)?E/T:1})`)}return h&&C.push(`rotate(${h}, ${b}, ${x})`),C.length&&(y.transform=C.join(` `)),v.createElement(`text`,dY({},Kx(y),{ref:t,x:b,y:x,className:dv(`recharts-text`,g),textAnchor:l,fill:s.includes(`url`)?jY:s}),f.map((e,t)=>{var n=e.words.join(_?``:` `);return v.createElement(`tspan`,{x:b,dy:t===0?S:a,key:`${n}-${t}`},n)}))});NY.displayName=`Text`;function PY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function FY(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?PY(Object(n),!0).forEach(function(t){IY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function IY(e,t,n){return(t=LY(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LY(e){var t=RY(e,`string`);return typeof t==`symbol`?t:t+``}function RY(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var zY=e=>{var t=e.viewBox,n=e.position,r=e.offset,i=r===void 0?0:r,a=e.parentViewBox,o=e.clamp,s=dA(t),c=s.x,l=s.y,u=s.height,d=s.upperWidth,f=s.lowerWidth,p=c,m=c+(d-f)/2,h=(p+m)/2,g=(d+f)/2,_=p+d/2,v=u>=0?1:-1,y=v*i,b=v>0?`end`:`start`,x=v>0?`start`:`end`,S=d>=0?1:-1,C=S*i,w=S>0?`end`:`start`,T=S>0?`start`:`end`,E=a;if(n===`top`){var D={x:p+d/2,y:l-y,horizontalAnchor:`middle`,verticalAnchor:b};return o&&E&&(D.height=Math.max(l-E.y,0),D.width=d),D}if(n===`bottom`){var O={x:m+f/2,y:l+u+y,horizontalAnchor:`middle`,verticalAnchor:x};return o&&E&&(O.height=Math.max(E.y+E.height-(l+u),0),O.width=f),O}if(n===`left`){var k={x:h-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`};return o&&E&&(k.width=Math.max(k.x-E.x,0),k.height=u),k}if(n===`right`){var A={x:h+g+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`};return o&&E&&(A.width=Math.max(E.x+E.width-A.x,0),A.height=u),A}var j=o&&E?{width:g,height:u}:{};return n===`insideLeft`?FY({x:h+C,y:l+u/2,horizontalAnchor:T,verticalAnchor:`middle`},j):n===`insideRight`?FY({x:h+g-C,y:l+u/2,horizontalAnchor:w,verticalAnchor:`middle`},j):n===`insideTop`?FY({x:p+d/2,y:l+y,horizontalAnchor:`middle`,verticalAnchor:x},j):n===`insideBottom`?FY({x:m+f/2,y:l+u-y,horizontalAnchor:`middle`,verticalAnchor:b},j):n===`insideTopLeft`?FY({x:p+C,y:l+y,horizontalAnchor:T,verticalAnchor:x},j):n===`insideTopRight`?FY({x:p+d-C,y:l+y,horizontalAnchor:w,verticalAnchor:x},j):n===`insideBottomLeft`?FY({x:m+C,y:l+u-y,horizontalAnchor:T,verticalAnchor:b},j):n===`insideBottomRight`?FY({x:m+f-C,y:l+u-y,horizontalAnchor:w,verticalAnchor:b},j):n&&typeof n==`object`&&(Z(n.x)||_C(n.x))&&(Z(n.y)||_C(n.y))?FY({x:c+xC(n.x,g),y:l+xC(n.y,u),horizontalAnchor:`end`,verticalAnchor:`end`},j):FY({x:_,y:l+u/2,horizontalAnchor:`middle`,verticalAnchor:`middle`},j)},BY=[`labelRef`],VY=[`content`];function HY(e,t){if(e==null)return{};var n,r,i=UY(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function UY(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function WY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function GY(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?WY(Object(n),!0).forEach(function(t){KY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function KY(e,t,n){return(t=qY(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qY(e){var t=JY(e,`string`);return typeof t==`symbol`?t:t+``}function JY(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function YY(){return YY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},YY.apply(null,arguments)}var XY=(0,v.createContext)(null),ZY=e=>{var t=e.x,n=e.y,r=e.upperWidth,i=e.lowerWidth,a=e.width,o=e.height,s=e.children,c=(0,v.useMemo)(()=>({x:t,y:n,upperWidth:r,lowerWidth:i,width:a,height:o}),[t,n,r,i,a,o]);return v.createElement(XY.Provider,{value:c},s)},QY=()=>{var e=(0,v.useContext)(XY),t=fA();return e||(t?dA(t):void 0)},$Y=(0,v.createContext)(null),eX=()=>{var e=(0,v.useContext)($Y),t=Q(RI);return e||t},tX=e=>{var t=e.value,n=e.formatter,r=TC(e.children)?t:e.children;return typeof n==`function`?n(r):r},nX=e=>e!=null&&typeof e==`function`,rX=(e,t)=>hC(t-e)*Math.min(Math.abs(t-e),360),iX=(e,t,n,r,i)=>{var a=e.offset,o=e.className,s=i.cx,c=i.cy,l=i.innerRadius,u=i.outerRadius,d=i.startAngle,f=i.endAngle,p=i.clockWise,m=(l+u)/2,h=rX(d,f),g=h>=0?1:-1,_,y;switch(t){case`insideStart`:_=d+g*a,y=p;break;case`insideEnd`:_=f-g*a,y=!p;break;case`end`:_=f+g*a,y=p;break;default:throw Error(`Unsupported position ${t}`)}y=h<=0?y:!y;var b=$P(s,c,m,_),x=$P(s,c,m,_+(y?1:-1)*359),S=`M${b.x},${b.y}
124
124
  A${m},${m},0,1,${+!y},
125
- ${x.x},${x.y}`,C=TC(e.id)?bC(`recharts-radial-line-`):e.id;return v.createElement(`text`,XY({},r,{dominantBaseline:`central`,className:dv(`recharts-radial-bar-label`,o)}),v.createElement(`defs`,null,v.createElement(`path`,{id:C,d:S})),v.createElement(`textPath`,{xlinkHref:`#${C}`},n))},oX=(e,t,n)=>{var r=e.cx,i=e.cy,a=e.innerRadius,o=e.outerRadius,s=(e.startAngle+e.endAngle)/2;if(n===`outside`){var c=eF(r,i,o+t,s),l=c.x;return{x:l,y:c.y,textAnchor:l>=r?`start`:`end`,verticalAnchor:`middle`}}if(n===`center`)return{x:r,y:i,textAnchor:`middle`,verticalAnchor:`middle`};if(n===`centerTop`)return{x:r,y:i,textAnchor:`middle`,verticalAnchor:`start`};if(n===`centerBottom`)return{x:r,y:i,textAnchor:`middle`,verticalAnchor:`end`};var u=eF(r,i,(a+o)/2,s);return{x:u.x,y:u.y,textAnchor:`middle`,verticalAnchor:`middle`}},sX=e=>e!=null&&`cx`in e&&Z(e.cx),cX={angle:0,offset:5,zIndex:_I.label,position:`middle`,textBreakAll:!1};function lX(e){if(!sX(e))return e;var t=e.cx,n=e.cy,r=e.outerRadius,i=r*2;return{x:t-r,y:n-r,width:i,upperWidth:i,lowerWidth:i,height:i}}function uX(e){var t=RC(e,cX),n=t.viewBox,r=t.parentViewBox,i=t.position,a=t.value,o=t.children,s=t.content,c=t.className,l=c===void 0?``:c,u=t.textBreakAll,d=t.labelRef,f=tX(),p=$Y(),m=n==null?i===`center`?p:f??p:sX(n)?n:fA(n),h,g,_=lX(m);if(!m||TC(a)&&TC(o)&&!(0,v.isValidElement)(s)&&typeof s!=`function`)return null;var y=KY(KY({},t),{},{viewBox:m});if((0,v.isValidElement)(s))return y.labelRef,(0,v.cloneElement)(s,UY(y,VY));if(typeof s==`function`){if(y.content,h=(0,v.createElement)(s,UY(y,HY)),(0,v.isValidElement)(h))return h}else h=nX(t);var b=Kx(t);if(sX(m)){if(i===`insideStart`||i===`insideEnd`||i===`end`)return aX(t,i,h,b,m);g=oX(m,t.offset,t.position)}else{if(!_)return null;var x=BY({viewBox:_,position:i,offset:t.offset,parentViewBox:sX(r)?void 0:r,clamp:!0});g=KY(KY({x:x.x,y:x.y,textAnchor:x.horizontalAnchor,verticalAnchor:x.verticalAnchor},x.width===void 0?{}:{width:x.width}),x.height===void 0?{}:{height:x.height})}return v.createElement(xq,{zIndex:t.zIndex},v.createElement(PY,XY({ref:d,className:dv(`recharts-label`,l)},b,g,{textAnchor:CY(b.textAnchor)?b.textAnchor:g.textAnchor,breakAll:u}),h))}uX.displayName=`Label`;var dX=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?v.createElement(uX,XY({key:`label-implicit`},r)):vC(e)?v.createElement(uX,XY({key:`label-implicit`,value:e},r)):(0,v.isValidElement)(e)?e.type===uX?(0,v.cloneElement)(e,KY({key:`label-implicit`},r)):v.createElement(uX,XY({key:`label-implicit`,content:e},r)):rX(e)?v.createElement(uX,XY({key:`label-implicit`,content:e},r)):e&&typeof e==`object`?v.createElement(uX,XY({},e,{key:`label-implicit`},r)):null};function fX(e){var t=e.label,n=e.labelRef;return dX(t,$Y(),n)||null}var pX=[`valueAccessor`],mX=[`dataKey`,`clockWise`,`id`,`textBreakAll`,`zIndex`];function hX(){return hX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hX.apply(null,arguments)}function gX(e,t){if(e==null)return{};var n,r,i=_X(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _X(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var vX=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(wY(t))return t},yX=(0,v.createContext)(void 0),bX=yX.Provider,xX=(0,v.createContext)(void 0),SX=xX.Provider;function CX(){return(0,v.useContext)(yX)}function wX(){return(0,v.useContext)(xX)}function TX(e){var t=e.valueAccessor,n=t===void 0?vX:t,r=gX(e,pX),i=r.dataKey;r.clockWise;var a=r.id,o=r.textBreakAll,s=r.zIndex,c=gX(r,mX),l=CX(),u=wX(),d=l||u;return!d||!d.length?null:v.createElement(xq,{zIndex:s??_I.label},v.createElement(rS,{className:`recharts-label-list`},d.map((e,t)=>{var s=TC(i)?n(e,t):BO(e.payload,i),l=TC(a)?{}:{id:`${a}-${t}`};return v.createElement(uX,hX({key:`label-${t}`},Kx(e),c,l,{fill:r.fill??e.fill,parentViewBox:e.parentViewBox,value:s,textBreakAll:o,viewBox:e.viewBox,index:t,zIndex:0}))})))}TX.displayName=`LabelList`;function EX(e){var t=e.label;return t?t===!0?v.createElement(TX,{key:`labelList-implicit`}):v.isValidElement(t)||rX(t)?v.createElement(TX,{key:`labelList-implicit`,content:t}):typeof t==`object`?v.createElement(TX,hX({key:`labelList-implicit`},t,{type:String(t.type)})):null:null}var DX=[`points`,`className`,`baseLinePoints`,`connectNulls`],OX;function kX(){return kX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kX.apply(null,arguments)}function AX(e,t){if(e==null)return{};var n,r,i=jX(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function jX(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function MX(e,t){return t||=e.slice(0),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var NX=e=>e!=null&&e.x===+e.x&&e.y===+e.y,PX=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=[[]];e.forEach(e=>{var n=t[t.length-1];NX(e)?n&&n.push(e):n&&n.length>0&&t.push([])});var n=e[0],r=t[t.length-1];NX(n)&&r&&r.push(n);var i=t[t.length-1];return i&&i.length<=0&&(t=t.slice(0,-1)),t},FX=(e,t)=>{var n=PX(e);t&&(n=[n.reduce((e,t)=>[...e,...t],[])]);var r=n.map(e=>e.reduce((e,t,n)=>mC(OX||=MX([``,``,``,`,`,``]),e,n===0?`M`:`L`,t.x,t.y),``)).join(``);return n.length===1?`${r}Z`:r},IX=(e,t,n)=>{var r=FX(e,n);return`${r.slice(-1)===`Z`?r.slice(0,-1):r}L${FX(Array.from(t).reverse(),n).slice(1)}`},LX=e=>{var t=e.points,n=e.className,r=e.baseLinePoints,i=e.connectNulls,a=AX(e,DX);if(!t||!t.length)return null;var o=dv(`recharts-polygon`,n);if(r&&r.length){var s=a.stroke&&a.stroke!==`none`,c=IX(t,r,i);return v.createElement(`g`,{className:o},v.createElement(`path`,kX({},Kx(a),{fill:c.slice(-1)===`Z`?a.fill:`none`,stroke:`none`,d:c})),s?v.createElement(`path`,kX({},Kx(a),{fill:`none`,d:FX(t,i)})):null,s?v.createElement(`path`,kX({},Kx(a),{fill:`none`,d:FX(r,i)})):null)}var l=FX(t,i);return v.createElement(`path`,kX({},Kx(a),{fill:l.slice(-1)===`Z`?a.fill:`none`,className:o,d:l}))};function RX(){return RX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},RX.apply(null,arguments)}var zX=e=>{var t=e.cx,n=e.cy,r=e.r,i=e.className,a=dv(`recharts-dot`,i);return Z(t)&&Z(n)&&Z(r)?v.createElement(`circle`,RX({},Wx(e),AC(e),{className:a,cx:t,cy:n,r})):null},BX=e=>e.graphicalItems.polarItems,VX=$([BX,ZH,$([BI,VI],tU)],iU),HX=$([$([VX],lU),OF],fU),UX=$([HX,ZH,VX],mU);$([HX,ZH,VX],(e,t,n)=>n.length>0?e.flatMap(e=>n.flatMap(n=>({value:BO(e,t.dataKey??n.dataKey),errorDomain:[]}))).filter(Boolean):t?.dataKey==null?e.map(e=>({value:e,errorDomain:[]})):e.map(e=>({value:BO(e,t.dataKey),errorDomain:[]})));var WX=()=>void 0,GX=$([ZH,vA,HX,UX,uI,BI,$([ZH,MU,NU,WX,$([HX,ZH,VX,FU,BI,MF],RU),WX,vA,BI],rW)],oW),KX=$([GX,$H,cW],lW),qX=$([cW,$([ZH,GX,KX,BI],dW)],ZI),JX=(e,t,n)=>{switch(t){case`angleAxis`:return kI(e,n);case`radiusAxis`:return AI(e,n);default:throw Error(`Unexpected axis type: ${t}`)}},YX=(e,t,n)=>{switch(t){case`angleAxis`:return II(e,n);case`radiusAxis`:return RI(e,n);default:throw Error(`Unexpected axis type: ${t}`)}},XX=$([$([JX,cW,qX,YX],wH)],XI),ZX=$([vA,UX,$H,BI],CW),QX=$([vA,JX,cW,XX,KX,YX,HW,ZX,BI],WW),$X=$([QX],e=>{if(e){var t=new Map;return e.forEach(e=>{var n=(e.coordinate+360)%360;t.has(n)||t.set(n,e)}),Array.from(t.values())}}),eZ=$([vA,JX,XX,YX,HW,ZX,BI],KW),tZ=LD({name:`polarAxis`,initialState:{radiusAxis:{},angleAxis:{}},reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=Wj(t.payload)},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=Wj(t.payload)},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),nZ=tZ.actions;nZ.addRadiusAxis,nZ.removeRadiusAxis;var rZ=nZ.addAngleAxis,iZ=nZ.removeAngleAxis,aZ=tZ.reducer;function oZ(e){return e&&typeof e==`object`&&`className`in e&&typeof e.className==`string`?e.className:``}var sZ=[`children`,`type`],cZ=[`ref`];function lZ(){return lZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lZ.apply(null,arguments)}function uZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dZ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?uZ(Object(n),!0).forEach(function(t){fZ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uZ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fZ(e,t,n){return(t=pZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pZ(e){var t=mZ(e,`string`);return typeof t==`symbol`?t:t+``}function mZ(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function hZ(e,t){if(e==null)return{};var n,r,i=gZ(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function gZ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var _Z=1e-5,vZ=Math.cos(QP(45)),yZ=`angleAxis`;function bZ(e){var t=$w(),n=SA(),r=(0,v.useMemo)(()=>{e.children;var t=e.type,r=hZ(e,sZ),i=xI(n,`angleAxis`,t);if(i!=null)return dZ(dZ({},r),{},{type:i})},[e,n]),i=r===Q(e=>kI(e,r?.id));return(0,v.useEffect)(()=>r==null?OC:(t(rZ(r)),()=>{t(iZ(r))}),[t,r]),i?e.children:null}var xZ=(e,t)=>{var n=t.cx,r=t.cy,i=t.radius,a=t.orientation,o=t.tickSize||8,s=eF(n,r,i,e.coordinate),c=eF(n,r,i+(a===`inner`?-1:1)*o,e.coordinate);return{x1:s.x,y1:s.y,x2:c.x,y2:c.y}},SZ=(e,t)=>{var n=Math.cos(QP(-e.coordinate));return n>_Z?t===`outer`?`start`:`end`:n<-_Z?t===`outer`?`end`:`start`:`middle`},CZ=e=>{var t=Math.cos(QP(-e.coordinate)),n=Math.sin(QP(-e.coordinate));return Math.abs(t)<=vZ?n>0?`start`:`end`:`middle`},wZ=e=>{var t=e.cx,n=e.cy,r=e.radius,i=e.axisLineType,a=e.axisLine,o=e.ticks;if(!a)return null;var s=dZ(dZ({},Wx(e)),{},{fill:`none`},Wx(a));if(i===`circle`)return v.createElement(zX,lZ({className:`recharts-polar-angle-axis-line`},s,{cx:t,cy:n,r}));var c=o.map(e=>eF(t,n,r,e.coordinate));return v.createElement(LX,lZ({className:`recharts-polar-angle-axis-line`},s,{points:c}))},TZ=e=>{var t=e.tick,n=e.tickProps,r=e.value;return t?v.isValidElement(t)?v.cloneElement(t,n):typeof t==`function`?t(n):v.createElement(PY,lZ({},n,{className:`recharts-polar-angle-axis-tick-value`}),r):null},EZ=e=>{var t=e.tick,n=e.tickLine,r=e.tickFormatter,i=e.stroke,a=e.ticks,o=Wx(e);o.ref;var s=hZ(o,cZ),c=Gx(t),l=dZ(dZ({},s),{},{fill:`none`},Wx(n)),u=a.map((a,o)=>{var u=xZ(a,e),d=SZ(a,e.orientation),f=CZ(a),p=dZ(dZ(dZ({},s),{},{textAnchor:d,verticalAnchor:f,stroke:`none`,fill:i},c),{},{index:o,payload:a,x:u.x2,y:u.y2});return v.createElement(rS,lZ({className:dv(`recharts-polar-angle-axis-tick`,oZ(t)),key:`tick-${a.coordinate}`},MC(e,a,o)),n&&v.createElement(`line`,lZ({className:`recharts-polar-angle-axis-tick-line`},l,u)),v.createElement(TZ,{tick:t,tickProps:p,value:r?r(a.value,o):a.value}))});return v.createElement(rS,{className:`recharts-polar-angle-axis-ticks`},u)},DZ=e=>{var t=e.angleAxisId,n=Q(zI),r=Q(e=>XX(e,`angleAxis`,t)),i=Ak(),a=Q(e=>$X(e,`angleAxis`,t,i));if(n==null||!a||!a.length||r==null)return null;var o=dZ(dZ(dZ({},e),{},{scale:r},n),{},{radius:n.outerRadius,ticks:a});return v.createElement(xq,{zIndex:o.zIndex},v.createElement(rS,{className:dv(`recharts-polar-angle-axis`,yZ,o.className)},v.createElement(wZ,o),v.createElement(EZ,o)))};function OZ(e){var t=RC(e,vI);return v.createElement(bZ,{id:t.angleAxisId,scale:t.scale,type:t.type,dataKey:t.dataKey,unit:void 0,name:t.name,allowDuplicatedCategory:!1,allowDataOverflow:!1,reversed:t.reversed,includeHidden:!1,allowDecimals:t.allowDecimals,tickCount:t.tickCount,niceTicks:t.niceTicks??`auto`,ticks:t.ticks,tick:t.tick,domain:t.domain},v.createElement(DZ,t))}OZ.displayName=`PolarAngleAxis`;function kZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function AZ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?kZ(Object(n),!0).forEach(function(t){jZ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kZ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function jZ(e,t,n){return(t=MZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MZ(e){var t=NZ(e,`string`);return typeof t==`symbol`?t:t+``}function NZ(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var PZ=$([BX,(e,t)=>t],(e,t)=>e.filter(e=>e.type===`pie`).find(e=>e.id===t)),FZ=[],IZ=(e,t,n)=>n?.length===0?FZ:n,LZ=$([OF,PZ,IZ],(e,t,n)=>{var r=e.chartData;if(t!=null){var i=t?.data!=null&&t.data.length>0?t.data:r;if((!i||!i.length)&&n!=null&&(i=n.map(e=>AZ(AZ({},t.presentationProps),e.props))),i!=null)return i}}),RZ=$([LZ,PZ,IZ],(e,t,n)=>{if(!(e==null||t==null))return e.map((e,r)=>{var i,a=BO(e,t.nameKey,t.name),o=n!=null&&(i=n[r])!=null&&(i=i.props)!=null&&i.fill?n[r].props.fill:typeof e==`object`&&e&&`fill`in e?e.fill:t.fill;return{value:ak(a,t.dataKey),dataKey:t.dataKey,color:o,payload:e,type:t.legendType}})}),zZ=$([LZ,PZ,IZ,Ek],(e,t,n,r)=>{if(!(t==null||e==null))return T$({offset:r,pieSettings:t,displayedData:e,cells:n})}),BZ=o((e=>{var t=60103,n=60106,r=60107,i=60108,a=60114,o=60109,s=60110,c=60112,l=60113,u=60120,d=60115,f=60116;if(typeof Symbol==`function`&&Symbol.for){var p=Symbol.for;t=p(`react.element`),n=p(`react.portal`),r=p(`react.fragment`),i=p(`react.strict_mode`),a=p(`react.profiler`),o=p(`react.provider`),s=p(`react.context`),c=p(`react.forward_ref`),l=p(`react.suspense`),u=p(`react.suspense_list`),d=p(`react.memo`),f=p(`react.lazy`),p(`react.block`),p(`react.server.block`),p(`react.fundamental`),p(`react.debug_trace_mode`),p(`react.legacy_hidden`)}function m(e){if(typeof e==`object`&&e){var p=e.$$typeof;switch(p){case t:switch(e=e.type,e){case r:case a:case i:case l:case u:return e;default:switch(e&&=e.$$typeof,e){case s:case c:case f:case d:case o:return e;default:return p}}case n:return p}}}e.isFragment=function(e){return m(e)===r}})),VZ=o(((e,t)=>{t.exports=BZ()}))(),HZ=e=>typeof e==`string`?e:e?e.displayName||e.name||`Component`:``,UZ=null,WZ=null,GZ=e=>{if(e===UZ&&Array.isArray(WZ))return WZ;var t=[];return v.Children.forEach(e,e=>{TC(e)||((0,VZ.isFragment)(e)?t=t.concat(GZ(e.props.children)):t.push(e))}),WZ=t,UZ=e,t};function KZ(e,t){var n=[],r=[];return r=Array.isArray(t)?t.map(e=>HZ(e)):[HZ(t)],GZ(e).forEach(e=>{var t=uC(e,`type.displayName`)||uC(e,`type.name`);t&&r.indexOf(t)!==-1&&n.push(e)}),n}var qZ=e=>e&&typeof e==`object`&&`clipDot`in e?!!e.clipDot:!0;function JZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function YZ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?JZ(Object(n),!0).forEach(function(t){XZ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JZ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function XZ(e,t,n){return(t=ZZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZZ(e){var t=QZ(e,`string`);return typeof t==`symbol`?t:t+``}function QZ(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function $Z(e,t){return YZ(YZ({},t),e)}function eQ(e){return(0,v.isValidElement)(e)?e.props:e}function tQ(e,t){return(0,v.cloneElement)(e,$Z(eQ(e),t))}function nQ(e){if(`index`in e){var t=e.index;return typeof t==`number`||typeof t==`string`?t:void 0}}function rQ(e){return`isActive`in e&&e.isActive===!0}function iQ(e){var t=e.option,n=e.DefaultShape,r=e.shapeProps,i=e.activeClassName,a=i===void 0?`recharts-active-shape`:i,o=e.inActiveClassName,s=o===void 0?`recharts-shape`:o,c=nQ(r),l=(0,v.isValidElement)(t)?tQ(t,r):t===n?v.createElement(n,r):typeof t==`function`?t(r,c):typeof t==`object`?v.createElement(n,$Z(t,r)):v.createElement(n,r);return rQ(r)?v.createElement(rS,{className:a},l):v.createElement(rS,{className:s},l)}var aQ=(e,t,n)=>{var r=$w();return(i,a)=>o=>{e?.(i,a,o),r(uG({activeIndex:String(a),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:n}))}},oQ=e=>{var t=$w();return(n,r)=>i=>{e?.(n,r,i),t(dG())}},sQ=(e,t,n)=>{var r=$w();return(i,a)=>o=>{e?.(i,a,o),r(pG({activeIndex:String(a),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:n}))}};function cQ(e){var t=e.tooltipEntrySettings,n=$w(),r=Ak(),i=(0,v.useRef)(null);return(0,v.useLayoutEffect)(()=>{r||(i.current===null?n(oG(t)):i.current!==t&&n(sG({prev:i.current,next:t})),i.current=t)},[t,n,r]),(0,v.useLayoutEffect)(()=>()=>{i.current&&=(n(cG(i.current)),null)},[n]),null}function lQ(e){var t=e.legendPayload,n=$w(),r=Ak(),i=(0,v.useRef)(null);return(0,v.useLayoutEffect)(()=>{r||(i.current===null?n(qj(t)):i.current!==t&&n(Jj({prev:i.current,next:t})),i.current=t)},[n,r,t]),(0,v.useLayoutEffect)(()=>()=>{i.current&&=(n(Yj(i.current)),null)},[n]),null}function uQ(e){var t=e.legendPayload,n=$w(),r=Q(vA),i=(0,v.useRef)(null);return(0,v.useLayoutEffect)(()=>{r!==`centric`&&r!==`radial`||(i.current===null?n(qj(t)):i.current!==t&&n(Jj({prev:i.current,next:t})),i.current=t)},[n,r,t]),(0,v.useLayoutEffect)(()=>()=>{i.current&&=(n(Yj(i.current)),null)},[n]),null}function dQ(e,t){return gQ(e)||hQ(e,t)||pQ(e,t)||fQ()}function fQ(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
126
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pQ(e,t){if(e){if(typeof e==`string`)return mQ(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mQ(e,t):void 0}}function mQ(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function hQ(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function gQ(e){if(Array.isArray(e))return e}var _Q=`index`,vQ=`append`;function yQ(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r=[];for(var i of n)r.push({status:`removed`,prev:i});for(var a=0;a<t.length;a++){var o=e[a],s=t[a];o==null?r.push({status:`added`,next:s}):r.push({status:`matched`,prev:o,next:s})}return r}function bQ(e,t){var n=e.length/t.length;return yQ(t.map((t,r)=>e[Math.floor(r*n)]),t)}function xQ(e,t){return yQ(t.map((t,n)=>e[n]),t)}function SQ(e,t){for(var n=new Map,r=0;r<e.length;r++){var i=e[r];if(i!=null){var a=t(i,r);a!=null&&!n.has(a)&&n.set(a,i)}}return n}function CQ(e,t,n){var r=SQ(e,n),i=new Set,a=t.map((e,t)=>{var a=n(e,t);if(a!=null){var o=r.get(a);if(o!==void 0)return i.add(a),o}}),o=[];for(var s of r){var c=dQ(s,2),l=c[0],u=c[1];i.has(l)||o.push(u)}return yQ(a,t,o)}function wQ(e,t,n){return t==null?null:e==null?t.map(e=>({status:`added`,next:e})):n===`index`?bQ(e,t):n===`append`?xQ(e,t):CQ(e,t,n)}function TQ(e,t){var n=(0,v.useRef)(e),r=(0,v.useRef)(t.current),i=(0,v.useRef)(!0);n.current!==e&&(n.current=e,r.current=t.current,i.current=!1);var a=(0,v.useCallback)(function(e,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(n===0){i.current=!0;return}n===1&&(r.current=e),n>0&&i.current&&a&&(t.current=e)},[t]);return{startValue:r.current,syncStepValue:a}}function EQ(e,t){return jQ(e)||AQ(e,t)||OQ(e,t)||DQ()}function DQ(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
127
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OQ(e,t){if(e){if(typeof e==`string`)return kQ(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kQ(e,t):void 0}}function kQ(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function AQ(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function jQ(e){if(Array.isArray(e))return e}function MQ(e,t){var n=EQ((0,v.useState)(!1),2),r=n[0],i=n[1];return{isAnimating:r,handleAnimationStart:(0,v.useCallback)(()=>{typeof e==`function`&&e(),i(!0)},[e]),handleAnimationEnd:(0,v.useCallback)(()=>{typeof t==`function`&&t(),i(!1)},[t])}}function NQ(e){var t=e.animationInput,n=e.animationIdPrefix,r=e.items,i=e.previousItemsRef,a=e.isAnimationActive,o=e.animationBegin,s=e.animationDuration,c=e.animationEasing,l=e.onAnimationStart,u=e.onAnimationEnd,d=e.animationInterpolateFn,f=e.animationMatchBy,p=e.shouldUpdatePreviousRef,m=e.children,h=e.layout,g=pP(t,n),_=TQ(g,i),y=_.startValue??null,b=wQ(y,r,f??_Q);return v.createElement(fP,{animationId:g,begin:o,duration:s,isActive:a,easing:c,onAnimationEnd:u,onAnimationStart:l,key:g},e=>{var t=y==null,n=r==null?r:d(b,e,h),i=p?p(e):e>0;return _.syncStepValue(n,e,i),n==null?null:m(n,e,t)})}function PQ(e,t){return zQ(e)||RQ(e,t)||IQ(e,t)||FQ()}function FQ(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
128
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IQ(e,t){if(e){if(typeof e==`string`)return LQ(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?LQ(e,t):void 0}}function LQ(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function RQ(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function zQ(e){if(Array.isArray(e))return e}var BQ=v.useId??(()=>PQ(v.useState(()=>bC(`uid-`)),1)[0]);function VQ(e,t){var n=BQ();return t||(e?`${e}-${n}`:n)}var HQ=(0,v.createContext)(void 0),UQ=e=>{var t=e.id,n=e.type,r=e.children,i=VQ(`recharts-${n}`,t);return v.createElement(HQ.Provider,{value:i},r(i))},WQ=LD({name:`graphicalItems`,initialState:{cartesianItems:[],polarItems:[]},reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(Wj(t.payload))},prepare:SD()},replaceCartesianGraphicalItem:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next,a=cD(e).cartesianItems.indexOf(Wj(r));a>-1&&(e.cartesianItems[a]=Wj(i))},prepare:SD()},removeCartesianGraphicalItem:{reducer(e,t){var n=cD(e).cartesianItems.indexOf(Wj(t.payload));n>-1&&e.cartesianItems.splice(n,1)},prepare:SD()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(Wj(t.payload))},prepare:SD()},removePolarGraphicalItem:{reducer(e,t){var n=cD(e).polarItems.indexOf(Wj(t.payload));n>-1&&e.polarItems.splice(n,1)},prepare:SD()},replacePolarGraphicalItem:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next,a=cD(e).polarItems.indexOf(Wj(r));a>-1&&(e.polarItems[a]=Wj(i))},prepare:SD()}}}),GQ=WQ.actions,KQ=GQ.addCartesianGraphicalItem,qQ=GQ.replaceCartesianGraphicalItem,JQ=GQ.removeCartesianGraphicalItem,YQ=GQ.addPolarGraphicalItem,XQ=GQ.removePolarGraphicalItem,ZQ=GQ.replacePolarGraphicalItem,QQ=WQ.reducer,$Q=(0,v.memo)(e=>{var t=$w(),n=(0,v.useRef)(null);return(0,v.useLayoutEffect)(()=>{n.current===null?t(KQ(e)):n.current!==e&&t(qQ({prev:n.current,next:e})),n.current=e},[t,e]),(0,v.useLayoutEffect)(()=>()=>{n.current&&=(t(JQ(n.current)),null)},[t]),null}),e$=(0,v.memo)(e=>{var t=$w(),n=(0,v.useRef)(null);return(0,v.useLayoutEffect)(()=>{n.current===null?t(YQ(e)):n.current!==e&&t(ZQ({prev:n.current,next:e})),n.current=e},[t,e]),(0,v.useLayoutEffect)(()=>()=>{n.current&&=(t(XQ(n.current)),null)},[t]),null}),t$=[`key`],n$=[`onMouseEnter`,`onClick`,`onMouseLeave`],r$=[`id`],i$=[`id`];function a$(){return a$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a$.apply(null,arguments)}function o$(e,t){if(e==null)return{};var n,r,i=s$(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function s$(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function c$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?c$(Object(n),!0).forEach(function(t){u$(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u$(e,t,n){return(t=d$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d$(e){var t=f$(e,`string`);return typeof t==`symbol`?t:t+``}function f$(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var p$=SF;function m$(e){var t=(0,v.useMemo)(()=>KZ(e.children,xJ),[e.children]),n=Q(n=>RZ(n,e.id,t));return n==null?null:v.createElement(uQ,{legendPayload:n})}function h$(e){if(!(e==null||typeof e==`boolean`||typeof e==`function`)){if(v.isValidElement(e)){var t=e.props?.fill;return typeof t==`string`?t:void 0}var n=e.fill;return typeof n==`string`?n:void 0}}var g$=v.memo(e=>{var t=e.dataKey,n=e.nameKey,r=e.sectors,i=e.stroke,a=e.strokeWidth,o=e.fill,s=e.name,c=e.hide,l=e.tooltipType,u=e.formatter,d=e.id,f=e.activeShape,p=h$(f),m={dataDefinedOnItem:r.map(e=>{var t=e.tooltipPayload;return p==null||t==null?t:t.map(e=>l$(l$({},e),{},{color:p,fill:p}))}),getPosition:e=>r[Number(e)]?.tooltipPosition,settings:{stroke:i,strokeWidth:a,fill:o,dataKey:t,nameKey:n,name:ak(s,t),hide:c,type:l,color:o,unit:``,formatter:u,graphicalItemId:d}};return v.createElement(cQ,{tooltipEntrySettings:m})}),Cee=(e,t)=>e>t?`start`:e<t?`end`:`middle`,_$=(e,t,n)=>xC(typeof t==`function`?t(e):t,n,n*.8),v$=(e,t,n)=>{var r=t.top,i=t.left,a=t.width,o=t.height,s=tF(a,o);return{cx:i+xC(e.cx,a,a/2),cy:r+xC(e.cy,o,o/2),innerRadius:xC(e.innerRadius,s,0),outerRadius:_$(n,e.outerRadius,s),maxRadius:e.maxRadius||Math.sqrt(a*a+o*o)/2}},y$=(e,t)=>hC(t-e)*Math.min(Math.abs(t-e),360),b$=(e,t)=>{if(v.isValidElement(e))return v.cloneElement(e,t);if(typeof e==`function`)return e(t);var n=dv(`recharts-pie-label-line`,typeof e==`boolean`?``:e.className);t.key;var r=o$(t,t$);return v.createElement(xN,a$({},r,{type:`linear`,className:n}))},x$=(e,t,n)=>{if(v.isValidElement(e))return v.cloneElement(e,t);var r=n;if(typeof e==`function`&&(r=e(t),v.isValidElement(r)))return r;var i=dv(`recharts-pie-label-text`,oZ(e));return v.createElement(PY,a$({},t,{alignmentBaseline:`middle`,className:i}),r)};function S$(e){var t=e.sectors,n=e.props,r=e.showLabels,i=n.label,a=n.labelLine,o=n.dataKey;if(!r||!i||!t)return null;var s=Wx(n),c=Gx(i),l=Gx(a),u=typeof i==`object`&&`offsetRadius`in i&&typeof i.offsetRadius==`number`&&i.offsetRadius||20,d=t.map((e,t)=>{var n=(e.startAngle+e.endAngle)/2,r=eF(e.cx,e.cy,e.outerRadius+u,n),d=l$(l$(l$(l$({},s),e),{},{stroke:`none`},c),{},{index:t,textAnchor:Cee(r.x,e.cx)},r),f=l$(l$(l$(l$({},s),e),{},{fill:`none`,stroke:e.fill},l),{},{index:t,points:[eF(e.cx,e.cy,e.outerRadius,n),r],key:`line`});return v.createElement(xq,{zIndex:_I.label,key:`label-${e.startAngle}-${e.endAngle}-${e.midAngle}-${t}`},v.createElement(rS,null,a&&b$(a,f),x$(i,d,BO(e,o))))});return v.createElement(rS,{className:`recharts-pie-labels`},d)}function C$(e){var t=e.sectors,n=e.props,r=e.showLabels,i=n.label;return typeof i==`object`&&i&&`position`in i?v.createElement(EX,{label:i}):v.createElement(S$,{sectors:t,props:n,showLabels:r})}function w$(e){var t=e.sectors,n=e.activeShape,r=e.inactiveShape,i=e.allOtherPieProps,a=e.shape,o=e.id,s=e.animationElapsedTime,c=e.isAnimating,l=e.isEntrance,u=Q(_K),d=Q(yK),f=Q(bK),p=i.onMouseEnter,m=i.onClick,h=i.onMouseLeave,g=o$(i,n$),_=aQ(p,i.dataKey,o),y=oQ(h),b=sQ(m,i.dataKey,o);return t==null||t.length===0?null:v.createElement(v.Fragment,null,t.map((e,p)=>{if(e?.startAngle===0&&e?.endAngle===0&&t.length!==1)return null;var m=f==null||f===o,h=String(p)===u&&(d==null||i.dataKey===d)&&m,x=n&&h?n:u?r:null,S=l$(l$({},e),{},{stroke:e.stroke,tabIndex:-1,index:p,isActive:h,animationElapsedTime:s,isAnimating:c,isEntrance:l,[mk]:p,[hk]:o});return v.createElement(rS,a$({key:`sector-${e?.startAngle}-${e?.endAngle}-${e.midAngle}-${p}`,tabIndex:-1,className:`recharts-pie-sector`},MC(g,e,p),{onMouseEnter:_(e,p),onMouseLeave:y(e,p),onClick:b(e,p)}),v.createElement(iQ,{option:x??a,DefaultShape:p$,shapeProps:S}))}))}function T$(e){var t=e.pieSettings,n=e.displayedData,r=e.cells,i=e.offset,a=t.cornerRadius,o=t.startAngle,s=t.endAngle,c=t.dataKey,l=t.nameKey,u=t.tooltipType,d=Math.abs(t.minAngle),f=y$(o,s),p=Math.abs(f),m=n.length<=1?0:t.paddingAngle??0,h=n.filter(e=>BO(e,c,0)!==0).length,g=(p>=360?h:h-1)*m,_=n.reduce((e,t)=>{var n=BO(t,c,0);return e+(Z(n)?n:0)},0),v=d>0&&_>0&&n.some(e=>{var t=BO(e,c,0),n=(Z(t)?t:0)/_;return t!==0&&n*p<d})?d:0,y=p-h*v-g,b;if(_>0){var x;b=n.map((e,n)=>{var s=BO(e,c,0),d=BO(e,l,n),p=v$(t,i,e),h=(Z(s)?s:0)/_,g,b=l$(l$({},e),r&&r[n]&&r[n].props),S=b!=null&&`fill`in b&&typeof b.fill==`string`?b.fill:t.fill;g=n?x.endAngle+hC(f)*m*(s===0?0:1):o;var C=g+hC(f)*((s===0?0:v)+h*y),w=(g+C)/2,T=(p.innerRadius+p.outerRadius)/2,E=[{name:d,value:s,payload:b,dataKey:c,type:u,color:S,fill:S,graphicalItemId:t.id}],D=eF(p.cx,p.cy,T,w);return x=l$(l$(l$(l$({},t.presentationProps),{},{percent:h,cornerRadius:typeof a==`string`?parseFloat(a):a,name:d,tooltipPayload:E,midAngle:w,middleRadius:T,tooltipPosition:D},b),p),{},{value:s,dataKey:c,startAngle:g,endAngle:C,payload:b,paddingAngle:s===0?0:hC(f)*m}),x})}return b}function E$(e){var t=e.showLabels,n=e.sectors,r=e.children,i=(0,v.useMemo)(()=>!t||!n?[]:n.map(e=>({value:e.value,payload:e.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:e.cx,cy:e.cy,innerRadius:e.innerRadius,outerRadius:e.outerRadius,startAngle:e.startAngle,endAngle:e.endAngle,clockWise:!1},fill:e.fill})),[n,t]);return v.createElement(SX,{value:t?i:void 0},r)}var D$=(e,t)=>{if(e==null)return[];var n=[],r=e.find(e=>e.status!==`removed`),i=r?r.next.startAngle:0;return e.forEach((e,r)=>{if(e.status!==`removed`){var a=r>0?uC(e.next,`paddingAngle`,0):0;if(e.status===`matched`){var o=CC(e.prev.endAngle-e.prev.startAngle,e.next.endAngle-e.next.startAngle,t),s=l$(l$({},e.next),{},{startAngle:i+a,endAngle:i+o+a});n.push(s),i=s.endAngle}else{var c=CC(0,e.next.endAngle-e.next.startAngle,t),l=l$(l$({},e.next),{},{startAngle:i+a,endAngle:i+c+a});n.push(l),i=l.endAngle}}}),n};function O$(e){var t=e.props,n=e.previousSectorsRef,r=e.id,i=t.sectors,a=t.activeShape,o=t.inactiveShape,s=t.animationInterpolateFn,c=MQ(t.onAnimationStart,t.onAnimationEnd),l=c.isAnimating,u=c.handleAnimationStart,d=c.handleAnimationEnd,f=SA();return f==null?null:v.createElement(E$,{showLabels:!l,sectors:i},v.createElement(NQ,{animationInput:t,animationIdPrefix:`recharts-pie-`,items:i,previousItemsRef:n,isAnimationActive:t.isAnimationActive,animationBegin:t.animationBegin,animationDuration:t.animationDuration,animationEasing:t.animationEasing,onAnimationStart:u,onAnimationEnd:d,animationInterpolateFn:s,animationMatchBy:t.animationMatchBy,layout:f},(e,n,i)=>v.createElement(rS,null,v.createElement(w$,{sectors:e,activeShape:a,inactiveShape:o,allOtherPieProps:t,shape:t.shape,id:r,animationElapsedTime:n,isAnimating:l||n<1,isEntrance:i}))),v.createElement(C$,{showLabels:!l,sectors:i,props:t}),t.children)}var k$={animationBegin:400,animationDuration:1500,animationEasing:`ease`,animationInterpolateFn:D$,animationMatchBy:vQ,cx:`50%`,cy:`50%`,dataKey:`value`,endAngle:360,fill:`#808080`,hide:!1,innerRadius:0,isAnimationActive:`auto`,label:!1,labelLine:!0,legendType:`rect`,minAngle:0,nameKey:`name`,outerRadius:`80%`,paddingAngle:0,rootTabIndex:0,shape:p$,startAngle:0,stroke:`#fff`,zIndex:_I.area};function A$(e){var t=e.id,n=o$(e,r$),r=e.hide,i=e.className,a=e.rootTabIndex,o=(0,v.useMemo)(()=>KZ(e.children,xJ),[e.children]),s=Q(e=>zZ(e,t,o)),c=(0,v.useRef)(null),l=dv(`recharts-pie`,i);return r||s==null?(c.current=null,v.createElement(rS,{tabIndex:a,className:l})):v.createElement(xq,{zIndex:e.zIndex},v.createElement(g$,{dataKey:e.dataKey,nameKey:e.nameKey,sectors:s,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,tooltipType:e.tooltipType,formatter:e.formatter,id:t,activeShape:e.activeShape}),v.createElement(rS,{tabIndex:a,className:l},v.createElement(O$,{props:l$(l$({},n),{},{sectors:s}),previousSectorsRef:c,id:t})))}function j$(e){var t=RC(e,k$),n=t.id,r=o$(t,i$),i=Wx(r);return v.createElement(UQ,{id:n,type:`pie`},e=>v.createElement(v.Fragment,null,v.createElement(e$,{type:`pie`,id:e,data:r.data,dataKey:r.dataKey,hide:r.hide,angleAxisId:0,radiusAxisId:0,name:r.name,nameKey:r.nameKey,tooltipType:r.tooltipType,legendType:r.legendType,fill:r.fill,cx:r.cx,cy:r.cy,startAngle:r.startAngle,endAngle:r.endAngle,paddingAngle:r.paddingAngle,minAngle:r.minAngle,innerRadius:r.innerRadius,outerRadius:r.outerRadius,cornerRadius:r.cornerRadius,presentationProps:i,maxRadius:t.maxRadius}),v.createElement(m$,a$({},r,{id:e})),v.createElement(A$,a$({},r,{id:e}))))}var M$=j$;M$.displayName=`Pie`;var N$=[`points`];function P$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function F$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?P$(Object(n),!0).forEach(function(t){I$(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function I$(e,t,n){return(t=L$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L$(e){var t=R$(e,`string`);return typeof t==`symbol`?t:t+``}function R$(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function z$(){return z$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z$.apply(null,arguments)}function B$(e,t){if(e==null)return{};var n,r,i=V$(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function V$(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function H$(e){var t=e.option,n=e.dotProps,r=e.className;if((0,v.isValidElement)(t))return(0,v.cloneElement)(t,n);if(typeof t==`function`)return t(n);var i=dv(r,typeof t==`boolean`?``:t.className),a=n??{};a.points;var o=B$(a,N$);return v.createElement(zX,z$({},o,{className:i}))}function U$(e,t){return e==null?!1:t?!0:e.length===1}function W$(e){var t=e.points,n=e.dot,r=e.className,i=e.dotClassName,a=e.dataKey,o=e.baseProps,s=e.needClip,c=e.clipPathId,l=e.zIndex,u=l===void 0?_I.scatter:l;if(!U$(t,n))return null;var d=qZ(n),f=qx(n),p=t.map((e,r)=>{var s=F$(F$(F$({r:3},o),f),{},{index:r,cx:e.x??void 0,cy:e.y??void 0,dataKey:a,value:e.value,payload:e.payload,points:t});return v.createElement(H$,{key:`dot-${r}`,option:n,dotProps:s,className:i})}),m={};return s&&c!=null&&(m.clipPath=`url(#clipPath-${d?``:`dots-`}${c})`),v.createElement(xq,{zIndex:u},v.createElement(rS,z$({className:r},m),p))}function G$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function K$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?G$(Object(n),!0).forEach(function(t){q$(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function q$(e,t,n){return(t=J$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function J$(e){var t=Y$(e,`string`);return typeof t==`symbol`?t:t+``}function Y$(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var X$=LD({name:`cartesianAxis`,initialState:{xAxis:{},yAxis:{},zAxis:{}},reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=Wj(t.payload)},prepare:SD()},replaceXAxis:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next;e.xAxis[r.id]!==void 0&&(r.id!==i.id&&delete e.xAxis[r.id],e.xAxis[i.id]=Wj(i))},prepare:SD()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:SD()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=Wj(t.payload)},prepare:SD()},replaceYAxis:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next;e.yAxis[r.id]!==void 0&&(r.id!==i.id&&delete e.yAxis[r.id],e.yAxis[i.id]=Wj(i))},prepare:SD()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:SD()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=Wj(t.payload)},prepare:SD()},replaceZAxis:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next;e.zAxis[r.id]!==void 0&&(r.id!==i.id&&delete e.zAxis[r.id],e.zAxis[i.id]=Wj(i))},prepare:SD()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:SD()},updateYAxisWidth(e,t){var n=t.payload,r=n.id,i=n.width,a=e.yAxis[r];if(a){var o=a.widthHistory||[];if(o.length===3&&o[0]===o[2]&&i===o[1]&&i!==a.width&&Math.abs(i-(o[0]??0))<=1)return;var s=[...o,i].slice(-3);e.yAxis[r]=K$(K$({},a),{},{width:i,widthHistory:s})}}}}),Z$=X$.actions,Q$=Z$.addXAxis,$$=Z$.replaceXAxis,e1=Z$.removeXAxis,t1=Z$.addYAxis,n1=Z$.replaceYAxis,r1=Z$.removeYAxis;Z$.addZAxis,Z$.replaceZAxis,Z$.removeZAxis;var i1=Z$.updateYAxisWidth,a1=X$.reducer,o1=$([$([Ek],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),ck,lk],(e,t,n)=>{if(!(!e||t==null||n==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),s1=()=>Q(o1),c1=()=>Q(wK);function l1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function u1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?l1(Object(n),!0).forEach(function(t){d1(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l1(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function d1(e,t,n){return(t=f1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f1(e){var t=p1(e,`string`);return typeof t==`symbol`?t:t+``}function p1(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var m1=e=>{var t=e.point,n=e.childIndex,r=e.mainColor,i=e.activeDot,a=e.dataKey,o=e.clipPath;if(i===!1||t.x==null||t.y==null)return null;var s=u1(u1(u1({},{index:n,dataKey:a,cx:t.x,cy:t.y,r:4,fill:r??`none`,strokeWidth:2,stroke:`#fff`,payload:t.payload,value:t.value}),Gx(i)),AC(i)),c=(0,v.isValidElement)(i)?(0,v.cloneElement)(i,s):typeof i==`function`?i(s):v.createElement(zX,s);return v.createElement(rS,{className:`recharts-active-dot`,clipPath:o},c)};function h1(e){var t=e.points,n=e.mainColor,r=e.activeDot,i=e.itemDataKey,a=e.clipPath,o=e.zIndex,s=o===void 0?_I.activeDot:o,c=Q(_K),l=c1();if(t==null||l==null)return null;var u=t.find(e=>l.includes(e.payload));return TC(u)?null:v.createElement(xq,{zIndex:s},v.createElement(m1,{point:u,childIndex:Number(c),mainColor:n,dataKey:i,activeDot:r,clipPath:a}))}var g1=[`option`];function _1(e,t){if(e==null)return{};var n,r,i=v1(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function v1(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var y1=SF;function b1(e){return typeof e==`string`?parseInt(e,10):e}function x1(e){var t=e.option,n=_1(e,g1);return v.createElement(iQ,{option:t,DefaultShape:y1,shapeProps:n})}function S1(e,t){return D1(e)||E1(e,t)||w1(e,t)||C1()}function C1(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
129
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w1(e,t){if(e){if(typeof e==`string`)return T1(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T1(e,t):void 0}}function T1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function E1(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function D1(e){if(Array.isArray(e))return e}var O1=(e,t,n)=>{var r=n??e;if(!TC(r))return xC(r,t,0)},k1=(e,t,n)=>{var r={},i=e.filter(WI),a=e.filter(e=>e.stackId==null),o=i.reduce((e,t)=>{var n=e[t.stackId];return n??=[],n.push(t),e[t.stackId]=n,e},r),s=Object.entries(o).map(e=>{var r=S1(e,2),i=r[0],a=r[1];return{stackId:i,dataKeys:a.map(e=>e.dataKey),barSize:O1(t,n,a[0]?.barSize)}}),c=a.map(e=>({stackId:void 0,dataKeys:[e.dataKey].filter(e=>e!=null),barSize:O1(t,n,e.barSize)}));return[...s,...c]};function A1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function j1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?A1(Object(n),!0).forEach(function(t){M1(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A1(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function M1(e,t,n){return(t=N1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N1(e){var t=P1(e,`string`);return typeof t==`symbol`?t:t+``}function P1(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function F1(e,t,n,r,i){var a=r.length;if(!(a<1)){var o=xC(e,n,0,!0),s,c=[];if(NO(r[0]?.barSize)){var l=!1,u=n/a,d=r.reduce((e,t)=>e+(t.barSize||0),0);d+=(a-1)*o,d>=n&&(d-=(a-1)*o,o=0),d>=n&&u>0&&(l=!0,u*=.9,d=a*u);var f={offset:Math.round((n-d)/2)-o,size:0};s=r.reduce((e,t)=>{var n={stackId:t.stackId,dataKeys:t.dataKeys,position:{offset:f.offset+f.size+o,size:l?u:t.barSize??0}},r=[...e,n];return f=n.position,r},c)}else{var p=xC(t,n,0,!0);n-2*p-(a-1)*o<=0&&(o=0);var m=(n-2*p-(a-1)*o)/a;m>1&&(m=Math.round(m));var h=NO(i)?Math.min(m,i):m;s=r.reduce((e,t,n)=>[...e,{stackId:t.stackId,dataKeys:t.dataKeys,position:{offset:p+(m+o)*n+(m-h)/2,size:h}}],c)}return s}}var I1=(e,t,n,r,i,a,o)=>{var s=TC(o)?t:o,c=F1(n,r,i===a?a:i,e,s);return i!==a&&c!=null&&(c=c.map(e=>j1(j1({},e),{},{position:j1(j1({},e.position),{},{offset:e.position.offset-i/2})}))),c},L1=(e,t)=>{var n=HI(t);if(!(!e||n==null||t==null)){var r=t.stackId;if(r!=null){var i=e[r];if(i){var a=i.stackedData;if(a)return a.find(e=>e.key===n)}}}},R1=(e,t)=>{if(!(e==null||t==null)){var n=e.find(e=>e.stackId===t.stackId&&t.dataKey!=null&&e.dataKeys.includes(t.dataKey));if(n!=null)return n.position}};function z1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function B1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?z1(Object(n),!0).forEach(function(t){V1(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z1(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function V1(e,t,n){return(t=H1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H1(e){var t=U1(e,`string`);return typeof t==`symbol`?t:t+``}function U1(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var W1=$([(e,t)=>AI(e,t),(e,t)=>XX(e,`radiusAxis`,t)],(e,t)=>{if(!(e==null||t==null))return B1(B1({},e),{},{scale:t})}),G1=(e,t)=>eZ(e,`radiusAxis`,t,!1),K1=$([(e,t,n)=>kI(e,n),(e,t,n)=>XX(e,`angleAxis`,n)],(e,t)=>{if(!(e==null||t==null))return B1(B1({},e),{},{scale:t})}),q1=(e,t,n)=>QX(e,`angleAxis`,n,!1),J1=$([BX,(e,t,n,r)=>r],(e,t)=>{if(e.some(e=>e.type===`radialBar`&&t.dataKey===e.dataKey&&t.stackId===e.stackId))return t}),Y1=$([vA,W1,G1,K1,q1],(e,t,n,r,i)=>HO(e,`radiusAxis`)?rk(t,n,!1):rk(r,i,!1)),X1=$([K1,W1,vA],(e,t,n)=>{var r=n===`radial`?e:t;if(!(r==null||r.scale==null))return ZO({numericAxis:r})}),Z1=(e,t,n,r,i)=>i,Q1=(e,t,n,r,i)=>n,$1=(e,t,n,r,i)=>t,e0=(e,t,n,r,i)=>r.maxBarSize,t0=e=>e.type===`radialBar`,n0=$([$([$([$([vA,BX,Q1,$1],(e,t,n,r)=>t.filter(t=>e===`centric`?t.angleAxisId===n:t.radiusAxisId===r).filter(e=>e.hide===!1).filter(t0)),lI,()=>void 0],k1),oI,sI,cI,$([vA,oI,K1,q1,W1,G1,e0],(e,t,n,r,i,a,o)=>{var s=TC(o)?t:o;return e===`centric`?rk(n,r,!0)??s??0:rk(i,a,!0)??s??0}),Y1,e0],I1),J1],R1),r0=$([VX],e=>e.filter(t0).filter(WI)),i0=$([$([r0,OF,wU],UI),r0,uI,dI],DU),a0=$([K1,q1,W1,G1,DF,J1,Y1,vA,X1,zI,Z1,n0,$([(e,t,n)=>vA(e)===`centric`?i0(e,`radiusAxis`,t):i0(e,`angleAxis`,n),J1],L1)],(e,t,n,r,i,a,o,s,c,l,u,d,f)=>{var p=i.chartData,m=i.dataStartIndex,h=i.dataEndIndex;if(a==null||n==null||e==null||p==null||o==null||d==null||s!==`centric`&&s!==`radial`||r==null||l==null)return[];var g=a.dataKey,_=a.minPointSize,v=l.cx,y=l.cy,b=l.startAngle,x=l.endAngle;return A0({angleAxis:e,angleAxisTicks:t,bandSize:o,baseValue:c,cells:u,cx:v,cy:y,dataKey:g,dataStartIndex:m,displayedData:p.slice(m,h+1),endAngle:x,layout:s,minPointSize:_,pos:d,radiusAxis:n,radiusAxisTicks:r,stackedData:f,stackedDomain:f?(s===`centric`?n:e).scale.domain():null,startAngle:b})}),o0=$([OF,(e,t)=>t],(e,t)=>{var n=e.chartData,r=e.dataStartIndex,i=e.dataEndIndex;if(n==null)return[];var a=n.slice(r,i+1);return a.length===0?[]:a.map(e=>({type:t,value:e.name,color:e.fill,payload:e}))});function s0(e,t){return e&&typeof e==`object`&&`zIndex`in e&&typeof e.zIndex==`number`&&NO(e.zIndex)?e.zIndex:t}var c0=[`shape`,`activeShape`,`cornerRadius`,`id`],l0=[`onMouseEnter`,`onClick`,`onMouseLeave`],u0=[`value`,`background`];function d0(){return d0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},d0.apply(null,arguments)}function f0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function p0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?f0(Object(n),!0).forEach(function(t){m0(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f0(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function m0(e,t,n){return(t=h0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h0(e){var t=g0(e,`string`);return typeof t==`symbol`?t:t+``}function g0(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function _0(e,t){if(e==null)return{};var n,r,i=v0(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function v0(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var y0=[];function b0(e){var t=e.showLabels,n=e.sectors,r=e.children,i=n.map(e=>({value:e.value,payload:e.payload,parentViewBox:void 0,clockWise:!1,viewBox:{cx:e.cx,cy:e.cy,innerRadius:e.innerRadius,outerRadius:e.outerRadius,startAngle:e.startAngle,endAngle:e.endAngle,clockWise:!1},fill:e.fill}));return v.createElement(SX,{value:t?i:void 0},r)}function x0(e){var t=e.sectors,n=e.allOtherRadialBarProps,r=e.showLabels,i=e.animationElapsedTime,a=e.isAnimating,o=e.isEntrance,s=n.shape,c=n.activeShape,l=n.cornerRadius,u=n.id,d=_0(n,c0),f=Wx(d),p=Q(_K),m=n.onMouseEnter,h=n.onClick,g=n.onMouseLeave,_=_0(n,l0),y=aQ(m,n.dataKey,u),b=oQ(g),x=sQ(h,n.dataKey,u);return t==null?null:v.createElement(b0,{showLabels:r,sectors:t},t.map((e,t)=>{var n=!!(c&&p===String(t)),r=y(e,t),u=b(e,t),m=x(e,t),h=p0(p0(p0(p0({},f),{},{cornerRadius:b1(l)},e),MC(_,e,t)),{},{onMouseEnter:r,onMouseLeave:u,onClick:m,className:`recharts-radial-bar-sector ${e.className}`,forceCornerRadius:d.forceCornerRadius,cornerIsExternal:d.cornerIsExternal,animationElapsedTime:i,isAnimating:a,isEntrance:o,isActive:n,option:n&&c!=null?c:s,index:t});return n?v.createElement(xq,{zIndex:_I.activeBar,key:`sector-${e.cx}-${e.cy}-${e.innerRadius}-${e.outerRadius}-${e.startAngle}-${e.endAngle}-${t}`},v.createElement(x1,h)):v.createElement(x1,d0({key:`sector-${e.cx}-${e.cy}-${e.innerRadius}-${e.outerRadius}-${e.startAngle}-${e.endAngle}-${t}`},h))}),v.createElement(EX,{label:n.label}),n.children)}var S0=(e,t)=>e==null?[]:t===1?e.flatMap(e=>e.status===`removed`?[]:[e.next]):e.flatMap(e=>e.status===`removed`?[]:e.status===`matched`?[p0(p0({},e.next),{},{startAngle:CC(e.prev.startAngle,e.next.startAngle,t),endAngle:CC(e.prev.endAngle,e.next.endAngle,t)})]:[p0(p0({},e.next),{},{endAngle:CC(e.next.startAngle,e.next.endAngle,t)})]);function C0(e){var t=e.props,n=e.previousSectorsRef,r=t.sectors,i=t.isAnimationActive,a=t.animationBegin,o=t.animationDuration,s=t.animationEasing,c=t.onAnimationStart,l=t.onAnimationEnd,u=MQ(c,l),d=u.isAnimating,f=u.handleAnimationStart,p=u.handleAnimationEnd,m=SA();return m==null?null:v.createElement(NQ,{animationInput:t,animationIdPrefix:`recharts-radialbar-`,items:r,previousItemsRef:n,isAnimationActive:i,animationBegin:a,animationDuration:o,animationEasing:s,onAnimationStart:f,onAnimationEnd:p,animationInterpolateFn:t.animationInterpolateFn,animationMatchBy:t.animationMatchBy,layout:m},(e,n,r)=>v.createElement(x0,{sectors:e,allOtherRadialBarProps:t,showLabels:!d,animationElapsedTime:n,isAnimating:d||n<1,isEntrance:r}))}function w0(e){var t=(0,v.useRef)(null);return v.createElement(C0,{props:e,previousSectorsRef:t})}function T0(e){var t=Q(t=>o0(t,e.legendType));return v.createElement(uQ,{legendPayload:t??[]})}var E0=v.memo(e=>{var t=e.dataKey,n=e.sectors,r=e.stroke,i=e.strokeWidth,a=e.name,o=e.hide,s=e.fill,c=e.tooltipType,l=e.formatter,u={dataDefinedOnItem:n,getPosition:OC,settings:{graphicalItemId:e.id,stroke:r,strokeWidth:i,fill:s,nameKey:void 0,dataKey:t,name:ak(a,t),hide:o,type:c,color:s,unit:``,formatter:l}};return v.createElement(cQ,{tooltipEntrySettings:u})}),D0=class extends v.PureComponent{renderBackground(e){if(e==null)return null;var t=this.props.cornerRadius,n=Gx(this.props.background);return v.createElement(xq,{zIndex:s0(this.props.background,_I.barBackground)},e.map((e,r)=>{e.value;var i=e.background,a=_0(e,u0);if(!i)return null;var o=p0(p0(p0(p0(p0({cornerRadius:b1(t)},a),{},{fill:`#eee`},i),n),MC(this.props,e,r)),{},{index:r,className:dv(`recharts-radial-bar-background-sector`,String(n?.className)),option:i,isActive:!1});return v.createElement(x1,d0({key:`background-${a.cx}-${a.cy}-${a.innerRadius}-${a.outerRadius}-${a.startAngle}-${a.endAngle}-${r}`},o))}))}render(){var e=this.props,t=e.hide,n=e.sectors,r=e.className,i=e.background;if(t)return null;var a=dv(`recharts-area`,r);return v.createElement(xq,{zIndex:this.props.zIndex},v.createElement(rS,{className:a},i&&v.createElement(rS,{className:`recharts-radial-bar-background`},this.renderBackground(n)),v.createElement(rS,{className:`recharts-radial-bar-sectors`},v.createElement(w0,this.props))))}};function O0(e){var t=v.useMemo(()=>KZ(e.children,xJ),[e.children]),n=v.useMemo(()=>({data:void 0,hide:!1,id:e.id,dataKey:e.dataKey,minPointSize:e.minPointSize,stackId:JO(e.stackId),maxBarSize:e.maxBarSize,barSize:e.barSize,type:`radialBar`,angleAxisId:e.angleAxisId,radiusAxisId:e.radiusAxisId}),[e.id,e.dataKey,e.minPointSize,e.stackId,e.maxBarSize,e.barSize,e.angleAxisId,e.radiusAxisId]),r=Q(r=>a0(r,e.radiusAxisId,e.angleAxisId,n,t))??y0;return v.createElement(v.Fragment,null,v.createElement(E0,{dataKey:e.dataKey,sectors:r,stroke:e.stroke,strokeWidth:e.strokeWidth,name:e.name,hide:e.hide,fill:e.fill,tooltipType:e.tooltipType,formatter:e.formatter,id:e.id}),v.createElement(D0,d0({},e,{sectors:r})))}var k0={angleAxisId:0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,animationMatchBy:vQ,animationInterpolateFn:S0,background:!1,cornerIsExternal:!1,cornerRadius:0,forceCornerRadius:!1,hide:!1,isAnimationActive:`auto`,label:!1,legendType:`rect`,minPointSize:0,radiusAxisId:0,shape:y1,zIndex:_I.bar};function A0(e){var t=e.displayedData,n=e.stackedData,r=e.dataStartIndex,i=e.stackedDomain,a=e.dataKey,o=e.baseValue,s=e.layout,c=e.radiusAxis,l=e.radiusAxisTicks,u=e.bandSize,d=e.pos,f=e.angleAxis,p=e.minPointSize,m=e.cx,h=e.cy,g=e.angleAxisTicks,_=e.cells,v=e.startAngle,y=e.endAngle;return g==null||l==null?y0:(t??[]).map((e,t)=>{var b,x,S,C,w,T;if(n?b=GO(n[r+t],i):(b=BO(e,a),Array.isArray(b)||(b=[o,b])),s===`radial`){if(C=f.scale.map(b[0])??v,w=f.scale.map(b[1])??y,x=XO({axis:c,ticks:l,bandSize:u,offset:d.offset,entry:e,index:t}),x!=null&&w!=null&&C!=null){S=x+d.size;var E=w-C;if(Math.abs(p)>0&&Math.abs(E)<Math.abs(p)){var D=hC(E||p)*(Math.abs(p)-Math.abs(E));w+=D}T={background:{cx:m,cy:h,innerRadius:x,outerRadius:S,startAngle:v,endAngle:y}}}}else if(x=c.scale.map(b[0]),S=c.scale.map(b[1]),C=XO({axis:f,ticks:g,bandSize:u,offset:d.offset,entry:e,index:t}),x!=null&&S!=null&&C!=null){w=C+d.size;var O=S-x;if(Math.abs(p)>0&&Math.abs(O)<Math.abs(p)){var k=hC(O||p)*(Math.abs(p)-Math.abs(O));S+=k}}return p0(p0(p0({},e),T),{},{payload:e,value:n?b:b[1],cx:m,cy:h,innerRadius:x,outerRadius:S,startAngle:C,endAngle:w},_&&_[t]&&_[t].props)})}function j0(e){var t=RC(e,k0);return v.createElement(UQ,{id:t.id,type:`radialBar`},e=>v.createElement(v.Fragment,null,v.createElement(e$,{type:`radialBar`,id:e,data:void 0,dataKey:t.dataKey,hide:t.hide??k0.hide,angleAxisId:t.angleAxisId??k0.angleAxisId,radiusAxisId:t.radiusAxisId??k0.radiusAxisId,stackId:JO(t.stackId),barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize}),v.createElement(T0,t),v.createElement(O0,d0({},t,{id:e}))))}j0.displayName=`RadialBar`;var M0=e=>{var t=e.chartData,n=$w(),r=Ak();return(0,v.useEffect)(()=>r?()=>{}:(n(Wq(t)),()=>{n(Wq(void 0))}),[t,n,r]),null},N0={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},P0=LD({name:`brush`,initialState:N0,reducers:{setBrushSettings(e,t){return t.payload==null?N0:t.payload}}});P0.actions.setBrushSettings;var F0=P0.reducer;function I0(e){return(e%180+180)%180}var L0=function(e){var t=e.width,n=e.height,r=I0(arguments.length>1&&arguments[1]!==void 0?arguments[1]:0)*Math.PI/180,i=Math.atan(n/t),a=r>i&&r<Math.PI-i?n/Math.sin(r):t/Math.cos(r);return Math.abs(a)},R0=LD({name:`referenceElements`,initialState:{dots:[],areas:[],lines:[]},reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=cD(e).dots.findIndex(e=>e===t.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=cD(e).areas.findIndex(e=>e===t.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(Wj(t.payload))},removeLine:(e,t)=>{var n=cD(e).lines.findIndex(e=>e===t.payload);n!==-1&&e.lines.splice(n,1)}}}),z0=R0.actions;z0.addDot,z0.removeDot,z0.addArea,z0.removeArea,z0.addLine,z0.removeLine;var B0=R0.reducer;function V0(e,t){return K0(e)||G0(e,t)||U0(e,t)||H0()}function H0(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
130
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function U0(e,t){if(e){if(typeof e==`string`)return W0(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?W0(e,t):void 0}}function W0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function G0(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function K0(e){if(Array.isArray(e))return e}var q0=(0,v.createContext)(void 0),J0=e=>{var t=e.children,n=V0((0,v.useState)(`${bC(`recharts`)}-clip`),1)[0],r=s1();if(r==null)return null;var i=r.x,a=r.y,o=r.width,s=r.height;return v.createElement(q0.Provider,{value:n},v.createElement(`defs`,null,v.createElement(`clipPath`,{id:n},v.createElement(`rect`,{x:i,y:a,height:s,width:o}))),t)};function Y0(e,t){if(t<1)return[];if(t===1)return e;for(var n=[],r=0;r<e.length;r+=t){var i=e[r];i!==void 0&&n.push(i)}return n}function X0(e,t,n){return L0({width:e.width+t.width,height:e.height+t.height},n)}function Z0(e,t,n){var r=n===`width`,i=e.x,a=e.y,o=e.width,s=e.height;return t===1?{start:r?i:a,end:r?i+o:a+s}:{start:r?i+o:a+s,end:r?i:a}}function Q0(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function $0(e,t){return Y0(e,t+1)}function e2(e,t,n,r,i){for(var a=(r||[]).slice(),o=t.start,s=t.end,c=0,l=1,u=o,d=function(){var t=r?.[c];if(t===void 0)return{v:Y0(r,l)};var a=c,d,f=()=>(d===void 0&&(d=n(t,a)),d),p=t.coordinate,m=c===0||Q0(e,p,f,u,s);m||(c=0,u=o,l+=1),m&&(u=p+e*(f()/2+i),c+=l)},f;l<=a.length;)if(f=d(),f)return f.v;return[]}function t2(e,t,n,r,i){var a=(r||[]).slice().length;if(a===0)return[];for(var o=t.start,s=t.end,c=1;c<=a;c++){for(var l=(a-1)%c,u=o,d=!0,f=function(){var t=r[m];if(t==null)return 0;var a=m,o,c=()=>(o===void 0&&(o=n(t,a)),o),f=t.coordinate,p=m===l||Q0(e,f,c,u,s);if(!p)return d=!1,1;p&&(u=f+e*(c()/2+i))},p,m=l;m<a&&(p=f(),!(p!==0&&p===1));m+=c);if(d){for(var h=[],g=l;g<a;g+=c){var _=r[g];_!=null&&h.push(_)}return h}}return[]}function n2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function r2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?n2(Object(n),!0).forEach(function(t){i2(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):n2(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function i2(e,t,n){return(t=a2(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a2(e){var t=o2(e,`string`);return typeof t==`symbol`?t:t+``}function o2(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function s2(e,t,n,r,i){for(var a=(r||[]).slice(),o=a.length,s=t.start,c=t.end,l=function(t){var r=a[t];if(r==null)return 1;var l=r,u,d=()=>(u===void 0&&(u=n(r,t)),u);if(t===o-1){var f=e*(l.coordinate+e*d()/2-c);a[t]=l=r2(r2({},l),{},{tickCoord:f>0?l.coordinate-f*e:l.coordinate})}else a[t]=l=r2(r2({},l),{},{tickCoord:l.coordinate});l.tickCoord!=null&&Q0(e,l.tickCoord,d,s,c)&&(c=l.tickCoord-e*(d()/2+i),a[t]=r2(r2({},l),{},{isShow:!0}))},u=o-1;u>=0;u--)if(l(u))continue;return a}function c2(e,t,n,r,i,a){var o=(r||[]).slice(),s=o.length,c=t.start,l=t.end;if(a){var u=r[s-1];if(u!=null){var d=n(u,s-1),f=e*(u.coordinate+e*d/2-l);o[s-1]=u=r2(r2({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate}),u.tickCoord!=null&&Q0(e,u.tickCoord,()=>d,c,l)&&(l=u.tickCoord-e*(d/2+i),o[s-1]=r2(r2({},u),{},{isShow:!0}))}}for(var p=a?s-1:s,m=function(t){var r=o[t];if(r==null)return 1;var a=r,s,u=()=>(s===void 0&&(s=n(r,t)),s);if(t===0){var d=e*(a.coordinate-e*u()/2-c);o[t]=a=r2(r2({},a),{},{tickCoord:d<0?a.coordinate-d*e:a.coordinate})}else o[t]=a=r2(r2({},a),{},{tickCoord:a.coordinate});a.tickCoord!=null&&Q0(e,a.tickCoord,u,c,l)&&(c=a.tickCoord+e*(u()/2+i),o[t]=r2(r2({},a),{},{isShow:!0}))},h=0;h<p;h++)if(m(h))continue;return o}function l2(e,t,n){var r=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,s=e.orientation,c=e.interval,l=e.tickFormatter,u=e.unit,d=e.angle;if(!i||!i.length||!r)return[];if(Z(c)||RM.isSsr)return $0(i,Z(c)?c:0)??[];var f=[],p=s===`top`||s===`bottom`?`width`:`height`,m=u&&p===`width`?LJ(u,{fontSize:t,letterSpacing:n}):{width:0,height:0},h=(e,r)=>{var i=typeof l==`function`?l(e.value,r):e.value;return p===`width`?X0(LJ(i,{fontSize:t,letterSpacing:n}),m,d):LJ(i,{fontSize:t,letterSpacing:n})[p]},g=i[0],_=i[1],v=i.length>=2&&g!=null&&_!=null?hC(_.coordinate-g.coordinate):1,y=Z0(a,v,p);return c===`equidistantPreserveStart`?e2(v,y,h,i,o):c===`equidistantPreserveEnd`?t2(v,y,h,i,o):(f=c===`preserveStart`||c===`preserveStartEnd`?c2(v,y,h,i,o,c===`preserveStartEnd`):s2(v,y,h,i,o),f.filter(e=>e.isShow))}var u2=e=>{var t=e.ticks,n=e.label,r=e.labelGapWithTick,i=r===void 0?5:r,a=e.tickSize,o=a===void 0?0:a,s=e.tickMargin,c=s===void 0?0:s,l=0;if(t){Array.from(t).forEach(e=>{if(e){var t=e.getBoundingClientRect();t.width>l&&(l=t.width)}});var u=n?n.getBoundingClientRect().width:0,d=o+c,f=l+d+u+(n?i:0);return Math.round(f)}return 0},d2=LD({name:`renderedTicks`,initialState:{xAxis:{},yAxis:{}},reducers:{setRenderedTicks:(e,t)=>{var n=t.payload,r=n.axisType,i=n.axisId,a=n.ticks;e[r][i]=Wj(a)},removeRenderedTicks:(e,t)=>{var n=t.payload,r=n.axisType,i=n.axisId;delete e[r][i]}}}),f2=d2.actions,p2=f2.setRenderedTicks,m2=f2.removeRenderedTicks,h2=d2.reducer,g2=[`axisLine`,`width`,`height`,`className`,`hide`,`ticks`,`axisType`,`axisId`];function _2(e,t){return S2(e)||x2(e,t)||y2(e,t)||v2()}function v2(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
131
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y2(e,t){if(e){if(typeof e==`string`)return b2(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b2(e,t):void 0}}function b2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function x2(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function S2(e){if(Array.isArray(e))return e}function C2(e,t){if(e==null)return{};var n,r,i=w2(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function w2(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function T2(){return T2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T2.apply(null,arguments)}function E2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function D2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?E2(Object(n),!0).forEach(function(t){O2(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E2(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function O2(e,t,n){return(t=k2(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k2(e){var t=A2(e,`string`);return typeof t==`symbol`?t:t+``}function A2(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var j2={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:`bottom`,ticks:[],stroke:`#666`,tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:`preserveEnd`,zIndex:_I.axis};function M2(e){var t=e.x,n=e.y,r=e.width,i=e.height,a=e.orientation,o=e.mirror,s=e.axisLine,c=e.otherSvgProps;if(!s)return null;var l=D2(D2(D2({},c),Wx(s)),{},{fill:`none`});if(a===`top`||a===`bottom`){var u=+(a===`top`&&!o||a===`bottom`&&o);l=D2(D2({},l),{},{x1:t,y1:n+u*i,x2:t+r,y2:n+u*i})}else{var d=+(a===`left`&&!o||a===`right`&&o);l=D2(D2({},l),{},{x1:t+d*r,y1:n,x2:t+d*r,y2:n+i})}return v.createElement(`line`,T2({},l,{className:dv(`recharts-cartesian-axis-line`,uC(s,`className`))}))}function N2(e,t,n,r,i,a,o,s,c){var l,u,d,f,p,m,h=s?-1:1,g=e.tickSize||o,_=Z(e.tickCoord)?e.tickCoord:e.coordinate;switch(a){case`top`:l=u=e.coordinate,f=n+ +!s*i,d=f-h*g,m=d-h*c,p=_;break;case`left`:d=f=e.coordinate,u=t+ +!s*r,l=u-h*g,p=l-h*c,m=_;break;case`right`:d=f=e.coordinate,u=t+ +s*r,l=u+h*g,p=l+h*c,m=_;break;default:l=u=e.coordinate,f=n+ +s*i,d=f+h*g,m=d+h*c,p=_;break}return{line:{x1:l,y1:d,x2:u,y2:f},tick:{x:p,y:m}}}function P2(e,t){switch(e){case`left`:return t?`start`:`end`;case`right`:return t?`end`:`start`;default:return`middle`}}function F2(e,t){switch(e){case`left`:case`right`:return`middle`;case`top`:return t?`start`:`end`;default:return t?`end`:`start`}}function I2(e){var t=e.option,n=e.tickProps,r=e.value,i,a=dv(n.className,`recharts-cartesian-axis-tick-value`);if(v.isValidElement(t))i=v.cloneElement(t,D2(D2({},n),{},{className:a}));else if(typeof t==`function`)i=t(D2(D2({},n),{},{className:a}));else{var o=`recharts-cartesian-axis-tick-value`;typeof t!=`boolean`&&(o=dv(o,oZ(t))),i=v.createElement(PY,T2({},n,{className:o}),r)}return i}function L2(e){var t=e.ticks,n=e.axisType,r=e.axisId,i=$w();return(0,v.useEffect)(()=>r==null||n==null?OC:(i(p2({ticks:t.map(e=>({value:e.value,coordinate:e.coordinate,offset:e.offset,index:e.index})),axisId:r,axisType:n})),()=>{i(m2({axisId:r,axisType:n}))}),[i,t,r,n]),null}var R2=(0,v.forwardRef)((e,t)=>{var n=e.ticks,r=n===void 0?[]:n,i=e.tick,a=e.tickLine,o=e.stroke,s=e.tickFormatter,c=e.unit,l=e.padding,u=e.tickTextProps,d=e.orientation,f=e.mirror,p=e.x,m=e.y,h=e.width,g=e.height,_=e.tickSize,y=e.tickMargin,b=e.fontSize,x=e.letterSpacing,S=e.getTicksConfig,C=e.events,w=e.axisType,T=e.axisId,E=l2(D2(D2({},S),{},{ticks:r}),b,x),D=Wx(S),O=Gx(i),k=CY(D.textAnchor)?D.textAnchor:P2(d,f),A=F2(d,f),j={};typeof a==`object`&&(j=a);var M=D2(D2({},D),{},{fill:`none`},j),N=E.map(e=>D2({entry:e},N2(e,p,m,h,g,d,_,f,y))),P=N.map(e=>{var t=e.entry,n=e.line;return v.createElement(rS,{className:`recharts-cartesian-axis-tick`,key:`tick-${t.value}-${t.coordinate}-${t.tickCoord}`},a&&v.createElement(`line`,T2({},M,n,{className:dv(`recharts-cartesian-axis-tick-line`,uC(a,`className`))})))}),F=N.map((e,t)=>{var n=e.entry,r=e.tick,a=D2(D2({},D2(D2(D2(D2({verticalAnchor:A},D),{},{textAnchor:k,stroke:`none`,fill:o},r),{},{index:t,payload:n,visibleTicksCount:E.length,tickFormatter:s,padding:l},u),{},{angle:u?.angle??D.angle??0})),O);return v.createElement(rS,T2({className:`recharts-cartesian-axis-tick-label`,key:`tick-label-${n.value}-${n.coordinate}-${n.tickCoord}`},MC(C,n,t)),i&&v.createElement(I2,{option:i,tickProps:a,value:`${typeof s==`function`?s(n.value,t):n.value}${c||``}`}))});return v.createElement(`g`,{className:`recharts-cartesian-axis-ticks recharts-${w}-ticks`},v.createElement(L2,{ticks:E,axisId:T,axisType:w}),F.length>0&&v.createElement(xq,{zIndex:_I.label},v.createElement(`g`,{className:`recharts-cartesian-axis-tick-labels recharts-${w}-tick-labels`,ref:t},F)),P.length>0&&v.createElement(`g`,{className:`recharts-cartesian-axis-tick-lines recharts-${w}-tick-lines`},P))}),z2=(0,v.forwardRef)((e,t)=>{var n=e.axisLine,r=e.width,i=e.height,a=e.className,o=e.hide,s=e.ticks,c=e.axisType,l=e.axisId,u=C2(e,g2),d=_2((0,v.useState)(``),2),f=d[0],p=d[1],m=_2((0,v.useState)(``),2),h=m[0],g=m[1],_=(0,v.useRef)(null);(0,v.useImperativeHandle)(t,()=>({getCalculatedWidth:()=>u2({ticks:_.current,label:e.labelRef?.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}));var y=(0,v.useCallback)(e=>{if(e){var t=e.getElementsByClassName(`recharts-cartesian-axis-tick-value`);_.current=t;var n=t[0];if(n){var r=window.getComputedStyle(n),i=r.fontSize,a=r.letterSpacing;(i!==f||a!==h)&&(p(i),g(a))}}},[f,h]);return o||r!=null&&r<=0||i!=null&&i<=0?null:v.createElement(xq,{zIndex:e.zIndex},v.createElement(rS,{className:dv(`recharts-cartesian-axis`,a)},v.createElement(M2,{x:e.x,y:e.y,width:r,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:Wx(e)}),v.createElement(R2,{ref:y,axisType:c,events:u,fontSize:f,getTicksConfig:e,height:e.height,letterSpacing:h,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:s,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:l}),v.createElement(QY,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},v.createElement(fX,{label:e.label,labelRef:e.labelRef}),e.children)))}),B2=v.forwardRef((e,t)=>{var n=RC(e,j2);return v.createElement(z2,T2({},n,{ref:t}))});B2.displayName=`CartesianAxis`;var V2=[`x1`,`y1`,`x2`,`y2`,`key`],H2=[`offset`],U2=[`xAxisId`,`yAxisId`],W2=[`xAxisId`,`yAxisId`];function G2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function K2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?G2(Object(n),!0).forEach(function(t){q2(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G2(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function q2(e,t,n){return(t=J2(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function J2(e){var t=Y2(e,`string`);return typeof t==`symbol`?t:t+``}function Y2(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function X2(){return X2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},X2.apply(null,arguments)}function Z2(e,t){if(e==null)return{};var n,r,i=Q2(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Q2(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var $2=e=>{var t=e.fill;if(!t||t===`none`)return null;var n=e.fillOpacity,r=e.x,i=e.y,a=e.width,o=e.height,s=e.ry;return v.createElement(`rect`,{x:r,y:i,ry:s,width:a,height:o,stroke:`none`,fill:t,fillOpacity:n,className:`recharts-cartesian-grid-bg`})};function e4(e){var t=e.option,n=e.lineItemProps,r;if(v.isValidElement(t))r=v.cloneElement(t,n);else if(typeof t==`function`)r=t(n);else{var i=n.x1,a=n.y1,o=n.x2,s=n.y2,c=n.key,l=Wx(Z2(n,V2))??{};l.offset;var u=Z2(l,H2);r=v.createElement(`line`,X2({},u,{x1:i,y1:a,x2:o,y2:s,fill:`none`,key:c}))}return r}function t4(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,a=e.horizontalPoints;if(!i||!a||!a.length)return null;e.xAxisId,e.yAxisId;var o=Z2(e,U2),s=a.map((e,r)=>{var a=K2(K2({},o),{},{x1:t,y1:e,x2:t+n,y2:e,key:`line-${r}`,index:r});return v.createElement(e4,{key:`line-${r}`,option:i,lineItemProps:a})});return v.createElement(`g`,{className:`recharts-cartesian-grid-horizontal`},s)}function n4(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,a=e.verticalPoints;if(!i||!a||!a.length)return null;e.xAxisId,e.yAxisId;var o=Z2(e,W2),s=a.map((e,r)=>{var a=K2(K2({},o),{},{x1:e,y1:t,x2:e,y2:t+n,key:`line-${r}`,index:r});return v.createElement(e4,{option:i,lineItemProps:a,key:`line-${r}`})});return v.createElement(`g`,{className:`recharts-cartesian-grid-vertical`},s)}function r4(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,a=e.width,o=e.height,s=e.horizontalPoints,c=e.horizontal;if(!(c===void 0||c)||!t||!t.length||s==null)return null;var l=s.map(e=>Math.round(e+i-i)).sort((e,t)=>e-t);i!==l[0]&&l.unshift(0);var u=l.map((e,s)=>{var c=l[s+1],u=c==null?i+o-e:c-e;if(u<=0)return null;var d=s%t.length;return v.createElement(`rect`,{key:`react-${s}`,y:e,x:r,height:u,width:a,stroke:`none`,fill:t[d],fillOpacity:n,className:`recharts-cartesian-grid-bg`})});return v.createElement(`g`,{className:`recharts-cartesian-gridstripes-horizontal`},u)}function i4(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,s=e.width,c=e.height,l=e.verticalPoints;if(!n||!r||!r.length)return null;var u=l.map(e=>Math.round(e+a-a)).sort((e,t)=>e-t);a!==u[0]&&u.unshift(0);var d=u.map((e,t)=>{var n=u[t+1],l=n==null?a+s-e:n-e;if(l<=0)return null;var d=t%r.length;return v.createElement(`rect`,{key:`react-${t}`,x:e,y:o,width:l,height:c,stroke:`none`,fill:r[d],fillOpacity:i,className:`recharts-cartesian-grid-bg`})});return v.createElement(`g`,{className:`recharts-cartesian-gridstripes-vertical`},d)}var a4=(e,t)=>{var n=e.xAxis,r=e.width,i=e.height,a=e.offset;return UO(l2(K2(K2(K2({},j2),n),{},{ticks:WO(n,!0),viewBox:{x:0,y:0,width:r,height:i}})),a.left,a.left+a.width,t)},o4=(e,t)=>{var n=e.yAxis,r=e.width,i=e.height,a=e.offset;return UO(l2(K2(K2(K2({},j2),n),{},{ticks:WO(n,!0),viewBox:{x:0,y:0,width:r,height:i}})),a.top,a.top+a.height,t)},s4={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:`#ccc`,fill:`none`,verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:_I.grid};function c4(e){var t=gA(),n=_A(),r=hA(),i=K2(K2({},RC(e,s4)),{},{x:Z(e.x)?e.x:r.left,y:Z(e.y)?e.y:r.top,width:Z(e.width)?e.width:r.width,height:Z(e.height)?e.height:r.height}),a=i.xAxisId,o=i.yAxisId,s=i.x,c=i.y,l=i.width,u=i.height,d=i.syncWithTicks,f=i.horizontalValues,p=i.verticalValues,m=Ak(),h=Q(e=>UW(e,`xAxis`,a,m)),g=Q(e=>UW(e,`yAxis`,o,m));if(!PO(l)||!PO(u)||!Z(s)||!Z(c))return null;var _=i.verticalCoordinatesGenerator||a4,y=i.horizontalCoordinatesGenerator||o4,b=i.horizontalPoints,x=i.verticalPoints;if((!b||!b.length)&&typeof y==`function`){var S=f&&f.length,C=y({yAxis:g?K2(K2({},g),{},{ticks:S?f:g.ticks}):void 0,width:t??l,height:n??u,offset:r},S?!0:d);Ik(Array.isArray(C),`horizontalCoordinatesGenerator should return Array but instead it returned [${typeof C}]`),Array.isArray(C)&&(b=C)}if((!x||!x.length)&&typeof _==`function`){var w=p&&p.length,T=_({xAxis:h?K2(K2({},h),{},{ticks:w?p:h.ticks}):void 0,width:t??l,height:n??u,offset:r},w?!0:d);Ik(Array.isArray(T),`verticalCoordinatesGenerator should return Array but instead it returned [${typeof T}]`),Array.isArray(T)&&(x=T)}return v.createElement(xq,{zIndex:i.zIndex},v.createElement(`g`,{className:`recharts-cartesian-grid`},v.createElement($2,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),v.createElement(r4,X2({},i,{horizontalPoints:b})),v.createElement(i4,X2({},i,{verticalPoints:x})),v.createElement(t4,X2({},i,{offset:r,horizontalPoints:b,xAxis:h,yAxis:g})),v.createElement(n4,X2({},i,{offset:r,verticalPoints:x,xAxis:h,yAxis:g}))))}c4.displayName=`CartesianGrid`;var l4=LD({name:`errorBars`,initialState:{},reducers:{addErrorBar:(e,t)=>{var n=t.payload,r=n.itemId,i=n.errorBar;e[r]||(e[r]=[]),e[r].push(i)},replaceErrorBar:(e,t)=>{var n=t.payload,r=n.itemId,i=n.prev,a=n.next;e[r]&&(e[r]=e[r].map(e=>e.dataKey===i.dataKey&&e.direction===i.direction?a:e))},removeErrorBar:(e,t)=>{var n=t.payload,r=n.itemId,i=n.errorBar;e[r]&&(e[r]=e[r].filter(e=>e.dataKey!==i.dataKey||e.direction!==i.direction))}}}),u4=l4.actions;u4.addErrorBar,u4.replaceErrorBar,u4.removeErrorBar;var d4=l4.reducer;function f4(e,t){var n=Q(t=>GH(t,e)),r=Q(e=>JH(e,t)),i=n?.allowDataOverflow??UH.allowDataOverflow,a=r?.allowDataOverflow??KH.allowDataOverflow;return{needClip:i||a,needClipX:i,needClipY:a}}function p4(e){var t=e.xAxisId,n=e.yAxisId,r=e.clipPathId,i=s1(),a=f4(t,n),o=a.needClipX,s=a.needClipY,c=a.needClip,l=Q(e=>vW(e,t,!1)),u=Q(e=>yW(e,n,!1));if(!c||!i)return null;var d=i.x,f=i.y,p=i.width,m=i.height,h=o&&l?Math.min(l[0],l[1]):d-p/2,g=s&&u?Math.min(u[0],u[1]):f-m/2,_=o&&l?Math.abs(l[1]-l[0]):p*2,y=s&&u?Math.abs(u[1]-u[0]):m*2;return v.createElement(`clipPath`,{id:`clipPath-${r}`},v.createElement(`rect`,{x:h,y:g,width:_,height:y}))}function m4(e){var t=Gx(e),n=3,r=2;if(t!=null){var i=t.r,a=t.strokeWidth,o=Number(i),s=Number(a);return(Number.isNaN(o)||o<0)&&(o=n),(Number.isNaN(s)||s<0)&&(s=r),{r:o,strokeWidth:s}}return{r:n,strokeWidth:r}}function h4(e,t){return e.graphicalItems.cartesianItems.find(e=>e.id===t)?.xAxisId??0}function g4(e,t){return e.graphicalItems.cartesianItems.find(e=>e.id===t)?.yAxisId??0}var _4=(e,t,n)=>JW(e,`xAxis`,h4(e,t),n),v4=(e,t,n)=>qW(e,`xAxis`,h4(e,t),n),y4=(e,t,n)=>JW(e,`yAxis`,g4(e,t),n),b4=(e,t,n)=>qW(e,`yAxis`,g4(e,t),n),x4=$([vA,_4,y4,v4,b4],(e,t,n,r,i)=>HO(e,`xAxis`)?rk(t,r,!1):rk(n,i,!1)),S4=$([nU,(e,t)=>t],(e,t)=>e.filter(e=>e.type===`area`).find(e=>e.id===t)),C4=e=>HO(vA(e),`xAxis`)?`yAxis`:`xAxis`,w4=(e,t)=>C4(e)===`yAxis`?g4(e,t):h4(e,t),T4=$([vA,_4,y4,v4,b4,$([S4,(e,t,n)=>OU(e,C4(e),w4(e,t),n)],(e,t)=>{if(!(e==null||t==null)){var n=e.stackId,r=HI(e);if(!(n==null||r==null)){var i=(t[n]?.stackedData)?.find(e=>e.key===r);if(i!=null)return i.map(e=>[e[0],e[1]])}}}),AF,x4,S4,gI],(e,t,n,r,i,a,o,s,c,l)=>{var u=o.chartData,d=o.dataStartIndex,f=o.dataEndIndex;if(!(c==null||e!==`horizontal`&&e!==`vertical`||t==null||n==null||r==null||i==null||r.length===0||i.length===0||s==null)){var p=c.data,m=p&&p.length>0?p:u?.slice(d,f+1);if(m!=null)return i3({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:d,areaSettings:c,stackedData:a,displayedData:m,chartBaseValue:l,bandSize:s})}}),E4=[`animationElapsedTime`,`isAnimating`,`isEntrance`,`layout`,`isRange`,`stroke`,`connectNulls`],D4=[`id`,`baseLine`];function O4(){return O4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},O4.apply(null,arguments)}function k4(e,t){if(e==null)return{};var n,r,i=A4(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function A4(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function j4(e){var t=e.alpha,n=e.baseLine,r=e.points,i=e.strokeWidth,a=r[0]?.x,o=r[r.length-1]?.x;if(!NO(a)||!NO(o))return null;var s=t*Math.abs(a-o),c=Math.max(...r.map(e=>e.y||0));return Z(n)?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max(...n.map(e=>e.y||0),c)),Z(c)?v.createElement(`rect`,{x:a<o?a:a-s,y:0,width:s,height:Math.floor(c+(i?parseInt(`${i}`,10):1))}):null}function M4(e){var t=e.alpha,n=e.baseLine,r=e.points,i=e.strokeWidth,a=r[0]?.y,o=r[r.length-1]?.y;if(!NO(a)||!NO(o))return null;var s=t*Math.abs(a-o),c=Math.max(...r.map(e=>e.x||0));return Z(n)?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max(...n.map(e=>e.x||0),c)),Z(c)?v.createElement(`rect`,{x:0,y:a<o?a:a-s,width:c+(i?parseInt(`${i}`,10):1),height:Math.floor(s)}):null}function N4(e){var t=e.alpha,n=e.layout,r=e.points,i=e.baseLine,a=e.strokeWidth;return n===`vertical`?v.createElement(M4,{alpha:t,points:r,baseLine:i,strokeWidth:a}):v.createElement(j4,{alpha:t,points:r,baseLine:i,strokeWidth:a})}function P4(e){var t=e.animationElapsedTime,n=t===void 0?1:t,r=e.isAnimating,i=r===void 0?!1:r,a=e.isEntrance,o=a===void 0?!1:a,s=e.layout,c=e.isRange,l=e.stroke,u=e.connectNulls,d=k4(e,E4),f=s===`vertical`?`vertical`:`horizontal`,p=u??!1,m=BQ(),h=d.id,g=d.baseLine,_=Wx(k4(d,D4)),y=v.createElement(xN,O4({},d,{id:h,baseLine:g,connectNulls:p,stroke:`none`,className:`recharts-area-area`,layout:f})),b=l!==`none`&&v.createElement(xN,O4({},_,{className:`recharts-area-curve`,layout:f,type:d.type,connectNulls:p,fill:`none`,stroke:l,points:d.points})),x=l!==`none`&&c&&Array.isArray(g)&&v.createElement(xN,O4({},_,{className:`recharts-area-curve`,layout:f,type:d.type,connectNulls:p,fill:`none`,stroke:l,points:g}));return o&&(i||n<1)?v.createElement(rS,null,v.createElement(`defs`,null,v.createElement(`clipPath`,{id:m},v.createElement(N4,{alpha:n,points:d.points??[],baseLine:g,layout:f,strokeWidth:d.strokeWidth}))),v.createElement(rS,{clipPath:`url(#${m})`},y,b,x)):v.createElement(v.Fragment,null,y,b,x)}var F4=[`id`],I4=[`activeDot`,`animationBegin`,`animationDuration`,`animationEasing`,`connectNulls`,`dot`,`fill`,`fillOpacity`,`hide`,`isAnimationActive`,`legendType`,`stroke`,`xAxisId`,`yAxisId`];function L4(){return L4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L4.apply(null,arguments)}function R4(e,t){if(e==null)return{};var n,r,i=z4(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function z4(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function B4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function V4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?B4(Object(n),!0).forEach(function(t){H4(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B4(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function H4(e,t,n){return(t=U4(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function U4(e){var t=W4(e,`string`);return typeof t==`symbol`?t:t+``}function W4(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var G4={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,animationMatchBy:_Q,animationInterpolateFn:(e,t)=>e==null?[]:t===1?e.flatMap(e=>e.status===`removed`?[]:[e.next]):e.flatMap(e=>e.status===`matched`?[V4(V4({},e.next),{},{x:CC(e.prev.x,e.next.x,t),y:CC(e.prev.y,e.next.y,t)})]:e.status===`added`?[e.next]:[]),connectNulls:!1,dot:!1,fill:`#3182bd`,fillOpacity:.6,hide:!1,isAnimationActive:`auto`,legendType:`line`,stroke:`#3182bd`,strokeWidth:1,type:`linear`,label:!1,shape:P4,xAxisId:0,yAxisId:0,zIndex:_I.area};function K4(e,t){return e&&e!==`none`?e:t}var q4=e=>{var t=e.dataKey,n=e.name,r=e.stroke,i=e.fill,a=e.legendType;return[{inactive:e.hide,dataKey:t,type:a,color:K4(r,i),value:ak(n,t),payload:e}]},J4=v.memo(e=>{var t=e.dataKey,n=e.data,r=e.stroke,i=e.strokeWidth,a=e.fill,o=e.name,s=e.hide,c=e.unit,l=e.formatter,u=e.tooltipType,d=e.id,f={dataDefinedOnItem:n,getPosition:OC,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:ak(o,t),hide:s,type:u,color:K4(r,a),unit:c,formatter:l,graphicalItemId:d}};return v.createElement(cQ,{tooltipEntrySettings:f})});function Y4(e){var t=e.clipPathId,n=e.points,r=e.props,i=r.needClip,a=r.dot,o=r.dataKey,s=Wx(r);return v.createElement(W$,{points:n,dot:a,className:`recharts-area-dots`,dotClassName:`recharts-area-dot`,dataKey:o,baseProps:s,needClip:i,clipPathId:t})}function X4(e){var t=e.showLabels,n=e.children,r=e.points.map(e=>{var t={x:e.x??0,y:e.y??0,width:0,lowerWidth:0,upperWidth:0,height:0};return V4(V4({},t),{},{value:e.value,payload:e.payload,parentViewBox:void 0,viewBox:t,fill:void 0})});return v.createElement(bX,{value:t?r:void 0},n)}function Z4(e){var t=e.points,n=e.baseLine,r=e.needClip,i=e.clipPathId,a=e.props,o=e.animationElapsedTime,s=e.isAnimating,c=e.isEntrance,l=a.layout,u=a.type,d=a.stroke,f=a.connectNulls,p=a.isRange,m=a.shape,h=a.id,g=R4(a,F4),_=V4(V4({},Kx(g)),{},{id:h,points:t,connectNulls:f,type:u,baseLine:n,layout:l,stroke:d,isRange:p,animationElapsedTime:o,isAnimating:s,isEntrance:c});return v.createElement(v.Fragment,null,t?.length>1&&v.createElement(rS,{clipPath:r?`url(#clipPath-${i})`:void 0},v.createElement(iQ,{option:m,DefaultShape:G4.shape,shapeProps:_})),v.createElement(Y4,{points:t,props:g,clipPathId:i}))}function Q4(e,t,n){return Z(e)?CC(Z(t)?t:void 0,e,n):TC(e)||gC(e)?CC(Z(t)?t:void 0,0,n):e}function $4(e){var t=e.needClip,n=e.clipPathId,r=e.props,i=e.previousPointsRef,a=e.previousBaselineRef,o=r.points,s=r.baseLine,c=r.isAnimationActive,l=r.animationBegin,u=r.animationDuration,d=r.animationEasing,f=r.animationMatchBy,p=r.animationInterpolateFn,m=(0,v.useMemo)(()=>({points:o,baseLine:s}),[o,s]),h=TQ(m,a),g=bA(),_=MQ(r.onAnimationStart,r.onAnimationEnd),y=_.isAnimating,b=_.handleAnimationStart,x=_.handleAnimationEnd,S=h.startValue;if(g==null)return null;var C=Array.isArray(s)&&Array.isArray(S)?wQ(S,s,f):Array.isArray(s)?wQ(null,s,f):null;return v.createElement(NQ,{animationInput:m,animationIdPrefix:`recharts-area-`,items:o,previousItemsRef:i,isAnimationActive:c,animationBegin:l,animationDuration:u,animationEasing:d,onAnimationStart:b,onAnimationEnd:x,animationInterpolateFn:p,animationMatchBy:f,layout:g},(e,i,a)=>{var c=i===1?s:Array.isArray(s)?p(C,i,g):a?s:Q4(s,S,i);return h.syncStepValue(c,i),v.createElement(X4,{showLabels:!y,points:o},r.children,v.createElement(Z4,{points:e,baseLine:c,needClip:t,clipPathId:n,props:r,animationElapsedTime:i,isAnimating:y||i<1,isEntrance:a}),v.createElement(EX,{label:r.label}))})}function e3(e){var t=e.needClip,n=e.clipPathId,r=e.props,i=(0,v.useRef)(null),a=(0,v.useRef)();return v.createElement($4,{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:a})}var t3=class extends v.PureComponent{render(){var e=this.props,t=e.hide,n=e.dot,r=e.points,i=e.className,a=e.top,o=e.left,s=e.needClip,c=e.xAxisId,l=e.yAxisId,u=e.width,d=e.height,f=e.id,p=e.baseLine,m=e.zIndex;if(t)return null;var h=dv(`recharts-area`,i),g=f,_=m4(n),y=_.r,b=_.strokeWidth,x=qZ(n),S=y*2+b,C=s?`url(#clipPath-${x?``:`dots-`}${g})`:void 0;return v.createElement(xq,{zIndex:m},v.createElement(rS,{className:h},s&&v.createElement(`defs`,null,v.createElement(p4,{clipPathId:g,xAxisId:c,yAxisId:l}),!x&&v.createElement(`clipPath`,{id:`clipPath-dots-${g}`},v.createElement(`rect`,{x:o-S/2,y:a-S/2,width:u+S,height:d+S}))),v.createElement(e3,{needClip:s,clipPathId:g,props:this.props})),v.createElement(h1,{points:r,mainColor:K4(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:C}),this.props.isRange&&Array.isArray(p)&&v.createElement(h1,{points:p,mainColor:K4(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:C}))}};function n3(e){var t=e.activeDot,n=e.animationBegin,r=e.animationDuration,i=e.animationEasing,a=e.connectNulls,o=e.dot,s=e.fill,c=e.fillOpacity,l=e.hide,u=e.isAnimationActive,d=e.legendType,f=e.stroke,p=e.xAxisId,m=e.yAxisId,h=R4(e,I4),g=yA(),_=VK(),y=f4(p,m).needClip,b=Ak(),x=Q(t=>T4(t,e.id,b))??{},S=x.points,C=x.isRange,w=x.baseLine,T=s1();if(g!==`horizontal`&&g!==`vertical`||T==null||_!==`AreaChart`&&_!==`ComposedChart`)return null;var E=T.height,D=T.width,O=T.x,k=T.y;return!S||!S.length?null:v.createElement(t3,L4({},h,{activeDot:t,animationBegin:n,animationDuration:r,animationEasing:i,baseLine:w,connectNulls:a,dot:o,fill:s,fillOpacity:c,height:E,hide:l,layout:g,isAnimationActive:u,isRange:C,legendType:d,needClip:y,points:S,stroke:f,width:D,left:O,top:k,xAxisId:p,yAxisId:m}))}var r3=(e,t,n,r,i)=>{var a=n??t;if(Z(a))return a;var o=e===`horizontal`?i:r,s=o.scale.domain();if(o.type===`number`){var c=Math.max(s[0],s[1]),l=Math.min(s[0],s[1]);return a===`dataMin`?l:a===`dataMax`||c<0?c:Math.max(Math.min(s[0],s[1]),0)}return a===`dataMin`?s[0]:a===`dataMax`?s[1]:s[0]};function i3(e){var t=e.areaSettings,n=t.connectNulls,r=t.baseValue,i=t.dataKey,a=e.stackedData,o=e.layout,s=e.chartBaseValue,c=e.xAxis,l=e.yAxis,u=e.displayedData,d=e.dataStartIndex,f=e.xAxisTicks,p=e.yAxisTicks,m=e.bandSize,h=a&&a.length,g=r3(o,s,r,c,l),_=o===`horizontal`,v=!1,y=u.map((e,t)=>{var r;if(h)r=a[d+t];else{var o=BO(e,i);Array.isArray(o)?(r=o,v=!0):r=[g,o]}var s=r?.[1]??null,u=s==null||h&&!n&&BO(e,i)==null;return _?{x:YO({axis:c,ticks:f,bandSize:m,entry:e,index:t}),y:u?null:l.scale.map(s)??null,value:r,payload:e}:{x:u?null:c.scale.map(s)??null,y:YO({axis:l,ticks:p,bandSize:m,entry:e,index:t}),value:r,payload:e}});return{points:y,baseLine:(h||v?y.map(e=>{var t=Array.isArray(e.value)?e.value[0]:null;return _?{x:e.x,y:t!=null&&e.y!=null?l.scale.map(t)??null:null,payload:e.payload}:{x:t==null?null:c.scale.map(t)??null,y:e.y,payload:e.payload}}):_?l.scale.map(g):c.scale.map(g))??0,isRange:v}}function a3(e){var t=RC(e,G4),n=Ak();return v.createElement(UQ,{id:t.id,type:`area`},e=>v.createElement(v.Fragment,null,v.createElement(lQ,{legendPayload:q4(t)}),v.createElement(J4,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,formatter:t.formatter,tooltipType:t.tooltipType,id:e}),v.createElement($Q,{type:`area`,id:e,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:JO(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),v.createElement(n3,L4({},t,{id:e}))))}var o3=v.memo(a3,hM);o3.displayName=`Area`;var s3=[`domain`,`range`],c3=[`domain`,`range`];function l3(e,t){if(e==null)return{};var n,r,i=u3(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function u3(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function d3(e,t){return e===t?!0:Array.isArray(e)&&e.length===2&&Array.isArray(t)&&t.length===2?e[0]===t[0]&&e[1]===t[1]:!1}function f3(e,t){if(e===t)return!0;var n=e.domain,r=e.range,i=l3(e,s3),a=t.domain,o=t.range,s=l3(t,c3);return!d3(n,a)||!d3(r,o)?!1:hM(i,s)}var p3=[`type`],m3=[`dangerouslySetInnerHTML`,`ticks`,`scale`],h3=[`id`,`scale`];function g3(){return g3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},g3.apply(null,arguments)}function _3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function v3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?_3(Object(n),!0).forEach(function(t){y3(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_3(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function y3(e,t,n){return(t=b3(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b3(e){var t=x3(e,`string`);return typeof t==`symbol`?t:t+``}function x3(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function S3(e,t){if(e==null)return{};var n,r,i=C3(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function C3(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function w3(e){var t=$w(),n=(0,v.useRef)(null),r=bA(),i=e.type,a=S3(e,p3),o=xI(r,`xAxis`,i),s=(0,v.useMemo)(()=>{if(o!=null)return v3(v3({},a),{},{type:o})},[a,o]);return(0,v.useLayoutEffect)(()=>{s!=null&&(n.current===null?t(Q$(s)):n.current!==s&&t($$({prev:n.current,next:s})),n.current=s)},[s,t]),(0,v.useLayoutEffect)(()=>()=>{n.current&&=(t(e1(n.current)),null)},[t]),null}var T3=e=>{var t=e.xAxisId,n=e.className,r=Q(Ok),i=Ak(),a=`xAxis`,o=Q(e=>GW(e,a,t,i)),s=Q(e=>NW(e,t)),c=Q(e=>RW(e,t)),l=Q(e=>WH(e,t));if(s==null||c==null||l==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var u=S3(e,m3);l.id,l.scale;var d=S3(l,h3);return v.createElement(B2,g3({},u,d,{x:c.x,y:c.y,width:s.width,height:s.height,className:dv(`recharts-${a} ${a}`,n),viewBox:r,ticks:o,axisType:a,axisId:t}))},E3={allowDataOverflow:UH.allowDataOverflow,allowDecimals:UH.allowDecimals,allowDuplicatedCategory:UH.allowDuplicatedCategory,angle:UH.angle,axisLine:j2.axisLine,height:UH.height,hide:!1,includeHidden:UH.includeHidden,interval:UH.interval,label:!1,minTickGap:UH.minTickGap,mirror:UH.mirror,orientation:UH.orientation,padding:UH.padding,reversed:UH.reversed,scale:UH.scale,tick:UH.tick,tickCount:UH.tickCount,tickLine:j2.tickLine,tickSize:j2.tickSize,type:UH.type,niceTicks:UH.niceTicks,xAxisId:0},D3=v.memo(e=>{var t=RC(e,E3);return v.createElement(v.Fragment,null,v.createElement(w3,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),v.createElement(T3,t))},f3);D3.displayName=`XAxis`;var O3=[`type`],k3=[`dangerouslySetInnerHTML`,`ticks`,`scale`],A3=[`id`,`scale`];function j3(){return j3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j3.apply(null,arguments)}function M3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function N3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?M3(Object(n),!0).forEach(function(t){P3(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M3(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function P3(e,t,n){return(t=F3(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F3(e){var t=I3(e,`string`);return typeof t==`symbol`?t:t+``}function I3(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function L3(e,t){if(e==null)return{};var n,r,i=R3(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function R3(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function z3(e){var t=$w(),n=(0,v.useRef)(null),r=bA(),i=e.type,a=L3(e,O3),o=xI(r,`yAxis`,i),s=(0,v.useMemo)(()=>{if(o!=null)return N3(N3({},a),{},{type:o})},[o,a]);return(0,v.useLayoutEffect)(()=>{s!=null&&(n.current===null?t(t1(s)):n.current!==s&&t(n1({prev:n.current,next:s})),n.current=s)},[s,t]),(0,v.useLayoutEffect)(()=>()=>{n.current&&=(t(r1(n.current)),null)},[t]),null}function B3(e){var t=e.yAxisId,n=e.className,r=e.width,i=e.label,a=(0,v.useRef)(null),o=(0,v.useRef)(null),s=Q(Ok),c=Ak(),l=$w(),u=`yAxis`,d=Q(e=>BW(e,t)),f=Q(e=>zW(e,t)),p=Q(e=>GW(e,u,t,c)),m=Q(e=>qH(e,t));if((0,v.useLayoutEffect)(()=>{if(!(r!==`auto`||!d||rX(i)||(0,v.isValidElement)(i)||m==null)){var e=a.current;if(e){var n=e.getCalculatedWidth();Math.round(d.width)!==Math.round(n)&&l(i1({id:t,width:n}))}}},[p,d,l,i,t,r,m]),d==null||f==null||m==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var h=L3(e,k3);m.id,m.scale;var g=L3(m,A3);return v.createElement(B2,j3({},h,g,{ref:a,labelRef:o,x:f.x,y:f.y,tickTextProps:r===`auto`?{width:void 0}:{width:r},width:d.width,height:d.height,className:dv(`recharts-${u} ${u}`,n),viewBox:s,ticks:p,axisType:u,axisId:t}))}var V3={allowDataOverflow:KH.allowDataOverflow,allowDecimals:KH.allowDecimals,allowDuplicatedCategory:KH.allowDuplicatedCategory,angle:KH.angle,axisLine:j2.axisLine,hide:!1,includeHidden:KH.includeHidden,interval:KH.interval,label:!1,minTickGap:KH.minTickGap,mirror:KH.mirror,orientation:KH.orientation,padding:KH.padding,reversed:KH.reversed,scale:KH.scale,tick:KH.tick,tickCount:KH.tickCount,tickLine:j2.tickLine,tickSize:j2.tickSize,type:KH.type,niceTicks:KH.niceTicks,width:KH.width,yAxisId:0},H3=v.memo(e=>{var t=RC(e,V3);return v.createElement(v.Fragment,null,v.createElement(z3,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),v.createElement(B3,t))},f3);H3.displayName=`YAxis`;var U3=$([(e,t)=>t,vA,zI,JI,uK,fK,GK,Ek],rq);function W3(e){return`getBBox`in e.currentTarget&&typeof e.currentTarget.getBBox==`function`}function G3(e){var t=e.currentTarget.getBoundingClientRect(),n,r;if(W3(e)){var i=e.currentTarget.getBBox();n=i.width>0?t.width/i.width:1,r=i.height>0?t.height/i.height:1}else{var a=e.currentTarget;n=a.offsetWidth>0?t.width/a.offsetWidth:1,r=a.offsetHeight>0?t.height/a.offsetHeight:1}var o=(e,i)=>({relativeX:Math.round((e-t.left)/n),relativeY:Math.round((i-t.top)/r)});return`touches`in e?Array.from(e.touches).map(e=>o(e.clientX,e.clientY)):o(e.clientX,e.clientY)}var K3=hD(`mouseClick`),q3=CO();q3.startListening({actionCreator:K3,effect:(e,t)=>{var n=e.payload,r=U3(t.getState(),G3(n));r?.activeIndex!=null&&t.dispatch(hG({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var J3=hD(`mouseMove`),Y3=CO(),X3=null,Z3=null,Q3=null;Y3.startListening({actionCreator:J3,effect:(e,t)=>{var n=e.payload,r=t.getState().eventSettings,i=r.throttleDelay,a=r.throttledEvents,o=a===`all`||a?.includes(`mousemove`);X3!==null&&(cancelAnimationFrame(X3),X3=null),Z3!==null&&(typeof i!=`number`||!o)&&(clearTimeout(Z3),Z3=null),Q3=G3(n);var s=()=>{var e=t.getState(),n=$W(e,e.tooltip.settings.shared);if(!Q3){X3=null,Z3=null;return}if(n===`axis`){var r=U3(e,Q3);r?.activeIndex==null?t.dispatch(fG()):t.dispatch(mG({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}X3=null,Z3=null};if(!o){s();return}i===`raf`?X3=requestAnimationFrame(s):typeof i==`number`&&Z3===null&&(Z3=setTimeout(s,i))}});function $3(e,t){return t instanceof HTMLElement?`HTMLElement <${t.tagName} class="${t.className}">`:t===window?`global.window`:e===`children`&&typeof t==`object`&&t?`<<CHILDREN>>`:t}var e6={accessibilityLayer:!0,barCategoryGap:`10%`,barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:`none`,syncId:void 0,syncMethod:`index`,baseValue:void 0,reverseStackOrder:!1},t6=LD({name:`rootProps`,initialState:e6,reducers:{updateOptions:(e,t)=>{e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=t.payload.barGap??e6.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),n6=t6.reducer,r6=t6.actions.updateOptions,i6=LD({name:`polarOptions`,initialState:null,reducers:{updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)}}),a6=i6.actions.updatePolarOptions,o6=i6.reducer,s6=hD(`keyDown`),c6=hD(`focus`),l6=hD(`blur`),u6=CO(),d6=null,f6=null,p6=null;u6.startListening({actionCreator:s6,effect:(e,t)=>{p6=e.payload,d6!==null&&(cancelAnimationFrame(d6),d6=null);var n=t.getState().eventSettings,r=n.throttleDelay,i=n.throttledEvents,a=i===`all`||i.includes(`keydown`);f6!==null&&(typeof r!=`number`||!a)&&(clearTimeout(f6),f6=null);var o=()=>{try{var e=t.getState();if(e.rootProps.accessibilityLayer===!1)return;var n=e.tooltip.keyboardInteraction,r=p6;if(r!==`ArrowRight`&&r!==`ArrowLeft`&&r!==`Enter`)return;var i=AG(n,QG(e),TU(e),sK(e)),a=i==null?-1:Number(i),o=!Number.isFinite(a)||a<0,s=fK(e),c=QG(e),l=$W(e,e.tooltip.settings.shared);if(r===`Enter`){if(o)return;var u=XK(e,l,`hover`,String(n.index));t.dispatch(_G({active:!n.active,activeIndex:n.index,activeCoordinate:u}));return}var d=YW(e)===`left-to-right`?1:-1,f=r===`ArrowRight`?1:-1,p;if(o){var m=TU(e),h=sK(e),g=f*d,_=e=>({active:!1,index:String(e),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(p=-1,g>0){for(var v=0;v<c.length;v++)if(AG(_(v),c,m,h)!=null){p=v;break}}else for(var y=c.length-1;y>=0;y--)if(AG(_(y),c,m,h)!=null){p=y;break}if(p<0)return}else{p=a+f*d;var b=s?.length||c.length;if(b===0||p>=b||p<0)return}var x=XK(e,l,`hover`,String(p));t.dispatch(_G({active:!0,activeIndex:p.toString(),activeCoordinate:x}))}finally{d6=null,f6=null}};if(!a){o();return}r===`raf`?d6=requestAnimationFrame(o):typeof r==`number`&&f6===null&&(o(),p6=null,f6=setTimeout(()=>{p6?o():(f6=null,d6=null)},r))}}),u6.startListening({actionCreator:c6,effect:(e,t)=>{var n=t.getState();if(n.rootProps.accessibilityLayer!==!1){var r=n.tooltip.keyboardInteraction;if(!r.active&&r.index==null){var i=`0`,a=XK(n,$W(n,n.tooltip.settings.shared),`hover`,String(i));t.dispatch(_G({active:!0,activeIndex:i,activeCoordinate:a}))}}}}),u6.startListening({actionCreator:l6,effect:(e,t)=>{var n=t.getState();if(n.rootProps.accessibilityLayer!==!1){var r=n.tooltip.keyboardInteraction;r.active&&t.dispatch(_G({active:!1,activeIndex:r.index,activeCoordinate:r.coordinate}))}}});function m6(e){e.persist();var t=e.currentTarget;return new Proxy(e,{get:(e,n)=>{if(n===`currentTarget`)return t;var r=Reflect.get(e,n);return typeof r==`function`?r.bind(e):r}})}var h6=hD(`externalEvent`),g6=CO(),_6=new Map,v6=new Map,y6=new Map;g6.startListening({actionCreator:h6,effect:(e,t)=>{var n=e.payload,r=n.handler,i=n.reactEvent;if(r!=null){var a=i.type,o=m6(i);y6.set(a,{handler:r,reactEvent:o});var s=_6.get(a);s!==void 0&&(cancelAnimationFrame(s),_6.delete(a));var c=t.getState().eventSettings,l=c.throttleDelay,u=c.throttledEvents,d=u===`all`||u?.includes(a),f=v6.get(a);f!==void 0&&(typeof l!=`number`||!d)&&(clearTimeout(f),v6.delete(a));var p=()=>{var e=y6.get(a);try{if(!e)return;var n=e.handler,r=e.reactEvent,i=t.getState(),o={activeCoordinate:SK(i),activeDataKey:yK(i),activeIndex:_K(i),activeLabel:vK(i),activeTooltipIndex:_K(i),isTooltipActive:CK(i)};n&&n(o,r)}finally{_6.delete(a),v6.delete(a),y6.delete(a)}};if(!d){p();return}if(l===`raf`){var m=requestAnimationFrame(p);_6.set(a,m)}else if(typeof l==`number`){if(!v6.has(a)){p();var h=setTimeout(p,l);v6.set(a,h)}}else p()}}});var b6=$([$([PG],e=>e.tooltipItemPayloads),(e,t)=>t,(e,t,n)=>n],(e,t,n)=>{if(t!=null){var r=e.find(e=>e.settings.graphicalItemId===n);if(r!=null){var i=r.getPosition;if(i!=null)return i(t)}}}),x6=hD(`touchMove`),S6=CO(),C6=null,w6=null,T6=null,E6=null;S6.startListening({actionCreator:x6,effect:(e,t)=>{var n=e.payload;if(!(n.touches==null||n.touches.length===0)){E6=m6(n);var r=t.getState().eventSettings,i=r.throttleDelay,a=r.throttledEvents,o=a===`all`||a.includes(`touchmove`);C6!==null&&(cancelAnimationFrame(C6),C6=null),w6!==null&&(typeof i!=`number`||!o)&&(clearTimeout(w6),w6=null),T6=Array.from(n.touches).map(e=>G3({clientX:e.clientX,clientY:e.clientY,currentTarget:n.currentTarget}));var s=()=>{if(E6!=null){var e=t.getState(),n=$W(e,e.tooltip.settings.shared);if(n===`axis`){var r=T6?.[0];if(r==null){C6=null,w6=null;return}var i=U3(e,r);i?.activeIndex!=null&&t.dispatch(mG({activeIndex:i.activeIndex,activeDataKey:void 0,activeCoordinate:i.activeCoordinate}))}else if(n===`item`){var a=E6.touches[0];if(document.elementFromPoint==null||a==null)return;var o=document.elementFromPoint(a.clientX,a.clientY);if(!o||!o.getAttribute)return;var s=o.getAttribute(mk),c=o.getAttribute(`data-recharts-item-id`)??void 0,l=JG(e).find(e=>e.id===c);if(s==null||l==null||c==null)return;var u=l.dataKey,d=b6(e,s,c);t.dispatch(uG({activeDataKey:u,activeIndex:s,activeCoordinate:d,activeGraphicalItemId:c}))}C6=null,w6=null}};if(!o){s();return}i===`raf`?C6=requestAnimationFrame(s):typeof i==`number`&&w6===null&&(s(),E6=null,w6=setTimeout(()=>{E6?s():(w6=null,C6=null)},i))}}});var D6={throttleDelay:`raf`,throttledEvents:[`mousemove`,`touchmove`,`pointermove`,`scroll`,`wheel`]},O6=LD({name:`eventSettings`,initialState:D6,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=Wj(t.payload.throttledEvents))}}}),k6=O6.actions.setEventSettings,A6=O6.reducer,j6=BT({brush:F0,cartesianAxis:a1,chartData:Kq,errorBars:d4,eventSettings:A6,graphicalItems:QQ,layout:jO,legend:Xj,options:zq,polarAxis:aZ,polarOptions:o6,referenceElements:B0,renderedTicks:h2,rootProps:n6,tooltip:vG,zIndex:bq}),M6=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`Chart`;return DD({reducer:j6,preloadedState:e,middleware:e=>e({serializableCheck:!1,immutableCheck:![`commonjs`,`es6`,`production`].includes(`es6`)}).concat([q3.middleware,Y3.middleware,u6.middleware,g6.middleware,S6.middleware]),enhancers:e=>{var t=e;return typeof e==`function`&&(t=e()),t.concat(TD({type:`raf`}))},devTools:RM.devToolsEnabled&&{serialize:{replacer:$3},name:`recharts-${t}`}})};function N6(e){var t=e.preloadedState,n=e.children,r=e.reduxStoreName,i=Ak(),a=(0,v.useRef)(null);if(i)return n;a.current??=M6(t,r);var o=Xw;return v.createElement(fM,{context:o,store:a.current},n)}function P6(e){var t=e.layout,n=e.margin,r=$w(),i=Ak();return(0,v.useEffect)(()=>{i||(r(OO(t)),r(DO(n)))},[r,i,t,n]),null}var F6=(0,v.memo)(P6,hM);function I6(e){var t=$w();return(0,v.useEffect)(()=>{t(r6(e))},[t,e]),null}var L6=(0,v.memo)(e=>{var t=$w();return(0,v.useEffect)(()=>{t(k6(e))},[t,e]),null},hM);function R6(e){var t=e.zIndex,n=e.isPanorama,r=(0,v.useRef)(null),i=$w();return(0,v.useLayoutEffect)(()=>(r.current&&i(vq({zIndex:t,element:r.current,isPanorama:n})),()=>{i(yq({zIndex:t,isPanorama:n}))}),[i,t,n]),v.createElement(`g`,{tabIndex:-1,ref:r,className:`recharts-zIndex-layer_${t}`})}function z6(e){var t=e.children,n=e.isPanorama,r=Q(aq);if(!r||r.length===0)return t;var i=r.filter(e=>e<0),a=r.filter(e=>e>0);return v.createElement(v.Fragment,null,i.map(e=>v.createElement(R6,{key:e,zIndex:e,isPanorama:n})),t,a.map(e=>v.createElement(R6,{key:e,zIndex:e,isPanorama:n})))}var B6=[`children`];function V6(e,t){if(e==null)return{};var n,r,i=H6(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function H6(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function U6(){return U6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},U6.apply(null,arguments)}var W6={width:`100%`,height:`100%`,display:`block`},G6=(0,v.forwardRef)((e,t)=>{var n=gA(),r=_A(),i=oN();if(!PO(n)||!PO(r))return null;var a=e.children,o=e.otherAttributes,s=e.title,c=e.desc,l,u;return o!=null&&(l=typeof o.tabIndex==`number`?o.tabIndex:i?0:void 0,u=typeof o.role==`string`?o.role:i?`application`:void 0),v.createElement(Qx,U6({},o,{title:s,desc:c,role:u,tabIndex:l,width:n,height:r,style:W6,ref:t}),a)}),K6=e=>{var t=e.children,n=Q(Mk);if(!n)return null;var r=n.width,i=n.height,a=n.y,o=n.x;return v.createElement(Qx,{width:r,height:i,x:o,y:a},t)},q6=(0,v.forwardRef)((e,t)=>{var n=e.children,r=V6(e,B6);return Ak()?v.createElement(K6,null,v.createElement(z6,{isPanorama:!0},n)):v.createElement(G6,U6({ref:t},r),v.createElement(z6,{isPanorama:!1},n))});function J6(e,t){return $6(e)||Q6(e,t)||X6(e,t)||Y6()}function Y6(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
132
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function X6(e,t){if(e){if(typeof e==`string`)return Z6(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Z6(e,t):void 0}}function Z6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Q6(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function $6(e){if(Array.isArray(e))return e}function e8(){var e=$w(),t=J6((0,v.useState)(null),2),n=t[0],r=t[1],i=Q(uk);return(0,v.useEffect)(()=>{if(n!=null){var t=n.getBoundingClientRect().width/n.offsetWidth;NO(t)&&t!==i&&e(AO(t))}},[n,e,i]),r}function t8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function n8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?t8(Object(n),!0).forEach(function(t){r8(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t8(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function r8(e,t,n){return(t=i8(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i8(e){var t=a8(e,`string`);return typeof t==`symbol`?t:t+``}function a8(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function o8(){return o8=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o8.apply(null,arguments)}function s8(e,t){return f8(e)||d8(e,t)||l8(e,t)||c8()}function c8(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
133
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l8(e,t){if(e){if(typeof e==`string`)return u8(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u8(e,t):void 0}}function u8(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function d8(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function f8(e){if(Array.isArray(e))return e}var p8=()=>(rJ(),null);function m8(e){if(typeof e==`number`)return e;if(typeof e==`string`){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var h8=(0,v.forwardRef)((e,t)=>{var n=(0,v.useRef)(null),r=s8((0,v.useState)({containerWidth:m8(e.style?.width),containerHeight:m8(e.style?.height)}),2),i=r[0],a=r[1],o=(0,v.useCallback)((e,t)=>{a(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]),s=(0,v.useCallback)(e=>{if(typeof t==`function`&&t(e),n.current!=null&&(n.current.disconnect(),n.current=null),e!=null&&typeof ResizeObserver<`u`){var r=e.getBoundingClientRect(),i=r.width,a=r.height;o(i,a);var s=new ResizeObserver(e=>{var t=e[0];if(t!=null){var n=t.contentRect,r=n.width,i=n.height;o(r,i)}});s.observe(e),n.current=s}},[t,o]);return(0,v.useEffect)(()=>()=>{n.current?.disconnect()},[o]),v.createElement(v.Fragment,null,v.createElement(wA,{width:i.containerWidth,height:i.containerHeight}),v.createElement(`div`,o8({ref:s},e)))}),g8=(0,v.forwardRef)((e,t)=>{var n=e.width,r=e.height,i=s8((0,v.useState)({containerWidth:m8(n),containerHeight:m8(r)}),2),a=i[0],o=i[1],s=(0,v.useCallback)((e,t)=>{o(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]),c=(0,v.useCallback)(e=>{if(typeof t==`function`&&t(e),e!=null){var n=e.getBoundingClientRect(),r=n.width,i=n.height;s(r,i)}},[t,s]);return v.createElement(v.Fragment,null,v.createElement(wA,{width:a.containerWidth,height:a.containerHeight}),v.createElement(`div`,o8({ref:c},e)))}),_8=(0,v.forwardRef)((e,t)=>{var n=e.width,r=e.height;return v.createElement(v.Fragment,null,v.createElement(wA,{width:n,height:r}),v.createElement(`div`,o8({ref:t},e)))}),v8=(0,v.forwardRef)((e,t)=>{var n=e.width,r=e.height;return typeof n==`string`||typeof r==`string`?v.createElement(g8,o8({},e,{ref:t})):typeof n==`number`&&typeof r==`number`?v.createElement(_8,o8({},e,{width:n,height:r,ref:t})):v.createElement(v.Fragment,null,v.createElement(wA,{width:n,height:r}),v.createElement(`div`,o8({ref:t},e)))});function y8(e){return e?h8:v8}var b8=(0,v.forwardRef)((e,t)=>{var n=e.children,r=e.className,i=e.height,a=e.onClick,o=e.onContextMenu,s=e.onDoubleClick,c=e.onMouseDown,l=e.onMouseEnter,u=e.onMouseLeave,d=e.onMouseMove,f=e.onMouseUp,p=e.onTouchEnd,m=e.onTouchMove,h=e.onTouchStart,g=e.style,_=e.width,y=e.responsive,b=e.dispatchTouchEvents,x=b===void 0?!0:b,S=(0,v.useRef)(null),C=$w(),w=s8((0,v.useState)(null),2),T=w[0],E=w[1],D=s8((0,v.useState)(null),2),O=D[0],k=D[1],A=e8(),j=lA(),M=j?.width>0?j.width:_,N=j?.height>0?j.height:i,P=(0,v.useCallback)(e=>{A(e),typeof t==`function`&&t(e),E(e),k(e),e!=null&&(S.current=e)},[A,t,E,k]),F=(0,v.useCallback)(e=>{C(K3(e)),C(h6({handler:a,reactEvent:e}))},[C,a]),I=(0,v.useCallback)(e=>{C(J3(e)),C(h6({handler:l,reactEvent:e}))},[C,l]),L=(0,v.useCallback)(e=>{C(fG()),C(h6({handler:u,reactEvent:e}))},[C,u]),R=(0,v.useCallback)(e=>{C(J3(e)),C(h6({handler:d,reactEvent:e}))},[C,d]),ee=(0,v.useCallback)(()=>{C(c6())},[C]),te=(0,v.useCallback)(()=>{C(l6())},[C]),z=(0,v.useCallback)(e=>{C(s6(e.key))},[C]),B=(0,v.useCallback)(e=>{C(h6({handler:o,reactEvent:e}))},[C,o]),V=(0,v.useCallback)(e=>{C(h6({handler:s,reactEvent:e}))},[C,s]),ne=(0,v.useCallback)(e=>{C(h6({handler:c,reactEvent:e}))},[C,c]),re=(0,v.useCallback)(e=>{C(h6({handler:f,reactEvent:e}))},[C,f]),ie=(0,v.useCallback)(e=>{C(h6({handler:h,reactEvent:e}))},[C,h]),ae=(0,v.useCallback)(e=>{x&&C(x6(e)),C(h6({handler:m,reactEvent:e}))},[C,x,m]),oe=(0,v.useCallback)(e=>{C(h6({handler:p,reactEvent:e}))},[C,p]),se=y8(y);return v.createElement(jq.Provider,{value:T},v.createElement(iS.Provider,{value:O},v.createElement(se,{width:M??g?.width,height:N??g?.height,className:dv(`recharts-wrapper`,r),style:n8({position:`relative`,cursor:`default`,width:M,height:N},g),onClick:F,onContextMenu:B,onDoubleClick:V,onFocus:ee,onBlur:te,onKeyDown:z,onMouseDown:ne,onMouseEnter:I,onMouseLeave:L,onMouseMove:R,onMouseUp:re,onTouchEnd:oe,onTouchMove:ae,onTouchStart:ie,ref:P},v.createElement(p8,null),n)))}),x8=[`width`,`height`,`responsive`,`children`,`className`,`style`,`compact`,`title`,`desc`];function S8(e,t){if(e==null)return{};var n,r,i=C8(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function C8(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var w8=(0,v.forwardRef)((e,t)=>{var n=e.width,r=e.height,i=e.responsive,a=e.children,o=e.className,s=e.style,c=e.compact,l=e.title,u=e.desc,d=Wx(S8(e,x8));return c?v.createElement(v.Fragment,null,v.createElement(wA,{width:n,height:r}),v.createElement(q6,{otherAttributes:d,title:l,desc:u},a)):v.createElement(b8,{className:o,style:s,width:n,height:r,responsive:i??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},v.createElement(q6,{otherAttributes:d,title:l,desc:u,ref:t},v.createElement(J0,null,a)))});function T8(){return T8=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T8.apply(null,arguments)}function E8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function D8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?E8(Object(n),!0).forEach(function(t){O8(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E8(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function O8(e,t,n){return(t=k8(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k8(e){var t=A8(e,`string`);return typeof t==`symbol`?t:t+``}function A8(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var j8=D8({accessibilityLayer:!0,barCategoryGap:`10%`,barGap:4,layout:`horizontal`,margin:{top:5,right:5,bottom:5,left:5},responsive:!1,reverseStackOrder:!1,stackOffset:`none`,syncMethod:`index`},D6),M8=(0,v.forwardRef)(function(e,t){var n=RC(e.categoricalChartProps,j8),r=e.chartName,i=e.defaultTooltipEventType,a=e.validateTooltipEventTypes,o=e.tooltipPayloadSearcher,s=e.categoricalChartProps,c={chartName:r,defaultTooltipEventType:i,validateTooltipEventTypes:a,tooltipPayloadSearcher:o,eventEmitter:void 0};return v.createElement(N6,{preloadedState:{options:c},reduxStoreName:s.id??r},v.createElement(M0,{chartData:s.data}),v.createElement(F6,{layout:n.layout,margin:n.margin}),v.createElement(L6,{throttleDelay:n.throttleDelay,throttledEvents:n.throttledEvents}),v.createElement(I6,{baseValue:n.baseValue,accessibilityLayer:n.accessibilityLayer,barCategoryGap:n.barCategoryGap,maxBarSize:n.maxBarSize,stackOffset:n.stackOffset,barGap:n.barGap,barSize:n.barSize,syncId:n.syncId,syncMethod:n.syncMethod,className:n.className,reverseStackOrder:n.reverseStackOrder}),v.createElement(w8,T8({},n,{ref:t})))});function N8(e){var t=$w();return(0,v.useEffect)(()=>{t(a6(e))},[t,e]),null}var P8=[`layout`];function F8(){return F8=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},F8.apply(null,arguments)}function I8(e,t){if(e==null)return{};var n,r,i=L8(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function L8(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function R8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function z8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?R8(Object(n),!0).forEach(function(t){B8(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R8(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function B8(e,t,n){return(t=V8(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function V8(e){var t=H8(e,`string`);return typeof t==`symbol`?t:t+``}function H8(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var U8=z8({accessibilityLayer:!0,stackOffset:`none`,barCategoryGap:`10%`,barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:`index`,layout:`radial`,responsive:!1,cx:`50%`,cy:`50%`,innerRadius:0,outerRadius:`80%`},D6),W8=(0,v.forwardRef)(function(e,t){var n=RC(e.categoricalChartProps,U8),r=n.layout,i=I8(n,P8),a=e.chartName,o={chartName:a,defaultTooltipEventType:e.defaultTooltipEventType,validateTooltipEventTypes:e.validateTooltipEventTypes,tooltipPayloadSearcher:e.tooltipPayloadSearcher,eventEmitter:void 0};return v.createElement(N6,{preloadedState:{options:o},reduxStoreName:n.id??a},v.createElement(M0,{chartData:n.data}),v.createElement(F6,{layout:r,margin:n.margin}),v.createElement(L6,{throttleDelay:n.throttleDelay,throttledEvents:n.throttledEvents}),v.createElement(I6,{baseValue:void 0,accessibilityLayer:n.accessibilityLayer,barCategoryGap:n.barCategoryGap,maxBarSize:n.maxBarSize,stackOffset:n.stackOffset,barGap:n.barGap,barSize:n.barSize,syncId:n.syncId,syncMethod:n.syncMethod,className:n.className,reverseStackOrder:n.reverseStackOrder}),v.createElement(N8,{cx:n.cx,cy:n.cy,startAngle:n.startAngle,endAngle:n.endAngle,innerRadius:n.innerRadius,outerRadius:n.outerRadius}),v.createElement(w8,F8({},i,{ref:t})))});function G8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function K8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?G8(Object(n),!0).forEach(function(t){q8(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G8(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function q8(e,t,n){return(t=J8(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function J8(e){var t=Y8(e,`string`);return typeof t==`symbol`?t:t+``}function Y8(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var X8=[`item`],Z8=K8(K8({},U8),{},{layout:`centric`,startAngle:0,endAngle:360}),Q8=(0,v.forwardRef)((e,t)=>{var n=RC(e,Z8);return v.createElement(W8,{chartName:`PieChart`,defaultTooltipEventType:`item`,validateTooltipEventTypes:X8,tooltipPayloadSearcher:Lq,categoricalChartProps:n,ref:t})}),$8=[`axis`],e5=(0,v.forwardRef)((e,t)=>v.createElement(M8,{chartName:`AreaChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:$8,tooltipPayloadSearcher:Lq,categoricalChartProps:e,ref:t}));function t5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function n5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?t5(Object(n),!0).forEach(function(t){r5(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t5(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function r5(e,t,n){return(t=i5(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i5(e){var t=a5(e,`string`);return typeof t==`symbol`?t:t+``}function a5(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var o5=[`axis`,`item`],s5=n5(n5({},U8),{},{layout:`radial`,startAngle:0,endAngle:360}),c5=(0,v.forwardRef)((e,t)=>{var n=RC(e,s5);return v.createElement(W8,{chartName:`RadialBarChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:o5,tooltipPayloadSearcher:Lq,categoricalChartProps:n,ref:t})}),l5={light:``,dark:`.dark`},u5={width:320,height:200},d5=v.createContext(null);function f5(){let e=v.useContext(d5);if(!e)throw Error(`useChart must be used within a <ChartContainer />`);return e}function p5({id:e,className:t,children:n,config:r,initialDimension:i=u5,...a}){let o=v.useId(),s=`chart-${e??o.replace(/:/g,``)}`;return(0,K.jsx)(d5.Provider,{value:{config:r},children:(0,K.jsxs)(`div`,{"data-slot":`chart`,"data-chart":s,className:Y(`flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden`,t),...a,children:[(0,K.jsx)(m5,{id:s,config:r}),(0,K.jsx)(dA,{initialDimension:i,children:n})]})})}function m5({id:e,config:t}){let n=Object.entries(t).filter(([,e])=>e.theme??e.color);return n.length?(0,K.jsx)(`style`,{dangerouslySetInnerHTML:{__html:Object.entries(l5).map(([t,r])=>`
125
+ ${x.x},${x.y}`,C=TC(e.id)?bC(`recharts-radial-line-`):e.id;return v.createElement(`text`,YY({},r,{dominantBaseline:`central`,className:dv(`recharts-radial-bar-label`,o)}),v.createElement(`defs`,null,v.createElement(`path`,{id:C,d:S})),v.createElement(`textPath`,{xlinkHref:`#${C}`},n))},aX=(e,t,n)=>{var r=e.cx,i=e.cy,a=e.innerRadius,o=e.outerRadius,s=(e.startAngle+e.endAngle)/2;if(n===`outside`){var c=$P(r,i,o+t,s),l=c.x;return{x:l,y:c.y,textAnchor:l>=r?`start`:`end`,verticalAnchor:`middle`}}if(n===`center`)return{x:r,y:i,textAnchor:`middle`,verticalAnchor:`middle`};if(n===`centerTop`)return{x:r,y:i,textAnchor:`middle`,verticalAnchor:`start`};if(n===`centerBottom`)return{x:r,y:i,textAnchor:`middle`,verticalAnchor:`end`};var u=$P(r,i,(a+o)/2,s);return{x:u.x,y:u.y,textAnchor:`middle`,verticalAnchor:`middle`}},oX=e=>e!=null&&`cx`in e&&Z(e.cx),sX={angle:0,offset:5,zIndex:gI.label,position:`middle`,textBreakAll:!1};function cX(e){if(!oX(e))return e;var t=e.cx,n=e.cy,r=e.outerRadius,i=r*2;return{x:t-r,y:n-r,width:i,upperWidth:i,lowerWidth:i,height:i}}function lX(e){var t=RC(e,sX),n=t.viewBox,r=t.parentViewBox,i=t.position,a=t.value,o=t.children,s=t.content,c=t.className,l=c===void 0?``:c,u=t.textBreakAll,d=t.labelRef,f=eX(),p=QY(),m=n==null?i===`center`?p:f??p:oX(n)?n:dA(n),h,g,_=cX(m);if(!m||TC(a)&&TC(o)&&!(0,v.isValidElement)(s)&&typeof s!=`function`)return null;var y=GY(GY({},t),{},{viewBox:m});if((0,v.isValidElement)(s))return y.labelRef,(0,v.cloneElement)(s,HY(y,BY));if(typeof s==`function`){if(y.content,h=(0,v.createElement)(s,HY(y,VY)),(0,v.isValidElement)(h))return h}else h=tX(t);var b=Kx(t);if(oX(m)){if(i===`insideStart`||i===`insideEnd`||i===`end`)return iX(t,i,h,b,m);g=aX(m,t.offset,t.position)}else{if(!_)return null;var x=zY({viewBox:_,position:i,offset:t.offset,parentViewBox:oX(r)?void 0:r,clamp:!0});g=GY(GY({x:x.x,y:x.y,textAnchor:x.horizontalAnchor,verticalAnchor:x.verticalAnchor},x.width===void 0?{}:{width:x.width}),x.height===void 0?{}:{height:x.height})}return v.createElement(bq,{zIndex:t.zIndex},v.createElement(NY,YY({ref:d,className:dv(`recharts-label`,l)},b,g,{textAnchor:SY(b.textAnchor)?b.textAnchor:g.textAnchor,breakAll:u}),h))}lX.displayName=`Label`;var uX=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?v.createElement(lX,YY({key:`label-implicit`},r)):vC(e)?v.createElement(lX,YY({key:`label-implicit`,value:e},r)):(0,v.isValidElement)(e)?e.type===lX?(0,v.cloneElement)(e,GY({key:`label-implicit`},r)):v.createElement(lX,YY({key:`label-implicit`,content:e},r)):nX(e)?v.createElement(lX,YY({key:`label-implicit`,content:e},r)):e&&typeof e==`object`?v.createElement(lX,YY({},e,{key:`label-implicit`},r)):null};function dX(e){var t=e.label,n=e.labelRef;return uX(t,QY(),n)||null}var fX=[`valueAccessor`],pX=[`dataKey`,`clockWise`,`id`,`textBreakAll`,`zIndex`];function mX(){return mX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mX.apply(null,arguments)}function hX(e,t){if(e==null)return{};var n,r,i=gX(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function gX(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var _X=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(CY(t))return t},vX=(0,v.createContext)(void 0),yX=vX.Provider,bX=(0,v.createContext)(void 0),xX=bX.Provider;function SX(){return(0,v.useContext)(vX)}function CX(){return(0,v.useContext)(bX)}function wX(e){var t=e.valueAccessor,n=t===void 0?_X:t,r=hX(e,fX),i=r.dataKey;r.clockWise;var a=r.id,o=r.textBreakAll,s=r.zIndex,c=hX(r,pX),l=SX(),u=CX(),d=l||u;return!d||!d.length?null:v.createElement(bq,{zIndex:s??gI.label},v.createElement(rS,{className:`recharts-label-list`},d.map((e,t)=>{var s=TC(i)?n(e,t):zO(e.payload,i),l=TC(a)?{}:{id:`${a}-${t}`};return v.createElement(lX,mX({key:`label-${t}`},Kx(e),c,l,{fill:r.fill??e.fill,parentViewBox:e.parentViewBox,value:s,textBreakAll:o,viewBox:e.viewBox,index:t,zIndex:0}))})))}wX.displayName=`LabelList`;function TX(e){var t=e.label;return t?t===!0?v.createElement(wX,{key:`labelList-implicit`}):v.isValidElement(t)||nX(t)?v.createElement(wX,{key:`labelList-implicit`,content:t}):typeof t==`object`?v.createElement(wX,mX({key:`labelList-implicit`},t,{type:String(t.type)})):null:null}var EX=[`points`,`className`,`baseLinePoints`,`connectNulls`],DX;function OX(){return OX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},OX.apply(null,arguments)}function kX(e,t){if(e==null)return{};var n,r,i=AX(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function AX(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function jX(e,t){return t||=e.slice(0),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var MX=e=>e!=null&&e.x===+e.x&&e.y===+e.y,NX=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=[[]];e.forEach(e=>{var n=t[t.length-1];MX(e)?n&&n.push(e):n&&n.length>0&&t.push([])});var n=e[0],r=t[t.length-1];MX(n)&&r&&r.push(n);var i=t[t.length-1];return i&&i.length<=0&&(t=t.slice(0,-1)),t},PX=(e,t)=>{var n=NX(e);t&&(n=[n.reduce((e,t)=>[...e,...t],[])]);var r=n.map(e=>e.reduce((e,t,n)=>mC(DX||=jX([``,``,``,`,`,``]),e,n===0?`M`:`L`,t.x,t.y),``)).join(``);return n.length===1?`${r}Z`:r},FX=(e,t,n)=>{var r=PX(e,n);return`${r.slice(-1)===`Z`?r.slice(0,-1):r}L${PX(Array.from(t).reverse(),n).slice(1)}`},IX=e=>{var t=e.points,n=e.className,r=e.baseLinePoints,i=e.connectNulls,a=kX(e,EX);if(!t||!t.length)return null;var o=dv(`recharts-polygon`,n);if(r&&r.length){var s=a.stroke&&a.stroke!==`none`,c=FX(t,r,i);return v.createElement(`g`,{className:o},v.createElement(`path`,OX({},Kx(a),{fill:c.slice(-1)===`Z`?a.fill:`none`,stroke:`none`,d:c})),s?v.createElement(`path`,OX({},Kx(a),{fill:`none`,d:PX(t,i)})):null,s?v.createElement(`path`,OX({},Kx(a),{fill:`none`,d:PX(r,i)})):null)}var l=PX(t,i);return v.createElement(`path`,OX({},Kx(a),{fill:l.slice(-1)===`Z`?a.fill:`none`,className:o,d:l}))};function LX(){return LX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},LX.apply(null,arguments)}var RX=e=>{var t=e.cx,n=e.cy,r=e.r,i=e.className,a=dv(`recharts-dot`,i);return Z(t)&&Z(n)&&Z(r)?v.createElement(`circle`,LX({},Wx(e),AC(e),{className:a,cx:t,cy:n,r})):null},zX=e=>e.graphicalItems.polarItems,BX=$([zX,XH,$([zI,BI],eU)],rU),VX=$([$([BX],cU),DF],dU),HX=$([VX,XH,BX],pU);$([VX,XH,BX],(e,t,n)=>n.length>0?e.flatMap(e=>n.flatMap(n=>({value:zO(e,t.dataKey??n.dataKey),errorDomain:[]}))).filter(Boolean):t?.dataKey==null?e.map(e=>({value:e,errorDomain:[]})):e.map(e=>({value:zO(e,t.dataKey),errorDomain:[]})));var UX=()=>void 0,WX=$([XH,_A,VX,HX,lI,zI,$([XH,jU,MU,UX,$([VX,XH,BX,PU,zI,jF],LU),UX,_A,zI],nW)],aW),GX=$([WX,QH,sW],cW),KX=$([sW,$([XH,WX,GX,zI],uW)],XI),qX=(e,t,n)=>{switch(t){case`angleAxis`:return OI(e,n);case`radiusAxis`:return kI(e,n);default:throw Error(`Unexpected axis type: ${t}`)}},JX=(e,t,n)=>{switch(t){case`angleAxis`:return FI(e,n);case`radiusAxis`:return LI(e,n);default:throw Error(`Unexpected axis type: ${t}`)}},YX=$([$([qX,sW,KX,JX],CH)],YI),XX=$([_A,HX,QH,zI],SW),ZX=$([_A,qX,sW,YX,GX,JX,VW,XX,zI],UW),QX=$([ZX],e=>{if(e){var t=new Map;return e.forEach(e=>{var n=(e.coordinate+360)%360;t.has(n)||t.set(n,e)}),Array.from(t.values())}}),$X=$([_A,qX,YX,JX,VW,XX,zI],GW),eZ=ID({name:`polarAxis`,initialState:{radiusAxis:{},angleAxis:{}},reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=Uj(t.payload)},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=Uj(t.payload)},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),tZ=eZ.actions;tZ.addRadiusAxis,tZ.removeRadiusAxis;var nZ=tZ.addAngleAxis,rZ=tZ.removeAngleAxis,iZ=eZ.reducer;function aZ(e){return e&&typeof e==`object`&&`className`in e&&typeof e.className==`string`?e.className:``}var oZ=[`children`,`type`],sZ=[`ref`];function cZ(){return cZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cZ.apply(null,arguments)}function lZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function uZ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?lZ(Object(n),!0).forEach(function(t){dZ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lZ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function dZ(e,t,n){return(t=fZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fZ(e){var t=pZ(e,`string`);return typeof t==`symbol`?t:t+``}function pZ(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function mZ(e,t){if(e==null)return{};var n,r,i=hZ(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function hZ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var gZ=1e-5,_Z=Math.cos(ZP(45)),vZ=`angleAxis`;function yZ(e){var t=$w(),n=xA(),r=(0,v.useMemo)(()=>{e.children;var t=e.type,r=mZ(e,oZ),i=bI(n,`angleAxis`,t);if(i!=null)return uZ(uZ({},r),{},{type:i})},[e,n]),i=r===Q(e=>OI(e,r?.id));return(0,v.useEffect)(()=>r==null?OC:(t(nZ(r)),()=>{t(rZ(r))}),[t,r]),i?e.children:null}var bZ=(e,t)=>{var n=t.cx,r=t.cy,i=t.radius,a=t.orientation,o=t.tickSize||8,s=$P(n,r,i,e.coordinate),c=$P(n,r,i+(a===`inner`?-1:1)*o,e.coordinate);return{x1:s.x,y1:s.y,x2:c.x,y2:c.y}},xZ=(e,t)=>{var n=Math.cos(ZP(-e.coordinate));return n>gZ?t===`outer`?`start`:`end`:n<-gZ?t===`outer`?`end`:`start`:`middle`},SZ=e=>{var t=Math.cos(ZP(-e.coordinate)),n=Math.sin(ZP(-e.coordinate));return Math.abs(t)<=_Z?n>0?`start`:`end`:`middle`},CZ=e=>{var t=e.cx,n=e.cy,r=e.radius,i=e.axisLineType,a=e.axisLine,o=e.ticks;if(!a)return null;var s=uZ(uZ({},Wx(e)),{},{fill:`none`},Wx(a));if(i===`circle`)return v.createElement(RX,cZ({className:`recharts-polar-angle-axis-line`},s,{cx:t,cy:n,r}));var c=o.map(e=>$P(t,n,r,e.coordinate));return v.createElement(IX,cZ({className:`recharts-polar-angle-axis-line`},s,{points:c}))},wZ=e=>{var t=e.tick,n=e.tickProps,r=e.value;return t?v.isValidElement(t)?v.cloneElement(t,n):typeof t==`function`?t(n):v.createElement(NY,cZ({},n,{className:`recharts-polar-angle-axis-tick-value`}),r):null},TZ=e=>{var t=e.tick,n=e.tickLine,r=e.tickFormatter,i=e.stroke,a=e.ticks,o=Wx(e);o.ref;var s=mZ(o,sZ),c=Gx(t),l=uZ(uZ({},s),{},{fill:`none`},Wx(n)),u=a.map((a,o)=>{var u=bZ(a,e),d=xZ(a,e.orientation),f=SZ(a),p=uZ(uZ(uZ({},s),{},{textAnchor:d,verticalAnchor:f,stroke:`none`,fill:i},c),{},{index:o,payload:a,x:u.x2,y:u.y2});return v.createElement(rS,cZ({className:dv(`recharts-polar-angle-axis-tick`,aZ(t)),key:`tick-${a.coordinate}`},MC(e,a,o)),n&&v.createElement(`line`,cZ({className:`recharts-polar-angle-axis-tick-line`},l,u)),v.createElement(wZ,{tick:t,tickProps:p,value:r?r(a.value,o):a.value}))});return v.createElement(rS,{className:`recharts-polar-angle-axis-ticks`},u)},EZ=e=>{var t=e.angleAxisId,n=Q(RI),r=Q(e=>YX(e,`angleAxis`,t)),i=kk(),a=Q(e=>QX(e,`angleAxis`,t,i));if(n==null||!a||!a.length||r==null)return null;var o=uZ(uZ(uZ({},e),{},{scale:r},n),{},{radius:n.outerRadius,ticks:a});return v.createElement(bq,{zIndex:o.zIndex},v.createElement(rS,{className:dv(`recharts-polar-angle-axis`,vZ,o.className)},v.createElement(CZ,o),v.createElement(TZ,o)))};function DZ(e){var t=RC(e,_I);return v.createElement(yZ,{id:t.angleAxisId,scale:t.scale,type:t.type,dataKey:t.dataKey,unit:void 0,name:t.name,allowDuplicatedCategory:!1,allowDataOverflow:!1,reversed:t.reversed,includeHidden:!1,allowDecimals:t.allowDecimals,tickCount:t.tickCount,niceTicks:t.niceTicks??`auto`,ticks:t.ticks,tick:t.tick,domain:t.domain},v.createElement(EZ,t))}DZ.displayName=`PolarAngleAxis`;function OZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kZ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?OZ(Object(n),!0).forEach(function(t){AZ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OZ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function AZ(e,t,n){return(t=jZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jZ(e){var t=MZ(e,`string`);return typeof t==`symbol`?t:t+``}function MZ(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var NZ=$([zX,(e,t)=>t],(e,t)=>e.filter(e=>e.type===`pie`).find(e=>e.id===t)),PZ=[],FZ=(e,t,n)=>n?.length===0?PZ:n,IZ=$([DF,NZ,FZ],(e,t,n)=>{var r=e.chartData;if(t!=null){var i=t?.data!=null&&t.data.length>0?t.data:r;if((!i||!i.length)&&n!=null&&(i=n.map(e=>kZ(kZ({},t.presentationProps),e.props))),i!=null)return i}}),LZ=$([IZ,NZ,FZ],(e,t,n)=>{if(!(e==null||t==null))return e.map((e,r)=>{var i,a=zO(e,t.nameKey,t.name),o=n!=null&&(i=n[r])!=null&&(i=i.props)!=null&&i.fill?n[r].props.fill:typeof e==`object`&&e&&`fill`in e?e.fill:t.fill;return{value:ik(a,t.dataKey),dataKey:t.dataKey,color:o,payload:e,type:t.legendType}})}),RZ=$([IZ,NZ,FZ,Tk],(e,t,n,r)=>{if(!(t==null||e==null))return w$({offset:r,pieSettings:t,displayedData:e,cells:n})}),zZ=o((e=>{var t=60103,n=60106,r=60107,i=60108,a=60114,o=60109,s=60110,c=60112,l=60113,u=60120,d=60115,f=60116;if(typeof Symbol==`function`&&Symbol.for){var p=Symbol.for;t=p(`react.element`),n=p(`react.portal`),r=p(`react.fragment`),i=p(`react.strict_mode`),a=p(`react.profiler`),o=p(`react.provider`),s=p(`react.context`),c=p(`react.forward_ref`),l=p(`react.suspense`),u=p(`react.suspense_list`),d=p(`react.memo`),f=p(`react.lazy`),p(`react.block`),p(`react.server.block`),p(`react.fundamental`),p(`react.debug_trace_mode`),p(`react.legacy_hidden`)}function m(e){if(typeof e==`object`&&e){var p=e.$$typeof;switch(p){case t:switch(e=e.type,e){case r:case a:case i:case l:case u:return e;default:switch(e&&=e.$$typeof,e){case s:case c:case f:case d:case o:return e;default:return p}}case n:return p}}}e.isFragment=function(e){return m(e)===r}})),BZ=o(((e,t)=>{t.exports=zZ()}))(),VZ=e=>typeof e==`string`?e:e?e.displayName||e.name||`Component`:``,HZ=null,UZ=null,WZ=e=>{if(e===HZ&&Array.isArray(UZ))return UZ;var t=[];return v.Children.forEach(e,e=>{TC(e)||((0,BZ.isFragment)(e)?t=t.concat(WZ(e.props.children)):t.push(e))}),UZ=t,HZ=e,t};function GZ(e,t){var n=[],r=[];return r=Array.isArray(t)?t.map(e=>VZ(e)):[VZ(t)],WZ(e).forEach(e=>{var t=uC(e,`type.displayName`)||uC(e,`type.name`);t&&r.indexOf(t)!==-1&&n.push(e)}),n}var KZ=e=>e&&typeof e==`object`&&`clipDot`in e?!!e.clipDot:!0;function qZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function JZ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?qZ(Object(n),!0).forEach(function(t){YZ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qZ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function YZ(e,t,n){return(t=XZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XZ(e){var t=ZZ(e,`string`);return typeof t==`symbol`?t:t+``}function ZZ(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function QZ(e,t){return JZ(JZ({},t),e)}function $Z(e){return(0,v.isValidElement)(e)?e.props:e}function eQ(e,t){return(0,v.cloneElement)(e,QZ($Z(e),t))}function tQ(e){if(`index`in e){var t=e.index;return typeof t==`number`||typeof t==`string`?t:void 0}}function nQ(e){return`isActive`in e&&e.isActive===!0}function rQ(e){var t=e.option,n=e.DefaultShape,r=e.shapeProps,i=e.activeClassName,a=i===void 0?`recharts-active-shape`:i,o=e.inActiveClassName,s=o===void 0?`recharts-shape`:o,c=tQ(r),l=(0,v.isValidElement)(t)?eQ(t,r):t===n?v.createElement(n,r):typeof t==`function`?t(r,c):typeof t==`object`?v.createElement(n,QZ(t,r)):v.createElement(n,r);return nQ(r)?v.createElement(rS,{className:a},l):v.createElement(rS,{className:s},l)}var iQ=(e,t,n)=>{var r=$w();return(i,a)=>o=>{e?.(i,a,o),r(lG({activeIndex:String(a),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:n}))}},aQ=e=>{var t=$w();return(n,r)=>i=>{e?.(n,r,i),t(uG())}},oQ=(e,t,n)=>{var r=$w();return(i,a)=>o=>{e?.(i,a,o),r(fG({activeIndex:String(a),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:n}))}};function sQ(e){var t=e.tooltipEntrySettings,n=$w(),r=kk(),i=(0,v.useRef)(null);return(0,v.useLayoutEffect)(()=>{r||(i.current===null?n(aG(t)):i.current!==t&&n(oG({prev:i.current,next:t})),i.current=t)},[t,n,r]),(0,v.useLayoutEffect)(()=>()=>{i.current&&=(n(sG(i.current)),null)},[n]),null}function cQ(e){var t=e.legendPayload,n=$w(),r=kk(),i=(0,v.useRef)(null);return(0,v.useLayoutEffect)(()=>{r||(i.current===null?n(Kj(t)):i.current!==t&&n(qj({prev:i.current,next:t})),i.current=t)},[n,r,t]),(0,v.useLayoutEffect)(()=>()=>{i.current&&=(n(Jj(i.current)),null)},[n]),null}function lQ(e){var t=e.legendPayload,n=$w(),r=Q(_A),i=(0,v.useRef)(null);return(0,v.useLayoutEffect)(()=>{r!==`centric`&&r!==`radial`||(i.current===null?n(Kj(t)):i.current!==t&&n(qj({prev:i.current,next:t})),i.current=t)},[n,r,t]),(0,v.useLayoutEffect)(()=>()=>{i.current&&=(n(Jj(i.current)),null)},[n]),null}function uQ(e,t){return hQ(e)||mQ(e,t)||fQ(e,t)||dQ()}function dQ(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
126
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fQ(e,t){if(e){if(typeof e==`string`)return pQ(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pQ(e,t):void 0}}function pQ(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function mQ(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function hQ(e){if(Array.isArray(e))return e}var gQ=`index`,_Q=`append`;function vQ(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],r=[];for(var i of n)r.push({status:`removed`,prev:i});for(var a=0;a<t.length;a++){var o=e[a],s=t[a];o==null?r.push({status:`added`,next:s}):r.push({status:`matched`,prev:o,next:s})}return r}function yQ(e,t){var n=e.length/t.length;return vQ(t.map((t,r)=>e[Math.floor(r*n)]),t)}function bQ(e,t){return vQ(t.map((t,n)=>e[n]),t)}function xQ(e,t){for(var n=new Map,r=0;r<e.length;r++){var i=e[r];if(i!=null){var a=t(i,r);a!=null&&!n.has(a)&&n.set(a,i)}}return n}function SQ(e,t,n){var r=xQ(e,n),i=new Set,a=t.map((e,t)=>{var a=n(e,t);if(a!=null){var o=r.get(a);if(o!==void 0)return i.add(a),o}}),o=[];for(var s of r){var c=uQ(s,2),l=c[0],u=c[1];i.has(l)||o.push(u)}return vQ(a,t,o)}function CQ(e,t,n){return t==null?null:e==null?t.map(e=>({status:`added`,next:e})):n===`index`?yQ(e,t):n===`append`?bQ(e,t):SQ(e,t,n)}function wQ(e,t){var n=(0,v.useRef)(e),r=(0,v.useRef)(t.current),i=(0,v.useRef)(!0);n.current!==e&&(n.current=e,r.current=t.current,i.current=!1);var a=(0,v.useCallback)(function(e,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(n===0){i.current=!0;return}n===1&&(r.current=e),n>0&&i.current&&a&&(t.current=e)},[t]);return{startValue:r.current,syncStepValue:a}}function TQ(e,t){return AQ(e)||kQ(e,t)||DQ(e,t)||EQ()}function EQ(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
127
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DQ(e,t){if(e){if(typeof e==`string`)return OQ(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?OQ(e,t):void 0}}function OQ(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function kQ(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function AQ(e){if(Array.isArray(e))return e}function jQ(e,t){var n=TQ((0,v.useState)(!1),2),r=n[0],i=n[1];return{isAnimating:r,handleAnimationStart:(0,v.useCallback)(()=>{typeof e==`function`&&e(),i(!0)},[e]),handleAnimationEnd:(0,v.useCallback)(()=>{typeof t==`function`&&t(),i(!1)},[t])}}function MQ(e){var t=e.animationInput,n=e.animationIdPrefix,r=e.items,i=e.previousItemsRef,a=e.isAnimationActive,o=e.animationBegin,s=e.animationDuration,c=e.animationEasing,l=e.onAnimationStart,u=e.onAnimationEnd,d=e.animationInterpolateFn,f=e.animationMatchBy,p=e.shouldUpdatePreviousRef,m=e.children,h=e.layout,g=fP(t,n),_=wQ(g,i),y=_.startValue??null,b=CQ(y,r,f??gQ);return v.createElement(dP,{animationId:g,begin:o,duration:s,isActive:a,easing:c,onAnimationEnd:u,onAnimationStart:l,key:g},e=>{var t=y==null,n=r==null?r:d(b,e,h),i=p?p(e):e>0;return _.syncStepValue(n,e,i),n==null?null:m(n,e,t)})}function NQ(e,t){return RQ(e)||LQ(e,t)||FQ(e,t)||PQ()}function PQ(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
128
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FQ(e,t){if(e){if(typeof e==`string`)return IQ(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?IQ(e,t):void 0}}function IQ(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function LQ(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function RQ(e){if(Array.isArray(e))return e}var zQ=v.useId??(()=>NQ(v.useState(()=>bC(`uid-`)),1)[0]);function BQ(e,t){var n=zQ();return t||(e?`${e}-${n}`:n)}var VQ=(0,v.createContext)(void 0),HQ=e=>{var t=e.id,n=e.type,r=e.children,i=BQ(`recharts-${n}`,t);return v.createElement(VQ.Provider,{value:i},r(i))},UQ=ID({name:`graphicalItems`,initialState:{cartesianItems:[],polarItems:[]},reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(Uj(t.payload))},prepare:xD()},replaceCartesianGraphicalItem:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next,a=sD(e).cartesianItems.indexOf(Uj(r));a>-1&&(e.cartesianItems[a]=Uj(i))},prepare:xD()},removeCartesianGraphicalItem:{reducer(e,t){var n=sD(e).cartesianItems.indexOf(Uj(t.payload));n>-1&&e.cartesianItems.splice(n,1)},prepare:xD()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(Uj(t.payload))},prepare:xD()},removePolarGraphicalItem:{reducer(e,t){var n=sD(e).polarItems.indexOf(Uj(t.payload));n>-1&&e.polarItems.splice(n,1)},prepare:xD()},replacePolarGraphicalItem:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next,a=sD(e).polarItems.indexOf(Uj(r));a>-1&&(e.polarItems[a]=Uj(i))},prepare:xD()}}}),WQ=UQ.actions,GQ=WQ.addCartesianGraphicalItem,KQ=WQ.replaceCartesianGraphicalItem,qQ=WQ.removeCartesianGraphicalItem,JQ=WQ.addPolarGraphicalItem,YQ=WQ.removePolarGraphicalItem,XQ=WQ.replacePolarGraphicalItem,ZQ=UQ.reducer,QQ=(0,v.memo)(e=>{var t=$w(),n=(0,v.useRef)(null);return(0,v.useLayoutEffect)(()=>{n.current===null?t(GQ(e)):n.current!==e&&t(KQ({prev:n.current,next:e})),n.current=e},[t,e]),(0,v.useLayoutEffect)(()=>()=>{n.current&&=(t(qQ(n.current)),null)},[t]),null}),$Q=(0,v.memo)(e=>{var t=$w(),n=(0,v.useRef)(null);return(0,v.useLayoutEffect)(()=>{n.current===null?t(JQ(e)):n.current!==e&&t(XQ({prev:n.current,next:e})),n.current=e},[t,e]),(0,v.useLayoutEffect)(()=>()=>{n.current&&=(t(YQ(n.current)),null)},[t]),null}),e$=[`key`],t$=[`onMouseEnter`,`onClick`,`onMouseLeave`],n$=[`id`],r$=[`id`];function i$(){return i$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i$.apply(null,arguments)}function a$(e,t){if(e==null)return{};var n,r,i=o$(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function o$(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function s$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?s$(Object(n),!0).forEach(function(t){l$(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function l$(e,t,n){return(t=u$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u$(e){var t=d$(e,`string`);return typeof t==`symbol`?t:t+``}function d$(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var f$=xF;function p$(e){var t=(0,v.useMemo)(()=>GZ(e.children,bJ),[e.children]),n=Q(n=>LZ(n,e.id,t));return n==null?null:v.createElement(lQ,{legendPayload:n})}function m$(e){if(!(e==null||typeof e==`boolean`||typeof e==`function`)){if(v.isValidElement(e)){var t=e.props?.fill;return typeof t==`string`?t:void 0}var n=e.fill;return typeof n==`string`?n:void 0}}var h$=v.memo(e=>{var t=e.dataKey,n=e.nameKey,r=e.sectors,i=e.stroke,a=e.strokeWidth,o=e.fill,s=e.name,c=e.hide,l=e.tooltipType,u=e.formatter,d=e.id,f=e.activeShape,p=m$(f),m={dataDefinedOnItem:r.map(e=>{var t=e.tooltipPayload;return p==null||t==null?t:t.map(e=>c$(c$({},e),{},{color:p,fill:p}))}),getPosition:e=>r[Number(e)]?.tooltipPosition,settings:{stroke:i,strokeWidth:a,fill:o,dataKey:t,nameKey:n,name:ik(s,t),hide:c,type:l,color:o,unit:``,formatter:u,graphicalItemId:d}};return v.createElement(sQ,{tooltipEntrySettings:m})}),wee=(e,t)=>e>t?`start`:e<t?`end`:`middle`,g$=(e,t,n)=>xC(typeof t==`function`?t(e):t,n,n*.8),_$=(e,t,n)=>{var r=t.top,i=t.left,a=t.width,o=t.height,s=eF(a,o);return{cx:i+xC(e.cx,a,a/2),cy:r+xC(e.cy,o,o/2),innerRadius:xC(e.innerRadius,s,0),outerRadius:g$(n,e.outerRadius,s),maxRadius:e.maxRadius||Math.sqrt(a*a+o*o)/2}},v$=(e,t)=>hC(t-e)*Math.min(Math.abs(t-e),360),y$=(e,t)=>{if(v.isValidElement(e))return v.cloneElement(e,t);if(typeof e==`function`)return e(t);var n=dv(`recharts-pie-label-line`,typeof e==`boolean`?``:e.className);t.key;var r=a$(t,e$);return v.createElement(bN,i$({},r,{type:`linear`,className:n}))},b$=(e,t,n)=>{if(v.isValidElement(e))return v.cloneElement(e,t);var r=n;if(typeof e==`function`&&(r=e(t),v.isValidElement(r)))return r;var i=dv(`recharts-pie-label-text`,aZ(e));return v.createElement(NY,i$({},t,{alignmentBaseline:`middle`,className:i}),r)};function x$(e){var t=e.sectors,n=e.props,r=e.showLabels,i=n.label,a=n.labelLine,o=n.dataKey;if(!r||!i||!t)return null;var s=Wx(n),c=Gx(i),l=Gx(a),u=typeof i==`object`&&`offsetRadius`in i&&typeof i.offsetRadius==`number`&&i.offsetRadius||20,d=t.map((e,t)=>{var n=(e.startAngle+e.endAngle)/2,r=$P(e.cx,e.cy,e.outerRadius+u,n),d=c$(c$(c$(c$({},s),e),{},{stroke:`none`},c),{},{index:t,textAnchor:wee(r.x,e.cx)},r),f=c$(c$(c$(c$({},s),e),{},{fill:`none`,stroke:e.fill},l),{},{index:t,points:[$P(e.cx,e.cy,e.outerRadius,n),r],key:`line`});return v.createElement(bq,{zIndex:gI.label,key:`label-${e.startAngle}-${e.endAngle}-${e.midAngle}-${t}`},v.createElement(rS,null,a&&y$(a,f),b$(i,d,zO(e,o))))});return v.createElement(rS,{className:`recharts-pie-labels`},d)}function S$(e){var t=e.sectors,n=e.props,r=e.showLabels,i=n.label;return typeof i==`object`&&i&&`position`in i?v.createElement(TX,{label:i}):v.createElement(x$,{sectors:t,props:n,showLabels:r})}function C$(e){var t=e.sectors,n=e.activeShape,r=e.inactiveShape,i=e.allOtherPieProps,a=e.shape,o=e.id,s=e.animationElapsedTime,c=e.isAnimating,l=e.isEntrance,u=Q(gK),d=Q(vK),f=Q(yK),p=i.onMouseEnter,m=i.onClick,h=i.onMouseLeave,g=a$(i,t$),_=iQ(p,i.dataKey,o),y=aQ(h),b=oQ(m,i.dataKey,o);return t==null||t.length===0?null:v.createElement(v.Fragment,null,t.map((e,p)=>{if(e?.startAngle===0&&e?.endAngle===0&&t.length!==1)return null;var m=f==null||f===o,h=String(p)===u&&(d==null||i.dataKey===d)&&m,x=n&&h?n:u?r:null,S=c$(c$({},e),{},{stroke:e.stroke,tabIndex:-1,index:p,isActive:h,animationElapsedTime:s,isAnimating:c,isEntrance:l,[pk]:p,[mk]:o});return v.createElement(rS,i$({key:`sector-${e?.startAngle}-${e?.endAngle}-${e.midAngle}-${p}`,tabIndex:-1,className:`recharts-pie-sector`},MC(g,e,p),{onMouseEnter:_(e,p),onMouseLeave:y(e,p),onClick:b(e,p)}),v.createElement(rQ,{option:x??a,DefaultShape:f$,shapeProps:S}))}))}function w$(e){var t=e.pieSettings,n=e.displayedData,r=e.cells,i=e.offset,a=t.cornerRadius,o=t.startAngle,s=t.endAngle,c=t.dataKey,l=t.nameKey,u=t.tooltipType,d=Math.abs(t.minAngle),f=v$(o,s),p=Math.abs(f),m=n.length<=1?0:t.paddingAngle??0,h=n.filter(e=>zO(e,c,0)!==0).length,g=(p>=360?h:h-1)*m,_=n.reduce((e,t)=>{var n=zO(t,c,0);return e+(Z(n)?n:0)},0),v=d>0&&_>0&&n.some(e=>{var t=zO(e,c,0),n=(Z(t)?t:0)/_;return t!==0&&n*p<d})?d:0,y=p-h*v-g,b;if(_>0){var x;b=n.map((e,n)=>{var s=zO(e,c,0),d=zO(e,l,n),p=_$(t,i,e),h=(Z(s)?s:0)/_,g,b=c$(c$({},e),r&&r[n]&&r[n].props),S=b!=null&&`fill`in b&&typeof b.fill==`string`?b.fill:t.fill;g=n?x.endAngle+hC(f)*m*(s===0?0:1):o;var C=g+hC(f)*((s===0?0:v)+h*y),w=(g+C)/2,T=(p.innerRadius+p.outerRadius)/2,E=[{name:d,value:s,payload:b,dataKey:c,type:u,color:S,fill:S,graphicalItemId:t.id}],D=$P(p.cx,p.cy,T,w);return x=c$(c$(c$(c$({},t.presentationProps),{},{percent:h,cornerRadius:typeof a==`string`?parseFloat(a):a,name:d,tooltipPayload:E,midAngle:w,middleRadius:T,tooltipPosition:D},b),p),{},{value:s,dataKey:c,startAngle:g,endAngle:C,payload:b,paddingAngle:s===0?0:hC(f)*m}),x})}return b}function T$(e){var t=e.showLabels,n=e.sectors,r=e.children,i=(0,v.useMemo)(()=>!t||!n?[]:n.map(e=>({value:e.value,payload:e.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:e.cx,cy:e.cy,innerRadius:e.innerRadius,outerRadius:e.outerRadius,startAngle:e.startAngle,endAngle:e.endAngle,clockWise:!1},fill:e.fill})),[n,t]);return v.createElement(xX,{value:t?i:void 0},r)}var E$=(e,t)=>{if(e==null)return[];var n=[],r=e.find(e=>e.status!==`removed`),i=r?r.next.startAngle:0;return e.forEach((e,r)=>{if(e.status!==`removed`){var a=r>0?uC(e.next,`paddingAngle`,0):0;if(e.status===`matched`){var o=CC(e.prev.endAngle-e.prev.startAngle,e.next.endAngle-e.next.startAngle,t),s=c$(c$({},e.next),{},{startAngle:i+a,endAngle:i+o+a});n.push(s),i=s.endAngle}else{var c=CC(0,e.next.endAngle-e.next.startAngle,t),l=c$(c$({},e.next),{},{startAngle:i+a,endAngle:i+c+a});n.push(l),i=l.endAngle}}}),n};function D$(e){var t=e.props,n=e.previousSectorsRef,r=e.id,i=t.sectors,a=t.activeShape,o=t.inactiveShape,s=t.animationInterpolateFn,c=jQ(t.onAnimationStart,t.onAnimationEnd),l=c.isAnimating,u=c.handleAnimationStart,d=c.handleAnimationEnd,f=xA();return f==null?null:v.createElement(T$,{showLabels:!l,sectors:i},v.createElement(MQ,{animationInput:t,animationIdPrefix:`recharts-pie-`,items:i,previousItemsRef:n,isAnimationActive:t.isAnimationActive,animationBegin:t.animationBegin,animationDuration:t.animationDuration,animationEasing:t.animationEasing,onAnimationStart:u,onAnimationEnd:d,animationInterpolateFn:s,animationMatchBy:t.animationMatchBy,layout:f},(e,n,i)=>v.createElement(rS,null,v.createElement(C$,{sectors:e,activeShape:a,inactiveShape:o,allOtherPieProps:t,shape:t.shape,id:r,animationElapsedTime:n,isAnimating:l||n<1,isEntrance:i}))),v.createElement(S$,{showLabels:!l,sectors:i,props:t}),t.children)}var O$={animationBegin:400,animationDuration:1500,animationEasing:`ease`,animationInterpolateFn:E$,animationMatchBy:_Q,cx:`50%`,cy:`50%`,dataKey:`value`,endAngle:360,fill:`#808080`,hide:!1,innerRadius:0,isAnimationActive:`auto`,label:!1,labelLine:!0,legendType:`rect`,minAngle:0,nameKey:`name`,outerRadius:`80%`,paddingAngle:0,rootTabIndex:0,shape:f$,startAngle:0,stroke:`#fff`,zIndex:gI.area};function k$(e){var t=e.id,n=a$(e,n$),r=e.hide,i=e.className,a=e.rootTabIndex,o=(0,v.useMemo)(()=>GZ(e.children,bJ),[e.children]),s=Q(e=>RZ(e,t,o)),c=(0,v.useRef)(null),l=dv(`recharts-pie`,i);return r||s==null?(c.current=null,v.createElement(rS,{tabIndex:a,className:l})):v.createElement(bq,{zIndex:e.zIndex},v.createElement(h$,{dataKey:e.dataKey,nameKey:e.nameKey,sectors:s,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,tooltipType:e.tooltipType,formatter:e.formatter,id:t,activeShape:e.activeShape}),v.createElement(rS,{tabIndex:a,className:l},v.createElement(D$,{props:c$(c$({},n),{},{sectors:s}),previousSectorsRef:c,id:t})))}function A$(e){var t=RC(e,O$),n=t.id,r=a$(t,r$),i=Wx(r);return v.createElement(HQ,{id:n,type:`pie`},e=>v.createElement(v.Fragment,null,v.createElement($Q,{type:`pie`,id:e,data:r.data,dataKey:r.dataKey,hide:r.hide,angleAxisId:0,radiusAxisId:0,name:r.name,nameKey:r.nameKey,tooltipType:r.tooltipType,legendType:r.legendType,fill:r.fill,cx:r.cx,cy:r.cy,startAngle:r.startAngle,endAngle:r.endAngle,paddingAngle:r.paddingAngle,minAngle:r.minAngle,innerRadius:r.innerRadius,outerRadius:r.outerRadius,cornerRadius:r.cornerRadius,presentationProps:i,maxRadius:t.maxRadius}),v.createElement(p$,i$({},r,{id:e})),v.createElement(k$,i$({},r,{id:e}))))}var j$=A$;j$.displayName=`Pie`;var M$=[`points`];function N$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function P$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?N$(Object(n),!0).forEach(function(t){F$(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function F$(e,t,n){return(t=I$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I$(e){var t=L$(e,`string`);return typeof t==`symbol`?t:t+``}function L$(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function R$(){return R$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},R$.apply(null,arguments)}function z$(e,t){if(e==null)return{};var n,r,i=B$(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function B$(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function V$(e){var t=e.option,n=e.dotProps,r=e.className;if((0,v.isValidElement)(t))return(0,v.cloneElement)(t,n);if(typeof t==`function`)return t(n);var i=dv(r,typeof t==`boolean`?``:t.className),a=n??{};a.points;var o=z$(a,M$);return v.createElement(RX,R$({},o,{className:i}))}function H$(e,t){return e==null?!1:t?!0:e.length===1}function U$(e){var t=e.points,n=e.dot,r=e.className,i=e.dotClassName,a=e.dataKey,o=e.baseProps,s=e.needClip,c=e.clipPathId,l=e.zIndex,u=l===void 0?gI.scatter:l;if(!H$(t,n))return null;var d=KZ(n),f=qx(n),p=t.map((e,r)=>{var s=P$(P$(P$({r:3},o),f),{},{index:r,cx:e.x??void 0,cy:e.y??void 0,dataKey:a,value:e.value,payload:e.payload,points:t});return v.createElement(V$,{key:`dot-${r}`,option:n,dotProps:s,className:i})}),m={};return s&&c!=null&&(m.clipPath=`url(#clipPath-${d?``:`dots-`}${c})`),v.createElement(bq,{zIndex:u},v.createElement(rS,R$({className:r},m),p))}function W$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function G$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?W$(Object(n),!0).forEach(function(t){K$(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function K$(e,t,n){return(t=q$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q$(e){var t=J$(e,`string`);return typeof t==`symbol`?t:t+``}function J$(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Y$=ID({name:`cartesianAxis`,initialState:{xAxis:{},yAxis:{},zAxis:{}},reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=Uj(t.payload)},prepare:xD()},replaceXAxis:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next;e.xAxis[r.id]!==void 0&&(r.id!==i.id&&delete e.xAxis[r.id],e.xAxis[i.id]=Uj(i))},prepare:xD()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:xD()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=Uj(t.payload)},prepare:xD()},replaceYAxis:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next;e.yAxis[r.id]!==void 0&&(r.id!==i.id&&delete e.yAxis[r.id],e.yAxis[i.id]=Uj(i))},prepare:xD()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:xD()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=Uj(t.payload)},prepare:xD()},replaceZAxis:{reducer(e,t){var n=t.payload,r=n.prev,i=n.next;e.zAxis[r.id]!==void 0&&(r.id!==i.id&&delete e.zAxis[r.id],e.zAxis[i.id]=Uj(i))},prepare:xD()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:xD()},updateYAxisWidth(e,t){var n=t.payload,r=n.id,i=n.width,a=e.yAxis[r];if(a){var o=a.widthHistory||[];if(o.length===3&&o[0]===o[2]&&i===o[1]&&i!==a.width&&Math.abs(i-(o[0]??0))<=1)return;var s=[...o,i].slice(-3);e.yAxis[r]=G$(G$({},a),{},{width:i,widthHistory:s})}}}}),X$=Y$.actions,Z$=X$.addXAxis,Q$=X$.replaceXAxis,$$=X$.removeXAxis,e1=X$.addYAxis,t1=X$.replaceYAxis,n1=X$.removeYAxis;X$.addZAxis,X$.replaceZAxis,X$.removeZAxis;var r1=X$.updateYAxisWidth,i1=Y$.reducer,a1=$([$([Tk],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),sk,ck],(e,t,n)=>{if(!(!e||t==null||n==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),o1=()=>Q(a1),s1=()=>Q(CK);function c1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?c1(Object(n),!0).forEach(function(t){u1(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c1(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u1(e,t,n){return(t=d1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d1(e){var t=f1(e,`string`);return typeof t==`symbol`?t:t+``}function f1(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var p1=e=>{var t=e.point,n=e.childIndex,r=e.mainColor,i=e.activeDot,a=e.dataKey,o=e.clipPath;if(i===!1||t.x==null||t.y==null)return null;var s=l1(l1(l1({},{index:n,dataKey:a,cx:t.x,cy:t.y,r:4,fill:r??`none`,strokeWidth:2,stroke:`#fff`,payload:t.payload,value:t.value}),Gx(i)),AC(i)),c=(0,v.isValidElement)(i)?(0,v.cloneElement)(i,s):typeof i==`function`?i(s):v.createElement(RX,s);return v.createElement(rS,{className:`recharts-active-dot`,clipPath:o},c)};function m1(e){var t=e.points,n=e.mainColor,r=e.activeDot,i=e.itemDataKey,a=e.clipPath,o=e.zIndex,s=o===void 0?gI.activeDot:o,c=Q(gK),l=s1();if(t==null||l==null)return null;var u=t.find(e=>l.includes(e.payload));return TC(u)?null:v.createElement(bq,{zIndex:s},v.createElement(p1,{point:u,childIndex:Number(c),mainColor:n,dataKey:i,activeDot:r,clipPath:a}))}var h1=[`option`];function g1(e,t){if(e==null)return{};var n,r,i=_1(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _1(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var v1=xF;function y1(e){return typeof e==`string`?parseInt(e,10):e}function b1(e){var t=e.option,n=g1(e,h1);return v.createElement(rQ,{option:t,DefaultShape:v1,shapeProps:n})}function x1(e,t){return E1(e)||T1(e,t)||C1(e,t)||S1()}function S1(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
129
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function C1(e,t){if(e){if(typeof e==`string`)return w1(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w1(e,t):void 0}}function w1(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function T1(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function E1(e){if(Array.isArray(e))return e}var D1=(e,t,n)=>{var r=n??e;if(!TC(r))return xC(r,t,0)},O1=(e,t,n)=>{var r={},i=e.filter(UI),a=e.filter(e=>e.stackId==null),o=i.reduce((e,t)=>{var n=e[t.stackId];return n??=[],n.push(t),e[t.stackId]=n,e},r),s=Object.entries(o).map(e=>{var r=x1(e,2),i=r[0],a=r[1];return{stackId:i,dataKeys:a.map(e=>e.dataKey),barSize:D1(t,n,a[0]?.barSize)}}),c=a.map(e=>({stackId:void 0,dataKeys:[e.dataKey].filter(e=>e!=null),barSize:D1(t,n,e.barSize)}));return[...s,...c]};function k1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function A1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?k1(Object(n),!0).forEach(function(t){j1(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k1(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function j1(e,t,n){return(t=M1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M1(e){var t=N1(e,`string`);return typeof t==`symbol`?t:t+``}function N1(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function P1(e,t,n,r,i){var a=r.length;if(!(a<1)){var o=xC(e,n,0,!0),s,c=[];if(MO(r[0]?.barSize)){var l=!1,u=n/a,d=r.reduce((e,t)=>e+(t.barSize||0),0);d+=(a-1)*o,d>=n&&(d-=(a-1)*o,o=0),d>=n&&u>0&&(l=!0,u*=.9,d=a*u);var f={offset:Math.round((n-d)/2)-o,size:0};s=r.reduce((e,t)=>{var n={stackId:t.stackId,dataKeys:t.dataKeys,position:{offset:f.offset+f.size+o,size:l?u:t.barSize??0}},r=[...e,n];return f=n.position,r},c)}else{var p=xC(t,n,0,!0);n-2*p-(a-1)*o<=0&&(o=0);var m=(n-2*p-(a-1)*o)/a;m>1&&(m=Math.round(m));var h=MO(i)?Math.min(m,i):m;s=r.reduce((e,t,n)=>[...e,{stackId:t.stackId,dataKeys:t.dataKeys,position:{offset:p+(m+o)*n+(m-h)/2,size:h}}],c)}return s}}var F1=(e,t,n,r,i,a,o)=>{var s=TC(o)?t:o,c=P1(n,r,i===a?a:i,e,s);return i!==a&&c!=null&&(c=c.map(e=>A1(A1({},e),{},{position:A1(A1({},e.position),{},{offset:e.position.offset-i/2})}))),c},I1=(e,t)=>{var n=VI(t);if(!(!e||n==null||t==null)){var r=t.stackId;if(r!=null){var i=e[r];if(i){var a=i.stackedData;if(a)return a.find(e=>e.key===n)}}}},L1=(e,t)=>{if(!(e==null||t==null)){var n=e.find(e=>e.stackId===t.stackId&&t.dataKey!=null&&e.dataKeys.includes(t.dataKey));if(n!=null)return n.position}};function R1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function z1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?R1(Object(n),!0).forEach(function(t){B1(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R1(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function B1(e,t,n){return(t=V1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function V1(e){var t=H1(e,`string`);return typeof t==`symbol`?t:t+``}function H1(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var U1=$([(e,t)=>kI(e,t),(e,t)=>YX(e,`radiusAxis`,t)],(e,t)=>{if(!(e==null||t==null))return z1(z1({},e),{},{scale:t})}),W1=(e,t)=>$X(e,`radiusAxis`,t,!1),G1=$([(e,t,n)=>OI(e,n),(e,t,n)=>YX(e,`angleAxis`,n)],(e,t)=>{if(!(e==null||t==null))return z1(z1({},e),{},{scale:t})}),K1=(e,t,n)=>ZX(e,`angleAxis`,n,!1),q1=$([zX,(e,t,n,r)=>r],(e,t)=>{if(e.some(e=>e.type===`radialBar`&&t.dataKey===e.dataKey&&t.stackId===e.stackId))return t}),J1=$([_A,U1,W1,G1,K1],(e,t,n,r,i)=>VO(e,`radiusAxis`)?nk(t,n,!1):nk(r,i,!1)),Y1=$([G1,U1,_A],(e,t,n)=>{var r=n===`radial`?e:t;if(!(r==null||r.scale==null))return XO({numericAxis:r})}),X1=(e,t,n,r,i)=>i,Z1=(e,t,n,r,i)=>n,Q1=(e,t,n,r,i)=>t,$1=(e,t,n,r,i)=>r.maxBarSize,e0=e=>e.type===`radialBar`,t0=$([$([$([$([_A,zX,Z1,Q1],(e,t,n,r)=>t.filter(t=>e===`centric`?t.angleAxisId===n:t.radiusAxisId===r).filter(e=>e.hide===!1).filter(e0)),cI,()=>void 0],O1),aI,oI,sI,$([_A,aI,G1,K1,U1,W1,$1],(e,t,n,r,i,a,o)=>{var s=TC(o)?t:o;return e===`centric`?nk(n,r,!0)??s??0:nk(i,a,!0)??s??0}),J1,$1],F1),q1],L1),n0=$([BX],e=>e.filter(e0).filter(UI)),r0=$([$([n0,DF,CU],HI),n0,lI,uI],EU),i0=$([G1,K1,U1,W1,EF,q1,J1,_A,Y1,RI,X1,t0,$([(e,t,n)=>_A(e)===`centric`?r0(e,`radiusAxis`,t):r0(e,`angleAxis`,n),q1],I1)],(e,t,n,r,i,a,o,s,c,l,u,d,f)=>{var p=i.chartData,m=i.dataStartIndex,h=i.dataEndIndex;if(a==null||n==null||e==null||p==null||o==null||d==null||s!==`centric`&&s!==`radial`||r==null||l==null)return[];var g=a.dataKey,_=a.minPointSize,v=l.cx,y=l.cy,b=l.startAngle,x=l.endAngle;return k0({angleAxis:e,angleAxisTicks:t,bandSize:o,baseValue:c,cells:u,cx:v,cy:y,dataKey:g,dataStartIndex:m,displayedData:p.slice(m,h+1),endAngle:x,layout:s,minPointSize:_,pos:d,radiusAxis:n,radiusAxisTicks:r,stackedData:f,stackedDomain:f?(s===`centric`?n:e).scale.domain():null,startAngle:b})}),a0=$([DF,(e,t)=>t],(e,t)=>{var n=e.chartData,r=e.dataStartIndex,i=e.dataEndIndex;if(n==null)return[];var a=n.slice(r,i+1);return a.length===0?[]:a.map(e=>({type:t,value:e.name,color:e.fill,payload:e}))});function o0(e,t){return e&&typeof e==`object`&&`zIndex`in e&&typeof e.zIndex==`number`&&MO(e.zIndex)?e.zIndex:t}var s0=[`shape`,`activeShape`,`cornerRadius`,`id`],c0=[`onMouseEnter`,`onClick`,`onMouseLeave`],l0=[`value`,`background`];function u0(){return u0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u0.apply(null,arguments)}function d0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function f0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?d0(Object(n),!0).forEach(function(t){p0(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d0(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function p0(e,t,n){return(t=m0(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m0(e){var t=h0(e,`string`);return typeof t==`symbol`?t:t+``}function h0(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function g0(e,t){if(e==null)return{};var n,r,i=_0(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _0(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var v0=[];function y0(e){var t=e.showLabels,n=e.sectors,r=e.children,i=n.map(e=>({value:e.value,payload:e.payload,parentViewBox:void 0,clockWise:!1,viewBox:{cx:e.cx,cy:e.cy,innerRadius:e.innerRadius,outerRadius:e.outerRadius,startAngle:e.startAngle,endAngle:e.endAngle,clockWise:!1},fill:e.fill}));return v.createElement(xX,{value:t?i:void 0},r)}function b0(e){var t=e.sectors,n=e.allOtherRadialBarProps,r=e.showLabels,i=e.animationElapsedTime,a=e.isAnimating,o=e.isEntrance,s=n.shape,c=n.activeShape,l=n.cornerRadius,u=n.id,d=g0(n,s0),f=Wx(d),p=Q(gK),m=n.onMouseEnter,h=n.onClick,g=n.onMouseLeave,_=g0(n,c0),y=iQ(m,n.dataKey,u),b=aQ(g),x=oQ(h,n.dataKey,u);return t==null?null:v.createElement(y0,{showLabels:r,sectors:t},t.map((e,t)=>{var n=!!(c&&p===String(t)),r=y(e,t),u=b(e,t),m=x(e,t),h=f0(f0(f0(f0({},f),{},{cornerRadius:y1(l)},e),MC(_,e,t)),{},{onMouseEnter:r,onMouseLeave:u,onClick:m,className:`recharts-radial-bar-sector ${e.className}`,forceCornerRadius:d.forceCornerRadius,cornerIsExternal:d.cornerIsExternal,animationElapsedTime:i,isAnimating:a,isEntrance:o,isActive:n,option:n&&c!=null?c:s,index:t});return n?v.createElement(bq,{zIndex:gI.activeBar,key:`sector-${e.cx}-${e.cy}-${e.innerRadius}-${e.outerRadius}-${e.startAngle}-${e.endAngle}-${t}`},v.createElement(b1,h)):v.createElement(b1,u0({key:`sector-${e.cx}-${e.cy}-${e.innerRadius}-${e.outerRadius}-${e.startAngle}-${e.endAngle}-${t}`},h))}),v.createElement(TX,{label:n.label}),n.children)}var x0=(e,t)=>e==null?[]:t===1?e.flatMap(e=>e.status===`removed`?[]:[e.next]):e.flatMap(e=>e.status===`removed`?[]:e.status===`matched`?[f0(f0({},e.next),{},{startAngle:CC(e.prev.startAngle,e.next.startAngle,t),endAngle:CC(e.prev.endAngle,e.next.endAngle,t)})]:[f0(f0({},e.next),{},{endAngle:CC(e.next.startAngle,e.next.endAngle,t)})]);function S0(e){var t=e.props,n=e.previousSectorsRef,r=t.sectors,i=t.isAnimationActive,a=t.animationBegin,o=t.animationDuration,s=t.animationEasing,c=t.onAnimationStart,l=t.onAnimationEnd,u=jQ(c,l),d=u.isAnimating,f=u.handleAnimationStart,p=u.handleAnimationEnd,m=xA();return m==null?null:v.createElement(MQ,{animationInput:t,animationIdPrefix:`recharts-radialbar-`,items:r,previousItemsRef:n,isAnimationActive:i,animationBegin:a,animationDuration:o,animationEasing:s,onAnimationStart:f,onAnimationEnd:p,animationInterpolateFn:t.animationInterpolateFn,animationMatchBy:t.animationMatchBy,layout:m},(e,n,r)=>v.createElement(b0,{sectors:e,allOtherRadialBarProps:t,showLabels:!d,animationElapsedTime:n,isAnimating:d||n<1,isEntrance:r}))}function C0(e){var t=(0,v.useRef)(null);return v.createElement(S0,{props:e,previousSectorsRef:t})}function w0(e){var t=Q(t=>a0(t,e.legendType));return v.createElement(lQ,{legendPayload:t??[]})}var T0=v.memo(e=>{var t=e.dataKey,n=e.sectors,r=e.stroke,i=e.strokeWidth,a=e.name,o=e.hide,s=e.fill,c=e.tooltipType,l=e.formatter,u={dataDefinedOnItem:n,getPosition:OC,settings:{graphicalItemId:e.id,stroke:r,strokeWidth:i,fill:s,nameKey:void 0,dataKey:t,name:ik(a,t),hide:o,type:c,color:s,unit:``,formatter:l}};return v.createElement(sQ,{tooltipEntrySettings:u})}),E0=class extends v.PureComponent{renderBackground(e){if(e==null)return null;var t=this.props.cornerRadius,n=Gx(this.props.background);return v.createElement(bq,{zIndex:o0(this.props.background,gI.barBackground)},e.map((e,r)=>{e.value;var i=e.background,a=g0(e,l0);if(!i)return null;var o=f0(f0(f0(f0(f0({cornerRadius:y1(t)},a),{},{fill:`#eee`},i),n),MC(this.props,e,r)),{},{index:r,className:dv(`recharts-radial-bar-background-sector`,String(n?.className)),option:i,isActive:!1});return v.createElement(b1,u0({key:`background-${a.cx}-${a.cy}-${a.innerRadius}-${a.outerRadius}-${a.startAngle}-${a.endAngle}-${r}`},o))}))}render(){var e=this.props,t=e.hide,n=e.sectors,r=e.className,i=e.background;if(t)return null;var a=dv(`recharts-area`,r);return v.createElement(bq,{zIndex:this.props.zIndex},v.createElement(rS,{className:a},i&&v.createElement(rS,{className:`recharts-radial-bar-background`},this.renderBackground(n)),v.createElement(rS,{className:`recharts-radial-bar-sectors`},v.createElement(C0,this.props))))}};function D0(e){var t=v.useMemo(()=>GZ(e.children,bJ),[e.children]),n=v.useMemo(()=>({data:void 0,hide:!1,id:e.id,dataKey:e.dataKey,minPointSize:e.minPointSize,stackId:qO(e.stackId),maxBarSize:e.maxBarSize,barSize:e.barSize,type:`radialBar`,angleAxisId:e.angleAxisId,radiusAxisId:e.radiusAxisId}),[e.id,e.dataKey,e.minPointSize,e.stackId,e.maxBarSize,e.barSize,e.angleAxisId,e.radiusAxisId]),r=Q(r=>i0(r,e.radiusAxisId,e.angleAxisId,n,t))??v0;return v.createElement(v.Fragment,null,v.createElement(T0,{dataKey:e.dataKey,sectors:r,stroke:e.stroke,strokeWidth:e.strokeWidth,name:e.name,hide:e.hide,fill:e.fill,tooltipType:e.tooltipType,formatter:e.formatter,id:e.id}),v.createElement(E0,u0({},e,{sectors:r})))}var O0={angleAxisId:0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,animationMatchBy:_Q,animationInterpolateFn:x0,background:!1,cornerIsExternal:!1,cornerRadius:0,forceCornerRadius:!1,hide:!1,isAnimationActive:`auto`,label:!1,legendType:`rect`,minPointSize:0,radiusAxisId:0,shape:v1,zIndex:gI.bar};function k0(e){var t=e.displayedData,n=e.stackedData,r=e.dataStartIndex,i=e.stackedDomain,a=e.dataKey,o=e.baseValue,s=e.layout,c=e.radiusAxis,l=e.radiusAxisTicks,u=e.bandSize,d=e.pos,f=e.angleAxis,p=e.minPointSize,m=e.cx,h=e.cy,g=e.angleAxisTicks,_=e.cells,v=e.startAngle,y=e.endAngle;return g==null||l==null?v0:(t??[]).map((e,t)=>{var b,x,S,C,w,T;if(n?b=WO(n[r+t],i):(b=zO(e,a),Array.isArray(b)||(b=[o,b])),s===`radial`){if(C=f.scale.map(b[0])??v,w=f.scale.map(b[1])??y,x=YO({axis:c,ticks:l,bandSize:u,offset:d.offset,entry:e,index:t}),x!=null&&w!=null&&C!=null){S=x+d.size;var E=w-C;if(Math.abs(p)>0&&Math.abs(E)<Math.abs(p)){var D=hC(E||p)*(Math.abs(p)-Math.abs(E));w+=D}T={background:{cx:m,cy:h,innerRadius:x,outerRadius:S,startAngle:v,endAngle:y}}}}else if(x=c.scale.map(b[0]),S=c.scale.map(b[1]),C=YO({axis:f,ticks:g,bandSize:u,offset:d.offset,entry:e,index:t}),x!=null&&S!=null&&C!=null){w=C+d.size;var O=S-x;if(Math.abs(p)>0&&Math.abs(O)<Math.abs(p)){var k=hC(O||p)*(Math.abs(p)-Math.abs(O));S+=k}}return f0(f0(f0({},e),T),{},{payload:e,value:n?b:b[1],cx:m,cy:h,innerRadius:x,outerRadius:S,startAngle:C,endAngle:w},_&&_[t]&&_[t].props)})}function A0(e){var t=RC(e,O0);return v.createElement(HQ,{id:t.id,type:`radialBar`},e=>v.createElement(v.Fragment,null,v.createElement($Q,{type:`radialBar`,id:e,data:void 0,dataKey:t.dataKey,hide:t.hide??O0.hide,angleAxisId:t.angleAxisId??O0.angleAxisId,radiusAxisId:t.radiusAxisId??O0.radiusAxisId,stackId:qO(t.stackId),barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize}),v.createElement(w0,t),v.createElement(D0,u0({},t,{id:e}))))}A0.displayName=`RadialBar`;var j0=e=>{var t=e.chartData,n=$w(),r=kk();return(0,v.useEffect)(()=>r?()=>{}:(n(Uq(t)),()=>{n(Uq(void 0))}),[t,n,r]),null},M0={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},N0=ID({name:`brush`,initialState:M0,reducers:{setBrushSettings(e,t){return t.payload==null?M0:t.payload}}});N0.actions.setBrushSettings;var P0=N0.reducer;function F0(e){return(e%180+180)%180}var I0=function(e){var t=e.width,n=e.height,r=F0(arguments.length>1&&arguments[1]!==void 0?arguments[1]:0)*Math.PI/180,i=Math.atan(n/t),a=r>i&&r<Math.PI-i?n/Math.sin(r):t/Math.cos(r);return Math.abs(a)},L0=ID({name:`referenceElements`,initialState:{dots:[],areas:[],lines:[]},reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=sD(e).dots.findIndex(e=>e===t.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=sD(e).areas.findIndex(e=>e===t.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(Uj(t.payload))},removeLine:(e,t)=>{var n=sD(e).lines.findIndex(e=>e===t.payload);n!==-1&&e.lines.splice(n,1)}}}),R0=L0.actions;R0.addDot,R0.removeDot,R0.addArea,R0.removeArea,R0.addLine,R0.removeLine;var z0=L0.reducer;function B0(e,t){return G0(e)||W0(e,t)||H0(e,t)||V0()}function V0(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
130
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function H0(e,t){if(e){if(typeof e==`string`)return U0(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?U0(e,t):void 0}}function U0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function W0(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function G0(e){if(Array.isArray(e))return e}var K0=(0,v.createContext)(void 0),q0=e=>{var t=e.children,n=B0((0,v.useState)(`${bC(`recharts`)}-clip`),1)[0],r=o1();if(r==null)return null;var i=r.x,a=r.y,o=r.width,s=r.height;return v.createElement(K0.Provider,{value:n},v.createElement(`defs`,null,v.createElement(`clipPath`,{id:n},v.createElement(`rect`,{x:i,y:a,height:s,width:o}))),t)};function J0(e,t){if(t<1)return[];if(t===1)return e;for(var n=[],r=0;r<e.length;r+=t){var i=e[r];i!==void 0&&n.push(i)}return n}function Y0(e,t,n){return I0({width:e.width+t.width,height:e.height+t.height},n)}function X0(e,t,n){var r=n===`width`,i=e.x,a=e.y,o=e.width,s=e.height;return t===1?{start:r?i:a,end:r?i+o:a+s}:{start:r?i+o:a+s,end:r?i:a}}function Z0(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function Q0(e,t){return J0(e,t+1)}function $0(e,t,n,r,i){for(var a=(r||[]).slice(),o=t.start,s=t.end,c=0,l=1,u=o,d=function(){var t=r?.[c];if(t===void 0)return{v:J0(r,l)};var a=c,d,f=()=>(d===void 0&&(d=n(t,a)),d),p=t.coordinate,m=c===0||Z0(e,p,f,u,s);m||(c=0,u=o,l+=1),m&&(u=p+e*(f()/2+i),c+=l)},f;l<=a.length;)if(f=d(),f)return f.v;return[]}function e2(e,t,n,r,i){var a=(r||[]).slice().length;if(a===0)return[];for(var o=t.start,s=t.end,c=1;c<=a;c++){for(var l=(a-1)%c,u=o,d=!0,f=function(){var t=r[m];if(t==null)return 0;var a=m,o,c=()=>(o===void 0&&(o=n(t,a)),o),f=t.coordinate,p=m===l||Z0(e,f,c,u,s);if(!p)return d=!1,1;p&&(u=f+e*(c()/2+i))},p,m=l;m<a&&(p=f(),!(p!==0&&p===1));m+=c);if(d){for(var h=[],g=l;g<a;g+=c){var _=r[g];_!=null&&h.push(_)}return h}}return[]}function t2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function n2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?t2(Object(n),!0).forEach(function(t){r2(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t2(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function r2(e,t,n){return(t=i2(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i2(e){var t=a2(e,`string`);return typeof t==`symbol`?t:t+``}function a2(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function o2(e,t,n,r,i){for(var a=(r||[]).slice(),o=a.length,s=t.start,c=t.end,l=function(t){var r=a[t];if(r==null)return 1;var l=r,u,d=()=>(u===void 0&&(u=n(r,t)),u);if(t===o-1){var f=e*(l.coordinate+e*d()/2-c);a[t]=l=n2(n2({},l),{},{tickCoord:f>0?l.coordinate-f*e:l.coordinate})}else a[t]=l=n2(n2({},l),{},{tickCoord:l.coordinate});l.tickCoord!=null&&Z0(e,l.tickCoord,d,s,c)&&(c=l.tickCoord-e*(d()/2+i),a[t]=n2(n2({},l),{},{isShow:!0}))},u=o-1;u>=0;u--)if(l(u))continue;return a}function s2(e,t,n,r,i,a){var o=(r||[]).slice(),s=o.length,c=t.start,l=t.end;if(a){var u=r[s-1];if(u!=null){var d=n(u,s-1),f=e*(u.coordinate+e*d/2-l);o[s-1]=u=n2(n2({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate}),u.tickCoord!=null&&Z0(e,u.tickCoord,()=>d,c,l)&&(l=u.tickCoord-e*(d/2+i),o[s-1]=n2(n2({},u),{},{isShow:!0}))}}for(var p=a?s-1:s,m=function(t){var r=o[t];if(r==null)return 1;var a=r,s,u=()=>(s===void 0&&(s=n(r,t)),s);if(t===0){var d=e*(a.coordinate-e*u()/2-c);o[t]=a=n2(n2({},a),{},{tickCoord:d<0?a.coordinate-d*e:a.coordinate})}else o[t]=a=n2(n2({},a),{},{tickCoord:a.coordinate});a.tickCoord!=null&&Z0(e,a.tickCoord,u,c,l)&&(c=a.tickCoord+e*(u()/2+i),o[t]=n2(n2({},a),{},{isShow:!0}))},h=0;h<p;h++)if(m(h))continue;return o}function c2(e,t,n){var r=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,s=e.orientation,c=e.interval,l=e.tickFormatter,u=e.unit,d=e.angle;if(!i||!i.length||!r)return[];if(Z(c)||LM.isSsr)return Q0(i,Z(c)?c:0)??[];var f=[],p=s===`top`||s===`bottom`?`width`:`height`,m=u&&p===`width`?IJ(u,{fontSize:t,letterSpacing:n}):{width:0,height:0},h=(e,r)=>{var i=typeof l==`function`?l(e.value,r):e.value;return p===`width`?Y0(IJ(i,{fontSize:t,letterSpacing:n}),m,d):IJ(i,{fontSize:t,letterSpacing:n})[p]},g=i[0],_=i[1],v=i.length>=2&&g!=null&&_!=null?hC(_.coordinate-g.coordinate):1,y=X0(a,v,p);return c===`equidistantPreserveStart`?$0(v,y,h,i,o):c===`equidistantPreserveEnd`?e2(v,y,h,i,o):(f=c===`preserveStart`||c===`preserveStartEnd`?s2(v,y,h,i,o,c===`preserveStartEnd`):o2(v,y,h,i,o),f.filter(e=>e.isShow))}var l2=e=>{var t=e.ticks,n=e.label,r=e.labelGapWithTick,i=r===void 0?5:r,a=e.tickSize,o=a===void 0?0:a,s=e.tickMargin,c=s===void 0?0:s,l=0;if(t){Array.from(t).forEach(e=>{if(e){var t=e.getBoundingClientRect();t.width>l&&(l=t.width)}});var u=n?n.getBoundingClientRect().width:0,d=o+c,f=l+d+u+(n?i:0);return Math.round(f)}return 0},u2=ID({name:`renderedTicks`,initialState:{xAxis:{},yAxis:{}},reducers:{setRenderedTicks:(e,t)=>{var n=t.payload,r=n.axisType,i=n.axisId,a=n.ticks;e[r][i]=Uj(a)},removeRenderedTicks:(e,t)=>{var n=t.payload,r=n.axisType,i=n.axisId;delete e[r][i]}}}),d2=u2.actions,f2=d2.setRenderedTicks,p2=d2.removeRenderedTicks,m2=u2.reducer,h2=[`axisLine`,`width`,`height`,`className`,`hide`,`ticks`,`axisType`,`axisId`];function g2(e,t){return x2(e)||b2(e,t)||v2(e,t)||_2()}function _2(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
131
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v2(e,t){if(e){if(typeof e==`string`)return y2(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y2(e,t):void 0}}function y2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function b2(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function x2(e){if(Array.isArray(e))return e}function S2(e,t){if(e==null)return{};var n,r,i=C2(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function C2(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function w2(){return w2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w2.apply(null,arguments)}function T2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function E2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?T2(Object(n),!0).forEach(function(t){D2(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T2(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function D2(e,t,n){return(t=O2(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O2(e){var t=k2(e,`string`);return typeof t==`symbol`?t:t+``}function k2(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var A2={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:`bottom`,ticks:[],stroke:`#666`,tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:`preserveEnd`,zIndex:gI.axis};function j2(e){var t=e.x,n=e.y,r=e.width,i=e.height,a=e.orientation,o=e.mirror,s=e.axisLine,c=e.otherSvgProps;if(!s)return null;var l=E2(E2(E2({},c),Wx(s)),{},{fill:`none`});if(a===`top`||a===`bottom`){var u=+(a===`top`&&!o||a===`bottom`&&o);l=E2(E2({},l),{},{x1:t,y1:n+u*i,x2:t+r,y2:n+u*i})}else{var d=+(a===`left`&&!o||a===`right`&&o);l=E2(E2({},l),{},{x1:t+d*r,y1:n,x2:t+d*r,y2:n+i})}return v.createElement(`line`,w2({},l,{className:dv(`recharts-cartesian-axis-line`,uC(s,`className`))}))}function M2(e,t,n,r,i,a,o,s,c){var l,u,d,f,p,m,h=s?-1:1,g=e.tickSize||o,_=Z(e.tickCoord)?e.tickCoord:e.coordinate;switch(a){case`top`:l=u=e.coordinate,f=n+ +!s*i,d=f-h*g,m=d-h*c,p=_;break;case`left`:d=f=e.coordinate,u=t+ +!s*r,l=u-h*g,p=l-h*c,m=_;break;case`right`:d=f=e.coordinate,u=t+ +s*r,l=u+h*g,p=l+h*c,m=_;break;default:l=u=e.coordinate,f=n+ +s*i,d=f+h*g,m=d+h*c,p=_;break}return{line:{x1:l,y1:d,x2:u,y2:f},tick:{x:p,y:m}}}function N2(e,t){switch(e){case`left`:return t?`start`:`end`;case`right`:return t?`end`:`start`;default:return`middle`}}function P2(e,t){switch(e){case`left`:case`right`:return`middle`;case`top`:return t?`start`:`end`;default:return t?`end`:`start`}}function F2(e){var t=e.option,n=e.tickProps,r=e.value,i,a=dv(n.className,`recharts-cartesian-axis-tick-value`);if(v.isValidElement(t))i=v.cloneElement(t,E2(E2({},n),{},{className:a}));else if(typeof t==`function`)i=t(E2(E2({},n),{},{className:a}));else{var o=`recharts-cartesian-axis-tick-value`;typeof t!=`boolean`&&(o=dv(o,aZ(t))),i=v.createElement(NY,w2({},n,{className:o}),r)}return i}function I2(e){var t=e.ticks,n=e.axisType,r=e.axisId,i=$w();return(0,v.useEffect)(()=>r==null||n==null?OC:(i(f2({ticks:t.map(e=>({value:e.value,coordinate:e.coordinate,offset:e.offset,index:e.index})),axisId:r,axisType:n})),()=>{i(p2({axisId:r,axisType:n}))}),[i,t,r,n]),null}var L2=(0,v.forwardRef)((e,t)=>{var n=e.ticks,r=n===void 0?[]:n,i=e.tick,a=e.tickLine,o=e.stroke,s=e.tickFormatter,c=e.unit,l=e.padding,u=e.tickTextProps,d=e.orientation,f=e.mirror,p=e.x,m=e.y,h=e.width,g=e.height,_=e.tickSize,y=e.tickMargin,b=e.fontSize,x=e.letterSpacing,S=e.getTicksConfig,C=e.events,w=e.axisType,T=e.axisId,E=c2(E2(E2({},S),{},{ticks:r}),b,x),D=Wx(S),O=Gx(i),k=SY(D.textAnchor)?D.textAnchor:N2(d,f),A=P2(d,f),j={};typeof a==`object`&&(j=a);var M=E2(E2({},D),{},{fill:`none`},j),N=E.map(e=>E2({entry:e},M2(e,p,m,h,g,d,_,f,y))),P=N.map(e=>{var t=e.entry,n=e.line;return v.createElement(rS,{className:`recharts-cartesian-axis-tick`,key:`tick-${t.value}-${t.coordinate}-${t.tickCoord}`},a&&v.createElement(`line`,w2({},M,n,{className:dv(`recharts-cartesian-axis-tick-line`,uC(a,`className`))})))}),F=N.map((e,t)=>{var n=e.entry,r=e.tick,a=E2(E2({},E2(E2(E2(E2({verticalAnchor:A},D),{},{textAnchor:k,stroke:`none`,fill:o},r),{},{index:t,payload:n,visibleTicksCount:E.length,tickFormatter:s,padding:l},u),{},{angle:u?.angle??D.angle??0})),O);return v.createElement(rS,w2({className:`recharts-cartesian-axis-tick-label`,key:`tick-label-${n.value}-${n.coordinate}-${n.tickCoord}`},MC(C,n,t)),i&&v.createElement(F2,{option:i,tickProps:a,value:`${typeof s==`function`?s(n.value,t):n.value}${c||``}`}))});return v.createElement(`g`,{className:`recharts-cartesian-axis-ticks recharts-${w}-ticks`},v.createElement(I2,{ticks:E,axisId:T,axisType:w}),F.length>0&&v.createElement(bq,{zIndex:gI.label},v.createElement(`g`,{className:`recharts-cartesian-axis-tick-labels recharts-${w}-tick-labels`,ref:t},F)),P.length>0&&v.createElement(`g`,{className:`recharts-cartesian-axis-tick-lines recharts-${w}-tick-lines`},P))}),R2=(0,v.forwardRef)((e,t)=>{var n=e.axisLine,r=e.width,i=e.height,a=e.className,o=e.hide,s=e.ticks,c=e.axisType,l=e.axisId,u=S2(e,h2),d=g2((0,v.useState)(``),2),f=d[0],p=d[1],m=g2((0,v.useState)(``),2),h=m[0],g=m[1],_=(0,v.useRef)(null);(0,v.useImperativeHandle)(t,()=>({getCalculatedWidth:()=>l2({ticks:_.current,label:e.labelRef?.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}));var y=(0,v.useCallback)(e=>{if(e){var t=e.getElementsByClassName(`recharts-cartesian-axis-tick-value`);_.current=t;var n=t[0];if(n){var r=window.getComputedStyle(n),i=r.fontSize,a=r.letterSpacing;(i!==f||a!==h)&&(p(i),g(a))}}},[f,h]);return o||r!=null&&r<=0||i!=null&&i<=0?null:v.createElement(bq,{zIndex:e.zIndex},v.createElement(rS,{className:dv(`recharts-cartesian-axis`,a)},v.createElement(j2,{x:e.x,y:e.y,width:r,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:Wx(e)}),v.createElement(L2,{ref:y,axisType:c,events:u,fontSize:f,getTicksConfig:e,height:e.height,letterSpacing:h,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:s,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:l}),v.createElement(ZY,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},v.createElement(dX,{label:e.label,labelRef:e.labelRef}),e.children)))}),z2=v.forwardRef((e,t)=>{var n=RC(e,A2);return v.createElement(R2,w2({},n,{ref:t}))});z2.displayName=`CartesianAxis`;var B2=[`x1`,`y1`,`x2`,`y2`,`key`],V2=[`offset`],H2=[`xAxisId`,`yAxisId`],U2=[`xAxisId`,`yAxisId`];function W2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function G2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?W2(Object(n),!0).forEach(function(t){K2(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W2(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function K2(e,t,n){return(t=q2(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q2(e){var t=J2(e,`string`);return typeof t==`symbol`?t:t+``}function J2(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Y2(){return Y2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Y2.apply(null,arguments)}function X2(e,t){if(e==null)return{};var n,r,i=Z2(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Z2(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Q2=e=>{var t=e.fill;if(!t||t===`none`)return null;var n=e.fillOpacity,r=e.x,i=e.y,a=e.width,o=e.height,s=e.ry;return v.createElement(`rect`,{x:r,y:i,ry:s,width:a,height:o,stroke:`none`,fill:t,fillOpacity:n,className:`recharts-cartesian-grid-bg`})};function $2(e){var t=e.option,n=e.lineItemProps,r;if(v.isValidElement(t))r=v.cloneElement(t,n);else if(typeof t==`function`)r=t(n);else{var i=n.x1,a=n.y1,o=n.x2,s=n.y2,c=n.key,l=Wx(X2(n,B2))??{};l.offset;var u=X2(l,V2);r=v.createElement(`line`,Y2({},u,{x1:i,y1:a,x2:o,y2:s,fill:`none`,key:c}))}return r}function e4(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,a=e.horizontalPoints;if(!i||!a||!a.length)return null;e.xAxisId,e.yAxisId;var o=X2(e,H2),s=a.map((e,r)=>{var a=G2(G2({},o),{},{x1:t,y1:e,x2:t+n,y2:e,key:`line-${r}`,index:r});return v.createElement($2,{key:`line-${r}`,option:i,lineItemProps:a})});return v.createElement(`g`,{className:`recharts-cartesian-grid-horizontal`},s)}function t4(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,a=e.verticalPoints;if(!i||!a||!a.length)return null;e.xAxisId,e.yAxisId;var o=X2(e,U2),s=a.map((e,r)=>{var a=G2(G2({},o),{},{x1:e,y1:t,x2:e,y2:t+n,key:`line-${r}`,index:r});return v.createElement($2,{option:i,lineItemProps:a,key:`line-${r}`})});return v.createElement(`g`,{className:`recharts-cartesian-grid-vertical`},s)}function n4(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,a=e.width,o=e.height,s=e.horizontalPoints,c=e.horizontal;if(!(c===void 0||c)||!t||!t.length||s==null)return null;var l=s.map(e=>Math.round(e+i-i)).sort((e,t)=>e-t);i!==l[0]&&l.unshift(0);var u=l.map((e,s)=>{var c=l[s+1],u=c==null?i+o-e:c-e;if(u<=0)return null;var d=s%t.length;return v.createElement(`rect`,{key:`react-${s}`,y:e,x:r,height:u,width:a,stroke:`none`,fill:t[d],fillOpacity:n,className:`recharts-cartesian-grid-bg`})});return v.createElement(`g`,{className:`recharts-cartesian-gridstripes-horizontal`},u)}function r4(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,s=e.width,c=e.height,l=e.verticalPoints;if(!n||!r||!r.length)return null;var u=l.map(e=>Math.round(e+a-a)).sort((e,t)=>e-t);a!==u[0]&&u.unshift(0);var d=u.map((e,t)=>{var n=u[t+1],l=n==null?a+s-e:n-e;if(l<=0)return null;var d=t%r.length;return v.createElement(`rect`,{key:`react-${t}`,x:e,y:o,width:l,height:c,stroke:`none`,fill:r[d],fillOpacity:i,className:`recharts-cartesian-grid-bg`})});return v.createElement(`g`,{className:`recharts-cartesian-gridstripes-vertical`},d)}var i4=(e,t)=>{var n=e.xAxis,r=e.width,i=e.height,a=e.offset;return HO(c2(G2(G2(G2({},A2),n),{},{ticks:UO(n,!0),viewBox:{x:0,y:0,width:r,height:i}})),a.left,a.left+a.width,t)},a4=(e,t)=>{var n=e.yAxis,r=e.width,i=e.height,a=e.offset;return HO(c2(G2(G2(G2({},A2),n),{},{ticks:UO(n,!0),viewBox:{x:0,y:0,width:r,height:i}})),a.top,a.top+a.height,t)},o4={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:`#ccc`,fill:`none`,verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:gI.grid};function s4(e){var t=hA(),n=gA(),r=mA(),i=G2(G2({},RC(e,o4)),{},{x:Z(e.x)?e.x:r.left,y:Z(e.y)?e.y:r.top,width:Z(e.width)?e.width:r.width,height:Z(e.height)?e.height:r.height}),a=i.xAxisId,o=i.yAxisId,s=i.x,c=i.y,l=i.width,u=i.height,d=i.syncWithTicks,f=i.horizontalValues,p=i.verticalValues,m=kk(),h=Q(e=>HW(e,`xAxis`,a,m)),g=Q(e=>HW(e,`yAxis`,o,m));if(!NO(l)||!NO(u)||!Z(s)||!Z(c))return null;var _=i.verticalCoordinatesGenerator||i4,y=i.horizontalCoordinatesGenerator||a4,b=i.horizontalPoints,x=i.verticalPoints;if((!b||!b.length)&&typeof y==`function`){var S=f&&f.length,C=y({yAxis:g?G2(G2({},g),{},{ticks:S?f:g.ticks}):void 0,width:t??l,height:n??u,offset:r},S?!0:d);Fk(Array.isArray(C),`horizontalCoordinatesGenerator should return Array but instead it returned [${typeof C}]`),Array.isArray(C)&&(b=C)}if((!x||!x.length)&&typeof _==`function`){var w=p&&p.length,T=_({xAxis:h?G2(G2({},h),{},{ticks:w?p:h.ticks}):void 0,width:t??l,height:n??u,offset:r},w?!0:d);Fk(Array.isArray(T),`verticalCoordinatesGenerator should return Array but instead it returned [${typeof T}]`),Array.isArray(T)&&(x=T)}return v.createElement(bq,{zIndex:i.zIndex},v.createElement(`g`,{className:`recharts-cartesian-grid`},v.createElement(Q2,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),v.createElement(n4,Y2({},i,{horizontalPoints:b})),v.createElement(r4,Y2({},i,{verticalPoints:x})),v.createElement(e4,Y2({},i,{offset:r,horizontalPoints:b,xAxis:h,yAxis:g})),v.createElement(t4,Y2({},i,{offset:r,verticalPoints:x,xAxis:h,yAxis:g}))))}s4.displayName=`CartesianGrid`;var c4=ID({name:`errorBars`,initialState:{},reducers:{addErrorBar:(e,t)=>{var n=t.payload,r=n.itemId,i=n.errorBar;e[r]||(e[r]=[]),e[r].push(i)},replaceErrorBar:(e,t)=>{var n=t.payload,r=n.itemId,i=n.prev,a=n.next;e[r]&&(e[r]=e[r].map(e=>e.dataKey===i.dataKey&&e.direction===i.direction?a:e))},removeErrorBar:(e,t)=>{var n=t.payload,r=n.itemId,i=n.errorBar;e[r]&&(e[r]=e[r].filter(e=>e.dataKey!==i.dataKey||e.direction!==i.direction))}}}),l4=c4.actions;l4.addErrorBar,l4.replaceErrorBar,l4.removeErrorBar;var u4=c4.reducer;function d4(e,t){var n=Q(t=>WH(t,e)),r=Q(e=>qH(e,t)),i=n?.allowDataOverflow??HH.allowDataOverflow,a=r?.allowDataOverflow??GH.allowDataOverflow;return{needClip:i||a,needClipX:i,needClipY:a}}function f4(e){var t=e.xAxisId,n=e.yAxisId,r=e.clipPathId,i=o1(),a=d4(t,n),o=a.needClipX,s=a.needClipY,c=a.needClip,l=Q(e=>_W(e,t,!1)),u=Q(e=>vW(e,n,!1));if(!c||!i)return null;var d=i.x,f=i.y,p=i.width,m=i.height,h=o&&l?Math.min(l[0],l[1]):d-p/2,g=s&&u?Math.min(u[0],u[1]):f-m/2,_=o&&l?Math.abs(l[1]-l[0]):p*2,y=s&&u?Math.abs(u[1]-u[0]):m*2;return v.createElement(`clipPath`,{id:`clipPath-${r}`},v.createElement(`rect`,{x:h,y:g,width:_,height:y}))}function p4(e){var t=Gx(e),n=3,r=2;if(t!=null){var i=t.r,a=t.strokeWidth,o=Number(i),s=Number(a);return(Number.isNaN(o)||o<0)&&(o=n),(Number.isNaN(s)||s<0)&&(s=r),{r:o,strokeWidth:s}}return{r:n,strokeWidth:r}}function m4(e,t){return e.graphicalItems.cartesianItems.find(e=>e.id===t)?.xAxisId??0}function h4(e,t){return e.graphicalItems.cartesianItems.find(e=>e.id===t)?.yAxisId??0}var g4=(e,t,n)=>qW(e,`xAxis`,m4(e,t),n),_4=(e,t,n)=>KW(e,`xAxis`,m4(e,t),n),v4=(e,t,n)=>qW(e,`yAxis`,h4(e,t),n),y4=(e,t,n)=>KW(e,`yAxis`,h4(e,t),n),b4=$([_A,g4,v4,_4,y4],(e,t,n,r,i)=>VO(e,`xAxis`)?nk(t,r,!1):nk(n,i,!1)),x4=$([tU,(e,t)=>t],(e,t)=>e.filter(e=>e.type===`area`).find(e=>e.id===t)),S4=e=>VO(_A(e),`xAxis`)?`yAxis`:`xAxis`,C4=(e,t)=>S4(e)===`yAxis`?h4(e,t):m4(e,t),w4=$([_A,g4,v4,_4,y4,$([x4,(e,t,n)=>DU(e,S4(e),C4(e,t),n)],(e,t)=>{if(!(e==null||t==null)){var n=e.stackId,r=VI(e);if(!(n==null||r==null)){var i=(t[n]?.stackedData)?.find(e=>e.key===r);if(i!=null)return i.map(e=>[e[0],e[1]])}}}),kF,b4,x4,hI],(e,t,n,r,i,a,o,s,c,l)=>{var u=o.chartData,d=o.dataStartIndex,f=o.dataEndIndex;if(!(c==null||e!==`horizontal`&&e!==`vertical`||t==null||n==null||r==null||i==null||r.length===0||i.length===0||s==null)){var p=c.data,m=p&&p.length>0?p:u?.slice(d,f+1);if(m!=null)return r3({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:d,areaSettings:c,stackedData:a,displayedData:m,chartBaseValue:l,bandSize:s})}}),T4=[`animationElapsedTime`,`isAnimating`,`isEntrance`,`layout`,`isRange`,`stroke`,`connectNulls`],E4=[`id`,`baseLine`];function D4(){return D4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},D4.apply(null,arguments)}function O4(e,t){if(e==null)return{};var n,r,i=k4(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function k4(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function A4(e){var t=e.alpha,n=e.baseLine,r=e.points,i=e.strokeWidth,a=r[0]?.x,o=r[r.length-1]?.x;if(!MO(a)||!MO(o))return null;var s=t*Math.abs(a-o),c=Math.max(...r.map(e=>e.y||0));return Z(n)?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max(...n.map(e=>e.y||0),c)),Z(c)?v.createElement(`rect`,{x:a<o?a:a-s,y:0,width:s,height:Math.floor(c+(i?parseInt(`${i}`,10):1))}):null}function j4(e){var t=e.alpha,n=e.baseLine,r=e.points,i=e.strokeWidth,a=r[0]?.y,o=r[r.length-1]?.y;if(!MO(a)||!MO(o))return null;var s=t*Math.abs(a-o),c=Math.max(...r.map(e=>e.x||0));return Z(n)?c=Math.max(n,c):n&&Array.isArray(n)&&n.length&&(c=Math.max(...n.map(e=>e.x||0),c)),Z(c)?v.createElement(`rect`,{x:0,y:a<o?a:a-s,width:c+(i?parseInt(`${i}`,10):1),height:Math.floor(s)}):null}function M4(e){var t=e.alpha,n=e.layout,r=e.points,i=e.baseLine,a=e.strokeWidth;return n===`vertical`?v.createElement(j4,{alpha:t,points:r,baseLine:i,strokeWidth:a}):v.createElement(A4,{alpha:t,points:r,baseLine:i,strokeWidth:a})}function N4(e){var t=e.animationElapsedTime,n=t===void 0?1:t,r=e.isAnimating,i=r===void 0?!1:r,a=e.isEntrance,o=a===void 0?!1:a,s=e.layout,c=e.isRange,l=e.stroke,u=e.connectNulls,d=O4(e,T4),f=s===`vertical`?`vertical`:`horizontal`,p=u??!1,m=zQ(),h=d.id,g=d.baseLine,_=Wx(O4(d,E4)),y=v.createElement(bN,D4({},d,{id:h,baseLine:g,connectNulls:p,stroke:`none`,className:`recharts-area-area`,layout:f})),b=l!==`none`&&v.createElement(bN,D4({},_,{className:`recharts-area-curve`,layout:f,type:d.type,connectNulls:p,fill:`none`,stroke:l,points:d.points})),x=l!==`none`&&c&&Array.isArray(g)&&v.createElement(bN,D4({},_,{className:`recharts-area-curve`,layout:f,type:d.type,connectNulls:p,fill:`none`,stroke:l,points:g}));return o&&(i||n<1)?v.createElement(rS,null,v.createElement(`defs`,null,v.createElement(`clipPath`,{id:m},v.createElement(M4,{alpha:n,points:d.points??[],baseLine:g,layout:f,strokeWidth:d.strokeWidth}))),v.createElement(rS,{clipPath:`url(#${m})`},y,b,x)):v.createElement(v.Fragment,null,y,b,x)}var P4=[`id`],F4=[`activeDot`,`animationBegin`,`animationDuration`,`animationEasing`,`connectNulls`,`dot`,`fill`,`fillOpacity`,`hide`,`isAnimationActive`,`legendType`,`stroke`,`xAxisId`,`yAxisId`];function I4(){return I4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},I4.apply(null,arguments)}function L4(e,t){if(e==null)return{};var n,r,i=R4(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function R4(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function z4(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function B4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?z4(Object(n),!0).forEach(function(t){V4(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z4(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function V4(e,t,n){return(t=H4(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function H4(e){var t=U4(e,`string`);return typeof t==`symbol`?t:t+``}function U4(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var W4={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,animationMatchBy:gQ,animationInterpolateFn:(e,t)=>e==null?[]:t===1?e.flatMap(e=>e.status===`removed`?[]:[e.next]):e.flatMap(e=>e.status===`matched`?[B4(B4({},e.next),{},{x:CC(e.prev.x,e.next.x,t),y:CC(e.prev.y,e.next.y,t)})]:e.status===`added`?[e.next]:[]),connectNulls:!1,dot:!1,fill:`#3182bd`,fillOpacity:.6,hide:!1,isAnimationActive:`auto`,legendType:`line`,stroke:`#3182bd`,strokeWidth:1,type:`linear`,label:!1,shape:N4,xAxisId:0,yAxisId:0,zIndex:gI.area};function G4(e,t){return e&&e!==`none`?e:t}var K4=e=>{var t=e.dataKey,n=e.name,r=e.stroke,i=e.fill,a=e.legendType;return[{inactive:e.hide,dataKey:t,type:a,color:G4(r,i),value:ik(n,t),payload:e}]},q4=v.memo(e=>{var t=e.dataKey,n=e.data,r=e.stroke,i=e.strokeWidth,a=e.fill,o=e.name,s=e.hide,c=e.unit,l=e.formatter,u=e.tooltipType,d=e.id,f={dataDefinedOnItem:n,getPosition:OC,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:ik(o,t),hide:s,type:u,color:G4(r,a),unit:c,formatter:l,graphicalItemId:d}};return v.createElement(sQ,{tooltipEntrySettings:f})});function J4(e){var t=e.clipPathId,n=e.points,r=e.props,i=r.needClip,a=r.dot,o=r.dataKey,s=Wx(r);return v.createElement(U$,{points:n,dot:a,className:`recharts-area-dots`,dotClassName:`recharts-area-dot`,dataKey:o,baseProps:s,needClip:i,clipPathId:t})}function Y4(e){var t=e.showLabels,n=e.children,r=e.points.map(e=>{var t={x:e.x??0,y:e.y??0,width:0,lowerWidth:0,upperWidth:0,height:0};return B4(B4({},t),{},{value:e.value,payload:e.payload,parentViewBox:void 0,viewBox:t,fill:void 0})});return v.createElement(yX,{value:t?r:void 0},n)}function X4(e){var t=e.points,n=e.baseLine,r=e.needClip,i=e.clipPathId,a=e.props,o=e.animationElapsedTime,s=e.isAnimating,c=e.isEntrance,l=a.layout,u=a.type,d=a.stroke,f=a.connectNulls,p=a.isRange,m=a.shape,h=a.id,g=L4(a,P4),_=B4(B4({},Kx(g)),{},{id:h,points:t,connectNulls:f,type:u,baseLine:n,layout:l,stroke:d,isRange:p,animationElapsedTime:o,isAnimating:s,isEntrance:c});return v.createElement(v.Fragment,null,t?.length>1&&v.createElement(rS,{clipPath:r?`url(#clipPath-${i})`:void 0},v.createElement(rQ,{option:m,DefaultShape:W4.shape,shapeProps:_})),v.createElement(J4,{points:t,props:g,clipPathId:i}))}function Z4(e,t,n){return Z(e)?CC(Z(t)?t:void 0,e,n):TC(e)||gC(e)?CC(Z(t)?t:void 0,0,n):e}function Q4(e){var t=e.needClip,n=e.clipPathId,r=e.props,i=e.previousPointsRef,a=e.previousBaselineRef,o=r.points,s=r.baseLine,c=r.isAnimationActive,l=r.animationBegin,u=r.animationDuration,d=r.animationEasing,f=r.animationMatchBy,p=r.animationInterpolateFn,m=(0,v.useMemo)(()=>({points:o,baseLine:s}),[o,s]),h=wQ(m,a),g=yA(),_=jQ(r.onAnimationStart,r.onAnimationEnd),y=_.isAnimating,b=_.handleAnimationStart,x=_.handleAnimationEnd,S=h.startValue;if(g==null)return null;var C=Array.isArray(s)&&Array.isArray(S)?CQ(S,s,f):Array.isArray(s)?CQ(null,s,f):null;return v.createElement(MQ,{animationInput:m,animationIdPrefix:`recharts-area-`,items:o,previousItemsRef:i,isAnimationActive:c,animationBegin:l,animationDuration:u,animationEasing:d,onAnimationStart:b,onAnimationEnd:x,animationInterpolateFn:p,animationMatchBy:f,layout:g},(e,i,a)=>{var c=i===1?s:Array.isArray(s)?p(C,i,g):a?s:Z4(s,S,i);return h.syncStepValue(c,i),v.createElement(Y4,{showLabels:!y,points:o},r.children,v.createElement(X4,{points:e,baseLine:c,needClip:t,clipPathId:n,props:r,animationElapsedTime:i,isAnimating:y||i<1,isEntrance:a}),v.createElement(TX,{label:r.label}))})}function $4(e){var t=e.needClip,n=e.clipPathId,r=e.props,i=(0,v.useRef)(null),a=(0,v.useRef)();return v.createElement(Q4,{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:a})}var e3=class extends v.PureComponent{render(){var e=this.props,t=e.hide,n=e.dot,r=e.points,i=e.className,a=e.top,o=e.left,s=e.needClip,c=e.xAxisId,l=e.yAxisId,u=e.width,d=e.height,f=e.id,p=e.baseLine,m=e.zIndex;if(t)return null;var h=dv(`recharts-area`,i),g=f,_=p4(n),y=_.r,b=_.strokeWidth,x=KZ(n),S=y*2+b,C=s?`url(#clipPath-${x?``:`dots-`}${g})`:void 0;return v.createElement(bq,{zIndex:m},v.createElement(rS,{className:h},s&&v.createElement(`defs`,null,v.createElement(f4,{clipPathId:g,xAxisId:c,yAxisId:l}),!x&&v.createElement(`clipPath`,{id:`clipPath-dots-${g}`},v.createElement(`rect`,{x:o-S/2,y:a-S/2,width:u+S,height:d+S}))),v.createElement($4,{needClip:s,clipPathId:g,props:this.props})),v.createElement(m1,{points:r,mainColor:G4(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:C}),this.props.isRange&&Array.isArray(p)&&v.createElement(m1,{points:p,mainColor:G4(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:C}))}};function t3(e){var t=e.activeDot,n=e.animationBegin,r=e.animationDuration,i=e.animationEasing,a=e.connectNulls,o=e.dot,s=e.fill,c=e.fillOpacity,l=e.hide,u=e.isAnimationActive,d=e.legendType,f=e.stroke,p=e.xAxisId,m=e.yAxisId,h=L4(e,F4),g=vA(),_=BK(),y=d4(p,m).needClip,b=kk(),x=Q(t=>w4(t,e.id,b))??{},S=x.points,C=x.isRange,w=x.baseLine,T=o1();if(g!==`horizontal`&&g!==`vertical`||T==null||_!==`AreaChart`&&_!==`ComposedChart`)return null;var E=T.height,D=T.width,O=T.x,k=T.y;return!S||!S.length?null:v.createElement(e3,I4({},h,{activeDot:t,animationBegin:n,animationDuration:r,animationEasing:i,baseLine:w,connectNulls:a,dot:o,fill:s,fillOpacity:c,height:E,hide:l,layout:g,isAnimationActive:u,isRange:C,legendType:d,needClip:y,points:S,stroke:f,width:D,left:O,top:k,xAxisId:p,yAxisId:m}))}var n3=(e,t,n,r,i)=>{var a=n??t;if(Z(a))return a;var o=e===`horizontal`?i:r,s=o.scale.domain();if(o.type===`number`){var c=Math.max(s[0],s[1]),l=Math.min(s[0],s[1]);return a===`dataMin`?l:a===`dataMax`||c<0?c:Math.max(Math.min(s[0],s[1]),0)}return a===`dataMin`?s[0]:a===`dataMax`?s[1]:s[0]};function r3(e){var t=e.areaSettings,n=t.connectNulls,r=t.baseValue,i=t.dataKey,a=e.stackedData,o=e.layout,s=e.chartBaseValue,c=e.xAxis,l=e.yAxis,u=e.displayedData,d=e.dataStartIndex,f=e.xAxisTicks,p=e.yAxisTicks,m=e.bandSize,h=a&&a.length,g=n3(o,s,r,c,l),_=o===`horizontal`,v=!1,y=u.map((e,t)=>{var r;if(h)r=a[d+t];else{var o=zO(e,i);Array.isArray(o)?(r=o,v=!0):r=[g,o]}var s=r?.[1]??null,u=s==null||h&&!n&&zO(e,i)==null;return _?{x:JO({axis:c,ticks:f,bandSize:m,entry:e,index:t}),y:u?null:l.scale.map(s)??null,value:r,payload:e}:{x:u?null:c.scale.map(s)??null,y:JO({axis:l,ticks:p,bandSize:m,entry:e,index:t}),value:r,payload:e}});return{points:y,baseLine:(h||v?y.map(e=>{var t=Array.isArray(e.value)?e.value[0]:null;return _?{x:e.x,y:t!=null&&e.y!=null?l.scale.map(t)??null:null,payload:e.payload}:{x:t==null?null:c.scale.map(t)??null,y:e.y,payload:e.payload}}):_?l.scale.map(g):c.scale.map(g))??0,isRange:v}}function i3(e){var t=RC(e,W4),n=kk();return v.createElement(HQ,{id:t.id,type:`area`},e=>v.createElement(v.Fragment,null,v.createElement(cQ,{legendPayload:K4(t)}),v.createElement(q4,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,formatter:t.formatter,tooltipType:t.tooltipType,id:e}),v.createElement(QQ,{type:`area`,id:e,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:qO(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),v.createElement(t3,I4({},t,{id:e}))))}var a3=v.memo(i3,mM);a3.displayName=`Area`;var o3=[`domain`,`range`],s3=[`domain`,`range`];function c3(e,t){if(e==null)return{};var n,r,i=l3(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function l3(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function u3(e,t){return e===t?!0:Array.isArray(e)&&e.length===2&&Array.isArray(t)&&t.length===2?e[0]===t[0]&&e[1]===t[1]:!1}function d3(e,t){if(e===t)return!0;var n=e.domain,r=e.range,i=c3(e,o3),a=t.domain,o=t.range,s=c3(t,s3);return!u3(n,a)||!u3(r,o)?!1:mM(i,s)}var f3=[`type`],p3=[`dangerouslySetInnerHTML`,`ticks`,`scale`],m3=[`id`,`scale`];function h3(){return h3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h3.apply(null,arguments)}function g3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?g3(Object(n),!0).forEach(function(t){v3(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g3(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function v3(e,t,n){return(t=y3(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y3(e){var t=b3(e,`string`);return typeof t==`symbol`?t:t+``}function b3(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function x3(e,t){if(e==null)return{};var n,r,i=S3(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function S3(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function C3(e){var t=$w(),n=(0,v.useRef)(null),r=yA(),i=e.type,a=x3(e,f3),o=bI(r,`xAxis`,i),s=(0,v.useMemo)(()=>{if(o!=null)return _3(_3({},a),{},{type:o})},[a,o]);return(0,v.useLayoutEffect)(()=>{s!=null&&(n.current===null?t(Z$(s)):n.current!==s&&t(Q$({prev:n.current,next:s})),n.current=s)},[s,t]),(0,v.useLayoutEffect)(()=>()=>{n.current&&=(t($$(n.current)),null)},[t]),null}var w3=e=>{var t=e.xAxisId,n=e.className,r=Q(Dk),i=kk(),a=`xAxis`,o=Q(e=>WW(e,a,t,i)),s=Q(e=>MW(e,t)),c=Q(e=>LW(e,t)),l=Q(e=>UH(e,t));if(s==null||c==null||l==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var u=x3(e,p3);l.id,l.scale;var d=x3(l,m3);return v.createElement(z2,h3({},u,d,{x:c.x,y:c.y,width:s.width,height:s.height,className:dv(`recharts-${a} ${a}`,n),viewBox:r,ticks:o,axisType:a,axisId:t}))},T3={allowDataOverflow:HH.allowDataOverflow,allowDecimals:HH.allowDecimals,allowDuplicatedCategory:HH.allowDuplicatedCategory,angle:HH.angle,axisLine:A2.axisLine,height:HH.height,hide:!1,includeHidden:HH.includeHidden,interval:HH.interval,label:!1,minTickGap:HH.minTickGap,mirror:HH.mirror,orientation:HH.orientation,padding:HH.padding,reversed:HH.reversed,scale:HH.scale,tick:HH.tick,tickCount:HH.tickCount,tickLine:A2.tickLine,tickSize:A2.tickSize,type:HH.type,niceTicks:HH.niceTicks,xAxisId:0},E3=v.memo(e=>{var t=RC(e,T3);return v.createElement(v.Fragment,null,v.createElement(C3,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),v.createElement(w3,t))},d3);E3.displayName=`XAxis`;var D3=[`type`],O3=[`dangerouslySetInnerHTML`,`ticks`,`scale`],k3=[`id`,`scale`];function A3(){return A3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},A3.apply(null,arguments)}function j3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function M3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?j3(Object(n),!0).forEach(function(t){N3(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j3(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function N3(e,t,n){return(t=P3(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P3(e){var t=F3(e,`string`);return typeof t==`symbol`?t:t+``}function F3(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function I3(e,t){if(e==null)return{};var n,r,i=L3(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function L3(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function R3(e){var t=$w(),n=(0,v.useRef)(null),r=yA(),i=e.type,a=I3(e,D3),o=bI(r,`yAxis`,i),s=(0,v.useMemo)(()=>{if(o!=null)return M3(M3({},a),{},{type:o})},[o,a]);return(0,v.useLayoutEffect)(()=>{s!=null&&(n.current===null?t(e1(s)):n.current!==s&&t(t1({prev:n.current,next:s})),n.current=s)},[s,t]),(0,v.useLayoutEffect)(()=>()=>{n.current&&=(t(n1(n.current)),null)},[t]),null}function z3(e){var t=e.yAxisId,n=e.className,r=e.width,i=e.label,a=(0,v.useRef)(null),o=(0,v.useRef)(null),s=Q(Dk),c=kk(),l=$w(),u=`yAxis`,d=Q(e=>zW(e,t)),f=Q(e=>RW(e,t)),p=Q(e=>WW(e,u,t,c)),m=Q(e=>KH(e,t));if((0,v.useLayoutEffect)(()=>{if(!(r!==`auto`||!d||nX(i)||(0,v.isValidElement)(i)||m==null)){var e=a.current;if(e){var n=e.getCalculatedWidth();Math.round(d.width)!==Math.round(n)&&l(r1({id:t,width:n}))}}},[p,d,l,i,t,r,m]),d==null||f==null||m==null)return null;e.dangerouslySetInnerHTML,e.ticks,e.scale;var h=I3(e,O3);m.id,m.scale;var g=I3(m,k3);return v.createElement(z2,A3({},h,g,{ref:a,labelRef:o,x:f.x,y:f.y,tickTextProps:r===`auto`?{width:void 0}:{width:r},width:d.width,height:d.height,className:dv(`recharts-${u} ${u}`,n),viewBox:s,ticks:p,axisType:u,axisId:t}))}var B3={allowDataOverflow:GH.allowDataOverflow,allowDecimals:GH.allowDecimals,allowDuplicatedCategory:GH.allowDuplicatedCategory,angle:GH.angle,axisLine:A2.axisLine,hide:!1,includeHidden:GH.includeHidden,interval:GH.interval,label:!1,minTickGap:GH.minTickGap,mirror:GH.mirror,orientation:GH.orientation,padding:GH.padding,reversed:GH.reversed,scale:GH.scale,tick:GH.tick,tickCount:GH.tickCount,tickLine:A2.tickLine,tickSize:A2.tickSize,type:GH.type,niceTicks:GH.niceTicks,width:GH.width,yAxisId:0},V3=v.memo(e=>{var t=RC(e,B3);return v.createElement(v.Fragment,null,v.createElement(R3,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),v.createElement(z3,t))},d3);V3.displayName=`YAxis`;var H3=$([(e,t)=>t,_A,RI,qI,lK,dK,WK,Tk],nq);function U3(e){return`getBBox`in e.currentTarget&&typeof e.currentTarget.getBBox==`function`}function W3(e){var t=e.currentTarget.getBoundingClientRect(),n,r;if(U3(e)){var i=e.currentTarget.getBBox();n=i.width>0?t.width/i.width:1,r=i.height>0?t.height/i.height:1}else{var a=e.currentTarget;n=a.offsetWidth>0?t.width/a.offsetWidth:1,r=a.offsetHeight>0?t.height/a.offsetHeight:1}var o=(e,i)=>({relativeX:Math.round((e-t.left)/n),relativeY:Math.round((i-t.top)/r)});return`touches`in e?Array.from(e.touches).map(e=>o(e.clientX,e.clientY)):o(e.clientX,e.clientY)}var G3=mD(`mouseClick`),K3=SO();K3.startListening({actionCreator:G3,effect:(e,t)=>{var n=e.payload,r=H3(t.getState(),W3(n));r?.activeIndex!=null&&t.dispatch(mG({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var q3=mD(`mouseMove`),J3=SO(),Y3=null,X3=null,Z3=null;J3.startListening({actionCreator:q3,effect:(e,t)=>{var n=e.payload,r=t.getState().eventSettings,i=r.throttleDelay,a=r.throttledEvents,o=a===`all`||a?.includes(`mousemove`);Y3!==null&&(cancelAnimationFrame(Y3),Y3=null),X3!==null&&(typeof i!=`number`||!o)&&(clearTimeout(X3),X3=null),Z3=W3(n);var s=()=>{var e=t.getState(),n=QW(e,e.tooltip.settings.shared);if(!Z3){Y3=null,X3=null;return}if(n===`axis`){var r=H3(e,Z3);r?.activeIndex==null?t.dispatch(dG()):t.dispatch(pG({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}Y3=null,X3=null};if(!o){s();return}i===`raf`?Y3=requestAnimationFrame(s):typeof i==`number`&&X3===null&&(X3=setTimeout(s,i))}});function Q3(e,t){return t instanceof HTMLElement?`HTMLElement <${t.tagName} class="${t.className}">`:t===window?`global.window`:e===`children`&&typeof t==`object`&&t?`<<CHILDREN>>`:t}var $3={accessibilityLayer:!0,barCategoryGap:`10%`,barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:`none`,syncId:void 0,syncMethod:`index`,baseValue:void 0,reverseStackOrder:!1},e6=ID({name:`rootProps`,initialState:$3,reducers:{updateOptions:(e,t)=>{e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=t.payload.barGap??$3.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),t6=e6.reducer,n6=e6.actions.updateOptions,r6=ID({name:`polarOptions`,initialState:null,reducers:{updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)}}),i6=r6.actions.updatePolarOptions,a6=r6.reducer,o6=mD(`keyDown`),s6=mD(`focus`),c6=mD(`blur`),l6=SO(),u6=null,d6=null,f6=null;l6.startListening({actionCreator:o6,effect:(e,t)=>{f6=e.payload,u6!==null&&(cancelAnimationFrame(u6),u6=null);var n=t.getState().eventSettings,r=n.throttleDelay,i=n.throttledEvents,a=i===`all`||i.includes(`keydown`);d6!==null&&(typeof r!=`number`||!a)&&(clearTimeout(d6),d6=null);var o=()=>{try{var e=t.getState();if(e.rootProps.accessibilityLayer===!1)return;var n=e.tooltip.keyboardInteraction,r=f6;if(r!==`ArrowRight`&&r!==`ArrowLeft`&&r!==`Enter`)return;var i=kG(n,ZG(e),wU(e),oK(e)),a=i==null?-1:Number(i),o=!Number.isFinite(a)||a<0,s=dK(e),c=ZG(e),l=QW(e,e.tooltip.settings.shared);if(r===`Enter`){if(o)return;var u=YK(e,l,`hover`,String(n.index));t.dispatch(gG({active:!n.active,activeIndex:n.index,activeCoordinate:u}));return}var d=JW(e)===`left-to-right`?1:-1,f=r===`ArrowRight`?1:-1,p;if(o){var m=wU(e),h=oK(e),g=f*d,_=e=>({active:!1,index:String(e),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(p=-1,g>0){for(var v=0;v<c.length;v++)if(kG(_(v),c,m,h)!=null){p=v;break}}else for(var y=c.length-1;y>=0;y--)if(kG(_(y),c,m,h)!=null){p=y;break}if(p<0)return}else{p=a+f*d;var b=s?.length||c.length;if(b===0||p>=b||p<0)return}var x=YK(e,l,`hover`,String(p));t.dispatch(gG({active:!0,activeIndex:p.toString(),activeCoordinate:x}))}finally{u6=null,d6=null}};if(!a){o();return}r===`raf`?u6=requestAnimationFrame(o):typeof r==`number`&&d6===null&&(o(),f6=null,d6=setTimeout(()=>{f6?o():(d6=null,u6=null)},r))}}),l6.startListening({actionCreator:s6,effect:(e,t)=>{var n=t.getState();if(n.rootProps.accessibilityLayer!==!1){var r=n.tooltip.keyboardInteraction;if(!r.active&&r.index==null){var i=`0`,a=YK(n,QW(n,n.tooltip.settings.shared),`hover`,String(i));t.dispatch(gG({active:!0,activeIndex:i,activeCoordinate:a}))}}}}),l6.startListening({actionCreator:c6,effect:(e,t)=>{var n=t.getState();if(n.rootProps.accessibilityLayer!==!1){var r=n.tooltip.keyboardInteraction;r.active&&t.dispatch(gG({active:!1,activeIndex:r.index,activeCoordinate:r.coordinate}))}}});function p6(e){e.persist();var t=e.currentTarget;return new Proxy(e,{get:(e,n)=>{if(n===`currentTarget`)return t;var r=Reflect.get(e,n);return typeof r==`function`?r.bind(e):r}})}var m6=mD(`externalEvent`),h6=SO(),g6=new Map,_6=new Map,v6=new Map;h6.startListening({actionCreator:m6,effect:(e,t)=>{var n=e.payload,r=n.handler,i=n.reactEvent;if(r!=null){var a=i.type,o=p6(i);v6.set(a,{handler:r,reactEvent:o});var s=g6.get(a);s!==void 0&&(cancelAnimationFrame(s),g6.delete(a));var c=t.getState().eventSettings,l=c.throttleDelay,u=c.throttledEvents,d=u===`all`||u?.includes(a),f=_6.get(a);f!==void 0&&(typeof l!=`number`||!d)&&(clearTimeout(f),_6.delete(a));var p=()=>{var e=v6.get(a);try{if(!e)return;var n=e.handler,r=e.reactEvent,i=t.getState(),o={activeCoordinate:xK(i),activeDataKey:vK(i),activeIndex:gK(i),activeLabel:_K(i),activeTooltipIndex:gK(i),isTooltipActive:SK(i)};n&&n(o,r)}finally{g6.delete(a),_6.delete(a),v6.delete(a)}};if(!d){p();return}if(l===`raf`){var m=requestAnimationFrame(p);g6.set(a,m)}else if(typeof l==`number`){if(!_6.has(a)){p();var h=setTimeout(p,l);_6.set(a,h)}}else p()}}});var y6=$([$([NG],e=>e.tooltipItemPayloads),(e,t)=>t,(e,t,n)=>n],(e,t,n)=>{if(t!=null){var r=e.find(e=>e.settings.graphicalItemId===n);if(r!=null){var i=r.getPosition;if(i!=null)return i(t)}}}),b6=mD(`touchMove`),x6=SO(),S6=null,C6=null,w6=null,T6=null;x6.startListening({actionCreator:b6,effect:(e,t)=>{var n=e.payload;if(!(n.touches==null||n.touches.length===0)){T6=p6(n);var r=t.getState().eventSettings,i=r.throttleDelay,a=r.throttledEvents,o=a===`all`||a.includes(`touchmove`);S6!==null&&(cancelAnimationFrame(S6),S6=null),C6!==null&&(typeof i!=`number`||!o)&&(clearTimeout(C6),C6=null),w6=Array.from(n.touches).map(e=>W3({clientX:e.clientX,clientY:e.clientY,currentTarget:n.currentTarget}));var s=()=>{if(T6!=null){var e=t.getState(),n=QW(e,e.tooltip.settings.shared);if(n===`axis`){var r=w6?.[0];if(r==null){S6=null,C6=null;return}var i=H3(e,r);i?.activeIndex!=null&&t.dispatch(pG({activeIndex:i.activeIndex,activeDataKey:void 0,activeCoordinate:i.activeCoordinate}))}else if(n===`item`){var a=T6.touches[0];if(document.elementFromPoint==null||a==null)return;var o=document.elementFromPoint(a.clientX,a.clientY);if(!o||!o.getAttribute)return;var s=o.getAttribute(pk),c=o.getAttribute(`data-recharts-item-id`)??void 0,l=qG(e).find(e=>e.id===c);if(s==null||l==null||c==null)return;var u=l.dataKey,d=y6(e,s,c);t.dispatch(lG({activeDataKey:u,activeIndex:s,activeCoordinate:d,activeGraphicalItemId:c}))}S6=null,C6=null}};if(!o){s();return}i===`raf`?S6=requestAnimationFrame(s):typeof i==`number`&&C6===null&&(s(),T6=null,C6=setTimeout(()=>{T6?s():(C6=null,S6=null)},i))}}});var E6={throttleDelay:`raf`,throttledEvents:[`mousemove`,`touchmove`,`pointermove`,`scroll`,`wheel`]},D6=ID({name:`eventSettings`,initialState:E6,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=Uj(t.payload.throttledEvents))}}}),O6=D6.actions.setEventSettings,k6=D6.reducer,A6=zT({brush:P0,cartesianAxis:i1,chartData:Gq,errorBars:u4,eventSettings:k6,graphicalItems:ZQ,layout:AO,legend:Yj,options:Rq,polarAxis:iZ,polarOptions:a6,referenceElements:z0,renderedTicks:m2,rootProps:t6,tooltip:_G,zIndex:yq}),j6=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:`Chart`;return ED({reducer:A6,preloadedState:e,middleware:e=>e({serializableCheck:!1,immutableCheck:![`commonjs`,`es6`,`production`].includes(`es6`)}).concat([K3.middleware,J3.middleware,l6.middleware,h6.middleware,x6.middleware]),enhancers:e=>{var t=e;return typeof e==`function`&&(t=e()),t.concat(wD({type:`raf`}))},devTools:LM.devToolsEnabled&&{serialize:{replacer:Q3},name:`recharts-${t}`}})};function M6(e){var t=e.preloadedState,n=e.children,r=e.reduxStoreName,i=kk(),a=(0,v.useRef)(null);if(i)return n;a.current??=j6(t,r);var o=Xw;return v.createElement(dM,{context:o,store:a.current},n)}function N6(e){var t=e.layout,n=e.margin,r=$w(),i=kk();return(0,v.useEffect)(()=>{i||(r(DO(t)),r(EO(n)))},[r,i,t,n]),null}var P6=(0,v.memo)(N6,mM);function F6(e){var t=$w();return(0,v.useEffect)(()=>{t(n6(e))},[t,e]),null}var I6=(0,v.memo)(e=>{var t=$w();return(0,v.useEffect)(()=>{t(O6(e))},[t,e]),null},mM);function L6(e){var t=e.zIndex,n=e.isPanorama,r=(0,v.useRef)(null),i=$w();return(0,v.useLayoutEffect)(()=>(r.current&&i(_q({zIndex:t,element:r.current,isPanorama:n})),()=>{i(vq({zIndex:t,isPanorama:n}))}),[i,t,n]),v.createElement(`g`,{tabIndex:-1,ref:r,className:`recharts-zIndex-layer_${t}`})}function R6(e){var t=e.children,n=e.isPanorama,r=Q(iq);if(!r||r.length===0)return t;var i=r.filter(e=>e<0),a=r.filter(e=>e>0);return v.createElement(v.Fragment,null,i.map(e=>v.createElement(L6,{key:e,zIndex:e,isPanorama:n})),t,a.map(e=>v.createElement(L6,{key:e,zIndex:e,isPanorama:n})))}var z6=[`children`];function B6(e,t){if(e==null)return{};var n,r,i=V6(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function V6(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function H6(){return H6=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},H6.apply(null,arguments)}var U6={width:`100%`,height:`100%`,display:`block`},W6=(0,v.forwardRef)((e,t)=>{var n=hA(),r=gA(),i=aN();if(!NO(n)||!NO(r))return null;var a=e.children,o=e.otherAttributes,s=e.title,c=e.desc,l,u;return o!=null&&(l=typeof o.tabIndex==`number`?o.tabIndex:i?0:void 0,u=typeof o.role==`string`?o.role:i?`application`:void 0),v.createElement(Qx,H6({},o,{title:s,desc:c,role:u,tabIndex:l,width:n,height:r,style:U6,ref:t}),a)}),G6=e=>{var t=e.children,n=Q(jk);if(!n)return null;var r=n.width,i=n.height,a=n.y,o=n.x;return v.createElement(Qx,{width:r,height:i,x:o,y:a},t)},K6=(0,v.forwardRef)((e,t)=>{var n=e.children,r=B6(e,z6);return kk()?v.createElement(G6,null,v.createElement(R6,{isPanorama:!0},n)):v.createElement(W6,H6({ref:t},r),v.createElement(R6,{isPanorama:!1},n))});function q6(e,t){return Q6(e)||Z6(e,t)||Y6(e,t)||J6()}function J6(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
132
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Y6(e,t){if(e){if(typeof e==`string`)return X6(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?X6(e,t):void 0}}function X6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Z6(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Q6(e){if(Array.isArray(e))return e}function $6(){var e=$w(),t=q6((0,v.useState)(null),2),n=t[0],r=t[1],i=Q(lk);return(0,v.useEffect)(()=>{if(n!=null){var t=n.getBoundingClientRect().width/n.offsetWidth;MO(t)&&t!==i&&e(kO(t))}},[n,e,i]),r}function e8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function t8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?e8(Object(n),!0).forEach(function(t){n8(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e8(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function n8(e,t,n){return(t=r8(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r8(e){var t=i8(e,`string`);return typeof t==`symbol`?t:t+``}function i8(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function a8(){return a8=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a8.apply(null,arguments)}function o8(e,t){return d8(e)||u8(e,t)||c8(e,t)||s8()}function s8(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
133
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c8(e,t){if(e){if(typeof e==`string`)return l8(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l8(e,t):void 0}}function l8(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function u8(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function d8(e){if(Array.isArray(e))return e}var f8=()=>(nJ(),null);function p8(e){if(typeof e==`number`)return e;if(typeof e==`string`){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var m8=(0,v.forwardRef)((e,t)=>{var n=(0,v.useRef)(null),r=o8((0,v.useState)({containerWidth:p8(e.style?.width),containerHeight:p8(e.style?.height)}),2),i=r[0],a=r[1],o=(0,v.useCallback)((e,t)=>{a(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]),s=(0,v.useCallback)(e=>{if(typeof t==`function`&&t(e),n.current!=null&&(n.current.disconnect(),n.current=null),e!=null&&typeof ResizeObserver<`u`){var r=e.getBoundingClientRect(),i=r.width,a=r.height;o(i,a);var s=new ResizeObserver(e=>{var t=e[0];if(t!=null){var n=t.contentRect,r=n.width,i=n.height;o(r,i)}});s.observe(e),n.current=s}},[t,o]);return(0,v.useEffect)(()=>()=>{n.current?.disconnect()},[o]),v.createElement(v.Fragment,null,v.createElement(CA,{width:i.containerWidth,height:i.containerHeight}),v.createElement(`div`,a8({ref:s},e)))}),h8=(0,v.forwardRef)((e,t)=>{var n=e.width,r=e.height,i=o8((0,v.useState)({containerWidth:p8(n),containerHeight:p8(r)}),2),a=i[0],o=i[1],s=(0,v.useCallback)((e,t)=>{o(n=>{var r=Math.round(e),i=Math.round(t);return n.containerWidth===r&&n.containerHeight===i?n:{containerWidth:r,containerHeight:i}})},[]),c=(0,v.useCallback)(e=>{if(typeof t==`function`&&t(e),e!=null){var n=e.getBoundingClientRect(),r=n.width,i=n.height;s(r,i)}},[t,s]);return v.createElement(v.Fragment,null,v.createElement(CA,{width:a.containerWidth,height:a.containerHeight}),v.createElement(`div`,a8({ref:c},e)))}),g8=(0,v.forwardRef)((e,t)=>{var n=e.width,r=e.height;return v.createElement(v.Fragment,null,v.createElement(CA,{width:n,height:r}),v.createElement(`div`,a8({ref:t},e)))}),_8=(0,v.forwardRef)((e,t)=>{var n=e.width,r=e.height;return typeof n==`string`||typeof r==`string`?v.createElement(h8,a8({},e,{ref:t})):typeof n==`number`&&typeof r==`number`?v.createElement(g8,a8({},e,{width:n,height:r,ref:t})):v.createElement(v.Fragment,null,v.createElement(CA,{width:n,height:r}),v.createElement(`div`,a8({ref:t},e)))});function v8(e){return e?m8:_8}var y8=(0,v.forwardRef)((e,t)=>{var n=e.children,r=e.className,i=e.height,a=e.onClick,o=e.onContextMenu,s=e.onDoubleClick,c=e.onMouseDown,l=e.onMouseEnter,u=e.onMouseLeave,d=e.onMouseMove,f=e.onMouseUp,p=e.onTouchEnd,m=e.onTouchMove,h=e.onTouchStart,g=e.style,_=e.width,y=e.responsive,b=e.dispatchTouchEvents,x=b===void 0?!0:b,S=(0,v.useRef)(null),C=$w(),w=o8((0,v.useState)(null),2),T=w[0],E=w[1],D=o8((0,v.useState)(null),2),O=D[0],k=D[1],A=$6(),j=cA(),M=j?.width>0?j.width:_,N=j?.height>0?j.height:i,P=(0,v.useCallback)(e=>{A(e),typeof t==`function`&&t(e),E(e),k(e),e!=null&&(S.current=e)},[A,t,E,k]),F=(0,v.useCallback)(e=>{C(G3(e)),C(m6({handler:a,reactEvent:e}))},[C,a]),I=(0,v.useCallback)(e=>{C(q3(e)),C(m6({handler:l,reactEvent:e}))},[C,l]),L=(0,v.useCallback)(e=>{C(dG()),C(m6({handler:u,reactEvent:e}))},[C,u]),R=(0,v.useCallback)(e=>{C(q3(e)),C(m6({handler:d,reactEvent:e}))},[C,d]),ee=(0,v.useCallback)(()=>{C(s6())},[C]),te=(0,v.useCallback)(()=>{C(c6())},[C]),z=(0,v.useCallback)(e=>{C(o6(e.key))},[C]),B=(0,v.useCallback)(e=>{C(m6({handler:o,reactEvent:e}))},[C,o]),V=(0,v.useCallback)(e=>{C(m6({handler:s,reactEvent:e}))},[C,s]),ne=(0,v.useCallback)(e=>{C(m6({handler:c,reactEvent:e}))},[C,c]),re=(0,v.useCallback)(e=>{C(m6({handler:f,reactEvent:e}))},[C,f]),ie=(0,v.useCallback)(e=>{C(m6({handler:h,reactEvent:e}))},[C,h]),ae=(0,v.useCallback)(e=>{x&&C(b6(e)),C(m6({handler:m,reactEvent:e}))},[C,x,m]),oe=(0,v.useCallback)(e=>{C(m6({handler:p,reactEvent:e}))},[C,p]),se=v8(y);return v.createElement(Aq.Provider,{value:T},v.createElement(iS.Provider,{value:O},v.createElement(se,{width:M??g?.width,height:N??g?.height,className:dv(`recharts-wrapper`,r),style:t8({position:`relative`,cursor:`default`,width:M,height:N},g),onClick:F,onContextMenu:B,onDoubleClick:V,onFocus:ee,onBlur:te,onKeyDown:z,onMouseDown:ne,onMouseEnter:I,onMouseLeave:L,onMouseMove:R,onMouseUp:re,onTouchEnd:oe,onTouchMove:ae,onTouchStart:ie,ref:P},v.createElement(f8,null),n)))}),b8=[`width`,`height`,`responsive`,`children`,`className`,`style`,`compact`,`title`,`desc`];function x8(e,t){if(e==null)return{};var n,r,i=S8(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function S8(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var C8=(0,v.forwardRef)((e,t)=>{var n=e.width,r=e.height,i=e.responsive,a=e.children,o=e.className,s=e.style,c=e.compact,l=e.title,u=e.desc,d=Wx(x8(e,b8));return c?v.createElement(v.Fragment,null,v.createElement(CA,{width:n,height:r}),v.createElement(K6,{otherAttributes:d,title:l,desc:u},a)):v.createElement(y8,{className:o,style:s,width:n,height:r,responsive:i??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},v.createElement(K6,{otherAttributes:d,title:l,desc:u,ref:t},v.createElement(q0,null,a)))});function w8(){return w8=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w8.apply(null,arguments)}function T8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function E8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?T8(Object(n),!0).forEach(function(t){D8(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T8(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function D8(e,t,n){return(t=O8(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O8(e){var t=k8(e,`string`);return typeof t==`symbol`?t:t+``}function k8(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var A8=E8({accessibilityLayer:!0,barCategoryGap:`10%`,barGap:4,layout:`horizontal`,margin:{top:5,right:5,bottom:5,left:5},responsive:!1,reverseStackOrder:!1,stackOffset:`none`,syncMethod:`index`},E6),j8=(0,v.forwardRef)(function(e,t){var n=RC(e.categoricalChartProps,A8),r=e.chartName,i=e.defaultTooltipEventType,a=e.validateTooltipEventTypes,o=e.tooltipPayloadSearcher,s=e.categoricalChartProps,c={chartName:r,defaultTooltipEventType:i,validateTooltipEventTypes:a,tooltipPayloadSearcher:o,eventEmitter:void 0};return v.createElement(M6,{preloadedState:{options:c},reduxStoreName:s.id??r},v.createElement(j0,{chartData:s.data}),v.createElement(P6,{layout:n.layout,margin:n.margin}),v.createElement(I6,{throttleDelay:n.throttleDelay,throttledEvents:n.throttledEvents}),v.createElement(F6,{baseValue:n.baseValue,accessibilityLayer:n.accessibilityLayer,barCategoryGap:n.barCategoryGap,maxBarSize:n.maxBarSize,stackOffset:n.stackOffset,barGap:n.barGap,barSize:n.barSize,syncId:n.syncId,syncMethod:n.syncMethod,className:n.className,reverseStackOrder:n.reverseStackOrder}),v.createElement(C8,w8({},n,{ref:t})))});function M8(e){var t=$w();return(0,v.useEffect)(()=>{t(i6(e))},[t,e]),null}var N8=[`layout`];function P8(){return P8=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},P8.apply(null,arguments)}function F8(e,t){if(e==null)return{};var n,r,i=I8(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function I8(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function L8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function R8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?L8(Object(n),!0).forEach(function(t){z8(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L8(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function z8(e,t,n){return(t=B8(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B8(e){var t=V8(e,`string`);return typeof t==`symbol`?t:t+``}function V8(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var H8=R8({accessibilityLayer:!0,stackOffset:`none`,barCategoryGap:`10%`,barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:`index`,layout:`radial`,responsive:!1,cx:`50%`,cy:`50%`,innerRadius:0,outerRadius:`80%`},E6),U8=(0,v.forwardRef)(function(e,t){var n=RC(e.categoricalChartProps,H8),r=n.layout,i=F8(n,N8),a=e.chartName,o={chartName:a,defaultTooltipEventType:e.defaultTooltipEventType,validateTooltipEventTypes:e.validateTooltipEventTypes,tooltipPayloadSearcher:e.tooltipPayloadSearcher,eventEmitter:void 0};return v.createElement(M6,{preloadedState:{options:o},reduxStoreName:n.id??a},v.createElement(j0,{chartData:n.data}),v.createElement(P6,{layout:r,margin:n.margin}),v.createElement(I6,{throttleDelay:n.throttleDelay,throttledEvents:n.throttledEvents}),v.createElement(F6,{baseValue:void 0,accessibilityLayer:n.accessibilityLayer,barCategoryGap:n.barCategoryGap,maxBarSize:n.maxBarSize,stackOffset:n.stackOffset,barGap:n.barGap,barSize:n.barSize,syncId:n.syncId,syncMethod:n.syncMethod,className:n.className,reverseStackOrder:n.reverseStackOrder}),v.createElement(M8,{cx:n.cx,cy:n.cy,startAngle:n.startAngle,endAngle:n.endAngle,innerRadius:n.innerRadius,outerRadius:n.outerRadius}),v.createElement(C8,P8({},i,{ref:t})))});function W8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function G8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?W8(Object(n),!0).forEach(function(t){K8(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W8(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function K8(e,t,n){return(t=q8(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q8(e){var t=J8(e,`string`);return typeof t==`symbol`?t:t+``}function J8(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var Y8=[`item`],X8=G8(G8({},H8),{},{layout:`centric`,startAngle:0,endAngle:360}),Z8=(0,v.forwardRef)((e,t)=>{var n=RC(e,X8);return v.createElement(U8,{chartName:`PieChart`,defaultTooltipEventType:`item`,validateTooltipEventTypes:Y8,tooltipPayloadSearcher:Iq,categoricalChartProps:n,ref:t})}),Q8=[`axis`],$8=(0,v.forwardRef)((e,t)=>v.createElement(j8,{chartName:`AreaChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:Q8,tooltipPayloadSearcher:Iq,categoricalChartProps:e,ref:t}));function e5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function t5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?e5(Object(n),!0).forEach(function(t){n5(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e5(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function n5(e,t,n){return(t=r5(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r5(e){var t=i5(e,`string`);return typeof t==`symbol`?t:t+``}function i5(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var a5=[`axis`,`item`],o5=t5(t5({},H8),{},{layout:`radial`,startAngle:0,endAngle:360}),s5=(0,v.forwardRef)((e,t)=>{var n=RC(e,o5);return v.createElement(U8,{chartName:`RadialBarChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:a5,tooltipPayloadSearcher:Iq,categoricalChartProps:n,ref:t})}),c5={light:``,dark:`.dark`},l5={width:320,height:200},u5=v.createContext(null);function d5(){let e=v.useContext(u5);if(!e)throw Error(`useChart must be used within a <ChartContainer />`);return e}function f5({id:e,className:t,children:n,config:r,initialDimension:i=l5,...a}){let o=v.useId(),s=`chart-${e??o.replace(/:/g,``)}`;return(0,K.jsx)(u5.Provider,{value:{config:r},children:(0,K.jsxs)(`div`,{"data-slot":`chart`,"data-chart":s,className:Y(`flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden`,t),...a,children:[(0,K.jsx)(p5,{id:s,config:r}),(0,K.jsx)(uA,{initialDimension:i,children:n})]})})}function p5({id:e,config:t}){let n=Object.entries(t).filter(([,e])=>e.theme??e.color);return n.length?(0,K.jsx)(`style`,{dangerouslySetInnerHTML:{__html:Object.entries(c5).map(([t,r])=>`
134
134
  ${r} [data-chart=${e}] {
135
135
  ${n.map(([e,n])=>{let r=n.theme?.[t]??n.color;return r?` --color-${e}: ${r};`:null}).join(`
136
136
  `)}
137
137
  }
138
138
  `).join(`
139
- `)}}):null}var h5=bJ;function g5({active:e,payload:t,className:n,indicator:r=`dot`,hideLabel:i=!1,hideIndicator:a=!1,label:o,labelFormatter:s,labelClassName:c,formatter:l,color:u,nameKey:d,labelKey:f}){let{config:p}=f5(),m=v.useMemo(()=>{if(i||!t?.length)return null;let[e]=t,n=`${f??e?.dataKey??e?.name??`value`}`,r=_5(p,e,n),a=!f&&typeof o==`string`?p[o]?.label??o:r?.label;return s?(0,K.jsx)(`div`,{className:Y(`font-medium`,c),children:s(a,t)}):a?(0,K.jsx)(`div`,{className:Y(`font-medium`,c),children:a}):null},[o,s,t,i,c,p,f]);if(!e||!t?.length)return null;let h=t.length===1&&r!==`dot`;return(0,K.jsxs)(`div`,{className:Y(`grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl`,n),children:[h?null:m,(0,K.jsx)(`div`,{className:`grid gap-1.5`,children:t.filter(e=>e.type!==`none`).map((e,t)=>{let n=`${d??e.name??e.dataKey??`value`}`,i=_5(p,e,n),o=u??e.payload?.fill??e.color;return(0,K.jsx)(`div`,{className:Y(`flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground`,r===`dot`&&`items-center`),children:l&&e?.value!==void 0&&e.name?l(e.value,e.name,e,t,e.payload):(0,K.jsxs)(K.Fragment,{children:[i?.icon?(0,K.jsx)(i.icon,{}):!a&&(0,K.jsx)(`div`,{className:Y(`shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)`,{"h-2.5 w-2.5":r===`dot`,"w-1":r===`line`,"w-0 border-[1.5px] border-dashed bg-transparent":r===`dashed`,"my-0.5":h&&r===`dashed`}),style:{"--color-bg":o,"--color-border":o}}),(0,K.jsxs)(`div`,{className:Y(`flex flex-1 justify-between leading-none`,h?`items-end`:`items-center`),children:[(0,K.jsxs)(`div`,{className:`grid gap-1.5`,children:[h?m:null,(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:i?.label??e.name})]}),e.value!=null&&(0,K.jsx)(`span`,{className:`font-mono font-medium text-foreground tabular-nums`,children:typeof e.value==`number`?e.value.toLocaleString():String(e.value)})]})]})},t)})})]})}function _5(e,t,n){if(typeof t!=`object`||!t)return;let r=`payload`in t&&typeof t.payload==`object`&&t.payload!==null?t.payload:void 0,i=n;return n in t&&typeof t[n]==`string`?i=t[n]:r&&n in r&&typeof r[n]==`string`&&(i=r[n]),i in e?e[i]:e[n]}var v5=e=>new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,hour12:!1}),y5={ok:{label:`ok`,color:`var(--chart-1)`},error:{label:`error`,color:`var(--destructive)`}};function b5({series:e}){return(0,K.jsx)(p5,{config:y5,className:`h-[200px] w-full`,children:(0,K.jsxs)(e5,{data:e,margin:{top:8,right:8,left:-18,bottom:0},children:[(0,K.jsxs)(`defs`,{children:[(0,K.jsxs)(`linearGradient`,{id:`fillOk`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,K.jsx)(`stop`,{offset:`0%`,stopColor:`var(--color-ok)`,stopOpacity:.5}),(0,K.jsx)(`stop`,{offset:`100%`,stopColor:`var(--color-ok)`,stopOpacity:.04})]}),(0,K.jsxs)(`linearGradient`,{id:`fillErr`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,K.jsx)(`stop`,{offset:`0%`,stopColor:`var(--color-error)`,stopOpacity:.55}),(0,K.jsx)(`stop`,{offset:`100%`,stopColor:`var(--color-error)`,stopOpacity:.05})]})]}),(0,K.jsx)(c4,{vertical:!1,strokeDasharray:`3 3`}),(0,K.jsx)(D3,{dataKey:`t`,tickFormatter:v5,tick:{fontSize:10},tickLine:!1,axisLine:!1,minTickGap:48}),(0,K.jsx)(H3,{tick:{fontSize:10},tickLine:!1,axisLine:!1,width:34,allowDecimals:!1}),(0,K.jsx)(h5,{content:(0,K.jsx)(g5,{labelFormatter:(e,t)=>{let n=t?.[0]?.payload?.t;return typeof n==`number`?v5(n):``}})}),(0,K.jsx)(o3,{type:`monotone`,dataKey:`ok`,name:`ok`,stackId:`1`,stroke:`var(--color-ok)`,fill:`url(#fillOk)`,strokeWidth:2,isAnimationActive:!1}),(0,K.jsx)(o3,{type:`monotone`,dataKey:`error`,name:`error`,stackId:`1`,stroke:`var(--color-error)`,fill:`url(#fillErr)`,strokeWidth:2,isAnimationActive:!1})]})})}function x5({segments:e,centerLabel:t=`calls`}){let n=e.filter(e=>e.value>0),r=e.reduce((e,t)=>e+t.value,0);return(0,K.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-3`,children:[(0,K.jsx)(p5,{config:Object.fromEntries(n.map(e=>[e.label,{label:e.label,color:e.color}])),className:`mx-auto aspect-square w-full max-w-[180px]`,children:(0,K.jsxs)(Q8,{children:[(0,K.jsx)(h5,{content:(0,K.jsx)(g5,{hideLabel:!0})}),(0,K.jsx)(M$,{data:n,dataKey:`value`,nameKey:`label`,innerRadius:58,outerRadius:80,paddingAngle:2,strokeWidth:0,isAnimationActive:!1,children:n.map(e=>(0,K.jsx)(xJ,{fill:e.color},e.label))}),(0,K.jsx)(`text`,{x:`50%`,y:`47%`,textAnchor:`middle`,className:`fill-foreground`,fontSize:22,fontWeight:600,children:r.toLocaleString()}),(0,K.jsx)(`text`,{x:`50%`,y:`59%`,textAnchor:`middle`,className:`fill-muted-foreground`,fontSize:10,children:t})]})}),(0,K.jsx)(`div`,{className:`flex flex-wrap justify-center gap-x-3.5 gap-y-1.5 text-[11px] text-muted-foreground`,children:n.map(e=>(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(`i`,{className:`size-[9px] rounded-[3px]`,style:{background:e.color}}),e.label,` `,(0,K.jsx)(`b`,{className:`font-medium text-foreground`,children:e.value})]},e.label))})]})}function S5({values:e,color:t,unit:n,maxValue:r,id:i}){let a=e.filter(e=>e!=null);if(a.length===0)return(0,K.jsx)(`div`,{className:`px-1.5 py-3 text-center text-[11px] text-muted-foreground`,children:`no samples yet`});let o=e.map((e,t)=>({i:t,v:e})),s=a[a.length-1],c=`ma-${(i??t).replace(/[^a-z0-9]/gi,``)}`,l={v:{label:`value`,color:t}},u=Math.min(...a),d=Math.max(...a),f=Math.max(0,(n===`%`?10:0)-(d-u))/2,p=u-f,m=d+f,h=(m-p)*.15||1;return p=Math.max(0,p-h),m+=h,r!=null&&(m=Math.min(r,m)),m<=p&&(m=p+1),(0,K.jsxs)(`div`,{className:`relative w-full`,children:[(0,K.jsxs)(`span`,{className:`absolute right-0.5 top-0 z-10 text-[10px] font-semibold`,style:{color:t},children:[s.toFixed(n===`%`?0:1),n??``]}),(0,K.jsx)(p5,{config:l,className:`h-[46px] w-full`,children:(0,K.jsxs)(e5,{data:o,margin:{top:4,right:2,left:2,bottom:0},children:[(0,K.jsx)(`defs`,{children:(0,K.jsxs)(`linearGradient`,{id:c,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,K.jsx)(`stop`,{offset:`0%`,stopColor:`var(--color-v)`,stopOpacity:.35}),(0,K.jsx)(`stop`,{offset:`100%`,stopColor:`var(--color-v)`,stopOpacity:0})]})}),(0,K.jsx)(H3,{hide:!0,domain:[p,m]}),(0,K.jsx)(h5,{content:(0,K.jsx)(g5,{hideLabel:!0,formatter:e=>(0,K.jsxs)(`span`,{className:`font-mono tabular-nums text-foreground`,children:[typeof e==`number`?e.toLocaleString():String(e),n??``]})})}),(0,K.jsx)(o3,{type:`monotone`,dataKey:`v`,stroke:`var(--color-v)`,fill:`url(#${c})`,strokeWidth:1.7,connectNulls:!1,isAnimationActive:!1,dot:!1})]})})]})}function C5({value:e,label:t,color:n}){let r=e!=null,i=r?Math.max(0,Math.min(100,e)):0;return(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-0.5`,children:[(0,K.jsxs)(`div`,{className:`relative grid size-[72px] place-items-center`,children:[(0,K.jsx)(p5,{config:{value:{label:t,color:n}},className:`size-[72px]`,children:(0,K.jsxs)(c5,{data:[{name:t,value:i,fill:n}],innerRadius:`72%`,outerRadius:`100%`,startAngle:90,endAngle:-270,barSize:7,children:[(0,K.jsx)(OZ,{type:`number`,domain:[0,100],tick:!1,axisLine:!1}),(0,K.jsx)(j0,{dataKey:`value`,cornerRadius:4,background:{fill:`var(--muted)`},isAnimationActive:!1})]})}),(0,K.jsx)(`span`,{className:`pointer-events-none absolute inset-0 grid place-items-center text-[13px] font-bold`,style:{color:r?`var(--foreground)`:`var(--muted-foreground)`},children:r?`${Math.round(i)}%`:`n/a`})]}),(0,K.jsx)(`span`,{className:`text-[10px] tracking-[0.06em] text-muted-foreground`,children:t})]})}var w5=40,T5=30,E5=1e3,D5=`http://www.w3.org/2000/svg`,O5=e=>`${(e/1e6).toFixed(2)} Mbps`,k5=e=>e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(0)}k`:e>0?`${Math.round(e)}`:`0`;function A5({history:e}){let t=Math.max(1,...e.flatMap(e=>[e.rx,e.tx])),n=e=>8+e*504/Math.max(1,w5-1),r=e=>142-e/t*134,i=t=>e.map((e,i)=>`${n(i).toFixed(1)},${r(t(e)).toFixed(1)}`).join(` `),a=t=>{if(e.length<2)return``;let r=n(0).toFixed(1),a=n(e.length-1).toFixed(1);return`${r},${142 .toFixed(1)} ${i(t)} ${a},${142 .toFixed(1)}`};return(0,K.jsx)(`svg`,{className:`block h-[150px] w-full max-w-[520px] rounded-md border border-border bg-background`,viewBox:`0 0 520 150`,xmlns:D5,role:`img`,children:e.length>=2&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`polygon`,{className:`fill-success/20 stroke-none`,points:a(e=>e.rx)}),(0,K.jsx)(`polygon`,{className:`fill-warning/15 stroke-none`,points:a(e=>e.tx)}),(0,K.jsx)(`polyline`,{className:`fill-none stroke-success stroke-2`,points:i(e=>e.rx)}),(0,K.jsx)(`polyline`,{className:`fill-none stroke-warning stroke-2`,points:i(e=>e.tx)})]})})}function j5({history:e}){let t=`block h-[18px] w-20 shrink-0 rounded-[3px] bg-muted/40`;if(e.length<2)return(0,K.jsx)(`svg`,{className:t,viewBox:`0 0 80 18`});let n=Math.max(1,...e.flatMap(e=>[e.rx,e.tx])),r=e=>1+e*78/Math.max(1,T5-1),i=e=>17-e/n*16,a=t=>e.map((e,n)=>`${r(n).toFixed(1)},${i(t(e)).toFixed(1)}`).join(` `),o=t=>{let n=r(0).toFixed(1),i=r(e.length-1).toFixed(1),o=17 .toFixed(1);return`${n},${o} ${a(t)} ${i},${o}`};return(0,K.jsxs)(`svg`,{className:t,viewBox:`0 0 80 18`,xmlns:D5,children:[(0,K.jsx)(`polygon`,{className:`fill-success/20 stroke-none`,points:o(e=>e.rx)}),(0,K.jsx)(`polygon`,{className:`fill-warning/15 stroke-none`,points:o(e=>e.tx)}),(0,K.jsx)(`polyline`,{className:`fill-none stroke-success stroke-1`,vectorEffect:`non-scaling-stroke`,points:a(e=>e.rx)}),(0,K.jsx)(`polyline`,{className:`fill-none stroke-warning stroke-1`,vectorEffect:`non-scaling-stroke`,points:a(e=>e.tx)})]})}function M5({ip:e,deviceName:t,current:n,onSaved:r}){let[i,a]=(0,v.useState)(n.download),[o,s]=(0,v.useState)(n.upload),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(!1),[f,p]=(0,v.useState)(null);(0,v.useEffect)(()=>{c||(a(n.download),s(n.upload))},[n.download,n.upload,c]);let m=(0,v.useCallback)(async(n,i)=>{d(!0),p(null);try{let a=await hc(`/api/clients/limits`,{ip:e,device:t,download:n,upload:i});p(a.message),a.ok&&(l(!1),r())}catch(e){p(e instanceof Error?e.message:String(e))}finally{d(!1)}},[e,t,r]),h=!!(n.download||n.upload);return(0,K.jsxs)(`div`,{className:`mt-3.5 max-w-[520px] border-t border-border pt-3`,children:[(0,K.jsxs)(`div`,{className:`mb-2 flex items-baseline gap-3`,children:[(0,K.jsx)(`span`,{className:`text-[13px] font-semibold`,children:`Rate limits`}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[`current: ↓ `,n.download||`unlimited`,` · ↑ `,n.upload||`unlimited`]})]}),(0,K.jsxs)(`div`,{className:`flex flex-wrap items-end gap-2`,children:[(0,K.jsxs)(`label`,{className:`flex flex-col gap-[3px] text-[11.5px]`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`↓ Download`}),(0,K.jsx)(Vb,{className:`w-[150px]`,placeholder:`10M · blank = unlimited`,value:i,onChange:e=>{l(!0),a(e.target.value)}})]}),(0,K.jsxs)(`label`,{className:`flex flex-col gap-[3px] text-[11.5px]`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`↑ Upload`}),(0,K.jsx)(Vb,{className:`w-[150px]`,placeholder:`2M · blank = unlimited`,value:o,onChange:e=>{l(!0),s(e.target.value)}})]}),(0,K.jsx)(X,{size:`sm`,type:`accent`,loading:u,onClick:()=>void m(i,o),children:`Apply`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,disabled:u||!h,onClick:()=>{a(``),s(``),m(``,``)},children:`Remove`})]}),f&&(0,K.jsx)(`div`,{className:`mt-1.5 text-muted-foreground text-xs`,children:f})]})}function N5({device:e,deviceName:t,traffic:n}){let r=n!==void 0;return(0,K.jsxs)(`div`,{className:`mt-3.5 border-t border-border pt-3.5`,children:[(0,K.jsxs)(`div`,{className:`mb-2.5 flex flex-wrap items-baseline gap-3`,children:[(0,K.jsx)(`span`,{className:`text-sm font-semibold`,children:e.host||e.comment||e.ip}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[e.ip||`no IP`,` · `,e.mac,` · `,e.iface||`?`,` · `,e.status]})]}),r?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`mb-2 flex gap-[18px] tabular-nums`,children:[(0,K.jsxs)(`span`,{className:`font-semibold text-success`,children:[`↓ `,O5(n.rxRate)]}),(0,K.jsxs)(`span`,{className:`font-semibold text-warning`,children:[`↑ `,O5(n.txRate)]})]}),(0,K.jsx)(A5,{history:n.history}),(0,K.jsxs)(`div`,{className:`mt-2 text-muted-foreground text-xs tabular-nums`,children:[`total ↓ `,db(n.rxBytes),` · ↑ `,db(n.txBytes)]})]}):(0,K.jsxs)(Pb,{type:`secondary`,label:`No traffic yet`,children:[`No traffic seen for `,(0,K.jsx)(`code`,{children:e.ip}),` yet. Rates appear here as soon as the device sends or receives.`]}),e.ip&&(0,K.jsx)(M5,{ip:e.ip,deviceName:t,current:{download:n?.downloadLimit??``,upload:n?.uploadLimit??``},onSaved:()=>{}}),e.ip&&(0,K.jsxs)(`div`,{className:`mt-4`,children:[(0,K.jsx)(`div`,{className:`mb-2 text-xs font-semibold text-muted-foreground`,children:`Usage history · last 3 months`}),(0,K.jsx)(ix,{endpoint:`/api/usage/client?ip=${encodeURIComponent(e.ip)}${t?`&device=${encodeURIComponent(t)}`:``}&days=90`,days:90})]})]})}var P5={map:new Map,source:`accounting`};function F5(e,t){let n=new Set([...e.map.keys(),...Object.keys(t.hosts),...Object.keys(t.limits)]),r=new Map;for(let i of n){let n=t.hosts[i],a=n?.rxRate??0,o=n?.txRate??0,s=e.map.get(i),c=[...s?.history??[],{rx:a,tx:o}].slice(-30),l=t.limits[i];!l&&!c.some(e=>e.rx>0||e.tx>0)||r.set(i,{rxRate:a,txRate:o,rxBytes:n?.rxBytes??s?.rxBytes??0,txBytes:n?.txBytes??s?.txBytes??0,downloadLimit:l?.download??``,uploadLimit:l?.upload??``,history:c})}return{map:r,source:t.source,note:t.note}}function I5(e){let[t,n]=(0,v.useState)(P5);return(0,v.useEffect)(()=>{n(P5)},[e]),(0,v.useEffect)(()=>{if(!e)return;let t=!1,r=null,i=null,a=null,o=`traffic=${encodeURIComponent(e)}`,s=e=>{t||n(t=>F5(t,e))},c=()=>{if(t||a)return;let n=async()=>{try{s(await mc(`/api/clients/traffic-bulk?device=${encodeURIComponent(e)}`))}catch{}};n(),a=setInterval(()=>void n(),E5)},l=()=>{if(t)return;i=new EventSource(pc(`/api/sse?${o}`));let e=!1;i.onopen=()=>{e=!0},i.addEventListener(`traffic`,e=>{try{s(JSON.parse(e.data))}catch{}}),i.onerror=()=>{!e&&i&&(i.close(),i=null,c())}},u=()=>{if(t)return;let e=location.protocol===`https:`?`wss`:`ws`;r=new WebSocket(pc(`${e}://${location.host}/api/stream?${o}`));let n=!1;r.onopen=()=>{n=!0},r.onerror=()=>r?.close(),r.onmessage=e=>{try{let t=JSON.parse(e.data);t.type===`traffic`&&t.sample&&s(t.sample)}catch{}},r.onclose=()=>{t||(n?setTimeout(u,2e3):l())}};return u(),()=>{t=!0,r?.close(),i?.close(),a&&clearInterval(a)}},[e]),t}function L5(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)(``),[m,h]=(0,v.useState)(null),{map:g,source:_,note:y}=I5(n);(0,v.useEffect)(()=>{mc(`/api/devices`).then(e=>{t(e),r(t=>t||e.defaultDevice||e.devices[0]?.name||``)}).catch(()=>t({server:``,defaultDevice:``,devices:[]}))},[]);let b=(0,v.useCallback)(async()=>{try{let e=n?`?device=${encodeURIComponent(n)}`:``;a(await mc(`/api/clients${e}`)),d(null)}catch(e){d(e instanceof Error?e.message:String(e))}},[n]);(0,v.useEffect)(()=>{a(null),s(null),b();let e=setInterval(()=>void b(),15e3);return()=>clearInterval(e)},[b]);let x=(0,v.useCallback)(async(e,t,r)=>{l(t),d(null);try{let i=await hc(`/api/clients/${e}`,{mac:t,device:n,...r});i.view?a(i.view):await b(),i.ok||d(i.message)}catch(e){d(e instanceof Error?e.message:String(e))}finally{l(null)}},[n,b]),S=(0,v.useCallback)((e,t)=>{s(e.mac),h({mac:e.mac,field:t,value:t===`ip`?e.ip:e.comment||e.host})},[]),C=(0,v.useCallback)(async()=>{if(!m)return;let e=m.value.trim();m.field===`ip`?e&&await x(`set-ip`,m.mac,{ip:e}):await x(`label`,m.mac,{label:e}),h(null)},[m,x]),w=(0,v.useMemo)(()=>{let e=i?.devices??[],t=f.trim().toLowerCase();return t?e.filter(e=>e.ip.toLowerCase().includes(t)||e.mac.toLowerCase().includes(t)||e.host.toLowerCase().includes(t)||e.comment.toLowerCase().includes(t)):e},[i,f]),T=(0,v.useMemo)(()=>i?.devices.find(e=>e.mac===o)??null,[i,o]),E=e?.devices??[],D=i?.counts;return(0,K.jsx)(`section`,{className:`grid content-start gap-[18px]`,children:(0,K.jsxs)(tb,{title:`Connected clients`,className:`reveal`,extra:(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[E.length>1&&(0,K.jsx)(Gb,{value:n,onValueChange:r,"aria-label":`Router`,options:E.map(e=>({value:e.name,label:`${e.name}${e.isDefault?` (default)`:``}`}))}),(0,K.jsx)(Vb,{className:`w-[200px]`,placeholder:`Filter IP / MAC / name…`,value:f,onChange:e=>p(e.target.value)}),(0,K.jsx)(X,{size:`sm`,ghost:!0,icon:(0,K.jsx)(Zc,{}),onClick:()=>void b(),children:`Refresh`})]}),children:[D&&(0,K.jsxs)(`div`,{className:`mb-2.5 text-muted-foreground text-xs`,children:[D.total,` total · `,D.static,` static · `,D.blocked,` blocked`]}),u&&(0,K.jsx)(Pb,{type:`error`,className:`mb-2.5`,children:u}),_===`none`&&y&&(0,K.jsxs)(Pb,{type:`warning`,label:`Traffic unavailable`,className:`mb-2.5`,children:[y,` The Traffic column needs per-host counters — `,(0,K.jsx)(`code`,{children:`/ip accounting`}),` `,`on RouterOS v6, or Kid Control on v7.`]}),i?w.length===0?(0,K.jsxs)(`div`,{className:`grid justify-items-center gap-2 rounded-lg border border-dashed border-border px-4 py-[54px] text-center`,children:[(0,K.jsx)(sl,{className:`size-7 text-muted-foreground opacity-80`}),(0,K.jsx)(`p`,{className:`m-0 font-semibold text-foreground`,children:`No connected devices`}),(0,K.jsxs)(`p`,{className:`m-0 max-w-[460px] text-muted-foreground text-xs`,children:[`Nothing in this router's DHCP-lease or ARP table`,f?` matches the filter`:``,`.`]})]}):(0,K.jsxs)(By,{className:`text-[13px]`,children:[(0,K.jsx)(Vy,{children:(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Wy,{children:`IP`}),(0,K.jsx)(Wy,{children:`Name`}),(0,K.jsx)(Wy,{children:`MAC`}),(0,K.jsx)(Wy,{children:`Iface`}),(0,K.jsx)(Wy,{children:`Status`}),(0,K.jsx)(Wy,{children:`Traffic`}),(0,K.jsx)(Wy,{className:`text-right`,children:`Actions`})]})}),(0,K.jsx)(Hy,{children:w.map(e=>{let t=e.mac===o,n=c===e.mac,r=e.ip?g.get(e.ip):void 0,i=e.blocked&&`text-muted-foreground line-through`;return(0,K.jsxs)(Uy,{"data-state":t?`selected`:void 0,className:`cursor-pointer`,onClick:()=>s(t?null:e.mac),children:[(0,K.jsx)(Gy,{className:Y(`max-w-[120px] truncate`,i),children:e.ip||`—`}),(0,K.jsx)(Gy,{className:Y(`max-w-[200px] truncate`,i),children:e.host||e.comment||`(unknown)`}),(0,K.jsx)(Gy,{className:`font-mono text-[11.5px] text-muted-foreground`,children:e.mac}),(0,K.jsx)(Gy,{className:`text-muted-foreground text-[11px]`,children:e.iface||``}),(0,K.jsx)(Gy,{children:(0,K.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[e.static&&(0,K.jsx)(Lb,{type:`secondary`,children:`static`}),e.blocked?(0,K.jsx)(Lb,{type:`error`,children:`blocked`}):(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:e.status})]})}),(0,K.jsx)(Gy,{children:r?(0,K.jsxs)(`span`,{className:`flex items-center gap-1 overflow-hidden tabular-nums`,children:[(0,K.jsxs)(`span`,{className:`flex min-w-[48px] flex-col whitespace-nowrap leading-tight`,children:[(0,K.jsxs)(`span`,{className:`text-success`,children:[`↓`,k5(r.rxRate)]}),(0,K.jsxs)(`span`,{className:`text-warning`,children:[`↑`,k5(r.txRate)]})]}),(0,K.jsx)(j5,{history:r.history})]}):(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:e.ip?`—`:``})}),(0,K.jsx)(Gy,{onClick:e=>e.stopPropagation(),children:(0,K.jsxs)(`span`,{className:`flex justify-end gap-1.5`,children:[e.blocked?(0,K.jsx)(X,{size:`sm`,type:`success`,ghost:!0,loading:n,onClick:()=>void x(`allow`,e.mac),children:`Allow`}):(0,K.jsx)(X,{size:`sm`,type:`error`,ghost:!0,loading:n,onClick:()=>void x(`block`,e.mac),children:`Block`}),!e.static&&(0,K.jsx)(X,{size:`sm`,ghost:!0,loading:n,onClick:()=>void x(`pin`,e.mac),children:`Pin IP`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,disabled:n,onClick:()=>S(e,`ip`),children:`Set IP`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,disabled:n,onClick:()=>S(e,`label`),children:`Label`})]})})]},e.mac)})})]}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`loading connected devices…`}),m&&T?.mac===m.mac&&(0,K.jsxs)(`div`,{className:`mt-3.5 flex flex-wrap items-center gap-2 rounded-md border border-border bg-card px-3 py-2.5`,children:[(0,K.jsxs)(`span`,{className:`text-[13px] text-muted-foreground`,children:[m.field===`ip`?`Reserve IP for`:`Label for`,` `,(0,K.jsx)(`b`,{children:T.host||T.mac}),`:`]}),(0,K.jsx)(Vb,{className:`w-[220px]`,autoFocus:!0,value:m.value,placeholder:m.field===`ip`?`e.g. 192.168.88.50`:`e.g. Ali phone`,onChange:e=>h({...m,value:e.target.value}),onKeyDown:e=>{e.key===`Enter`&&C(),e.key===`Escape`&&h(null)}}),(0,K.jsx)(X,{size:`sm`,type:`accent`,loading:c===m.mac,onClick:()=>void C(),children:`Save`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>h(null),children:`Cancel`})]}),T&&(0,K.jsx)(N5,{device:T,deviceName:n,traffic:T.ip?g.get(T.ip):void 0})]})})}function R5(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function z5(e){return new Date(e).toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,hour12:!1})}function B5({onRestored:e}){let[t,n]=(0,v.useState)(null),[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(null),[p,m]=(0,v.useState)(null),h=(0,v.useCallback)(()=>{mc(`/api/config/history`).then(n).catch(()=>n({versions:[],bytes:0,retention:50}))},[]);(0,v.useEffect)(()=>h(),[h]);let g=(e,t)=>hc(e,t).catch(()=>({error:`request failed`})),_=async()=>{let e=(p??``).trim();m(null);let t=await g(`/api/config/history/checkpoint`,{label:e||void 0});i(t.ok?`Checkpoint saved${e?` · “${e}”`:``}`:`Failed: ${t.error}`),t.ok&&h()},y=async e=>{if(s===e){c(null),u(null);return}c(e),u(null);let t=await mc(`/api/config/history/diff?id=${encodeURIComponent(e)}`).catch(()=>null);u(t)},b=async t=>{f(null),o(!0);let n=await g(`/api/config/history/restore`,{id:t});o(!1),i(n.ok?`Restored ${t}${n.persisted===!1?` (applied live, not persisted)`:``}`:`Restore failed: ${n.error}`),n.ok&&(h(),e())},x=async e=>{let t=await g(`/api/config/history/delete`,{id:e});i(t.ok?`Version deleted`:`Failed: ${t.error}`),t.ok&&h()};return t?(0,K.jsxs)(K.Fragment,{children:[r&&(0,K.jsx)(`div`,{className:`text-muted-foreground font-mono text-xs`,children:r}),(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,style:{marginBottom:14},children:[p===null?(0,K.jsx)(X,{size:`sm`,type:`accent`,icon:(0,K.jsx)(nl,{className:`size-4`}),onClick:()=>m(``),children:`Save checkpoint`}):(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,K.jsx)(Vb,{className:`w-[min(48vw,380px)]`,autoFocus:!0,placeholder:`checkpoint name (e.g. pre-upgrade)`,value:p,onChange:e=>m(e.target.value),onKeyDown:e=>{e.key===`Enter`&&_(),e.key===`Escape`&&m(null)}}),(0,K.jsx)(X,{size:`sm`,type:`accent`,onClick:()=>void _(),children:`Save`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>m(null),children:`Cancel`})]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[t.versions.length,` versions · `,R5(t.bytes),` · auto-keep `,t.retention]})]}),t.versions.length===0?(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`No versions yet — they appear here after each config change.`}):(0,K.jsx)(`ol`,{className:`m-0 grid list-none p-0 pl-1.5`,children:t.versions.map((e,t)=>{let n=e.drift.added+e.drift.removed;return(0,K.jsxs)(`li`,{className:`hover:bg-foreground/5 relative grid grid-cols-[24px_minmax(0,1fr)_auto] items-start gap-3 rounded-md px-2.5 py-3.5 transition-colors before:absolute before:top-[25px] before:bottom-0 before:left-[22px] before:w-px before:bg-border last:before:hidden`,children:[(0,K.jsx)(`span`,{className:Y(`relative z-[1] mt-1 justify-self-center rounded-full border-[2.5px]`,t===0?`border-brand bg-brand ring-brand/25 size-[14px] ring-4`:`border-border bg-card size-[13px]`),"aria-hidden":`true`}),(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-[9px] text-[12.5px]`,children:[(0,K.jsx)(`span`,{className:Y(`rounded-full border px-2 py-0.5 font-mono text-[10px] tracking-[0.05em] uppercase`,e.kind===`checkpoint`?`border-warning/45 bg-warning/10 text-warning`:`border-border text-muted-foreground`),children:e.kind===`checkpoint`?`★ checkpoint`:`auto`}),e.label&&(0,K.jsx)(`span`,{className:`text-foreground font-semibold`,children:e.label}),(0,K.jsx)(`span`,{className:`text-muted-foreground font-mono text-[11.5px]`,children:z5(e.ts)}),t===0?(0,K.jsx)(`span`,{className:`text-brand font-mono text-[10px] font-semibold tracking-[0.05em] uppercase`,children:`latest`}):n===0?(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11.5px]`,children:`identical to current`}):(0,K.jsxs)(`span`,{className:`inline-flex items-baseline gap-[7px] font-mono text-[11.5px]`,children:[(0,K.jsxs)(`span`,{className:`text-success`,children:[`+`,e.drift.added]}),(0,K.jsxs)(`span`,{className:`text-destructive`,children:[`−`,e.drift.removed]}),(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:` vs current`})]})]}),s===e.id&&(0,K.jsx)(`div`,{className:`mt-2`,children:l?l.unified.trim()?(0,K.jsx)(`pre`,{className:`border-border bg-background text-muted-foreground m-0 max-h-[280px] overflow-auto rounded-md border p-3 font-mono text-[11px] leading-[1.5] break-words whitespace-pre-wrap`,children:l.unified}):(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`No differences from the current config.`}):(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`computing diff…`})})]}),(0,K.jsxs)(`div`,{className:`mt-px inline-flex flex-none items-center gap-1.5`,children:[(0,K.jsx)(X,{size:`sm`,onClick:()=>void y(e.id),children:s===e.id?`Hide`:`Diff`}),d===e.id?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(X,{size:`sm`,type:`accent`,disabled:a,onClick:()=>void b(e.id),children:`Confirm restore`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>f(null),children:`Cancel`})]}):(0,K.jsx)(X,{size:`sm`,disabled:t===0,title:t===0?`This is the current config`:`Restore this version`,onClick:()=>f(e.id),children:`Restore`}),e.kind===`checkpoint`&&(0,K.jsx)(X,{size:`sm`,ghost:!0,type:`error`,icon:(0,K.jsx)(cl,{className:`size-4`}),title:`Delete`,onClick:()=>void x(e.id)})]})]},e.id)})})]}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`loading history…`})}function V5(e){if(!e)return[];let t=[],n=e=>e?Array.isArray(e.enum)?`enum`:e.type===`array`?`array<${n(e.items)}>`:Array.isArray(e.type)?e.type.join(` | `):e.type??(e.properties?`object`:`any`):`any`,r=(e,i,a,o)=>{let s=e.properties??{};for(let[e,c]of Object.entries(s)){let s=i?`${i}.${e}`:e,l=a||e;t.push({path:s,section:l,type:n(c),def:c.default===void 0?void 0:JSON.stringify(c.default),desc:c.description,enumv:Array.isArray(c.enum)?c.enum:void 0,required:o.has(e)}),c.properties&&r(c,s,l,new Set(c.required??[]));let u=c.additionalProperties;u?.properties&&r(u,`${s}.<name>`,l,new Set(u.required??[]));let d=c.items;d?.properties&&r(d,`${s}[]`,l,new Set(d.required??[]))}};return r(e,``,``,new Set(e.required??[])),t}function H5(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(``);(0,v.useEffect)(()=>{mc(`/api/config-schema`).then(t).catch(()=>{})},[]);let i=(0,v.useMemo)(()=>V5(e),[e]),a=n.trim().toLowerCase(),o=a?i.filter(e=>e.path.toLowerCase().includes(a)||(e.desc??``).toLowerCase().includes(a)):i,s=(0,v.useMemo)(()=>{let e=new Map;for(let t of o){let n=e.get(t.section)??[];n.push(t),e.set(t.section,n)}return[...e.entries()]},[o]);return e?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,style:{marginBottom:12},children:[(0,K.jsx)(Vb,{className:`w-[min(360px,60vw)]`,placeholder:`Search fields & descriptions…`,value:n,onChange:e=>r(e.target.value)}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[o.length,` options`]})]}),s.length===0?(0,K.jsxs)(`div`,{className:`text-muted-foreground text-[11px]`,children:[`No fields match “`,n,`”.`]}):(0,K.jsx)(`div`,{className:`grid gap-[18px]`,children:s.map(([e,t])=>(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`h4`,{className:`text-brand m-0 mb-2 font-mono text-[11px] tracking-[0.09em] uppercase`,children:e}),(0,K.jsx)(`div`,{className:`grid gap-2`,children:t.map(e=>(0,K.jsxs)(`div`,{className:`border-border bg-muted/45 hover:border-brand/40 rounded-md border px-[13px] py-[11px] transition-colors`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-2.5`,children:[(0,K.jsx)(`code`,{className:`text-foreground font-mono text-[12.5px] font-medium`,children:e.path}),(0,K.jsx)(`span`,{className:`text-brand bg-brand/[0.13] rounded-full px-[7px] py-px font-mono text-[10.5px]`,children:e.type}),e.required&&(0,K.jsx)(`span`,{className:`text-destructive font-mono text-[10px] tracking-[0.05em] uppercase`,children:`required`}),e.def!==void 0&&(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[`default `,(0,K.jsx)(`code`,{className:`text-muted-foreground`,children:e.def})]})]}),e.desc&&(0,K.jsx)(`p`,{className:`text-muted-foreground mt-1.5 mb-0 text-[12.5px] leading-[1.5]`,children:e.desc}),e.enumv&&(0,K.jsx)(`div`,{className:`mt-[7px] flex flex-wrap gap-1.5`,children:e.enumv.map(e=>(0,K.jsx)(`code`,{className:`border-border text-muted-foreground rounded-md border px-[7px] py-px font-mono text-[11px]`,children:e},e))})]},e.path))})]},e))})]}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`loading schema…`})}function U5({...e}){return(0,K.jsx)(cf,{"data-slot":`sheet`,...e})}function W5({...e}){return(0,K.jsx)(mf,{"data-slot":`sheet-portal`,...e})}function G5({className:e,...t}){return(0,K.jsx)(gf,{"data-slot":`sheet-overlay`,className:Y(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function K5({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,K.jsxs)(W5,{children:[(0,K.jsx)(G5,{}),(0,K.jsxs)(bf,{"data-slot":`sheet-content`,className:Y(`fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500`,n===`right`&&`inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm`,n===`left`&&`inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm`,n===`top`&&`inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top`,n===`bottom`&&`inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom`,e),...i,children:[t,r&&(0,K.jsxs)(kf,{className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,K.jsx)(cl,{className:`size-4`}),(0,K.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function q5({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`sheet-header`,className:Y(`flex flex-col gap-1.5 p-4`,e),...t})}function J5({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`sheet-footer`,className:Y(`mt-auto flex flex-col gap-2 p-4`,e),...t})}function Y5({className:e,...t}){return(0,K.jsx)(Tf,{"data-slot":`sheet-title`,className:Y(`font-semibold text-foreground`,e),...t})}function X5({className:e,...t}){return(0,K.jsx)(Df,{"data-slot":`sheet-description`,className:Y(`text-sm text-muted-foreground`,e),...t})}var Z5=500;function Q5({title:e,subtitle:t,onClose:n,footer:r,children:i}){let[a,o]=(0,v.useState)(!1),s=(0,v.useRef)(null),c=(0,v.useRef)(n);return c.current=n,(0,v.useEffect)(()=>{let e=requestAnimationFrame(()=>o(!0));return()=>{cancelAnimationFrame(e),s.current&&clearTimeout(s.current)}},[]),(0,K.jsx)(U5,{open:a,onOpenChange:(0,v.useCallback)(e=>{e||s.current||(o(!1),s.current=setTimeout(()=>c.current(),Z5))},[]),children:(0,K.jsxs)(K5,{side:`right`,className:`w-full gap-0 sm:max-w-2xl`,children:[(0,K.jsxs)(q5,{className:`border-b`,children:[(0,K.jsx)(Y5,{children:e}),t!=null&&(0,K.jsx)(X5,{children:t})]}),(0,K.jsx)(`div`,{className:`flex-1 overflow-y-auto p-4`,children:i}),r!=null&&(0,K.jsx)(J5,{className:`border-t`,children:r})]})})}var $5=[{key:`host`,label:`Host / IP`,type:`text`,placeholder:`192.168.88.1`,help:`SSH host. Ignored when a MAC address is set (MAC-Telnet).`},{key:`port`,label:`SSH port`,type:`number`,placeholder:`22`},{key:`username`,label:`Username`,type:`text`,placeholder:`admin`},{key:`password`,label:`Password`,type:`password`,secret:!0},{key:`timeoutMs`,label:`Timeout (ms)`,type:`number`,placeholder:`10000`},{key:`description`,label:`Description`,type:`text`,placeholder:`Core router`,help:`Free-text label.`},{key:`keyFilename`,label:`SSH key file`,type:`text`,advanced:!0,help:`Path to a private-key file.`},{key:`privateKey`,label:`Private key (PEM)`,type:`password`,secret:!0,advanced:!0},{key:`keyPassphrase`,label:`Key passphrase`,type:`password`,secret:!0,advanced:!0},{key:`jumpVia`,label:`Jump via device`,type:`text`,advanced:!0,help:`Name of another device to use as an SSH bastion.`},{key:`mac`,label:`MAC address`,type:`text`,advanced:!0,help:`Set to reach the device over Layer-2 MAC-Telnet (no IP).`},{key:`sourceMac`,label:`Source MAC`,type:`text`,advanced:!0},{key:`macHost`,label:`MAC-Telnet host iface`,type:`text`,advanced:!0},{key:`macPort`,label:`MAC-Telnet port`,type:`number`,advanced:!0,placeholder:`20561`}],e7=[{id:`devices`,title:`Devices`,icon:`🖧`,kind:`deviceMap`,blurb:`MikroTik routers this server manages. Toggle a device off to hide it from the tools.`,fields:$5},{id:`mcp`,title:`MCP Server`,icon:`⚙️`,kind:`object`,path:`mcp`,blurb:`How the MCP server is exposed to the AI client.`,fields:[{key:`transport`,label:`Transport`,type:`select`,options:[`stdio`,`sse`,`streamable-http`]},{key:`host`,label:`Bind host`,type:`text`,placeholder:`0.0.0.0`},{key:`port`,label:`Bind port`,type:`number`,placeholder:`8000`},{key:`appViews`,label:`MCP App Views`,type:`bool`,help:`Expose rich App-view metadata to compatible clients.`},{key:`toolPageSize`,label:`Tool page size`,type:`number`,advanced:!0,help:`0 = no paging.`},{key:`allowedHosts`,label:`Allowed hosts`,type:`text`,advanced:!0,help:`Comma-separated.`},{key:`allowedOrigins`,label:`Allowed origins`,type:`text`,advanced:!0},{key:`corsOrigins`,label:`CORS origins`,type:`text`,advanced:!0}]},{id:`dashboard`,title:`Observability Dashboard`,icon:`📊`,kind:`object`,path:`dashboard`,enable:{key:`enabled`,label:`Dashboard`},blurb:`This web dashboard — records every tool call and serves the live UI.`,fields:[{key:`host`,label:`Bind host`,type:`text`,placeholder:`0.0.0.0`},{key:`port`,label:`Bind port`,type:`number`,placeholder:`9090`},{key:`token`,label:`Access token`,type:`password`,secret:!0,help:`Require this bearer token to view the dashboard.`},{key:`captureBody`,label:`Capture tool input/output`,type:`bool`},{key:`redactInput`,label:`Redact input bodies`,type:`bool`},{key:`dbPath`,label:`Database path`,type:`text`,advanced:!0},{key:`maxEvents`,label:`Max events kept`,type:`number`,advanced:!0},{key:`maxBodyBytes`,label:`Max body bytes`,type:`number`,advanced:!0}]},{id:`ssh`,title:`SSH Connection Pool`,icon:`🔌`,kind:`object`,path:`ssh`,enable:{key:`keepAlive`,label:`Keep-alive pooling`},blurb:`Reuse SSH connections across tool calls for lower latency.`,fields:[{key:`keepAliveInterval`,label:`Keep-alive interval (ms)`,type:`number`,placeholder:`10000`},{key:`idleTimeout`,label:`Idle timeout (ms)`,type:`number`,placeholder:`30000`}]},{id:`s3`,title:`S3 Backups`,icon:`☁️`,kind:`object`,path:`s3`,enable:{presence:!0,label:`S3 backups`},blurb:`Ship config backups to an S3-compatible bucket.`,fields:[{key:`bucket`,label:`Bucket`,type:`text`},{key:`region`,label:`Region`,type:`text`},{key:`endpoint`,label:`Endpoint`,type:`text`,placeholder:`https://s3.example.com`},{key:`accessKeyId`,label:`Access key ID`,type:`password`,secret:!0},{key:`secretAccessKey`,label:`Secret access key`,type:`password`,secret:!0},{key:`prefix`,label:`Key prefix`,type:`text`},{key:`sessionToken`,label:`Session token`,type:`password`,secret:!0,advanced:!0},{key:`presignExpiresIn`,label:`Presign expiry (s)`,type:`number`,advanced:!0,placeholder:`3600`}]},{id:`memory`,title:`Knowledge Memory`,icon:`🧠`,kind:`object`,path:`memory`,enable:{key:`enabled`,label:`Memory`},blurb:`Persistent knowledge graph the AI can read and write.`,fields:[{key:`dbPath`,label:`Database path`,type:`text`}]},{id:`modules`,title:`Tool Modules`,icon:`🧩`,kind:`modules`,blurb:`Curate which tool modules are exposed to the AI client.`,fields:[]},{id:`general`,title:`General`,icon:`🎛️`,kind:`object`,blurb:`Server-wide options.`,fields:[{key:`readOnly`,label:`Read-only mode`,type:`bool`,help:`Block all write/destructive tools.`},{key:`disableUpdateCheck`,label:`Disable update check`,type:`bool`},{key:`backupDir`,label:`Backup directory`,type:`text`,advanced:!0}]}];function t7({className:e,size:t=`default`,...n}){return(0,K.jsx)(B_,{"data-slot":`switch`,"data-size":t,className:Y(`peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80`,e),...n,children:(0,K.jsx)(H_,{"data-slot":`switch-thumb`,className:Y(`pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground`)})})}var n7=`«redacted»`,r7=e=>e&&typeof e==`object`&&!Array.isArray(e)?e:{},i7=e=>Array.isArray(e)?e:[],a7=e=>[...new Set(e)],o7=e=>e==null?``:typeof e==`object`?JSON.stringify(e):String(e);function s7(e,t){return t.path?r7(e[t.path]):e}function c7(e,t,n,r){if(t.path){let i={...r7(e[t.path])};return r===void 0||r===``?delete i[n]:i[n]=r,{...e,[t.path]:i}}let i={...e};return r===void 0||r===``?delete i[n]:i[n]=r,i}function l7(e,t){return t.enable?t.enable.presence?e[t.path??``]!==void 0:s7(e,t)[t.enable.key??`enabled`]!==!1:!0}function u7({field:e,value:t,onChange:n}){let r=`f_${e.key}`,i=e.type===`bool`,a;return a=e.type===`bool`?(0,K.jsx)(t7,{checked:t===!0,onCheckedChange:n}):e.type===`select`?(0,K.jsx)(Gb,{value:o7(t??e.options?.[0]??``),onValueChange:n,options:(e.options??[]).map(e=>({value:e,label:e}))}):e.type===`number`?(0,K.jsx)(Vb,{id:r,type:`number`,placeholder:e.placeholder,value:t==null?``:o7(t),onChange:e=>n(e.target.value===``?void 0:Number(e.target.value))}):(0,K.jsx)(Vb,{id:r,type:e.type===`password`?`password`:`text`,placeholder:e.secret&&t===n7?`•••• unchanged`:e.placeholder,value:t==null?``:o7(t),onChange:e=>n(e.target.value)}),(0,K.jsxs)(`div`,{className:Y(`flex min-w-0`,i?`flex-row items-center justify-between gap-2.5`:`flex-col gap-1.5`),children:[(0,K.jsxs)(zy,{htmlFor:r,className:`text-muted-foreground text-xs font-semibold`,children:[e.label,e.secret&&(0,K.jsx)(`span`,{className:`text-warning text-[10px] font-semibold tracking-[0.04em] uppercase`,children:`secret`})]}),a,e.help&&(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px] leading-[1.4]`,children:e.help})]})}function d7({fields:e,value:t,onField:n}){let[r,i]=(0,v.useState)(!1),a=e.filter(e=>!e.advanced),o=e.filter(e=>e.advanced);return(0,K.jsxs)(`div`,{className:`mt-1 grid grid-cols-[repeat(auto-fill,minmax(220px,1fr))] gap-x-4 gap-y-3`,children:[a.map(e=>(0,K.jsx)(u7,{field:e,value:t[e.key],onChange:t=>n(e.key,t)},e.key)),o.length>0&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground col-span-full flex cursor-pointer items-center gap-1 border-0 bg-transparent py-1 text-left text-xs font-semibold`,onClick:()=>i(e=>!e),children:[r?(0,K.jsx)(Ac,{className:`size-3`}):(0,K.jsx)(jc,{className:`size-3`}),` `,`Advanced (`,o.length,`)`]}),r&&o.map(e=>(0,K.jsx)(u7,{field:e,value:t[e.key],onChange:t=>n(e.key,t)},e.key))]})]})}var f7={prefix:``,presignExpiresIn:3600};function p7(e,t){let n=s7(e,t),r=e=>n[e]!=null&&n[e]!==``?o7(n[e]):``,i=r(`host`)?`${r(`host`)}:${r(`port`)}`:``;return t.id===`mcp`?[r(`transport`),i].filter(Boolean).join(` · `):t.id===`dashboard`?[i,n.token?`token set`:`open`].filter(Boolean).join(` · `):t.id===`ssh`?`interval ${r(`keepAliveInterval`)||`?`}ms · idle ${r(`idleTimeout`)||`?`}ms`:t.id===`s3`?l7(e,t)?[r(`bucket`),r(`region`),r(`endpoint`)].filter(Boolean).join(` · `)||`not configured`:``:t.id===`memory`?r(`dbPath`):t.id===`general`?`${e.readOnly?`read-only`:`read-write`}${e.disableUpdateCheck?` · no update check`:``}`:``}function m7({cfg:e,onChange:t,section:n}){let[r,i]=(0,v.useState)(!1),a=(0,v.useRef)(null),o=l7(e,n),s=r=>{if(n.enable?.presence){if(r)t({...e,[n.path]:a.current??(n.id===`s3`?f7:{})});else{a.current=r7(e[n.path]);let r={...e};delete r[n.path],t(r),i(!1)}return}t(c7(e,n,n.enable.key??`enabled`,r))},c=p7(e,n);return(0,K.jsxs)(Kb,{className:Y(`px-4 py-3.5 transition-opacity`,!o&&`opacity-50`),children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2.5`,children:[(0,K.jsx)(`span`,{className:`text-lg leading-none`,"aria-hidden":`true`,children:n.icon}),(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsxs)(`div`,{className:`text-foreground flex items-center gap-2 text-sm font-bold`,children:[n.title,n.enable&&(0,K.jsx)(Lb,{type:o?`success`:`secondary`,children:o?`active`:`off`})]}),(0,K.jsx)(`div`,{className:`text-muted-foreground mt-0.5 max-w-[520px] truncate font-mono text-xs`,children:c||n.blurb})]}),(0,K.jsx)(`span`,{className:`flex-1`}),n.enable&&(0,K.jsx)(t7,{checked:o,onCheckedChange:s,title:`${o?`Deactivate`:`Activate`} ${n.enable.label??n.title}`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>i(!0),disabled:n.enable?.presence&&!o,children:`Edit`})]}),r&&(0,K.jsxs)(Q5,{title:`${n.icon} ${n.title}`,subtitle:n.blurb,onClose:()=>i(!1),children:[n.enable&&(0,K.jsxs)(`label`,{className:`border-border bg-muted text-foreground flex items-center gap-2.5 rounded-md border px-3 py-2.5 text-[13px] font-semibold`,children:[(0,K.jsx)(t7,{checked:o,onCheckedChange:s}),o?`Active`:`Inactive — enable ${n.enable.label??n.title}`]}),o?(0,K.jsx)(d7,{fields:n.fields,value:s7(e,n),onField:(r,i)=>t(c7(e,n,r,i))}):(0,K.jsx)(Pb,{type:`secondary`,label:!1,children:`This section is turned off. Toggle it on to edit its settings.`})]})]})}function h7({cfg:e,onChange:t,name:n,isNew:r,onClose:i}){let[a,o]=(0,v.useState)(n),s=r7(e.devices),c=r7(s[n]);return(0,K.jsxs)(Q5,{title:r?`Add device`:`Device · ${n}`,subtitle:r?`New MikroTik router`:void 0,onClose:i,footer:(0,K.jsx)(X,{type:`success`,size:`sm`,onClick:i,children:`Done`}),children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,K.jsx)(zy,{htmlFor:`dev_name`,className:`text-muted-foreground text-xs font-semibold`,children:`Name`}),(0,K.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,K.jsx)(Vb,{id:`dev_name`,value:a,onChange:e=>o(e.target.value),placeholder:`core-router`}),!r&&a.trim()!==n&&(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>{let r=a.trim();if(!r||r===n||s[r])return;let o={...s,[r]:c};delete o[n],t({...e,devices:o}),i()},children:`Rename`})]})]}),(0,K.jsx)(d7,{fields:$5,value:c,onField:(r,i)=>{let a={...c};i===void 0||i===``?delete a[r]:a[r]=i,t({...e,devices:{...s,[n]:a}})}})]})}function g7({cfg:e,onChange:t}){let[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),o=r7(e.devices),s=Object.keys(o),c=o7(e.defaultDevice),l=()=>{let n=`device`,i=1,a=n;for(;o[a];)a=`${n}-${++i}`;t({...e,devices:{...o,[a]:{host:`192.168.88.1`,port:22,username:`admin`,password:``,timeoutMs:1e4}}}),r({name:a,isNew:!0})},u=(n,r)=>{t({...e,devices:{...o,[n]:{...r7(o[n]),disabled:r}}})},d=n=>{let r={...o};delete r[n];let i={...e,devices:r};c===n&&(i.defaultDevice=Object.keys(r)[0]??``),t(i),a(null)};return(0,K.jsxs)(Kb,{className:`px-4 py-3.5`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2.5`,children:[(0,K.jsx)(`span`,{className:`text-lg leading-none`,"aria-hidden":`true`,children:`🖧`}),(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsx)(`div`,{className:`text-foreground flex items-center gap-2 text-sm font-bold`,children:`Devices`}),(0,K.jsxs)(`div`,{className:`text-muted-foreground mt-0.5 max-w-[520px] truncate font-mono text-xs`,children:[s.length,` device`,s.length===1?``:`s`,` · default: `,c||`—`]})]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsxs)(`label`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`Default`}),(0,K.jsx)(Gb,{value:c,onValueChange:n=>t({...e,defaultDevice:n}),options:s.map(e=>({value:e,label:e}))})]}),(0,K.jsx)(X,{size:`sm`,onClick:l,icon:(0,K.jsx)(Jc,{className:`size-4`}),children:`Add device`})]}),(0,K.jsxs)(`div`,{className:`mt-3 grid grid-cols-[repeat(auto-fill,minmax(240px,1fr))] gap-3`,children:[s.map(e=>{let t=r7(o[e]),n=t.disabled===!0,s=t.mac?o7(t.mac):`${o7(t.host)||`?`}:${o7(t.port)||`22`}`;return(0,K.jsxs)(`div`,{className:Y(`border-border bg-card hover:border-brand/40 flex flex-col gap-1.5 rounded-lg border px-[15px] py-3.5 transition-colors`,n&&`opacity-50 grayscale-[0.4]`),children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`span`,{className:Y(`inline-block size-2 shrink-0 rounded-full`,n?`bg-muted-foreground/60`:`bg-success`)}),(0,K.jsx)(`span`,{className:`font-mono text-[13px] font-medium`,children:e}),c===e&&(0,K.jsx)(Lb,{type:`accent`,children:`default`}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(t7,{checked:!n,onCheckedChange:t=>u(e,!t),title:n?`Enable device`:`Disable device`})]}),(0,K.jsx)(`div`,{className:`text-muted-foreground font-mono text-[11px] break-words`,children:s}),t.description?(0,K.jsx)(`div`,{className:`text-muted-foreground font-mono text-[11px] break-words`,children:o7(t.description)}):null,(0,K.jsxs)(`div`,{className:`mt-auto flex gap-1.5 pt-1`,children:[(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>r({name:e,isNew:!1}),children:`Edit`}),i===e?(0,K.jsx)(X,{size:`sm`,type:`error`,onClick:()=>d(e),children:`Confirm?`}):(0,K.jsx)(X,{size:`sm`,ghost:!0,type:`error`,onClick:()=>a(e),children:`Remove`})]})]},e)}),s.length===0&&(0,K.jsxs)(Pb,{type:`secondary`,label:!1,children:[`No devices yet. Click `,(0,K.jsx)(`b`,{children:`Add device`}),` to configure your first router.`]})]}),n&&(0,K.jsx)(h7,{cfg:e,onChange:t,name:n.name,isNew:n.isNew,onClose:()=>r(null)})]})}function _7(e,t){let n=i7(e.disabledModules),r=i7(e.disabledGroups),i=i7(e.enabledModules),a=i7(e.enabledGroups);return n.includes(t.slug)||r.includes(t.group)?!1:i.length===0&&a.length===0?!0:i.includes(t.slug)||a.includes(t.group)}function v7({cfg:e,onChange:t}){let[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(``);(0,v.useEffect)(()=>{mc(`/api/modules`).then(e=>r(e.modules)).catch(()=>r([]))},[]);let o=r7(e.tools),s=(n,r)=>{let i=new Set(i7(o.enabledModules)),a=new Set(i7(o.disabledModules));r?(a.delete(n.slug),(i7(o.enabledModules).length>0||i7(o.enabledGroups).length>0)&&i.add(n.slug)):(i.delete(n.slug),a.add(n.slug)),t({...e,tools:{...o,enabledModules:a7([...i]),disabledModules:a7([...a])}})},c=(n??[]).filter(e=>{if(!i)return!0;let t=i.toLowerCase();return e.label.toLowerCase().includes(t)||e.slug.toLowerCase().includes(t)||e.group.toLowerCase().includes(t)}),l=new Map;for(let e of c)l.set(e.group,[...l.get(e.group)??[],e]);let u=(n??[]).filter(e=>_7(o,e)).length;return(0,K.jsxs)(Kb,{className:`px-4 py-3.5`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2.5`,children:[(0,K.jsx)(`span`,{className:`text-lg leading-none`,"aria-hidden":`true`,children:`🧩`}),(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsx)(`div`,{className:`text-foreground flex items-center gap-2 text-sm font-bold`,children:`Tool Modules`}),(0,K.jsxs)(`div`,{className:`text-muted-foreground mt-0.5 max-w-[520px] truncate font-mono text-xs`,children:[n?`${u}/${n.length} modules enabled`:`loading…`,` · applied on Save`]})]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(Vb,{placeholder:`Filter modules…`,value:i,onChange:e=>a(e.target.value),className:`max-w-[190px]`}),(0,K.jsxs)(`label`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(t7,{checked:r7(e.mcp).appViews===!0,onCheckedChange:n=>t({...e,mcp:{...r7(e.mcp),appViews:n}}),title:`MCP App Views`}),(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`App Views`})]})]}),(0,K.jsxs)(`div`,{className:`mt-3 grid max-h-[440px] gap-[18px] overflow-auto`,children:[[...l.entries()].map(([e,t])=>(0,K.jsxs)(`div`,{className:`grid gap-2`,children:[(0,K.jsx)(`div`,{className:`text-muted-foreground mt-2 mb-0.5 font-bold text-[11px] tracking-[0.05em] uppercase`,children:e}),t.map(e=>{let t=_7(o,e);return(0,K.jsxs)(`label`,{className:Y(`bg-muted hover:border-brand/40 flex cursor-pointer items-start gap-2.5 rounded-md border px-[11px] py-[9px] transition-colors select-none`,t?`border-brand/50 bg-brand/10`:`border-border`),title:e.description,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:t,onChange:()=>s(e,!t),className:`accent-brand mt-0.5 cursor-pointer`}),(0,K.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,K.jsxs)(`span`,{className:`text-foreground flex flex-wrap items-center gap-[7px] text-xs font-semibold`,children:[e.label,(0,K.jsx)(`code`,{className:`text-muted-foreground bg-background border-border rounded border px-1.5 py-px font-mono text-[10px]`,children:e.slug})]}),(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px] leading-[1.35]`,children:e.description})]}),(0,K.jsxs)(`span`,{className:`text-muted-foreground pt-px font-mono text-[10px] whitespace-nowrap`,children:[e.toolCount,` tool`,e.toolCount===1?``:`s`]})]},e.slug)})]},e)),n&&c.length===0&&(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[`No modules match “`,i,`”.`]})]})]})}function y7({cfg:e,onChange:t}){return(0,K.jsx)(`div`,{className:`mt-1 grid gap-3.5`,children:e7.map(n=>n.kind===`deviceMap`?(0,K.jsx)(g7,{cfg:e,onChange:t},n.id):n.kind===`modules`?(0,K.jsx)(v7,{cfg:e,onChange:t},n.id):(0,K.jsx)(m7,{cfg:e,onChange:t,section:n},n.id))})}var b7=/("(?:\\.|[^"\\])*"(?:\s*:)?)|\b(true|false|null)\b|(-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)/g;function x7(e){let t=[],n=0,r=0;for(let i of e.matchAll(b7)){let a=i.index??0;a>n&&t.push(e.slice(n,a));let o=i[0],s;s=i[1]===void 0?i[2]===void 0?`text-chart-1`:`text-warning`:/:\s*$/.test(o)?`text-foreground`:`text-success`,t.push((0,K.jsx)(`span`,{className:s,children:o},r++)),n=a+o.length}return n<e.length&&t.push(e.slice(n)),t}var S7=new RegExp([/(;;;[^\n]*)/,/("(?:\\.|[^"\\])*")/,/([0-9A-Fa-f]{2}(?::[0-9A-Fa-f]{2}){5})/,/(\d{1,3}(?:\.\d{1,3}){3}(?:\/\d{1,2})?)/,/([A-Za-z.][\w.-]*)(?==)/,/\b(running|enabled|active|connected|established|reachable|bound|authorized|ok|up)\b/,/\b(disabled|invalid|inactive|stopped|unreachable|timeout|failure|failed|error|rejected|expired|down)\b/,/\b(yes|no|true|false)\b/,/\b(dynamic|slave|builtin|default|passthrough|complete)\b/,/(-?\d+(?:\.\d+)?)/].map(e=>e.source).join(`|`),`gi`);function C7(e){let t=[],n=0,r=0;for(let i of e.matchAll(S7)){let a=i.index??0;a>n&&t.push(e.slice(n,a));let o=i[0],s=`text-chart-1`;i[1]===void 0?i[2]===void 0?i[3]===void 0?i[4]===void 0?i[5]===void 0?i[6]===void 0?i[7]===void 0?i[8]===void 0?i[9]!==void 0&&(s=`text-muted-foreground`):s=`text-warning`:s=`text-destructive font-medium`:s=`text-success font-medium`:s=`text-foreground`:s=`text-chart-2`:s=`text-chart-5`:s=`text-success`:s=`text-muted-foreground italic`,t.push((0,K.jsx)(`span`,{className:s,children:o},r++)),n=a+o.length}return n<e.length&&t.push(e.slice(n)),t}var w7=`mt-pretty-input`;function T7(){try{return localStorage.getItem(w7)!==`0`}catch{return!0}}function E7(e){try{localStorage.setItem(w7,e?`1`:`0`)}catch{}}function D7(e,t){if(!t)return e;try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function O7({value:e,maxHeight:t}){let n=typeof e==`string`?e:JSON.stringify(e,null,2);return(0,K.jsx)(`pre`,{className:`m-0 max-h-[40vh] overflow-auto rounded border border-border bg-background p-3 font-mono text-xs break-words whitespace-pre-wrap text-muted-foreground`,style:t?{maxHeight:t}:void 0,children:x7(n)})}function k7(e){let t=new Set,n=new Set,r=e=>{if(!e||typeof e!=`object`)return;let i=e;if(i.properties&&typeof i.properties==`object`)for(let e of Object.keys(i.properties))t.add(e),r(i.properties[e]);if(Array.isArray(i.enum))for(let e of i.enum)typeof e==`string`&&n.add(e);for(let e of[`items`,`additionalProperties`,`anyOf`,`oneOf`,`allOf`]){let t=i[e];Array.isArray(t)?t.forEach(r):t&&typeof t==`object`&&r(t)}for(let e of[`$defs`,`definitions`,`patternProperties`]){let t=i[e];if(t&&typeof t==`object`)for(let e of Object.values(t))r(e)}};return r(e),{keys:[...t].sort(),enums:[...n.add(`true`).add(`false`)].sort()}}function A7(e,t){let n=t;for(;n>0&&/[A-Za-z0-9_.-]/.test(e[n-1]);)n--;let r=e.slice(n,t),i=n-1;for(;i>=0&&/\s/.test(e[i]);)i--;return{word:r,start:n,isValue:e[i]===`:`}}var j7=[[`revert in 30s`,3e4],[`revert in 60s`,6e4],[`revert in 2m`,12e4],[`no auto-revert`,0]];function M7({value:e,onChange:t,onJsonError:n}){let[r,i]=(0,v.useState)(()=>JSON.stringify(e,null,2)),[a,o]=(0,v.useState)({keys:[],enums:[]}),[s,c]=(0,v.useState)(null),l=(0,v.useRef)(null),u=(0,v.useRef)(null),d=(0,v.useRef)(null),f=(0,v.useRef)(null);(0,v.useEffect)(()=>{mc(`/api/config-schema`).then(e=>o(k7(e))).catch(()=>{})},[]),(0,v.useEffect)(()=>{u.current!=null&&l.current&&(l.current.selectionStart=l.current.selectionEnd=u.current,u.current=null)});let p=(0,v.useRef)(t),m=(0,v.useRef)(n);p.current=t,m.current=n,(0,v.useEffect)(()=>{let e=setTimeout(()=>{try{let e=JSON.parse(r);m.current?.(null),p.current(e)}catch(e){m.current?.(e instanceof Error?e.message:String(e))}},300);return()=>clearTimeout(e)},[r]);let h=e=>{let{word:t,start:n,isValue:r}=A7(e.value,e.selectionStart);if(t.length<1){c(null);return}let i=(r?a.enums:a.keys).filter(e=>e.startsWith(t)&&e!==t).slice(0,8);if(!i.length){c(null);return}let o=e.value.slice(0,e.selectionStart).split(`
139
+ `)}}):null}var m5=yJ;function h5({active:e,payload:t,className:n,indicator:r=`dot`,hideLabel:i=!1,hideIndicator:a=!1,label:o,labelFormatter:s,labelClassName:c,formatter:l,color:u,nameKey:d,labelKey:f}){let{config:p}=d5(),m=v.useMemo(()=>{if(i||!t?.length)return null;let[e]=t,n=`${f??e?.dataKey??e?.name??`value`}`,r=g5(p,e,n),a=!f&&typeof o==`string`?p[o]?.label??o:r?.label;return s?(0,K.jsx)(`div`,{className:Y(`font-medium`,c),children:s(a,t)}):a?(0,K.jsx)(`div`,{className:Y(`font-medium`,c),children:a}):null},[o,s,t,i,c,p,f]);if(!e||!t?.length)return null;let h=t.length===1&&r!==`dot`;return(0,K.jsxs)(`div`,{className:Y(`grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl`,n),children:[h?null:m,(0,K.jsx)(`div`,{className:`grid gap-1.5`,children:t.filter(e=>e.type!==`none`).map((e,t)=>{let n=`${d??e.name??e.dataKey??`value`}`,i=g5(p,e,n),o=u??e.payload?.fill??e.color;return(0,K.jsx)(`div`,{className:Y(`flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground`,r===`dot`&&`items-center`),children:l&&e?.value!==void 0&&e.name?l(e.value,e.name,e,t,e.payload):(0,K.jsxs)(K.Fragment,{children:[i?.icon?(0,K.jsx)(i.icon,{}):!a&&(0,K.jsx)(`div`,{className:Y(`shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)`,{"h-2.5 w-2.5":r===`dot`,"w-1":r===`line`,"w-0 border-[1.5px] border-dashed bg-transparent":r===`dashed`,"my-0.5":h&&r===`dashed`}),style:{"--color-bg":o,"--color-border":o}}),(0,K.jsxs)(`div`,{className:Y(`flex flex-1 justify-between leading-none`,h?`items-end`:`items-center`),children:[(0,K.jsxs)(`div`,{className:`grid gap-1.5`,children:[h?m:null,(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:i?.label??e.name})]}),e.value!=null&&(0,K.jsx)(`span`,{className:`font-mono font-medium text-foreground tabular-nums`,children:typeof e.value==`number`?e.value.toLocaleString():String(e.value)})]})]})},t)})})]})}function g5(e,t,n){if(typeof t!=`object`||!t)return;let r=`payload`in t&&typeof t.payload==`object`&&t.payload!==null?t.payload:void 0,i=n;return n in t&&typeof t[n]==`string`?i=t[n]:r&&n in r&&typeof r[n]==`string`&&(i=r[n]),i in e?e[i]:e[n]}var _5=e=>new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,hour12:!1}),v5={ok:{label:`ok`,color:`var(--chart-1)`},error:{label:`error`,color:`var(--destructive)`}};function y5({series:e}){return(0,K.jsx)(f5,{config:v5,className:`h-[200px] w-full`,children:(0,K.jsxs)($8,{data:e,margin:{top:8,right:8,left:-18,bottom:0},children:[(0,K.jsxs)(`defs`,{children:[(0,K.jsxs)(`linearGradient`,{id:`fillOk`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,K.jsx)(`stop`,{offset:`0%`,stopColor:`var(--color-ok)`,stopOpacity:.5}),(0,K.jsx)(`stop`,{offset:`100%`,stopColor:`var(--color-ok)`,stopOpacity:.04})]}),(0,K.jsxs)(`linearGradient`,{id:`fillErr`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,K.jsx)(`stop`,{offset:`0%`,stopColor:`var(--color-error)`,stopOpacity:.55}),(0,K.jsx)(`stop`,{offset:`100%`,stopColor:`var(--color-error)`,stopOpacity:.05})]})]}),(0,K.jsx)(s4,{vertical:!1,strokeDasharray:`3 3`}),(0,K.jsx)(E3,{dataKey:`t`,tickFormatter:_5,tick:{fontSize:10},tickLine:!1,axisLine:!1,minTickGap:48}),(0,K.jsx)(V3,{tick:{fontSize:10},tickLine:!1,axisLine:!1,width:34,allowDecimals:!1}),(0,K.jsx)(m5,{content:(0,K.jsx)(h5,{labelFormatter:(e,t)=>{let n=t?.[0]?.payload?.t;return typeof n==`number`?_5(n):``}})}),(0,K.jsx)(a3,{type:`monotone`,dataKey:`ok`,name:`ok`,stackId:`1`,stroke:`var(--color-ok)`,fill:`url(#fillOk)`,strokeWidth:2,isAnimationActive:!1}),(0,K.jsx)(a3,{type:`monotone`,dataKey:`error`,name:`error`,stackId:`1`,stroke:`var(--color-error)`,fill:`url(#fillErr)`,strokeWidth:2,isAnimationActive:!1})]})})}function b5({segments:e,centerLabel:t=`calls`}){let n=e.filter(e=>e.value>0),r=e.reduce((e,t)=>e+t.value,0);return(0,K.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-3`,children:[(0,K.jsx)(f5,{config:Object.fromEntries(n.map(e=>[e.label,{label:e.label,color:e.color}])),className:`mx-auto aspect-square w-full max-w-[180px]`,children:(0,K.jsxs)(Z8,{children:[(0,K.jsx)(m5,{content:(0,K.jsx)(h5,{hideLabel:!0})}),(0,K.jsx)(j$,{data:n,dataKey:`value`,nameKey:`label`,innerRadius:58,outerRadius:80,paddingAngle:2,strokeWidth:0,isAnimationActive:!1,children:n.map(e=>(0,K.jsx)(bJ,{fill:e.color},e.label))}),(0,K.jsx)(`text`,{x:`50%`,y:`47%`,textAnchor:`middle`,className:`fill-foreground`,fontSize:22,fontWeight:600,children:r.toLocaleString()}),(0,K.jsx)(`text`,{x:`50%`,y:`59%`,textAnchor:`middle`,className:`fill-muted-foreground`,fontSize:10,children:t})]})}),(0,K.jsx)(`div`,{className:`flex flex-wrap justify-center gap-x-3.5 gap-y-1.5 text-[11px] text-muted-foreground`,children:n.map(e=>(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(`i`,{className:`size-[9px] rounded-[3px]`,style:{background:e.color}}),e.label,` `,(0,K.jsx)(`b`,{className:`font-medium text-foreground`,children:e.value})]},e.label))})]})}function x5({values:e,color:t,unit:n,maxValue:r,id:i}){let a=e.filter(e=>e!=null);if(a.length===0)return(0,K.jsx)(`div`,{className:`px-1.5 py-3 text-center text-[11px] text-muted-foreground`,children:`no samples yet`});let o=e.map((e,t)=>({i:t,v:e})),s=a[a.length-1],c=`ma-${(i??t).replace(/[^a-z0-9]/gi,``)}`,l={v:{label:`value`,color:t}},u=Math.min(...a),d=Math.max(...a),f=Math.max(0,(n===`%`?10:0)-(d-u))/2,p=u-f,m=d+f,h=(m-p)*.15||1;return p=Math.max(0,p-h),m+=h,r!=null&&(m=Math.min(r,m)),m<=p&&(m=p+1),(0,K.jsxs)(`div`,{className:`relative w-full`,children:[(0,K.jsxs)(`span`,{className:`absolute right-0.5 top-0 z-10 text-[10px] font-semibold`,style:{color:t},children:[s.toFixed(n===`%`?0:1),n??``]}),(0,K.jsx)(f5,{config:l,className:`h-[46px] w-full`,children:(0,K.jsxs)($8,{data:o,margin:{top:4,right:2,left:2,bottom:0},children:[(0,K.jsx)(`defs`,{children:(0,K.jsxs)(`linearGradient`,{id:c,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,K.jsx)(`stop`,{offset:`0%`,stopColor:`var(--color-v)`,stopOpacity:.35}),(0,K.jsx)(`stop`,{offset:`100%`,stopColor:`var(--color-v)`,stopOpacity:0})]})}),(0,K.jsx)(V3,{hide:!0,domain:[p,m]}),(0,K.jsx)(m5,{content:(0,K.jsx)(h5,{hideLabel:!0,formatter:e=>(0,K.jsxs)(`span`,{className:`font-mono tabular-nums text-foreground`,children:[typeof e==`number`?e.toLocaleString():String(e),n??``]})})}),(0,K.jsx)(a3,{type:`monotone`,dataKey:`v`,stroke:`var(--color-v)`,fill:`url(#${c})`,strokeWidth:1.7,connectNulls:!1,isAnimationActive:!1,dot:!1})]})})]})}function S5({value:e,label:t,color:n}){let r=e!=null,i=r?Math.max(0,Math.min(100,e)):0;return(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-0.5`,children:[(0,K.jsxs)(`div`,{className:`relative grid size-[72px] place-items-center`,children:[(0,K.jsx)(f5,{config:{value:{label:t,color:n}},className:`size-[72px]`,children:(0,K.jsxs)(s5,{data:[{name:t,value:i,fill:n}],innerRadius:`72%`,outerRadius:`100%`,startAngle:90,endAngle:-270,barSize:7,children:[(0,K.jsx)(DZ,{type:`number`,domain:[0,100],tick:!1,axisLine:!1}),(0,K.jsx)(A0,{dataKey:`value`,cornerRadius:4,background:{fill:`var(--muted)`},isAnimationActive:!1})]})}),(0,K.jsx)(`span`,{className:`pointer-events-none absolute inset-0 grid place-items-center text-[13px] font-bold`,style:{color:r?`var(--foreground)`:`var(--muted-foreground)`},children:r?`${Math.round(i)}%`:`n/a`})]}),(0,K.jsx)(`span`,{className:`text-[10px] tracking-[0.06em] text-muted-foreground`,children:t})]})}var C5=40,w5=30,T5=1e3,E5=`http://www.w3.org/2000/svg`,D5=e=>`${(e/1e6).toFixed(2)} Mbps`,O5=e=>e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(0)}k`:e>0?`${Math.round(e)}`:`0`;function k5({history:e}){let t=Math.max(1,...e.flatMap(e=>[e.rx,e.tx])),n=e=>8+e*504/Math.max(1,C5-1),r=e=>142-e/t*134,i=t=>e.map((e,i)=>`${n(i).toFixed(1)},${r(t(e)).toFixed(1)}`).join(` `),a=t=>{if(e.length<2)return``;let r=n(0).toFixed(1),a=n(e.length-1).toFixed(1);return`${r},${142 .toFixed(1)} ${i(t)} ${a},${142 .toFixed(1)}`};return(0,K.jsx)(`svg`,{className:`block h-[150px] w-full max-w-[520px] rounded-md border border-border bg-background`,viewBox:`0 0 520 150`,xmlns:E5,role:`img`,children:e.length>=2&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`polygon`,{className:`fill-success/20 stroke-none`,points:a(e=>e.rx)}),(0,K.jsx)(`polygon`,{className:`fill-warning/15 stroke-none`,points:a(e=>e.tx)}),(0,K.jsx)(`polyline`,{className:`fill-none stroke-success stroke-2`,points:i(e=>e.rx)}),(0,K.jsx)(`polyline`,{className:`fill-none stroke-warning stroke-2`,points:i(e=>e.tx)})]})})}function A5({history:e}){let t=`block h-[18px] w-20 shrink-0 rounded-[3px] bg-muted/40`;if(e.length<2)return(0,K.jsx)(`svg`,{className:t,viewBox:`0 0 80 18`});let n=Math.max(1,...e.flatMap(e=>[e.rx,e.tx])),r=e=>1+e*78/Math.max(1,w5-1),i=e=>17-e/n*16,a=t=>e.map((e,n)=>`${r(n).toFixed(1)},${i(t(e)).toFixed(1)}`).join(` `),o=t=>{let n=r(0).toFixed(1),i=r(e.length-1).toFixed(1),o=17 .toFixed(1);return`${n},${o} ${a(t)} ${i},${o}`};return(0,K.jsxs)(`svg`,{className:t,viewBox:`0 0 80 18`,xmlns:E5,children:[(0,K.jsx)(`polygon`,{className:`fill-success/20 stroke-none`,points:o(e=>e.rx)}),(0,K.jsx)(`polygon`,{className:`fill-warning/15 stroke-none`,points:o(e=>e.tx)}),(0,K.jsx)(`polyline`,{className:`fill-none stroke-success stroke-1`,vectorEffect:`non-scaling-stroke`,points:a(e=>e.rx)}),(0,K.jsx)(`polyline`,{className:`fill-none stroke-warning stroke-1`,vectorEffect:`non-scaling-stroke`,points:a(e=>e.tx)})]})}function j5({ip:e,deviceName:t,current:n,onSaved:r}){let[i,a]=(0,v.useState)(n.download),[o,s]=(0,v.useState)(n.upload),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(!1),[f,p]=(0,v.useState)(null);(0,v.useEffect)(()=>{c||(a(n.download),s(n.upload))},[n.download,n.upload,c]);let m=(0,v.useCallback)(async(n,i)=>{d(!0),p(null);try{let a=await hc(`/api/clients/limits`,{ip:e,device:t,download:n,upload:i});p(a.message),a.ok&&(l(!1),r())}catch(e){p(e instanceof Error?e.message:String(e))}finally{d(!1)}},[e,t,r]),h=!!(n.download||n.upload);return(0,K.jsxs)(`div`,{className:`mt-3.5 max-w-[520px] border-t border-border pt-3`,children:[(0,K.jsxs)(`div`,{className:`mb-2 flex items-baseline gap-3`,children:[(0,K.jsx)(`span`,{className:`text-[13px] font-semibold`,children:`Rate limits`}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[`current: ↓ `,n.download||`unlimited`,` · ↑ `,n.upload||`unlimited`]})]}),(0,K.jsxs)(`div`,{className:`flex flex-wrap items-end gap-2`,children:[(0,K.jsxs)(`label`,{className:`flex flex-col gap-[3px] text-[11.5px]`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`↓ Download`}),(0,K.jsx)(Vb,{className:`w-[150px]`,placeholder:`10M · blank = unlimited`,value:i,onChange:e=>{l(!0),a(e.target.value)}})]}),(0,K.jsxs)(`label`,{className:`flex flex-col gap-[3px] text-[11.5px]`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`↑ Upload`}),(0,K.jsx)(Vb,{className:`w-[150px]`,placeholder:`2M · blank = unlimited`,value:o,onChange:e=>{l(!0),s(e.target.value)}})]}),(0,K.jsx)(X,{size:`sm`,type:`accent`,loading:u,onClick:()=>void m(i,o),children:`Apply`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,disabled:u||!h,onClick:()=>{a(``),s(``),m(``,``)},children:`Remove`})]}),f&&(0,K.jsx)(`div`,{className:`mt-1.5 text-muted-foreground text-xs`,children:f})]})}function M5({device:e,deviceName:t,traffic:n}){let r=n!==void 0;return(0,K.jsxs)(`div`,{className:`mt-3.5 border-t border-border pt-3.5`,children:[(0,K.jsxs)(`div`,{className:`mb-2.5 flex flex-wrap items-baseline gap-3`,children:[(0,K.jsx)(`span`,{className:`text-sm font-semibold`,children:e.host||e.comment||e.ip}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[e.ip||`no IP`,` · `,e.mac,` · `,e.iface||`?`,` · `,e.status]})]}),r?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`mb-2 flex gap-[18px] tabular-nums`,children:[(0,K.jsxs)(`span`,{className:`font-semibold text-success`,children:[`↓ `,D5(n.rxRate)]}),(0,K.jsxs)(`span`,{className:`font-semibold text-warning`,children:[`↑ `,D5(n.txRate)]})]}),(0,K.jsx)(k5,{history:n.history}),(0,K.jsxs)(`div`,{className:`mt-2 text-muted-foreground text-xs tabular-nums`,children:[`total ↓ `,db(n.rxBytes),` · ↑ `,db(n.txBytes)]})]}):(0,K.jsxs)(Pb,{type:`secondary`,label:`No traffic yet`,children:[`No traffic seen for `,(0,K.jsx)(`code`,{children:e.ip}),` yet. Rates appear here as soon as the device sends or receives.`]}),e.ip&&(0,K.jsx)(j5,{ip:e.ip,deviceName:t,current:{download:n?.downloadLimit??``,upload:n?.uploadLimit??``},onSaved:()=>{}}),e.ip&&(0,K.jsxs)(`div`,{className:`mt-4`,children:[(0,K.jsx)(`div`,{className:`mb-2 text-xs font-semibold text-muted-foreground`,children:`Usage history · last 3 months`}),(0,K.jsx)(ix,{endpoint:`/api/usage/client?ip=${encodeURIComponent(e.ip)}${t?`&device=${encodeURIComponent(t)}`:``}&days=90`,days:90})]})]})}var N5={map:new Map,source:`accounting`};function P5(e,t){let n=new Set([...e.map.keys(),...Object.keys(t.hosts),...Object.keys(t.limits)]),r=new Map;for(let i of n){let n=t.hosts[i],a=n?.rxRate??0,o=n?.txRate??0,s=e.map.get(i),c=[...s?.history??[],{rx:a,tx:o}].slice(-30),l=t.limits[i];!l&&!c.some(e=>e.rx>0||e.tx>0)||r.set(i,{rxRate:a,txRate:o,rxBytes:n?.rxBytes??s?.rxBytes??0,txBytes:n?.txBytes??s?.txBytes??0,downloadLimit:l?.download??``,uploadLimit:l?.upload??``,history:c})}return{map:r,source:t.source,note:t.note}}function F5(e){let[t,n]=(0,v.useState)(N5);return(0,v.useEffect)(()=>{n(N5)},[e]),(0,v.useEffect)(()=>{if(!e)return;let t=!1,r=null,i=null,a=null,o=`traffic=${encodeURIComponent(e)}`,s=e=>{t||n(t=>P5(t,e))},c=()=>{if(t||a)return;let n=async()=>{try{s(await mc(`/api/clients/traffic-bulk?device=${encodeURIComponent(e)}`))}catch{}};n(),a=setInterval(()=>void n(),T5)},l=()=>{if(t)return;i=new EventSource(pc(`/api/sse?${o}`));let e=!1;i.onopen=()=>{e=!0},i.addEventListener(`traffic`,e=>{try{s(JSON.parse(e.data))}catch{}}),i.onerror=()=>{!e&&i&&(i.close(),i=null,c())}},u=()=>{if(t)return;let e=location.protocol===`https:`?`wss`:`ws`;r=new WebSocket(pc(`${e}://${location.host}/api/stream?${o}`));let n=!1;r.onopen=()=>{n=!0},r.onerror=()=>r?.close(),r.onmessage=e=>{try{let t=JSON.parse(e.data);t.type===`traffic`&&t.sample&&s(t.sample)}catch{}},r.onclose=()=>{t||(n?setTimeout(u,2e3):l())}};return u(),()=>{t=!0,r?.close(),i?.close(),a&&clearInterval(a)}},[e]),t}function I5(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)(``),[m,h]=(0,v.useState)(null),{map:g,source:_,note:y}=F5(n);(0,v.useEffect)(()=>{mc(`/api/devices`).then(e=>{t(e),r(t=>t||e.defaultDevice||e.devices[0]?.name||``)}).catch(()=>t({server:``,defaultDevice:``,devices:[]}))},[]);let b=(0,v.useCallback)(async()=>{try{let e=n?`?device=${encodeURIComponent(n)}`:``;a(await mc(`/api/clients${e}`)),d(null)}catch(e){d(e instanceof Error?e.message:String(e))}},[n]);(0,v.useEffect)(()=>{a(null),s(null),b();let e=setInterval(()=>void b(),15e3);return()=>clearInterval(e)},[b]);let x=(0,v.useCallback)(async(e,t,r)=>{l(t),d(null);try{let i=await hc(`/api/clients/${e}`,{mac:t,device:n,...r});i.view?a(i.view):await b(),i.ok||d(i.message)}catch(e){d(e instanceof Error?e.message:String(e))}finally{l(null)}},[n,b]),S=(0,v.useCallback)((e,t)=>{s(e.mac),h({mac:e.mac,field:t,value:t===`ip`?e.ip:e.comment||e.host})},[]),C=(0,v.useCallback)(async()=>{if(!m)return;let e=m.value.trim();m.field===`ip`?e&&await x(`set-ip`,m.mac,{ip:e}):await x(`label`,m.mac,{label:e}),h(null)},[m,x]),w=(0,v.useMemo)(()=>{let e=i?.devices??[],t=f.trim().toLowerCase();return t?e.filter(e=>e.ip.toLowerCase().includes(t)||e.mac.toLowerCase().includes(t)||e.host.toLowerCase().includes(t)||e.comment.toLowerCase().includes(t)):e},[i,f]),T=(0,v.useMemo)(()=>i?.devices.find(e=>e.mac===o)??null,[i,o]),E=e?.devices??[],D=i?.counts;return(0,K.jsx)(`section`,{className:`grid content-start gap-[18px]`,children:(0,K.jsxs)(tb,{title:`Connected clients`,className:`reveal`,extra:(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[E.length>1&&(0,K.jsx)(Gb,{value:n,onValueChange:r,"aria-label":`Router`,options:E.map(e=>({value:e.name,label:`${e.name}${e.isDefault?` (default)`:``}`}))}),(0,K.jsx)(Vb,{className:`w-[200px]`,placeholder:`Filter IP / MAC / name…`,value:f,onChange:e=>p(e.target.value)}),(0,K.jsx)(X,{size:`sm`,ghost:!0,icon:(0,K.jsx)(Zc,{}),onClick:()=>void b(),children:`Refresh`})]}),children:[D&&(0,K.jsxs)(`div`,{className:`mb-2.5 text-muted-foreground text-xs`,children:[D.total,` total · `,D.static,` static · `,D.blocked,` blocked`]}),u&&(0,K.jsx)(Pb,{type:`error`,className:`mb-2.5`,children:u}),_===`none`&&y&&(0,K.jsxs)(Pb,{type:`warning`,label:`Traffic unavailable`,className:`mb-2.5`,children:[y,` The Traffic column needs per-host counters — `,(0,K.jsx)(`code`,{children:`/ip accounting`}),` `,`on RouterOS v6, or Kid Control on v7.`]}),i?w.length===0?(0,K.jsxs)(`div`,{className:`grid justify-items-center gap-2 rounded-lg border border-dashed border-border px-4 py-[54px] text-center`,children:[(0,K.jsx)(sl,{className:`size-7 text-muted-foreground opacity-80`}),(0,K.jsx)(`p`,{className:`m-0 font-semibold text-foreground`,children:`No connected devices`}),(0,K.jsxs)(`p`,{className:`m-0 max-w-[460px] text-muted-foreground text-xs`,children:[`Nothing in this router's DHCP-lease or ARP table`,f?` matches the filter`:``,`.`]})]}):(0,K.jsxs)(By,{className:`text-[13px]`,children:[(0,K.jsx)(Vy,{children:(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Wy,{children:`IP`}),(0,K.jsx)(Wy,{children:`Name`}),(0,K.jsx)(Wy,{children:`MAC`}),(0,K.jsx)(Wy,{children:`Iface`}),(0,K.jsx)(Wy,{children:`Status`}),(0,K.jsx)(Wy,{children:`Traffic`}),(0,K.jsx)(Wy,{className:`text-right`,children:`Actions`})]})}),(0,K.jsx)(Hy,{children:w.map(e=>{let t=e.mac===o,n=c===e.mac,r=e.ip?g.get(e.ip):void 0,i=e.blocked&&`text-muted-foreground line-through`;return(0,K.jsxs)(Uy,{"data-state":t?`selected`:void 0,className:`cursor-pointer`,onClick:()=>s(t?null:e.mac),children:[(0,K.jsx)(Gy,{className:Y(`max-w-[120px] truncate`,i),children:e.ip||`—`}),(0,K.jsx)(Gy,{className:Y(`max-w-[200px] truncate`,i),children:e.host||e.comment||`(unknown)`}),(0,K.jsx)(Gy,{className:`font-mono text-[11.5px] text-muted-foreground`,children:e.mac}),(0,K.jsx)(Gy,{className:`text-muted-foreground text-[11px]`,children:e.iface||``}),(0,K.jsx)(Gy,{children:(0,K.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[e.static&&(0,K.jsx)(Lb,{type:`secondary`,children:`static`}),e.blocked?(0,K.jsx)(Lb,{type:`error`,children:`blocked`}):(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:e.status})]})}),(0,K.jsx)(Gy,{children:r?(0,K.jsxs)(`span`,{className:`flex items-center gap-1 overflow-hidden tabular-nums`,children:[(0,K.jsxs)(`span`,{className:`flex min-w-[48px] flex-col whitespace-nowrap leading-tight`,children:[(0,K.jsxs)(`span`,{className:`text-success`,children:[`↓`,O5(r.rxRate)]}),(0,K.jsxs)(`span`,{className:`text-warning`,children:[`↑`,O5(r.txRate)]})]}),(0,K.jsx)(A5,{history:r.history})]}):(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:e.ip?`—`:``})}),(0,K.jsx)(Gy,{onClick:e=>e.stopPropagation(),children:(0,K.jsxs)(`span`,{className:`flex justify-end gap-1.5`,children:[e.blocked?(0,K.jsx)(X,{size:`sm`,type:`success`,ghost:!0,loading:n,onClick:()=>void x(`allow`,e.mac),children:`Allow`}):(0,K.jsx)(X,{size:`sm`,type:`error`,ghost:!0,loading:n,onClick:()=>void x(`block`,e.mac),children:`Block`}),!e.static&&(0,K.jsx)(X,{size:`sm`,ghost:!0,loading:n,onClick:()=>void x(`pin`,e.mac),children:`Pin IP`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,disabled:n,onClick:()=>S(e,`ip`),children:`Set IP`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,disabled:n,onClick:()=>S(e,`label`),children:`Label`})]})})]},e.mac)})})]}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`loading connected devices…`}),m&&T?.mac===m.mac&&(0,K.jsxs)(`div`,{className:`mt-3.5 flex flex-wrap items-center gap-2 rounded-md border border-border bg-card px-3 py-2.5`,children:[(0,K.jsxs)(`span`,{className:`text-[13px] text-muted-foreground`,children:[m.field===`ip`?`Reserve IP for`:`Label for`,` `,(0,K.jsx)(`b`,{children:T.host||T.mac}),`:`]}),(0,K.jsx)(Vb,{className:`w-[220px]`,autoFocus:!0,value:m.value,placeholder:m.field===`ip`?`e.g. 192.168.88.50`:`e.g. Ali phone`,onChange:e=>h({...m,value:e.target.value}),onKeyDown:e=>{e.key===`Enter`&&C(),e.key===`Escape`&&h(null)}}),(0,K.jsx)(X,{size:`sm`,type:`accent`,loading:c===m.mac,onClick:()=>void C(),children:`Save`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>h(null),children:`Cancel`})]}),T&&(0,K.jsx)(M5,{device:T,deviceName:n,traffic:T.ip?g.get(T.ip):void 0})]})})}var L5=/("(?:\\.|[^"\\])*"(?:\s*:)?)|\b(true|false|null)\b|(-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)/g;function R5(e){let t=[],n=0,r=0;for(let i of e.matchAll(L5)){let a=i.index??0;a>n&&t.push(e.slice(n,a));let o=i[0],s;s=i[1]===void 0?i[2]===void 0?`text-chart-1`:`text-warning`:/:\s*$/.test(o)?`text-foreground`:`text-success`,t.push((0,K.jsx)(`span`,{className:s,children:o},r++)),n=a+o.length}return n<e.length&&t.push(e.slice(n)),t}var z5=new RegExp([/(;;;[^\n]*)/,/("(?:\\.|[^"\\])*")/,/([0-9A-Fa-f]{2}(?::[0-9A-Fa-f]{2}){5})/,/(\d{1,3}(?:\.\d{1,3}){3}(?:\/\d{1,2})?)/,/([A-Za-z.][\w.-]*)(?==)/,/\b(running|enabled|active|connected|established|reachable|bound|authorized|ok|up)\b/,/\b(disabled|invalid|inactive|stopped|unreachable|timeout|failure|failed|error|rejected|expired|down)\b/,/\b(yes|no|true|false)\b/,/\b(dynamic|slave|builtin|default|passthrough|complete)\b/,/(-?\d+(?:\.\d+)?)/].map(e=>e.source).join(`|`),`gi`);function B5(e){let t=[],n=0,r=0;for(let i of e.matchAll(z5)){let a=i.index??0;a>n&&t.push(e.slice(n,a));let o=i[0],s=`text-chart-1`;i[1]===void 0?i[2]===void 0?i[3]===void 0?i[4]===void 0?i[5]===void 0?i[6]===void 0?i[7]===void 0?i[8]===void 0?i[9]!==void 0&&(s=`text-muted-foreground`):s=`text-warning`:s=`text-destructive font-medium`:s=`text-success font-medium`:s=`text-foreground`:s=`text-chart-2`:s=`text-chart-5`:s=`text-success`:s=`text-muted-foreground italic`,t.push((0,K.jsx)(`span`,{className:s,children:o},r++)),n=a+o.length}return n<e.length&&t.push(e.slice(n)),t}var V5=`mt-pretty-input`;function H5(){try{return localStorage.getItem(V5)!==`0`}catch{return!0}}function U5(e){try{localStorage.setItem(V5,e?`1`:`0`)}catch{}}function W5(e,t){if(!t)return e;try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function G5({value:e,maxHeight:t}){let n=typeof e==`string`?e:JSON.stringify(e,null,2);return(0,K.jsx)(`pre`,{className:`m-0 max-h-[40vh] overflow-auto rounded border border-border bg-background p-3 font-mono text-xs break-words whitespace-pre-wrap text-muted-foreground`,style:t?{maxHeight:t}:void 0,children:R5(n)})}function K5(e){return e.startsWith(`+++`)||e.startsWith(`---`)?`file`:e.startsWith(`@@`)?`hunk`:e.startsWith(`+`)?`add`:e.startsWith(`-`)?`del`:`ctx`}var q5={add:`bg-success/10`,del:`bg-destructive/10`,hunk:`bg-muted/50`,file:``,ctx:``},J5={add:`text-success`,del:`text-destructive`,hunk:`text-brand`,file:`text-muted-foreground`,ctx:`text-muted-foreground/50`},Y5={add:`+`,del:`−`,ctx:``,hunk:``,file:``};function X5({unified:e,maxHeight:t}){let n=e.replace(/\n+$/,``).split(`
140
+ `);return(0,K.jsx)(`pre`,{className:`text-muted-foreground m-0 overflow-auto rounded border border-border bg-background py-2 font-mono text-[11px] leading-[1.6] break-words whitespace-pre-wrap`,style:t?{maxHeight:t}:void 0,children:n.map((e,t)=>{let n=K5(e),r=n===`hunk`||n===`file`,i=n===`add`||n===`del`||n===`ctx`?e.slice(1):e;return(0,K.jsxs)(`div`,{className:Y(`flex px-2`,q5[n]),children:[(0,K.jsx)(`span`,{className:Y(`w-3 shrink-0 select-none text-center`,J5[n]),children:Y5[n]}),(0,K.jsx)(`span`,{className:Y(`min-w-0 flex-1 break-words whitespace-pre-wrap`,r&&`text-muted-foreground/80`),children:r?e:R5(i)})]},t)})})}function Z5(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Q5(e){return new Date(e).toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`,hour12:!1})}function $5({onRestored:e}){let[t,n]=(0,v.useState)(null),[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(null),[p,m]=(0,v.useState)(null),h=(0,v.useCallback)(()=>{mc(`/api/config/history`).then(n).catch(()=>n({versions:[],bytes:0,retention:50}))},[]);(0,v.useEffect)(()=>h(),[h]);let g=(e,t)=>hc(e,t).catch(()=>({error:`request failed`})),_=async()=>{let e=(p??``).trim();m(null);let t=await g(`/api/config/history/checkpoint`,{label:e||void 0});i(t.ok?`Checkpoint saved${e?` · “${e}”`:``}`:`Failed: ${t.error}`),t.ok&&h()},y=async e=>{if(s===e){c(null),u(null);return}c(e),u(null);let t=await mc(`/api/config/history/diff?id=${encodeURIComponent(e)}`).catch(()=>null);u(t)},b=async t=>{f(null),o(!0);let n=await g(`/api/config/history/restore`,{id:t});o(!1),i(n.ok?`Restored ${t}${n.persisted===!1?` (applied live, not persisted)`:``}`:`Restore failed: ${n.error}`),n.ok&&(h(),e())},x=async e=>{let t=await g(`/api/config/history/delete`,{id:e});i(t.ok?`Version deleted`:`Failed: ${t.error}`),t.ok&&h()};return t?(0,K.jsxs)(K.Fragment,{children:[r&&(0,K.jsx)(`div`,{className:`text-muted-foreground font-mono text-xs`,children:r}),(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,style:{marginBottom:14},children:[p===null?(0,K.jsx)(X,{size:`sm`,type:`accent`,icon:(0,K.jsx)(nl,{className:`size-4`}),onClick:()=>m(``),children:`Save checkpoint`}):(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,K.jsx)(Vb,{className:`w-[min(48vw,380px)]`,autoFocus:!0,placeholder:`checkpoint name (e.g. pre-upgrade)`,value:p,onChange:e=>m(e.target.value),onKeyDown:e=>{e.key===`Enter`&&_(),e.key===`Escape`&&m(null)}}),(0,K.jsx)(X,{size:`sm`,type:`accent`,onClick:()=>void _(),children:`Save`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>m(null),children:`Cancel`})]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[t.versions.length,` versions · `,Z5(t.bytes),` · auto-keep `,t.retention]})]}),t.versions.length===0?(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`No versions yet — they appear here after each config change.`}):(0,K.jsx)(`ol`,{className:`m-0 grid list-none p-0 pl-1.5`,children:t.versions.map((e,t)=>{let n=e.drift.added+e.drift.removed;return(0,K.jsxs)(`li`,{className:`hover:bg-foreground/5 relative grid grid-cols-[24px_minmax(0,1fr)_auto] items-start gap-3 rounded-md px-2.5 py-3.5 transition-colors before:absolute before:top-[25px] before:bottom-0 before:left-[22px] before:w-px before:bg-border last:before:hidden`,children:[(0,K.jsx)(`span`,{className:Y(`relative z-[1] mt-1 justify-self-center rounded-full border-[2.5px]`,t===0?`border-brand bg-brand ring-brand/25 size-[14px] ring-4`:`border-border bg-card size-[13px]`),"aria-hidden":`true`}),(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-[9px] text-[12.5px]`,children:[(0,K.jsx)(`span`,{className:Y(`rounded-full border px-2 py-0.5 font-mono text-[10px] tracking-[0.05em] uppercase`,e.kind===`checkpoint`?`border-warning/45 bg-warning/10 text-warning`:`border-border text-muted-foreground`),children:e.kind===`checkpoint`?`★ checkpoint`:`auto`}),e.label&&(0,K.jsx)(`span`,{className:`text-foreground font-semibold`,children:e.label}),(0,K.jsx)(`span`,{className:`text-muted-foreground font-mono text-[11.5px]`,children:Q5(e.ts)}),t===0?(0,K.jsx)(`span`,{className:`text-brand font-mono text-[10px] font-semibold tracking-[0.05em] uppercase`,children:`latest`}):n===0?(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11.5px]`,children:`identical to current`}):(0,K.jsxs)(`span`,{className:`inline-flex items-baseline gap-[7px] font-mono text-[11.5px]`,children:[(0,K.jsxs)(`span`,{className:`text-success`,children:[`+`,e.drift.added]}),(0,K.jsxs)(`span`,{className:`text-destructive`,children:[`−`,e.drift.removed]}),(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:` vs current`})]})]}),s===e.id&&(0,K.jsx)(`div`,{className:`mt-2`,children:l?l.unified.trim()?(0,K.jsx)(X5,{unified:l.unified,maxHeight:280}):(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`No differences from the current config.`}):(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`computing diff…`})})]}),(0,K.jsxs)(`div`,{className:`mt-px inline-flex flex-none items-center gap-1.5`,children:[(0,K.jsx)(X,{size:`sm`,onClick:()=>void y(e.id),children:s===e.id?`Hide`:`Diff`}),d===e.id?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(X,{size:`sm`,type:`accent`,disabled:a,onClick:()=>void b(e.id),children:`Confirm restore`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>f(null),children:`Cancel`})]}):(0,K.jsx)(X,{size:`sm`,disabled:t===0,title:t===0?`This is the current config`:`Restore this version`,onClick:()=>f(e.id),children:`Restore`}),e.kind===`checkpoint`&&(0,K.jsx)(X,{size:`sm`,ghost:!0,type:`error`,icon:(0,K.jsx)(cl,{className:`size-4`}),title:`Delete`,onClick:()=>void x(e.id)})]})]},e.id)})})]}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`loading history…`})}function e7(e){if(!e)return[];let t=[],n=e=>e?Array.isArray(e.enum)?`enum`:e.type===`array`?`array<${n(e.items)}>`:Array.isArray(e.type)?e.type.join(` | `):e.type??(e.properties?`object`:`any`):`any`,r=(e,i,a,o)=>{let s=e.properties??{};for(let[e,c]of Object.entries(s)){let s=i?`${i}.${e}`:e,l=a||e;t.push({path:s,section:l,type:n(c),def:c.default===void 0?void 0:JSON.stringify(c.default),desc:c.description,enumv:Array.isArray(c.enum)?c.enum:void 0,required:o.has(e)}),c.properties&&r(c,s,l,new Set(c.required??[]));let u=c.additionalProperties;u?.properties&&r(u,`${s}.<name>`,l,new Set(u.required??[]));let d=c.items;d?.properties&&r(d,`${s}[]`,l,new Set(d.required??[]))}};return r(e,``,``,new Set(e.required??[])),t}function t7(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(``);(0,v.useEffect)(()=>{mc(`/api/config-schema`).then(t).catch(()=>{})},[]);let i=(0,v.useMemo)(()=>e7(e),[e]),a=n.trim().toLowerCase(),o=a?i.filter(e=>e.path.toLowerCase().includes(a)||(e.desc??``).toLowerCase().includes(a)):i,s=(0,v.useMemo)(()=>{let e=new Map;for(let t of o){let n=e.get(t.section)??[];n.push(t),e.set(t.section,n)}return[...e.entries()]},[o]);return e?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,style:{marginBottom:12},children:[(0,K.jsx)(Vb,{className:`w-[min(360px,60vw)]`,placeholder:`Search fields & descriptions…`,value:n,onChange:e=>r(e.target.value)}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[o.length,` options`]})]}),s.length===0?(0,K.jsxs)(`div`,{className:`text-muted-foreground text-[11px]`,children:[`No fields match “`,n,`”.`]}):(0,K.jsx)(`div`,{className:`grid gap-[18px]`,children:s.map(([e,t])=>(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`h4`,{className:`text-brand m-0 mb-2 font-mono text-[11px] tracking-[0.09em] uppercase`,children:e}),(0,K.jsx)(`div`,{className:`grid gap-2`,children:t.map(e=>(0,K.jsxs)(`div`,{className:`border-border bg-muted/45 hover:border-brand/40 rounded-md border px-[13px] py-[11px] transition-colors`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-2.5`,children:[(0,K.jsx)(`code`,{className:`text-foreground font-mono text-[12.5px] font-medium`,children:e.path}),(0,K.jsx)(`span`,{className:`text-brand bg-brand/[0.13] rounded-full px-[7px] py-px font-mono text-[10.5px]`,children:e.type}),e.required&&(0,K.jsx)(`span`,{className:`text-destructive font-mono text-[10px] tracking-[0.05em] uppercase`,children:`required`}),e.def!==void 0&&(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[`default `,(0,K.jsx)(`code`,{className:`text-muted-foreground`,children:e.def})]})]}),e.desc&&(0,K.jsx)(`p`,{className:`text-muted-foreground mt-1.5 mb-0 text-[12.5px] leading-[1.5]`,children:e.desc}),e.enumv&&(0,K.jsx)(`div`,{className:`mt-[7px] flex flex-wrap gap-1.5`,children:e.enumv.map(e=>(0,K.jsx)(`code`,{className:`border-border text-muted-foreground rounded-md border px-[7px] py-px font-mono text-[11px]`,children:e},e))})]},e.path))})]},e))})]}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`loading schema…`})}function n7({...e}){return(0,K.jsx)(cf,{"data-slot":`sheet`,...e})}function r7({...e}){return(0,K.jsx)(mf,{"data-slot":`sheet-portal`,...e})}function i7({className:e,...t}){return(0,K.jsx)(gf,{"data-slot":`sheet-overlay`,className:Y(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function a7({className:e,children:t,side:n=`right`,showCloseButton:r=!0,...i}){return(0,K.jsxs)(r7,{children:[(0,K.jsx)(i7,{}),(0,K.jsxs)(bf,{"data-slot":`sheet-content`,className:Y(`fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500`,n===`right`&&`inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm`,n===`left`&&`inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm`,n===`top`&&`inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top`,n===`bottom`&&`inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom`,e),...i,children:[t,r&&(0,K.jsxs)(kf,{className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary`,children:[(0,K.jsx)(cl,{className:`size-4`}),(0,K.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function o7({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`sheet-header`,className:Y(`flex flex-col gap-1.5 p-4`,e),...t})}function s7({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`sheet-footer`,className:Y(`mt-auto flex flex-col gap-2 p-4`,e),...t})}function c7({className:e,...t}){return(0,K.jsx)(Tf,{"data-slot":`sheet-title`,className:Y(`font-semibold text-foreground`,e),...t})}function l7({className:e,...t}){return(0,K.jsx)(Df,{"data-slot":`sheet-description`,className:Y(`text-sm text-muted-foreground`,e),...t})}var u7=500;function d7({title:e,subtitle:t,onClose:n,footer:r,children:i}){let[a,o]=(0,v.useState)(!1),s=(0,v.useRef)(null),c=(0,v.useRef)(n);return c.current=n,(0,v.useEffect)(()=>{let e=requestAnimationFrame(()=>o(!0));return()=>{cancelAnimationFrame(e),s.current&&clearTimeout(s.current)}},[]),(0,K.jsx)(n7,{open:a,onOpenChange:(0,v.useCallback)(e=>{e||s.current||(o(!1),s.current=setTimeout(()=>c.current(),u7))},[]),children:(0,K.jsxs)(a7,{side:`right`,className:`w-full gap-0 sm:max-w-2xl`,children:[(0,K.jsxs)(o7,{className:`border-b`,children:[(0,K.jsx)(c7,{children:e}),t!=null&&(0,K.jsx)(l7,{children:t})]}),(0,K.jsx)(`div`,{className:`flex-1 overflow-y-auto p-4`,children:i}),r!=null&&(0,K.jsx)(s7,{className:`border-t`,children:r})]})})}var f7=[{key:`host`,label:`Host / IP`,type:`text`,placeholder:`192.168.88.1`,help:`SSH host. Ignored when a MAC address is set (MAC-Telnet).`},{key:`port`,label:`SSH port`,type:`number`,placeholder:`22`},{key:`username`,label:`Username`,type:`text`,placeholder:`admin`},{key:`password`,label:`Password`,type:`password`,secret:!0},{key:`timeoutMs`,label:`Timeout (ms)`,type:`number`,placeholder:`10000`},{key:`description`,label:`Description`,type:`text`,placeholder:`Core router`,help:`Free-text label.`},{key:`keyFilename`,label:`SSH key file`,type:`text`,advanced:!0,help:`Path to a private-key file.`},{key:`privateKey`,label:`Private key (PEM)`,type:`password`,secret:!0,advanced:!0},{key:`keyPassphrase`,label:`Key passphrase`,type:`password`,secret:!0,advanced:!0},{key:`jumpVia`,label:`Jump via device`,type:`text`,advanced:!0,help:`Name of another device to use as an SSH bastion.`},{key:`mac`,label:`MAC address`,type:`text`,advanced:!0,help:`Set to reach the device over Layer-2 MAC-Telnet (no IP).`},{key:`sourceMac`,label:`Source MAC`,type:`text`,advanced:!0},{key:`macHost`,label:`MAC-Telnet host iface`,type:`text`,advanced:!0},{key:`macPort`,label:`MAC-Telnet port`,type:`number`,advanced:!0,placeholder:`20561`}],p7=[{id:`devices`,title:`Devices`,icon:`🖧`,kind:`deviceMap`,blurb:`MikroTik routers this server manages. Toggle a device off to hide it from the tools.`,fields:f7},{id:`mcp`,title:`MCP Server`,icon:`⚙️`,kind:`object`,path:`mcp`,blurb:`How the MCP server is exposed to the AI client.`,fields:[{key:`transport`,label:`Transport`,type:`select`,options:[`stdio`,`sse`,`streamable-http`]},{key:`host`,label:`Bind host`,type:`text`,placeholder:`0.0.0.0`},{key:`port`,label:`Bind port`,type:`number`,placeholder:`8000`},{key:`appViews`,label:`MCP App Views`,type:`bool`,help:`Expose rich App-view metadata to compatible clients.`},{key:`toolPageSize`,label:`Tool page size`,type:`number`,advanced:!0,help:`0 = no paging.`},{key:`allowedHosts`,label:`Allowed hosts`,type:`text`,advanced:!0,help:`Comma-separated.`},{key:`allowedOrigins`,label:`Allowed origins`,type:`text`,advanced:!0},{key:`corsOrigins`,label:`CORS origins`,type:`text`,advanced:!0}]},{id:`dashboard`,title:`Observability Dashboard`,icon:`📊`,kind:`object`,path:`dashboard`,enable:{key:`enabled`,label:`Dashboard`},blurb:`This web dashboard — records every tool call and serves the live UI.`,fields:[{key:`host`,label:`Bind host`,type:`text`,placeholder:`0.0.0.0`},{key:`port`,label:`Bind port`,type:`number`,placeholder:`9090`},{key:`token`,label:`Access token`,type:`password`,secret:!0,help:`Require this bearer token to view the dashboard.`},{key:`captureBody`,label:`Capture tool input/output`,type:`bool`},{key:`redactInput`,label:`Redact input bodies`,type:`bool`},{key:`dbPath`,label:`Database path`,type:`text`,advanced:!0},{key:`maxEvents`,label:`Max events kept`,type:`number`,advanced:!0},{key:`maxBodyBytes`,label:`Max body bytes`,type:`number`,advanced:!0}]},{id:`ssh`,title:`SSH Connection Pool`,icon:`🔌`,kind:`object`,path:`ssh`,enable:{key:`keepAlive`,label:`Keep-alive pooling`},blurb:`Reuse SSH connections across tool calls for lower latency.`,fields:[{key:`keepAliveInterval`,label:`Keep-alive interval (ms)`,type:`number`,placeholder:`10000`},{key:`idleTimeout`,label:`Idle timeout (ms)`,type:`number`,placeholder:`30000`}]},{id:`s3`,title:`S3 Backups`,icon:`☁️`,kind:`object`,path:`s3`,enable:{presence:!0,label:`S3 backups`},blurb:`Ship config backups to an S3-compatible bucket.`,fields:[{key:`bucket`,label:`Bucket`,type:`text`},{key:`region`,label:`Region`,type:`text`},{key:`endpoint`,label:`Endpoint`,type:`text`,placeholder:`https://s3.example.com`},{key:`accessKeyId`,label:`Access key ID`,type:`password`,secret:!0},{key:`secretAccessKey`,label:`Secret access key`,type:`password`,secret:!0},{key:`prefix`,label:`Key prefix`,type:`text`},{key:`sessionToken`,label:`Session token`,type:`password`,secret:!0,advanced:!0},{key:`presignExpiresIn`,label:`Presign expiry (s)`,type:`number`,advanced:!0,placeholder:`3600`}]},{id:`memory`,title:`Knowledge Memory`,icon:`🧠`,kind:`object`,path:`memory`,enable:{key:`enabled`,label:`Memory`},blurb:`Persistent knowledge graph the AI can read and write.`,fields:[{key:`dbPath`,label:`Database path`,type:`text`}]},{id:`modules`,title:`Tool Modules`,icon:`🧩`,kind:`modules`,blurb:`Curate which tool modules are exposed to the AI client.`,fields:[]},{id:`general`,title:`General`,icon:`🎛️`,kind:`object`,blurb:`Server-wide options.`,fields:[{key:`readOnly`,label:`Read-only mode`,type:`bool`,help:`Block all write/destructive tools.`},{key:`disableUpdateCheck`,label:`Disable update check`,type:`bool`},{key:`backupDir`,label:`Backup directory`,type:`text`,advanced:!0}]}];function m7({className:e,size:t=`default`,...n}){return(0,K.jsx)(z_,{"data-slot":`switch`,"data-size":t,className:Y(`peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80`,e),...n,children:(0,K.jsx)(V_,{"data-slot":`switch-thumb`,className:Y(`pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground`)})})}var h7=`«redacted»`,g7=e=>e&&typeof e==`object`&&!Array.isArray(e)?e:{},_7=e=>Array.isArray(e)?e:[],v7=e=>[...new Set(e)],y7=e=>e==null?``:typeof e==`object`?JSON.stringify(e):String(e);function b7(e,t){return t.path?g7(e[t.path]):e}function x7(e,t,n,r){if(t.path){let i={...g7(e[t.path])};return r===void 0||r===``?delete i[n]:i[n]=r,{...e,[t.path]:i}}let i={...e};return r===void 0||r===``?delete i[n]:i[n]=r,i}function S7(e,t){return t.enable?t.enable.presence?e[t.path??``]!==void 0:b7(e,t)[t.enable.key??`enabled`]!==!1:!0}function C7({field:e,value:t,onChange:n}){let r=`f_${e.key}`,i=e.type===`bool`,a;return a=e.type===`bool`?(0,K.jsx)(m7,{checked:t===!0,onCheckedChange:n}):e.type===`select`?(0,K.jsx)(Gb,{value:y7(t??e.options?.[0]??``),onValueChange:n,options:(e.options??[]).map(e=>({value:e,label:e}))}):e.type===`number`?(0,K.jsx)(Vb,{id:r,type:`number`,placeholder:e.placeholder,value:t==null?``:y7(t),onChange:e=>n(e.target.value===``?void 0:Number(e.target.value))}):(0,K.jsx)(Vb,{id:r,type:e.type===`password`?`password`:`text`,placeholder:e.secret&&t===h7?`•••• unchanged`:e.placeholder,value:t==null?``:y7(t),onChange:e=>n(e.target.value)}),(0,K.jsxs)(`div`,{className:Y(`flex min-w-0`,i?`flex-row items-center justify-between gap-2.5`:`flex-col gap-1.5`),children:[(0,K.jsxs)(zy,{htmlFor:r,className:`text-muted-foreground text-xs font-semibold`,children:[e.label,e.secret&&(0,K.jsx)(`span`,{className:`text-warning text-[10px] font-semibold tracking-[0.04em] uppercase`,children:`secret`})]}),a,e.help&&(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px] leading-[1.4]`,children:e.help})]})}function w7({fields:e,value:t,onField:n}){let[r,i]=(0,v.useState)(!1),a=e.filter(e=>!e.advanced),o=e.filter(e=>e.advanced);return(0,K.jsxs)(`div`,{className:`mt-1 grid grid-cols-[repeat(auto-fill,minmax(220px,1fr))] gap-x-4 gap-y-3`,children:[a.map(e=>(0,K.jsx)(C7,{field:e,value:t[e.key],onChange:t=>n(e.key,t)},e.key)),o.length>0&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`button`,{type:`button`,className:`text-muted-foreground hover:text-foreground col-span-full flex cursor-pointer items-center gap-1 border-0 bg-transparent py-1 text-left text-xs font-semibold`,onClick:()=>i(e=>!e),children:[r?(0,K.jsx)(Ac,{className:`size-3`}):(0,K.jsx)(jc,{className:`size-3`}),` `,`Advanced (`,o.length,`)`]}),r&&o.map(e=>(0,K.jsx)(C7,{field:e,value:t[e.key],onChange:t=>n(e.key,t)},e.key))]})]})}var T7={prefix:``,presignExpiresIn:3600};function E7(e,t){let n=b7(e,t),r=e=>n[e]!=null&&n[e]!==``?y7(n[e]):``,i=r(`host`)?`${r(`host`)}:${r(`port`)}`:``;return t.id===`mcp`?[r(`transport`),i].filter(Boolean).join(` · `):t.id===`dashboard`?[i,n.token?`token set`:`open`].filter(Boolean).join(` · `):t.id===`ssh`?`interval ${r(`keepAliveInterval`)||`?`}ms · idle ${r(`idleTimeout`)||`?`}ms`:t.id===`s3`?S7(e,t)?[r(`bucket`),r(`region`),r(`endpoint`)].filter(Boolean).join(` · `)||`not configured`:``:t.id===`memory`?r(`dbPath`):t.id===`general`?`${e.readOnly?`read-only`:`read-write`}${e.disableUpdateCheck?` · no update check`:``}`:``}function D7({cfg:e,onChange:t,section:n}){let[r,i]=(0,v.useState)(!1),a=(0,v.useRef)(null),o=S7(e,n),s=r=>{if(n.enable?.presence){if(r)t({...e,[n.path]:a.current??(n.id===`s3`?T7:{})});else{a.current=g7(e[n.path]);let r={...e};delete r[n.path],t(r),i(!1)}return}t(x7(e,n,n.enable.key??`enabled`,r))},c=E7(e,n);return(0,K.jsxs)(Kb,{className:Y(`px-4 py-3.5 transition-opacity`,!o&&`opacity-50`),children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2.5`,children:[(0,K.jsx)(`span`,{className:`text-lg leading-none`,"aria-hidden":`true`,children:n.icon}),(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsxs)(`div`,{className:`text-foreground flex items-center gap-2 text-sm font-bold`,children:[n.title,n.enable&&(0,K.jsx)(Lb,{type:o?`success`:`secondary`,children:o?`active`:`off`})]}),(0,K.jsx)(`div`,{className:`text-muted-foreground mt-0.5 max-w-[520px] truncate font-mono text-xs`,children:c||n.blurb})]}),(0,K.jsx)(`span`,{className:`flex-1`}),n.enable&&(0,K.jsx)(m7,{checked:o,onCheckedChange:s,title:`${o?`Deactivate`:`Activate`} ${n.enable.label??n.title}`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>i(!0),disabled:n.enable?.presence&&!o,children:`Edit`})]}),r&&(0,K.jsxs)(d7,{title:`${n.icon} ${n.title}`,subtitle:n.blurb,onClose:()=>i(!1),children:[n.enable&&(0,K.jsxs)(`label`,{className:`border-border bg-muted text-foreground flex items-center gap-2.5 rounded-md border px-3 py-2.5 text-[13px] font-semibold`,children:[(0,K.jsx)(m7,{checked:o,onCheckedChange:s}),o?`Active`:`Inactive — enable ${n.enable.label??n.title}`]}),o?(0,K.jsx)(w7,{fields:n.fields,value:b7(e,n),onField:(r,i)=>t(x7(e,n,r,i))}):(0,K.jsx)(Pb,{type:`secondary`,label:!1,children:`This section is turned off. Toggle it on to edit its settings.`})]})]})}function O7({cfg:e,onChange:t,name:n,isNew:r,onClose:i}){let[a,o]=(0,v.useState)(n),[s,c]=(0,v.useState)(null),l=g7(e.devices),u=g7(l[n]),d=(r,i)=>{let a={...u};i===void 0||i===``?delete a[r]:a[r]=i,t({...e,devices:{...l,[n]:a}})},f=()=>{let r=a.trim();if(r===n)return!0;if(!r)return c(`Name cannot be empty.`),!1;if(l[r])return c(`A device named "${r}" already exists.`),!1;let i={...l,[r]:u};return delete i[n],t({...e,devices:i}),!0},p=()=>{f()&&i()};return(0,K.jsxs)(d7,{title:r?`Add device`:`Device · ${n}`,subtitle:r?`New MikroTik router`:void 0,onClose:p,footer:(0,K.jsx)(X,{type:`success`,size:`sm`,onClick:p,children:`Done`}),children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5`,children:[(0,K.jsx)(zy,{htmlFor:`dev_name`,className:`text-muted-foreground text-xs font-semibold`,children:`Name`}),(0,K.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,K.jsx)(Vb,{id:`dev_name`,value:a,onChange:e=>{o(e.target.value),c(null)},placeholder:`core-router`}),!r&&a.trim()!==n&&(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>f(),children:`Rename`})]}),s&&(0,K.jsx)(`span`,{className:`text-destructive text-[11px]`,children:s})]}),(0,K.jsx)(w7,{fields:f7,value:u,onField:d})]})}function k7({cfg:e,onChange:t}){let[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),o=g7(e.devices),s=Object.keys(o),c=y7(e.defaultDevice),l=()=>{let n=`device`,i=1,a=n;for(;o[a];)a=`${n}-${++i}`;t({...e,devices:{...o,[a]:{host:`192.168.88.1`,port:22,username:`admin`,password:``,timeoutMs:1e4}}}),r({name:a,isNew:!0})},u=(n,r)=>{t({...e,devices:{...o,[n]:{...g7(o[n]),disabled:r}}})},d=n=>{let r={...o};delete r[n];let i={...e,devices:r};c===n&&(i.defaultDevice=Object.keys(r)[0]??``),t(i),a(null)};return(0,K.jsxs)(Kb,{className:`px-4 py-3.5`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2.5`,children:[(0,K.jsx)(`span`,{className:`text-lg leading-none`,"aria-hidden":`true`,children:`🖧`}),(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsx)(`div`,{className:`text-foreground flex items-center gap-2 text-sm font-bold`,children:`Devices`}),(0,K.jsxs)(`div`,{className:`text-muted-foreground mt-0.5 max-w-[520px] truncate font-mono text-xs`,children:[s.length,` device`,s.length===1?``:`s`,` · default: `,c||`—`]})]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsxs)(`label`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`Default`}),(0,K.jsx)(Gb,{value:c,onValueChange:n=>t({...e,defaultDevice:n}),options:s.map(e=>({value:e,label:e}))})]}),(0,K.jsx)(X,{size:`sm`,onClick:l,icon:(0,K.jsx)(Jc,{className:`size-4`}),children:`Add device`})]}),(0,K.jsxs)(`div`,{className:`mt-3 grid grid-cols-[repeat(auto-fill,minmax(240px,1fr))] gap-3`,children:[s.map(e=>{let t=g7(o[e]),n=t.disabled===!0,s=t.mac?y7(t.mac):`${y7(t.host)||`?`}:${y7(t.port)||`22`}`;return(0,K.jsxs)(`div`,{className:Y(`border-border bg-card hover:border-brand/40 flex flex-col gap-1.5 rounded-lg border px-[15px] py-3.5 transition-colors`,n&&`opacity-50 grayscale-[0.4]`),children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`span`,{className:Y(`inline-block size-2 shrink-0 rounded-full`,n?`bg-muted-foreground/60`:`bg-success`)}),(0,K.jsx)(`span`,{className:`font-mono text-[13px] font-medium`,children:e}),c===e&&(0,K.jsx)(Lb,{type:`accent`,children:`default`}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(m7,{checked:!n,onCheckedChange:t=>u(e,!t),title:n?`Enable device`:`Disable device`})]}),(0,K.jsx)(`div`,{className:`text-muted-foreground font-mono text-[11px] break-words`,children:s}),t.description?(0,K.jsx)(`div`,{className:`text-muted-foreground font-mono text-[11px] break-words`,children:y7(t.description)}):null,(0,K.jsxs)(`div`,{className:`mt-auto flex gap-1.5 pt-1`,children:[(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>r({name:e,isNew:!1}),children:`Edit`}),i===e?(0,K.jsx)(X,{size:`sm`,type:`error`,onClick:()=>d(e),children:`Confirm?`}):(0,K.jsx)(X,{size:`sm`,ghost:!0,type:`error`,onClick:()=>a(e),children:`Remove`})]})]},e)}),s.length===0&&(0,K.jsxs)(Pb,{type:`secondary`,label:!1,children:[`No devices yet. Click `,(0,K.jsx)(`b`,{children:`Add device`}),` to configure your first router.`]})]}),n&&(0,K.jsx)(O7,{cfg:e,onChange:t,name:n.name,isNew:n.isNew,onClose:()=>r(null)})]})}function A7(e,t){let n=_7(e.disabledModules),r=_7(e.disabledGroups),i=_7(e.enabledModules),a=_7(e.enabledGroups);return n.includes(t.slug)||r.includes(t.group)?!1:i.length===0&&a.length===0?!0:i.includes(t.slug)||a.includes(t.group)}function j7({cfg:e,onChange:t}){let[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(``);(0,v.useEffect)(()=>{mc(`/api/modules`).then(e=>r(e.modules)).catch(()=>r([]))},[]);let o=g7(e.tools),s=(n,r)=>{let i=new Set(_7(o.enabledModules)),a=new Set(_7(o.disabledModules));r?(a.delete(n.slug),(_7(o.enabledModules).length>0||_7(o.enabledGroups).length>0)&&i.add(n.slug)):(i.delete(n.slug),a.add(n.slug)),t({...e,tools:{...o,enabledModules:v7([...i]),disabledModules:v7([...a])}})},c=(n??[]).filter(e=>{if(!i)return!0;let t=i.toLowerCase();return e.label.toLowerCase().includes(t)||e.slug.toLowerCase().includes(t)||e.group.toLowerCase().includes(t)}),l=new Map;for(let e of c)l.set(e.group,[...l.get(e.group)??[],e]);let u=(n??[]).filter(e=>A7(o,e)).length;return(0,K.jsxs)(Kb,{className:`px-4 py-3.5`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2.5`,children:[(0,K.jsx)(`span`,{className:`text-lg leading-none`,"aria-hidden":`true`,children:`🧩`}),(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsx)(`div`,{className:`text-foreground flex items-center gap-2 text-sm font-bold`,children:`Tool Modules`}),(0,K.jsxs)(`div`,{className:`text-muted-foreground mt-0.5 max-w-[520px] truncate font-mono text-xs`,children:[n?`${u}/${n.length} modules enabled`:`loading…`,` · applied on Save`]})]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(Vb,{placeholder:`Filter modules…`,value:i,onChange:e=>a(e.target.value),className:`max-w-[190px]`}),(0,K.jsxs)(`label`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(m7,{checked:g7(e.mcp).appViews===!0,onCheckedChange:n=>t({...e,mcp:{...g7(e.mcp),appViews:n}}),title:`MCP App Views`}),(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`App Views`})]})]}),(0,K.jsxs)(`div`,{className:`mt-3 grid max-h-[440px] gap-[18px] overflow-auto`,children:[[...l.entries()].map(([e,t])=>(0,K.jsxs)(`div`,{className:`grid gap-2`,children:[(0,K.jsx)(`div`,{className:`text-muted-foreground mt-2 mb-0.5 font-bold text-[11px] tracking-[0.05em] uppercase`,children:e}),t.map(e=>{let t=A7(o,e);return(0,K.jsxs)(`label`,{className:Y(`bg-muted hover:border-brand/40 flex cursor-pointer items-start gap-2.5 rounded-md border px-[11px] py-[9px] transition-colors select-none`,t?`border-brand/50 bg-brand/10`:`border-border`),title:e.description,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:t,onChange:()=>s(e,!t),className:`accent-brand mt-0.5 cursor-pointer`}),(0,K.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,K.jsxs)(`span`,{className:`text-foreground flex flex-wrap items-center gap-[7px] text-xs font-semibold`,children:[e.label,(0,K.jsx)(`code`,{className:`text-muted-foreground bg-background border-border rounded border px-1.5 py-px font-mono text-[10px]`,children:e.slug})]}),(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px] leading-[1.35]`,children:e.description})]}),(0,K.jsxs)(`span`,{className:`text-muted-foreground pt-px font-mono text-[10px] whitespace-nowrap`,children:[e.toolCount,` tool`,e.toolCount===1?``:`s`]})]},e.slug)})]},e)),n&&c.length===0&&(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[`No modules match “`,i,`”.`]})]})]})}function M7({cfg:e,onChange:t}){return(0,K.jsx)(`div`,{className:`mt-1 grid gap-3.5`,children:p7.map(n=>n.kind===`deviceMap`?(0,K.jsx)(k7,{cfg:e,onChange:t},n.id):n.kind===`modules`?(0,K.jsx)(j7,{cfg:e,onChange:t},n.id):(0,K.jsx)(D7,{cfg:e,onChange:t,section:n},n.id))})}function N7(e){let t=new Set,n=new Set,r=e=>{if(!e||typeof e!=`object`)return;let i=e;if(i.properties&&typeof i.properties==`object`)for(let e of Object.keys(i.properties))t.add(e),r(i.properties[e]);if(Array.isArray(i.enum))for(let e of i.enum)typeof e==`string`&&n.add(e);for(let e of[`items`,`additionalProperties`,`anyOf`,`oneOf`,`allOf`]){let t=i[e];Array.isArray(t)?t.forEach(r):t&&typeof t==`object`&&r(t)}for(let e of[`$defs`,`definitions`,`patternProperties`]){let t=i[e];if(t&&typeof t==`object`)for(let e of Object.values(t))r(e)}};return r(e),{keys:[...t].sort(),enums:[...n.add(`true`).add(`false`)].sort()}}function P7(e,t){let n=t;for(;n>0&&/[A-Za-z0-9_.-]/.test(e[n-1]);)n--;let r=e.slice(n,t),i=n-1;for(;i>=0&&/\s/.test(e[i]);)i--;return{word:r,start:n,isValue:e[i]===`:`}}var F7=[[`revert in 30s`,3e4],[`revert in 60s`,6e4],[`revert in 2m`,12e4],[`no auto-revert`,0]];function I7({value:e,onChange:t,onJsonError:n}){let[r,i]=(0,v.useState)(()=>JSON.stringify(e,null,2)),[a,o]=(0,v.useState)({keys:[],enums:[]}),[s,c]=(0,v.useState)(null),l=(0,v.useRef)(null),u=(0,v.useRef)(null),d=(0,v.useRef)(null),f=(0,v.useRef)(null);(0,v.useEffect)(()=>{mc(`/api/config-schema`).then(e=>o(N7(e))).catch(()=>{})},[]),(0,v.useEffect)(()=>{u.current!=null&&l.current&&(l.current.selectionStart=l.current.selectionEnd=u.current,u.current=null)});let p=(0,v.useRef)(t),m=(0,v.useRef)(n);p.current=t,m.current=n,(0,v.useEffect)(()=>{let e=setTimeout(()=>{try{let e=JSON.parse(r);m.current?.(null),p.current(e)}catch(e){m.current?.(e instanceof Error?e.message:String(e))}},300);return()=>clearTimeout(e)},[r]);let h=e=>{let{word:t,start:n,isValue:r}=P7(e.value,e.selectionStart);if(t.length<1){c(null);return}let i=(r?a.enums:a.keys).filter(e=>e.startsWith(t)&&e!==t).slice(0,8);if(!i.length){c(null);return}let o=e.value.slice(0,e.selectionStart).split(`
140
141
  `),s=o[o.length-1].length,l=Math.min(12+s*7.22-e.scrollLeft,e.clientWidth-160),u=10+o.length*18-e.scrollTop+4;c({items:i,index:0,start:n,x:Math.max(4,l),y:u})},g=e=>{let t=l.current;if(!t||!s)return;let n=r.slice(0,s.start)+e+r.slice(t.selectionStart);u.current=s.start+e.length,i(n),c(null)},_=e=>{if(!s){e.key===` `&&e.ctrlKey&&(e.preventDefault(),h(e.currentTarget));return}e.key===`ArrowDown`?(e.preventDefault(),c({...s,index:(s.index+1)%s.items.length})):e.key===`ArrowUp`?(e.preventDefault(),c({...s,index:(s.index-1+s.items.length)%s.items.length})):e.key===`Enter`||e.key===`Tab`?(e.preventDefault(),g(s.items[s.index])):e.key===`Escape`&&c(null)},y=r.split(`
141
142
  `).length;return(0,K.jsxs)(`div`,{className:`border-border bg-background flex max-h-[420px] overflow-hidden rounded-md border`,children:[(0,K.jsx)(`pre`,{className:`bg-muted text-muted-foreground m-0 min-w-[38px] overflow-hidden px-2 py-2.5 text-right font-mono text-xs leading-[1.5] select-none`,"aria-hidden":`true`,ref:f,children:Array.from({length:y},(e,t)=>t+1).join(`
142
- `)}),(0,K.jsxs)(`div`,{className:`relative flex-1`,children:[(0,K.jsxs)(`pre`,{className:`text-muted-foreground pointer-events-none absolute inset-0 z-0 m-0 box-border overflow-hidden px-3 py-2.5 font-mono text-xs leading-[1.5] whitespace-pre [tab-size:2] [&_.j-bool]:text-chart-4 [&_.j-key]:text-chart-1 [&_.j-null]:text-muted-foreground [&_.j-num]:text-chart-3 [&_.j-str]:text-chart-2`,"aria-hidden":`true`,ref:d,children:[x7(r),`
143
- `]}),(0,K.jsx)(Fx,{ref:l,className:`caret-brand selection:bg-brand/35 relative z-[1] m-0 box-border h-[400px] min-h-0 w-full resize-y rounded-none border-0 bg-transparent px-3 py-2.5 font-mono text-xs leading-[1.5] whitespace-pre text-transparent shadow-none [field-sizing:fixed] [tab-size:2] outline-none focus-visible:border-0 focus-visible:ring-0 dark:bg-transparent`,spellCheck:!1,wrap:`off`,value:r,onChange:e=>{i(e.target.value),h(e.currentTarget)},onKeyDown:_,onClick:()=>c(null),onScroll:e=>{let t=e.currentTarget;d.current&&(d.current.scrollTop=t.scrollTop,d.current.scrollLeft=t.scrollLeft),f.current&&(f.current.scrollTop=t.scrollTop)}}),s&&(0,K.jsx)(`div`,{className:`border-brand bg-card absolute z-[5] max-h-[184px] min-w-[150px] overflow-y-auto rounded-md border shadow-lg`,style:{left:s.x,top:s.y},children:s.items.map((e,t)=>(0,K.jsx)(`div`,{className:Y(`cursor-pointer px-[11px] py-[5px] font-mono text-xs`,t===s.index?`bg-brand/20 text-foreground`:`text-muted-foreground`),onMouseDown:t=>{t.preventDefault(),g(e)},children:e},e))})]})]})}var N7=e=>e&&typeof e==`object`&&!Array.isArray(e)?e:{};function P7({initial:e,onClose:t,onReload:n}){let[r,i]=(0,v.useState)(()=>N7(e)),[a,o]=(0,v.useState)(`form`),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)([]),[d,f]=(0,v.useState)({}),[p,m]=(0,v.useState)(null),[h,g]=(0,v.useState)(null),[_,y]=(0,v.useState)(0),[b,x]=(0,v.useState)(6e4),[S,C]=(0,v.useState)(null);(0,v.useEffect)(()=>{let e=setTimeout(()=>{hc(`/api/config/validate`,r).then(e=>u(e.errors??[])).catch(()=>{})},350);return()=>clearTimeout(e)},[r]),(0,v.useEffect)(()=>{if(!h||_<=0)return;let e=setInterval(()=>y(e=>Math.max(0,e-1)),1e3);return()=>clearInterval(e)},[h,_]);let w=(0,v.useRef)(n);w.current=n,(0,v.useEffect)(()=>{h&&_===0&&(h.rollbackMs??0)>0&&(C(`Auto-reverted — changes were not confirmed in time.`),g(null),w.current())},[h,_]);let T=!s&&l.length===0,E=async()=>{let e=N7(r.devices);if(Object.keys(e).length===0)return;C(`Testing devices…`);let t={};for(let[n,r]of Object.entries(e)){let e=await hc(`/api/config/test-device`,{name:n,config:r}).catch(()=>({ok:!1}));t[n]=e.ok&&e.status?.reachable===!0?{ok:!0,label:`${Math.round(e.status.latencyMs??0)}ms · ${e.status.identity??`ok`}`}:{ok:!1,label:e.status?.error??e.errors?.[0]?.message??`unreachable`},f({...t})}C(null)},D=async()=>{m(await hc(`/api/config/preview`,r))},O=async()=>{C(`Saving…`);let e=await hc(`/api/config`,{config:r,rollbackMs:b});if(C(null),m(null),!e.ok){u(e.errors??[{path:`(root)`,message:`save rejected`}]);return}g(e),y(Math.round((e.rollbackMs??0)/1e3))},k=async()=>{h?.pendingId&&(await hc(`/api/config/keep`,{pendingId:h.pendingId}),g(null),C(`Changes kept.`),n())},A=async()=>{h?.pendingId&&(await hc(`/api/config/rollback`,{pendingId:h.pendingId}),g(null),C(`Reverted to the previous config.`),n())};return(0,K.jsxs)(`div`,{className:`flex flex-col gap-2.5`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,K.jsxs)(`div`,{className:`border-border bg-muted inline-flex gap-0.5 rounded-md border p-0.5`,children:[(0,K.jsxs)(`button`,{className:Y(`flex cursor-pointer items-center gap-1.5 rounded-[6px] border-0 bg-transparent px-[11px] py-1 text-xs font-semibold`,a===`form`?`bg-card text-foreground shadow-sm`:`text-muted-foreground`),onClick:()=>{c(null),o(`form`)},children:[(0,K.jsx)(Bc,{className:`size-3.5`}),` Form`]}),(0,K.jsxs)(`button`,{className:Y(`flex cursor-pointer items-center gap-1.5 rounded-[6px] border-0 bg-transparent px-[11px] py-1 text-xs font-semibold`,a===`json`?`bg-card text-foreground shadow-sm`:`text-muted-foreground`),onClick:()=>o(`json`),children:[(0,K.jsx)(Oc,{className:`size-3.5`}),` JSON`]})]}),(0,K.jsx)(`span`,{className:Y(`rounded-full border px-2.5 py-1 font-mono text-[11px]`,T?`border-success/40 bg-success/10 text-success`:`border-destructive/40 bg-destructive/10 text-destructive`),children:s?`invalid JSON`:l.length?`${l.length} schema issue(s)`:`valid ✓`}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void E(),children:`Test devices`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void D(),disabled:!T,children:`Preview diff`}),(0,K.jsx)(Gb,{size:`sm`,value:String(b),onValueChange:e=>x(Number(e)),options:j7.map(([e,t])=>({value:String(t),label:e})),"aria-label":`Auto-revert window`}),(0,K.jsx)(X,{size:`sm`,type:`accent`,onClick:()=>void O(),disabled:!T||!!h,children:`Save`}),(0,K.jsx)(X,{size:`sm`,onClick:t,children:`Close`})]}),S&&(0,K.jsx)(`div`,{className:`text-muted-foreground font-mono text-xs`,children:S}),h&&(0,K.jsxs)(`div`,{className:`border-warning/40 bg-warning/10 flex flex-wrap items-center gap-2 rounded-md border px-3 py-2.5 text-xs`,children:[(0,K.jsx)(`strong`,{children:`Applied.`}),` `,(h.rollbackMs??0)>0?(0,K.jsxs)(K.Fragment,{children:[`Reverting in `,(0,K.jsxs)(`span`,{className:`text-warning font-mono font-bold`,children:[_,`s`]}),` `,`unless you keep it.`]}):(0,K.jsx)(K.Fragment,{children:`Saved without an auto-revert window.`}),h.devicesChanged&&(0,K.jsxs)(`span`,{className:`text-warning text-[11px]`,children:[` `,`· device list changed — reconnect the MCP client to expose it to the model`]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{size:`sm`,type:`accent`,onClick:()=>void k(),children:`Keep changes`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void A(),children:`Revert now`})]}),a===`form`?(0,K.jsx)(y7,{cfg:r,onChange:i}):(0,K.jsx)(M7,{value:r,onChange:e=>i(N7(e)),onJsonError:c}),Object.keys(d).length>0&&(0,K.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:Object.entries(d).map(([e,t])=>(0,K.jsxs)(`span`,{className:Y(`rounded-full border px-2.5 py-1 font-mono text-[11px]`,t.ok?`border-success/40 text-success`:`border-destructive/40 text-destructive`),children:[t.ok?`●`:`○`,` `,e,`: `,t.label]},e))}),(s||l.length>0)&&(0,K.jsx)(`div`,{className:`flex flex-col gap-[3px]`,children:s?(0,K.jsxs)(`div`,{className:`text-destructive font-mono text-[11px]`,children:[`JSON: `,s]}):l.slice(0,12).map((e,t)=>(0,K.jsxs)(`div`,{className:`text-destructive font-mono text-[11px]`,children:[(0,K.jsx)(`code`,{className:`text-warning`,children:e.path}),` — `,e.message]},t))}),p&&(0,K.jsxs)(`div`,{className:`border-border overflow-hidden rounded-md border`,children:[(0,K.jsxs)(`div`,{className:`bg-muted flex items-center gap-2 px-[13px] py-[9px] text-xs`,children:[(0,K.jsx)(`strong`,{children:`Diff vs current`}),(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:p.summary?.changed?`+${p.summary.added} / -${p.summary.removed}`:`no changes`}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,icon:(0,K.jsx)(cl,{className:`size-4`}),onClick:()=>m(null),"aria-label":`Close preview`})]}),(0,K.jsx)(`pre`,{className:`bg-background text-muted-foreground m-0 max-h-[320px] overflow-auto px-3 py-2.5 font-mono text-[11px] leading-[1.5]`,children:(p.unified||`(identical)`).split(`
144
- `).map((e,t)=>(0,K.jsx)(`div`,{className:e.startsWith(`+`)?`text-success`:e.startsWith(`-`)?`text-destructive`:e.startsWith(`@@`)?`text-brand`:``,children:e||` `},t))})]})]})}function F7({x:e,y:t,text:n,className:r,textClassName:i,padX:a=9,fontSize:o=9}){let s=(0,v.useRef)(null),[c,l]=(0,v.useState)(()=>n.length*o*.62);(0,v.useLayoutEffect)(()=>{let e=s.current?.getComputedTextLength();e&&e>0&&l(e)},[n,o]);let u=Math.round(c+a*2);return(0,K.jsxs)(`g`,{transform:`translate(${e.toFixed(1)},${t.toFixed(1)})`,children:[(0,K.jsx)(`rect`,{className:r,x:-u/2,y:-9,rx:9,width:u,height:18}),(0,K.jsx)(`text`,{ref:s,className:i,x:0,y:3.5,textAnchor:`middle`,fontSize:o,children:n})]})}function I7(e){return e.reachable===!0?{label:`online`,color:`var(--foreground)`}:e.reachable===!1?{label:`offline`,color:`var(--destructive)`}:{label:`checking…`,color:`var(--muted-foreground)`}}function L7(e){let t=0;for(let n=0;n<e.length;n++)t=Math.imul(t,31)+e.charCodeAt(n)>>>0;return`hsl(${t%360} 70% 62%)`}function R7(e,t,n,r){let i=1-r;return{x:i*i*e.x+2*i*r*t.x+r*r*n.x,y:i*i*e.y+2*i*r*t.y+r*r*n.y}}function z7(e,t,n,r){let i=1-r,a=2*i*(t.x-e.x)+2*r*(n.x-t.x),o=2*i*(t.y-e.y)+2*r*(n.y-t.y);return Math.atan2(o,a)*180/Math.PI}var B7=`var(--foreground)`,V7=`var(--muted-foreground)`,H7=`var(--warning)`;function U7(e){return e.jumpVia?e.jumpVia:e.jumpHost?`${e.jumpHost.host}:${e.jumpHost.port}`:null}var W7=18,G7=e=>e.length>W7?`${e.slice(0,W7-1)}…`:e,K7=e=>Math.max(23,Math.min(70,e.length*3.1+12));function q7({payload:e,pulses:t}){let n=e.devices,r=Math.max(1,n.length),i=n.map(e=>{let t=G7(e.name);return{d:e,label:t,r:K7(t)}}),a=Math.max(23,...i.map(e=>e.r)),o=r>1?(a+18)/Math.sin(Math.PI/r):0,s=Math.max(110+a,o,120),c=a+60,l=Math.max(700,Math.round((s+a+40)*2)),u=Math.round((s+c)*2),d=l/2,f=u/2,p={x:d,y:f},m=i.map((e,t)=>{let n=t/r*Math.PI*2-Math.PI/2+(r%2==0?Math.PI/r:0);return{...e,i:t,x:d+s*Math.cos(n),y:f+s*Math.sin(n)}});return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`svg`,{className:`conn`,viewBox:`0 0 ${l} ${u}`,width:`100%`,height:u,preserveAspectRatio:`xMidYMid meet`,children:[(0,K.jsxs)(`defs`,{children:[(0,K.jsxs)(`radialGradient`,{id:`conn-hub`,cx:`0.5`,cy:`0.34`,r:`0.75`,children:[(0,K.jsx)(`stop`,{offset:`0`,stopColor:`var(--foreground)`}),(0,K.jsx)(`stop`,{offset:`0.6`,stopColor:`color-mix(in srgb, var(--foreground) 70%, var(--muted-foreground))`}),(0,K.jsx)(`stop`,{offset:`1`,stopColor:`var(--muted-foreground)`})]}),(0,K.jsxs)(`radialGradient`,{id:`conn-orb`,cx:`0.5`,cy:`0.32`,r:`0.85`,children:[(0,K.jsx)(`stop`,{offset:`0`,stopColor:`var(--muted)`}),(0,K.jsx)(`stop`,{offset:`1`,stopColor:`var(--card)`})]}),(0,K.jsxs)(`radialGradient`,{id:`conn-burst`,cx:`0.5`,cy:`0.5`,r:`0.5`,children:[(0,K.jsx)(`stop`,{offset:`0`,stopColor:`var(--foreground)`}),(0,K.jsx)(`stop`,{offset:`0.5`,stopColor:`color-mix(in srgb, var(--foreground) 80%, transparent)`}),(0,K.jsx)(`stop`,{offset:`1`,stopColor:`var(--muted-foreground)`,stopOpacity:`0`})]}),(0,K.jsxs)(`linearGradient`,{id:`conn-tunnel-grad`,x1:`0`,y1:`0`,x2:`1`,y2:`0`,children:[(0,K.jsx)(`stop`,{offset:`0`,stopColor:H7,stopOpacity:`0.15`}),(0,K.jsx)(`stop`,{offset:`0.5`,stopColor:H7,stopOpacity:`0.95`}),(0,K.jsx)(`stop`,{offset:`1`,stopColor:H7,stopOpacity:`0.15`})]}),(0,K.jsxs)(`filter`,{id:`conn-tunnel-glow`,x:`-40%`,y:`-40%`,width:`180%`,height:`180%`,children:[(0,K.jsx)(`feGaussianBlur`,{stdDeviation:`3`,result:`b`}),(0,K.jsxs)(`feMerge`,{children:[(0,K.jsx)(`feMergeNode`,{in:`b`}),(0,K.jsx)(`feMergeNode`,{in:`SourceGraphic`})]})]})]}),[.5,.78,1].map((e,t)=>(0,K.jsx)(`circle`,{className:`conn-grid`,cx:d,cy:f,r:s*e},`g-${t}`)),[0,1,2].map(e=>(0,K.jsx)(`circle`,{className:`conn-sonar`,cx:d,cy:f,style:{animationDelay:`${e*1.1}s`}},`s-${e}`)),m.map(({d:e,i:n,x:r,y:i})=>{let a=I7(e.status),o=e.status.reachable===!0,s=e.status.reachable==null,c={x:r,y:i},l=(d+r)/2,u=(f+i)/2,m=r-d,h=i-f,g=Math.hypot(m,h)||1,_=-h/g,v=m/g,y={x:l+_*16,y:u+v*16},b={x:l-_*16,y:u-v*16},x=`M${d},${f} Q${y.x.toFixed(1)},${y.y.toFixed(1)} ${r.toFixed(1)},${i.toFixed(1)}`,S=`M${d},${f} Q${b.x.toFixed(1)},${b.y.toFixed(1)} ${r.toFixed(1)},${i.toFixed(1)}`,C=`M${d},${f} Q${l.toFixed(1)},${u.toFixed(1)} ${r.toFixed(1)},${i.toFixed(1)}`,w=R7(p,y,c,.52),T=z7(p,y,c,.52),E=R7(p,b,c,.48),D=z7(p,b,c,.48)+180,O=t[e.name]??0;return(0,K.jsxs)(`g`,{children:[(0,K.jsx)(`path`,{id:`conn-cmd-${n}`,className:`conn-link`,d:x,stroke:o?B7:a.color,strokeOpacity:o?.5:.32,strokeDasharray:s?`2 8`:o?void 0:`6 7`}),(0,K.jsx)(`path`,{id:`conn-res-${n}`,className:`conn-link`,d:S,stroke:o?V7:a.color,strokeOpacity:o?.5:.18,strokeDasharray:o?void 0:`6 7`}),o&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`path`,{className:`conn-flow`,d:x,stroke:`var(--foreground)`}),(0,K.jsx)(`circle`,{className:`conn-packet`,r:3.2,fill:`var(--foreground)`,children:(0,K.jsx)(`animateMotion`,{dur:`2.6s`,repeatCount:`indefinite`,calcMode:`linear`,children:(0,K.jsx)(`mpath`,{href:`#conn-cmd-${n}`})})}),(0,K.jsx)(`rect`,{className:`conn-packet`,x:-2.6,y:-2.6,width:5.2,height:5.2,fill:`var(--muted-foreground)`,transform:`rotate(45)`,children:(0,K.jsx)(`animateMotion`,{dur:`2.6s`,begin:`0.9s`,repeatCount:`indefinite`,calcMode:`linear`,keyPoints:`1;0`,keyTimes:`0;1`,children:(0,K.jsx)(`mpath`,{href:`#conn-res-${n}`})})}),(0,K.jsx)(`path`,{className:`conn-chevron`,d:`M-4,-3 L4,0 L-4,3`,stroke:`var(--foreground)`,transform:`translate(${w.x.toFixed(1)},${w.y.toFixed(1)}) rotate(${T.toFixed(1)})`}),(0,K.jsx)(`path`,{className:`conn-chevron`,d:`M-4,-3 L4,0 L-4,3`,stroke:`var(--muted-foreground)`,transform:`translate(${E.x.toFixed(1)},${E.y.toFixed(1)}) rotate(${D.toFixed(1)})`})]}),O>0&&(0,K.jsx)(`g`,{children:(0,K.jsxs)(`circle`,{r:6,fill:`url(#conn-burst)`,children:[(0,K.jsx)(`animateMotion`,{dur:`1.1s`,repeatCount:`1`,calcMode:`linear`,keyPoints:`0;1;0`,keyTimes:`0;0.5;1`,path:C}),(0,K.jsx)(`animate`,{attributeName:`opacity`,values:`0;1;1;0`,keyTimes:`0;0.1;0.85;1`,dur:`1.1s`,repeatCount:`1`,fill:`freeze`})]})},`burst-${e.name}-${O}`)]},`l-${e.name}`)}),m.map(e=>{let t=e.d.jumpVia,n=t?m.find(e=>e.d.name===t):void 0,r=!n&&e.d.jumpHost?e.d.jumpHost:void 0;if(!n&&!r)return null;let i={x:e.x,y:e.y},a=Math.hypot(e.x-d,e.y-f)||1,o=(e.x-d)/a,s=(e.y-f)/a,c=n?{x:n.x,y:n.y}:{x:e.x+o*(e.r+46),y:e.y+s*(e.r+46)},l=(c.x+i.x)/2,u=(c.y+i.y)/2,p=Math.hypot(l-d,u-f)||1,h=n?50:16,g={x:l+(l-d)/p*h,y:u+(u-f)/p*h},_=`M${c.x.toFixed(1)},${c.y.toFixed(1)} Q${g.x.toFixed(1)},${g.y.toFixed(1)} ${i.x.toFixed(1)},${i.y.toFixed(1)}`,v=U7(e.d)??``,y=R7(c,g,i,.5),b=`conn-tunnel-${e.i}`;return(0,K.jsxs)(`g`,{className:`conn-tunnel-g`,children:[(0,K.jsx)(`path`,{className:`conn-tunnel-halo`,d:_,stroke:H7}),(0,K.jsx)(`path`,{id:b,className:`conn-tunnel`,d:_,stroke:`url(#conn-tunnel-grad)`,filter:`url(#conn-tunnel-glow)`}),r&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`circle`,{className:`conn-tunnel-sat`,cx:c.x,cy:c.y,r:11,fill:`var(--background)`,stroke:`var(--warning)`}),(0,K.jsx)(`text`,{x:c.x,y:c.y+3.5,textAnchor:`middle`,fontSize:11,children:`🛡️`})]}),(0,K.jsxs)(`text`,{className:`conn-tunnel-lock`,fontSize:13,textAnchor:`middle`,children:[`🔒`,(0,K.jsx)(`animateMotion`,{dur:`2.4s`,repeatCount:`indefinite`,calcMode:`linear`,rotate:`auto`,children:(0,K.jsx)(`mpath`,{href:`#${b}`})})]}),(0,K.jsx)(F7,{x:y.x,y:y.y,text:`⤳ via ${v}`,className:`conn-tunnel-badge`,textClassName:`conn-tunnel-badge-tx`})]},`jump-${e.d.name}`)}),(0,K.jsx)(`circle`,{className:`conn-hub-glow`,cx:d,cy:f,r:42}),(0,K.jsx)(`circle`,{className:`conn-hub-ring`,cx:d,cy:f,r:37}),(0,K.jsx)(`circle`,{cx:d,cy:f,r:29,fill:`url(#conn-hub)`,stroke:`var(--border)`,strokeWidth:1.5}),(0,K.jsx)(`text`,{x:d,y:f-4,textAnchor:`middle`,fill:`var(--background)`,fontSize:12,fontWeight:700,children:`LLM`}),(0,K.jsx)(`text`,{x:d,y:f+8,textAnchor:`middle`,fill:`var(--background)`,fillOpacity:.66,fontSize:8,fontWeight:600,children:`⇄ MCP`}),(0,K.jsx)(`text`,{x:d,y:f+18,textAnchor:`middle`,fill:`var(--background)`,fillOpacity:.66,fontSize:7.5,fontWeight:600,children:`server`}),m.map(({d:e,x:t,y:n,r,label:i})=>{let a=I7(e.status),o=e.status.reachable===!0,s=o?`${e.status.latencyMs??`?`} ms`:a.label,c=L7(e.name);return(0,K.jsxs)(`g`,{className:`conn-node`,opacity:e.disabled?.35:1,children:[o&&(0,K.jsx)(`circle`,{className:`conn-node-halo`,cx:t,cy:n,r:r+1,stroke:c}),e.pool?.pooled&&(0,K.jsx)(`circle`,{cx:t,cy:n,r:r+5,fill:`none`,stroke:e.pool.inflight>0?`var(--chart-1)`:`var(--success)`,strokeWidth:1.5,strokeDasharray:e.pool.inflight>0?void 0:`4 4`,opacity:.5,className:e.pool.inflight>0?`conn-blink`:void 0}),(0,K.jsx)(`circle`,{cx:t,cy:n,r,fill:`url(#conn-orb)`}),(0,K.jsx)(`circle`,{cx:t,cy:n,r,fill:c,opacity:.16}),(0,K.jsx)(`circle`,{cx:t,cy:n,r,fill:`none`,stroke:c,strokeWidth:2.5}),(0,K.jsx)(`circle`,{className:o?`conn-blink`:void 0,cx:t+r*.7,cy:n-r*.7,r:4.5,fill:a.color,stroke:`var(--background)`,strokeWidth:1.5}),(0,K.jsx)(`text`,{x:t,y:n+3.5,textAnchor:`middle`,fill:`var(--foreground)`,fontSize:10,fontWeight:600,children:i}),(0,K.jsx)(`text`,{x:t,y:n+r+14,textAnchor:`middle`,fill:`var(--muted-foreground)`,fontSize:9,children:e.address??e.host}),(0,K.jsx)(`text`,{x:t,y:n+r+26,textAnchor:`middle`,fill:a.color,fontSize:9,fontWeight:600,children:s})]},`n-${e.name}`)})]}),(0,K.jsxs)(`div`,{className:`text-muted-foreground mt-2 flex flex-wrap justify-center gap-4 text-[11px] [&>span]:inline-flex [&>span]:items-center [&>span]:gap-1.5 [&_i]:inline-block [&_i]:size-2.5 [&_i]:rounded-[3px]`,children:[(0,K.jsxs)(`span`,{children:[(0,K.jsx)(`i`,{style:{background:B7}}),` command · LLM → device`]}),(0,K.jsxs)(`span`,{children:[(0,K.jsx)(`i`,{style:{background:V7}}),` response · device → LLM`]}),(0,K.jsxs)(`span`,{children:[(0,K.jsx)(`i`,{style:{background:B7}}),` live call (round-trip)`]}),e.devices.some(e=>U7(e))&&(0,K.jsxs)(`span`,{children:[(0,K.jsx)(`i`,{style:{background:`var(--warning)`}}),` 🔒 SSH jump tunnel (ProxyJump)`]}),e.devices.some(e=>e.pool?.pooled)&&(0,K.jsxs)(`span`,{children:[(0,K.jsx)(`i`,{style:{background:`var(--success)`}}),` pooled SSH connection`]})]})]})}function J7({d:e,onToggle:t}){let n=I7(e.status),r=e.status.reachable===!0?`${n.label} · ${e.status.latencyMs??`?`}ms${e.status.version?` · v${e.status.version}`:``}`:e.status.reachable===!1?`${n.label}${e.status.error?` · ${e.status.error}`:``}`:n.label,i=L7(e.name);return(0,K.jsxs)(`div`,{className:Y(`bg-card grid gap-2 rounded-lg border px-[15px] py-3.5 transition-[transform,border-color] duration-300`,`hover:border-chart-2/35 hover:-translate-y-0.5`,e.disabled&&`opacity-50 grayscale-[0.4]`),style:{borderLeft:`3px solid ${i}`},"data-disabled":e.disabled?`1`:void 0,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`span`,{className:`size-[9px] shrink-0 rounded-full`,style:{background:i},title:`device colour`}),(0,K.jsx)(`span`,{className:`text-[13px] font-medium`,children:e.name}),e.isDefault&&(0,K.jsx)(Lb,{type:`accent`,children:`default`}),e.disabled&&(0,K.jsx)(Lb,{type:`warning`,children:`disabled`}),(0,K.jsx)(`span`,{className:`size-[7px] shrink-0 rounded-full`,style:{background:n.color},title:n.label}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(`span`,{onClick:e=>e.stopPropagation(),children:(0,K.jsx)(t7,{checked:!e.disabled,onCheckedChange:()=>t?.(e.name,!e.disabled),title:e.disabled?`Enable device`:`Disable device`,"aria-label":e.disabled?`Enable device`:`Disable device`})}),(0,K.jsx)(Lb,{type:`secondary`,children:e.authMode})]}),(0,K.jsxs)(`div`,{className:`text-muted-foreground [&_b]:text-foreground grid grid-cols-[auto_1fr] gap-x-3 gap-y-[3px] text-[11px] [&_b]:font-medium [&_b]:break-words`,children:[(0,K.jsx)(`span`,{children:e.mac?`mac`:`host`}),(0,K.jsx)(`b`,{children:e.address??`${e.host}:${e.port}`}),(0,K.jsx)(`span`,{children:`user`}),(0,K.jsx)(`b`,{children:e.username}),(0,K.jsx)(`span`,{children:`status`}),(0,K.jsx)(`b`,{style:{color:n.color},children:r}),(0,K.jsx)(`span`,{children:`activity`}),(0,K.jsxs)(`b`,{children:[e.activity.calls,` calls · `,e.activity.errors,` err`,e.activity.avgMs?` · ${ub(e.activity.avgMs)} avg`:``]}),e.pool&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{children:`pool`}),(0,K.jsx)(`b`,{className:e.pool.dead?`text-destructive`:e.pool.inflight>0?`text-chart-1`:e.pool.pooled?`text-success`:`text-muted-foreground`,children:e.pool.pooled?e.pool.inflight>0?`${e.pool.inflight} inflight`:`connected`:`—`})]}),e.description&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{children:`note`}),(0,K.jsx)(`b`,{children:e.description})]})]}),U7(e)&&(0,K.jsxs)(`div`,{className:`border-warning/30 bg-warning/8 mt-2.5 mb-0.5 flex items-center gap-1.5 overflow-hidden rounded-[10px] border px-2.5 py-[7px] text-[10px]`,title:`Reached over SSH through the bastion ${U7(e)} (ProxyJump) — no port exposed on ${e.name}.`,children:[(0,K.jsxs)(`span`,{className:`border-warning/60 text-warning bg-background inline-flex items-center gap-1.5 rounded-[7px] border px-2 py-[3px] whitespace-nowrap`,children:[(0,K.jsx)(el,{className:`size-3`}),` `,U7(e),e.jumpVia?(0,K.jsx)(`i`,{className:`bg-warning text-background rounded-[4px] px-1 py-px text-[7px] tracking-[0.08em] uppercase not-italic`,children:`jump`}):null]}),(0,K.jsx)(`span`,{className:`jump-route__wire jump-route__wire--enc`,children:(0,K.jsx)(`span`,{className:`jump-route__lock`,"aria-hidden":!0,children:`🔒`})}),(0,K.jsxs)(`span`,{className:`bg-background text-foreground inline-flex items-center gap-1.5 rounded-[7px] border px-2 py-[3px] whitespace-nowrap`,style:{borderColor:i},title:e.name,children:[(0,K.jsx)(Xc,{className:`size-3`}),` `,e.name]})]})]})}var Y7={READ:`text-success border-success/45 bg-success/10`,WRITE:`text-chart-1 border-chart-1/45 bg-chart-1/10`,WRITE_IDEMPOTENT:`text-chart-2 border-chart-2/45 bg-chart-2/10`,DESTRUCTIVE:`text-warning border-warning/45 bg-warning/10`,DANGEROUS:`text-destructive border-destructive/45 bg-destructive/10`},X7=`border-b border-border/60 px-3.5 py-[7px] text-xs [overflow-wrap:anywhere]`,Z7=Y(X7,`bg-muted/40 text-muted-foreground`),Q7=Y(X7,`text-foreground`),$7=`m-0 max-h-[40vh] overflow-auto rounded border border-border bg-background p-3 font-mono text-xs break-words whitespace-pre-wrap`,e9=`m-0 text-[11px] font-semibold tracking-wide text-muted-foreground uppercase`;function t9({event:e,onClose:t}){let[n,r]=(0,v.useState)(T7);return(0,K.jsx)(Q5,{title:(0,K.jsxs)(`span`,{className:`flex items-center gap-2.5`,children:[(0,K.jsx)(`span`,{className:Y(`inline-block rounded-full border px-2 py-px font-mono text-[10px] tracking-wide uppercase`,Y7[e.risk]??`text-muted-foreground`),children:e.risk}),(0,K.jsx)(`span`,{className:`font-mono text-[15px]`,children:e.tool}),(0,K.jsx)(ib,{text:e.tool,icon:!0,title:`Copy tool name`})]}),onClose:t,children:(0,K.jsxs)(`div`,{className:`grid gap-3`,children:[(0,K.jsxs)(`div`,{className:`grid grid-cols-[minmax(120px,0.4fr)_1fr] overflow-hidden rounded-lg border border-border font-mono`,children:[(0,K.jsx)(`div`,{className:Z7,children:`title`}),(0,K.jsx)(`div`,{className:Q7,children:e.title}),e.reason&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`div`,{className:Y(X7,`bg-muted/40 text-warning`),children:`reason`}),(0,K.jsx)(`div`,{className:Y(X7,`text-foreground italic`),children:e.reason})]}),(0,K.jsx)(`div`,{className:Z7,children:`time`}),(0,K.jsx)(`div`,{className:Q7,children:new Date(e.ts).toLocaleString(void 0,{hour12:!1})}),(0,K.jsx)(`div`,{className:Z7,children:`device`}),(0,K.jsx)(`div`,{className:Q7,children:e.device??`—`}),(0,K.jsx)(`div`,{className:Z7,children:`transport`}),(0,K.jsx)(`div`,{className:Q7,children:e.transport??`—`}),(0,K.jsx)(`div`,{className:Z7,children:`duration`}),(0,K.jsx)(`div`,{className:Q7,children:ub(e.durationMs)}),(0,K.jsx)(`div`,{className:Z7,children:`status`}),(0,K.jsx)(`div`,{className:Q7,children:(0,K.jsx)(`span`,{className:e.isError?`text-destructive`:`text-success`,children:e.isError?`error`:`ok`})}),(0,K.jsx)(`div`,{className:Z7,children:`output size`}),(0,K.jsxs)(`div`,{className:Q7,children:[db(e.outputBytes),e.truncated?` (truncated)`:``]}),(0,K.jsx)(`div`,{className:Z7,children:`structured`}),(0,K.jsx)(`div`,{className:Q7,children:e.hasStructured?`yes (renders an MCP App view)`:`no`})]}),e.error&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`h2`,{className:e9,children:`ERROR`}),(0,K.jsx)(`pre`,{className:Y($7,`text-destructive`),children:e.error})]}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,K.jsx)(`h2`,{className:e9,children:`INPUT`}),(0,K.jsx)(`span`,{className:`flex-1`}),e.input&&(0,K.jsx)(X,{type:`secondary`,size:`sm`,ghost:!0,onClick:()=>r(e=>{let t=!e;return E7(t),t}),title:n?`Showing pretty-printed JSON — click for raw`:`Showing raw JSON — click to pretty-print`,children:n?`✦ Pretty`:`{ } Raw`}),(0,K.jsx)(ib,{text:e.input,title:`Copy input JSON`})]}),e.input?(0,K.jsx)(O7,{value:D7(e.input,n)}):(0,K.jsx)(`pre`,{className:Y($7,`text-muted-foreground`),children:`—`}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,K.jsx)(`h2`,{className:e9,children:`OUTPUT`}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(ib,{text:e.output,title:`Copy output`})]}),(0,K.jsx)(`pre`,{className:Y($7,`text-muted-foreground`),children:e.output?C7(e.output):`—`})]})})}var n9=e=>e==null?`?`:db(e);function r9({d:e}){let t=e.status,n=e.history??[];return t.reachable===!0||n.length>0?(0,K.jsxs)(`div`,{className:`bg-card text-card-foreground flex flex-col gap-2.5 rounded-lg border p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(zb,{color:I7(t).color}),(0,K.jsx)(`span`,{className:`font-mono text-[13px] font-medium`,children:e.name}),e.isDefault&&(0,K.jsx)(Lb,{type:`accent`,children:`default`}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(Lb,{type:t.version?`success`:`default`,children:t.version?`v${t.version}`:`—`})]}),(0,K.jsxs)(`div`,{className:`text-muted-foreground -mt-1 font-mono text-[11px]`,children:[t.boardName??`router`,t.architecture?` · ${t.architecture}`:``,t.cpuCount?` · ${t.cpuCount} cpu`:``,t.uptime?` · up ${t.uptime}`:``]}),(0,K.jsxs)(`div`,{className:`flex justify-around gap-3.5`,children:[(0,K.jsx)(C5,{value:t.cpuLoad,label:`CPU`,color:hb.cpu}),(0,K.jsx)(C5,{value:t.memUsedPct,label:`MEM`,color:hb.mem}),(0,K.jsx)(C5,{value:t.hddUsedPct,label:`DISK`,color:hb.disk})]}),(0,K.jsxs)(`div`,{className:`grid gap-2`,children:[(0,K.jsxs)(`div`,{className:`grid gap-0.5`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground font-mono text-[10px] tracking-[0.05em] uppercase`,children:`CPU load`}),(0,K.jsx)(S5,{id:`${e.name}-cpu`,values:n.map(e=>e.cpuLoad),color:hb.cpu,maxValue:100,unit:`%`})]}),(0,K.jsxs)(`div`,{className:`grid gap-0.5`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground font-mono text-[10px] tracking-[0.05em] uppercase`,children:`Memory used`}),(0,K.jsx)(S5,{id:`${e.name}-mem`,values:n.map(e=>e.memUsedPct),color:hb.mem,maxValue:100,unit:`%`})]}),(0,K.jsxs)(`div`,{className:`grid gap-0.5`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground font-mono text-[10px] tracking-[0.05em] uppercase`,children:`Probe latency`}),(0,K.jsx)(S5,{id:`${e.name}-lat`,values:n.map(e=>e.latencyMs),color:hb.latency,unit:`ms`})]})]}),(0,K.jsxs)(`div`,{className:`text-muted-foreground font-mono text-[11px]`,children:[`RAM `,n9(t.totalMemory&&t.freeMemory?t.totalMemory-t.freeMemory:void 0),` /`,` `,n9(t.totalMemory),` · free disk `,n9(t.freeHdd)]})]}):(0,K.jsxs)(`div`,{className:`bg-card text-card-foreground flex min-h-[120px] flex-col justify-center gap-1.5 rounded-lg border p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(zb,{color:I7(t).color}),(0,K.jsx)(`span`,{className:`font-mono text-[13px] font-medium`,children:e.name}),e.isDefault&&(0,K.jsx)(Lb,{type:`accent`,children:`default`})]}),(0,K.jsx)(`p`,{className:`text-muted-foreground m-0 text-[11px]`,children:t.reachable===!1?`Offline — ${t.error??`unreachable`}`:e.mac?`Waiting for the first MAC-Telnet probe (these run every few minutes to avoid contending with tool calls)…`:`Waiting for the first health probe…`})]})}function i9(e,t){let n=(0,v.useRef)(e),r=(0,v.useRef)(t);n.current=e,r.current=t,(0,v.useEffect)(()=>{let e=!1,t=null,i=null,a=()=>{e||(i=new EventSource(pc(`/api/sse`)),i.addEventListener(`hello`,()=>r.current(`sse`)),i.addEventListener(`tool`,e=>{try{n.current(JSON.parse(e.data))}catch{}}),i.onerror=()=>{i&&i.readyState===EventSource.CONNECTING&&r.current(`off`)})},o=()=>{if(e)return;let i=location.protocol===`https:`?`wss`:`ws`;t=new WebSocket(pc(`${i}://${location.host}/api/stream`));let s=!1;t.onopen=()=>{s=!0,r.current(`ws`)},t.onerror=()=>t?.close(),t.onmessage=e=>{try{let t=JSON.parse(e.data);t.type===`event`&&t.event&&n.current(t.event)}catch{}},t.onclose=()=>{e||(r.current(`off`),s?setTimeout(o,2e3):a())}};return o(),()=>{e=!0,t?.close(),i?.close()}},[])}function a9(e){(0,v.useLayoutEffect)(()=>{let t=e.current;if(!t||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)return;document.documentElement.classList.add(`js-motion`);let n=new WeakSet,r=e=>{n.has(e)||(n.add(e),zi.set(e,{opacity:0,y:26}),G.create({trigger:e,start:`top 90%`,once:!0,onEnter:()=>zi.to(e,{opacity:1,y:0,duration:.7,ease:`power3.out`})}))},i=e=>{for(let t of e.querySelectorAll(`.reveal`))r(t)};i(t);let a=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e instanceof Element&&(e.matches(`.reveal`)&&r(e),i(e))});a.observe(t,{childList:!0,subtree:!0});let o=setInterval(()=>G.refresh(),1200),s=setTimeout(()=>clearInterval(o),7e3);return()=>{a.disconnect(),clearInterval(o),clearTimeout(s);for(let e of G.getAll())e.kill();document.documentElement.classList.remove(`js-motion`)}},[e])}function o9(e){return new Date(e).toLocaleString()}function s9(e){let t=Date.now()-e;return t<6e4?`just now`:t<36e5?`${Math.floor(t/6e4)}m ago`:t<864e5?`${Math.floor(t/36e5)}h ago`:`${Math.floor(t/864e5)}d ago`}var c9={"in-sync":`success`,drifted:`warning`,unknown:`secondary`,"no-baseline":`secondary`},l9={"in-sync":`In Sync`,drifted:`Drifted`,unknown:`Unknown`,"no-baseline":`No Baseline`};function u9({device:e,onDone:t}){let[n,r]=(0,v.useState)([]),[i,a]=(0,v.useState)(``),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(``);(0,v.useEffect)(()=>{mc(`/api/drift/history/${encodeURIComponent(e)}?limit=20`).then(e=>{r(e.snapshots),e.snapshots.length>0&&a(e.snapshots[0].id)})},[e]);let f=async()=>{if(!i)return;l(!0),d(``);let n=await hc(`/api/drift/baseline`,{device:e,snapshotId:i,label:o||void 0});l(!1),n.ok?t():d(n.error??`Failed`)};return n.length===0?(0,K.jsx)(`div`,{className:`p-2`,children:(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`No snapshots for this device. Capture one with capture_config_snapshot first.`})}):(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 p-2`,children:[(0,K.jsx)(Gb,{value:i,onValueChange:a,"aria-label":`Baseline snapshot`,className:`min-w-[200px] flex-1`,options:n.map(e=>({value:e.id,label:`${e.id} — ${o9(e.ts)} — ${e.lines} lines${e.label?` "${e.label}"`:``}`}))}),(0,K.jsx)(Vb,{placeholder:`Label (optional)`,value:o,onChange:e=>s(e.target.value),className:`w-40`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void f(),disabled:c||!i,children:c?`Setting...`:`Set as Baseline`}),u&&(0,K.jsx)(`span`,{className:`text-destructive text-xs`,children:u})]})}function d9({unified:e}){return e?(0,K.jsx)(`pre`,{className:`m-0 max-h-[500px] overflow-auto rounded bg-background p-3 font-mono text-[11px] leading-normal`,children:e.split(`
145
- `).map((e,t)=>{let n=`text-muted-foreground`;return e.startsWith(`+`)?n=`text-success bg-success/10`:e.startsWith(`-`)?n=`text-destructive bg-destructive/10`:e.startsWith(`@@`)?n=`text-brand`:e.startsWith(`/`)&&(n=`text-warning`),(0,K.jsx)(`div`,{className:Y(`px-1`,n),children:e||`\xA0`},t)})}):(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`No differences.`})}function f9({sections:e}){if(e.length===0)return null;let t=Math.max(...e.map(e=>e.added+e.removed),1);return(0,K.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:e.slice(0,15).map(e=>(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`span`,{className:`w-[220px] truncate text-[11px] text-foreground`,title:e.path,children:e.path}),(0,K.jsxs)(`div`,{className:`flex h-3.5 flex-1 overflow-hidden rounded-[3px] bg-muted`,children:[(0,K.jsx)(`div`,{className:`h-full bg-success`,style:{width:`${e.added/t*100}%`}}),(0,K.jsx)(`div`,{className:`h-full bg-destructive`,style:{width:`${e.removed/t*100}%`}})]}),(0,K.jsxs)(`span`,{className:`min-w-[60px] text-[11px] text-muted-foreground`,children:[`+`,e.added,` -`,e.removed]})]},e.path))})}function p9({attributions:e}){return e.length===0?(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`No config-related log entries found.`}):(0,K.jsx)(`div`,{className:`max-h-[250px] overflow-auto`,children:(0,K.jsxs)(By,{className:`text-[11px]`,children:[(0,K.jsx)(Vy,{children:(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Wy,{children:`Time`}),(0,K.jsx)(Wy,{children:`User`}),(0,K.jsx)(Wy,{children:`Action`}),(0,K.jsx)(Wy,{children:`Section`}),(0,K.jsx)(Wy,{children:`Log`})]})}),(0,K.jsx)(Hy,{children:e.map((e,t)=>(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Gy,{className:`whitespace-nowrap`,children:e.timestamp??`—`}),(0,K.jsx)(Gy,{children:e.user??`—`}),(0,K.jsx)(Gy,{children:(0,K.jsx)(`span`,{className:`rounded bg-muted px-1.5 py-px text-[10px]`,children:e.action??`?`})}),(0,K.jsx)(Gy,{className:`max-w-[160px] truncate`,title:e.section,children:e.section}),(0,K.jsx)(Gy,{className:`max-w-[300px] truncate text-muted-foreground`,title:e.logLine,children:e.logLine})]},t))})]})})}function m9({device:e,onClose:t,onChanged:n}){let[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(``),l=(0,v.useCallback)(async()=>{o(!0),c(``);try{let t=await mc(`/api/drift/check/${encodeURIComponent(e)}`);`error`in t?c(t.error):i(t)}catch(e){c(e instanceof Error?e.message:String(e))}o(!1)},[e]),u=async()=>{(await hc(`/api/drift/baseline`,{device:e,snapshotId:r?.baselineId,label:`promoted`})).error||n()},d=async()=>{await gc(`/api/drift/baseline/${encodeURIComponent(e)}`,{}),n()};return(0,K.jsxs)(tb,{title:`${e} — Drift Detail`,className:`reveal`,extra:(0,K.jsxs)(`div`,{className:`flex gap-2`,children:[(0,K.jsx)(X,{size:`sm`,onClick:()=>void l(),disabled:a,children:a?`Checking...`:`Check Now`}),(0,K.jsx)(X,{size:`sm`,type:`error`,ghost:!0,onClick:()=>void d(),children:`Remove Baseline`}),(0,K.jsx)(X,{size:`sm`,type:`secondary`,onClick:t,children:`Close`})]}),children:[s&&(0,K.jsx)(`div`,{className:`text-destructive`,children:s}),r&&(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`mb-3 flex items-center gap-6 border-b border-border py-3`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,K.jsx)(zb,{type:r.identical?`success`:`warning`}),(0,K.jsx)(`strong`,{children:r.identical?`In Sync`:`Drifted`})]}),!r.identical&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{children:[`Score: `,(0,K.jsx)(`strong`,{children:r.score}),`/100`]}),(0,K.jsxs)(`div`,{className:`text-success`,children:[`+`,r.summary.added]}),(0,K.jsxs)(`div`,{className:`text-destructive`,children:[`-`,r.summary.removed]}),(0,K.jsxs)(`div`,{className:`text-muted-foreground text-[11px]`,children:[r.summary.unchanged,` unchanged`]}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void u(),children:`Promote as Baseline`})]}),(0,K.jsxs)(`div`,{className:`text-muted-foreground ml-auto text-[11px]`,children:[`Checked: `,o9(r.capturedAt)]})]}),r.sections.length>0&&(0,K.jsxs)(`div`,{className:`mb-4`,children:[(0,K.jsx)(`h4`,{className:`mt-0 mb-2 text-[13px]`,children:`Sections with drift`}),(0,K.jsx)(f9,{sections:r.sections})]}),r.attributions.length>0&&(0,K.jsxs)(`div`,{className:`mb-4`,children:[(0,K.jsx)(`h4`,{className:`mt-0 mb-2 text-[13px]`,children:`Change attribution`}),(0,K.jsx)(p9,{attributions:r.attributions})]}),!r.identical&&(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`h4`,{className:`mt-0 mb-2 text-[13px]`,children:`Unified diff`}),(0,K.jsx)(d9,{unified:r.unified})]})]}),!r&&!a&&!s&&(0,K.jsx)(`p`,{className:`text-muted-foreground text-center text-[11px]`,children:`Click "Check Now" to run a live drift check against the golden baseline.`})]})}function h9(){let[e,t]=(0,v.useState)([]),[n,r]=(0,v.useState)([]),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(``),u=(0,v.useCallback)(async()=>{try{let[e,n]=await Promise.all([mc(`/api/drift/status`),mc(`/api/drift/baselines`)]);t(e.devices),r(n.baselines),l(``)}catch(e){l(e instanceof Error?e.message:String(e))}},[]);if((0,v.useEffect)(()=>{u();let e=setInterval(()=>void u(),15e3);return()=>clearInterval(e)},[u]),c&&e.length===0)return(0,K.jsx)(tb,{className:`reveal`,children:(0,K.jsx)(`p`,{className:`text-destructive`,children:c})});let d=e.filter(e=>e.status!==`no-baseline`);return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`reveal grid grid-cols-2 gap-3 sm:grid-cols-4`,children:[(0,K.jsx)(nb,{k:`Devices`,v:String(e.length)}),(0,K.jsx)(nb,{k:`With Baseline`,v:String(d.length)}),(0,K.jsx)(nb,{k:`In Sync`,v:String(e.filter(e=>e.status===`in-sync`).length)}),(0,K.jsx)(nb,{k:`Drifted`,v:String(e.filter(e=>e.status===`drifted`).length)})]}),(0,K.jsx)(tb,{title:`Fleet Drift Overview`,className:`reveal`,children:(0,K.jsx)(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(240px,1fr))] gap-3`,children:e.map(e=>(0,K.jsxs)(`div`,{onClick:()=>{e.status!==`no-baseline`&&a(e.device)},className:Y(`rounded-lg border bg-card p-4 transition-colors`,i===e.device?`border-brand`:`border-border`,e.status===`no-baseline`?`cursor-default`:`cursor-pointer hover:border-brand/40`),children:[(0,K.jsxs)(`div`,{className:`mb-2 flex justify-between`,children:[(0,K.jsx)(`strong`,{className:`text-sm`,children:e.device}),(0,K.jsx)(Lb,{type:c9[e.status],children:l9[e.status]})]}),e.baseline&&(0,K.jsxs)(`div`,{className:`text-muted-foreground text-[11px]`,children:[(0,K.jsxs)(`div`,{children:[`Baseline: `,s9(e.baseline.setAt)]}),e.baseline.label&&(0,K.jsxs)(`div`,{children:[`Label: `,e.baseline.label]})]}),e.status===`no-baseline`&&(0,K.jsx)(X,{size:`sm`,className:`mt-2`,onClick:t=>{t.stopPropagation(),s(e.device)},children:`Set Baseline`})]},e.device))})}),o&&(0,K.jsx)(tb,{title:`Set baseline for ${o}`,className:`reveal`,extra:(0,K.jsx)(X,{size:`sm`,type:`secondary`,onClick:()=>s(null),children:`Cancel`}),children:(0,K.jsx)(u9,{device:o,onDone:()=>{s(null),u()}})}),i&&(0,K.jsx)(m9,{device:i,onClose:()=>a(null),onChanged:()=>{a(null),u()}}),n.length>0&&(0,K.jsx)(tb,{title:`Baseline Manager`,className:`reveal`,children:(0,K.jsx)(`div`,{className:`overflow-x-auto`,children:(0,K.jsxs)(By,{className:`text-xs`,children:[(0,K.jsx)(Vy,{children:(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Wy,{children:`Device`}),(0,K.jsx)(Wy,{children:`Snapshot ID`}),(0,K.jsx)(Wy,{children:`Set At`}),(0,K.jsx)(Wy,{children:`Set By`}),(0,K.jsx)(Wy,{children:`Label`}),(0,K.jsx)(Wy,{children:`Size`}),(0,K.jsx)(Wy,{children:`SHA`}),(0,K.jsx)(Wy,{})]})}),(0,K.jsx)(Hy,{children:n.map(e=>(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Gy,{children:(0,K.jsx)(`strong`,{children:e.device})}),(0,K.jsx)(Gy,{className:`font-mono text-[11px]`,children:e.snapshotId}),(0,K.jsx)(Gy,{title:o9(e.setAt),children:s9(e.setAt)}),(0,K.jsx)(Gy,{children:e.setBy}),(0,K.jsx)(Gy,{children:e.label??`—`}),(0,K.jsx)(Gy,{children:e.snapshot?`${e.snapshot.lines} lines / ${e.snapshot.bytes} bytes`:`deleted`}),(0,K.jsx)(Gy,{className:`font-mono text-[10px]`,children:e.snapshot?.sha?.slice(0,8)??`—`}),(0,K.jsx)(Gy,{children:(0,K.jsx)(X,{size:`sm`,type:`error`,ghost:!0,onClick:()=>{gc(`/api/drift/baseline/${encodeURIComponent(e.device)}`,{}).then(()=>void u())},children:`Remove`})})]},e.device))})]})})}),e.length===0&&!c&&(0,K.jsx)(tb,{className:`reveal`,children:(0,K.jsx)(`p`,{className:`text-muted-foreground text-center text-[11px]`,children:`No devices configured. Add devices to start using Drift Guard.`})})]})}function g9(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)&2147483647;return t%360}var _9=[`var(--entity-1)`,`var(--entity-2)`,`var(--entity-3)`,`var(--entity-4)`,`var(--entity-5)`,`var(--entity-6)`,`var(--entity-7)`,`var(--entity-8)`,`var(--entity-9)`,`var(--entity-10)`];function v9(e){return _9[Math.abs(g9(e))%_9.length]}var y9={create_entity:`Created entity`,delete_entity:`Deleted entity`,create_relation:`Created relation`,delete_relation:`Deleted relation`,add_observation:`Added observations`,delete_observation:`Deleted observations`};function b9(e,t,n,r){let i=n/2,a=r/2,o=e.map((t,o)=>{let s=2*Math.PI*o/Math.max(e.length,1),c=Math.min(n,r)*.3;return{id:t.name,label:t.name,type:t.entityType,x:i+c*Math.cos(s),y:a+c*Math.sin(s),vx:0,vy:0,obsCount:t.observations.length}}),s=t.map(e=>({source:e.from,target:e.to,label:e.relationType})),c=new Map(o.map(e=>[e.id,e])),l=.005,u=.85;for(let e=0;e<200;e++){for(let e=0;e<o.length;e++)for(let t=e+1;t<o.length;t++){let n=o[e],r=o[t],i=n.x-r.x,a=n.y-r.y,s=Math.sqrt(i*i+a*a)||1,c=3e3/(s*s);i=i/s*c,a=a/s*c,n.vx+=i,n.vy+=a,r.vx-=i,r.vy-=a}for(let e of s){let t=c.get(e.source),n=c.get(e.target);if(!t||!n)continue;let r=n.x-t.x,i=n.y-t.y,a=r*l,o=i*l;t.vx+=a,t.vy+=o,n.vx-=a,n.vy-=o}for(let e of o)e.vx+=(i-e.x)*.001,e.vy+=(a-e.y)*.001;for(let e of o){e.vx*=u,e.vy*=u,e.x+=e.vx,e.y+=e.vy;let t=Math.max(40,e.label.length*2.7+16);e.x=Math.max(t,Math.min(n-t,e.x)),e.y=Math.max(30,Math.min(r-30,e.y))}}return{nodes:o,edges:s}}function x9({graph:e}){let t=(0,v.useRef)(null),[n,r]=(0,v.useState)(null),i=(0,v.useMemo)(()=>b9(e.entities,e.relations,700,460),[e.entities,e.relations]),a=(0,v.useMemo)(()=>new Map(i.nodes.map(e=>[e.id,e])),[i.nodes]);return e.entities.length===0?(0,K.jsx)(`div`,{className:`text-muted-foreground flex items-center justify-center`,style:{height:460},children:(0,K.jsx)(`p`,{children:`No entities yet — create some via the MCP tools.`})}):(0,K.jsxs)(`svg`,{ref:t,viewBox:`0 0 700 460`,style:{width:`100%`,height:`auto`,maxHeight:460,display:`block`},children:[(0,K.jsx)(`defs`,{children:(0,K.jsx)(`marker`,{id:`mem-arrow`,viewBox:`0 0 10 6`,refX:`10`,refY:`3`,markerWidth:`8`,markerHeight:`6`,orient:`auto-start-reverse`,children:(0,K.jsx)(`path`,{d:`M0 0 L10 3 L0 6Z`,fill:`var(--muted-foreground)`})})}),i.edges.map((e,t)=>{let r=a.get(e.source),i=a.get(e.target);if(!r||!i)return null;let o=n!=null&&(e.source===n||e.target===n),s=n!=null&&!o,c=i.x-r.x,l=i.y-r.y,u=Math.sqrt(c*c+l*l)||1,d=e=>{let t=e.label.length*5.4,n=13+Math.min(e.obsCount,6);return Math.max(n,t/2+12)},f=d(r)+4,p=d(i)+4,m=r.x+c/u*f,h=r.y+l/u*f,g=i.x-c/u*p,_=i.y-l/u*p,v=(m+g)/2,y=(h+_)/2;return(0,K.jsxs)(`g`,{opacity:s?.15:1,children:[(0,K.jsx)(`line`,{x1:m,y1:h,x2:g,y2:_,stroke:o?`var(--foreground)`:`var(--border)`,strokeWidth:o?1.8:1,markerEnd:`url(#mem-arrow)`}),(0,K.jsx)(`text`,{x:v,y:y-5,textAnchor:`middle`,fill:`var(--muted-foreground)`,fontSize:`8`,style:{pointerEvents:`none`},children:e.label})]},t)}),i.nodes.map(e=>{let t=e.id===n,i=n!=null&&!t,a=v9(e.type),o=e.label,s=o.length*5.4,c=13+Math.min(e.obsCount,6),l=Math.max(c,s/2+12),u=c;return(0,K.jsxs)(`g`,{opacity:i?.25:1,style:{cursor:`pointer`},onClick:()=>r(t?null:e.id),children:[(0,K.jsx)(`rect`,{x:e.x-l,y:e.y-c,width:l*2,height:c*2,rx:u,ry:u,fill:a,fillOpacity:.15,stroke:t?`var(--foreground)`:a,strokeWidth:t?2:1.2}),(0,K.jsx)(`text`,{x:e.x,y:e.y+1,textAnchor:`middle`,dominantBaseline:`central`,fill:`var(--foreground)`,fontSize:`9`,fontWeight:t?600:400,style:{pointerEvents:`none`},children:o}),(0,K.jsx)(`text`,{x:e.x,y:e.y+c+11,textAnchor:`middle`,fill:`var(--muted-foreground)`,fontSize:`7`,style:{pointerEvents:`none`},children:e.type})]},e.id)})]})}function S9({entity:e,relations:t,onClose:n,onDelete:r}){let i=t.filter(t=>t.to===e.name),a=t.filter(t=>t.from===e.name);return(0,K.jsxs)(`div`,{className:`rounded-lg border border-border bg-card p-5`,children:[(0,K.jsxs)(`div`,{className:`mb-2 flex items-center gap-2.5`,children:[(0,K.jsxs)(`h3`,{className:`m-0 flex items-center font-mono text-[15px]`,children:[(0,K.jsx)(zb,{color:v9(e.entityType),className:`mr-2 size-2.5`}),e.name]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{type:`error`,ghost:!0,size:`sm`,onClick:r,title:`Delete entity`,children:`Delete`}),(0,K.jsx)(X,{type:`secondary`,size:`sm`,onClick:n,children:`Close`})]}),(0,K.jsxs)(`p`,{className:`mt-0 mb-2 text-xs text-muted-foreground`,children:[`Type: `,(0,K.jsx)(`strong`,{children:e.entityType}),` · Created:`,` `,new Date(e.createdAt).toLocaleString(),` · Updated:`,` `,new Date(e.updatedAt).toLocaleString()]}),e.observations.length>0&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`h4`,{className:`mt-3 mb-1.5 text-xs text-muted-foreground`,children:[`Observations (`,e.observations.length,`)`]}),(0,K.jsx)(`ul`,{className:`m-0 pl-[18px] text-[13px]`,children:e.observations.map((e,t)=>(0,K.jsx)(`li`,{className:`mb-0.5`,children:e},t))})]}),(a.length>0||i.length>0)&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`h4`,{className:`mt-3 mb-1.5 text-xs text-muted-foreground`,children:`Relations`}),(0,K.jsxs)(`div`,{className:`text-[13px]`,children:[a.map((e,t)=>(0,K.jsxs)(`div`,{children:[`→ `,(0,K.jsx)(`strong`,{children:e.relationType}),` → `,e.to]},`o${t}`)),i.map((e,t)=>(0,K.jsxs)(`div`,{children:[`← `,(0,K.jsx)(`strong`,{children:e.relationType}),` ← `,e.from]},`i${t}`))]})]})]})}function C9({activity:e}){return e.length===0?(0,K.jsx)(`p`,{className:`text-muted-foreground text-[13px]`,children:`No activity yet.`}):(0,K.jsx)(`div`,{className:`max-h-[280px] overflow-y-auto`,children:(0,K.jsxs)(By,{className:`text-xs`,children:[(0,K.jsx)(Vy,{children:(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Wy,{children:`Time`}),(0,K.jsx)(Wy,{children:`Action`}),(0,K.jsx)(Wy,{children:`Subject`})]})}),(0,K.jsx)(Hy,{children:e.map(e=>(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Gy,{className:`whitespace-nowrap text-muted-foreground`,children:fb(e.ts)}),(0,K.jsx)(Gy,{children:y9[e.action]??e.action}),(0,K.jsx)(Gy,{className:`max-w-[260px] truncate`,children:e.subject})]},e.id))})]})})}function w9({config:e,onSaved:t}){let[n,r]=(0,v.useState)(e.dbPath),[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(``);(0,v.useEffect)(()=>{r(e.dbPath)},[e.dbPath]);let c=(0,v.useCallback)(async()=>{a(!0),s(``);try{let e=await hc(`/api/memory/config`,{dbPath:n});e.ok?(s(`Saved`),t()):s(e.error??`Failed`)}catch(e){s(String(e))}finally{a(!1)}},[n,t]);return(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`label`,{className:`mb-1 block text-xs text-muted-foreground`,children:`Database path`}),(0,K.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,K.jsx)(Vb,{type:`text`,value:n,onChange:e=>r(e.target.value),className:`flex-1 text-[13px]`}),(0,K.jsx)(X,{size:`sm`,onClick:c,disabled:i||n===e.dbPath,children:i?`Saving…`:`Save`})]}),o&&(0,K.jsx)(`p`,{className:Y(`mt-1 text-xs`,o===`Saved`?`text-success`:`text-destructive`),children:o}),e.stats&&(0,K.jsxs)(`div`,{className:`mt-3 grid grid-cols-3 gap-3`,children:[(0,K.jsx)(nb,{k:`Entities`,v:String(e.stats.entities)}),(0,K.jsx)(nb,{k:`Relations`,v:String(e.stats.relations)}),(0,K.jsx)(nb,{k:`Observations`,v:String(e.stats.observations)})]})]})}function T9(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)([]),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(``),[f,p]=(0,v.useState)(``),m=(0,v.useCallback)(async()=>{try{let[e,n,i,o]=await Promise.all([mc(`/api/memory/graph`),mc(`/api/memory/stats`),mc(`/api/memory/config`),mc(`/api/memory/activity?limit=50`)]);t(e),r(n),a(i),s(o),p(``)}catch(e){p(String(e))}},[]);(0,v.useEffect)(()=>{m();let e=setInterval(()=>void m(),1e4);return()=>clearInterval(e)},[m]);let h=(0,v.useCallback)(async()=>{if(!u.trim()){m();return}try{let e=await mc(`/api/memory/search?q=${encodeURIComponent(u)}`);t(e)}catch(e){p(String(e))}},[u,m]),g=(0,v.useCallback)(async e=>{await gc(`/api/memory/entities`,{names:[e]}),l(null),m()},[m]);return f&&!e?(0,K.jsx)(tb,{title:`Knowledge Graph`,children:(0,K.jsx)(`p`,{className:`text-destructive`,children:f})}):(0,K.jsxs)(K.Fragment,{children:[n&&(0,K.jsxs)(`div`,{className:`reveal grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-5`,children:[(0,K.jsx)(nb,{k:`Entities`,v:String(n.entities)}),(0,K.jsx)(nb,{k:`Relations`,v:String(n.relations)}),(0,K.jsx)(nb,{k:`Observations`,v:String(n.observations)}),(0,K.jsx)(nb,{k:`Entity types`,v:String(n.entityTypes.length)}),(0,K.jsx)(nb,{k:`Relation types`,v:String(n.relationTypes.length)})]}),(0,K.jsx)(tb,{title:`Knowledge Graph`,className:`reveal`,extra:(0,K.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,K.jsx)(Vb,{type:`text`,placeholder:`Search entities…`,value:u,onChange:e=>d(e.target.value),onKeyDown:e=>e.key===`Enter`&&h(),className:`w-[200px] text-xs`}),(0,K.jsx)(X,{size:`sm`,onClick:h,children:`Search`}),u&&(0,K.jsx)(X,{size:`sm`,type:`secondary`,onClick:()=>{d(``),m()},children:`Clear`})]}),children:e&&(0,K.jsx)(x9,{graph:e})}),(0,K.jsxs)(`div`,{className:`reveal grid grid-cols-2 gap-4`,children:[(0,K.jsx)(tb,{title:`Entities`,children:e&&e.entities.length>0?(0,K.jsx)(`div`,{className:`max-h-[360px] overflow-y-auto`,children:(0,K.jsxs)(By,{className:`text-xs`,children:[(0,K.jsx)(Vy,{children:(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Wy,{children:`Name`}),(0,K.jsx)(Wy,{children:`Type`}),(0,K.jsx)(Wy,{children:`Obs`}),(0,K.jsx)(Wy,{children:`Created`})]})}),(0,K.jsx)(Hy,{children:e.entities.map(e=>(0,K.jsxs)(Uy,{className:`cursor-pointer`,"data-state":c?.name===e.name?`selected`:void 0,onClick:()=>l(e),children:[(0,K.jsxs)(Gy,{children:[(0,K.jsx)(zb,{color:v9(e.entityType),className:`mr-1.5`}),e.name]}),(0,K.jsx)(Gy,{className:`text-muted-foreground`,children:e.entityType}),(0,K.jsx)(Gy,{children:e.observations.length}),(0,K.jsx)(Gy,{className:`text-muted-foreground`,children:fb(e.createdAt)})]},e.name))})]})}):(0,K.jsx)(`p`,{className:`text-muted-foreground text-[13px]`,children:e?`No entities.`:`Loading…`})}),c&&e?(0,K.jsx)(S9,{entity:c,relations:e.relations,onClose:()=>l(null),onDelete:()=>g(c.name)}):(0,K.jsx)(tb,{title:`Activity Log`,children:(0,K.jsx)(C9,{activity:o})})]}),n&&(n.entityTypes.length>0||n.relationTypes.length>0)&&(0,K.jsxs)(`div`,{className:`reveal grid grid-cols-2 gap-4`,children:[n.entityTypes.length>0&&(0,K.jsx)(tb,{title:`Entity Types`,children:(0,K.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:n.entityTypes.map(e=>(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-xl px-2.5 py-0.5 text-xs`,style:{background:`${v9(e.type)}22`,border:`1px solid ${v9(e.type)}44`},children:[(0,K.jsx)(zb,{color:v9(e.type)}),e.type,(0,K.jsxs)(`span`,{className:`text-muted-foreground`,children:[`(`,e.count,`)`]})]},e.type))})}),n.relationTypes.length>0&&(0,K.jsx)(tb,{title:`Relation Types`,children:(0,K.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:n.relationTypes.map(e=>(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-xl border border-border bg-muted px-2.5 py-0.5 text-xs`,children:[e.type,(0,K.jsxs)(`span`,{className:`text-muted-foreground`,children:[`(`,e.count,`)`]})]},e.type))})})]}),i&&(0,K.jsx)(tb,{title:`Memory Configuration`,className:`reveal`,children:(0,K.jsx)(w9,{config:i,onSaved:m})})]})}var E9=e=>Y(`flex items-start gap-2.5 rounded-md border px-[11px] py-[9px] cursor-pointer select-none transition-colors`,e?`border-brand/50 bg-brand/10`:`border-border bg-card hover:border-brand/35`);function D9({m:e,busy:t,onToggle:n}){return(0,K.jsxs)(`label`,{className:E9(e.enabled),title:e.description,children:[(0,K.jsx)(`input`,{type:`checkbox`,className:`mt-0.5 cursor-pointer accent-brand`,checked:e.enabled,disabled:t,onChange:()=>n(e.slug,!e.enabled)}),(0,K.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,K.jsxs)(`span`,{className:`flex flex-wrap items-center gap-[7px] text-xs font-semibold text-foreground`,children:[e.label,(0,K.jsx)(`code`,{className:`rounded border border-border bg-background px-[5px] py-px font-mono text-[10px] text-muted-foreground`,children:e.slug})]}),(0,K.jsx)(`span`,{className:`text-[11px] leading-[1.35] text-muted-foreground`,children:e.description})]}),(0,K.jsxs)(`span`,{className:`whitespace-nowrap pt-px font-mono text-[10px] text-muted-foreground`,children:[e.toolCount,` tool`,e.toolCount===1?``:`s`]})]})}function O9(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(new Set),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(!1),f=(0,v.useCallback)(()=>{mc(`/api/modules`).then(e=>{t(e),e.appViews!==void 0&&l(e.appViews)}).catch(()=>a(`could not load modules`))},[]);(0,v.useEffect)(()=>f(),[f]);let p=e=>t(t=>t?{...t,...e}:e),m=(0,v.useCallback)(async(e,n)=>{r(t=>new Set(t).add(e)),t(t=>t&&{...t,modules:t.modules.map(t=>t.slug===e?{...t,enabled:n}:t)});let i=await hc(`/api/modules/toggle`,{slug:e,enabled:n}).catch(()=>({error:`request failed`}));if(r(t=>{let n=new Set(t);return n.delete(e),n}),i.error||i.ok===!1){a(i.error??`toggle failed`),f();return}p(i);let o=i.persisted?`saved to config`:`applied live (not saved)`,s=i.warning?` ⚠ ${i.warning}`:``;a(`${e} ${n?`enabled`:`disabled`} — ${o}. Reconnect the MCP client (or restart the server) for the tool list to update.${s}`)},[f]),h=(0,v.useCallback)(async(e,t)=>{for(let n of e)await m(n,t)},[m]),g=(0,v.useCallback)(async e=>{d(!0),l(e);let t=await hc(`/api/modules/app-views`,{enabled:e}).catch(()=>({error:`request failed`}));if(d(!1),`error`in t&&t.error){a(t.error),l(!e);return}`appViews`in t&&t.appViews!==void 0&&l(t.appViews);let n=`persisted`in t&&t.persisted?`saved to config`:`applied live (not saved)`,r=`warning`in t&&t.warning?` — ${t.warning}`:``;a(`App views ${e?`enabled`:`disabled`} — ${n}. Restart the server for the change to take effect.${r}`)},[]),_=(0,v.useMemo)(()=>{if(!e)return[];let t=o.trim().toLowerCase(),n=e=>!t||e.slug.toLowerCase().includes(t)||e.label.toLowerCase().includes(t)||e.group.toLowerCase().includes(t)||e.description.toLowerCase().includes(t),r=new Map;for(let t of e.modules){if(!n(t))continue;let e=r.get(t.group)??[];e.push(t),r.set(t.group,e)}return[...r.entries()].map(([e,t])=>({group:e,modules:t}))},[e,o]);if(!e)return(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`loading modules…`});let y=_.reduce((e,t)=>e+t.modules.length,0);return(0,K.jsx)(`section`,{className:`grid content-start gap-[18px]`,children:(0,K.jsxs)(tb,{title:`Tool modules`,className:`reveal`,extra:(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[e.enabledModules,`/`,e.total,` modules · `,e.enabledTools,`/`,e.totalTools,` `,`tools exposed`]}),(0,K.jsx)(X,{size:`sm`,ghost:!0,icon:(0,K.jsx)(Zc,{}),onClick:f,children:`Refresh`})]}),children:[(0,K.jsxs)(`label`,{className:Y(E9(c),`mb-2.5`),title:`Emit MCP App view metadata (_meta.ui) on read tools`,children:[(0,K.jsx)(`input`,{type:`checkbox`,className:`mt-0.5 cursor-pointer accent-brand`,checked:c,disabled:u,onChange:()=>void g(!c)}),(0,K.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,K.jsx)(`span`,{className:`flex flex-wrap items-center gap-[7px] text-xs font-semibold text-foreground`,children:`MCP App Views`}),(0,K.jsxs)(`span`,{className:`text-[11px] leading-[1.35] text-muted-foreground`,children:[`When on, read tools emit interactive table/detail widgets via `,(0,K.jsx)(`code`,{children:`_meta.ui`}),`. Disable to keep the LLM context lean. Requires server restart.`]})]})]}),(0,K.jsxs)(`div`,{className:`mb-2.5 flex flex-wrap gap-3 font-mono text-[11px] text-muted-foreground`,children:[(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-[5px]`,children:[`writes to: `,(0,K.jsx)(`code`,{children:e.source?.path??`config file`})]}),(0,K.jsx)(`span`,{className:`inline-flex items-center gap-[5px]`,children:e.hasAllowList?`allow-list active`:`all modules on by default`})]}),(0,K.jsxs)(`p`,{className:`mb-3 text-muted-foreground text-xs`,children:[`Toggle a module to expose or hide all of its tools. Disabling adds it to`,` `,(0,K.jsx)(`code`,{children:`tools.disabledModules`}),` in your config file; enabling removes it (or adds it to`,` `,(0,K.jsx)(`code`,{children:`tools.enabledModules`}),` when an allow-list is in force). Trimming the surface below ~150–200 tools makes every remaining tool reliably findable by the MCP client. The client must reconnect for changes to take effect.`]}),(0,K.jsxs)(`div`,{className:`mb-1.5 flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(Vb,{placeholder:`Filter modules by name, slug, group or description…`,value:o,onChange:e=>s(e.target.value)}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void h(e.modules.filter(e=>!e.enabled).map(e=>e.slug),!0),children:`Enable all`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void h(e.modules.filter(e=>e.enabled).map(e=>e.slug),!1),children:`Disable all`})]}),i&&(0,K.jsx)(`div`,{className:`mt-3 font-mono text-xs text-muted-foreground`,children:i}),y===0?(0,K.jsxs)(`div`,{className:`p-3 text-muted-foreground text-[11px]`,children:[`No modules match “`,o,`”.`]}):(0,K.jsx)(`div`,{className:`mt-3 flex flex-col gap-[18px]`,children:_.map(({group:e,modules:t})=>{let r=t.filter(e=>e.enabled).length,i=t.map(e=>e.slug);return(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`mb-2 flex items-center gap-2.5 border-b border-border pb-1.5`,children:[(0,K.jsx)(`h3`,{className:`m-0 text-[13px] font-semibold text-foreground`,children:e}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[r,`/`,t.length,` on`]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void h(i.filter(e=>{let n=t.find(t=>t.slug===e);return n?!n.enabled:!1}),!0),children:`Enable group`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void h(i.filter(e=>{let n=t.find(t=>t.slug===e);return n?n.enabled:!1}),!1),children:`Disable group`})]}),(0,K.jsx)(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(min(100%,360px),1fr))] gap-2`,children:t.map(e=>(0,K.jsx)(D9,{m:e,busy:n.has(e.slug),onToggle:(e,t)=>void m(e,t)},e.slug))})]},e)})})]})})}var k9={TCP:`var(--chart-1)`,UDP:`var(--chart-2)`,ICMP:`var(--chart-3)`,ICMPv6:`var(--chart-3)`,ARP:`var(--chart-4)`,IPv6:`var(--chart-5)`},A9=e=>e&&k9[e]||`var(--muted-foreground)`;function j9(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(!1);(0,v.useEffect)(()=>{let e=()=>void mc(`/api/capture/packets?limit=150`).then(t).catch(()=>{});e();let n=setInterval(e,1500);return()=>clearInterval(n)},[]);let i=e?.stats,a=e?.packets??[],o=async()=>{r(!0),await hc(`/api/capture/stop`,{}).catch(()=>{}),r(!1)};if(!i||!i.running&&i.packets===0)return(0,K.jsxs)(`div`,{className:`text-muted-foreground text-[13px] leading-relaxed`,children:[`No capture running. Start one with the`,` `,(0,K.jsx)(`code`,{className:`text-brand font-mono`,children:`start_packet_capture`}),` tool — point the device's TZSP stream at this host — and decoded packets stream in here live.`]});let s=Math.max(1,...Object.values(i.protocols));return(0,K.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2.5`,children:[(0,K.jsx)(zb,{color:i.running?`var(--success)`:`var(--muted-foreground)`,pulse:i.running}),(0,K.jsx)(`b`,{children:i.running?`capturing`:`stopped`}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[`UDP `,i.port]}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[pb(i.packets),` pkts · `,db(i.bytes)]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsxs)(`a`,{className:`bg-card hover:bg-accent inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-xs whitespace-nowrap`,href:pc(`/api/capture/pcap`),download:`capture.pcap`,children:[(0,K.jsx)(Lc,{className:`size-3.5`}),` pcap`]}),(0,K.jsx)(X,{type:`error`,ghost:!0,size:`sm`,icon:(0,K.jsx)(tl,{className:`size-3.5`}),onClick:()=>void o(),disabled:n||!i.running,children:`Stop`})]}),(0,K.jsxs)(`div`,{className:`grid grid-cols-[220px_1fr] gap-3 max-[720px]:grid-cols-1`,children:[(0,K.jsxs)(`div`,{className:`flex flex-col gap-[5px]`,children:[(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px] tracking-[0.05em] uppercase`,children:`Protocols`}),Object.entries(i.protocols).map(([e,t])=>(0,K.jsxs)(`div`,{className:`grid grid-cols-[52px_1fr_34px] items-center gap-1.5 font-mono text-[11px]`,children:[(0,K.jsx)(`span`,{style:{color:A9(e)},children:e}),(0,K.jsx)(`span`,{className:`bg-muted h-2 overflow-hidden rounded-full`,children:(0,K.jsx)(`i`,{className:`block h-full rounded-full`,style:{width:`${t/s*100}%`,background:A9(e)}})}),(0,K.jsx)(`span`,{className:`text-muted-foreground text-right`,children:t})]},e)),(0,K.jsx)(`div`,{className:`text-muted-foreground mt-3 text-[11px] tracking-[0.05em] uppercase`,children:`Top talkers`}),i.topTalkers.length===0&&(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`—`}),i.topTalkers.map(e=>(0,K.jsxs)(`div`,{className:`text-muted-foreground flex justify-between font-mono text-[11px] [&>b]:text-foreground`,children:[(0,K.jsx)(`span`,{children:e.addr}),(0,K.jsx)(`b`,{children:e.count})]},e.addr))]}),(0,K.jsx)(`div`,{className:`bg-background h-[360px] overflow-y-auto rounded-md border font-mono text-[11px]/[1.6]`,children:a.length===0?(0,K.jsx)(`div`,{className:`text-muted-foreground p-2.5 text-[11px]`,children:`waiting for packets…`}):a.map((e,t)=>(0,K.jsxs)(`div`,{className:`grid grid-cols-[90px_64px_48px_1fr] gap-2 overflow-hidden px-2.5 py-px whitespace-nowrap odd:bg-card/40`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:fb(e.ts)}),(0,K.jsx)(`span`,{className:`font-semibold`,style:{color:A9(e.protocol)},children:e.protocol??e.ethType}),(0,K.jsx)(`span`,{className:`text-muted-foreground text-right`,children:e.len}),(0,K.jsx)(`span`,{className:`text-foreground overflow-hidden text-ellipsis`,children:e.info})]},t))})]})]})}function M9(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(null),c=(0,v.useCallback)(()=>{mc(`/api/s3/list`).then(t).catch(()=>t({configured:!1,objects:[]}))},[]);(0,v.useEffect)(()=>c(),[c]);let l=e=>{mc(`/api/s3/presign?key=${encodeURIComponent(e)}`).then(e=>{e.url?window.open(e.url,`_blank`,`noopener`):s(`could not generate download link`)}).catch(()=>s(`could not generate download link`))},u=async e=>{a(e);let t=await hc(`/api/s3/delete`,{key:e}).catch(()=>({error:`request failed`}));a(null),r(null),t.ok?(s(`Deleted ${e}`),c()):s(t.error??`delete failed`)};return e?e.configured?(0,K.jsx)(`section`,{className:`grid content-start gap-[18px]`,children:(0,K.jsxs)(tb,{title:`S3 backups`,className:`reveal`,extra:(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[e.target,` · `,e.objects.length,` object`,e.objects.length===1?``:`s`,e.truncated?` (truncated)`:``]}),(0,K.jsx)(X,{size:`sm`,ghost:!0,icon:(0,K.jsx)(Zc,{}),onClick:c,children:`Refresh`})]}),children:[o&&(0,K.jsx)(`div`,{className:`font-mono text-xs text-muted-foreground`,children:o}),e.objects.length===0?(0,K.jsxs)(`div`,{className:`p-3 text-muted-foreground text-[11px]`,children:[`No objects in the bucket. Upload one with the `,(0,K.jsx)(`code`,{children:`upload_backup_to_s3`}),` tool.`]}):(0,K.jsxs)(By,{className:`font-mono`,children:[(0,K.jsx)(Vy,{children:(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Wy,{children:`key`}),(0,K.jsx)(Wy,{className:`text-right tabular-nums`,children:`size`}),(0,K.jsx)(Wy,{children:`modified`}),(0,K.jsx)(Wy,{className:`w-[200px]`,children:`actions`})]})}),(0,K.jsx)(Hy,{children:e.objects.map(e=>(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Gy,{children:e.key}),(0,K.jsx)(Gy,{className:`text-right tabular-nums`,children:db(e.size)}),(0,K.jsx)(Gy,{children:e.lastModified?new Date(e.lastModified).toLocaleString(void 0,{hour12:!1}):`—`}),(0,K.jsxs)(Gy,{className:`flex gap-1.5`,onClick:e=>e.stopPropagation(),children:[(0,K.jsx)(X,{size:`sm`,ghost:!0,icon:(0,K.jsx)(Lc,{}),onClick:()=>l(e.key),children:`Download`}),n===e.key?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(X,{size:`sm`,type:`error`,ghost:!0,icon:(0,K.jsx)(kc,{}),disabled:i===e.key,onClick:()=>void u(e.key),children:`Confirm`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>r(null),children:`Cancel`})]}):(0,K.jsx)(X,{size:`sm`,ghost:!0,icon:(0,K.jsx)(il,{}),onClick:()=>r(e.key),children:`Delete`})]})]},e.key))})]})]})}):(0,K.jsxs)(`div`,{className:`grid justify-items-center gap-2 rounded-lg border border-dashed border-border px-4 py-[54px] text-center`,children:[(0,K.jsx)(Pc,{className:`size-7 text-muted-foreground opacity-80`}),(0,K.jsx)(`p`,{className:`m-0 font-semibold text-foreground`,children:`S3 is not configured`}),(0,K.jsxs)(`p`,{className:`m-0 max-w-[460px] text-muted-foreground text-xs`,children:[`Add an `,(0,K.jsx)(`code`,{children:`s3`}),` block (bucket + credentials) to your config to manage backup objects here.`]})]}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`loading S3 objects…`})}function N9(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)(``),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(null),u=(0,v.useCallback)(()=>{mc(`/api/snapshots`).then(e=>t(e.snapshots)).catch(()=>t([]))},[]);(0,v.useEffect)(()=>u(),[u]);let d=e=>{mc(`/api/snapshot/${encodeURIComponent(e)}`).then(s).catch(()=>{})},f=()=>{!n||!i||hc(`/api/snapshots/diff`,{from:n,to:i}).then(l).catch(()=>{})};if(!e)return(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`loading snapshots…`});if(e.length===0)return(0,K.jsxs)(`div`,{className:`grid justify-items-center gap-2 rounded-lg border border-dashed border-border px-4 py-[54px] text-center`,children:[(0,K.jsx)(zc,{className:`size-7 text-muted-foreground`}),(0,K.jsx)(`p`,{className:`font-semibold text-foreground`,children:`No config snapshots yet`}),(0,K.jsxs)(`p`,{className:`max-w-[460px] text-xs text-muted-foreground`,children:[`Capture one with the `,(0,K.jsx)(`code`,{children:`capture_config_snapshot`}),` tool — then time-travel diff any two here.`]})]});let p=e.map(e=>({value:e.id,label:`${e.device} · ${e.label??e.id} · ${fb(e.ts)}`}));return(0,K.jsxs)(`section`,{className:`grid content-start gap-[18px]`,children:[(0,K.jsxs)(tb,{title:`Config snapshots`,className:`reveal`,extra:(0,K.jsx)(X,{size:`sm`,icon:(0,K.jsx)(Zc,{}),onClick:u,children:`Refresh`}),children:[(0,K.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(Gb,{value:n,onValueChange:r,"aria-label":`Diff from snapshot`,options:[{value:``,label:`diff from…`},...p]}),(0,K.jsx)(Gb,{value:i,onValueChange:a,"aria-label":`Diff to snapshot`,options:[{value:``,label:`to…`},...p]}),(0,K.jsx)(X,{size:`sm`,onClick:f,disabled:!n||!i,children:`Diff →`}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[e.length,` snapshots`]})]}),(0,K.jsx)(`div`,{className:`max-h-[60vh] overflow-auto rounded-lg border border-border`,children:(0,K.jsxs)(By,{children:[(0,K.jsx)(Vy,{className:`sticky top-0 z-10 bg-card`,children:(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Wy,{children:`captured`}),(0,K.jsx)(Wy,{children:`device`}),(0,K.jsx)(Wy,{children:`label`}),(0,K.jsx)(Wy,{children:`version`}),(0,K.jsx)(Wy,{className:`text-right`,children:`lines`}),(0,K.jsx)(Wy,{className:`text-right`,children:`size`}),(0,K.jsx)(Wy,{children:`output`})]})}),(0,K.jsx)(Hy,{children:e.map(e=>(0,K.jsxs)(Uy,{className:`cursor-pointer`,"data-state":o?.id===e.id?`selected`:void 0,onClick:()=>d(e.id),children:[(0,K.jsx)(Gy,{children:fb(e.ts)}),(0,K.jsx)(Gy,{children:e.device}),(0,K.jsx)(Gy,{children:e.label??`—`}),(0,K.jsx)(Gy,{children:e.rosVersion??`—`}),(0,K.jsx)(Gy,{className:`text-right tabular-nums`,children:e.lines}),(0,K.jsx)(Gy,{className:`text-right tabular-nums`,children:db(e.bytes)}),(0,K.jsx)(Gy,{className:`max-w-[320px] truncate text-muted-foreground`,children:`view export →`})]},e.id))})]})})]}),c&&(0,K.jsx)(tb,{title:`Time-travel diff`,className:`reveal`,extra:(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:c.summary.changed?`+${c.summary.added} / -${c.summary.removed}`:`identical`}),children:(0,K.jsx)(`pre`,{className:`m-0 max-h-80 overflow-auto rounded bg-background p-3 font-mono text-[11px] leading-normal text-muted-foreground`,children:(c.unified||`(identical)`).split(`
146
- `).map((e,t)=>(0,K.jsx)(`div`,{className:e.startsWith(`+`)?`text-success`:e.startsWith(`-`)?`text-destructive`:e.startsWith(`@@`)?`text-brand`:``,children:e||` `},t))})}),o&&(0,K.jsx)(tb,{title:`Snapshot · ${o.label??o.id}`,className:`reveal`,extra:(0,K.jsx)(X,{type:`secondary`,size:`sm`,icon:(0,K.jsx)(cl,{}),onClick:()=>s(null),children:`Close`}),children:(0,K.jsx)(`pre`,{className:`m-0 overflow-auto rounded border border-border bg-background p-3 font-mono text-xs break-words whitespace-pre-wrap`,style:{maxHeight:460},children:o.body||`(empty)`})})]})}function P9({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,K.jsx)(M_,{"data-slot":`separator`,decorative:n,orientation:t,className:Y(`shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px`,e),...r})}var F9=` hub`;function I9(e){let t=e;for(;t>Math.PI;)t-=Math.PI*2;for(;t<-Math.PI;)t+=Math.PI*2;return t}function wee(e,t,n){let r=new Map,i=new Map;r.set(F9,{x:450,y:310});let a=e.length<=1?110:Math.min(170,96+e.length*7),o=a+(e.length<=1?190:155);e.forEach((t,n)=>{let o=e.length===1?-Math.PI/2:n/e.length*Math.PI*2-Math.PI/2;i.set(t.id,o),r.set(t.id,{x:450+a*Math.cos(o),y:310+a*Math.sin(o)})});let s=new Map,c=new Map;for(let e of t){let t=n.get(e.id)??``,r=i.get(t)??-Math.PI/2,a=s.get(t)??0;s.set(t,a+1),c.set(e.id,r+Math.ceil(a/2)*(a%2==0?1:-1)*.34)}for(let e=0;e<10;e++)for(let e of t){let r=0;for(let n of t){if(e.id===n.id)continue;let t=I9((c.get(e.id)??0)-(c.get(n.id)??0)),i=Math.abs(t)*o;i<1?r+=e.id<n.id?.02:-.02:i<120&&(r+=Math.sign(t)*2600/(i*i*o))}let a=I9((i.get(n.get(e.id)??``)??-Math.PI/2)-(c.get(e.id)??0));c.set(e.id,(c.get(e.id)??0)+r+a*.06)}for(let e of t){let t=c.get(e.id)??0;r.set(e.id,{x:450+o*Math.cos(t),y:310+o*Math.sin(t)})}return{pos:r,rInner:a,rOuter:o}}function L9(e,t){let n=2*Math.PI*e,r=Math.min(100,Math.max(0,t??0))/100*n;return`${r} ${n-r}`}function Tee(e,t=7){let n=t*Math.PI/180,r=e*Math.cos(n),i=e*Math.sin(n);return`M 450 310 L ${450+r} ${310-i} A ${e} ${e} 0 0 1 ${450+r} ${310+i} Z`}function R9(e){return e==null?`var(--muted-foreground)`:e>=85?`var(--destructive)`:e>=60?`var(--warning)`:`var(--chart-2)`}function Eee(e){return e.reachable===!0?`var(--chart-2)`:e.reachable===!1?`var(--destructive)`:e.kind===`device`?`var(--muted-foreground)`:`var(--border)`}function Dee({topo:e,onOnboard:t}){let[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)({x:0,y:0,k:1}),[f,p]=(0,v.useState)(!1),m=(0,v.useRef)(null),h=(0,v.useRef)(null),g=(0,v.useMemo)(()=>e.nodes.filter(e=>e.kind===`device`),[e.nodes]),_=(0,v.useMemo)(()=>e.nodes.filter(e=>e.kind===`neighbor`),[e.nodes]),y=(0,v.useMemo)(()=>{let t=new Map,n=new Set(_.map(e=>e.id));for(let r of e.edges)n.has(r.to)&&!t.has(r.to)&&t.set(r.to,r.from);return t},[e.edges,_]),{pos:b,rInner:x,rOuter:S}=(0,v.useMemo)(()=>wee(g,_,y),[g,_,y]),C=(0,v.useMemo)(()=>new Map(e.nodes.map(e=>[e.id,e])),[e.nodes]),w=n?C.get(n):null,T=(0,v.useMemo)(()=>{let t=new Map,n=(e,n)=>{t.has(e)||t.set(e,new Set([e])),t.get(e).add(n)};for(let e of g)n(e.id,F9),n(F9,e.id);for(let t of e.edges)n(t.from,t.to),n(t.to,t.from);return t},[e.edges,g]),E=o.trim().toLowerCase(),D=(0,v.useCallback)(e=>c&&!e.onboardable?!1:E?[e.label,e.id,e.ip,e.mac,e.board,e.identity].filter(e=>!!e).some(e=>e.toLowerCase().includes(E)):!0,[E,c]),O=i?T.get(i):null,k=e=>{if(O)return!O.has(e);if(e===` hub`)return!1;let t=C.get(e);return t?!D(t):!1},A=e=>{let t=h.current?.getBoundingClientRect();if(!t)return;let n=(e.clientX-t.left)/t.width*900,r=(e.clientY-t.top)/t.height*620;d(t=>{let i=Math.min(3,Math.max(.5,t.k*(e.deltaY<0?1.12:1/1.12))),a=i/t.k;return{k:i,x:n-(n-t.x)*a,y:r-(r-t.y)*a}})},j=e=>{m.current={px:e.clientX,py:e.clientY,ox:u.x,oy:u.y},p(!0)},M=e=>{let t=m.current,n=h.current?.getBoundingClientRect();if(!t||!n)return;let r=900/n.width*(e.clientX-t.px),i=620/n.height*(e.clientY-t.py);d(e=>({...e,x:t.ox+r,y:t.oy+i}))},N=()=>{m.current=null,p(!1)},P=e=>d(t=>{let n=Math.min(3,Math.max(.5,t.k*e)),r=n/t.k;return{k:n,x:450-(450-t.x)*r,y:310-(310-t.y)*r}}),F=g.map(e=>({from:F9,to:e.id,interface:void 0}));return(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,K.jsxs)(`div`,{className:`relative min-w-[200px] flex-1`,children:[(0,K.jsx)(Qc,{className:`text-muted-foreground pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2`}),(0,K.jsx)(Vb,{className:`pl-8`,type:`search`,placeholder:`Filter by name, identity, IP, MAC or board…`,value:o,onChange:e=>s(e.target.value)})]}),(0,K.jsxs)(X,{size:`sm`,ghost:!0,type:c?`accent`:`default`,onClick:()=>l(e=>!e),title:`Dim everything except neighbours that can be onboarded`,icon:(0,K.jsx)(Yc,{}),children:[`Onboardable`,e.stats.onboardable>0?` (${e.stats.onboardable})`:``]}),(0,K.jsx)(P9,{orientation:`vertical`,className:`h-6`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>P(1/1.25),"aria-label":`Zoom out`,icon:(0,K.jsx)(Hc,{})}),(0,K.jsxs)(`span`,{className:`text-muted-foreground w-11 text-center font-mono text-[11px] tabular-nums`,children:[Math.round(u.k*100),`%`]}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>P(1.25),"aria-label":`Zoom in`,icon:(0,K.jsx)(Jc,{})}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>d({x:0,y:0,k:1}),title:`Reset view`,icon:(0,K.jsx)(Ic,{}),children:`Reset`})]}),(0,K.jsxs)(`div`,{className:`bg-card relative overflow-hidden rounded-xl border`,children:[(0,K.jsxs)(`svg`,{ref:h,viewBox:`0 0 900 620`,width:`100%`,height:560,preserveAspectRatio:`xMidYMid meet`,className:Y(`block w-full touch-none select-none`,f?`cursor-grabbing`:`cursor-grab`),onWheel:A,onPointerDown:j,onPointerMove:M,onPointerUp:N,onPointerLeave:N,onClick:()=>r(null),style:{background:`radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--brand) 7%, transparent), transparent 62%)`},children:[(0,K.jsxs)(`defs`,{children:[(0,K.jsxs)(`linearGradient`,{id:`topo-beam`,x1:`0`,y1:`0`,x2:`1`,y2:`0`,children:[(0,K.jsx)(`stop`,{offset:`0`,stopColor:`var(--brand)`,stopOpacity:`0.3`}),(0,K.jsx)(`stop`,{offset:`1`,stopColor:`var(--brand)`,stopOpacity:`0`})]}),(0,K.jsxs)(`radialGradient`,{id:`topo-hub`,cx:`0.5`,cy:`0.35`,r:`0.75`,children:[(0,K.jsx)(`stop`,{offset:`0`,stopColor:`var(--foreground)`}),(0,K.jsx)(`stop`,{offset:`1`,stopColor:`var(--muted-foreground)`})]})]}),(0,K.jsxs)(`g`,{transform:`translate(${u.x},${u.y}) scale(${u.k})`,children:[(0,K.jsx)(`g`,{className:`topo-ring`,children:[x,S,S+62].map(e=>(0,K.jsx)(`circle`,{cx:450,cy:310,r:e,fill:`none`,className:`stroke-border/70`,strokeDasharray:`2 8`},e))}),(0,K.jsx)(`g`,{className:`topo-sweep`,style:{transformOrigin:`450px 310px`},children:(0,K.jsx)(`path`,{d:Tee(S+62),fill:`url(#topo-beam)`})}),[...F,...e.edges].map((t,n)=>{let r=b.get(t.from),i=b.get(t.to);if(!r||!i)return null;let a=C.get(t.to)?.kind===`neighbor`,o=k(t.from)||k(t.to),s=-(i.y-r.y),c=i.x-r.x,l=Math.hypot(s,c)||1,u=a?16:8,d=(r.x+i.x)/2+s/l*u,f=(r.y+i.y)/2+c/l*u;return(0,K.jsx)(`path`,{d:`M ${r.x} ${r.y} Q ${d} ${f} ${i.x} ${i.y}`,fill:`none`,strokeWidth:a?1.2:1.6,strokeDasharray:a?`4 4`:`6 10`,className:Y(`transition-opacity`,a?`stroke-brand/55`:`topo-flow stroke-chart-2/70`,o&&`opacity-15`),children:(0,K.jsxs)(`title`,{children:[t.from===` hub`?e.server:t.from,` → `,t.to,t.interface?` (${t.interface})`:``]})},`e-${n}`)}),(0,K.jsxs)(`g`,{className:Y(`transition-opacity`,O&&!O.has(` hub`)&&`opacity-15`),onMouseEnter:()=>a(F9),onMouseLeave:()=>a(null),children:[(0,K.jsx)(`circle`,{cx:450,cy:310,r:40,className:`fill-brand/15`}),(0,K.jsx)(`circle`,{cx:450,cy:310,r:27,fill:`url(#topo-hub)`,className:`stroke-border`}),(0,K.jsx)($c,{x:441,y:295,width:18,height:18,className:`stroke-background pointer-events-none`}),(0,K.jsx)(`text`,{x:450,y:326,textAnchor:`middle`,className:`fill-background pointer-events-none font-mono text-[8px] font-bold`,children:`MCP`}),(0,K.jsx)(`text`,{x:450,y:368,textAnchor:`middle`,className:`fill-muted-foreground pointer-events-none font-mono text-[10px]`,children:e.server})]}),e.nodes.map(e=>{let t=b.get(e.id);if(!t)return null;let i=e.kind===`device`,o=n===e.id,s=k(e.id),c=Eee(e),l=i?26:15;return(0,K.jsxs)(`g`,{transform:`translate(${t.x},${t.y})`,className:Y(`cursor-pointer transition-opacity`,s&&`opacity-15`),onMouseEnter:()=>a(e.id),onMouseLeave:()=>a(null),onClick:t=>{t.stopPropagation(),r(t=>t===e.id?null:e.id)},children:[o&&(0,K.jsx)(`circle`,{r:l+8,className:`topo-halo stroke-brand fill-none`,strokeWidth:2}),i?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`circle`,{r:l+7,className:`stroke-border/60 fill-none`,strokeWidth:3}),(0,K.jsx)(`circle`,{r:l+7,fill:`none`,strokeWidth:3,strokeLinecap:`round`,transform:`rotate(-90)`,style:{stroke:R9(e.cpuLoad)},strokeDasharray:L9(l+7,e.cpuLoad)}),(0,K.jsx)(`circle`,{r:l+2,className:`stroke-border/40 fill-none`,strokeWidth:2}),(0,K.jsx)(`circle`,{r:l+2,fill:`none`,strokeWidth:2,strokeLinecap:`round`,transform:`rotate(-90)`,style:{stroke:R9(e.memUsedPct)},strokeDasharray:L9(l+2,e.memUsedPct)}),(0,K.jsx)(`circle`,{r:l-4,className:`fill-muted`,style:{stroke:c},strokeWidth:1.6}),(0,K.jsx)(`text`,{textAnchor:`middle`,y:3,className:`fill-foreground pointer-events-none font-mono text-[9px] font-bold`,children:(e.label||e.id).slice(0,4).toUpperCase()})]}):(0,K.jsxs)(K.Fragment,{children:[e.onboardable&&(0,K.jsx)(`circle`,{r:l+5,className:`topo-pulse fill-brand/25`}),(0,K.jsx)(`rect`,{x:-l*.72,y:-l*.72,width:l*1.44,height:l*1.44,rx:3,transform:`rotate(45)`,className:`fill-card`,style:{stroke:c},strokeWidth:1.4,strokeDasharray:e.onboardable?`3 2`:void 0}),e.onboardable&&(0,K.jsx)(Jc,{x:-5,y:-5,width:10,height:10,className:`stroke-brand pointer-events-none`})]}),(0,K.jsx)(`text`,{textAnchor:`middle`,y:l+(i?22:18),className:`fill-foreground pointer-events-none font-mono text-[10px]`,children:(e.label||e.id).slice(0,18)}),i&&(0,K.jsx)(`text`,{textAnchor:`middle`,y:l+34,className:`fill-muted-foreground pointer-events-none font-mono text-[9px]`,children:e.ip||e.board||``})]},e.id)})]})]}),(0,K.jsxs)(`div`,{className:`text-muted-foreground pointer-events-none absolute top-3 left-3 flex flex-col gap-1 font-mono text-[10px]`,children:[(0,K.jsx)(`span`,{className:`text-foreground text-[11px] font-semibold`,children:`Layer-2 fabric`}),(0,K.jsxs)(`span`,{children:[e.stats.devices,` managed · `,e.stats.neighbors,` discovered`]}),e.stats.onboardable>0&&(0,K.jsxs)(`span`,{className:`text-brand`,children:[e.stats.onboardable,` awaiting onboard`]})]}),(0,K.jsxs)(`div`,{className:`text-muted-foreground pointer-events-none absolute right-3 bottom-3 flex flex-col items-end gap-1 font-mono text-[10px]`,children:[(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(`i`,{className:`bg-chart-2 inline-block size-2 rounded-full`}),` online`]}),(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(`i`,{className:`bg-destructive inline-block size-2 rounded-full`}),` offline`]}),(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(`i`,{className:`border-border inline-block size-2 rotate-45 border`}),` neighbour`]}),(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(`i`,{className:`bg-brand/40 inline-block size-2 rounded-full`}),` onboardable`]})]})]}),w&&(0,K.jsx)(Oee,{node:w,onClose:()=>r(null),onOnboard:t})]})}function Oee({node:e,onClose:t,onOnboard:n}){let r=e.suggestedConfig?JSON.stringify({[e.suggestedConfig.name]:z9(e.suggestedConfig)},null,2):null,i=[[`identity`,e.identity],[`address`,e.ip],[`mac`,e.mac],[`board`,e.board],[`platform`,e.platform],[`version`,e.version],[`uptime`,e.uptime]].filter(e=>!!e[1]);return(0,K.jsxs)(`div`,{className:`bg-card rounded-xl border p-4`,children:[(0,K.jsxs)(`div`,{className:`mb-2 flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(`strong`,{className:`font-mono text-sm`,children:e.label||e.id}),(0,K.jsx)(xb,{variant:e.kind===`device`?`secondary`:`outline`,children:e.kind}),e.onboardable&&(0,K.jsx)(xb,{className:`bg-brand text-brand-foreground`,children:`onboardable`}),e.reachable===!1&&(0,K.jsx)(xb,{variant:`destructive`,children:`offline`}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{ghost:!0,size:`sm`,icon:(0,K.jsx)(cl,{}),onClick:t,"aria-label":`Close`})]}),(0,K.jsx)(`div`,{className:`text-muted-foreground grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 font-mono text-[11px]`,children:i.length===0?(0,K.jsx)(`span`,{children:`no details advertised`}):i.map(([e,t])=>(0,K.jsxs)(v.Fragment,{children:[(0,K.jsx)(`span`,{children:e}),(0,K.jsx)(`span`,{className:`text-foreground break-all`,children:t})]},e))}),e.kind===`device`&&(e.cpuLoad!=null||e.memUsedPct!=null)&&(0,K.jsxs)(`div`,{className:`mt-3 flex gap-4 font-mono text-[11px]`,children:[e.cpuLoad!=null&&(0,K.jsxs)(`span`,{style:{color:R9(e.cpuLoad)},children:[`cpu `,e.cpuLoad,`%`]}),e.memUsedPct!=null&&(0,K.jsxs)(`span`,{style:{color:R9(e.memUsedPct)},children:[`mem `,e.memUsedPct,`%`]})]}),r&&e.suggestedConfig&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(P9,{className:`my-3`}),(0,K.jsx)(`p`,{className:`text-muted-foreground mb-1.5 text-[11px]`,children:`Not managed yet — add this to your device config to onboard it:`}),(0,K.jsx)(`pre`,{className:`bg-background text-foreground m-0 mb-2 overflow-x-auto rounded-md border px-2.5 py-2 font-mono text-[11px]/[1.5] whitespace-pre`,children:r}),(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,K.jsx)(ib,{title:`Copy config stub`,label:`Copy config stub`,text:r}),n&&(0,K.jsx)(X,{type:`accent`,size:`sm`,onClick:()=>n(e.suggestedConfig.name,z9(e.suggestedConfig)),children:`Add to config →`})]})]})]})}function z9(e){let t={port:e.port,username:e.username};return e.host&&(t.host=e.host),e.mac&&(t.mac=e.mac),t}function B9(e){return e>=1e3?`${(e/1e3).toFixed(1)}s`:`${Math.round(e)}ms`}function kee(e){return!e||!e.pooled?`var(--muted-foreground)`:e.dead?`var(--destructive)`:e.inflight>0?`var(--chart-1)`:`var(--success)`}function Aee(e){return!e||!e.pooled?`no connection`:e.dead?`reconnecting`:e.inflight>0?`${e.inflight} inflight`:`ready`}function jee({device:e}){let t=e.pool,n=!t||!t.pooled?`border-dashed opacity-60`:t.dead?`border-destructive/50`:t.inflight>0?`border-chart-1/50`:`border-success/35`,r=!!t&&t.pooled&&t.inflight>0,i=kee(t),a=!t||!t.pooled?0:t.inflight>0?Math.min(8+t.inflight*15,100):100;return(0,K.jsxs)(`div`,{className:Y(`bg-card rounded-lg border px-3 py-2.5 transition-colors hover:border-muted-foreground/40`,n),children:[(0,K.jsxs)(`div`,{className:`mb-1.5 flex items-center gap-1.5`,children:[(0,K.jsx)(`span`,{className:`size-[7px] shrink-0 rounded-full`,style:{background:i}}),(0,K.jsx)(`span`,{className:`text-foreground overflow-hidden text-xs font-semibold text-ellipsis whitespace-nowrap`,children:e.name}),(0,K.jsx)(`span`,{className:`ml-auto text-[10px] font-semibold tracking-[0.04em] uppercase`,style:{color:i},children:Aee(t)})]}),(0,K.jsxs)(`div`,{className:`bg-muted relative h-1.5 overflow-hidden rounded-[3px]`,children:[(0,K.jsx)(`div`,{className:Y(`h-full rounded-[3px] opacity-65 transition-[width] duration-[400ms]`,r&&`animate-pulse`),style:{width:`${a}%`,background:i}}),t&&t.pooled&&t.inflight>0&&(0,K.jsxs)(`span`,{className:`text-foreground absolute -top-px right-1 text-[8px] leading-[8px] font-bold [text-shadow:0_0_3px_rgba(0,0,0,0.6)]`,children:[t.inflight,` ch`]})]})]})}function V9({k:e,v:t,sub:n}){return(0,K.jsx)(nb,{k:e,v:t,sub:n,cls:`min-w-[100px]`})}function Mee({devices:e,poolPayload:t}){let n=e.filter(e=>e.pool!==null&&e.pool!==void 0);if(!(t?.enabled??n.length>0)&&n.length===0)return(0,K.jsxs)(`details`,{className:`my-3`,open:!0,children:[(0,K.jsx)(`summary`,{className:`mb-2 cursor-pointer font-semibold`,children:`SSH Connection Pool`}),(0,K.jsxs)(`p`,{className:`text-muted-foreground my-1 text-[13px]`,children:[`Connection pooling is disabled. Enable it with`,` `,(0,K.jsx)(`code`,{className:`text-chart-1 text-xs`,children:`--ssh-keep-alive true`}),` or`,` `,(0,K.jsx)(`code`,{className:`text-chart-1 text-xs`,children:`MIKROTIK_SSH__KEEP_ALIVE=true`}),` to keep persistent SSH connections across tool calls.`]})]});let r=t?.aggregate,i=t?.config;return(0,K.jsxs)(`details`,{className:`my-3`,open:!0,children:[(0,K.jsx)(`summary`,{className:`mb-2 cursor-pointer font-semibold`,children:`SSH Connection Pool`}),r&&(0,K.jsxs)(`div`,{className:`mb-3 flex flex-wrap gap-2`,children:[(0,K.jsx)(V9,{k:`Connections`,v:String(r.totalConnections)}),(0,K.jsx)(V9,{k:`Inflight`,v:String(r.totalInflight),sub:`channels`}),(0,K.jsx)(V9,{k:`Idle`,v:String(r.totalIdle)}),(0,K.jsx)(V9,{k:`Busy`,v:String(r.totalBusy)}),i&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(V9,{k:`Keepalive`,v:B9(i.keepAliveInterval)}),(0,K.jsx)(V9,{k:`Idle timeout`,v:B9(i.idleTimeout)})]})]}),n.length>0&&(0,K.jsx)(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(200px,1fr))] gap-2`,children:n.map(e=>(0,K.jsx)(jee,{device:e},e.name))})]})}function Nee({...e}){return(0,K.jsx)(cf,{"data-slot":`dialog`,...e})}function Pee({...e}){return(0,K.jsx)(mf,{"data-slot":`dialog-portal`,...e})}function Fee({className:e,...t}){return(0,K.jsx)(gf,{"data-slot":`dialog-overlay`,className:Y(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function Iee({className:e,children:t,showCloseButton:n=!0,...r}){return(0,K.jsxs)(Pee,{"data-slot":`dialog-portal`,children:[(0,K.jsx)(Fee,{}),(0,K.jsxs)(bf,{"data-slot":`dialog-content`,className:Y(`fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg`,e),...r,children:[t,n&&(0,K.jsxs)(kf,{"data-slot":`dialog-close`,className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,children:[(0,K.jsx)(cl,{}),(0,K.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function Lee({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`dialog-header`,className:Y(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function Ree({className:e,showCloseButton:t=!1,children:n,...r}){return(0,K.jsxs)(`div`,{"data-slot":`dialog-footer`,className:Y(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...r,children:[n,t&&(0,K.jsx)(kf,{asChild:!0,children:(0,K.jsx)(Xy,{variant:`outline`,children:`Close`})})]})}function zee({className:e,...t}){return(0,K.jsx)(Tf,{"data-slot":`dialog-title`,className:Y(`text-lg leading-none font-semibold`,e),...t})}function Bee({className:e,...t}){return(0,K.jsx)(Df,{"data-slot":`dialog-description`,className:Y(`text-sm text-muted-foreground`,e),...t})}var H9=` {0,3}`;function Vee(e){let t=e.replace(/\r\n?/g,`
143
+ `)}),(0,K.jsxs)(`div`,{className:`relative flex-1`,children:[(0,K.jsxs)(`pre`,{className:`text-muted-foreground pointer-events-none absolute inset-0 z-0 m-0 box-border overflow-hidden px-3 py-2.5 font-mono text-xs leading-[1.5] whitespace-pre [tab-size:2] [&_.j-bool]:text-chart-4 [&_.j-key]:text-chart-1 [&_.j-null]:text-muted-foreground [&_.j-num]:text-chart-3 [&_.j-str]:text-chart-2`,"aria-hidden":`true`,ref:d,children:[R5(r),`
144
+ `]}),(0,K.jsx)(Fx,{ref:l,className:`caret-brand selection:bg-brand/35 relative z-[1] m-0 box-border h-[400px] min-h-0 w-full resize-y rounded-none border-0 bg-transparent px-3 py-2.5 font-mono text-xs leading-[1.5] whitespace-pre text-transparent shadow-none [field-sizing:fixed] [tab-size:2] outline-none focus-visible:border-0 focus-visible:ring-0 dark:bg-transparent`,spellCheck:!1,wrap:`off`,value:r,onChange:e=>{i(e.target.value),h(e.currentTarget)},onKeyDown:_,onClick:()=>c(null),onScroll:e=>{let t=e.currentTarget;d.current&&(d.current.scrollTop=t.scrollTop,d.current.scrollLeft=t.scrollLeft),f.current&&(f.current.scrollTop=t.scrollTop)}}),s&&(0,K.jsx)(`div`,{className:`border-brand bg-card absolute z-[5] max-h-[184px] min-w-[150px] overflow-y-auto rounded-md border shadow-lg`,style:{left:s.x,top:s.y},children:s.items.map((e,t)=>(0,K.jsx)(`div`,{className:Y(`cursor-pointer px-[11px] py-[5px] font-mono text-xs`,t===s.index?`bg-brand/20 text-foreground`:`text-muted-foreground`),onMouseDown:t=>{t.preventDefault(),g(e)},children:e},e))})]})]})}var L7=e=>e&&typeof e==`object`&&!Array.isArray(e)?e:{};function R7({initial:e,onClose:t,onReload:n}){let[r,i]=(0,v.useState)(()=>L7(e)),[a,o]=(0,v.useState)(`form`),[s,c]=(0,v.useState)(null),[l,u]=(0,v.useState)([]),[d,f]=(0,v.useState)({}),[p,m]=(0,v.useState)(null),[h,g]=(0,v.useState)(null),[_,y]=(0,v.useState)(0),[b,x]=(0,v.useState)(6e4),[S,C]=(0,v.useState)(null);(0,v.useEffect)(()=>{let e=setTimeout(()=>{hc(`/api/config/validate`,r).then(e=>u(e.errors??[])).catch(()=>{})},350);return()=>clearTimeout(e)},[r]),(0,v.useEffect)(()=>{if(!h||_<=0)return;let e=setInterval(()=>y(e=>Math.max(0,e-1)),1e3);return()=>clearInterval(e)},[h,_]);let w=(0,v.useRef)(n);w.current=n,(0,v.useEffect)(()=>{h&&_===0&&(h.rollbackMs??0)>0&&(C(`Auto-reverted — changes were not confirmed in time.`),g(null),w.current())},[h,_]);let T=!s&&l.length===0,E=async()=>{let e=L7(r.devices);if(Object.keys(e).length===0){C(`No devices configured to test — add one first.`);return}f({}),C(`Testing devices…`);let t={};for(let[n,r]of Object.entries(e)){let e=await hc(`/api/config/test-device`,{name:n,config:r}).catch(()=>({ok:!1}));t[n]=e.ok&&e.status?.reachable===!0?{ok:!0,label:`${Math.round(e.status.latencyMs??0)}ms · ${e.status.identity??`ok`}`}:{ok:!1,label:e.status?.error??e.errors?.[0]?.message??`unreachable`},f({...t})}C(null)},D=async()=>{m(await hc(`/api/config/preview`,r))},O=async()=>{C(`Saving…`);let e=await hc(`/api/config`,{config:r,rollbackMs:b});if(C(null),m(null),!e.ok){u(e.errors??[{path:`(root)`,message:`save rejected`}]);return}g(e),y(Math.round((e.rollbackMs??0)/1e3))},k=async()=>{h?.pendingId&&(await hc(`/api/config/keep`,{pendingId:h.pendingId}),g(null),C(`Changes kept.`),n())},A=async()=>{h?.pendingId&&(await hc(`/api/config/rollback`,{pendingId:h.pendingId}),g(null),C(`Reverted to the previous config.`),n())};return(0,K.jsxs)(`div`,{className:`flex flex-col gap-2.5`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,K.jsxs)(`div`,{className:`border-border bg-muted inline-flex gap-0.5 rounded-md border p-0.5`,children:[(0,K.jsxs)(`button`,{className:Y(`flex cursor-pointer items-center gap-1.5 rounded-[6px] border-0 bg-transparent px-[11px] py-1 text-xs font-semibold`,a===`form`?`bg-card text-foreground shadow-sm`:`text-muted-foreground`),onClick:()=>{c(null),o(`form`)},children:[(0,K.jsx)(Bc,{className:`size-3.5`}),` Form`]}),(0,K.jsxs)(`button`,{className:Y(`flex cursor-pointer items-center gap-1.5 rounded-[6px] border-0 bg-transparent px-[11px] py-1 text-xs font-semibold`,a===`json`?`bg-card text-foreground shadow-sm`:`text-muted-foreground`),onClick:()=>o(`json`),children:[(0,K.jsx)(Oc,{className:`size-3.5`}),` JSON`]})]}),(0,K.jsx)(`span`,{className:Y(`rounded-full border px-2.5 py-1 font-mono text-[11px]`,T?`border-success/40 bg-success/10 text-success`:`border-destructive/40 bg-destructive/10 text-destructive`),children:s?`invalid JSON`:l.length?`${l.length} schema issue(s)`:`valid ✓`}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void E(),children:`Test devices`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void D(),disabled:!T,children:`Preview diff`}),(0,K.jsx)(Gb,{size:`sm`,value:String(b),onValueChange:e=>x(Number(e)),options:F7.map(([e,t])=>({value:String(t),label:e})),"aria-label":`Auto-revert window`}),(0,K.jsx)(X,{size:`sm`,type:`accent`,onClick:()=>void O(),disabled:!T||!!h,children:`Save`}),(0,K.jsx)(X,{size:`sm`,onClick:t,children:`Close`})]}),S&&(0,K.jsx)(`div`,{className:`text-muted-foreground font-mono text-xs`,children:S}),h&&(0,K.jsxs)(`div`,{className:`border-warning/40 bg-warning/10 flex flex-wrap items-center gap-2 rounded-md border px-3 py-2.5 text-xs`,children:[(0,K.jsx)(`strong`,{children:`Applied.`}),` `,(h.rollbackMs??0)>0?(0,K.jsxs)(K.Fragment,{children:[`Reverting in `,(0,K.jsxs)(`span`,{className:`text-warning font-mono font-bold`,children:[_,`s`]}),` `,`unless you keep it.`]}):(0,K.jsx)(K.Fragment,{children:`Saved without an auto-revert window.`}),h.devicesChanged&&(0,K.jsxs)(`span`,{className:`text-warning text-[11px]`,children:[` `,`· device list changed — reconnect the MCP client to expose it to the model`]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{size:`sm`,type:`accent`,onClick:()=>void k(),children:`Keep changes`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void A(),children:`Revert now`})]}),Object.keys(d).length>0&&(0,K.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:Object.entries(d).map(([e,t])=>(0,K.jsxs)(`span`,{className:Y(`rounded-full border px-2.5 py-1 font-mono text-[11px]`,t.ok?`border-success/40 text-success`:`border-destructive/40 text-destructive`),children:[t.ok?`●`:`○`,` `,e,`: `,t.label]},e))}),a===`form`?(0,K.jsx)(M7,{cfg:r,onChange:i}):(0,K.jsx)(I7,{value:r,onChange:e=>i(L7(e)),onJsonError:c}),(s||l.length>0)&&(0,K.jsx)(`div`,{className:`flex flex-col gap-[3px]`,children:s?(0,K.jsxs)(`div`,{className:`text-destructive font-mono text-[11px]`,children:[`JSON: `,s]}):l.slice(0,12).map((e,t)=>(0,K.jsxs)(`div`,{className:`text-destructive font-mono text-[11px]`,children:[(0,K.jsx)(`code`,{className:`text-warning`,children:e.path}),` — `,e.message]},t))}),p&&(0,K.jsxs)(`div`,{className:`border-border overflow-hidden rounded-md border`,children:[(0,K.jsxs)(`div`,{className:`bg-muted flex items-center gap-2 px-[13px] py-[9px] text-xs`,children:[(0,K.jsx)(`strong`,{children:`Diff vs current`}),(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:p.summary?.changed?`+${p.summary.added} / -${p.summary.removed}`:`no changes`}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,icon:(0,K.jsx)(cl,{className:`size-4`}),onClick:()=>m(null),"aria-label":`Close preview`})]}),(0,K.jsx)(`pre`,{className:`bg-background text-muted-foreground m-0 max-h-[320px] overflow-auto px-3 py-2.5 font-mono text-[11px] leading-[1.5]`,children:(p.unified||`(identical)`).split(`
145
+ `).map((e,t)=>(0,K.jsx)(`div`,{className:e.startsWith(`+`)?`text-success`:e.startsWith(`-`)?`text-destructive`:e.startsWith(`@@`)?`text-brand`:``,children:e||` `},t))})]})]})}function z7({x:e,y:t,text:n,className:r,textClassName:i,padX:a=9,fontSize:o=9}){let s=(0,v.useRef)(null),[c,l]=(0,v.useState)(()=>n.length*o*.62);(0,v.useLayoutEffect)(()=>{let e=s.current?.getComputedTextLength();e&&e>0&&l(e)},[n,o]);let u=Math.round(c+a*2);return(0,K.jsxs)(`g`,{transform:`translate(${e.toFixed(1)},${t.toFixed(1)})`,children:[(0,K.jsx)(`rect`,{className:r,x:-u/2,y:-9,rx:9,width:u,height:18}),(0,K.jsx)(`text`,{ref:s,className:i,x:0,y:3.5,textAnchor:`middle`,fontSize:o,children:n})]})}function B7(e){return e.reachable===!0?{label:`online`,color:`var(--foreground)`}:e.reachable===!1?{label:`offline`,color:`var(--destructive)`}:{label:`checking…`,color:`var(--muted-foreground)`}}function V7(e){let t=0;for(let n=0;n<e.length;n++)t=Math.imul(t,31)+e.charCodeAt(n)>>>0;return`hsl(${t%360} 70% 62%)`}function H7(e,t,n,r){let i=1-r;return{x:i*i*e.x+2*i*r*t.x+r*r*n.x,y:i*i*e.y+2*i*r*t.y+r*r*n.y}}function U7(e,t,n,r){let i=1-r,a=2*i*(t.x-e.x)+2*r*(n.x-t.x),o=2*i*(t.y-e.y)+2*r*(n.y-t.y);return Math.atan2(o,a)*180/Math.PI}var W7=`var(--foreground)`,G7=`var(--muted-foreground)`,K7=`var(--warning)`;function q7(e){return e.jumpVia?e.jumpVia:e.jumpHost?`${e.jumpHost.host}:${e.jumpHost.port}`:null}var J7=18,Y7=e=>e.length>J7?`${e.slice(0,J7-1)}…`:e,X7=e=>Math.max(23,Math.min(70,e.length*3.1+12));function Z7({payload:e,pulses:t}){let n=e.devices,r=Math.max(1,n.length),i=n.map(e=>{let t=Y7(e.name);return{d:e,label:t,r:X7(t)}}),a=Math.max(23,...i.map(e=>e.r)),o=r>1?(a+18)/Math.sin(Math.PI/r):0,s=Math.max(110+a,o,120),c=a+60,l=Math.max(700,Math.round((s+a+40)*2)),u=Math.round((s+c)*2),d=l/2,f=u/2,p={x:d,y:f},m=i.map((e,t)=>{let n=t/r*Math.PI*2-Math.PI/2+(r%2==0?Math.PI/r:0);return{...e,i:t,x:d+s*Math.cos(n),y:f+s*Math.sin(n)}});return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`svg`,{className:`conn`,viewBox:`0 0 ${l} ${u}`,width:`100%`,height:u,preserveAspectRatio:`xMidYMid meet`,children:[(0,K.jsxs)(`defs`,{children:[(0,K.jsxs)(`radialGradient`,{id:`conn-hub`,cx:`0.5`,cy:`0.34`,r:`0.75`,children:[(0,K.jsx)(`stop`,{offset:`0`,stopColor:`var(--foreground)`}),(0,K.jsx)(`stop`,{offset:`0.6`,stopColor:`color-mix(in srgb, var(--foreground) 70%, var(--muted-foreground))`}),(0,K.jsx)(`stop`,{offset:`1`,stopColor:`var(--muted-foreground)`})]}),(0,K.jsxs)(`radialGradient`,{id:`conn-orb`,cx:`0.5`,cy:`0.32`,r:`0.85`,children:[(0,K.jsx)(`stop`,{offset:`0`,stopColor:`var(--muted)`}),(0,K.jsx)(`stop`,{offset:`1`,stopColor:`var(--card)`})]}),(0,K.jsxs)(`radialGradient`,{id:`conn-burst`,cx:`0.5`,cy:`0.5`,r:`0.5`,children:[(0,K.jsx)(`stop`,{offset:`0`,stopColor:`var(--foreground)`}),(0,K.jsx)(`stop`,{offset:`0.5`,stopColor:`color-mix(in srgb, var(--foreground) 80%, transparent)`}),(0,K.jsx)(`stop`,{offset:`1`,stopColor:`var(--muted-foreground)`,stopOpacity:`0`})]}),(0,K.jsxs)(`linearGradient`,{id:`conn-tunnel-grad`,x1:`0`,y1:`0`,x2:`1`,y2:`0`,children:[(0,K.jsx)(`stop`,{offset:`0`,stopColor:K7,stopOpacity:`0.15`}),(0,K.jsx)(`stop`,{offset:`0.5`,stopColor:K7,stopOpacity:`0.95`}),(0,K.jsx)(`stop`,{offset:`1`,stopColor:K7,stopOpacity:`0.15`})]}),(0,K.jsxs)(`filter`,{id:`conn-tunnel-glow`,x:`-40%`,y:`-40%`,width:`180%`,height:`180%`,children:[(0,K.jsx)(`feGaussianBlur`,{stdDeviation:`3`,result:`b`}),(0,K.jsxs)(`feMerge`,{children:[(0,K.jsx)(`feMergeNode`,{in:`b`}),(0,K.jsx)(`feMergeNode`,{in:`SourceGraphic`})]})]})]}),[.5,.78,1].map((e,t)=>(0,K.jsx)(`circle`,{className:`conn-grid`,cx:d,cy:f,r:s*e},`g-${t}`)),[0,1,2].map(e=>(0,K.jsx)(`circle`,{className:`conn-sonar`,cx:d,cy:f,style:{animationDelay:`${e*1.1}s`}},`s-${e}`)),m.map(({d:e,i:n,x:r,y:i})=>{let a=B7(e.status),o=e.status.reachable===!0,s=e.status.reachable==null,c={x:r,y:i},l=(d+r)/2,u=(f+i)/2,m=r-d,h=i-f,g=Math.hypot(m,h)||1,_=-h/g,v=m/g,y={x:l+_*16,y:u+v*16},b={x:l-_*16,y:u-v*16},x=`M${d},${f} Q${y.x.toFixed(1)},${y.y.toFixed(1)} ${r.toFixed(1)},${i.toFixed(1)}`,S=`M${d},${f} Q${b.x.toFixed(1)},${b.y.toFixed(1)} ${r.toFixed(1)},${i.toFixed(1)}`,C=`M${d},${f} Q${l.toFixed(1)},${u.toFixed(1)} ${r.toFixed(1)},${i.toFixed(1)}`,w=H7(p,y,c,.52),T=U7(p,y,c,.52),E=H7(p,b,c,.48),D=U7(p,b,c,.48)+180,O=t[e.name]??0;return(0,K.jsxs)(`g`,{children:[(0,K.jsx)(`path`,{id:`conn-cmd-${n}`,className:`conn-link`,d:x,stroke:o?W7:a.color,strokeOpacity:o?.5:.32,strokeDasharray:s?`2 8`:o?void 0:`6 7`}),(0,K.jsx)(`path`,{id:`conn-res-${n}`,className:`conn-link`,d:S,stroke:o?G7:a.color,strokeOpacity:o?.5:.18,strokeDasharray:o?void 0:`6 7`}),o&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`path`,{className:`conn-flow`,d:x,stroke:`var(--foreground)`}),(0,K.jsx)(`circle`,{className:`conn-packet`,r:3.2,fill:`var(--foreground)`,children:(0,K.jsx)(`animateMotion`,{dur:`2.6s`,repeatCount:`indefinite`,calcMode:`linear`,children:(0,K.jsx)(`mpath`,{href:`#conn-cmd-${n}`})})}),(0,K.jsx)(`rect`,{className:`conn-packet`,x:-2.6,y:-2.6,width:5.2,height:5.2,fill:`var(--muted-foreground)`,transform:`rotate(45)`,children:(0,K.jsx)(`animateMotion`,{dur:`2.6s`,begin:`0.9s`,repeatCount:`indefinite`,calcMode:`linear`,keyPoints:`1;0`,keyTimes:`0;1`,children:(0,K.jsx)(`mpath`,{href:`#conn-res-${n}`})})}),(0,K.jsx)(`path`,{className:`conn-chevron`,d:`M-4,-3 L4,0 L-4,3`,stroke:`var(--foreground)`,transform:`translate(${w.x.toFixed(1)},${w.y.toFixed(1)}) rotate(${T.toFixed(1)})`}),(0,K.jsx)(`path`,{className:`conn-chevron`,d:`M-4,-3 L4,0 L-4,3`,stroke:`var(--muted-foreground)`,transform:`translate(${E.x.toFixed(1)},${E.y.toFixed(1)}) rotate(${D.toFixed(1)})`})]}),O>0&&(0,K.jsx)(`g`,{children:(0,K.jsxs)(`circle`,{r:6,fill:`url(#conn-burst)`,children:[(0,K.jsx)(`animateMotion`,{dur:`1.1s`,repeatCount:`1`,calcMode:`linear`,keyPoints:`0;1;0`,keyTimes:`0;0.5;1`,path:C}),(0,K.jsx)(`animate`,{attributeName:`opacity`,values:`0;1;1;0`,keyTimes:`0;0.1;0.85;1`,dur:`1.1s`,repeatCount:`1`,fill:`freeze`})]})},`burst-${e.name}-${O}`)]},`l-${e.name}`)}),m.map(e=>{let t=e.d.jumpVia,n=t?m.find(e=>e.d.name===t):void 0,r=!n&&e.d.jumpHost?e.d.jumpHost:void 0;if(!n&&!r)return null;let i={x:e.x,y:e.y},a=Math.hypot(e.x-d,e.y-f)||1,o=(e.x-d)/a,s=(e.y-f)/a,c=n?{x:n.x,y:n.y}:{x:e.x+o*(e.r+46),y:e.y+s*(e.r+46)},l=(c.x+i.x)/2,u=(c.y+i.y)/2,p=Math.hypot(l-d,u-f)||1,h=n?50:16,g={x:l+(l-d)/p*h,y:u+(u-f)/p*h},_=`M${c.x.toFixed(1)},${c.y.toFixed(1)} Q${g.x.toFixed(1)},${g.y.toFixed(1)} ${i.x.toFixed(1)},${i.y.toFixed(1)}`,v=q7(e.d)??``,y=H7(c,g,i,.5),b=`conn-tunnel-${e.i}`;return(0,K.jsxs)(`g`,{className:`conn-tunnel-g`,children:[(0,K.jsx)(`path`,{className:`conn-tunnel-halo`,d:_,stroke:K7}),(0,K.jsx)(`path`,{id:b,className:`conn-tunnel`,d:_,stroke:`url(#conn-tunnel-grad)`,filter:`url(#conn-tunnel-glow)`}),r&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`circle`,{className:`conn-tunnel-sat`,cx:c.x,cy:c.y,r:11,fill:`var(--background)`,stroke:`var(--warning)`}),(0,K.jsx)(`text`,{x:c.x,y:c.y+3.5,textAnchor:`middle`,fontSize:11,children:`🛡️`})]}),(0,K.jsxs)(`text`,{className:`conn-tunnel-lock`,fontSize:13,textAnchor:`middle`,children:[`🔒`,(0,K.jsx)(`animateMotion`,{dur:`2.4s`,repeatCount:`indefinite`,calcMode:`linear`,rotate:`auto`,children:(0,K.jsx)(`mpath`,{href:`#${b}`})})]}),(0,K.jsx)(z7,{x:y.x,y:y.y,text:`⤳ via ${v}`,className:`conn-tunnel-badge`,textClassName:`conn-tunnel-badge-tx`})]},`jump-${e.d.name}`)}),(0,K.jsx)(`circle`,{className:`conn-hub-glow`,cx:d,cy:f,r:42}),(0,K.jsx)(`circle`,{className:`conn-hub-ring`,cx:d,cy:f,r:37}),(0,K.jsx)(`circle`,{cx:d,cy:f,r:29,fill:`url(#conn-hub)`,stroke:`var(--border)`,strokeWidth:1.5}),(0,K.jsx)(`text`,{x:d,y:f-4,textAnchor:`middle`,fill:`var(--background)`,fontSize:12,fontWeight:700,children:`LLM`}),(0,K.jsx)(`text`,{x:d,y:f+8,textAnchor:`middle`,fill:`var(--background)`,fillOpacity:.66,fontSize:8,fontWeight:600,children:`⇄ MCP`}),(0,K.jsx)(`text`,{x:d,y:f+18,textAnchor:`middle`,fill:`var(--background)`,fillOpacity:.66,fontSize:7.5,fontWeight:600,children:`server`}),m.map(({d:e,x:t,y:n,r,label:i})=>{let a=B7(e.status),o=e.status.reachable===!0,s=o?`${e.status.latencyMs??`?`} ms`:a.label,c=V7(e.name);return(0,K.jsxs)(`g`,{className:`conn-node`,opacity:e.disabled?.35:1,children:[o&&(0,K.jsx)(`circle`,{className:`conn-node-halo`,cx:t,cy:n,r:r+1,stroke:c}),e.pool?.pooled&&(0,K.jsx)(`circle`,{cx:t,cy:n,r:r+5,fill:`none`,stroke:e.pool.inflight>0?`var(--chart-1)`:`var(--success)`,strokeWidth:1.5,strokeDasharray:e.pool.inflight>0?void 0:`4 4`,opacity:.5,className:e.pool.inflight>0?`conn-blink`:void 0}),(0,K.jsx)(`circle`,{cx:t,cy:n,r,fill:`url(#conn-orb)`}),(0,K.jsx)(`circle`,{cx:t,cy:n,r,fill:c,opacity:.16}),(0,K.jsx)(`circle`,{cx:t,cy:n,r,fill:`none`,stroke:c,strokeWidth:2.5}),(0,K.jsx)(`circle`,{className:o?`conn-blink`:void 0,cx:t+r*.7,cy:n-r*.7,r:4.5,fill:a.color,stroke:`var(--background)`,strokeWidth:1.5}),(0,K.jsx)(`text`,{x:t,y:n+3.5,textAnchor:`middle`,fill:`var(--foreground)`,fontSize:10,fontWeight:600,children:i}),(0,K.jsx)(`text`,{x:t,y:n+r+14,textAnchor:`middle`,fill:`var(--muted-foreground)`,fontSize:9,children:e.address??e.host}),(0,K.jsx)(`text`,{x:t,y:n+r+26,textAnchor:`middle`,fill:a.color,fontSize:9,fontWeight:600,children:s})]},`n-${e.name}`)})]}),(0,K.jsxs)(`div`,{className:`text-muted-foreground mt-2 flex flex-wrap justify-center gap-4 text-[11px] [&>span]:inline-flex [&>span]:items-center [&>span]:gap-1.5 [&_i]:inline-block [&_i]:size-2.5 [&_i]:rounded-[3px]`,children:[(0,K.jsxs)(`span`,{children:[(0,K.jsx)(`i`,{style:{background:W7}}),` command · LLM → device`]}),(0,K.jsxs)(`span`,{children:[(0,K.jsx)(`i`,{style:{background:G7}}),` response · device → LLM`]}),(0,K.jsxs)(`span`,{children:[(0,K.jsx)(`i`,{style:{background:W7}}),` live call (round-trip)`]}),e.devices.some(e=>q7(e))&&(0,K.jsxs)(`span`,{children:[(0,K.jsx)(`i`,{style:{background:`var(--warning)`}}),` 🔒 SSH jump tunnel (ProxyJump)`]}),e.devices.some(e=>e.pool?.pooled)&&(0,K.jsxs)(`span`,{children:[(0,K.jsx)(`i`,{style:{background:`var(--success)`}}),` pooled SSH connection`]})]})]})}function Q7({d:e,onToggle:t}){let n=B7(e.status),r=e.status.reachable===!0?`${n.label} · ${e.status.latencyMs??`?`}ms${e.status.version?` · v${e.status.version}`:``}`:e.status.reachable===!1?`${n.label}${e.status.error?` · ${e.status.error}`:``}`:n.label,i=V7(e.name);return(0,K.jsxs)(`div`,{className:Y(`bg-card grid gap-2 rounded-lg border px-[15px] py-3.5 transition-[transform,border-color] duration-300`,`hover:border-chart-2/35 hover:-translate-y-0.5`,e.disabled&&`opacity-50 grayscale-[0.4]`),style:{borderLeft:`3px solid ${i}`},"data-disabled":e.disabled?`1`:void 0,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`span`,{className:`size-[9px] shrink-0 rounded-full`,style:{background:i},title:`device colour`}),(0,K.jsx)(`span`,{className:`text-[13px] font-medium`,children:e.name}),e.isDefault&&(0,K.jsx)(Lb,{type:`accent`,children:`default`}),e.disabled&&(0,K.jsx)(Lb,{type:`warning`,children:`disabled`}),(0,K.jsx)(`span`,{className:`size-[7px] shrink-0 rounded-full`,style:{background:n.color},title:n.label}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(`span`,{onClick:e=>e.stopPropagation(),children:(0,K.jsx)(m7,{checked:!e.disabled,onCheckedChange:()=>t?.(e.name,!e.disabled),title:e.disabled?`Enable device`:`Disable device`,"aria-label":e.disabled?`Enable device`:`Disable device`})}),(0,K.jsx)(Lb,{type:`secondary`,children:e.authMode})]}),(0,K.jsxs)(`div`,{className:`text-muted-foreground [&_b]:text-foreground grid grid-cols-[auto_1fr] gap-x-3 gap-y-[3px] text-[11px] [&_b]:font-medium [&_b]:break-words`,children:[(0,K.jsx)(`span`,{children:e.mac?`mac`:`host`}),(0,K.jsx)(`b`,{children:e.address??`${e.host}:${e.port}`}),(0,K.jsx)(`span`,{children:`user`}),(0,K.jsx)(`b`,{children:e.username}),(0,K.jsx)(`span`,{children:`status`}),(0,K.jsx)(`b`,{style:{color:n.color},children:r}),(0,K.jsx)(`span`,{children:`activity`}),(0,K.jsxs)(`b`,{children:[e.activity.calls,` calls · `,e.activity.errors,` err`,e.activity.avgMs?` · ${ub(e.activity.avgMs)} avg`:``]}),e.pool&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{children:`pool`}),(0,K.jsx)(`b`,{className:e.pool.dead?`text-destructive`:e.pool.inflight>0?`text-chart-1`:e.pool.pooled?`text-success`:`text-muted-foreground`,children:e.pool.pooled?e.pool.inflight>0?`${e.pool.inflight} inflight`:`connected`:`—`})]}),e.description&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{children:`note`}),(0,K.jsx)(`b`,{children:e.description})]})]}),q7(e)&&(0,K.jsxs)(`div`,{className:`border-warning/30 bg-warning/8 mt-2.5 mb-0.5 flex items-center gap-1.5 overflow-hidden rounded-[10px] border px-2.5 py-[7px] text-[10px]`,title:`Reached over SSH through the bastion ${q7(e)} (ProxyJump) — no port exposed on ${e.name}.`,children:[(0,K.jsxs)(`span`,{className:`border-warning/60 text-warning bg-background inline-flex items-center gap-1.5 rounded-[7px] border px-2 py-[3px] whitespace-nowrap`,children:[(0,K.jsx)(el,{className:`size-3`}),` `,q7(e),e.jumpVia?(0,K.jsx)(`i`,{className:`bg-warning text-background rounded-[4px] px-1 py-px text-[7px] tracking-[0.08em] uppercase not-italic`,children:`jump`}):null]}),(0,K.jsx)(`span`,{className:`jump-route__wire jump-route__wire--enc`,children:(0,K.jsx)(`span`,{className:`jump-route__lock`,"aria-hidden":!0,children:`🔒`})}),(0,K.jsxs)(`span`,{className:`bg-background text-foreground inline-flex items-center gap-1.5 rounded-[7px] border px-2 py-[3px] whitespace-nowrap`,style:{borderColor:i},title:e.name,children:[(0,K.jsx)(Xc,{className:`size-3`}),` `,e.name]})]})]})}var $7={READ:`text-success border-success/45 bg-success/10`,WRITE:`text-chart-1 border-chart-1/45 bg-chart-1/10`,WRITE_IDEMPOTENT:`text-chart-2 border-chart-2/45 bg-chart-2/10`,DESTRUCTIVE:`text-warning border-warning/45 bg-warning/10`,DANGEROUS:`text-destructive border-destructive/45 bg-destructive/10`},e9=`border-b border-border/60 px-3.5 py-[7px] text-xs [overflow-wrap:anywhere]`,t9=Y(e9,`bg-muted/40 text-muted-foreground`),n9=Y(e9,`text-foreground`),r9=`m-0 max-h-[40vh] overflow-auto rounded border border-border bg-background p-3 font-mono text-xs break-words whitespace-pre-wrap`,i9=`m-0 text-[11px] font-semibold tracking-wide text-muted-foreground uppercase`;function a9({event:e,onClose:t}){let[n,r]=(0,v.useState)(H5);return(0,K.jsx)(d7,{title:(0,K.jsxs)(`span`,{className:`flex items-center gap-2.5`,children:[(0,K.jsx)(`span`,{className:Y(`inline-block rounded-full border px-2 py-px font-mono text-[10px] tracking-wide uppercase`,$7[e.risk]??`text-muted-foreground`),children:e.risk}),(0,K.jsx)(`span`,{className:`font-mono text-[15px]`,children:e.tool}),(0,K.jsx)(ib,{text:e.tool,icon:!0,title:`Copy tool name`})]}),onClose:t,children:(0,K.jsxs)(`div`,{className:`grid gap-3`,children:[(0,K.jsxs)(`div`,{className:`grid grid-cols-[minmax(120px,0.4fr)_1fr] overflow-hidden rounded-lg border border-border font-mono`,children:[(0,K.jsx)(`div`,{className:t9,children:`title`}),(0,K.jsx)(`div`,{className:n9,children:e.title}),e.reason&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`div`,{className:Y(e9,`bg-muted/40 text-warning`),children:`reason`}),(0,K.jsx)(`div`,{className:Y(e9,`text-foreground italic`),children:e.reason})]}),(0,K.jsx)(`div`,{className:t9,children:`time`}),(0,K.jsx)(`div`,{className:n9,children:new Date(e.ts).toLocaleString(void 0,{hour12:!1})}),(0,K.jsx)(`div`,{className:t9,children:`device`}),(0,K.jsx)(`div`,{className:n9,children:e.device??`—`}),(0,K.jsx)(`div`,{className:t9,children:`transport`}),(0,K.jsx)(`div`,{className:n9,children:e.transport??`—`}),(0,K.jsx)(`div`,{className:t9,children:`duration`}),(0,K.jsx)(`div`,{className:n9,children:ub(e.durationMs)}),(0,K.jsx)(`div`,{className:t9,children:`status`}),(0,K.jsx)(`div`,{className:n9,children:(0,K.jsx)(`span`,{className:e.isError?`text-destructive`:`text-success`,children:e.isError?`error`:`ok`})}),(0,K.jsx)(`div`,{className:t9,children:`output size`}),(0,K.jsxs)(`div`,{className:n9,children:[db(e.outputBytes),e.truncated?` (truncated)`:``]}),(0,K.jsx)(`div`,{className:t9,children:`structured`}),(0,K.jsx)(`div`,{className:n9,children:e.hasStructured?`yes (renders an MCP App view)`:`no`})]}),e.error&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`h2`,{className:i9,children:`ERROR`}),(0,K.jsx)(`pre`,{className:Y(r9,`text-destructive`),children:e.error})]}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,K.jsx)(`h2`,{className:i9,children:`INPUT`}),(0,K.jsx)(`span`,{className:`flex-1`}),e.input&&(0,K.jsx)(X,{type:`secondary`,size:`sm`,ghost:!0,onClick:()=>r(e=>{let t=!e;return U5(t),t}),title:n?`Showing pretty-printed JSON — click for raw`:`Showing raw JSON — click to pretty-print`,children:n?`✦ Pretty`:`{ } Raw`}),(0,K.jsx)(ib,{text:e.input,title:`Copy input JSON`})]}),e.input?(0,K.jsx)(G5,{value:W5(e.input,n)}):(0,K.jsx)(`pre`,{className:Y(r9,`text-muted-foreground`),children:`—`}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,K.jsx)(`h2`,{className:i9,children:`OUTPUT`}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(ib,{text:e.output,title:`Copy output`})]}),(0,K.jsx)(`pre`,{className:Y(r9,`text-muted-foreground`),children:e.output?B5(e.output):`—`})]})})}var o9=e=>e==null?`?`:db(e);function s9({d:e}){let t=e.status,n=e.history??[];return t.reachable===!0||n.length>0?(0,K.jsxs)(`div`,{className:`bg-card text-card-foreground flex flex-col gap-2.5 rounded-lg border p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(zb,{color:B7(t).color}),(0,K.jsx)(`span`,{className:`font-mono text-[13px] font-medium`,children:e.name}),e.isDefault&&(0,K.jsx)(Lb,{type:`accent`,children:`default`}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(Lb,{type:t.version?`success`:`default`,children:t.version?`v${t.version}`:`—`})]}),(0,K.jsxs)(`div`,{className:`text-muted-foreground -mt-1 font-mono text-[11px]`,children:[t.boardName??`router`,t.architecture?` · ${t.architecture}`:``,t.cpuCount?` · ${t.cpuCount} cpu`:``,t.uptime?` · up ${t.uptime}`:``]}),(0,K.jsxs)(`div`,{className:`flex justify-around gap-3.5`,children:[(0,K.jsx)(S5,{value:t.cpuLoad,label:`CPU`,color:hb.cpu}),(0,K.jsx)(S5,{value:t.memUsedPct,label:`MEM`,color:hb.mem}),(0,K.jsx)(S5,{value:t.hddUsedPct,label:`DISK`,color:hb.disk})]}),(0,K.jsxs)(`div`,{className:`grid gap-2`,children:[(0,K.jsxs)(`div`,{className:`grid gap-0.5`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground font-mono text-[10px] tracking-[0.05em] uppercase`,children:`CPU load`}),(0,K.jsx)(x5,{id:`${e.name}-cpu`,values:n.map(e=>e.cpuLoad),color:hb.cpu,maxValue:100,unit:`%`})]}),(0,K.jsxs)(`div`,{className:`grid gap-0.5`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground font-mono text-[10px] tracking-[0.05em] uppercase`,children:`Memory used`}),(0,K.jsx)(x5,{id:`${e.name}-mem`,values:n.map(e=>e.memUsedPct),color:hb.mem,maxValue:100,unit:`%`})]}),(0,K.jsxs)(`div`,{className:`grid gap-0.5`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground font-mono text-[10px] tracking-[0.05em] uppercase`,children:`Probe latency`}),(0,K.jsx)(x5,{id:`${e.name}-lat`,values:n.map(e=>e.latencyMs),color:hb.latency,unit:`ms`})]})]}),(0,K.jsxs)(`div`,{className:`text-muted-foreground font-mono text-[11px]`,children:[`RAM `,o9(t.totalMemory&&t.freeMemory?t.totalMemory-t.freeMemory:void 0),` /`,` `,o9(t.totalMemory),` · free disk `,o9(t.freeHdd)]})]}):(0,K.jsxs)(`div`,{className:`bg-card text-card-foreground flex min-h-[120px] flex-col justify-center gap-1.5 rounded-lg border p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(zb,{color:B7(t).color}),(0,K.jsx)(`span`,{className:`font-mono text-[13px] font-medium`,children:e.name}),e.isDefault&&(0,K.jsx)(Lb,{type:`accent`,children:`default`})]}),(0,K.jsx)(`p`,{className:`text-muted-foreground m-0 text-[11px]`,children:t.reachable===!1?`Offline — ${t.error??`unreachable`}`:e.mac?`Waiting for the first MAC-Telnet probe (these run every few minutes to avoid contending with tool calls)…`:`Waiting for the first health probe…`})]})}function c9(e,t){let n=(0,v.useRef)(e),r=(0,v.useRef)(t);n.current=e,r.current=t,(0,v.useEffect)(()=>{let e=!1,t=null,i=null,a=()=>{e||(i=new EventSource(pc(`/api/sse`)),i.addEventListener(`hello`,()=>r.current(`sse`)),i.addEventListener(`tool`,e=>{try{n.current(JSON.parse(e.data))}catch{}}),i.onerror=()=>{i&&i.readyState===EventSource.CONNECTING&&r.current(`off`)})},o=()=>{if(e)return;let i=location.protocol===`https:`?`wss`:`ws`;t=new WebSocket(pc(`${i}://${location.host}/api/stream`));let s=!1;t.onopen=()=>{s=!0,r.current(`ws`)},t.onerror=()=>t?.close(),t.onmessage=e=>{try{let t=JSON.parse(e.data);t.type===`event`&&t.event&&n.current(t.event)}catch{}},t.onclose=()=>{e||(r.current(`off`),s?setTimeout(o,2e3):a())}};return o(),()=>{e=!0,t?.close(),i?.close()}},[])}function l9(e){(0,v.useLayoutEffect)(()=>{let t=e.current;if(!t||window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)return;document.documentElement.classList.add(`js-motion`);let n=new WeakSet,r=e=>{n.has(e)||(n.add(e),zi.set(e,{opacity:0,y:26}),G.create({trigger:e,start:`top 90%`,once:!0,onEnter:()=>zi.to(e,{opacity:1,y:0,duration:.7,ease:`power3.out`})}))},i=e=>{for(let t of e.querySelectorAll(`.reveal`))r(t)};i(t);let a=new MutationObserver(e=>{for(let t of e)for(let e of t.addedNodes)e instanceof Element&&(e.matches(`.reveal`)&&r(e),i(e))});a.observe(t,{childList:!0,subtree:!0});let o=setInterval(()=>G.refresh(),1200),s=setTimeout(()=>clearInterval(o),7e3);return()=>{a.disconnect(),clearInterval(o),clearTimeout(s);for(let e of G.getAll())e.kill();document.documentElement.classList.remove(`js-motion`)}},[e])}function u9(e){return new Date(e).toLocaleString()}function d9(e){let t=Date.now()-e;return t<6e4?`just now`:t<36e5?`${Math.floor(t/6e4)}m ago`:t<864e5?`${Math.floor(t/36e5)}h ago`:`${Math.floor(t/864e5)}d ago`}var f9={"in-sync":`success`,drifted:`warning`,unknown:`secondary`,"no-baseline":`secondary`},p9={"in-sync":`In Sync`,drifted:`Drifted`,unknown:`Unknown`,"no-baseline":`No Baseline`};function m9({device:e,onDone:t}){let[n,r]=(0,v.useState)([]),[i,a]=(0,v.useState)(``),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(``);(0,v.useEffect)(()=>{mc(`/api/drift/history/${encodeURIComponent(e)}?limit=20`).then(e=>{r(e.snapshots),e.snapshots.length>0&&a(e.snapshots[0].id)})},[e]);let f=async()=>{if(!i)return;l(!0),d(``);let n=await hc(`/api/drift/baseline`,{device:e,snapshotId:i,label:o||void 0});l(!1),n.ok?t():d(n.error??`Failed`)};return n.length===0?(0,K.jsx)(`div`,{className:`p-2`,children:(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`No snapshots for this device. Capture one with capture_config_snapshot first.`})}):(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 p-2`,children:[(0,K.jsx)(Gb,{value:i,onValueChange:a,"aria-label":`Baseline snapshot`,className:`min-w-[200px] flex-1`,options:n.map(e=>({value:e.id,label:`${e.id} — ${u9(e.ts)} — ${e.lines} lines${e.label?` "${e.label}"`:``}`}))}),(0,K.jsx)(Vb,{placeholder:`Label (optional)`,value:o,onChange:e=>s(e.target.value),className:`w-40`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void f(),disabled:c||!i,children:c?`Setting...`:`Set as Baseline`}),u&&(0,K.jsx)(`span`,{className:`text-destructive text-xs`,children:u})]})}function h9({unified:e}){return e?(0,K.jsx)(`pre`,{className:`m-0 max-h-[500px] overflow-auto rounded bg-background p-3 font-mono text-[11px] leading-normal`,children:e.split(`
146
+ `).map((e,t)=>{let n=`text-muted-foreground`;return e.startsWith(`+`)?n=`text-success bg-success/10`:e.startsWith(`-`)?n=`text-destructive bg-destructive/10`:e.startsWith(`@@`)?n=`text-brand`:e.startsWith(`/`)&&(n=`text-warning`),(0,K.jsx)(`div`,{className:Y(`px-1`,n),children:e||`\xA0`},t)})}):(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`No differences.`})}function g9({sections:e}){if(e.length===0)return null;let t=Math.max(...e.map(e=>e.added+e.removed),1);return(0,K.jsx)(`div`,{className:`flex flex-col gap-1.5`,children:e.slice(0,15).map(e=>(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`span`,{className:`w-[220px] truncate text-[11px] text-foreground`,title:e.path,children:e.path}),(0,K.jsxs)(`div`,{className:`flex h-3.5 flex-1 overflow-hidden rounded-[3px] bg-muted`,children:[(0,K.jsx)(`div`,{className:`h-full bg-success`,style:{width:`${e.added/t*100}%`}}),(0,K.jsx)(`div`,{className:`h-full bg-destructive`,style:{width:`${e.removed/t*100}%`}})]}),(0,K.jsxs)(`span`,{className:`min-w-[60px] text-[11px] text-muted-foreground`,children:[`+`,e.added,` -`,e.removed]})]},e.path))})}function _9({attributions:e}){return e.length===0?(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`No config-related log entries found.`}):(0,K.jsx)(`div`,{className:`max-h-[250px] overflow-auto`,children:(0,K.jsxs)(By,{className:`text-[11px]`,children:[(0,K.jsx)(Vy,{children:(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Wy,{children:`Time`}),(0,K.jsx)(Wy,{children:`User`}),(0,K.jsx)(Wy,{children:`Action`}),(0,K.jsx)(Wy,{children:`Section`}),(0,K.jsx)(Wy,{children:`Log`})]})}),(0,K.jsx)(Hy,{children:e.map((e,t)=>(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Gy,{className:`whitespace-nowrap`,children:e.timestamp??`—`}),(0,K.jsx)(Gy,{children:e.user??`—`}),(0,K.jsx)(Gy,{children:(0,K.jsx)(`span`,{className:`rounded bg-muted px-1.5 py-px text-[10px]`,children:e.action??`?`})}),(0,K.jsx)(Gy,{className:`max-w-[160px] truncate`,title:e.section,children:e.section}),(0,K.jsx)(Gy,{className:`max-w-[300px] truncate text-muted-foreground`,title:e.logLine,children:e.logLine})]},t))})]})})}function v9({device:e,onClose:t,onChanged:n}){let[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(``),l=(0,v.useCallback)(async()=>{o(!0),c(``);try{let t=await mc(`/api/drift/check/${encodeURIComponent(e)}`);`error`in t?c(t.error):i(t)}catch(e){c(e instanceof Error?e.message:String(e))}o(!1)},[e]),u=async()=>{(await hc(`/api/drift/baseline`,{device:e,snapshotId:r?.baselineId,label:`promoted`})).error||n()},d=async()=>{await gc(`/api/drift/baseline/${encodeURIComponent(e)}`,{}),n()};return(0,K.jsxs)(tb,{title:`${e} — Drift Detail`,className:`reveal`,extra:(0,K.jsxs)(`div`,{className:`flex gap-2`,children:[(0,K.jsx)(X,{size:`sm`,onClick:()=>void l(),disabled:a,children:a?`Checking...`:`Check Now`}),(0,K.jsx)(X,{size:`sm`,type:`error`,ghost:!0,onClick:()=>void d(),children:`Remove Baseline`}),(0,K.jsx)(X,{size:`sm`,type:`secondary`,onClick:t,children:`Close`})]}),children:[s&&(0,K.jsx)(`div`,{className:`text-destructive`,children:s}),r&&(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`mb-3 flex items-center gap-6 border-b border-border py-3`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,K.jsx)(zb,{type:r.identical?`success`:`warning`}),(0,K.jsx)(`strong`,{children:r.identical?`In Sync`:`Drifted`})]}),!r.identical&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{children:[`Score: `,(0,K.jsx)(`strong`,{children:r.score}),`/100`]}),(0,K.jsxs)(`div`,{className:`text-success`,children:[`+`,r.summary.added]}),(0,K.jsxs)(`div`,{className:`text-destructive`,children:[`-`,r.summary.removed]}),(0,K.jsxs)(`div`,{className:`text-muted-foreground text-[11px]`,children:[r.summary.unchanged,` unchanged`]}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void u(),children:`Promote as Baseline`})]}),(0,K.jsxs)(`div`,{className:`text-muted-foreground ml-auto text-[11px]`,children:[`Checked: `,u9(r.capturedAt)]})]}),r.sections.length>0&&(0,K.jsxs)(`div`,{className:`mb-4`,children:[(0,K.jsx)(`h4`,{className:`mt-0 mb-2 text-[13px]`,children:`Sections with drift`}),(0,K.jsx)(g9,{sections:r.sections})]}),r.attributions.length>0&&(0,K.jsxs)(`div`,{className:`mb-4`,children:[(0,K.jsx)(`h4`,{className:`mt-0 mb-2 text-[13px]`,children:`Change attribution`}),(0,K.jsx)(_9,{attributions:r.attributions})]}),!r.identical&&(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`h4`,{className:`mt-0 mb-2 text-[13px]`,children:`Unified diff`}),(0,K.jsx)(h9,{unified:r.unified})]})]}),!r&&!a&&!s&&(0,K.jsx)(`p`,{className:`text-muted-foreground text-center text-[11px]`,children:`Click "Check Now" to run a live drift check against the golden baseline.`})]})}function y9(){let[e,t]=(0,v.useState)([]),[n,r]=(0,v.useState)([]),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(``),u=(0,v.useCallback)(async()=>{try{let[e,n]=await Promise.all([mc(`/api/drift/status`),mc(`/api/drift/baselines`)]);t(e.devices),r(n.baselines),l(``)}catch(e){l(e instanceof Error?e.message:String(e))}},[]);if((0,v.useEffect)(()=>{u();let e=setInterval(()=>void u(),15e3);return()=>clearInterval(e)},[u]),c&&e.length===0)return(0,K.jsx)(tb,{className:`reveal`,children:(0,K.jsx)(`p`,{className:`text-destructive`,children:c})});let d=e.filter(e=>e.status!==`no-baseline`);return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`reveal grid grid-cols-2 gap-3 sm:grid-cols-4`,children:[(0,K.jsx)(nb,{k:`Devices`,v:String(e.length)}),(0,K.jsx)(nb,{k:`With Baseline`,v:String(d.length)}),(0,K.jsx)(nb,{k:`In Sync`,v:String(e.filter(e=>e.status===`in-sync`).length)}),(0,K.jsx)(nb,{k:`Drifted`,v:String(e.filter(e=>e.status===`drifted`).length)})]}),(0,K.jsx)(tb,{title:`Fleet Drift Overview`,className:`reveal`,children:(0,K.jsx)(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(240px,1fr))] gap-3`,children:e.map(e=>(0,K.jsxs)(`div`,{onClick:()=>{e.status!==`no-baseline`&&a(e.device)},className:Y(`rounded-lg border bg-card p-4 transition-colors`,i===e.device?`border-brand`:`border-border`,e.status===`no-baseline`?`cursor-default`:`cursor-pointer hover:border-brand/40`),children:[(0,K.jsxs)(`div`,{className:`mb-2 flex justify-between`,children:[(0,K.jsx)(`strong`,{className:`text-sm`,children:e.device}),(0,K.jsx)(Lb,{type:f9[e.status],children:p9[e.status]})]}),e.baseline&&(0,K.jsxs)(`div`,{className:`text-muted-foreground text-[11px]`,children:[(0,K.jsxs)(`div`,{children:[`Baseline: `,d9(e.baseline.setAt)]}),e.baseline.label&&(0,K.jsxs)(`div`,{children:[`Label: `,e.baseline.label]})]}),e.status===`no-baseline`&&(0,K.jsx)(X,{size:`sm`,className:`mt-2`,onClick:t=>{t.stopPropagation(),s(e.device)},children:`Set Baseline`})]},e.device))})}),o&&(0,K.jsx)(tb,{title:`Set baseline for ${o}`,className:`reveal`,extra:(0,K.jsx)(X,{size:`sm`,type:`secondary`,onClick:()=>s(null),children:`Cancel`}),children:(0,K.jsx)(m9,{device:o,onDone:()=>{s(null),u()}})}),i&&(0,K.jsx)(v9,{device:i,onClose:()=>a(null),onChanged:()=>{a(null),u()}}),n.length>0&&(0,K.jsx)(tb,{title:`Baseline Manager`,className:`reveal`,children:(0,K.jsx)(`div`,{className:`overflow-x-auto`,children:(0,K.jsxs)(By,{className:`text-xs`,children:[(0,K.jsx)(Vy,{children:(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Wy,{children:`Device`}),(0,K.jsx)(Wy,{children:`Snapshot ID`}),(0,K.jsx)(Wy,{children:`Set At`}),(0,K.jsx)(Wy,{children:`Set By`}),(0,K.jsx)(Wy,{children:`Label`}),(0,K.jsx)(Wy,{children:`Size`}),(0,K.jsx)(Wy,{children:`SHA`}),(0,K.jsx)(Wy,{})]})}),(0,K.jsx)(Hy,{children:n.map(e=>(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Gy,{children:(0,K.jsx)(`strong`,{children:e.device})}),(0,K.jsx)(Gy,{className:`font-mono text-[11px]`,children:e.snapshotId}),(0,K.jsx)(Gy,{title:u9(e.setAt),children:d9(e.setAt)}),(0,K.jsx)(Gy,{children:e.setBy}),(0,K.jsx)(Gy,{children:e.label??`—`}),(0,K.jsx)(Gy,{children:e.snapshot?`${e.snapshot.lines} lines / ${e.snapshot.bytes} bytes`:`deleted`}),(0,K.jsx)(Gy,{className:`font-mono text-[10px]`,children:e.snapshot?.sha?.slice(0,8)??`—`}),(0,K.jsx)(Gy,{children:(0,K.jsx)(X,{size:`sm`,type:`error`,ghost:!0,onClick:()=>{gc(`/api/drift/baseline/${encodeURIComponent(e.device)}`,{}).then(()=>void u())},children:`Remove`})})]},e.device))})]})})}),e.length===0&&!c&&(0,K.jsx)(tb,{className:`reveal`,children:(0,K.jsx)(`p`,{className:`text-muted-foreground text-center text-[11px]`,children:`No devices configured. Add devices to start using Drift Guard.`})})]})}function b9(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)&2147483647;return t%360}var x9=[`var(--entity-1)`,`var(--entity-2)`,`var(--entity-3)`,`var(--entity-4)`,`var(--entity-5)`,`var(--entity-6)`,`var(--entity-7)`,`var(--entity-8)`,`var(--entity-9)`,`var(--entity-10)`];function S9(e){return x9[Math.abs(b9(e))%x9.length]}var C9={create_entity:`Created entity`,delete_entity:`Deleted entity`,create_relation:`Created relation`,delete_relation:`Deleted relation`,add_observation:`Added observations`,delete_observation:`Deleted observations`};function w9(e,t,n,r){let i=n/2,a=r/2,o=e.map((t,o)=>{let s=2*Math.PI*o/Math.max(e.length,1),c=Math.min(n,r)*.3;return{id:t.name,label:t.name,type:t.entityType,x:i+c*Math.cos(s),y:a+c*Math.sin(s),vx:0,vy:0,obsCount:t.observations.length}}),s=t.map(e=>({source:e.from,target:e.to,label:e.relationType})),c=new Map(o.map(e=>[e.id,e])),l=.005,u=.85;for(let e=0;e<200;e++){for(let e=0;e<o.length;e++)for(let t=e+1;t<o.length;t++){let n=o[e],r=o[t],i=n.x-r.x,a=n.y-r.y,s=Math.sqrt(i*i+a*a)||1,c=3e3/(s*s);i=i/s*c,a=a/s*c,n.vx+=i,n.vy+=a,r.vx-=i,r.vy-=a}for(let e of s){let t=c.get(e.source),n=c.get(e.target);if(!t||!n)continue;let r=n.x-t.x,i=n.y-t.y,a=r*l,o=i*l;t.vx+=a,t.vy+=o,n.vx-=a,n.vy-=o}for(let e of o)e.vx+=(i-e.x)*.001,e.vy+=(a-e.y)*.001;for(let e of o){e.vx*=u,e.vy*=u,e.x+=e.vx,e.y+=e.vy;let t=Math.max(40,e.label.length*2.7+16);e.x=Math.max(t,Math.min(n-t,e.x)),e.y=Math.max(30,Math.min(r-30,e.y))}}return{nodes:o,edges:s}}function T9({graph:e}){let t=(0,v.useRef)(null),[n,r]=(0,v.useState)(null),i=(0,v.useMemo)(()=>w9(e.entities,e.relations,700,460),[e.entities,e.relations]),a=(0,v.useMemo)(()=>new Map(i.nodes.map(e=>[e.id,e])),[i.nodes]);return e.entities.length===0?(0,K.jsx)(`div`,{className:`text-muted-foreground flex items-center justify-center`,style:{height:460},children:(0,K.jsx)(`p`,{children:`No entities yet — create some via the MCP tools.`})}):(0,K.jsxs)(`svg`,{ref:t,viewBox:`0 0 700 460`,style:{width:`100%`,height:`auto`,maxHeight:460,display:`block`},children:[(0,K.jsx)(`defs`,{children:(0,K.jsx)(`marker`,{id:`mem-arrow`,viewBox:`0 0 10 6`,refX:`10`,refY:`3`,markerWidth:`8`,markerHeight:`6`,orient:`auto-start-reverse`,children:(0,K.jsx)(`path`,{d:`M0 0 L10 3 L0 6Z`,fill:`var(--muted-foreground)`})})}),i.edges.map((e,t)=>{let r=a.get(e.source),i=a.get(e.target);if(!r||!i)return null;let o=n!=null&&(e.source===n||e.target===n),s=n!=null&&!o,c=i.x-r.x,l=i.y-r.y,u=Math.sqrt(c*c+l*l)||1,d=e=>{let t=e.label.length*5.4,n=13+Math.min(e.obsCount,6);return Math.max(n,t/2+12)},f=d(r)+4,p=d(i)+4,m=r.x+c/u*f,h=r.y+l/u*f,g=i.x-c/u*p,_=i.y-l/u*p,v=(m+g)/2,y=(h+_)/2;return(0,K.jsxs)(`g`,{opacity:s?.15:1,children:[(0,K.jsx)(`line`,{x1:m,y1:h,x2:g,y2:_,stroke:o?`var(--foreground)`:`var(--border)`,strokeWidth:o?1.8:1,markerEnd:`url(#mem-arrow)`}),(0,K.jsx)(`text`,{x:v,y:y-5,textAnchor:`middle`,fill:`var(--muted-foreground)`,fontSize:`8`,style:{pointerEvents:`none`},children:e.label})]},t)}),i.nodes.map(e=>{let t=e.id===n,i=n!=null&&!t,a=S9(e.type),o=e.label,s=o.length*5.4,c=13+Math.min(e.obsCount,6),l=Math.max(c,s/2+12),u=c;return(0,K.jsxs)(`g`,{opacity:i?.25:1,style:{cursor:`pointer`},onClick:()=>r(t?null:e.id),children:[(0,K.jsx)(`rect`,{x:e.x-l,y:e.y-c,width:l*2,height:c*2,rx:u,ry:u,fill:a,fillOpacity:.15,stroke:t?`var(--foreground)`:a,strokeWidth:t?2:1.2}),(0,K.jsx)(`text`,{x:e.x,y:e.y+1,textAnchor:`middle`,dominantBaseline:`central`,fill:`var(--foreground)`,fontSize:`9`,fontWeight:t?600:400,style:{pointerEvents:`none`},children:o}),(0,K.jsx)(`text`,{x:e.x,y:e.y+c+11,textAnchor:`middle`,fill:`var(--muted-foreground)`,fontSize:`7`,style:{pointerEvents:`none`},children:e.type})]},e.id)})]})}function E9({entity:e,relations:t,onClose:n,onDelete:r}){let i=t.filter(t=>t.to===e.name),a=t.filter(t=>t.from===e.name);return(0,K.jsxs)(`div`,{className:`rounded-lg border border-border bg-card p-5`,children:[(0,K.jsxs)(`div`,{className:`mb-2 flex items-center gap-2.5`,children:[(0,K.jsxs)(`h3`,{className:`m-0 flex items-center font-mono text-[15px]`,children:[(0,K.jsx)(zb,{color:S9(e.entityType),className:`mr-2 size-2.5`}),e.name]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{type:`error`,ghost:!0,size:`sm`,onClick:r,title:`Delete entity`,children:`Delete`}),(0,K.jsx)(X,{type:`secondary`,size:`sm`,onClick:n,children:`Close`})]}),(0,K.jsxs)(`p`,{className:`mt-0 mb-2 text-xs text-muted-foreground`,children:[`Type: `,(0,K.jsx)(`strong`,{children:e.entityType}),` · Created:`,` `,new Date(e.createdAt).toLocaleString(),` · Updated:`,` `,new Date(e.updatedAt).toLocaleString()]}),e.observations.length>0&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`h4`,{className:`mt-3 mb-1.5 text-xs text-muted-foreground`,children:[`Observations (`,e.observations.length,`)`]}),(0,K.jsx)(`ul`,{className:`m-0 pl-[18px] text-[13px]`,children:e.observations.map((e,t)=>(0,K.jsx)(`li`,{className:`mb-0.5`,children:e},t))})]}),(a.length>0||i.length>0)&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`h4`,{className:`mt-3 mb-1.5 text-xs text-muted-foreground`,children:`Relations`}),(0,K.jsxs)(`div`,{className:`text-[13px]`,children:[a.map((e,t)=>(0,K.jsxs)(`div`,{children:[`→ `,(0,K.jsx)(`strong`,{children:e.relationType}),` → `,e.to]},`o${t}`)),i.map((e,t)=>(0,K.jsxs)(`div`,{children:[`← `,(0,K.jsx)(`strong`,{children:e.relationType}),` ← `,e.from]},`i${t}`))]})]})]})}function D9({activity:e}){return e.length===0?(0,K.jsx)(`p`,{className:`text-muted-foreground text-[13px]`,children:`No activity yet.`}):(0,K.jsx)(`div`,{className:`max-h-[280px] overflow-y-auto`,children:(0,K.jsxs)(By,{className:`text-xs`,children:[(0,K.jsx)(Vy,{children:(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Wy,{children:`Time`}),(0,K.jsx)(Wy,{children:`Action`}),(0,K.jsx)(Wy,{children:`Subject`})]})}),(0,K.jsx)(Hy,{children:e.map(e=>(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Gy,{className:`whitespace-nowrap text-muted-foreground`,children:fb(e.ts)}),(0,K.jsx)(Gy,{children:C9[e.action]??e.action}),(0,K.jsx)(Gy,{className:`max-w-[260px] truncate`,children:e.subject})]},e.id))})]})})}function O9({config:e,onSaved:t}){let[n,r]=(0,v.useState)(e.dbPath),[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(``);(0,v.useEffect)(()=>{r(e.dbPath)},[e.dbPath]);let c=(0,v.useCallback)(async()=>{a(!0),s(``);try{let e=await hc(`/api/memory/config`,{dbPath:n});e.ok?(s(`Saved`),t()):s(e.error??`Failed`)}catch(e){s(String(e))}finally{a(!1)}},[n,t]);return(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`label`,{className:`mb-1 block text-xs text-muted-foreground`,children:`Database path`}),(0,K.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,K.jsx)(Vb,{type:`text`,value:n,onChange:e=>r(e.target.value),className:`flex-1 text-[13px]`}),(0,K.jsx)(X,{size:`sm`,onClick:c,disabled:i||n===e.dbPath,children:i?`Saving…`:`Save`})]}),o&&(0,K.jsx)(`p`,{className:Y(`mt-1 text-xs`,o===`Saved`?`text-success`:`text-destructive`),children:o}),e.stats&&(0,K.jsxs)(`div`,{className:`mt-3 grid grid-cols-3 gap-3`,children:[(0,K.jsx)(nb,{k:`Entities`,v:String(e.stats.entities)}),(0,K.jsx)(nb,{k:`Relations`,v:String(e.stats.relations)}),(0,K.jsx)(nb,{k:`Observations`,v:String(e.stats.observations)})]})]})}function k9(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)([]),[c,l]=(0,v.useState)(null),[u,d]=(0,v.useState)(``),[f,p]=(0,v.useState)(``),m=(0,v.useCallback)(async()=>{try{let[e,n,i,o]=await Promise.all([mc(`/api/memory/graph`),mc(`/api/memory/stats`),mc(`/api/memory/config`),mc(`/api/memory/activity?limit=50`)]);t(e),r(n),a(i),s(o),p(``)}catch(e){p(String(e))}},[]);(0,v.useEffect)(()=>{m();let e=setInterval(()=>void m(),1e4);return()=>clearInterval(e)},[m]);let h=(0,v.useCallback)(async()=>{if(!u.trim()){m();return}try{let e=await mc(`/api/memory/search?q=${encodeURIComponent(u)}`);t(e)}catch(e){p(String(e))}},[u,m]),g=(0,v.useCallback)(async e=>{await gc(`/api/memory/entities`,{names:[e]}),l(null),m()},[m]);return f&&!e?(0,K.jsx)(tb,{title:`Knowledge Graph`,children:(0,K.jsx)(`p`,{className:`text-destructive`,children:f})}):(0,K.jsxs)(K.Fragment,{children:[n&&(0,K.jsxs)(`div`,{className:`reveal grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-5`,children:[(0,K.jsx)(nb,{k:`Entities`,v:String(n.entities)}),(0,K.jsx)(nb,{k:`Relations`,v:String(n.relations)}),(0,K.jsx)(nb,{k:`Observations`,v:String(n.observations)}),(0,K.jsx)(nb,{k:`Entity types`,v:String(n.entityTypes.length)}),(0,K.jsx)(nb,{k:`Relation types`,v:String(n.relationTypes.length)})]}),(0,K.jsx)(tb,{title:`Knowledge Graph`,className:`reveal`,extra:(0,K.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,K.jsx)(Vb,{type:`text`,placeholder:`Search entities…`,value:u,onChange:e=>d(e.target.value),onKeyDown:e=>e.key===`Enter`&&h(),className:`w-[200px] text-xs`}),(0,K.jsx)(X,{size:`sm`,onClick:h,children:`Search`}),u&&(0,K.jsx)(X,{size:`sm`,type:`secondary`,onClick:()=>{d(``),m()},children:`Clear`})]}),children:e&&(0,K.jsx)(T9,{graph:e})}),(0,K.jsxs)(`div`,{className:`reveal grid grid-cols-2 gap-4`,children:[(0,K.jsx)(tb,{title:`Entities`,children:e&&e.entities.length>0?(0,K.jsx)(`div`,{className:`max-h-[360px] overflow-y-auto`,children:(0,K.jsxs)(By,{className:`text-xs`,children:[(0,K.jsx)(Vy,{children:(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Wy,{children:`Name`}),(0,K.jsx)(Wy,{children:`Type`}),(0,K.jsx)(Wy,{children:`Obs`}),(0,K.jsx)(Wy,{children:`Created`})]})}),(0,K.jsx)(Hy,{children:e.entities.map(e=>(0,K.jsxs)(Uy,{className:`cursor-pointer`,"data-state":c?.name===e.name?`selected`:void 0,onClick:()=>l(e),children:[(0,K.jsxs)(Gy,{children:[(0,K.jsx)(zb,{color:S9(e.entityType),className:`mr-1.5`}),e.name]}),(0,K.jsx)(Gy,{className:`text-muted-foreground`,children:e.entityType}),(0,K.jsx)(Gy,{children:e.observations.length}),(0,K.jsx)(Gy,{className:`text-muted-foreground`,children:fb(e.createdAt)})]},e.name))})]})}):(0,K.jsx)(`p`,{className:`text-muted-foreground text-[13px]`,children:e?`No entities.`:`Loading…`})}),c&&e?(0,K.jsx)(E9,{entity:c,relations:e.relations,onClose:()=>l(null),onDelete:()=>g(c.name)}):(0,K.jsx)(tb,{title:`Activity Log`,children:(0,K.jsx)(D9,{activity:o})})]}),n&&(n.entityTypes.length>0||n.relationTypes.length>0)&&(0,K.jsxs)(`div`,{className:`reveal grid grid-cols-2 gap-4`,children:[n.entityTypes.length>0&&(0,K.jsx)(tb,{title:`Entity Types`,children:(0,K.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:n.entityTypes.map(e=>(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-xl px-2.5 py-0.5 text-xs`,style:{background:`${S9(e.type)}22`,border:`1px solid ${S9(e.type)}44`},children:[(0,K.jsx)(zb,{color:S9(e.type)}),e.type,(0,K.jsxs)(`span`,{className:`text-muted-foreground`,children:[`(`,e.count,`)`]})]},e.type))})}),n.relationTypes.length>0&&(0,K.jsx)(tb,{title:`Relation Types`,children:(0,K.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:n.relationTypes.map(e=>(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-xl border border-border bg-muted px-2.5 py-0.5 text-xs`,children:[e.type,(0,K.jsxs)(`span`,{className:`text-muted-foreground`,children:[`(`,e.count,`)`]})]},e.type))})})]}),i&&(0,K.jsx)(tb,{title:`Memory Configuration`,className:`reveal`,children:(0,K.jsx)(O9,{config:i,onSaved:m})})]})}var A9=e=>Y(`flex items-start gap-2.5 rounded-md border px-[11px] py-[9px] cursor-pointer select-none transition-colors`,e?`border-brand/50 bg-brand/10`:`border-border bg-card hover:border-brand/35`);function j9({m:e,busy:t,onToggle:n}){return(0,K.jsxs)(`label`,{className:A9(e.enabled),title:e.description,children:[(0,K.jsx)(`input`,{type:`checkbox`,className:`mt-0.5 cursor-pointer accent-brand`,checked:e.enabled,disabled:t,onChange:()=>n(e.slug,!e.enabled)}),(0,K.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,K.jsxs)(`span`,{className:`flex flex-wrap items-center gap-[7px] text-xs font-semibold text-foreground`,children:[e.label,(0,K.jsx)(`code`,{className:`rounded border border-border bg-background px-[5px] py-px font-mono text-[10px] text-muted-foreground`,children:e.slug})]}),(0,K.jsx)(`span`,{className:`text-[11px] leading-[1.35] text-muted-foreground`,children:e.description})]}),(0,K.jsxs)(`span`,{className:`whitespace-nowrap pt-px font-mono text-[10px] text-muted-foreground`,children:[e.toolCount,` tool`,e.toolCount===1?``:`s`]})]})}function M9(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(new Set),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(!1),f=(0,v.useCallback)(()=>{mc(`/api/modules`).then(e=>{t(e),e.appViews!==void 0&&l(e.appViews)}).catch(()=>a(`could not load modules`))},[]);(0,v.useEffect)(()=>f(),[f]);let p=e=>t(t=>t?{...t,...e}:e),m=(0,v.useCallback)(async(e,n)=>{r(t=>new Set(t).add(e)),t(t=>t&&{...t,modules:t.modules.map(t=>t.slug===e?{...t,enabled:n}:t)});let i=await hc(`/api/modules/toggle`,{slug:e,enabled:n}).catch(()=>({error:`request failed`}));if(r(t=>{let n=new Set(t);return n.delete(e),n}),i.error||i.ok===!1){a(i.error??`toggle failed`),f();return}p(i);let o=i.persisted?`saved to config`:`applied live (not saved)`,s=i.warning?` ⚠ ${i.warning}`:``;a(`${e} ${n?`enabled`:`disabled`} — ${o}. Reconnect the MCP client (or restart the server) for the tool list to update.${s}`)},[f]),h=(0,v.useCallback)(async(e,t)=>{for(let n of e)await m(n,t)},[m]),g=(0,v.useCallback)(async e=>{d(!0),l(e);let t=await hc(`/api/modules/app-views`,{enabled:e}).catch(()=>({error:`request failed`}));if(d(!1),`error`in t&&t.error){a(t.error),l(!e);return}`appViews`in t&&t.appViews!==void 0&&l(t.appViews);let n=`persisted`in t&&t.persisted?`saved to config`:`applied live (not saved)`,r=`warning`in t&&t.warning?` — ${t.warning}`:``;a(`App views ${e?`enabled`:`disabled`} — ${n}. Restart the server for the change to take effect.${r}`)},[]),_=(0,v.useMemo)(()=>{if(!e)return[];let t=o.trim().toLowerCase(),n=e=>!t||e.slug.toLowerCase().includes(t)||e.label.toLowerCase().includes(t)||e.group.toLowerCase().includes(t)||e.description.toLowerCase().includes(t),r=new Map;for(let t of e.modules){if(!n(t))continue;let e=r.get(t.group)??[];e.push(t),r.set(t.group,e)}return[...r.entries()].map(([e,t])=>({group:e,modules:t}))},[e,o]);if(!e)return(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`loading modules…`});let y=_.reduce((e,t)=>e+t.modules.length,0);return(0,K.jsx)(`section`,{className:`grid content-start gap-[18px]`,children:(0,K.jsxs)(tb,{title:`Tool modules`,className:`reveal`,extra:(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[e.enabledModules,`/`,e.total,` modules · `,e.enabledTools,`/`,e.totalTools,` `,`tools exposed`]}),(0,K.jsx)(X,{size:`sm`,ghost:!0,icon:(0,K.jsx)(Zc,{}),onClick:f,children:`Refresh`})]}),children:[(0,K.jsxs)(`label`,{className:Y(A9(c),`mb-2.5`),title:`Emit MCP App view metadata (_meta.ui) on read tools`,children:[(0,K.jsx)(`input`,{type:`checkbox`,className:`mt-0.5 cursor-pointer accent-brand`,checked:c,disabled:u,onChange:()=>void g(!c)}),(0,K.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,K.jsx)(`span`,{className:`flex flex-wrap items-center gap-[7px] text-xs font-semibold text-foreground`,children:`MCP App Views`}),(0,K.jsxs)(`span`,{className:`text-[11px] leading-[1.35] text-muted-foreground`,children:[`When on, read tools emit interactive table/detail widgets via `,(0,K.jsx)(`code`,{children:`_meta.ui`}),`. Disable to keep the LLM context lean. Requires server restart.`]})]})]}),(0,K.jsxs)(`div`,{className:`mb-2.5 flex flex-wrap gap-3 font-mono text-[11px] text-muted-foreground`,children:[(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-[5px]`,children:[`writes to: `,(0,K.jsx)(`code`,{children:e.source?.path??`config file`})]}),(0,K.jsx)(`span`,{className:`inline-flex items-center gap-[5px]`,children:e.hasAllowList?`allow-list active`:`all modules on by default`})]}),(0,K.jsxs)(`p`,{className:`mb-3 text-muted-foreground text-xs`,children:[`Toggle a module to expose or hide all of its tools. Disabling adds it to`,` `,(0,K.jsx)(`code`,{children:`tools.disabledModules`}),` in your config file; enabling removes it (or adds it to`,` `,(0,K.jsx)(`code`,{children:`tools.enabledModules`}),` when an allow-list is in force). Trimming the surface below ~150–200 tools makes every remaining tool reliably findable by the MCP client. The client must reconnect for changes to take effect.`]}),(0,K.jsxs)(`div`,{className:`mb-1.5 flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(Vb,{placeholder:`Filter modules by name, slug, group or description…`,value:o,onChange:e=>s(e.target.value)}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void h(e.modules.filter(e=>!e.enabled).map(e=>e.slug),!0),children:`Enable all`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void h(e.modules.filter(e=>e.enabled).map(e=>e.slug),!1),children:`Disable all`})]}),i&&(0,K.jsx)(`div`,{className:`mt-3 font-mono text-xs text-muted-foreground`,children:i}),y===0?(0,K.jsxs)(`div`,{className:`p-3 text-muted-foreground text-[11px]`,children:[`No modules match “`,o,`”.`]}):(0,K.jsx)(`div`,{className:`mt-3 flex flex-col gap-[18px]`,children:_.map(({group:e,modules:t})=>{let r=t.filter(e=>e.enabled).length,i=t.map(e=>e.slug);return(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`mb-2 flex items-center gap-2.5 border-b border-border pb-1.5`,children:[(0,K.jsx)(`h3`,{className:`m-0 text-[13px] font-semibold text-foreground`,children:e}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[r,`/`,t.length,` on`]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void h(i.filter(e=>{let n=t.find(t=>t.slug===e);return n?!n.enabled:!1}),!0),children:`Enable group`}),(0,K.jsx)(X,{size:`sm`,onClick:()=>void h(i.filter(e=>{let n=t.find(t=>t.slug===e);return n?n.enabled:!1}),!1),children:`Disable group`})]}),(0,K.jsx)(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(min(100%,360px),1fr))] gap-2`,children:t.map(e=>(0,K.jsx)(j9,{m:e,busy:n.has(e.slug),onToggle:(e,t)=>void m(e,t)},e.slug))})]},e)})})]})})}var Tee={TCP:`var(--chart-1)`,UDP:`var(--chart-2)`,ICMP:`var(--chart-3)`,ICMPv6:`var(--chart-3)`,ARP:`var(--chart-4)`,IPv6:`var(--chart-5)`},N9=e=>e&&Tee[e]||`var(--muted-foreground)`;function Eee(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(!1);(0,v.useEffect)(()=>{let e=()=>void mc(`/api/capture/packets?limit=150`).then(t).catch(()=>{});e();let n=setInterval(e,1500);return()=>clearInterval(n)},[]);let i=e?.stats,a=e?.packets??[],o=async()=>{r(!0),await hc(`/api/capture/stop`,{}).catch(()=>{}),r(!1)};if(!i||!i.running&&i.packets===0)return(0,K.jsxs)(`div`,{className:`text-muted-foreground text-[13px] leading-relaxed`,children:[`No capture running. Start one with the`,` `,(0,K.jsx)(`code`,{className:`text-brand font-mono`,children:`start_packet_capture`}),` tool — point the device's TZSP stream at this host — and decoded packets stream in here live.`]});let s=Math.max(1,...Object.values(i.protocols));return(0,K.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2.5`,children:[(0,K.jsx)(zb,{color:i.running?`var(--success)`:`var(--muted-foreground)`,pulse:i.running}),(0,K.jsx)(`b`,{children:i.running?`capturing`:`stopped`}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[`UDP `,i.port]}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[pb(i.packets),` pkts · `,db(i.bytes)]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsxs)(`a`,{className:`bg-card hover:bg-accent inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-xs whitespace-nowrap`,href:pc(`/api/capture/pcap`),download:`capture.pcap`,children:[(0,K.jsx)(Lc,{className:`size-3.5`}),` pcap`]}),(0,K.jsx)(X,{type:`error`,ghost:!0,size:`sm`,icon:(0,K.jsx)(tl,{className:`size-3.5`}),onClick:()=>void o(),disabled:n||!i.running,children:`Stop`})]}),(0,K.jsxs)(`div`,{className:`grid grid-cols-[220px_1fr] gap-3 max-[720px]:grid-cols-1`,children:[(0,K.jsxs)(`div`,{className:`flex flex-col gap-[5px]`,children:[(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px] tracking-[0.05em] uppercase`,children:`Protocols`}),Object.entries(i.protocols).map(([e,t])=>(0,K.jsxs)(`div`,{className:`grid grid-cols-[52px_1fr_34px] items-center gap-1.5 font-mono text-[11px]`,children:[(0,K.jsx)(`span`,{style:{color:N9(e)},children:e}),(0,K.jsx)(`span`,{className:`bg-muted h-2 overflow-hidden rounded-full`,children:(0,K.jsx)(`i`,{className:`block h-full rounded-full`,style:{width:`${t/s*100}%`,background:N9(e)}})}),(0,K.jsx)(`span`,{className:`text-muted-foreground text-right`,children:t})]},e)),(0,K.jsx)(`div`,{className:`text-muted-foreground mt-3 text-[11px] tracking-[0.05em] uppercase`,children:`Top talkers`}),i.topTalkers.length===0&&(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`—`}),i.topTalkers.map(e=>(0,K.jsxs)(`div`,{className:`text-muted-foreground flex justify-between font-mono text-[11px] [&>b]:text-foreground`,children:[(0,K.jsx)(`span`,{children:e.addr}),(0,K.jsx)(`b`,{children:e.count})]},e.addr))]}),(0,K.jsx)(`div`,{className:`bg-background h-[360px] overflow-y-auto rounded-md border font-mono text-[11px]/[1.6]`,children:a.length===0?(0,K.jsx)(`div`,{className:`text-muted-foreground p-2.5 text-[11px]`,children:`waiting for packets…`}):a.map((e,t)=>(0,K.jsxs)(`div`,{className:`grid grid-cols-[90px_64px_48px_1fr] gap-2 overflow-hidden px-2.5 py-px whitespace-nowrap odd:bg-card/40`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:fb(e.ts)}),(0,K.jsx)(`span`,{className:`font-semibold`,style:{color:N9(e.protocol)},children:e.protocol??e.ethType}),(0,K.jsx)(`span`,{className:`text-muted-foreground text-right`,children:e.len}),(0,K.jsx)(`span`,{className:`text-foreground overflow-hidden text-ellipsis`,children:e.info})]},t))})]})]})}function Dee(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(null),c=(0,v.useCallback)(()=>{mc(`/api/s3/list`).then(t).catch(()=>t({configured:!1,objects:[]}))},[]);(0,v.useEffect)(()=>c(),[c]);let l=e=>{mc(`/api/s3/presign?key=${encodeURIComponent(e)}`).then(e=>{e.url?window.open(e.url,`_blank`,`noopener`):s(`could not generate download link`)}).catch(()=>s(`could not generate download link`))},u=async e=>{a(e);let t=await hc(`/api/s3/delete`,{key:e}).catch(()=>({error:`request failed`}));a(null),r(null),t.ok?(s(`Deleted ${e}`),c()):s(t.error??`delete failed`)};return e?e.configured?(0,K.jsx)(`section`,{className:`grid content-start gap-[18px]`,children:(0,K.jsxs)(tb,{title:`S3 backups`,className:`reveal`,extra:(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[e.target,` · `,e.objects.length,` object`,e.objects.length===1?``:`s`,e.truncated?` (truncated)`:``]}),(0,K.jsx)(X,{size:`sm`,ghost:!0,icon:(0,K.jsx)(Zc,{}),onClick:c,children:`Refresh`})]}),children:[o&&(0,K.jsx)(`div`,{className:`font-mono text-xs text-muted-foreground`,children:o}),e.objects.length===0?(0,K.jsxs)(`div`,{className:`p-3 text-muted-foreground text-[11px]`,children:[`No objects in the bucket. Upload one with the `,(0,K.jsx)(`code`,{children:`upload_backup_to_s3`}),` tool.`]}):(0,K.jsxs)(By,{className:`font-mono`,children:[(0,K.jsx)(Vy,{children:(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Wy,{children:`key`}),(0,K.jsx)(Wy,{className:`text-right tabular-nums`,children:`size`}),(0,K.jsx)(Wy,{children:`modified`}),(0,K.jsx)(Wy,{className:`w-[200px]`,children:`actions`})]})}),(0,K.jsx)(Hy,{children:e.objects.map(e=>(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Gy,{children:e.key}),(0,K.jsx)(Gy,{className:`text-right tabular-nums`,children:db(e.size)}),(0,K.jsx)(Gy,{children:e.lastModified?new Date(e.lastModified).toLocaleString(void 0,{hour12:!1}):`—`}),(0,K.jsxs)(Gy,{className:`flex gap-1.5`,onClick:e=>e.stopPropagation(),children:[(0,K.jsx)(X,{size:`sm`,ghost:!0,icon:(0,K.jsx)(Lc,{}),onClick:()=>l(e.key),children:`Download`}),n===e.key?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(X,{size:`sm`,type:`error`,ghost:!0,icon:(0,K.jsx)(kc,{}),disabled:i===e.key,onClick:()=>void u(e.key),children:`Confirm`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>r(null),children:`Cancel`})]}):(0,K.jsx)(X,{size:`sm`,ghost:!0,icon:(0,K.jsx)(il,{}),onClick:()=>r(e.key),children:`Delete`})]})]},e.key))})]})]})}):(0,K.jsxs)(`div`,{className:`grid justify-items-center gap-2 rounded-lg border border-dashed border-border px-4 py-[54px] text-center`,children:[(0,K.jsx)(Pc,{className:`size-7 text-muted-foreground opacity-80`}),(0,K.jsx)(`p`,{className:`m-0 font-semibold text-foreground`,children:`S3 is not configured`}),(0,K.jsxs)(`p`,{className:`m-0 max-w-[460px] text-muted-foreground text-xs`,children:[`Add an `,(0,K.jsx)(`code`,{children:`s3`}),` block (bucket + credentials) to your config to manage backup objects here.`]})]}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`loading S3 objects…`})}function Oee(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)(``),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(null),u=(0,v.useCallback)(()=>{mc(`/api/snapshots`).then(e=>t(e.snapshots)).catch(()=>t([]))},[]);(0,v.useEffect)(()=>u(),[u]);let d=e=>{mc(`/api/snapshot/${encodeURIComponent(e)}`).then(s).catch(()=>{})},f=()=>{!n||!i||hc(`/api/snapshots/diff`,{from:n,to:i}).then(l).catch(()=>{})};if(!e)return(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`loading snapshots…`});if(e.length===0)return(0,K.jsxs)(`div`,{className:`grid justify-items-center gap-2 rounded-lg border border-dashed border-border px-4 py-[54px] text-center`,children:[(0,K.jsx)(zc,{className:`size-7 text-muted-foreground`}),(0,K.jsx)(`p`,{className:`font-semibold text-foreground`,children:`No config snapshots yet`}),(0,K.jsxs)(`p`,{className:`max-w-[460px] text-xs text-muted-foreground`,children:[`Capture one with the `,(0,K.jsx)(`code`,{children:`capture_config_snapshot`}),` tool — then time-travel diff any two here.`]})]});let p=e.map(e=>({value:e.id,label:`${e.device} · ${e.label??e.id} · ${fb(e.ts)}`}));return(0,K.jsxs)(`section`,{className:`grid content-start gap-[18px]`,children:[(0,K.jsxs)(tb,{title:`Config snapshots`,className:`reveal`,extra:(0,K.jsx)(X,{size:`sm`,icon:(0,K.jsx)(Zc,{}),onClick:u,children:`Refresh`}),children:[(0,K.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(Gb,{value:n,onValueChange:r,"aria-label":`Diff from snapshot`,options:[{value:``,label:`diff from…`},...p]}),(0,K.jsx)(Gb,{value:i,onValueChange:a,"aria-label":`Diff to snapshot`,options:[{value:``,label:`to…`},...p]}),(0,K.jsx)(X,{size:`sm`,onClick:f,disabled:!n||!i,children:`Diff →`}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[e.length,` snapshots`]})]}),(0,K.jsx)(`div`,{className:`max-h-[60vh] overflow-auto rounded-lg border border-border`,children:(0,K.jsxs)(By,{children:[(0,K.jsx)(Vy,{className:`sticky top-0 z-10 bg-card`,children:(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Wy,{children:`captured`}),(0,K.jsx)(Wy,{children:`device`}),(0,K.jsx)(Wy,{children:`label`}),(0,K.jsx)(Wy,{children:`version`}),(0,K.jsx)(Wy,{className:`text-right`,children:`lines`}),(0,K.jsx)(Wy,{className:`text-right`,children:`size`}),(0,K.jsx)(Wy,{children:`output`})]})}),(0,K.jsx)(Hy,{children:e.map(e=>(0,K.jsxs)(Uy,{className:`cursor-pointer`,"data-state":o?.id===e.id?`selected`:void 0,onClick:()=>d(e.id),children:[(0,K.jsx)(Gy,{children:fb(e.ts)}),(0,K.jsx)(Gy,{children:e.device}),(0,K.jsx)(Gy,{children:e.label??`—`}),(0,K.jsx)(Gy,{children:e.rosVersion??`—`}),(0,K.jsx)(Gy,{className:`text-right tabular-nums`,children:e.lines}),(0,K.jsx)(Gy,{className:`text-right tabular-nums`,children:db(e.bytes)}),(0,K.jsx)(Gy,{className:`max-w-[320px] truncate text-muted-foreground`,children:`view export →`})]},e.id))})]})})]}),c&&(0,K.jsx)(tb,{title:`Time-travel diff`,className:`reveal`,extra:(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:c.summary.changed?`+${c.summary.added} / -${c.summary.removed}`:`identical`}),children:(0,K.jsx)(`pre`,{className:`m-0 max-h-80 overflow-auto rounded bg-background p-3 font-mono text-[11px] leading-normal text-muted-foreground`,children:(c.unified||`(identical)`).split(`
147
+ `).map((e,t)=>(0,K.jsx)(`div`,{className:e.startsWith(`+`)?`text-success`:e.startsWith(`-`)?`text-destructive`:e.startsWith(`@@`)?`text-brand`:``,children:e||` `},t))})}),o&&(0,K.jsx)(tb,{title:`Snapshot · ${o.label??o.id}`,className:`reveal`,extra:(0,K.jsx)(X,{type:`secondary`,size:`sm`,icon:(0,K.jsx)(cl,{}),onClick:()=>s(null),children:`Close`}),children:(0,K.jsx)(`pre`,{className:`m-0 overflow-auto rounded border border-border bg-background p-3 font-mono text-xs break-words whitespace-pre-wrap`,style:{maxHeight:460},children:o.body||`(empty)`})})]})}function P9({className:e,orientation:t=`horizontal`,decorative:n=!0,...r}){return(0,K.jsx)(j_,{"data-slot":`separator`,decorative:n,orientation:t,className:Y(`shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px`,e),...r})}var F9=` hub`;function I9(e){let t=e;for(;t>Math.PI;)t-=Math.PI*2;for(;t<-Math.PI;)t+=Math.PI*2;return t}function kee(e,t,n){let r=new Map,i=new Map;r.set(F9,{x:450,y:310});let a=e.length<=1?110:Math.min(170,96+e.length*7),o=a+(e.length<=1?190:155);e.forEach((t,n)=>{let o=e.length===1?-Math.PI/2:n/e.length*Math.PI*2-Math.PI/2;i.set(t.id,o),r.set(t.id,{x:450+a*Math.cos(o),y:310+a*Math.sin(o)})});let s=new Map,c=new Map;for(let e of t){let t=n.get(e.id)??``,r=i.get(t)??-Math.PI/2,a=s.get(t)??0;s.set(t,a+1),c.set(e.id,r+Math.ceil(a/2)*(a%2==0?1:-1)*.34)}for(let e=0;e<10;e++)for(let e of t){let r=0;for(let n of t){if(e.id===n.id)continue;let t=I9((c.get(e.id)??0)-(c.get(n.id)??0)),i=Math.abs(t)*o;i<1?r+=e.id<n.id?.02:-.02:i<120&&(r+=Math.sign(t)*2600/(i*i*o))}let a=I9((i.get(n.get(e.id)??``)??-Math.PI/2)-(c.get(e.id)??0));c.set(e.id,(c.get(e.id)??0)+r+a*.06)}for(let e of t){let t=c.get(e.id)??0;r.set(e.id,{x:450+o*Math.cos(t),y:310+o*Math.sin(t)})}return{pos:r,rInner:a,rOuter:o}}function L9(e,t){let n=2*Math.PI*e,r=Math.min(100,Math.max(0,t??0))/100*n;return`${r} ${n-r}`}function Aee(e,t=7){let n=t*Math.PI/180,r=e*Math.cos(n),i=e*Math.sin(n);return`M 450 310 L ${450+r} ${310-i} A ${e} ${e} 0 0 1 ${450+r} ${310+i} Z`}function R9(e){return e==null?`var(--muted-foreground)`:e>=85?`var(--destructive)`:e>=60?`var(--warning)`:`var(--chart-2)`}function jee(e){return e.reachable===!0?`var(--chart-2)`:e.reachable===!1?`var(--destructive)`:e.kind===`device`?`var(--muted-foreground)`:`var(--border)`}function Mee({topo:e,onOnboard:t}){let[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(``),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)({x:0,y:0,k:1}),[f,p]=(0,v.useState)(!1),m=(0,v.useRef)(null),h=(0,v.useRef)(null),g=(0,v.useMemo)(()=>e.nodes.filter(e=>e.kind===`device`),[e.nodes]),_=(0,v.useMemo)(()=>e.nodes.filter(e=>e.kind===`neighbor`),[e.nodes]),y=(0,v.useMemo)(()=>{let t=new Map,n=new Set(_.map(e=>e.id));for(let r of e.edges)n.has(r.to)&&!t.has(r.to)&&t.set(r.to,r.from);return t},[e.edges,_]),{pos:b,rInner:x,rOuter:S}=(0,v.useMemo)(()=>kee(g,_,y),[g,_,y]),C=(0,v.useMemo)(()=>new Map(e.nodes.map(e=>[e.id,e])),[e.nodes]),w=n?C.get(n):null,T=(0,v.useMemo)(()=>{let t=new Map,n=(e,n)=>{t.has(e)||t.set(e,new Set([e])),t.get(e).add(n)};for(let e of g)n(e.id,F9),n(F9,e.id);for(let t of e.edges)n(t.from,t.to),n(t.to,t.from);return t},[e.edges,g]),E=o.trim().toLowerCase(),D=(0,v.useCallback)(e=>c&&!e.onboardable?!1:E?[e.label,e.id,e.ip,e.mac,e.board,e.identity].filter(e=>!!e).some(e=>e.toLowerCase().includes(E)):!0,[E,c]),O=i?T.get(i):null,k=e=>{if(O)return!O.has(e);if(e===` hub`)return!1;let t=C.get(e);return t?!D(t):!1},A=e=>{let t=h.current?.getBoundingClientRect();if(!t)return;let n=(e.clientX-t.left)/t.width*900,r=(e.clientY-t.top)/t.height*620;d(t=>{let i=Math.min(3,Math.max(.5,t.k*(e.deltaY<0?1.12:1/1.12))),a=i/t.k;return{k:i,x:n-(n-t.x)*a,y:r-(r-t.y)*a}})},j=e=>{m.current={px:e.clientX,py:e.clientY,ox:u.x,oy:u.y},p(!0)},M=e=>{let t=m.current,n=h.current?.getBoundingClientRect();if(!t||!n)return;let r=900/n.width*(e.clientX-t.px),i=620/n.height*(e.clientY-t.py);d(e=>({...e,x:t.ox+r,y:t.oy+i}))},N=()=>{m.current=null,p(!1)},P=e=>d(t=>{let n=Math.min(3,Math.max(.5,t.k*e)),r=n/t.k;return{k:n,x:450-(450-t.x)*r,y:310-(310-t.y)*r}}),F=g.map(e=>({from:F9,to:e.id,interface:void 0}));return(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,K.jsxs)(`div`,{className:`relative min-w-[200px] flex-1`,children:[(0,K.jsx)(Qc,{className:`text-muted-foreground pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2`}),(0,K.jsx)(Vb,{className:`pl-8`,type:`search`,placeholder:`Filter by name, identity, IP, MAC or board…`,value:o,onChange:e=>s(e.target.value)})]}),(0,K.jsxs)(X,{size:`sm`,ghost:!0,type:c?`accent`:`default`,onClick:()=>l(e=>!e),title:`Dim everything except neighbours that can be onboarded`,icon:(0,K.jsx)(Yc,{}),children:[`Onboardable`,e.stats.onboardable>0?` (${e.stats.onboardable})`:``]}),(0,K.jsx)(P9,{orientation:`vertical`,className:`h-6`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>P(1/1.25),"aria-label":`Zoom out`,icon:(0,K.jsx)(Hc,{})}),(0,K.jsxs)(`span`,{className:`text-muted-foreground w-11 text-center font-mono text-[11px] tabular-nums`,children:[Math.round(u.k*100),`%`]}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>P(1.25),"aria-label":`Zoom in`,icon:(0,K.jsx)(Jc,{})}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>d({x:0,y:0,k:1}),title:`Reset view`,icon:(0,K.jsx)(Ic,{}),children:`Reset`})]}),(0,K.jsxs)(`div`,{className:`bg-card relative overflow-hidden rounded-xl border`,children:[(0,K.jsxs)(`svg`,{ref:h,viewBox:`0 0 900 620`,width:`100%`,height:560,preserveAspectRatio:`xMidYMid meet`,className:Y(`block w-full touch-none select-none`,f?`cursor-grabbing`:`cursor-grab`),onWheel:A,onPointerDown:j,onPointerMove:M,onPointerUp:N,onPointerLeave:N,onClick:()=>r(null),style:{background:`radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--brand) 7%, transparent), transparent 62%)`},children:[(0,K.jsxs)(`defs`,{children:[(0,K.jsxs)(`linearGradient`,{id:`topo-beam`,x1:`0`,y1:`0`,x2:`1`,y2:`0`,children:[(0,K.jsx)(`stop`,{offset:`0`,stopColor:`var(--brand)`,stopOpacity:`0.3`}),(0,K.jsx)(`stop`,{offset:`1`,stopColor:`var(--brand)`,stopOpacity:`0`})]}),(0,K.jsxs)(`radialGradient`,{id:`topo-hub`,cx:`0.5`,cy:`0.35`,r:`0.75`,children:[(0,K.jsx)(`stop`,{offset:`0`,stopColor:`var(--foreground)`}),(0,K.jsx)(`stop`,{offset:`1`,stopColor:`var(--muted-foreground)`})]})]}),(0,K.jsxs)(`g`,{transform:`translate(${u.x},${u.y}) scale(${u.k})`,children:[(0,K.jsx)(`g`,{className:`topo-ring`,children:[x,S,S+62].map(e=>(0,K.jsx)(`circle`,{cx:450,cy:310,r:e,fill:`none`,className:`stroke-border/70`,strokeDasharray:`2 8`},e))}),(0,K.jsx)(`g`,{className:`topo-sweep`,style:{transformOrigin:`450px 310px`},children:(0,K.jsx)(`path`,{d:Aee(S+62),fill:`url(#topo-beam)`})}),[...F,...e.edges].map((t,n)=>{let r=b.get(t.from),i=b.get(t.to);if(!r||!i)return null;let a=C.get(t.to)?.kind===`neighbor`,o=k(t.from)||k(t.to),s=-(i.y-r.y),c=i.x-r.x,l=Math.hypot(s,c)||1,u=a?16:8,d=(r.x+i.x)/2+s/l*u,f=(r.y+i.y)/2+c/l*u;return(0,K.jsx)(`path`,{d:`M ${r.x} ${r.y} Q ${d} ${f} ${i.x} ${i.y}`,fill:`none`,strokeWidth:a?1.2:1.6,strokeDasharray:a?`4 4`:`6 10`,className:Y(`transition-opacity`,a?`stroke-brand/55`:`topo-flow stroke-chart-2/70`,o&&`opacity-15`),children:(0,K.jsxs)(`title`,{children:[t.from===` hub`?e.server:t.from,` → `,t.to,t.interface?` (${t.interface})`:``]})},`e-${n}`)}),(0,K.jsxs)(`g`,{className:Y(`transition-opacity`,O&&!O.has(` hub`)&&`opacity-15`),onMouseEnter:()=>a(F9),onMouseLeave:()=>a(null),children:[(0,K.jsx)(`circle`,{cx:450,cy:310,r:40,className:`fill-brand/15`}),(0,K.jsx)(`circle`,{cx:450,cy:310,r:27,fill:`url(#topo-hub)`,className:`stroke-border`}),(0,K.jsx)($c,{x:441,y:295,width:18,height:18,className:`stroke-background pointer-events-none`}),(0,K.jsx)(`text`,{x:450,y:326,textAnchor:`middle`,className:`fill-background pointer-events-none font-mono text-[8px] font-bold`,children:`MCP`}),(0,K.jsx)(`text`,{x:450,y:368,textAnchor:`middle`,className:`fill-muted-foreground pointer-events-none font-mono text-[10px]`,children:e.server})]}),e.nodes.map(e=>{let t=b.get(e.id);if(!t)return null;let i=e.kind===`device`,o=n===e.id,s=k(e.id),c=jee(e),l=i?26:15;return(0,K.jsxs)(`g`,{transform:`translate(${t.x},${t.y})`,className:Y(`cursor-pointer transition-opacity`,s&&`opacity-15`),onMouseEnter:()=>a(e.id),onMouseLeave:()=>a(null),onClick:t=>{t.stopPropagation(),r(t=>t===e.id?null:e.id)},children:[o&&(0,K.jsx)(`circle`,{r:l+8,className:`topo-halo stroke-brand fill-none`,strokeWidth:2}),i?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`circle`,{r:l+7,className:`stroke-border/60 fill-none`,strokeWidth:3}),(0,K.jsx)(`circle`,{r:l+7,fill:`none`,strokeWidth:3,strokeLinecap:`round`,transform:`rotate(-90)`,style:{stroke:R9(e.cpuLoad)},strokeDasharray:L9(l+7,e.cpuLoad)}),(0,K.jsx)(`circle`,{r:l+2,className:`stroke-border/40 fill-none`,strokeWidth:2}),(0,K.jsx)(`circle`,{r:l+2,fill:`none`,strokeWidth:2,strokeLinecap:`round`,transform:`rotate(-90)`,style:{stroke:R9(e.memUsedPct)},strokeDasharray:L9(l+2,e.memUsedPct)}),(0,K.jsx)(`circle`,{r:l-4,className:`fill-muted`,style:{stroke:c},strokeWidth:1.6}),(0,K.jsx)(`text`,{textAnchor:`middle`,y:3,className:`fill-foreground pointer-events-none font-mono text-[9px] font-bold`,children:(e.label||e.id).slice(0,4).toUpperCase()})]}):(0,K.jsxs)(K.Fragment,{children:[e.onboardable&&(0,K.jsx)(`circle`,{r:l+5,className:`topo-pulse fill-brand/25`}),(0,K.jsx)(`rect`,{x:-l*.72,y:-l*.72,width:l*1.44,height:l*1.44,rx:3,transform:`rotate(45)`,className:`fill-card`,style:{stroke:c},strokeWidth:1.4,strokeDasharray:e.onboardable?`3 2`:void 0}),e.onboardable&&(0,K.jsx)(Jc,{x:-5,y:-5,width:10,height:10,className:`stroke-brand pointer-events-none`})]}),(0,K.jsx)(`text`,{textAnchor:`middle`,y:l+(i?22:18),className:`fill-foreground pointer-events-none font-mono text-[10px]`,children:(e.label||e.id).slice(0,18)}),i&&(0,K.jsx)(`text`,{textAnchor:`middle`,y:l+34,className:`fill-muted-foreground pointer-events-none font-mono text-[9px]`,children:e.ip||e.board||``})]},e.id)})]})]}),(0,K.jsxs)(`div`,{className:`text-muted-foreground pointer-events-none absolute top-3 left-3 flex flex-col gap-1 font-mono text-[10px]`,children:[(0,K.jsx)(`span`,{className:`text-foreground text-[11px] font-semibold`,children:`Layer-2 fabric`}),(0,K.jsxs)(`span`,{children:[e.stats.devices,` managed · `,e.stats.neighbors,` discovered`]}),e.stats.onboardable>0&&(0,K.jsxs)(`span`,{className:`text-brand`,children:[e.stats.onboardable,` awaiting onboard`]})]}),(0,K.jsxs)(`div`,{className:`text-muted-foreground pointer-events-none absolute right-3 bottom-3 flex flex-col items-end gap-1 font-mono text-[10px]`,children:[(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(`i`,{className:`bg-chart-2 inline-block size-2 rounded-full`}),` online`]}),(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(`i`,{className:`bg-destructive inline-block size-2 rounded-full`}),` offline`]}),(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(`i`,{className:`border-border inline-block size-2 rotate-45 border`}),` neighbour`]}),(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,K.jsx)(`i`,{className:`bg-brand/40 inline-block size-2 rounded-full`}),` onboardable`]})]})]}),w&&(0,K.jsx)(Nee,{node:w,onClose:()=>r(null),onOnboard:t})]})}function Nee({node:e,onClose:t,onOnboard:n}){let r=e.suggestedConfig?JSON.stringify({[e.suggestedConfig.name]:z9(e.suggestedConfig)},null,2):null,i=[[`identity`,e.identity],[`address`,e.ip],[`mac`,e.mac],[`board`,e.board],[`platform`,e.platform],[`version`,e.version],[`uptime`,e.uptime]].filter(e=>!!e[1]);return(0,K.jsxs)(`div`,{className:`bg-card rounded-xl border p-4`,children:[(0,K.jsxs)(`div`,{className:`mb-2 flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(`strong`,{className:`font-mono text-sm`,children:e.label||e.id}),(0,K.jsx)(xb,{variant:e.kind===`device`?`secondary`:`outline`,children:e.kind}),e.onboardable&&(0,K.jsx)(xb,{className:`bg-brand text-brand-foreground`,children:`onboardable`}),e.reachable===!1&&(0,K.jsx)(xb,{variant:`destructive`,children:`offline`}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(X,{ghost:!0,size:`sm`,icon:(0,K.jsx)(cl,{}),onClick:t,"aria-label":`Close`})]}),(0,K.jsx)(`div`,{className:`text-muted-foreground grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 font-mono text-[11px]`,children:i.length===0?(0,K.jsx)(`span`,{children:`no details advertised`}):i.map(([e,t])=>(0,K.jsxs)(v.Fragment,{children:[(0,K.jsx)(`span`,{children:e}),(0,K.jsx)(`span`,{className:`text-foreground break-all`,children:t})]},e))}),e.kind===`device`&&(e.cpuLoad!=null||e.memUsedPct!=null)&&(0,K.jsxs)(`div`,{className:`mt-3 flex gap-4 font-mono text-[11px]`,children:[e.cpuLoad!=null&&(0,K.jsxs)(`span`,{style:{color:R9(e.cpuLoad)},children:[`cpu `,e.cpuLoad,`%`]}),e.memUsedPct!=null&&(0,K.jsxs)(`span`,{style:{color:R9(e.memUsedPct)},children:[`mem `,e.memUsedPct,`%`]})]}),r&&e.suggestedConfig&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(P9,{className:`my-3`}),(0,K.jsx)(`p`,{className:`text-muted-foreground mb-1.5 text-[11px]`,children:`Not managed yet — add this to your device config to onboard it:`}),(0,K.jsx)(`pre`,{className:`bg-background text-foreground m-0 mb-2 overflow-x-auto rounded-md border px-2.5 py-2 font-mono text-[11px]/[1.5] whitespace-pre`,children:r}),(0,K.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,K.jsx)(ib,{title:`Copy config stub`,label:`Copy config stub`,text:r}),n&&(0,K.jsx)(X,{type:`accent`,size:`sm`,onClick:()=>n(e.suggestedConfig.name,z9(e.suggestedConfig)),children:`Add to config →`})]})]})]})}function z9(e){let t={port:e.port,username:e.username};return e.host&&(t.host=e.host),e.mac&&(t.mac=e.mac),t}function B9(e){return e>=1e3?`${(e/1e3).toFixed(1)}s`:`${Math.round(e)}ms`}function Pee(e){return!e||!e.pooled?`var(--muted-foreground)`:e.dead?`var(--destructive)`:e.inflight>0?`var(--chart-1)`:`var(--success)`}function Fee(e){return!e||!e.pooled?`no connection`:e.dead?`reconnecting`:e.inflight>0?`${e.inflight} inflight`:`ready`}function Iee({device:e}){let t=e.pool,n=!t||!t.pooled?`border-dashed opacity-60`:t.dead?`border-destructive/50`:t.inflight>0?`border-chart-1/50`:`border-success/35`,r=!!t&&t.pooled&&t.inflight>0,i=Pee(t),a=!t||!t.pooled?0:t.inflight>0?Math.min(8+t.inflight*15,100):100;return(0,K.jsxs)(`div`,{className:Y(`bg-card rounded-lg border px-3 py-2.5 transition-colors hover:border-muted-foreground/40`,n),children:[(0,K.jsxs)(`div`,{className:`mb-1.5 flex items-center gap-1.5`,children:[(0,K.jsx)(`span`,{className:`size-[7px] shrink-0 rounded-full`,style:{background:i}}),(0,K.jsx)(`span`,{className:`text-foreground overflow-hidden text-xs font-semibold text-ellipsis whitespace-nowrap`,children:e.name}),(0,K.jsx)(`span`,{className:`ml-auto text-[10px] font-semibold tracking-[0.04em] uppercase`,style:{color:i},children:Fee(t)})]}),(0,K.jsxs)(`div`,{className:`bg-muted relative h-1.5 overflow-hidden rounded-[3px]`,children:[(0,K.jsx)(`div`,{className:Y(`h-full rounded-[3px] opacity-65 transition-[width] duration-[400ms]`,r&&`animate-pulse`),style:{width:`${a}%`,background:i}}),t&&t.pooled&&t.inflight>0&&(0,K.jsxs)(`span`,{className:`text-foreground absolute -top-px right-1 text-[8px] leading-[8px] font-bold [text-shadow:0_0_3px_rgba(0,0,0,0.6)]`,children:[t.inflight,` ch`]})]})]})}function V9({k:e,v:t,sub:n}){return(0,K.jsx)(nb,{k:e,v:t,sub:n,cls:`min-w-[100px]`})}function Lee({devices:e,poolPayload:t}){let n=e.filter(e=>e.pool!==null&&e.pool!==void 0);if(!(t?.enabled??n.length>0)&&n.length===0)return(0,K.jsxs)(`details`,{className:`my-3`,open:!0,children:[(0,K.jsx)(`summary`,{className:`mb-2 cursor-pointer font-semibold`,children:`SSH Connection Pool`}),(0,K.jsxs)(`p`,{className:`text-muted-foreground my-1 text-[13px]`,children:[`Connection pooling is disabled. Enable it with`,` `,(0,K.jsx)(`code`,{className:`text-chart-1 text-xs`,children:`--ssh-keep-alive true`}),` or`,` `,(0,K.jsx)(`code`,{className:`text-chart-1 text-xs`,children:`MIKROTIK_SSH__KEEP_ALIVE=true`}),` to keep persistent SSH connections across tool calls.`]})]});let r=t?.aggregate,i=t?.config;return(0,K.jsxs)(`details`,{className:`my-3`,open:!0,children:[(0,K.jsx)(`summary`,{className:`mb-2 cursor-pointer font-semibold`,children:`SSH Connection Pool`}),r&&(0,K.jsxs)(`div`,{className:`mb-3 flex flex-wrap gap-2`,children:[(0,K.jsx)(V9,{k:`Connections`,v:String(r.totalConnections)}),(0,K.jsx)(V9,{k:`Inflight`,v:String(r.totalInflight),sub:`channels`}),(0,K.jsx)(V9,{k:`Idle`,v:String(r.totalIdle)}),(0,K.jsx)(V9,{k:`Busy`,v:String(r.totalBusy)}),i&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(V9,{k:`Keepalive`,v:B9(i.keepAliveInterval)}),(0,K.jsx)(V9,{k:`Idle timeout`,v:B9(i.idleTimeout)})]})]}),n.length>0&&(0,K.jsx)(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(200px,1fr))] gap-2`,children:n.map(e=>(0,K.jsx)(Iee,{device:e},e.name))})]})}function Ree({...e}){return(0,K.jsx)(cf,{"data-slot":`dialog`,...e})}function zee({...e}){return(0,K.jsx)(mf,{"data-slot":`dialog-portal`,...e})}function Bee({className:e,...t}){return(0,K.jsx)(gf,{"data-slot":`dialog-overlay`,className:Y(`fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0`,e),...t})}function Vee({className:e,children:t,showCloseButton:n=!0,...r}){return(0,K.jsxs)(zee,{"data-slot":`dialog-portal`,children:[(0,K.jsx)(Bee,{}),(0,K.jsxs)(bf,{"data-slot":`dialog-content`,className:Y(`fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg`,e),...r,children:[t,n&&(0,K.jsxs)(kf,{"data-slot":`dialog-close`,className:`absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,children:[(0,K.jsx)(cl,{}),(0,K.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function Hee({className:e,...t}){return(0,K.jsx)(`div`,{"data-slot":`dialog-header`,className:Y(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function Uee({className:e,showCloseButton:t=!1,children:n,...r}){return(0,K.jsxs)(`div`,{"data-slot":`dialog-footer`,className:Y(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...r,children:[n,t&&(0,K.jsx)(kf,{asChild:!0,children:(0,K.jsx)(Xy,{variant:`outline`,children:`Close`})})]})}function Wee({className:e,...t}){return(0,K.jsx)(Tf,{"data-slot":`dialog-title`,className:Y(`text-lg leading-none font-semibold`,e),...t})}function Gee({className:e,...t}){return(0,K.jsx)(Df,{"data-slot":`dialog-description`,className:Y(`text-sm text-muted-foreground`,e),...t})}var H9=` {0,3}`;function Kee(e){let t=e.replace(/\r\n?/g,`
147
148
  `);t=t.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`);let n=[];t=t.replace(/```(\w*)\n([\s\S]*?)```/g,(e,t,r)=>(n.push(`<pre><code>${r.trim()}</code></pre>`),`%%CB${n.length-1}%%`));let r=[];t=t.replace(/`([^`]+)`/g,(e,t)=>(r.push(`<code>${t}</code>`),`%%IC${r.length-1}%%`)),t=t.replace(/!\[([^\]]*)\]\(([^)]+)\)/g,`<img src="$2" alt="$1"/>`),t=t.replace(/\[([^\]]+)\]\(([^)]+)\)/g,`<a href="$2" target="_blank" rel="noopener">$1</a>`),t=t.replace(/(?<!=["'])(https?:\/\/[^\s<>")\]]+)/g,`<a href="$1" target="_blank" rel="noopener">$1</a>`),t=t.replace(/\*\*\*(.+?)\*\*\*/g,`<strong><em>$1</em></strong>`),t=t.replace(/\*\*(.+?)\*\*/g,`<strong>$1</strong>`),t=t.replace(/(?<!\*)\*([^*]+)\*(?!\*)/g,`<em>$1</em>`),t=t.replace(/~~(.+?)~~/g,`<del>$1</del>`),t=t.replace(RegExp(`^${H9}#### (.+)$`,`gm`),`<h5>$1</h5>`),t=t.replace(RegExp(`^${H9}### (.+)$`,`gm`),`<h4>$1</h4>`),t=t.replace(RegExp(`^${H9}## (.+)$`,`gm`),`<h3>$1</h3>`),t=t.replace(RegExp(`^${H9}# (.+)$`,`gm`),`<h2>$1</h2>`),t=t.replace(RegExp(`^${H9}&gt; (.+)$`,`gm`),`<blockquote>$1</blockquote>`),t=t.replace(/<\/blockquote>\n<blockquote>/g,`
148
149
  `),t=t.replace(RegExp(`^${H9}(?:-{3,}|\\*{3,}|_{3,})\\s*$`,`gm`),`<hr/>`),t=t.replace(RegExp(`((?:^${H9}\\|.+\\|\\n?)+)`,`gm`),e=>{let t=e.trim().split(`
149
150
  `).filter(Boolean);if(t.length<2)return e;let n=e=>e.trim().split(`|`).slice(1,-1).map(e=>e.trim()),r=n(t[0]),i=/^(\|[\s:*-]+)+\|$/.test(t[1].trim().replace(/[^|:*-\s]/g,``)),a=i?n(t[1]):null,o=a?a.map(e=>e.startsWith(`:`)&&e.endsWith(`:`)?`center`:e.endsWith(`:`)?`right`:`left`):r.map(()=>`left`),s=t.slice(i?2:1),c=`<div class="wn-table-wrap"><table><thead><tr>`;for(let e=0;e<r.length;e++)c+=`<th style="text-align:${o[e]}">${r[e]}</th>`;c+=`</tr></thead><tbody>`;for(let e of s){let t=n(e);c+=`<tr>`;for(let e=0;e<r.length;e++)c+=`<td style="text-align:${o[e]}">${t[e]??``}</td>`;c+=`</tr>`}return`${c}</tbody></table></div>`}),t=t.replace(RegExp(`^${H9}(\\d+)\\. (.+)$`,`gm`),`<oli>$2</oli>`),t=t.replace(/<\/oli>\n\n+<oli>/g,`</oli>
150
151
  <oli>`),t=t.replace(/((?:<oli>.*<\/oli>\n?)+)/g,e=>`<ol>${e.trimEnd().replace(/<\/?oli>/g,e=>e.replace(`oli`,`li`))}</ol>`),t=t.replace(RegExp(`^${H9}[-*+] (.+)$`,`gm`),`<li>$1</li>`),t=t.replace(/<\/li>\n\n+<li>/g,`</li>
151
152
  <li>`),t=t.replace(/((?:<li>.*<\/li>\n?)+)/g,e=>`<ul>${e.trimEnd()}</ul>`),t=t.replace(/<li>\[x\] (.+?)<\/li>/gi,`<li class="wn-task done"><span class="wn-check">&#10003;</span> $1</li>`),t=t.replace(/<li>\[ \] (.+?)<\/li>/g,`<li class="wn-task"><span class="wn-check">&#9744;</span> $1</li>`);let i=/^<\/?(h[2-5]|ul|ol|li|pre|blockquote|hr|div|table|img)/;return t=t.split(`
152
153
  `).map(e=>{let t=e.trim();return t?i.test(t)?t:`<p>${t}</p>`:``}).join(`
153
- `),t=t.replace(/%%CB(\d+)%%/g,(e,t)=>n[Number(t)]),t=t.replace(/%%IC(\d+)%%/g,(e,t)=>r[Number(t)]),t}var U9=`mt-whats-new-dismissed`,W9=`mt-whats-new-seen-version`;function Hee(e){try{return localStorage.getItem(U9)===e}catch{return!1}}function Uee(e){try{localStorage.setItem(U9,e)}catch{}}function Wee(e){try{let t=localStorage.getItem(W9);return localStorage.setItem(W9,e),t!==null&&t!==e}catch{return!1}}var Gee=`text-[13px] leading-[1.7] text-muted-foreground [&_h2]:mt-[18px] [&_h2]:mb-1.5 [&_h2]:text-[17px] [&_h2]:font-bold [&_h2]:text-foreground [&_h3]:mt-[18px] [&_h3]:mb-1.5 [&_h3]:text-[15px] [&_h3]:font-bold [&_h3]:text-foreground [&_h4]:mt-[18px] [&_h4]:mb-1.5 [&_h4]:text-[14px] [&_h4]:font-bold [&_h4]:text-foreground [&_h5]:mt-[18px] [&_h5]:mb-1.5 [&_h5]:text-[14px] [&_h5]:font-bold [&_h5]:text-foreground [&_p]:my-[5px] [&_ul]:my-[5px] [&_ul]:list-disc [&_ul]:pl-[18px] [&_ol]:my-[5px] [&_ol]:list-decimal [&_ol]:pl-[22px] [&_li]:my-[3px] [&_li]:marker:text-brand [&_img]:my-1.5 [&_img]:max-w-full [&_img]:rounded-md [&_img]:border [&_img]:border-border [&_code]:rounded [&_code]:border [&_code]:border-border [&_code]:bg-muted [&_code]:px-1.5 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-xs [&_code]:text-brand [&_pre]:my-2 [&_pre]:overflow-x-auto [&_pre]:rounded-md [&_pre]:border [&_pre]:border-border [&_pre]:bg-background [&_pre]:p-3 [&_pre_code]:border-0 [&_pre_code]:bg-transparent [&_pre_code]:p-0 [&_pre_code]:text-muted-foreground [&_a]:text-brand [&_a]:underline [&_a]:underline-offset-2 [&_strong]:font-semibold [&_strong]:text-foreground [&_blockquote]:my-2 [&_blockquote]:border-l-[3px] [&_blockquote]:border-brand/40 [&_blockquote]:px-3.5 [&_blockquote]:py-1.5 [&_blockquote]:italic [&_hr]:my-3.5 [&_hr]:border-0 [&_hr]:border-t [&_hr]:border-border [&_del]:text-muted-foreground [&_del]:opacity-60 [&_table]:w-full [&_table]:border-collapse [&_table]:font-mono [&_table]:text-xs [&_th]:border-b [&_th]:border-border [&_th]:bg-muted [&_th]:px-3 [&_th]:py-[7px] [&_th]:text-left [&_th]:text-[11px] [&_th]:font-semibold [&_th]:tracking-wide [&_th]:text-foreground [&_th]:uppercase [&_td]:border-b [&_td]:border-border [&_td]:px-3 [&_td]:py-[7px] [&_td]:text-muted-foreground [&_.wn-table-wrap]:my-2.5 [&_.wn-table-wrap]:overflow-x-auto [&_.wn-table-wrap]:rounded-md [&_.wn-table-wrap]:border [&_.wn-table-wrap]:border-border [&_.wn-task]:-ml-[18px] [&_.wn-task]:list-none [&_.wn-check]:inline-block [&_.wn-check]:w-4 [&_.wn-task.done_.wn-check]:text-success`,Kee=600*1e3;function qee(e){let[t,n]=(0,v.useState)(null),[r,i]=(0,v.useState)(!1);(0,v.useEffect)(()=>{if(!e)return;let t=Wee(e),r=null,a=()=>{mc(`/api/releases/latest`).then(e=>{n(e);let a=r===null,o=r!==null&&e.version!==r;if(r=e.version,a&&t){setTimeout(()=>i(!0),1200);return}e.isNewer&&!Hee(e.version)&&(a||o)&&setTimeout(()=>i(!0),a?1200:0)}).catch(()=>{})};a();let o=setInterval(a,Kee);return()=>clearInterval(o)},[e]);let a=(0,v.useCallback)(()=>{t?.isNewer&&Uee(t.version),i(!1)},[t]),o=(0,v.useCallback)(()=>i(!0),[]);return{release:t,showModal:r,showIndicator:t!==null&&t.isNewer,openModal:o,dismissRelease:a}}function Jee({release:e,onDismiss:t}){let n=new Date(e.publishedAt).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`}),r={__html:Vee(e.body)};return(0,K.jsx)(Nee,{open:!0,onOpenChange:e=>{e||t()},children:(0,K.jsxs)(Iee,{className:`max-h-[calc(100vh-80px)] gap-0 overflow-y-auto p-0 sm:max-w-[520px]`,children:[(0,K.jsxs)(Lee,{className:`items-center gap-4 px-8 pt-10 pb-6 text-center`,children:[(0,K.jsx)(`span`,{className:`inline-block rounded-full border border-brand/30 bg-brand/10 px-3.5 py-1 font-mono text-[10px] font-bold tracking-[0.2em] text-brand uppercase`,children:e.isNewer?`NEW RELEASE`:`RELEASE NOTES`}),(0,K.jsxs)(zee,{className:`text-[44px] leading-none font-extrabold tracking-tight text-brand`,children:[`v`,e.version]}),(0,K.jsxs)(Bee,{className:`font-mono text-xs text-muted-foreground`,children:[`Released `,n,e.isNewer&&(0,K.jsxs)(K.Fragment,{children:[` · you’re on v`,e.currentVersion]})]})]}),(0,K.jsx)(`div`,{className:Y(`px-8 py-5`,Gee),dangerouslySetInnerHTML:r}),(0,K.jsxs)(Ree,{className:`flex-row items-center justify-between border-t border-border px-8 pt-3.5 pb-6`,children:[(0,K.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground hover:text-foreground`,children:[`View on GitHub`,(0,K.jsx)(Rc,{className:`size-3.5`})]}),(0,K.jsx)(X,{type:`default`,size:`sm`,onClick:t,children:`Got it`})]})]})})}zi.registerPlugin(G);function G9(e,t,n){let r=URL.createObjectURL(new Blob([t],{type:`${n};charset=utf-8`})),i=document.createElement(`a`);i.href=r,i.download=e,document.body.append(i),i.click(),i.remove(),URL.revokeObjectURL(r)}var K9=[{id:`overview`,label:`Overview`,sub:`Calls, latency & risk at a glance`},{id:`devices`,label:`Devices`,sub:`Connectivity radar & system health`},{id:`clients`,label:`Clients`,sub:`Connected LAN devices — usage, block/allow, pin IP`},{id:`aaa`,label:`RADIUS & UM`,sub:`RADIUS client & User Manager RADIUS server`},{id:`topology`,label:`Topology`,sub:`Layer-2 neighbours via MNDP / CDP / LLDP`},{id:`packets`,label:`Packets`,sub:`Live TZSP capture & decode`},{id:`snapshots`,label:`Snapshots`,sub:`Config history & time-travel diff`},{id:`drift`,label:`Drift Guard`,sub:`Golden config baselines & live drift detection`},{id:`plan`,label:`Change Plan`,sub:`Dry-run intended RouterOS commands`},{id:`s3`,label:`S3 Backups`,sub:`List, download & delete S3 backup objects`},{id:`backups`,label:`Backups`,sub:`Local config vault — create, restore, manage`},{id:`modules`,label:`Modules`,sub:`Enable/disable tool modules — curate the surface`},{id:`config`,label:`Config`,sub:`Effective configuration & safe editor`},{id:`memory`,label:`Memory`,sub:`Knowledge graph — entities, relations & observations`},{id:`feed`,label:`Live Feed`,sub:`Every tool call, in real time`}],q9=new Set(K9.map(e=>e.id)),J9=`mt-view`;function Y9(){try{let e=location.hash.replace(/^#\/?/,``);return q9.has(e)?e:null}catch{return null}}function Yee(){let e=Y9();if(e)return e;try{let e=localStorage.getItem(J9);if(e&&q9.has(e))return e}catch{}return`overview`}var X9=[`var(--foreground)`,`var(--muted-foreground)`],Z9={overview:X9,devices:X9,clients:X9,aaa:X9,topology:X9,packets:X9,snapshots:X9,drift:X9,plan:X9,s3:X9,backups:X9,modules:X9,config:X9,memory:X9,feed:X9},Xee={overview:{what:`A live pulse of all MCP tool activity: total calls, error rate, p50/p95 latency, the busiest tools, and a risk breakdown — over a time window you choose.`,tips:[`Change the time window (top-right) to zoom from the last 5 minutes out to 24 hours.`,`The risk donut splits calls by annotation: read · write · destructive · dangerous.`,`A rising error line usually points at one device or one tool — jump to Live Feed to see which.`]},devices:{what:`Every configured router with its live reachability (SSH or MAC-Telnet), latency, identity, and system health — CPU, memory and disk — refreshed continuously.`,tips:[`Each device gets a stable colour so you can track it across the connectivity radar.`,`Health (CPU/Mem/Disk) is probed periodically; MAC-Telnet devices are probed on a slower cadence.`,`Latency tiers are colour-coded green → amber → red; a grey node is currently unreachable.`,`The SSH Connection Pool panel shows persistent connections: green = idle/ready, blue = busy with inflight channels, red = reconnecting.`]},clients:{what:`The LAN devices connected to a router — merged from its DHCP leases and ARP table — with live Download/Upload charts, and one-click controls to block/allow a device, pin (reserve) its IP, change that IP, or relabel it.`,tips:[`Pick the router (top-right) to inspect its connected devices; filter by IP, MAC or name.`,`Click a device to open its live ↓/↑ traffic chart — needs a simple queue targeting its IP.`,`Block/allow is enforced by MAC, so it survives the device changing IP; “Pin IP” makes its lease static.`]},aaa:{what:"Full management of the router's RADIUS client (`/radius`) and the built-in User Manager RADIUS server (`/user-manager`): RADIUS servers + incoming CoA, and User Manager users, service profiles, rate/quota limitations, NAS clients, profile assignments, accounting sessions, and global settings.",tips:[`Pick the router (top-right), then switch tabs across RADIUS, Users, Profiles, Limitations, NAS, Assignments, Sessions and Settings.`,`Every tab is full CRUD: add, edit, enable/disable and remove — secrets are write-only and shown redacted.`,`The Usage & Heatmap tab shows each user's 3-month download/upload and a GitHub-style connection heatmap, persisted locally.`,`If a device lacks the user-manager package, the User Manager tabs explain how to install it; RADIUS-client tabs still work.`]},topology:{what:`A Layer-2 map of neighbours each router discovers via MNDP / CDP / LLDP — the physical adjacency of your network, drawn live.`,tips:[`Solid nodes are configured devices; faint nodes are discovered-but-unmanaged neighbours.`,`Use “Add to config →” on an unmanaged neighbour to pre-fill it in the Config editor.`,`Drag to pan; the layout settles automatically as new neighbours arrive.`]},packets:{what:`Live packet capture streamed from a router over TZSP — decode headers in real time without leaving the dashboard.`,tips:[`Pick a device and start the capture; packets decode as they arrive.`,`Stop the capture when done — it frees the router-side sniffer.`,`Great for debugging a protocol issue alongside the Live Feed of tool calls.`]},snapshots:{what:`Point-in-time captures of a device’s full configuration (/export), stored locally so you can diff any two and see exactly what changed.`,tips:[`Capture a snapshot before a risky change, then diff after to audit the delta.`,`The diff is line-level: green added, red removed.`,`Snapshots are device config exports — for the dashboard’s OWN config history see the Config page.`]},drift:{what:`Detect when router configs drift from their golden baseline — with change attribution and one-click reconciliation.`,tips:[`Set a baseline via MCP tools (config_set_baseline) or the Baseline Manager below.`,`Click a device card to run a live drift check against its golden config.`,`Promote accepted changes as the new baseline, or reconcile to roll back.`]},plan:{what:`Dry-run the exact RouterOS commands a change would run before it touches a device — a change plan you can review and trust.`,tips:[`Paste or build intended commands to see them validated and ordered.`,`Nothing is sent to the device from here — it’s a preview.`,`Pair with Safe Mode (auto-revert) when you do apply for real.`]},s3:{what:`Browse, download, and delete backup objects in your configured S3-compatible bucket — your off-box archive of device backups and exports.`,tips:[`Filter by key prefix to find a device’s backups quickly.`,`Download fetches the object through a presigned URL; delete is permanent.`,`For host-side .rsc backups instead, use the Backups page.`]},backups:{what:`A local config vault on the MCP server: capture a device’s /export as a timestamped .rsc file, then download, upload, rename, restore (via Safe Mode), or delete it.`,tips:[`Restore offers a dry-run (applies then rolls back) before you commit for real.`,`Edit the vault path inline in the header — it’s saved to your config.`,`Filenames are stamped in the device’s local 24-hour clock.`]},modules:{what:"Every tool module in the catalog with a live on/off switch. Toggling one writes your config file's `tools` block (disabledModules / enabledModules) and applies it immediately, so you can curate exactly which scopes the MCP server exposes.",tips:[`MCP clients search-rank tools and degrade past ~100; trim the surface below ~150–200 tools so every remaining tool is reliably findable.`,`Disable adds the module to tools.disabledModules; enable removes it (or adds it to an active allow-list) — your config file is updated live on each toggle.`,`Changes need an MCP client reconnect (or a server restart) to actually shrink/grow the visible tool list.`]},config:{what:`View the effective configuration, edit it safely with schema-aware validation and auto-rollback, browse a full field guide, and travel through config version history.`,tips:[`Every successful apply is auto-saved to the version timeline — restore any point in time.`,`Save a named checkpoint before a big change for an easy, labelled rollback.`,`The Field Guide documents every config option, its type, and default — straight from the schema.`]},memory:{what:`A persistent knowledge graph the AI builds across sessions — entities (routers, subnets, users), relations between them, and free-text observations.`,tips:[`Entities are created by the AI via MCP tools — you can browse and delete them here.`,`The graph visualization shows entities as circles and relations as directed edges; click a node to inspect it.`,`Change the database path to switch between different knowledge bases.`]},feed:{what:`Every tool call as it happens — tool, device, risk, duration, and success/error — with full request/response detail on click.`,tips:[`Filter by status to isolate failures, or by tool/device to follow one thread.`,`Click any row to open the full (secret-redacted) request and response.`,`Pause the stream when you want to inspect without rows shifting under you.`]}};function Q9({icon:e,title:t,sub:n,body:r,className:i}){return(0,K.jsxs)(`div`,{className:Y(`text-muted-foreground flex flex-col items-center gap-2 rounded-lg border border-dashed px-6 py-14 text-center`,i),children:[e,(0,K.jsx)(`p`,{className:`text-foreground text-sm font-medium`,children:t}),n!=null&&(0,K.jsx)(`p`,{className:`max-w-md text-xs`,children:n}),r]})}function Zee({view:e}){let t=Xee[e];return(0,K.jsxs)(`div`,{className:`bg-card reveal flex gap-3 rounded-lg border p-4`,role:`region`,"aria-label":`Page help`,children:[(0,K.jsx)(Nc,{className:`text-brand mt-0.5 size-4 shrink-0`,"aria-hidden":`true`}),(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,K.jsx)(`p`,{className:`text-sm`,children:t.what}),(0,K.jsx)(`ul`,{className:`text-muted-foreground list-disc space-y-1 pl-4 text-xs`,children:t.tips.map((e,t)=>(0,K.jsx)(`li`,{children:e},t))})]})]})}function Qee({name:e}){return(0,K.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.7`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:{overview:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`rect`,{x:`3`,y:`3`,width:`8`,height:`8`,rx:`1.6`}),(0,K.jsx)(`rect`,{x:`13`,y:`3`,width:`8`,height:`5`,rx:`1.6`}),(0,K.jsx)(`rect`,{x:`13`,y:`10`,width:`8`,height:`11`,rx:`1.6`}),(0,K.jsx)(`rect`,{x:`3`,y:`13`,width:`8`,height:`8`,rx:`1.6`})]}),devices:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`7`,rx:`2`}),(0,K.jsx)(`rect`,{x:`3`,y:`13`,width:`18`,height:`7`,rx:`2`}),(0,K.jsx)(`path`,{d:`M7 7.5h.01M7 16.5h.01`})]}),clients:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`circle`,{cx:`9`,cy:`8`,r:`3`}),(0,K.jsx)(`path`,{d:`M3.5 19a5.5 5.5 0 0 1 11 0`}),(0,K.jsx)(`path`,{d:`M16 7.5a2.5 2.5 0 0 1 0 5M17.5 19a4.5 4.5 0 0 0-2-3.6`})]}),aaa:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`path`,{d:`M12 3 4 6v5c0 4.4 3.2 7.6 8 9 4.8-1.4 8-4.6 8-9V6l-8-3Z`}),(0,K.jsx)(`path`,{d:`M9.5 11.5 11 13l3.5-3.5`})]}),topology:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`circle`,{cx:`12`,cy:`5`,r:`2.4`}),(0,K.jsx)(`circle`,{cx:`5`,cy:`19`,r:`2.4`}),(0,K.jsx)(`circle`,{cx:`19`,cy:`19`,r:`2.4`}),(0,K.jsx)(`path`,{d:`M12 7.4 6.4 16.6M12 7.4 17.6 16.6`})]}),packets:(0,K.jsx)(`path`,{d:`M3 12h4l2-7 4 14 2-7h6`}),snapshots:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`path`,{d:`M12 3 3 7.5 12 12 21 7.5 12 3Z`}),(0,K.jsx)(`path`,{d:`M3 12 12 16.5 21 12`}),(0,K.jsx)(`path`,{d:`M3 16.5 12 21 21 16.5`})]}),drift:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`path`,{d:`M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10Z`}),(0,K.jsx)(`path`,{d:`M9 12l2 2 4-4`}),(0,K.jsx)(`path`,{d:`M12 6v2M12 16v2M6 12h2M16 12h2`})]}),plan:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`circle`,{cx:`6`,cy:`6`,r:`2.3`}),(0,K.jsx)(`circle`,{cx:`6`,cy:`18`,r:`2.3`}),(0,K.jsx)(`circle`,{cx:`18`,cy:`8`,r:`2.3`}),(0,K.jsx)(`path`,{d:`M6 8.3v7.4M8.3 6H13a3 3 0 0 1 3 3v0`})]}),s3:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`ellipse`,{cx:`12`,cy:`6`,rx:`7`,ry:`2.6`}),(0,K.jsx)(`path`,{d:`M5 6v12c0 1.5 3.1 2.6 7 2.6s7-1.1 7-2.6V6`}),(0,K.jsx)(`path`,{d:`M5 12c0 1.5 3.1 2.6 7 2.6s7-1.1 7-2.6`})]}),backups:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`path`,{d:`M3 6.5 5 3.5h14l2 3`}),(0,K.jsx)(`rect`,{x:`3`,y:`6.5`,width:`18`,height:`14`,rx:`2`}),(0,K.jsx)(`path`,{d:`M9.5 12h5`})]}),modules:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`rect`,{x:`3`,y:`5`,width:`18`,height:`6`,rx:`3`}),(0,K.jsx)(`circle`,{cx:`8`,cy:`8`,r:`1.5`}),(0,K.jsx)(`rect`,{x:`3`,y:`13`,width:`18`,height:`6`,rx:`3`}),(0,K.jsx)(`circle`,{cx:`16`,cy:`16`,r:`1.5`})]}),config:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`path`,{d:`M4 7h8M16 7h4M4 17h4M12 17h8`}),(0,K.jsx)(`circle`,{cx:`14`,cy:`7`,r:`2.2`}),(0,K.jsx)(`circle`,{cx:`10`,cy:`17`,r:`2.2`})]}),memory:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`circle`,{cx:`12`,cy:`6`,r:`2`}),(0,K.jsx)(`circle`,{cx:`6`,cy:`14`,r:`2`}),(0,K.jsx)(`circle`,{cx:`18`,cy:`14`,r:`2`}),(0,K.jsx)(`circle`,{cx:`12`,cy:`20`,r:`2`}),(0,K.jsx)(`path`,{d:`M12 8v-0.5M12 8 7.2 12.5M12 8 16.8 12.5M6 16 10.5 18.5M18 16 13.5 18.5`})]}),feed:(0,K.jsx)(`path`,{d:`M4 6h16M4 12h16M4 18h10`})}[e]})}function $ee(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(null),c=qee(n?.version),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(null),[p,m]=(0,v.useState)(!1),[h,g]=(0,v.useState)(null),[_,y]=(0,v.useState)([]),[b,x]=(0,v.useState)(36e5),S=Number(d?.dashboard?.feedLimit)||200,C=(0,v.useCallback)(async e=>{if(!d)return;let t={...d.dashboard,feedLimit:e};await hc(`/api/config`,{config:{...d,dashboard:t},rollbackMs:0}).catch(()=>{}),await mc(`/api/config`).then(f).catch(()=>{})},[d]),[w,T]=(0,v.useState)(!1),[E,D]=(0,v.useState)(`off`),[O,k]=(0,v.useState)(null),[A,j]=(0,v.useState)(()=>new Set),[M,N]=(0,v.useState)({}),[P,F]=(0,v.useState)({tool:``,risk:``,device:``,status:``,q:``}),I=(0,v.useRef)(w);I.current=w;let L=(0,v.useRef)(null);a9(L);let[R,ee]=(0,v.useState)(Yee),te=(0,v.useCallback)(e=>{ee(e);try{Y9()!==e&&(location.hash=e),localStorage.setItem(J9,e)}catch{}},[]);(0,v.useEffect)(()=>{if(Y9()!==R)try{location.hash=R}catch{}let e=()=>{let e=Y9();e&&te(e)};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]);let[z,B]=(0,v.useState)(()=>{try{let e=localStorage.getItem(`mt-help-open`);return new Set(e?JSON.parse(e):[])}catch{return new Set}}),V=e=>B(t=>{let n=new Set(t);n.has(e)?n.delete(e):n.add(e);try{localStorage.setItem(`mt-help-open`,JSON.stringify([...n]))}catch{}return n}),[ne,re]=(0,v.useState)(``),[ie,ae]=(0,v.useState)(`all`),oe=(0,v.useMemo)(()=>{let e=i?.devices??[];return{online:e.filter(e=>e.status.reachable===!0).length,offline:e.filter(e=>e.status.reachable===!1).length,total:e.length}},[i]),se=(0,v.useMemo)(()=>{let e=i?.devices??[],t=ne.trim().toLowerCase();return e.filter(e=>!(ie===`online`&&e.status.reachable!==!0||ie===`offline`&&e.status.reachable!==!1||t&&!e.name.toLowerCase().includes(t)&&!(e.address??e.host??``).toLowerCase().includes(t)))},[i,ne,ie]);i9((0,v.useCallback)(e=>{if(I.current)return;y(t=>[e,...t].slice(0,yb));let t=e.device;t&&N(e=>({...e,[t]:(e[t]??0)+1}))},[]),(0,v.useCallback)(e=>D(e),[])),(0,v.useEffect)(()=>{mc(`/api/events?limit=${yb}`).then(e=>y(e.events)).catch(()=>{})},[]);let H=(0,v.useCallback)(()=>{mc(`/api/stats?window=${b}&buckets=60`).then(t).catch(()=>{})},[b]);(0,v.useEffect)(()=>{H();let e=()=>{H(),mc(`/api/meta`).then(r).catch(()=>{}),mc(`/api/devices`).then(a).catch(()=>{}),mc(`/api/ssh-pool`).then(s).catch(()=>{}),mc(`/api/topology`).then(u).catch(()=>{})};e();let t=setInterval(()=>{I.current||e()},4e3);return()=>clearInterval(t)},[H]),(0,v.useEffect)(()=>{let e=()=>void mc(`/api/config`).then(f).catch(()=>{});e();let t=setInterval(e,3e4);return()=>clearInterval(t)},[]);let ce=(0,v.useCallback)((e,t)=>{hc(`/api/devices/toggle`,{device:e,disabled:t}).then(e=>{a(e)})},[]);(0,v.useEffect)(()=>{let e=e=>{e.key===`Escape`&&k(null)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let le=(0,v.useMemo)(()=>{let e=P.q.trim().toLowerCase();return _.filter(t=>!(P.tool&&t.tool!==P.tool||P.risk&&t.risk!==P.risk||P.device&&t.device!==P.device||P.status===`ok`&&t.isError||P.status===`error`&&!t.isError||e&&!t.tool.toLowerCase().includes(e)&&!t.input.toLowerCase().includes(e)&&!t.output.toLowerCase().includes(e)&&!(t.error??``).toLowerCase().includes(e))).sort((e,t)=>t.ts-e.ts)},[_,P]),ue=!!(P.tool||P.risk||P.device||P.status||P.q),de=(0,v.useMemo)(()=>_.filter(e=>e.isError),[_]),fe=(0,v.useMemo)(()=>({ok:_.length-de.length,error:de.length}),[_,de]),pe=(0,v.useCallback)(async e=>{try{k(await mc(`/api/event/${encodeURIComponent(e.id)}`))}catch{k(e)}},[]),me=(0,v.useMemo)(()=>le.slice(0,S),[le,S]),he=(0,v.useMemo)(()=>me.map(e=>e.id),[me]),ge=he.length>0&&he.every(e=>A.has(e)),_e=!ge&&he.some(e=>A.has(e)),ve=(0,v.useCallback)(e=>{j(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),ye=(0,v.useCallback)(()=>{j(e=>{let t=new Set(e);if(he.length>0&&he.every(e=>t.has(e)))for(let e of he)t.delete(e);else for(let e of he)t.add(e);return t})},[he]),[be,xe]=(0,v.useState)(!1),Se=(0,v.useCallback)(async()=>{let e=[...A];if(e.length!==0)try{await _c({ids:e});let t=new Set(e);y(e=>e.filter(e=>!t.has(e.id))),j(new Set)}catch{}finally{xe(!1)}},[A]),Ce=e=>{if(e===`json`){G9(`mcp-events.json`,JSON.stringify(le,null,2),`application/json`);return}let t=[`ts`,`tool`,`risk`,`device`,`durationMs`,`isError`,`error`,`reason`],n=e=>/[",\n]/.test(e)?`"${e.replace(/"/g,`""`)}"`:e,r=le.map(e=>[new Date(e.ts).toISOString(),e.tool,e.risk,e.device??``,String(e.durationMs),String(e.isError),e.error??``,e.reason??``].map(n).join(`,`)).join(`
154
- `);G9(`mcp-events.csv`,`${t.join(`,`)}\n${r}\n`,`text/csv`)},we=e?e.errorRate>=.2?`text-destructive`:e.errorRate>=.05?`text-warning`:``:``,Te=d?.mcp??{},Ee=d?.dashboard??{},De=d?.ssh??{},Oe=(e,t,n)=>(0,K.jsx)(Gb,{size:`sm`,"aria-label":t,value:P[e],onValueChange:t=>F(n=>({...n,[e]:t})),options:[{value:``,label:t},...n.map(e=>({value:e,label:e}))]}),ke=K9.find(e=>e.id===R)??K9[0];return(0,K.jsxs)(`div`,{className:`bg-background text-foreground grid min-h-screen grid-cols-[240px_1fr]`,ref:L,"data-view":R,style:{"--page-accent":Z9[R][0],"--page-accent-2":Z9[R][1]},children:[(0,K.jsxs)(`aside`,{className:`bg-card sticky top-0 flex h-screen flex-col gap-4 border-r p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,K.jsx)(`div`,{className:`bg-foreground text-background grid size-9 shrink-0 place-items-center rounded-md`,children:(0,K.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,className:`size-5`,children:(0,K.jsxs)(`g`,{stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,K.jsx)(`path`,{d:`M12 12 L4 5 M12 12 L20 5 M12 12 L12 20`}),(0,K.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`,fill:`currentColor`,stroke:`none`}),(0,K.jsx)(`circle`,{cx:`4`,cy:`5`,r:`1.9`,fill:`currentColor`,stroke:`none`}),(0,K.jsx)(`circle`,{cx:`20`,cy:`5`,r:`1.9`,fill:`currentColor`,stroke:`none`}),(0,K.jsx)(`circle`,{cx:`12`,cy:`20`,r:`1.9`,fill:`currentColor`,stroke:`none`})]})})}),(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col leading-tight`,children:[(0,K.jsx)(`b`,{className:`truncate text-sm`,children:`MikroTik MCP`}),(0,K.jsxs)(`small`,{className:Y(`text-muted-foreground inline-flex items-center gap-1 text-[11px]`,c.release&&`hover:text-foreground cursor-pointer`),title:c.release?`View release notes`:void 0,onClick:c.release?()=>c.openModal():void 0,children:[n?.version?`v${n.version}`:`Observability`,c.showIndicator&&(0,K.jsx)(`span`,{className:`bg-brand inline-block size-1.5 rounded-full`,title:`v${c.release?.version} available`})]})]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(lb,{})]}),(0,K.jsx)(`nav`,{className:`flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto`,children:K9.map(e=>(0,K.jsxs)(`button`,{type:`button`,className:Y(`flex items-center gap-2.5 rounded-md px-2.5 py-2 text-left text-[13px] transition-colors`,`[&_svg]:size-4 [&_svg]:shrink-0`,R===e.id?`bg-accent text-accent-foreground font-medium`:`text-muted-foreground hover:bg-accent/50 hover:text-foreground`),onClick:()=>te(e.id),children:[(0,K.jsx)(Qee,{name:e.id}),(0,K.jsx)(`span`,{className:`truncate`,children:e.label}),e.id===`feed`&&_.length>0&&(0,K.jsx)(`span`,{className:`bg-brand text-brand-foreground animate-in zoom-in-50 ml-auto rounded-full px-1.5 py-0.5 text-[10px] tabular-nums`,children:_.length>999?`999+`:_.length},_.length)]},e.id))}),(0,K.jsxs)(`div`,{className:`flex flex-col gap-1.5 border-t pt-3`,children:[(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-2 text-[11px]`,title:`Live transport: WebSocket (preferred) or SSE fallback`,children:[(0,K.jsx)(zb,{type:E===`off`?`secondary`:`success`,pulse:E!==`off`}),E===`off`?`offline`:`live · ${E}`]}),(0,K.jsx)(`small`,{className:`text-muted-foreground text-[11px]`,children:n?`${pb(n.total)} events · ${n.transport}`:`connecting…`})]})]}),(0,K.jsxs)(`main`,{className:`flex min-w-0 flex-col gap-5 p-6`,"data-view":R,children:[(0,K.jsxs)(`header`,{className:`reveal flex flex-wrap items-center gap-3`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,K.jsx)(`h1`,{className:`truncate text-xl font-semibold`,children:ke.label}),(0,K.jsx)(`small`,{className:`text-muted-foreground text-xs`,children:ke.sub})]}),(0,K.jsx)(`span`,{className:`flex-1`}),R===`overview`&&(0,K.jsx)(Gb,{size:`sm`,"aria-label":`Stats time window`,value:String(b),onValueChange:e=>x(Number(e)),options:vb.map(([e,t])=>({value:String(t),label:`window: ${e}`}))}),(0,K.jsx)(X,{size:`sm`,ghost:!0,type:z.has(R)?`accent`:`default`,onClick:()=>V(R),"aria-expanded":z.has(R),title:`About this page`,icon:(0,K.jsx)(Nc,{}),children:`Help`})]}),z.has(R)&&(0,K.jsx)(Zee,{view:R}),R===`overview`&&(0,K.jsxs)(`section`,{className:`grid content-start gap-[18px]`,children:[(0,K.jsx)(`div`,{className:`reveal grid grid-cols-[repeat(auto-fit,minmax(9rem,1fr))] gap-3`,children:e?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(nb,{k:`Calls (window)`,v:pb(e.total)}),(0,K.jsx)(nb,{k:`Calls / min`,v:e.callsPerMin.toFixed(1)}),(0,K.jsx)(nb,{k:`Error rate`,v:`${(e.errorRate*100).toFixed(1)}%`,sub:`${e.errors} err`,cls:we}),(0,K.jsx)(nb,{k:`Avg latency`,v:ub(e.latency.avg)}),(0,K.jsx)(nb,{k:`p95 latency`,v:ub(e.latency.p95)}),(0,K.jsx)(nb,{k:`p99 latency`,v:ub(e.latency.p99)}),(0,K.jsx)(nb,{k:`Distinct tools`,v:pb(e.distinctTools)}),(0,K.jsx)(nb,{k:`Output volume`,v:db(e.outputBytes)})]}):(0,K.jsx)(nb,{k:`Loading…`,v:`—`})}),(0,K.jsxs)(`div`,{className:`reveal grid grid-cols-1 gap-4 xl:grid-cols-3`,children:[(0,K.jsx)(tb,{title:`Calls over time`,className:`xl:col-span-2`,children:e?(0,K.jsx)(b5,{series:e.series}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`no data`})}),e&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(tb,{title:`By risk`,children:(0,K.jsx)(x5,{segments:Object.keys(e.byRisk).map(t=>({label:t,value:e.byRisk[t],color:gb[t]}))})}),(0,K.jsx)(tb,{title:`Top tools`,className:`xl:col-span-2`,children:(0,K.jsx)(rb,{rows:e.byTool.map(e=>({label:e.tool,value:e.count,sub:`${e.count}× · ${ub(e.p95Ms)} p95${e.errors?` · ${e.errors} err`:``}`,color:e.errors?`var(--destructive)`:void 0}))})}),(0,K.jsx)(tb,{title:`Status`,children:(0,K.jsx)(x5,{centerLabel:`calls`,segments:[{label:`ok`,value:fe.ok,color:`var(--muted-foreground)`},{label:`error`,value:fe.error,color:`var(--destructive)`}]})}),(0,K.jsx)(tb,{title:`By device`,children:e.byDevice.length?(0,K.jsx)(rb,{rows:e.byDevice.map(e=>({label:e.device,value:e.count}))}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`single device`})}),(0,K.jsx)(tb,{title:`Recent errors`,children:de.length?(0,K.jsx)(`div`,{className:`flex flex-col gap-2`,children:de.slice(0,8).map(e=>(0,K.jsxs)(`div`,{className:`hover:bg-accent/50 grid cursor-pointer grid-cols-[auto_1fr] items-center gap-3 rounded-md px-1 py-0.5`,onClick:()=>void pe(e),children:[(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:fb(e.ts)}),(0,K.jsxs)(`span`,{className:`text-destructive min-w-0 truncate text-xs`,title:e.error??e.output,children:[e.tool,`: `,e.error??e.output??`error`]})]},e.id))}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`no errors 🎉`})})]})]})]}),R===`devices`&&(i&&i.devices.length>0?(0,K.jsxs)(`section`,{className:`grid content-start gap-[18px]`,children:[(0,K.jsxs)(`div`,{className:`reveal flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(Vb,{className:`min-w-[180px] flex-1`,type:`search`,placeholder:`Search devices by name or address…`,value:ne,onChange:e=>re(e.target.value)}),(0,K.jsx)(`div`,{className:`bg-muted flex gap-0.5 rounded-md p-0.5`,children:[`all`,`online`,`offline`].map(e=>(0,K.jsx)(`button`,{type:`button`,className:Y(`rounded-sm px-2.5 py-1 text-xs transition-colors`,ie===e?`bg-background text-foreground shadow-xs`:`text-muted-foreground hover:text-foreground`),onClick:()=>ae(e),children:e===`all`?`All ${oe.total}`:e===`online`?`Online ${oe.online}`:`Offline ${oe.offline}`},e))}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[se.length,`/`,oe.total,` shown`]})]}),(0,K.jsxs)(`details`,{className:`bg-card reveal rounded-lg border p-4`,open:oe.total<=8,children:[(0,K.jsxs)(`summary`,{className:`cursor-pointer text-sm font-medium`,children:[`Connectivity radar`,(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[` `,`· `,oe.online,` online · `,oe.offline,` offline ·`,` `,oe.total,` total`]})]}),(0,K.jsx)(q7,{payload:i,pulses:M})]}),(0,K.jsx)(Mee,{devices:se,poolPayload:o}),se.length===0?(0,K.jsx)(Q9,{className:`reveal`,icon:(0,K.jsx)(Qc,{className:`size-6`}),title:`No devices match`,sub:`Try a different search or status filter.`}):(0,K.jsx)(`div`,{className:`reveal grid grid-cols-[repeat(auto-fill,minmax(20rem,1fr))] gap-4`,children:se.map(e=>(0,K.jsx)(J7,{d:e,onToggle:ce},e.name))}),se.length>0&&(0,K.jsx)(tb,{title:`Device system health`,className:`reveal`,extra:(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`CPU · memory · disk · latency · live probe`}),children:(0,K.jsx)(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(17rem,1fr))] gap-3`,children:se.map(e=>(0,K.jsx)(r9,{d:e},e.name))})})]}):(0,K.jsx)(Q9,{icon:(0,K.jsx)(Wc,{className:`size-6`}),title:`No devices configured`,body:(0,K.jsx)(Pb,{type:`secondary`,label:`Tip`,children:`Add a device to your config to see connectivity and system health here.`})})),R===`clients`&&(0,K.jsx)(L5,{}),R===`aaa`&&(0,K.jsx)(Px,{}),R===`topology`&&(l&&l.nodes.length>0?(0,K.jsx)(`section`,{className:`reveal grid content-start gap-[18px]`,children:(0,K.jsx)(Dee,{topo:l,onOnboard:(e,t)=>{g({name:e,body:t}),m(!0),te(`config`)}})}):(0,K.jsx)(Q9,{icon:(0,K.jsx)(Yc,{className:`size-6`}),title:`No neighbours discovered yet`,sub:`Layer-2 neighbours (MNDP / CDP / LLDP) appear here as the device reports them.`})),R===`packets`&&(0,K.jsx)(`section`,{className:`grid content-start gap-[18px]`,children:(0,K.jsx)(tb,{title:`Packet capture`,className:`reveal`,extra:(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`live TZSP decode · /tool sniffer streaming`}),children:(0,K.jsx)(j9,{})})}),R===`snapshots`&&(0,K.jsx)(N9,{}),R===`drift`&&(0,K.jsx)(h9,{}),R===`plan`&&(0,K.jsx)(Rx,{}),R===`s3`&&(0,K.jsx)(M9,{}),R===`backups`&&(0,K.jsx)(qb,{}),R===`modules`&&(0,K.jsx)(O9,{}),R===`config`&&(d?(0,K.jsxs)(`section`,{className:`grid content-start gap-[18px]`,children:[(0,K.jsx)(tb,{title:`Configuration`,className:`reveal`,extra:(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>m(e=>!e),title:`Edit the config JSON with autocomplete, validation and safe-apply`,icon:p?void 0:(0,K.jsx)(Kc,{}),children:p?`View`:`Edit config`}),children:p?(0,K.jsx)(P7,{initial:h?{...d,devices:{...d.devices,[h.name]:h.body}}:d,onClose:()=>{m(!1),g(null)},onReload:()=>{g(null),mc(`/api/config`).then(f).catch(()=>{})}},h?`seed-${h.name}`:`config`):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`text-muted-foreground mb-2.5 flex flex-wrap gap-x-4 gap-y-1 text-[11px]`,children:[(0,K.jsxs)(`span`,{children:[`transport: `,mb(Te.transport)]}),(0,K.jsxs)(`span`,{children:[`read-only: `,d.readOnly?`yes`:`no`]}),(0,K.jsxs)(`span`,{children:[`dashboard: `,mb(Ee.host),`:`,mb(Ee.port)]}),(0,K.jsxs)(`span`,{children:[`capture: `,Ee.captureBody?`on`:`off`]}),(0,K.jsxs)(`span`,{children:[`s3: `,d.s3?`configured`:`off`]}),(0,K.jsxs)(`span`,{children:[`ssh pool: `,De.keepAlive===!1?`off`:`on`]})]}),(0,K.jsxs)(`details`,{children:[(0,K.jsx)(`summary`,{className:`cursor-pointer text-sm`,children:`Full effective configuration (secrets redacted)`}),(0,K.jsx)(O7,{value:d,maxHeight:340})]})]})}),(0,K.jsx)(tb,{title:`Dashboard preferences`,className:`reveal`,extra:(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[`saved to `,(0,K.jsx)(`code`,{children:`dashboard.feedLimit`}),` in the config`]}),children:(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,K.jsx)(zy,{className:`text-[12.5px]`,children:`Live Feed rows`}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[`How many matching calls the feed table renders. Up to `,pb(1e4),` are kept in memory regardless; this only bounds what is drawn.`]})]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(Gb,{size:`sm`,"aria-label":`Live Feed rows`,value:String(S),onValueChange:e=>void C(Number(e)),options:ab.map(e=>({value:String(e),label:`${pb(e)} rows${e===200?` (default)`:``}`}))})]})}),(0,K.jsx)(tb,{title:`Version history`,className:`reveal`,extra:(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`point-in-time snapshots · diff & restore`}),children:(0,K.jsx)(B5,{onRestored:()=>void mc(`/api/config`).then(f).catch(()=>{})})}),(0,K.jsx)(tb,{title:`Field guide`,className:`reveal`,extra:(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`every config option, documented from the schema`}),children:(0,K.jsx)(H5,{})})]}):(0,K.jsx)(Q9,{icon:(0,K.jsx)(Bb,{}),title:`Loading configuration…`})),R===`memory`&&(0,K.jsx)(T9,{}),R===`feed`&&(0,K.jsxs)(tb,{className:`reveal`,title:`Live tool calls`,extra:(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[pb(me.length),` shown`,le.length>me.length&&` of ${pb(le.length)} matching`,` ·`,` `,pb(_.length),` buffered`]}),children:[(0,K.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(Vb,{className:`min-w-[180px] flex-1`,type:`search`,placeholder:`Search tool / input / output / error…`,value:P.q,onChange:e=>F(t=>({...t,q:e.target.value}))}),Oe(`tool`,`all tools`,n?.tools??[]),Oe(`risk`,`all risk`,[`READ`,`WRITE`,`WRITE_IDEMPOTENT`,`DESTRUCTIVE`,`DANGEROUS`]),Oe(`device`,`all devices`,n?.devices??[]),Oe(`status`,`all status`,[`ok`,`error`]),(0,K.jsx)(X,{size:`sm`,ghost:!0,type:w?`accent`:`default`,onClick:()=>T(e=>!e),icon:w?(0,K.jsx)(qc,{}):(0,K.jsx)(Gc,{}),children:w?`Resume`:`Pause`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>Ce(`csv`),children:`CSV`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>Ce(`json`),children:`JSON`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>F({tool:``,risk:``,device:``,status:``,q:``}),children:`Clear`}),be&&A.size>0?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(X,{size:`sm`,type:`error`,onClick:()=>void Se(),icon:(0,K.jsx)(kc,{}),children:[`Confirm delete (`,A.size,`)`]}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>xe(!1),children:`Cancel`})]}):(0,K.jsxs)(X,{size:`sm`,ghost:!0,disabled:A.size===0,onClick:()=>xe(!0),title:`Delete the selected rows`,icon:(0,K.jsx)(il,{}),children:[`Delete`,A.size>0?` (${A.size})`:``]})]}),le.length===0?ue?(0,K.jsx)(Q9,{icon:(0,K.jsx)(Qc,{className:`size-6`}),title:`No calls match your filters`,sub:`${_.length} call${_.length===1?``:`s`} buffered — try widening the search or the risk / device / status filters.`,body:(0,K.jsx)(X,{size:`sm`,ghost:!0,className:`mt-2`,onClick:()=>F({tool:``,risk:``,device:``,status:``,q:``}),children:`Clear filters`})}):(0,K.jsx)(Q9,{icon:(0,K.jsx)(zb,{type:E===`off`?`secondary`:`success`,pulse:E!==`off`,className:`size-3`}),title:E===`off`?`Not connected`:`Listening for tool calls…`,sub:E===`off`?`The live stream is offline — it will reconnect automatically.`:`Tool calls the LLM makes against this server stream in here in real time.`}):(0,K.jsx)(`div`,{className:`max-h-[60vh] overflow-auto`,children:(0,K.jsxs)(By,{children:[(0,K.jsx)(Vy,{children:(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Wy,{className:`w-7`,children:(0,K.jsx)(Ry,{"aria-label":`Select all shown rows`,checked:ge?!0:_e?`indeterminate`:!1,onCheckedChange:ye})}),(0,K.jsx)(Wy,{children:`time`}),(0,K.jsx)(Wy,{children:`tool`}),(0,K.jsx)(Wy,{children:`risk`}),(0,K.jsx)(Wy,{children:`device`}),(0,K.jsx)(Wy,{className:`text-right`,children:`dur`}),(0,K.jsx)(Wy,{children:`status`}),(0,K.jsx)(Wy,{children:`output`})]})}),(0,K.jsx)(Hy,{children:me.map(e=>(0,K.jsxs)(Uy,{"data-state":A.has(e.id)?`selected`:void 0,className:Y(`cursor-pointer`,e.isError&&`bg-destructive/8`),onClick:()=>void pe(e),children:[(0,K.jsx)(Gy,{onClick:e=>e.stopPropagation(),children:(0,K.jsx)(Ry,{"aria-label":`Select row`,checked:A.has(e.id),onCheckedChange:()=>ve(e.id)})}),(0,K.jsx)(Gy,{className:`tabular-nums`,children:fb(e.ts)}),(0,K.jsx)(Gy,{children:e.tool}),(0,K.jsx)(Gy,{children:(0,K.jsx)(`span`,{className:Y(`rounded-full border px-1.5 py-0.5 text-[10px]`,_b[e.risk]),children:e.risk.replace(`WRITE_IDEMPOTENT`,`WRITE·I`)})}),(0,K.jsx)(Gy,{children:e.device??`—`}),(0,K.jsx)(Gy,{className:`text-right tabular-nums`,children:ub(e.durationMs)}),(0,K.jsx)(Gy,{children:(0,K.jsx)(`span`,{className:e.isError?`text-destructive`:`text-muted-foreground`,children:e.isError?`error`:`ok`})}),(0,K.jsx)(Gy,{className:`text-muted-foreground max-w-[24rem] truncate`,children:e.isError?e.error??`error`:e.reason?(0,K.jsx)(`span`,{className:`italic`,children:e.reason}):e.output||`—`})]},e.id))})]})})]})]}),c.showModal&&c.release&&(0,K.jsx)(Jee,{release:c.release,onDismiss:c.dismissRelease}),O&&(0,K.jsx)(t9,{event:O,onClose:()=>k(null)})]})}var $9=document.getElementById(`root`);$9&&(0,y.createRoot)($9).render((0,K.jsx)($ee,{}));
154
+ `),t=t.replace(/%%CB(\d+)%%/g,(e,t)=>n[Number(t)]),t=t.replace(/%%IC(\d+)%%/g,(e,t)=>r[Number(t)]),t}var U9=`mt-whats-new-dismissed`,W9=`mt-whats-new-seen-version`;function qee(e){try{return localStorage.getItem(U9)===e}catch{return!1}}function Jee(e){try{localStorage.setItem(U9,e)}catch{}}function Yee(e){try{let t=localStorage.getItem(W9);return localStorage.setItem(W9,e),t!==null&&t!==e}catch{return!1}}var Xee=`text-[13px] leading-[1.7] text-muted-foreground [&_h2]:mt-[18px] [&_h2]:mb-1.5 [&_h2]:text-[17px] [&_h2]:font-bold [&_h2]:text-foreground [&_h3]:mt-[18px] [&_h3]:mb-1.5 [&_h3]:text-[15px] [&_h3]:font-bold [&_h3]:text-foreground [&_h4]:mt-[18px] [&_h4]:mb-1.5 [&_h4]:text-[14px] [&_h4]:font-bold [&_h4]:text-foreground [&_h5]:mt-[18px] [&_h5]:mb-1.5 [&_h5]:text-[14px] [&_h5]:font-bold [&_h5]:text-foreground [&_p]:my-[5px] [&_ul]:my-[5px] [&_ul]:list-disc [&_ul]:pl-[18px] [&_ol]:my-[5px] [&_ol]:list-decimal [&_ol]:pl-[22px] [&_li]:my-[3px] [&_li]:marker:text-brand [&_img]:my-1.5 [&_img]:max-w-full [&_img]:rounded-md [&_img]:border [&_img]:border-border [&_code]:rounded [&_code]:border [&_code]:border-border [&_code]:bg-muted [&_code]:px-1.5 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-xs [&_code]:text-brand [&_pre]:my-2 [&_pre]:overflow-x-auto [&_pre]:rounded-md [&_pre]:border [&_pre]:border-border [&_pre]:bg-background [&_pre]:p-3 [&_pre_code]:border-0 [&_pre_code]:bg-transparent [&_pre_code]:p-0 [&_pre_code]:text-muted-foreground [&_a]:text-brand [&_a]:underline [&_a]:underline-offset-2 [&_strong]:font-semibold [&_strong]:text-foreground [&_blockquote]:my-2 [&_blockquote]:border-l-[3px] [&_blockquote]:border-brand/40 [&_blockquote]:px-3.5 [&_blockquote]:py-1.5 [&_blockquote]:italic [&_hr]:my-3.5 [&_hr]:border-0 [&_hr]:border-t [&_hr]:border-border [&_del]:text-muted-foreground [&_del]:opacity-60 [&_table]:w-full [&_table]:border-collapse [&_table]:font-mono [&_table]:text-xs [&_th]:border-b [&_th]:border-border [&_th]:bg-muted [&_th]:px-3 [&_th]:py-[7px] [&_th]:text-left [&_th]:text-[11px] [&_th]:font-semibold [&_th]:tracking-wide [&_th]:text-foreground [&_th]:uppercase [&_td]:border-b [&_td]:border-border [&_td]:px-3 [&_td]:py-[7px] [&_td]:text-muted-foreground [&_.wn-table-wrap]:my-2.5 [&_.wn-table-wrap]:overflow-x-auto [&_.wn-table-wrap]:rounded-md [&_.wn-table-wrap]:border [&_.wn-table-wrap]:border-border [&_.wn-task]:-ml-[18px] [&_.wn-task]:list-none [&_.wn-check]:inline-block [&_.wn-check]:w-4 [&_.wn-task.done_.wn-check]:text-success`,Zee=600*1e3;function Qee(e){let[t,n]=(0,v.useState)(null),[r,i]=(0,v.useState)(!1);(0,v.useEffect)(()=>{if(!e)return;let t=Yee(e),r=null,a=()=>{mc(`/api/releases/latest`).then(e=>{n(e);let a=r===null,o=r!==null&&e.version!==r;if(r=e.version,a&&t){setTimeout(()=>i(!0),1200);return}e.isNewer&&!qee(e.version)&&(a||o)&&setTimeout(()=>i(!0),a?1200:0)}).catch(()=>{})};a();let o=setInterval(a,Zee);return()=>clearInterval(o)},[e]);let a=(0,v.useCallback)(()=>{t?.isNewer&&Jee(t.version),i(!1)},[t]),o=(0,v.useCallback)(()=>i(!0),[]);return{release:t,showModal:r,showIndicator:t!==null&&t.isNewer,openModal:o,dismissRelease:a}}function $ee({release:e,onDismiss:t}){let n=new Date(e.publishedAt).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`}),r={__html:Kee(e.body)};return(0,K.jsx)(Ree,{open:!0,onOpenChange:e=>{e||t()},children:(0,K.jsxs)(Vee,{className:`max-h-[calc(100vh-80px)] gap-0 overflow-y-auto p-0 sm:max-w-[520px]`,children:[(0,K.jsxs)(Hee,{className:`items-center gap-4 px-8 pt-10 pb-6 text-center`,children:[(0,K.jsx)(`span`,{className:`inline-block rounded-full border border-brand/30 bg-brand/10 px-3.5 py-1 font-mono text-[10px] font-bold tracking-[0.2em] text-brand uppercase`,children:e.isNewer?`NEW RELEASE`:`RELEASE NOTES`}),(0,K.jsxs)(Wee,{className:`text-[44px] leading-none font-extrabold tracking-tight text-brand`,children:[`v`,e.version]}),(0,K.jsxs)(Gee,{className:`font-mono text-xs text-muted-foreground`,children:[`Released `,n,e.isNewer&&(0,K.jsxs)(K.Fragment,{children:[` · you’re on v`,e.currentVersion]})]})]}),(0,K.jsx)(`div`,{className:Y(`px-8 py-5`,Xee),dangerouslySetInnerHTML:r}),(0,K.jsxs)(Uee,{className:`flex-row items-center justify-between border-t border-border px-8 pt-3.5 pb-6`,children:[(0,K.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 font-mono text-xs text-muted-foreground hover:text-foreground`,children:[`View on GitHub`,(0,K.jsx)(Rc,{className:`size-3.5`})]}),(0,K.jsx)(X,{type:`default`,size:`sm`,onClick:t,children:`Got it`})]})]})})}zi.registerPlugin(G);function G9(e,t,n){let r=URL.createObjectURL(new Blob([t],{type:`${n};charset=utf-8`})),i=document.createElement(`a`);i.href=r,i.download=e,document.body.append(i),i.click(),i.remove(),URL.revokeObjectURL(r)}var K9=[{id:`overview`,label:`Overview`,sub:`Calls, latency & risk at a glance`},{id:`devices`,label:`Devices`,sub:`Connectivity radar & system health`},{id:`clients`,label:`Clients`,sub:`Connected LAN devices — usage, block/allow, pin IP`},{id:`aaa`,label:`RADIUS & UM`,sub:`RADIUS client & User Manager RADIUS server`},{id:`topology`,label:`Topology`,sub:`Layer-2 neighbours via MNDP / CDP / LLDP`},{id:`packets`,label:`Packets`,sub:`Live TZSP capture & decode`},{id:`snapshots`,label:`Snapshots`,sub:`Config history & time-travel diff`},{id:`drift`,label:`Drift Guard`,sub:`Golden config baselines & live drift detection`},{id:`plan`,label:`Change Plan`,sub:`Dry-run intended RouterOS commands`},{id:`s3`,label:`S3 Backups`,sub:`List, download & delete S3 backup objects`},{id:`backups`,label:`Backups`,sub:`Local config vault — create, restore, manage`},{id:`modules`,label:`Modules`,sub:`Enable/disable tool modules — curate the surface`},{id:`config`,label:`Config`,sub:`Effective configuration & safe editor`},{id:`memory`,label:`Memory`,sub:`Knowledge graph — entities, relations & observations`},{id:`feed`,label:`Live Feed`,sub:`Every tool call, in real time`}],q9=new Set(K9.map(e=>e.id)),J9=`mt-view`;function Y9(){try{let e=location.hash.replace(/^#\/?/,``);return q9.has(e)?e:null}catch{return null}}function ete(){let e=Y9();if(e)return e;try{let e=localStorage.getItem(J9);if(e&&q9.has(e))return e}catch{}return`overview`}var X9=[`var(--foreground)`,`var(--muted-foreground)`],Z9={overview:X9,devices:X9,clients:X9,aaa:X9,topology:X9,packets:X9,snapshots:X9,drift:X9,plan:X9,s3:X9,backups:X9,modules:X9,config:X9,memory:X9,feed:X9},tte={overview:{what:`A live pulse of all MCP tool activity: total calls, error rate, p50/p95 latency, the busiest tools, and a risk breakdown — over a time window you choose.`,tips:[`Change the time window (top-right) to zoom from the last 5 minutes out to 24 hours.`,`The risk donut splits calls by annotation: read · write · destructive · dangerous.`,`A rising error line usually points at one device or one tool — jump to Live Feed to see which.`]},devices:{what:`Every configured router with its live reachability (SSH or MAC-Telnet), latency, identity, and system health — CPU, memory and disk — refreshed continuously.`,tips:[`Each device gets a stable colour so you can track it across the connectivity radar.`,`Health (CPU/Mem/Disk) is probed periodically; MAC-Telnet devices are probed on a slower cadence.`,`Latency tiers are colour-coded green → amber → red; a grey node is currently unreachable.`,`The SSH Connection Pool panel shows persistent connections: green = idle/ready, blue = busy with inflight channels, red = reconnecting.`]},clients:{what:`The LAN devices connected to a router — merged from its DHCP leases and ARP table — with live Download/Upload charts, and one-click controls to block/allow a device, pin (reserve) its IP, change that IP, or relabel it.`,tips:[`Pick the router (top-right) to inspect its connected devices; filter by IP, MAC or name.`,`Click a device to open its live ↓/↑ traffic chart — needs a simple queue targeting its IP.`,`Block/allow is enforced by MAC, so it survives the device changing IP; “Pin IP” makes its lease static.`]},aaa:{what:"Full management of the router's RADIUS client (`/radius`) and the built-in User Manager RADIUS server (`/user-manager`): RADIUS servers + incoming CoA, and User Manager users, service profiles, rate/quota limitations, NAS clients, profile assignments, accounting sessions, and global settings.",tips:[`Pick the router (top-right), then switch tabs across RADIUS, Users, Profiles, Limitations, NAS, Assignments, Sessions and Settings.`,`Every tab is full CRUD: add, edit, enable/disable and remove — secrets are write-only and shown redacted.`,`The Usage & Heatmap tab shows each user's 3-month download/upload and a GitHub-style connection heatmap, persisted locally.`,`If a device lacks the user-manager package, the User Manager tabs explain how to install it; RADIUS-client tabs still work.`]},topology:{what:`A Layer-2 map of neighbours each router discovers via MNDP / CDP / LLDP — the physical adjacency of your network, drawn live.`,tips:[`Solid nodes are configured devices; faint nodes are discovered-but-unmanaged neighbours.`,`Use “Add to config →” on an unmanaged neighbour to pre-fill it in the Config editor.`,`Drag to pan; the layout settles automatically as new neighbours arrive.`]},packets:{what:`Live packet capture streamed from a router over TZSP — decode headers in real time without leaving the dashboard.`,tips:[`Pick a device and start the capture; packets decode as they arrive.`,`Stop the capture when done — it frees the router-side sniffer.`,`Great for debugging a protocol issue alongside the Live Feed of tool calls.`]},snapshots:{what:`Point-in-time captures of a device’s full configuration (/export), stored locally so you can diff any two and see exactly what changed.`,tips:[`Capture a snapshot before a risky change, then diff after to audit the delta.`,`The diff is line-level: green added, red removed.`,`Snapshots are device config exports — for the dashboard’s OWN config history see the Config page.`]},drift:{what:`Detect when router configs drift from their golden baseline — with change attribution and one-click reconciliation.`,tips:[`Set a baseline via MCP tools (config_set_baseline) or the Baseline Manager below.`,`Click a device card to run a live drift check against its golden config.`,`Promote accepted changes as the new baseline, or reconcile to roll back.`]},plan:{what:`Dry-run the exact RouterOS commands a change would run before it touches a device — a change plan you can review and trust.`,tips:[`Paste or build intended commands to see them validated and ordered.`,`Nothing is sent to the device from here — it’s a preview.`,`Pair with Safe Mode (auto-revert) when you do apply for real.`]},s3:{what:`Browse, download, and delete backup objects in your configured S3-compatible bucket — your off-box archive of device backups and exports.`,tips:[`Filter by key prefix to find a device’s backups quickly.`,`Download fetches the object through a presigned URL; delete is permanent.`,`For host-side .rsc backups instead, use the Backups page.`]},backups:{what:`A local config vault on the MCP server: capture a device’s /export as a timestamped .rsc file, then download, upload, rename, restore (via Safe Mode), or delete it.`,tips:[`Restore offers a dry-run (applies then rolls back) before you commit for real.`,`Edit the vault path inline in the header — it’s saved to your config.`,`Filenames are stamped in the device’s local 24-hour clock.`]},modules:{what:"Every tool module in the catalog with a live on/off switch. Toggling one writes your config file's `tools` block (disabledModules / enabledModules) and applies it immediately, so you can curate exactly which scopes the MCP server exposes.",tips:[`MCP clients search-rank tools and degrade past ~100; trim the surface below ~150–200 tools so every remaining tool is reliably findable.`,`Disable adds the module to tools.disabledModules; enable removes it (or adds it to an active allow-list) — your config file is updated live on each toggle.`,`Changes need an MCP client reconnect (or a server restart) to actually shrink/grow the visible tool list.`]},config:{what:`View the effective configuration, edit it safely with schema-aware validation and auto-rollback, browse a full field guide, and travel through config version history.`,tips:[`Every successful apply is auto-saved to the version timeline — restore any point in time.`,`Save a named checkpoint before a big change for an easy, labelled rollback.`,`The Field Guide documents every config option, its type, and default — straight from the schema.`]},memory:{what:`A persistent knowledge graph the AI builds across sessions — entities (routers, subnets, users), relations between them, and free-text observations.`,tips:[`Entities are created by the AI via MCP tools — you can browse and delete them here.`,`The graph visualization shows entities as circles and relations as directed edges; click a node to inspect it.`,`Change the database path to switch between different knowledge bases.`]},feed:{what:`Every tool call as it happens — tool, device, risk, duration, and success/error — with full request/response detail on click.`,tips:[`Filter by status to isolate failures, or by tool/device to follow one thread.`,`Click any row to open the full (secret-redacted) request and response.`,`Pause the stream when you want to inspect without rows shifting under you.`]}};function Q9({icon:e,title:t,sub:n,body:r,className:i}){return(0,K.jsxs)(`div`,{className:Y(`text-muted-foreground flex flex-col items-center gap-2 rounded-lg border border-dashed px-6 py-14 text-center`,i),children:[e,(0,K.jsx)(`p`,{className:`text-foreground text-sm font-medium`,children:t}),n!=null&&(0,K.jsx)(`p`,{className:`max-w-md text-xs`,children:n}),r]})}function nte({view:e}){let t=tte[e];return(0,K.jsxs)(`div`,{className:`bg-card reveal flex gap-3 rounded-lg border p-4`,role:`region`,"aria-label":`Page help`,children:[(0,K.jsx)(Nc,{className:`text-brand mt-0.5 size-4 shrink-0`,"aria-hidden":`true`}),(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:[(0,K.jsx)(`p`,{className:`text-sm`,children:t.what}),(0,K.jsx)(`ul`,{className:`text-muted-foreground list-disc space-y-1 pl-4 text-xs`,children:t.tips.map((e,t)=>(0,K.jsx)(`li`,{children:e},t))})]})]})}function rte({name:e}){return(0,K.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.7`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:{overview:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`rect`,{x:`3`,y:`3`,width:`8`,height:`8`,rx:`1.6`}),(0,K.jsx)(`rect`,{x:`13`,y:`3`,width:`8`,height:`5`,rx:`1.6`}),(0,K.jsx)(`rect`,{x:`13`,y:`10`,width:`8`,height:`11`,rx:`1.6`}),(0,K.jsx)(`rect`,{x:`3`,y:`13`,width:`8`,height:`8`,rx:`1.6`})]}),devices:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`7`,rx:`2`}),(0,K.jsx)(`rect`,{x:`3`,y:`13`,width:`18`,height:`7`,rx:`2`}),(0,K.jsx)(`path`,{d:`M7 7.5h.01M7 16.5h.01`})]}),clients:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`circle`,{cx:`9`,cy:`8`,r:`3`}),(0,K.jsx)(`path`,{d:`M3.5 19a5.5 5.5 0 0 1 11 0`}),(0,K.jsx)(`path`,{d:`M16 7.5a2.5 2.5 0 0 1 0 5M17.5 19a4.5 4.5 0 0 0-2-3.6`})]}),aaa:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`path`,{d:`M12 3 4 6v5c0 4.4 3.2 7.6 8 9 4.8-1.4 8-4.6 8-9V6l-8-3Z`}),(0,K.jsx)(`path`,{d:`M9.5 11.5 11 13l3.5-3.5`})]}),topology:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`circle`,{cx:`12`,cy:`5`,r:`2.4`}),(0,K.jsx)(`circle`,{cx:`5`,cy:`19`,r:`2.4`}),(0,K.jsx)(`circle`,{cx:`19`,cy:`19`,r:`2.4`}),(0,K.jsx)(`path`,{d:`M12 7.4 6.4 16.6M12 7.4 17.6 16.6`})]}),packets:(0,K.jsx)(`path`,{d:`M3 12h4l2-7 4 14 2-7h6`}),snapshots:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`path`,{d:`M12 3 3 7.5 12 12 21 7.5 12 3Z`}),(0,K.jsx)(`path`,{d:`M3 12 12 16.5 21 12`}),(0,K.jsx)(`path`,{d:`M3 16.5 12 21 21 16.5`})]}),drift:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`path`,{d:`M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10Z`}),(0,K.jsx)(`path`,{d:`M9 12l2 2 4-4`}),(0,K.jsx)(`path`,{d:`M12 6v2M12 16v2M6 12h2M16 12h2`})]}),plan:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`circle`,{cx:`6`,cy:`6`,r:`2.3`}),(0,K.jsx)(`circle`,{cx:`6`,cy:`18`,r:`2.3`}),(0,K.jsx)(`circle`,{cx:`18`,cy:`8`,r:`2.3`}),(0,K.jsx)(`path`,{d:`M6 8.3v7.4M8.3 6H13a3 3 0 0 1 3 3v0`})]}),s3:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`ellipse`,{cx:`12`,cy:`6`,rx:`7`,ry:`2.6`}),(0,K.jsx)(`path`,{d:`M5 6v12c0 1.5 3.1 2.6 7 2.6s7-1.1 7-2.6V6`}),(0,K.jsx)(`path`,{d:`M5 12c0 1.5 3.1 2.6 7 2.6s7-1.1 7-2.6`})]}),backups:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`path`,{d:`M3 6.5 5 3.5h14l2 3`}),(0,K.jsx)(`rect`,{x:`3`,y:`6.5`,width:`18`,height:`14`,rx:`2`}),(0,K.jsx)(`path`,{d:`M9.5 12h5`})]}),modules:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`rect`,{x:`3`,y:`5`,width:`18`,height:`6`,rx:`3`}),(0,K.jsx)(`circle`,{cx:`8`,cy:`8`,r:`1.5`}),(0,K.jsx)(`rect`,{x:`3`,y:`13`,width:`18`,height:`6`,rx:`3`}),(0,K.jsx)(`circle`,{cx:`16`,cy:`16`,r:`1.5`})]}),config:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`path`,{d:`M4 7h8M16 7h4M4 17h4M12 17h8`}),(0,K.jsx)(`circle`,{cx:`14`,cy:`7`,r:`2.2`}),(0,K.jsx)(`circle`,{cx:`10`,cy:`17`,r:`2.2`})]}),memory:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`circle`,{cx:`12`,cy:`6`,r:`2`}),(0,K.jsx)(`circle`,{cx:`6`,cy:`14`,r:`2`}),(0,K.jsx)(`circle`,{cx:`18`,cy:`14`,r:`2`}),(0,K.jsx)(`circle`,{cx:`12`,cy:`20`,r:`2`}),(0,K.jsx)(`path`,{d:`M12 8v-0.5M12 8 7.2 12.5M12 8 16.8 12.5M6 16 10.5 18.5M18 16 13.5 18.5`})]}),feed:(0,K.jsx)(`path`,{d:`M4 6h16M4 12h16M4 18h10`})}[e]})}function ite(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(null),[o,s]=(0,v.useState)(null),c=Qee(n?.version),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(null),[p,m]=(0,v.useState)(!1),[h,g]=(0,v.useState)(null),[_,y]=(0,v.useState)([]),[b,x]=(0,v.useState)(36e5),S=Number(d?.dashboard?.feedLimit)||200,C=(0,v.useCallback)(async e=>{if(!d)return;let t={...d.dashboard,feedLimit:e};await hc(`/api/config`,{config:{...d,dashboard:t},rollbackMs:0}).catch(()=>{}),await mc(`/api/config`).then(f).catch(()=>{})},[d]),[w,T]=(0,v.useState)(!1),[E,D]=(0,v.useState)(`off`),[O,k]=(0,v.useState)(null),[A,j]=(0,v.useState)(()=>new Set),[M,N]=(0,v.useState)({}),[P,F]=(0,v.useState)({tool:``,risk:``,device:``,status:``,q:``}),I=(0,v.useRef)(w);I.current=w;let L=(0,v.useRef)(null);l9(L);let[R,ee]=(0,v.useState)(ete),te=(0,v.useCallback)(e=>{ee(e);try{Y9()!==e&&(location.hash=e),localStorage.setItem(J9,e)}catch{}},[]);(0,v.useEffect)(()=>{if(Y9()!==R)try{location.hash=R}catch{}let e=()=>{let e=Y9();e&&te(e)};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)},[]);let[z,B]=(0,v.useState)(()=>{try{let e=localStorage.getItem(`mt-help-open`);return new Set(e?JSON.parse(e):[])}catch{return new Set}}),V=e=>B(t=>{let n=new Set(t);n.has(e)?n.delete(e):n.add(e);try{localStorage.setItem(`mt-help-open`,JSON.stringify([...n]))}catch{}return n}),[ne,re]=(0,v.useState)(``),[ie,ae]=(0,v.useState)(`all`),oe=(0,v.useMemo)(()=>{let e=i?.devices??[];return{online:e.filter(e=>e.status.reachable===!0).length,offline:e.filter(e=>e.status.reachable===!1).length,total:e.length}},[i]),se=(0,v.useMemo)(()=>{let e=i?.devices??[],t=ne.trim().toLowerCase();return e.filter(e=>!(ie===`online`&&e.status.reachable!==!0||ie===`offline`&&e.status.reachable!==!1||t&&!e.name.toLowerCase().includes(t)&&!(e.address??e.host??``).toLowerCase().includes(t)))},[i,ne,ie]);c9((0,v.useCallback)(e=>{if(I.current)return;y(t=>[e,...t].slice(0,yb));let t=e.device;t&&N(e=>({...e,[t]:(e[t]??0)+1}))},[]),(0,v.useCallback)(e=>D(e),[])),(0,v.useEffect)(()=>{mc(`/api/events?limit=${yb}`).then(e=>y(e.events)).catch(()=>{})},[]);let H=(0,v.useCallback)(()=>{mc(`/api/stats?window=${b}&buckets=60`).then(t).catch(()=>{})},[b]);(0,v.useEffect)(()=>{H();let e=()=>{H(),mc(`/api/meta`).then(r).catch(()=>{}),mc(`/api/devices`).then(a).catch(()=>{}),mc(`/api/ssh-pool`).then(s).catch(()=>{}),mc(`/api/topology`).then(u).catch(()=>{})};e();let t=setInterval(()=>{I.current||e()},4e3);return()=>clearInterval(t)},[H]),(0,v.useEffect)(()=>{let e=()=>void mc(`/api/config`).then(f).catch(()=>{});e();let t=setInterval(e,3e4);return()=>clearInterval(t)},[]);let ce=(0,v.useCallback)((e,t)=>{hc(`/api/devices/toggle`,{device:e,disabled:t}).then(e=>{a(e)})},[]);(0,v.useEffect)(()=>{let e=e=>{e.key===`Escape`&&k(null)};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let le=(0,v.useMemo)(()=>{let e=P.q.trim().toLowerCase();return _.filter(t=>!(P.tool&&t.tool!==P.tool||P.risk&&t.risk!==P.risk||P.device&&t.device!==P.device||P.status===`ok`&&t.isError||P.status===`error`&&!t.isError||e&&!t.tool.toLowerCase().includes(e)&&!t.input.toLowerCase().includes(e)&&!t.output.toLowerCase().includes(e)&&!(t.error??``).toLowerCase().includes(e))).sort((e,t)=>t.ts-e.ts)},[_,P]),ue=!!(P.tool||P.risk||P.device||P.status||P.q),de=(0,v.useMemo)(()=>_.filter(e=>e.isError),[_]),fe=(0,v.useMemo)(()=>({ok:_.length-de.length,error:de.length}),[_,de]),pe=(0,v.useCallback)(async e=>{try{k(await mc(`/api/event/${encodeURIComponent(e.id)}`))}catch{k(e)}},[]),me=(0,v.useMemo)(()=>le.slice(0,S),[le,S]),he=(0,v.useMemo)(()=>me.map(e=>e.id),[me]),ge=he.length>0&&he.every(e=>A.has(e)),_e=!ge&&he.some(e=>A.has(e)),ve=(0,v.useCallback)(e=>{j(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),ye=(0,v.useCallback)(()=>{j(e=>{let t=new Set(e);if(he.length>0&&he.every(e=>t.has(e)))for(let e of he)t.delete(e);else for(let e of he)t.add(e);return t})},[he]),[be,xe]=(0,v.useState)(!1),Se=(0,v.useCallback)(async()=>{let e=[...A];if(e.length!==0)try{await _c({ids:e});let t=new Set(e);y(e=>e.filter(e=>!t.has(e.id))),j(new Set)}catch{}finally{xe(!1)}},[A]),Ce=e=>{if(e===`json`){G9(`mcp-events.json`,JSON.stringify(le,null,2),`application/json`);return}let t=[`ts`,`tool`,`risk`,`device`,`durationMs`,`isError`,`error`,`reason`],n=e=>/[",\n]/.test(e)?`"${e.replace(/"/g,`""`)}"`:e,r=le.map(e=>[new Date(e.ts).toISOString(),e.tool,e.risk,e.device??``,String(e.durationMs),String(e.isError),e.error??``,e.reason??``].map(n).join(`,`)).join(`
155
+ `);G9(`mcp-events.csv`,`${t.join(`,`)}\n${r}\n`,`text/csv`)},we=e?e.errorRate>=.2?`text-destructive`:e.errorRate>=.05?`text-warning`:``:``,Te=d?.mcp??{},Ee=d?.dashboard??{},De=d?.ssh??{},Oe=(e,t,n)=>(0,K.jsx)(Gb,{size:`sm`,"aria-label":t,value:P[e],onValueChange:t=>F(n=>({...n,[e]:t})),options:[{value:``,label:t},...n.map(e=>({value:e,label:e}))]}),ke=K9.find(e=>e.id===R)??K9[0];return(0,K.jsxs)(`div`,{className:`bg-background text-foreground grid min-h-screen grid-cols-[240px_1fr]`,ref:L,"data-view":R,style:{"--page-accent":Z9[R][0],"--page-accent-2":Z9[R][1]},children:[(0,K.jsxs)(`aside`,{className:`bg-card sticky top-0 flex h-screen flex-col gap-4 border-r p-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,K.jsx)(`div`,{className:`bg-foreground text-background grid size-9 shrink-0 place-items-center rounded-md`,children:(0,K.jsx)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":`true`,className:`size-5`,children:(0,K.jsxs)(`g`,{stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,K.jsx)(`path`,{d:`M12 12 L4 5 M12 12 L20 5 M12 12 L12 20`}),(0,K.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`,fill:`currentColor`,stroke:`none`}),(0,K.jsx)(`circle`,{cx:`4`,cy:`5`,r:`1.9`,fill:`currentColor`,stroke:`none`}),(0,K.jsx)(`circle`,{cx:`20`,cy:`5`,r:`1.9`,fill:`currentColor`,stroke:`none`}),(0,K.jsx)(`circle`,{cx:`12`,cy:`20`,r:`1.9`,fill:`currentColor`,stroke:`none`})]})})}),(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col leading-tight`,children:[(0,K.jsx)(`b`,{className:`truncate text-sm`,children:`MikroTik MCP`}),(0,K.jsxs)(`small`,{className:Y(`text-muted-foreground inline-flex items-center gap-1 text-[11px]`,c.release&&`hover:text-foreground cursor-pointer`),title:c.release?`View release notes`:void 0,onClick:c.release?()=>c.openModal():void 0,children:[n?.version?`v${n.version}`:`Observability`,c.showIndicator&&(0,K.jsx)(`span`,{className:`bg-brand inline-block size-1.5 rounded-full`,title:`v${c.release?.version} available`})]})]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(lb,{})]}),(0,K.jsx)(`nav`,{className:`flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto`,children:K9.map(e=>(0,K.jsxs)(`button`,{type:`button`,className:Y(`flex items-center gap-2.5 rounded-md px-2.5 py-2 text-left text-[13px] transition-colors`,`[&_svg]:size-4 [&_svg]:shrink-0`,R===e.id?`bg-accent text-accent-foreground font-medium`:`text-muted-foreground hover:bg-accent/50 hover:text-foreground`),onClick:()=>te(e.id),children:[(0,K.jsx)(rte,{name:e.id}),(0,K.jsx)(`span`,{className:`truncate`,children:e.label}),e.id===`feed`&&_.length>0&&(0,K.jsx)(`span`,{className:`bg-brand text-brand-foreground animate-in zoom-in-50 ml-auto rounded-full px-1.5 py-0.5 text-[10px] tabular-nums`,children:_.length>999?`999+`:_.length},_.length)]},e.id))}),(0,K.jsxs)(`div`,{className:`flex flex-col gap-1.5 border-t pt-3`,children:[(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-2 text-[11px]`,title:`Live transport: WebSocket (preferred) or SSE fallback`,children:[(0,K.jsx)(zb,{type:E===`off`?`secondary`:`success`,pulse:E!==`off`}),E===`off`?`offline`:`live · ${E}`]}),(0,K.jsx)(`small`,{className:`text-muted-foreground text-[11px]`,children:n?`${pb(n.total)} events · ${n.transport}`:`connecting…`})]})]}),(0,K.jsxs)(`main`,{className:`flex min-w-0 flex-col gap-5 p-6`,"data-view":R,children:[(0,K.jsxs)(`header`,{className:`reveal flex flex-wrap items-center gap-3`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,K.jsx)(`h1`,{className:`truncate text-xl font-semibold`,children:ke.label}),(0,K.jsx)(`small`,{className:`text-muted-foreground text-xs`,children:ke.sub})]}),(0,K.jsx)(`span`,{className:`flex-1`}),R===`overview`&&(0,K.jsx)(Gb,{size:`sm`,"aria-label":`Stats time window`,value:String(b),onValueChange:e=>x(Number(e)),options:vb.map(([e,t])=>({value:String(t),label:`window: ${e}`}))}),(0,K.jsx)(X,{size:`sm`,ghost:!0,type:z.has(R)?`accent`:`default`,onClick:()=>V(R),"aria-expanded":z.has(R),title:`About this page`,icon:(0,K.jsx)(Nc,{}),children:`Help`})]}),z.has(R)&&(0,K.jsx)(nte,{view:R}),R===`overview`&&(0,K.jsxs)(`section`,{className:`grid content-start gap-[18px]`,children:[(0,K.jsx)(`div`,{className:`reveal grid grid-cols-[repeat(auto-fit,minmax(9rem,1fr))] gap-3`,children:e?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(nb,{k:`Calls (window)`,v:pb(e.total)}),(0,K.jsx)(nb,{k:`Calls / min`,v:e.callsPerMin.toFixed(1)}),(0,K.jsx)(nb,{k:`Error rate`,v:`${(e.errorRate*100).toFixed(1)}%`,sub:`${e.errors} err`,cls:we}),(0,K.jsx)(nb,{k:`Avg latency`,v:ub(e.latency.avg)}),(0,K.jsx)(nb,{k:`p95 latency`,v:ub(e.latency.p95)}),(0,K.jsx)(nb,{k:`p99 latency`,v:ub(e.latency.p99)}),(0,K.jsx)(nb,{k:`Distinct tools`,v:pb(e.distinctTools)}),(0,K.jsx)(nb,{k:`Output volume`,v:db(e.outputBytes)})]}):(0,K.jsx)(nb,{k:`Loading…`,v:`—`})}),(0,K.jsxs)(`div`,{className:`reveal grid grid-cols-1 gap-4 xl:grid-cols-3`,children:[(0,K.jsx)(tb,{title:`Calls over time`,className:`xl:col-span-2`,children:e?(0,K.jsx)(y5,{series:e.series}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`no data`})}),e&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(tb,{title:`By risk`,children:(0,K.jsx)(b5,{segments:Object.keys(e.byRisk).map(t=>({label:t,value:e.byRisk[t],color:gb[t]}))})}),(0,K.jsx)(tb,{title:`Top tools`,className:`xl:col-span-2`,children:(0,K.jsx)(rb,{rows:e.byTool.map(e=>({label:e.tool,value:e.count,sub:`${e.count}× · ${ub(e.p95Ms)} p95${e.errors?` · ${e.errors} err`:``}`,color:e.errors?`var(--destructive)`:void 0}))})}),(0,K.jsx)(tb,{title:`Status`,children:(0,K.jsx)(b5,{centerLabel:`calls`,segments:[{label:`ok`,value:fe.ok,color:`var(--muted-foreground)`},{label:`error`,value:fe.error,color:`var(--destructive)`}]})}),(0,K.jsx)(tb,{title:`By device`,children:e.byDevice.length?(0,K.jsx)(rb,{rows:e.byDevice.map(e=>({label:e.device,value:e.count}))}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`single device`})}),(0,K.jsx)(tb,{title:`Recent errors`,children:de.length?(0,K.jsx)(`div`,{className:`flex flex-col gap-2`,children:de.slice(0,8).map(e=>(0,K.jsxs)(`div`,{className:`hover:bg-accent/50 grid cursor-pointer grid-cols-[auto_1fr] items-center gap-3 rounded-md px-1 py-0.5`,onClick:()=>void pe(e),children:[(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:fb(e.ts)}),(0,K.jsxs)(`span`,{className:`text-destructive min-w-0 truncate text-xs`,title:e.error??e.output,children:[e.tool,`: `,e.error??e.output??`error`]})]},e.id))}):(0,K.jsx)(`div`,{className:`text-muted-foreground text-[11px]`,children:`no errors 🎉`})})]})]})]}),R===`devices`&&(i&&i.devices.length>0?(0,K.jsxs)(`section`,{className:`grid content-start gap-[18px]`,children:[(0,K.jsxs)(`div`,{className:`reveal flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(Vb,{className:`min-w-[180px] flex-1`,type:`search`,placeholder:`Search devices by name or address…`,value:ne,onChange:e=>re(e.target.value)}),(0,K.jsx)(`div`,{className:`bg-muted flex gap-0.5 rounded-md p-0.5`,children:[`all`,`online`,`offline`].map(e=>(0,K.jsx)(`button`,{type:`button`,className:Y(`rounded-sm px-2.5 py-1 text-xs transition-colors`,ie===e?`bg-background text-foreground shadow-xs`:`text-muted-foreground hover:text-foreground`),onClick:()=>ae(e),children:e===`all`?`All ${oe.total}`:e===`online`?`Online ${oe.online}`:`Offline ${oe.offline}`},e))}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[se.length,`/`,oe.total,` shown`]})]}),(0,K.jsxs)(`details`,{className:`bg-card reveal rounded-lg border p-4`,open:oe.total<=8,children:[(0,K.jsxs)(`summary`,{className:`cursor-pointer text-sm font-medium`,children:[`Connectivity radar`,(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[` `,`· `,oe.online,` online · `,oe.offline,` offline ·`,` `,oe.total,` total`]})]}),(0,K.jsx)(Z7,{payload:i,pulses:M})]}),(0,K.jsx)(Lee,{devices:se,poolPayload:o}),se.length===0?(0,K.jsx)(Q9,{className:`reveal`,icon:(0,K.jsx)(Qc,{className:`size-6`}),title:`No devices match`,sub:`Try a different search or status filter.`}):(0,K.jsx)(`div`,{className:`reveal grid grid-cols-[repeat(auto-fill,minmax(20rem,1fr))] gap-4`,children:se.map(e=>(0,K.jsx)(Q7,{d:e,onToggle:ce},e.name))}),se.length>0&&(0,K.jsx)(tb,{title:`Device system health`,className:`reveal`,extra:(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`CPU · memory · disk · latency · live probe`}),children:(0,K.jsx)(`div`,{className:`grid grid-cols-[repeat(auto-fill,minmax(22rem,1fr))] gap-3`,children:se.map(e=>(0,K.jsx)(s9,{d:e},e.name))})})]}):(0,K.jsx)(Q9,{icon:(0,K.jsx)(Wc,{className:`size-6`}),title:`No devices configured`,body:(0,K.jsx)(Pb,{type:`secondary`,label:`Tip`,children:`Add a device to your config to see connectivity and system health here.`})})),R===`clients`&&(0,K.jsx)(I5,{}),R===`aaa`&&(0,K.jsx)(Px,{}),R===`topology`&&(l&&l.nodes.length>0?(0,K.jsx)(`section`,{className:`reveal grid content-start gap-[18px]`,children:(0,K.jsx)(Mee,{topo:l,onOnboard:(e,t)=>{g({name:e,body:t}),m(!0),te(`config`)}})}):(0,K.jsx)(Q9,{icon:(0,K.jsx)(Yc,{className:`size-6`}),title:`No neighbours discovered yet`,sub:`Layer-2 neighbours (MNDP / CDP / LLDP) appear here as the device reports them.`})),R===`packets`&&(0,K.jsx)(`section`,{className:`grid content-start gap-[18px]`,children:(0,K.jsx)(tb,{title:`Packet capture`,className:`reveal`,extra:(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`live TZSP decode · /tool sniffer streaming`}),children:(0,K.jsx)(Eee,{})})}),R===`snapshots`&&(0,K.jsx)(Oee,{}),R===`drift`&&(0,K.jsx)(y9,{}),R===`plan`&&(0,K.jsx)(Rx,{}),R===`s3`&&(0,K.jsx)(Dee,{}),R===`backups`&&(0,K.jsx)(qb,{}),R===`modules`&&(0,K.jsx)(M9,{}),R===`config`&&(d?(0,K.jsxs)(`section`,{className:`grid content-start gap-[18px]`,children:[(0,K.jsx)(tb,{title:`Configuration`,className:`reveal`,extra:(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>m(e=>!e),title:`Edit the config JSON with autocomplete, validation and safe-apply`,icon:p?void 0:(0,K.jsx)(Kc,{}),children:p?`View`:`Edit config`}),children:p?(0,K.jsx)(R7,{initial:h?{...d,devices:{...d.devices,[h.name]:h.body}}:d,onClose:()=>{m(!1),g(null)},onReload:()=>{g(null),mc(`/api/config`).then(f).catch(()=>{})}},h?`seed-${h.name}`:`config`):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`text-muted-foreground mb-2.5 flex flex-wrap gap-x-4 gap-y-1 text-[11px]`,children:[(0,K.jsxs)(`span`,{children:[`transport: `,mb(Te.transport)]}),(0,K.jsxs)(`span`,{children:[`read-only: `,d.readOnly?`yes`:`no`]}),(0,K.jsxs)(`span`,{children:[`dashboard: `,mb(Ee.host),`:`,mb(Ee.port)]}),(0,K.jsxs)(`span`,{children:[`capture: `,Ee.captureBody?`on`:`off`]}),(0,K.jsxs)(`span`,{children:[`s3: `,d.s3?`configured`:`off`]}),(0,K.jsxs)(`span`,{children:[`ssh pool: `,De.keepAlive===!1?`off`:`on`]})]}),(0,K.jsxs)(`details`,{children:[(0,K.jsx)(`summary`,{className:`cursor-pointer text-sm`,children:`Full effective configuration (secrets redacted)`}),(0,K.jsx)(G5,{value:d,maxHeight:340})]})]})}),(0,K.jsx)(tb,{title:`Dashboard preferences`,className:`reveal`,extra:(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[`saved to `,(0,K.jsx)(`code`,{children:`dashboard.feedLimit`}),` in the config`]}),children:(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col`,children:[(0,K.jsx)(zy,{className:`text-[12.5px]`,children:`Live Feed rows`}),(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[`How many matching calls the feed table renders. Up to `,pb(1e4),` are kept in memory regardless; this only bounds what is drawn.`]})]}),(0,K.jsx)(`span`,{className:`flex-1`}),(0,K.jsx)(Gb,{size:`sm`,"aria-label":`Live Feed rows`,value:String(S),onValueChange:e=>void C(Number(e)),options:ab.map(e=>({value:String(e),label:`${pb(e)} rows${e===200?` (default)`:``}`}))})]})}),(0,K.jsx)(tb,{title:`Version history`,className:`reveal`,extra:(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`point-in-time snapshots · diff & restore`}),children:(0,K.jsx)($5,{onRestored:()=>void mc(`/api/config`).then(f).catch(()=>{})})}),(0,K.jsx)(tb,{title:`Field guide`,className:`reveal`,extra:(0,K.jsx)(`span`,{className:`text-muted-foreground text-[11px]`,children:`every config option, documented from the schema`}),children:(0,K.jsx)(t7,{})})]}):(0,K.jsx)(Q9,{icon:(0,K.jsx)(Bb,{}),title:`Loading configuration…`})),R===`memory`&&(0,K.jsx)(k9,{}),R===`feed`&&(0,K.jsxs)(tb,{className:`reveal`,title:`Live tool calls`,extra:(0,K.jsxs)(`span`,{className:`text-muted-foreground text-[11px]`,children:[pb(me.length),` shown`,le.length>me.length&&` of ${pb(le.length)} matching`,` ·`,` `,pb(_.length),` buffered`]}),children:[(0,K.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(Vb,{className:`min-w-[180px] flex-1`,type:`search`,placeholder:`Search tool / input / output / error…`,value:P.q,onChange:e=>F(t=>({...t,q:e.target.value}))}),Oe(`tool`,`all tools`,n?.tools??[]),Oe(`risk`,`all risk`,[`READ`,`WRITE`,`WRITE_IDEMPOTENT`,`DESTRUCTIVE`,`DANGEROUS`]),Oe(`device`,`all devices`,n?.devices??[]),Oe(`status`,`all status`,[`ok`,`error`]),(0,K.jsx)(X,{size:`sm`,ghost:!0,type:w?`accent`:`default`,onClick:()=>T(e=>!e),icon:w?(0,K.jsx)(qc,{}):(0,K.jsx)(Gc,{}),children:w?`Resume`:`Pause`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>Ce(`csv`),children:`CSV`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>Ce(`json`),children:`JSON`}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>F({tool:``,risk:``,device:``,status:``,q:``}),children:`Clear`}),be&&A.size>0?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(X,{size:`sm`,type:`error`,onClick:()=>void Se(),icon:(0,K.jsx)(kc,{}),children:[`Confirm delete (`,A.size,`)`]}),(0,K.jsx)(X,{size:`sm`,ghost:!0,onClick:()=>xe(!1),children:`Cancel`})]}):(0,K.jsxs)(X,{size:`sm`,ghost:!0,disabled:A.size===0,onClick:()=>xe(!0),title:`Delete the selected rows`,icon:(0,K.jsx)(il,{}),children:[`Delete`,A.size>0?` (${A.size})`:``]})]}),le.length===0?ue?(0,K.jsx)(Q9,{icon:(0,K.jsx)(Qc,{className:`size-6`}),title:`No calls match your filters`,sub:`${_.length} call${_.length===1?``:`s`} buffered — try widening the search or the risk / device / status filters.`,body:(0,K.jsx)(X,{size:`sm`,ghost:!0,className:`mt-2`,onClick:()=>F({tool:``,risk:``,device:``,status:``,q:``}),children:`Clear filters`})}):(0,K.jsx)(Q9,{icon:(0,K.jsx)(zb,{type:E===`off`?`secondary`:`success`,pulse:E!==`off`,className:`size-3`}),title:E===`off`?`Not connected`:`Listening for tool calls…`,sub:E===`off`?`The live stream is offline — it will reconnect automatically.`:`Tool calls the LLM makes against this server stream in here in real time.`}):(0,K.jsx)(`div`,{className:`max-h-[60vh] overflow-auto`,children:(0,K.jsxs)(By,{children:[(0,K.jsx)(Vy,{children:(0,K.jsxs)(Uy,{children:[(0,K.jsx)(Wy,{className:`w-7`,children:(0,K.jsx)(Ry,{"aria-label":`Select all shown rows`,checked:ge?!0:_e?`indeterminate`:!1,onCheckedChange:ye})}),(0,K.jsx)(Wy,{children:`time`}),(0,K.jsx)(Wy,{children:`tool`}),(0,K.jsx)(Wy,{children:`risk`}),(0,K.jsx)(Wy,{children:`device`}),(0,K.jsx)(Wy,{className:`text-right`,children:`dur`}),(0,K.jsx)(Wy,{children:`status`}),(0,K.jsx)(Wy,{children:`output`})]})}),(0,K.jsx)(Hy,{children:me.map(e=>(0,K.jsxs)(Uy,{"data-state":A.has(e.id)?`selected`:void 0,className:Y(`cursor-pointer`,e.isError&&`bg-destructive/8`),onClick:()=>void pe(e),children:[(0,K.jsx)(Gy,{onClick:e=>e.stopPropagation(),children:(0,K.jsx)(Ry,{"aria-label":`Select row`,checked:A.has(e.id),onCheckedChange:()=>ve(e.id)})}),(0,K.jsx)(Gy,{className:`tabular-nums`,children:fb(e.ts)}),(0,K.jsx)(Gy,{children:e.tool}),(0,K.jsx)(Gy,{children:(0,K.jsx)(`span`,{className:Y(`rounded-full border px-1.5 py-0.5 text-[10px]`,_b[e.risk]),children:e.risk.replace(`WRITE_IDEMPOTENT`,`WRITE·I`)})}),(0,K.jsx)(Gy,{children:e.device??`—`}),(0,K.jsx)(Gy,{className:`text-right tabular-nums`,children:ub(e.durationMs)}),(0,K.jsx)(Gy,{children:(0,K.jsx)(`span`,{className:e.isError?`text-destructive`:`text-muted-foreground`,children:e.isError?`error`:`ok`})}),(0,K.jsx)(Gy,{className:`text-muted-foreground max-w-[24rem] truncate`,children:e.isError?e.error??`error`:e.reason?(0,K.jsx)(`span`,{className:`italic`,children:e.reason}):e.output||`—`})]},e.id))})]})})]})]}),c.showModal&&c.release&&(0,K.jsx)($ee,{release:c.release,onDismiss:c.dismissRelease}),O&&(0,K.jsx)(a9,{event:O,onClose:()=>k(null)})]})}var $9=document.getElementById(`root`);$9&&(0,y.createRoot)($9).render((0,K.jsx)(ite,{}));
155
156
  </script>
156
157
  <style>
157
- @import "https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap";@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:"";--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--font-sans:var(--font-mt);--font-mono:var(--font-mt);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-widest:.1em;--leading-tight:1.25;--leading-normal:1.5;--leading-relaxed:1.625;--radius-xs:.125rem;--radius-xl:.75rem;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-mt);--default-mono-font-family:var(--font-mt);--color-border:var(--border)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:root{--font-mt:"JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){*{outline-color:color-mix(in oklab, var(--ring) 50%, transparent)}}body{background-color:var(--background);font-family:var(--font-mt);color:var(--foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}}@layer components{@media (prefers-reduced-motion:no-preference){.js-motion .reveal{opacity:0}}}@layer utilities{.\@container\/card-header{container:card-header/inline-size}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{inset-inline:0}.inset-y-0{inset-block:0}.-top-px{top:-1px}.top-0{top:0}.top-1\/2{top:50%}.top-3{top:calc(var(--spacing) * 3)}.top-4{top:calc(var(--spacing) * 4)}.top-\[50\%\]{top:50%}.right-0{right:0}.right-0\.5{right:calc(var(--spacing) * .5)}.right-1{right:var(--spacing)}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.-bottom-1\.5{bottom:calc(var(--spacing) * -1.5)}.bottom-0{bottom:0}.bottom-3{bottom:calc(var(--spacing) * 3)}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-2\.5{left:calc(var(--spacing) * 2.5)}.left-3{left:calc(var(--spacing) * 3)}.left-\[50\%\]{left:50%}.isolate{isolation:isolate}.z-0{z-index:0}.z-10{z-index:10}.z-30{z-index:30}.z-50{z-index:50}.z-\[1\]{z-index:1}.z-\[5\]{z-index:5}.col-span-full{grid-column:1/-1}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2/span 2}.row-start-1{grid-row-start:1}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.m-0{margin:0}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-auto{margin-inline:auto}.my-0\.5{margin-block:calc(var(--spacing) * .5)}.my-1{margin-block:var(--spacing)}.my-2\.5{margin-block:calc(var(--spacing) * 2.5)}.my-3{margin-block:calc(var(--spacing) * 3)}.-mt-1{margin-top:calc(var(--spacing) * -1)}.mt-0{margin-top:0}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-3\.5{margin-top:calc(var(--spacing) * 3.5)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-\[3px\]{margin-top:3px}.mt-\[7px\]{margin-top:7px}.mt-auto{margin-top:auto}.mt-px{margin-top:1px}.mr-1\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-0{margin-bottom:0}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-2\.5{margin-bottom:calc(var(--spacing) * 2.5)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-3\.5{margin-bottom:calc(var(--spacing) * 3.5)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-1{margin-left:var(--spacing)}.ml-auto{margin-left:auto}.box-border{box-sizing:border-box}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-row{display:table-row}.\[field-sizing\:fixed\]{field-sizing:fixed}.field-sizing-content{field-sizing:content}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.size-1\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-2\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-\[7px\]{width:7px;height:7px}.size-\[9px\]{width:9px;height:9px}.size-\[11px\]{width:11px;height:11px}.size-\[12px\]{width:12px;height:12px}.size-\[13px\]{width:13px;height:13px}.size-\[14px\]{width:14px;height:14px}.size-\[18px\]{width:18px;height:18px}.size-\[72px\]{width:72px;height:72px}.size-full{width:100%;height:100%}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-40{height:calc(var(--spacing) * 40)}.h-\[18px\]{height:18px}.h-\[46px\]{height:46px}.h-\[150px\]{height:150px}.h-\[200px\]{height:200px}.h-\[360px\]{height:360px}.h-\[400px\]{height:400px}.h-\[calc\(100\%-1px\)\]{height:calc(100% - 1px)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-\(--radix-dropdown-menu-content-available-height\){max-height:var(--radix-dropdown-menu-content-available-height)}.max-h-\(--radix-select-content-available-height\){max-height:var(--radix-select-content-available-height)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-\[40vh\]{max-height:40vh}.max-h-\[60vh\]{max-height:60vh}.max-h-\[184px\]{max-height:184px}.max-h-\[250px\]{max-height:250px}.max-h-\[280px\]{max-height:280px}.max-h-\[320px\]{max-height:320px}.max-h-\[360px\]{max-height:360px}.max-h-\[420px\]{max-height:420px}.max-h-\[440px\]{max-height:440px}.max-h-\[500px\]{max-height:500px}.max-h-\[calc\(100vh-80px\)\]{max-height:calc(100vh - 80px)}.min-h-0{min-height:0}.min-h-4{min-height:calc(var(--spacing) * 4)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-40{min-height:calc(var(--spacing) * 40)}.min-h-\[120px\]{min-height:120px}.min-h-screen{min-height:100vh}.w-0{width:0}.w-1{width:var(--spacing)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3\/4{width:75%}.w-7{width:calc(var(--spacing) * 7)}.w-11{width:calc(var(--spacing) * 11)}.w-20{width:calc(var(--spacing) * 20)}.w-40{width:calc(var(--spacing) * 40)}.w-\[90px\]{width:90px}.w-\[120px\]{width:120px}.w-\[130px\]{width:130px}.w-\[150px\]{width:150px}.w-\[170px\]{width:170px}.w-\[200px\]{width:200px}.w-\[220px\]{width:220px}.w-\[380px\]{width:380px}.w-\[min\(48vw\,380px\)\]{width:min(48vw,380px)}.w-\[min\(360px\,60vw\)\]{width:min(360px,60vw)}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\[24rem\]{max-width:24rem}.max-w-\[120px\]{max-width:120px}.max-w-\[160px\]{max-width:160px}.max-w-\[180px\]{max-width:180px}.max-w-\[190px\]{max-width:190px}.max-w-\[200px\]{max-width:200px}.max-w-\[260px\]{max-width:260px}.max-w-\[300px\]{max-width:300px}.max-w-\[320px\]{max-width:320px}.max-w-\[460px\]{max-width:460px}.max-w-\[520px\]{max-width:520px}.max-w-\[calc\(100\%-2rem\)\]{max-width:calc(100% - 2rem)}.max-w-\[min\(60vw\,520px\)\]{max-width:min(60vw,520px)}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:0}.min-w-\[8rem\]{min-width:8rem}.min-w-\[38px\]{min-width:38px}.min-w-\[48px\]{min-width:48px}.min-w-\[60px\]{min-width:60px}.min-w-\[100px\]{min-width:100px}.min-w-\[150px\]{min-width:150px}.min-w-\[180px\]{min-width:180px}.min-w-\[200px\]{min-width:200px}.min-w-\[980px\]{min-width:980px}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.flex-none{flex:none}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.table-fixed{table-layout:fixed}.caption-bottom{caption-side:bottom}.origin-\(--radix-dropdown-menu-content-transform-origin\){transform-origin:var(--radix-dropdown-menu-content-transform-origin)}.origin-\(--radix-select-content-transform-origin\){transform-origin:var(--radix-select-content-transform-origin)}.origin-\(--radix-tooltip-content-transform-origin\){transform-origin:var(--radix-tooltip-content-transform-origin)}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[calc\(-50\%_-_2px\)\]{--tw-translate-y:calc(-50% - 2px);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[calc\(-100\%-9px\)\]{--tw-translate-y:calc(-100% - 9px);translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-45{rotate:45deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-in{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize-y{resize:vertical}.scroll-my-1{scroll-margin-block:var(--spacing)}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.auto-rows-min{grid-auto-rows:min-content}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\[0_1fr\]{grid-template-columns:0 1fr}.grid-cols-\[24px_minmax\(0\,1fr\)_auto\]{grid-template-columns:24px minmax(0,1fr) auto}.grid-cols-\[52px_1fr_34px\]{grid-template-columns:52px 1fr 34px}.grid-cols-\[90px_64px_48px_1fr\]{grid-template-columns:90px 64px 48px 1fr}.grid-cols-\[220px_1fr\]{grid-template-columns:220px 1fr}.grid-cols-\[240px_1fr\]{grid-template-columns:240px 1fr}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-cols-\[minmax\(0\,7rem\)_1fr_auto\]{grid-template-columns:minmax(0,7rem) 1fr auto}.grid-cols-\[minmax\(120px\,0\.4fr\)_1fr\]{grid-template-columns:minmax(120px,.4fr) 1fr}.grid-cols-\[repeat\(auto-fill\,minmax\(17rem\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(17rem,1fr))}.grid-cols-\[repeat\(auto-fill\,minmax\(20rem\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(20rem,1fr))}.grid-cols-\[repeat\(auto-fill\,minmax\(200px\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}.grid-cols-\[repeat\(auto-fill\,minmax\(220px\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}.grid-cols-\[repeat\(auto-fill\,minmax\(240px\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}.grid-cols-\[repeat\(auto-fill\,minmax\(min\(100\%\,360px\)\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(min(100%,360px),1fr))}.grid-cols-\[repeat\(auto-fit\,minmax\(9rem\,1fr\)\)\]{grid-template-columns:repeat(auto-fit,minmax(9rem,1fr))}.grid-rows-\[auto_auto\]{grid-template-rows:auto auto}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.place-content-center{place-content:center}.place-items-center{place-items:center}.content-start{align-content:flex-start}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-around{justify-content:space-around}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.justify-items-center{justify-items:center}.justify-items-start{justify-items:start}.gap-0{gap:0}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-3\.5{gap:calc(var(--spacing) * 3.5)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-\[3px\]{gap:3px}.gap-\[5px\]{gap:5px}.gap-\[7px\]{gap:7px}.gap-\[9px\]{gap:9px}.gap-\[18px\]{gap:18px}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-3\.5{column-gap:calc(var(--spacing) * 3.5)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-y-0\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-1{row-gap:var(--spacing)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}.gap-y-2\.5{row-gap:calc(var(--spacing) * 2.5)}.gap-y-3{row-gap:calc(var(--spacing) * 3)}.gap-y-\[3px\]{row-gap:3px}.self-start{align-self:flex-start}.justify-self-center{justify-self:center}.justify-self-end{justify-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\[2px\]{border-radius:2px}.rounded-\[3px\]{border-radius:3px}.rounded-\[4px\]{border-radius:4px}.rounded-\[6px\]{border-radius:6px}.rounded-\[7px\]{border-radius:7px}.rounded-\[10px\]{border-radius:10px}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:calc(var(--radius) + 2px)}.rounded-md{border-radius:var(--radius)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-xs{border-radius:var(--radius-xs)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-\[1\.5px\]{border-style:var(--tw-border-style);border-width:1.5px}.border-\[2\.5px\]{border-style:var(--tw-border-style);border-width:2.5px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-\[3px\]{border-left-style:var(--tw-border-style);border-left-width:3px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\(--color-border\){border-color:var(--color-border)}.border-border,.border-border\/50{border-color:var(--border)}@supports (color:color-mix(in lab, red, red)){.border-border\/50{border-color:color-mix(in oklab, var(--border) 50%, transparent)}}.border-border\/60{border-color:var(--border)}@supports (color:color-mix(in lab, red, red)){.border-border\/60{border-color:color-mix(in oklab, var(--border) 60%, transparent)}}.border-brand,.border-brand\/30{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.border-brand\/30{border-color:color-mix(in oklab, var(--brand) 30%, transparent)}}.border-brand\/40{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.border-brand\/40{border-color:color-mix(in oklab, var(--brand) 40%, transparent)}}.border-brand\/50{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.border-brand\/50{border-color:color-mix(in oklab, var(--brand) 50%, transparent)}}.border-brand\/55{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.border-brand\/55{border-color:color-mix(in oklab, var(--brand) 55%, transparent)}}.border-chart-1\/40{border-color:var(--chart-1)}@supports (color:color-mix(in lab, red, red)){.border-chart-1\/40{border-color:color-mix(in oklab, var(--chart-1) 40%, transparent)}}.border-chart-1\/45{border-color:var(--chart-1)}@supports (color:color-mix(in lab, red, red)){.border-chart-1\/45{border-color:color-mix(in oklab, var(--chart-1) 45%, transparent)}}.border-chart-1\/50{border-color:var(--chart-1)}@supports (color:color-mix(in lab, red, red)){.border-chart-1\/50{border-color:color-mix(in oklab, var(--chart-1) 50%, transparent)}}.border-chart-2\/40{border-color:var(--chart-2)}@supports (color:color-mix(in lab, red, red)){.border-chart-2\/40{border-color:color-mix(in oklab, var(--chart-2) 40%, transparent)}}.border-chart-2\/45{border-color:var(--chart-2)}@supports (color:color-mix(in lab, red, red)){.border-chart-2\/45{border-color:color-mix(in oklab, var(--chart-2) 45%, transparent)}}.border-chart-3\/35{border-color:var(--chart-3)}@supports (color:color-mix(in lab, red, red)){.border-chart-3\/35{border-color:color-mix(in oklab, var(--chart-3) 35%, transparent)}}.border-chart-3\/40{border-color:var(--chart-3)}@supports (color:color-mix(in lab, red, red)){.border-chart-3\/40{border-color:color-mix(in oklab, var(--chart-3) 40%, transparent)}}.border-chart-4\/40{border-color:var(--chart-4)}@supports (color:color-mix(in lab, red, red)){.border-chart-4\/40{border-color:color-mix(in oklab, var(--chart-4) 40%, transparent)}}.border-destructive\/40{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.border-destructive\/40{border-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.border-destructive\/45{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.border-destructive\/45{border-color:color-mix(in oklab, var(--destructive) 45%, transparent)}}.border-destructive\/50{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.border-destructive\/50{border-color:color-mix(in oklab, var(--destructive) 50%, transparent)}}.border-input{border-color:var(--input)}.border-success\/35{border-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.border-success\/35{border-color:color-mix(in oklab, var(--success) 35%, transparent)}}.border-success\/40{border-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.border-success\/40{border-color:color-mix(in oklab, var(--success) 40%, transparent)}}.border-success\/45{border-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.border-success\/45{border-color:color-mix(in oklab, var(--success) 45%, transparent)}}.border-transparent{border-color:#0000}.border-warning\/30{border-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.border-warning\/30{border-color:color-mix(in oklab, var(--warning) 30%, transparent)}}.border-warning\/40{border-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.border-warning\/40{border-color:color-mix(in oklab, var(--warning) 40%, transparent)}}.border-warning\/45{border-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.border-warning\/45{border-color:color-mix(in oklab, var(--warning) 45%, transparent)}}.border-warning\/60{border-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.border-warning\/60{border-color:color-mix(in oklab, var(--warning) 60%, transparent)}}.border-t-transparent{border-top-color:#0000}.border-l-border{border-left-color:var(--border)}.border-l-destructive{border-left-color:var(--destructive)}.border-l-success{border-left-color:var(--success)}.border-l-transparent{border-left-color:#0000}.border-l-warning{border-left-color:var(--warning)}.bg-\(--color-bg\){background-color:var(--color-bg)}.bg-accent{background-color:var(--accent)}.bg-background{background-color:var(--background)}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-border{background-color:var(--border)}.bg-brand,.bg-brand\/10{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.bg-brand\/10{background-color:color-mix(in oklab, var(--brand) 10%, transparent)}}.bg-brand\/15{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.bg-brand\/15{background-color:color-mix(in oklab, var(--brand) 15%, transparent)}}.bg-brand\/20{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.bg-brand\/20{background-color:color-mix(in oklab, var(--brand) 20%, transparent)}}.bg-brand\/40{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.bg-brand\/40{background-color:color-mix(in oklab, var(--brand) 40%, transparent)}}.bg-brand\/\[0\.13\]{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.bg-brand\/\[0\.13\]{background-color:color-mix(in oklab, var(--brand) 13%, transparent)}}.bg-card{background-color:var(--card)}.bg-chart-1\/10{background-color:var(--chart-1)}@supports (color:color-mix(in lab, red, red)){.bg-chart-1\/10{background-color:color-mix(in oklab, var(--chart-1) 10%, transparent)}}.bg-chart-2,.bg-chart-2\/10{background-color:var(--chart-2)}@supports (color:color-mix(in lab, red, red)){.bg-chart-2\/10{background-color:color-mix(in oklab, var(--chart-2) 10%, transparent)}}.bg-destructive,.bg-destructive\/8{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/8{background-color:color-mix(in oklab, var(--destructive) 8%, transparent)}}.bg-destructive\/10{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/10{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.bg-foreground{background-color:var(--foreground)}.bg-muted{background-color:var(--muted)}.bg-muted-foreground,.bg-muted-foreground\/60{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.bg-muted-foreground\/60{background-color:color-mix(in oklab, var(--muted-foreground) 60%, transparent)}}.bg-muted\/40{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/40{background-color:color-mix(in oklab, var(--muted) 40%, transparent)}}.bg-muted\/45{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/45{background-color:color-mix(in oklab, var(--muted) 45%, transparent)}}.bg-muted\/50{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/50{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-secondary{background-color:var(--secondary)}.bg-success,.bg-success\/10{background-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.bg-success\/10{background-color:color-mix(in oklab, var(--success) 10%, transparent)}}.bg-transparent{background-color:#0000}.bg-warning,.bg-warning\/8{background-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\/8{background-color:color-mix(in oklab, var(--warning) 8%, transparent)}}.bg-warning\/10{background-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\/10{background-color:color-mix(in oklab, var(--warning) 10%, transparent)}}.fill-background{fill:var(--background)}.fill-brand\/15{fill:var(--brand)}@supports (color:color-mix(in lab, red, red)){.fill-brand\/15{fill:color-mix(in oklab, var(--brand) 15%, transparent)}}.fill-brand\/25{fill:var(--brand)}@supports (color:color-mix(in lab, red, red)){.fill-brand\/25{fill:color-mix(in oklab, var(--brand) 25%, transparent)}}.fill-card{fill:var(--card)}.fill-chart-3\/20{fill:var(--chart-3)}@supports (color:color-mix(in lab, red, red)){.fill-chart-3\/20{fill:color-mix(in oklab, var(--chart-3) 20%, transparent)}}.fill-chart-4\/15{fill:var(--chart-4)}@supports (color:color-mix(in lab, red, red)){.fill-chart-4\/15{fill:color-mix(in oklab, var(--chart-4) 15%, transparent)}}.fill-current{fill:currentColor}.fill-foreground{fill:var(--foreground)}.fill-muted{fill:var(--muted)}.fill-muted-foreground{fill:var(--muted-foreground)}.fill-none{fill:none}.fill-success\/20{fill:var(--success)}@supports (color:color-mix(in lab, red, red)){.fill-success\/20{fill:color-mix(in oklab, var(--success) 20%, transparent)}}.fill-warning\/15{fill:var(--warning)}@supports (color:color-mix(in lab, red, red)){.fill-warning\/15{fill:color-mix(in oklab, var(--warning) 15%, transparent)}}.stroke-background{stroke:var(--background)}.stroke-border,.stroke-border\/40{stroke:var(--border)}@supports (color:color-mix(in lab, red, red)){.stroke-border\/40{stroke:color-mix(in oklab, var(--border) 40%, transparent)}}.stroke-border\/60{stroke:var(--border)}@supports (color:color-mix(in lab, red, red)){.stroke-border\/60{stroke:color-mix(in oklab, var(--border) 60%, transparent)}}.stroke-border\/70{stroke:var(--border)}@supports (color:color-mix(in lab, red, red)){.stroke-border\/70{stroke:color-mix(in oklab, var(--border) 70%, transparent)}}.stroke-brand,.stroke-brand\/55{stroke:var(--brand)}@supports (color:color-mix(in lab, red, red)){.stroke-brand\/55{stroke:color-mix(in oklab, var(--brand) 55%, transparent)}}.stroke-chart-2\/70{stroke:var(--chart-2)}@supports (color:color-mix(in lab, red, red)){.stroke-chart-2\/70{stroke:color-mix(in oklab, var(--chart-2) 70%, transparent)}}.stroke-chart-3{stroke:var(--chart-3)}.stroke-chart-4{stroke:var(--chart-4)}.stroke-foreground{stroke:var(--foreground)}.stroke-none{stroke:none}.stroke-success{stroke:var(--success)}.stroke-warning{stroke:var(--warning)}.stroke-1{stroke-width:1px}.stroke-2{stroke-width:2px}.stroke-\[1\.5px\]{stroke-width:1.5px}.p-0{padding:0}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\.5{padding:calc(var(--spacing) * 3.5)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-\[3px\]{padding:3px}.p-px{padding:1px}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-\[5px\]{padding-inline:5px}.px-\[7px\]{padding-inline:7px}.px-\[11px\]{padding-inline:11px}.px-\[13px\]{padding-inline:13px}.px-\[15px\]{padding-inline:15px}.py-0{padding-block:0}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-14{padding-block:calc(var(--spacing) * 14)}.py-\[3px\]{padding-block:3px}.py-\[5px\]{padding-block:5px}.py-\[7px\]{padding-block:7px}.py-\[9px\]{padding-block:9px}.py-\[11px\]{padding-block:11px}.py-\[54px\]{padding-block:54px}.py-px{padding-block:1px}.pt-1{padding-top:var(--spacing)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-3\.5{padding-top:calc(var(--spacing) * 3.5)}.pt-10{padding-top:calc(var(--spacing) * 10)}.pt-px{padding-top:1px}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-1{padding-bottom:var(--spacing)}.pb-1\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pl-1\.5{padding-left:calc(var(--spacing) * 1.5)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-\[18px\]{padding-left:18px}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mt)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-\[11px\]\/\[1\.5\]{font-size:11px;line-height:1.5}.text-\[11px\]\/\[1\.6\]{font-size:11px;line-height:1.6}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[7px\]{font-size:7px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-\[10\.5px\]{font-size:10.5px}.text-\[10px\]{font-size:10px}.text-\[11\.5px\]{font-size:11.5px}.text-\[11px\]{font-size:11px}.text-\[12\.5px\]{font-size:12.5px}.text-\[13px\]{font-size:13px}.text-\[15px\]{font-size:15px}.text-\[44px\]{font-size:44px}.leading-\[1\.4\]{--tw-leading:1.4;line-height:1.4}.leading-\[1\.5\]{--tw-leading:1.5;line-height:1.5}.leading-\[1\.7\]{--tw-leading:1.7;line-height:1.7}.leading-\[1\.35\]{--tw-leading:1.35;line-height:1.35}.leading-\[8px\]{--tw-leading:8px;line-height:8px}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[0\.2em\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-\[0\.04em\]{--tw-tracking:.04em;letter-spacing:.04em}.tracking-\[0\.05em\]{--tw-tracking:.05em;letter-spacing:.05em}.tracking-\[0\.06em\]{--tw-tracking:.06em;letter-spacing:.06em}.tracking-\[0\.08em\]{--tw-tracking:.08em;letter-spacing:.08em}.tracking-\[0\.09em\]{--tw-tracking:.09em;letter-spacing:.09em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-balance{text-wrap:balance}.\[overflow-wrap\:anywhere\]{overflow-wrap:anywhere}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.\[tab-size\:2\]{tab-size:2}.text-accent-foreground{color:var(--accent-foreground)}.text-background{color:var(--background)}.text-brand{color:var(--brand)}.text-brand-foreground{color:var(--brand-foreground)}.text-card-foreground{color:var(--card-foreground)}.text-chart-1{color:var(--chart-1)}.text-chart-2{color:var(--chart-2)}.text-chart-3{color:var(--chart-3)}.text-chart-4{color:var(--chart-4)}.text-chart-5{color:var(--chart-5)}.text-current{color:currentColor}.text-destructive{color:var(--destructive)}.text-foreground,.text-foreground\/60{color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.text-foreground\/60{color:color-mix(in oklab, var(--foreground) 60%, transparent)}}.text-muted-foreground{color:var(--muted-foreground)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-success{color:var(--success)}.text-transparent{color:#0000}.text-warning{color:var(--warning)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.underline-offset-4{text-underline-offset:4px}.caret-brand{caret-color:var(--brand)}.accent-brand{accent-color:var(--brand)}.opacity-15{opacity:.15}.opacity-45{opacity:.45}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-65{opacity:.65}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-4{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-brand\/25{--tw-ring-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.ring-brand\/25{--tw-ring-color:color-mix(in oklab, var(--brand) 25%, transparent)}}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.grayscale-\[0\.4\]{--tw-grayscale:grayscale(.4);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[color\,box-shadow\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[transform\,border-color\]{transition-property:transform,border-color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-none{transition-property:none}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-\[400ms\]{--tw-duration:.4s;transition-duration:.4s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.fade-in-0{--tw-enter-opacity:0}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.zoom-in-50{--tw-enter-scale:.5}.zoom-in-95{--tw-enter-scale:.95}.\[text-shadow\:0_0_3px_rgba\(0\,0\,0\,0\.6\)\]{text-shadow:0 0 3px #0009}.\[transition\:stroke_0\.1s_ease\]{transition:stroke .1s}.\[vector-effect\:non-scaling-stroke\]{vector-effect:non-scaling-stroke}.running{animation-play-state:running}.group-data-\[disabled\=true\]\:pointer-events-none:is(:where(.group)[data-disabled=true] *){pointer-events:none}.group-data-\[disabled\=true\]\:opacity-50:is(:where(.group)[data-disabled=true] *){opacity:.5}.group-data-\[orientation\=horizontal\]\/tabs\:h-9:is(:where(.group\/tabs)[data-orientation=horizontal] *){height:calc(var(--spacing) * 9)}.group-data-\[orientation\=vertical\]\/tabs\:h-fit:is(:where(.group\/tabs)[data-orientation=vertical] *){height:fit-content}.group-data-\[orientation\=vertical\]\/tabs\:w-full:is(:where(.group\/tabs)[data-orientation=vertical] *){width:100%}.group-data-\[orientation\=vertical\]\/tabs\:flex-col:is(:where(.group\/tabs)[data-orientation=vertical] *){flex-direction:column}.group-data-\[orientation\=vertical\]\/tabs\:justify-start:is(:where(.group\/tabs)[data-orientation=vertical] *){justify-content:flex-start}.group-data-\[size\=default\]\/switch\:size-4:is(:where(.group\/switch)[data-size=default] *){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.group-data-\[size\=sm\]\/switch\:size-3:is(:where(.group\/switch)[data-size=sm] *){width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.group-data-\[variant\=line\]\/tabs-list\:bg-transparent:is(:where(.group\/tabs-list)[data-variant=line] *){background-color:#0000}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.selection\:bg-brand\/35 ::selection{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.selection\:bg-brand\/35 ::selection{background-color:color-mix(in oklab, var(--brand) 35%, transparent)}}.selection\:bg-brand\/35::selection{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.selection\:bg-brand\/35::selection{background-color:color-mix(in oklab, var(--brand) 35%, transparent)}}.selection\:bg-primary ::selection{background-color:var(--primary)}.selection\:bg-primary::selection{background-color:var(--primary)}.selection\:text-primary-foreground ::selection{color:var(--primary-foreground)}.selection\:text-primary-foreground::selection{color:var(--primary-foreground)}.file\:inline-flex::file-selector-button{display:inline-flex}.file\:h-7::file-selector-button{height:calc(var(--spacing) * 7)}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:top-\[25px\]:before{content:var(--tw-content);top:25px}.before\:bottom-0:before{content:var(--tw-content);bottom:0}.before\:left-\[22px\]:before{content:var(--tw-content);left:22px}.before\:w-px:before{content:var(--tw-content);width:1px}.before\:bg-border:before{content:var(--tw-content);background-color:var(--border)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:bg-foreground:after{content:var(--tw-content);background-color:var(--foreground)}.after\:opacity-0:after{content:var(--tw-content);opacity:0}.after\:transition-opacity:after{content:var(--tw-content);transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.group-data-\[orientation\=horizontal\]\/tabs\:after\:inset-x-0:is(:where(.group\/tabs)[data-orientation=horizontal] *):after{content:var(--tw-content);inset-inline:0}.group-data-\[orientation\=horizontal\]\/tabs\:after\:bottom-\[-5px\]:is(:where(.group\/tabs)[data-orientation=horizontal] *):after{content:var(--tw-content);bottom:-5px}.group-data-\[orientation\=horizontal\]\/tabs\:after\:h-0\.5:is(:where(.group\/tabs)[data-orientation=horizontal] *):after{content:var(--tw-content);height:calc(var(--spacing) * .5)}.group-data-\[orientation\=vertical\]\/tabs\:after\:inset-y-0:is(:where(.group\/tabs)[data-orientation=vertical] *):after{content:var(--tw-content);inset-block:0}.group-data-\[orientation\=vertical\]\/tabs\:after\:-right-1:is(:where(.group\/tabs)[data-orientation=vertical] *):after{content:var(--tw-content);right:calc(var(--spacing) * -1)}.group-data-\[orientation\=vertical\]\/tabs\:after\:w-0\.5:is(:where(.group\/tabs)[data-orientation=vertical] *):after{content:var(--tw-content);width:calc(var(--spacing) * .5)}.last\:before\:hidden:last-child:before{content:var(--tw-content);display:none}.odd\:bg-card\/40:nth-child(odd){background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.odd\:bg-card\/40:nth-child(odd){background-color:color-mix(in oklab, var(--card) 40%, transparent)}}@media (hover:hover){.hover\:-translate-y-0\.5:hover{--tw-translate-y:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:border-brand\/35:hover{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.hover\:border-brand\/35:hover{border-color:color-mix(in oklab, var(--brand) 35%, transparent)}}.hover\:border-brand\/40:hover{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.hover\:border-brand\/40:hover{border-color:color-mix(in oklab, var(--brand) 40%, transparent)}}.hover\:border-chart-2\/35:hover{border-color:var(--chart-2)}@supports (color:color-mix(in lab, red, red)){.hover\:border-chart-2\/35:hover{border-color:color-mix(in oklab, var(--chart-2) 35%, transparent)}}.hover\:border-muted-foreground\/40:hover{border-color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.hover\:border-muted-foreground\/40:hover{border-color:color-mix(in oklab, var(--muted-foreground) 40%, transparent)}}.hover\:bg-accent:hover,.hover\:bg-accent\/50:hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-accent\/50:hover{background-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.hover\:bg-brand\/10:hover{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-brand\/10:hover{background-color:color-mix(in oklab, var(--brand) 10%, transparent)}}.hover\:bg-brand\/90:hover{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-brand\/90:hover{background-color:color-mix(in oklab, var(--brand) 90%, transparent)}}.hover\:bg-destructive\/10:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-destructive\/10:hover{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab, var(--destructive) 90%, transparent)}}.hover\:bg-foreground\/5:hover{background-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-foreground\/5:hover{background-color:color-mix(in oklab, var(--foreground) 5%, transparent)}}.hover\:bg-muted\/50:hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-muted\/50:hover{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab, var(--primary) 90%, transparent)}}.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab, var(--secondary) 80%, transparent)}}.hover\:bg-success\/10:hover{background-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-success\/10:hover{background-color:color-mix(in oklab, var(--success) 10%, transparent)}}.hover\:bg-success\/90:hover{background-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-success\/90:hover{background-color:color-mix(in oklab, var(--success) 90%, transparent)}}.hover\:bg-warning\/10:hover{background-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-warning\/10:hover{background-color:color-mix(in oklab, var(--warning) 10%, transparent)}}.hover\:bg-warning\/90:hover{background-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-warning\/90:hover{background-color:color-mix(in oklab, var(--warning) 90%, transparent)}}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}}.focus\:bg-accent:focus{background-color:var(--accent)}.focus\:text-accent-foreground:focus{color:var(--accent-foreground)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus-visible\:border-0:focus-visible{border-style:var(--tw-border-style);border-width:0}.focus-visible\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\:ring-0:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-\[3px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.focus-visible\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-ring:focus-visible{outline-color:var(--ring)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.has-aria-expanded\:bg-muted\/50:has([aria-expanded=true]){background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.has-aria-expanded\:bg-muted\/50:has([aria-expanded=true]){background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.has-data-\[slot\=card-action\]\:grid-cols-\[1fr_auto\]:has([data-slot=card-action]){grid-template-columns:1fr auto}.has-\[\>svg\]\:grid-cols-\[calc\(var\(--spacing\)\*4\)_1fr\]:has(>svg){grid-template-columns:calc(var(--spacing) * 4) 1fr}.has-\[\>svg\]\:gap-x-3:has(>svg){column-gap:calc(var(--spacing) * 3)}.has-\[\>svg\]\:px-1\.5:has(>svg){padding-inline:calc(var(--spacing) * 1.5)}.has-\[\>svg\]\:px-2\.5:has(>svg){padding-inline:calc(var(--spacing) * 2.5)}.has-\[\>svg\]\:px-3:has(>svg){padding-inline:calc(var(--spacing) * 3)}.has-\[\>svg\]\:px-4:has(>svg){padding-inline:calc(var(--spacing) * 4)}.aria-invalid\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[inset\]\:pl-8[data-inset]{padding-left:calc(var(--spacing) * 8)}.data-\[orientation\=horizontal\]\:h-px[data-orientation=horizontal]{height:1px}.data-\[orientation\=horizontal\]\:w-full[data-orientation=horizontal]{width:100%}.data-\[orientation\=horizontal\]\:flex-col[data-orientation=horizontal]{flex-direction:column}.data-\[orientation\=vertical\]\:h-full[data-orientation=vertical]{height:100%}.data-\[orientation\=vertical\]\:w-px[data-orientation=vertical]{width:1px}.data-\[placeholder\]\:text-muted-foreground[data-placeholder]{color:var(--muted-foreground)}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\[size\=default\]\:h-9[data-size=default]{height:calc(var(--spacing) * 9)}.data-\[size\=default\]\:h-\[1\.15rem\][data-size=default]{height:1.15rem}.data-\[size\=default\]\:w-8[data-size=default]{width:calc(var(--spacing) * 8)}.data-\[size\=sm\]\:h-3\.5[data-size=sm]{height:calc(var(--spacing) * 3.5)}.data-\[size\=sm\]\:h-8[data-size=sm]{height:calc(var(--spacing) * 8)}.data-\[size\=sm\]\:w-6[data-size=sm]{width:calc(var(--spacing) * 6)}:is(.\*\:data-\[slot\=alert-description\]\:text-destructive\/90>*)[data-slot=alert-description]{color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){:is(.\*\:data-\[slot\=alert-description\]\:text-destructive\/90>*)[data-slot=alert-description]{color:color-mix(in oklab, var(--destructive) 90%, transparent)}}:is(.\*\:data-\[slot\=select-value\]\:line-clamp-1>*)[data-slot=select-value]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:is(.\*\:data-\[slot\=select-value\]\:flex>*)[data-slot=select-value]{display:flex}:is(.\*\:data-\[slot\=select-value\]\:items-center>*)[data-slot=select-value]{align-items:center}:is(.\*\:data-\[slot\=select-value\]\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing) * 2)}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:var(--background)}.data-\[state\=active\]\:text-foreground[data-state=active]{color:var(--foreground)}.group-data-\[variant\=default\]\/tabs-list\:data-\[state\=active\]\:shadow-sm:is(:where(.group\/tabs-list)[data-variant=default] *)[data-state=active]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.group-data-\[variant\=line\]\/tabs-list\:data-\[state\=active\]\:bg-transparent:is(:where(.group\/tabs-list)[data-variant=line] *)[data-state=active]{background-color:#0000}.group-data-\[variant\=line\]\/tabs-list\:data-\[state\=active\]\:shadow-none:is(:where(.group\/tabs-list)[data-variant=line] *)[data-state=active]{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.group-data-\[variant\=line\]\/tabs-list\:data-\[state\=active\]\:after\:opacity-100:is(:where(.group\/tabs-list)[data-variant=line] *)[data-state=active]:after{content:var(--tw-content);opacity:1}.data-\[state\=checked\]\:translate-x-\[calc\(100\%-2px\)\][data-state=checked]{--tw-translate-x:calc(100% - 2px);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=checked\]\:border-primary[data-state=checked]{border-color:var(--primary)}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:var(--primary-foreground)}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=closed\]\:duration-300[data-state=closed]{--tw-duration:.3s;transition-duration:.3s}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y:100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x:-100%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x:100%}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y:-100%}.data-\[state\=open\]\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:var(--accent)}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:var(--secondary)}.data-\[state\=open\]\:text-accent-foreground[data-state=open]{color:var(--accent-foreground)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\[state\=open\]\:duration-500[data-state=open]{--tw-duration:.5s;transition-duration:.5s}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y:100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x:-100%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x:100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y:-100%}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:var(--muted)}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x:0;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:var(--input)}.data-\[variant\=destructive\]\:text-destructive[data-variant=destructive]{color:var(--destructive)}.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.data-\[variant\=destructive\]\:focus\:text-destructive[data-variant=destructive]:focus{color:var(--destructive)}.data-\[variant\=line\]\:rounded-none[data-variant=line]{border-radius:0}@media not all and (width>=720px){.max-\[720px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}}@media (width>=40rem){.sm\:max-w-2xl{max-width:var(--container-2xl)}.sm\:max-w-\[520px\]{max-width:520px}.sm\:max-w-lg{max-width:var(--container-lg)}.sm\:max-w-sm{max-width:var(--container-sm)}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:text-left{text-align:left}}@media (width>=48rem){.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media (width>=64rem){.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media (width>=80rem){.xl\:col-span-2{grid-column:span 2/span 2}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.dark\:border-input:is(.dark *){border-color:var(--input)}.dark\:bg-destructive\/60:is(.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-destructive\/60:is(.dark *){background-color:color-mix(in oklab, var(--destructive) 60%, transparent)}}.dark\:bg-input\/30:is(.dark *){background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-input\/30:is(.dark *){background-color:color-mix(in oklab, var(--input) 30%, transparent)}}.dark\:bg-transparent:is(.dark *){background-color:#0000}.dark\:text-muted-foreground:is(.dark *){color:var(--muted-foreground)}@media (hover:hover){.dark\:hover\:bg-accent\/50:is(.dark *):hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-accent\/50:is(.dark *):hover{background-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:color-mix(in oklab, var(--input) 50%, transparent)}}.dark\:hover\:text-foreground:is(.dark *):hover{color:var(--foreground)}}.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:data-\[state\=active\]\:border-input:is(.dark *)[data-state=active]{border-color:var(--input)}.dark\:data-\[state\=active\]\:bg-input\/30:is(.dark *)[data-state=active]{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:data-\[state\=active\]\:bg-input\/30:is(.dark *)[data-state=active]{background-color:color-mix(in oklab, var(--input) 30%, transparent)}}.dark\:data-\[state\=active\]\:text-foreground:is(.dark *)[data-state=active]{color:var(--foreground)}.dark\:group-data-\[variant\=line\]\/tabs-list\:data-\[state\=active\]\:border-transparent:is(.dark *):is(:where(.group\/tabs-list)[data-variant=line] *)[data-state=active]{border-color:#0000}.dark\:group-data-\[variant\=line\]\/tabs-list\:data-\[state\=active\]\:bg-transparent:is(.dark *):is(:where(.group\/tabs-list)[data-variant=line] *)[data-state=active]{background-color:#0000}.dark\:data-\[state\=checked\]\:bg-primary:is(.dark *)[data-state=checked]{background-color:var(--primary)}.dark\:data-\[state\=checked\]\:bg-primary-foreground:is(.dark *)[data-state=checked]{background-color:var(--primary-foreground)}.dark\:data-\[state\=unchecked\]\:bg-foreground:is(.dark *)[data-state=unchecked]{background-color:var(--foreground)}.dark\:data-\[state\=unchecked\]\:bg-input\/80:is(.dark *)[data-state=unchecked]{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:data-\[state\=unchecked\]\:bg-input\/80:is(.dark *)[data-state=unchecked]{background-color:color-mix(in oklab, var(--input) 80%, transparent)}}.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20:is(.dark *)[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20:is(.dark *)[data-variant=destructive]:focus{background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.\[\&_\.j-bool\]\:text-chart-4 .j-bool{color:var(--chart-4)}.\[\&_\.j-key\]\:text-chart-1 .j-key{color:var(--chart-1)}.\[\&_\.j-null\]\:text-muted-foreground .j-null{color:var(--muted-foreground)}.\[\&_\.j-num\]\:text-chart-3 .j-num{color:var(--chart-3)}.\[\&_\.j-str\]\:text-chart-2 .j-str{color:var(--chart-2)}.\[\&_\.recharts-cartesian-axis-tick_text\]\:fill-muted-foreground .recharts-cartesian-axis-tick text{fill:var(--muted-foreground)}.\[\&_\.recharts-cartesian-grid_line\[stroke\=\'\#ccc\'\]\]\:stroke-border\/50 .recharts-cartesian-grid line[stroke=\#ccc]{stroke:var(--border)}@supports (color:color-mix(in lab, red, red)){.\[\&_\.recharts-cartesian-grid_line\[stroke\=\'\#ccc\'\]\]\:stroke-border\/50 .recharts-cartesian-grid line[stroke=\#ccc]{stroke:color-mix(in oklab, var(--border) 50%, transparent)}}.\[\&_\.recharts-curve\.recharts-tooltip-cursor\]\:stroke-border .recharts-curve.recharts-tooltip-cursor{stroke:var(--border)}.\[\&_\.recharts-dot\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-dot[stroke=\#fff]{stroke:#0000}.\[\&_\.recharts-layer\]\:outline-hidden .recharts-layer{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.\[\&_\.recharts-layer\]\:outline-hidden .recharts-layer{outline-offset:2px;outline:2px solid #0000}}.\[\&_\.recharts-polar-grid_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-polar-grid [stroke=\#ccc]{stroke:var(--border)}.\[\&_\.recharts-radial-bar-background-sector\]\:fill-muted .recharts-radial-bar-background-sector,.\[\&_\.recharts-rectangle\.recharts-tooltip-cursor\]\:fill-muted .recharts-rectangle.recharts-tooltip-cursor{fill:var(--muted)}.\[\&_\.recharts-reference-line_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-reference-line [stroke=\#ccc]{stroke:var(--border)}.\[\&_\.recharts-sector\]\:outline-hidden .recharts-sector{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.\[\&_\.recharts-sector\]\:outline-hidden .recharts-sector{outline-offset:2px;outline:2px solid #0000}}.\[\&_\.recharts-sector\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-sector[stroke=\#fff]{stroke:#0000}.\[\&_\.recharts-surface\]\:outline-hidden .recharts-surface{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.\[\&_\.recharts-surface\]\:outline-hidden .recharts-surface{outline-offset:2px;outline:2px solid #0000}}.\[\&_\.wn-check\]\:inline-block .wn-check{display:inline-block}.\[\&_\.wn-check\]\:w-4 .wn-check{width:calc(var(--spacing) * 4)}.\[\&_\.wn-table-wrap\]\:my-2\.5 .wn-table-wrap{margin-block:calc(var(--spacing) * 2.5)}.\[\&_\.wn-table-wrap\]\:overflow-x-auto .wn-table-wrap{overflow-x:auto}.\[\&_\.wn-table-wrap\]\:rounded-md .wn-table-wrap{border-radius:var(--radius)}.\[\&_\.wn-table-wrap\]\:border .wn-table-wrap{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.wn-table-wrap\]\:border-border .wn-table-wrap{border-color:var(--border)}.\[\&_\.wn-task\]\:-ml-\[18px\] .wn-task{margin-left:-18px}.\[\&_\.wn-task\]\:list-none .wn-task{list-style-type:none}.\[\&_\.wn-task\.done_\.wn-check\]\:text-success .wn-task.done .wn-check{color:var(--success)}.\[\&_a\]\:text-brand a{color:var(--brand)}.\[\&_a\]\:underline a{text-decoration-line:underline}.\[\&_a\]\:underline-offset-2 a{text-underline-offset:2px}.\[\&_b\]\:font-medium b{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_b\]\:break-words b{overflow-wrap:break-word}.\[\&_b\]\:text-foreground b{color:var(--foreground)}.\[\&_blockquote\]\:my-2 blockquote{margin-block:calc(var(--spacing) * 2)}.\[\&_blockquote\]\:border-l-\[3px\] blockquote{border-left-style:var(--tw-border-style);border-left-width:3px}.\[\&_blockquote\]\:border-brand\/40 blockquote{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.\[\&_blockquote\]\:border-brand\/40 blockquote{border-color:color-mix(in oklab, var(--brand) 40%, transparent)}}.\[\&_blockquote\]\:px-3\.5 blockquote{padding-inline:calc(var(--spacing) * 3.5)}.\[\&_blockquote\]\:py-1\.5 blockquote{padding-block:calc(var(--spacing) * 1.5)}.\[\&_blockquote\]\:italic blockquote{font-style:italic}.\[\&_code\]\:rounded code{border-radius:.25rem}.\[\&_code\]\:border code{border-style:var(--tw-border-style);border-width:1px}.\[\&_code\]\:border-border code{border-color:var(--border)}.\[\&_code\]\:bg-muted code{background-color:var(--muted)}.\[\&_code\]\:px-1\.5 code{padding-inline:calc(var(--spacing) * 1.5)}.\[\&_code\]\:py-0\.5 code{padding-block:calc(var(--spacing) * .5)}.\[\&_code\]\:font-mono code{font-family:var(--font-mt)}.\[\&_code\]\:text-xs code{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_code\]\:text-brand code{color:var(--brand)}.\[\&_del\]\:text-muted-foreground del{color:var(--muted-foreground)}.\[\&_del\]\:opacity-60 del{opacity:.6}.\[\&_h2\]\:mt-\[18px\] h2{margin-top:18px}.\[\&_h2\]\:mb-1\.5 h2{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h2\]\:text-\[17px\] h2{font-size:17px}.\[\&_h2\]\:font-bold h2{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.\[\&_h2\]\:text-foreground h2{color:var(--foreground)}.\[\&_h3\]\:mt-\[18px\] h3{margin-top:18px}.\[\&_h3\]\:mb-1\.5 h3{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h3\]\:text-\[15px\] h3{font-size:15px}.\[\&_h3\]\:font-bold h3{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.\[\&_h3\]\:text-foreground h3{color:var(--foreground)}.\[\&_h4\]\:mt-\[18px\] h4{margin-top:18px}.\[\&_h4\]\:mb-1\.5 h4{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h4\]\:text-\[14px\] h4{font-size:14px}.\[\&_h4\]\:font-bold h4{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.\[\&_h4\]\:text-foreground h4{color:var(--foreground)}.\[\&_h5\]\:mt-\[18px\] h5{margin-top:18px}.\[\&_h5\]\:mb-1\.5 h5{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h5\]\:text-\[14px\] h5{font-size:14px}.\[\&_h5\]\:font-bold h5{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.\[\&_h5\]\:text-foreground h5{color:var(--foreground)}.\[\&_hr\]\:my-3\.5 hr{margin-block:calc(var(--spacing) * 3.5)}.\[\&_hr\]\:border-0 hr{border-style:var(--tw-border-style);border-width:0}.\[\&_hr\]\:border-t hr{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_hr\]\:border-border hr{border-color:var(--border)}.\[\&_i\]\:inline-block i{display:inline-block}.\[\&_i\]\:size-2\.5 i{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.\[\&_i\]\:rounded-\[3px\] i{border-radius:3px}.\[\&_img\]\:my-1\.5 img{margin-block:calc(var(--spacing) * 1.5)}.\[\&_img\]\:max-w-full img{max-width:100%}.\[\&_img\]\:rounded-md img{border-radius:var(--radius)}.\[\&_img\]\:border img{border-style:var(--tw-border-style);border-width:1px}.\[\&_img\]\:border-border img{border-color:var(--border)}.\[\&_li\]\:my-\[3px\] li{margin-block:3px}.\[\&_li\]\:marker\:text-brand li ::marker{color:var(--brand)}.\[\&_li\]\:marker\:text-brand li::marker{color:var(--brand)}.\[\&_li\]\:marker\:text-brand li ::-webkit-details-marker{color:var(--brand)}.\[\&_li\]\:marker\:text-brand li::-webkit-details-marker{color:var(--brand)}.\[\&_ol\]\:my-\[5px\] ol{margin-block:5px}.\[\&_ol\]\:list-decimal ol{list-style-type:decimal}.\[\&_ol\]\:pl-\[22px\] ol{padding-left:22px}.\[\&_p\]\:my-\[5px\] p{margin-block:5px}.\[\&_p\]\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_pre\]\:my-2 pre{margin-block:calc(var(--spacing) * 2)}.\[\&_pre\]\:overflow-x-auto pre{overflow-x:auto}.\[\&_pre\]\:rounded-md pre{border-radius:var(--radius)}.\[\&_pre\]\:border pre{border-style:var(--tw-border-style);border-width:1px}.\[\&_pre\]\:border-border pre{border-color:var(--border)}.\[\&_pre\]\:bg-background pre{background-color:var(--background)}.\[\&_pre\]\:p-3 pre{padding:calc(var(--spacing) * 3)}.\[\&_pre_code\]\:border-0 pre code{border-style:var(--tw-border-style);border-width:0}.\[\&_pre_code\]\:bg-transparent pre code{background-color:#0000}.\[\&_pre_code\]\:p-0 pre code{padding:0}.\[\&_pre_code\]\:text-muted-foreground pre code{color:var(--muted-foreground)}.\[\&_strong\]\:font-semibold strong{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_strong\]\:text-foreground strong{color:var(--foreground)}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3 svg:not([class*=size-]){width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\:not\(\[class\*\=\'text-\'\]\)\]\:text-muted-foreground svg:not([class*=text-]){color:var(--muted-foreground)}.\[\&_table\]\:w-full table{width:100%}.\[\&_table\]\:border-collapse table{border-collapse:collapse}.\[\&_table\]\:font-mono table{font-family:var(--font-mt)}.\[\&_table\]\:text-xs table{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_td\]\:border-b td{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_td\]\:border-border td{border-color:var(--border)}.\[\&_td\]\:px-3 td{padding-inline:calc(var(--spacing) * 3)}.\[\&_td\]\:py-\[7px\] td{padding-block:7px}.\[\&_td\]\:text-muted-foreground td{color:var(--muted-foreground)}.\[\&_th\]\:border-b th{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_th\]\:border-border th{border-color:var(--border)}.\[\&_th\]\:bg-muted th{background-color:var(--muted)}.\[\&_th\]\:px-3 th{padding-inline:calc(var(--spacing) * 3)}.\[\&_th\]\:py-\[7px\] th{padding-block:7px}.\[\&_th\]\:text-left th{text-align:left}.\[\&_th\]\:text-\[11px\] th{font-size:11px}.\[\&_th\]\:font-semibold th{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_th\]\:tracking-wide th{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.\[\&_th\]\:text-foreground th{color:var(--foreground)}.\[\&_th\]\:uppercase th{text-transform:uppercase}.\[\&_tr\]\:border-b tr{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-style:var(--tw-border-style);border-width:0}.\[\&_ul\]\:my-\[5px\] ul{margin-block:5px}.\[\&_ul\]\:list-disc ul{list-style-type:disc}.\[\&_ul\]\:pl-\[18px\] ul{padding-left:18px}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\.border-b\]\:pb-6.border-b{padding-bottom:calc(var(--spacing) * 6)}.\[\.border-t\]\:pt-6.border-t{padding-top:calc(var(--spacing) * 6)}:is(.\*\:\[span\]\:last\:flex>*):is(span):last-child{display:flex}:is(.\*\:\[span\]\:last\:items-center>*):is(span):last-child{align-items:center}:is(.\*\:\[span\]\:last\:gap-2>*):is(span):last-child{gap:calc(var(--spacing) * 2)}:is(.data-\[variant\=destructive\]\:\*\:\[svg\]\:text-destructive\![data-variant=destructive]>*):is(svg){color:var(--destructive)!important}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y:2px;translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&\>b\]\:text-foreground>b{color:var(--foreground)}.\[\&\>span\]\:inline-flex>span{display:inline-flex}.\[\&\>span\]\:items-center>span{align-items:center}.\[\&\>span\]\:gap-1\.5>span{gap:calc(var(--spacing) * 1.5)}.\[\&\>svg\]\:pointer-events-none>svg{pointer-events:none}.\[\&\>svg\]\:size-3>svg{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\[\&\>svg\]\:size-4>svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&\>svg\]\:h-2\.5>svg{height:calc(var(--spacing) * 2.5)}.\[\&\>svg\]\:h-3>svg{height:calc(var(--spacing) * 3)}.\[\&\>svg\]\:w-2\.5>svg{width:calc(var(--spacing) * 2.5)}.\[\&\>svg\]\:w-3>svg{width:calc(var(--spacing) * 3)}.\[\&\>svg\]\:translate-y-0\.5>svg{--tw-translate-y:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&\>svg\]\:text-current>svg{color:currentColor}.\[\&\>svg\]\:text-muted-foreground>svg{color:var(--muted-foreground)}.\[\&\>tr\]\:last\:border-b-0>tr:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){a.\[a\&\]\:hover\:bg-accent:hover{background-color:var(--accent)}a.\[a\&\]\:hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){a.\[a\&\]\:hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab, var(--destructive) 90%, transparent)}}a.\[a\&\]\:hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){a.\[a\&\]\:hover\:bg-primary\/90:hover{background-color:color-mix(in oklab, var(--primary) 90%, transparent)}}a.\[a\&\]\:hover\:bg-secondary\/90:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){a.\[a\&\]\:hover\:bg-secondary\/90:hover{background-color:color-mix(in oklab, var(--secondary) 90%, transparent)}}a.\[a\&\]\:hover\:text-accent-foreground:hover{color:var(--accent-foreground)}a.\[a\&\]\:hover\:underline:hover{text-decoration-line:underline}}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}.conn{display:block;overflow:visible}.conn-grid{fill:none;stroke:var(--border);stroke-opacity:.7;stroke-dasharray:2 7}.conn-sonar{fill:none;stroke:var(--brand);stroke-width:1.5px;opacity:0;animation:3.3s ease-out infinite conn-sonar}.conn-hub-glow{fill:var(--brand);opacity:.22;filter:blur(11px)}.conn-hub-ring{fill:none;stroke:var(--brand);stroke-width:1.4px;stroke-dasharray:4 9;opacity:.7;transform-box:fill-box;transform-origin:50%;animation:15s linear infinite conn-rot}.conn-node text{pointer-events:none}.conn-node-halo{fill:none;stroke-width:2px;transform-box:fill-box;transform-origin:50%;animation:2.4s ease-in-out infinite conn-halo}.conn-link{fill:none;stroke-width:1.6px;opacity:.38}.conn-flow{fill:none;stroke-width:2.4px;stroke-linecap:round;stroke-dasharray:2 13;opacity:.9;filter:drop-shadow(0 0 4px);animation:1.05s linear infinite conn-flow}.conn-packet{filter:drop-shadow(0 0 6px var(--chart-2))}.conn-chevron{fill:none;stroke-width:1.6px;stroke-linecap:round;stroke-linejoin:round;opacity:.6}.conn-tunnel-halo{fill:none;stroke-width:8px;stroke-linecap:round;opacity:.1}.conn-tunnel{fill:none;stroke-width:2.4px;stroke-linecap:round;stroke-dasharray:6 6;animation:.9s linear infinite conn-tunnel-flow}.conn-tunnel-lock{filter:drop-shadow(0 0 4px var(--warning))}@supports (color:color-mix(in lab, red, red)){.conn-tunnel-lock{filter:drop-shadow(0 0 4px color-mix(in srgb, var(--warning) 80%, transparent))}}.conn-tunnel-sat{stroke-width:1.5px;filter:drop-shadow(0 0 5px var(--warning))}@supports (color:color-mix(in lab, red, red)){.conn-tunnel-sat{filter:drop-shadow(0 0 5px color-mix(in srgb, var(--warning) 53%, transparent))}}.conn-tunnel-badge{fill:var(--warning)}@supports (color:color-mix(in lab, red, red)){.conn-tunnel-badge{fill:color-mix(in srgb, var(--warning) 16%, var(--background))}}.conn-tunnel-badge{stroke:var(--warning)}@supports (color:color-mix(in lab, red, red)){.conn-tunnel-badge{stroke:color-mix(in srgb, var(--warning) 60%, var(--border))}}.conn-tunnel-badge{stroke-width:1px}.conn-tunnel-badge-tx{fill:var(--warning);letter-spacing:.02em;font-weight:700}.jump-route__wire{background-image:linear-gradient(90deg, var(--border) 0 50%, transparent 50% 100%);background-size:8px 2px;border-radius:2px;flex:1;min-width:18px;height:2px;animation:.7s linear infinite jump-wire}.jump-route__wire--enc{background-image:linear-gradient(90deg, var(--warning) 0 55%, transparent 55% 100%);min-width:34px;height:3px;box-shadow:0 0 8px -1px var(--warning);background-size:10px 3px;position:relative}@supports (color:color-mix(in lab, red, red)){.jump-route__wire--enc{box-shadow:0 0 8px -1px color-mix(in srgb, var(--warning) 53%, transparent)}}.jump-route__lock{filter:drop-shadow(0 0 3px var(--warning));font-size:11px;animation:2.2s linear infinite jump-lock;position:absolute;top:50%}.topo-sweep{animation:8s linear infinite topo-sweep}.topo-ring{transform-box:fill-box;transform-origin:50%;animation:90s linear infinite reverse topo-ring}.topo-flow{animation:1.4s linear infinite topo-flow}.topo-pulse{transform-box:fill-box;transform-origin:50%;animation:2.6s ease-in-out infinite topo-pulse}.topo-halo{transform-box:fill-box;transform-origin:50%;animation:2.2s ease-out infinite topo-halo}@keyframes topo-sweep{to{transform:rotate(360deg)}}@keyframes topo-ring{to{transform:rotate(360deg)}}@keyframes topo-flow{to{stroke-dashoffset:-16px}}@keyframes topo-pulse{0%,to{opacity:.55;transform:scale(1)}50%{opacity:1;transform:scale(1.12)}}@keyframes topo-halo{0%{opacity:.5;transform:scale(1)}to{opacity:0;transform:scale(1.9)}}@keyframes conn-sonar{0%{r:30px;opacity:.5}to{r:150px;opacity:0}}@keyframes conn-flow{to{stroke-dashoffset:-60px}}@keyframes conn-rot{to{transform:rotate(360deg)}}@keyframes conn-halo{0%,to{opacity:.45;transform:scale(1)}50%{opacity:0;transform:scale(1.55)}}@keyframes conn-tunnel-flow{to{stroke-dashoffset:-24px}}@keyframes jump-wire{to{background-position:8px 0}}@keyframes jump-lock{0%{left:-4px;transform:translateY(-50%)scale(.9)}50%{transform:translateY(-50%)scale(1.1)}to{left:calc(100% - 8px);transform:translateY(-50%)scale(.9)}}@media (prefers-reduced-motion:reduce){.conn-sonar,.topo-sweep{display:none}.conn-flow,.conn-hub-ring,.conn-node-halo,.conn-tunnel,.jump-route__wire,.jump-route__lock,.topo-ring,.topo-flow,.topo-pulse,.topo-halo{animation:none}.conn-packet animateMotion,.conn-tunnel-lock animateMotion{display:none}}:root{--background:#fff;--foreground:#0a0a0a;--card:#fff;--card-foreground:#0a0a0a;--popover:#fff;--popover-foreground:#0a0a0a;--primary:#0a0a0a;--primary-foreground:#fafafa;--secondary:#f4f4f5;--secondary-foreground:#0a0a0a;--muted:#f4f4f5;--muted-foreground:#71717a;--accent:#f4f4f5;--accent-foreground:#0a0a0a;--destructive:#e5484d;--destructive-foreground:#fff;--success:#18794e;--warning:#ab6400;--border:#e4e4e7;--input:#e4e4e7;--radius:.5rem;--page-accent:var(--foreground);--page-accent-2:var(--muted-foreground);--brand:var(--page-accent);--brand-foreground:var(--background);--ring:var(--brand);--chart-1:#0068d6;--chart-2:#0f8a7e;--chart-3:#3d8f2f;--chart-4:#a35200;--chart-5:#7048c4;--entity-1:#0068d6;--entity-2:#087a52;--entity-3:#6d3fc4;--entity-4:#a35200;--entity-5:#c02a2a;--entity-6:#0f8a7e;--entity-7:#c0267a;--entity-8:#2563eb;--entity-9:#8a6a00;--entity-10:#b4530f}.dark{--background:#0a0a0a;--foreground:#ededed;--card:#111;--card-foreground:#ededed;--popover:#111;--popover-foreground:#ededed;--primary:#ededed;--primary-foreground:#0a0a0a;--secondary:#1a1a1a;--secondary-foreground:#ededed;--muted:#1a1a1a;--muted-foreground:#a1a1a1;--accent:#1a1a1a;--accent-foreground:#ededed;--destructive:#ff5c5c;--destructive-foreground:#fff;--success:#2dd4a7;--warning:#f5a623;--border:#2a2a2a;--input:#2a2a2a;--chart-1:#3291ff;--chart-2:#2dd4bf;--chart-3:#69d05a;--chart-4:#f5a623;--chart-5:#9d7bff;--entity-1:#3291ff;--entity-2:#34d399;--entity-3:#a78bfa;--entity-4:#f59e0b;--entity-5:#ef4444;--entity-6:#2dd4bf;--entity-7:#f472b6;--entity-8:#60a5fa;--entity-9:#facc15;--entity-10:#fb923c}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}
158
+ @import "https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap";@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:"";--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--font-sans:var(--font-mt);--font-mono:var(--font-mt);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-widest:.1em;--leading-tight:1.25;--leading-normal:1.5;--leading-relaxed:1.625;--radius-xs:.125rem;--radius-xl:.75rem;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-mt);--default-mono-font-family:var(--font-mt);--color-border:var(--border)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}:root{--font-mt:"JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){*{outline-color:color-mix(in oklab, var(--ring) 50%, transparent)}}body{background-color:var(--background);font-family:var(--font-mt);color:var(--foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}}@layer components{@media (prefers-reduced-motion:no-preference){.js-motion .reveal{opacity:0}}}@layer utilities{.\@container\/card-header{container:card-header/inline-size}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{inset-inline:0}.inset-y-0{inset-block:0}.-top-px{top:-1px}.top-0{top:0}.top-1\/2{top:50%}.top-3{top:calc(var(--spacing) * 3)}.top-4{top:calc(var(--spacing) * 4)}.top-\[50\%\]{top:50%}.right-0{right:0}.right-0\.5{right:calc(var(--spacing) * .5)}.right-1{right:var(--spacing)}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.-bottom-1\.5{bottom:calc(var(--spacing) * -1.5)}.bottom-0{bottom:0}.bottom-3{bottom:calc(var(--spacing) * 3)}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-2\.5{left:calc(var(--spacing) * 2.5)}.left-3{left:calc(var(--spacing) * 3)}.left-\[50\%\]{left:50%}.isolate{isolation:isolate}.z-0{z-index:0}.z-10{z-index:10}.z-30{z-index:30}.z-50{z-index:50}.z-\[1\]{z-index:1}.z-\[5\]{z-index:5}.col-span-full{grid-column:1/-1}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2/span 2}.row-start-1{grid-row-start:1}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.m-0{margin:0}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-auto{margin-inline:auto}.my-0\.5{margin-block:calc(var(--spacing) * .5)}.my-1{margin-block:var(--spacing)}.my-2\.5{margin-block:calc(var(--spacing) * 2.5)}.my-3{margin-block:calc(var(--spacing) * 3)}.-mt-1{margin-top:calc(var(--spacing) * -1)}.mt-0{margin-top:0}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-3\.5{margin-top:calc(var(--spacing) * 3.5)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-\[3px\]{margin-top:3px}.mt-\[7px\]{margin-top:7px}.mt-auto{margin-top:auto}.mt-px{margin-top:1px}.mr-1\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-0{margin-bottom:0}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-2\.5{margin-bottom:calc(var(--spacing) * 2.5)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-3\.5{margin-bottom:calc(var(--spacing) * 3.5)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-1{margin-left:var(--spacing)}.ml-auto{margin-left:auto}.box-border{box-sizing:border-box}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-row{display:table-row}.\[field-sizing\:fixed\]{field-sizing:fixed}.field-sizing-content{field-sizing:content}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.size-1\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-2\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-\[7px\]{width:7px;height:7px}.size-\[9px\]{width:9px;height:9px}.size-\[11px\]{width:11px;height:11px}.size-\[12px\]{width:12px;height:12px}.size-\[13px\]{width:13px;height:13px}.size-\[14px\]{width:14px;height:14px}.size-\[18px\]{width:18px;height:18px}.size-\[72px\]{width:72px;height:72px}.size-full{width:100%;height:100%}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-40{height:calc(var(--spacing) * 40)}.h-\[18px\]{height:18px}.h-\[46px\]{height:46px}.h-\[150px\]{height:150px}.h-\[200px\]{height:200px}.h-\[360px\]{height:360px}.h-\[400px\]{height:400px}.h-\[calc\(100\%-1px\)\]{height:calc(100% - 1px)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-\(--radix-dropdown-menu-content-available-height\){max-height:var(--radix-dropdown-menu-content-available-height)}.max-h-\(--radix-select-content-available-height\){max-height:var(--radix-select-content-available-height)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-\[40vh\]{max-height:40vh}.max-h-\[60vh\]{max-height:60vh}.max-h-\[184px\]{max-height:184px}.max-h-\[250px\]{max-height:250px}.max-h-\[280px\]{max-height:280px}.max-h-\[320px\]{max-height:320px}.max-h-\[360px\]{max-height:360px}.max-h-\[420px\]{max-height:420px}.max-h-\[440px\]{max-height:440px}.max-h-\[500px\]{max-height:500px}.max-h-\[calc\(100vh-80px\)\]{max-height:calc(100vh - 80px)}.min-h-0{min-height:0}.min-h-4{min-height:calc(var(--spacing) * 4)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-40{min-height:calc(var(--spacing) * 40)}.min-h-\[120px\]{min-height:120px}.min-h-screen{min-height:100vh}.w-0{width:0}.w-1{width:var(--spacing)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\/4{width:75%}.w-7{width:calc(var(--spacing) * 7)}.w-11{width:calc(var(--spacing) * 11)}.w-20{width:calc(var(--spacing) * 20)}.w-40{width:calc(var(--spacing) * 40)}.w-\[90px\]{width:90px}.w-\[120px\]{width:120px}.w-\[130px\]{width:130px}.w-\[150px\]{width:150px}.w-\[170px\]{width:170px}.w-\[200px\]{width:200px}.w-\[220px\]{width:220px}.w-\[380px\]{width:380px}.w-\[min\(48vw\,380px\)\]{width:min(48vw,380px)}.w-\[min\(360px\,60vw\)\]{width:min(360px,60vw)}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\[24rem\]{max-width:24rem}.max-w-\[120px\]{max-width:120px}.max-w-\[160px\]{max-width:160px}.max-w-\[180px\]{max-width:180px}.max-w-\[190px\]{max-width:190px}.max-w-\[200px\]{max-width:200px}.max-w-\[260px\]{max-width:260px}.max-w-\[300px\]{max-width:300px}.max-w-\[320px\]{max-width:320px}.max-w-\[460px\]{max-width:460px}.max-w-\[520px\]{max-width:520px}.max-w-\[calc\(100\%-2rem\)\]{max-width:calc(100% - 2rem)}.max-w-\[min\(60vw\,520px\)\]{max-width:min(60vw,520px)}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:0}.min-w-\[8rem\]{min-width:8rem}.min-w-\[38px\]{min-width:38px}.min-w-\[48px\]{min-width:48px}.min-w-\[60px\]{min-width:60px}.min-w-\[100px\]{min-width:100px}.min-w-\[150px\]{min-width:150px}.min-w-\[180px\]{min-width:180px}.min-w-\[200px\]{min-width:200px}.min-w-\[980px\]{min-width:980px}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.flex-none{flex:none}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.table-fixed{table-layout:fixed}.caption-bottom{caption-side:bottom}.origin-\(--radix-dropdown-menu-content-transform-origin\){transform-origin:var(--radix-dropdown-menu-content-transform-origin)}.origin-\(--radix-select-content-transform-origin\){transform-origin:var(--radix-select-content-transform-origin)}.origin-\(--radix-tooltip-content-transform-origin\){transform-origin:var(--radix-tooltip-content-transform-origin)}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[calc\(-50\%_-_2px\)\]{--tw-translate-y:calc(-50% - 2px);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[calc\(-100\%-9px\)\]{--tw-translate-y:calc(-100% - 9px);translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-45{rotate:45deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-in{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize-y{resize:vertical}.scroll-my-1{scroll-margin-block:var(--spacing)}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.auto-rows-min{grid-auto-rows:min-content}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\[0_1fr\]{grid-template-columns:0 1fr}.grid-cols-\[24px_minmax\(0\,1fr\)_auto\]{grid-template-columns:24px minmax(0,1fr) auto}.grid-cols-\[52px_1fr_34px\]{grid-template-columns:52px 1fr 34px}.grid-cols-\[90px_64px_48px_1fr\]{grid-template-columns:90px 64px 48px 1fr}.grid-cols-\[220px_1fr\]{grid-template-columns:220px 1fr}.grid-cols-\[240px_1fr\]{grid-template-columns:240px 1fr}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-cols-\[minmax\(0\,7rem\)_1fr_auto\]{grid-template-columns:minmax(0,7rem) 1fr auto}.grid-cols-\[minmax\(120px\,0\.4fr\)_1fr\]{grid-template-columns:minmax(120px,.4fr) 1fr}.grid-cols-\[repeat\(auto-fill\,minmax\(20rem\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(20rem,1fr))}.grid-cols-\[repeat\(auto-fill\,minmax\(22rem\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(22rem,1fr))}.grid-cols-\[repeat\(auto-fill\,minmax\(200px\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}.grid-cols-\[repeat\(auto-fill\,minmax\(220px\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}.grid-cols-\[repeat\(auto-fill\,minmax\(240px\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}.grid-cols-\[repeat\(auto-fill\,minmax\(min\(100\%\,360px\)\,1fr\)\)\]{grid-template-columns:repeat(auto-fill,minmax(min(100%,360px),1fr))}.grid-cols-\[repeat\(auto-fit\,minmax\(9rem\,1fr\)\)\]{grid-template-columns:repeat(auto-fit,minmax(9rem,1fr))}.grid-rows-\[auto_auto\]{grid-template-rows:auto auto}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.place-content-center{place-content:center}.place-items-center{place-items:center}.content-start{align-content:flex-start}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-around{justify-content:space-around}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.justify-items-center{justify-items:center}.justify-items-start{justify-items:start}.gap-0{gap:0}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-3\.5{gap:calc(var(--spacing) * 3.5)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-\[3px\]{gap:3px}.gap-\[5px\]{gap:5px}.gap-\[7px\]{gap:7px}.gap-\[9px\]{gap:9px}.gap-\[18px\]{gap:18px}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-3\.5{column-gap:calc(var(--spacing) * 3.5)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-y-0\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-1{row-gap:var(--spacing)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}.gap-y-2\.5{row-gap:calc(var(--spacing) * 2.5)}.gap-y-3{row-gap:calc(var(--spacing) * 3)}.gap-y-\[3px\]{row-gap:3px}.self-start{align-self:flex-start}.justify-self-center{justify-self:center}.justify-self-end{justify-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\[2px\]{border-radius:2px}.rounded-\[3px\]{border-radius:3px}.rounded-\[4px\]{border-radius:4px}.rounded-\[6px\]{border-radius:6px}.rounded-\[7px\]{border-radius:7px}.rounded-\[10px\]{border-radius:10px}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:calc(var(--radius) + 2px)}.rounded-md{border-radius:var(--radius)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-xs{border-radius:var(--radius-xs)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-\[1\.5px\]{border-style:var(--tw-border-style);border-width:1.5px}.border-\[2\.5px\]{border-style:var(--tw-border-style);border-width:2.5px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-\[3px\]{border-left-style:var(--tw-border-style);border-left-width:3px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\(--color-border\){border-color:var(--color-border)}.border-border,.border-border\/50{border-color:var(--border)}@supports (color:color-mix(in lab, red, red)){.border-border\/50{border-color:color-mix(in oklab, var(--border) 50%, transparent)}}.border-border\/60{border-color:var(--border)}@supports (color:color-mix(in lab, red, red)){.border-border\/60{border-color:color-mix(in oklab, var(--border) 60%, transparent)}}.border-brand,.border-brand\/30{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.border-brand\/30{border-color:color-mix(in oklab, var(--brand) 30%, transparent)}}.border-brand\/40{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.border-brand\/40{border-color:color-mix(in oklab, var(--brand) 40%, transparent)}}.border-brand\/50{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.border-brand\/50{border-color:color-mix(in oklab, var(--brand) 50%, transparent)}}.border-brand\/55{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.border-brand\/55{border-color:color-mix(in oklab, var(--brand) 55%, transparent)}}.border-chart-1\/40{border-color:var(--chart-1)}@supports (color:color-mix(in lab, red, red)){.border-chart-1\/40{border-color:color-mix(in oklab, var(--chart-1) 40%, transparent)}}.border-chart-1\/45{border-color:var(--chart-1)}@supports (color:color-mix(in lab, red, red)){.border-chart-1\/45{border-color:color-mix(in oklab, var(--chart-1) 45%, transparent)}}.border-chart-1\/50{border-color:var(--chart-1)}@supports (color:color-mix(in lab, red, red)){.border-chart-1\/50{border-color:color-mix(in oklab, var(--chart-1) 50%, transparent)}}.border-chart-2\/40{border-color:var(--chart-2)}@supports (color:color-mix(in lab, red, red)){.border-chart-2\/40{border-color:color-mix(in oklab, var(--chart-2) 40%, transparent)}}.border-chart-2\/45{border-color:var(--chart-2)}@supports (color:color-mix(in lab, red, red)){.border-chart-2\/45{border-color:color-mix(in oklab, var(--chart-2) 45%, transparent)}}.border-chart-3\/35{border-color:var(--chart-3)}@supports (color:color-mix(in lab, red, red)){.border-chart-3\/35{border-color:color-mix(in oklab, var(--chart-3) 35%, transparent)}}.border-chart-3\/40{border-color:var(--chart-3)}@supports (color:color-mix(in lab, red, red)){.border-chart-3\/40{border-color:color-mix(in oklab, var(--chart-3) 40%, transparent)}}.border-chart-4\/40{border-color:var(--chart-4)}@supports (color:color-mix(in lab, red, red)){.border-chart-4\/40{border-color:color-mix(in oklab, var(--chart-4) 40%, transparent)}}.border-destructive\/40{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.border-destructive\/40{border-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.border-destructive\/45{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.border-destructive\/45{border-color:color-mix(in oklab, var(--destructive) 45%, transparent)}}.border-destructive\/50{border-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.border-destructive\/50{border-color:color-mix(in oklab, var(--destructive) 50%, transparent)}}.border-input{border-color:var(--input)}.border-success\/35{border-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.border-success\/35{border-color:color-mix(in oklab, var(--success) 35%, transparent)}}.border-success\/40{border-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.border-success\/40{border-color:color-mix(in oklab, var(--success) 40%, transparent)}}.border-success\/45{border-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.border-success\/45{border-color:color-mix(in oklab, var(--success) 45%, transparent)}}.border-transparent{border-color:#0000}.border-warning\/30{border-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.border-warning\/30{border-color:color-mix(in oklab, var(--warning) 30%, transparent)}}.border-warning\/40{border-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.border-warning\/40{border-color:color-mix(in oklab, var(--warning) 40%, transparent)}}.border-warning\/45{border-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.border-warning\/45{border-color:color-mix(in oklab, var(--warning) 45%, transparent)}}.border-warning\/60{border-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.border-warning\/60{border-color:color-mix(in oklab, var(--warning) 60%, transparent)}}.border-t-transparent{border-top-color:#0000}.border-l-border{border-left-color:var(--border)}.border-l-destructive{border-left-color:var(--destructive)}.border-l-success{border-left-color:var(--success)}.border-l-transparent{border-left-color:#0000}.border-l-warning{border-left-color:var(--warning)}.bg-\(--color-bg\){background-color:var(--color-bg)}.bg-accent{background-color:var(--accent)}.bg-background{background-color:var(--background)}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab, red, red)){.bg-black\/50{background-color:color-mix(in oklab, var(--color-black) 50%, transparent)}}.bg-border{background-color:var(--border)}.bg-brand,.bg-brand\/10{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.bg-brand\/10{background-color:color-mix(in oklab, var(--brand) 10%, transparent)}}.bg-brand\/15{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.bg-brand\/15{background-color:color-mix(in oklab, var(--brand) 15%, transparent)}}.bg-brand\/20{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.bg-brand\/20{background-color:color-mix(in oklab, var(--brand) 20%, transparent)}}.bg-brand\/40{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.bg-brand\/40{background-color:color-mix(in oklab, var(--brand) 40%, transparent)}}.bg-brand\/\[0\.13\]{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.bg-brand\/\[0\.13\]{background-color:color-mix(in oklab, var(--brand) 13%, transparent)}}.bg-card{background-color:var(--card)}.bg-chart-1\/10{background-color:var(--chart-1)}@supports (color:color-mix(in lab, red, red)){.bg-chart-1\/10{background-color:color-mix(in oklab, var(--chart-1) 10%, transparent)}}.bg-chart-2,.bg-chart-2\/10{background-color:var(--chart-2)}@supports (color:color-mix(in lab, red, red)){.bg-chart-2\/10{background-color:color-mix(in oklab, var(--chart-2) 10%, transparent)}}.bg-destructive,.bg-destructive\/8{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/8{background-color:color-mix(in oklab, var(--destructive) 8%, transparent)}}.bg-destructive\/10{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/10{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.bg-foreground{background-color:var(--foreground)}.bg-muted{background-color:var(--muted)}.bg-muted-foreground,.bg-muted-foreground\/60{background-color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.bg-muted-foreground\/60{background-color:color-mix(in oklab, var(--muted-foreground) 60%, transparent)}}.bg-muted\/40{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/40{background-color:color-mix(in oklab, var(--muted) 40%, transparent)}}.bg-muted\/45{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/45{background-color:color-mix(in oklab, var(--muted) 45%, transparent)}}.bg-muted\/50{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/50{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-secondary{background-color:var(--secondary)}.bg-success,.bg-success\/10{background-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.bg-success\/10{background-color:color-mix(in oklab, var(--success) 10%, transparent)}}.bg-transparent{background-color:#0000}.bg-warning,.bg-warning\/8{background-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\/8{background-color:color-mix(in oklab, var(--warning) 8%, transparent)}}.bg-warning\/10{background-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.bg-warning\/10{background-color:color-mix(in oklab, var(--warning) 10%, transparent)}}.fill-background{fill:var(--background)}.fill-brand\/15{fill:var(--brand)}@supports (color:color-mix(in lab, red, red)){.fill-brand\/15{fill:color-mix(in oklab, var(--brand) 15%, transparent)}}.fill-brand\/25{fill:var(--brand)}@supports (color:color-mix(in lab, red, red)){.fill-brand\/25{fill:color-mix(in oklab, var(--brand) 25%, transparent)}}.fill-card{fill:var(--card)}.fill-chart-3\/20{fill:var(--chart-3)}@supports (color:color-mix(in lab, red, red)){.fill-chart-3\/20{fill:color-mix(in oklab, var(--chart-3) 20%, transparent)}}.fill-chart-4\/15{fill:var(--chart-4)}@supports (color:color-mix(in lab, red, red)){.fill-chart-4\/15{fill:color-mix(in oklab, var(--chart-4) 15%, transparent)}}.fill-current{fill:currentColor}.fill-foreground{fill:var(--foreground)}.fill-muted{fill:var(--muted)}.fill-muted-foreground{fill:var(--muted-foreground)}.fill-none{fill:none}.fill-success\/20{fill:var(--success)}@supports (color:color-mix(in lab, red, red)){.fill-success\/20{fill:color-mix(in oklab, var(--success) 20%, transparent)}}.fill-warning\/15{fill:var(--warning)}@supports (color:color-mix(in lab, red, red)){.fill-warning\/15{fill:color-mix(in oklab, var(--warning) 15%, transparent)}}.stroke-background{stroke:var(--background)}.stroke-border,.stroke-border\/40{stroke:var(--border)}@supports (color:color-mix(in lab, red, red)){.stroke-border\/40{stroke:color-mix(in oklab, var(--border) 40%, transparent)}}.stroke-border\/60{stroke:var(--border)}@supports (color:color-mix(in lab, red, red)){.stroke-border\/60{stroke:color-mix(in oklab, var(--border) 60%, transparent)}}.stroke-border\/70{stroke:var(--border)}@supports (color:color-mix(in lab, red, red)){.stroke-border\/70{stroke:color-mix(in oklab, var(--border) 70%, transparent)}}.stroke-brand,.stroke-brand\/55{stroke:var(--brand)}@supports (color:color-mix(in lab, red, red)){.stroke-brand\/55{stroke:color-mix(in oklab, var(--brand) 55%, transparent)}}.stroke-chart-2\/70{stroke:var(--chart-2)}@supports (color:color-mix(in lab, red, red)){.stroke-chart-2\/70{stroke:color-mix(in oklab, var(--chart-2) 70%, transparent)}}.stroke-chart-3{stroke:var(--chart-3)}.stroke-chart-4{stroke:var(--chart-4)}.stroke-foreground{stroke:var(--foreground)}.stroke-none{stroke:none}.stroke-success{stroke:var(--success)}.stroke-warning{stroke:var(--warning)}.stroke-1{stroke-width:1px}.stroke-2{stroke-width:2px}.stroke-\[1\.5px\]{stroke-width:1.5px}.p-0{padding:0}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-3\.5{padding:calc(var(--spacing) * 3.5)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-\[3px\]{padding:3px}.p-px{padding:1px}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-\[5px\]{padding-inline:5px}.px-\[7px\]{padding-inline:7px}.px-\[11px\]{padding-inline:11px}.px-\[13px\]{padding-inline:13px}.px-\[15px\]{padding-inline:15px}.py-0{padding-block:0}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-14{padding-block:calc(var(--spacing) * 14)}.py-\[3px\]{padding-block:3px}.py-\[5px\]{padding-block:5px}.py-\[7px\]{padding-block:7px}.py-\[9px\]{padding-block:9px}.py-\[11px\]{padding-block:11px}.py-\[54px\]{padding-block:54px}.py-px{padding-block:1px}.pt-1{padding-top:var(--spacing)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-3\.5{padding-top:calc(var(--spacing) * 3.5)}.pt-10{padding-top:calc(var(--spacing) * 10)}.pt-px{padding-top:1px}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-1{padding-bottom:var(--spacing)}.pb-1\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pl-1\.5{padding-left:calc(var(--spacing) * 1.5)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-\[18px\]{padding-left:18px}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mt)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-\[11px\]\/\[1\.5\]{font-size:11px;line-height:1.5}.text-\[11px\]\/\[1\.6\]{font-size:11px;line-height:1.6}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[7px\]{font-size:7px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-\[10\.5px\]{font-size:10.5px}.text-\[10px\]{font-size:10px}.text-\[11\.5px\]{font-size:11.5px}.text-\[11px\]{font-size:11px}.text-\[12\.5px\]{font-size:12.5px}.text-\[13px\]{font-size:13px}.text-\[15px\]{font-size:15px}.text-\[44px\]{font-size:44px}.leading-\[1\.4\]{--tw-leading:1.4;line-height:1.4}.leading-\[1\.5\]{--tw-leading:1.5;line-height:1.5}.leading-\[1\.6\]{--tw-leading:1.6;line-height:1.6}.leading-\[1\.7\]{--tw-leading:1.7;line-height:1.7}.leading-\[1\.35\]{--tw-leading:1.35;line-height:1.35}.leading-\[8px\]{--tw-leading:8px;line-height:8px}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[0\.2em\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-\[0\.04em\]{--tw-tracking:.04em;letter-spacing:.04em}.tracking-\[0\.05em\]{--tw-tracking:.05em;letter-spacing:.05em}.tracking-\[0\.06em\]{--tw-tracking:.06em;letter-spacing:.06em}.tracking-\[0\.08em\]{--tw-tracking:.08em;letter-spacing:.08em}.tracking-\[0\.09em\]{--tw-tracking:.09em;letter-spacing:.09em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-balance{text-wrap:balance}.\[overflow-wrap\:anywhere\]{overflow-wrap:anywhere}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.\[tab-size\:2\]{tab-size:2}.text-accent-foreground{color:var(--accent-foreground)}.text-background{color:var(--background)}.text-brand{color:var(--brand)}.text-brand-foreground{color:var(--brand-foreground)}.text-card-foreground{color:var(--card-foreground)}.text-chart-1{color:var(--chart-1)}.text-chart-2{color:var(--chart-2)}.text-chart-3{color:var(--chart-3)}.text-chart-4{color:var(--chart-4)}.text-chart-5{color:var(--chart-5)}.text-current{color:currentColor}.text-destructive{color:var(--destructive)}.text-foreground,.text-foreground\/60{color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.text-foreground\/60{color:color-mix(in oklab, var(--foreground) 60%, transparent)}}.text-muted-foreground,.text-muted-foreground\/50{color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.text-muted-foreground\/50{color:color-mix(in oklab, var(--muted-foreground) 50%, transparent)}}.text-muted-foreground\/80{color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.text-muted-foreground\/80{color:color-mix(in oklab, var(--muted-foreground) 80%, transparent)}}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-foreground{color:var(--primary-foreground)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-success{color:var(--success)}.text-transparent{color:#0000}.text-warning{color:var(--warning)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.underline-offset-4{text-underline-offset:4px}.caret-brand{caret-color:var(--brand)}.accent-brand{accent-color:var(--brand)}.opacity-15{opacity:.15}.opacity-45{opacity:.45}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-65{opacity:.65}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-4{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-brand\/25{--tw-ring-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.ring-brand\/25{--tw-ring-color:color-mix(in oklab, var(--brand) 25%, transparent)}}.ring-offset-background{--tw-ring-offset-color:var(--background)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.grayscale-\[0\.4\]{--tw-grayscale:grayscale(.4);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[color\,box-shadow\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[transform\,border-color\]{transition-property:transform,border-color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-none{transition-property:none}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-\[400ms\]{--tw-duration:.4s;transition-duration:.4s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.fade-in-0{--tw-enter-opacity:0}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.zoom-in-50{--tw-enter-scale:.5}.zoom-in-95{--tw-enter-scale:.95}.\[text-shadow\:0_0_3px_rgba\(0\,0\,0\,0\.6\)\]{text-shadow:0 0 3px #0009}.\[transition\:stroke_0\.1s_ease\]{transition:stroke .1s}.\[vector-effect\:non-scaling-stroke\]{vector-effect:non-scaling-stroke}.running{animation-play-state:running}.group-data-\[disabled\=true\]\:pointer-events-none:is(:where(.group)[data-disabled=true] *){pointer-events:none}.group-data-\[disabled\=true\]\:opacity-50:is(:where(.group)[data-disabled=true] *){opacity:.5}.group-data-\[orientation\=horizontal\]\/tabs\:h-9:is(:where(.group\/tabs)[data-orientation=horizontal] *){height:calc(var(--spacing) * 9)}.group-data-\[orientation\=vertical\]\/tabs\:h-fit:is(:where(.group\/tabs)[data-orientation=vertical] *){height:fit-content}.group-data-\[orientation\=vertical\]\/tabs\:w-full:is(:where(.group\/tabs)[data-orientation=vertical] *){width:100%}.group-data-\[orientation\=vertical\]\/tabs\:flex-col:is(:where(.group\/tabs)[data-orientation=vertical] *){flex-direction:column}.group-data-\[orientation\=vertical\]\/tabs\:justify-start:is(:where(.group\/tabs)[data-orientation=vertical] *){justify-content:flex-start}.group-data-\[size\=default\]\/switch\:size-4:is(:where(.group\/switch)[data-size=default] *){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.group-data-\[size\=sm\]\/switch\:size-3:is(:where(.group\/switch)[data-size=sm] *){width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.group-data-\[variant\=line\]\/tabs-list\:bg-transparent:is(:where(.group\/tabs-list)[data-variant=line] *){background-color:#0000}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.selection\:bg-brand\/35 ::selection{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.selection\:bg-brand\/35 ::selection{background-color:color-mix(in oklab, var(--brand) 35%, transparent)}}.selection\:bg-brand\/35::selection{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.selection\:bg-brand\/35::selection{background-color:color-mix(in oklab, var(--brand) 35%, transparent)}}.selection\:bg-primary ::selection{background-color:var(--primary)}.selection\:bg-primary::selection{background-color:var(--primary)}.selection\:text-primary-foreground ::selection{color:var(--primary-foreground)}.selection\:text-primary-foreground::selection{color:var(--primary-foreground)}.file\:inline-flex::file-selector-button{display:inline-flex}.file\:h-7::file-selector-button{height:calc(var(--spacing) * 7)}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:top-\[25px\]:before{content:var(--tw-content);top:25px}.before\:bottom-0:before{content:var(--tw-content);bottom:0}.before\:left-\[22px\]:before{content:var(--tw-content);left:22px}.before\:w-px:before{content:var(--tw-content);width:1px}.before\:bg-border:before{content:var(--tw-content);background-color:var(--border)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:bg-foreground:after{content:var(--tw-content);background-color:var(--foreground)}.after\:opacity-0:after{content:var(--tw-content);opacity:0}.after\:transition-opacity:after{content:var(--tw-content);transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.group-data-\[orientation\=horizontal\]\/tabs\:after\:inset-x-0:is(:where(.group\/tabs)[data-orientation=horizontal] *):after{content:var(--tw-content);inset-inline:0}.group-data-\[orientation\=horizontal\]\/tabs\:after\:bottom-\[-5px\]:is(:where(.group\/tabs)[data-orientation=horizontal] *):after{content:var(--tw-content);bottom:-5px}.group-data-\[orientation\=horizontal\]\/tabs\:after\:h-0\.5:is(:where(.group\/tabs)[data-orientation=horizontal] *):after{content:var(--tw-content);height:calc(var(--spacing) * .5)}.group-data-\[orientation\=vertical\]\/tabs\:after\:inset-y-0:is(:where(.group\/tabs)[data-orientation=vertical] *):after{content:var(--tw-content);inset-block:0}.group-data-\[orientation\=vertical\]\/tabs\:after\:-right-1:is(:where(.group\/tabs)[data-orientation=vertical] *):after{content:var(--tw-content);right:calc(var(--spacing) * -1)}.group-data-\[orientation\=vertical\]\/tabs\:after\:w-0\.5:is(:where(.group\/tabs)[data-orientation=vertical] *):after{content:var(--tw-content);width:calc(var(--spacing) * .5)}.last\:before\:hidden:last-child:before{content:var(--tw-content);display:none}.odd\:bg-card\/40:nth-child(odd){background-color:var(--card)}@supports (color:color-mix(in lab, red, red)){.odd\:bg-card\/40:nth-child(odd){background-color:color-mix(in oklab, var(--card) 40%, transparent)}}@media (hover:hover){.hover\:-translate-y-0\.5:hover{--tw-translate-y:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:border-brand\/35:hover{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.hover\:border-brand\/35:hover{border-color:color-mix(in oklab, var(--brand) 35%, transparent)}}.hover\:border-brand\/40:hover{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.hover\:border-brand\/40:hover{border-color:color-mix(in oklab, var(--brand) 40%, transparent)}}.hover\:border-chart-2\/35:hover{border-color:var(--chart-2)}@supports (color:color-mix(in lab, red, red)){.hover\:border-chart-2\/35:hover{border-color:color-mix(in oklab, var(--chart-2) 35%, transparent)}}.hover\:border-muted-foreground\/40:hover{border-color:var(--muted-foreground)}@supports (color:color-mix(in lab, red, red)){.hover\:border-muted-foreground\/40:hover{border-color:color-mix(in oklab, var(--muted-foreground) 40%, transparent)}}.hover\:bg-accent:hover,.hover\:bg-accent\/50:hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-accent\/50:hover{background-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.hover\:bg-brand\/10:hover{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-brand\/10:hover{background-color:color-mix(in oklab, var(--brand) 10%, transparent)}}.hover\:bg-brand\/90:hover{background-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-brand\/90:hover{background-color:color-mix(in oklab, var(--brand) 90%, transparent)}}.hover\:bg-destructive\/10:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-destructive\/10:hover{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab, var(--destructive) 90%, transparent)}}.hover\:bg-foreground\/5:hover{background-color:var(--foreground)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-foreground\/5:hover{background-color:color-mix(in oklab, var(--foreground) 5%, transparent)}}.hover\:bg-muted\/50:hover{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-muted\/50:hover{background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab, var(--primary) 90%, transparent)}}.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab, var(--secondary) 80%, transparent)}}.hover\:bg-success\/10:hover{background-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-success\/10:hover{background-color:color-mix(in oklab, var(--success) 10%, transparent)}}.hover\:bg-success\/90:hover{background-color:var(--success)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-success\/90:hover{background-color:color-mix(in oklab, var(--success) 90%, transparent)}}.hover\:bg-warning\/10:hover{background-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-warning\/10:hover{background-color:color-mix(in oklab, var(--warning) 10%, transparent)}}.hover\:bg-warning\/90:hover{background-color:var(--warning)}@supports (color:color-mix(in lab, red, red)){.hover\:bg-warning\/90:hover{background-color:color-mix(in oklab, var(--warning) 90%, transparent)}}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}}.focus\:bg-accent:focus{background-color:var(--accent)}.focus\:text-accent-foreground:focus{color:var(--accent-foreground)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus-visible\:border-0:focus-visible{border-style:var(--tw-border-style);border-width:0}.focus-visible\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\:ring-0:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-\[3px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.focus-visible\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-ring:focus-visible{outline-color:var(--ring)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.has-aria-expanded\:bg-muted\/50:has([aria-expanded=true]){background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.has-aria-expanded\:bg-muted\/50:has([aria-expanded=true]){background-color:color-mix(in oklab, var(--muted) 50%, transparent)}}.has-data-\[slot\=card-action\]\:grid-cols-\[1fr_auto\]:has([data-slot=card-action]){grid-template-columns:1fr auto}.has-\[\>svg\]\:grid-cols-\[calc\(var\(--spacing\)\*4\)_1fr\]:has(>svg){grid-template-columns:calc(var(--spacing) * 4) 1fr}.has-\[\>svg\]\:gap-x-3:has(>svg){column-gap:calc(var(--spacing) * 3)}.has-\[\>svg\]\:px-1\.5:has(>svg){padding-inline:calc(var(--spacing) * 1.5)}.has-\[\>svg\]\:px-2\.5:has(>svg){padding-inline:calc(var(--spacing) * 2.5)}.has-\[\>svg\]\:px-3:has(>svg){padding-inline:calc(var(--spacing) * 3)}.has-\[\>svg\]\:px-4:has(>svg){padding-inline:calc(var(--spacing) * 4)}.aria-invalid\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[inset\]\:pl-8[data-inset]{padding-left:calc(var(--spacing) * 8)}.data-\[orientation\=horizontal\]\:h-px[data-orientation=horizontal]{height:1px}.data-\[orientation\=horizontal\]\:w-full[data-orientation=horizontal]{width:100%}.data-\[orientation\=horizontal\]\:flex-col[data-orientation=horizontal]{flex-direction:column}.data-\[orientation\=vertical\]\:h-full[data-orientation=vertical]{height:100%}.data-\[orientation\=vertical\]\:w-px[data-orientation=vertical]{width:1px}.data-\[placeholder\]\:text-muted-foreground[data-placeholder]{color:var(--muted-foreground)}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:calc(2*var(--spacing)*-1)}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:calc(2*var(--spacing))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:var(--spacing);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:calc(2*var(--spacing)*-1)}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:calc(2*var(--spacing))}.data-\[size\=default\]\:h-9[data-size=default]{height:calc(var(--spacing) * 9)}.data-\[size\=default\]\:h-\[1\.15rem\][data-size=default]{height:1.15rem}.data-\[size\=default\]\:w-8[data-size=default]{width:calc(var(--spacing) * 8)}.data-\[size\=sm\]\:h-3\.5[data-size=sm]{height:calc(var(--spacing) * 3.5)}.data-\[size\=sm\]\:h-8[data-size=sm]{height:calc(var(--spacing) * 8)}.data-\[size\=sm\]\:w-6[data-size=sm]{width:calc(var(--spacing) * 6)}:is(.\*\:data-\[slot\=alert-description\]\:text-destructive\/90>*)[data-slot=alert-description]{color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){:is(.\*\:data-\[slot\=alert-description\]\:text-destructive\/90>*)[data-slot=alert-description]{color:color-mix(in oklab, var(--destructive) 90%, transparent)}}:is(.\*\:data-\[slot\=select-value\]\:line-clamp-1>*)[data-slot=select-value]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:is(.\*\:data-\[slot\=select-value\]\:flex>*)[data-slot=select-value]{display:flex}:is(.\*\:data-\[slot\=select-value\]\:items-center>*)[data-slot=select-value]{align-items:center}:is(.\*\:data-\[slot\=select-value\]\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing) * 2)}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:var(--background)}.data-\[state\=active\]\:text-foreground[data-state=active]{color:var(--foreground)}.group-data-\[variant\=default\]\/tabs-list\:data-\[state\=active\]\:shadow-sm:is(:where(.group\/tabs-list)[data-variant=default] *)[data-state=active]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.group-data-\[variant\=line\]\/tabs-list\:data-\[state\=active\]\:bg-transparent:is(:where(.group\/tabs-list)[data-variant=line] *)[data-state=active]{background-color:#0000}.group-data-\[variant\=line\]\/tabs-list\:data-\[state\=active\]\:shadow-none:is(:where(.group\/tabs-list)[data-variant=line] *)[data-state=active]{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.group-data-\[variant\=line\]\/tabs-list\:data-\[state\=active\]\:after\:opacity-100:is(:where(.group\/tabs-list)[data-variant=line] *)[data-state=active]:after{content:var(--tw-content);opacity:1}.data-\[state\=checked\]\:translate-x-\[calc\(100\%-2px\)\][data-state=checked]{--tw-translate-x:calc(100% - 2px);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=checked\]\:border-primary[data-state=checked]{border-color:var(--primary)}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:var(--primary-foreground)}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=closed\]\:duration-300[data-state=closed]{--tw-duration:.3s;transition-duration:.3s}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y:100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x:-100%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x:100%}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y:-100%}.data-\[state\=open\]\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:var(--accent)}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:var(--secondary)}.data-\[state\=open\]\:text-accent-foreground[data-state=open]{color:var(--accent-foreground)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\[state\=open\]\:duration-500[data-state=open]{--tw-duration:.5s;transition-duration:.5s}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y:100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x:-100%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x:100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y:-100%}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:var(--muted)}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x:0;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:var(--input)}.data-\[variant\=destructive\]\:text-destructive[data-variant=destructive]{color:var(--destructive)}.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:color-mix(in oklab, var(--destructive) 10%, transparent)}}.data-\[variant\=destructive\]\:focus\:text-destructive[data-variant=destructive]:focus{color:var(--destructive)}.data-\[variant\=line\]\:rounded-none[data-variant=line]{border-radius:0}@media not all and (width>=720px){.max-\[720px\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}}@media (width>=40rem){.sm\:max-w-2xl{max-width:var(--container-2xl)}.sm\:max-w-\[520px\]{max-width:520px}.sm\:max-w-lg{max-width:var(--container-lg)}.sm\:max-w-sm{max-width:var(--container-sm)}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}.sm\:text-left{text-align:left}}@media (width>=48rem){.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}}@media (width>=64rem){.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media (width>=80rem){.xl\:col-span-2{grid-column:span 2/span 2}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.dark\:border-input:is(.dark *){border-color:var(--input)}.dark\:bg-destructive\/60:is(.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-destructive\/60:is(.dark *){background-color:color-mix(in oklab, var(--destructive) 60%, transparent)}}.dark\:bg-input\/30:is(.dark *){background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:bg-input\/30:is(.dark *){background-color:color-mix(in oklab, var(--input) 30%, transparent)}}.dark\:bg-transparent:is(.dark *){background-color:#0000}.dark\:text-muted-foreground:is(.dark *){color:var(--muted-foreground)}@media (hover:hover){.dark\:hover\:bg-accent\/50:is(.dark *):hover{background-color:var(--accent)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-accent\/50:is(.dark *):hover{background-color:color-mix(in oklab, var(--accent) 50%, transparent)}}.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:color-mix(in oklab, var(--input) 50%, transparent)}}.dark\:hover\:text-foreground:is(.dark *):hover{color:var(--foreground)}}.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:data-\[state\=active\]\:border-input:is(.dark *)[data-state=active]{border-color:var(--input)}.dark\:data-\[state\=active\]\:bg-input\/30:is(.dark *)[data-state=active]{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:data-\[state\=active\]\:bg-input\/30:is(.dark *)[data-state=active]{background-color:color-mix(in oklab, var(--input) 30%, transparent)}}.dark\:data-\[state\=active\]\:text-foreground:is(.dark *)[data-state=active]{color:var(--foreground)}.dark\:group-data-\[variant\=line\]\/tabs-list\:data-\[state\=active\]\:border-transparent:is(.dark *):is(:where(.group\/tabs-list)[data-variant=line] *)[data-state=active]{border-color:#0000}.dark\:group-data-\[variant\=line\]\/tabs-list\:data-\[state\=active\]\:bg-transparent:is(.dark *):is(:where(.group\/tabs-list)[data-variant=line] *)[data-state=active]{background-color:#0000}.dark\:data-\[state\=checked\]\:bg-primary:is(.dark *)[data-state=checked]{background-color:var(--primary)}.dark\:data-\[state\=checked\]\:bg-primary-foreground:is(.dark *)[data-state=checked]{background-color:var(--primary-foreground)}.dark\:data-\[state\=unchecked\]\:bg-foreground:is(.dark *)[data-state=unchecked]{background-color:var(--foreground)}.dark\:data-\[state\=unchecked\]\:bg-input\/80:is(.dark *)[data-state=unchecked]{background-color:var(--input)}@supports (color:color-mix(in lab, red, red)){.dark\:data-\[state\=unchecked\]\:bg-input\/80:is(.dark *)[data-state=unchecked]{background-color:color-mix(in oklab, var(--input) 80%, transparent)}}.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20:is(.dark *)[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20:is(.dark *)[data-variant=destructive]:focus{background-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.\[\&_\.j-bool\]\:text-chart-4 .j-bool{color:var(--chart-4)}.\[\&_\.j-key\]\:text-chart-1 .j-key{color:var(--chart-1)}.\[\&_\.j-null\]\:text-muted-foreground .j-null{color:var(--muted-foreground)}.\[\&_\.j-num\]\:text-chart-3 .j-num{color:var(--chart-3)}.\[\&_\.j-str\]\:text-chart-2 .j-str{color:var(--chart-2)}.\[\&_\.recharts-cartesian-axis-tick_text\]\:fill-muted-foreground .recharts-cartesian-axis-tick text{fill:var(--muted-foreground)}.\[\&_\.recharts-cartesian-grid_line\[stroke\=\'\#ccc\'\]\]\:stroke-border\/50 .recharts-cartesian-grid line[stroke=\#ccc]{stroke:var(--border)}@supports (color:color-mix(in lab, red, red)){.\[\&_\.recharts-cartesian-grid_line\[stroke\=\'\#ccc\'\]\]\:stroke-border\/50 .recharts-cartesian-grid line[stroke=\#ccc]{stroke:color-mix(in oklab, var(--border) 50%, transparent)}}.\[\&_\.recharts-curve\.recharts-tooltip-cursor\]\:stroke-border .recharts-curve.recharts-tooltip-cursor{stroke:var(--border)}.\[\&_\.recharts-dot\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-dot[stroke=\#fff]{stroke:#0000}.\[\&_\.recharts-layer\]\:outline-hidden .recharts-layer{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.\[\&_\.recharts-layer\]\:outline-hidden .recharts-layer{outline-offset:2px;outline:2px solid #0000}}.\[\&_\.recharts-polar-grid_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-polar-grid [stroke=\#ccc]{stroke:var(--border)}.\[\&_\.recharts-radial-bar-background-sector\]\:fill-muted .recharts-radial-bar-background-sector,.\[\&_\.recharts-rectangle\.recharts-tooltip-cursor\]\:fill-muted .recharts-rectangle.recharts-tooltip-cursor{fill:var(--muted)}.\[\&_\.recharts-reference-line_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-reference-line [stroke=\#ccc]{stroke:var(--border)}.\[\&_\.recharts-sector\]\:outline-hidden .recharts-sector{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.\[\&_\.recharts-sector\]\:outline-hidden .recharts-sector{outline-offset:2px;outline:2px solid #0000}}.\[\&_\.recharts-sector\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-sector[stroke=\#fff]{stroke:#0000}.\[\&_\.recharts-surface\]\:outline-hidden .recharts-surface{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.\[\&_\.recharts-surface\]\:outline-hidden .recharts-surface{outline-offset:2px;outline:2px solid #0000}}.\[\&_\.wn-check\]\:inline-block .wn-check{display:inline-block}.\[\&_\.wn-check\]\:w-4 .wn-check{width:calc(var(--spacing) * 4)}.\[\&_\.wn-table-wrap\]\:my-2\.5 .wn-table-wrap{margin-block:calc(var(--spacing) * 2.5)}.\[\&_\.wn-table-wrap\]\:overflow-x-auto .wn-table-wrap{overflow-x:auto}.\[\&_\.wn-table-wrap\]\:rounded-md .wn-table-wrap{border-radius:var(--radius)}.\[\&_\.wn-table-wrap\]\:border .wn-table-wrap{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.wn-table-wrap\]\:border-border .wn-table-wrap{border-color:var(--border)}.\[\&_\.wn-task\]\:-ml-\[18px\] .wn-task{margin-left:-18px}.\[\&_\.wn-task\]\:list-none .wn-task{list-style-type:none}.\[\&_\.wn-task\.done_\.wn-check\]\:text-success .wn-task.done .wn-check{color:var(--success)}.\[\&_a\]\:text-brand a{color:var(--brand)}.\[\&_a\]\:underline a{text-decoration-line:underline}.\[\&_a\]\:underline-offset-2 a{text-underline-offset:2px}.\[\&_b\]\:font-medium b{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_b\]\:break-words b{overflow-wrap:break-word}.\[\&_b\]\:text-foreground b{color:var(--foreground)}.\[\&_blockquote\]\:my-2 blockquote{margin-block:calc(var(--spacing) * 2)}.\[\&_blockquote\]\:border-l-\[3px\] blockquote{border-left-style:var(--tw-border-style);border-left-width:3px}.\[\&_blockquote\]\:border-brand\/40 blockquote{border-color:var(--brand)}@supports (color:color-mix(in lab, red, red)){.\[\&_blockquote\]\:border-brand\/40 blockquote{border-color:color-mix(in oklab, var(--brand) 40%, transparent)}}.\[\&_blockquote\]\:px-3\.5 blockquote{padding-inline:calc(var(--spacing) * 3.5)}.\[\&_blockquote\]\:py-1\.5 blockquote{padding-block:calc(var(--spacing) * 1.5)}.\[\&_blockquote\]\:italic blockquote{font-style:italic}.\[\&_code\]\:rounded code{border-radius:.25rem}.\[\&_code\]\:border code{border-style:var(--tw-border-style);border-width:1px}.\[\&_code\]\:border-border code{border-color:var(--border)}.\[\&_code\]\:bg-muted code{background-color:var(--muted)}.\[\&_code\]\:px-1\.5 code{padding-inline:calc(var(--spacing) * 1.5)}.\[\&_code\]\:py-0\.5 code{padding-block:calc(var(--spacing) * .5)}.\[\&_code\]\:font-mono code{font-family:var(--font-mt)}.\[\&_code\]\:text-xs code{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_code\]\:text-brand code{color:var(--brand)}.\[\&_del\]\:text-muted-foreground del{color:var(--muted-foreground)}.\[\&_del\]\:opacity-60 del{opacity:.6}.\[\&_h2\]\:mt-\[18px\] h2{margin-top:18px}.\[\&_h2\]\:mb-1\.5 h2{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h2\]\:text-\[17px\] h2{font-size:17px}.\[\&_h2\]\:font-bold h2{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.\[\&_h2\]\:text-foreground h2{color:var(--foreground)}.\[\&_h3\]\:mt-\[18px\] h3{margin-top:18px}.\[\&_h3\]\:mb-1\.5 h3{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h3\]\:text-\[15px\] h3{font-size:15px}.\[\&_h3\]\:font-bold h3{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.\[\&_h3\]\:text-foreground h3{color:var(--foreground)}.\[\&_h4\]\:mt-\[18px\] h4{margin-top:18px}.\[\&_h4\]\:mb-1\.5 h4{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h4\]\:text-\[14px\] h4{font-size:14px}.\[\&_h4\]\:font-bold h4{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.\[\&_h4\]\:text-foreground h4{color:var(--foreground)}.\[\&_h5\]\:mt-\[18px\] h5{margin-top:18px}.\[\&_h5\]\:mb-1\.5 h5{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h5\]\:text-\[14px\] h5{font-size:14px}.\[\&_h5\]\:font-bold h5{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.\[\&_h5\]\:text-foreground h5{color:var(--foreground)}.\[\&_hr\]\:my-3\.5 hr{margin-block:calc(var(--spacing) * 3.5)}.\[\&_hr\]\:border-0 hr{border-style:var(--tw-border-style);border-width:0}.\[\&_hr\]\:border-t hr{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_hr\]\:border-border hr{border-color:var(--border)}.\[\&_i\]\:inline-block i{display:inline-block}.\[\&_i\]\:size-2\.5 i{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.\[\&_i\]\:rounded-\[3px\] i{border-radius:3px}.\[\&_img\]\:my-1\.5 img{margin-block:calc(var(--spacing) * 1.5)}.\[\&_img\]\:max-w-full img{max-width:100%}.\[\&_img\]\:rounded-md img{border-radius:var(--radius)}.\[\&_img\]\:border img{border-style:var(--tw-border-style);border-width:1px}.\[\&_img\]\:border-border img{border-color:var(--border)}.\[\&_li\]\:my-\[3px\] li{margin-block:3px}.\[\&_li\]\:marker\:text-brand li ::marker{color:var(--brand)}.\[\&_li\]\:marker\:text-brand li::marker{color:var(--brand)}.\[\&_li\]\:marker\:text-brand li ::-webkit-details-marker{color:var(--brand)}.\[\&_li\]\:marker\:text-brand li::-webkit-details-marker{color:var(--brand)}.\[\&_ol\]\:my-\[5px\] ol{margin-block:5px}.\[\&_ol\]\:list-decimal ol{list-style-type:decimal}.\[\&_ol\]\:pl-\[22px\] ol{padding-left:22px}.\[\&_p\]\:my-\[5px\] p{margin-block:5px}.\[\&_p\]\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_pre\]\:my-2 pre{margin-block:calc(var(--spacing) * 2)}.\[\&_pre\]\:overflow-x-auto pre{overflow-x:auto}.\[\&_pre\]\:rounded-md pre{border-radius:var(--radius)}.\[\&_pre\]\:border pre{border-style:var(--tw-border-style);border-width:1px}.\[\&_pre\]\:border-border pre{border-color:var(--border)}.\[\&_pre\]\:bg-background pre{background-color:var(--background)}.\[\&_pre\]\:p-3 pre{padding:calc(var(--spacing) * 3)}.\[\&_pre_code\]\:border-0 pre code{border-style:var(--tw-border-style);border-width:0}.\[\&_pre_code\]\:bg-transparent pre code{background-color:#0000}.\[\&_pre_code\]\:p-0 pre code{padding:0}.\[\&_pre_code\]\:text-muted-foreground pre code{color:var(--muted-foreground)}.\[\&_strong\]\:font-semibold strong{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_strong\]\:text-foreground strong{color:var(--foreground)}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-3 svg:not([class*=size-]){width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\:not\(\[class\*\=\'text-\'\]\)\]\:text-muted-foreground svg:not([class*=text-]){color:var(--muted-foreground)}.\[\&_table\]\:w-full table{width:100%}.\[\&_table\]\:border-collapse table{border-collapse:collapse}.\[\&_table\]\:font-mono table{font-family:var(--font-mt)}.\[\&_table\]\:text-xs table{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_td\]\:border-b td{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_td\]\:border-border td{border-color:var(--border)}.\[\&_td\]\:px-3 td{padding-inline:calc(var(--spacing) * 3)}.\[\&_td\]\:py-\[7px\] td{padding-block:7px}.\[\&_td\]\:text-muted-foreground td{color:var(--muted-foreground)}.\[\&_th\]\:border-b th{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_th\]\:border-border th{border-color:var(--border)}.\[\&_th\]\:bg-muted th{background-color:var(--muted)}.\[\&_th\]\:px-3 th{padding-inline:calc(var(--spacing) * 3)}.\[\&_th\]\:py-\[7px\] th{padding-block:7px}.\[\&_th\]\:text-left th{text-align:left}.\[\&_th\]\:text-\[11px\] th{font-size:11px}.\[\&_th\]\:font-semibold th{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_th\]\:tracking-wide th{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.\[\&_th\]\:text-foreground th{color:var(--foreground)}.\[\&_th\]\:uppercase th{text-transform:uppercase}.\[\&_tr\]\:border-b tr{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-style:var(--tw-border-style);border-width:0}.\[\&_ul\]\:my-\[5px\] ul{margin-block:5px}.\[\&_ul\]\:list-disc ul{list-style-type:disc}.\[\&_ul\]\:pl-\[18px\] ul{padding-left:18px}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\.border-b\]\:pb-6.border-b{padding-bottom:calc(var(--spacing) * 6)}.\[\.border-t\]\:pt-6.border-t{padding-top:calc(var(--spacing) * 6)}:is(.\*\:\[span\]\:last\:flex>*):is(span):last-child{display:flex}:is(.\*\:\[span\]\:last\:items-center>*):is(span):last-child{align-items:center}:is(.\*\:\[span\]\:last\:gap-2>*):is(span):last-child{gap:calc(var(--spacing) * 2)}:is(.data-\[variant\=destructive\]\:\*\:\[svg\]\:text-destructive\![data-variant=destructive]>*):is(svg){color:var(--destructive)!important}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y:2px;translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&\>b\]\:text-foreground>b{color:var(--foreground)}.\[\&\>span\]\:inline-flex>span{display:inline-flex}.\[\&\>span\]\:items-center>span{align-items:center}.\[\&\>span\]\:gap-1\.5>span{gap:calc(var(--spacing) * 1.5)}.\[\&\>svg\]\:pointer-events-none>svg{pointer-events:none}.\[\&\>svg\]\:size-3>svg{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\[\&\>svg\]\:size-4>svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&\>svg\]\:h-2\.5>svg{height:calc(var(--spacing) * 2.5)}.\[\&\>svg\]\:h-3>svg{height:calc(var(--spacing) * 3)}.\[\&\>svg\]\:w-2\.5>svg{width:calc(var(--spacing) * 2.5)}.\[\&\>svg\]\:w-3>svg{width:calc(var(--spacing) * 3)}.\[\&\>svg\]\:translate-y-0\.5>svg{--tw-translate-y:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&\>svg\]\:text-current>svg{color:currentColor}.\[\&\>svg\]\:text-muted-foreground>svg{color:var(--muted-foreground)}.\[\&\>tr\]\:last\:border-b-0>tr:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}@media (hover:hover){a.\[a\&\]\:hover\:bg-accent:hover{background-color:var(--accent)}a.\[a\&\]\:hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab, red, red)){a.\[a\&\]\:hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab, var(--destructive) 90%, transparent)}}a.\[a\&\]\:hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab, red, red)){a.\[a\&\]\:hover\:bg-primary\/90:hover{background-color:color-mix(in oklab, var(--primary) 90%, transparent)}}a.\[a\&\]\:hover\:bg-secondary\/90:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab, red, red)){a.\[a\&\]\:hover\:bg-secondary\/90:hover{background-color:color-mix(in oklab, var(--secondary) 90%, transparent)}}a.\[a\&\]\:hover\:text-accent-foreground:hover{color:var(--accent-foreground)}a.\[a\&\]\:hover\:underline:hover{text-decoration-line:underline}}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}.conn{display:block;overflow:visible}.conn-grid{fill:none;stroke:var(--border);stroke-opacity:.7;stroke-dasharray:2 7}.conn-sonar{fill:none;stroke:var(--brand);stroke-width:1.5px;opacity:0;animation:3.3s ease-out infinite conn-sonar}.conn-hub-glow{fill:var(--brand);opacity:.22;filter:blur(11px)}.conn-hub-ring{fill:none;stroke:var(--brand);stroke-width:1.4px;stroke-dasharray:4 9;opacity:.7;transform-box:fill-box;transform-origin:50%;animation:15s linear infinite conn-rot}.conn-node text{pointer-events:none}.conn-node-halo{fill:none;stroke-width:2px;transform-box:fill-box;transform-origin:50%;animation:2.4s ease-in-out infinite conn-halo}.conn-link{fill:none;stroke-width:1.6px;opacity:.38}.conn-flow{fill:none;stroke-width:2.4px;stroke-linecap:round;stroke-dasharray:2 13;opacity:.9;filter:drop-shadow(0 0 4px);animation:1.05s linear infinite conn-flow}.conn-packet{filter:drop-shadow(0 0 6px var(--chart-2))}.conn-chevron{fill:none;stroke-width:1.6px;stroke-linecap:round;stroke-linejoin:round;opacity:.6}.conn-tunnel-halo{fill:none;stroke-width:8px;stroke-linecap:round;opacity:.1}.conn-tunnel{fill:none;stroke-width:2.4px;stroke-linecap:round;stroke-dasharray:6 6;animation:.9s linear infinite conn-tunnel-flow}.conn-tunnel-lock{filter:drop-shadow(0 0 4px var(--warning))}@supports (color:color-mix(in lab, red, red)){.conn-tunnel-lock{filter:drop-shadow(0 0 4px color-mix(in srgb, var(--warning) 80%, transparent))}}.conn-tunnel-sat{stroke-width:1.5px;filter:drop-shadow(0 0 5px var(--warning))}@supports (color:color-mix(in lab, red, red)){.conn-tunnel-sat{filter:drop-shadow(0 0 5px color-mix(in srgb, var(--warning) 53%, transparent))}}.conn-tunnel-badge{fill:var(--warning)}@supports (color:color-mix(in lab, red, red)){.conn-tunnel-badge{fill:color-mix(in srgb, var(--warning) 16%, var(--background))}}.conn-tunnel-badge{stroke:var(--warning)}@supports (color:color-mix(in lab, red, red)){.conn-tunnel-badge{stroke:color-mix(in srgb, var(--warning) 60%, var(--border))}}.conn-tunnel-badge{stroke-width:1px}.conn-tunnel-badge-tx{fill:var(--warning);letter-spacing:.02em;font-weight:700}.jump-route__wire{background-image:linear-gradient(90deg, var(--border) 0 50%, transparent 50% 100%);background-size:8px 2px;border-radius:2px;flex:1;min-width:18px;height:2px;animation:.7s linear infinite jump-wire}.jump-route__wire--enc{background-image:linear-gradient(90deg, var(--warning) 0 55%, transparent 55% 100%);min-width:34px;height:3px;box-shadow:0 0 8px -1px var(--warning);background-size:10px 3px;position:relative}@supports (color:color-mix(in lab, red, red)){.jump-route__wire--enc{box-shadow:0 0 8px -1px color-mix(in srgb, var(--warning) 53%, transparent)}}.jump-route__lock{filter:drop-shadow(0 0 3px var(--warning));font-size:11px;animation:2.2s linear infinite jump-lock;position:absolute;top:50%}.topo-sweep{animation:8s linear infinite topo-sweep}.topo-ring{transform-box:fill-box;transform-origin:50%;animation:90s linear infinite reverse topo-ring}.topo-flow{animation:1.4s linear infinite topo-flow}.topo-pulse{transform-box:fill-box;transform-origin:50%;animation:2.6s ease-in-out infinite topo-pulse}.topo-halo{transform-box:fill-box;transform-origin:50%;animation:2.2s ease-out infinite topo-halo}@keyframes topo-sweep{to{transform:rotate(360deg)}}@keyframes topo-ring{to{transform:rotate(360deg)}}@keyframes topo-flow{to{stroke-dashoffset:-16px}}@keyframes topo-pulse{0%,to{opacity:.55;transform:scale(1)}50%{opacity:1;transform:scale(1.12)}}@keyframes topo-halo{0%{opacity:.5;transform:scale(1)}to{opacity:0;transform:scale(1.9)}}@keyframes conn-sonar{0%{r:30px;opacity:.5}to{r:150px;opacity:0}}@keyframes conn-flow{to{stroke-dashoffset:-60px}}@keyframes conn-rot{to{transform:rotate(360deg)}}@keyframes conn-halo{0%,to{opacity:.45;transform:scale(1)}50%{opacity:0;transform:scale(1.55)}}@keyframes conn-tunnel-flow{to{stroke-dashoffset:-24px}}@keyframes jump-wire{to{background-position:8px 0}}@keyframes jump-lock{0%{left:-4px;transform:translateY(-50%)scale(.9)}50%{transform:translateY(-50%)scale(1.1)}to{left:calc(100% - 8px);transform:translateY(-50%)scale(.9)}}@media (prefers-reduced-motion:reduce){.conn-sonar,.topo-sweep{display:none}.conn-flow,.conn-hub-ring,.conn-node-halo,.conn-tunnel,.jump-route__wire,.jump-route__lock,.topo-ring,.topo-flow,.topo-pulse,.topo-halo{animation:none}.conn-packet animateMotion,.conn-tunnel-lock animateMotion{display:none}}:root{--background:#fff;--foreground:#0a0a0a;--card:#fff;--card-foreground:#0a0a0a;--popover:#fff;--popover-foreground:#0a0a0a;--primary:#0a0a0a;--primary-foreground:#fafafa;--secondary:#f4f4f5;--secondary-foreground:#0a0a0a;--muted:#f4f4f5;--muted-foreground:#71717a;--accent:#f4f4f5;--accent-foreground:#0a0a0a;--destructive:#e5484d;--destructive-foreground:#fff;--success:#18794e;--warning:#ab6400;--border:#e4e4e7;--input:#e4e4e7;--radius:.5rem;--page-accent:var(--foreground);--page-accent-2:var(--muted-foreground);--brand:var(--page-accent);--brand-foreground:var(--background);--ring:var(--brand);--chart-1:#0068d6;--chart-2:#0f8a7e;--chart-3:#3d8f2f;--chart-4:#a35200;--chart-5:#7048c4;--entity-1:#0068d6;--entity-2:#087a52;--entity-3:#6d3fc4;--entity-4:#a35200;--entity-5:#c02a2a;--entity-6:#0f8a7e;--entity-7:#c0267a;--entity-8:#2563eb;--entity-9:#8a6a00;--entity-10:#b4530f}.dark{--background:#0a0a0a;--foreground:#ededed;--card:#111;--card-foreground:#ededed;--popover:#111;--popover-foreground:#ededed;--primary:#ededed;--primary-foreground:#0a0a0a;--secondary:#1a1a1a;--secondary-foreground:#ededed;--muted:#1a1a1a;--muted-foreground:#a1a1a1;--accent:#1a1a1a;--accent-foreground:#ededed;--destructive:#ff5c5c;--destructive-foreground:#fff;--success:#2dd4a7;--warning:#f5a623;--border:#2a2a2a;--input:#2a2a2a;--chart-1:#3291ff;--chart-2:#2dd4bf;--chart-3:#69d05a;--chart-4:#f5a623;--chart-5:#9d7bff;--entity-1:#3291ff;--entity-2:#34d399;--entity-3:#a78bfa;--entity-4:#f59e0b;--entity-5:#ef4444;--entity-6:#2dd4bf;--entity-7:#f472b6;--entity-8:#60a5fa;--entity-9:#facc15;--entity-10:#fb923c}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}}
158
159
  /*$vite$:1*/
159
160
  </style>
160
161
  </head>